allyhub 0.4.0 → 0.6.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 (1883) hide show
  1. package/bin/allyhub.js +12 -3
  2. package/dist/cloud-hearing.js +2 -0
  3. package/dist/commands/add.js +4 -4
  4. package/dist/commands/doctor.js +4 -4
  5. package/dist/commands/frames/sheet.js +2 -0
  6. package/dist/commands/frames.js +7 -6
  7. package/dist/commands/index.js +1 -1
  8. package/dist/commands/inspect/facts.js +3 -2
  9. package/dist/commands/inspect/index.js +1 -1
  10. package/dist/commands/inspect/sheet.js +3 -0
  11. package/dist/commands/reference-text.js +3 -3
  12. package/dist/commands/reference.js +1 -1
  13. package/dist/commands/render.js +2 -2
  14. package/dist/commands/sheet.js +7 -3
  15. package/dist/commands/slides.js +1 -1
  16. package/dist/commands/voice.js +1 -2
  17. package/dist/commands/words.js +1 -1
  18. package/dist/lent/model-three.d.ts +1 -1
  19. package/dist/lent/model.d.ts +1 -1
  20. package/dist/lent/scenery-host-layer.d.ts +1 -1
  21. package/dist/node_modules/@allyhub-next/audio/package.json +17 -0
  22. package/dist/node_modules/@allyhub-next/browser/package.json +13 -0
  23. package/dist/node_modules/@allyhub-next/build/dist/content.d.ts +45 -0
  24. package/dist/node_modules/@allyhub-next/build/dist/content.js +2 -0
  25. package/dist/node_modules/@allyhub-next/build/dist/data.d.ts +13 -0
  26. package/dist/node_modules/@allyhub-next/build/dist/data.js +3 -0
  27. package/dist/node_modules/@allyhub-next/build/dist/files.d.ts +4 -0
  28. package/dist/node_modules/@allyhub-next/build/dist/files.js +2 -0
  29. package/dist/node_modules/@allyhub-next/build/dist/index.d.ts +21 -0
  30. package/dist/node_modules/@allyhub-next/build/dist/index.js +2 -0
  31. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +49 -0
  32. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.js +4 -0
  33. package/dist/node_modules/@allyhub-next/build/dist/plugin.js +12 -0
  34. package/dist/node_modules/@allyhub-next/build/dist/prepare.js +3 -0
  35. package/dist/node_modules/@allyhub-next/build/dist/scan.js +2 -0
  36. package/dist/node_modules/@allyhub-next/build/dist/sheet-code.d.ts +34 -0
  37. package/dist/node_modules/@allyhub-next/build/dist/sheet-code.js +2 -0
  38. package/dist/node_modules/@allyhub-next/build/package.json +13 -0
  39. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.d.ts +31 -0
  40. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +3 -0
  41. package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +195 -0
  42. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +2 -0
  43. package/dist/node_modules/@allyhub-next/chart/dist/index.d.ts +3 -0
  44. package/dist/node_modules/@allyhub-next/chart/dist/index.js +2 -0
  45. package/dist/node_modules/@allyhub-next/chart/package.json +14 -0
  46. package/dist/node_modules/@allyhub-next/check/dist/check.js +4 -0
  47. package/dist/node_modules/@allyhub-next/check/package.json +13 -0
  48. package/dist/node_modules/@allyhub-next/cloud/package.json +13 -0
  49. package/dist/node_modules/@allyhub-next/components/package.json +12 -0
  50. package/dist/node_modules/@allyhub-next/dev-server/dist/card.js +2 -0
  51. package/dist/node_modules/@allyhub-next/dev-server/dist/exports.js +2 -0
  52. package/dist/node_modules/@allyhub-next/dev-server/dist/live.d.ts +77 -0
  53. package/dist/node_modules/@allyhub-next/dev-server/dist/live.js +2 -0
  54. package/dist/node_modules/@allyhub-next/dev-server/dist/tools.js +2 -0
  55. package/dist/node_modules/@allyhub-next/dev-server/dist/validate.js +3 -0
  56. package/dist/node_modules/@allyhub-next/dev-server/package.json +13 -0
  57. package/dist/node_modules/@allyhub-next/doc/package.json +17 -0
  58. package/dist/node_modules/@allyhub-next/export/dist/export.d.ts +123 -0
  59. package/dist/node_modules/@allyhub-next/export/dist/export.js +7 -0
  60. package/dist/node_modules/@allyhub-next/export/dist/names.d.ts +36 -0
  61. package/dist/node_modules/@allyhub-next/export/package.json +13 -0
  62. package/dist/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +590 -0
  63. package/dist/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  64. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +5087 -0
  65. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  66. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1789 -0
  67. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +2 -0
  68. package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +20 -0
  69. package/dist/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  70. package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +120 -0
  71. package/dist/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  72. package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +2278 -0
  73. package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  74. package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +28 -0
  75. package/dist/node_modules/@allyhub-next/formats/dist/strict.js +2 -0
  76. package/dist/node_modules/@allyhub-next/formats/dist/zip.d.ts +17 -0
  77. package/dist/node_modules/@allyhub-next/formats/dist/zip.js +2 -0
  78. package/dist/node_modules/@allyhub-next/formats/package.json +14 -0
  79. package/dist/node_modules/@allyhub-next/measure/dist/facts.js +2 -0
  80. package/dist/node_modules/@allyhub-next/measure/dist/index.d.ts +24 -0
  81. package/dist/node_modules/@allyhub-next/measure/dist/index.js +2 -0
  82. package/dist/node_modules/@allyhub-next/measure/dist/reference/folder.d.ts +75 -0
  83. package/dist/node_modules/@allyhub-next/measure/dist/reference/folder.js +4 -0
  84. package/dist/node_modules/@allyhub-next/measure/dist/reference/video.d.ts +55 -0
  85. package/dist/node_modules/@allyhub-next/measure/dist/reference/video.js +2 -0
  86. package/dist/node_modules/@allyhub-next/measure/package.json +13 -0
  87. package/dist/node_modules/@allyhub-next/media/dist/asr/transcribe.d.ts +50 -0
  88. package/dist/node_modules/@allyhub-next/media/dist/asr/transcribe.js +2 -0
  89. package/dist/node_modules/@allyhub-next/media/dist/index.d.ts +37 -0
  90. package/dist/node_modules/@allyhub-next/media/package.json +13 -0
  91. package/dist/node_modules/@allyhub-next/model/dist/build-worker.js +2 -0
  92. package/dist/node_modules/@allyhub-next/model/dist/build.js +3 -0
  93. package/dist/node_modules/@allyhub-next/model/package.json +25 -0
  94. package/dist/node_modules/@allyhub-next/project/package.json +13 -0
  95. package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +412 -0
  96. package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
  97. package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +167 -0
  98. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +2 -0
  99. package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +389 -0
  100. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  101. package/dist/node_modules/@allyhub-next/protocol/package.json +13 -0
  102. package/dist/node_modules/@allyhub-next/registry/package.json +13 -0
  103. package/dist/node_modules/@allyhub-next/render/dist/doc/index.d.ts +3 -0
  104. package/dist/node_modules/@allyhub-next/render/dist/doc/index.js +2 -0
  105. package/dist/node_modules/@allyhub-next/render/dist/doc/print.d.ts +51 -0
  106. package/dist/node_modules/@allyhub-next/render/dist/doc/print.js +18 -0
  107. package/dist/node_modules/@allyhub-next/render/dist/exports.d.ts +67 -0
  108. package/dist/node_modules/@allyhub-next/render/dist/exports.js +3 -0
  109. package/dist/node_modules/@allyhub-next/render/dist/index.d.ts +26 -0
  110. package/dist/node_modules/@allyhub-next/render/dist/index.js +2 -0
  111. package/dist/node_modules/@allyhub-next/render/dist/page.d.ts +178 -0
  112. package/dist/node_modules/@allyhub-next/render/package.json +17 -0
  113. package/dist/node_modules/@allyhub-next/runtime/dist/compose.js +2 -0
  114. package/dist/node_modules/@allyhub-next/runtime/dist/footage.d.ts +52 -0
  115. package/dist/node_modules/@allyhub-next/runtime/dist/footage.js +2 -0
  116. package/dist/node_modules/@allyhub-next/runtime/dist/reads.js +2 -0
  117. package/dist/node_modules/@allyhub-next/runtime/package.json +21 -0
  118. package/dist/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +8 -0
  119. package/dist/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  120. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +69 -0
  121. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +4 -0
  122. package/dist/node_modules/@allyhub-next/runtimes/package.json +18 -0
  123. package/dist/node_modules/@allyhub-next/scaffold/dist/index.js +16 -0
  124. package/dist/node_modules/@allyhub-next/scaffold/package.json +13 -0
  125. package/dist/node_modules/@allyhub-next/scenery/dist/moire.d.ts +143 -0
  126. package/dist/node_modules/@allyhub-next/scenery/dist/phone.d.ts +36 -0
  127. package/dist/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  128. package/dist/node_modules/@allyhub-next/scenery/package.json +13 -0
  129. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +75 -0
  130. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.js +6 -0
  131. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/index.js +2 -0
  132. package/dist/node_modules/@allyhub-next/scenery-host/package.json +29 -0
  133. package/dist/node_modules/@allyhub-next/sheet/dist/address.d.ts +32 -0
  134. package/dist/node_modules/@allyhub-next/sheet/dist/address.js +2 -0
  135. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.d.ts +23 -0
  136. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +2 -0
  137. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.d.ts +204 -0
  138. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.js +2 -0
  139. package/dist/node_modules/@allyhub-next/sheet/dist/api/code.d.ts +19 -0
  140. package/dist/node_modules/@allyhub-next/sheet/dist/api/code.js +2 -0
  141. package/dist/node_modules/@allyhub-next/sheet/dist/api/hint.d.ts +3 -0
  142. package/dist/node_modules/@allyhub-next/sheet/dist/api/hint.js +2 -0
  143. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.d.ts +8 -0
  144. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.js +2 -0
  145. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.d.ts +83 -0
  146. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +2 -0
  147. package/dist/node_modules/@allyhub-next/sheet/dist/api/rectangles.d.ts +4 -0
  148. package/dist/node_modules/@allyhub-next/sheet/dist/api/rectangles.js +2 -0
  149. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.d.ts +170 -0
  150. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.js +2 -0
  151. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.d.ts +117 -0
  152. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.js +2 -0
  153. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +362 -0
  154. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +2 -0
  155. package/dist/node_modules/@allyhub-next/sheet/dist/arrange.d.ts +68 -0
  156. package/dist/node_modules/@allyhub-next/sheet/dist/arrange.js +2 -0
  157. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +21 -0
  158. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +2 -0
  159. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +19 -0
  160. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +2 -0
  161. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +152 -0
  162. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +2 -0
  163. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.d.ts +2 -0
  164. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +2 -0
  165. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.d.ts +15 -0
  166. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +2 -0
  167. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.d.ts +2 -0
  168. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +2 -0
  169. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.d.ts +2 -0
  170. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +2 -0
  171. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +69 -0
  172. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +2 -0
  173. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/distributions.d.ts +2 -0
  174. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/distributions.js +2 -0
  175. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +2 -0
  176. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +2 -0
  177. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.d.ts +2 -0
  178. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +2 -0
  179. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +15 -0
  180. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +2 -0
  181. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.d.ts +2 -0
  182. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +2 -0
  183. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.d.ts +2 -0
  184. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +2 -0
  185. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.d.ts +2 -0
  186. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +2 -0
  187. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.d.ts +2 -0
  188. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +2 -0
  189. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.d.ts +2 -0
  190. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +2 -0
  191. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/special.d.ts +29 -0
  192. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/special.js +2 -0
  193. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.d.ts +2 -0
  194. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +2 -0
  195. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +50 -0
  196. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +2 -0
  197. package/dist/node_modules/@allyhub-next/sheet/dist/chart.d.ts +58 -0
  198. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +2 -0
  199. package/dist/node_modules/@allyhub-next/sheet/dist/check.d.ts +15 -0
  200. package/dist/node_modules/@allyhub-next/sheet/dist/check.js +2 -0
  201. package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +64 -0
  202. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +2 -0
  203. package/dist/node_modules/@allyhub-next/sheet/dist/edit.d.ts +154 -0
  204. package/dist/node_modules/@allyhub-next/sheet/dist/edit.js +2 -0
  205. package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +11 -0
  206. package/dist/node_modules/@allyhub-next/sheet/dist/export.js +6 -0
  207. package/dist/node_modules/@allyhub-next/sheet/dist/file.d.ts +19 -0
  208. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +3 -0
  209. package/dist/node_modules/@allyhub-next/sheet/dist/files.d.ts +24 -0
  210. package/dist/node_modules/@allyhub-next/sheet/dist/files.js +2 -0
  211. package/dist/node_modules/@allyhub-next/sheet/dist/fill.d.ts +30 -0
  212. package/dist/node_modules/@allyhub-next/sheet/dist/fill.js +2 -0
  213. package/dist/node_modules/@allyhub-next/sheet/dist/filter.d.ts +29 -0
  214. package/dist/node_modules/@allyhub-next/sheet/dist/filter.js +2 -0
  215. package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +9 -0
  216. package/dist/node_modules/@allyhub-next/sheet/dist/format.js +2 -0
  217. package/dist/node_modules/@allyhub-next/sheet/dist/formula/ast.d.ts +113 -0
  218. package/dist/node_modules/@allyhub-next/sheet/dist/formula/ast.js +2 -0
  219. package/dist/node_modules/@allyhub-next/sheet/dist/formula/move.d.ts +6 -0
  220. package/dist/node_modules/@allyhub-next/sheet/dist/formula/move.js +2 -0
  221. package/dist/node_modules/@allyhub-next/sheet/dist/formula/parse.d.ts +4 -0
  222. package/dist/node_modules/@allyhub-next/sheet/dist/formula/parse.js +2 -0
  223. package/dist/node_modules/@allyhub-next/sheet/dist/formula/print.d.ts +6 -0
  224. package/dist/node_modules/@allyhub-next/sheet/dist/formula/print.js +2 -0
  225. package/dist/node_modules/@allyhub-next/sheet/dist/formula/rewrite.d.ts +65 -0
  226. package/dist/node_modules/@allyhub-next/sheet/dist/formula/rewrite.js +2 -0
  227. package/dist/node_modules/@allyhub-next/sheet/dist/formula/walk.d.ts +6 -0
  228. package/dist/node_modules/@allyhub-next/sheet/dist/formula/walk.js +2 -0
  229. package/dist/node_modules/@allyhub-next/sheet/dist/generated.d.ts +46 -0
  230. package/dist/node_modules/@allyhub-next/sheet/dist/generated.js +2 -0
  231. package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +34 -0
  232. package/dist/node_modules/@allyhub-next/sheet/dist/html.js +20 -0
  233. package/dist/node_modules/@allyhub-next/sheet/dist/import.d.ts +11 -0
  234. package/dist/node_modules/@allyhub-next/sheet/dist/import.js +2 -0
  235. package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +38 -0
  236. package/dist/node_modules/@allyhub-next/sheet/dist/index.js +2 -0
  237. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.d.ts +25 -0
  238. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +2 -0
  239. package/dist/node_modules/@allyhub-next/sheet/dist/patch.d.ts +4 -0
  240. package/dist/node_modules/@allyhub-next/sheet/dist/patch.js +2 -0
  241. package/dist/node_modules/@allyhub-next/sheet/dist/profile.d.ts +30 -0
  242. package/dist/node_modules/@allyhub-next/sheet/dist/profile.js +2 -0
  243. package/dist/node_modules/@allyhub-next/sheet/dist/rules.d.ts +56 -0
  244. package/dist/node_modules/@allyhub-next/sheet/dist/rules.js +2 -0
  245. package/dist/node_modules/@allyhub-next/sheet/dist/scenario.d.ts +42 -0
  246. package/dist/node_modules/@allyhub-next/sheet/dist/scenario.js +2 -0
  247. package/dist/node_modules/@allyhub-next/sheet/dist/series.d.ts +10 -0
  248. package/dist/node_modules/@allyhub-next/sheet/dist/series.js +2 -0
  249. package/dist/node_modules/@allyhub-next/sheet/dist/sort.d.ts +24 -0
  250. package/dist/node_modules/@allyhub-next/sheet/dist/sort.js +2 -0
  251. package/dist/node_modules/@allyhub-next/sheet/dist/structure.d.ts +38 -0
  252. package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +2 -0
  253. package/dist/node_modules/@allyhub-next/sheet/dist/validate.d.ts +26 -0
  254. package/dist/node_modules/@allyhub-next/sheet/dist/validate.js +2 -0
  255. package/dist/node_modules/@allyhub-next/sheet/dist/values.d.ts +67 -0
  256. package/dist/node_modules/@allyhub-next/sheet/dist/values.js +2 -0
  257. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +315 -0
  258. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +2 -0
  259. package/dist/node_modules/@allyhub-next/sheet/dist/write.d.ts +5 -0
  260. package/dist/node_modules/@allyhub-next/sheet/dist/write.js +21 -0
  261. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +44 -0
  262. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +2 -0
  263. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/colors.d.ts +19 -0
  264. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/colors.js +2 -0
  265. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +21 -0
  266. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +4 -0
  267. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +5 -0
  268. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +17 -0
  269. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +47 -0
  270. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +2 -0
  271. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/index.d.ts +5 -0
  272. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/index.js +2 -0
  273. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/numfmt.d.ts +8 -0
  274. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/numfmt.js +2 -0
  275. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +118 -0
  276. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -0
  277. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +23 -0
  278. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +2 -0
  279. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/theme.d.ts +3 -0
  280. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/theme.js +2 -0
  281. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +17 -0
  282. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +2 -0
  283. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/xml.d.ts +28 -0
  284. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/xml.js +3 -0
  285. package/dist/node_modules/@allyhub-next/sheet/package.json +21 -0
  286. package/dist/node_modules/@allyhub-next/site/package.json +25 -0
  287. package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +706 -0
  288. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +4 -0
  289. package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +2 -0
  290. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +188 -0
  291. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +2 -0
  292. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.d.ts +11 -0
  293. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +2 -0
  294. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +166 -0
  295. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +2 -0
  296. package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +22 -0
  297. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +2 -0
  298. package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +311 -0
  299. package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +68 -0
  300. package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +2 -0
  301. package/dist/node_modules/@allyhub-next/slides-core/dist/preset.d.ts +5 -0
  302. package/dist/node_modules/@allyhub-next/slides-core/dist/preset.js +2 -0
  303. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +186 -0
  304. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +2 -0
  305. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +7 -0
  306. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +2 -0
  307. package/dist/node_modules/@allyhub-next/slides-core/package.json +14 -0
  308. package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.js +2 -0
  309. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.js +3 -0
  310. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.d.ts +56 -0
  311. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.js +4 -0
  312. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.d.ts +72 -0
  313. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +2 -0
  314. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.d.ts +32 -0
  315. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.js +2 -0
  316. package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.js +3 -0
  317. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.d.ts +32 -0
  318. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.js +3 -0
  319. package/dist/node_modules/@allyhub-next/slides-pptx/package.json +14 -0
  320. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.d.ts +43 -0
  321. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.js +3 -0
  322. package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.js +2 -0
  323. package/dist/node_modules/@allyhub-next/slides-runtime/package.json +14 -0
  324. package/dist/node_modules/@allyhub-next/stage/dist/graphics.js +2 -0
  325. package/dist/node_modules/@allyhub-next/stage/dist/scenery.js +2 -0
  326. package/dist/node_modules/@allyhub-next/stage/package.json +13 -0
  327. package/dist/node_modules/@allyhub-next/stage-page/dist/page.js +79 -0
  328. package/dist/node_modules/@allyhub-next/stage-page/package.json +14 -0
  329. package/dist/node_modules/@allyhub-next/video-core/LICENSE +241 -0
  330. package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +1140 -0
  331. package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  332. package/dist/node_modules/@allyhub-next/video-core/dist/formats.d.ts +205 -0
  333. package/dist/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  334. package/dist/node_modules/@allyhub-next/video-core/dist/measure.d.ts +558 -0
  335. package/dist/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  336. package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +274 -0
  337. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  338. package/dist/node_modules/@allyhub-next/video-core/package.json +14 -0
  339. package/dist/text/facts-text.js +5 -5
  340. package/dist/works.js +1 -1
  341. package/editor-web/assets/dist-BW2s9FMO.js +4 -0
  342. package/editor-web/assets/dist-C-6JmebI.js +233 -0
  343. package/editor-web/assets/dist-CCYMLMKN.js +6 -0
  344. package/editor-web/assets/dist-CHzurjMx.js +33 -0
  345. package/editor-web/assets/dist-DF7H1dxw.js +1 -0
  346. package/editor-web/assets/dist-Da5AUSKX.js +2 -0
  347. package/editor-web/assets/index-B7S9RZhL.css +2 -0
  348. package/editor-web/assets/index-CovQYWvD.js +69 -0
  349. package/editor-web/assets/minus-BrvjaJyO.js +1 -0
  350. package/editor-web/assets/react-DV5fPdiH.js +101 -0
  351. package/editor-web/assets/textarea-B0vCGdZI.js +105 -0
  352. package/editor-web/assets/trash-2-B0dvc1cZ.js +1 -0
  353. package/editor-web/assets/undo-2-A1EPubPO.js +1 -0
  354. package/editor-web/index.html +3 -3
  355. package/package.json +6 -70
  356. package/editor-web/assets/browser-B31cR_c2.js +0 -105
  357. package/editor-web/assets/dist-6TNEuNMX.js +0 -4
  358. package/editor-web/assets/dist-Cm2TIjW5.js +0 -2
  359. package/editor-web/assets/dist-Cpt0p8bX.js +0 -6
  360. package/editor-web/assets/dist-D2GccKEJ.js +0 -1
  361. package/editor-web/assets/dist-Z0zvYXmu.js +0 -233
  362. package/editor-web/assets/dist-fs4ONrUV.js +0 -32
  363. package/editor-web/assets/index-CAcsAZ9u.js +0 -70
  364. package/editor-web/assets/index-DlcJckhO.css +0 -2
  365. package/editor-web/assets/list-D2v7U8K8.js +0 -1
  366. package/editor-web/assets/react-D0RmGe2w.js +0 -101
  367. package/editor-web/assets/text-align-start-B3k2cx5f.js +0 -1
  368. package/editor-web/assets/undo-2-Ecr7-Obc.js +0 -1
  369. package/node_modules/@allyhub-next/audio/package.json +0 -17
  370. package/node_modules/@allyhub-next/browser/package.json +0 -13
  371. package/node_modules/@allyhub-next/build/dist/content.d.ts +0 -35
  372. package/node_modules/@allyhub-next/build/dist/content.js +0 -2
  373. package/node_modules/@allyhub-next/build/dist/data.d.ts +0 -11
  374. package/node_modules/@allyhub-next/build/dist/data.js +0 -3
  375. package/node_modules/@allyhub-next/build/dist/files.d.ts +0 -2
  376. package/node_modules/@allyhub-next/build/dist/files.js +0 -2
  377. package/node_modules/@allyhub-next/build/dist/index.d.ts +0 -20
  378. package/node_modules/@allyhub-next/build/dist/index.js +0 -2
  379. package/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +0 -43
  380. package/node_modules/@allyhub-next/build/dist/meta-worker.js +0 -3
  381. package/node_modules/@allyhub-next/build/dist/plugin.js +0 -12
  382. package/node_modules/@allyhub-next/build/dist/prepare.js +0 -3
  383. package/node_modules/@allyhub-next/build/dist/scan.js +0 -2
  384. package/node_modules/@allyhub-next/build/package.json +0 -13
  385. package/node_modules/@allyhub-next/check/dist/check.js +0 -4
  386. package/node_modules/@allyhub-next/check/package.json +0 -13
  387. package/node_modules/@allyhub-next/cloud/package.json +0 -13
  388. package/node_modules/@allyhub-next/components/package.json +0 -12
  389. package/node_modules/@allyhub-next/dev-server/dist/card.js +0 -2
  390. package/node_modules/@allyhub-next/dev-server/dist/exports.js +0 -2
  391. package/node_modules/@allyhub-next/dev-server/dist/live.d.ts +0 -71
  392. package/node_modules/@allyhub-next/dev-server/dist/live.js +0 -2
  393. package/node_modules/@allyhub-next/dev-server/dist/tools.js +0 -2
  394. package/node_modules/@allyhub-next/dev-server/dist/validate.js +0 -3
  395. package/node_modules/@allyhub-next/dev-server/package.json +0 -13
  396. package/node_modules/@allyhub-next/doc/package.json +0 -17
  397. package/node_modules/@allyhub-next/export/dist/export.d.ts +0 -119
  398. package/node_modules/@allyhub-next/export/dist/export.js +0 -3
  399. package/node_modules/@allyhub-next/export/dist/names.d.ts +0 -36
  400. package/node_modules/@allyhub-next/export/package.json +0 -13
  401. package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +0 -676
  402. package/node_modules/@allyhub-next/formats/dist/data/reference.js +0 -2
  403. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +0 -214
  404. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +0 -2
  405. package/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +0 -1494
  406. package/node_modules/@allyhub-next/formats/dist/data/slides.js +0 -2
  407. package/node_modules/@allyhub-next/formats/dist/index.d.ts +0 -18
  408. package/node_modules/@allyhub-next/formats/dist/index.js +0 -2
  409. package/node_modules/@allyhub-next/formats/dist/items.d.ts +0 -120
  410. package/node_modules/@allyhub-next/formats/dist/items.js +0 -2
  411. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +0 -719
  412. package/node_modules/@allyhub-next/formats/dist/schemas.js +0 -2
  413. package/node_modules/@allyhub-next/formats/package.json +0 -14
  414. package/node_modules/@allyhub-next/measure/dist/facts.js +0 -2
  415. package/node_modules/@allyhub-next/measure/dist/index.d.ts +0 -25
  416. package/node_modules/@allyhub-next/measure/dist/index.js +0 -2
  417. package/node_modules/@allyhub-next/measure/dist/reference/folder.d.ts +0 -77
  418. package/node_modules/@allyhub-next/measure/dist/reference/folder.js +0 -4
  419. package/node_modules/@allyhub-next/measure/dist/reference/served.d.ts +0 -8
  420. package/node_modules/@allyhub-next/measure/dist/reference/served.js +0 -2
  421. package/node_modules/@allyhub-next/measure/dist/reference/video.d.ts +0 -53
  422. package/node_modules/@allyhub-next/measure/dist/reference/video.js +0 -2
  423. package/node_modules/@allyhub-next/measure/package.json +0 -13
  424. package/node_modules/@allyhub-next/media/dist/asr/transcribe.d.ts +0 -36
  425. package/node_modules/@allyhub-next/media/dist/asr/transcribe.js +0 -2
  426. package/node_modules/@allyhub-next/media/dist/index.d.ts +0 -37
  427. package/node_modules/@allyhub-next/media/package.json +0 -13
  428. package/node_modules/@allyhub-next/model/dist/build-worker.js +0 -2
  429. package/node_modules/@allyhub-next/model/dist/build.js +0 -3
  430. package/node_modules/@allyhub-next/model/package.json +0 -25
  431. package/node_modules/@allyhub-next/project/package.json +0 -13
  432. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +0 -392
  433. package/node_modules/@allyhub-next/protocol/dist/editor.js +0 -2
  434. package/node_modules/@allyhub-next/protocol/dist/notes.d.ts +0 -163
  435. package/node_modules/@allyhub-next/protocol/dist/notes.js +0 -2
  436. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +0 -383
  437. package/node_modules/@allyhub-next/protocol/dist/tools.js +0 -2
  438. package/node_modules/@allyhub-next/protocol/package.json +0 -13
  439. package/node_modules/@allyhub-next/registry/package.json +0 -13
  440. package/node_modules/@allyhub-next/render/dist/doc/index.d.ts +0 -3
  441. package/node_modules/@allyhub-next/render/dist/doc/index.js +0 -2
  442. package/node_modules/@allyhub-next/render/dist/doc/print.d.ts +0 -36
  443. package/node_modules/@allyhub-next/render/dist/doc/print.js +0 -18
  444. package/node_modules/@allyhub-next/render/dist/exports.d.ts +0 -76
  445. package/node_modules/@allyhub-next/render/dist/exports.js +0 -3
  446. package/node_modules/@allyhub-next/render/dist/index.d.ts +0 -27
  447. package/node_modules/@allyhub-next/render/dist/index.js +0 -2
  448. package/node_modules/@allyhub-next/render/dist/page.d.ts +0 -186
  449. package/node_modules/@allyhub-next/render/dist/served.d.ts +0 -27
  450. package/node_modules/@allyhub-next/render/dist/served.js +0 -2
  451. package/node_modules/@allyhub-next/render/package.json +0 -17
  452. package/node_modules/@allyhub-next/runtime/dist/compose.js +0 -2
  453. package/node_modules/@allyhub-next/runtime/dist/footage.d.ts +0 -54
  454. package/node_modules/@allyhub-next/runtime/dist/footage.js +0 -2
  455. package/node_modules/@allyhub-next/runtime/dist/reads.js +0 -2
  456. package/node_modules/@allyhub-next/runtime/package.json +0 -21
  457. package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +0 -6
  458. package/node_modules/@allyhub-next/runtimes/dist/lock.js +0 -2
  459. package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +0 -63
  460. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +0 -3
  461. package/node_modules/@allyhub-next/runtimes/package.json +0 -18
  462. package/node_modules/@allyhub-next/runtimes/pins/exceljs/package-lock.json +0 -2533
  463. package/node_modules/@allyhub-next/runtimes/pins/exceljs/package.json +0 -8
  464. package/node_modules/@allyhub-next/scaffold/dist/index.js +0 -16
  465. package/node_modules/@allyhub-next/scaffold/package.json +0 -13
  466. package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +0 -136
  467. package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +0 -34
  468. package/node_modules/@allyhub-next/scenery/dist/phone.js +0 -2
  469. package/node_modules/@allyhub-next/scenery/package.json +0 -13
  470. package/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +0 -69
  471. package/node_modules/@allyhub-next/scenery-host/dist/bundle.js +0 -6
  472. package/node_modules/@allyhub-next/scenery-host/dist/layer/index.js +0 -2
  473. package/node_modules/@allyhub-next/scenery-host/package.json +0 -29
  474. package/node_modules/@allyhub-next/sheet/dist/check.d.ts +0 -26
  475. package/node_modules/@allyhub-next/sheet/dist/check.js +0 -2
  476. package/node_modules/@allyhub-next/sheet/dist/export.d.ts +0 -15
  477. package/node_modules/@allyhub-next/sheet/dist/export.js +0 -4
  478. package/node_modules/@allyhub-next/sheet/dist/import.d.ts +0 -22
  479. package/node_modules/@allyhub-next/sheet/dist/import.js +0 -3
  480. package/node_modules/@allyhub-next/sheet/dist/index.d.ts +0 -13
  481. package/node_modules/@allyhub-next/sheet/dist/index.js +0 -2
  482. package/node_modules/@allyhub-next/sheet/dist/model.d.ts +0 -133
  483. package/node_modules/@allyhub-next/sheet/dist/model.js +0 -2
  484. package/node_modules/@allyhub-next/sheet/dist/patch.d.ts +0 -12
  485. package/node_modules/@allyhub-next/sheet/dist/patch.js +0 -4
  486. package/node_modules/@allyhub-next/sheet/dist/profile.d.ts +0 -32
  487. package/node_modules/@allyhub-next/sheet/dist/profile.js +0 -2
  488. package/node_modules/@allyhub-next/sheet/dist/sheet.d.ts +0 -17
  489. package/node_modules/@allyhub-next/sheet/dist/sheet.js +0 -2
  490. package/node_modules/@allyhub-next/sheet/dist/spec-write.d.ts +0 -27
  491. package/node_modules/@allyhub-next/sheet/dist/spec-write.js +0 -16
  492. package/node_modules/@allyhub-next/sheet/dist/spec.d.ts +0 -29
  493. package/node_modules/@allyhub-next/sheet/dist/spec.js +0 -3
  494. package/node_modules/@allyhub-next/sheet/dist/values.d.ts +0 -55
  495. package/node_modules/@allyhub-next/sheet/dist/values.js +0 -2
  496. package/node_modules/@allyhub-next/sheet/dist/view.d.ts +0 -26
  497. package/node_modules/@allyhub-next/sheet/dist/view.js +0 -2
  498. package/node_modules/@allyhub-next/sheet/dist/xlsx.d.ts +0 -26
  499. package/node_modules/@allyhub-next/sheet/dist/xlsx.js +0 -2
  500. package/node_modules/@allyhub-next/sheet/package.json +0 -17
  501. package/node_modules/@allyhub-next/site/package.json +0 -25
  502. package/node_modules/@allyhub-next/slides-core/dist/api.d.ts +0 -649
  503. package/node_modules/@allyhub-next/slides-core/dist/api.js +0 -4
  504. package/node_modules/@allyhub-next/slides-core/dist/capabilities.js +0 -2
  505. package/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +0 -165
  506. package/node_modules/@allyhub-next/slides-core/dist/chart-api.js +0 -2
  507. package/node_modules/@allyhub-next/slides-core/dist/chart-file.d.ts +0 -11
  508. package/node_modules/@allyhub-next/slides-core/dist/chart-file.js +0 -2
  509. package/node_modules/@allyhub-next/slides-core/dist/chart.d.ts +0 -184
  510. package/node_modules/@allyhub-next/slides-core/dist/chart.js +0 -2
  511. package/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +0 -146
  512. package/node_modules/@allyhub-next/slides-core/dist/enums.js +0 -2
  513. package/node_modules/@allyhub-next/slides-core/dist/index.d.ts +0 -21
  514. package/node_modules/@allyhub-next/slides-core/dist/index.js +0 -2
  515. package/node_modules/@allyhub-next/slides-core/dist/model.d.ts +0 -278
  516. package/node_modules/@allyhub-next/slides-core/dist/office.d.ts +0 -58
  517. package/node_modules/@allyhub-next/slides-core/dist/office.js +0 -2
  518. package/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +0 -181
  519. package/node_modules/@allyhub-next/slides-core/dist/resolve.js +0 -2
  520. package/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +0 -23
  521. package/node_modules/@allyhub-next/slides-core/dist/strict.js +0 -2
  522. package/node_modules/@allyhub-next/slides-core/package.json +0 -14
  523. package/node_modules/@allyhub-next/slides-pptx/dist/charts.js +0 -2
  524. package/node_modules/@allyhub-next/slides-pptx/dist/import.js +0 -3
  525. package/node_modules/@allyhub-next/slides-pptx/dist/read.d.ts +0 -55
  526. package/node_modules/@allyhub-next/slides-pptx/dist/read.js +0 -4
  527. package/node_modules/@allyhub-next/slides-pptx/dist/shapes.d.ts +0 -67
  528. package/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +0 -2
  529. package/node_modules/@allyhub-next/slides-pptx/dist/text.d.ts +0 -21
  530. package/node_modules/@allyhub-next/slides-pptx/dist/text.js +0 -2
  531. package/node_modules/@allyhub-next/slides-pptx/dist/write.js +0 -3
  532. package/node_modules/@allyhub-next/slides-pptx/dist/xml.d.ts +0 -26
  533. package/node_modules/@allyhub-next/slides-pptx/dist/xml.js +0 -3
  534. package/node_modules/@allyhub-next/slides-pptx/package.json +0 -14
  535. package/node_modules/@allyhub-next/slides-runtime/dist/draw.d.ts +0 -40
  536. package/node_modules/@allyhub-next/slides-runtime/dist/draw.js +0 -3
  537. package/node_modules/@allyhub-next/slides-runtime/dist/edit.js +0 -2
  538. package/node_modules/@allyhub-next/slides-runtime/package.json +0 -14
  539. package/node_modules/@allyhub-next/stage/dist/graphics.js +0 -2
  540. package/node_modules/@allyhub-next/stage/dist/scenery.js +0 -2
  541. package/node_modules/@allyhub-next/stage/package.json +0 -13
  542. package/node_modules/@allyhub-next/stage-page/dist/page.js +0 -79
  543. package/node_modules/@allyhub-next/stage-page/package.json +0 -14
  544. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +0 -1134
  545. package/node_modules/@allyhub-next/video-core/dist/fact.js +0 -2
  546. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +0 -233
  547. package/node_modules/@allyhub-next/video-core/dist/formats.js +0 -2
  548. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +0 -548
  549. package/node_modules/@allyhub-next/video-core/dist/measure.js +0 -5
  550. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +0 -270
  551. package/node_modules/@allyhub-next/video-core/dist/problem.js +0 -2
  552. package/node_modules/@allyhub-next/video-core/package.json +0 -14
  553. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/LICENSE +0 -0
  554. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/at-cut.d.ts +0 -0
  555. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/at-cut.js +0 -0
  556. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/decode.d.ts +0 -0
  557. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/decode.js +0 -0
  558. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/envelope.d.ts +0 -0
  559. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/envelope.js +0 -0
  560. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/index.d.ts +0 -0
  561. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/index.js +0 -0
  562. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/levels.d.ts +0 -0
  563. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/levels.js +0 -0
  564. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/master.d.ts +0 -0
  565. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/master.js +0 -0
  566. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/music.d.ts +0 -0
  567. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/music.js +0 -0
  568. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/decode.d.ts +0 -0
  569. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/decode.js +0 -0
  570. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -0
  571. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ebur128.js +0 -0
  572. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -0
  573. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ffmpeg.js +0 -0
  574. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/index.d.ts +0 -0
  575. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/index.js +0 -0
  576. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/loudness.d.ts +0 -0
  577. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/loudness.js +0 -0
  578. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/master.d.ts +0 -0
  579. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/master.js +0 -0
  580. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/measure.d.ts +0 -0
  581. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/measure.js +0 -0
  582. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/mix.d.ts +0 -0
  583. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/mix.js +0 -0
  584. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/plan.d.ts +0 -0
  585. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/plan.js +0 -0
  586. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recorded.d.ts +0 -0
  587. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recorded.js +0 -0
  588. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -0
  589. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/bandwidth.js +0 -0
  590. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/chain.d.ts +0 -0
  591. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/chain.js +0 -0
  592. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -0
  593. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/dynamics.js +0 -0
  594. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fft.d.ts +0 -0
  595. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fft.js +0 -0
  596. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/filters.d.ts +0 -0
  597. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/filters.js +0 -0
  598. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fit.d.ts +0 -0
  599. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fit.js +0 -0
  600. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/index.d.ts +0 -0
  601. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/index.js +0 -0
  602. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -0
  603. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/loudness.js +0 -0
  604. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/measure.d.ts +0 -0
  605. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/measure.js +0 -0
  606. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/mic.d.ts +0 -0
  607. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/mic.js +0 -0
  608. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/noise.d.ts +0 -0
  609. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/noise.js +0 -0
  610. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/presets.d.ts +0 -0
  611. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/presets.js +0 -0
  612. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/room.d.ts +0 -0
  613. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/room.js +0 -0
  614. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/setup.d.ts +0 -0
  615. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/setup.js +0 -0
  616. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/vec.d.ts +0 -0
  617. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/vec.js +0 -0
  618. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/render.d.ts +0 -0
  619. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/render.js +0 -0
  620. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/sfx.d.ts +0 -0
  621. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/sfx.js +0 -0
  622. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/shape.d.ts +0 -0
  623. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/shape.js +0 -0
  624. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/voice.d.ts +0 -0
  625. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/voice.js +0 -0
  626. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/LICENSE +0 -0
  627. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/browser.d.ts +0 -0
  628. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/browser.js +0 -0
  629. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/capture.d.ts +0 -0
  630. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/capture.js +0 -0
  631. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/cdp.d.ts +0 -0
  632. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/cdp.js +0 -0
  633. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/flags.d.ts +0 -0
  634. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/flags.js +0 -0
  635. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/frames.d.ts +0 -0
  636. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/frames.js +0 -0
  637. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/html.d.ts +0 -0
  638. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/html.js +0 -0
  639. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/index.d.ts +0 -0
  640. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/index.js +0 -0
  641. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/launch.d.ts +0 -0
  642. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/launch.js +0 -0
  643. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/page.d.ts +0 -0
  644. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/page.js +0 -0
  645. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/server.d.ts +0 -0
  646. /package/{node_modules → dist/node_modules}/@allyhub-next/browser/dist/server.js +0 -0
  647. /package/{node_modules → dist/node_modules}/@allyhub-next/build/LICENSE +0 -0
  648. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/code.d.ts +0 -0
  649. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/code.js +0 -0
  650. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/fonts.d.ts +0 -0
  651. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/fonts.js +0 -0
  652. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/matrix.d.ts +0 -0
  653. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/matrix.js +0 -0
  654. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/media.d.ts +0 -0
  655. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/media.js +0 -0
  656. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/messages.d.ts +0 -0
  657. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/messages.js +0 -0
  658. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/meta.d.ts +0 -0
  659. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/meta.js +0 -0
  660. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/model-info.d.ts +0 -0
  661. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/model-info.js +0 -0
  662. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/move-refs.d.ts +0 -0
  663. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/move-refs.js +0 -0
  664. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/places.d.ts +0 -0
  665. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/places.js +0 -0
  666. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/plugin.d.ts +0 -0
  667. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/prepare.d.ts +0 -0
  668. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/scan.d.ts +0 -0
  669. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/takes.d.ts +0 -0
  670. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/takes.js +0 -0
  671. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/types.d.ts +0 -0
  672. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/types.js +0 -0
  673. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/vite.d.ts +0 -0
  674. /package/{node_modules → dist/node_modules}/@allyhub-next/build/dist/vite.js +0 -0
  675. /package/{node_modules/@allyhub-next/check → dist/node_modules/@allyhub-next/chart}/LICENSE +0 -0
  676. /package/{node_modules/@allyhub-next/cloud → dist/node_modules/@allyhub-next/check}/LICENSE +0 -0
  677. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/cache.d.ts +0 -0
  678. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/cache.js +0 -0
  679. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/check.d.ts +0 -0
  680. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/generated.d.ts +0 -0
  681. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/generated.js +0 -0
  682. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/index.d.ts +0 -0
  683. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/index.js +0 -0
  684. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/plans.d.ts +0 -0
  685. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/plans.js +0 -0
  686. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/result.d.ts +0 -0
  687. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/result.js +0 -0
  688. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/scenery.d.ts +0 -0
  689. /package/{node_modules → dist/node_modules}/@allyhub-next/check/dist/scenery.js +0 -0
  690. /package/{node_modules/@allyhub-next/dev-server → dist/node_modules/@allyhub-next/cloud}/LICENSE +0 -0
  691. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/NOTICE +0 -0
  692. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/call.js +0 -0
  693. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/catalog.js +0 -0
  694. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/client.js +0 -0
  695. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/config.js +0 -0
  696. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/credentials.js +0 -0
  697. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/errors.js +0 -0
  698. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/index.js +0 -0
  699. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/loopback.js +0 -0
  700. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/pkce.js +0 -0
  701. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/records.js +0 -0
  702. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/signin-worker.js +0 -0
  703. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/signin.js +0 -0
  704. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/token.js +0 -0
  705. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/uploads.js +0 -0
  706. /package/{node_modules → dist/node_modules}/@allyhub-next/cloud/dist/voice.js +0 -0
  707. /package/{node_modules → dist/node_modules}/@allyhub-next/components/LICENSE +0 -0
  708. /package/{node_modules → dist/node_modules}/@allyhub-next/components/r/callout.json +0 -0
  709. /package/{node_modules → dist/node_modules}/@allyhub-next/components/r/caption-line.json +0 -0
  710. /package/{node_modules → dist/node_modules}/@allyhub-next/components/r/caption-subtitle.json +0 -0
  711. /package/{node_modules → dist/node_modules}/@allyhub-next/components/r/caption-word.json +0 -0
  712. /package/{node_modules → dist/node_modules}/@allyhub-next/components/r/chart.json +0 -0
  713. /package/{node_modules → dist/node_modules}/@allyhub-next/components/r/code-panel.json +0 -0
  714. /package/{node_modules → dist/node_modules}/@allyhub-next/components/r/screen-demo.json +0 -0
  715. /package/{node_modules → dist/node_modules}/@allyhub-next/components/registry.json +0 -0
  716. /package/{node_modules → dist/node_modules}/@allyhub-next/components/src/callout.ts +0 -0
  717. /package/{node_modules → dist/node_modules}/@allyhub-next/components/src/caption-line.ts +0 -0
  718. /package/{node_modules → dist/node_modules}/@allyhub-next/components/src/caption-subtitle.ts +0 -0
  719. /package/{node_modules → dist/node_modules}/@allyhub-next/components/src/caption-word.ts +0 -0
  720. /package/{node_modules → dist/node_modules}/@allyhub-next/components/src/chart.ts +0 -0
  721. /package/{node_modules → dist/node_modules}/@allyhub-next/components/src/code-panel.ts +0 -0
  722. /package/{node_modules → dist/node_modules}/@allyhub-next/components/src/index.ts +0 -0
  723. /package/{node_modules → dist/node_modules}/@allyhub-next/components/src/screen-demo.ts +0 -0
  724. /package/{node_modules/@allyhub-next/doc → dist/node_modules/@allyhub-next/dev-server}/LICENSE +0 -0
  725. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/background.d.ts +0 -0
  726. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/background.js +0 -0
  727. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/card.d.ts +0 -0
  728. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/exports.d.ts +0 -0
  729. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/index.d.ts +0 -0
  730. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/index.js +0 -0
  731. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/mime.d.ts +0 -0
  732. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/mime.js +0 -0
  733. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/paths.d.ts +0 -0
  734. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/paths.js +0 -0
  735. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/project.d.ts +0 -0
  736. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/project.js +0 -0
  737. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/reveal.d.ts +0 -0
  738. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/reveal.js +0 -0
  739. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/server.d.ts +0 -0
  740. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/server.js +0 -0
  741. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/sound.d.ts +0 -0
  742. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/sound.js +0 -0
  743. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/stage.d.ts +0 -0
  744. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/stage.js +0 -0
  745. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/tools.d.ts +0 -0
  746. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/validate.d.ts +0 -0
  747. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/watcher.d.ts +0 -0
  748. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/watcher.js +0 -0
  749. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/writer.d.ts +0 -0
  750. /package/{node_modules → dist/node_modules}/@allyhub-next/dev-server/dist/writer.js +0 -0
  751. /package/{node_modules/@allyhub-next/export → dist/node_modules/@allyhub-next/doc}/LICENSE +0 -0
  752. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/docx.d.ts +0 -0
  753. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/docx.js +0 -0
  754. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/html.d.ts +0 -0
  755. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/html.js +0 -0
  756. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/index.d.ts +0 -0
  757. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/index.js +0 -0
  758. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/markdown.d.ts +0 -0
  759. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/markdown.js +0 -0
  760. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/model.d.ts +0 -0
  761. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/model.js +0 -0
  762. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/parse.d.ts +0 -0
  763. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/parse.js +0 -0
  764. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/patch.d.ts +0 -0
  765. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/patch.js +0 -0
  766. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/title.d.ts +0 -0
  767. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/title.js +0 -0
  768. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/write.d.ts +0 -0
  769. /package/{node_modules → dist/node_modules}/@allyhub-next/doc/dist/write.js +0 -0
  770. /package/{node_modules/@allyhub-next/formats → dist/node_modules/@allyhub-next/export}/LICENSE +0 -0
  771. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/batch.d.ts +0 -0
  772. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/batch.js +0 -0
  773. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/deck-fonts.d.ts +0 -0
  774. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/deck-fonts.js +0 -0
  775. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/deck-pptx.d.ts +0 -0
  776. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/deck-pptx.js +0 -0
  777. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/index.d.ts +0 -0
  778. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/index.js +0 -0
  779. /package/{node_modules → dist/node_modules}/@allyhub-next/export/dist/names.js +0 -0
  780. /package/{node_modules/@allyhub-next/measure → dist/node_modules/@allyhub-next/formats}/LICENSE +0 -0
  781. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/comments.d.ts +0 -0
  782. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/comments.js +0 -0
  783. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/config.d.ts +0 -0
  784. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/config.js +0 -0
  785. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/edits.d.ts +0 -0
  786. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/edits.js +0 -0
  787. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/elements.d.ts +0 -0
  788. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/elements.js +0 -0
  789. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/faces.d.ts +0 -0
  790. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/faces.js +0 -0
  791. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/file.d.ts +0 -0
  792. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/file.js +0 -0
  793. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/gen.d.ts +0 -0
  794. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/gen.js +0 -0
  795. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/messages.d.ts +0 -0
  796. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/messages.js +0 -0
  797. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/script.d.ts +0 -0
  798. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/script.js +0 -0
  799. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/words.d.ts +0 -0
  800. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/words.js +0 -0
  801. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/layout.d.ts +0 -0
  802. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/layout.js +0 -0
  803. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/note-shape.d.ts +0 -0
  804. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/note-shape.js +0 -0
  805. /package/{node_modules/@allyhub-next/media → dist/node_modules/@allyhub-next/measure}/LICENSE +0 -0
  806. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/compare.d.ts +0 -0
  807. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/compare.js +0 -0
  808. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/contrast.d.ts +0 -0
  809. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/contrast.js +0 -0
  810. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/cut-sheet.d.ts +0 -0
  811. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/cut-sheet.js +0 -0
  812. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/cuts.d.ts +0 -0
  813. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/cuts.js +0 -0
  814. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/facts.d.ts +0 -0
  815. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/fidelity.d.ts +0 -0
  816. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/fidelity.js +0 -0
  817. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/flat.d.ts +0 -0
  818. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/flat.js +0 -0
  819. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/loop.d.ts +0 -0
  820. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/loop.js +0 -0
  821. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/overlay.d.ts +0 -0
  822. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/overlay.js +0 -0
  823. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/recording-report.d.ts +0 -0
  824. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/recording-report.js +0 -0
  825. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/compare.d.ts +0 -0
  826. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/compare.js +0 -0
  827. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/interpret.d.ts +0 -0
  828. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/interpret.js +0 -0
  829. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/piece.d.ts +0 -0
  830. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/piece.js +0 -0
  831. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/sections.d.ts +0 -0
  832. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/sections.js +0 -0
  833. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/sets.d.ts +0 -0
  834. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/sets.js +0 -0
  835. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/text.d.ts +0 -0
  836. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/reference/text.js +0 -0
  837. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/seams.d.ts +0 -0
  838. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/seams.js +0 -0
  839. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/sound-measures.d.ts +0 -0
  840. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/sound-measures.js +0 -0
  841. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/sound-report.d.ts +0 -0
  842. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/sound-report.js +0 -0
  843. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/still.d.ts +0 -0
  844. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/still.js +0 -0
  845. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/version-voice.d.ts +0 -0
  846. /package/{node_modules → dist/node_modules}/@allyhub-next/measure/dist/version-voice.js +0 -0
  847. /package/{node_modules/@allyhub-next/model → dist/node_modules/@allyhub-next/media}/LICENSE +0 -0
  848. /package/{node_modules → dist/node_modules}/@allyhub-next/media/NOTICE +0 -0
  849. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/hear.d.ts +0 -0
  850. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/hear.js +0 -0
  851. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/languages.d.ts +0 -0
  852. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/languages.js +0 -0
  853. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/parakeet.d.ts +0 -0
  854. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/parakeet.js +0 -0
  855. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/protocol.d.ts +0 -0
  856. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/protocol.js +0 -0
  857. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/windows.d.ts +0 -0
  858. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/windows.js +0 -0
  859. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/words.d.ts +0 -0
  860. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/words.js +0 -0
  861. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/worker.d.ts +0 -0
  862. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/asr/worker.js +0 -0
  863. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/audio.d.ts +0 -0
  864. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/audio.js +0 -0
  865. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/beats.d.ts +0 -0
  866. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/beats.js +0 -0
  867. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/cache.d.ts +0 -0
  868. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/cache.js +0 -0
  869. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/errors.d.ts +0 -0
  870. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/errors.js +0 -0
  871. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/fetch.d.ts +0 -0
  872. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/fetch.js +0 -0
  873. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/grid.d.ts +0 -0
  874. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/grid.js +0 -0
  875. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/index.js +0 -0
  876. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/local.d.ts +0 -0
  877. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/local.js +0 -0
  878. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/ocr/lines.d.ts +0 -0
  879. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/ocr/lines.js +0 -0
  880. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/ocr/tesseract.d.ts +0 -0
  881. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/ocr/tesseract.js +0 -0
  882. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/ocr/text.d.ts +0 -0
  883. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/ocr/text.js +0 -0
  884. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/ocr/worker.d.ts +0 -0
  885. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/ocr/worker.js +0 -0
  886. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/picture.d.ts +0 -0
  887. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/picture.js +0 -0
  888. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/probe.d.ts +0 -0
  889. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/probe.js +0 -0
  890. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/progress.d.ts +0 -0
  891. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/progress.js +0 -0
  892. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/run.d.ts +0 -0
  893. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/run.js +0 -0
  894. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/sheet.d.ts +0 -0
  895. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/sheet.js +0 -0
  896. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/shots.d.ts +0 -0
  897. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/shots.js +0 -0
  898. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/sync.d.ts +0 -0
  899. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/sync.js +0 -0
  900. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/tools.d.ts +0 -0
  901. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/tools.js +0 -0
  902. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/video.d.ts +0 -0
  903. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/video.js +0 -0
  904. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/cache.d.ts +0 -0
  905. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/cache.js +0 -0
  906. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/common.d.ts +0 -0
  907. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/common.js +0 -0
  908. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/faces.d.ts +0 -0
  909. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/faces.js +0 -0
  910. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/index-media.d.ts +0 -0
  911. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/index-media.js +0 -0
  912. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/matte.d.ts +0 -0
  913. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/matte.js +0 -0
  914. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/mattes.d.ts +0 -0
  915. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/mattes.js +0 -0
  916. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/models.d.ts +0 -0
  917. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/models.js +0 -0
  918. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/probe.d.ts +0 -0
  919. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/probe.js +0 -0
  920. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/protocol.d.ts +0 -0
  921. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/protocol.js +0 -0
  922. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/run.d.ts +0 -0
  923. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/run.js +0 -0
  924. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/runtime.d.ts +0 -0
  925. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/runtime.js +0 -0
  926. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/status.d.ts +0 -0
  927. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/status.js +0 -0
  928. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/track.d.ts +0 -0
  929. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/track.js +0 -0
  930. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/types.d.ts +0 -0
  931. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/types.js +0 -0
  932. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/worker.d.ts +0 -0
  933. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/worker.js +0 -0
  934. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/yunet.d.ts +0 -0
  935. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/vision/yunet.js +0 -0
  936. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/voice-shape.d.ts +0 -0
  937. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/voice-shape.js +0 -0
  938. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/worker-process.d.ts +0 -0
  939. /package/{node_modules → dist/node_modules}/@allyhub-next/media/dist/worker-process.js +0 -0
  940. /package/{node_modules/@allyhub-next/project → dist/node_modules/@allyhub-next/model}/LICENSE +0 -0
  941. /package/{node_modules → dist/node_modules}/@allyhub-next/model/NOTICE +0 -0
  942. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/apply.d.ts +0 -0
  943. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/apply.js +0 -0
  944. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/authoring.d.ts +0 -0
  945. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/authoring.js +0 -0
  946. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-attributes.d.ts +0 -0
  947. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-attributes.js +0 -0
  948. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-collapse.d.ts +0 -0
  949. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-collapse.js +0 -0
  950. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-corner-plan.d.ts +0 -0
  951. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-corner-plan.js +0 -0
  952. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-deform.d.ts +0 -0
  953. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-deform.js +0 -0
  954. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-fans.d.ts +0 -0
  955. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-fans.js +0 -0
  956. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-junction.d.ts +0 -0
  957. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-junction.js +0 -0
  958. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-marks.d.ts +0 -0
  959. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-marks.js +0 -0
  960. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-metric.d.ts +0 -0
  961. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-metric.js +0 -0
  962. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-mixed.d.ts +0 -0
  963. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-mixed.js +0 -0
  964. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-offsets.d.ts +0 -0
  965. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-offsets.js +0 -0
  966. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-patch.d.ts +0 -0
  967. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-patch.js +0 -0
  968. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-profile.d.ts +0 -0
  969. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-profile.js +0 -0
  970. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-projection.d.ts +0 -0
  971. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-projection.js +0 -0
  972. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-reflex.d.ts +0 -0
  973. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-reflex.js +0 -0
  974. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-square-out.d.ts +0 -0
  975. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-square-out.js +0 -0
  976. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-strips.d.ts +0 -0
  977. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-strips.js +0 -0
  978. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-topology.d.ts +0 -0
  979. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel-topology.js +0 -0
  980. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel.d.ts +0 -0
  981. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bevel.js +0 -0
  982. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-bevel.d.ts +0 -0
  983. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-bevel.js +0 -0
  984. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-bridge.d.ts +0 -0
  985. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-bridge.js +0 -0
  986. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-cycles.d.ts +0 -0
  987. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-cycles.js +0 -0
  988. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-data.d.ts +0 -0
  989. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-data.js +0 -0
  990. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-dissolve.d.ts +0 -0
  991. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-dissolve.js +0 -0
  992. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-edit.d.ts +0 -0
  993. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-edit.js +0 -0
  994. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-inset.d.ts +0 -0
  995. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-inset.js +0 -0
  996. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-primitives.d.ts +0 -0
  997. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-primitives.js +0 -0
  998. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-smooth.d.ts +0 -0
  999. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-smooth.js +0 -0
  1000. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-spin.d.ts +0 -0
  1001. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-spin.js +0 -0
  1002. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-subdivide.d.ts +0 -0
  1003. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh-subdivide.js +0 -0
  1004. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh.d.ts +0 -0
  1005. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/bmesh.js +0 -0
  1006. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/boolean.d.ts +0 -0
  1007. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/boolean.js +0 -0
  1008. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/build-cache.d.ts +0 -0
  1009. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/build-cache.js +0 -0
  1010. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/build-job.d.ts +0 -0
  1011. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/build-job.js +0 -0
  1012. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/build-worker.d.ts +0 -0
  1013. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/build.d.ts +0 -0
  1014. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/cancel.d.ts +0 -0
  1015. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/cancel.js +0 -0
  1016. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/capabilities.d.ts +0 -0
  1017. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/capabilities.js +0 -0
  1018. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/curve-eval.d.ts +0 -0
  1019. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/curve-eval.js +0 -0
  1020. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/curve-math.d.ts +0 -0
  1021. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/curve-math.js +0 -0
  1022. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/curve-mesh.d.ts +0 -0
  1023. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/curve-mesh.js +0 -0
  1024. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/curve.d.ts +0 -0
  1025. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/curve.js +0 -0
  1026. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/data.d.ts +0 -0
  1027. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/data.js +0 -0
  1028. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/evaluate.d.ts +0 -0
  1029. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/evaluate.js +0 -0
  1030. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/evaluation-cache.d.ts +0 -0
  1031. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/evaluation-cache.js +0 -0
  1032. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/evaluation-guard.d.ts +0 -0
  1033. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/evaluation-guard.js +0 -0
  1034. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/evaluation-plan.d.ts +0 -0
  1035. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/evaluation-plan.js +0 -0
  1036. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/export.d.ts +0 -0
  1037. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/export.js +0 -0
  1038. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/field.d.ts +0 -0
  1039. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/field.js +0 -0
  1040. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/COPYRIGHT.musl +0 -0
  1041. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/LICENSE.compiler-rt +0 -0
  1042. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/LICENSE.emscripten +0 -0
  1043. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/LICENSE.libcxx +0 -0
  1044. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/LICENSE.libcxxabi +0 -0
  1045. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/LICENSE.opensubdiv +0 -0
  1046. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/NOTICE.opensubdiv +0 -0
  1047. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/opensubdiv-build.json +0 -0
  1048. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/opensubdiv.d.mts +0 -0
  1049. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/generated/opensubdiv.mjs +0 -0
  1050. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/geometry.d.ts +0 -0
  1051. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/geometry.js +0 -0
  1052. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/image.d.ts +0 -0
  1053. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/image.js +0 -0
  1054. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/index.d.ts +0 -0
  1055. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/index.js +0 -0
  1056. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/instances.d.ts +0 -0
  1057. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/instances.js +0 -0
  1058. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/material-eval.d.ts +0 -0
  1059. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/material-eval.js +0 -0
  1060. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/material-nodes.d.ts +0 -0
  1061. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/material-nodes.js +0 -0
  1062. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/mesh-attributes.d.ts +0 -0
  1063. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/mesh-attributes.js +0 -0
  1064. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/mesh-queries.d.ts +0 -0
  1065. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/mesh-queries.js +0 -0
  1066. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/names.d.ts +0 -0
  1067. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/names.js +0 -0
  1068. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/patterns.d.ts +0 -0
  1069. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/patterns.js +0 -0
  1070. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/png.d.ts +0 -0
  1071. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/png.js +0 -0
  1072. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/polygon-triangulation.d.ts +0 -0
  1073. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/polygon-triangulation.js +0 -0
  1074. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/program-location.d.ts +0 -0
  1075. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/program-location.js +0 -0
  1076. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/report.d.ts +0 -0
  1077. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/report.js +0 -0
  1078. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/screw.d.ts +0 -0
  1079. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/screw.js +0 -0
  1080. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/solidify.d.ts +0 -0
  1081. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/solidify.js +0 -0
  1082. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/subdivision.d.ts +0 -0
  1083. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/subdivision.js +0 -0
  1084. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/three.d.ts +0 -0
  1085. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/three.js +0 -0
  1086. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/uv-project.d.ts +0 -0
  1087. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/uv-project.js +0 -0
  1088. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/uv-unwrap.d.ts +0 -0
  1089. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/uv-unwrap.js +0 -0
  1090. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/uv.d.ts +0 -0
  1091. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/uv.js +0 -0
  1092. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/vertex-groups.d.ts +0 -0
  1093. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/vertex-groups.js +0 -0
  1094. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/weighted-normal.d.ts +0 -0
  1095. /package/{node_modules → dist/node_modules}/@allyhub-next/model/dist/weighted-normal.js +0 -0
  1096. /package/{node_modules/@allyhub-next/protocol → dist/node_modules/@allyhub-next/project}/LICENSE +0 -0
  1097. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/console.d.ts +0 -0
  1098. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/console.js +0 -0
  1099. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/digest.d.ts +0 -0
  1100. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/digest.js +0 -0
  1101. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/index.d.ts +0 -0
  1102. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/index.js +0 -0
  1103. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/ledger.d.ts +0 -0
  1104. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/ledger.js +0 -0
  1105. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/media-index.d.ts +0 -0
  1106. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/media-index.js +0 -0
  1107. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/page.d.ts +0 -0
  1108. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/page.js +0 -0
  1109. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/says.d.ts +0 -0
  1110. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/says.js +0 -0
  1111. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/scenery.d.ts +0 -0
  1112. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/scenery.js +0 -0
  1113. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/session.d.ts +0 -0
  1114. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/session.js +0 -0
  1115. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/stretch.d.ts +0 -0
  1116. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/stretch.js +0 -0
  1117. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/version.d.ts +0 -0
  1118. /package/{node_modules → dist/node_modules}/@allyhub-next/project/dist/version.js +0 -0
  1119. /package/{node_modules/@allyhub-next/registry → dist/node_modules/@allyhub-next/protocol}/LICENSE +0 -0
  1120. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/app.d.ts +0 -0
  1121. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/app.js +0 -0
  1122. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/auth.d.ts +0 -0
  1123. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/auth.js +0 -0
  1124. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cli.d.ts +0 -0
  1125. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cli.js +0 -0
  1126. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cloud.d.ts +0 -0
  1127. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cloud.js +0 -0
  1128. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/files.d.ts +0 -0
  1129. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/files.js +0 -0
  1130. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/index.d.ts +0 -0
  1131. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/index.js +0 -0
  1132. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/jsonrpc.d.ts +0 -0
  1133. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/jsonrpc.js +0 -0
  1134. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/registry.d.ts +0 -0
  1135. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/registry.js +0 -0
  1136. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/routes.d.ts +0 -0
  1137. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/routes.js +0 -0
  1138. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/runtimes.d.ts +0 -0
  1139. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/runtimes.js +0 -0
  1140. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/teams.d.ts +0 -0
  1141. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/teams.js +0 -0
  1142. /package/{node_modules/@allyhub-next/render → dist/node_modules/@allyhub-next/registry}/LICENSE +0 -0
  1143. /package/{node_modules → dist/node_modules}/@allyhub-next/registry/dist/index.js +0 -0
  1144. /package/{node_modules → dist/node_modules}/@allyhub-next/registry/dist/polyhaven-client.js +0 -0
  1145. /package/{node_modules → dist/node_modules}/@allyhub-next/registry/dist/polyhaven.js +0 -0
  1146. /package/{node_modules → dist/node_modules}/@allyhub-next/registry/dist/registry.js +0 -0
  1147. /package/{node_modules/@allyhub-next/runtime → dist/node_modules/@allyhub-next/render}/LICENSE +0 -0
  1148. /package/{node_modules → dist/node_modules}/@allyhub-next/render/NOTICE +0 -0
  1149. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/cap.d.ts +0 -0
  1150. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/cap.js +0 -0
  1151. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/capture.d.ts +0 -0
  1152. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/capture.js +0 -0
  1153. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/clip.d.ts +0 -0
  1154. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/clip.js +0 -0
  1155. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/composite.d.ts +0 -0
  1156. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/composite.js +0 -0
  1157. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/delivery.d.ts +0 -0
  1158. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/delivery.js +0 -0
  1159. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/doc/fonts.d.ts +0 -0
  1160. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/doc/fonts.js +0 -0
  1161. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/encode.d.ts +0 -0
  1162. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/encode.js +0 -0
  1163. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/errors.d.ts +0 -0
  1164. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/errors.js +0 -0
  1165. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/ffmpeg.d.ts +0 -0
  1166. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/ffmpeg.js +0 -0
  1167. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/footage.d.ts +0 -0
  1168. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/footage.js +0 -0
  1169. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/image.d.ts +0 -0
  1170. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/image.js +0 -0
  1171. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/junction.d.ts +0 -0
  1172. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/junction.js +0 -0
  1173. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/look.d.ts +0 -0
  1174. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/look.js +0 -0
  1175. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/page.js +0 -0
  1176. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/parts.d.ts +0 -0
  1177. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/parts.js +0 -0
  1178. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/png.d.ts +0 -0
  1179. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/png.js +0 -0
  1180. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/pool.d.ts +0 -0
  1181. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/pool.js +0 -0
  1182. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/post-probe.d.ts +0 -0
  1183. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/post-probe.js +0 -0
  1184. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/post.d.ts +0 -0
  1185. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/post.js +0 -0
  1186. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/render.d.ts +0 -0
  1187. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/render.js +0 -0
  1188. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/segments.d.ts +0 -0
  1189. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/segments.js +0 -0
  1190. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/sound.d.ts +0 -0
  1191. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/sound.js +0 -0
  1192. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/stills.d.ts +0 -0
  1193. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/stills.js +0 -0
  1194. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/tools.d.ts +0 -0
  1195. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/tools.js +0 -0
  1196. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/webp.d.ts +0 -0
  1197. /package/{node_modules → dist/node_modules}/@allyhub-next/render/dist/webp.js +0 -0
  1198. /package/{node_modules/@allyhub-next/runtimes → dist/node_modules/@allyhub-next/runtime}/LICENSE +0 -0
  1199. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/bridge.d.ts +0 -0
  1200. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/bridge.js +0 -0
  1201. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/captions.d.ts +0 -0
  1202. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/captions.js +0 -0
  1203. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/clock.d.ts +0 -0
  1204. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/clock.js +0 -0
  1205. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/compose.d.ts +0 -0
  1206. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/console.d.ts +0 -0
  1207. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/console.js +0 -0
  1208. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/contrast.d.ts +0 -0
  1209. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/contrast.js +0 -0
  1210. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/embed.d.ts +0 -0
  1211. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/embed.js +0 -0
  1212. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/env.d.ts +0 -0
  1213. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/env.js +0 -0
  1214. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/errors.d.ts +0 -0
  1215. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/errors.js +0 -0
  1216. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/facade.d.ts +0 -0
  1217. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/facade.js +0 -0
  1218. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/fonts.d.ts +0 -0
  1219. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/fonts.js +0 -0
  1220. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/frame.d.ts +0 -0
  1221. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/frame.js +0 -0
  1222. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/guards.d.ts +0 -0
  1223. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/guards.js +0 -0
  1224. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/index.d.ts +0 -0
  1225. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/index.js +0 -0
  1226. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/inspect.d.ts +0 -0
  1227. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/inspect.js +0 -0
  1228. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/locate.d.ts +0 -0
  1229. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/locate.js +0 -0
  1230. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/measure.d.ts +0 -0
  1231. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/measure.js +0 -0
  1232. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/mix-plan.d.ts +0 -0
  1233. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/mix-plan.js +0 -0
  1234. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/music.d.ts +0 -0
  1235. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/music.js +0 -0
  1236. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/output.d.ts +0 -0
  1237. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/output.js +0 -0
  1238. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/pictures.d.ts +0 -0
  1239. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/pictures.js +0 -0
  1240. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/piece.d.ts +0 -0
  1241. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/piece.js +0 -0
  1242. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/player/clips.d.ts +0 -0
  1243. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/player/clips.js +0 -0
  1244. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/player/cutout.d.ts +0 -0
  1245. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/player/cutout.js +0 -0
  1246. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/player/player.d.ts +0 -0
  1247. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/player/player.js +0 -0
  1248. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/reads.d.ts +0 -0
  1249. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/sound.d.ts +0 -0
  1250. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/sound.js +0 -0
  1251. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/speech.d.ts +0 -0
  1252. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/speech.js +0 -0
  1253. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/stage-kit.d.ts +0 -0
  1254. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/stage-kit.js +0 -0
  1255. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/stage.d.ts +0 -0
  1256. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/stage.js +0 -0
  1257. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/styles.d.ts +0 -0
  1258. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/styles.js +0 -0
  1259. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/takes.d.ts +0 -0
  1260. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/takes.js +0 -0
  1261. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/titles.d.ts +0 -0
  1262. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/titles.js +0 -0
  1263. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/transitions.d.ts +0 -0
  1264. /package/{node_modules → dist/node_modules}/@allyhub-next/runtime/dist/transitions.js +0 -0
  1265. /package/{node_modules/@allyhub-next/scaffold → dist/node_modules/@allyhub-next/runtimes}/LICENSE +0 -0
  1266. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/bundled.d.ts +0 -0
  1267. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/bundled.js +0 -0
  1268. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/download.d.ts +0 -0
  1269. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/download.js +0 -0
  1270. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/errors.d.ts +0 -0
  1271. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/errors.js +0 -0
  1272. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/home.d.ts +0 -0
  1273. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/home.js +0 -0
  1274. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/index.d.ts +0 -0
  1275. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/index.js +0 -0
  1276. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/manifest.d.ts +0 -0
  1277. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/manifest.js +0 -0
  1278. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/node-program.d.ts +0 -0
  1279. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/node-program.js +0 -0
  1280. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/packages.d.ts +0 -0
  1281. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/packages.js +0 -0
  1282. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/unpack.d.ts +0 -0
  1283. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/unpack.js +0 -0
  1284. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/manifest.json +0 -0
  1285. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/docx/package-lock.json +0 -0
  1286. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/docx/package.json +0 -0
  1287. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/gltf-tools/package-lock.json +0 -0
  1288. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/gltf-tools/package.json +0 -0
  1289. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/manifold-3d/package-lock.json +0 -0
  1290. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/manifold-3d/package.json +0 -0
  1291. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/onnxruntime-node/package-lock.json +0 -0
  1292. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/onnxruntime-node/package.json +0 -0
  1293. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -0
  1294. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/sherpa-onnx-node/package.json +0 -0
  1295. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/tesseract.js/package-lock.json +0 -0
  1296. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/tesseract.js/package.json +0 -0
  1297. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/schemas/runtimes.schema.json +0 -0
  1298. /package/{node_modules/@allyhub-next/scenery-host → dist/node_modules/@allyhub-next/scaffold}/LICENSE +0 -0
  1299. /package/{node_modules/@allyhub-next/sheet → dist/node_modules/@allyhub-next/scenery}/LICENSE +0 -0
  1300. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/NOTICE +0 -0
  1301. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/aim.d.ts +0 -0
  1302. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/aim.js +0 -0
  1303. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/bake.d.ts +0 -0
  1304. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/bake.js +0 -0
  1305. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/camera.d.ts +0 -0
  1306. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/camera.js +0 -0
  1307. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/curve.d.ts +0 -0
  1308. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/curve.js +0 -0
  1309. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/define.d.ts +0 -0
  1310. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/define.js +0 -0
  1311. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/fit.d.ts +0 -0
  1312. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/fit.js +0 -0
  1313. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/glass.d.ts +0 -0
  1314. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/glass.js +0 -0
  1315. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/handheld.d.ts +0 -0
  1316. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/handheld.js +0 -0
  1317. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/hull.d.ts +0 -0
  1318. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/hull.js +0 -0
  1319. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/index.d.ts +0 -0
  1320. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/index.js +0 -0
  1321. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/lens.d.ts +0 -0
  1322. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/lens.js +0 -0
  1323. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/moire.js +0 -0
  1324. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/motion.d.ts +0 -0
  1325. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/motion.js +0 -0
  1326. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/move.d.ts +0 -0
  1327. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/move.js +0 -0
  1328. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/noise.d.ts +0 -0
  1329. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/noise.js +0 -0
  1330. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/report.d.ts +0 -0
  1331. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/report.js +0 -0
  1332. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen-focus.d.ts +0 -0
  1333. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen-focus.js +0 -0
  1334. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen.d.ts +0 -0
  1335. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen.js +0 -0
  1336. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/solve.d.ts +0 -0
  1337. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/solve.js +0 -0
  1338. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/timing.d.ts +0 -0
  1339. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/timing.js +0 -0
  1340. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/vec.d.ts +0 -0
  1341. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/vec.js +0 -0
  1342. /package/{node_modules/@allyhub-next/scenery → dist/node_modules/@allyhub-next/scenery-host}/LICENSE +0 -0
  1343. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/NOTICE +0 -0
  1344. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/adapter.d.ts +0 -0
  1345. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/adapter.js +0 -0
  1346. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/allyhub.d.ts +0 -0
  1347. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/allyhub.js +0 -0
  1348. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/apply.d.ts +0 -0
  1349. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/apply.js +0 -0
  1350. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/digest.d.ts +0 -0
  1351. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/digest.js +0 -0
  1352. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/envmap.d.ts +0 -0
  1353. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/envmap.js +0 -0
  1354. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/format.d.ts +0 -0
  1355. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/format.js +0 -0
  1356. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/run.d.ts +0 -0
  1357. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/bake/run.js +0 -0
  1358. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/budget.d.ts +0 -0
  1359. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/budget.js +0 -0
  1360. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/clock.d.ts +0 -0
  1361. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/clock.js +0 -0
  1362. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/commands.d.ts +0 -0
  1363. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/commands.js +0 -0
  1364. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/draw2d.d.ts +0 -0
  1365. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/draw2d.js +0 -0
  1366. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/errors.d.ts +0 -0
  1367. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/errors.js +0 -0
  1368. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/fidelity.d.ts +0 -0
  1369. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/fidelity.js +0 -0
  1370. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/focus-pass.d.ts +0 -0
  1371. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/focus-pass.js +0 -0
  1372. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/glass.d.ts +0 -0
  1373. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/glass.js +0 -0
  1374. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/idbuffer.d.ts +0 -0
  1375. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/idbuffer.js +0 -0
  1376. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/index.d.ts +0 -0
  1377. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/index.js +0 -0
  1378. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/inventory.d.ts +0 -0
  1379. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/inventory.js +0 -0
  1380. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/fidelity.d.ts +0 -0
  1381. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/fidelity.js +0 -0
  1382. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/index.d.ts +0 -0
  1383. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/moire.d.ts +0 -0
  1384. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/moire.js +0 -0
  1385. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/queries.d.ts +0 -0
  1386. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/queries.js +0 -0
  1387. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/screens.d.ts +0 -0
  1388. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/screens.js +0 -0
  1389. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/state.d.ts +0 -0
  1390. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/state.js +0 -0
  1391. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/types.d.ts +0 -0
  1392. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/layer/types.js +0 -0
  1393. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/contacts.d.ts +0 -0
  1394. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/contacts.js +0 -0
  1395. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/facts.d.ts +0 -0
  1396. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/facts.js +0 -0
  1397. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/health.d.ts +0 -0
  1398. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/health.js +0 -0
  1399. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/index.d.ts +0 -0
  1400. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/index.js +0 -0
  1401. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/relations.d.ts +0 -0
  1402. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/relations.js +0 -0
  1403. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/screen-readback.d.ts +0 -0
  1404. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/screen-readback.js +0 -0
  1405. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/solid.d.ts +0 -0
  1406. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/solid.js +0 -0
  1407. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/support.d.ts +0 -0
  1408. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/measure/support.js +0 -0
  1409. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/model-stage.d.ts +0 -0
  1410. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/model-stage.js +0 -0
  1411. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/module.d.ts +0 -0
  1412. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/module.js +0 -0
  1413. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/bake.d.ts +0 -0
  1414. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/bake.js +0 -0
  1415. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/draw.d.ts +0 -0
  1416. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/draw.js +0 -0
  1417. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/files.d.ts +0 -0
  1418. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/files.js +0 -0
  1419. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/page.d.ts +0 -0
  1420. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/page.js +0 -0
  1421. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/props.d.ts +0 -0
  1422. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/props.js +0 -0
  1423. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/screens.d.ts +0 -0
  1424. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/screens.js +0 -0
  1425. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/shaders.d.ts +0 -0
  1426. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/page/shaders.js +0 -0
  1427. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/queries/inventory.d.ts +0 -0
  1428. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/queries/inventory.js +0 -0
  1429. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/queries/map.d.ts +0 -0
  1430. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/queries/map.js +0 -0
  1431. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/queries/view.d.ts +0 -0
  1432. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/queries/view.js +0 -0
  1433. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/scene.d.ts +0 -0
  1434. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/scene.js +0 -0
  1435. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/screen-dom.d.ts +0 -0
  1436. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/screen-dom.js +0 -0
  1437. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/screen-light.d.ts +0 -0
  1438. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/screen-light.js +0 -0
  1439. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/screen-picture.d.ts +0 -0
  1440. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/screen-picture.js +0 -0
  1441. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/signature.d.ts +0 -0
  1442. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/signature.js +0 -0
  1443. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/steady.d.ts +0 -0
  1444. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/steady.js +0 -0
  1445. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/basis/README.md +0 -0
  1446. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/basis/basis_transcoder.js +0 -0
  1447. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/basis/basis_transcoder.wasm +0 -0
  1448. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/draco/README.md +0 -0
  1449. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/draco/draco_decoder.js +0 -0
  1450. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/draco/draco_decoder.wasm +0 -0
  1451. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/draco/draco_wasm_wrapper.js +0 -0
  1452. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/draco/gltf/draco_decoder.js +0 -0
  1453. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/draco/gltf/draco_decoder.wasm +0 -0
  1454. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/three-libs/draco/gltf/draco_wasm_wrapper.js +0 -0
  1455. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/vec.d.ts +0 -0
  1456. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/vec.js +0 -0
  1457. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/viewer.d.ts +0 -0
  1458. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery-host/dist/viewer.js +0 -0
  1459. /package/{node_modules/@allyhub-next/site → dist/node_modules/@allyhub-next/sheet}/LICENSE +0 -0
  1460. /package/{node_modules → dist/node_modules}/@allyhub-next/sheet/dist/csv.d.ts +0 -0
  1461. /package/{node_modules → dist/node_modules}/@allyhub-next/sheet/dist/csv.js +0 -0
  1462. /package/{node_modules/@allyhub-next/slides-core → dist/node_modules/@allyhub-next/site}/LICENSE +0 -0
  1463. /package/{node_modules → dist/node_modules}/@allyhub-next/site/dist/assets.d.ts +0 -0
  1464. /package/{node_modules → dist/node_modules}/@allyhub-next/site/dist/assets.js +0 -0
  1465. /package/{node_modules → dist/node_modules}/@allyhub-next/site/dist/astro.d.ts +0 -0
  1466. /package/{node_modules → dist/node_modules}/@allyhub-next/site/dist/astro.js +0 -0
  1467. /package/{node_modules → dist/node_modules}/@allyhub-next/site/dist/lockfile.d.ts +0 -0
  1468. /package/{node_modules → dist/node_modules}/@allyhub-next/site/dist/lockfile.js +0 -0
  1469. /package/{node_modules → dist/node_modules}/@allyhub-next/site/dist/media.d.ts +0 -0
  1470. /package/{node_modules → dist/node_modules}/@allyhub-next/site/dist/media.js +0 -0
  1471. /package/{node_modules/@allyhub-next/slides-pptx → dist/node_modules/@allyhub-next/slides-core}/LICENSE +0 -0
  1472. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/animation.d.ts +0 -0
  1473. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/animation.js +0 -0
  1474. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/capabilities.d.ts +0 -0
  1475. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/check.d.ts +0 -0
  1476. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/check.js +0 -0
  1477. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/file.d.ts +0 -0
  1478. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/file.js +0 -0
  1479. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/measure.d.ts +0 -0
  1480. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/measure.js +0 -0
  1481. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/model.js +0 -0
  1482. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/path.d.ts +0 -0
  1483. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/path.js +0 -0
  1484. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/placeholders.d.ts +0 -0
  1485. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/placeholders.js +0 -0
  1486. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/script.d.ts +0 -0
  1487. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/script.js +0 -0
  1488. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/stage.d.ts +0 -0
  1489. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/stage.js +0 -0
  1490. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/theme.d.ts +0 -0
  1491. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/theme.js +0 -0
  1492. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/units.d.ts +0 -0
  1493. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/units.js +0 -0
  1494. /package/{node_modules/@allyhub-next/slides-runtime → dist/node_modules/@allyhub-next/slides-pptx}/LICENSE +0 -0
  1495. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/charts.d.ts +0 -0
  1496. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/fonts.d.ts +0 -0
  1497. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/fonts.js +0 -0
  1498. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/import.d.ts +0 -0
  1499. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/index.d.ts +0 -0
  1500. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/index.js +0 -0
  1501. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/theme.d.ts +0 -0
  1502. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/theme.js +0 -0
  1503. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/timing.d.ts +0 -0
  1504. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/timing.js +0 -0
  1505. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-pptx/dist/write.d.ts +0 -0
  1506. /package/{node_modules/@allyhub-next/stage → dist/node_modules/@allyhub-next/slides-runtime}/LICENSE +0 -0
  1507. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-runtime/dist/edit.d.ts +0 -0
  1508. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-runtime/dist/index.d.ts +0 -0
  1509. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-runtime/dist/index.js +0 -0
  1510. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-runtime/dist/ink.d.ts +0 -0
  1511. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-runtime/dist/ink.js +0 -0
  1512. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-runtime/dist/load.d.ts +0 -0
  1513. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-runtime/dist/load.js +0 -0
  1514. /package/{node_modules/@allyhub-next/video-core → dist/node_modules/@allyhub-next/stage}/LICENSE +0 -0
  1515. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/bakes.d.ts +0 -0
  1516. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/bakes.js +0 -0
  1517. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/graphics.d.ts +0 -0
  1518. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/identity.d.ts +0 -0
  1519. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/identity.js +0 -0
  1520. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/index.d.ts +0 -0
  1521. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/index.js +0 -0
  1522. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/page.d.ts +0 -0
  1523. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/page.js +0 -0
  1524. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/scenery-page.d.ts +0 -0
  1525. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/scenery-page.js +0 -0
  1526. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/scenery-solve.d.ts +0 -0
  1527. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/scenery-solve.js +0 -0
  1528. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/scenery.d.ts +0 -0
  1529. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/server.d.ts +0 -0
  1530. /package/{node_modules → dist/node_modules}/@allyhub-next/stage/dist/server.js +0 -0
  1531. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/400-italic.css +0 -0
  1532. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/400.css +0 -0
  1533. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/700-italic.css +0 -0
  1534. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/700.css +0 -0
  1535. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/LICENSE +0 -0
  1536. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/arial.css +0 -0
  1537. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-400-italic.woff2 +0 -0
  1538. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-400-normal.woff2 +0 -0
  1539. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-700-italic.woff2 +0 -0
  1540. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-700-normal.woff2 +0 -0
  1541. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-400-italic.woff2 +0 -0
  1542. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-400-normal.woff2 +0 -0
  1543. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-700-italic.woff2 +0 -0
  1544. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-700-normal.woff2 +0 -0
  1545. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-400-italic.woff2 +0 -0
  1546. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-400-normal.woff2 +0 -0
  1547. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-700-italic.woff2 +0 -0
  1548. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-700-normal.woff2 +0 -0
  1549. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-ext-400-italic.woff2 +0 -0
  1550. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-ext-400-normal.woff2 +0 -0
  1551. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-ext-700-italic.woff2 +0 -0
  1552. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-ext-700-normal.woff2 +0 -0
  1553. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-hebrew-400-italic.woff2 +0 -0
  1554. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-hebrew-400-normal.woff2 +0 -0
  1555. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-hebrew-700-italic.woff2 +0 -0
  1556. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-hebrew-700-normal.woff2 +0 -0
  1557. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-400-italic.woff2 +0 -0
  1558. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-400-normal.woff2 +0 -0
  1559. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-700-italic.woff2 +0 -0
  1560. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-700-normal.woff2 +0 -0
  1561. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-ext-400-italic.woff2 +0 -0
  1562. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-ext-400-normal.woff2 +0 -0
  1563. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-ext-700-italic.woff2 +0 -0
  1564. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-ext-700-normal.woff2 +0 -0
  1565. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-vietnamese-400-italic.woff2 +0 -0
  1566. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-vietnamese-400-normal.woff2 +0 -0
  1567. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-vietnamese-700-italic.woff2 +0 -0
  1568. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-vietnamese-700-normal.woff2 +0 -0
  1569. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/400-italic.css +0 -0
  1570. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/400.css +0 -0
  1571. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/700-italic.css +0 -0
  1572. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/700.css +0 -0
  1573. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/LICENSE +0 -0
  1574. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/calibri.css +0 -0
  1575. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-400-italic.woff2 +0 -0
  1576. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-400-normal.woff2 +0 -0
  1577. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-700-italic.woff2 +0 -0
  1578. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-700-normal.woff2 +0 -0
  1579. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-400-italic.woff2 +0 -0
  1580. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-400-normal.woff2 +0 -0
  1581. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-700-italic.woff2 +0 -0
  1582. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-700-normal.woff2 +0 -0
  1583. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-400-italic.woff2 +0 -0
  1584. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-400-normal.woff2 +0 -0
  1585. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-700-italic.woff2 +0 -0
  1586. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-700-normal.woff2 +0 -0
  1587. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-ext-400-italic.woff2 +0 -0
  1588. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-ext-400-normal.woff2 +0 -0
  1589. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-ext-700-italic.woff2 +0 -0
  1590. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-ext-700-normal.woff2 +0 -0
  1591. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-400-italic.woff2 +0 -0
  1592. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-400-normal.woff2 +0 -0
  1593. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-700-italic.woff2 +0 -0
  1594. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-700-normal.woff2 +0 -0
  1595. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-ext-400-italic.woff2 +0 -0
  1596. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-ext-400-normal.woff2 +0 -0
  1597. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-ext-700-italic.woff2 +0 -0
  1598. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-ext-700-normal.woff2 +0 -0
  1599. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-vietnamese-400-italic.woff2 +0 -0
  1600. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-vietnamese-400-normal.woff2 +0 -0
  1601. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-vietnamese-700-italic.woff2 +0 -0
  1602. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-vietnamese-700-normal.woff2 +0 -0
  1603. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-color-emoji/LICENSE +0 -0
  1604. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-color-emoji/emoji.css +0 -0
  1605. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-color-emoji/files/noto-color-emoji-emoji-400-normal.woff2 +0 -0
  1606. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/400.css +0 -0
  1607. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/700.css +0 -0
  1608. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/LICENSE +0 -0
  1609. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-100-400-normal.woff2 +0 -0
  1610. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-100-700-normal.woff2 +0 -0
  1611. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-101-400-normal.woff2 +0 -0
  1612. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-101-700-normal.woff2 +0 -0
  1613. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-102-400-normal.woff2 +0 -0
  1614. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-102-700-normal.woff2 +0 -0
  1615. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-103-400-normal.woff2 +0 -0
  1616. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-103-700-normal.woff2 +0 -0
  1617. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-104-400-normal.woff2 +0 -0
  1618. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-104-700-normal.woff2 +0 -0
  1619. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-105-400-normal.woff2 +0 -0
  1620. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-105-700-normal.woff2 +0 -0
  1621. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-106-400-normal.woff2 +0 -0
  1622. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-106-700-normal.woff2 +0 -0
  1623. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-107-400-normal.woff2 +0 -0
  1624. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-107-700-normal.woff2 +0 -0
  1625. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-108-400-normal.woff2 +0 -0
  1626. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-108-700-normal.woff2 +0 -0
  1627. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-109-400-normal.woff2 +0 -0
  1628. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-109-700-normal.woff2 +0 -0
  1629. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-110-400-normal.woff2 +0 -0
  1630. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-110-700-normal.woff2 +0 -0
  1631. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-111-400-normal.woff2 +0 -0
  1632. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-111-700-normal.woff2 +0 -0
  1633. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-112-400-normal.woff2 +0 -0
  1634. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-112-700-normal.woff2 +0 -0
  1635. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-113-400-normal.woff2 +0 -0
  1636. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-113-700-normal.woff2 +0 -0
  1637. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-114-400-normal.woff2 +0 -0
  1638. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-114-700-normal.woff2 +0 -0
  1639. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-115-400-normal.woff2 +0 -0
  1640. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-115-700-normal.woff2 +0 -0
  1641. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-116-400-normal.woff2 +0 -0
  1642. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-116-700-normal.woff2 +0 -0
  1643. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-117-400-normal.woff2 +0 -0
  1644. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-117-700-normal.woff2 +0 -0
  1645. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-118-400-normal.woff2 +0 -0
  1646. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-118-700-normal.woff2 +0 -0
  1647. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-119-400-normal.woff2 +0 -0
  1648. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-119-700-normal.woff2 +0 -0
  1649. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-21-400-normal.woff2 +0 -0
  1650. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-21-700-normal.woff2 +0 -0
  1651. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-22-400-normal.woff2 +0 -0
  1652. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-22-700-normal.woff2 +0 -0
  1653. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-23-400-normal.woff2 +0 -0
  1654. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-23-700-normal.woff2 +0 -0
  1655. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-24-400-normal.woff2 +0 -0
  1656. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-24-700-normal.woff2 +0 -0
  1657. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-25-400-normal.woff2 +0 -0
  1658. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-25-700-normal.woff2 +0 -0
  1659. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-26-400-normal.woff2 +0 -0
  1660. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-26-700-normal.woff2 +0 -0
  1661. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-27-400-normal.woff2 +0 -0
  1662. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-27-700-normal.woff2 +0 -0
  1663. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-28-400-normal.woff2 +0 -0
  1664. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-28-700-normal.woff2 +0 -0
  1665. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-29-400-normal.woff2 +0 -0
  1666. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-29-700-normal.woff2 +0 -0
  1667. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-30-400-normal.woff2 +0 -0
  1668. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-30-700-normal.woff2 +0 -0
  1669. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-31-400-normal.woff2 +0 -0
  1670. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-31-700-normal.woff2 +0 -0
  1671. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-32-400-normal.woff2 +0 -0
  1672. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-32-700-normal.woff2 +0 -0
  1673. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-33-400-normal.woff2 +0 -0
  1674. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-33-700-normal.woff2 +0 -0
  1675. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-34-400-normal.woff2 +0 -0
  1676. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-34-700-normal.woff2 +0 -0
  1677. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-35-400-normal.woff2 +0 -0
  1678. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-35-700-normal.woff2 +0 -0
  1679. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-36-400-normal.woff2 +0 -0
  1680. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-36-700-normal.woff2 +0 -0
  1681. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-37-400-normal.woff2 +0 -0
  1682. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-37-700-normal.woff2 +0 -0
  1683. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-38-400-normal.woff2 +0 -0
  1684. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-38-700-normal.woff2 +0 -0
  1685. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-39-400-normal.woff2 +0 -0
  1686. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-39-700-normal.woff2 +0 -0
  1687. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-4-400-normal.woff2 +0 -0
  1688. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-4-700-normal.woff2 +0 -0
  1689. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-40-400-normal.woff2 +0 -0
  1690. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-40-700-normal.woff2 +0 -0
  1691. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-41-400-normal.woff2 +0 -0
  1692. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-41-700-normal.woff2 +0 -0
  1693. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-42-400-normal.woff2 +0 -0
  1694. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-42-700-normal.woff2 +0 -0
  1695. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-43-400-normal.woff2 +0 -0
  1696. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-43-700-normal.woff2 +0 -0
  1697. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-44-400-normal.woff2 +0 -0
  1698. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-44-700-normal.woff2 +0 -0
  1699. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-45-400-normal.woff2 +0 -0
  1700. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-45-700-normal.woff2 +0 -0
  1701. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-46-400-normal.woff2 +0 -0
  1702. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-46-700-normal.woff2 +0 -0
  1703. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-47-400-normal.woff2 +0 -0
  1704. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-47-700-normal.woff2 +0 -0
  1705. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-48-400-normal.woff2 +0 -0
  1706. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-48-700-normal.woff2 +0 -0
  1707. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-49-400-normal.woff2 +0 -0
  1708. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-49-700-normal.woff2 +0 -0
  1709. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-5-400-normal.woff2 +0 -0
  1710. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-5-700-normal.woff2 +0 -0
  1711. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-50-400-normal.woff2 +0 -0
  1712. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-50-700-normal.woff2 +0 -0
  1713. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-51-400-normal.woff2 +0 -0
  1714. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-51-700-normal.woff2 +0 -0
  1715. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-52-400-normal.woff2 +0 -0
  1716. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-52-700-normal.woff2 +0 -0
  1717. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-53-400-normal.woff2 +0 -0
  1718. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-53-700-normal.woff2 +0 -0
  1719. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-54-400-normal.woff2 +0 -0
  1720. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-54-700-normal.woff2 +0 -0
  1721. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-55-400-normal.woff2 +0 -0
  1722. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-55-700-normal.woff2 +0 -0
  1723. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-56-400-normal.woff2 +0 -0
  1724. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-56-700-normal.woff2 +0 -0
  1725. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-57-400-normal.woff2 +0 -0
  1726. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-57-700-normal.woff2 +0 -0
  1727. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-58-400-normal.woff2 +0 -0
  1728. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-58-700-normal.woff2 +0 -0
  1729. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-59-400-normal.woff2 +0 -0
  1730. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-59-700-normal.woff2 +0 -0
  1731. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-6-400-normal.woff2 +0 -0
  1732. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-6-700-normal.woff2 +0 -0
  1733. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-60-400-normal.woff2 +0 -0
  1734. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-60-700-normal.woff2 +0 -0
  1735. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-61-400-normal.woff2 +0 -0
  1736. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-61-700-normal.woff2 +0 -0
  1737. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-62-400-normal.woff2 +0 -0
  1738. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-62-700-normal.woff2 +0 -0
  1739. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-63-400-normal.woff2 +0 -0
  1740. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-63-700-normal.woff2 +0 -0
  1741. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-64-400-normal.woff2 +0 -0
  1742. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-64-700-normal.woff2 +0 -0
  1743. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-65-400-normal.woff2 +0 -0
  1744. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-65-700-normal.woff2 +0 -0
  1745. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-66-400-normal.woff2 +0 -0
  1746. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-66-700-normal.woff2 +0 -0
  1747. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-67-400-normal.woff2 +0 -0
  1748. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-67-700-normal.woff2 +0 -0
  1749. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-68-400-normal.woff2 +0 -0
  1750. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-68-700-normal.woff2 +0 -0
  1751. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-69-400-normal.woff2 +0 -0
  1752. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-69-700-normal.woff2 +0 -0
  1753. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-70-400-normal.woff2 +0 -0
  1754. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-70-700-normal.woff2 +0 -0
  1755. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-71-400-normal.woff2 +0 -0
  1756. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-71-700-normal.woff2 +0 -0
  1757. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-72-400-normal.woff2 +0 -0
  1758. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-72-700-normal.woff2 +0 -0
  1759. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-73-400-normal.woff2 +0 -0
  1760. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-73-700-normal.woff2 +0 -0
  1761. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-74-400-normal.woff2 +0 -0
  1762. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-74-700-normal.woff2 +0 -0
  1763. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-75-400-normal.woff2 +0 -0
  1764. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-75-700-normal.woff2 +0 -0
  1765. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-76-400-normal.woff2 +0 -0
  1766. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-76-700-normal.woff2 +0 -0
  1767. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-77-400-normal.woff2 +0 -0
  1768. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-77-700-normal.woff2 +0 -0
  1769. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-78-400-normal.woff2 +0 -0
  1770. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-78-700-normal.woff2 +0 -0
  1771. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-79-400-normal.woff2 +0 -0
  1772. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-79-700-normal.woff2 +0 -0
  1773. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-80-400-normal.woff2 +0 -0
  1774. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-80-700-normal.woff2 +0 -0
  1775. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-81-400-normal.woff2 +0 -0
  1776. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-81-700-normal.woff2 +0 -0
  1777. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-82-400-normal.woff2 +0 -0
  1778. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-82-700-normal.woff2 +0 -0
  1779. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-83-400-normal.woff2 +0 -0
  1780. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-83-700-normal.woff2 +0 -0
  1781. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-84-400-normal.woff2 +0 -0
  1782. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-84-700-normal.woff2 +0 -0
  1783. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-85-400-normal.woff2 +0 -0
  1784. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-85-700-normal.woff2 +0 -0
  1785. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-86-400-normal.woff2 +0 -0
  1786. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-86-700-normal.woff2 +0 -0
  1787. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-87-400-normal.woff2 +0 -0
  1788. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-87-700-normal.woff2 +0 -0
  1789. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-88-400-normal.woff2 +0 -0
  1790. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-88-700-normal.woff2 +0 -0
  1791. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-89-400-normal.woff2 +0 -0
  1792. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-89-700-normal.woff2 +0 -0
  1793. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-90-400-normal.woff2 +0 -0
  1794. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-90-700-normal.woff2 +0 -0
  1795. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-91-400-normal.woff2 +0 -0
  1796. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-91-700-normal.woff2 +0 -0
  1797. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-97-400-normal.woff2 +0 -0
  1798. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-97-700-normal.woff2 +0 -0
  1799. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-98-400-normal.woff2 +0 -0
  1800. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-98-700-normal.woff2 +0 -0
  1801. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-99-400-normal.woff2 +0 -0
  1802. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-99-700-normal.woff2 +0 -0
  1803. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-cyrillic-400-normal.woff2 +0 -0
  1804. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-cyrillic-700-normal.woff2 +0 -0
  1805. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-400-normal.woff2 +0 -0
  1806. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-700-normal.woff2 +0 -0
  1807. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-ext-400-normal.woff2 +0 -0
  1808. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-ext-700-normal.woff2 +0 -0
  1809. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-vietnamese-400-normal.woff2 +0 -0
  1810. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-vietnamese-700-normal.woff2 +0 -0
  1811. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/microsoft-yahei.css +0 -0
  1812. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/host.d.ts +0 -0
  1813. /package/{node_modules → dist/node_modules}/@allyhub-next/stage-page/dist/host.js +0 -0
  1814. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/anchors.d.ts +0 -0
  1815. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/anchors.js +0 -0
  1816. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/audio-types.d.ts +0 -0
  1817. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/audio-types.js +0 -0
  1818. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/backdrop.d.ts +0 -0
  1819. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/backdrop.js +0 -0
  1820. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/captions.d.ts +0 -0
  1821. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/captions.js +0 -0
  1822. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/console.d.ts +0 -0
  1823. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/console.js +0 -0
  1824. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/contrast.d.ts +0 -0
  1825. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/contrast.js +0 -0
  1826. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/cut-report.d.ts +0 -0
  1827. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/cut-report.js +0 -0
  1828. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edit.d.ts +0 -0
  1829. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edit.js +0 -0
  1830. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edits.d.ts +0 -0
  1831. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edits.js +0 -0
  1832. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/export.d.ts +0 -0
  1833. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/export.js +0 -0
  1834. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/footage-motion.d.ts +0 -0
  1835. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/footage-motion.js +0 -0
  1836. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/gen.d.ts +0 -0
  1837. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/gen.js +0 -0
  1838. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/index.d.ts +0 -0
  1839. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/index.js +0 -0
  1840. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/look.d.ts +0 -0
  1841. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/look.js +0 -0
  1842. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/marks.d.ts +0 -0
  1843. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/marks.js +0 -0
  1844. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/matrix.d.ts +0 -0
  1845. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/matrix.js +0 -0
  1846. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/media.d.ts +0 -0
  1847. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/media.js +0 -0
  1848. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/messages.d.ts +0 -0
  1849. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/messages.js +0 -0
  1850. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/motion.d.ts +0 -0
  1851. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/motion.js +0 -0
  1852. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/music.d.ts +0 -0
  1853. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/music.js +0 -0
  1854. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/piece.d.ts +0 -0
  1855. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/piece.js +0 -0
  1856. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/placement.d.ts +0 -0
  1857. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/placement.js +0 -0
  1858. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/render-types.d.ts +0 -0
  1859. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/render-types.js +0 -0
  1860. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/schema.d.ts +0 -0
  1861. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/schema.js +0 -0
  1862. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script-edit.d.ts +0 -0
  1863. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script-edit.js +0 -0
  1864. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script.d.ts +0 -0
  1865. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script.js +0 -0
  1866. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/seams.d.ts +0 -0
  1867. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/seams.js +0 -0
  1868. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/sound-under.d.ts +0 -0
  1869. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/sound-under.js +0 -0
  1870. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/speech.d.ts +0 -0
  1871. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/speech.js +0 -0
  1872. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timeline.d.ts +0 -0
  1873. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timeline.js +0 -0
  1874. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timing.d.ts +0 -0
  1875. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timing.js +0 -0
  1876. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transcript.d.ts +0 -0
  1877. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transcript.js +0 -0
  1878. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transition.d.ts +0 -0
  1879. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transition.js +0 -0
  1880. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/voice.d.ts +0 -0
  1881. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/voice.js +0 -0
  1882. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/words.d.ts +0 -0
  1883. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/words.js +0 -0
@@ -1,233 +0,0 @@
1
- import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{$t as r,A as i,At as a,B as o,C as s,D as c,E as l,F as u,Ft as d,H as f,I as p,It as m,L as h,Lt as g,M as _,Mt as v,N as y,O as b,Ot as x,P as S,Pt as C,R as w,Rt as T,S as E,St as D,T as O,U as k,V as A,W as j,_ as M,a as N,b as P,en as F,g as I,h as L,j as R,jt as z,k as B,kt as ee,m as te,n as ne,p as re,r as ie,v as ae,w as V,x as oe,xt as se,y as ce,z as le}from"./react-D0RmGe2w.js";import{g as ue,h as de,p as fe,t as pe,y as me}from"./dist-Cpt0p8bX.js";import{n as he,r as ge,t as _e}from"./undo-2-Ecr7-Obc.js";import{a as ve,i as ye,n as be,r as xe,t as Se}from"./text-align-start-B3k2cx5f.js";import{t as Ce}from"./list-D2v7U8K8.js";import{E as we,O as Te,S as H,T as Ee,b as De,k as Oe,y as ke}from"./index-CAcsAZ9u.js";var Ae=x(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),je=x(`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`}]]),Me=x(`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`}]]),Ne=x(`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`}]]),Pe=x(`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`}]]),Fe=x(`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`}]]),Ie=x(`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`}]]),Le=x(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Re=x(`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`}]]),ze=x(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Be=x(`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`}]]),Ve=x(`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`}]]),He=x(`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`}]]),Ue=x(`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`}]]),We=x(`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`}]]),Ge=x(`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`}]]),Ke=x(`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`}]]),qe=x(`table`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),Je={};function Ye(e,t){let n=t||Je;return Xe(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Xe(e,t,n){if(Qe(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 Ze(e.children,t,n)}return Array.isArray(e)?Ze(e,t,n):``}function Ze(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Xe(e[i],t,n);return r.join(``)}function Qe(e){return!!(e&&typeof e==`object`)}var $e=document.createElement(`i`);function et(e){let t=`&`+e+`;`;$e.innerHTML=t;let n=$e.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function tt(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 nt(e,t){return e.length>0?(tt(e,e.length,0,t),e):t}var rt={}.hasOwnProperty;function it(e){let t={},n=-1;for(;++n<e.length;)at(t,e[n]);return t}function at(e,t){let n;for(n in t){let r=(rt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){rt.call(r,a)||(r[a]=[]);let e=i[a];ot(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ot(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);tt(e,0,0,r)}function st(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 ct(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var lt=yt(/[A-Za-z]/),ut=yt(/[\dA-Za-z]/),dt=yt(/[#-'*+\--9=?A-Z^-~]/);function ft(e){return e!==null&&(e<32||e===127)}var pt=yt(/\d/),U=yt(/[\dA-Fa-f]/),mt=yt(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function gt(e){return e===-2||e===-1||e===32}var _t=yt(/\p{P}|\p{S}/u),vt=yt(/\s/);function yt(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function bt(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return gt(r)?(e.enter(n),s(r)):t(r)}function s(r){return gt(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function xt(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&gt(t)?(e.enter(r),c(t)):l(t)}function c(t){return gt(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var St={tokenize:Ct};function Ct(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`),bt(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 W(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var wt=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Tt(this,e,t,n,!1)}addBefore(e,t,n){Tt(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 Tt(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 Et={tokenize:Ot},Dt={tokenize:kt};function Ot(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 wt;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(Dt,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(Dt,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 W(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 wt;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 kt(e,t,n){return bt(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function At(e){if(e===null||ht(e)||vt(e))return 1;if(_t(e))return 2}function jt(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 Mt={name:`attention`,resolveAll:Nt,tokenize:Pt};function Nt(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};Ft(o,-a),Ft(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=nt(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=nt(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=nt(r,jt(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=nt(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=nt(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),tt(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 Pt(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=At(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=At(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 Ft(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var It={name:`autolink`,tokenize:Lt};function Lt(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 lt(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||ut(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||ut(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||ft(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):dt(t)?(e.consume(t),l):n(t)}function u(e){return ut(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||ut(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Rt={partial:!0,tokenize:zt};function zt(e,t,n){return r;function r(t){return gt(t)?bt(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||W(e)?t(e):n(e)}}var Bt={continuation:{tokenize:Ht},exit:Ut,name:`blockQuote`,tokenize:Vt};function Vt(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 gt(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ht(e,t,n){let r=this;return i;function i(t){return gt(t)?bt(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Bt,t,n)(r)}}function Ut(e){e.exit(`blockQuote`)}var Wt={name:`characterEscape`,tokenize:Gt};function Gt(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 mt(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Kt={name:`characterReference`,tokenize:qt};function qt(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=ut,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=U,u):(e.enter(`characterReferenceValue`),a=7,o=pt,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===ut&&!et(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 Jt={partial:!0,tokenize:Yt};function Yt(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 Xt={concrete:!0,name:`codeFenced`,tokenize:Zt};function Zt(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`),gt(t)?bt(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||W(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Jt,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):gt(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),bt(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||W(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||W(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&&gt(t)?bt(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||W(t)?e.check(Jt,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||W(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`),gt(t)?bt(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`),gt(t)?bt(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||W(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Qt={name:`codeIndented`,tokenize:en},$t={partial:!0,tokenize:tn};function en(e,t,n){return r;function r(t){return e.enter(`codeIndented`),xt(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):W(t)?e.attempt($t,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||W(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function tn(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):W(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):xt(e,t,a,`linePrefix`,4,4)(o)}function a(e){return W(e)?i(e):n(e)}}var nn={name:`codeText`,previous:an,resolve:rn,tokenize:on};function rn(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 an(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function on(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)):W(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||W(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 sn=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&&cn(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),cn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),cn(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);cn(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);cn(this.left,t.reverse())}}}};function cn(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 ln(e){let t={},n=-1,r,i,a,o,s,c,l,u=new sn(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,un(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 tt(e,0,1/0,u.slice(0)),!l}function un(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 dn={resolve:pn,tokenize:mn},fn={partial:!0,tokenize:hn};function pn(e){return ln(e),e}function mn(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):W(t)?e.check(fn,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 hn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),bt(e,a,`linePrefix`)}function a(i){if(i===null||W(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 gn(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||ft(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||W(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||ht(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||ft(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 _n(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):W(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||W(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!gt(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function vn(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):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),bt(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||W(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 yn(e,t){let n;return r;function r(i){return W(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):gt(i)?bt(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var bn={name:`definition`,tokenize:Sn},xn={partial:!0,tokenize:Cn};function Sn(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return _n.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ct(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 ht(t)?yn(e,l)(t):l(t)}function l(t){return gn(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(xn,d,d)(t)}function d(t){return gt(t)?bt(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||W(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Cn(e,t,n){return r;function r(t){return ht(t)?yn(e,i)(t):n(t)}function i(t){return vn(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return gt(t)?bt(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||W(e)?t(e):n(e)}}var wn={name:`hardBreakEscape`,tokenize:Tn};function Tn(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return W(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var En={name:`headingAtx`,resolve:Dn,tokenize:On};function Dn(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`};tt(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function On(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||ht(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||W(n)?(e.exit(`atxHeading`),t(n)):gt(n)?bt(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||ht(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var kn=`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(`.`),An=[`pre`,`script`,`style`,`textarea`],jn={concrete:!0,name:`htmlFlow`,resolveTo:Nn,tokenize:Pn},Mn={partial:!0,tokenize:Fn};function Nn(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 Pn(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):lt(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):lt(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 lt(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||ht(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&An.includes(l)?(i=1,r.interrupt?t(s):O(s)):kn.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||ut(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 gt(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||lt(t)?(e.consume(t),b):gt(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||ut(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):gt(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):gt(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||W(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||ht(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||gt(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||W(t)?O(t):gt(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):W(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Mn,R,k)(t)):t===null||W(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Jt,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||W(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 An.includes(n)?(e.consume(t),L):O(t)}return lt(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||W(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function Fn(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Rt,t,n)}}var In={name:`htmlText`,tokenize:Ln};function Ln(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):lt(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):lt(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):W(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):W(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):W(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):W(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return lt(t)?(e.consume(t),S):n(t)}function S(t){return t===45||ut(t)?(e.consume(t),S):C(t)}function C(t){return W(t)?(o=C,N(t)):gt(t)?(e.consume(t),C):M(t)}function w(t){return t===45||ut(t)?(e.consume(t),w):t===47||t===62||ht(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||lt(t)?(e.consume(t),E):W(t)?(o=T,N(t)):gt(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||ut(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):W(t)?(o=D,N(t)):gt(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):W(t)?(o=O,N(t)):gt(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):W(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||ht(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||ht(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 gt(t)?bt(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 Rn={name:`labelEnd`,resolveAll:Hn,resolveTo:Un,tokenize:Wn},zn={tokenize:Gn},Bn={tokenize:Kn},Vn={tokenize:qn};function Hn(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&&tt(e,0,e.length,n),e}function Un(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=nt(o,e.slice(i+1,i+r+3)),o=nt(o,[[`enter`,l,t]]),o=nt(o,jt(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=nt(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=nt(o,e.slice(a+1)),o=nt(o,[[`exit`,s,t]]),tt(e,i,e.length,o),e}function Wn(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(ct(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(zn,u,o?u:d)(t):t===91?e.attempt(Bn,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Vn,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Gn(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 ht(t)?yn(e,a)(t):a(t)}function a(t){return t===41?u(t):gn(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return ht(t)?yn(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?vn(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return ht(t)?yn(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 Kn(e,t,n){let r=this;return i;function i(t){return _n.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ct(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function qn(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 Jn={name:`labelStartImage`,resolveAll:Rn.resolveAll,tokenize:Yn};function Yn(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 Xn={name:`labelStartLink`,resolveAll:Rn.resolveAll,tokenize:Zn};function Zn(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 Qn={name:`lineEnding`,tokenize:$n};function $n(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),bt(e,t,`linePrefix`)}}var er={name:`thematicBreak`,tokenize:tr};function tr(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||W(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),gt(t)?bt(e,s,`whitespace`)(t):s(t))}}var nr={continuation:{tokenize:or},exit:cr,name:`list`,tokenize:ar},rr={partial:!0,tokenize:lr},ir={partial:!0,tokenize:sr};function ar(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:pt(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(er,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 pt(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(Rt,r.interrupt?n:u,e.attempt(rr,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return gt(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 or(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Rt,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bt(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!gt(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(ir,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,bt(e,e.attempt(nr,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function sr(e,t,n){let r=this;return bt(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 cr(e){e.exit(this.containerState.type)}function lr(e,t,n){let r=this;return bt(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!gt(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var ur={name:`setextUnderline`,resolveTo:dr,tokenize:fr};function dr(e,t){let n=new wt,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 fr(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`),gt(t)?bt(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||W(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var pr={tokenize:mr};function mr(e){let t=this,n=e.attempt(Rt,r,e.attempt(this.parser.constructs.flowInitial,i,bt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(dn,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 hr={resolveAll:yr()},gr=vr(`string`),_r=vr(`text`);function vr(e){return{resolveAll:yr(e===`text`?br: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 yr(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 br(e,t){let n=new wt,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 xr=e({attentionMarkers:()=>kr,contentInitial:()=>Cr,disable:()=>Ar,document:()=>Sr,flow:()=>Tr,flowInitial:()=>wr,insideSpan:()=>Or,string:()=>Er,text:()=>Dr}),Sr={42:nr,43:nr,45:nr,48:nr,49:nr,50:nr,51:nr,52:nr,53:nr,54:nr,55:nr,56:nr,57:nr,62:Bt},Cr={91:bn},wr={[-2]:Qt,[-1]:Qt,32:Qt},Tr={35:En,42:er,45:[ur,er],60:jn,61:ur,95:er,96:Xt,126:Xt},Er={38:Kt,92:Wt},Dr={[-5]:Qn,[-4]:Qn,[-3]:Qn,33:Jn,38:Kt,42:Mt,60:[It,In],91:Xn,92:[wn,Wt],93:Rn,95:Mt,96:nn},Or={null:[Mt,hr]},kr={null:[42,95]},Ar={null:[]};function jr(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=nt(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=jt(a,l.events,l),l.events):[]}function f(e,t){return Nr(p(e),t)}function p(e){return Mr(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){W(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&&tt(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 Mr(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 Nr(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 Pr(e){let t={constructs:it([xr,...(e||{}).extensions||[]]),content:n(St),defined:[],document:n(Et),flow:n(pr),lazy:{},string:n(gr),text:n(_r)};return t;function n(e){return n;function n(n){return jr(t,e,n)}}}function Fr(e){for(;!ln(e););return e}var Ir=/[\0\t\n\r]/g;function Lr(){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;){Ir.lastIndex=c;let n=Ir.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 Rr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zr(e){return e.replace(Rr,Br)}function Br(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return st(n.slice(t?2:1),t?16:10)}return et(n)||e}function Vr(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Ur(e.position):`start`in e||`end`in e?Ur(e):`line`in e||`column`in e?Hr(e):``}function Hr(e){return Wr(e&&e.line)+`:`+Wr(e&&e.column)}function Ur(e){return Hr(e&&e.start)+`-`+Hr(e&&e.end)}function Wr(e){return e&&typeof e==`number`?e:1}var Gr={}.hasOwnProperty;function Kr(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),qr(n)(Fr(Pr(n).document().write(Lr()(e,t,!0))))}function qr(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(V),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:ae,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()}};Yr(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]),Gr.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]||Zr).call(o,void 0,e[0])}for(r.position={start:Jr(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Jr(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:Jr(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+"` ("+Vr({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Zr).call(this,e,r[0])),n.position.end=Jr(e.end)}function d(){return Ye(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=ct(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:Jr(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=Jr(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=Jr(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=zr(t),n.identifier=ct(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=ct(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=st(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=et(t);let i=this.stack[this.stack.length-1];i.value+=r}function re(e){let t=this.stack.pop();t.position.end=Jr(e.end)}function ie(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ae(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function V(){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 Jr(e){return{line:e.line,column:e.column,offset:e.offset}}function Yr(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Yr(e,r):Xr(e,r)}}function Xr(e,t){let n;for(n in t)if(Gr.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 Zr(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Vr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vr({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Vr({start:t.start,end:t.end})+`) is still open`)}ti.attention=ni,ti.peek=ri;function Qr(){return{canContainEols:[`delete`],enter:{strikethrough:$r},exit:{strikethrough:ei}}}function $r(e){this.enter({type:`delete`,children:[],position:void 0},e)}function ei(e){this.exit(e)}function ti(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 ni(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function ri(){return`~`}function ii(){return{enter:{table:ai,tableData:li,tableHeader:li,tableRow:si},exit:{codeText:ui,table:oi,tableData:ci,tableHeader:ci,tableRow:ci}}}function ai(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 oi(e){this.exit(e),this.data.inTable=void 0}function si(e){this.enter({type:`tableRow`,children:[]},e)}function ci(e){this.exit(e)}function li(e){this.enter({type:`tableCell`,children:[]},e)}function ui(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,di));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function di(e,t){return t===`|`?t:e}function fi(){return{exit:{taskListCheckValueChecked:pi,taskListCheckValueUnchecked:pi,paragraph:mi}}}function pi(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function mi(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 hi(){return{enter:{mdxFlowExpression:gi,mdxTextExpression:_i},exit:{mdxFlowExpression:vi,mdxFlowExpressionChunk:yi,mdxTextExpression:vi,mdxTextExpressionChunk:yi}}}function gi(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function _i(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function vi(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 yi(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}var bi=`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(`.`),xi={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 Si(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function Ci(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function wi(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Ti(e){return wi(e)||Si(e)}var Ei=[``,`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 Di(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`?Ti:u===`decimal`?Si:Ci;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&bi.includes(y)&&(_=y,v=et(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&et(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=``):Ti(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(Oi(e))h(7,S),C=`�`;else if(e in xi)h(6,S),C=xi[e];else{let t=``;ki(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,Ei[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function Oi(e){return e>=55296&&e<=57343||e>1114111}function ki(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 Ai=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=Vr(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}};Ai.prototype.file=``,Ai.prototype.name=``,Ai.prototype.reason=``,Ai.prototype.message=``,Ai.prototype.stack=``,Ai.prototype.column=void 0,Ai.prototype.line=void 0,Ai.prototype.ancestors=void 0,Ai.prototype.cause=void 0,Ai.prototype.fatal=void 0,Ai.prototype.place=void 0,Ai.prototype.ruleId=void 0,Ai.prototype.source=void 0;function ji(){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 Ai("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 Ai(`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 Ai("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=Di(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 Ai("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+Vr(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 Ai("Expected a closing tag for `"+S(r)+"` ("+Vr({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 Ai("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+Vr(t.end)+") or another opening tag after the start of `"+t.type+"` ("+Vr(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function Mi(){return{enter:{mdxjsEsm:Ni},exit:{mdxjsEsm:Pi,mdxjsEsmData:Fi}}}function Ni(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function Pi(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 Fi(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Ii(){return[hi(),ji(),Mi()]}function Li(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&&tt(o,o.length,0,jt(s,e.slice(r+1,n),t)),tt(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),tt(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=At(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=At(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Ri=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){zi(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 zi(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 Bi(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 Vi(){return{flow:{null:{name:`table`,tokenize:Hi,resolveAll:Ui}}}}function Hi(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):W(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):gt(t)?bt(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||ht(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,gt(t)?bt(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 gt(t)?bt(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||W(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 gt(t)?bt(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||W(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||W(n)?(e.exit(`tableRow`),t(n)):gt(n)?bt(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||ht(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 Ui(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 Ri;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Gi(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=Wi(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=Wi(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=Wi(f,t,o,i,n,d)):(o[0]=o[1],d=Wi(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Gi(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=Bi(t.events,n))}return e}function Wi(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ki(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ki(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=Ki(t.events,n[2]),a=Ki(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({},Ki(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Gi(e,t,n,r,i){let a=[],o=Ki(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 Ki(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var qi={name:`tasklistCheck`,tokenize:Yi};function Ji(){return{text:{91:qi}}}function Yi(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 ht(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 W(r)?t(r):gt(r)?e.check({tokenize:Xi},t,n)(r):n(r)}}function Xi(e,t,n){return bt(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}var Zi=[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],Qi=[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],$i=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,ea=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,ta={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`},na=`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`,ra={5:na,"5module":na+` export import`,6:na+` const class extends export import super`},ia=/^in(stanceof)?$/,aa=RegExp(`[`+ea+`]`),oa=RegExp(`[`+ea+$i+`]`);function sa(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 ca(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&aa.test(String.fromCharCode(e)):t!==!1&&sa(e,Qi)}function la(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&&oa.test(String.fromCharCode(e)):t===!1?!1:sa(e,Qi)||sa(e,Zi)}var ua=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 da(e,t){return new ua(e,{beforeExpr:!0,binop:t})}var fa={beforeExpr:!0},pa={startsExpr:!0},ma={};function ha(e,t){return t===void 0&&(t={}),t.keyword=e,ma[e]=new ua(e,t)}var G={num:new ua(`num`,pa),regexp:new ua(`regexp`,pa),string:new ua(`string`,pa),name:new ua(`name`,pa),privateId:new ua(`privateId`,pa),eof:new ua(`eof`),bracketL:new ua(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new ua(`]`),braceL:new ua(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new ua(`}`),parenL:new ua(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new ua(`)`),comma:new ua(`,`,fa),semi:new ua(`;`,fa),colon:new ua(`:`,fa),dot:new ua(`.`),question:new ua(`?`,fa),questionDot:new ua(`?.`),arrow:new ua(`=>`,fa),template:new ua(`template`),invalidTemplate:new ua(`invalidTemplate`),ellipsis:new ua(`...`,fa),backQuote:new ua("`",pa),dollarBraceL:new ua("${",{beforeExpr:!0,startsExpr:!0}),eq:new ua(`=`,{beforeExpr:!0,isAssign:!0}),assign:new ua(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new ua(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new ua(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:da(`||`,1),logicalAND:da(`&&`,2),bitwiseOR:da(`|`,3),bitwiseXOR:da(`^`,4),bitwiseAND:da(`&`,5),equality:da(`==/!=/===/!==`,6),relational:da(`</>/<=/>=`,7),bitShift:da(`<</>>/>>>`,8),plusMin:new ua(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:da(`%`,10),star:da(`*`,10),slash:da(`/`,10),starstar:new ua(`**`,{beforeExpr:!0}),coalesce:da(`??`,1),_break:ha(`break`),_case:ha(`case`,fa),_catch:ha(`catch`),_continue:ha(`continue`),_debugger:ha(`debugger`),_default:ha(`default`,fa),_do:ha(`do`,{isLoop:!0,beforeExpr:!0}),_else:ha(`else`,fa),_finally:ha(`finally`),_for:ha(`for`,{isLoop:!0}),_function:ha(`function`,pa),_if:ha(`if`),_return:ha(`return`,fa),_switch:ha(`switch`),_throw:ha(`throw`,fa),_try:ha(`try`),_var:ha(`var`),_const:ha(`const`),_while:ha(`while`,{isLoop:!0}),_with:ha(`with`),_new:ha(`new`,{beforeExpr:!0,startsExpr:!0}),_this:ha(`this`,pa),_super:ha(`super`,pa),_class:ha(`class`,pa),_extends:ha(`extends`,fa),_export:ha(`export`),_import:ha(`import`,pa),_null:ha(`null`,pa),_true:ha(`true`,pa),_false:ha(`false`,pa),_in:ha(`in`,{beforeExpr:!0,binop:7}),_instanceof:ha(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:ha(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:ha(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:ha(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},ga=/\r\n?|\n|\u2028|\u2029/,_a=new RegExp(ga.source,`g`);function va(e){return e===10||e===13||e===8232||e===8233}function ya(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(va(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var ba=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,xa=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Sa=Object.prototype,Ca=Sa.hasOwnProperty,wa=Sa.toString,Ta=Object.hasOwn||(function(e,t){return Ca.call(e,t)}),Ea=Array.isArray||(function(e){return wa.call(e)===`[object Array]`}),Da=Object.create(null);function Oa(e){return Da[e]||(Da[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function ka(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var Aa=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ja=function(e,t){this.line=e,this.column=t};ja.prototype.offset=function(e){return new ja(this.line,this.column+e)};var Ma=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function Na(e,t){for(var n=1,r=0;;){var i=ya(e,r,t);if(i<0)return new ja(n,t-r);++n,r=i}}var Pa={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},Fa=!1;function Ia(e){var t={};for(var n in Pa)t[n]=e&&Ta(e,n)?e[n]:Pa[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Fa&&typeof console==`object`&&console.warn&&(Fa=!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),Ea(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(Ea(t.onComment)&&(t.onComment=La(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function La(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 Ma(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var Ra=1,za=2,Ba=4,Va=8,Ha=16,Ua=32,Wa=64,Ga=128,Ka=256,qa=512,Ja=1024,Ya=Ra|za|Ka;function Xa(e,t){return za|(e?Ba:0)|(t?Va:0)}var Za=0,Qa=1,$a=2,eo=3,to=4,no=5,ro=function(e,t,n){this.options=e=Ia(e),this.sourceFile=e.sourceFile,this.keywords=Oa(ra[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=ta[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=Oa(r);var i=(r?r+` `:``)+ta.strict;this.reservedWordsStrict=Oa(i),this.reservedWordsStrictBind=Oa(i+` `+ta.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(ga).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`?za:Ra),this.regexpState=null,this.privateNameStack=[]},io={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}};ro.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})},io.inFunction.get=function(){return(this.currentVarScope().flags&za)>0},io.inGenerator.get=function(){return(this.currentVarScope().flags&Va)>0},io.inAsync.get=function(){return(this.currentVarScope().flags&Ba)>0},io.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(Ka|qa))return!1;if(t&za)return(t&Ba)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},io.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Ra)},io.allowSuper.get=function(){return(this.currentThisScope().flags&Wa)>0||this.options.allowSuperOutsideMethod},io.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ga)>0},io.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},io.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(Ka|qa)||t&za&&!(t&Ha))return!0}return!1},io.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&Ja||!this.inModule&&e&Ra)},io.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ka)>0},ro.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},ro.parse=function(e,t){return new this(t,e).parse()},ro.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},ro.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(ro.prototype,io);var ao=ro.prototype,oo=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ao.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){xa.lastIndex=e,e+=xa.exec(this.input)[0].length;var t=oo.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){xa.lastIndex=e+t[0].length;var n=xa.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||ga.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`||i===`i`&&so(this,r))}e+=t[0].length,xa.lastIndex=e,e+=xa.exec(this.input)[0].length,this.input[e]===`;`&&e++}};function so(e,t){for(var n=t+1,r=Math.min(e.input.length,t+11);n<r;){var i=e.fullCharCodeAt(n);if(!la(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`}ao.eat=function(e){return this.type===e&&(this.next(),!0)},ao.isContextual=function(e){return this.type===G.name&&this.value===e&&!this.containsEsc},ao.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},ao.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}},ao.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ao.canInsertSemicolon=function(){return this.type===G.eof||this.type===G.braceR||ga.test(this.input.slice(this.lastTokEnd,this.start))},ao.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ao.semicolon=function(){!this.eat(G.semi)&&!this.insertSemicolon()&&this.unexpected()},ao.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ao.expect=function(e){this.eat(e)||this.unexpected()},ao.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var co=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ao.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`)}},ao.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`)},ao.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`)},ao.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var lo=ro.prototype;lo.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 uo={kind:`loop`},fo={kind:`switch`};lo.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;xa.lastIndex=this.pos;var t=xa.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(ca(r)){var i=n;do n+=r<=65535?1:2;while(la(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!ia.test(a))return!0}return!1},lo.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;xa.lastIndex=this.pos;var e=xa.exec(this.input),t=this.pos+e[0].length,n;return!ga.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(la(n=this.fullCharCodeAt(t+8))||n===92))},lo.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;xa.lastIndex=this.pos;var n=xa.exec(this.input),r=this.pos+n[0].length;if(ga.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||la(a=this.fullCharCodeAt(i))||a===92)return!1;xa.lastIndex=i;var o=xa.exec(this.input);if(r=i+o[0].length,o&&ga.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!ca(s)&&s!==92)return!1;var c=r;do r+=s<=65535?1:2;while(la(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(c,r);if(ia.test(l))return!1;if(t&&!e&&l===`of`){xa.lastIndex=r;var u=xa.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},lo.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},lo.isUsing=function(e){return this.isUsingKeyword(!1,e)},lo.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){xa.lastIndex=this.pos;var o=xa.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)}},lo.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`)},lo.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},lo.parseDoStatement=function(e){return this.next(),this.labels.push(uo),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`)},lo.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(uo),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 co,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))},lo.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))},lo.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,mo|(n?0:ho),!1,t)},lo.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`)},lo.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`)},lo.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(G.braceL),this.labels.push(fo),this.enterScope(Ja);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`)},lo.parseThrowStatement=function(e){return this.next(),ga.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 po=[];lo.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?Ua:0),this.checkLValPattern(e,t?to:$a),this.expect(G.parenR),e},lo.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`)},lo.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},lo.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(uo),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},lo.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`)},lo.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},lo.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`)},lo.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},lo.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`)},lo.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`)},lo.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`)},lo.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},lo.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?Qa:$a,!1)};var mo=1,ho=2,go=4;lo.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===G.star&&t&ho&&this.unexpected(),e.generator=this.eat(G.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&mo&&(e.id=t&go&&this.type!==G.name?null:this.parseIdent(),e.id&&!(t&ho)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Qa:$a:eo));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Xa(e.async,e.generator)),t&mo||(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&mo?`FunctionDeclaration`:`FunctionExpression`)},lo.parseFunctionParams=function(e){this.expect(G.parenL),e.params=this.parseBindingList(G.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},lo.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`&&_o(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`)},lo.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&&vo(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},lo.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},lo.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)},lo.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&&vo(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`)},lo.parseClassField=function(e){return vo(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&vo(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(G.eq)?(this.enterScope(qa|Wa),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},lo.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Ka|Wa);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`)},lo.parseClassId=function(e,t){this.type===G.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,$a,!1)):(t===!0&&this.unexpected(),e.id=null)},lo.parseClassSuper=function(e){e.superClass=this.eat(G._extends)?this.parseExprSubscripts(null,!1):null},lo.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},lo.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];Ta(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function _o(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 vo(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}lo.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`)},lo.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`)},lo.parseExportDeclaration=function(e){return this.parseStatement(null)},lo.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,mo|go,!1,e)}if(this.type===G._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}var r=this.parseMaybeAssign();return this.semicolon(),r},lo.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),Ta(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},lo.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)},lo.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)}},lo.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},lo.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`)},lo.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},lo.parseImport=function(e){return this.next(),this.type===G.string?(e.specifiers=po,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`)},lo.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,$a),this.finishNode(e,`ImportSpecifier`)},lo.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,$a),this.finishNode(e,`ImportDefaultSpecifier`)},lo.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,$a),this.finishNode(e,`ImportNamespaceSpecifier`)},lo.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},lo.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;Ta(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},lo.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`)},lo.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===G.string){var e=this.parseLiteral(this.value);return Aa.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},lo.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)},lo.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 yo=ro.prototype;yo.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},yo.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},yo.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},yo.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`)},yo.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()},yo.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},yo.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},yo.parseBindingListItem=function(e){return e},yo.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`)},yo.checkLValSimple=function(e,t,n){t===void 0&&(t=Za);var r=t!==Za;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===$a&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(Ta(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==no&&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`)}},yo.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=Za),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)}},yo.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=Za),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 bo=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},xo={b_stat:new bo(`{`,!1),b_expr:new bo(`{`,!0),b_tmpl:new bo("${",!1),p_stat:new bo(`(`,!1),p_expr:new bo(`(`,!0),q_tmpl:new bo("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new bo(`function`,!1),f_expr:new bo(`function`,!0),f_expr_gen:new bo(`function`,!0,!1,null,!0),f_gen:new bo(`function`,!1,!1,null,!0)},So=ro.prototype;So.initialContext=function(){return[xo.b_stat]},So.curContext=function(){return this.context[this.context.length-1]},So.braceIsBlock=function(e){var t=this.curContext();return t===xo.f_expr||t===xo.f_stat?!0:e===G.colon&&(t===xo.b_stat||t===xo.b_expr)?!t.isExpr:e===G._return||e===G.name&&this.exprAllowed?ga.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===xo.b_stat:e===G._var||e===G._const||e===G.name?!1:!this.exprAllowed},So.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},So.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},So.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===xo.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)?xo.b_stat:xo.b_expr),this.exprAllowed=!0},G.dollarBraceL.updateContext=function(){this.context.push(xo.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?xo.p_stat:xo.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()===xo.p_stat)&&!(e===G._return&&ga.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==G.colon&&e!==G.braceL||this.curContext()!==xo.b_stat)?this.context.push(xo.f_expr):this.context.push(xo.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()===xo.q_tmpl?this.context.pop():this.context.push(xo.q_tmpl),this.exprAllowed=!1},G.star.updateContext=function(e){if(e===G._function){var t=this.context.length-1;this.context[t]===xo.f_expr?this.context[t]=xo.f_expr_gen:this.context[t]=xo.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 Co=ro.prototype;Co.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}}},Co.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})},Co.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 co,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},Co.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},Co.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)},Co.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},Co.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`)},Co.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`&&wo(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&To(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 wo(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&wo(e.expression)}function To(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&To(e.expression)||e.type===`ParenthesizedExpression`&&To(e.expression)}Co.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},Co.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}},Co.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(G.arrow)},Co.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},Co.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 co,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},Co.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(xo.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(xo.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()}},Co.parseExprAtomDefault=function(){this.unexpected()},Co.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()},Co.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`)},Co.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`)},Co.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`)},Co.parseParenExpression=function(){this.expect(G.parenL);var e=this.parseExpression();return this.expect(G.parenR),e},Co.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Co.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 co,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},Co.parseParenItem=function(e){return e},Co.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Eo=[];Co.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):Eo,this.finishNode(e,`NewExpression`)},Co.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`)},Co.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`)},Co.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)&&!ga.test(this.input.slice(this.lastTokEnd,this.start))},Co.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`)},Co.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`)},Co.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`)},Co.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()},Co.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`)},Co.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Co.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(Xa(t,r.generator)|Wa|(n?Ga: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`)},Co.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Xa(n,!1)|Ha),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`)},Co.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,no),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},Co.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},Co.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,Qa,t?null:n)}},Co.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},Co.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&Ya)&&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`))},Co.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},Co.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},Co.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},Co.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`)},Co.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 Do=ro.prototype;Do.raise=function(e,t){var n=Na(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},Do.raiseRecoverable=Do.raise,Do.curPosition=function(){if(this.options.locations)return new ja(this.curLine,this.pos-this.lineStart)};var Oo=ro.prototype,ko=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Oo.enterScope=function(e){this.scopeStack.push(new ko(e))},Oo.exitScope=function(){this.scopeStack.pop()},Oo.treatFunctionsAsVarInScope=function(e){return e.flags&za||!this.inModule&&e.flags&Ra},Oo.declareName=function(e,t,n){var r=!1;if(t===$a){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&Ra&&delete this.undefinedExports[e]}else if(t===to)this.currentScope().lexical.push(e);else if(t===eo){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&Ua&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&Ra&&delete this.undefinedExports[e],s.flags&Ya)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},Oo.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},Oo.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Oo.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ya|qa|Ka))return t}},Oo.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ya|qa|Ka)&&!(t.flags&Ha))return t}};var Ao=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new Ma(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},jo=ro.prototype;jo.startNode=function(){return new Ao(this,this.start,this.startLoc)},jo.startNodeAt=function(e,t){return new Ao(this,e,t)};function Mo(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}jo.finishNode=function(e,t){return Mo.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},jo.finishNodeAt=function(e,t,n,r){return Mo.call(this,e,t,n,r)},jo.copyNode=function(e){var t=new Ao(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var No=`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`,Po=`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`,Fo=Po+` Extended_Pictographic`,Io=Fo,Lo=Io+` EBase EComp EMod EPres ExtPict`,Ro=Lo,zo={9:Po,10:Fo,11:Io,12:Lo,13:Ro,14:Ro},Bo={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`},Vo=`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`,Ho=`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`,Uo=Ho+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,Wo=Uo+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,Go=Wo+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,Ko=Go+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,qo={9:Ho,10:Uo,11:Wo,12:Go,13:Ko,14:Ko+` `+No},Jo={};function Yo(e){var t=Jo[e]={binary:Oa(zo[e]+` `+Vo),binaryOfStrings:Oa(Bo[e]),nonBinary:{General_Category:Oa(Vo),Script:Oa(qo[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 Xo=0,Zo=[9,10,11,12,13,14];Xo<Zo.length;Xo+=1){var Qo=Zo[Xo];Yo(Qo)}var K=ro.prototype,$o=function(e,t){this.parent=e,this.base=t||this};$o.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},$o.prototype.sibling=function(){return new $o(this.parent,this.base)};var es=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=Jo[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};es.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)},es.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},es.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},es.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},es.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},es.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},es.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},es.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},es.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},K.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 ts(e){for(var t in e)return!0;return!1}K.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&ts(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},K.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`)}},K.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new $o(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`)},K.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},K.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},K.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},K.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},K.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},K.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},K.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)},K.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},K.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},K.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},K.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&ns(n);)t+=ka(n),e.advance();return t};function ns(e){return e===105||e===109||e===115}K.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)},K.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},K.regexp_eatSyntaxCharacter=function(e){var t=e.current();return rs(t)?(e.lastIntValue=t,e.advance(),!0):!1};function rs(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}K.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!rs(n);)e.advance();return e.pos!==t},K.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)},K.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}},K.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},K.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ka(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ka(e.lastIntValue);return!0}return!1},K.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),is(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function is(e){return ca(e,!0)||e===36||e===95}K.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),as(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function as(e){return la(e,!0)||e===36||e===95||e===8204||e===8205}K.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)},K.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},K.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},K.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)},K.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},K.regexp_eatZero=function(e){return e.current()===48&&!vs(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},K.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)},K.regexp_eatControlLetter=function(e){var t=e.current();return ss(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function ss(e){return e>=65&&e<=90||e>=97&&e<=122}K.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)&&cs(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function cs(e){return e>=0&&e<=1114111}K.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)},K.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 ls=0,us=1,ds=2;K.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(fs(t))return e.lastIntValue=-1,e.advance(),us;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===ds&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return ls};function fs(e){return e===100||e===68||e===115||e===83||e===119||e===87}K.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),us}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return ls},K.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Ta(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},K.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return us;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return ds;e.raise(`Invalid property name`)},K.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;ps(t=e.current());)e.lastStringValue+=ka(t),e.advance();return e.lastStringValue!==``};function ps(e){return ss(e)||e===95}K.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;ms(t=e.current());)e.lastStringValue+=ka(t),e.advance();return e.lastStringValue!==``};function ms(e){return ps(e)||vs(e)}K.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},K.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===ds&&e.raise(`Negated character class may contain strings`),!0}return!1},K.regexp_classContents=function(e){return e.current()===93?us:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),us)},K.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`)}}},K.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||xs(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)},K.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)},K.regexp_classSetExpression=function(e){var t=us,n;if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e)){n===ds&&(t=ds);for(var r=e.pos;e.eatChars([38,38]);)e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))?n!==ds&&(t=us):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===ds&&(t=ds)}},K.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},K.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?us:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},K.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===ds&&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},K.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},K.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ds&&(t=ds);return t},K.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?us:ds},K.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()&&hs(n)||gs(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function hs(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 gs(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}K.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return _s(t)?(e.lastIntValue=t,e.advance(),!0):!1};function _s(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}K.regexp_eatClassControlLetter=function(e){var t=e.current();return vs(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},K.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},K.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;vs(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function vs(e){return e>=48&&e<=57}K.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;ys(n=e.current());)e.lastIntValue=16*e.lastIntValue+bs(n),e.advance();return e.pos!==t};function ys(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function bs(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}K.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},K.regexp_eatOctalDigit=function(e){var t=e.current();return xs(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function xs(e){return e>=48&&e<=55}K.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!ys(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+bs(i),e.advance()}return!0};var Ss=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Ma(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Cs=ro.prototype;Cs.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 Ss(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Cs.getToken=function(){return this.next(),new Ss(this)},typeof Symbol<`u`&&(Cs[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===G.eof,value:t}}}}),Cs.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())},Cs.readToken=function(e){return ca(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},Cs.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},Cs.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Cs.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=ya(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())},Cs.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&&!va(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())},Cs.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&&ba.test(String.fromCharCode(e)))++this.pos;else break loop}}},Cs.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)},Cs.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))},Cs.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)},Cs.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)},Cs.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)},Cs.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(G.assign,2):this.finishOp(G.bitwiseXOR,1)},Cs.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||ga.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)},Cs.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))},Cs.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)},Cs.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)},Cs.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),ca(t,!0)||t===92))return this.finishToken(G.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+ka(t)+`'`)},Cs.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 '`+ka(e)+`'`)},Cs.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Cs.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(ga.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 es(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})},Cs.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 ws(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function Ts(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}Cs.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=Ts(this.input.slice(t,this.pos)),++this.pos):ca(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(G.num,n)},Cs.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=Ts(this.input.slice(t,this.pos));return++this.pos,ca(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`)),ca(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=ws(this.input.slice(t,this.pos),n);return this.finishToken(G.num,a)},Cs.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},Cs.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)):(va(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(G.string,t)};var Es={};Cs.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Es)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},Cs.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Es;this.raise(e,t)},Cs.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(va(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}},Cs.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`)},Cs.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 ka(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 va(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},Cs.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},Cs.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(la(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?ca:la)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=ka(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},Cs.readWord=function(){var e=this.readWord1(),t=G.name;return this.keywords.test(e)&&(t=ma[e]),this.finishToken(t,e)},ro.acorn={Parser:ro,version:`8.19.0`,defaultOptions:Pa,Position:ja,SourceLocation:Ma,getLineInfo:Na,Node:Ao,TokenType:ua,tokTypes:G,keywordTypes:ma,TokContext:bo,tokContexts:xo,isIdentifierChar:la,isIdentifierStart:ca,Token:Ss,isNewLine:va,lineBreak:ga,lineBreakG:_a,nonASCIIwhitespace:ba};var Ds=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:`♦`}})),Os=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,ae=8,V=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?ae: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&ae)>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&V))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`&&Be(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 Be(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&Be(e.expression)||e.type===`ParenthesizedExpression`&&Be(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 Ve=[];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):Ve,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)|V),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 He=be.prototype;He.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},He.raiseRecoverable=He.raise,He.curPosition=function(){if(this.options.locations)return new I(this.curLine,this.pos-this.lineStart)};var Ue=be.prototype,We=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Ue.enterScope=function(e){this.scopeStack.push(new We(e))},Ue.exitScope=function(){this.scopeStack.pop()},Ue.treatFunctionsAsVarInScope=function(e){return e.flags&re||!this.inModule&&e.flags&ne},Ue.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`)},Ue.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},Ue.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ue.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(fe|ue|le))return t}},Ue.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(fe|ue|le)&&!(t.flags&V))return t}};var Ge=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])},Ke=be.prototype;Ke.startNode=function(){return new Ge(this,this.start,this.startLoc)},Ke.startNodeAt=function(e,t){return new Ge(this,e,t)};function qe(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}Ke.finishNode=function(e,t){return qe.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Ke.finishNodeAt=function(e,t,n,r){return qe.call(this,e,t,n,r)},Ke.copyNode=function(e){var t=new Ge(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Je=`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`,Ye=`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`,Xe=Ye+` Extended_Pictographic`,Ze=Xe,Qe=Ze+` EBase EComp EMod EPres ExtPict`,$e=Qe,et={9:Ye,10:Xe,11:Ze,12:Qe,13:$e,14:$e},tt={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`},nt=`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`,rt=`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`,it=rt+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,at=it+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,ot=at+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,st=ot+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,ct={9:rt,10:it,11:at,12:ot,13:st,14:st+` `+Je},lt={};function ut(e){var t=lt[e]={binary:N(et[e]+` `+nt),binaryOfStrings:N(tt[e]),nonBinary:{General_Category:N(nt),Script:N(ct[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 dt=0,ft=[9,10,11,12,13,14];dt<ft.length;dt+=1){var pt=ft[dt];ut(pt)}var U=be.prototype,mt=function(e,t){this.parent=e,this.base=t||this};mt.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},mt.prototype.sibling=function(){return new mt(this.parent,this.base)};var W=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=lt[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};W.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)},W.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},W.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},W.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},W.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},W.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},W.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},W.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},W.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},U.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}U.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&ht(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},U.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`)}},U.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new mt(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`)},U.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},U.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},U.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},U.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},U.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},U.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},U.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)},U.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},U.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},U.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},U.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}U.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)},U.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},U.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}U.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!_t(n);)e.advance();return e.pos!==t},U.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)},U.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}},U.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},U.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},U.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}U.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}U.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)},U.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},U.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},U.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)},U.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},U.regexp_eatZero=function(e){return e.current()===48&&!jt(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},U.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)},U.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}U.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}U.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)},U.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;U.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}U.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},U.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`)},U.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`)},U.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}U.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)}U.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},U.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},U.regexp_classContents=function(e){return e.current()===93?Ct:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Ct)},U.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`)}}},U.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)},U.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)},U.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)}},U.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},U.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Ct:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},U.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},U.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},U.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===wt&&(t=wt);return t},U.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Ct:wt},U.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}U.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}U.regexp_eatClassControlLetter=function(e){var t=e.current();return jt(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},U.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},U.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}U.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}U.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},U.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}U.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 W(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:Ge,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=Ge,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}))})),ks=n(((e,t)=>{var n=Ds(),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(Os()).tokTypes},configurable:!0,enumerable:!0});function c(e,t){let a=t.acorn||Os(),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 As(e){return e}var js={}.hasOwnProperty,Ms=Symbol(`continue`),Ns=Symbol(`exit`),Ps=Symbol(`skip`);function Fs(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 Ls(e)&&(s.displayName=`node (`+As(e.type)+`)`),s;function s(){let s=n?Is(n(e,t,a,o)):[];if(s[0]===Ns)return s;if(s[0]!==Ps){let t;for(t in e)if(js.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(Ls(r)){let e=i(r,t,a,n)();if(e[0]===Ns)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(Ls(r)){let e=i(r,t,void 0,n)();if(e[0]===Ns)return e}}}return r?Is(r(e,t,a,o)):s}}}function Is(e){return Array.isArray(e)?e:typeof e==`number`?[Ms,e]:[e]}function Ls(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function Rs(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=Bs(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&zs(m);if(g&&!t.allowEmpty)throw new Ai(`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(zs(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,Fs(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=Vs(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function zs(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function Bs(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=Hs(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 Vs(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 Hs(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 Us(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=Ws(n.start,r[0]||t.start),a=Ws(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function Ws(e,t){if(e&&typeof e==`object`){let n=`line`in e?Gs(e.line):void 0,r=`column`in e?Gs(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:Gs(t)}}}function Gs(e){return typeof e==`number`&&e>-1?e:void 0}var Ks=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,qs=`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,Js=`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,Ys=`#unexpected-type-in-code-expected-an-object-spread-spread`,Xs=`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,Zs=`#could-not-parse-expression-with-acorn`;function Qs(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 Ai("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=Ks+qs,e}if(W(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?$s.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||W(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 Ai("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=Ks+Js,e}return gt(t)?bt(e,_,`linePrefix`,3)(t):_(t)}}function $s(e,t,n,r,i,a,o){let s=Rs(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=Us(e),n=new Ai("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=Ks+Ys,n}if(e.expression.properties[1]){let t=new Ai(`Unexpected extra content in spread: only a single spread is supported`,{place:Us(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=Ks+Xs,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=Us(e.expression.properties[0]),n=new Ai("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=Ks+Ys,n}}if(s.error){let e=new Ai(`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=Ks+Zs,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function ec(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 Qs.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return gt(t)?bt(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||W(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return Qs.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}var tc=/[$_\p{ID_Start}]/u,nc=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,rc=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,ic={};function ac(e){return e?tc.test(String.fromCodePoint(e)):!1}function oc(e,t){let n=(t||ic).jsx?rc:nc;return e?n.test(String.fromCodePoint(e)):!1}var sc=`https://github.com/micromark/micromark-extension-mdx-jsx`;function cc(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 ht(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&&ac(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&&ac(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&&oc(t,{jsx:!0}))return e.consume(t),z;if(t===46||t===47||t===58||t===62||t===123||ht(t)||vt(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&&ac(t))return e.exit(d),V(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&&ac(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&&oc(t,{jsx:!0}))return e.consume(t),te;if(t===46||t===47||t===62||t===123||ht(t)||vt(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&&ac(t))return e.exit(d),V(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&&ac(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&&oc(t,{jsx:!0}))return e.consume(t),ie;if(t===47||t===62||t===123||ht(t)||vt(t))return e.exit(g),N=ae,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 ae(t){if(t===47||t===62||t===123||t!==null&&t>=0&&ac(t))return e.exit(d),V(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 V(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 Qs.call(M,e,oe,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&ac(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=V,ve(e)}function se(t){if(t!==null&&t>=0&&oc(t,{jsx:!0}))return e.consume(t),se;if(t===47||t===58||t===61||t===62||t===123||ht(t)||vt(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||ht(t)||vt(t)||t!==null&&t>=0&&ac(t))return e.exit(x),e.exit(b),N=V,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&&ac(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&&oc(t,{jsx:!0}))return e.consume(t),ue;if(t===47||t===61||t===62||t===123||ht(t)||vt(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&&ac(t))return e.exit(b),V(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 Qs.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=V,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=V,ve):W(t)?(N=me,ve(t)):(e.enter(O),he(t))}function he(t){return t===null||t===P||W(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 W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),be):gt(t)||vt(t)?(e.enter(`esWhitespace`),ye(t)):N(t)}function ye(t){return W(t)?(e.exit(`esWhitespace`),ve(t)):gt(t)||vt(t)?(e.consume(t),ye):(e.exit(`esWhitespace`),N(t))}function be(e){if(!o&&M.parser.lazy[M.now().line]){let e=new Ai("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=sc+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return ve(e)}function xe(e,t,n){let r=new Ai(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+lc(e)+`)`)+` `+t+`, expected `+n,M.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=sc+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function lc(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function uc(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return cc.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 dc(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 cc.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 gt(e)?bt(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||W(e)?r(e):i(e)}}}function fc(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:dc(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:uc(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function pc(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}var mc={tokenize:vc,partial:!0},hc=`https://github.com/micromark/micromark-extension-mdxjs-esm`,gc=new Set([`ExportAllDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ImportDeclaration`]);function _c(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 lt(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||W(e)?(t.exit(`mdxjsEsmData`),p(e)):(t.consume(e),f)}function p(e){return e===null?h(e):W(e)?t.check(mc,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=Rs(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 Ai(`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=hc+`#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(!gc.has(e.type)){let t=new Ai("Unexpected `"+e.type+"` in code: only import/exports are supported",{place:Us(e),ruleId:`non-esm`,source:`micromark-extension-mdxjs-esm`});throw t.url=hc+`#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 vc(e,t,n){return r;function r(r){return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),e.attempt(Rt,t,n)}}var yc=t(ks(),1);function bc(e){let t=Object.assign({acorn:ro.extend((0,yc.default)()),acornOptions:{ecmaVersion:2024,sourceType:`module`},addResult:!0},e);return it([_c(t),ec(t),fc(t),pc()])}var xc=`Block`,Sc=`Callout`,Cc=`Table`,wc=new Set([`center`,`right`,`justify`]),Tc=(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 Ec(e,t,n){let r=t.position?.start;e.problems.push({message:n,...r?{line:r.line,column:r.column}:{}})}var Dc=(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 Oc(e,t,n,r){if(t===``)return;let i=e.at(-1);i&&i.href===r&&Dc(i.styles,n)?i.text+=t:e.push({text:t,styles:{...n},...r===void 0?{}:{href:r}})}function kc(e,t,n){let r=new Map;for(let i of t.attributes)i.type!==`mdxJsxAttribute`||!n.includes(i.name)?Ec(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):Ec(e,t,`${i.name} of <${t.name??``}> is a plain string`);return r}function Ac(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=kc(e,t,[`color`,`bg`]),i=r.get(`color`),a=r.get(`bg`);return{...n,...i?{color:i}:{},...a?{background:a}:{}}}default:return}}function jc(e,t,n,r,i){for(let a of t)switch(a.type){case`text`:Oc(i,a.value.replace(/\r?\n/g,` `),n,r);break;case`strong`:jc(e,a.children,{...n,bold:!0},r,i);break;case`emphasis`:jc(e,a.children,{...n,italic:!0},r,i);break;case`delete`:jc(e,a.children,{...n,strike:!0},r,i);break;case`inlineCode`:Oc(i,a.value,{...n,code:!0},r);break;case`break`:Oc(i,`
25
- `,n,r);break;case`link`:jc(e,a.children,n,a.url,i);break;case`mdxJsxTextElement`:{if(a.name===`br`){Oc(i,`
26
- `,n,r);break}let t=Ac(e,a,n);if(t){jc(e,a.children,t,r,i);break}Ec(e,a,`<${a.name??``}> inside a line is not drawn: a tag the doc's code draws goes on lines of its own`),Oc(i,Tc(e,a),n,r);break}case`mdxTextExpression`:Ec(e,a,`{…} in a line is not drawn: write \\{ for a brace`),Oc(i,Tc(e,a),n,r);break;default:Ec(e,a,`${a.type} is not drawn in a doc`),Oc(i,Tc(e,a),n,r)}}function Mc(e,t){let n=[];return jc(e,t,{},void 0,n),n}var Nc=e=>e?.type===`mdxJsxFlowElement`&&e.name===`br`&&e.children.length===0;function Pc(e,t){let[n,...r]=t;if(n?.type===`paragraph`){let t=Mc(e,n.children);return{content:t.length===1&&t[0]?.text===`
27
- `&&Object.keys(t[0].styles).length===0?[]:t,under:Gc(e,r)}}return Nc(n)?{content:[],under:Gc(e,r)}:{content:[],under:Gc(e,t)}}var Fc=(e,t)=>t.length>0?{...e,children:t}:e;function Ic(e,t,n,r){let{content:i,under:a}=Pc(e,t.children);return typeof t.checked==`boolean`?Fc({type:`check`,checked:t.checked,content:i},a):Fc(n?{type:`numbered`,...r===void 0||r===1?{}:{start:r},content:i}:{type:`bullet`,content:i},a)}function Lc(e,t){return t.children.map(t=>Mc(e,t.children))}function Rc(e,t){return t?{[e]:t}:{}}function zc(e,t){let n=kc(e,t,[`align`,`color`,`bg`,`toggle`]),r=Gc(e,t.children),[i,...a]=r;if(i===void 0)return Ec(e,t,`<${xc}> holds a block: this one is empty`),[];if(i.type===`embed`||i.type===`source`)return Ec(e,t,`<${xc}> holds a block of the doc's own, not a tag or an import`),r;let o=n.get(`align`);o!==void 0&&!wc.has(o)&&Ec(e,t,`align is center, right or justify, not "${o}"`);let s={...o!==void 0&&wc.has(o)?{align:o}:{},...Rc(`color`,n.get(`color`)),...Rc(`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}:Ec(e,t,`toggle is for a heading or a line of text`)),Object.keys(s).length>0&&(`content`in c?c={...c,look:s}:Ec(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 Ec(e,t,`a ${c.type} holds no blocks under it`),[c,...a]}return[c]}function Bc(e,t){let n=kc(e,t,[`icon`,`color`,`bg`]),{content:r,under:i}=Pc(e,t.children),a={...Rc(`color`,n.get(`color`)),...Rc(`background`,n.get(`bg`))};return[Fc({type:`callout`,...Rc(`icon`,n.get(`icon`)),...Object.keys(a).length>0?{look:a}:{},content:r},i)]}function Vc(e,t){let n=kc(e,t,[`src`,`alt`,`title`,`width`,`align`]),r=n.get(`src`);if(!r)return Ec(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`&&Ec(e,t,`a picture's align is center or right, not "${a}"`),[{type:`image`,src:r,...Rc(`alt`,n.get(`alt`)),...Rc(`caption`,n.get(`title`)),...Number.isFinite(i)&&i>0?{width:Math.round(i)}:{},...a===`center`||a===`right`?{align:a}:{}}]}function Hc(e,t){let n=kc(e,t,[`widths`,`head`]),r=Gc(e,t.children),[i,...a]=r;if(i?.type!==`table`||a.length>0)return Ec(e,t,`<${Cc}> holds one table`),r;let o=n.get(`head`);o!==void 0&&![`none`,`column`,`both`,`row`].includes(o)&&Ec(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 Uc(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:Mc(e,t.children)}]}case`heading`:return[{type:`heading`,level:t.depth,content:Mc(e,t.children)}];case`list`:{let n=t.ordered===!0;return t.children.map((r,i)=>Ic(e,r,n,i===0&&n?t.start??void 0:void 0))}case`blockquote`:{let{content:n,under:r}=Pc(e,t.children);return[Fc({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=>Lc(e,t))}];case`thematicBreak`:return[{type:`divider`}];case`mdxJsxFlowElement`:return t.name===`Block`?zc(e,t):t.name===`Table`?Hc(e,t):t.name===`Callout`?Bc(e,t):t.name===`img`&&t.children.length===0?Vc(e,t):Nc(t)?[{type:`paragraph`,content:[]}]:[{type:`embed`,source:Tc(e,t)}];case`mdxjsEsm`:case`definition`:return[{type:`source`,source:Tc(e,t)}];case`mdxFlowExpression`:return Ec(e,t,`{…} on its own is not drawn in a doc`),[{type:`source`,source:Tc(e,t)}];default:return Ec(e,t,`${t.type} is not drawn in a doc`),[{type:`source`,source:Tc(e,t)}]}}function Wc(e,t){return t.map((n,r)=>{let i=Uc(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 Gc(e,t){return Wc(e,t).flat()}function Kc(e){let t={source:e,problems:[]},n;try{n=Kr(e,{extensions:[bc(),Vi(),Li(),Ji()],mdastExtensions:[Ii(),ii(),Qr(),fi()]})}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=Wc(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 qc=[`link`,`span`,`underline`,`bold`,`italic`,`strike`,`code`];function Jc(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 Yc=(e,t)=>t===void 0?``:` ${e}="${t.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`)}"`,Xc=e=>e!==void 0&&/[\p{L}\p{N}]/u.test(e);function Zc(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+=Xc(o)&&Xc(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 Qc(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 $c={bold:`**`,italic:`*`,strike:`~~`},el={underline:`u`,bold:`strong`,italic:`em`,strike:`del`,code:`code`};function tl(e,t){let n=``,r=0,i=!0;for(;r<e.length;){let a=e[r];if(a===void 0)break;let o=qc.find(e=>!t.used.has(e)&&Jc(a,e)!==void 0);if(o===void 0){n+=Zc(a.text,t.inTable,t.oneLine),i=!0,r++;continue}let s=Jc(a,o),c=r+1;for(;c<e.length;){let n=e[c];if(n===void 0||Jc(n,o)!==s||o===`code`&&qc.some(e=>e!==`code`&&!t.used.has(e)&&Jc(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||qc.every(e=>t.used.has(e)||Jc(f,e)===void 0);if(o===`code`)n+=d.includes(`
30
- `)||t.inTable&&d.includes(`|`)?`<code>${Zc(d,t.inTable,t.oneLine)}</code>`:Qc(d);else if(o===`link`){let e=tl(l,{...t,used:u}),r=(s??``).replace(/[\s()<>\\]/g,e=>encodeURIComponent(e));n+=`[${e}](${r})`}else if(o===`span`){let e=tl(l,{...t,used:u}),r=l[0];n+=`<span${Yc(`color`,r?.styles.color)}${Yc(`bg`,r?.styles.background)}>${e}</span>`}else{let a=tl(l,{...t,used:u}),s=$c[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&&qc.every(t=>u.has(t)||Jc(e,t)===void 0),_=o===`bold`&&l.every(e=>e.styles.italic===!0&&qc.every(t=>t===`italic`||u.has(t)||Jc(e,t)===void 0)),v=s!==void 0&&Xc(f[0])&&Xc(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}`:`<${el[o]}>${a}</${el[o]}>`}i=!1,r=c}return n}function nl(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 rl(e,t=!1,n=t){let r=tl(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=>nl(i(e))).join(`
33
- `)}var il=(e,t)=>e.split(`
34
- `).map((e,n)=>n===0||e===``?e:`${t}${e}`).join(`
35
- `),al=e=>e.type===`bullet`||e.type===`numbered`||e.type===`check`,ol=e=>`${Yc(`align`,e?.align)}${Yc(`color`,e?.color)}${Yc(`bg`,e?.background)}`,sl=e=>e!==void 0&&Object.keys(e).length>0;function cl(e){return!(`content`in e)||e.type===`callout`?!1:sl(e.look)||e.type===`toggle`||e.type===`heading`&&e.toggle?!0:(e.type===`paragraph`||e.type===`heading`)&&(e.children?.length??0)>0}function ll(e){let t=Math.max(2,...(e.match(/^\s*`{3,}/gm)??[]).map(e=>e.trim().length));return"`".repeat(t+1)}function ul(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=rl(e.content)||(e.type===`check`&&(e.children??[]).length===0?`<br />`:``);if(a.length===0)return`${r}${il(o,i)}`.trimEnd();let s=o===``?`<br />`:o,[c]=a,l=c!==void 0&&al(c)&&rl(c.content)!==``&&(c.type!==`numbered`||(c.start??1)===1),u=a.every(al)&&o!==``&&l;return`${r}${il(s,i)}${u?`
36
- `:`
37
-
38
- `}${i}${il(ml(a),i)}`}function dl(e){switch(e.type){case`paragraph`:{let t=rl(e.content);return t===``?`<br />`:t}case`heading`:return`${`#`.repeat(e.level)} ${rl(e.content,!1,!0).replace(/(^| )(#+)$/,`$1\\$2`)}`.trimEnd();case`toggle`:return rl(e.content)||`<br />`;case`quote`:{let t=rl(e.content);return(e.children?.length?[t===``?`<br />`:t,ml(e.children)]:[t]).join(`
39
-
40
- `).split(`
41
- `).map(e=>e===``?`>`:`> ${e}`).join(`
42
- `)}case`callout`:{let t=rl(e.content),n=[t===``?`<br />`:t,...e.children?.length?[ml(e.children)]:[]].join(`
43
-
44
- `);return`<${Sc}${Yc(`icon`,e.icon)}${Yc(`color`,e.look?.color)}${Yc(`bg`,e.look?.background)}>\n\n${n}\n\n</${Sc}>`}case`code`:{let t=ll(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${Yc(`src`,e.src)}${Yc(`alt`,e.alt)}${Yc(`title`,e.caption)}${Yc(`width`,e.width===void 0?void 0:String(e.width))}${Yc(`align`,e.align)} />`;let n=e.caption===void 0?``:` "${e.caption.replace(/["\\]/g,`\\$&`)}"`;return`![${Zc(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)=>rl(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:`<${Cc}${Yc(`widths`,o)}${Yc(`head`,e.head)}>\n\n${a}\n\n</${Cc}>`}case`divider`:return`---`;case`embed`:case`source`:return e.source}}function fl(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=al(i)||i.type===`quote`?ml([{...i,...n?{children:n}:{}}]):ml([i,...n??[]]);return`<${xc}${ol(e.look)}${t?` toggle`:``}>\n\n${a}\n\n</${xc}>`}function pl(e,t){return al(e)&&al(t)&&!cl(e)&&!cl(t)&&e.type===`numbered`==(t.type===`numbered`)&&(t.type!==`numbered`||t.start===void 0)}function ml(e){let t=[],n=0,r;for(;n<e.length;){let i=e[n];if(i===void 0)break;if(cl(i)){t.push(fl(i)),r=void 0,n++;continue}if(!al(i)){t.push(dl(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||!al(t)||cl(t)||t.type===`numbered`!==a||l>n&&!pl(i,t))break;c.push(ul(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 hl=[`bold`,`italic`,`underline`,`strike`],gl=(e,t)=>e.href===t.href&&JSON.stringify(yl(e.styles))===JSON.stringify(yl(t.styles));function _l(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&&gl(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&&hl.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 vl=e=>e.length>0&&e.every(e=>typeof e==`object`&&!!e&&typeof e.text==`string`&&typeof e.styles==`object`);function yl(e){if(Array.isArray(e))return(vl(e)?_l(e):e).map(yl);if(typeof e==`object`&&e){let t={};for(let n of Object.keys(e).sort()){let r=e[n];r!==void 0&&(t[n]=yl(r))}return t}return e}var bl=e=>JSON.stringify(yl(e)),xl=(e,t)=>e.length===t.length&&e.every((e,n)=>{let r=t[n];return r!==void 0&&bl(e)===bl(r)}),Sl=e=>e.filter(e=>e.type!==`source`);function Cl(e,t){let n=t.map(bl),r=e.segments.map(e=>({...e,keys:e.blocks.map(bl)})),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&&pl(c,i),f=u!==void 0&&a!==void 0&&pl(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+=ml(e.blocks),x=void 0}),b+(y===``&&b!==``?`
58
- `:y)}function wl(e){return e?.type===`heading`&&e.level===1&&e.toggle!==!0&&(e.children?.length??0)===0}function Tl(e){let t=e[0];return wl(t)?{title:t,body:e.slice(1)}:{title:void 0,body:[...e]}}function El(e){return wl(e)?e.content.map(e=>e.text).join(``):``}function Dl(e,t){let n=t.replace(/\s+/g,` `).trim();if(n===``)return;if(wl(e)&&El(e)===n)return e;let r=[{text:n,styles:{}}];return{type:`heading`,level:1,...wl(e)&&e.look?{look:e.look}:{},content:r}}function Ol(e,t){return e?[e,...t]:[...t]}var q=t(F(),1),J=ee(),kl={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`}},Al={en:kl,"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:`ठीक है`}}},jl={agent:`AllyHub`,review:{changed:e=>`${e} hat das geändert`,added:e=>`${e} hat das hinzugefügt`,removed:e=>`${e} hat einen Block entfernt`,was:`Vorher`,undo:`Widerrufen`,restore:`Zurückholen`,keep:`Behalten`,count:(e,t)=>`${e} hat ${String(t)} ${t===1?`Stelle`:`Stellen`} geändert`,away:`Geändert seit deinem letzten Blick`,countAway:e=>`Seit deinem letzten Blick: ${String(e)} ${e===1?`Stelle`:`Stellen`} geändert`,keepAll:`Alle behalten`,undoAll:`Alle widerrufen`,next:`Weiter`,previous:`Zurück`,position:(e,t)=>`${String(e)} von ${String(t)}`},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`}},Ml={agent:`AllyHub`,review:{changed:e=>`${e} changed this`,added:e=>`${e} added this`,removed:e=>`${e} removed a block`,was:`Before`,undo:`Undo`,restore:`Put back`,keep:`Keep`,count:(e,t)=>`${e} changed ${String(t)} ${t===1?`place`:`places`}`,away:`Changed since you last looked`,countAway:e=>`Since you last looked: ${String(e)} ${e===1?`place`:`places`} changed`,keepAll:`Keep all`,undoAll:`Undo all`,next:`Next`,previous:`Previous`,position:(e,t)=>`${String(e)} of ${String(t)}`},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`}},Nl={agent:`AllyHub`,review:{changed:e=>`${e} cambió esto`,added:e=>`${e} añadió esto`,removed:e=>`${e} eliminó un bloque`,was:`Antes`,undo:`Deshacer`,restore:`Recuperar`,keep:`Conservar`,count:(e,t)=>`${e} cambió ${String(t)} ${t===1?`sitio`:`sitios`}`,away:`Cambiado desde la última vez que lo viste`,countAway:e=>`Desde la última vez que lo viste: ${String(e)} ${e===1?`sitio cambiado`:`sitios cambiados`}`,keepAll:`Conservar todo`,undoAll:`Deshacer todo`,next:`Siguiente`,previous:`Anterior`,position:(e,t)=>`${String(e)} de ${String(t)}`},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`}},Pl={agent:`AllyHub`,review:{changed:e=>`Modifié par ${e}`,added:e=>`Ajouté par ${e}`,removed:e=>`${e} a supprimé un bloc`,was:`Avant`,undo:`Annuler`,restore:`Rétablir`,keep:`Garder`,count:(e,t)=>`${e} a modifié ${String(t)} ${t<2?`endroit`:`endroits`}`,away:`Modifié depuis votre dernière visite`,countAway:e=>`Depuis votre dernière visite : ${String(e)} ${e<2?`endroit modifié`:`endroits modifiés`}`,keepAll:`Tout garder`,undoAll:`Tout annuler`,next:`Suivant`,previous:`Précédent`,position:(e,t)=>`${String(e)} sur ${String(t)}`},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`}},Fl=new Intl.PluralRules(`hi`),Il={agent:`AllyHub`,review:{changed:e=>`${e} ने इसे बदला`,added:e=>`${e} ने इसे जोड़ा`,removed:e=>`${e} ने एक ब्लॉक हटाया`,was:`पहले`,undo:`पहले जैसा करें`,restore:`वापस लाएँ`,keep:`रखें`,count:(e,t)=>`${e} ने ${String(t)} ${Fl.select(t)===`one`?`जगह`:`जगहों`} पर बदलाव किया`,away:`आपके पिछली बार देखने के बाद बदला गया`,countAway:e=>`आपके पिछली बार देखने के बाद ${String(e)} ${Fl.select(e)===`one`?`जगह`:`जगहों`} पर बदलाव`,keepAll:`सभी रखें`,undoAll:`सभी पहले जैसे करें`,next:`अगला`,previous:`पिछला`,position:(e,t)=>`${String(e)} / ${String(t)}`},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:`इमेज`}},Ll={agent:`AllyHub`,review:{changed:e=>`${e} ha modificato questo`,added:e=>`${e} ha aggiunto questo`,removed:e=>`${e} ha rimosso un blocco`,was:`Prima`,undo:`Annulla`,restore:`Ripristina`,keep:`Mantieni`,count:(e,t)=>`${e} ha modificato ${String(t)} ${t===1?`punto`:`punti`}`,away:`Modificato dall'ultima volta che l'hai visto`,countAway:e=>`Dall'ultima volta che l'hai visto: ${String(e)} ${e===1?`punto modificato`:`punti modificati`}`,keepAll:`Mantieni tutto`,undoAll:`Annulla tutto`,next:`Successivo`,previous:`Precedente`,position:(e,t)=>`${String(e)} di ${String(t)}`},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`}},Rl={agent:`AllyHub`,review:{changed:e=>`${e} が変更`,added:e=>`${e} が追加`,removed:e=>`${e} がブロックを削除`,was:`変更前`,undo:`元に戻す`,restore:`復元`,keep:`残す`,count:(e,t)=>`${e} が ${String(t)} か所を変更しました`,away:`前回の確認以降に変更`,countAway:e=>`前回の確認以降に ${String(e)} か所が変更されました`,keepAll:`すべて残す`,undoAll:`すべて元に戻す`,next:`次へ`,previous:`前へ`,position:(e,t)=>`${String(e)} / ${String(t)}`},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:`画像`}},zl=e=>{let t=e.replace(/[^\p{L}\p{N}]+$/u,``),n=t.charCodeAt(t.length-1);return`${e}${(n>=44032&&n<=55203?(n-44032)%28!=0:/\d$/u.test(t)?/[013678]$/u.test(t):/(ng|[lmnkpt])$/iu.test(t))?`이`:`가`}`},Bl={agent:`AllyHub`,review:{changed:e=>`${zl(e)} 변경함`,added:e=>`${zl(e)} 추가함`,removed:e=>`${zl(e)} 블록을 삭제함`,was:`이전`,undo:`실행 취소`,restore:`되돌리기`,keep:`유지`,count:(e,t)=>`${zl(e)} ${String(t)}곳을 변경함`,away:`마지막으로 본 뒤 변경됨`,countAway:e=>`마지막으로 본 뒤 ${String(e)}곳이 변경됨`,keepAll:`모두 유지`,undoAll:`모두 실행 취소`,next:`다음`,previous:`이전`,position:(e,t)=>`${String(e)} / ${String(t)}`},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:`이미지`}},Vl={agent:`AllyHub`,review:{changed:e=>`O ${e} alterou isto`,added:e=>`O ${e} adicionou isto`,removed:e=>`O ${e} removeu um bloco`,was:`Antes`,undo:`Desfazer`,restore:`Restaurar`,keep:`Manter`,count:(e,t)=>`O ${e} alterou ${String(t)} ${t===1?`trecho`:`trechos`}`,away:`Alterado desde a última vez que você olhou`,countAway:e=>`Desde a última vez que você olhou: ${String(e)} ${e===1?`trecho alterado`:`trechos alterados`}`,keepAll:`Manter tudo`,undoAll:`Desfazer tudo`,next:`Próxima`,previous:`Anterior`,position:(e,t)=>`${String(e)} de ${String(t)}`},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`}},Hl=new Intl.PluralRules(`ru`),Ul=(e,t,n,r)=>{let i=Hl.select(e);return`${String(e)} ${i===`one`?t:i===`many`?r:n}`},Wl=z({en:Ml,"zh-cn":{agent:`AllyHub`,review:{changed:e=>`${e}改了这里`,added:e=>`${e}加了这里`,removed:e=>`${e}删了一块`,was:`之前`,undo:`撤销`,restore:`放回去`,keep:`保留`,count:(e,t)=>`${e}改了 ${String(t)} 处`,away:`你上次查看之后改的`,countAway:e=>`你上次查看之后改了 ${String(e)} 处`,keepAll:`全部保留`,undoAll:`全部撤销`,next:`下一处`,previous:`上一处`,position:(e,t)=>`${String(e)} / ${String(t)}`},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":{agent:`AllyHub`,review:{changed:e=>`${e} 修改了這裡`,added:e=>`${e} 新增了這裡`,removed:e=>`${e} 刪除了一個區塊`,was:`修改前`,undo:`還原`,restore:`放回去`,keep:`保留`,count:(e,t)=>`${e} 修改了 ${String(t)} 處`,away:`你上次查看後有修改`,countAway:e=>`你上次查看後修改了 ${String(e)} 處`,keepAll:`全部保留`,undoAll:`全部還原`,next:`下一處`,previous:`上一處`,position:(e,t)=>`${String(e)} / ${String(t)}`},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:Rl,ko:Bl,es:Nl,fr:Pl,de:jl,it:Ll,pt:Vl,ru:{agent:`AllyHub`,review:{changed:e=>`Изменил ${e}`,added:e=>`Добавил ${e}`,removed:e=>`${e} удалил блок`,was:`Было`,undo:`Отменить`,restore:`Вернуть`,keep:`Оставить`,count:(e,t)=>`${e} изменил ${Ul(t,`место`,`места`,`мест`)}`,away:`Изменено с вашего последнего просмотра`,countAway:e=>`С вашего последнего просмотра изменено ${Ul(e,`место`,`места`,`мест`)}`,keepAll:`Оставить все`,undoAll:`Отменить все`,next:`Следующее`,previous:`Предыдущее`,position:(e,t)=>`${String(e)} из ${String(t)}`},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:{agent:`AllyHub`,review:{changed:e=>`Bunu ${e} değiştirdi`,added:e=>`Bunu ${e} ekledi`,removed:e=>`${e} bir bloğu kaldırdı`,was:`Önce`,undo:`Geri al`,restore:`Geri koy`,keep:`Koru`,count:(e,t)=>`${e} ${String(t)} yeri değiştirdi`,away:`Son baktığınızdan beri değişti`,countAway:e=>`Son baktığınızdan beri ${String(e)} yer değişti`,keepAll:`Tümünü koru`,undoAll:`Tümünü geri al`,next:`Sonraki`,previous:`Önceki`,position:(e,t)=>`${String(e)} / ${String(t)}`},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:{agent:`AllyHub`,review:{changed:e=>`${e} đã sửa chỗ này`,added:e=>`${e} đã thêm chỗ này`,removed:e=>`${e} đã xóa một khối`,was:`Trước đó`,undo:`Hoàn tác`,restore:`Khôi phục`,keep:`Giữ`,count:(e,t)=>`${e} đã sửa ${String(t)} chỗ`,away:`Đã thay đổi từ lần cuối bạn xem`,countAway:e=>`Từ lần cuối bạn xem: ${String(e)} chỗ đã thay đổi`,keepAll:`Giữ tất cả`,undoAll:`Hoàn tác tất cả`,next:`Tiếp`,previous:`Trước`,position:(e,t)=>`${String(e)} / ${String(t)}`},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:{agent:`AllyHub`,review:{changed:e=>`${e} เปลี่ยนส่วนนี้`,added:e=>`${e} เพิ่มส่วนนี้`,removed:e=>`${e} ลบบล็อกหนึ่ง`,was:`ก่อนหน้า`,undo:`เลิกทำ`,restore:`ใส่กลับ`,keep:`เก็บ`,count:(e,t)=>`${e} เปลี่ยน ${String(t)} ตำแหน่ง`,away:`เปลี่ยนไปหลังจากที่คุณดูครั้งล่าสุด`,countAway:e=>`เปลี่ยน ${String(e)} ตำแหน่งหลังจากที่คุณดูครั้งล่าสุด`,keepAll:`เก็บทั้งหมด`,undoAll:`เลิกทำทั้งหมด`,next:`ถัดไป`,previous:`ก่อนหน้า`,position:(e,t)=>`${String(e)} จาก ${String(t)}`},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:Il});function Gl(e){return C(Al,e)}var Kl=e=>e.map(bl),ql=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]);function Jl(e,t,n){let r=Kl(e),i=Kl(t),a=new Map(d(r,i)),o=new Map(d(r,Kl(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,f=-1;n.forEach((e,t)=>{let n=l.get(t);n===void 0?u.set(f,[...u.get(f)??[],e]):f=n});let p=e=>{for(let t=e;t>=0;t--){let e=a.get(t);if(e!==void 0)return e+1}return 0},m=new Map;for(let[e,n]of u){let c=p(e),l=c;for(;l<t.length&&!s.has(l);)l++;if(ql(i.slice(c,l),Kl(n)))continue;let u=e+1<r.length&&!o.has(e+1),d=e>=0&&!a.has(e),f=u||d?l:c;m.set(f,[...m.get(f)??[],...n])}let h=[];for(let e=0;e<=t.length;e++){h.push(...m.get(e)??[]);let n=t[e];n&&!c.has(e)&&h.push(n)}return h}function Yl(e,t){if(!e.some(e=>e.type===`source`))return[...t];let n=new Map(d(Kl(Sl(e)),Kl(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}function Xl(e,t){return m(e,t,bl).reverse().map(t=>{let n=e[t.at-1];return{before:e.slice(t.at,t.at+t.remove),after:t.insert,...t.insert.length===0&&n?{follows:n}:{}}})}var Zl=e=>e.blocks.length===0&&e.problems.length>0,Ql=class{doc;constructor(e){this.doc=Kc(e)}get source(){return this.doc.source}get problems(){return this.doc.problems}get unreadable(){return Zl(this.doc)}lineOf(e){let t=0;for(let n of this.doc.segments){let r=Sl(n.blocks).length;if(e<t+r)return this.doc.source.slice(0,n.start).split(`
59
- `).length;t+=r}}shown(){return Sl(this.doc.blocks)}textFor(e){let t=Yl(this.doc.blocks,e);if(xl(t,this.doc.blocks))return;let n=Cl(this.doc,t);return n===this.doc.source?void 0:n}adopt(e){e!==this.doc.source&&(this.doc=Kc(e))}incoming(e,t){if(e===this.doc.source)return{changes:[]};let n=this.shown(),r=Kc(e);if(this.doc=r,Zl(r))return{changes:[]};let i=Sl(r.blocks),a=Jl(n,t,i);return{...xl(a,t)?{}:{show:a},changes:Xl(n,i)}}},$l=`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] *)`,eu=typeof Element>`u`,tu=eu?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,nu=!eu&&Element.prototype.getRootNode?function(e){return e==null||e.getRootNode==null?void 0:e.getRootNode()}:function(e){return e?.ownerDocument},ru=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]`):ru(e.parentNode))},iu=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`},au=function(e,t,n){if(ru(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll($l));return t&&tu.call(e,$l)&&r.unshift(e),r=r.filter(n),r},ou=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!ru(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=ou(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{tu.call(a,$l)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!ru(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=ou(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},su=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},cu=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||iu(e))&&!su(e)?0:e.tabIndex},lu=function(e,t){var n=cu(e);return n<0&&t&&!su(e)?0:n},uu=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},du=function(e){return e.tagName===`INPUT`},fu=function(e){return du(e)&&e.type===`hidden`},pu=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},mu=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},hu=function(e){if(!e.name)return!0;var t=e.form||nu(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=mu(r,e.form);return!i||i===e},gu=function(e){return du(e)&&e.type===`radio`},_u=function(e){return gu(e)&&!hu(e)},vu=function(e){var t=e&&nu(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=nu(n),n=t?.host,r=!!((o=n)!=null&&(o=o.ownerDocument)!=null&&o.contains(n))}}return r},yu=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},bu=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=tu.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(tu.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=nu(e);if(s&&!s.shadowRoot&&r(s)===!0)return yu(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(vu(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return yu(e);return!1},xu=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 tu.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Su=function(e,t){return!(t.disabled||fu(t)||bu(t,e)||pu(t)||xu(t))},Cu=function(e,t){return!(_u(t)||cu(t)<0||!Su(e,t))},wu=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Tu=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=lu(a,i),s=i?Tu(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(uu).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Eu=function(e,t){return t||={},Tu(t.getShadowRoot?ou([e],t.includeContainer,{filter:Cu.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:wu}):au(e,t.includeContainer,Cu.bind(null,t)))},Du=function(e,t){return t||={},t.getShadowRoot?ou([e],t.includeContainer,{filter:Su.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):au(e,t.includeContainer,Su.bind(null,t))},Ou=function(e,t){if(t||={},!e)throw Error(`No node provided`);return tu.call(e,$l)!==!1&&Cu(t,e)};function ku(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Au(){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 ju(){return/apple/i.test(navigator.vendor)}function Mu(){let e=/android/i;return e.test(ku())||e.test(Au())}function Nu(){return Au().includes(`jsdom/`)}var Pu=`data-floating-ui-focusable`,Fu=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function Iu(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 Lu(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&S(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ru(e){return`composedPath`in e?e.composedPath()[0]:e.target}function zu(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 Bu(e){return e.matches(`html,body`)}function Vu(e){return e?.ownerDocument||document}function Hu(e){return i(e)&&e.matches(Fu)}function Uu(e){return e?e.getAttribute(`role`)===`combobox`&&Hu(e):!1}function Wu(e){return e?e.hasAttribute(Pu)?e:e.querySelector(`[`+Pu+`]`)||e:null}function Gu(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Gu(e,t.id,n)])}function Ku(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 qu(e){e.preventDefault(),e.stopPropagation()}function Ju(e){return`nativeEvent`in e}function Yu(e){return e.mozInputSource===0&&e.isTrusted?!0:Mu()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Xu(e){return Nu()?!1:!Mu()&&e.width===0&&e.height===0||Mu()&&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 Zu(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Qu=typeof document<`u`?q.useLayoutEffect:function(){},$u={...q};function ed(e){let t=q.useRef(e);return Qu(()=>{t.current=e}),t}var td=$u.useInsertionEffect||(e=>e());function nd(e){let t=q.useRef(()=>{});return td(()=>{t.current=e}),q.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var rd=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function id(e,t){let n=Eu(e,rd()),r=n.length;if(r===0)return;let i=Iu(Vu(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function ad(e){return id(Vu(e).body,1)||e}function od(e){return id(Vu(e).body,-1)||e}function sd(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Lu(n,r)}function cd(e){Eu(e,rd()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ld(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 ud=t(r(),1);function dd(e){let t=q.useRef(void 0),n=q.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 q.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var fd=`data-floating-ui-focusable`,pd=`active`,md=`selected`,hd=`ArrowLeft`,gd=`ArrowRight`,_d=`ArrowUp`,vd=`ArrowDown`,yd=[hd,gd],bd=[_d,vd];[...yd,...bd];var xd={...q},Sd=!1,Cd=0,wd=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+Cd++;function Td(){let[e,t]=q.useState(()=>Sd?wd():void 0);return Qu(()=>{e??t(wd())},[]),q.useEffect(()=>{Sd=!0},[]),e}var Ed=xd.useId||Td;function Dd(){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 Od=q.createContext(null),kd=q.createContext(null),Ad=()=>q.useContext(Od)?.id||null,jd=()=>q.useContext(kd);function Md(e){return`data-floating-ui-`+e}function Nd(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Pd=Md(`safe-polygon`);function Fd(e,t,n){if(n&&!Zu(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 Id(e){return typeof e==`function`?e():e}function Ld(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=jd(),m=Ad(),h=ed(l),g=ed(c),_=ed(n),v=ed(d),y=q.useRef(),b=q.useRef(-1),x=q.useRef(),S=q.useRef(-1),C=q.useRef(!0),w=q.useRef(!1),T=q.useRef(()=>{}),E=q.useRef(!1),D=nd(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});q.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Nd(b),Nd(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),q.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=Vu(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=q.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Fd(g.current,`close`,y.current);i&&!x.current?(Nd(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Nd(b),r(!1,e,n))},[g,r]),k=nd(()=>{T.current(),x.current=void 0}),A=nd(()=>{if(w.current){let e=Vu(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Pd),w.current=!1}}),j=nd(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);q.useEffect(()=>{if(!s)return;function e(e){if(Nd(b),C.current=!1,u&&!Zu(y.current)||Id(v.current)>0&&!Fd(g.current,`open`))return;let t=Fd(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=Vu(o.floating);if(Nd(S),E.current=!1,h.current&&i.current.floatingContext){n||Nd(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`&&Lu(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(){Nd(b)}function l(e){j()||O(e,!1)}if(B(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]),Qu(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(B(o.domReference)&&e){var t;let n=Vu(o.floating).body;n.setAttribute(Pd,``);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]),Qu(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),q.useEffect(()=>()=>{k(),Nd(b),Nd(S),A()},[s,o.domReference,k,A]);let M=q.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&&!Zu(y.current)||n||Id(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(Nd(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,Id(v.current))))}}},[u,r,n,_,v]);return q.useMemo(()=>s?{reference:M}:{},[s,M])}var Rd=0;function zd(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Rd);let a=()=>e?.focus({preventScroll:n});i?a():Rd=requestAnimationFrame(a)}function Bd(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&S(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 Hd(e){return e?.ownerDocument||document}var Ud={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Wd(e){return e===`inert`?Ud.inert:e===`aria-hidden`?Ud[`aria-hidden`]:Ud.none}var Gd=new WeakSet,Kd={},qd=0,Jd=()=>typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype;function Yd(e){return e?S(e)?e.host:Yd(e.parentNode):null}var Xd=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Yd(t);return e.contains(n)?n:null}).filter(e=>e!=null);function Zd(e,t,n,r){let i=`data-floating-ui-inert`,a=r?`inert`:n?`aria-hidden`:null,o=Xd(t,e),s=new Set,c=new Set(o),l=[];Kd[i]||(Kd[i]=new WeakMap);let u=Kd[i];o.forEach(d),f(t),s.clear();function d(e){e&&!s.has(e)&&(s.add(e),e.parentNode&&d(e.parentNode))}function f(e){e&&!c.has(e)&&[].forEach.call(e.children,e=>{if(O(e)!==`script`){if(s.has(e))f(e);else{let t=a?e.getAttribute(a):null,n=t!==null&&t!==`false`,r=Wd(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&&Gd.add(e),s===1&&e.setAttribute(i,``),!n&&a&&e.setAttribute(a,a===`inert`?``:`true`)}}})}return qd++,()=>{l.forEach(e=>{let t=Wd(a),n=(t.get(e)||0)-1,r=(u.get(e)||0)-1;t.set(e,n),u.set(e,r),n||(!Gd.has(e)&&a&&e.removeAttribute(a),Gd.delete(e)),r||e.removeAttribute(i)}),qd--,qd||(Ud.inert=new WeakMap,Ud[`aria-hidden`]=new WeakMap,Ud.none=new WeakMap,Gd=new WeakSet,Kd={})}}function Qd(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=Hd(e[0]).body;return Zd(e.concat(Array.from(r.querySelectorAll(`[aria-live],[role="status"],output`))),r,t,n)}var $d={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},ef=q.forwardRef(function(e,t){let[n,r]=q.useState();Qu(()=>{ju()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Md(`focus-guard`)]:``,style:$d};return(0,J.jsx)(`span`,{...e,...i})}),tf={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},nf=q.createContext(null),rf=Md(`portal`);function af(e){e===void 0&&(e={});let{id:t,root:n}=e,r=Ed(),i=sf(),[a,o]=q.useState(null),s=q.useRef(null);return Qu(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),Qu(()=>{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]),Qu(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!_(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 of(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=af({id:n,root:r}),[o,s]=q.useState(null),c=q.useRef(null),l=q.useRef(null),u=q.useRef(null),d=q.useRef(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return q.useEffect(()=>{if(!a||!i||f)return;function e(e){a&&sd(e)&&(e.type===`focusin`?ld:cd)(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]),q.useEffect(()=>{a&&(p||ld(a))},[p,a]),(0,J.jsxs)(nf.Provider,{value:q.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&(0,J.jsx)(ef,{"data-type":`outside`,ref:c,onFocus:e=>{if(sd(e,a)){var t;(t=u.current)==null||t.focus()}else od(o?o.domReference:null)?.focus()}}),m&&a&&(0,J.jsx)(`span`,{"aria-owns":a.id,style:tf}),a&&ud.createPortal(t,a),m&&a&&(0,J.jsx)(ef,{"data-type":`outside`,ref:l,onFocus:e=>{if(sd(e,a)){var t;(t=d.current)==null||t.focus()}else ad(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var sf=()=>q.useContext(nf);function cf(e){return q.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}var lf=20,uf=[];function df(){uf=uf.filter(e=>e.deref()?.isConnected)}function ff(e){df(),e&&O(e)!==`body`&&(uf.push(new WeakRef(e)),uf.length>lf&&(uf=uf.slice(-20)))}function pf(){return df(),uf[uf.length-1]?.deref()}function mf(e){let t=rd();return Ou(e,t)?e:Eu(e,t)[0]||e}function hf(e,t){var n;if(!t.current.includes(`floating`)&&!((n=e.getAttribute(`role`))!=null&&n.includes(`dialog`)))return;let r=rd(),i=Du(e,r).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ou(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 gf=q.forwardRef(function(e,t){return(0,J.jsx)(`button`,{...e,type:`button`,ref:t,tabIndex:-1,style:$d})});function _f(e){let{context:t,children:n,disabled:r=!1,order:a=[`content`],guards:o=!0,initialFocus:s=0,returnFocus:c=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:f=!0,outsideElementsInert:p=!1,getInsideElements:m=()=>[]}=e,{open:h,onOpenChange:g,events:_,dataRef:v,elements:{domReference:y,floating:b}}=t,x=nd(()=>v.current.floatingContext?.nodeId),S=nd(m),C=typeof s==`number`&&s<0,w=Uu(y)&&C,T=Jd(),E=!T||o,D=!E||T&&p,O=ed(a),k=ed(s),A=ed(c),j=jd(),M=sf(),N=q.useRef(null),P=q.useRef(null),F=q.useRef(!1),I=q.useRef(!1),L=q.useRef(-1),R=q.useRef(-1),z=M!=null,B=Wu(b),ee=nd(function(e){return e===void 0&&(e=B),e?Eu(e,rd()):[]}),te=nd(e=>{let t=ee(e);return O.current.map(e=>y&&e===`reference`?y:B&&e===`floating`?B:t).filter(Boolean).flat()});q.useEffect(()=>{if(r||!u)return;function e(e){if(e.key===`Tab`){Lu(B,Iu(Vu(B)))&&ee().length===0&&!w&&qu(e);let t=te(),n=Ru(e);O.current[0]===`reference`&&n===y&&(qu(e),e.shiftKey?zd(t[t.length-1]):zd(t[1])),O.current[1]===`floating`&&n===B&&e.shiftKey&&(qu(e),zd(t[0]))}}let t=Vu(B);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,y,B,u,O,w,ee,te]),q.useEffect(()=>{if(r||!b)return;function e(e){let t=Ru(e),n=ee().indexOf(t);n!==-1&&(L.current=n)}return b.addEventListener(`focusin`,e),()=>{b.removeEventListener(`focusin`,e)}},[r,b,ee]),q.useEffect(()=>{if(r||!f)return;function e(){I.current=!0,setTimeout(()=>{I.current=!1})}function t(e){let t=e.relatedTarget,n=e.currentTarget,r=Ru(e);queueMicrotask(()=>{let a=x(),o=!(Lu(y,t)||Lu(b,t)||Lu(t,b)||Lu(M?.portalNode,t)||t!=null&&t.hasAttribute(Md(`focus-guard`))||j&&(Gu(j.nodesRef.current,a).find(e=>Lu(e.context?.elements.floating,t)||Lu(e.context?.elements.domReference,t))||Ku(j.nodesRef.current,a).find(e=>[e.context?.elements.floating,Wu(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===y&&B&&hf(B,O),l&&n!==y&&!(r!=null&&r.isConnected)&&Iu(Vu(B))===Vu(B).body){i(B)&&B.focus();let e=L.current,t=ee(),n=t[e]||t[t.length-1]||B;i(n)&&n.focus()}v.current.insideReactTree?v.current.insideReactTree=!1:(w||!u)&&t&&o&&!I.current&&t!==pf()&&(F.current=!0,g(!1,e,`focus-out`))})}let n=!(j||!M);function a(){Nd(R),v.current.insideReactTree=!0,R.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(b&&i(y))return y.addEventListener(`focusout`,t),y.addEventListener(`pointerdown`,e),b.addEventListener(`focusout`,t),n&&b.addEventListener(`focusout`,a,!0),()=>{y.removeEventListener(`focusout`,t),y.removeEventListener(`pointerdown`,e),b.removeEventListener(`focusout`,t),n&&b.removeEventListener(`focusout`,a,!0)}},[r,y,b,B,u,j,M,g,f,l,ee,w,x,O,v]);let ne=q.useRef(null),re=q.useRef(null),ie=cf([ne,M?.beforeInsideRef]),ae=cf([re,M?.afterInsideRef]);q.useEffect(()=>{var e,t;if(r||!b)return;let n=Array.from((M==null||(e=M.portalNode)==null?void 0:e.querySelectorAll(`[`+Md(`portal`)+`]`))||[]),i=(t=(j?Ku(j.nodesRef.current,x()):[]).find(e=>Uu(e.context?.elements.domReference||null)))==null||(t=t.context)==null?void 0:t.elements.domReference,a=[b,i,...n,...S(),N.current,P.current,ne.current,re.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,O.current.includes(`reference`)||w?y:null].filter(e=>e!=null),o=u||w?Qd(a,!D,D):Qd(a);return()=>{o()}},[r,y,b,u,O,M,w,E,D,j,x,S]),Qu(()=>{if(r||!i(B))return;let e=Iu(Vu(B));queueMicrotask(()=>{let t=te(B),n=k.current,r=(typeof n==`number`?t[n]:n.current)||B,i=Lu(B,e);!C&&!i&&h&&zd(r,{preventScroll:r===B})})},[r,h,B,C,te,k]),Qu(()=>{if(r||!B)return;let e=Vu(B);ff(Iu(e));function t(e){let{reason:t,event:n,nested:r}=e;if([`hover`,`safe-polygon`].includes(t)&&n.type===`mouseleave`&&(F.current=!0),t===`outside-press`){if(r)F.current=!1;else if(Yu(n)||Xu(n))F.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?F.current=!1:F.current=!0}}}_.on(`openchange`,t);let n=e.createElement(`span`);n.setAttribute(`tabindex`,`-1`),n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,$d),z&&y&&y.insertAdjacentElement(`afterend`,n);function a(){if(typeof A.current==`boolean`){let e=y||pf();return e&&e.isConnected?e:n}return A.current.current||n}return()=>{_.off(`openchange`,t);let r=Iu(e),o=Lu(b,r)||j&&Gu(j.nodesRef.current,x(),!1).some(e=>Lu(e.context?.elements.floating,r)),s=a();queueMicrotask(()=>{let t=mf(s);A.current&&!F.current&&i(t)&&(t===r||r===e.body||o)&&t.focus({preventScroll:!0}),n.remove()})}},[r,b,B,A,v,_,j,z,y,x]),q.useEffect(()=>(queueMicrotask(()=>{F.current=!1}),()=>{queueMicrotask(df)}),[r]),Qu(()=>{if(!r&&M)return M.setFocusManagerState({modal:u,closeOnFocusOut:f,open:h,onOpenChange:g,domReference:y}),()=>{M.setFocusManagerState(null)}},[r,M,u,h,g,f,y]),Qu(()=>{r||B&&hf(B,O)},[r,B,O]);function V(e){return r||!d||!u?null:(0,J.jsx)(gf,{ref:e===`start`?N:P,onClick:e=>g(!1,e.nativeEvent),children:typeof d==`string`?d:`Dismiss`})}let oe=!r&&E&&(!u||!w)&&(z||u);return(0,J.jsxs)(J.Fragment,{children:[oe&&(0,J.jsx)(ef,{"data-type":`inside`,ref:ie,onFocus:e=>{if(u){let e=te();zd(a[0]===`reference`?e[0]:e[e.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode){if(F.current=!1,sd(e,M.portalNode))ad(y)?.focus();else{var t;(t=M.beforeOutsideRef.current)==null||t.focus()}}}}),!w&&V(`start`),n,V(`end`),oe&&(0,J.jsx)(ef,{"data-type":`inside`,ref:ae,onFocus:e=>{if(u)zd(te()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode){if(f&&(F.current=!0),sd(e,M.portalNode))od(y)?.focus();else{var t;(t=M.afterOutsideRef.current)==null||t.focus()}}}})]})}var vf={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},yf={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},bf=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function xf(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:a,dataRef:o}=e,{enabled:s=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:p=`pointerdown`,referencePress:m=!1,referencePressEvent:h=`pointerdown`,ancestorScroll:g=!1,bubbles:_,capture:v}=t,y=jd(),b=nd(typeof f==`function`?f:()=>!1),x=typeof f==`function`?b:f,S=q.useRef(!1),{escapeKey:C,outsidePress:w}=bf(_),{escapeKey:T,outsidePress:E}=bf(v),D=q.useRef(!1),O=nd(e=>{if(!n||!s||!d||e.key!==`Escape`||D.current)return;let t=o.current.floatingContext?.nodeId,i=y?Gu(y.nodesRef.current,t):[];if(!C&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}r(!1,Ju(e)?e.nativeEvent:e,`escape-key`)}),k=nd(e=>{var t;let n=()=>{var t;O(e),(t=Ru(e))==null||t.removeEventListener(`keydown`,n)};(t=Ru(e))==null||t.addEventListener(`keydown`,n)}),A=nd(e=>{let t=o.current.insideReactTree;o.current.insideReactTree=!1;let n=S.current;if(S.current=!1,p===`click`&&n||t||typeof x==`function`&&!x(e))return;let s=Ru(e),l=`[`+Md(`inert`)+`]`,u=Vu(a.floating).querySelectorAll(l),d=B(s)?s:null;for(;d&&!R(d);){let e=c(d);if(R(e)||!B(e))break;d=e}if(u.length&&B(s)&&!Bu(s)&&!Lu(s,a.floating)&&Array.from(u).every(e=>!Lu(d,e)))return;if(i(s)&&N){let t=R(s),n=V(s),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),o=i&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,c=a&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=o&&e.offsetY>s.clientHeight;if(u||d)return}let f=o.current.floatingContext?.nodeId,m=y&&Gu(y.nodesRef.current,f).some(t=>zu(e,t.context?.elements.floating));if(zu(e,a.floating)||zu(e,a.domReference)||m)return;let h=y?Gu(y.nodesRef.current,f):[];if(h.length>0){let e=!0;if(h.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r(!1,e,`outside-press`)}),j=nd(e=>{var t;let n=()=>{var t;A(e),(t=Ru(e))==null||t.removeEventListener(p,n)};(t=Ru(e))==null||t.addEventListener(p,n)});q.useEffect(()=>{if(!n||!s)return;o.current.__escapeKeyBubbles=C,o.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function i(){window.clearTimeout(e),D.current=!0}function c(){e=window.setTimeout(()=>{D.current=!1},u()?5:0)}let f=Vu(a.floating);d&&(f.addEventListener(`keydown`,T?k:O,T),f.addEventListener(`compositionstart`,i),f.addEventListener(`compositionend`,c)),x&&f.addEventListener(p,E?j:A,E);let m=[];return g&&(B(a.domReference)&&(m=l(a.domReference)),B(a.floating)&&(m=m.concat(l(a.floating))),!B(a.reference)&&a.reference&&a.reference.contextElement&&(m=m.concat(l(a.reference.contextElement)))),m=m.filter(e=>e!==f.defaultView?.visualViewport),m.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{d&&(f.removeEventListener(`keydown`,T?k:O,T),f.removeEventListener(`compositionstart`,i),f.removeEventListener(`compositionend`,c)),x&&f.removeEventListener(p,E?j:A,E),m.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[o,a,d,x,p,n,r,g,s,C,w,O,T,k,A,E,j]),q.useEffect(()=>{o.current.insideReactTree=!1},[o,x,p]);let M=q.useMemo(()=>({onKeyDown:O,...m&&{[vf[h]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...h!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[O,r,m,h]),N=q.useMemo(()=>{function e(e){e.button===0&&(S.current=!0)}return{onKeyDown:O,onMouseDown:e,onMouseUp:e,[yf[p]]:()=>{o.current.insideReactTree=!0}}},[O,p,o]);return q.useMemo(()=>s?{reference:M,floating:N}:{},[s,M,N])}function Sf(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Ed(),a=q.useRef({}),[o]=q.useState(()=>Dd()),s=Ad()!=null,[c,l]=q.useState(r.reference),u=nd((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=q.useMemo(()=>({setPositionReference:l}),[]),f=q.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return q.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Cf(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=Sf({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=q.useState(null),[l,u]=q.useState(null),d=o?.domReference||s,f=q.useRef(null),p=jd();Qu(()=>{d&&(f.current=d)},[d]);let m=oe({...n,elements:{...o,...l&&{reference:l}}}),h=q.useCallback(e=>{let t=B(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=q.useCallback(e=>{(B(e)||e===null)&&(f.current=e,c(e)),(B(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!B(e))&&m.refs.setReference(e)},[m.refs]),_=q.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=q.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=q.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return Qu(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),q.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function wf(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[pd]:t,[md]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[fd]:``},...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&&[pd,md].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 Tf(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=q.useCallback(t=>wf(t,e,`reference`),t),a=q.useCallback(t=>wf(t,e,`floating`),n),o=q.useCallback(t=>wf(t,e,`item`),r);return q.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Ef=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e.toLowerCase());function Df(e,t){return typeof e==`function`?e(t):e}function Of(e,t){let[n,r]=q.useState(e);return e&&!n&&r(!0),q.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}function kf(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]=q.useState(`unmounted`),c=Of(n,a);return!c&&o===`close`&&s(`unmounted`),Qu(()=>{if(r){if(n){s(`initial`);let e=requestAnimationFrame(()=>{ud.flushSync(()=>{s(`open`)})});return()=>{cancelAnimationFrame(e)}}s(`close`)}},[n,r]),{isMounted:c,status:o}}function Af(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=q.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]=q.useState(()=>({...Df(a,l),...Df(n,l)})),{isMounted:h,status:g}=kf(e,{duration:o}),_=ed(n),v=ed(r),y=ed(i),b=ed(a);return Qu(()=>{let e=Df(_.current,l),t=Df(y.current,l),n=Df(b.current,l),r=Df(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(Ef).join(`,`),transitionDuration:d+`ms`,...n,...r}),g===`close`){let r=t||e;m({transitionProperty:Object.keys(r).map(Ef).join(`,`),transitionDuration:f+`ms`,...n,...r})}},[f,y,_,v,b,d,g,l]),{isMounted:h,styles:p}}function jf(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...jf(e,t.id,n)])}function Mf(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 Nf(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Pf(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(){Nd(i),u()}if(Nd(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=Vd(e),v=e.type===`mouseleave`,y=Bd(c.floating,_),b=Bd(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=Nf(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&&B(e.relatedTarget)&&Bd(c.floating,e.relatedTarget)||f&&jf(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(!Mf([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()}Mf([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var Ff=n((e=>{var t=F();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,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),If=n(((e,t)=>{t.exports=Ff()})),Lf=n((e=>{var t=F(),n=If();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Rf=n(((e,t)=>{t.exports=Lf()})),zf=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}})),Bf=Rf(),Vf=t(zf(),1),Hf=Object.defineProperty,Uf=(e,t)=>{let n={};for(var r in e)Hf(n,r,{get:e[r],enumerable:!0});return t||Hf(n,Symbol.toStringTag,{value:`Module`}),n};function Wf(e){this.content=e}Wf.prototype={constructor:Wf,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Wf(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Wf(n)},addToStart:function(e,t){return new Wf([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Wf(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Wf(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Wf.from(e),e.size?new Wf(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Wf.from(e),e.size?new Wf(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Wf.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Wf.from=function(e){if(e instanceof Wf)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Wf(t)};function Gf(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a)n+=i.nodeSize;else{if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r<e.length&&r<t.length&&Jf(e.charCodeAt(r-1))&&qf(e.charCodeAt(r))&&n--,n}if(i.content.size||a.content.size){let e=Gf(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}}function Kf(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s)n-=c,r-=c;else{if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,i=e.length,a=t.length;for(;i>0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i<e.length&&Jf(e.charCodeAt(i-1))&&qf(e.charCodeAt(i))&&(n++,r++),{a:n,b:r}}if(o.content.size||s.content.size){let e=Kf(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}}function qf(e){return e>=56320&&e<57344}function Jf(e){return e>=55296&&e<56320}var Y=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return Gf(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Kf(this,e,t,n)}findIndex(e){if(e==0)return Xf(0,e);if(e==this.size)return Xf(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?Xf(t+1,i):Xf(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};Y.empty=new Y([],0);var Yf={index:0,offset:0};function Xf(e,t){return Yf.index=e,Yf.offset=t,Yf}function Zf(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!Zf(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Zf(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var Qf=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Zf(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};Qf.none=[];var $f=class extends Error{},X=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=tp(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ep(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(Y.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};X.empty=new X(Y.empty,0,0);function ep(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(ep(a.content,t-i-1,n-i-1)))}function tp(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=tp(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function np(e,t,n){if(n.openStart>e.depth)throw new $f(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new $f(`Inconsistent open depths`);return rp(e,t,n,0)}function rp(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=rp(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}if(!n.content.size)return cp(a,up(e,t,r));if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return cp(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}{let{start:i,end:o}=dp(n,e);return cp(a,lp(e,i,o,t,r))}}function ip(e,t){if(!t.type.compatibleContent(e.type))throw new $f(`Cannot join `+t.type.name+` onto `+e.type.name)}function ap(e,t,n){let r=e.node(n);return ip(r,t.node(n)),r}function op(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function sp(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(op(e.nodeAfter,r),a++));for(let e=a;e<o;e++)op(i.child(e),r);t&&t.depth==n&&t.textOffset&&op(t.nodeBefore,r)}function cp(e,t){if(!e.type.validContent(t))throw new $f(`Invalid content for node `+e.type.name);return e.copy(t)}function lp(e,t,n,r,i){let a=e.depth>i&&ap(e,t,i+1),o=r.depth>i&&ap(n,r,i+1),s=[];return sp(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(ip(a,o),op(cp(a,lp(e,t,n,r,i+1)),s)):(a&&op(cp(a,up(e,t,i+1)),s),sp(t,n,i,s),o&&op(cp(o,up(n,r,i+1)),s)),sp(r,null,i,s),new Y(s)}function up(e,t,n){let r=[];return sp(null,e,n,r),e.depth>n&&op(cp(ap(e,t,n+1),up(e,t,n+1)),r),sp(t,null,n,r),new Y(r)}function dp(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(Y.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var fp=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Qf.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive!==!1||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive!==!1||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new gp(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=hp.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else hp.set(t,r=new pp);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%mp,i}},pp=class{constructor(){this.elts=[],this.i=0}},mp=12,hp=new WeakMap,gp=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},_p=Object.create(null),vp=class e{constructor(e,t,n,r=Qf.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||Y.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Zf(this.attrs,t||e.defaultAttrs||_p)&&Qf.sameSet(this.marks,n||Qf.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return X.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new X(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return np(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return fp.resolveCached(this,e)}resolveNoCache(e){return fp.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),bp(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=Y.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),xp(this.type.attrs,this.attrs,`node`,this.type.name);let e=Qf.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];xp(n.type.attrs,n.attrs,`mark`,n.type.name),e=n.addToSet(e)}if(!Qf.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=Y.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};vp.prototype.text=void 0;var yp=class e extends vp{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bp(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function bp(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function xp(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var Sp=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Cp(t,n);if(r.next==null)return e.empty;let i=wp(r);r.next&&r.err(`Unexpected trailing text`);let a=Pp(jp(i));return Fp(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return Y.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];a.isLeaf||a.hasRequiredAttrs()||a.name in t||r.type&&!o.validEnd||(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
60
- `)}};Sp.empty=new Sp(!0);var Cp=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function wp(e){let t=[];do t.push(Tp(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function Tp(e){let t=[];do t.push(Ep(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function Ep(e){let t=Ap(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=Op(e,t);else break;return t}function Dp(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function Op(e,t){let n=Dp(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:Dp(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function kp(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function Ap(e){if(e.eat(`(`)){let t=wp(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=kp(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function jp(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function Mp(e,t){return t-e}function Np(e,t){let n=[];return r(t),n.sort(Mp);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Pp(e){let t=Object.create(null);return n(Np(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);Np(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new Sp(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(Mp);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function Fp(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function Ip(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Lp(e,t){let n=Object.create(null);for(let r in e){let i=e[r],a=t&&t[r];if(a===void 0){if(i.hasDefault)a=i.default;else throw RangeError(`No value supplied for attribute `+r)}else i.validate&&i.validate(a);n[r]=a}return n}function Rp(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Vp(e,r,t[r]);return n}var zp=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=Rp(e,n.attrs),this.defaultAttrs=Ip(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Sp.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Lp(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new vp(this,this.computeAttrs(e),Y.from(t),Qf.setFrom(n))}createChecked(e=null,t,n){return t=Y.from(t),this.checkContent(t),new vp(this,this.computeAttrs(e),t,Qf.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=Y.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(Y.empty,!0);return i?new vp(this,e,t.append(i),Qf.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:Qf.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function Bp(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var Vp=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?Bp(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},Hp=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Rp(e,r.attrs),this.excluded=null;let i=Ip(this.attrs);this.instance=i?new Qf(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Qf(this,Lp(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}},Up=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Wf.from(e.nodes),t.marks=Wf.from(e.marks||{}),this.nodes=zp.compile(this.spec.nodes,this),this.marks=Hp.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=Sp.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?Wp(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:Wp(this,n.split(` `))}this.nodeFromJSON=e=>vp.fromJSON(this,e),this.markFromJSON=e=>Qf.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof zp))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new yp(n,n.defaultAttrs,e,Qf.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function Wp(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function Gp(e){return e.tag!=null}function Kp(e){return e.style!=null}var qp=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(Gp(e))this.tags.push(e);else if(Kp(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new nm(this,t,!1);return n.addAll(e,Qf.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new nm(this,t,!0);return n.addAll(e,Qf.none,t.from,t.to),X.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(im(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=am(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=am(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},Jp={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Yp={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Xp={ol:!0,ul:!0},Zp=1,Qp=2,$p=4;function em(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?Zp:0)|(t===`full`?Qp:0)}var tm=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=Qf.none,this.match=i||(a&$p?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Y.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Zp)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=Y.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Y.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Jp.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},nm=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=em(null,t.preserveWhitespace,0)|(n?$p:0);i=r?new tm(r.type,r.attrs,Qf.none,!0,t.topMatch||r.type.contentMatch,a):n?new tm(null,null,Qf.none,!0,null,a):new tm(e.schema.topNodeType,null,Qf.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&Qp?`full`:this.localPreserveWS||(r.options&Zp)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
61
- `);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));n=``}else n=n.replace(/\r?\n|\r/g,` `);n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;Xp.hasOwnProperty(a)&&this.parser.normalizeLists&&rm(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:Yp.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(Jp.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
62
- `),t)}ignoreFallback(e,t){e.nodeName!=`BR`||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node){if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=Qf.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):om(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=em(e,i,a.options);a.options&$p&&a.content.length==0&&(o|=$p);let s=Qf.none;return n=n.filter(t=>!(a.type?a.type.allowsMarkType(t.type):om(t.type,e))||(s=t.addToSet(s),!1)),this.nodes.push(new tm(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=Zp);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function rm(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&Xp.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function im(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function am(e){let t={};for(let n in e)t[n]=e[n];return t}function om(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var sm=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=lm(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name])a++;else{if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return lm(t).createTextNode(e.text);let{dom:n,contentDOM:r}=pm(lm(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&pm(lm(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t==`string`?{dom:e.createTextNode(t)}:pm(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=cm(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return cm(e.marks)}};function cm(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function lm(e){return e.document||window.document}var um=new WeakMap;function dm(e){let t=um.get(e);return t===void 0&&um.set(e,t=fm(e)),t}function fm(e){let t=null;function n(e){if(e&&typeof e==`object`){if(Array.isArray(e)){if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t])}else for(let t in e)n(e[t])}}return n(e),t}function pm(e,t,n,r){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=dm(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}if(typeof a==`string`)c.appendChild(e.createTextNode(a));else{let{dom:t,contentDOM:i}=pm(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var mm=65535,hm=2**16;function gm(e,t){return e+t*hm}function _m(e){return e&mm}function vm(e){return(e-(e&mm))/hm}var ym=1,bm=2,xm=4,Sm=8,Cm=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Sm)>0}get deletedBefore(){return(this.delInfo&5)>0}get deletedAfter(){return(this.delInfo&6)>0}get deletedAcross(){return(this.delInfo&xm)>0}},wm=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=_m(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+vm(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:gm(o/3,e-s),f=0;return c&&(f|=e==s?bm:e==u?ym:xm,(t<0?e!=s:e!=u)&&(f|=Sm)),new Cm(a,f,d)}r+=l-c}return n?e+r:new Cm(e+r,0,null)}touches(e,t){let n=0,r=_m(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};wm.empty=new wm([]);var Tm=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new Cm(e,r,null)}},Em=Object.create(null),Dm=class{getMap(){return wm.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=Em[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Em)throw RangeError(`Duplicate use of step JSON ID `+e);return Em[e]=t,t.prototype.jsonID=e,t}},Om=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof $f)return e.fail(t.message);throw t}}};function km(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(km(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return Y.fromArray(r)}var Am=class e extends Dm{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new X(km(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return Om.fromReplace(e,this.from,this.to,i)}invert(t){let n=[];return t.nodesBetween(this.from,this.to,(t,r)=>{if(t.isInline&&t.isAtom){let i=this.mark.addToSet(t.marks);if(!Qf.sameSet(i,t.marks)){let a=Math.max(this.from,r),o=Math.min(this.to,r+t.nodeSize);Mm(jm,a,o,this.mark,n);for(let r of t.marks)r.isInSet(i)||Mm(e,a,o,r,n)}}}),n.length==1?n[0]:new Nm(n)}map(t){let n=t.map(this.from,1),r=t.map(this.to,-1);return n>=r?null:new e(n,r,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Dm.jsonID(`addMark`,Am);var jm=class e extends Dm{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new X(km(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return Om.fromReplace(e,this.from,this.to,n)}invert(e){let t=[];return e.nodesBetween(this.from,this.to,(e,n)=>{e.isInline&&e.isAtom&&this.mark.isInSet(e.marks)&&Mm(Am,Math.max(this.from,n),Math.min(this.to,n+e.nodeSize),this.mark,t)}),t.length==1?t[0]:new Nm(t)}map(t){let n=t.map(this.from,1),r=t.map(this.to,-1);return n>=r?null:new e(n,r,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Dm.jsonID(`removeMark`,jm);function Mm(e,t,n,r,i){let a=i.length?i[i.length-1]:null;a&&a instanceof e&&a.to==t&&a.mark.eq(r)?i[i.length-1]=new e(a.from,n,r):i.push(new e(t,n,r))}var Nm=class e extends Dm{constructor(e){super(),this.steps=e}apply(e){for(let t of this.steps){let n=t.apply(e);if(!n.doc)return n;e=n.doc}return new Om(e,null)}invert(t){return new e(this.steps.map(e=>e.invert(t)))}map(t){let n=[];for(let e of this.steps){let r=e.map(t);r&&n.push(r)}return n.length?new e(n):null}toJSON(){return{stepType:`markSet`,steps:this.steps.map(e=>e.toJSON())}}static fromJSON(t,n){if(!Array.isArray(n.steps)||!n.steps.every(e=>e.stepType==`addMark`||e.stepType==`removeMark`))throw RangeError(`Invalid JSON for MarkSetStep`);return new e(n.steps.map(e=>Dm.fromJSON(t,e)))}};Dm.jsonID(`markSet`,Nm);var Pm=class e extends Dm{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Om.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Om.fromReplace(e,this.pos,this.pos+1,new X(Y.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new Fm(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Dm.jsonID(`addNodeMark`,Pm);var Fm=class e extends Dm{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Om.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Om.fromReplace(e,this.pos,this.pos+1,new X(Y.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Pm(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Dm.jsonID(`removeNodeMark`,Fm);var Im=class e extends Dm{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&Rm(e,this.from,this.to)?Om.fail(`Structure replace would overwrite content`):Om.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new wm([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?X.empty:new X(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?X.empty:new X(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,X.fromJSON(t,n.slice),!!n.structure)}};Im.MAP_BIAS=1,Dm.jsonID(`replace`,Im);var Lm=class e extends Dm{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(Rm(e,this.from,this.gapFrom)||Rm(e,this.gapTo,this.to)))return Om.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Om.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?Om.fromReplace(e,this.from,this.to,n):Om.fail(`Content does not fit in gap`)}getMap(){return new wm([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,X.fromJSON(t,n.slice),n.insert,!!n.structure)}};Dm.jsonID(`replaceAround`,Lm);function Rm(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function zm(e,t,n,r){let i=[];e.doc.nodesBetween(t,n,(e,a,o)=>{if(!e.isInline)return;let s=e.marks;!r.isInSet(s)&&o.type.allowsMarkType(r.type)&&Mm(Am,Math.max(a,t),Math.min(a+e.nodeSize,n),r,i)}),i.forEach(t=>e.step(t))}function Bm(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline||!e.isAtom)return;a++;let s=null;if(r instanceof Hp){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new jm(t.from,t.to,t.style)))}function Vm(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new Im(s,l,X.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new jm(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new X(Y.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new Im(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(Y.empty,!0);e.replace(s,s,new X(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function Hm(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Um(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!Hm(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function Wm(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=Y.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=Y.from(r.node(e).copy(u)),d++):c--;let f=Y.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=Y.from(i.node(e).copy(f)),p++):l++;e.step(new Lm(c,l,o,s,new X(u.append(f),d,p),u.size-d,!0))}function Gm(e,t,n=null,r=e){let i=qm(e,t),a=i&&Jm(r,t);return a?i.map(Km).concat({type:t,attrs:n}).concat(a.map(Km)):null}function Km(e){return{type:e,attrs:null}}function qm(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function Jm(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function Ym(e,t,n){let r=Y.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=Y.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new Lm(i,a,i,a,new X(r,0,0),n.length,!0))}function Xm(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&$m(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&Qm(e,t,n,a),Vm(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new Lm(c,l,c+1,l-1,new X(Y.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&Zm(e,t,n,a),!1}})}function Zm(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function Qm(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
63
- `))}})}function $m(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function eh(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new Lm(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new X(Y.from(o),0,0),1,!0))}function th(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function nh(e,t,n=1,r){let i=e.doc.resolve(t),a=Y.empty,o=Y.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=Y.from(i.node(e).copy(a));let t=r&&r[s];o=Y.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new Im(t,t,new X(a.append(o),n,n),!0))}function rh(e,t){let n=e.resolve(t),r=n.index();return ah(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ih(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function ah(e,t){return!!(e&&t&&!e.isLeaf&&ih(e,t))}function oh(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,a,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(e+1),o++,a=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),a=r.node(e+1)),i&&!i.isTextblock&&ah(i,a)&&r.node(e).canReplace(o,o+1))return t;if(e==0)break;t=n<0?r.before(e):r.after(e)}}function sh(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);Qm(e,r.node(),r.before(),s)}o.inlineContent&&Vm(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new Im(l,c.map(t+n,-1),X.empty,!0)),r===!0){let t=e.doc.resolve(l);Zm(e,t.node(),t.before(),e.steps.length)}return e}function ch(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function lh(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(n.openStart==0&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+ +(n>0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function uh(e,t,n=t,r=X.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return dh(i,a,r)?new Im(t,n,r):new fh(i,a,r).fit()}function dh(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var fh=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Y.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=Y.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new X(i,a,o);return e>-1?new Lm(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new Im(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=hh(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore(Y.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced;return bh(e,-1)<=t?!1:(this.unplaced.size>1&&bh(e,1)>n&&n++,this.unplaced=new X(e,t+1,n),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=hh(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new X(ph(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new X(ph(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let a=this.unplaced,o=n?n.content:a.content,s=a.openStart-e,c=0,l=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));u=u.matchFragment(r)}let f=o.size+e-(a.content.size-a.openEnd);for(;c<o.childCount;){let e=o.child(c),t=u.matchType(e.type);if(!t)break;c++,(c>1||s==0||e.content.size)&&(u=t,l.push(gh(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=mh(this.placed,t,Y.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=o;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?e==0?X.empty:new X(ph(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new X(ph(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!_h(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=_h(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=_h(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=mh(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=mh(this.placed,this.depth,Y.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(Y.empty,!0);e.childCount&&(this.placed=mh(this.placed,this.frontier.length,e))}};function ph(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ph(e.firstChild.content,t-1,n)))}function mh(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(mh(e.lastChild.content,t-1,n)))}function hh(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function gh(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,gh(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Y.empty,!0)))),e.copy(r)}function _h(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!vh(n,a.content,o)?s:null}function vh(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function yh(e){return e.spec.defining||e.spec.definingForContent}function bh(e,t){for(let n=0;;n++){let r=t<0?e.firstChild:e.lastChild;if(!r||r.isAtom)return n;e=r.content}}function xh(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(dh(i,a,r))return e.step(new Im(t,n,r));let o=Th(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=yh(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t<o.length;t++){let l=o[(t+c)%o.length],u=!0;l<0&&(u=!1,l=-l);let f=i.node(l-1),p=i.index(l-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(l),u?a.after(l):n,new X(Sh(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=o.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function Sh(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(Sh(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(Y.empty,!0))}return e}function Ch(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=ch(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new X(Y.from(r),0,0))}function wh(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let a=r.sharedDepth(n),o=!1;for(let e=r.depth;e>a;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>a;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let a=Th(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&n==0||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function Th(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var Eh=class e extends Dm{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return Om.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return Om.fromReplace(e,this.pos,this.pos+1,new X(Y.from(r),0,+!t.isLeaf))}getMap(){return wm.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};Dm.jsonID(`attr`,Eh);var Dh=class e extends Dm{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return Om.ok(n)}getMap(){return wm.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};Dm.jsonID(`docAttr`,Dh);var Oh=class extends Error{};Oh=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},Oh.prototype=Object.create(Error.prototype),Oh.prototype.constructor=Oh,Oh.prototype.name=`TransformError`;var kh=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Tm}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Oh(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,a)=>{e=Math.min(e,i),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=X.empty){let r=uh(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new X(Y.from(n),0,0))}delete(e,t){return this.replace(e,t,X.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return xh(this,e,t,n),this}replaceRangeWith(e,t,n){return Ch(this,e,t,n),this}deleteRange(e,t){return wh(this,e,t),this}lift(e,t){return Wm(this,e,t),this}join(e,t=1){return sh(this,e,t),this}wrap(e,t){return Ym(this,e,t),this}setBlockType(e,t=e,n,r=null){return Xm(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return eh(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new Eh(e,t,n)),this}setDocAttribute(e,t){return this.step(new Dh(e,t)),this}addNodeMark(e,t){return this.step(new Pm(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof Qf)t.isInSet(n.marks)&&this.step(new Fm(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new Fm(e,i)),r=i.removeFromSet(r);for(let e=a.length-1;e>=0;e--)this.step(a[e])}return this}split(e,t=1,n){return nh(this,e,t,n),this}addMark(e,t,n){return zm(this,e,t,n),this}removeMark(e,t,n){return Bm(this,e,t,n),this}clearIncompatible(e,t,n){return Vm(this,e,t,n),this}},Ah=Object.create(null),jh=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Mh(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=X.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:s,$to:c}=a[o],l=e.mapping.slice(i);e.replaceRange(l.map(s.pos),l.map(c.pos),o?X.empty:t),o==0&&Vh(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){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),c=s.map(a.pos),l=s.map(o.pos);i?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),Vh(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new Z(e):Bh(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?Bh(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):Bh(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Rh(e.node(0))}static atStart(e){return Bh(e,e,0,0,1)||new Rh(e)}static atEnd(e){return Bh(e,e,e.content.size,e.childCount,-1)||new Rh(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=Ah[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ah)throw RangeError(`Duplicate use of selection JSON ID `+e);return Ah[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Z.between(this.$anchor,this.$head).getBookmark()}};jh.prototype.visible=!0;var Mh=class{constructor(e,t){this.$from=e,this.$to=t}},Nh=!1;function Ph(e){!Nh&&!e.parent.inlineContent&&(Nh=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var Z=class e extends jh{constructor(e,t=e){Ph(e),Ph(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return jh.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=X.empty){if(super.replace(e,t),t==X.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Fh(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=jh.findFrom(n,r,!0)||jh.findFrom(n,-r,!0);if(e)n=e.$head;else return jh.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(jh.findFrom(t,-r,!0)||jh.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};jh.jsonID(`text`,Z);var Fh=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){return Z.between(e.resolve(this.anchor),e.resolve(this.head))}},Ih=class e extends jh{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),a=t.resolve(i);return r?jh.near(a):new e(a)}content(){return new X(Y.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new Lh(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};Ih.prototype.visible=!1,jh.jsonID(`node`,Ih);var Lh=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Fh(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Ih.isSelectable(n)?new Ih(t):jh.near(t)}},Rh=class e extends jh{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=X.empty){if(t==X.empty){e.delete(0,e.doc.content.size);let t=jh.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:`all`}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return zh}};jh.jsonID(`all`,Rh);var zh={map(){return this},resolve(e){return new Rh(e)}};function Bh(e,t,n,r,i,a=!1){if(t.inlineContent)return Z.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(!r.isAtom){let t=Bh(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&Ih.isSelectable(r))return Ih.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function Vh(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Im||i instanceof Lm))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(jh.near(e.doc.resolve(o),n))}var Hh=1,Uh=2,Wh=4,Gh=class extends kh{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError(`Selection passed to setSelection must point at the current document`);return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Hh)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&Hh)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Uh,this}ensureMarks(e){return Qf.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Uh)>0}addStep(e,t){super.addStep(e,t),this.updated&=-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Qf.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(jh.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e==`string`?e:e.key]=t,this}getMeta(e){return this.meta[typeof e==`string`?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Wh,this}get scrolledIntoView(){return(this.updated&Wh)>0}};function Kh(e,t){return!t||!e?e:e.bind(t)}var qh=class{constructor(e,t,n){this.name=e,this.init=Kh(t.init,n),this.apply=Kh(t.apply,n)}},Jh=[new qh(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new qh(`selection`,{init(e,t){return e.selection||jh.atStart(t.doc)},apply(e){return e.selection}}),new qh(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new qh(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],Yh=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Jh.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new qh(e.key,e.spec.state,e))})}},Xh=class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,c=r?r[a].state:this,l=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,c,n);if(l&&n.filterTransaction(l,a)){if(l.setMeta(`appendedTransaction`,e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError(`Applying a mismatched transaction`);let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new Gh(this)}static create(t){let n=new Yh(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new Yh(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new Yh(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=vp.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=jh.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function Zh(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=Zh(i,t,{})),n[r]=i}return n}var Qh=class{constructor(e){this.spec=e,this.props={},e.props&&Zh(e.props,this,this.props),this.key=e.key?e.key.key:eg(`plugin`)}getState(e){return e[this.key]}},$h=Object.create(null);function eg(e){return e in $h?e+`$`+ ++$h[e]:($h[e]=0,e+`$`)}var tg=class{constructor(e=`key`){this.key=eg(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}},ng=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function rg(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var ig=(e,t,n)=>{let r=rg(e,n);if(!r)return!1;let i=ug(r);if(!i){let n=r.blockRange(),i=n&&Um(n);return i!=null&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(Og(e,i,t,-1))return!0;if(r.parent.content.size==0&&(cg(a,`end`)||Ih.isSelectable(a)))for(let n=r.depth;;n--){let o=uh(e.doc,r.before(n),r.after(n),X.empty);if(o&&o.slice.size<o.to-o.from){if(t){let n=e.tr.step(o);n.setSelection(cg(a,`end`)?jh.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):Ih.create(n.doc,i.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(n==1||r.node(n-1).childCount>1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1},ag=(e,t,n)=>{let r=rg(e,n);if(!r)return!1;let i=ug(r);return i?sg(e,i,t):!1},og=(e,t,n)=>{let r=dg(e,n);if(!r)return!1;let i=mg(r);return i?sg(e,i,t):!1};function sg(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let s=uh(e.doc,i,o,X.empty);if(!s||s.from!=i||s instanceof Im&&s.slice.size>=o-i)return!1;if(n){let t=e.tr.step(s);t.setSelection(Z.create(t.doc,i)),n(t.scrollIntoView())}return!0}function cg(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var lg=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=ug(r)}let o=a&&a.nodeBefore;return!o||!Ih.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Ih.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function ug(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function dg(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}var fg=(e,t,n)=>{let r=dg(e,n);if(!r)return!1;let i=mg(r);if(!i)return!1;let a=i.nodeAfter;if(Og(e,i,t,1))return!0;if(r.parent.content.size==0&&(cg(a,`start`)||Ih.isSelectable(a))){let n=uh(e.doc,r.before(),r.after(),X.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(cg(a,`start`)?jh.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):Ih.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},pg=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=mg(r)}let o=a&&a.nodeAfter;return!o||!Ih.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Ih.create(e.doc,a.pos)).scrollIntoView()),!0)};function mg(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var hg=(e,t)=>{let n=e.selection,r=n instanceof Ih,i;if(r){if(n.node.isTextblock||!rh(e.doc,n.from))return!1;i=n.from}else if(i=oh(e.doc,n.from,-1),i==null)return!1;if(t){let n=e.tr.join(i);r&&n.setSelection(Ih.create(n.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},gg=(e,t)=>{let n=e.selection,r;if(n instanceof Ih){if(n.node.isTextblock||!rh(e.doc,n.to))return!1;r=n.to}else if(r=oh(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},_g=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&Um(i);return a!=null&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},vg=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
64
- `).scrollIntoView()),!0)};function yg(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var bg=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=yg(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(jh.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},xg=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Rh||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=yg(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(n,a.createAndFill());o.setSelection(Z.create(o.doc,n+1)),t(o.scrollIntoView())}return!0},Sg=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(th(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Um(r);return i!=null&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function Cg(e){return(t,n)=>{if(t.selection instanceof Ih&&t.selection.node.isBlock){let{$from:e}=t.selection;return!e.parentOffset||!th(t.doc,e.pos)?!1:(n&&n(t.tr.split(e.pos).scrollIntoView()),!0)}if(!t.selection.$from.depth)return!1;let r=t.tr;!t.selection.empty&&(t.selection instanceof Z||t.selection instanceof Rh)&&r.deleteSelection();let{$from:i}=r.selection,a=r.steps.length,o=[],s,c,l=!1,u=!1;for(let t=i.depth;;t--)if(i.node(t).isBlock){l=i.end(t)==i.pos+(i.depth-t),u=i.start(t)==i.pos-(i.depth-t),c=yg(i.node(t-1).contentMatchAt(i.indexAfter(t-1)));let n=e&&e(i.parent,l,i);o.unshift(n||(l&&c?{type:c}:null)),s=t;break}else{if(t==1)return!1;o.unshift(null)}let d=i.pos,f=th(r.doc,d,o.length,o);if(f||=(o[0]=c?{type:c}:null,th(r.doc,d,o.length,o)),!f)return!1;if(r.split(d,o.length,o),!l&&u&&i.node(s).type!=c){let e=r.mapping.slice(a),t=e.map(i.before(s)),n=r.doc.resolve(t);c&&i.node(s-1).canReplaceWith(n.index(),n.index()+1,c)&&r.setNodeMarkup(e.map(i.before(s)),c)}return n&&n(r.scrollIntoView()),!0}}var wg=Cg(),Tg=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a!=0&&(i=n.before(a),t&&t(e.tr.setSelection(Ih.create(e.doc,i))),!0)},Eg=(e,t)=>(t&&t(e.tr.setSelection(new Rh(e.doc))),!0);function Dg(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,a=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(i.isTextblock||rh(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function Og(e,t,n,r){let i=t.nodeBefore,a=t.nodeAfter,o,s,c=i.type.spec.isolating||a.type.spec.isolating;if(!c&&Dg(e,t,n))return!0;let l=!c&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(n){let r=t.pos+a.nodeSize,s=Y.empty;for(let e=o.length-1;e>=0;e--)s=Y.from(o[e].create(null,s));s=Y.from(i.copy(s));let c=e.tr.step(new Lm(t.pos-1,r,t.pos,r,new X(s,1,0),o.length,!0)),l=c.doc.resolve(r+2*o.length);l.nodeAfter&&l.nodeAfter.type==i.type&&rh(c.doc,l.pos)&&c.join(l.pos),n(c.scrollIntoView())}return!0}let u=a.type.spec.isolating||r>0&&c?null:jh.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&Um(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&cg(a,`start`,!0)&&cg(i,`end`)){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=a,c=1;for(;!s.isTextblock;s=s.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=Y.empty;for(let e=o.length-1;e>=0;e--)r=Y.from(o[e].copy(r));n(e.tr.step(new Lm(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new X(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function kg(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(Z.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}var Ag=kg(-1),jg=kg(1);function Mg(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a),s=o&&Gm(o,e,t);return s?(r&&r(n.tr.wrap(o,s).scrollIntoView()),!0):!1}}function Ng(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(a,o,(r,a)=>{if(i)return!1;if(r.isTextblock&&!r.hasMarkup(e,t)){if(r.type==e)i=!0;else{let t=n.doc.resolve(a),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(a,o,e,t)}r(i.scrollIntoView())}return!0}}function Pg(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}var Fg=Pg(ng,ig,lg),Ig=Pg(ng,fg,pg),Lg={Enter:Pg(vg,xg,Sg,wg),"Mod-Enter":bg,Backspace:Fg,"Mod-Backspace":Fg,"Shift-Backspace":Fg,Delete:Ig,"Mod-Delete":Ig,"Mod-a":Eg},Rg={"Ctrl-h":Lg.Backspace,"Alt-Backspace":Lg[`Mod-Backspace`],"Ctrl-d":Lg.Delete,"Ctrl-Alt-Backspace":Lg[`Mod-Delete`],"Alt-Delete":Lg[`Mod-Delete`],"Alt-d":Lg[`Mod-Delete`],"Ctrl-a":Ag,"Ctrl-e":jg};for(let e in Lg)Rg[e]=Lg[e];typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<`u`&&os.platform&&os.platform();function zg(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 Bg(s,o,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function Bg(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 gp(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new gp(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let s=Gm(a,n,r,t);return s?(e&&Vg(e,t,s,i,n),!0):!1}function Vg(e,t,n,r,i){let a=Y.empty;for(let e=n.length-1;e>=0;e--)a=Y.from(n[e].type.create(n[e].attrs,a));e.step(new Lm(t.start-(r?2:0),t.end,t.start,t.end,new X(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&&th(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=l.child(n).nodeSize;return e}function Hg(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?Ug(t,n,e,a):Wg(t,n,a):!0:!1}}function Ug(e,t,n,r){let i=e.tr,a=r.end,o=r.$to.end(r.depth);a<o&&(i.step(new Lm(a-1,o,a,o,new X(Y.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new gp(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));let s=Um(r);if(s==null)return!1;i.lift(r,s);let c=i.doc.resolve(i.mapping.map(a,-1)-1);return rh(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),t(i.scrollIntoView()),!0}function Wg(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?Y.empty:Y.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new Lm(d-+!!s,f+ +!!c,d+1,f-1,new X((s?Y.empty:Y.from(i.copy(Y.empty))).append(c?Y.empty:Y.from(i.copy(Y.empty))),+!s,+!c),+!s)),t(r.scrollIntoView()),!0}function Gg(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=Y.from(r?e.create():null),o=new X(Y.from(e.create(null,Y.from(s.type.create(null,i)))),r?3:1,0),l=a.start,u=a.end;n(t.tr.step(new Lm(l-(r?3:1),u,l,u,o,1,!0)).scrollIntoView())}return!0}}var Kg=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},qg=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Jg=null,Yg=function(e,t,n){let r=Jg||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Xg=function(){Jg=null},Zg=function(e,t,n,r){return n&&($g(e,t,n,r,-1)||$g(e,t,n,r,1))},Qg=/^(img|br|input|textarea|hr)$/i;function $g(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:e_(e))){let n=e.parentNode;if(!n||!t_(n)||s_(e)||Qg.test(e.nodeName)||e.contentEditable==`false`)return!1;t=Kg(e)+(i<0?0:1),e=n}else if(t_(e)){let n=e.childNodes[t+(i<0?-1:0)];if(t_(n)&&n.contentEditable==`false`){if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1}else e=n,t=i<0?e_(e):0}else return!1}}function e_(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function t_(e){return e.nodeType==1}function n_(e){return e.nodeType==3}function r_(e,t){return t?e.contains(t_(t)?t:t.parentNode):!1}function i_(e,t){for(;;){if(n_(e)&&t)return e;if(t_(e)&&t>0){if(e.contentEditable==`false`)return null;e=e.childNodes[t-1],t=e_(e)}else if(e.parentNode&&!s_(e))t=Kg(e),e=e.parentNode;else return null}}function a_(e,t){for(;;){if(n_(e)&&t<e.nodeValue.length)return e;if(t_(e)&&t<e.childNodes.length){if(e.contentEditable==`false`)return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!s_(e))t=Kg(e)+1,e=e.parentNode;else return null}}function o_(e,t,n){for(let r=t==0,i=t==e_(e);r||i;){if(e==n)return!0;let t=Kg(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==e_(e)}}function s_(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var c_=function(e){return e.focusNode&&Zg(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function l_(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function u_(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function d_(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(e_(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(e_(r.startContainer),r.startOffset)}}}var f_=typeof navigator<`u`?navigator:null,p_=typeof document<`u`?document:null,m_=f_&&f_.userAgent||``,h_=/Edge\/(\d+)/.exec(m_),g_=/MSIE \d/.exec(m_),__=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(m_),v_=!!(g_||__||h_),y_=g_?document.documentMode:__?+__[1]:h_?+h_[1]:0,b_=!v_&&/gecko\/(\d+)/i.test(m_);b_&&+(/Firefox\/(\d+)/.exec(m_)||[0,0])[1];var x_=!v_&&/Chrome\/(\d+)/.exec(m_),S_=!!x_,C_=x_?+x_[1]:0,w_=!v_&&!!f_&&/Apple Computer/.test(f_.vendor),T_=w_&&(/Mobile\/\w+/.test(m_)||!!f_&&f_.maxTouchPoints>2),E_=T_||(f_?/Mac/.test(f_.platform):!1),D_=f_?/Win/.test(f_.platform):!1,O_=/Android \d/.test(m_),k_=!!p_&&`webkitFontSmoothing`in p_.documentElement.style,A_=k_?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function j_(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function M_(e,t){return typeof e==`number`?e:e[t]}function N_(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function P_(e,t,n){if(!Y_(t)&&t.left==0)return;let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(!t_(o)){o=qg(o);continue}let e=o==a.body,n=e?j_(a):N_(o),s=0,c=0;if(t.top<n.top+M_(r,`top`)?c=-(n.top-t.top+M_(i,`top`)):t.bottom>n.bottom-M_(r,`bottom`)&&(c=t.bottom-t.top>n.bottom-n.top?t.top+M_(i,`top`)-n.top:t.bottom-n.bottom+M_(i,`bottom`)),t.left<n.left+M_(r,`left`)?s=-(n.left-t.left+M_(i,`left`)):t.right>n.right-M_(r,`right`)&&(s=t.right-n.right+M_(i,`right`)),s||c){if(e)a.defaultView.scrollBy(s,c);else{let e=o.scrollLeft,n=o.scrollTop;c&&(o.scrollTop+=c),s&&(o.scrollLeft+=s);let r=o.scrollLeft-e,i=o.scrollTop-n;t={left:t.left-r,top:t.top-i,right:t.right-r,bottom:t.bottom-i}}}let l=e?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(l))break;o=l==`absolute`?o.offsetParent:qg(o)}}function F_(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:I_(e.dom)}}function I_(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=qg(r));return t}function L_({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;R_(n,r==0?0:r-t)}function R_(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var z_=null;function B_(e){if(e.setActive)return e.setActive();if(z_)return e.focus(z_);let t=I_(e);e.focus(z_==null?{get preventScroll(){return z_={preventScroll:!0},!0}}:void 0),z_||(z_=!1,R_(t,0))}function V_(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(t_(u))e=u.getClientRects();else if(n_(u))e=Yg(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&n_(n)?{left:p.right<t.left?p.right:p.left,top:t.top}:t,t_(u)&&e&&(a=d+ +(t.left>=(p.left+p.right)/2));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&n_(n)?H_(n,i):!n||r?{node:e,offset:a}:V_(n,i)}function H_(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=X_(r,1);if(n.top!=n.bottom&&U_(t,n)){i={node:e,offset:a+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}function U_(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function W_(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function G_(e,t,n){let{node:r,offset:i}=V_(t,n),a=-1;if(t_(r)&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function K_(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(t_(t.dom)&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function q_(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(t_(n)){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(U_(t,i))return q_(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function J_(e,t){let n=e.dom.ownerDocument,r,i=0,a=d_(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o)){let n=e.dom.getBoundingClientRect();if(!U_(t,n)||(o=q_(e.dom,t,n),!o))return null}if(w_)for(let e=o;r&&e;e=qg(e))e.draggable&&(r=void 0);if(o=W_(o,t),r){if(b_&&t_(r)&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;k_&&i&&t_(r)&&t_(n=r.childNodes[i-1])&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&t_(r.lastChild)&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:i!=0&&t_(r)&&r.childNodes[i-1].nodeName==`BR`||(s=K_(e,r,i,t))}s??=G_(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function Y_(e){return e.top<e.bottom||e.left<e.right}function X_(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(Y_(e))return e}return Array.prototype.find.call(n,Y_)||e.getBoundingClientRect()}var Z_=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Q_(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=k_||b_;if(n_(r)){if(o&&(Z_.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=X_(Yg(r,i,i),n);if(b_&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=X_(Yg(r,i-1,i-1),-1);if(t.top==e.top){let n=X_(Yg(r,i,i+1),-1);if(n.top!=e.top)return $_(n,n.left<t.left)}}return e}{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,$_(X_(Yg(r,e,t),a),a<0)}}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==e_(r))){let e=r.childNodes[i-1];if(t_(e))return ev(e.getBoundingClientRect(),!1)}if(a==null&&i<e_(r)){let e=r.childNodes[i];if(t_(e))return ev(e.getBoundingClientRect(),!0)}return ev(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==e_(r))){let e=r.childNodes[i-1],t=n_(e)?Yg(e,e_(e)-+!o):t_(e)&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return $_(X_(t,1),!1)}if(a==null&&i<e_(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?n_(e)?Yg(e,0,+!o):t_(e)?e:null:null;if(t)return $_(X_(t,-1),!0)}return $_(X_(n_(r)?Yg(r):r,-n),n>=0)}function $_(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function ev(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function tv(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function nv(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return tv(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=Q_(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(t_(e))t=e.getClientRects();else if(n_(e))t=Yg(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var rv=/[\u0590-\u08ac]/;function iv(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!rv.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:tv(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!r_(l,u)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var av=null,ov=null,sv=!1;function cv(e,t,n){return av==t&&ov==n?sv:(av=t,ov=n,sv=n==`up`||n==`down`?nv(e,t,n):iv(e,t,n))}var lv=0,uv=1,dv=2,fv=3,pv=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=lv,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&r_(this.contentDOM,e)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>Kg(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM)){let n=e.compareDocumentPosition(this.contentDOM);r=n&16?t>Array.from(e.childNodes).findIndex(e=>e.contains(this.contentDOM)):!(n&4)}else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node)){if(n&&(a=i.nodeDOM)&&!(t_(a)?r_(a,e):a==e))n=!1;else return i}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(;n>0;n--){let e=this.children[n-1];if(e.size||!(e instanceof bv||e instanceof mv&&e.side>=0))break}if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?Kg(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?Kg(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=Kg(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=Kg(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(!t_(t)||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((b_||w_)&&e==t){let{node:e,offset:t}=o;if(n_(e)){if(u=!!(t&&e.nodeValue[t-1]==`
65
- `),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:Kg(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(b_&&l.focusNode&&l.focusNode!=s.node&&t_(l.focusNode)){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&w_)&&Zg(o.node,o.offset,l.anchorNode,l.anchorOffset)&&Zg(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&b_)){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?dv:uv,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=fv:i.markDirty(e-r,t-r);return}i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?dv:fv}n=a}this.dirty=dv}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?dv:uv;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},mv=class extends pv{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){let e=t_(a)?a:document.createElement(`span`);e!=a&&(e.appendChild(a),a=e),e.hasAttribute(`contenteditable`)||(e.contentEditable=`false`),e.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==lv&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},hv=class extends pv{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},gv=class e extends pv{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return o&&o.dom||(o=sm.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&fv||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=fv&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=lv){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=lv}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=Lv(a,n,o,r)),t>0&&(a=Lv(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},_v=class e extends pv{constructor(e,t,n,r,i,a,o){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(!n_(u))throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=sm.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=Ov(u,r,n),l?c=new xv(t,n,r,i,u,d||null,f,l):n.isText?new yv(t,n,r,i,u,f):new e(t,n,r,i,u,d||null,f)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(t.preserveWhitespace=`full`),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}if(!t.contentElement){let n=e&&e.find(t=>t_(t)&&e.indexOf(t.parentNode)<0&&this.dom.contains(t));n?t.contentElement=n:t.getContent=()=>Y.empty}}return t}matchesNode(e,t,n){return this.dirty==lv&&e.eq(this.node)&&kv(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new jv(this,a&&a.node,e),c=this.node.inlineContent,l=c&&this.node.isBlock;Pv(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?Qf.none:this.node.child(i).marks,n,e,i),s.placeWidget(t,e,r)},(t,a,u,d)=>{s.syncToMarks(t.marks,n,e,d),l&&t.isAtom&&!t.isText&&s.addHackNode(`IMG`,s.top);let f;s.findNodeMatch(t,a,u,d)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(f=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,u,f,e)||s.updateNextNode(t,a,u,e,d,r)||s.addNode(t,a,u,e,r),r+=t.nodeSize,c&&(l=t.isAtom&&!t.isText)}),s.syncToMarks([],n,e,0),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==dv)&&(a&&this.protectLocalComposition(e,a),Sv(this.contentDOM,this.children,e),T_&&Fv(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof Z)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=Iv(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new hv(this,i,t,r);e.input.compositionNodes.push(a),this.children=Lv(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==fv||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=lv}updateOuterDeco(e){if(kv(e,this.outerDeco))return;let t=!t_(this.nodeDOM),n=this.dom;this.dom=Ev(this.dom,this.nodeDOM,Tv(this.outerDeco,this.node,t),Tv(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){t_(this.nodeDOM)&&(this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){t_(this.nodeDOM)&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function vv(e,t,n,r,i){Ov(r,t,e);let a=new _v(void 0,e,t,n,r,r,r);return a.contentDOM&&a.updateChildren(i,0),a}var yv=class e extends _v{constructor(e,t,n,r,i,a){super(e,t,n,r,i,null,a)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==fv||this.dirty!=lv&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=lv||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=lv,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=fv)}get domAtom(){return!1}isText(e){return this.node.text==e}},bv=class extends pv{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==lv&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},xv=class extends _v{constructor(e,t,n,r,i,a,o,s){super(e,t,n,r,i,a,o),this.spec=s}update(e,t,n,r){if(this.dirty==fv)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function Sv(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=Av(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof gv){let t=r?r.previousSibling:e.lastChild;Sv(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=Av(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var Cv=function(e){e&&(this.nodeName=e)};Cv.prototype=Object.create(null);var wv=[new Cv];function Tv(e,t,n){if(e.length==0)return wv;let r=n?wv[0]:new Cv,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o){o.nodeName&&i.push(r=new Cv(o.nodeName));for(let e in o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new Cv(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a))}}}return i}function Ev(e,t,n,r){if(n==wv&&r==wv)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName||(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=wv[0]),i=t}Dv(i,o||wv[0],a)}return i}function Dv(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function Ov(e,t,n){return Ev(e,e,wv,Tv(t,n,!t_(e)))}function kv(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Av(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var jv=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Mv(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=lv,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i<0&&this.index<this.top.children.length){let t=this.top.children[this.index];t instanceof gv&&t.dirty!=fv&&t.mark.type==e[a].type&&t.spec.update&&!this.isLocked(t.dom)&&t.spec.update(e[a])&&(t.mark=e[a],i=this.index,this.changed=!0)}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=gv.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==fv&&a.dom==a.contentDOM&&(a.dirty=dv),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof _v){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=fv&&kv(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=dv,u.updateChildren(r,a+1),u.dirty=lv),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!kv(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=_v.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=_v.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new mv(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof gv;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof yv)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((w_||S_)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new bv(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||t_(e)&&e.contains(this.lock.parentNode))}};function Mv(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof gv)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function Nv(e,t){return e.type.side-t.type.side}function Pv(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u){if(d){d.sort(Nv);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c)}let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function Fv(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function Iv(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function Lv(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&=(a.push(i),void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function Rv(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(c_(n)){for(c=o;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&Ih.isSelectable(i.node)&&i.parent&&!(i.node.isInline&&o_(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new Ih(o==e?s:r.resolve(e))}else if(b_&&t==`key`&&o>e.state.selection.to&&t_(n.focusNode)&&n.focusOffset==n.focusNode.childNodes.length&&i&&i.posAtStart>e.state.selection.to)for(let e=n.focusNode;;e=e.parentNode){if(getComputedStyle(e).overflow!=`visible`){l=jh.findFrom(r.resolve(i.posAtStart),1);break}if(e==i.dom||e.nextSibling||!e.parentNode||!t_(e.parentNode))break}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=Yv(e,u,s,n)}return l}function zv(e){return e.editable?e.hasFocus():Zv(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Bv(e,t=!1){let n=e.state.selection;if(qv(e,n),!zv(e))return;let r=e.input.mouseDown;if(!t&&S_&&r){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Zg(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)&&r.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Kv(e);else{let{anchor:r,head:i}=n,a,o;Vv&&!(n instanceof Z)&&(n.$from.parent.inlineContent||(a=Hv(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=Hv(e,n.to))),e.docView.setSelection(r,i,e,t),Vv&&(a&&Wv(a),o&&Wv(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&Gv(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}var Vv=w_||S_&&C_<63;function Hv(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(w_&&i&&i.contentEditable==`false`)return Uv(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return Uv(i);if(a)return Uv(a)}}function Uv(e){return e.contentEditable=`true`,w_&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Wv(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function Gv(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!zv(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function Kv(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,Kg(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&v_&&y_<=11&&(n.disabled=!0,n.disabled=!1)}function qv(e,t){if(t instanceof Ih){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Jv(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Jv(e)}function Jv(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function Yv(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||Z.between(t,n,r)}function Xv(e){return e.editable&&!e.hasFocus()?!1:Zv(e)}function Zv(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return r_(e.dom,t.anchorNode)&&(e.editable||r_(e.dom,t.focusNode))}catch{return!1}}function Qv(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Zg(t.node,t.offset,n.anchorNode,n.anchorOffset)}function $v(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&jh.findFrom(a,t)}function ey(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ty(e,t,n){let r=e.state.selection;if(r instanceof Z){if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return ey(e,new Z(r.$anchor,a))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=$v(e.state,t);return n&&n instanceof Ih?ey(e,n):!1}if(!E_||n.indexOf(`m`)<0){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?Ih.isSelectable(i)?ey(e,new Ih(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):ey(e,new Z(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1}}else if(r instanceof Ih&&r.node.isInline)return ey(e,new Z(t>0?r.$to:r.$from));else{let n=$v(e.state,t);return n?ey(e,n):!1}}function ny(e,t){let n=e.pmViewDesc;return n?n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`):t_(e)&&e.contentEditable==`false`}function ry(e,t){return t<0?iy(e):ay(e)}function iy(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(b_&&t_(n)&&r<e_(n)&&ny(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(!t_(n))break;let e=n.childNodes[r-1];if(ny(e,-1))i=n,a=--r;else if(n_(e))n=e,r=n.nodeValue.length;else break}else if(oy(n))break;else{let t=n.previousSibling;for(;t&&ny(t,-1);)i=n.parentNode,a=Kg(t),t=t.previousSibling;if(t)n=t,r=e_(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?ly(e,n,r):i&&ly(e,i,a)}function ay(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=e_(n),a,o;for(;;)if(r<i){if(!t_(n))break;let e=n.childNodes[r];if(ny(e,1))a=n,o=++r;else break}else if(oy(n))break;else{let t=n.nextSibling;for(;t&&ny(t,1);)a=t.parentNode,o=Kg(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=e_(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&ly(e,a,o)}function oy(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function sy(e,t){for(;e&&t==e.childNodes.length&&!s_(e);)t=Kg(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n_(n))return n;if(t_(n)&&n.contentEditable==`false`)break;e=n,t=0}}function cy(e,t){for(;e&&!t&&!s_(e);)t=Kg(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n_(n))return n;if(t_(n)&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function ly(e,t,n){if(!n_(t)){let e,r;(r=sy(t,n))?(t=r,n=0):(e=cy(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection(),i=e.domSelectionRange();if(!r)return;c_(i)?r.collapse(t,n):r.extend&&(r.collapse(i.anchorNode,i.anchorOffset),r.extend(t,n)),e.domObserver.setCurSelection();let{state:a}=e;setTimeout(()=>{e.state==a&&Bv(e)},50)}function uy(e,t){let n=e.state.doc.resolve(t);if(!(S_||D_)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}let r=e.dom;for(let t=n.depth;t>0;t--)if(n.node(t).isBlock){r=e.nodeDOM(n.before(t))||r;break}return getComputedStyle(r).direction==`rtl`?`rtl`:`ltr`}function dy(e,t,n){let r=e.state.selection;if(r instanceof Z&&!r.empty||n.indexOf(`s`)>-1||E_&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=$v(e.state,t);if(n&&n instanceof Ih)return ey(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof Rh?jh.near(n,t):jh.findFrom(n,t);return o?ey(e,o):!1}return!1}function fy(e,t){if(!(e.state.selection instanceof Z))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function py(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function my(e){if(!w_||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t_(t)&&n==0&&t.firstChild&&t_(t.firstChild)&&t.firstChild.contentEditable==`false`){let n=t.firstChild;py(e,n,`true`),setTimeout(()=>py(e,n,`false`),20)}return!1}function hy(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function gy(e,t){let n=t.keyCode,r=hy(t);if(n==8||E_&&n==72&&r==`c`)return fy(e,-1)||ry(e,-1);if(n==46&&!t.shiftKey||E_&&n==68&&r==`c`)return fy(e,1)||ry(e,1);if(n==13||n==27)return!0;if(n==37||E_&&n==66&&r==`c`){let t=n==37?uy(e,e.state.selection.from)==`ltr`?-1:1:-1;return ty(e,t,r)||ry(e,t)}if(n==39||E_&&n==70&&r==`c`){let t=n==39?uy(e,e.state.selection.from)==`ltr`?1:-1:1;return ty(e,t,r)||ry(e,t)}return n==38||E_&&n==80&&r==`c`?dy(e,-1,r)||ry(e,-1):n==40||E_&&n==78&&r==`c`?my(e)||dy(e,1,r)||ry(e,1):!(r!=(E_?`m`:`c`)||n!=66&&n!=73&&n!=89&&n!=90)}function _y(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||sm.fromSchema(e.state.schema),s=Dy(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&t_(l)&&(u=Ey[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&t_(l)&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
66
-
67
- `),slice:t}}function vy(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=!!t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return s=new X(Y.from(e.state.schema.text(t.replace(/\r\n?/g,`
68
- `))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=sm.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=Ay(n),k_&&jy(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&!t_(e);)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||qp.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!yy.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=My(Ty(s,+u[1],+u[2]),u[4]);else if(s=X.maxOpen(by(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=Ty(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var yy=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function by(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&Sy(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=Cy(a[a.length-1],i.length));let n=xy(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return Y.from(a)}return e}function xy(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Y.from(e));return e}function Sy(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=Sy(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Y.from(xy(n,e,i+1))))}}function Cy(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,Cy(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Y.empty,!0);return e.copy(n.append(r))}function wy(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=wy(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(Y.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function Ty(e,t,n){return t<e.openStart&&(e=new X(wy(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new X(wy(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Ey={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]};function Dy(){return document.implementation.createHTMLDocument(`title`)}var Oy=null;function ky(e){let t=window.trustedTypes;if(!t)return e;if(!Oy){if(Oy=t.defaultPolicy)try{return Oy.createHTML(e)}catch{}Oy=t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e})}return Oy.createHTML(e)}function Ay(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=Dy(),r=n.body,i=/<([a-z][^>\s]+)/i.exec(e),a;if((a=i&&Ey[i[1].toLowerCase()])&&(e=a.map(e=>`<`+e+`>`).join(``)+e+a.map(e=>`</`+e+`>`).reverse().join(``)),r.innerHTML=ky(e),a)for(let e=0;e<a.length;e++)r=r.querySelector(a[e])||r;for(let e=0;e<n.styleSheets.length;e++){let t=n.styleSheets[e];for(let e=0;e<t.rules.length;e++){let n=t.rules[e];if(n instanceof CSSStyleRule){let e=r.querySelectorAll(n.selectorText);for(let t=0;t<e.length;t++)e[t].style.cssText+=n.style.cssText}}}return r}function jy(e){let t=e.querySelectorAll(S_?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function My(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;try{i=Y.from(t.create(r[e+1],i))}catch{break}a++,o++}return new X(i,a,o)}var Ny={},Py={},Fy={touchstart:!0,touchmove:!0},Iy=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Ly(e){for(let t in Ny){let n=Ny[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{Hy(e,t)&&!Vy(e,t)&&(e.editable||!(t.type in Py))&&n(e,t)},Fy[t]?{passive:!0}:void 0)}w_&&e.dom.addEventListener(`input`,()=>null),By(e)}function Ry(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function zy(e){e.input.mouseDown&&e.input.mouseDown.done(),e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function By(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>Vy(e,t))})}function Vy(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function Hy(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Uy(e,t){!Vy(e,t)&&Ny[t.type]&&(e.editable||!(t.type in Py))&&Ny[t.type](e,t)}Py.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!ob(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(O_&&S_&&n.keyCode==13))){if(n.keyCode!=229&&e.domObserver.forceFlush(),T_&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,l_(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||gy(e,n)?n.preventDefault():Ry(e,`key`)}},Py.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},Py.keypress=(e,t)=>{let n=t;if(ob(e)||!n.charCode||n.ctrlKey&&!n.altKey||E_&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Z)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function Wy(e){return{left:e.clientX,top:e.clientY}}function Gy(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Ky(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function qy(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta(`pointer`,!0),e.dispatch(r)}function Jy(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Ih.isSelectable(r)?(qy(e,new Ih(n)),!0):!1}function Yy(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof Ih&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(Ih.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i!=null&&(qy(e,Ih.create(e.state.doc,i)),!0)}function Xy(e,t,n,r,i){return Ky(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?Yy(e,n):Jy(e,n))}function Zy(e,t,n,r){return Ky(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function Qy(e,t,n,r){return Ky(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||$y(e,n,r)}function $y(e,t,n){if(n.button!=0)return!1;let r=eb(e,t,!0),i=e.state.doc;return r?(qy(e,r),r instanceof Z&&i.eq(e.state.doc)&&(e.input.mouseDown=new ab(e,r)),!0):!1}function eb(e,t,n){let r=e.state.doc;if(t==-1)return r.inlineContent?Z.create(r,0,r.content.size):null;let i=r.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e),a=i.before(e);if(t.inlineContent)return Z.create(r,a+1,a+1+t.content.size);if(n&&Ih.isSelectable(t))return Ih.create(r,a)}return null}function tb(e){return fb(e)}var nb=E_?`metaKey`:`ctrlKey`;Ny.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=tb(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&Gy(n,e.input.lastClick)&&!n[nb]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let o=e.posAtCoords(Wy(n));o&&(a==`singleClick`?e.input.mouseDown=new ib(e,o,n,!!r):(a==`doubleClick`?Zy:Qy)(e,o.pos,o.inside,n)?n.preventDefault():Ry(e,`pointer`))};var rb=class{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},ib=class extends rb{constructor(e,t,n,r){super(e),this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[nb],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&t_(s.nodeDOM)?s.nodeDOM:null;let{selection:c}=e.state;n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof Ih&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!!(this.target&&b_&&!this.target.hasAttribute(`contentEditable`))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute(`contentEditable`,`false`)},20),this.view.domObserver.start()),Ry(e,`pointer`)}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute(`draggable`),this.mightDrag.setUneditable&&this.target.removeAttribute(`contentEditable`),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||Bv(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Wy(e))),this.updateAllowDefault(e),this.allowDefault||!t?Ry(this.view,`pointer`):Xy(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||w_&&this.mightDrag&&!this.mightDrag.node.isAtom||S_&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(qy(this.view,jh.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):Ry(this.view,`pointer`)}move(e){this.updateAllowDefault(e),Ry(this.view,`pointer`),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},ab=class extends rb{constructor(e,t){super(e),this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Ry(this.view,`pointer`);let t=this.view.posAtCoords(Wy(e)),n=t&&eb(this.view,t.inside,!1);if(!n)return;let{doc:r}=this.view.state,i=this.startSelection,[a,o]=n.from<i.from?[i.to,n.from]:[i.from,n.to];qy(this.view,Z.create(r,a,o))}};Ny.touchstart=e=>{e.input.lastTouch=Date.now(),tb(e),Ry(e,`pointer`)},Ny.touchmove=e=>{e.input.lastTouch=Date.now(),Ry(e,`pointer`)},Ny.contextmenu=e=>tb(e);function ob(e,t){return e.composing?!0:w_&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var sb=O_?5e3:-1;Py.compositionstart=Py.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Z&&t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||S_&&D_&&cb(e)))e.markCursor=e.state.storedMarks||n.marks(),fb(e,!0),e.markCursor=null;else if(fb(e,!t.selection.empty),b_&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&t_(n)&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(n_(t)){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}lb(e,sb)};function cb(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||!t_(t)||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return t_(r)&&r.contentEditable==`false`}Py.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,lb(e,20))};function lb(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>fb(e),t))}function ub(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function db(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=i_(t.focusNode,t.focusOffset),r=a_(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(e&&e.isText(n.nodeValue))return r}}return n||r}function fb(e,t=!1){if(!(O_&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),ub(e),t||e.docView&&e.docView.dirty){let n=Rv(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function pb(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var mb=v_&&y_<15||T_&&A_<604;Ny.copy=Py.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=mb?null:n.clipboardData,{dom:o,text:s}=_y(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):pb(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function hb(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function gb(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?_b(e,r.value,null,i,t):_b(e,r.textContent,r.innerHTML,i,t)},50)}function _b(e,t,n,r,i){let a=vy(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||X.empty)))return!0;if(!a)return!1;let o=hb(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function vb(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}Py.paste=(e,t)=>{let n=t;if(e.composing&&!O_)return;let r=mb?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&_b(e,vb(r),r.getData(`text/html`),i,n)?n.preventDefault():gb(e,n)};var yb=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},bb=E_?`altKey`:`ctrlKey`;function xb(e,t){let n;return e.someProp(`dragCopies`,e=>{n||=e(t)}),n==null?!t[bb]:!n}Ny.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(Wy(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof Ih?i.to-1:i.to))){if(r&&r.mightDrag)o=Ih.create(e.state.doc,r.mightDrag.pos);else if(n.target&&t_(n.target)){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=Ih.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=_y(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!S_||C_>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(mb?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,mb||n.dataTransfer.setData(`text/plain`,c),e.dragging=new yb(l,xb(e,n),o)},Ny.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Py.dragover=Py.dragenter=(e,t)=>t.preventDefault(),Py.drop=(e,t)=>{try{Sb(e,t,e.dragging)}finally{e.dragging=null}};function Sb(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Wy(t));if(!r)return;let i=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp(`transformPasted`,t=>{a=t(a,e,!1)}):a=vy(e,vb(t.dataTransfer),mb?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&xb(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||X.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?lh(e.state.doc,i.pos,a):i.pos;s??=i.pos;let c=e.state.tr;if(o){let{node:e}=n;e?e.replace(c):c.deleteSelection()}let l=c.mapping.map(s),u=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=c.doc;if(u?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),c.doc.eq(d))return;let f=c.doc.resolve(l);if(u&&Ih.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new Ih(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),c.setSelection(Yv(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}Ny.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Bv(e)},20))},Ny.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},Ny.beforeinput=(e,t)=>{if(O_&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,l_(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let e in Py)Ny[e]=Py[e];function Cb(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var wb=class{constructor(e){this.frag=e,this.index=0,this.off=0}nodeAt(e){for(;this.off<=e&&this.index<this.frag.childCount;){let t=this.frag.child(this.index);if(this.off==e)return t;this.off+=t.nodeSize,this.index++}return null}},Tb=class e{constructor(e,t){this.toDOM=e,this.spec=t||Ab,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new Ob(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Cb(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},Eb=class e{constructor(e,t){this.attrs=e,this.spec=t||Ab}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new Ob(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&Cb(this.attrs,t.attrs)&&Cb(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},Db=class e{constructor(e,t){this.attrs=e,this.spec=t||Ab}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new Ob(i.pos-n,a.pos-n,this)}valid(e,t,n){let r=n.nodeAt(t.from);return!!r&&!r.isText&&t.from+r.nodeSize==t.to}eq(t){return this==t||t instanceof e&&Cb(this.attrs,t.attrs)&&Cb(this.spec,t.spec)}destroy(){}},Ob=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new Tb(n,r))}static inline(t,n,r,i){return new e(t,n,new Eb(r,i))}static node(t,n,r,i){return new e(t,n,new Db(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Eb}get widget(){return this.type instanceof Tb}},kb=[],Ab={},jb=class e{constructor(e,t){this.local=e.length?e:kb,this.children=t.length?t:kb}static create(e,t){return t.length?zb(t,e,0,Ab):Mb}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==Mb||e.maps.length==0?this:this.mapInner(e,t,0,0,n||Ab)}mapInner(t,n,r,i,a){let o;if(this.local.length){let e=new wb(n.content);for(let s=0;s<this.local.length;s++){let c=this.local[s].map(t,r,i);c&&c.type.valid(n,c,e)?(o||=[]).push(c):a.onRemove&&a.onRemove(this.local[s].spec)}}return this.children.length?Pb(this.children,o||[],t,n,r,i,a):o?new e(o.sort(Bb),kb):Mb}add(t,n){return n.length?this==Mb?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=Lb(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,zb(s,e,o+1,Ab)),a+=3}});let o=Fb(a?Rb(n):n,-r);if(o.length){let e=new wb(t.content);for(let n=0;n<o.length;n++)o[n].type.valid(t,o[n],e)||o.splice(n--,1)}return new e(o.length?this.local.concat(o).sort(Bb):this.local,i||this.children)}remove(e){return e.length==0||this==Mb?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==Mb?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):Mb}forChild(t,n){if(this==Mb)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof Eb){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(Bb),kb);return r?new Nb([t,r]):t}return r||Mb}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return Vb(this.localsInner(e))}localsInner(e){if(this==Mb)return kb;if(e.inlineContent||!this.local.some(Eb.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Eb||t.push(this.local[e]);return t}forEachSet(e){e(this)}};jb.empty=new jb([],[]),jb.removeOverlap=Vb;var Mb=jb.empty,Nb=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,Ab));return e.from(r)}forChild(t,n){if(n.isLeaf)return jb.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=Mb&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length){if(!t)t=i;else{n&&=(t=t.slice(),!1);for(let e=0;e<i.length;e++)t.push(i[e])}}}return t?Vb(n?t:t.sort(Bb)):kb}static from(t){switch(t.length){case 0:return Mb;case 1:return t[0];default:return new e(t.every(e=>e instanceof jb)?t:t.reduce((e,t)=>e.concat(t instanceof jb?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function Pb(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==Mb?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=zb(Ib(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new jb(t.sort(Bb),s)}function Fb(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Ob(i.from+t,i.to+t,i.type))}return n}function Ib(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function Lb(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function Rb(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function zb(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=Lb(e,t,o+n);if(s){a=!0;let e=zb(s,t,n+o+1,r);e!=Mb&&i.push(o,o+t.nodeSize,e)}});let o=Fb(a?Rb(e):e,-n).sort(Bb);if(o.length){let e=new wb(t.content);for(let n=0;n<o.length;n++)o[n].type.valid(t,o[n],e)||(r.onRemove&&r.onRemove(o[n].spec),o.splice(n--,1))}return o.length||i.length?new jb(o,i):Mb}function Bb(e,t){return e.from-t.from||e.to-t.to}function Vb(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from)a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),Hb(t,i+1,a.copy(r.to,a.to)));else{a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),Hb(t,i,r.copy(a.from,r.to)));break}}}return t}function Hb(e,t,n){for(;t<e.length&&Bb(n,e[t])>0;)t++;e.splice(t,0,n)}function Ub(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=Mb&&t.push(r)}),e.cursorWrapper&&t.push(jb.create(e.state.doc,[e.cursorWrapper.deco])),Nb.from(t)}var Wb={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Gb=v_&&y_<=11,Kb=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},qb=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Kb,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);v_&&y_<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():w_&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Gb&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Wb)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Xv(this.view)){if(this.suppressingSelectionUpdates)return Bv(this.view);if(v_&&y_<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Zg(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=qg(n))t.add(n);for(let r=e.anchorNode;r;r=qg(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:`selection`,target:n_(n)?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n,r=!1;!this.suppressingSelectionUpdates&&Xv(e)&&(n=e.domSelectionRange(),r=!this.currentSelection.eq(n)&&!this.ignoreSelectionChange(n));let i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(s.some(e=>e.nodeName==`BR`)&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||S_&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some(e=>e.type==`childList`&&e.removedNodes.length))){for(let e of s)if(e.nodeName==`BR`&&e.parentNode){let t=e.nextSibling;for(;t&&t_(t);){if(t.contentEditable==`false`){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(b_&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||$b(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&c_(n)&&(c=Rv(e))&&c.eq(jh.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Bv(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),Xb(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,ex(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):n&&!this.currentSelection.eq(n)&&Bv(e),n&&this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type==`attributes`&&(n==this.view.docView||e.attributeName==`contenteditable`||e.attributeName==`style`&&!e.oldValue&&!e.target.getAttribute(`style`))||!n||n.ignoreMutation(e))return null;if(e.type==`childList`){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),n_(r)&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(v_&&y_<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?Kg(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?Kg(i):e.target.childNodes.length;return{from:o,to:n.localPosFromDOM(e.target,s,1)}}return e.type==`attributes`?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}},Jb=new WeakMap,Yb=!1;function Xb(e){if(!Jb.has(e)&&(Jb.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=b_,Yb)return;console.warn(`ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.`),Yb=!0}}function Zb(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return Zg(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Qb(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return Zb(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?Zb(e,n):null}function $b(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function ex(e,t){let{focusNode:n,focusOffset:r}=e.domSelectionRange();for(let i of t)if(i.parentNode?.nodeName==`TR`){let t=i.nextSibling;for(;t&&t.nodeName!=`TD`&&t.nodeName!=`TH`;)t=t.nextSibling;if(t){let a=t;for(;;){let e=a.firstChild;if(!e||!t_(e)||e.contentEditable==`false`||/^(BR|IMG)$/.test(e.nodeName))break;a=e}a.insertBefore(i,a.firstChild),n==i&&e.domSelection().collapse(i,r)}else i.parentNode.removeChild(i)}}function tx(e,t,n,r){let{node:i,fromOffset:a,toOffset:o,from:s,to:c}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,d=l.anchorNode;if(d&&r_(e.dom,d)&&(u=[{node:d,offset:l.anchorOffset}],c_(l)||u.push({node:l.focusNode,offset:l.focusOffset})),S_&&e.input.lastKeyCode===8)for(let e=o;e>a;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){o=e;break}if(!n||n.size)break}let f=e.state.doc,p=e.someProp(`domParser`)||qp.fromSchema(e.state.schema),m=f.resolve(s),h=null,g=p.parse(i,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:a,to:o,preserveWhitespace:m.parent.type.whitespace!=`pre`||`full`,findPositions:u,ruleFromNode:nx(r),context:m});if(u&&u[0].pos!=null){let e=u[0].pos,t=u[1]&&u[1].pos;t??=e,h={anchor:e+s,head:t+s}}return{doc:g,sel:h,from:s,to:c}}var nx=e=>t=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);if(t.nodeName==`BR`&&t.parentNode){if(w_&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}if(t.parentNode.lastChild==t||w_&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName==`IMG`&&t.getAttribute(`mark-placeholder`))return{ignore:!0};return null},rx=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function ix(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Rv(e,t);if(n&&!e.state.selection.eq(n)){if(S_&&O_&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,l_(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=tx(e,t,n,i),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=ux(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(T_&&e.input.lastIOSEnter>Date.now()-225||O_)&&i.some(e=>t_(e)&&!rx.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,l_(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m){if(r&&c instanceof Z&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=ax(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof Z&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),v_&&y_<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((T_&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&cx(l.doc,h.pos,g.pos))&&e.someProp(`handleKeyDown`,t=>t(e,l_(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&(v?m.endA>m.start&&m.endB==m.start:sx(u,m.start,m.endA,h,g))&&e.someProp(`handleKeyDown`,t=>t(e,l_(8,`Backspace`)))){O_&&S_&&e.domObserver.suppressSelectionUpdates();return}S_&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),O_&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,l_(13,`Enter`))})},20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=ax(e,n.doc,l.sel);t&&!(S_&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||v_&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v){if(h.pos==g.pos){v_&&y_<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Bv(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=ox(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-+!g.textOffset){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}else e.dispatch(x())}else e.dispatch(x())}function ax(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Yv(e,t.resolve(n.anchor),t.resolve(n.head))}function ox(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(Y.from(l).eq(e))return{mark:s,type:o}}function sx(e,t,n,r,i){if(n-t<=i.pos-r.pos||lx(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.inlineContent){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve(lx(a,!0,!0));return!o.parent.isTextblock||o.pos>n||lx(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function cx(e,t,n){let r=0,i=0;return e.nodesBetween(t,n,(e,a)=>{e.isTextblock&&a>=t&&a<n?r++:(e.isText?/\S/.test(e.text.slice(Math.max(0,t-a),Math.min(e.nodeSize,n-a))):e.isLeaf)&&i++}),i==0&&r==1}function lx(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function ux(e,t,n,r,i){let a=e.findDiffStart(t,n),o=n+e.size,s=n+t.size;if(a==null)return null;let{a:c,b:l}=e.findDiffEnd(t,o,s);if(i==`end`){let e=Math.max(0,a-Math.min(c,l));r-=c+e-a}if(c<a&&o<s){let e=r<=a&&r>=c?a-r:0;a-=e,l=a+(l-c),c=a}else if(l<a){let e=r<=a&&r>=l?a-r:0;a-=e,c=a+(c-l),l=a}return{start:a,endA:c,endB:l}}var dx=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Iy,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(vx),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement(`div`),e&&(e.appendChild?e.appendChild(this.dom):typeof e==`function`?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=mx(this),px(this),this.nodeViews=gx(this),this.docView=vv(this.state.doc,fx(this),Ub(this),this.dom,this),this.domObserver=new qb(this,(e,t,n,r)=>ix(this,e,t,n,r)),this.domObserver.start(),Ly(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&By(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(vx),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(ub(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=gx(this);_x(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&By(this),this.editable=mx(this),px(this);let o=Ub(this),s=fx(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&F_(this);if(i){this.domObserver.stop();let t=l&&(v_||S_)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&hx(n.selection,e.selection);if(l){let n=S_?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=db(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=vv(e.doc,s,o,this.dom,this)),!n||this.trackWrites&&this.dom.contains(this.trackWrites)||(t=!0)}let i=this.input.mouseDown;t||!(i&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Qv(this)&&i.delaySelUpdate())?Bv(this,t):(qv(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&L_(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&r_(this.dom,e)&&!this.someProp(`handleScrollToSelection`,e=>e(this))){if(this.state.selection instanceof Ih){let t=this.docView.domAfterPos(this.state.selection.from);t_(t)&&P_(this,t.getBoundingClientRect(),e)}else P_(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new yb(e.slice,e.move,r<0?void 0:Ih.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(v_){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable==`false`)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&B_(this.dom),Bv(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return J_(this,e)}coordsAtPos(e,t=1){return Q_(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return cv(this,t||this.state,e)}pasteHTML(e,t){return _b(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return _b(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return _y(this,e)}destroy(){this.docView&&(zy(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ub(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Xg())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Uy(this,e)}domSelectionRange(){let e=this.dom.isConnected!==!1&&this.domSelection();return e?w_&&this.root.nodeType===11&&u_(this.dom.ownerDocument)==this.dom&&Qb(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};dx.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function fx(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[Ob.node(0,e.state.doc.content.size,t)]}function px(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:Ob.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function mx(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function hx(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function gx(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function _x(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function vx(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}for(var yx={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},bx={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},xx=typeof navigator<`u`&&/Mac/.test(navigator.platform),Sx=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Cx=0;Cx<10;Cx++)yx[48+Cx]=yx[96+Cx]=String(Cx);for(var Cx=1;Cx<=24;Cx++)yx[Cx+111]=`F`+Cx;for(var Cx=65;Cx<=90;Cx++)yx[Cx]=String.fromCharCode(Cx+32),bx[Cx]=String.fromCharCode(Cx);for(var wx in yx)bx.hasOwnProperty(wx)||(bx[wx]=yx[wx]);function Tx(e){var t=!(xx&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Sx&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?bx:yx)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var Ex=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Dx=typeof navigator<`u`&&/Win/.test(navigator.platform);function Ox(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++){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))Ex?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}function kx(e){let t=Object.create(null);for(let n in e)t[Ox(n)]=e[n];return t}function Ax(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function jx(e){return new Qh({props:{handleKeyDown:Mx(e)}})}function Mx(e){let t=kx(e);return function(e,n){let r=Tx(n),i,a=t[Ax(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[Ax(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(Dx&&n.ctrlKey&&n.altKey)&&(i=yx[n.keyCode])&&i!=r){let r=t[Ax(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}var Nx=200,Px=function(){};Px.prototype.append=function(e){return e.length?(e=Px.from(e),!this.length&&e||e.length<Nx&&this.leafAppend(e)||this.length<Nx&&e.leafPrepend(this)||this.appendInner(e)):this},Px.prototype.prepend=function(e){return e.length?Px.from(e).append(this):this},Px.prototype.appendInner=function(e){return new Ix(this,e)},Px.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Px.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Px.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Px.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Px.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},Px.from=function(e){return e instanceof Px?e:e&&e.length?new Fx(e):Px.empty};var Fx=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=Nx)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=Nx)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Px);Px.empty=new Fx([]);var Ix=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(Px),Lx=500,Rx=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step)i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);else{if(i){u.push(new Bx(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new Bx(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1}},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new Bx(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>Hx&&(s=zx(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new Tm;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new Bx(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;n=Math.min(this.items.length,n);let r=[],i=this.items.length-n,a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new Bx(i,o,l))}else r.push(new Bx(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new Bx(a.maps[e]));let u=this.items.slice(0,i).append(l).append(r),d=new e(u,s);return d.emptyItemCount()>Lx&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new Bx(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(Px.from(i.reverse()),a)}};Rx.empty=new Rx(Px.empty,0);function zx(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var Bx=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},Vx=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},Hx=20;function Ux(e,t,n,r){let i=n.getMeta(Qx),a;if(i)return i.historyState;n.getMeta($x)&&(e=new Vx(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(Qx))return o.getMeta(Qx).redo?new Vx(e.done.addTransform(n,void 0,r,Xx(t)),e.undone,Gx(n.mapping.maps),e.prevTime,e.prevComposition):new Vx(e.done,e.undone.addTransform(n,void 0,r,Xx(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Wx(n,e.prevRanges)),s=o?Kx(e.prevRanges,n.mapping):Gx(n.mapping.maps);return new Vx(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,Xx(t)),Rx.empty,s,n.time,i??e.prevComposition)}return(a=n.getMeta(`rebased`))?new Vx(e.done.rebased(n,a),e.undone.rebased(n,a),Kx(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Vx(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Kx(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function Wx(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function Gx(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function Kx(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function qx(e,t,n){let r=Xx(t),i=Qx.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new Vx(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(Qx,{redo:n,historyState:c})}var Jx=!1,Yx=null;function Xx(e){let t=e.plugins;if(Yx!=t){Jx=!1,Yx=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){Jx=!0;break}}return Jx}function Zx(e){return e.setMeta($x,!0)}var Qx=new tg(`history`),$x=new tg(`closeHistory`);function eS(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Qh({key:Qx,state:{init(){return new Vx(Rx.empty,Rx.empty,null,0,-1)},apply(t,n,r){return Ux(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?nS:n==`historyRedo`?rS:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function tS(e,t){return(n,r)=>{let i=Qx.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=qx(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var nS=tS(!1,!0),rS=tS(!0,!0);function iS(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 aS=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:iS({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}},oS=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{if(!e.isDestroyed){var n;t.dom.blur(),(n=window)==null||(n=n.getSelection())==null||n.removeAllRanges()}}),!0),sS=(e=!0)=>({commands:t})=>t.setContent(``,{emitUpdate:e}),cS=()=>({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=Um(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},lS=e=>t=>e(t),uS=()=>({state:e,dispatch:t})=>xg(e,t),dS=(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 Z(r.doc.resolve(Math.max(o-1,0)))),!0},fS=()=>({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 pS(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 mS=e=>({tr:t,state:n,dispatch:r})=>{let i=pS(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},hS=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},gS=e=>e.content?/^text(\*|\+)/.test(e.content):!1,_S=(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 gS(r)?n===`left`?e.start()-1:e.end()+1:e.pos},vS=(e,t,n)=>({from:_S(e,n,`left`),to:_S(t,n,`right`)}),yS=()=>({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}=vS(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(Z.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),t(n)}return!0},bS=()=>({commands:e})=>e.keyboardShortcut(`Enter`),xS=()=>({state:e,dispatch:t})=>bg(e,t);function SS(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function CS(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:SS(t[r])?t[r].test(e[r]):t[r]===e[r])}function wS(e,t,n={}){return e.find(e=>e.type===t&&CS(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function TS(e,t,n={}){return!!wS(e,t,n)}function ES(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(!wS([...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&&TS([...e.parent.child(i-1).marks],t,n);)--i,a-=e.parent.child(i).nodeSize;for(;o<e.parent.childCount&&TS([...e.parent.child(o).marks],t,n);)s+=e.parent.child(o).nodeSize,o+=1;return{from:a,to:s}}function DS(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 OS=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=DS(e,r.schema),{doc:o,selection:s}=n,{$from:c,from:l,to:u}=s;if(i){let e=ES(c,a,t);if(e&&e.from<=l&&e.to>=u){let t=Z.create(o,e.from,e.to);n.setSelection(t)}}return!0},kS=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 AS(e){return e instanceof Z}function jS(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function MS(e,t=null){if(!t)return null;let n=jh.atStart(e),r=jh.atEnd(e);if(t===`start`||t===!0)return n;if(t===`end`)return r;let i=n.from,a=r.to;return t===`all`?Z.create(e,jS(0,i,a),jS(e.content.size,i,a)):Z.create(e,jS(t,i,a),jS(t,i,a))}function NS(){return[`Android`].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function PS(){return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}function FS(){return typeof navigator<`u`&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var IS=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:a})=>{t={scrollIntoView:!0,...t};let o=()=>{(PS()||NS())&&r.dom.focus(),FS()&&!PS()&&!NS()&&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&&!AS(n.state.selection))return o(),!0;let s=MS(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},LS=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),RS=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),zS=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&&zS(r)}return e};function BS(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 zS(n)}function VS(e){return typeof e?.nodesBetween==`function`}function HS(e,t,n){if(VS(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 Y.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),HS(``,t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i=``,a=new Up({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?qp.fromSchema(a).parseSlice(BS(e),n.parseOptions):qp.fromSchema(a).parse(BS(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error(`[tiptap error]: Invalid HTML content`,{cause:Error(`Invalid element found: ${i}`)})}let r=qp.fromSchema(t);return n.slice?r.parseSlice(BS(e),n.parseOptions).content:r.parse(BS(e),n.parseOptions)}return HS(``,t,n)}function US(e){return!(`type`in e)}function WS(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Im||i instanceof Lm))return;let a=e.mapping.maps[r],o=0;a.forEach((e,t,n,r)=>{o===0&&(o=r)}),e.setSelection(jh.near(e.doc.resolve(o),n))}var GS=(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{HS(t,a.schema,{parseOptions:s,errorOnInvalidContent:!0})}catch(e){o(e)}try{i=HS(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=US(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(``):VS(t)?f.map(e=>e.text??``).join(``):typeof t==`object`&&t&&t.text?t.text:t,r.insertText(p,c,l);else{p=Y.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&&WS(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 KS(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 qS=(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=KS(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=HS(o,r.schema);f=l.createAndFill(d,e)}else f=l.createAndFill(d);return f?(n&&(t.insert(c.pos,f),s&&WS(t,t.steps.length-1,-1)),!0):!1},JS=()=>({state:e,dispatch:t})=>hg(e,t),YS=()=>({state:e,dispatch:t})=>gg(e,t),XS=()=>({state:e,dispatch:t})=>ig(e,t),ZS=()=>({state:e,dispatch:t})=>fg(e,t),QS=(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},$S=()=>({state:e,dispatch:t,tr:n})=>{try{let r=oh(e.doc,e.selection.$from.pos,-1);return r==null||!QS(e.doc,r)?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},eC=()=>({state:e,dispatch:t,tr:n})=>{try{let r=oh(e.doc,e.selection.$from.pos,1);return r==null||!QS(e.doc,r)?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},tC=()=>({state:e,dispatch:t})=>ag(e,t),nC=()=>({state:e,dispatch:t})=>og(e,t);function rC(){return typeof navigator<`u`&&/Mac/.test(navigator.platform)}function iC(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))PS()||rC()?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 aC=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let a=iC(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 oC(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?pS(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=>CS(e.node.attrs,n,{strict:!1}));return a?!!l.length:l.reduce((e,t)=>e+t.to-t.from,0)>=c}var sC=(e,t={})=>({state:n,dispatch:r})=>oC(n,pS(e,n.schema),t)?_g(n,r):!1,cC=()=>({state:e,dispatch:t})=>Sg(e,t),lC=e=>({state:t,dispatch:n})=>Hg(pS(e,t.schema))(t,n),uC=()=>({state:e,dispatch:t})=>vg(e,t);function dC(e,t){return t.nodes[e]?`node`:t.marks[e]?`mark`:null}function fC(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 pC=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=dC(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=pS(e,r.schema)),s===`mark`&&(o=DS(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,fC(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(fC(a.attrs,t))))})})}),c},mC=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),hC=()=>({tr:e,dispatch:t})=>{if(t){let t=new Rh(e.doc);e.setSelection(t)}return!0},gC=()=>({state:e,dispatch:t})=>lg(e,t),_C=()=>({state:e,dispatch:t})=>pg(e,t),vC=()=>({state:e,dispatch:t})=>Tg(e,t),yC=()=>({state:e,dispatch:t})=>jg(e,t),bC=()=>({state:e,dispatch:t})=>Ag(e,t);function xC(e,t,n={},r={}){return HS(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var SC=(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=xC(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});if(o){let e=US(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 CC(e,t){let n=DS(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 wC(e,t){let n=new kh(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function TC(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&r.push({node:e,pos:t})}),r}function EC(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 DC(e){return t=>EC(t.$from,e)}function OC(e,t,n){return e.config[t]===void 0&&e.parent?OC(e.parent,t,n):typeof e.config[t]==`function`?e.config[t].bind({...n,parent:e.parent?OC(e.parent,t,n):null}):e.config[t]}function kC(e){return e.map(e=>{let t=OC(e,`addExtensions`,{name:e.name,options:e.options,storage:e.storage});return t?[e,...kC(t())]:e}).flat(10)}function AC(e,t){let n=sm.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement(`div`);return r.appendChild(n),r.innerHTML}function jC(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 MC={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`},NC={inclusive:`boolean`,excludes:`string`,group:`string`,spanning:`boolean`,code:`boolean`};function PC(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 FC(e,t,n,r){return{...Object.fromEntries(Object.entries(t).filter(([e])=>e!==`attrs`&&!Object.hasOwn(r,e))),...PC(n,r,e),attrs:n.attrs}}function IC(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 LC(e,t){IC(e.nodes,t.nodes,`node`),IC(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,FC(t,e.nodes[t],r,MC))}),t.spec.marks.forEach((t,n)=>{r=r.update(t,FC(t,e.marks[t],n,NC))}),{topNode:t.topNodeType.name,nodes:n,marks:r}}function RC(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return Array.from(new Set(t))}function zC(e){return{baseExtensions:e.filter(e=>e.type===`extension`),nodeExtensions:e.filter(e=>e.type===`node`),markExtensions:e.filter(e=>e.type===`mark`)}}function BC(e){let t=[],{nodeExtensions:n,markExtensions:r}=zC(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=OC(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=OC(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 VC(e){return typeof e==`function`}function HC(e,t=void 0,...n){return VC(e)?t?e.bind(t)(...n):e(...n):e}function UC(e={}){return Object.keys(e).length===0&&e.constructor===Object}function WC(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 GC(e){let t=[],n=WC(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 KC(...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([...GC(n[e]),...GC(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join(`; `)}else n[e]=t}),n},{})}function qC(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)=>KC(e,t),{})}function JC(e){return typeof e==`string`?e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e===`true`||e!==`false`&&e:e}function YC(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):JC(n.getAttribute(t.name));return r==null?e:{...e,[t.name]:r}},{});return{...r,...i}}}}function XC(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>e===`attrs`&&UC(t)?!1:t!=null))}function ZC(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 QC(e,t,n=BC(e)){let{nodeExtensions:r,markExtensions:i}=zC(e);return{topNode:r.find(e=>OC(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=XC({...e.reduce((e,t)=>{let n=OC(t,`extendNodeSchema`,a);return{...e,...n?n(r):{}}},{}),content:HC(OC(r,`content`,a)),marks:HC(OC(r,`marks`,a)),group:HC(OC(r,`group`,a)),inline:HC(OC(r,`inline`,a)),atom:HC(OC(r,`atom`,a)),selectable:HC(OC(r,`selectable`,a)),draggable:HC(OC(r,`draggable`,a)),code:HC(OC(r,`code`,a)),whitespace:HC(OC(r,`whitespace`,a)),linebreakReplacement:HC(OC(r,`linebreakReplacement`,a)),defining:HC(OC(r,`defining`,a)),isolating:HC(OC(r,`isolating`,a)),attrs:Object.fromEntries(i.map(ZC))}),s=HC(OC(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>YC(e,i)));let c=OC(r,`renderHTML`,a);c&&(o.toDOM=e=>c({node:e,HTMLAttributes:qC(e,i)}));let l=OC(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=XC({...e.reduce((e,t)=>{let n=OC(t,`extendMarkSchema`,a);return{...e,...n?n(r):{}}},{}),inclusive:HC(OC(r,`inclusive`,a)),excludes:HC(OC(r,`excludes`,a)),group:HC(OC(r,`group`,a)),spanning:HC(OC(r,`spanning`,a)),code:HC(OC(r,`code`,a)),attrs:Object.fromEntries(i.map(ZC))}),s=HC(OC(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>YC(e,i)));let c=OC(r,`renderHTML`,a);return c&&(o.toDOM=e=>c({mark:e,HTMLAttributes:qC(e,i)})),[r.name,o]}))}}function $C(e,t,n){if(n===void 0)return new Up(QC(e,t));let r=RC(e.filter(e=>e.type!==`extension`).map(e=>e.name));if(r.length)throw RangeError(`Duplicate local schema types: ${r.join(`, `)}`);let i=new Up(n);return new Up(LC(QC(e,t,jC(BC(e),i)),i))}function ew(e){return e.sort((e,t)=>{let n=OC(e,`priority`)||100,r=OC(t,`priority`)||100;return n>r?-1:+(n<r)})}function tw(e){let t=ew(kC(e)),n=RC(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 nw(e,t){return $C(tw(e),t)}function rw(e,t,n){let{from:r,to:i}=t,{blockSeparator:a=`
69
-
70
- `,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 iw(e,t){return rw(e,{from:0,to:e.content.size},t)}function aw(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function ow(e,t){let n=pS(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 sw(e,t){let n=dC(typeof t==`string`?t:t.name,e.schema);return n===`node`?ow(e,t):n===`mark`?CC(e,t):{}}function cw(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 lw(e){let t=cw(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 uw(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}})})}),lw(r)}function dw(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=ES(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 fw(e,t){return t.nodes[e]||t.marks[e]||null}function pw(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 mw=(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 hw(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?DS(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!a||a.name===e.type.name).find(e=>CS(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=>CS(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 gw(e,t,n={}){if(!t)return oC(e,null,n)||hw(e,null,n);let r=dC(t,e.schema);return r===`node`?oC(e,t,n):r===`mark`&&hw(e,t,n)}function _w(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function vw(e,t){let{nodeExtensions:n}=zC(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=HC(OC(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`&&i.split(` `).includes(`list`)}function yw(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&&(yw(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function bw(e){return e instanceof Ih}function xw(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 Sw(e){if(typeof e!=`object`||!e)return!1;let t=e;if(!xw(t))return!1;let n=t.toJSON();return!(typeof n!=`object`||!n||n.stepType!==`replace`)}var Cw=class e{constructor(e){this.position=e}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}};function ww(e,t){let n=t.mapping.mapResult(e.position);return{position:new Cw(n.pos),mapResult:n}}function Tw(e){return new Cw(e)}function Ew(e,t,n){let r=e.state.doc.content.size,i=jS(t,0,r),a=jS(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 Dw(e,t,n){let{selection:r}=t,i=null;if(AS(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 Ow=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=DS(e,r.schema);if(i){if(o){let e=CC(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 Dw(r,n,c)},kw=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Aw=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=pS(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>Ng(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>Ng(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},jw=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=jS(e,0,n.content.size),i=Ih.create(n,r);t.setSelection(i)}return!0},Mw=(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},Nw=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=Z.atStart(n).from,o=Z.atEnd(n).to,s=jS(r,a,o),c=jS(i,a,o),l=Z.create(n,s,c);t.setSelection(l)}return!0},Pw=e=>({state:t,dispatch:n})=>Gg(pS(e,t.schema))(t,n);function Fw(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 Iw=({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=pw(l,s.node().type.name,s.node().attrs);if(a instanceof Ih&&a.node.isBlock)return!s.parentOffset||!th(o,s.pos)?!1:(r&&(e&&Fw(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:KS(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=a instanceof Z&&!a.empty?Xh.create({doc:t.doc,selection:a}).tr.deleteSelection():null,h=m?m.doc:t.doc,g=m?m.mapping.map(s.pos):s.pos,_=th(h,g,1,p);if(!p&&!_&&th(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 Z&&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&&Fw(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return _},Lw=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=pS(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=Y.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=Y.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={...pw(d,s.node().type.name,s.node().attrs),...t},c=o.contentMatch.defaultType?.createAndFill(a)||void 0;e=e.append(Y.from(o.createAndFill(null,c)||void 0));let l=s.before(s.depth-(r-1));n.replace(l,s.after(-i),new X(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(Z.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...pw(d,u.type.name,u.attrs),...t},m={...pw(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(!th(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 Rw(e,t,n){if(!e.validContent(t))return null;try{return e.create(n,t)}catch{return null}}function zw(e,t){if(e.pendingContent.length===0)return!0;let n=Rw(t,Y.from(e.pendingContent));return n?(e.items.push(n),e.pendingContent=[],!0):!1}function Bw(e,t,n){return n.validContent(Y.from([...t.pendingContent,e]))?(t.pendingContent.push(e),!0):!zw(t,n)||!n.validContent(Y.from(e))?!1:(t.pendingContent.push(e),!0)}function Vw(e,t,n,r){let i=r(e,n);if(!i)return!1;let a=Rw(n.listType,Y.from(i),e.attrs);return a?n.itemType.validContent(Y.from([...t.pendingContent,a]))?(t.pendingContent.push(a),!0):zw(t,n.itemType)?(t.items.push(...i),!0):!1:!1}function Hw(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)?Vw(a,r,t,n):Bw(a,r,t.itemType)))return null}return zw(r,t.itemType)?r.items:null}function Uw(e,t){let n=[];for(let r=0;r<e.childCount;r+=1){let i=Hw(e.child(r),t,Uw);if(!i)return null;n.push(...i)}return n}function Ww(e,t){let n=null;return e.descendants((e,r)=>e!==t||(n=r,!1)),n}function Gw(e){return!e||e===`1`?null:e}function Kw(e,t){return Gw(e)===Gw(t)}var qw=(e,t)=>{let n=DC(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&&rh(e.doc,n.pos))||!Kw(n.node.attrs.type,i?.attrs.type)||e.join(n.pos),!0},Jw=(e,t)=>{let n=DC(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&&rh(e.doc,r))||!Kw(n.node.attrs.type,i?.attrs.type)||e.join(r),!0};function Yw(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return Z.between(r,i)}var Xw=(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=pS(e,o.schema),m=pS(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=DC(e=>vw(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&&vw(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=Yw(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(vw(E.node.type.name,d)&&p.validContent(E.node.content))return c().command(()=>(a.setNodeMarkup(E.pos,p),!0)).command(()=>qw(a,p)).command(()=>Jw(a,p)).run();if(vw(E.node.type.name,d)){let e=E.node.firstChild?.type;if(e&&e!==m){let e=Uw(E.node,{listType:p,itemType:m,isListNode:e=>vw(e.type.name,d)}),t=e?Y.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=Ww(l,i),t=Ww(l,o);if(e!==null&&t!==null){let n=E.pos+e+2+s,r=E.pos+t+2+c;a.setSelection(Z.create(a.doc,n,r))}}return!0}).command(()=>qw(a,p)).command(()=>Jw(a,p)).run()}}}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>qw(a,p)).command(()=>Jw(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(()=>qw(a,p)).command(()=>Jw(a,p)).run()},Zw=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=DS(e,r.schema);return hw(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},Qw=(e,t,n={})=>({state:r,commands:i})=>{let a=pS(e,r.schema),o=pS(t,r.schema),s=oC(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})},$w=(e,t={})=>({state:n,commands:r})=>{let i=pS(e,n.schema);return oC(n,i,t)?r.lift(i):r.wrapIn(i,t)},eT=()=>({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},tT=(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},nT=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=DS(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=ES(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},rT=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},iT=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=dC(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=pS(e,r.schema)),s===`mark`&&(o=DS(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},aT=new tg(`__tiptap_decorations__`),oT=e=>({tr:t,dispatch:n})=>(n&&t.setMeta(aT,{type:`force`,name:e}),!0),sT=(e,t={})=>({state:n,dispatch:r})=>Mg(pS(e,n.schema),t)(n,r),cT=(e,t={})=>({state:n,dispatch:r})=>zg(pS(e,n.schema),t)(n,r),lT=Uf({blur:()=>oS,clearContent:()=>sS,clearNodes:()=>cS,command:()=>lS,createParagraphNear:()=>uS,cut:()=>dS,deleteCurrentNode:()=>fS,deleteNode:()=>mS,deleteRange:()=>hS,deleteSelection:()=>yS,enter:()=>bS,exitCode:()=>xS,extendMarkRange:()=>OS,first:()=>kS,focus:()=>IS,forEach:()=>LS,insertContent:()=>RS,insertContentAt:()=>GS,insertDefaultBlock:()=>qS,joinBackward:()=>XS,joinDown:()=>YS,joinForward:()=>ZS,joinItemBackward:()=>$S,joinItemForward:()=>eC,joinTextblockBackward:()=>tC,joinTextblockForward:()=>nC,joinUp:()=>JS,keyboardShortcut:()=>aC,lift:()=>sC,liftEmptyBlock:()=>cC,liftListItem:()=>lC,newlineInCode:()=>uC,resetAttributes:()=>pC,scrollIntoView:()=>mC,selectAll:()=>hC,selectNodeBackward:()=>gC,selectNodeForward:()=>_C,selectParentNode:()=>vC,selectTextblockEnd:()=>yC,selectTextblockStart:()=>bC,setContent:()=>SC,setMark:()=>Ow,setMeta:()=>kw,setNode:()=>Aw,setNodeSelection:()=>jw,setTextDirection:()=>Mw,setTextSelection:()=>Nw,sinkListItem:()=>Pw,splitBlock:()=>Iw,splitListItem:()=>Lw,toggleList:()=>Xw,toggleMark:()=>Zw,toggleNode:()=>Qw,toggleWrap:()=>$w,undoInputRule:()=>eT,unsetAllMarks:()=>tT,unsetMark:()=>nT,unsetTextDirection:()=>rT,updateAttributes:()=>iT,updateDecorations:()=>oT,wrapIn:()=>sT,wrapInList:()=>cT}),uT=new WeakMap;function dT(e,t){uT.set(e,(uT.get(e)??0)+1);try{return t()}finally{let t=(uT.get(e)??1)-1;t>0?uT.set(e,t):uT.delete(e)}}function fT(e){return uT.has(e)}var pT=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={}}},mT=typeof process<`u`&&!1;function hT(e){return e.kind===`widget`}function gT(e,t){let n=[],r=new Set;for(let i of e)i.kind===`widget`&&hT(i)&&r.add(i.key),n.push(i.toPMDecoration(t));return{decorations:n,widgetKeys:r}}function _T(e,t,n){let{decorations:r,widgetKeys:i}=gT(t,n);return{set:jb.create(e,r),widgetKeys:i}}function vT({position:e,from:t,to:n,docSize:r}){return e<t?!1:e<n||e===n&&n===r}function yT({decorations:e,from:t,to:n,docSize:r,extensionName:i,warnedExtensions:a}){return e.filter(e=>vT({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 bT(e){let t=e.spec?.key;return typeof t==`string`?t:void 0}function xT(e){let t=new Map,n=new Map;for(let r of e.find()){let e=bT(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 ST(e){return e.jsonID===`attr`}function CT(e){let t=!1;if(e.getMap().forEach(()=>{t=!0}),t||ST(e))return!0;let n=e;return typeof n.from==`number`&&typeof n.to==`number`}function wT(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 TT(e,t){if(e.steps.some(e=>!CT(e)))return{type:`full`};let n=uw(e).map(({newRange:e})=>e);e.steps.forEach((t,r)=>{if(!ST(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=wT(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 ET(e,t,n,r){return e.map(t,n,{onRemove:e=>{let t=e?.key;typeof t==`string`&&r.delete(t)}})}function DT(e,t,n){let r=t.decorationSetsByExtension[e]??jb.empty,i=new Set(t.widgetKeysByExtension[e]??[]);return{set:ET(r,n.mapping,n.doc,i),widgetKeys:i}}function OT(e,t){let n=Object.values(t).flatMap(e=>e.find());return jb.create(e,n)}function kT(e){let t=new Set;for(let n of Object.values(e))for(let e of n)t.add(e);return t}function AT(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 jT(e,t,n){return n?!0:e.update===`manual`?!1:e.shouldUpdate?e.shouldUpdate(t):t.tr.docChanged}var MT=new Set,NT=class{constructor(e){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:e})=>{let t=aT.getState(e);t&&this.warnDuplicateWidgetKeys(t)},this.editor=e.editor,this.entries=this.resolveEntries(e.entries),this.entries.forEach(({name:e,spec:t})=>AT(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 aT.getState(this.editor.state)?.widgetKeys??MT}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 Qh({key:aT,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:kT(i)};return this.warnDuplicateWidgetKeys(a),a},apply:(n,r,i,a)=>{let o=n.getMeta(aT),s=o?.type===`force`&&!o.name,c=o?.type===`force`?o.name:void 0,l={},u={},d=new Set;return dT(e,()=>{for(let{name:o,spec:f}of t){let t=s||c===o;if(!jT(f,{editor:e,tr:n,oldState:i,newState:a},t)){let e=DT(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:kT(u)}}},props:{decorations(e){return aT.getState(e)?.mergedDecorationSet??jb.empty}}})}applyChangedRangesRecompute(e,t,n,r,i){let a=TT(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]??jb.empty,s=new Set(n.widgetKeysByExtension[e]??[]),c=ET(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=>vT({position:e.from,from:n,to:r,docSize:l}));for(let e of a){let t=bT(e);t&&s.delete(t)}c=c.remove(a);let{decorations:o,widgetKeys:u}=gT(yT({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 _T(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(!mT)return;if(e.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let t=xT(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]]:OT(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):OT(n.doc,r)}};function PT(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 FT(e){return typeof e==`number`}function IT(e){return Object.prototype.toString.call(e).slice(8,-1)}function LT(e){return IT(e)===`Object`&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function RT(e,t){let n={...e};return LT(e)&&LT(t)&&Object.keys(t).forEach(r=>{LT(t[r])&&LT(e[r])?n[r]=RT(e[r],t[r]):n[r]=t[r]}),n}function zT(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 BT=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},VT=(e,t)=>{if(SS(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 HT(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:Xh.create({doc:o.doc,selection:o.selection,storedMarks:o.storedMarks}).tr}}function UT(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}=HT({editor:t,from:n,to:r,text:i,insertText:c}),f=u?n+i.length:r,p=iS({state:l.state,transaction:d}),m={from:n-(o[0].length-i.length),to:f},{commands:h,chain:g,can:_}=new aS({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))||(Zx(d),d.setMeta(`inputRule`,!0),a.undoable&&d.setMeta(s,{transform:d,from:n,to:f,text:i}),l.dispatch(d)),!0)}function WT(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 GT(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=mw(l)+i;for(let e of a){let a=VT(u,e.find);if(a&&WT(l,a,i)&&UT({editor:t,from:n,to:r,text:i,rule:e,match:a,plugin:o,insertText:s}))return!0}return!1}function KT(e){let{editor:t,rules:n}=e,r=new Qh({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:AC(Y.from(e),a.schema);let{from:i}=s,o=i+e.length;GT({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 GT({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&&GT({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?GT({editor:t,from:a.pos,to:a.pos,text:`
71
- `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var qT=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{...HC(OC(this,`addOptions`,{name:this.name}))}}get storage(){return{...HC(OC(this,`addStorage`,{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>RT(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}},JT=class e extends qT{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)}},YT=class{constructor(e){this.find=e.find,this.handler=e.handler}},XT=(e,t,n)=>{if(SS(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 ZT(e){let{editor:t,state:n,from:r,to:i,rule:a,pasteEvent:o,dropEvent:s}=e,{commands:c,chain:l,can:u}=new aS({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||XT(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 QT=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 eE(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=iS({state:e,transaction:c});if(ZT({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`,()=>{QT===t&&(QT=null)}),n.map(e=>new Qh({view(e){let n=n=>{r=e.dom.parentElement?.contains(n.target)?e.dom.parentElement:null,r&&(QT=t)},i=()=>{QT&&=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=QT;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:AC(Y.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(FT(p)&&m&&p!==m.b)return c({rule:e,state:r,from:p,to:m,pasteEvt:o})}}))}var tE=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=t,this.baseExtensions=e,this.extensions=tw(e),this.hasSchemaSpec=t.options.schemaSpec!==void 0,this.schema=$C(this.extensions,t,t.options.schemaSpec),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=OC(t,`addCommands`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:fw(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this,t=ew([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:fw(t.name,this.schema)},r=[],i=OC(t,`addKeyboardShortcuts`,n),a={};if(t.type===`mark`&&OC(t,`exitable`,n)&&(a.ArrowRight=()=>JT.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=jx(a);r.push(o);let s=OC(t,`addInputRules`,n);if(_w(t,e.options.enableInputRules)&&s){let t=s();if(t&&t.length){let n=KT({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let c=OC(t,`addPasteRules`,n);if(_w(t,e.options.enablePasteRules)&&c){let t=c();if(t&&t.length){let n=eE({editor:e,rules:t});r.push(...n)}}let l=OC(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=OC(e,`addDecorations`,{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:fw(e.name,this.schema)});r&&n.push({name:e.name,addDecorations:r})}),this.decorationManager=new NT({editor:t,entries:n}),this.decorationManager.plugin}get attributes(){let e=BC(this.extensions);return this.hasSchemaSpec?jC(e,this.schema):e}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=zC(this.extensions);return Object.fromEntries(t.filter(e=>!!OC(e,`addNodeView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=OC(t,`addNodeView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:pS(t.name,this.schema)});if(!r)return[];let i=r();return i?[t.name,(r,a,o,s,c)=>{let l=qC(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 ew([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:fw(n.name,this.schema)},i=OC(n,`dispatchTransaction`,r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return ew([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:fw(n.name,this.schema)},i=OC(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}=zC(this.extensions);return Object.fromEntries(t.filter(e=>!!OC(e,`addMarkView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=OC(t,`addMarkView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:DS(t.name,this.schema)});return r?[t.name,(i,a,o)=>{let s=qC(i,n);return r()({mark:i,view:a,inline:o,editor:e,extension:t,HTMLAttributes:s,updateAttributes:t=>{zT(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:fw(e.name,this.schema)};e.type===`mark`&&((HC(OC(e,`keepOnSplit`,t))??!0)&&this.splittableMarks.push(e.name),(HC(OC(e,`clearable`,t))??!0)||this.nonClearableMarks.push(e.name));let n=OC(e,`onBeforeCreate`,t),r=OC(e,`onCreate`,t),i=OC(e,`onUpdate`,t),a=OC(e,`onSelectionUpdate`,t),o=OC(e,`onTransaction`,t),s=OC(e,`onFocus`,t),c=OC(e,`onBlur`,t),l=OC(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)})}};tE.resolve=tw,tE.sort=ew,tE.flatten=kC;var nE=class e extends qT{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)}},rE=nE.create({name:`clipboardTextSerializer`,addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Qh({key:new tg(`clipboardTextSerializer`),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,a=aw(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})=>rw(r,{from:e.pos,to:t.pos},s)).join(o??`
72
-
73
- `)}}})]}}),iE=nE.create({name:`commands`,addCommands(){return{...lT}}}),aE=nE.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=wC(e.before,[e,...t]);uw(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 jm){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()}}),oE=nE.create({name:`drop`,addProseMirrorPlugins(){return[new Qh({key:new tg(`tiptapDrop`),props:{handleDrop:(e,t,n,r)=>{this.editor.emit(`drop`,{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),sE=nE.create({name:`editable`,addProseMirrorPlugins(){return[new Qh({key:new tg(`editable`),props:{editable:()=>this.editor.options.editable}})]}}),cE=new tg(`focusEvents`),lE=nE.create({name:`focusEvents`,addProseMirrorPlugins(){let{editor:e}=this;return[new Qh({key:cE,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}}}})]}}),uE=nE.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:jh.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 PS()||rC()?i:r},addProseMirrorPlugins(){return[new Qh({key:new tg(`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=jh.atStart(t.doc).from,l=jh.atEnd(t.doc).to;if(a||o!==c||s!==l||!yw(n.doc))return;let u=n.tr,d=iS({state:n,transaction:u}),{commands:f}=new aS({editor:this.editor,state:d});if(f.clearNodes(),u.steps.length)return u}})]}}),dE=nE.create({name:`paste`,addProseMirrorPlugins(){return[new Qh({key:new tg(`tiptapPaste`),props:{handlePaste:(e,t,n)=>{this.editor.emit(`paste`,{editor:this.editor,event:t,slice:n})}}})]}}),fE=nE.create({name:`tabindex`,addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new Qh({key:new tg(`tabindex`),props:{attributes:()=>!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:this.options.value??`0`}}})]}}),pE=nE.create({name:`textDirection`,addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=zC(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 Qh({key:new tg(`textDirection`),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),mE=Uf({ClipboardTextSerializer:()=>rE,Commands:()=>iE,Delete:()=>aE,Drop:()=>oE,Editable:()=>sE,FocusEvents:()=>lE,Keymap:()=>uE,Paste:()=>dE,Tabindex:()=>fE,TextDirection:()=>pE,focusEventsPluginKey:()=>cE}),hE=!1;function gE(e){if(hE)return;hE=!0;let t;try{let n=Im.fromJSON(e,{from:0,to:0});if(!Sw(n))return;t=n.slice.content}catch{return}t instanceof Y||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 _E=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)}},vE=`.ProseMirror {
74
- position: relative;
75
- }
76
-
77
- .ProseMirror {
78
- word-wrap: break-word;
79
- white-space: pre-wrap;
80
- white-space: break-spaces;
81
- -webkit-font-variant-ligatures: none;
82
- font-variant-ligatures: none;
83
- font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
84
- }
85
-
86
- .ProseMirror [contenteditable="false"] {
87
- white-space: normal;
88
- }
89
-
90
- .ProseMirror [contenteditable="false"] [contenteditable="true"] {
91
- white-space: pre-wrap;
92
- }
93
-
94
- .ProseMirror pre {
95
- white-space: pre-wrap;
96
- }
97
-
98
- img.ProseMirror-separator {
99
- display: inline !important;
100
- border: none !important;
101
- margin: 0 !important;
102
- width: 0 !important;
103
- height: 0 !important;
104
- }
105
-
106
- .ProseMirror-gapcursor {
107
- display: none;
108
- pointer-events: none;
109
- position: absolute;
110
- margin: 0;
111
- }
112
-
113
- .ProseMirror-gapcursor:after {
114
- content: "";
115
- display: block;
116
- position: absolute;
117
- top: -2px;
118
- width: 20px;
119
- border-top: 1px solid black;
120
- animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
121
- }
122
-
123
- @keyframes ProseMirror-cursor-blink {
124
- to {
125
- visibility: hidden;
126
- }
127
- }
128
-
129
- .ProseMirror-hideselection *::selection {
130
- background: transparent;
131
- }
132
-
133
- .ProseMirror-hideselection *::-moz-selection {
134
- background: transparent;
135
- }
136
-
137
- .ProseMirror-hideselection * {
138
- caret-color: transparent;
139
- }
140
-
141
- .ProseMirror-focused .ProseMirror-gapcursor {
142
- display: block;
143
- }`,yE=class extends pT{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:ww,createMappablePosition:Tw},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=MS(t,this.options.autofocus);this.editorState=Xh.create({doc:t,schema:this.schema,selection:e||void 0})}gE(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():aS.createFakeChain()}can(){return this.commandManager?this.commandManager.can():aS.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<`u`&&(this.css=PT(vE,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 mT&&!this.hasWarnedStaleDecorationRead&&fT(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=VC(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?[sE,rE.configure({blockSeparator:(e=this.options.coreExtensionOptions)==null||(e=e.clipboardTextSerializer)==null?void 0:e.blockSeparator}),iE,lE,uE,fE.configure({value:(t=this.options.coreExtensionOptions)==null||(t=t.tabindex)==null?void 0:t.value}),oE,dE,aE,pE.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 tE(n,this)}createCommandManager(){this.commandManager=new aS({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=xC(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=xC(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Xh.create({doc:t,schema:this.schema,selection:MS(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 VC(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 dx(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 sw(this.state,e)}isActive(e,t){let n=typeof e==`string`?e:null,r=typeof e==`string`?t:e;return gw(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return AC(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
144
-
145
- `,textSerializers:n={}}=e||{};return iw(this.state.doc,{blockSeparator:t,textSerializers:{...aw(this.schema),...n}})}get isEmpty(){return yw(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 _E(t,this,!1,n)}get $doc(){return this.$pos(0)}};function bE(e){return new BT({find:e.find,handler:({state:t,range:n,match:r})=>{let i=HC(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(dw(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 xE=class e extends qT{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)}},SE=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=Ih.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=Ih.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`&&(PS()||NS())&&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 CE(e){return new YT({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=HC(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(dw(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 wE=`annotation`;function TE(e){return e&&e.options.extensions.some(e=>{if(e.type!==`mark`)return!1;let t=OC(e,`group`);return typeof t==`string`&&t.split(` `).includes(`annotation`)})?wE:``}var EE=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=DE(e)?e(this.prevState):e,AE(this)}_notify(){let e={prevVal:this.prevState,currentVal:this.state};for(let t of this.listeners)t(e)}};function DE(e){return typeof e==`function`}var OE=!1,kE=new Set;function AE(e){kE.add(e);let t=!OE;OE=!0;try{if(e.options?.onUpdate?.(e.state,e.prevState),!t)return;for(;kE.size>0;){let e=Array.from(kE);kE.clear();for(let t of e)t._notify()}}finally{t&&(OE=!1,kE.clear())}}var jE=Symbol(`originalFactory`);function ME(e){if(typeof e==`object`&&`key`in e)return function t(){return e[jE]=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[jE]=t,i}}}function NE(e,t){return new EE(e,t)}crypto.subtle;var PE=crypto.getRandomValues.bind(crypto),FE=()=>PE(new Uint32Array(1))[0],IE=`10000000-1000-4000-8000-100000000000`,LE=()=>IE.replace(/[018]/g,e=>(e^FE()&15>>e/4).toString(16)),RE,zE;if(typeof WeakMap<`u`){let e=new WeakMap;RE=t=>e.get(t),zE=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;RE=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},zE=(n,r)=>(t==10&&(t=0),e[t++]=n,e[t++]=r)}var BE=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 RE(e)||zE(e,VE(e))}};function VE(e){if(e.type.spec.tableRole!=`table`)throw RangeError(`Not a table node: `+e.type.name);let t=HE(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 BE(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&&UE(s,o,e),s}function HE(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 UE(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||=WE(c))[n]=r)}s&&e.problems.unshift({type:`colwidth mismatch`,pos:a,colwidth:s})}}function WE(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function GE(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 KE=new tg(`selectingCells`);function qE(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 JE(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 YE(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 XE(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=qE(t.$head)||ZE(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function ZE(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 QE(e){return e.parent.type.spec.tableRole==`row`&&!!e.nodeAfter}function $E(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function eD(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function tD(e,t,n){let r=e.node(-1),i=BE.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 nD(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 rD(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 iD(e,t,n){let r=GE(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 aD=class e extends jh{constructor(e,t=e){let n=e.node(-1),r=BE.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 Mh(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(QE(r)&&QE(i)&&eD(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 Z.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=BE.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=nD(e,0,l)),u>0&&(e=nD(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(Y.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:a;return new X(Y.from(o),1,1)}replace(e,t=X.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?X.empty:t)}let i=jh.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new X(Y.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=BE.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=BE.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=BE.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=BE.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 oD(this.$anchorCell.pos,this.$headCell.pos)}};aD.prototype.visible=!1,jh.jsonID(`cell`,aD);var oD=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&&eD(t,n)?new aD(t,n):jh.near(n,1)}};function sD(e){if(!(e.selection instanceof aD))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(Ob.node(n,n+e.nodeSize,{class:`selectedCell`}))}),jb.create(e.doc,t)}function cD({$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 lD({$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 uD(e,t,n){let r=(t||e).selection,i=(t||e).doc,a,o;if(r instanceof Ih&&(o=r.node.type.spec.tableRole)){if(o==`cell`||o==`header_cell`)a=aD.create(i,r.from);else if(o==`row`){let e=i.resolve(r.from+1);a=aD.rowSelection(e,e)}else if(!n){let e=BE.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];a=aD.create(i,t+1,n)}}else r instanceof Z&&cD(r)?a=Z.create(i,r.from):r instanceof Z&&lD(r)&&(a=Z.create(i,r.$from.start(),r.$from.end()));return a&&(t||=e.tr).setSelection(a),t}var dD=new tg(`fix-tables`);function fD(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)?fD(e.child(s),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function pD(e,t){let n,r=(t,r)=>{t.type.spec.tableRole==`table`&&(n=mD(e,t,r,n))};return t?t.doc!=e.doc&&fD(t.doc,e.doc,0,r):e.doc.descendants(r),n}function mD(e,t,n,r){let i=BE.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,nD(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=GE(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(dD,{fixTables:!0})}function hD(e){let t=e.selection,n=XE(e),r=n.node(-1),i=n.start(-1),a=BE.get(r);return{...t instanceof aD?a.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):a.findCell(n.pos-i),tableStart:i,map:a,table:r}}function gD(e,{map:t,tableStart:n,table:r},i){let a=i>0?-1:0;iD(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,rD(c.attrs,i-t.colCount(a))),o+=c.attrs.rowspan-1}else{let c=a==null?GE(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 _D(e,t){if(!YE(e))return!1;if(t){let n=hD(e);t(gD(e.tr,n,n.left))}return!0}function vD(e,t){if(!YE(e))return!1;if(t){let n=hD(e);t(gD(e.tr,n,n.right))}return!0}function yD(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,nD(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 bD(e,t){if(!YE(e))return!1;if(t){let n=hD(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let e=n.right-1;yD(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=BE.get(e)}t(r)}return!0}function xD(e,t,n){let r=GE(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 SD(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;xD(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?GE(r.type.schema).cell:r.nodeAt(t.map[c+s*t.width])?.type)?.createAndFill();e&&o.push(e)}return e.insert(a,GE(r.type.schema).row.create(null,o)),e}function CD(e,t){if(!YE(e))return!1;if(t){let n=hD(e);t(SD(e.tr,n,n.top))}return!0}function wD(e,t){if(!YE(e))return!1;if(t){let n=hD(e);t(SD(e.tr,n,n.bottom))}return!0}function TD(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 ED(e,t){if(!YE(e))return!1;if(t){let n=hD(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;TD(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=BE.get(n.table)}t(r)}return!0}function DD(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function OD({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 kD(e,t){let n=e.selection;if(!(n instanceof aD)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=hD(e),{map:i}=r;if(OD(i,r))return!1;if(t){let n=e.tr,a={},o=Y.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{DD(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,{...rD(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=DD(c)?s+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,o)}n.setSelection(new aD(n.doc.resolve(s+r.tableStart))),t(n)}return!0}function AD(e,t){let n=GE(e.schema);return jD(({node:e})=>n[e.type.spec.tableRole])(e,t)}function jD(e){return(t,n)=>{let r=t.selection,i,a;if(r instanceof aD){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{if(i=JE(r.$from),!i)return!1;a=qE(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=hD(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 aD&&u.setSelection(new aD(u.doc.resolve(r.$anchorCell.pos),d?u.doc.resolve(d):void 0)),n(u)}return!0}}function MD(e){return function(t,n){if(!YE(t))return!1;if(n){let r=GE(t.schema),i=hD(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 ND(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 PD(e,t){return t||={useDeprecatedLogic:!1},t.useDeprecatedLogic?MD(e):function(t,n){if(!YE(t))return!1;if(n){let r=GE(t.schema),i=hD(t),a=t.tr,o=ND(`row`,i,r),s=ND(`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}}PD(`row`,{useDeprecatedLogic:!0}),PD(`column`,{useDeprecatedLogic:!0}),PD(`cell`,{useDeprecatedLogic:!0});function FD(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 ID(e){return function(t,n){if(!YE(t))return!1;let r=FD(XE(t),e);if(r==null)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(Z.between(e,$E(e))).scrollIntoView())}return!0}}function LD(e,t){let n=e.selection;if(!(n instanceof aD))return!1;if(t){let r=e.tr,i=GE(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 X(i,0,0))}),r.docChanged&&t(r)}return!0}function RD(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=BD(GE(o).row,new X(i,a,c)).content),s.push(i)}else if(a==`cell`||a==`header_cell`)s.push(n||r?BD(GE(o).row,new X(t,n,r)).content:t);else return null;return zD(o,s)}function zD(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(Y.empty),n[i]<r){let a=GE(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(a);t[i]=t[i].append(Y.from(o))}return{height:t.length,width:r,rows:t}}function BD(e,t){let n=e.createAndFill();return new kh(n).replace(0,n.content.size,t).doc}function VD({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(nD(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(Y.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(Y.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function HD(e,t,n,r,i,a,o){let s=e.doc.type.schema,c=GE(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,Y.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 UD(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 WD(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,nD(i.attrs,o-u,i.attrs.colspan-(o-u))),e.insert(d+i.nodeSize,i.type.createAndFill(nD(i.attrs,0,o-u))),l+=i.attrs.rowspan-1}}return c}function GD(e,t,n,r,i){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw Error(`No table found`);let o=BE.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=BE.get(a),f=d.mapping.maps.length}HD(d,o,a,n,l,u,f)&&p(),UD(d,o,a,n,c,l,s,f)&&p(),UD(d,o,a,n,c,l,u,f)&&p(),WD(d,o,a,n,s,u,c,f)&&p(),WD(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 X(i.rows[e-s],0,0))}p(),d.setSelection(new aD(d.doc.resolve(n+o.positionAt(s,c,a)),d.doc.resolve(n+o.positionAt(u-1,l-1,a)))),t(d)}var KD=Mx({ArrowLeft:JD(`horiz`,-1),ArrowRight:JD(`horiz`,1),ArrowUp:JD(`vert`,-1),ArrowDown:JD(`vert`,1),"Shift-ArrowLeft":YD(`horiz`,-1),"Shift-ArrowRight":YD(`horiz`,1),"Shift-ArrowUp":YD(`vert`,-1),"Shift-ArrowDown":YD(`vert`,1),Backspace:LD,"Mod-Backspace":LD,Delete:LD,"Mod-Delete":LD});function qD(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function JD(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection;if(a instanceof aD)return qD(n,r,jh.near(a.$headCell,t));if(e!=`horiz`&&!a.empty)return!1;let o=$D(i,e,t);if(o==null)return!1;if(e==`horiz`)return qD(n,r,jh.near(n.doc.resolve(a.head+t),t));{let i=n.doc.resolve(o),a=tD(i,e,t),s;return s=a?jh.near(a,1):t<0?jh.near(n.doc.resolve(i.before(-1)),-1):jh.near(n.doc.resolve(i.after(-1)),1),qD(n,r,s)}}}function YD(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection,o;if(a instanceof aD)o=a;else{let r=$D(i,e,t);if(r==null)return!1;o=new aD(n.doc.resolve(r))}let s=tD(o.$headCell,e,t);return s?qD(n,r,new aD(o.$anchorCell,s)):!1}}function XD(e,t){let n=e.state.doc,r=qE(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new aD(r))),!0):!1}function ZD(e,t,n){if(!YE(e.state))return!1;let r=RD(n),i=e.state.selection;if(i instanceof aD){r||={width:1,height:1,rows:[Y.from(BD(GE(e.state.schema).cell,n))]};let t=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),o=BE.get(t).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=VD(r,o.right-o.left,o.bottom-o.top),GD(e.state,e.dispatch,a,o,r),!0}if(r){let t=XE(e.state),n=t.start(-1);return GD(e.state,e.dispatch,n,BE.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function QD(e,t){if(t.button!=0||t.ctrlKey||t.metaKey)return;let n=eO(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof aD)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&n&&(r=qE(e.state.selection.$anchor))!=null&&tO(e,t)?.pos!=r.pos)i(r,t),t.preventDefault();else if(!n)return;function i(t,n){let r=tO(e,n),i=KE.getState(e.state)==null;if(!r||!eD(t,r)){if(i)r=t;else return}let a=new aD(t,r);if(i||!e.state.selection.eq(a)){let n=e.state.tr.setSelection(a);i&&n.setMeta(KE,t.pos),e.dispatch(n)}}function a(){e.root.removeEventListener(`mouseup`,a),e.root.removeEventListener(`dragstart`,a),e.root.removeEventListener(`mousemove`,o),KE.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(KE,-1))}function o(r){let o=r,s=KE.getState(e.state),c;if(s!=null)c=e.state.doc.resolve(s);else if(eO(e,o.target)!=n&&(c=tO(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 $D(e,t,n){if(!(e.state.selection instanceof Z))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 eO(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName==`TD`||t.nodeName==`TH`)return t;return null}function tO(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&&qE(e.state.doc.resolve(r))||qE(e.state.doc.resolve(i))}var nO=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`)),rO(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,rO(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type==`attributes`&&(e.target==this.table||this.colgroup.contains(e.target))}};function rO(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 iO=new tg(`tableColumnResizing`);function aO({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=nO,lastColumnResizable:i=!0}={}){let a=new Qh({key:iO,state:{init(e,t){var i;let o=(i=a.spec)==null||(i=i.props)==null?void 0:i.nodeViews,s=GE(t.schema).table.name;return r&&o&&(o[s]=(e,t)=>new r(e,n,t)),new oO(-1,!1)},apply(e,t){return t.apply(e)}},props:{attributes:e=>{let t=iO.getState(e);return t&&t.activeHandle>-1?{class:`resize-cursor`}:{}},handleDOMEvents:{mousemove:(t,n)=>{sO(t,n,e,i)},mouseleave:e=>{cO(e)},mousedown:(e,r)=>{lO(e,r,t,n)}},decorations:e=>{let t=iO.getState(e);if(t&&t.activeHandle>-1)return vO(e,t.activeHandle)},nodeViews:{}}});return a}var oO=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(iO);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 QE(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function sO(e,t,n,r){if(!e.editable)return;let i=iO.getState(e.state);if(i&&!i.dragging){let a=dO(t.target),o=-1;if(a){let{left:r,right:i}=a.getBoundingClientRect();t.clientX-r<=n?o=fO(e,t,`left`,n):i-t.clientX<=n&&(o=fO(e,t,`right`,n))}if(o!=i.activeHandle){if(!r&&o!==-1){let t=e.state.doc.resolve(o),n=t.node(-1),r=BE.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}mO(e,o)}}}function cO(e){if(!e.editable)return;let t=iO.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&mO(e,-1)}function lO(e,t,n,r){if(!e.editable)return!1;let i=e.dom.ownerDocument.defaultView??window,a=iO.getState(e.state);if(!a||a.activeHandle==-1||a.dragging)return!1;let o=e.state.doc.nodeAt(a.activeHandle),s=uO(e,a.activeHandle,o.attrs);e.dispatch(e.state.tr.setMeta(iO,{setDragging:{startX:t.clientX,startWidth:s}}));function c(t){i.removeEventListener(`mouseup`,c),i.removeEventListener(`mousemove`,l);let r=iO.getState(e.state);r?.dragging&&(hO(e,r.activeHandle,pO(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(iO,{setDragging:null})))}function l(t){if(!t.which)return c(t);let i=iO.getState(e.state);if(i&&i.dragging){let a=pO(i.dragging,t,n);gO(e,i.activeHandle,a,r)}}return gO(e,a.activeHandle,s,r),i.addEventListener(`mouseup`,c),i.addEventListener(`mousemove`,l),t.preventDefault(),!0}function uO(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 dO(e){for(;e&&e.nodeName!=`TD`&&e.nodeName!=`TH`;)e=e.classList&&e.classList.contains(`ProseMirror`)?null:e.parentNode;return e}function fO(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=qE(e.state.doc.resolve(o));if(!s)return-1;if(n==`right`)return s.pos;let c=BE.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 pO(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function mO(e,t){e.dispatch(e.state.tr.setMeta(iO,{setHandle:t}))}function hO(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),a=BE.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():_O(l.colspan);d[u]=n,c.setNodeMarkup(o+r,null,{...l,colwidth:d})}c.docChanged&&e.dispatch(c)}function gO(e,t,n,r){let i=e.state.doc.resolve(t),a=i.node(-1),o=i.start(-1),s=BE.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&&rO(a,c.firstChild,c,r,s,n)}function _O(e){return Array(e).fill(0)}function vO(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return jb.empty;let a=BE.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`,iO.getState(e)?.dragging&&n.push(Ob.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:`column-resize-dragging`})),n.push(Ob.widget(s,c))}}return jb.create(e.doc,n)}function yO({allowTableNodeSelection:e=!1}={}){return new Qh({key:KE,state:{init(){return null},apply(e,t){let n=e.getMeta(KE);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:sD,handleDOMEvents:{mousedown:QD},createSelectionBetween(e){return KE.getState(e.state)==null?null:e.state.selection},handleTripleClick:XD,handleKeyDown:KD,handlePaste:ZD},appendTransaction(t,n,r){return uD(r,pD(r,n),e)}})}var bO=new WeakSet,xO=new WeakSet;function SO(e){let t=e;return bO.add(t),t}function CO(e){return Array.isArray(e)&&bO.has(e)}function wO(e){return e.flatMap(e=>e==null?[]:Array.isArray(e)&&xO.has(e)&&!CO(e)?wO(e):[e])}function TO(e,t){if(e===`slot`)return 0;if(e instanceof Function){let n=e(t);return Array.isArray(n)&&!CO(n)&&!xO.has(n)?SO(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(CO(n))return SO([e,r,n]);if(n.length===0)return SO([e,r]);let t=wO(n);return t.length===0?SO([e,r]):SO([e,r,...t])}return SO(n==null?[e,r]:[e,r,n])}var EO=(e,t)=>TO(e,t),DO=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,OO=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,kO=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,AO=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,jO=JT.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 EO(`strong`,{...KC(this.options.HTMLAttributes,e),children:EO(`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[bE({find:DO,type:this.type}),bE({find:kO,type:this.type})]},addPasteRules(){return[CE({find:OO,type:this.type}),CE({find:AO,type:this.type})]}}),MO=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},NO=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 PO(e){let t=new Set((e.match(/`+/g)||[]).map(e=>e.length)),n=1;for(;t.has(n);)n+=1;return n}var FO=JT.create({name:`code`,addOptions(){return{HTMLAttributes:{}}},excludes:`_`,code:!0,exitable:!0,parseHTML(){return[{tag:`code`}]},renderHTML({HTMLAttributes:e}){return[`code`,KC(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(PO(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[bE({find:MO,type:this.type})]},addPasteRules(){return[CE({find:NO,type:this.type})]}}),IO=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,LO=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,RO=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,zO=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,BO=JT.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`,KC(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[bE({find:IO,type:this.type}),bE({find:RO,type:this.type})]},addPasteRules(){return[CE({find:LO,type:this.type}),CE({find:zO,type:this.type})]}}),VO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,HO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,UO=JT.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`,KC(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[bE({find:VO,type:this.type})]},addPasteRules(){return[CE({find:HO,type:this.type})]}}),WO=JT.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`,KC(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 GO(e){return e.marks.some(e=>[`y-attributed-delete`].includes(e.type.name))}function KO(e,t){let n=e.attrs.id;if(!n)throw Error(`Node ${e.type.name} does not have an ID`);if(GO(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 qO(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 JO(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 YO(e){return JO(e.node,e.posBeforeNode)}function XO(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 JO(e.nodeAfter,e.pos)}function ZO(e){return QO(e,e.selection.anchor)}function QO(e,t){return YO(qO(e.doc,t))}function $O(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 ek(e){return $O(e.filter((t,n)=>e.indexOf(t)!==n))}function tk(e){return e.marks.some(e=>e.type.name===`y-attributed-delete`)}var nk=nE.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 LE()}}},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 Qh({key:new tg(`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=wC(t.doc,e),{mapping:s}=o;if(uw(o).forEach(({newRange:e})=>{let o=TC(n.doc,e,e=>i.includes(e.type.name)),c=ek(o.map(({node:e})=>e.attrs.id).filter(e=>e!==null));o.forEach(({node:e,pos:i})=>{if(tk(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)&&!GO(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)}),Y.from(n)};return n=!1,new X(r(e.content),e.openStart,e.openEnd)}}})]}});function rk(e){return e.type===`link`}function ik(e){return typeof e!=`string`&&e.type===`link`}function ak(e){return typeof e!=`string`&&e.type===`text`}function ok(e){return ck(e)?{...e}:sk(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 sk(e){return e!=null&&typeof e!=`string`&&!Array.isArray(e)&&e.type===`tableCell`}function ck(e){return sk(e)&&e.props!==void 0&&e.content!==void 0}function lk(e){return ck(e)?e.props.colspan??1:1}function uk(e){return ck(e)?e.props.rowspan??1:1}var dk=class extends Error{constructor(e){super(`Unreachable case: ${e}`)}};function fk(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 pk=()=>typeof navigator<`u`&&(/Mac/.test(navigator.platform)||/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent));function mk(e,t=`Ctrl`){return pk()?e.replace(`Mod`,`⌘`):e.replace(`Mod`,t)}function hk(...e){return[...new Set(e.filter(e=>e).join(` `).split(` `))].join(` `)}var gk=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_k,vk=()=>typeof navigator>`u`||typeof window>`u`?!1:(_k===void 0&&(_k=navigator.maxTouchPoints>0&&typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches),_k);function yk(e,t,n,r){let i=document.createElement(`div`);i.className=hk(`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=hk(`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 bk=(e,t)=>{let n=IA(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 xk(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 Sk(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 Ck(e){let t=e.ignoreMutation?.bind(e),n=e.contentDOM;e.ignoreMutation=e=>Sk(e)?!0:t?t(e):!n&&e.type!==`selection`}function wk(e){return`doc`in e?e.doc.type.schema:e.type.schema}function Tk(e){return e.cached.blockNoteEditor}function Ek(e){return Tk(e).schema}function Dk(e){return Ek(e).blockSchema}function Ok(e){return Ek(e).inlineContentSchema}function kk(e){return Ek(e).styleSchema}function Ak(e){return Tk(e).blockCache}function jk(e,t){if(Dk(e)[t.name]?.content===`plain`)return!0;let n=Ok(e)[t.name];return typeof n==`object`&&n.content===`plain`}function Mk(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=>Nk(e,t,n)).reduce((e,t)=>{if(!e.length)return t;let n=e[e.length-1],r=t[0];return r&&ak(n)&&ak(r)&&JSON.stringify(n.styles)===JSON.stringify(r.styles)?(n.text+=`
146
- `+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 Nk(e,t,n){let r=[],i;return e.content.forEach(e=>{if(e.type.name===`hardBreak`){if(i){if(ak(i))i.text+=`
147
- `;else if(rk(i))i.content[i.content.length-1].text+=`
148
- `;else throw Error(`unexpected`)}else i={type:`text`,text:`
149
- `,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(Pk(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 dk(e.propSchema)}i?ak(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}):rk(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 Pk(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`?Nk(e,t,n):i.content===`plain`?e.textContent:void 0,{type:e.type.name,props:r,content:a}}function Fk(e,t){let n=e.type.schema,r=Dk(n),i=Ok(n),a=kk(n),o=Ak(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=JO(e,0),l;try{l=KO(c.bnBlock.node,t)}catch{l=nk.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(Fk(e,t))});let m;if(f.content===`inline`){if(!c.isBlockContainer)throw Error(`impossible`);m=Nk(c.blockContent.node,i,a)}else if(f.content===`table`){if(!c.isBlockContainer)throw Error(`impossible`);m=Mk(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 dk(f.content);let h={id:l,type:f.type,props:d,content:m,children:p};return o?.set(e,h),h}function Ik(e){let t=[];return e.firstChild&&e.firstChild.descendants(n=>(t.push(Fk(n,e)),!1)),t}function Lk(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=Fk(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 Rk(e){return`data-`+e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function zk(e){let t=e.split(`/`);return!t.length||t[t.length-1]===``?e:t[t.length-1]}function Bk(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 Vk(e){let t={};return Object.entries(e).forEach(([e,n])=>{t[e]={default:n.default,keepOnSplit:!0,parseHTML:t=>{let r=t.getAttribute(Rk(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?{}:{[Rk(e)]:t[e]}}}),t}function Hk(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 Fk(r,t)}function Uk(e,t,n){try{return Hk(e,n)}catch(e){let r=n.type.schema.nodes.blockContainer?.createAndFill(null,t);if(r)return Fk(r,n);throw e}}function Wk(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=hk(`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(Rk(e),t);return i&&o.setAttribute(`data-file-block`,``),o.appendChild(e.dom),e.contentDOM&&(e.contentDOM.className=hk(`bn-inline-content`,e.contentDOM.className)),{...e,dom:o}}function Gk(e,t,n){return{config:{type:e.type,content:e.content,propSchema:t},implementation:{node:e.node,render:bk,toExternalHTML:bk},extensions:n}}function Kk(e,t){e.stopEvent=e=>(e.type===`mousedown`&&setTimeout(()=>{t.view.dom.blur()},10),!0)}function qk(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);xk(i,e.content===`plain`||t.meta?.code?`
150
- `:`<br>`);let a=qp.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?`
151
- `:t.textContent;n&&e.push(r.text(n,t.marks))}}),Y.fromArray(e)}return a.content}return Y.empty}:void 0}),n}function Jk(e,t,n,r){let i=t.node||xE.create({name:e.type,content:e.content===`inline`?`inline*`:e.content===`plain`?`text*`:e.content===`none`?``:e.content,marks(){return e.content===`plain`?TE(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 Vk(e.propSchema)},parseHTML(){return qk(e,t)},renderHTML({HTMLAttributes:n}){let r=document.createElement(`div`);return Wk({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=Uk(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&&Kk(o,this.editor),Ck(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 Yk(e){return e}function Xk(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 Wk(r,e.type,e.props,this.propSchema??i.propSchema,a.meta?.fileBlockAccept!==void 0)},render(e,t){return Wk(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 Zk(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t.config]))}function Qk(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 $k(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 eA(e,t){return{config:e,implementation:t}}function tA(e,t){return eA({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=sm.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=sm.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 nA(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t.config]))}function rA(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 iA(e,t){let n=JT.create({name:e.type,addAttributes(){return Qk(e.propSchema)},parseHTML(){return rA(e,t.parse)},renderHTML({mark:n}){return $k((t.toExternalHTML||t.render)(n.attrs.stringValue),e.type,n.attrs.stringValue,e.propSchema)},addMarkView(){return({mark:n})=>$k(t.render(n.attrs.stringValue),e.type,n.attrs.stringValue,e.propSchema)}});return eA(e,{...t,mark:n,render:n=>$k(t.render(n),e.type,n,e.propSchema),toExternalHTML:n=>$k((t.toExternalHTML||t.render)(n),e.type,n,e.propSchema)})}function aA(e){let t=sA(e),{roots:n,nonRoots:r}=cA(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=cA(t).nonRoots,r.size)throw Error(`Cycle(s) detected; toposort only works on acyclic graphs. Cyclic nodes: ${Array.from(r).join(`, `)}`);return i}function oA(e){return aA(lA(e))}function sA(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 cA(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 lA(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 uA(){return new Map}function dA(e,t,n){return e.has(t)||e.set(t,new Set),e.get(t).add(n),e}function fA(e){let t=uA();for(let n of e)Array.isArray(n.runsBefore)&&n.runsBefore.length>0?n.runsBefore.forEach(e=>{dA(t,n.key,e)}):dA(t,`default`,n.key);let n=oA(t),r=n.findIndex(e=>e.has(`default`));return e=>91+(n.findIndex(t=>t.has(e))+r)*10}function pA(e){return e&&Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var mA=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=fA(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,Jk(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:pA(n),styleSpecs:pA(r),inlineContentSchema:Zk(n),styleSchema:nA(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 hA(e){let{height:t,width:n}=vA(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=ok(e.content.rows[t].cells[n]),o=uk(a),s=lk(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 gA(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 _A(e,t,n=hA(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 vA(e){let t=e.content.rows.length,n=0;return e.content.rows.forEach(e=>{let t=0;e.cells.forEach(e=>{t+=lk(e)}),n=Math.max(n,t)}),{height:t,width:n}}function yA(e,t,n=hA(t)){let r=n[e.row]?.[e.col];if(r)return{row:r.row,col:r.col,cell:r.cell}}function bA(e,t){let n=hA(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)=>yA({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 xA(e,t){let n=hA(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)=>yA({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 SA(e,t,n,r=hA(e)){let{col:i}=_A({row:0,col:t},e,r),{col:a}=_A({row:0,col:n},e,r);return r.forEach(e=>{let[t]=e.splice(i,1);e.splice(a,0,t)}),gA(r)}function CA(e,t,n,r=hA(e)){let{row:i}=_A({row:t,col:0},e,r),{row:a}=_A({row:n,col:0},e,r),[o]=r.splice(i,1);return r.splice(a,0,o),gA(r)}function wA(e){return e?sk(e)?wA(e.content):typeof e==`string`?e.length===0:Array.isArray(e)?e.every(e=>typeof e==`string`?e.length===0:ak(e)?e.text.length===0:ik(e)?typeof e.content==`string`?e.content.length===0:e.content.every(e=>e.text.length===0):!1):!1:!0}function TA(e,t,n=hA(e)){if(t===`columns`){let e=0;for(let t=n[0].length-1;t>=0&&n.every(e=>wA(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 gA(n)}let r=0;for(let e=n.length-1;e>=0&&n[e].every(e=>wA(e.cell)&&e.rowspan===1);e--)r++;let i=Math.min(r,n.length-1);return n.splice(n.length-i,i),gA(n)}function EA(e,t,n,r=hA(e)){let{width:i,height:a}=vA(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:ok(``)});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:ok(``)}));r.push(t)}else n<0&&r.splice(a+n,-1*n);return gA(r)}function DA(e,t,n){let r=bA(e,n);if(!r.some(e=>uk(e.cell)>1))return!0;let i=n,a=n;return r.forEach(e=>{let t=uk(e.cell);i=Math.max(i,e.row+t-1),a=Math.min(a,e.row)}),t<n?n===i:n===a}function OA(e,t,n){let r=xA(e,n);if(!r.some(e=>lk(e.cell)>1))return!0;let i=n,a=n;return r.forEach(e=>{let t=lk(e.cell);i=Math.max(i,e.col+t-1),a=Math.min(a,e.col)}),t<n?n===i:n===a}function kA(e,t,n){let r=_A(e,n),i=_A(t,n);return r.col===i.col}function AA(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 dk(e.propSchema)}let a=r&&t.nodes[r]&&jk(t,t.nodes[r])?[...t.nodes[r].allowedMarks(i)]:i;return!r||!jk(t,t.nodes[r])?e.text.split(/(\n)/g).filter(e=>e.length>0).map(e=>e===`
152
- `?t.nodes.hardBreak.createChecked():t.text(e,a)):e.text.length>0?[t.text(e.text,a)]:[]}function jA(e,t,n){let r=t.marks.link.create({href:e.href});return MA(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 MA(e,t,n,r){let i=[];if(typeof e==`string`)return i.push(...AA({type:`text`,text:e,styles:{}},t,n,r)),i;for(let a of e)i.push(...AA(a,t,n,r));return i}function NA(e,t,n,r=kk(t)){let i=[];for(let a of e)typeof a==`string`?i.push(...MA(a,t,r,n)):ik(a)?i.push(...jA(a,t,r)):ak(a)?i.push(...MA([a],t,r,n)):i.push(FA(a,t,r));return i}function PA(e,t,n=kk(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=_A({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(sk(i)){i.content&&(f=NA(i.content,t,`tableParagraph`,n));let e=lk(i);e>1&&(m=Array(e).fill(!1).map((e,t)=>o[p.col+t]??void 0))}else f=NA(i,t,`tableParagraph`,n)}let h=t.nodes[d||u?`tableHeader`:`tableCell`].createChecked({...sk(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 FA(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=NA([e.content],t,i,n);r=t.nodes[i].createChecked(e.props,a)}else if(Array.isArray(e.content)){let a=NA(e.content,t,i,n);r=t.nodes[i].createChecked(e.props,a)}else if(e.content.type===`tableContent`){let a=PA(e.content,t,n);r=t.nodes[i].createChecked(e.props,a)}else throw new dk(e.content.type);return r}function IA(e,t,n=kk(t)){let r=e.id;r===void 0&&(r=nk.options.generateID());let i=[];if(e.children)for(let r of e.children)i.push(IA(r,t,n));if(!e.type||t.nodes[e.type].isInGroup(`blockContent`)){let a=FA(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 LA(e,t){let n,r;if(t.firstChild.descendants((i,a)=>n?!1:!RA(i)||!i.attrs.id||KO(i,t)!==e||(n=i,r=a+1,!1)),n!==void 0&&r!==void 0)return{node:n,posBeforeNode:r}}function RA(e){return e.type.isInGroup(`bnBlock`)}var zA=(e,t)=>({tr:n,dispatch:r})=>(r&&BA(n,e,t),!0);function BA(e,t,n,r,i){let a=XO(e.doc.resolve(t)),o=null;a.blockNoteType===`table`&&(o=qA(e));let s=wk(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;GA(n,e,a),VA(n,e,c,l,a,t,o)}else if(!a.isBlockContainer&&l.isInGroup(`bnBlock`))GA(n,e,a);else{let t=IA({children:Fk(a.bnBlock.node,e.doc).children,...n},s);t.check(),e.replaceWith(a.bnBlock.beforePos,a.bnBlock.afterPos,t);return}UA(e,a.bnBlock.beforePos,u,{...n.props}),o&&JA(e,a,o)}function VA(e,t,n,r,i,a,o){let s=wk(t),c=`keep`;if(e.content){if(typeof e.content==`string`)c=NA([e.content],s,r.name);else if(Array.isArray(e.content))c=NA(e.content,s,r.name);else if(e.content.type===`tableContent`)c=PA(e.content,s);else throw new dk(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`)UA(t,i.blockContent.beforePos,r,{...e.props});else if(a!==void 0||o!==void 0){let n=WA(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 X(Y.from(c),d-u-1,f-u-1))}else r===n||r.validContent(i.blockContent.node.content)?HA(t,WA(t,i.blockContent.beforePos,r,{...e.props}),Y.from(c)):t.replaceWith(i.blockContent.beforePos,i.blockContent.afterPos,r.createChecked({...i.blockContent.node.attrs,...e.props},c))}function HA(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 X(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 Im(d,f,new X(Y.from(p),0,0)))}function UA(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 WA(e,t,n,r){let i=e.mapping.maps.length;return UA(e,t,n,r),e.mapping.slice(i).map(t,-1)}function GA(e,t,n){let r=wk(t);if(e.children!==void 0&&e.children.length>0){let i=e.children.map(e=>{let t=IA(e,r);return t.check(),t});if(n.childContainer)HA(t,n.childContainer.beforePos,Y.from(i));else{if(!n.isBlockContainer)throw Error(`impossible`);t.insert(n.blockContent.afterPos,r.nodes.blockGroup.createChecked({},i))}}}function KA(e,t,n,r,i){let a=typeof t==`string`?t:t.id,o=LA(a,e.doc);if(!o)throw Error(`Block with ID ${a} not found`);return BA(e,o.posBeforeNode,n,r,i),Fk(e.doc.resolve(o.posBeforeNode+1).node(),e.doc)}function qA(e){let t=`selection`in e?e.selection:null;if(!(t instanceof Z))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=BE.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 JA(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=BE.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(Z.create(e.doc,m)),!0}var YA={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`}},XA={backgroundColor:{default:`default`},textColor:{default:`default`},textAlignment:{default:`left`,values:[`left`,`center`,`right`,`justify`]}},ZA=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=XA.textAlignment.values.includes(e.style.textAlign)?e.style.textAlign:void 0,t},QA=(e,t)=>{e.backgroundColor&&e.backgroundColor!==XA.backgroundColor.default&&(t.style.backgroundColor=e.backgroundColor in YA?YA[e.backgroundColor].background:e.backgroundColor),e.textColor&&e.textColor!==XA.textColor.default&&(t.style.color=e.textColor in YA?YA[e.textColor].text:e.textColor),e.textAlignment&&e.textAlignment!==XA.textAlignment.default&&(t.style.textAlign=e.textAlignment)},$A=(e=`backgroundColor`)=>({default:XA.backgroundColor.default,parseHTML:e=>e.hasAttribute(`data-background-color`)?e.getAttribute(`data-background-color`):e.style.backgroundColor?e.style.backgroundColor:XA.backgroundColor.default,renderHTML:t=>t[e]===XA.backgroundColor.default?{}:{"data-background-color":t[e]}}),ej=(e=`textColor`)=>({default:XA.textColor.default,parseHTML:e=>e.hasAttribute(`data-text-color`)?e.getAttribute(`data-text-color`):e.style.color?e.style.color:XA.textColor.default,renderHTML:t=>t[e]===XA.textColor.default?{}:{"data-text-color":t[e]}}),tj=(e,t)=>{let n=e.querySelector(t);if(n)return{targetElement:n,caption:e.querySelector(`figcaption`)?.textContent??void 0}},nj=ME(({editor:e})=>{let t=NE(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)}}}),rj=(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(nj)?.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)}}},ij=`<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>`,aj=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=ij,t.appendChild(n);let r=document.createElement(`p`);return r.className=`bn-file-name`,r.textContent=e.props.name,t.appendChild(r),{dom:t}},oj=(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=rj(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=aj(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},sj=(e,t)=>{let n=document.createElement(`figure`),r=document.createElement(`figcaption`);return r.textContent=t,n.appendChild(e),n.appendChild(r),{dom:n}},cj=(e,t)=>{let n=document.createElement(`div`),r=document.createElement(`p`);return r.textContent=t,n.appendChild(e),n.appendChild(r),{dom:n}},lj=e=>({url:e.src||void 0}),uj=Yk(e=>({type:`audio`,propSchema:{backgroundColor:XA.backgroundColor,name:{default:``},url:{default:``},caption:{default:``},showPreview:{default:!0}},content:`none`})),dj=(e={})=>e=>{if(e.tagName===`AUDIO`){if(e.closest(`figure`))return;let{backgroundColor:t}=ZA(e);return{...lj(e),backgroundColor:t}}if(e.tagName===`FIGURE`){let t=tj(e,`audio`);if(!t)return;let{targetElement:n,caption:r}=t,{backgroundColor:i}=ZA(e);return{...lj(n),backgroundColor:i,caption:r}}},fj=(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,oj(t,n,{dom:i},r.firstElementChild)},pj=(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?sj(n,e.props.caption):cj(n,e.props.caption):{dom:n}},mj=Xk(uj,e=>({meta:{fileBlockAccept:[`audio/*`]},parse:dj(e),render:fj(e),toExternalHTML:pj(e),runsBefore:[`file`]})),hj=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-`,``)}}},gj=({el:e,schema:t},n)=>{let r=qp.fromSchema(t),i=e.firstElementChild;return r.parse(i,{preserveWhitespace:`full`,topNode:t.nodes[n].create()}).content},_j=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 vj(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 yj=e=>(t,n)=>ME({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(`
153
-
154
- `);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(`
155
- `),!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:vj(e,r)??r}.language},content:[]}}}]}),bj=(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)}},xj=(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=bj(e,t,n.selectedLanguage,n.supportedLanguages),a.appendChild(o.dom)),a.appendChild(r),{dom:a,contentDOM:i,destroy:()=>{o?.destroy()}}},Sj=`code-block-keyboard-shortcuts`,Cj=Xk(Yk(({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=>hj(e),parseContent:e=>gj(e,`codeBlock`),render:(t,n)=>xj(t,n,e.supportedLanguages&&{selectedLanguage:t.props.language,supportedLanguages:e.supportedLanguages}),toExternalHTML:e=>_j(e)}),e=>[yj(e)(Sj,`codeBlock`)]),wj=Xk(Yk(()=>({type:`divider`,propSchema:{},content:`none`})),{meta:{isolating:!1},parse(e){if(e.tagName===`HR`)return{}},render(){return{dom:document.createElement(`hr`)}}},[ME({key:`divider-block-shortcuts`,inputRules:[{find:RegExp(`^---$`),replace(){return{type:`divider`,props:{},content:[]}}}]})]),Tj=e=>({url:e.src||void 0}),Ej=Xk(Yk(()=>({type:`file`,propSchema:{backgroundColor:XA.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}=ZA(e);return{...Tj(e),backgroundColor:t}}if(e.tagName===`FIGURE`){let t=tj(e,`embed`);if(!t)return;let{targetElement:n,caption:r}=t,{backgroundColor:i}=ZA(e);return{...Tj(n),backgroundColor:i,caption:r}}},render(e,t){return oj(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?cj(t,e.props.caption):{dom:t}}});function Dj(e,t,n){let r=qp.fromSchema(t),i=e.querySelector(`:scope > summary`),a;if(i){let e=i.cloneNode(!0);xk(e),a=r.parse(e,{topNode:t.nodes.paragraph.create(),preserveWhitespace:!0}).content}else a=Y.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 Oj={set:(e,t)=>window.localStorage.setItem(`toggle-${e.id}`,t?`true`:`false`),get:e=>window.localStorage.getItem(`toggle-${e.id}`)===`true`},kj=(e,t,n,r=Oj)=>{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?.()}}},Aj=[1,2,3,4,5,6],jj=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)},Mj=Xk(Yk(({defaultLevel:e=1,levels:t=Aj,allowToggleHeadings:n=!0}={})=>({type:`heading`,propSchema:{...XA,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?{...ZA(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{...ZA(t),level:n}},...e?{parseContent:({el:e,schema:t})=>{if(e.tagName===`DETAILS`)return Dj(e,t,`heading`)}}:{},runsBefore:[`toggleListItem`],render(t,n){let r=document.createElement(`h${t.props.level}`);return e?{...kj(t,n,r),contentDOM:r}:{dom:r,contentDOM:r}},toExternalHTML(t){let n=document.createElement(`h${t.props.level}`);if(QA(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=Aj}={})=>[ME({key:`heading-shortcuts`,keyboardShortcuts:Object.fromEntries(e.map(e=>[`Mod-Alt-${e}`,jj(e)])??[]),inputRules:e.map(e=>({find:RegExp(`^(#{${e}})\\s$`),replace({match:e}){return{type:`heading`,props:{level:e[1].length}}}}))})]),Nj=(e,t,n,r,i)=>{let{dom:a,destroy:o}=oj(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)}}},Pj=e=>({url:e.src||void 0,previewWidth:e.width||void 0,name:e.alt||void 0}),Fj=Yk((e={})=>({type:`image`,propSchema:{textAlignment:XA.textAlignment,backgroundColor:XA.backgroundColor,name:{default:``},url:{default:``},caption:{default:``},showPreview:{default:!0},previewWidth:{default:void 0,type:`number`}},content:`none`})),Ij=(e={})=>e=>{if(e.tagName===`IMG`){if(e.closest(`figure`))return;let{backgroundColor:t}=ZA(e);return{...Pj(e),backgroundColor:t}}if(e.tagName===`FIGURE`){let t=tj(e,`img`);if(!t)return;let{targetElement:n,caption:r}=t,{backgroundColor:i}=ZA(e);return{...Pj(n),backgroundColor:i,caption:r}}},Lj=(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),Nj(t,n,{dom:i},i,r.firstElementChild)},Rj=(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?sj(n,e.props.caption):cj(n,e.props.caption):{dom:n}},zj=Xk(Fj,e=>({meta:{fileBlockAccept:[`image/*`]},parse:Ij(e),render:Lj(e),toExternalHTML:Rj(e),runsBefore:[`file`]})),Bj=(e,t,n)=>({state:r,dispatch:i})=>!i||Vj(r.tr,e,t,n),Vj=(e,t,n,r)=>{let i=YO(qO(e.doc,t));if(!i.isBlockContainer)return!1;let a=wk(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},Hj=(e,t)=>{let{blockInfo:n,selectionEmpty:r}=e.transact(e=>({blockInfo:ZO(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=>{BA(e,i.beforePos,{type:`paragraph`,props:{}})}),!0):a.node.childCount>0&&e.transact(e=>(e.deleteSelection(),e.scrollIntoView(),Vj(e,e.selection.from,!0)))};function Uj(e,t,n){let r=qp.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 Y.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 Wj=Xk(Yk(()=>({type:`bulletListItem`,propSchema:{...XA},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 ZA(e)},parseContent:({el:e,schema:t})=>Uj(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 QA(e.props,t),t.appendChild(n),{dom:t,contentDOM:n}}},[ME({key:`bullet-list-item-shortcuts`,keyboardShortcuts:{Enter:({editor:e})=>Hj(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(ZO(e.prosemirrorState).blockNoteType!==`heading`)return{type:`bulletListItem`,props:{}}}}]})]),Gj=Xk(Yk(()=>({type:`checkListItem`,propSchema:{...XA,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:{...ZA(e),checked:t.checked}}},parseContent:({el:e,schema:t})=>Uj(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 QA(e.props,t),t.appendChild(n),t.appendChild(r),{dom:t,contentDOM:r}},runsBefore:[`bulletListItem`]},[ME({key:`check-list-item-shortcuts`,keyboardShortcuts:{Enter:({editor:e})=>Hj(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 Kj(e,t,n,r){let i=!!e.firstChild.attrs.start,a=YO({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=YO({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=YO({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 qj(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}=Kj(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(Ob.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 Jj=Xk(Yk(()=>({type:`numberedListItem`,propSchema:{...XA,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=ZA(e);return e.previousElementSibling||n===1?r:{...r,start:n}}},parseContent:({el:e,schema:t})=>Uj(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 QA(e.props,t),t.appendChild(n),{dom:t,contentDOM:n}}},[ME({key:`numbered-list-item-shortcuts`,inputRules:[{find:/^\s?(\d+)\.\s$/,replace({match:e,editor:t}){if(ZO(t.prosemirrorState).blockNoteType===`heading`)return;let n=parseInt(e[1]);return{type:`numberedListItem`,props:{start:n===1?void 0:n}}}}],keyboardShortcuts:{Enter:({editor:e})=>Hj(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 Qh({key:new tg(`numbered-list-indexing-decorations`),state:{init(e,t){return qj(t.tr,{decorations:jb.empty})},apply(e,t){return!e.docChanged&&t.decorations?t:qj(e,t)}},props:{decorations(e){return this.getState(e)?.decorations??jb.empty}}})]})]),Yj=Xk(Yk(()=>({type:`toggleListItem`,propSchema:{...XA},content:`inline`})),{meta:{isolating:!1},parse(e){if(e.tagName===`DETAILS`)return ZA(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 ZA(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 Dj(n,t,`toggleListItem`)},runsBefore:[`bulletListItem`],render(e,t){let n=document.createElement(`p`);return{...kj(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),QA(e.props,t),t.appendChild(n),{dom:t,contentDOM:i,childrenDOM:n}}},[ME({key:`toggle-list-item-shortcuts`,keyboardShortcuts:{Enter:({editor:e})=>Hj(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)}}})]),Xj=Xk(Yk(()=>({type:`paragraph`,propSchema:XA,content:`inline`})),{meta:{isolating:!1},parse:e=>{if(e.tagName===`P`&&e.textContent?.trim())return ZA(e)},render:()=>{let e=document.createElement(`p`);return{dom:e,contentDOM:e}},toExternalHTML:e=>{let t=document.createElement(`p`);return QA(e.props,t),{dom:t,contentDOM:t}},runsBefore:[`default`,`heading`]},[ME({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)}}})]),Zj=Xk(Yk(()=>({type:`quote`,propSchema:{backgroundColor:XA.backgroundColor,textColor:XA.textColor},content:`inline`})),{meta:{isolating:!1},parse(e){if(e.tagName===`BLOCKQUOTE`){let{backgroundColor:t,textColor:n}=ZA(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 QA(e.props,t),{dom:t,contentDOM:t}}},[ME({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:{}}}}]})]),Qj=`blockLevelSuggestion`;function $j(e){return e&&e.options.extensions.some(e=>{if(e.type!==`mark`)return!1;let t=OC(e,`group`);return typeof t==`string`&&t.split(` `).includes(`blockLevelSuggestion`)})?Qj:``}var eM=nE.create({name:`BlockNoteTableExtension`,addProseMirrorPlugins:()=>[aO({cellMinWidth:35,defaultCellMinWidth:120,View:null}),yO()],addKeyboardShortcuts(){return{Enter:()=>YE(this.editor.state)?this.editor.commands.command(({state:e,dispatch:t})=>{let n=XE(e),r=n?tD(n,`vert`,1):null;return r&&t&&t(e.tr.setSelection(Z.between(r,$E(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})=>YE(e)?(ID(1)(e,t,n),!0):!1),"Shift-Tab":()=>this.editor.commands.command(({state:e,dispatch:t,view:n})=>YE(e)?(ID(-1)(e,t,n),!0):!1)}},extendNodeSchema(e){return{tableRole:HC(OC(e,`tableRole`,{name:e.name,options:e.options,storage:e.storage}))}}}),tM={textColor:XA.textColor},nM=xE.create({name:`tableHeader`,addOptions(){return{HTMLAttributes:{}}},content:`tableContent+`,marks(){return $j(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)=>sM(e,t)}]},renderHTML({HTMLAttributes:e}){return[`th`,KC(this.options.HTMLAttributes,e),0]}}),rM=xE.create({name:`tableCell`,addOptions(){return{HTMLAttributes:{}}},content:`tableContent+`,marks(){return $j(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)=>sM(e,t)}]},renderHTML({HTMLAttributes:e}){return[`td`,KC(this.options.HTMLAttributes,e),0]}}),iM=xE.create({name:`table`,content:`tableRow+`,group:`blockContent`,tableRole:`table`,marks(){return $j(this.editor)},isolating:!0,parseHTML(){return[{tag:`table`}]},renderHTML({node:e,HTMLAttributes:t}){let n=yk(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 nO{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=hk(`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(tM)){let r=Rk(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})}}}),aM=xE.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]}}),oM=xE.create({name:`tableRow`,addOptions(){return{HTMLAttributes:{}}},content:`(tableCell | tableHeader)+`,tableRole:`row`,marks(){return $j(this.editor)},parseHTML(){return[{tag:`tr`}]},renderHTML({HTMLAttributes:e}){return[`tr`,KC(this.options.HTMLAttributes,e),0]}});function sM(e,t){let n=qp.fromSchema(t).parse(e,{topNode:t.nodes.blockGroup.create()}),r=[];return n.content.descendants(e=>{if(e.isInline)return r.push(e),!1}),Y.fromArray(r)}var cM=()=>Gk({node:iM,type:`table`,content:`table`},tM,[ME({key:`table-extensions`,tiptapExtensions:[eM,aM,nM,rM,oM]}),ME({key:`table-keyboard-delete`,keyboardShortcuts:{Backspace:({editor:e})=>{if(!(e.prosemirrorState.selection instanceof aD))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)}}})]),lM=e=>({url:e.src||void 0,previewWidth:e.width||void 0,name:e.getAttribute(`data-name`)||void 0}),uM=Yk(e=>({type:`video`,propSchema:{textAlignment:XA.textAlignment,backgroundColor:XA.backgroundColor,name:{default:``},url:{default:``},caption:{default:``},showPreview:{default:!0},previewWidth:{default:void 0,type:`number`}},content:`none`})),dM=e=>e=>{if(e.tagName===`VIDEO`){if(e.closest(`figure`))return;let{backgroundColor:t}=ZA(e);return{...lM(e),backgroundColor:t}}if(e.tagName===`FIGURE`){let t=tj(e,`video`);if(!t)return;let{targetElement:n,caption:r}=t,{backgroundColor:i}=ZA(e);return{...lM(n),backgroundColor:i,caption:r}}},fM=Xk(uM,e=>({meta:{fileBlockAccept:[`video/*`]},parse:dM(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),Nj(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?sj(t,e.props.caption):cj(t,e.props.caption):{dom:t}},runsBefore:[`file`]}));function pM(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 mM(e,t,n,r){return pM(t,n,r)&&e.type===n}function hM(e){return e instanceof aD}function gM(e){let t=e.type.spec.tableRole;return t===`cell`||t===`header_cell`}var _M=ME(({editor:e})=>{let t=NE(!1),n=()=>e.transact(e=>{if(e.selection.empty||e.selection instanceof Z&&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 vM(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 yM=DC(e=>e.type.name===`blockContainer`),bM=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=xM.getState(t),r=xM.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(xM,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()}},xM=new tg(`SuggestionMenuPlugin`),SM=ME(({editor:e})=>{let t=new Map,n,r=NE(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(xM,{triggerCharacter:t,deleteTriggerCharacter:n?.deleteTriggerCharacter||!1,ignoreQueryLength:n?.ignoreQueryLength||!1})}))},prosemirrorPlugins:[new Qh({key:xM,view:t=>(n=new bM(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(xM);if(typeof o==`object`&&o){r&&n?.closeMenu();let t=vM(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(xM,{triggerCharacter:o}).scrollIntoView()),!0}}return!1},decorations(e){let t=this.getState(e);if(t===void 0)return null;if(!t.deleteTriggerCharacter){let n=yM(e.selection);if(n)return jb.create(e.doc,[Ob.node(n.pos,n.pos+n.node.nodeSize,{nodeName:`span`,class:`bn-suggestion-decorator`,"data-decoration-id":t.decorationId})])}return jb.create(e.doc,[Ob.inline(t.queryStartPos()-t.triggerCharacter.length,t.queryStartPos(),{nodeName:`span`,class:`bn-suggestion-decorator`,"data-decoration-id":t.decorationId})])}}})]}});function CM(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 wM(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&&ak(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)),CM(e),r}function TM(e){let t=[];return pM(e,`heading`,{level:`number`})&&(e.schema.blockSchema.heading.propSchema.level.values||[]).filter(e=>e<=3).forEach(n=>{t.push({onItemClick:()=>{wM(e,{type:`heading`,props:{level:n}})},badge:mk(`Mod-Alt-${n}`),key:n===1?`heading`:`heading_${n}`,...e.dictionary.slash_menu[n===1?`heading`:`heading_${n}`]})}),pM(e,`quote`)&&t.push({onItemClick:()=>{wM(e,{type:`quote`})},key:`quote`,...e.dictionary.slash_menu.quote}),pM(e,`toggleListItem`)&&t.push({onItemClick:()=>{wM(e,{type:`toggleListItem`})},badge:mk(`Mod-Shift-6`),key:`toggle_list`,...e.dictionary.slash_menu.toggle_list}),pM(e,`numberedListItem`)&&t.push({onItemClick:()=>{wM(e,{type:`numberedListItem`})},badge:mk(`Mod-Shift-7`),key:`numbered_list`,...e.dictionary.slash_menu.numbered_list}),pM(e,`bulletListItem`)&&t.push({onItemClick:()=>{wM(e,{type:`bulletListItem`})},badge:mk(`Mod-Shift-8`),key:`bullet_list`,...e.dictionary.slash_menu.bullet_list}),pM(e,`checkListItem`)&&t.push({onItemClick:()=>{wM(e,{type:`checkListItem`})},badge:mk(`Mod-Shift-9`),key:`check_list`,...e.dictionary.slash_menu.check_list}),pM(e,`paragraph`)&&t.push({onItemClick:()=>{wM(e,{type:`paragraph`})},badge:mk(`Mod-Alt-0`),key:`paragraph`,...e.dictionary.slash_menu.paragraph}),pM(e,`codeBlock`)&&t.push({onItemClick:()=>{wM(e,{type:`codeBlock`})},badge:mk(`Mod-Alt-c`),key:`code_block`,...e.dictionary.slash_menu.code_block}),pM(e,`divider`)&&t.push({onItemClick:()=>{wM(e,{type:`divider`})},key:`divider`,...e.dictionary.slash_menu.divider}),pM(e,`table`)&&t.push({onItemClick:()=>{wM(e,{type:`table`,content:{type:`tableContent`,rows:[{cells:[``,``,``]},{cells:[``,``,``]}]}})},badge:void 0,key:`table`,...e.dictionary.slash_menu.table}),pM(e,`image`,{url:`string`})&&t.push({onItemClick:()=>{let t=wM(e,{type:`image`});e.getExtension(nj)?.showMenu(t.id),e.getExtension(_M)?.store.setState(!1)},key:`image`,...e.dictionary.slash_menu.image}),pM(e,`video`,{url:`string`})&&t.push({onItemClick:()=>{let t=wM(e,{type:`video`});e.getExtension(nj)?.showMenu(t.id),e.getExtension(_M)?.store.setState(!1)},key:`video`,...e.dictionary.slash_menu.video}),pM(e,`audio`,{url:`string`})&&t.push({onItemClick:()=>{let t=wM(e,{type:`audio`});e.getExtension(nj)?.showMenu(t.id),e.getExtension(_M)?.store.setState(!1)},key:`audio`,...e.dictionary.slash_menu.audio}),pM(e,`file`,{url:`string`})&&t.push({onItemClick:()=>{let t=wM(e,{type:`file`});e.getExtension(nj)?.showMenu(t.id),e.getExtension(_M)?.store.setState(!1)},key:`file`,...e.dictionary.slash_menu.file}),pM(e,`heading`,{level:`number`,isToggleable:`boolean`})&&(e.schema.blockSchema.heading.propSchema.level.values||[]).filter(e=>e<=3).forEach(n=>{t.push({onItemClick:()=>{wM(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}`]})}),pM(e,`heading`,{level:`number`})&&(e.schema.blockSchema.heading.propSchema.level.values||[]).filter(e=>e>3).forEach(n=>{t.push({onItemClick:()=>{wM(e,{type:`heading`,props:{level:n}})},badge:mk(`Mod-Alt-${n}`),key:`heading_${n}`,...e.dictionary.slash_menu[`heading_${n}`]})}),t.push({onItemClick:()=>{e.getExtension(SM)?.openSuggestionMenu(`:`,{deleteTriggerCharacter:!0,ignoreQueryLength:!0})},key:`emoji`,...e.dictionary.slash_menu.emoji}),t}function EM(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 DM={audio:mj(),bulletListItem:Wj(),checkListItem:Gj(),codeBlock:Cj(),divider:wj(),file:Ej(),heading:Mj(),image:zj(),numberedListItem:Jj(),paragraph:Xj(),quote:Zj(),table:cM(),toggleListItem:Yj(),video:fM()},OM=iA({type:`textColor`,propSchema:`string`},{render:()=>{let e=document.createElement(`span`);return{dom:e,contentDOM:e}},toExternalHTML:e=>{let t=document.createElement(`span`);return e!==XA.textColor.default&&(t.style.color=e in YA?YA[e].text:e),{dom:t,contentDOM:t}},parse:e=>{if(e.tagName===`SPAN`&&e.style.color)return e.style.color}}),kM=iA({type:`backgroundColor`,propSchema:`string`},{render:()=>{let e=document.createElement(`span`);return{dom:e,contentDOM:e}},toExternalHTML:e=>{let t=document.createElement(`span`);return e!==XA.backgroundColor.default&&(t.style.backgroundColor=e in YA?YA[e].background:e),{dom:t,contentDOM:t}},parse:e=>{if(e.tagName===`SPAN`&&e.style.backgroundColor)return e.style.backgroundColor}}),AM={bold:tA(jO,`boolean`),italic:tA(BO,`boolean`),underline:tA(WO,`boolean`),strike:tA(UO,`boolean`),code:tA(FO.extend({addInputRules(){return[bE({find:/(^|[^`])`([^`]+)`(?!`)$/,type:this.type}),new BT({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:OM,backgroundColor:kM};nA(AM);var jM={text:{config:`text`,implementation:{}},link:{config:`link`,implementation:{}}},MM=Zk(jM),NM=class e extends mA{static create(t){return new e({blockSpecs:t?.blockSpecs??DM,inlineContentSpecs:t?.inlineContentSpecs??jM,styleSpecs:t?.styleSpecs??AM})}},PM=new tg(`blocknote-show-selection`),FM=ME(({editor:e})=>{let t=NE({enabledSet:new Set},{onUpdate(){e.transact(e=>e.setMeta(PM,{}))}});return{key:`showSelection`,store:t,prosemirrorPlugins:[new Qh({key:PM,props:{decorations:e=>{let{doc:n,selection:r}=e;if(t.state.enabledSet.size===0)return jb.empty;let i=Ob.inline(r.from,r.to,{"data-show-selection":`true`});return jb.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 IM(e){if(!e)throw Error(`resolveUsers is required to create a user store`);let t=NE(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 LM(e){return typeof e==`function`?IM(e):e??IM(async()=>[])}var RM=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}})),zM=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 BM({parser:e,nodeTypes:t=[`code_block`,`codeBlock`],languageExtractor:n=e=>e.attrs.language}){let r=new tg(`prosemirror-highlight`);return new Qh({key:r,state:{init(r,i){let a=new zM,[o,s]=VM(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]=VM(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 VM(e,t,n,r,i){let a=[],o=[],s=HM(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?jb.create(e,a.flat()):void 0,o]}function HM(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 UM(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=Ob.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=Ob.inline(f,e,{style:WM(t.htmlStyle??`color: ${t.color}`),class:`shiki`});o.push(n),f=e}f+=1}return o}}function WM(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var GM=t(RM(),1);function KM(e){let t=Array.from(e.classList).filter(e=>!e.startsWith(`bn-`))||[];t.length>0?e.className=t.join(` `):e.removeAttribute(`class`)}function qM(e,t,n,r){let i;if(!t)throw Error(`blockContent is required`);if(typeof t==`string`)i=NA([t],e.pmSchema,r?.blockType);else if(Array.isArray(t))i=NA(t,e.pmSchema,r?.blockType);else if(t.type===`tableContent`)i=PA(t,e.pmSchema);else throw new dk(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=Pk(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=sm.renderSpec(document,e);t.contentDOM.appendChild(n),n=t.dom}a.appendChild(n)}else{let e=n.serializeFragment(Y.from([t]),r);a.appendChild(e)}return a.childNodes.length===1&&a.firstChild?.nodeType===1&&KM(a.firstChild),a}function JM(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);KM(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=qM(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(YM(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 YM=(e,t,n,r,i,a,o=0,s)=>{for(let c of n)JM(e,t,c,r,i,a,o,s)},XM=(e,t,n,r,i,a)=>{let o=(a?.document??document).createDocumentFragment();return YM(o,e,t,n,r,i,0,a),o},ZM=(e,t)=>{let n=sm.fromSchema(e);return{exportBlocks:(e,r)=>{let i=XM(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=qM(t,e,n,r),a=document.createElement(`div`);return a.append(i.cloneNode(!0)),a.innerHTML}}};function QM(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 $M(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(RA(r))return KO(r,e)}}function eN(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 tN(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(!RA(t))return!0;let a=$M(e,i),o=a??`__root__`;r[o]||(r[o]=[]);let s=Fk(t,e),c=KO(t,e);return n[c]={block:s,parentId:a},r[o].push(c),!0}),{byId:n,childrenByParent:r}}function nN(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 rN(e,t=[]){let n=eN(e),r=wC(e.before,[e,...t]),i=QM(r);if(!i)return[];let a=r.mapping.invert(),o={from:a.map(i.from,-1),to:a.map(i.to,1)},s=tN(r.before,o),c=tN(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,GM.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=nN(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 iN=ME(()=>{let e=[];return{key:`blockChange`,prosemirrorPlugins:[new Qh({key:new tg(`blockChange`),filterTransaction:t=>{let n;return e.reduce((e,r)=>e===!1?e:r({getChanges(){return n||(n=rN(t),n)},tr:t})!==!1,!0)}})],subscribe(t){return e.push(t),()=>{e.splice(e.indexOf(t),1)}}}});function aN(e,t){return!e||!t?!1:!!e.closest(`.${t}`)}function oN(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 sN(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 cN(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 lN(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 uN=ME(({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=oN(t,n,o.width,s,c)??sN(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)),cN(r,n.orientation);let{parentLeft:d,parentTop:f}=lN(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&&aN(a,o.exclude)||n.target instanceof Element&&aN(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=lh(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)})}}}),dN=ME(()=>({key:`history`,prosemirrorPlugins:[eS()],undoCommand:nS,redoCommand:rS})),fN=new tg(`inline-content-boundary-edit`);function pN(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 mN=ME(()=>({key:`inlineContentBoundaryEdit`,prosemirrorPlugins:[new Qh({key:fN,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(Z.create(n.doc,o+t.key.length)),e.dispatch(n),!0}if(i.content.size>0&&pN(r,t.key,{from:o,to:s})){let t=e.state.tr.delete(o,s);return t.setSelection(Z.create(t.doc,o)),e.dispatch(t),!0}return!1}}})]})),hN=ME(({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 Ew(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)}}}),gN=[`http`,`https`,`ftp`,`ftps`,`mailto`,`tel`,`callto`,`sms`,`cid`,`xmpp`],_N=`https`,vN=new tg(`node-selection-keyboard`),yN=ME(()=>({key:`nodeSelectionKeyboard`,prosemirrorPlugins:[new Qh({key:vN,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 Z(t.doc.resolve(e.state.tr.selection.$to.after()+1)))),!0}}return!1}}})]})),bN=new tg(`blocknote-placeholder`),xN=ME(({editor:e,options:t})=>{let n=t.placeholders;return{key:`placeholder`,prosemirrorPlugins:[new Qh({key:bN,view:t=>{let r=`placeholder-selector-${LE()}`;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(Ob.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(Ob.node(e,e+o.nodeSize,{"data-is-empty-and-focused":`true`}))}return jb.create(n,i)}}})]}}),SN=ME(({editor:e})=>{let t=new Tm,n=0;function r(){t=new Tm,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}}}),CN=new tg(`previous-blocks`),wN={index:`index`,level:`level`,type:`type`,depth:`depth`,"depth-change":`depth-change`},TN=ME(()=>{let e;return{key:`previousBlockType`,prosemirrorPlugins:[new Qh({key:CN,view(t){return{update:async(t,n)=>{this.key?.getState(t.state).updatedBlocks.size>0&&(e=setTimeout(()=>{t.dispatch(t.state.tr.setMeta(CN,{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=QM(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=TC(n.doc,o,e=>e.attrs.id),l=new Map(c.map(e=>[KO(e.node,n.doc),e])),u=TC(r.doc,i,e=>e.attrs.id);for(let e of u){let i=KO(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=KO(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-`+wN[e]]=t||`none`;n.push(Ob.node(i,i+r.nodeSize,{...s}))}),jb.create(e.doc,n)}}})]}});function EN(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 DN(e){let t=document.createElement(`div`);return t.innerHTML=e,ON(t,{indent:``,inListItem:!1}).trim()+`
156
- `}function ON(e,t){let n=``,r=Array.from(e.childNodes);for(let e=0;e<r.length;e++){let i=r[e];n+=kN(i,t)}return n}function kN(e,t){if(e.nodeType===3)return e.textContent||``;if(e.nodeType!==1)return``;let n=e;switch(n.tagName.toLowerCase()){case`p`:return AN(n,t);case`h1`:case`h2`:case`h3`:case`h4`:case`h5`:case`h6`:return jN(n,t);case`blockquote`:return MN(n,t);case`pre`:return NN(n,t);case`ul`:return RN(n,t);case`ol`:return zN(n,t);case`table`:return HN(n,t);case`hr`:return t.indent+`***
157
-
158
- `;case`math`:return FN(n,t);case`img`:return KN(n,t);case`video`:return qN(n,t);case`audio`:return JN(n,t);case`embed`:return YN(n,t);case`figure`:return XN(n,t);case`a`:return eP(n,t);case`details`:return rP(n,t);case`div`:return ON(n,t);case`br`:return``;default:return ON(n,t)}}function AN(e,t){let n=oP(iP(e));return t.inListItem?n:t.indent+n+`
159
-
160
- `}function jN(e,t){let n=parseInt(e.tagName[1],10),r=`#`.repeat(n)+` `,i=iP(e);return t.indent+r+i+`
161
-
162
- `}function MN(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(iP(t)):e.push(kN(t,{indent:``,inListItem:!1}).trim());r=e.join(`
163
-
164
- `)}else r=iP(e);return r.split(`
165
- `).map(e=>t.indent+`> `+e).join(`
166
- `)+`
167
-
168
- `}function NN(e,t){let n=e.querySelector(`code`);if(!n)return``;let r=n.getAttribute(`data-language`)||LN(n.className)||``,i=IN(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(`
169
- `)?i.slice(0,-1):i).split(`
170
- `),o].map(e=>e&&t.indent+e).join(`
171
- `)+`
172
-
173
- `:t.indent+o+r+`
174
- `+t.indent+o+`
175
-
176
- `}function PN(e){return(e.querySelector(`annotation[encoding="application/x-tex"]`)?.textContent??e.textContent??``).trim()}function FN(e,t){return[`$$`,...PN(e).split(`
177
- `),`$$`].map(e=>e&&t.indent+e).join(`
178
- `)+`
179
-
180
- `}function IN(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+=`
181
- `:t+=IN(n));return t}function LN(e){let t=e.match(/language-(\S+)/);return t?t[1]:``}function RN(e,t){let n=``,r=Array.from(e.children).filter(e=>e.tagName.toLowerCase()===`li`);for(let e of r)n+=BN(e,`bullet`,t);return t.inListItem||(n+=`
182
- `),n}function zN(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+=BN(r[e],`ordered`,t,a)}return t.inListItem||(n+=`
183
- `),n}function BN(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?iP(e):``}else l=VN(e,i),c=l?iP(l):``;let u=n.indent+o+c+`
184
- `,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=iP(t);u+=`
185
- `+d+e+`
186
- `}else u+=kN(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+=kN(e,f);else if(t===`p`){let t=iP(e);u+=`
187
- `+d+t+`
188
- `}else u+=`
189
- `+kN(e,f)}}return u}function VN(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 HN(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=UN(iP(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+WN(i[0],c,r)+`
190
- `,l+=t.indent+GN(c,r)+`
191
- `;for(let e=1;e<i.length;e++)l+=t.indent+WN(i[e],c,r)+`
192
- `}else{let e=Array(r).fill(``);l+=t.indent+WN(e,c,r)+`
193
- `,l+=t.indent+GN(c,r)+`
194
- `;for(let e of i)l+=t.indent+WN(e,c,r)+`
195
- `}return l+=`
196
- `,l}function UN(e){return e.replace(/\|/g,`\\|`)}function WN(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 GN(e,t){let n=[];for(let r=0;r<t;r++)n.push(` `+`-`.repeat(e[r])+` `);return`|`+n.join(`|`)+`|`}function KN(e,t){let n=e.getAttribute(`src`)||``,r=e.getAttribute(`alt`)||``;return n?t.indent+`![${r}](${n})\n\n`:`
197
-
198
- `}function qN(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`:`
199
-
200
- `}function JN(e,t){let n=e.getAttribute(`src`)||``;return n?t.indent+`<audio src="${QN(n)}" controls></audio>\n\n`:`
201
-
202
- `}function YN(e,t){let n=e.getAttribute(`src`)||``;return n?t.indent+`[](${n})\n\n`:`
203
-
204
- `}function XN(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?ZN(`img`,n.getAttribute(`src`)||``,n.getAttribute(`alt`)||``,o,t):r?ZN(`video`,r.getAttribute(`src`)||r.getAttribute(`data-url`)||``,r.getAttribute(`data-name`)||r.getAttribute(`title`)||``,o,t):i?ZN(`audio`,i.getAttribute(`src`)||``,``,o,t):a?eP(a,t):``}function ZN(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="${QN(n)}"`:e===`video`?` data-name="${QN(n)}"`:``:``,o=e===`img`?`<img${a} src="${QN(t)}">`:`<${e} src="${QN(t)}"${a} controls></${e}>`,s=r?`<figcaption>${$N(r)}</figcaption>`:``;return i.indent+`<figure>${o}${s}</figure>\n\n`}function QN(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function $N(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function eP(e,t){let n=e.getAttribute(`href`)||``,r=e.textContent?.trim()||``;return n?t.indent+tP(r,n)+`
205
-
206
- `:t.indent+r+`
207
-
208
- `}function tP(e,t){return!e||e===t?t:`[${e}](${nP(t)})`}function nP(e){return e.replace(/[\\()]/g,`\\$&`)}function rP(e,t){let n=e.querySelector(`summary`);if(!n)return ON(e,t);let r=n.querySelector(`h1, h2, h3, h4, h5, h6`);if(r){let i=jN(r,t);for(let r of Array.from(e.children))r!==n&&(i+=kN(r,t));return i}return ON(n,t)}function iP(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}=aP(iP(e));t+=n?`**${n}**${r}`:r;break}case`em`:case`i`:{let{content:n,trailing:r}=aP(iP(e));t+=n?`*${n}*${r}`:r;break}case`s`:case`del`:t+=`~~${iP(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+=iP(e);break;case`a`:{let n=e.getAttribute(`href`)||``,r=iP(e);t+=tP(r,n);break}case`br`:t+=`\\
209
- `;break;case`math`:{let n=PN(e).split(`
210
- `).map(e=>e.trim()).join(` `);t+=`$${n}$`;break}case`span`:t+=iP(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+=iP(e);break;case`input`:break;default:t+=iP(e)}}return t}function aP(e){let t=e.match(/^(.*?)(\s*)$/);return t?{content:t[1],trailing:t[2]}:{content:e,trailing:``}}function oP(e){let t=e.replace(/^(\\\n)+/,``);return t=t.replace(/(\\\n)+$/,``),t}function sP(e){return DN(e.split(``).join(``))}function cP(e,t,n,r){return sP(ZM(t,n).exportBlocks(e,r))}function lP(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(Fk(n,e))}),!1):!e.type.isInGroup(`bnBlock`)||(t.push(Fk(e,e)),!1)),t}var uP=class e extends jh{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 X(Y.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?jh.near(t.resolve(r.pos)):r.deleted?jh.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}}};jh.jsonID(`multiple-node`,uP);var dP;function fP(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 pP(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]);mP(e.root),dP=r,dP.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(` `);dP.className=dP.className+` bn-drag-preview `+c,e.root instanceof ShadowRoot?e.root.appendChild(dP):e.root.body.appendChild(dP)}function mP(e){dP!==void 0&&(e instanceof ShadowRoot?e.removeChild(dP):e.body.removeChild(dP),dP=void 0)}function hP(e,t,n){if(!e.dataTransfer||n.headless)return;let r=n.prosemirrorView,i=LA(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}=fP(t,i),c=o<=a&&a<s,l=t.$anchor.node()!==t.$head.node()||t instanceof uP;c&&l?(r.dispatch(r.state.tr.setSelection(uP.create(i,o,s))),pP(r,o,s)):(r.dispatch(r.state.tr.setSelection(Ih.create(r.state.doc,a))),pP(r,a));let u=r.state.selection.content(),d=n.pmSchema,f=r.serializeForClipboard(u).dom.innerHTML,p=ZM(d,n),m=lP(u.content),h=p.exportBlocks(m,{}),g=sP(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(dP,0,0)}}var gP=250;function _P(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]`)?_P(e,{left:t.left+50,top:t.top},!1):EN(i,e)}function vP(e,t){if(!t.dom.firstChild)return;let n=t.dom.firstChild.getBoundingClientRect(),r=_P(t,{left:Math.min(Math.max(n.left+10,e.x),n.right-10),top:e.y});if(r)return _P(t,{left:r.node.getBoundingClientRect().right-10,top:e.y},!1)}var yP=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>gP){this.state?.show&&(this.state.show=!1,this.updateState(this.state));return}let t=vP(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=qp.fromSchema(this.pmView.state.schema).parse(n,{topNode:this.pmView.state.schema.nodes.blockGroup.create()});this.pmView.dragging={slice:new X(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>gP)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(Z.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)}},bP=new tg(`SideMenuPlugin`),xP=ME(({editor:e})=>{let t,n=NE(void 0);return{key:`sideMenu`,store:n,prosemirrorPlugins:[new Qh({key:bP,view:r=>(t=new yP(e,r,e=>{n.setState({...e})}),t)})],blockDragStart(n,r){t&&(t.isDragOrigin=!0),hP(n,r,e)},blockDragEnd(){mP(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))}}}),SP=ME(({editor:e})=>{let t=NE({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(`
211
- `)),!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(Z.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})}}}),CP=ME(({editor:e})=>{let t=NE({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=jh.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(Z.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})}}}),wP=Symbol.for(`blocknote.shikiParser`),TP=Symbol.for(`blocknote.shikiHighlighterPromise`),EP=[`text`,`none`,`plaintext`,`txt`];function DP(e,t,n){let r=globalThis,i,a,o=new Set;return BM({parser:t=>{if(!e.createHighlighter)return[];if(!i)return r[TP]=r[TP]||e.createHighlighter(),r[TP].then(e=>{i=e});let n=t.language;return!n||EP.includes(n)||o.has(n)?[]:i.getLoadedLanguages().includes(n)?(a||(a=r[wP]||UM(i,OP(i)),r[wP]=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 OP(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 kP(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]}ME(({editor:e,options:t})=>({key:`syntaxHighlighting`,prosemirrorPlugins:[DP(t,kP(e.schema),e.schema)]}));var AP;async function jP(){return AP||(AP=(async()=>{let[e,t]=await Promise.all([ke(()=>import(`./module-BrWgIX20.js`),[]),ke(()=>import(`./native-Cqs-2kTC.js`),[])]),n=`default`in e?e.default:e,r=`default`in t?t.default:t;return await n.init({data:r}),{emojiMart:n,emojiData:r}})(),AP)}async function MP(e,t){if(!(`text`in e.schema.inlineContentSchema)||e.schema.inlineContentSchema.text!==MM.text)return[];let{emojiData:n,emojiMart:r}=await jP();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 NP;function PP(e){NP||(NP=document.createElement(`div`),NP.innerHTML=`_`,NP.style.opacity=`0`,NP.style.height=`1px`,NP.style.width=`1px`,e instanceof Document?e.body.appendChild(NP):e.appendChild(NP))}function FP(e){NP&&=(e instanceof Document?e.body.removeChild(NP):e.removeChild(NP),void 0)}function IP(e){return Array.prototype.indexOf.call(e.parentElement.childNodes,e)}function LP(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 RP(e,t){let n=t.querySelectorAll(e);for(let e=0;e<n.length;e++)n[e].style.visibility=`hidden`}var zP=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=LP(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=EN(t.domNode,this.pmView);if(!r)return;let{pmNodeInfo:i,doc:a}=this.editor.transact(e=>({pmNodeInfo:LA(r.id,e.doc),doc:e.doc}));if(!i){this.hideHandles();return}let o=Fk(i.node,a);if(!mM(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=IP(t.domNode),i=IP(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`,RP(`.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=IP(r.parentElement),o=IP(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(BP,!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(!DA(this.state.block,t.originalIndex,r))return!1;let e=CA(this.state.block,t.originalIndex,r);this.editor.updateBlock(this.state.block,{type:`table`,content:{...this.state.block.content,rows:e}})}else{if(!OA(this.state.block,t.originalIndex,n))return!1;let e=SA(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=LA(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}=vA(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)}},BP=new tg(`TableHandlesPlugin`),VP=ME(({editor:e})=>{let t,n=NE(void 0);return{key:`tableHandles`,store:n,prosemirrorPlugins:[new Qh({key:BP,view:r=>(t=new zP(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`&&!DA(a,s,r)||c===`col`&&!OA(a,s,r))return jb.create(e.doc,i);let l=e.doc.resolve(n+1);return t.state.draggingState.draggedCellOrientation===`row`?bA(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(Ob.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}))}):xA(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(Ob.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}))}),jb.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(BP,{draggedCellOrientation:t.state.draggingState.draggedCellOrientation,originalIndex:t.state.colIndex,newIndex:t.state.colIndex,tablePos:t.tablePos})),!e.headless&&(PP(e.prosemirrorView.root),n.dataTransfer.setDragImage(NP,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(BP,{draggedCellOrientation:t.state.draggingState.draggedCellOrientation,originalIndex:t.state.rowIndex,newIndex:t.state.rowIndex,tablePos:t.tablePos})),!e.headless&&(PP(e.prosemirrorView.root),n.dataTransfer.setDragImage(NP,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(BP,null)),!e.headless&&FP(e.prosemirrorView.root)},freezeHandles(){t.menuFrozen=!0},unfreezeHandles(){t.menuFrozen=!1},hideHandlesIfNotFrozen(){t.menuFrozen||t.hideHandles()},getCellsAtRowHandle(e,t){return bA(e,t)},getCellsAtColumnHandle(e,t){return xA(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 aD(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`?CD(i,r):wD(i,r):n.side===`left`?_D(i,r):vD(i,r)})},removeRowOrColumn(t,n){return n===`row`?e.exec((e,n)=>ED(this.setCellSelection(e,{row:t,col:0}),n)):e.exec((e,n)=>bD(this.setCellSelection(e,{row:0,col:t}),n))},mergeCells(t){return e.exec((e,n)=>kD(t?this.setCellSelection(e,t.relativeStartCell,t.relativeEndCell):e,n))},splitCell(t){return e.exec((e,n)=>AD(t?this.setCellSelection(e,t):e,n))},getCellSelection(){return e.transact(e=>{let t=e.selection,n=t.$from,r=t.$to;if(hM(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),!gM(n.parent)||!gM(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=hM(e.selection)?e.selection:void 0;if(!n||!t||n.ranges.length<=1)return;let r=this.getCellSelection();if(r)return kA(r.from,r.to,t)?`vertical`:`horizontal`})},cropEmptyRowsOrColumns(e,t){return TA(e,t)},addRowsOrColumns(e,t,n){return EA(e,t,n)}}}),HP=new tg(`trailingNode`);function UP(e){let t=e.lastChild,n=t?.firstChild;return t?.type.name!==`blockContainer`||n?.type.name!==`paragraph`||n.content.size!==0}function WP(e){if(!e.type.schema.nodes.column){let t=e.lastChild;return t&&UP(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`)&&UP(e)&&t.push(n+e.nodeSize-1),!0)),t}var GP=ME(({editor:e})=>{function t(t){return Ob.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?WP(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 Qh({key:HP,state:{init:(t,r)=>n(r.tr,jb.empty,e.isEditable),apply:(t,r)=>!t.docChanged&&!t.getMeta(HP)?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(HP,!0)))}}},props:{decorations:e=>HP.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=jh.atEnd(t.state.doc);if(r.$head.pos!==i.$head.pos)return!1;let a=t.state.doc.lastChild;return!e.isEditable||!a||!UP(a)?!1:(n.preventDefault(),!0)}}})]}}),KP=Symbol(`bn-current-version`);function qP(e){return[...e].sort((e,t)=>t.createdAt-e.createdAt)}function JP(e){let t=typeof e==`object`?e.id:e;throw Error(`Snapshot not found: ${String(t)}`)}ME(({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=LM(o),l=NE({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=qP(await s.list());return l.setState(t=>({...t,snapshots:e})),e},f=async(e,t)=>{let n=u(e);n||JP(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:KP,compareToSnapshotId:t?.id}));let n={id:KP,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:qP([...e.snapshots,t])}));let n=await s.list();return l.setState(e=>({...e,snapshots:qP(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||JP(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||JP(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||JP(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 YP=class{match;handler;undoable;inCode;inCodeMark;constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t==`string`?XP(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}};function XP(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 ZP=500;function QP({rules:e}){let t=new Qh({state:{init(){return null},apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,a){return $P(n,r,i,a,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&$P(n,r.pos,r.pos,``,e,t)})}}},isInputRules:!0});return t}function $P(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-ZP),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(Zx(e.state.tr)),n.undoable&&p.setMeta(a,{transform:p,from:s,to:c,text:r}),e.dispatch(p),!0}return!1}new YP(/--$/,`—`,{inCodeMark:!1}),new YP(/\.\.\.$/,`…`,{inCodeMark:!1}),new YP(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,`“`,{inCodeMark:!1}),new YP(/"$/,`”`,{inCodeMark:!1}),new YP(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,`‘`,{inCodeMark:!1}),new YP(/'$/,`’`,{inCodeMark:!1});var eF=xE.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),tF=class e extends jh{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):jh.near(r)}content(){return X.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 nF(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!iF(e)||!aF(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&&!Ih.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}}};tF.prototype.visible=!1,tF.findFrom=tF.findGapCursorFrom,jh.jsonID(`gapcursor`,tF);var nF=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 tF.valid(t)?new tF(t):jh.near(t)}};function rF(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function iF(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||rF(e.type))return!0;if(e.inlineContent)return!1}}return!0}function aF(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||rF(e.type))return!0;if(e.inlineContent)return!1}}return!0}function oF(){return new Qh({props:{decorations:dF,createSelectionBetween(e,t,n){return t.pos==n.pos&&tF.valid(n)?new tF(n):null},handleClick:lF,handleKeyDown:sF,handleDOMEvents:{beforeinput:uF}}})}var sF=Mx({ArrowLeft:cF(`horiz`,-1),ArrowRight:cF(`horiz`,1),ArrowUp:cF(`vert`,-1),ArrowDown:cF(`vert`,1)});function cF(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 Z){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=tF.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new tF(c))),!0):!1}}function lF(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!tF.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Ih.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new tF(r))),!0)}function uF(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof tF))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=Y.empty;for(let e=r.length-1;e>=0;e--)i=Y.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new X(i,0,0));return a.setSelection(Z.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function dF(e){if(!(e.selection instanceof tF))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,jb.create(e.doc,[Ob.widget(e.selection.head,t,{key:`gapcursor`})])}var fF=nE.create({name:`gapCursor`,addProseMirrorPlugins(){return[oF()]},extendNodeSchema(e){return{allowGapCursor:HC(OC(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}});function pF(e,t,n,r=`before`){let i=typeof n==`string`?n:n.id,a=wk(e),o=t.map(e=>{let t=IA(e,a);return t.check(),t}),s=LA(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 Im(c,c,new X(Y.from(o),0,0))),o.map(t=>Fk(t,e.doc))}function mF(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 hF(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.`);mF(i)&&e.delete(r,r+i.nodeSize)}}function gF(e,t){hF(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=mF(i),c=mF(o);s&&c?e.delete(t,t+n.nodeSize):s?e.step(new Lm(t,t+n.nodeSize,a-o.nodeSize+1,a-1,X.empty,0,!1)):c&&e.step(new Lm(t,t+n.nodeSize,r+1,r+i.nodeSize-1,X.empty,0,!1))}function _F(e,t,n,r={}){let i=wk(e),a=n.map(e=>{let t=IA(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=KO(t,e.doc);if(!o.has(i))return!0;if(s.push(Fk(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(`
212
- `);throw Error(`Blocks with the following IDs could not be found in the editor: `+e)}return r.fixColumns!==!1&&c.forEach(t=>gF(e,t)),{insertedBlocks:a.map(t=>Fk(t,e.doc)),removedBlocks:s}}function vF(e,t,n,r,i){let a;if(!t)throw Error(`blockContent is required`);if(typeof t==`string`)a=NA([t],e.pmSchema,r);else if(Array.isArray(t))a=NA(t,e.pmSchema,r);else if(t.type===`tableContent`)a=PA(t,e.pmSchema);else throw new dk(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=Pk(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=sm.renderSpec(document,e);t.contentDOM.appendChild(n),n=t.dom}o.appendChild(n)}else{let e=n.serializeFragment(Y.from([t]),i);o.appendChild(e)}return o}function yF(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=vF(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=bF(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(xF(e,t.children,n,r)),c.dom}function bF(e,t,n,r){let i=(r?.document??document).createDocumentFragment();for(let a of t){let t=yF(e,a,n,r);i.appendChild(t)}return i}var xF=(e,t,n,r)=>{let i=e.pmSchema.nodes.blockGroup,a=i.spec.toDOM(i.create({})),o=bF(e,t,n,r);return a.contentDOM?.appendChild(o),a.dom},SF=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),CF=e=>(e.querySelectorAll(`[data-content-type="checkListItem"] input`).forEach(e=>{e.disabled=!0}),e),wF=e=>(e.querySelectorAll(`.bn-toggle-wrapper[data-show-children="false"]`).forEach(e=>{e.setAttribute(`data-show-children`,`true`)}),e),TF=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),EF=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),DF=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),OF=(e,t)=>{let n=sm.fromSchema(e),r=[SF,CF,wF,TF,EF,DF];return{serializeBlocks:(e,i)=>{let a=xF(t,e,n,i);for(let e of r)a=e(a);return a.outerHTML}}},kF=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 AF(e){return e.transact(e=>{let t=QO(e,e.selection.anchor),n=KO(t.bnBlock.node,e.doc);if(e.selection instanceof aD)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 Ih)return{type:`node`,anchorBlockId:n};{let r=QO(e,e.selection.head);return{type:`text`,anchorBlockId:n,headBlockId:KO(r.bnBlock.node,e.doc),anchorOffset:e.selection.anchor-t.bnBlock.beforePos,headOffset:e.selection.head-r.bnBlock.beforePos}}})}function jF(e,t){let n=LA(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=aD.create(e.doc,n+t.anchorCellOffset,n+t.headCellOffset);else if(t.type===`node`)r=Ih.create(e.doc,n+1);else{let i=LA(t.headBlockId,e.doc)?.posBeforeNode;if(i===void 0)throw Error(`Could not find block with ID ${t.headBlockId} to update selection`);r=Z.create(e.doc,n+t.anchorOffset,i+t.headOffset)}e.setSelection(r)}function MF(e){return e.flatMap(e=>e.type===`column`?e.children:[e])}function NF(e,t,n,r){e.transact(e=>{_F(e,t,[],{fixColumns:!1}),pF(e,MF(t),n,r)})}function PF(e,t,n){e.transact(r=>{let i=e.getSelection()?.blocks||[e.getTextCursorPosition().block],a=AF(e);NF(e,i,t,n),jF(r,a)})}function FF(e){return!e||e.type!==`columnList`}function IF(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 FF(a)?{referenceBlock:r,placement:i}:IF(e,i===`after`?r:e.getPrevBlock(r),a)}function LF(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 FF(a)?{referenceBlock:r,placement:i}:LF(e,i===`before`?r:e.getNextBlock(r),a)}function RF(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=IF(e,e.getPrevBlock(n),e.getParentBlock(n));r&&(t?NF(e,[n],r.referenceBlock,r.placement):PF(e,r.referenceBlock,r.placement))})}function zF(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=LF(e,e.getNextBlock(n),e.getParentBlock(n));r&&(t?NF(e,[n],r.referenceBlock,r.placement):PF(e,r.referenceBlock,r.placement))})}function BF(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=Y.from(c?t.create():null),u=new X(Y.from(t.create(null,Y.from(n.create(null,l)))),c?3:1,0),d=a.start,f=a.end;return e.step(new Lm(d-(c?3:1),f,d,f,u,1,!0)).scrollIntoView(),!0}function VF(e){return e.transact(t=>BF(t,e.pmSchema.nodes.blockContainer,e.pmSchema.nodes.blockGroup))}function HF(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 Lm(i-(s?2:1),a,i,a,new X(Y.from(t.create(null,n.create())),s?2:1,0),+!s,!0)),r=new gp(e.doc.resolve(r.$from.pos),e.doc.resolve(a),r.depth)}let o=Um(r);if(o==null)return!1;e.lift(r,o);let s=e.doc.resolve(e.mapping.map(i,-1)-1);return rh(e.doc,s.pos)&&s.nodeBefore.type===s.nodeAfter.type&&e.join(s.pos),e.scrollIntoView(),!0}function UF(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&&HF(e,t,n,a):!1}function WF(e){return e.transact(t=>UF(t,e.pmSchema.nodes.blockContainer,e.pmSchema.nodes.blockGroup))}function GF(e){return e.transact(e=>{let{bnBlock:t}=ZO(e);return e.doc.resolve(t.beforePos).nodeBefore!==null})}function KF(e){return e.transact(e=>{let{bnBlock:t}=ZO(e);return e.doc.resolve(t.beforePos).depth>1})}function qF(e,t){let n=LA(typeof t==`string`?t:t.id,e);if(n)return Fk(n.node,e)}function JF(e,t){let n=LA(typeof t==`string`?t:t.id,e);if(!n)return;let r=e.resolve(n.posBeforeNode).nodeBefore;if(r)return Fk(r,e)}function YF(e,t){let n=LA(typeof t==`string`?t:t.id,e);if(!n)return;let r=e.resolve(n.posBeforeNode+n.node.nodeSize).nodeAfter;if(r)return Fk(r,e)}function XF(e,t){let n=LA(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 Fk(o,e)}var ZF=class{editor;constructor(e){this.editor=e}get document(){return this.editor.transact(e=>Ik(e.doc))}getBlock(e){return this.editor.transact(t=>qF(t.doc,e))}getPrevBlock(e){return this.editor.transact(t=>JF(t.doc,e))}getNextBlock(e){return this.editor.transact(t=>YF(t.doc,e))}getParentBlock(e){return this.editor.transact(t=>XF(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=>pF(r,e,t,n))}updateBlock(e,t){return this.editor.transact(n=>KA(n,e,t))}removeBlocks(e){return this.editor.transact(t=>_F(t,e,[]).removedBlocks)}replaceBlocks(e,t){return this.editor.transact(n=>_F(n,e,t))}canNestBlock(){return GF(this.editor)}nestBlock(){VF(this.editor)}canUnnestBlock(){return KF(this.editor)}unnestBlock(){WF(this.editor)}moveBlocksUp(e){return RF(this.editor,e)}moveBlocksDown(e){return zF(this.editor,e)}},QF=class extends kF{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&&$F(n)||e(this.editor,{getChanges(){return rN(n,r)}})})}onSelectionChange(e,t=!1){return this.on(`onSelectionChange`,({transaction:n})=>{!t&&$F(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 $F(e){return!!e.getMeta(`y-sync$`)}function eI(e){return Array.prototype.indexOf.call(e.parentElement.childNodes,e)}function tI(e){return e.nodeType===3&&!/\S/.test(e.nodeValue||``)}function nI(e){e.querySelectorAll(`li > ul, li > ol`).forEach(e=>{let t=eI(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(tI(t))return;let n=document.createElement(`li`);n.append(t),e.insertAdjacentElement(`afterend`,n)}),n.childNodes.length===0&&n.remove()})}function rI(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 iI=null;function aI(){return iI||=document.implementation.createHTMLDocument(`title`)}function oI(e){if(typeof e==`string`){let t=aI().createElement(`div`);t.innerHTML=e,e=t}return nI(e),rI(e),e}function sI(e){let t=e.ownerDocument.createTreeWalker(e,128),n;for(;n=t.nextNode();)if(/^\s*notionvc:/.test(n.nodeValue||``))return!0;return!1}function cI(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 lI(e){sI(e)||cI(e)}function uI(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:uI(n.content)}):t.push(n);return t}function dI(e){for(let t of e)Array.isArray(t.content)&&(t.content=uI(t.content)),t.children.length>0&&dI(t.children)}function fI(e,t){let n=oI(e);lI(n);let r=qp.fromSchema(t).parse(n,{topNode:t.nodes.blockGroup.create()}),i=[];for(let e=0;e<r.childCount;e++)i.push(Fk(r.child(e),r));return dI(i),i}function pI(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function mI(e){return e?/\w/.test(e):!1}function hI(e,t,n){let r=t>0?e[t-1]:void 0,i=t+n<e.length?e[t+n]:void 0;return mI(r)&&mI(i)}function gI(e,t){if(e[t]!==`\\`||t+1>=e.length)return null;let n=e[t+1];return n===`
213
- `?{html:`<br>
214
- `,end:t+2}:"\\`*_{}[]()#+-.!~|>".includes(n)?{html:pI(n),end:t+2}:null}function _I(e,t){return e[t]==="`"?PI(e,t):null}function vI(e,t){return e[t]!==`!`||e[t+1]!==`[`?null:FI(e,t)}function yI(e,t){return e[t]===`[`?II(e,t):null}function bI(e,t){return e[t]!==`~`||e[t+1]!==`~`?null:BI(e,t,`~~`,`<del>`,`</del>`)}function xI(e,t){return e[t]===`*`&&e[t+1]===`*`&&e[t+2]===`*`||e[t]===`_`&&e[t+1]===`_`&&e[t+2]===`_`&&!hI(e,t,3)?BI(e,t,e.substring(t,t+3),`<strong><em>`,`</em></strong>`):null}function SI(e,t){return e[t]===`*`&&e[t+1]===`*`||e[t]===`_`&&e[t+1]===`_`&&!hI(e,t,2)?BI(e,t,e.substring(t,t+2),`<strong>`,`</strong>`):null}function CI(e,t){return e[t]===`*`||e[t]===`_`&&!hI(e,t,1)?BI(e,t,e[t],`<em>`,`</em>`):null}function wI(e,t){return e[t]===`
215
- `?{html:`<br>
216
- `,end:t+1}:null}var TI=/^<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?>/,EI=/^<!--[\s\S]*?-->/,DI=/^<!\[CDATA\[[\s\S]*?\]\]>/,OI=/^<\?[\s\S]*?\?>/,kI=/^<![A-Za-z][\s\S]*?>/;function AI(e,t){if(e[t]!==`<`)return null;let n=e.substring(t);for(let e of[EI,DI,OI,kI,TI]){let r=n.match(e);if(r)return{html:r[0],end:t+r[0].length}}return null}var jI=new Set(`\\\`![~*_
217
- <`),MI=[gI,_I,vI,yI,bI,xI,SI,CI,AI,wI];function NI(e){let t=``,n=0;for(;n<e.length;){if(e[n]===`
218
- `&&n>=2&&e[n-1]===` `&&e[n-2]===` `){t=t.replace(/ +$/,``),t+=`<br>
219
- `,n++;continue}let r=!1;if(jI.has(e[n]))for(let i of MI){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&&!jI.has(e[n]);)n++;t+=pI(e.substring(r,n))}}return t}function PI(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>${pI(t)}</code>`,end:i}}}else i++;return null}function FI(e,t){let n=LI(e,t+1);if(n===-1)return null;let r=t+2;if(e[n+1]!==`(`)return null;let i=n+2,a=RI(e,i-1);if(a===-1)return null;let o=e.substring(r,n),{url:s,title:c}=zI(e.substring(i,a));if(Bk(s)){let e=o||c;return{html:`<video src="${pI(s)}"${e?` data-name="${pI(e)}"`:``} data-url="${pI(s)}" controls></video>`,end:a+1}}let l=c===void 0?``:` title="${pI(c)}"`;return{html:`<img src="${pI(s)}" alt="${pI(o)}"${l}>`,end:a+1}}function II(e,t){let n=t+1,r=LI(e,t);if(r===-1||e[r+1]!==`(`)return null;let i=r+2,a=RI(e,r+1);if(a===-1)return null;let o=e.substring(n,r),{url:s,title:c}=zI(e.substring(i,a)),l=c===void 0?``:` title="${pI(c)}"`;return{html:`<a href="${pI(s)}"${l}>${NI(o)}</a>`,end:a+1}}function LI(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 RI(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 zI(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]===`
220
- `){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 BI(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+NI(t)+i,end:s+a}}s++}return null}var VI=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 HI(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?VI.has(t[1].toLowerCase()):!1}function UI(e){let t=e.split(`
221
- `),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(`
222
- `)}),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=WI(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(`
223
- `)}),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(`
224
- `).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(HI(e)){let e=[];for(;r<t.length&&t[r].trim()!==``;)e.push(t[r]),r++;n.push({type:`rawHtml`,content:e.join(`
225
- `)}),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)||HI(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(`
226
- `).replace(/[ \t]+$/,``)}),i=!1}return n}function WI(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=GI(n),a=KI(r),o=[],s=t+2;for(;s<e.length;){let t=e[s];if(!t.includes(`|`))break;o.push(GI(t)),s++}return{token:{type:`table`,headers:i,rows:o,alignments:a},nextLine:s}}function GI(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 KI(e){return GI(e).map(e=>{let t=e.trim(),n=t.startsWith(`:`),r=t.endsWith(`:`);return n&&r?`center`:r?`right`:n?`left`:null})}function qI(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}>${NI(e.content)}</h${e.level}>`,n++;break}case`paragraph`:t+=`<p>${NI(r.content)}</p>`,n++;break;case`codeBlock`:{let e=r,i=e.language?` data-language="${pI(e.language)}"`:``;t+=`<pre><code${i}>${pI(e.code)}</code></pre>`,n++;break}case`blockquote`:{let e=qI(UI(r.content));t+=`<blockquote>${e}</blockquote>`,n++;break}case`hr`:t+=`<hr>`,n++;break;case`listItem`:{let r=JI(e,n);t+=r.html,n=r.nextIndex;break}case`table`:t+=XI(r),n++;break;case`rawHtml`:t+=r.content,n++;break;default:n++}}return t}function JI(e,t){let n=``,r=t,i=null;for(;r<e.length&&e[r].type===`listItem`;){let t=e[r],a=YI(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>${NI(t.content)}</p>`}else n+=`<li><p>${NI(t.content)}</p>`;if(t.childContent){let e=UI(t.childContent);n+=qI(e)}n+=`</li>`,r++}return i!==null&&(n+=`</${i===`ordered`?`ol`:`ul`}>`),{html:n,nextIndex:r}}function YI(e){return e===`ordered`?`ordered`:`bullet`}function XI(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}>${NI(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}>${NI(r)}</td>`}t+=`</tr>`}t+=`</tbody>`}return t+=`</table>`,t}function ZI(e){return qI(UI(e))}function QI(e){return ZI(e)}function $I(e,t){return fI(QI(e),t)}var eL=class{editor;constructor(e){this.editor=e}blocksToHTMLLossy(e=this.editor.document){return ZM(this.editor.pmSchema,this.editor).exportBlocks(e,{})}blocksToFullHTML(e=this.editor.document){return OF(this.editor.pmSchema,this.editor).serializeBlocks(e,{})}tryParseHTMLToBlocks(e){return fI(e,this.editor.pmSchema)}blocksToMarkdownLossy(e=this.editor.document){return cP(e,this.editor.pmSchema,this.editor,{})}tryParseMarkdownToBlocks(e){return $I(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=QI(e);return this.pasteHTML(t)}};function tL(e){let{bnBlock:t}=ZO(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:Fk(t.node,e.doc),prevBlock:r===null?void 0:Fk(r,e.doc),nextBlock:i===null?void 0:Fk(i,e.doc),parentBlock:a===void 0?void 0:Fk(a,e.doc)}}function nL(e,t,n=`start`){let r=typeof t==`string`?t:t.id,i=Ek(wk(e.doc)),a=LA(r,e.doc);if(!a)throw Error(`Block with ID ${r} not found`);let o=YO(a),s=i.blockSchema[o.blockNoteType].content;if(o.isBlockContainer){let t=o.blockContent;if(s===`none`){e.setSelection(Ih.create(e.doc,t.beforePos));return}if(s===`inline`||s===`plain`)n===`start`?e.setSelection(Z.create(e.doc,t.beforePos+1)):e.setSelection(Z.create(e.doc,t.afterPos-1));else if(s===`table`)n===`start`?e.setSelection(Z.create(e.doc,t.beforePos+4)):e.setSelection(Z.create(e.doc,t.afterPos-4));else throw new dk(s)}else nL(e,KO(n===`start`?o.childContainer.node.firstChild:o.childContainer.node.lastChild,e.doc),n)}var rL=[`vscode-editor-data`,`blocknote/html`,`text/markdown`,`text/html`,`text/plain`,`Files`];function iL(e,t){if(!e.startsWith(`.`)||!t.startsWith(`.`))throw Error(`The strings provided are not valid file extensions.`);return e===t}function aL(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 oL(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 sL(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 rL)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&&aL(i[n].type,t)||a&&iL(`.`+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=oL(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=KO(QO(e,a.pos).bnBlock.node,e.doc),o=(t.domElement?.querySelector(`[data-id="${i}"]`))?.getBoundingClientRect(),s=t.getBlock(i);if(s)return oL(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 cL=e=>nE.create({name:`dropFile`,addProseMirrorPlugins(){return[new Qh({props:{handleDOMEvents:{drop(t,n){if(!e.isEditable)return;let r=null;for(let e of rL)if(n.dataTransfer.types.includes(e)){r=e;break}return r===null||r===`Files`&&(sL(n,e),!0)}}}})]}}),lL=/(^|\n) {0,3}#{1,6} {1,8}[^\n]{1,64}\r?\n\r?\n\s{0,32}\S/,uL=/(_|__|\*|\*\*|~~|==|\+\+)(?!\s)(?:[^\s](?:.{0,62}[^\s])?|\S)(?=\1)/,dL=/\[[^\]]{1,128}\]\(https?:\/\/\S{1,999}\)/,fL=/(?:\s|^)`(?!\s)(?:[^\s`](?:[^`]{0,46}[^\s`])?|[^\s`])`([^\w]|$)/,pL=/(?:^|\n)\s{0,5}-\s{1}[^\n]+\n\s{0,15}-\s/,mL=/(?:^|\n)\s{0,5}\d+\.\s{1}[^\n]+\n\s{0,15}\d+\.\s/,hL=/\n{2} {0,3}-{2,48}\n{2}/,gL=/(?:\n|^)(```|~~~|\$\$)(?!`|~)[^\s]{0,64} {0,64}[^\n]{0,64}\n[\s\S]{0,9999}?\s*\1 {0,64}(?:\n+|$)/,_L=/(?:\n|^)(?!\s)\w[^\n]{0,64}\r?\n(-|=)\1{0,64}\n\n\s{0,64}(\w|$)/,vL=/(?:^|(\r?\n\r?\n))( {0,3}>[^\n]{1,333}\n){1,999}($|(\r?\n))/,yL=/^\s*\|(.+\|)+\s*$/m,bL=/^\s*\|(\s*[-:]+[-:]\s*\|)+\s*$/m,xL=/^\s*\|(.+\|)+\s*$/m,SL=e=>lL.test(e)||uL.test(e)||dL.test(e)||fL.test(e)||pL.test(e)||mL.test(e)||hL.test(e)||gL.test(e)||_L.test(e)||vL.test(e)||yL.test(e)||bL.test(e)||xL.test(e);function CL(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,`
227
- `)}</code></pre>`),!0):!1}function wL({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 rL)if(e.clipboardData.types.includes(t)){i=t;break}if(!i)return!0;if(i===`vscode-editor-data`){if(CL(e,t.prosemirrorView))return!0;i=`text/plain`}if(i===`Files`)return sL(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(SL(n))return t.pasteMarkdown(n),!0}return i===`text/html`?(t.pasteHTML(a),!0):r?(t.pasteMarkdown(a),!0):(t.pasteText(a),!0)}var TL=(e,t)=>nE.create({name:`pasteFromClipboard`,addProseMirrorPlugins(){return[new Qh({props:{handleDOMEvents:{paste(n,r){if(r.preventDefault(),e.isEditable)return t({event:r,editor:e,defaultPasteHandler:({prioritizeMarkdownOverHTML:t=!0,plainTextAsMarkdown:n=!0}={})=>wL({event:r,editor:e,prioritizeMarkdownOverHTML:t,plainTextAsMarkdown:n})})}}}})]}});function EL(e,t,n){let r=!1,i=e.state.selection instanceof aD;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=ZM(e.state.schema,n);if(i){t.firstChild?.type.name===`table`&&(t=t.firstChild.content);let e=Mk(t,n.schema.inlineContentSchema,n.schema.styleSchema);a=`<table>${o.exportInlineContent(e,{})}</table>`}else if(r){let e=Nk(t,n.schema.inlineContentSchema,n.schema.styleSchema);a=o.exportInlineContent(e,{})}else{let e=lP(t);a=o.exportBlocks(e,{})}return a}function DL(e,t){`node`in e.state.selection&&e.state.selection.node.type.spec.group===`blockContent`&&t.transact(t=>t.setSelection(new Ih(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=EL(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):sP(i)}}var OL=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},kL=(e,t,n)=>{n.preventDefault(),n.clipboardData.clearData();let{clipboardHTML:r,externalHTML:i,markdown:a}=DL(t,e);n.clipboardData.setData(`blocknote/html`,r),n.clipboardData.setData(`text/html`,i),n.clipboardData.setData(`text/plain`,a)},AL=e=>nE.create({name:`copyToClipboard`,addProseMirrorPlugins(){return[new Qh({props:{handleDOMEvents:{copy(t,n){return OL(t)||kL(e,t,n),!0},cut(t,n){return OL(t)||(kL(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 Ih(e.doc.resolve(t.state.selection.from-1)))),n.preventDefault(),n.dataTransfer.clearData();let{clipboardHTML:r,externalHTML:i,markdown:a}=DL(t,e);return n.dataTransfer.setData(`blocknote/html`,r),n.dataTransfer.setData(`text/html`,i),n.dataTransfer.setData(`text/plain`,a),!0}}}})]}}),jL=nE.create({name:`blockBackgroundColor`,addGlobalAttributes(){return[{types:[`tableCell`,`tableHeader`],attributes:{backgroundColor:$A()}}]}}),ML=xE.create({name:`hardBreak`,inline:!0,group:`inline`,selectable:!1,linebreakReplacement:!0,priority:10,parseHTML(){return[{tag:`br`}]},renderHTML({HTMLAttributes:e}){return[`br`,KC(this.options.HTMLAttributes,e)]},renderText(){return`
228
- `}}),NL=(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`)?XO(e.resolve(i)):NL(e,i)},PL=(e,t)=>{let n=e.resolve(t),r=n.index();if(r===0)return;let i=n.posAtIndex(r-1);return XO(e.resolve(i))},FL=(e,t)=>{let n=e.resolve(t),r=n.index();if(r===n.node().childCount-1)return;let i=n.posAtIndex(r+1);return XO(e.resolve(i))},IL=(e,t)=>{for(;t.childContainer;){let n=t.childContainer.node,r=e.resolve(t.childContainer.beforePos+1).posAtIndex(n.childCount-1);t=XO(e.resolve(r))}return t},LL=(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*`,RL=(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},zL=e=>({state:t,dispatch:n})=>{let r=XO(t.doc.resolve(e)),i=PL(t.doc,r.bnBlock.beforePos);if(!i)return!1;let a=IL(t.doc,i);return LL(a,r)?RL(t,n,a,r):!1},BL=nE.create({priority:50,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({chain:e,commands:t})=>[()=>t.deleteSelection(),()=>t.undoInputRule(),()=>t.command(({state:e})=>{let n=ZO(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(zA(n.bnBlock.beforePos,{type:`paragraph`,props:{}})):!1}),()=>t.command(({state:e,tr:t})=>{let n=ZO(e);if(!n.isBlockContainer)return!1;let{blockContent:r}=n;return e.selection.from===r.beforePos+1&&UF(t,t.doc.type.schema.nodes.blockContainer,t.doc.type.schema.nodes.blockGroup)}),()=>t.command(({state:t})=>{let n=ZO(t);if(!n.isBlockContainer)return!1;let{bnBlock:r,blockContent:i}=n,a=PL(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(zL(c)).scrollIntoView().run():!1}),()=>t.command(({state:e,tr:t,dispatch:n})=>{let r=ZO(e);if(!r.isBlockContainer||e.selection.from!==r.blockContent.beforePos+1)return!1;let i=PL(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(Z.near(t.doc.resolve(n.pos+1))),!0}return!1}),()=>t.command(({state:e,tr:t,dispatch:n})=>{let r=ZO(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),gF(t,s),o.pos===s+1?(t.insert(s,r.bnBlock.node),t.setSelection(Z.near(t.doc.resolve(s)))):(t.insert(o.pos-1,r.bnBlock.node),t.setSelection(Z.near(t.doc.resolve(o.pos))))),!0}),()=>t.command(({state:t})=>{let n=ZO(t);if(!n.isBlockContainer)return!1;if(n.blockContent.node.childCount===0&&n.blockContent.node.type.spec.content===`inline*`){let r=PL(t.doc,n.bnBlock.beforePos);if(!r)return!1;let i=IL(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=ZO(t);if(!n.isBlockContainer)return!1;let r=t.selection.from===n.blockContent.beforePos+1,i=t.selection.empty,a=PL(t.doc,n.bnBlock.beforePos);if(a&&r&&i){let r=IL(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=ZO(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=XO(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||Y.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=ZO(t);if(!n.isBlockContainer)return!1;let{bnBlock:r,blockContent:i}=n,a=FL(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(zL(c)).scrollIntoView().run():!1}),()=>t.command(({state:e,tr:t,dispatch:n})=>{let r=ZO(e);if(!r.isBlockContainer||e.selection.from!==r.blockContent.afterPos-1)return!1;let i=FL(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),gF(t,i.bnBlock.beforePos),t.insert(r.bnBlock.afterPos,n.nodeAfter),t.setSelection(Z.near(t.doc.resolve(n.pos))),!0}return!1}),()=>t.command(({state:e,tr:t,dispatch:n})=>{let r=ZO(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=XO(t.doc.resolve(e));t.delete(n.bnBlock.beforePos,n.bnBlock.afterPos),gF(t,s-o.node().nodeSize),t.insert(a.pos,n.bnBlock.node),t.setSelection(Z.near(t.doc.resolve(e)))}return!0}),()=>t.command(({state:t})=>{let n=ZO(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=FL(e,t);if(n)return n;let r=NL(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||Y.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=ZO(t);if(!n.isBlockContainer)return!1;if(n.blockContent.node.childCount===0&&n.blockContent.node.type.spec.content===`inline*`){let r=FL(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=ZO(t);if(!n.isBlockContainer)return!1;let r=t.selection.from===n.blockContent.afterPos-1,i=t.selection.empty,a=FL(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=ZO(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?UF(t,t.doc.type.schema.nodes.blockContainer,t.doc.type.schema.nodes.blockGroup):!1}),()=>t.command(({state:t})=>{let r=ZO(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(`
229
- `,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=ZO(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 Z(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=ZO(e);if(!n.isBlockContainer)return!1;let{blockContent:r}=n,i=e.selection.$anchor.parentOffset===0;return r.node.childCount!==0&&(t().deleteSelection().command(Bj(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(_M)?.store.state||this.options.editor.getExtension(nj)?.store.state!==void 0)?!1:VF(this.options.editor),"Shift-Tab":()=>this.options.tabBehavior!==`prefer-indent`&&(this.options.editor.getExtension(_M)?.store.state||this.options.editor.getExtension(nj)?.store.state!==void 0)?!1:WF(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()}}}),VL=nE.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}}}}]}}),HL=nE.create({name:`blockTextColor`,addGlobalAttributes(){return[{types:[`table`,`tableCell`,`tableHeader`],attributes:{textColor:ej()}}]}}),UL=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`;function WL(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 GL=new Set(WL(UL)),KL=new Set([`localhost`]),qL=/[.,;:!?"']+$/,JL=/(?:https?|ftp|ftps):\/\/[^\s]+/g,YL=/mailto:[^\s]+/g,XL=/[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}/g,ZL=/(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(?::\d{1,5})?(?:[/?#][^\s]*)?/g;function QL(e){let t=e,n=!0;for(;n;){n=!1;let e=t;t=t.replace(qL,``),t!==e&&(n=!0);for(let[e,r]of[[`(`,`)`],[`[`,`]`]])for(;t.endsWith(r);){let i=$L(t,e);if($L(t,r)>i)t=t.slice(0,-1),n=!0;else break}}return t}function $L(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function eR(e){let t=e.split(`.`);return t[t.length-1].toLowerCase()}function tR(e){let t=eR(e);return GL.has(t)}function nR(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 rR(e,t){if(!e)return[];let n=t?.defaultProtocol||`http`,r=[];for(let t of e.matchAll(JL))r.push({type:`url`,value:t[0],start:t.index,end:t.index+t[0].length});for(let t of e.matchAll(YL))r.push({type:`url`,value:t[0],start:t.index,end:t.index+t[0].length});for(let t of e.matchAll(XL))r.push({type:`email`,value:t[0],start:t.index,end:t.index+t[0].length});for(let t of e.matchAll(ZL))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=QL(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(!tR(e))continue}if(e.type===`email`){let e=t.split(`@`)[1];if(!tR(e))continue}let a=nR(t,e.type,n);o.push({type:e.type,value:t,isLink:!0,href:a,start:r,end:i})}return o}function iR(e,t=`http`){if(!e)return[sR(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(aR(i))return[sR(n,0,1),oR(i,1,1+i.length,t),sR(r,1+i.length,e.length)]}if(e.endsWith(`.`)&&e.length>1){let n=e.slice(0,-1);if(aR(n))return[oR(n,0,n.length,t),sR(`.`,n.length,e.length)]}return aR(e)?[oR(e,0,e.length,t)]:[sR(e,0,e.length)]}function aR(e){if(/^(?:https?|ftp|ftps):\/\/[^\s]+$/.test(e)||/^mailto:[^\s]+$/.test(e)||KL.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(GL.has(e))return!0}return!1}function oR(e,t,n,r){let i=e.includes(`@`)&&!e.includes(`://`)&&!e.startsWith(`mailto:`)?`email`:`url`;return{type:i,value:e,isLink:!0,href:nR(e,i,r),start:t,end:n}}function sR(e,t,n){return{type:`text`,value:e,isLink:!1,href:e,start:t,end:n}}var cR=`[\0- \xA0 ᠎ -\u2029  ]`,lR=new RegExp(cR),uR=RegExp(`${cR}$`),dR=new RegExp(cR,`g`);function fR(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?[`()`,`[]`].includes(e[0].value+e[2].value):!1}function pR(e){return new Qh({key:new tg(`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(uw(wC(n.doc,[...t])).forEach(({newRange:t})=>{let n=TC(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(!uR.test(e))return;i=n[0],a=r.doc.textBetween(i.pos,t.to,void 0,` `)}if(i&&a){let t=a.split(lR).filter(Boolean);if(t.length<=0)return;let n=t[t.length-1],s=i.pos+a.lastIndexOf(n);if(!n)return;let c=iR(n,e.defaultProtocol);if(!fR(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=>{dw(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 mR(e){return new Qh({key:new tg(`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=sw(t.state,e.type.name),o=i.href??a.href,s=i.target??a.target;return o?(window.open(o,s),!0):!1}}})}function hR(e){return new Qh({key:new tg(`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=rR(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 gR=`https`,_R=/^(?:(?:http|https|ftp|ftps|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z0-9+.\-]+(?:[^a-z+.\-:]|$))/i;function vR(e){if(!e)return!0;let t=e.replace(dR,``);return _R.test(t)}function yR(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 bR=JT.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:vR}},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`,KC(e,this.options.HTMLAttributes),0]:[`a`,KC({...e,href:``},this.options.HTMLAttributes),0]},addPasteRules(){let e=this.options.isValidLink;return[CE({find:t=>{let n=[];if(t){let r=rR(t,{defaultProtocol:gR}).filter(t=>t.isLink&&e(t.value));for(let e of r)yR(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(pR({type:this.type,defaultProtocol:gR,validate:this.options.isValidLink,shouldAutoLink:yR})),e.push(mR({type:this.type,tiptapEditor:this.editor,editor:this.options.editor,onClick:this.options.onClick})),e.push(hR({editor:this.editor,defaultProtocol:gR,type:this.type,shouldAutoLink:yR,isValidLink:this.options.isValidLink})),e}}),xR=ME(({editor:e,options:t})=>({key:`link`,tiptapExtensions:[bR.configure({HTMLAttributes:t.HTMLAttributes??{},editor:e,onClick:t.onClick,...t.isValidLink?{isValidLink:t.isValidLink}:{}})]})),SR={blockColor:`data-block-color`,blockStyle:`data-block-style`,id:`data-id`,depth:`data-depth`,depthChange:`data-depth-change`},CR=xE.create({name:`blockContainer`,group:`blockGroupChild bnBlock`,content:`blockContent blockGroup?`,priority:50,defining:!0,marks(){return $j(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(SR))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=hk(`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}}}),wR=xE.create({name:`blockGroup`,group:`childContainer`,content:`blockGroupChild+`,marks(){return $j(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=hk(`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}}}),TR=xE.create({name:`doc`,topNode:!0,content:`blockGroup`,marks(){return $j(this.editor)}});function ER(e,t){return[mE.ClipboardTextSerializer,mE.Commands,mE.Editable,mE.FocusEvents,mE.Tabindex,fF,nk.configure({types:[`blockContainer`,`columnList`,`column`],setIdAttribute:t.setIdAttribute,isWithinEditor:e.isWithinEditor}),ML,eF,...Object.values(e.schema.styleSpecs).map(t=>t.implementation.mark.configure({editor:e})),HL,jL,VL,nE.create({name:`OverrideEscape`,addKeyboardShortcuts:()=>({Escape:()=>!e.getExtension(SM)?.shown()&&(e.blur(),!0)})}),TR,CR.configure({editor:e,domAttributes:t.domAttributes}),BL.configure({editor:e,tabBehavior:t.tabBehavior}),wR.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})]:[]]),AL(e),TL(e,t.pasteHandler||(e=>e.defaultPasteHandler())),cL(e)]}function DR(e,t){let n=[iN(),uN(t),nj(t),_M(t),xR({HTMLAttributes:t.links?.HTMLAttributes??{},onClick:t.links?.onClick,...t.links?.isValidLink?{isValidLink:t.links.isValidLink}:{}}),hN(t),yN(),xN(t),FM(t),xP(t),SP(),CP(),SM(t),dN(),mN(),SN(),...t.trailingBlock===!1?[]:[GP()]];return`table`in e.schema.blockSpecs&&n.push(VP(t)),t.animations!==!1&&n.push(TN()),n}var OR=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 DR(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[jE];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=ER(this.editor,this.options).filter(e=>!this.disabledExtensions.has(e.name)),t=fA(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(nE.create({name:r.key,priority:i,addProseMirrorPlugins:()=>a})),o.length&&(n.has(i)||n.set(i,[]),n.get(i).push(...o))}e.push(nE.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=QP({rules:e});return[t,new Qh({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,`
230
- `,()=>e.state.tr.insertText(`
231
- `,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 YP(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=ZO(e);return!n.isBlockContainer||this.editor.schema.blockSchema[n.blockNoteType]?.content!==`inline`?null:(e.deleteRange(r,i),BA(e,n.bnBlock.beforePos,a),nL(e,KO(n.bnBlock.node,e.doc),`start`),e)}return null},{undoable:!0}))),Object.keys(e.keyboardShortcuts||{}).length){let n,r=Mx(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 Qh({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 kR(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 AR(e){if(e.selection.empty||`node`in e.selection)return;let t=e.doc.resolve(qO(e.doc,e.selection.from).posBeforeNode),n=e.doc.resolve(qO(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 Fk(a,e.doc)},i=[],a=t.sharedDepth(n.pos),o=t.index(a),s=n.index(a);if(t.depth>a){i.push(Fk(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 jR(e,t,n){let r=typeof t==`string`?t:t.id,i=typeof n==`string`?n:n.id,a=Ek(wk(e));if(r===i)throw Error(`Attempting to set selection with the same anchor and head blocks (id ${r})`);let o=LA(r,e.doc);if(!o)throw Error(`Block with ID ${r} not found`);let s=LA(i,e.doc);if(!s)throw Error(`Block with ID ${i} not found`);let c=YO(o),l=YO(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=BE.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=BE.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(Z.create(e.doc,f,p))}function MR(e,t=!1){let n=t?kR(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=Lk(e.doc.slice(r.pos,i.pos,!0));return{_meta:{startPos:r.pos,endPos:i.pos},...a}}var NR=class{editor;constructor(e){this.editor=e}getSelection(){return this.editor.transact(e=>AR(e))}getSelectionCutBlocks(e=!1){return this.editor.transact(t=>MR(t,e))}setSelection(e,t){return this.editor.transact(n=>jR(n,e,t))}getTextCursorPosition(){return this.editor.transact(e=>tL(e))}setTextCursorPosition(e,t=`start`){return this.editor.transact(n=>nL(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(bw(e)){let e=this.editor.prosemirrorView.nodeDOM(n);if(e)return e.getBoundingClientRect()}return Ew(this.editor.prosemirrorView,n,r).toJSON()}},PR=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 FR(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&&WS(e,e.steps.length-1,-1),!0}var IR=class{editor;constructor(e){this.editor=e}insertInlineContent(e,{updateSelection:t=!1}={}){let n=NA(e,this.editor.pmSchema);this.editor.transact(e=>{FR(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 dk(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 dk(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=ES(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 LR(e){return EC(e.state.selection.$from,e=>e.type.name===`tableCell`||e.type.name===`tableHeader`)!==void 0}function RR(e,t){let n=t.nodes.hardBreak,r=Y.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(RR(e.content,t)),r=r.addToEnd(n.create()))}),r.lastChild?.type===n&&(r=r.cut(0,r.size-1)),r}function zR(e,t){let n=[];return e.forEach((e,r,i)=>{i!==t&&n.push(e)}),Y.from(n)}function BR(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=Y.from(n),e}function VR(e,t){let n=Y.from(e.content);n=BR(n,t.state.schema);let r=HR(n,t,e);if(r)return r;if(LR(t)){let e=!1;if(n.descendants(t=>{t.type.isInGroup(`tableContent`)&&(e=!0)}),!e&&!t.state.schema.nodes.tableParagraph.validContent(n))return new X(RR(n,t.state.schema),0,0)}if(!UR(n,t))return new X(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=zR(n,e+1))}let i=t.state.schema.nodes.blockContainer.createChecked(void 0,r);n=n.replaceChild(e,i)}return new X(n,e.openStart,e.openEnd)}function HR(e,t,n){if(LR(t)||t.dragging)return null;let r=ZO(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 X(e.replaceChild(0,u),n.openStart,n.openEnd)}function UR(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=ZO(t.state);if(e.isBlockContainer)return e.blockContent.node.type.spec.content!==`tableRow+`}}return!0}var WR={enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!1},GR=class e extends kF{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||kl,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||NM.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 QF(this),this._extensionManager=new OR(this,t);let n=this._extensionManager.getTiptapExtensions(),r={...WR,...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:hk(`bn-editor`,t.defaultStyles?`bn-default-styles`:``,t.domAttributes?.editor?.class||``)},transformPasted:VR}};try{let e=t.initialContent||[{type:`paragraph`,id:nk.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=nw(r.extensions);n.cached.blockNoteEditor=this;let i=xC({type:`doc`,content:[{type:`blockGroup`,content:e.map(e=>IA(e,n,this.schema.styleSchema).toJSON())}]},n,r.parseOptions);this._tiptapEditor=new yE({...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 ZF(this),this._exportManager=new eL(this),this._selectionManager=new NR(this),this._stateManager=new PR(this),this._styleManager=new IR(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(iN).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)}},KR=(0,q.createContext)(void 0);function qR(e){return(0,q.useContext)(KR)}function JR(e){let t=qR(e);if(!t?.editor)throw Error(`useBlockNoteEditor was called outside of a BlockNoteContext provider or BlockNoteView component`);return t.editor}function YR(e,t=e=>e){return(0,Bf.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,XR)}function XR(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=ZR(e);return n.length===ZR(t).length&&n.every(n=>Object.prototype.hasOwnProperty.call(t,n)&&Object.is(e[n],t[n]))}function ZR(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function QR(e,t){let n=(t?.editor??JR()).getExtension(e);if(!n)throw Error(`Extension not found`,{cause:{plugin:e}});return n}function $R(e,t){let{store:n}=QR(e,t);if(!n)throw Error(`Store not found on plugin`,{cause:{plugin:e}});return YR(n,t?.selector)}var ez=typeof window<`u`?q.useLayoutEffect:q.useEffect,tz=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 nz(e){let t=qR(),n=e.editor||t?.editor||null,r=e.on||`all`,[i]=(0,q.useState)(()=>new tz(n)),a=(0,Bf.useSyncExternalStoreWithSelector)(i.subscribe,i.getSnapshot,i.getServerSnapshot,e.selector,e.equalityFn??Vf.default);return ez(()=>i.watch(n,r),[n,i,r]),(0,q.useDebugValue)(a),a}function rz(e){let t=qR();if(e||=t?.editor,!e)throw Error("'editor' is required in `useEditorDOMElement`, either from BlockNoteContext or as a function argument");return nz({editor:e,selector:e=>e.editor.domElement,equalityFn:(e,t)=>e===t,on:`mount`})}var iz=(0,q.createContext)(void 0);function az(){return(0,q.useContext)(iz)}var oz=typeof window<`u`?q.useInsertionEffect:q.useEffect,sz=(0,q.createContext)(null);function cz(){let e=(0,q.useContext)(sz),t=rz();return e||(t?.parentElement??null)}function lz(e){return(0,J.jsx)(sz.Provider,{value:null,children:e.children})}function uz(e){let{target:t,children:n}=e,r=JR(),i=az()?.applyThemedRoot,[a]=(0,q.useState)(()=>typeof document>`u`?null:document.createElement(`div`));return oz(()=>{if(a&&t)return t.appendChild(a),()=>a.remove()},[a,t]),oz(()=>{!a||!t||i?.(a)},[a,t,i]),oz(()=>{if(a&&t)return r.registerPortalElement(a),()=>r.unregisterPortalElement(a)},[r,a,t]),t===void 0?n:(0,J.jsx)(sz.Provider,{value:a,children:n})}function dz(){let[e]=(0,q.useState)(()=>{if(typeof document>`u`)return null;let e=document.createElement(`span`);return e.className=`bn-portal-anchor`,e}),t=(0,q.useCallback)(t=>{t&&e&&e.parentElement!==t&&t.appendChild(e)},[e]);return{anchor:e,holder:(0,J.jsx)(`span`,{ref:t,className:fz,style:{position:`absolute`,width:0,height:0,overflow:`visible`}})}}var fz=`bn-portal-anchor-holder`;function pz(e){return Array.from(e.childNodes).some(e=>!(e instanceof Element&&e.classList.contains(fz)))}function mz(e){let{anchor:t,holder:n}=dz(),r=cz(),i=t??r,a=typeof e.children==`function`?e.children(i):e.children;return(0,J.jsxs)(J.Fragment,{children:[n,(0,J.jsx)(sz.Provider,{value:i,children:a})]})}function hz(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 gz(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 _z=e=>{let t=JR(),n=cz(),{whileElementsMounted:r,middleware:i,...a}=e.useFloatingOptions??{},{refs:o,floatingStyles:s,context:c,middlewareData:l}=Cf({whileElementsMounted:gz(E,e.useFloatingOptions?.whileElementsMounted),middleware:[...i??[],L()],...a}),{isMounted:u,styles:d}=Af(c,e.useTransitionStylesProps),{status:f}=kf(c,e.useTransitionStatusProps),{getFloatingProps:p}=Tf([xf(c,e.useDismissProps),Ld(c,{enabled:!1,...e.useHoverProps})]),m=(0,q.useRef)(``),h=(0,q.useRef)(null),g=dd([h,o.setFloating]);if((0,q.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:hz(e.reference),...r?{getClientRects:r}:{},contextElement:n})}},[e.reference,o,e.focusManagerProps?.disabled,t]),(0,q.useEffect)(()=>{(f===`initial`||f===`open`)&&h.current&&pz(h.current)&&(m.current=h.current.innerHTML)},[f,e.reference,e.children]),!u||!n)return!1;let _={...e.elementProps,style:{display:`flex`,...e.elementProps?.style,zIndex:`calc(var(--bn-ui-base-z-index, 0) + ${e.elementProps?.style?.zIndex||0})`,...s,...d,...l.hide?.referenceHidden?{visibility:`hidden`}:{}},...p()};return f===`close`?(0,J.jsx)(of,{root:n,children:(0,J.jsx)(`div`,{ref:g,..._,dangerouslySetInnerHTML:{__html:m.current}})}):e.focusManagerProps?.disabled?(0,J.jsx)(of,{root:n,children:(0,J.jsx)(`div`,{ref:g,..._,children:(0,J.jsx)(mz,{children:e.children})})}):(0,J.jsx)(of,{root:n,children:(0,J.jsx)(_f,{...e.focusManagerProps,context:c,children:(0,J.jsx)(`div`,{ref:g,..._,children:(0,J.jsx)(mz,{children:e.children})})})})},vz=(0,q.createContext)(void 0);function yz(){return(0,q.useContext)(vz)}function bz(){return qR().editor.dictionary}var xz=e=>{let{position:t,children:n,...r}=e,{from:i,to:a}=t||{},o=JR(),s=rz(),c=(0,q.useMemo)(()=>{if(i!==void 0&&a!==void 0)return{element:s?.firstElementChild||void 0,getBoundingClientRect:()=>Ew(o.prosemirrorView,i,a??i)}},[o,s,i,a]);return(0,J.jsx)(_z,{reference:c,...r,children:t!==void 0&&n})},Sz=(e={},t=[])=>(0,q.useMemo)(()=>{let t=GR.create(e);return window&&(window.ProseMirror=t._tiptapEditor),t},t),Cz=e=>{let[t,n]=(0,q.useState)(!1),r=nz({editor:e.editor,selector:({editor:e})=>e.isEmpty}),i=yz(),a=(0,q.useCallback)(()=>{n(!0)},[]),o=(0,q.useCallback)(()=>{n(!1)},[]);return(0,q.useEffect)(()=>{e.editable&&e.autoFocus&&e.editor.focus()},[e.autoFocus,e.editable,e.editor]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(i.Comments.Editor,{autoFocus:e.autoFocus,className:`bn-comment-editor`,editor:e.editor,onFocus:a,onBlur:o,editable:e.editable}),e.actions&&(0,J.jsx)(`div`,{className:`bn-comment-actions-wrapper`,children:e.actions({isFocused:t,isEmpty:r})})]})},{textColor:wz,backgroundColor:Tz,...Ez}=AM,Dz=NM.create({blockSpecs:{paragraph:Xj()},styleSpecs:Ez});function Oz(e){return!e.hasUnsavedContent||!e.confirmBeforeDiscard||(e.confirm??(e=>window.confirm(e)))(e.message)}var kz=ME(({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}:{}}}}),Az=JT.create({name:`comment`,excludes:``,inclusive:!1,keepOnSplit:!0,group:wE,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`,KC(e,{class:`bn-thread-mark`})]},parseHTML(){return[{tag:`span.bn-thread-mark`}]},extendMarkSchema(e){return e.name===`comment`?{blocknoteIgnore:!0}:{}}}),jz=new tg(`blocknote-comments`);function Mz(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 Nz=ME(({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=LM(r),s=Az.name,c=NE({pendingComment:!1,selectedThreadId:void 0,threadPositions:new Map},{onUpdate(t,n){t.selectedThreadId!==n.selectedThreadId&&e.transact(e=>e.setMeta(jz,!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:[Az],prosemirrorPlugins:[new Qh({key:jz,state:{init(){return{decorations:jb.empty}},apply(e,t){let n=e.getMeta(jz);if(!e.docChanged&&!n)return t;let r=e.docChanged?Mz(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(Ob.inline(e.from,e.to,{class:`bn-thread-mark-selected`}))}return{decorations:jb.create(e.doc,i)}}},props:{decorations(e){return jz.getState(e)?.decorations??jb.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(FM)?.showSelection(!0,`comments`)},stopPendingComment(){c.setState(e=>({...e,selectedThreadId:void 0,pendingComment:!1})),e.getExtension(FM)?.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}}),Pz=If();function Fz(e,t){if(e.isDestroyed||t.defaultPrevented||!t.cancelable||!e.isEditable||t.inputType!==`insertParagraph`&&t.inputType!==`insertLineBreak`||!PS()&&!NS())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 Iz=new tg(`reactMobileEnter`),Lz=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},Rz=({contentComponent:e})=>{let t=(0,Pz.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,J.jsx)(J.Fragment,{children:Object.values(t)})};function zz(){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]:ud.createPortal(n.reactElement,n.element,e)},r()},removeRenderer(e){let n={...t};delete n[e],t=n,r()}}}var Bz=class extends q.Component{constructor(e){super(e),this.editorContentRef=q.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=zz(),e.createNodeViews(),e.registerPlugin(new Qh({key:Iz,props:{handleDOMEvents:{beforeinput:(t,n)=>Fz(e,n)}}})),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||(e.unregisterPlugin(Iz),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,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{ref:Lz(t,this.editorContentRef),...n}),e?.contentComponent&&(0,J.jsx)(Rz,{contentComponent:e.contentComponent})]})}},Vz=(0,q.forwardRef)((e,t)=>{let n=q.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return q.createElement(Bz,{key:n,innerRef:t,...e})}),Hz=q.memo(Vz);typeof window>`u`||typeof window<`u`&&window.next;var Uz=(0,q.createContext)({editor:null});Uz.Consumer;var Wz=(0,q.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Gz=()=>(0,q.useContext)(Wz),Kz=q.forwardRef((e,t)=>{let{onDragStart:n}=Gz(),r=e.as||`div`;return(0,J.jsx)(r,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})});function qz(e){return!!(typeof e==`function`&&e.prototype&&e.prototype.isReactComponent)}function Jz(e){return!(typeof e!=`object`||!e.$$typeof||e.$$typeof.toString()!==`Symbol(react.forward_ref)`&&e.$$typeof.description!==`react.forward_ref`)}function Yz(e){return!(typeof e!=`object`||!e.$$typeof||e.$$typeof.toString()!==`Symbol(react.memo)`&&e.$$typeof.description!==`react.memo`)}function Xz(e){if(qz(e)||Jz(e))return!0;if(Yz(e)){let t=e.type;if(t)return qz(t)||Jz(t)}return!1}function Zz(){try{if(q.version)return parseInt(q.version.split(`.`)[0],10)>=19}catch{}return!1}var Qz=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,ud.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=Zz(),a=Xz(t),o={...n};o.ref&&!(i||a)&&delete o.ref,!o.ref&&(i||a)&&(o.ref=e=>{this.ref=e}),this.reactElement=(0,J.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])})}};q.createContext({markViewContentRef:()=>{}});function $z(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 eB(e,t,n){return e.node(n)===t.node(n)&&e.before(n)===t.before(n)}function tB(e){if(!AS(e))return[];let{$from:t,$to:n}=e,r=[],i=Math.min(t.depth,n.depth);for(let e=1;e<=i&&eB(t,n,e);e+=1)r.push(t.before(e));return r}var nB=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 tB(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}},rB=new WeakMap;function iB(e){let t=rB.get(e);return t||(t=new nB(e),rB.set(e,t)),t}var aB=class extends SE{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,q.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=$z(this.contentDOMElement);e.appendChild(this.contentDOMElement),t?.()}}},n=this.component,r=(0,q.memo)(e=>(0,J.jsx)(Wz.Provider,{value:t,children:(0,q.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 Qz(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),iB(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`&&tB(this.editor.state.selection).includes(e)}destroy(){this.renderer.destroy(),iB(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=qC(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function oB(e,t){return n=>n.editor.contentComponent?new aB(e,n,t):{dom:document.createElement(`span`),contentDOM:null,update:()=>!1,destroy:()=>{},selectNode:()=>{},deselectNode:()=>{},stopEvent:()=>!1,ignoreMutation:()=>!0}}var sB=(0,q.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});sB.displayName=`TiptapContext`;var cB=()=>(0,q.useContext)(sB);function lB({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,q.useMemo)(()=>({editor:n}),[n]),i=(0,q.useMemo)(()=>({editor:n}),[n]);return(0,J.jsx)(Uz.Provider,{value:i,children:(0,J.jsx)(sB.Provider,{value:r,children:e})})}lB.displayName=`Tiptap`;function uB({...e}){let{editor:t}=cB();return(0,J.jsx)(Hz,{editor:t,...e})}uB.displayName=`Tiptap.Content`,Object.assign(lB,{Content:uB});var dB=Oe(),fB=Object.defineProperty,pB=(e,t)=>{let n={};for(var r in e)fB(n,r,{get:e[r],enumerable:!0});return t||fB(n,Symbol.toStringTag,{value:`Module`}),n},mB=e=>{let{blockId:t,children:n,...r}=e,i=JR(),a=(0,q.useMemo)(()=>i.transact(e=>{if(!t)return;let n=LA(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,J.jsx)(_z,{reference:a,...r,children:t!==void 0&&n})},hB=e=>{let t=yz(),n=bz(),r=JR(),i=r.getBlock(e.blockId),[a,o]=(0,q.useState)(``),s=(0,q.useCallback)(e=>{o(e.currentTarget.value)},[]),c=(0,q.useCallback)(()=>{r.getBlock(e.blockId)&&r.updateBlock(e.blockId,{props:{name:zk(a),url:a}})},[r,e.blockId,a]);return i?(0,J.jsx)(t.FilePanel.TabPanel,{className:`bn-tab-panel`,children:(0,J.jsx)(t.Generic.Form.Root,{onSubmit:c,submitButton:(0,J.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,J.jsx)(t.FilePanel.TextInput,{className:`bn-text-input`,placeholder:n.file_panel.embed.url_placeholder,value:a,onChange:s,"data-test":`embed-input`})})}):null},gB=e=>{let t=yz(),n=bz(),{setLoading:r}=e,i=JR(),a=i.getBlock(e.blockId),[o,s]=(0,q.useState)(!1);(0,q.useEffect)(()=>{o&&setTimeout(()=>{s(!1)},3e3)},[o]);let c=(0,q.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,J.jsxs)(t.FilePanel.TabPanel,{className:`bn-tab-panel`,children:[(0,J.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,J.jsx)(`div`,{className:`bn-error-text`,children:n.file_panel.upload.upload_error})]})},_B=e=>{let t=yz(),n=bz(),r=JR(),[i,a]=(0,q.useState)(!1),o=e.tabs??[...r.uploadFile===void 0?[]:[{name:n.file_panel.upload.title,tabPanel:(0,J.jsx)(gB,{blockId:e.blockId,setLoading:a})}],{name:n.file_panel.embed.title,tabPanel:(0,J.jsx)(hB,{blockId:e.blockId})}],[s,c]=(0,q.useState)(e.defaultOpenTab||o[0].name);return(0,J.jsx)(t.FilePanel.Root,{className:`bn-panel`,defaultOpenTab:s,openTab:s,setOpenTab:c,tabs:o,loading:i})},vB=e=>{let t=JR(),n=QR(nj),r=$R(nj),i=(0,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:!!r,onOpenChange:(e,r,i)=>{e||n.closeMenu(),i===`escape-key`&&t.focus()},middleware:[ae(10),te()],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:90},...e.floatingUIOptions?.elementProps}}),[r,t,n,e.floatingUIOptions]),a=e.filePanel||_B;return(0,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(mB,{blockId:r,...i,children:r&&(0,J.jsx)(a,{blockId:r})})})},yB={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},bB=q.createContext&&q.createContext(yB),xB=[`attr`,`size`,`title`];function SB(e,t){if(e==null)return{};var n,r,i=CB(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 CB(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 wB(){return wB=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},wB.apply(null,arguments)}function TB(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 EB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?TB(Object(n),!0).forEach(function(t){DB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DB(e,t,n){return(t=OB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OB(e){var t=kB(e,`string`);return typeof t==`symbol`?t:t+``}function kB(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 AB(e){return e&&e.map((e,t)=>q.createElement(e.tag,EB({key:t},e.attr),AB(e.child)))}function jB(e){return t=>q.createElement(MB,wB({attr:EB({},e.attr)},t),AB(e.child))}function MB(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=SB(e,xB),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),q.createElement(`svg`,wB({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:EB(EB({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&q.createElement(`title`,null,i),e.children)};return bB===void 0?t(yB):q.createElement(bB.Consumer,null,e=>t(e))}function NB(e){return jB({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 PB(e){return jB({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 FB(e){return jB({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M5 11V13H19V11H5Z`},child:[]}]})(e)}function IB(e){return jB({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 LB(e){return jB({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 RB(e){return jB({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 zB(e){return jB({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 BB(e){return jB({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 VB(e){return jB({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 HB(e){return jB({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z`},child:[]}]})(e)}function UB(e){return jB({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 WB(e){return jB({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 GB(e){return jB({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 KB(e){return jB({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 qB(e){return jB({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 JB(e){return jB({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 YB(e){return jB({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 XB(e){return jB({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13 6V21H11V6H5V4H19V6H13Z`},child:[]}]})(e)}function ZB(e){return jB({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 QB(e){return jB({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 $B(e){return jB({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M21 4H3V6H21V4ZM21 11H8V13H21V11ZM21 18H8V20H21V18ZM5 11H3V20H5V11Z`},child:[]}]})(e)}function eV(e){return jB({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 tV(e){return jB({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 nV(e){return jB({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 rV(e){return jB({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 iV(e){return jB({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 aV(e){return jB({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 oV(e){return jB({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 sV(e){return jB({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 cV(e){return jB({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 lV(e){return jB({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 uV(e){return jB({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 dV(e){return jB({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 fV(e){return jB({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 pV(e){return jB({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 mV(e){return jB({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 hV(e){return jB({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 gV(e){return jB({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 _V(e){return jB({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 vV(e){return jB({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 yV(e){return jB({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 bV(e){return jB({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z`},child:[]}]})(e)}function xV(e){return jB({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z`},child:[]}]})(e)}function SV(e){return jB({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z`},child:[]}]})(e)}function CV(e){return jB({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z`},child:[]}]})(e)}function wV(e){return jB({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 TV(e){return jB({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 EV(e){return jB({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 DV(e){return jB({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 OV(e){return jB({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 kV={bold:yV,italic:sV,underline:YB,strike:QB,code:wV};function AV(e,t){return e in t.schema.styleSchema&&t.schema.styleSchema[e].type===e&&t.schema.styleSchema[e].propSchema===`boolean`}var jV=e=>{let t=bz(),n=yz(),r=JR(),i=nz({editor:r,selector:({editor:t})=>{if(t.isEditable&&AV(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,q.useCallback)(e=>{r.focus(),r.toggleStyles({[e]:!0})},[r]);if(i===void 0)return null;let o=kV[e.basicTextStyle];return(0,J.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:mk(t.formatting_toolbar[e.basicTextStyle].secondary_tooltip,t.generic.ctrl_shortcut),icon:(0,J.jsx)(o,{})})},MV=(0,q.createContext)(`desktop`);function NV(){return(0,q.useContext)(MV)}var PV=e=>{let t=e.textColor||`default`,n=e.backgroundColor||`default`,r=e.size||16,i=(0,q.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,J.jsx)(`div`,{className:`bn-color-icon`,"data-background-color":n,"data-text-color":t,style:i,children:`A`})},FV=[`default`,`gray`,`brown`,`red`,`orange`,`yellow`,`green`,`blue`,`purple`,`pink`],IV=e=>{let t=yz(),n=bz();return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(()=>e.text?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(t.Generic.Menu.Label,{children:n.color_picker.text_title}),FV.map(r=>(0,J.jsx)(t.Generic.Menu.Item,{onClick:()=>{e.onClick?.(),e.text.setColor(r)},"data-test":`text-color-`+r,icon:(0,J.jsx)(PV,{textColor:r,size:e.iconSize}),checked:e.text.color===r,children:n.color_picker.colors[r]},`text-color-`+r))]}):null,{}),(0,J.jsx)(()=>e.background?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(t.Generic.Menu.Label,{children:n.color_picker.background_title}),FV.map(r=>(0,J.jsx)(t.Generic.Menu.Item,{onClick:()=>{e.onClick?.(),e.background.setColor(r)},"data-test":`background-color-`+r,icon:(0,J.jsx)(PV,{backgroundColor:r,size:e.iconSize}),checked:e.background.color===r,children:n.color_picker.colors[r]},`background-color-`+r))]}):null,{})]})};function LV(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 RV=()=>{let e=yz(),t=bz(),n=NV(),r=cz(),i=JR(),a=LV(`text`,i),o=LV(`background`,i),s=nz({editor:i,selector:({editor:e})=>{if(!e.isEditable||!(e.getSelection()?.blocks||[e.getTextCursorPosition().block]).find(e=>e.content!==void 0))return;let t=LV(`text`,e),n=LV(`background`,e);if(t||n)return{textColor:t?e.getActiveStyles().textColor||`default`:void 0,backgroundColor:n?e.getActiveStyles().backgroundColor||`default`:void 0}}}),c=(0,q.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,q.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,J.jsxs)(e.Generic.Menu.Root,{portalElement:r,preventFocusOnOpen:n===`mobile`,children:[(0,J.jsx)(e.Generic.Menu.Trigger,{children:(0,J.jsx)(e.FormattingToolbar.Button,{className:`bn-button`,"data-test":`colors`,label:t.formatting_toolbar.colors.tooltip,mainTooltip:t.formatting_toolbar.colors.tooltip,icon:(0,J.jsx)(PV,{textColor:s.textColor,backgroundColor:s.backgroundColor,size:20})})}),(0,J.jsx)(e.Generic.Menu.Dropdown,{className:`bn-menu-dropdown bn-color-picker-dropdown`,children:(0,J.jsx)(IV,{text:s.textColor?{color:s.textColor,setColor:c}:void 0,background:s.backgroundColor?{color:s.backgroundColor,setColor:l}:void 0})})]})};function zV(){let e=bz();return(0,J.jsx)(`button`,{className:`bn-screen-reader-only-submit`,tabIndex:-1,type:`submit`,children:e.generic.form_submit})}var BV=e=>{for(let t of gN)if(e.startsWith(t))return e;return`${_N}://${e}`},VV=e=>{let t=yz(),n=bz(),{editLink:r}=QR(hN),{url:i,text:a,showTextField:o}=e,[s,c]=(0,q.useState)(i),[l,u]=(0,q.useState)(a);(0,q.useEffect)(()=>{c(i),u(a)},[a,i]);let d=(0,q.useCallback)(e=>c(e.currentTarget.value),[]),f=(0,q.useCallback)(e=>u(e.currentTarget.value),[]),p=(0,q.useCallback)(()=>{r(BV(s),l,e.range.from),e.setToolbarOpen?.(!1),e.setToolbarPositionFrozen?.(!1)},[r,s,l,e]);return(0,J.jsxs)(t.Generic.Form.Root,{onSubmit:p,submitButton:(0,J.jsx)(zV,{}),children:[(0,J.jsx)(t.Generic.Form.TextInput,{className:`bn-text-input`,name:`url`,icon:(0,J.jsx)(aV,{}),autoFocus:!0,placeholder:n.link_toolbar.form.url_placeholder,value:s,onChange:d}),o!==!1&&(0,J.jsx)(t.Generic.Form.TextInput,{className:`bn-text-input`,name:`title`,icon:(0,J.jsx)(XB,{}),placeholder:n.link_toolbar.form.title_placeholder,value:l,onChange:f})]})};function HV(e){return`link`in e.schema.inlineContentSchema&&e.schema.inlineContentSchema.link===`link`}var UV=()=>{let e=JR(),t=rz(),n=yz(),r=bz(),i=cz(),a=QR(_M),{showSelection:o}=QR(FM),[s,c]=(0,q.useState)(!1);(0,q.useEffect)(()=>(o(s,`createLinkButton`),()=>o(!1,`createLinkButton`)),[s,o]);let l=(0,q.useCallback)(t=>{t||e.focus(),c(t)},[e]),u=nz({editor:e,selector:({editor:e})=>{if(e.isEditable&&!e.prosemirrorState.selection.empty&&HV(e)&&!hM(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,q.useEffect)(()=>{c(!1)},[u]),(0,q.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,J.jsxs)(n.Generic.Popover.Root,{open:s,onOpenChange:l,portalElement:i,children:[(0,J.jsx)(n.Generic.Popover.Trigger,{children:(0,J.jsx)(n.FormattingToolbar.Button,{className:`bn-button`,"data-test":`createLink`,label:r.formatting_toolbar.link.tooltip,mainTooltip:r.formatting_toolbar.link.tooltip,secondaryTooltip:mk(r.formatting_toolbar.link.secondary_tooltip,r.generic.ctrl_shortcut),icon:(0,J.jsx)(aV,{}),onClick:()=>l(!s)})}),(0,J.jsx)(n.Generic.Popover.Content,{className:`bn-popover-content bn-form-popover`,variant:`form-popover`,children:(0,J.jsx)(VV,{url:u.url||``,text:u.text,range:u.range,showTextField:!1,setToolbarOpen:e=>a.store.setState(e)})})]})},WV=()=>{let e=bz(),t=yz(),n=cz(),r=JR(),i=nz({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(mM(n,e,n.type,{url:`string`,caption:`string`}))return n}}),[a,o]=(0,q.useState)(!1),s=(0,q.useCallback)(e=>{e||r.focus(),o(e)},[r]),c=(0,q.useCallback)(e=>{i!==void 0&&pM(r,i.type,{caption:`string`})&&r.updateBlock(i.id,{props:{caption:e.currentTarget.value}})},[i,r]);return i===void 0?null:(0,J.jsxs)(t.Generic.Popover.Root,{open:a,onOpenChange:s,portalElement:n,children:[(0,J.jsx)(t.Generic.Popover.Trigger,{children:(0,J.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.file_caption.tooltip,mainTooltip:e.formatting_toolbar.file_caption.tooltip,icon:(0,J.jsx)(cV,{}),onClick:()=>s(!a)})}),(0,J.jsx)(t.Generic.Popover.Content,{className:`bn-popover-content bn-form-popover`,variant:`form-popover`,children:(0,J.jsx)(t.Generic.Form.Root,{onSubmit:()=>s(!1),submitButton:(0,J.jsx)(zV,{}),children:(0,J.jsx)(t.Generic.Form.TextInput,{name:`file-caption`,icon:(0,J.jsx)(cV,{}),value:i.props.caption,autoFocus:!0,placeholder:e.formatting_toolbar.file_caption.input_placeholder,onChange:c})})})]})},GV=()=>{let e=bz(),t=yz(),n=JR(),r=nz({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(mM(n,e,n.type,{url:`string`}))return n}}),i=(0,q.useCallback)(()=>{r!==void 0&&(n.focus(),n.removeBlocks([r.id]))},[r,n]);return r===void 0?null:(0,J.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,J.jsx)(BB,{}),onClick:i})},KV=()=>{let e=bz(),t=yz(),n=cz(),r=JR(),i=nz({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(mM(n,e,n.type,{url:`string`,name:`string`}))return n}}),[a,o]=(0,q.useState)(!1),s=(0,q.useCallback)(e=>{e||r.focus(),o(e)},[r]),c=(0,q.useCallback)(e=>{i!==void 0&&pM(r,i.type,{name:`string`})&&r.updateBlock(i.id,{props:{name:e.currentTarget.value}})},[i,r]);return i===void 0?null:(0,J.jsxs)(t.Generic.Popover.Root,{open:a,onOpenChange:s,portalElement:n,children:[(0,J.jsx)(t.Generic.Popover.Trigger,{children:(0,J.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,J.jsx)(_V,{}),onClick:()=>s(!a)})}),(0,J.jsx)(t.Generic.Popover.Content,{className:`bn-popover-content bn-form-popover`,variant:`form-popover`,children:(0,J.jsx)(t.Generic.Form.Root,{onSubmit:()=>s(!1),submitButton:(0,J.jsx)(zV,{}),children:(0,J.jsx)(t.Generic.Form.TextInput,{name:`file-name`,icon:(0,J.jsx)(_V,{}),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})})})]})},qV=()=>{let e=bz(),t=yz(),n=cz(),r=JR(),i=nz({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(mM(n,e,n.type,{url:`string`}))return n}});return i===void 0?null:(0,J.jsxs)(t.Generic.Popover.Root,{onOpenChange:e=>{e||r.focus()},portalElement:n,children:[(0,J.jsx)(t.Generic.Popover.Trigger,{children:(0,J.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,J.jsx)(GB,{})})}),(0,J.jsx)(t.Generic.Popover.Content,{className:`bn-popover-content bn-panel-popover`,variant:`panel-popover`,children:(0,J.jsx)(_B,{blockId:i.id})})]})},JV=()=>{let e=bz(),t=yz(),n=JR(),r=nz({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,q.useCallback)(()=>{r!==void 0&&r.canNestBlock&&(n.focus(),n.nestBlock())},[n,r]);return r===void 0?null:(0,J.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:mk(e.formatting_toolbar.nest.secondary_tooltip,e.generic.ctrl_shortcut),icon:(0,J.jsx)(lV,{})})},YV=()=>{let e=bz(),t=yz(),n=JR(),r=nz({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,q.useCallback)(()=>{r!==void 0&&r.canUnnestBlock&&(n.focus(),n.unnestBlock())},[n,r]);return r===void 0?null:(0,J.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:mk(e.formatting_toolbar.unnest.secondary_tooltip,e.generic.ctrl_shortcut),icon:(0,J.jsx)(uV,{})})},XV=e=>[{name:e.slash_menu.paragraph.title,type:`paragraph`,icon:XB},{name:e.slash_menu.heading.title,type:`heading`,props:{level:1,isToggleable:!1},icon:gV},{name:e.slash_menu.heading_2.title,type:`heading`,props:{level:2,isToggleable:!1},icon:hV},{name:e.slash_menu.heading_3.title,type:`heading`,props:{level:3,isToggleable:!1},icon:mV},{name:e.slash_menu.heading_4.title,type:`heading`,props:{level:4,isToggleable:!1},icon:pV},{name:e.slash_menu.heading_5.title,type:`heading`,props:{level:5,isToggleable:!1},icon:fV},{name:e.slash_menu.heading_6.title,type:`heading`,props:{level:6,isToggleable:!1},icon:dV},{name:e.slash_menu.toggle_heading.title,type:`heading`,props:{level:1,isToggleable:!0},icon:gV},{name:e.slash_menu.toggle_heading_2.title,type:`heading`,props:{level:2,isToggleable:!0},icon:hV},{name:e.slash_menu.toggle_heading_3.title,type:`heading`,props:{level:3,isToggleable:!0},icon:mV},{name:e.slash_menu.quote.title,type:`quote`,icon:$B},{name:e.slash_menu.toggle_list.title,type:`toggleListItem`,icon:WB},{name:e.slash_menu.bullet_list.title,type:`bulletListItem`,icon:nV},{name:e.slash_menu.numbered_list.title,type:`numberedListItem`,icon:rV},{name:e.slash_menu.check_list.title,type:`checkListItem`,icon:iV}],ZV=e=>{let t=yz(),n=NV(),r=cz(),i=JR(),a=nz({editor:i,selector:({editor:e})=>e.getSelection()?.blocks||[e.getTextCursorPosition().block]}),o=a[0],s=(0,q.useMemo)(()=>(e.items||XV(i.dictionary)).filter(e=>pM(i,e.type,Object.fromEntries(Object.entries(e.props||{}).map(([e,t])=>[e,typeof t])))),[i,e.items]),c=(0,q.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,J.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,q.useMemo)(()=>c.find(e=>e.isSelected)!==void 0,[c])||!i.isEditable?null:(0,J.jsx)(t.FormattingToolbar.Select,{className:`bn-select`,items:c,portalElement:r,preventFocusOnOpen:n===`mobile`})},QV=()=>{let e=bz(),t=yz(),n=JR(),r=QR(`comments`),{store:i}=QR(_M),a=nz({editor:n,selector:({editor:e})=>e.prosemirrorState.selection.empty}),o=(0,q.useCallback)(()=>{r.startPendingComment(),i.setState(!1)},[r,i]);return a?null:(0,J.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.comment.tooltip,mainTooltip:e.formatting_toolbar.comment.tooltip,icon:(0,J.jsx)(EV,{}),onClick:o})},$V=()=>JR().getExtension(`comments`)?(0,J.jsx)(QV,{}):null,eH=()=>{let e=bz(),t=yz(),n=JR(),r=nz({editor:n,selector:({editor:e})=>e.prosemirrorState.selection.empty}),i=(0,q.useCallback)(()=>{n._tiptapEditor.chain().focus().addPendingComment().run()},[n]);return!n._tiptapEditor.commands.addPendingComment||!n.isEditable||r?null:(0,J.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.comment.tooltip,mainTooltip:e.formatting_toolbar.comment.tooltip,icon:(0,J.jsx)(EV,{}),onClick:i})};function tH(e,t){try{let n=new URL(e,t);if(n.protocol!==`javascript:`)return n.href}catch{}return`#`}var nH=()=>{let e=bz(),t=yz(),n=JR(),r=nz({editor:n,selector:({editor:e})=>{let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block];if(t.length!==1)return;let n=t[0];if(mM(n,e,n.type,{url:`string`}))return n}}),i=(0,q.useCallback)(()=>{r!==void 0&&(n.focus(),n.resolveFileUrl?n.resolveFileUrl(r.props.url).then(e=>window.open(tH(e,window.location.href))):window.open(tH(r.props.url,window.location.href)))},[r,n]);return r===void 0?null:(0,J.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,J.jsx)(RB,{}),onClick:i})},rH=()=>{let e=bz(),t=yz(),n=JR(),r=nz({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(mM(n,e,n.type,{url:`string`,showPreview:`boolean`}))return n}}),i=(0,q.useCallback)(()=>{r!==void 0&&pM(n,r.type,{showPreview:`boolean`})&&n.updateBlock(r.id,{props:{showPreview:!r.props.showPreview}})},[r,n]);return r===void 0?null:(0,J.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:`Toggle preview`,mainTooltip:e.formatting_toolbar.file_preview_toggle.tooltip,icon:(0,J.jsx)(KB,{}),isSelected:r.props.showPreview,onClick:i})},iH=()=>{let e=bz(),t=yz(),n=JR(),r=QR(VP),i=nz({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,q.useCallback)(()=>{r?.mergeCells()},[r]);return i===void 0?null:(0,J.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,J.jsx)(tV,{}):(0,J.jsx)(eV,{}),onClick:a})},aH=()=>JR().getExtension(VP)?(0,J.jsx)(iH,{}):null,oH={left:xV,center:CV,right:bV,justify:SV},sH=e=>{let t=yz(),n=bz(),r=JR(),i=nz({editor:r,selector:({editor:e})=>{if(!e.isEditable)return;let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block],n=t[0];if(mM(n,e,n.type,{textAlignment:XA.textAlignment}))return{textAlignment:n.props.textAlignment,blocks:t};if(t.length===1&&mM(n,e,`table`))return e.getExtension(VP)?.getCellSelection()?{textAlignment:ok(n.content.rows[0].cells[0]).props.textAlignment,blocks:[n]}:void 0}}),a=(0,q.useCallback)(e=>{if(i!==void 0){r.focus();for(let t of i.blocks)if(mM(t,r,t.type,{textAlignment:XA.textAlignment})&&pM(r,t.type,{textAlignment:XA.textAlignment}))r.updateBlock(t,{props:{textAlignment:e}});else if(t.type===`table`){let n=r.getExtension(VP)?.getCellSelection();if(!n)continue;let i=t.content.rows.map(e=>({...e,cells:e.cells.map(e=>ok(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=oH[e.textAlignment];return(0,J.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,J.jsx)(o,{})})},cH=e=>[(0,J.jsx)(ZV,{items:e},`blockTypeSelect`),(0,J.jsx)(aH,{},`tableCellMergeButton`),(0,J.jsx)(WV,{},`fileCaptionButton`),(0,J.jsx)(qV,{},`replaceFileButton`),(0,J.jsx)(KV,{},`fileRenameButton`),(0,J.jsx)(GV,{},`fileDeleteButton`),(0,J.jsx)(nH,{},`fileDownloadButton`),(0,J.jsx)(rH,{},`filePreviewButton`),(0,J.jsx)(jV,{basicTextStyle:`bold`},`boldStyleButton`),(0,J.jsx)(jV,{basicTextStyle:`italic`},`italicStyleButton`),(0,J.jsx)(jV,{basicTextStyle:`underline`},`underlineStyleButton`),(0,J.jsx)(jV,{basicTextStyle:`strike`},`strikeStyleButton`),(0,J.jsx)(sH,{textAlignment:`left`},`textAlignLeftButton`),(0,J.jsx)(sH,{textAlignment:`center`},`textAlignCenterButton`),(0,J.jsx)(sH,{textAlignment:`right`},`textAlignRightButton`),(0,J.jsx)(RV,{},`colorStyleButton`),(0,J.jsx)(JV,{},`nestBlockButton`),(0,J.jsx)(YV,{},`unnestBlockButton`),(0,J.jsx)(UV,{},`createLinkButton`),(0,J.jsx)($V,{},`addCommentButton`),(0,J.jsx)(eH,{},`addTiptapCommentButton`)],lH=e=>{let t=yz();return(0,J.jsx)(t.FormattingToolbar.Root,{className:`bn-toolbar bn-formatting-toolbar`,children:e.children||cH(e.blockTypeSelectItems)})},uH=e=>{switch(e){case`left`:return`top-start`;case`center`:return`top`;case`right`:return`top-end`;default:return`top-start`}},dH=e=>{let t=JR(),n=QR(_M,{editor:t}),r=$R(_M,{editor:t}),i=nz({editor:t,selector:({editor:e})=>n.store.state?{from:e.prosemirrorState.selection.from,to:e.prosemirrorState.selection.to}:void 0}),a=nz({editor:t,selector:({editor:e})=>{let t=e.getTextCursorPosition().block;return mM(t,e,t.type,{textAlignment:XA.textAlignment})?uH(t.props.textAlignment):`top-start`}}),o=(0,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:r,onOpenChange:(e,r,i)=>{n.store.setState(e),i===`escape-key`&&t.focus()},placement:a,middleware:[ae(10),ce(),te()],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:40},...e.floatingUIOptions?.elementProps}}),[r,a,e.floatingUIOptions,n.store,t]),s=e.formattingToolbar||lH;return(0,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(xz,{position:i,...o,children:r&&(0,J.jsx)(s,{})})})};function fH(e,t){let n=qR(),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,q.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,q.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,q.useCallback)(()=>a.current.value,[]);return(0,q.useSyncExternalStore)(o,s,s)}var pH=0,mH=0;function hH(){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-mH)>mH*.2&&(mH=r,pH=0),pH=Math.max(pH,n),pH-n>150}var gH=[`--bn-vv-top`,`--bn-vv-left`,`--bn-vv-width`,`--bn-vv-height`,`--bn-vv-scale`],_H=0;function vH(){let[e,t]=(0,q.useState)(hH);return(0,q.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=hH();t(e),i();for(let t of r())a(t,e)};_H++,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,hH())};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}),_H--,_H===0){for(let t of gH)e.style.removeProperty(t);for(let e of r())e.removeAttribute(`data-bn-allow-pull-to-refresh`);pH=0,mH=0}}},[]),e}var yH=e=>{let t=vH(),n=fH({includeEditorUI:!0});return!t||!n?null:(0,J.jsx)(uz,{target:document.body,children:(0,J.jsx)(MV.Provider,{value:`mobile`,children:(0,J.jsx)(bH,{formattingToolbar:e.formattingToolbar||lH})})})};function bH(e){let t=cz(),n=e.formattingToolbar;return t?(0,ud.createPortal)((0,J.jsx)(mz,{children:(0,J.jsx)(`div`,{className:`bn-mobile-formatting-toolbar`,children:(0,J.jsx)(n,{})})}),t):null}var xH=e=>{let t=vH();return vk()&&t?(0,J.jsx)(yH,{formattingToolbar:e.formattingToolbar}):(0,J.jsx)(dH,{...e})},SH=e=>{let t=yz(),n=bz(),{deleteLink:r}=QR(hN);return(0,J.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,J.jsx)(oV,{})})},CH=e=>{let t=yz(),n=cz(),r=bz();return(0,J.jsxs)(t.Generic.Popover.Root,{onOpenChange:e.setToolbarPositionFrozen,portalElement:n,children:[(0,J.jsx)(t.Generic.Popover.Trigger,{children:(0,J.jsx)(t.LinkToolbar.Button,{className:`bn-button`,mainTooltip:r.link_toolbar.edit.tooltip,isSelected:!1,children:r.link_toolbar.edit.text})}),(0,J.jsx)(t.Generic.Popover.Content,{className:`bn-popover-content bn-form-popover`,variant:`form-popover`,children:(0,J.jsx)(VV,{url:e.url,text:e.text,range:e.range,setToolbarOpen:e.setToolbarOpen,setToolbarPositionFrozen:e.setToolbarPositionFrozen})})]})},wH=e=>{let t=yz(),n=bz();return(0,J.jsx)(t.LinkToolbar.Button,{className:`bn-button`,mainTooltip:n.link_toolbar.open.tooltip,label:n.link_toolbar.open.tooltip,isSelected:!1,onClick:()=>{window.open(tH(e.url,window.location.href),`_blank`)},icon:(0,J.jsx)(LB,{})})},TH=e=>{let t=yz();return(0,J.jsx)(t.LinkToolbar.Root,{className:`bn-toolbar bn-link-toolbar`,children:e.children||(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(CH,{url:e.url,text:e.text,range:e.range,setToolbarOpen:e.setToolbarOpen,setToolbarPositionFrozen:e.setToolbarPositionFrozen}),(0,J.jsx)(wH,{url:e.url}),(0,J.jsx)(SH,{range:e.range,setToolbarOpen:e.setToolbarOpen})]})})},EH=e=>{let t=JR(),[n,r]=(0,q.useState)(!1),[i,a]=(0,q.useState)(!1),o=rz(),s=QR(hN),[c,l]=(0,q.useState)(void 0);(0,q.useEffect)(()=>{let e=()=>{let e=s.getLinkAtSelection();e?(l({cursorType:`text`,url:e.mark.attrs.href,text:e.text,range:e.range,element:s.getLinkElementAtPos(e.range.from)}),i||r(!0)):(l(void 0),i||r(!1))},n=e=>{if(c!==void 0&&c.cursorType===`text`||!(e.target instanceof HTMLElement))return;let t=s.getLinkAtElement(e.target);t&&l({cursorType:`mouse`,url:t.mark.attrs.href,text:t.text,range:t.range,element:s.getLinkElementAtPos(t.range.from)})},a=t.onChange(e),u=t.onSelectionChange(e);return o?.addEventListener(`mouseover`,n),()=>{a(),u(),o?.removeEventListener(`mouseover`,n)}},[t,o,s,c,i]);let u=(0,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:n,onOpenChange:(e,n,a)=>{i||(c===void 0||c.cursorType!==`text`||a!==`hover`)&&(a===`escape-key`&&t.focus(),r(e))},placement:`top-start`,middleware:[ae(10),te()],...e.floatingUIOptions?.useFloatingOptions},useHoverProps:{enabled:c!==void 0&&c.cursorType===`mouse`,delay:{open:250,close:250},handleClose:Pf(),...e.floatingUIOptions?.useHoverProps},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:50},...e.floatingUIOptions?.elementProps}}),[t,c,e.floatingUIOptions,n,i]),d=(0,q.useMemo)(()=>c?.element?{element:c.element}:void 0,[c?.element]);if(!t.isEditable)return null;let f=e.linkToolbar||TH;return(0,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(_z,{reference:d,...u,children:c&&(0,J.jsx)(f,{url:c.url,text:c.text,range:c.range,setToolbarOpen:r,setToolbarPositionFrozen:a})})})};function DH(e){return jB({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 OH=()=>{let e=yz(),t=bz(),n=JR(),r=QR(SM),i=$R(xP,{editor:n,selector:e=>e?.block}),a=(0,q.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,J.jsx)(e.SideMenu.Button,{className:`bn-button`,label:t.side_menu.add_block_label,icon:(0,J.jsx)(DH,{size:24,onClick:a,"data-test":`dragHandleAdd`})})};function kH(e){return jB({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 AH(e){return jB({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 jH=e=>{let t=yz(),n=cz(),r=JR(),i=$R(xP,{editor:r,selector:e=>e?.block});return i===void 0||!mM(i,r,i.type,{textColor:`string`})&&!mM(i,r,i.type,{backgroundColor:`string`})?null:(0,J.jsxs)(t.Generic.Menu.Root,{position:`right`,sub:!0,portalElement:n,children:[(0,J.jsx)(t.Generic.Menu.Trigger,{sub:!0,children:(0,J.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,subTrigger:!0,children:e.children})}),(0,J.jsx)(t.Generic.Menu.Dropdown,{sub:!0,className:`bn-menu-dropdown bn-color-picker-dropdown`,children:(0,J.jsx)(IV,{iconSize:18,text:mM(i,r,i.type,{textColor:`string`})&&pM(r,i.type,{textColor:`string`})?{color:i.props.textColor,setColor:e=>r.updateBlock(i,{type:i.type,props:{textColor:e}})}:void 0,background:mM(i,r,i.type,{backgroundColor:`string`})&&pM(r,i.type,{backgroundColor:`string`})?{color:i.props.backgroundColor,setColor:e=>r.updateBlock(i,{props:{backgroundColor:e}})}:void 0})})]})},MH=e=>{let t=yz(),n=JR(),r=$R(xP,{editor:n,selector:e=>e?.block});return r===void 0?null:(0,J.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})},NH=e=>{let t=yz(),n=JR(),r=$R(xP,{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,J.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})},PH=e=>{let t=yz(),n=JR(),r=$R(xP,{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,J.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})},FH=e=>{let t=yz(),n=bz();return(0,J.jsx)(t.Generic.Menu.Dropdown,{className:`bn-menu-dropdown bn-drag-handle-menu`,children:e.children||(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(MH,{children:n.drag_handle.delete_menuitem}),(0,J.jsx)(jH,{children:n.drag_handle.colors_menuitem}),(0,J.jsx)(NH,{children:n.drag_handle.header_row_menuitem}),(0,J.jsx)(PH,{children:n.drag_handle.header_column_menuitem})]})})},IH=e=>{let t=yz(),n=cz(),r=bz(),i=QR(xP),a=$R(xP,{selector:e=>e?.block});if(a===void 0)return null;let o=e.dragHandleMenu||FH;return(0,J.jsxs)(t.Generic.Menu.Root,{onOpenChange:e=>{e?i.freezeMenu():i.unfreezeMenu()},position:`left`,portalElement:n,children:[(0,J.jsx)(t.Generic.Menu.Trigger,{children:(0,J.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,J.jsx)(AH,{size:24,"data-test":`dragHandle`})})}),(0,J.jsx)(o,{children:e.children})]})},LH=e=>{let t=yz();return(0,J.jsx)(t.SideMenu.Root,{className:`bn-side-menu`,children:e.children||(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(OH,{}),(0,J.jsx)(IH,{dragHandleMenu:e.dragHandleMenu})]})})};function RH(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 zH=e=>{let t=JR(),{show:n,block:r}=$R(xP,{selector:e=>e===void 0?void 0:{show:e.show,block:e.block}})||{},i=(0,q.useCallback)((e,n,r)=>{let i=!1;return E(e,n,()=>{i?t.getExtension(xP)?.hideMenuIfNotFrozen():i=!0},{ancestorScroll:!0,ancestorResize:!1,elementResize:!1,layoutShift:!1})},[t]),a=(0,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:n,placement:`left-start`,middleware:[ae({crossAxis:r?RH(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]),o=e.sideMenu||LH;return(0,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(mB,{blockId:n?r?.id:void 0,...a,children:r?.id&&(0,J.jsx)(o,{})})})},BH=({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(`, `)},VH=e=>{let t=yz(),n=bz(),r=(0,q.useMemo)(()=>{let t=n.suggestion_changes,r=e.formatChangeLabel??BH,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,J.jsx)(t.AttributionTooltip.Root,{className:`bn-suggestion-tooltip`,markClassName:e.className,backgroundColor:e.className?void 0:e.color,children:r})},HH=e=>{let t=$R(`attribution`,{selector:e=>e}),n=(0,q.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,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:!!t,placement:`top-start`,middleware:[I(),ae(4),te(),ce({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||VH,a=(0,q.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,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(_z,{reference:n,...r,children:a&&(0,J.jsx)(i,{...a})})})};async function UH(e,t){return(await MP(e,t)).map(({id:e,onItemClick:t})=>({id:e,onItemClick:t,icon:e}))}function WH(e){let t=yz(),n=bz(),{items:r,loadingState:i,selectedIndex:a,onItemClick:o,columns:s}=e,c=i===`loading-initial`||i===`loading`?(0,J.jsx)(t.GridSuggestionMenu.Loader,{className:`bn-grid-suggestion-menu-loader`,columns:s}):null,l=(0,q.useMemo)(()=>{let e=[];for(let n=0;n<r.length;n++){let i=r[n];e.push((0,J.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,J.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,J.jsx)(t.GridSuggestionMenu.EmptyItem,{className:`bn-grid-suggestion-menu-empty-item`,columns:s,children:n.suggestion_menu.no_items_title})]})}function GH(e){return e===void 0?void 0:`bn-suggestion-menu-item-`+e}function KH(e,t,n,r=3){let i=(0,q.useRef)(0);(0,q.useEffect)(()=>{t!==void 0&&(e.length>0?i.current=t.length:t.length-i.current>r&&n())},[n,r,e.length,t])}function qH(e,t){let[n,r]=(0,q.useState)([]),[i,a]=(0,q.useState)(!1),o=(0,q.useRef)(void 0),s=(0,q.useRef)(void 0);return(0,q.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 JH(e,t,n,r,i){let a=rz(e),[o,s]=(0,q.useState)(0);return(0,q.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,q.useEffect)(()=>{s(0)},[t]),{selectedIndex:n.length===0?void 0:o}}function YH(e){let t=qR().setContentEditableProps,n=JR(),{getItems:r,gridSuggestionMenuComponent:i,query:a,clearQuery:o,closeMenu:s,onItemClick:c,columns:l}=e,u=(0,q.useCallback)(e=>{s(),o(),c?.(e)},[c,s,o]),{items:d,usedQuery:f,loadingState:p}=qH(a,r);KH(d,f,s);let{selectedIndex:m}=JH(n,a,d,l,u);return(0,q.useEffect)(()=>(t(e=>({...e,"aria-expanded":!0,"aria-controls":`bn-suggestion-menu`})),()=>{t(e=>({...e,"aria-expanded":!1,"aria-controls":void 0}))}),[t]),(0,q.useEffect)(()=>(t(e=>({...e,"aria-activedescendant":GH(m)})),()=>{t(e=>({...e,"aria-activedescendant":void 0}))}),[t,m]),(0,J.jsx)(i,{items:d,onItemClick:u,loadingState:p,selectedIndex:m,columns:l})}function XH(e){let t=JR(),n=rz(),{triggerCharacter:r,gridSuggestionMenuComponent:i,columns:a,shouldOpen:o,minQueryLength:s,onItemClick:c,getItems:l}=e,u=(0,q.useMemo)(()=>c||(e=>{e.onItemClick(t)}),[t,c]),d=(0,q.useMemo)(()=>l||(async e=>await UH(t,e)),[t,l]),f=QR(SM);(0,q.useEffect)(()=>{f.addSuggestionMenu({triggerCharacter:r,shouldOpen:o})},[f,r,o]);let p=$R(SM),m=$R(SM,{selector:e=>({element:n?.firstChild||void 0,getBoundingClientRect:()=>e?.referencePos||new DOMRect})}),h=(0,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:p?.show&&p?.triggerCharacter===r,onOpenChange:e=>{e||f.closeMenu()},placement:`bottom-start`,middleware:[ae(10),re({allowedPlacements:[`bottom-start`,`top-start`],padding:10}),ce(),P({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,p?.show,p?.triggerCharacter,f,r]);return!p||!p.ignoreQueryLength&&s&&(p.query.startsWith(` `)||p.query.length<s)?null:(0,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(_z,{reference:m,...h,children:r&&(0,J.jsx)(YH,{query:p.query,closeMenu:f.closeMenu,clearQuery:f.clearQuery,getItems:d,columns:a,gridSuggestionMenuComponent:i||WH,onItemClick:u})})})}function ZH(e){let t=yz(),n=bz(),{items:r,loadingState:i,selectedIndex:a,onItemClick:o}=e,s=i===`loading-initial`||i===`loading`?(0,J.jsx)(t.SuggestionMenu.Loader,{className:`bn-suggestion-menu-loader`}):null,c=(0,q.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,J.jsx)(t.SuggestionMenu.Label,{className:`bn-suggestion-menu-label`,children:e},e))),n.push((0,J.jsx)(t.SuggestionMenu.Item,{className:hk(`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,J.jsxs)(t.SuggestionMenu.Root,{id:`bn-suggestion-menu`,className:`bn-suggestion-menu`,children:[c,c.length===0&&(e.loadingState===`loading`||e.loadingState===`loaded`)&&(0,J.jsx)(t.SuggestionMenu.EmptyItem,{className:`bn-suggestion-menu-item`,children:n.suggestion_menu.no_items_title}),s]})}function QH(e,t){let[n,r]=(0,q.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=$H(i)?i.nativeEvent.isComposing:i.isComposing;return i.key===`Enter`&&!a&&(i.preventDefault(),i.stopPropagation(),e.length&&t?.(e[n]),!0)}}}function $H(e){return e.nativeEvent!==void 0}function eU(e,t,n,r,i){let a=rz(),{selectedIndex:o,setSelectedIndex:s,handler:c}=QH(n,r);return(0,q.useEffect)(()=>{let e=i||a;return e?.addEventListener(`keydown`,c,!0),()=>{e?.removeEventListener(`keydown`,c,!0)}},[a,n,o,r,i,c]),(0,q.useEffect)(()=>{s(0)},[t,s]),{selectedIndex:n.length===0?void 0:o}}function tU(e){let t=qR().setContentEditableProps,n=JR(),{getItems:r,suggestionMenuComponent:i,query:a,clearQuery:o,closeMenu:s,onItemClick:c}=e,l=(0,q.useCallback)(e=>{s(),o(),c?.(e)},[c,s,o]),{items:u,usedQuery:d,loadingState:f}=qH(a,r);KH(u,d,s);let{selectedIndex:p}=eU(n,a,u,l);return(0,q.useEffect)(()=>(t(e=>({...e,"aria-expanded":!0,"aria-controls":`bn-suggestion-menu`})),()=>{t(e=>({...e,"aria-expanded":!1,"aria-controls":void 0}))}),[t]),(0,q.useEffect)(()=>(t(e=>({...e,"aria-activedescendant":GH(p)})),()=>{t(e=>({...e,"aria-activedescendant":void 0}))}),[t,p]),(0,J.jsx)(i,{items:u,onItemClick:l,loadingState:f,selectedIndex:p})}var nU={heading:gV,heading_2:hV,heading_3:mV,heading_4:pV,heading_5:fV,heading_6:dV,toggle_heading:gV,toggle_heading_2:hV,toggle_heading_3:mV,quote:$B,toggle_list:WB,numbered_list:rV,bullet_list:nV,check_list:iV,paragraph:XB,table:ZB,image:qB,video:JB,audio:UB,file:TV,emoji:PB,code_block:vV,divider:FB};function rU(e){return TM(e).map(e=>{let t=nU[e.key];return{...e,icon:(0,J.jsx)(t,{size:18})}})}function iU(e){let t=JR(),n=rz(),{triggerCharacter:r,suggestionMenuComponent:i,shouldOpen:a,minQueryLength:o,onItemClick:s,getItems:c}=e,l=(0,q.useMemo)(()=>s||(e=>{e.onItemClick(t)}),[t,s]),u=(0,q.useMemo)(()=>c||(async e=>EM(rU(t),e)),[t,c]),d=QR(SM);(0,q.useEffect)(()=>{d.addSuggestionMenu({triggerCharacter:r,shouldOpen:a})},[d,r,a]);let f=$R(SM),p=$R(SM,{selector:e=>({element:n?.firstChild||void 0,getBoundingClientRect:()=>e?.referencePos||new DOMRect})}),m=(0,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:f?.show&&f?.triggerCharacter===r,onOpenChange:e=>{e||d.closeMenu()},placement:`bottom-start`,middleware:[ae(10),re({allowedPlacements:[`bottom-start`,`top-start`],padding:10}),ce(),P({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,f?.show,f?.triggerCharacter,d,r]);return!f||!f.ignoreQueryLength&&o&&(f.query.startsWith(` `)||f.query.length<o)?null:(0,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(_z,{reference:p,...m,children:r&&(0,J.jsx)(tU,{query:f.query,closeMenu:d.closeMenu,clearQuery:d.clearQuery,getItems:u,suggestionMenuComponent:i||ZH,onItemClick:l})})})}var aU=(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)},oU=e=>{let t=yz(),n=JR(),r=QR(VP),i=$R(VP,{selector:e=>e?.block}),a=(0,q.useRef)(!1),[o,s]=(0,q.useState)(),c=(0,q.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,q.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,q.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+aU(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,q.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,J.jsx)(t.TableHandle.ExtendButton,{className:hk(`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,J.jsx)(HB,{size:18,"data-test":`extendButton`})}):null},sU=e=>{let t=yz(),n=cz(),r=bz(),i=JR(),{block:a,colIndex:o,rowIndex:s}=$R(VP,{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=>ok(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,J.jsxs)(t.Generic.Menu.Root,{position:`right`,sub:!0,portalElement:n,children:[(0,J.jsx)(t.Generic.Menu.Trigger,{sub:!0,children:(0,J.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,subTrigger:!0,children:e.children||r.drag_handle.colors_menuitem})}),(0,J.jsx)(t.Generic.Menu.Dropdown,{sub:!0,className:`bn-menu-dropdown bn-color-picker-dropdown`,children:(0,J.jsx)(IV,{iconSize:18,text:i.settings.tables.cellTextColor?{color:ck(l)?l.props.textColor:`default`,setColor:e=>c(e,`text`)}:void 0,background:i.settings.tables.cellBackgroundColor?{color:ck(l)?l.props.backgroundColor:`default`,setColor:e=>c(e,`background`)}:void 0})})]})},cU=()=>{let e=yz(),t=bz(),n=JR(),r=QR(VP),{block:i,colIndex:a,rowIndex:o}=$R(VP,{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||!ck(s)||uk(s)===1&&lk(s)===1||!n.settings.tables.splitCells?null:(0,J.jsx)(e.Generic.Menu.Item,{onClick:()=>{r.splitCell({row:o,col:a})},children:t.table_handle.split_cell_menuitem})},lU=e=>{let t=yz();return(0,J.jsx)(t.Generic.Menu.Dropdown,{className:`bn-menu-dropdown bn-table-handle-menu`,children:e.children||(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(cU,{}),(0,J.jsx)(sU,{})]})})},uU=e=>{let t=yz(),n=cz(),r=JR(),i=QR(VP),a=e.tableCellMenu||lU;return!r.settings.tables.splitCells&&!r.settings.tables.cellBackgroundColor&&!r.settings.tables.cellTextColor?null:(0,J.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,J.jsx)(t.Generic.Menu.Trigger,{children:(0,J.jsx)(t.Generic.Menu.Button,{className:`bn-table-cell-handle`,children:e.children||(0,J.jsx)(kH,{size:12,"data-test":`tableCellHandle`})})}),(0,J.jsx)(a,{})]})},dU=e=>{let t=yz(),n=bz(),r=QR(VP),i=$R(VP,{selector:t=>e.orientation===`column`?t?.colIndex:t?.rowIndex});return r===void 0||i===void 0?null:(0,J.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`]})},fU=e=>{let t=yz(),n=bz(),r=QR(VP),i=$R(VP,{selector:t=>e.orientation===`column`?t?.colIndex:t?.rowIndex});return r===void 0||i===void 0?null:(0,J.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})},pU=e=>{let t=yz(),n=cz(),r=bz(),i=JR(),a=QR(VP),{block:o,index:s}=$R(VP,{selector:t=>({block:t?.block,index:e.orientation===`column`?t?.colIndex:t?.rowIndex})}),c=(0,q.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=>ok(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=ok(c[0].cell);return(0,J.jsxs)(t.Generic.Menu.Root,{position:`right`,sub:!0,portalElement:n,children:[(0,J.jsx)(t.Generic.Menu.Trigger,{sub:!0,children:(0,J.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,subTrigger:!0,children:e.children||r.drag_handle.colors_menuitem})}),(0,J.jsx)(t.Generic.Menu.Dropdown,{sub:!0,className:`bn-menu-dropdown bn-color-picker-dropdown`,children:(0,J.jsx)(IV,{iconSize:18,text:i.settings.tables.cellTextColor?{color:c.every(({cell:e})=>ck(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})=>ck(e)&&e.props.backgroundColor===u.props.backgroundColor)?u.props.backgroundColor:`default`,setColor:e=>l(e,`background`)}:void 0})})]})},mU=e=>{let t=yz(),n=bz(),r=JR(),i=QR(VP),{block:a,index:o}=$R(VP,{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,J.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})},hU=e=>{let t=yz(),n=bz(),r=JR(),i=QR(VP),a=$R(VP,{selector:e=>e?.block}),o=$R(VP,{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,J.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})},gU=e=>{let t=yz();return(0,J.jsx)(t.Generic.Menu.Dropdown,{className:`bn-table-handle-menu`,children:e.children||(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(fU,{orientation:e.orientation}),(0,J.jsx)(dU,{orientation:e.orientation,side:e.orientation===`row`?`above`:`left`}),(0,J.jsx)(dU,{orientation:e.orientation,side:e.orientation===`row`?`below`:`right`}),(0,J.jsx)(mU,{orientation:e.orientation}),(0,J.jsx)(hU,{orientation:e.orientation}),(0,J.jsx)(pU,{orientation:e.orientation})]})})},_U=e=>{let t=JR(),n=yz(),r=cz(),[i,a]=(0,q.useState)(!1),o=e.tableHandleMenu||gU,s=QR(VP),c=$R(VP),l=(0,q.useMemo)(()=>!s||!c||!c.block||c.block.type!==`table`?!1:e.orientation===`column`?s.getCellsAtColumnHandle(c.block,c.colIndex).every(({cell:e})=>lk(e)===1):s.getCellsAtRowHandle(c.block,c.rowIndex).every(({cell:e})=>uk(e)===1),[e.orientation,c,s]);return c?(0,J.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,J.jsx)(n.Generic.Menu.Trigger,{children:(0,J.jsx)(n.TableHandle.Root,{className:hk(`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,J.jsx)(AH,{size:24,"data-test":`tableHandle`})})}),(0,J.jsx)(o,{orientation:e.orientation})]}):null},vU=e=>{let t=JR(),[n,r]=(0,q.useState)(),i=$R(VP),a=(0,q.useMemo)(()=>{let e={};if(i===void 0)return{};let n=LA(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]),o=(0,q.useCallback)((e,n,r)=>{let i=!1;return E(e,n,()=>{i?t.getExtension(VP)?.hideHandlesIfNotFrozen():i=!0},{ancestorScroll:!0,ancestorResize:!1,elementResize:!1,layoutShift:!1})},[t]),s=(0,q.useMemo)(()=>i===void 0?void 0:{rowTableHandle:{useFloatingOptions:{open:i.show&&i.rowIndex!==void 0&&(!n||n===`rowTableHandle`),placement:`left`,middleware:[ae(-10)],whileElementsMounted:o},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},columnTableHandle:{useFloatingOptions:{open:i.show&&i.colIndex!==void 0&&(!n||n===`columnTableHandle`),placement:`top`,middleware:[ae(-12)],whileElementsMounted:o},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:[ae({mainAxis:-15,crossAxis:-1})],whileElementsMounted:o},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},extendRowsButton:{useFloatingOptions:{open:i.show&&i.showAddOrRemoveRowsButton&&(!n||n===`extendRowsButton`),placement:`bottom`,whileElementsMounted:o,middleware:[P({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:o,middleware:[P({apply({rects:e,elements:t}){Object.assign(t.floating.style,{height:`${e.reference.height}px`})}})]},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}}},[n,i,o]);if(!i)return null;let c=e.tableHandle||_U,l=e.extendButton||oU,u=e.tableCellHandle||uU;return(0,J.jsxs)(uz,{target:e.portalElement,children:[(0,J.jsx)(_z,{reference:a?.rowReference,...s?.rowTableHandle,children:i.show&&i.rowIndex!==void 0&&(!n||n===`rowTableHandle`)&&(0,J.jsx)(c,{orientation:`row`,hideOtherElements:e=>r(e?`rowTableHandle`:void 0)})}),(0,J.jsx)(_z,{reference:a?.columnReference,...s?.columnTableHandle,children:i.show&&i.colIndex!==void 0&&(!n||n===`columnTableHandle`)&&(0,J.jsx)(c,{orientation:`column`,hideOtherElements:e=>r(e?`columnTableHandle`:void 0)})}),(0,J.jsx)(_z,{reference:a?.cellReference,...s?.tableCellHandle,children:i.show&&i.rowIndex!==void 0&&i.colIndex!==void 0&&(!n||n===`tableCellHandle`)&&(0,J.jsx)(u,{hideOtherElements:e=>r(e?`tableCellHandle`:void 0)})}),(0,J.jsx)(_z,{reference:a?.tableReference,...s?.extendRowsButton,children:i.show&&i.showAddOrRemoveRowsButton&&(!n||n===`extendRowsButton`)&&(0,J.jsx)(l,{orientation:`addOrRemoveRows`,hideOtherElements:e=>r(e?`extendRowsButton`:void 0)})}),(0,J.jsx)(_z,{reference:a?.tableReference,...s?.extendColumnsButton,children:i.show&&i.showAddOrRemoveColumnsButton&&(!n||n===`extendColumnsButton`)&&(0,J.jsx)(l,{orientation:`addOrRemoveColumns`,hideOtherElements:e=>r(e?`extendColumnsButton`:void 0)})})]})};function yU(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 bU=(0,q.lazy)(()=>Promise.resolve().then(()=>$U)),xU=(0,q.lazy)(()=>Promise.resolve().then(()=>iW));function SU(e){let t=JR();if(!t)throw Error(`BlockNoteDefaultUI must be used within a BlockNoteContext.Provider`);let n=e.portalElements,r=yU(n?.formattingToolbar),i=yU(n?.linkToolbar),a=yU(n?.slashMenu),o=yU(n?.emojiPicker),s=yU(n?.sideMenu),c=yU(n?.filePanel),l=yU(n?.tableHandles),u=yU(n?.comments),d=yU(n?.attributionTooltip);return(0,J.jsxs)(J.Fragment,{children:[t.getExtension(_M)&&e.formattingToolbar!==!1&&(0,J.jsx)(xH,{portalElement:r}),t.getExtension(hN)&&e.linkToolbar!==!1&&(0,J.jsx)(EH,{portalElement:i}),t.getExtension(SM)&&e.slashMenu!==!1&&(0,J.jsx)(iU,{triggerCharacter:`/`,shouldOpen:e=>!e.selection.$from.parent.type.isInGroup(`tableContent`),portalElement:a}),t.getExtension(SM)&&e.emojiPicker!==!1&&(0,J.jsx)(XH,{triggerCharacter:`:`,columns:10,minQueryLength:2,portalElement:o}),t.getExtension(xP)&&e.sideMenu!==!1&&(0,J.jsx)(zH,{portalElement:s}),t.getExtension(nj)&&e.filePanel!==!1&&(0,J.jsx)(vB,{portalElement:c}),t.getExtension(VP)&&e.tableHandles!==!1&&(0,J.jsx)(vU,{portalElement:l}),t.getExtension(Nz)&&e.comments!==!1&&(0,J.jsxs)(q.Suspense,{children:[(0,J.jsx)(bU,{portalElement:u}),(0,J.jsx)(xU,{portalElement:u})]}),t.getExtension(`attribution`)&&e.attributionTooltip!==!1&&(0,J.jsx)(HH,{portalElement:d})]})}var CU=!1;function wU(){typeof process<`u`||CU||typeof document>`u`||(CU=!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 TU(e,t){let n=qR();t||=n?.editor;let r=(0,q.useRef)(e);ez(()=>{r.current=e}),(0,q.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 EU(e,t,n){let r=qR();t||=r?.editor;let i=(0,q.useRef)(e);ez(()=>{i.current=e}),(0,q.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 DU=()=>{let e=(0,q.useMemo)(()=>window.matchMedia?.(`(prefers-color-scheme: dark)`),[]),t=(0,q.useMemo)(()=>window.matchMedia?.(`(prefers-color-scheme: light)`),[]),n=e?.matches,r=t?.matches,[i,a]=(0,q.useState)(n?`dark`:r?`light`:`no-preference`);return(0,q.useEffect)(()=>{a(n?`dark`:r?`light`:`no-preference`)},[n,r]),(0,q.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 OU(){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,ud.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 kU=({contentComponent:e})=>{let t=(0,q.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,J.jsx)(J.Fragment,{children:Object.values(t)})},AU=(0,q.forwardRef)((e,t)=>{let[n,r]=(0,q.useState)();return(0,q.useImperativeHandle)(t,()=>(e,t)=>{(0,ud.flushSync)(()=>{r({node:e,container:t})}),r(void 0)},[]),(0,J.jsx)(J.Fragment,{children:n&&(0,ud.createPortal)(n.node,n.container)})}),jU=()=>{};function MU(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,q.useMemo)(()=>yU(_?.default),[_?.default]),[C,w]=(0,q.useState)(),T=qR(),E=DU(),D=T?.colorSchemePreference||E,O=i||(D===`dark`?`dark`:`light`),k=yz(),A=(0,q.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,_]);TU(c||jU,n),EU(s||jU,n);let j=(0,q.useCallback)(e=>{n.elementRenderer=e},[n]),M=(0,q.useCallback)(e=>{e.className=hk(`bn-root`,O,r||``),e.setAttribute(`data-color-scheme`,O),v?.(e)},[O,r,v]),N=(0,q.useMemo)(()=>({...T,editor:n,setContentEditableProps:w,colorSchemePreference:O}),[T,n,O]),P=(0,q.useMemo)(()=>({editorProps:{autoFocus:y,contentEditableProps:C,editable:o},defaultUIProps:A,applyThemedRoot:M}),[y,C,o,A,M]);return(0,J.jsx)(KR.Provider,{value:N,children:(0,J.jsxs)(iz.Provider,{value:P,children:[(0,J.jsx)(AU,{ref:j}),(0,J.jsx)(NU,{className:r,renderEditor:b,editorColorScheme:O,defaultPortalElement:S,ref:t,...x,children:a})]})})}var NU=q.forwardRef(({className:e,renderEditor:t,editorColorScheme:n,defaultPortalElement:r,children:i,...a},o)=>(0,J.jsx)(`div`,{className:hk(`bn-root`,`bn-container`,n,e),"data-color-scheme":n,...a,ref:o,children:(0,J.jsx)(lz,{children:(0,J.jsx)(uz,{target:r,children:t?(0,J.jsx)(FU,{children:i}):i})})})),PU=q.forwardRef(MU),FU=e=>{let t=az(),n=JR(),r=(0,q.useMemo)(()=>OU(),[]);(0,q.useEffect)(()=>{wU()},[]);let i=(0,q.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,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(kU,{contentComponent:r}),(0,J.jsx)(IU,{...t.editorProps,...e,mount:i}),(0,J.jsx)(SU,{...t.defaultUIProps}),e.children]})},IU=e=>{let{autoFocus:t,mount:n,contentEditableProps:r}=e;return(0,J.jsx)(`div`,{"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"data-bn-autofocus":t,ref:n,...r})};function LU(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,dB.createRoot)(r),(0,ud.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 RU(e,t){let n=(0,q.useRef)(t),r=e.view.state.doc;try{n.current=Hk(e.getPos,r)}catch{}return n.current}function zU(e){return(0,J.jsx)(Kz,{onDragOver:e=>e.preventDefault(),...Object.fromEntries(Object.entries(e.domAttributes||{}).filter(([e])=>e!==`class`)),className:hk(`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])=>[Rk(e),t])),"data-file-block":e.isFileBlock===!0||void 0,children:e.children})}function BU(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 LU(o=>(0,J.jsx)(zU,{blockType:e.type,blockProps:e.props,propSchema:i.propSchema,domAttributes:this.blockContentDOMAttributes,isFileBlock:a.meta?.fileBlockAccept!==void 0,children:(0,J.jsx)(r,{block:e,editor:t,contentRef:e=>{o(e),e&&(e.className=hk(`bn-inline-content`,e.className))},context:n})}),t)},render(e,t){if(this.renderType===`nodeView`){let n=e;return oB(e=>{let r=RU(e,n),o=Gz().nodeViewContentRef;if(!o)throw Error(`nodeViewContentRef is not set`);let s=a.render;return(0,J.jsx)(zU,{blockType:r.type,blockProps:r.props,propSchema:i.propSchema,isFileBlock:!!a.meta?.fileBlockAccept,domAttributes:this.blockContentDOMAttributes,children:(0,J.jsx)(s,{block:r,editor:t,contentRef:e=>{o(e),e&&(e.className=hk(`bn-inline-content`,e.className),e.dataset.nodeViewContent=``)}})})},{className:`bn-react-node-view-renderer`})(this.props)}{let n=a.render;return LU(r=>(0,J.jsx)(zU,{blockType:e.type,blockProps:e.props,propSchema:i.propSchema,domAttributes:this.blockContentDOMAttributes,children:(0,J.jsx)(n,{block:e,editor:t,contentRef:e=>{r(e),e&&(e.className=hk(`bn-inline-content`,e.className))}})}),t)}}},extensions:o}}}var VU;async function HU(){return VU||(VU=(async()=>{let[e,t]=await Promise.all([ke(()=>import(`./module-BrWgIX20.js`),[]),ke(()=>import(`./native-Cqs-2kTC.js`),[])]),n=`default`in e?e.default:e,r=`default`in t?t.default:t;return await n.init({data:r}),{emojiMart:n,emojiData:r}})(),VU)}function UU(e){let t=(0,q.useRef)(null),n=(0,q.useRef)(null);return n.current&&n.current.update(e),(0,q.useEffect)(()=>((async()=>{let{emojiMart:r}=await HU();n.current=new r.Picker({...e,ref:t})})(),()=>{n.current=null}),[]),q.createElement(`div`,{ref:t})}var WU=e=>{let[t,n]=(0,q.useState)(!1),r=yz(),i=qR(),a=cz();return(0,J.jsxs)(r.Generic.Popover.Root,{open:t,portalElement:a,children:[(0,J.jsx)(r.Generic.Popover.Trigger,{children:(0,J.jsx)(`div`,{onClick:r=>{r.preventDefault(),r.stopPropagation(),n(!t),e.onOpenChange?.(!t)},style:{display:`flex`,justifyContent:`center`,alignItems:`center`},children:e.children})}),(0,J.jsx)(r.Generic.Popover.Content,{className:`bn-emoji-picker-popover`,variant:`panel-popover`,children:(0,J.jsx)(UU,{perLine:7,onClickOutside:()=>{n(!1),e.onOpenChange?.(!1)},onEmojiSelect:t=>{e.onEmojiSelect(t),n(!1),e.onOpenChange?.(!1)},theme:i?.colorSchemePreference})})]})};function GU(e){let{userStore:t}=QR(Nz),n=e.join(`,`);return(0,q.useEffect)(()=>{t.loadUsers(e)},[t,n]),YR(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 KU(e){return GU([e]).get(e)}var qU=e=>{let t=yz(),n=bz(),r=QR(Nz),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,q.useState)([]),s=GU(a);return(0,J.jsx)(t.Generic.Badge.Root,{className:hk(`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(`
232
- `)}`},i.emoji)},JU=(0,q.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,J.jsxs)(J.Fragment,{children:[t.reactions.length>0&&!n&&(0,J.jsxs)(c.Generic.Badge.Group,{className:hk(`bn-badge-group`,`bn-comment-reactions`),children:[t.reactions.map(e=>(0,J.jsx)(qU,{comment:t,emoji:e.emoji,onReactionSelect:i},e.emoji)),u&&(0,J.jsx)(WU,{onEmojiSelect:e=>i(e.native),onOpenChange:s,children:(0,J.jsx)(c.Generic.Badge.Root,{className:hk(`bn-badge`,`bn-comment-add-reaction`),text:`+`,icon:(0,J.jsx)(NB,{size:16}),mainTooltip:l.comments.actions.add_reaction})})]}),n&&(0,J.jsxs)(c.Generic.Toolbar.Root,{variant:`action-toolbar`,className:hk(`bn-action-toolbar`,`bn-comment-actions`),children:[(0,J.jsx)(c.Generic.Toolbar.Button,{mainTooltip:l.comments.save_button_text,variant:`compact`,onClick:a,isDisabled:e,children:l.comments.save_button_text}),(0,J.jsx)(c.Generic.Toolbar.Button,{className:`bn-button`,mainTooltip:l.comments.cancel_button_text,variant:`compact`,onClick:o,children:l.comments.cancel_button_text})]})]})}),YU=({comment:e,thread:t,showResolveButton:n})=>{let r=QR(Nz),i=bz(),[a,o]=(0,q.useState)(!1),s=Sz({initialContent:e.body,trailingBlock:!1,dictionary:{...i,placeholders:{emptyDocument:i.placeholders.edit_comment}},schema:r.commentEditorSchema||Dz,extensions:[kz({submitOnEnter:r.submitOnEnter,onSubmit:async n=>{await r.threadStore.updateComment({commentId:e.id,comment:{body:n.document},threadId:t.id}),o(!1)}})]}),c=yz(),l=cz(),[u,d]=(0,q.useState)(!1),[f,p]=(0,q.useState)(!1),m=r.threadStore,h=(0,q.useCallback)(()=>{o(!0)},[]),g=(0,q.useCallback)(()=>{s.replaceBlocks(s.document,e.body),o(!1)},[s,e.body]),_=s.getExtension(kz).submit,v=(0,q.useCallback)(async()=>{await m.deleteComment({commentId:e.id,threadId:t.id})},[e,t.id,m]),y=(0,q.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,q.useCallback)(async()=>{await m.resolveThread({threadId:t.id})},[t.id,m]),x=(0,q.useCallback)(async()=>{await m.unresolveThread({threadId:t.id})},[t.id,m]),S=KU(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,J.jsxs)(c.Generic.Toolbar.Root,{className:hk(`bn-action-toolbar`,`bn-comment-actions`),variant:`action-toolbar`,children:[w&&(0,J.jsx)(WU,{onEmojiSelect:e=>y(e.native),onOpenChange:d,children:(0,J.jsx)(c.Generic.Toolbar.Button,{mainTooltip:i.comments.actions.add_reaction,variant:`compact`,children:(0,J.jsx)(NB,{size:16})},`add-reaction`)}),D&&(t.resolved?(0,J.jsx)(c.Generic.Toolbar.Button,{mainTooltip:i.comments.actions.reopen,variant:`compact`,onClick:x,children:(0,J.jsx)(OV,{size:16})},`reopen`):(0,J.jsx)(c.Generic.Toolbar.Button,{mainTooltip:i.comments.actions.resolve,variant:`compact`,onClick:b,children:(0,J.jsx)(VB,{size:16})},`resolve`)),(T||E)&&(0,J.jsxs)(c.Generic.Menu.Root,{position:`bottom-start`,onOpenChange:p,portalElement:l,children:[(0,J.jsx)(c.Generic.Menu.Trigger,{children:(0,J.jsx)(c.Generic.Toolbar.Button,{mainTooltip:i.comments.actions.more_actions,variant:`compact`,children:(0,J.jsx)(IB,{size:16})},`more-actions`)}),(0,J.jsxs)(c.Generic.Menu.Dropdown,{className:`bn-menu-dropdown`,children:[E&&(0,J.jsx)(c.Generic.Menu.Item,{icon:(0,J.jsx)(DV,{}),onClick:h,children:i.comments.actions.edit_comment},`edit-comment`),T&&(0,J.jsx)(c.Generic.Menu.Item,{icon:(0,J.jsx)(zB,{}),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,J.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,J.jsx)(Cz,{autoFocus:a,editor:s,editable:a,actions:e.reactions.length>0||a?({isFocused:t,isEmpty:n})=>(0,J.jsx)(JU,{isFocused:t,isEmpty:n,comment:e,isEditing:a,threadStore:m,onReactionSelect:y,onEditSubmit:_,onEditCancel:g,onEmojiPickerOpenChange:d,Components:c,dict:i}):void 0})})},XU=({thread:e,maxCommentsBeforeCollapse:t})=>{let n=yz(),r=bz(),i=GU(e.resolvedBy?[e.resolvedBy]:[]),a=e.comments.map((t,n)=>(0,J.jsx)(YU,{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,J.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,J.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,J.jsx)(n.Comments.ExpandSectionsPrompt,{className:`bn-thread-expand-prompt`,children:r.comments.sidebar.more_replies(e.comments.length-2)},`expand-prompt`)),a},ZU=(0,q.memo)(({isEmpty:e,onSave:t,Components:n,dict:r})=>(0,J.jsx)(n.Generic.Toolbar.Root,{className:hk(`bn-action-toolbar`,`bn-comment-actions`),variant:`action-toolbar`,children:(0,J.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 QU(e){let t=e.newCommentEditor,n=yz(),r=bz(),i=t.getExtension(kz);if(!i)throw Error(`FloatingComposer's newCommentEditor must include CommentEditorSubmitExtension.`);let a=i.submit;return(0,J.jsx)(n.Comments.Card,{className:`bn-thread`,children:(0,J.jsx)(Cz,{autoFocus:!0,editable:!0,editor:t,actions:({isFocused:e,isEmpty:t})=>(0,J.jsx)(ZU,{isFocused:e,isEmpty:t,onSave:a,Components:n,dict:r})})})}var $U=pB({default:()=>eW});function eW(e){let t=JR(),n=bz(),r=QR(Nz),i=$R(Nz,{editor:t,selector:e=>e.pendingComment}),a=Sz({trailingBlock:!1,dictionary:{...n,placeholders:{emptyDocument:n.placeholders.new_comment}},schema:r.commentEditorSchema||Dz,extensions:[kz({submitOnEnter:r.submitOnEnter,onSubmit:async e=>{await r.createThread({initialComment:{body:e.document}}),r.stopPendingComment(),t.transact(e=>{e.setSelection(Z.create(e.doc,e.selection.to))}),t.focus()}})]},[i]),o=nz({editor:t,selector:({editor:e})=>i?{from:e.prosemirrorState.selection.from,to:e.prosemirrorState.selection.to}:void 0}),s=(0,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:!!i,onOpenChange:e=>{if(!e){if(!Oz({hasUnsavedContent:!a.isEmpty,confirmBeforeDiscard:r.confirmBeforeDiscard,message:n.comments.discard_pending_comment}))return;r.stopPendingComment(),t.focus()}},placement:`bottom`,middleware:[ae(10),ce(),te()],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!1},elementProps:{style:{zIndex:60},...e.floatingUIOptions?.elementProps}}),[r,n,t,a,i,e.floatingUIOptions]),c=e.floatingComposer||QU;return(0,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(xz,{position:o,...s,children:(0,J.jsx)(c,{newCommentEditor:a})})})}var tW=(0,q.memo)(({isEmpty:e,onNewCommentSave:t,Components:n,dict:r})=>e?null:(0,J.jsx)(n.Generic.Toolbar.Root,{variant:`action-toolbar`,className:hk(`bn-action-toolbar`,`bn-comment-actions`),children:(0,J.jsx)(n.Generic.Toolbar.Button,{mainTooltip:r.comments.save_button_text,variant:`compact`,isDisabled:e,onClick:t,children:r.comments.save_button_text})})),nW=({thread:e,selected:t,orphaned:n,referenceText:r,maxCommentsBeforeCollapse:i,onFocus:a,onBlur:o,tabIndex:s,newCommentEditor:c})=>{let l=yz(),u=bz(),d=QR(Nz),f=(0,q.useRef)(e.id);f.current=e.id;let p=Sz({trailingBlock:!1,dictionary:{...u,placeholders:{emptyDocument:u.placeholders.comment_reply}},schema:d.commentEditorSchema||Dz,extensions:[kz({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(kz);if(!h)throw Error(`Thread's newCommentEditor must include CommentEditorSubmitExtension.`);let g=h.submit;return(0,J.jsxs)(l.Comments.Card,{className:hk(`bn-thread`,n&&`bn-thread-orphaned`),headerText:r,onFocus:a,onBlur:o,selected:t,tabIndex:s,children:[(0,J.jsx)(l.Comments.CardSection,{className:`bn-thread-comments`,children:(0,J.jsx)(XU,{thread:e,maxCommentsBeforeCollapse:t?void 0:i||5})}),t&&(0,J.jsx)(l.Comments.CardSection,{className:`bn-thread-composer`,children:(0,J.jsx)(Cz,{autoFocus:!1,editable:!0,editor:m,actions:({isFocused:e,isEmpty:t})=>(0,J.jsx)(tW,{isFocused:e,isEmpty:t,onNewCommentSave:g,Components:l,dict:u})})})]})};function rW(){let e=QR(Nz).threadStore,t=(0,q.useRef)(void 0);t.current||=e.getThreads();let n=(0,q.useCallback)(n=>e.subscribe(e=>{t.current=e,n()}),[e]);return(0,q.useSyncExternalStore)(n,()=>t.current)}var iW=pB({default:()=>aW});function aW(e){let t=JR(),n=bz(),r=QR(Nz),i=$R(Nz,{editor:t,selector:e=>e.selectedThreadId?{id:e.selectedThreadId,position:e.threadPositions.get(e.selectedThreadId)}:void 0}),a=Sz({trailingBlock:!1,dictionary:{...n,placeholders:{emptyDocument:n.placeholders.comment_reply}},schema:r.commentEditorSchema||Dz,extensions:[kz({submitOnEnter:r.submitOnEnter,onSubmit:async e=>{i&&(await r.threadStore.addComment({comment:{body:e.document},threadId:i.id}),e.removeBlocks(e.document))}})]},[i?.id]),o=rW(),s=(0,q.useMemo)(()=>i?o.get(i.id):void 0,[i,o]),c=(0,q.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:!!i,onOpenChange:(e,i,o)=>{if(!e){if(!Oz({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:[ae(10),ce(),te()],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:30},...e.floatingUIOptions?.elementProps}}),[r,n,t,a,e.floatingUIOptions,i]),l=e.floatingThread||nW;return(0,J.jsx)(uz,{target:e.portalElement,children:(0,J.jsx)(xz,{position:i?.position,...c,children:s&&(0,J.jsx)(l,{thread:s,selected:!0,newCommentEditor:a})})})}q.memo(({thread:e,selectedThreadId:t,maxCommentsBeforeCollapse:n,referenceText:r,orphaned:i})=>{let a=QR(Nz),o=(0,q.useCallback)(t=>{t.target.closest(`.bn-action-toolbar`)||a.selectThread(e.id)},[a,e.id]),s=(0,q.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,J.jsx)(nW,{thread:e,selected:e.id===t,orphaned:i,referenceText:r,maxCommentsBeforeCollapse:n,onFocus:o,onBlur:s,tabIndex:0})}),(0,q.createContext)(void 0);function oW(e){let t=(0,q.useRef)(null);return(0,q.useEffect)(()=>{e&&t.current?.focus({preventScroll:!0})},[e]),t}function sW(e){return e.currentTarget instanceof HTMLElement&&e.relatedTarget instanceof HTMLElement&&e.currentTarget.contains(e.relatedTarget)}function cW({onBlur:e,onFocus:t}={}){let n=(0,q.useRef)(null),[r,i]=(0,q.useState)(!1),a=(0,q.useRef)(!1),o=e=>{i(e),a.current=e},s=(0,q.useCallback)(e=>{a.current||(o(!0),t?.(e))},[t]),c=(0,q.useCallback)(t=>{a.current&&!sW(t)&&(o(!1),e?.(t))},[e]);return(0,q.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 lW(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 uW(e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}function dW(e){return(0,q.useMemo)(()=>uW(e),e)}function fW(e){vk()?e.preventDefault():gk()&&e.currentTarget.focus()}var pW={};function mW(e,t){let n=q.useRef(pW);return n.current===pW&&(n.current=e(t)),n}function hW(e,t,n,r){let i=mW(_W).current;return vW(i,e,t,n,r)&&bW(i,[e,t,n,r]),i.callback}function gW(e){let t=mW(_W).current;return yW(t,e)&&bW(t,e),t.callback}function _W(){return{callback:null,cleanup:null,refs:[]}}function vW(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function yW(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function bW(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 xW=19;function SW(e){return xW>=e}function CW(e){if(!q.isValidElement(e))return null;let t=e,n=t.props;return(SW(19)?n?.ref:t.ref)??null}function wW(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function TW(){}var EW=Object.freeze([]),DW=Object.freeze({});function OW(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 kW(e,t){return typeof e==`function`?e(t):e}function AW(e,t){return typeof e==`function`?e(t):e}var jW={};function MW(e,t,n,r,i){if(!n&&!r&&!i&&!e)return PW(t);let a=PW(e);return t&&(a=FW(a,t)),n&&(a=FW(a,n)),r&&(a=FW(a,r)),i&&(a=FW(a,i)),a}function NW(e){if(e.length===0)return jW;if(e.length===1)return PW(e[0]);let t=PW(e[0]);for(let n=1;n<e.length;n+=1)t=FW(t,e[n]);return t}function PW(e){return zW(e)?{...e(jW)}:IW(e)}function FW(e,t){return zW(t)?t(e):LW(e,t)}function IW(e){let t={...e};for(let e in t){let n=t[e];RW(e,n)&&(t[e]=VW(n))}return t}function LW(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=wW(e.style,r);break;case`className`:e[n]=UW(e.className,r);break;default:e[n]=RW(n,r)?BW(e[n],r):r}}return e}function RW(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 zW(e){return typeof e==`function`}function BW(e,t){return t?e?(...n)=>{let r=n[0];if(WW(r)){let i=r;HW(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:VW(t):e}function VW(e){return e&&((...t)=>{let n=t[0];return WW(n)&&HW(n),e(...t)})}function HW(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function UW(e,t){return t?e?t+` `+e:t:e}function WW(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function GW(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=YW(r));let i=KW(t,n,r);if(n.enabled===!1)return null;let a=n.state??DW;return XW(e,r,i,a)}function KW(e,t,n){let{className:r,style:i}=e,{state:a=DW,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?kW(r,a):void 0,d=l?AW(i,a):void 0,f=l?OW(a,c):DW,p=l&&s?qW(s):void 0,m=l?wW(f,p)??{}:DW;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?gW([m.ref,CW(n),...o]):hW(m.ref,CW(n),o):hW(null,null)),l?(u!==void 0&&(m.className=UW(m.className,u)),d!==void 0&&(m.style=wW(m.style,d)),m):DW}function qW(e){return Array.isArray(e)?NW(e):MW(void 0,e)}var JW=Symbol.for(`react.lazy`);function YW(e){if(e?.$$typeof!==JW)return e;let t=q.Children.toArray(e)[0];return q.isValidElement(t)?t:e}function XW(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=MW(n,t.props);return e.ref=n.ref,q.cloneElement(t,e)}return ZW(e,n)}function ZW(e,t){return e===`button`?(0,q.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,q.createElement)(`img`,{alt:``,...t,key:t.key}):q.createElement(e,t)}function QW(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 $W=QW(`https://base-ui.com/production-error`,`Base UI`),eG=q.createContext(void 0);function tG(){let e=q.useContext(eG);if(e===void 0)throw Error($W(13));return e}var nG={imageLoadingStatus:()=>null},rG=q.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[o,s]=q.useState(`idle`),c={imageLoadingStatus:o},l=q.useMemo(()=>({imageLoadingStatus:o,setImageLoadingStatus:s}),[o,s]),u=GW(`span`,e,{state:c,ref:t,props:a,stateAttributesMapping:nG});return(0,J.jsx)(eG.Provider,{value:l,children:u})}),iG={...q},aG=iG.useInsertionEffect,oG=aG&&aG!==iG.useLayoutEffect?aG:e=>e();function Q(e){let t=mW(sG).current;return t.next=e,oG(t.effect),t.trampoline}function sG(){let e={next:void 0,callback:cG,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function cG(){}var $=typeof document<`u`?q.useLayoutEffect:()=>{};function lG(e){q.useEffect(e,EW)}var uG=null;globalThis.requestAnimationFrame;var dG=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)}},fG=class e{static create(){return new e}static request(e){return dG.request(e)}static cancel(e){return dG.cancel(e)}currentId=uG;request(e){this.cancel(),this.currentId=dG.request(()=>{this.currentId=uG,e()})}cancel=()=>{this.currentId!==uG&&(dG.cancel(this.currentId),this.currentId=uG)};disposeEffect=()=>this.cancel};function pG(){let e=mW(fG.create).current;return lG(e.disposeEffect),e}function mG(e){return e==null?e:`current`in e?e.current:e}function hG(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var gG=`data-starting-style`,_G=`data-ending-style`,vG=null;function yG(e){if(!vG){let e=[];vG=e,queueMicrotask(()=>{vG=null,ud.flushSync(()=>{for(let t of e)t()})})}vG.push(e)}function bG(e,t=!1,n=!1){let r=pG();return Q((i,a=null)=>{r.cancel();let o=mG(e);if(o==null)return;let s=o,c=()=>{n?yG(()=>{a?.aborted||i()}):ud.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(hG(s).map(e=>e.finished.then(TW))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(hG(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=gG;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 xG(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=Q(a),s=bG(r,n,i);q.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var SG={[gG]:``},CG={[_G]:``},wG={transitionStatus(e){return e===`starting`?SG:e===`ending`?CG:null}};function TG(e,t=!1,n=!1,r=!1){let[i,a]=q.useState(e&&t?`idle`:void 0),[o,s]=q.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),$(()=>{if(!e&&o&&i!==`ending`&&n){let e=fG.request(()=>{a(`ending`)});return()=>{fG.cancel(e)}}},[e,o,i,n]),$(()=>{if(!e||t||i===void 0)return;let n=fG.request(()=>{a(void 0)});return()=>{fG.cancel(n)}},[t,e,i]),$(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=fG.request(()=>{a(`idle`)});return()=>{fG.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function EG(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i},a){let o=q.useState(`idle`),s=o[1];return $(()=>{if(!a)return TW;if(!e&&!i)return s(`error`),TW;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 DG={...nG,...wG},OG=q.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}=tG(),[f,p]=EG(l,e,!a),m=f===`loaded`,{mounted:h,transitionStatus:g,setMounted:_}=TG(m),v=q.useRef(null),y=q.useRef(!0);$(()=>{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=Q(e=>{i?.(e),d(e)});$(()=>{f!==`idle`&&x(f)},[f,x]),$(()=>()=>d(`idle`),[d]),xG({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=GW(`img`,e,{state:S,ref:[t,v],props:[b,u,w],stateAttributesMapping:DG,enabled:C});return C?T:null}),kG=0,AG=class e{static create(){return new e}currentId=kG;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=kG,t()},e)}isStarted(){return this.currentId!==kG}clear=()=>{this.currentId!==kG&&(clearTimeout(this.currentId),this.currentId=kG)};disposeEffect=()=>this.clear};function jG(){let e=mW(AG.create).current;return lG(e.disposeEffect),e}var MG=q.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...o}=e,{imageLoadingStatus:s}=tG(),[c,l]=q.useState(i===0),u=jG();return q.useEffect(()=>(i>0?u.start(i,()=>l(!0)):l(!0),u.clear),[u,i]),GW(`span`,e,{state:{imageLoadingStatus:s},ref:t,props:o,stateAttributesMapping:nG,enabled:s!==`loaded`&&(i===0||c)})}),NG=`-`,PG=e=>{let t=RG(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(NG);return n[0]===``&&n.length!==1&&n.shift(),FG(n,t)||LG(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},FG=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?FG(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(NG);return t.validators.find(({validator:e})=>e(a))?.classGroupId},IG=/^\[(.+)\]$/,LG=e=>{if(IG.test(e)){let t=IG.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},RG=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return HG(Object.entries(e.classGroups),n).forEach(([e,n])=>{zG(n,r,e,t)}),r},zG=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:BG(t,e);r.classGroupId=n}else if(typeof e==`function`){if(VG(e)){zG(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n})}else Object.entries(e).forEach(([e,i])=>{zG(i,BG(t,e),n,r)})})},BG=(e,t)=>{let n=e;return t.split(NG).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},VG=e=>e.isThemeGetter,HG=(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,UG=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)}}},WG=`!`,GG=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(WG);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},KG=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},qG=e=>({cache:UG(e.cacheSize),parseClassName:GG(e),...PG(e)}),JG=/\s+/,YG=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(JG),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=KG(c).join(`:`),h=l?m+WG: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 XG(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=ZG(t))&&(r&&(r+=` `),r+=n);return r}var ZG=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ZG(e[r]))&&(n&&(n+=` `),n+=t);return n};function QG(e,...t){let n,r,i,a=o;function o(o){return n=qG(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=YG(e,n);return i(e,a),a}return function(){return a(XG.apply(null,arguments))}}var $G=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},eK=/^\[(?:([a-z-]+):)?(.+)\]$/i,tK=/^\d+\/\d+$/,nK=new Set([`px`,`full`,`screen`]),rK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iK=/\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$/,aK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sK=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cK=e=>uK(e)||nK.has(e)||tK.test(e),lK=e=>CK(e,`length`,wK),uK=e=>!!e&&!Number.isNaN(Number(e)),dK=e=>CK(e,`number`,uK),fK=e=>!!e&&Number.isInteger(Number(e)),pK=e=>e.endsWith(`%`)&&uK(e.slice(0,-1)),mK=e=>eK.test(e),hK=e=>rK.test(e),gK=new Set([`length`,`size`,`percentage`]),_K=e=>CK(e,gK,TK),vK=e=>CK(e,`position`,TK),yK=new Set([`image`,`url`]),bK=e=>CK(e,yK,DK),xK=e=>CK(e,``,EK),SK=()=>!0,CK=(e,t,n)=>{let r=eK.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},wK=e=>iK.test(e)&&!aK.test(e),TK=()=>!1,EK=e=>oK.test(e),DK=e=>sK.test(e),OK=QG(()=>{let e=$G(`colors`),t=$G(`spacing`),n=$G(`blur`),r=$G(`brightness`),i=$G(`borderColor`),a=$G(`borderRadius`),o=$G(`borderSpacing`),s=$G(`borderWidth`),c=$G(`contrast`),l=$G(`grayscale`),u=$G(`hueRotate`),d=$G(`invert`),f=$G(`gap`),p=$G(`gradientColorStops`),m=$G(`gradientColorStopPositions`),h=$G(`inset`),g=$G(`margin`),_=$G(`opacity`),v=$G(`padding`),y=$G(`saturate`),b=$G(`scale`),x=$G(`sepia`),S=$G(`skew`),C=$G(`space`),w=$G(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,mK,t],O=()=>[mK,t],k=()=>[``,cK,lK],A=()=>[`auto`,uK,mK],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`,mK],I=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],L=()=>[uK,mK];return{cacheSize:500,separator:`:`,theme:{colors:[SK],spacing:[cK,lK],blur:[`none`,``,hK,mK],brightness:L(),borderColor:[e],borderRadius:[`none`,``,`full`,hK,mK],borderSpacing:O(),borderWidth:k(),contrast:L(),grayscale:F(),hueRotate:L(),invert:F(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[pK,lK],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`,mK]}],container:[`container`],columns:[{columns:[hK]}],"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(),mK]}],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`,fK,mK]}],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`,mK]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:[`first`,`last`,`none`,fK,mK]}],"grid-cols":[{"grid-cols":[SK]}],"col-start-end":[{col:[`auto`,{span:[`full`,fK,mK]},mK]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[SK]}],"row-start-end":[{row:[`auto`,{span:[fK,mK]},mK]}],"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`,mK]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,mK]}],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`,mK,t]}],"min-w":[{"min-w":[mK,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[mK,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[hK]},hK]}],h:[{h:[mK,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[mK,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[mK,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[mK,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,hK,lK]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,dK]}],"font-family":[{font:[SK]}],"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`,mK]}],"line-clamp":[{"line-clamp":[`none`,uK,dK]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,cK,mK]}],"list-image":[{"list-image":[`none`,mK]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,mK]}],"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`,cK,lK]}],"underline-offset":[{"underline-offset":[`auto`,cK,mK]}],"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`,mK]}],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`,mK]}],"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(),vK]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,_K]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},bK]}],"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":[cK,mK]}],"outline-w":[{outline:[cK,lK]}],"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":[cK,lK]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,hK,xK]}],"shadow-color":[{shadow:[SK]}],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`,hK,mK]}],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`,mK]}],duration:[{duration:L()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,mK]}],delay:[{delay:L()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,mK]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[fK,mK]}],"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`,mK]}],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`,mK]}],"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`,mK]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[cK,lK,dK]}],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 kK(e){return GW(e.defaultTagName??`div`,e,e)}var AK=q.createContext(void 0);function jK(e=!1){let t=q.useContext(AK);if(t===void 0&&!e)throw Error($W(16));return t}function MK(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:q.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 NK(e){return e?.ownerDocument||document}function PK(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(b(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 FK(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=q.useRef(null),s=jK(!0),c=a??s!==void 0,{props:l}=MK({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=q.useCallback(()=>{let e=o.current;IK(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return $(u,[u]),{getButtonProps:q.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return MW({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(HW(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=IK(r),s=!i&&LK(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(),PK(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),PK(r,e)))},onKeyUp(e){t||(HW(e),a?.(e),e.target===e.currentTarget&&i&&c&&IK(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),PK(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Q(e=>{o.current=e,u()})}}function IK(e){return i(e)&&e.tagName===`BUTTON`}function LK(e){return i(e)&&e.tagName===`A`&&!!e.href}var RK=q.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}=FK({disabled:i,focusableWhenDisabled:a,native:o});return GW(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),zK=q.createContext(void 0);function BK(e){let t=q.useContext(zK);if(t===void 0&&!e)throw Error($W(33));return t}var VK=q.createContext(void 0);function HK(e){let t=q.useContext(VK);if(t===void 0&&!e)throw Error($W(36));return t}var UK=`data-open`,WK=`data-closed`,GK=`data-anchor-hidden`,KK=`data-popup-open`,qK=`data-pressed`,JK={[KK]:``},YK={[KK]:``,[qK]:``},XK={[UK]:``},ZK={[WK]:``},QK={[GK]:``},$K={open(e){return e?JK:null}},eq={open(e){return e?YK:null}},tq={open(e){return e?XK:ZK},anchorHidden(e){return e?QK:null}},nq={...tq,...wG},rq=q.createContext(void 0);function iq(e=!0){let t=q.useContext(rq);if(t===void 0&&!e)throw Error($W(25));return t}var aq=`none`,oq=`trigger-press`,sq=`trigger-hover`,cq=`trigger-focus`,lq=`outside-press`,uq=`item-press`,dq=`focus-out`,fq=`escape-key`,pq=`list-navigation`,mq=`keyboard`,hq=`pointer`,gq=`cancel-open`,_q=`sibling-open`,vq=`disabled`,yq=`missing`,bq=`initial`,xq=`imperative-action`,Sq=`window-resize`;function Cq({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=q.useRef(e!==void 0),[a,o]=q.useState(()=>t);return[i&&e!==void 0?e:a,q.useCallback(e=>{i||o(e)},[])]}var wq=q.createContext(null);function Tq(e=`root`){let t=q.useContext(wq),n=q.useContext(VK);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var Eq={visible:!0,ref:null};function Dq(){return Eq}function Oq(e,t,n=`root`){let r=Tq(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??Dq)({label:e.label,children:e.children,render:e.render}),a=hW(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}var kq=q.createContext(void 0);function Aq(){let e=q.useContext(kq);if(e===void 0)throw Error($W(30));return e}function jq(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Mq,platform:Nq,maxTouchPoints:Pq}=jq(),Fq=Mq.toLowerCase(),Iq=Nq.toLowerCase(),Lq=/^i(os$|p)/.test(Iq)||Iq===`macintel`&&Pq>1,Rq=`android`,zq=Iq===Rq||Fq.includes(Rq),Bq=!Lq&&Iq.startsWith(`mac`);Iq.startsWith(`win`),!zq&&/^(linux|chrome os)/.test(Iq);var Vq=Bq||Lq,Hq=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!Hq&&Fq.includes(`firefox`),!Hq&&Fq.includes(`chrom`);var Uq=Vq,Wq=/jsdom|happydom/.test(Fq);function Gq(e){e.preventDefault()}function Kq(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=HK(),u=iq(!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 q.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?Gq: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:uq})},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&&!Bq&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&PK(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var qq={type:`regular-item`};function Jq(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=q.useRef(null),{getButtonProps:d,buttonRef:f}=FK({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Kq({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=q.useCallback(e=>MW(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=hW(u,f);return q.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Yq=q.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Xq(){return q.useContext(Yq)}function Zq(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Xq(),u=q.useRef(-1),[d,f]=q.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=q.useRef(null),h=q.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 $(()=>{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 Qq(){let[,e]=q.useState({});return q.useCallback(()=>{e({})},[])}var $q=0;function eJ(e,t=`mui`){let n=q.useRef(void 0),r=Qq(),i=e??n.current;return q.useEffect(()=>{n.current??($q+=1,n.current=`${t}-${$q}`,e??r())},[e,t,r]),i}var tJ=iG.useId;function nJ(e,t){if(tJ!==void 0){let n=tJ();return e??(t?`${t}-${n}`:n)}return eJ(e,t)}function rJ(e){return nJ(e,`base-ui`)}var iJ=`data-checked`,aJ=`data-unchecked`,oJ={checked(e){return e?{[iJ]:``}:{[aJ]:``}},...wG};function sJ(e,t,n,r){let i=!1,a=!1,o=r??DW;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 cJ(e,t,n){let r=n??DW;return{reason:e,event:t??new Event(`base-ui`),...r}}var lJ=q.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}=HK(),m=Zq({guess:!0,label:a}),h=rJ(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}=Jq({closeOnClick:c,disabled:b,highlighted:_,id:h,store:p,nativeButton:o,nodeId:v,itemMetadata:qq}),C=q.useMemo(()=>({disabled:b,highlighted:_,checked:l}),[b,_,l]);function w(e){let t=sJ(uq,e.nativeEvent,void 0,{preventUnmountOnClose:TW});u?.(!l,t)}let T=GW(`div`,e,{state:C,stateAttributesMapping:oJ,props:[y,{role:`menuitemcheckbox`,"aria-checked":l,onClick:w},f,x],ref:[S,t,m.ref]});return(0,J.jsx)(kq.Provider,{value:C,children:T})}),uJ=q.forwardRef(function(e,t){let{checked:n,defaultChecked:r,onCheckedChange:i,...a}=e,[o,s]=Cq({controlled:n,default:r??!1,name:`MenuCheckboxItem`,state:`checked`}),c=Oq(e,t);function l(e,t){i?.(e,t),t.isCanceled||s(e)}return c.visible?(0,J.jsx)(lJ,{...a,checked:o,onCheckedChange:l,ref:c.ref}):null}),dJ=q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Aq(),c=q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=TG(s.checked);return xG({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),GW(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},ref:[t,c],stateAttributesMapping:oJ,props:{"aria-hidden":!0,...o},enabled:a||u})}),fJ=q.createContext(void 0);function pJ(){let e=q.useContext(fJ);if(e===void 0)throw Error($W(31));return e}var mJ=q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=q.useState(void 0),c=GW(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,J.jsx)(fJ.Provider,{value:s,children:c})}),hJ=q.forwardRef(function(e,t){let n=Tq()?.Group??mJ;return(0,J.jsx)(n,{...e,ref:t})}),gJ=q.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=rJ(a),c=pJ();return $(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),GW(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),_J=q.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}=HK(),f=Zq({guess:!0,label:a}),p=rJ(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}=Jq({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:qq});return GW(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),vJ=q.forwardRef(function(e,t){let n=Oq(e,t);return n.visible?(0,J.jsx)(_J,{...e,ref:n.ref}):null});function yJ(e){e.preventDefault(),e.stopPropagation()}function bJ(e){return`nativeEvent`in e}function xJ(e){return e.pointerType===``&&e.isTrusted?!0:zq&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function SJ(e){return Wq?!1:!zq&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(zq||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function CJ(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function wJ(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function TJ(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function EJ(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&S(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function DJ(e,t){let n=e;for(;n;){if(B(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(S(n)?n.host:null)}return null}function OJ(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var kJ=`data-base-ui-focusable`,AJ=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,jJ=`ArrowLeft`,MJ=`ArrowRight`,NJ=`ArrowUp`,PJ=`ArrowDown`,FJ=`data-trigger-disabled`;function IJ(e,t){if(!B(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(FJ);for(let[,e]of t.entries())if(EJ(e,n))return!e.hasAttribute(FJ);return!1}function LJ(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 RJ(e){return e.matches(`html,body`)}function zJ(e){return i(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function BJ(e){return DJ(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${AJ}`)!=null}function VJ(e){return e?e.getAttribute(`role`)===`combobox`&&zJ(e):!1}function HJ(e){if(!e||Wq)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function UJ(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function WJ(e,t){return t!=null&&!CJ(t)?0:typeof e==`function`?e():e}function GJ(e,t,n){let r=WJ(e,n);return typeof r==`number`?r:r?.[t]}function KJ(e){return typeof e==`function`?e():e}function qJ(e,t){return t||e===`click`||e===`mousedown`}function JJ(e){return e?.includes(`mouse`)&&e!==`mousedown`}var YJ=q.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new AG,currentIdRef:{current:null},currentContextRef:{current:null}});function XJ(e,t){e.current=t.current}function ZJ(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=q.useRef(n),a=q.useRef(n),o=q.useRef(null),s=q.useRef(null),c=jG();return $(()=>{a.current=n,o.current?i.current={open:GJ(i.current,`open`),close:GJ(n,`close`)}:i.current=n},[n,o,i,a]),(0,J.jsx)(YJ.Provider,{value:q.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function QJ(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}=q.useContext(YJ),[d,f]=q.useState(!1),p=q.useRef(n);return $(()=>{p.current=n},[n]),$(()=>{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]),$(()=>{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:GJ(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,sJ(aq))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),$(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,XJ(a,s),u.clear()}},[c,i,a,r,s,u]),q.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function $J(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function eY(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function tY(e){let t=mW(nY,e).current;return t.next=e,$(t.effect),t}function nY(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var rY={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},iY={...rY,position:`fixed`,margin:0,top:0,left:0},aY={...rY,position:`absolute`},oY=q.forwardRef(function(e,t){let[n,r]=q.useState();$(()=>{Uq&&Hq&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,J.jsx)(`span`,{...e,ref:t,style:iY,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function sY(e,t){return t<0||t>=e.length}function cY(e,t){return dY(e.current,{disabledIndices:t})}function lY(e,t){return dY(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function uY(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>dY(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:sY(e,u)?-1:u,wrapped:d}}function dY(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&&fY(e,a,r));return a}function fY(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!mY(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function pY(e){return e.visibility===`hidden`||e.visibility===`collapse`}function mY(e,t=e?V(e):null){return!e||!e.isConnected||!t||pY(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var hY=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function gY(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return S(n)?n.host:null}function _Y(e){for(let t of Array.from(e.children))if(O(t)===`summary`)return t;return null}function vY(e,t){let n=_Y(t);return!!n&&(e===n||EJ(n,e))}function yY(e){let t=e?O(e):``;return e!=null&&e.matches(hY)&&(t!==`summary`||e.parentElement!=null&&O(e.parentElement)===`details`&&_Y(e.parentElement)===e)&&(t!==`details`||_Y(e)==null)&&(t!==`input`||e.type!==`hidden`)}function bY(e){if(!yY(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=gY(t)){let n=t!==e,r=O(t)===`slot`;if(t.hasAttribute(`inert`)||n&&O(t)===`details`&&!t.open&&!vY(e,t)||t.hasAttribute(`hidden`)||!r&&!xY(t,n))return!1}return!0}function xY(e,t){let n=V(e);return t?n.display!==`none`:mY(e,n)}function SY(e){let t=e.tabIndex;if(t<0){let t=O(e);if(t===`details`||t===`audio`||t===`video`||i(e)&&e.isContentEditable)return 0}return t}function CY(e){if(O(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function wY(e,t){let n=CY(e);if(!n)return!0;let r=t.find(e=>{let t=CY(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=CY(e);return t?.name===n.name&&t.form===n.form})===n}function TY(e){if(i(e)&&O(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return i(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function EY(e,t){TY(e).forEach(e=>{yY(e)&&t.push(e),EY(e,t)})}function DY(e,t,n){TY(e).forEach(e=>{i(e)&&e.matches(t)&&n.push(e),DY(e,t,n)})}function OY(e){return bY(e)&&SY(e)>=0}function kY(e){let t=[];return EY(e,t),t.filter(bY)}function AY(e){let t=kY(e);return t.filter(e=>SY(e)>=0&&wY(e,t))}function jY(e,t){let n=AY(e),r=n.length;if(r===0)return;let i=TJ(NK(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function MY(e){return jY(NK(e).body,1)||e}function NY(e){return jY(NK(e).body,-1)||e}function PY(e,t,n){if(!e)return null;let r=[];EY(NK(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(bY);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!EJ(n,o)&&OY(o)&&wY(o,a))return o}return r[i]}function FY(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!EJ(n,r)}function IY(e){AY(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function LY(e){let t=[];DY(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 RY(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...RY(e,t.id,n)])}function zY(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 BY(e){return`data-base-ui-${e}`}var VY=0;function HY(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(VY);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),TW;let o=requestAnimationFrame(a);return VY=o,()=>{VY===o&&(cancelAnimationFrame(o),VY=0)}}var UY=`data-base-ui-inert`,WY=new WeakMap,GY=new WeakSet,KY=new WeakMap,qY=0;function JY(e){return e?S(e)?e.host:JY(e.parentNode):null}var YY=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=JY(t);return e.contains(n)?n:null}).filter(e=>e!=null),XY=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},ZY=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{O(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function QY(e,t,n,{mark:r=!0}){let i=YY(t,e),a=r?ZY(t,XY(i),new Set(i)):[],o=[],s=[];if(n){let e=YY(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);ZY(t,XY(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(WY.get(e)||0)+1;WY.set(e,r),o.push(e),r===1&&n&&GY.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(KY.get(e)||0)+1;KY.set(e,t),s.push(e),t===1&&e.setAttribute(UY,``)}),qY+=1,()=>{o.forEach(e=>{let t=(WY.get(e)||0)-1;WY.set(e,t),t||(GY.has(e)||e.removeAttribute(`aria-hidden`),GY.delete(e))}),r&&s.forEach(e=>{let t=(KY.get(e)||0)-1;KY.set(e,t),t||e.removeAttribute(UY)}),--qY,qY||(WY=new WeakMap,GY=new WeakSet,KY=new WeakMap)}}function $Y(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=NK(e[0]).body;return QY(e,i,n,{mark:r})}var eX={style:{transition:`none`}},tX=`data-base-ui-click-trigger`,nX={fallbackAxisSide:`none`},rX={fallbackAxisSide:`end`},iX={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},aX=q.createContext(null),oX=()=>q.useContext(aX),sX=BY(`portal`);function cX(e={}){let{ref:t,container:n,componentProps:r=DW,elementProps:i}=e,a=nJ(),o=oX()?.portalNode,[s,c]=q.useState(null),[l,u]=q.useState(null),d=Q(e=>{e!==null&&u(e)}),f=q.useRef(null);$(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(_(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=GW(`div`,r,{ref:[t,d],props:[{id:a,[sX]:``},i]}),m=s&&p?ud.createPortal(p,s):null;return{node:l,nodeId:q.isValidElement(p)?p.props.id:void 0,subtree:m}}var lX=q.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}=cX({container:o,ref:t,componentProps:e,elementProps:c}),f=q.useRef(null),p=q.useRef(null),m=q.useRef(null),h=q.useRef(null),[g,_]=q.useState(null),v=q.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;q.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&FY(e)&&(e.type===`focusin`?v.current&&=(LY(l),!1):(IY(l),v.current=!0))}return eY($J(l,`focusin`,e,!0),$J(l,`focusout`,e,!0))},[l,y]),$(()=>{l&&b===!0&&v.current&&(LY(l),v.current=!1)},[b,l]);let S=q.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,J.jsxs)(q.Fragment,{children:[d,(0,J.jsxs)(aX.Provider,{value:S,children:[x&&l&&(0,J.jsx)(oY,{"data-type":`outside`,ref:f,onFocus:e=>{FY(e,l)?m.current?.focus():NY(g?g.domReference:null)?.focus()}}),x&&l&&(0,J.jsx)(`span`,{role:s,"aria-owns":u,style:iX}),l&&ud.createPortal(a,l),x&&l&&(0,J.jsx)(oY,{"data-type":`outside`,ref:p,onFocus:e=>{FY(e,l)?h.current?.focus():(MY(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,sJ(`focus-out`,e.nativeEvent)))}})]})]})});function uX(){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 dX=class{nodesRef={current:[]};events=uX();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)}},fX=q.createContext(null),pX=q.createContext(null),mX=()=>q.useContext(fX)?.id||null,hX=e=>{let t=q.useContext(pX);return e??t};function gX(e){let t=nJ(),n=hX(e),r=mX();return $(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function _X(e){let{children:t,id:n}=e,r=mX();return(0,J.jsx)(fX.Provider,{value:q.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function vX(e){let{children:t,externalTree:n}=e,r=mW(()=>n??new dX).current;return(0,J.jsx)(pX.Provider,{value:r,children:t})}function yX(e,t){let n=b(OJ(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(xJ(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var bX=20,xX=[];function SX(){xX=xX.filter(e=>e.deref()?.isConnected)}function CX(e){SX(),e&&O(e)!==`body`&&(xX.push(new WeakRef(e)),xX.length>bX&&(xX=xX.slice(-20)))}function wX(){return SX(),xX[xX.length-1]?.deref()}function TX(e){return e?OY(e)?e:AY(e)[0]||e:null}function EX(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=kY(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return OY(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 DX(e){let{context:t,children:n,disabled:r=!1,initialFocus:a=!0,returnFocus:o=!0,explicitReturnFocus:s,restoreFocus:c=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:d=``,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=Q(()=>x.current.floatingContext?.nodeId),C=a===!1,w=VJ(v)&&C,T=tY(a),E=tY(o),D=tY(s),k=tY(d),A=tY(_),j=hX(h),M=oX(),N=q.useRef(!1),P=q.useRef(!1),F=q.useRef(!1),I=q.useRef(null),L=q.useRef(``),R=q.useRef(``),z=q.useRef(null),B=q.useRef(null),ee=hW(z,m,M?.beforeInsideRef),te=hW(B,M?.afterInsideRef),ne=jG(),re=jG(),ie=pG(),ae=M!=null,V=UJ(y),oe=Q((e=V)=>e?AY(e):[]),se=Q(()=>g?.().filter(e=>e!=null)??[]);q.useEffect(()=>{if(r||!l)return;function e(e){e.key===`Tab`&&EJ(V,TJ(NK(V)))&&oe().length===0&&!w&&yJ(e)}return $J(NK(V),`keydown`,e)},[r,V,l,w,oe]),q.useEffect(()=>{if(r||!_)return;let e=NK(V);function t(){F.current=!1}function n(e){let t=OJ(e),n=se(),r=EJ(y,t)||EJ(v,t)||EJ(M?.portalNode,t)||n.some(e=>e===t||EJ(e,t));F.current=!r,R.current=e.pointerType||`keyboard`,DJ(t,`[data-base-ui-click-trigger]`)&&(P.current=!0,re.start(0,()=>{P.current=!1}))}function i(){R.current=`keyboard`}return eY($J(e,`pointerdown`,n,!0),$J(e,`pointerup`,t,!0),$J(e,`pointercancel`,t,!0),$J(e,`keydown`,i,!0),t)},[r,y,v,V,_,M,re,se]),q.useEffect(()=>{if(r||!u)return;let e=NK(V);function n(){P.current=!0,re.start(0,()=>{P.current=!1})}function a(e){let t=OJ(e);OY(t)&&(I.current=t)}function o(n){let r=n.relatedTarget,a=n.currentTarget,o=OJ(n);l&&r==null&&o!=null&&EJ(y,o)&&CX(o),queueMicrotask(()=>{let s=S(),u=t.context.triggerElements,d=se(),m=r?.hasAttribute(BY(`focus-guard`))&&[z.current,B.current,M?.beforeInsideRef.current,M?.afterInsideRef.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,mG(p),mG(f)].includes(r),h=!(EJ(v,r)||EJ(y,r)||EJ(r,y)||EJ(M?.portalNode,r)||d.some(e=>e===r||EJ(e,r))||u.hasMatchingElement(e=>EJ(e,r))||m||j&&(RY(j.nodesRef.current,s).find(e=>EJ(e.context?.elements.floating,r)||EJ(e.context?.elements.domReference,r))||zY(j.nodesRef.current,s).find(e=>[e.context?.elements.floating,UJ(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(a===v&&V&&EX(V),c&&a!==v&&!mY(o)&&TJ(e)===e.body){if(i(V)&&(V.focus(),c===`popup`)){ie.request(()=>{V.focus()});return}let e=oe(),t=I.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||V;i(n)&&n.focus()}x.current.insideReactTree?x.current.insideReactTree=!1:(w||!l)&&r&&h&&!P.current&&(w||r!==wX())&&(N.current=!0,t.setOpen(!1,sJ(dq,n)))})}function s(){F.current||(x.current.insideReactTree=!0,ne.start(0,()=>{x.current.insideReactTree=!1}))}let d=i(v)?v:null;if(y||d)return eY(d&&$J(d,`focusout`,o),d&&$J(d,`pointerdown`,n),y&&$J(y,`focusin`,a),y&&$J(y,`focusout`,o),y&&M&&$J(y,`focusout`,s,!0))},[r,v,y,V,l,j,M,t,u,c,oe,w,S,x,ne,re,ie,f,p,se]),q.useEffect(()=>{if(r||!y||!_)return;let e=Array.from(M?.portalNode?.querySelectorAll(`[${BY(`portal`)}]`)||[]),t=(j?zY(j.nodesRef.current,S()):[]).find(e=>VJ(e.context?.elements.domReference||null))?.context?.elements.domReference,n=$Y([y,...e,z.current,B.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,...se(),t,mG(p),mG(f),w?v:null].filter(e=>e!=null),{ariaHidden:l||w,mark:!1}),i=$Y([y,...e].filter(e=>e!=null));return()=>{i(),n()}},[_,r,v,y,l,M,w,j,S,f,p,se]),$(()=>{if(!_||r||!i(V))return;L.current=``,R.current=``;let e=NK(V),t=TJ(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(k.current||``):n;if(r===void 0||r===!1||EJ(V,t))return;let i=null,a=()=>(i??=oe(V),i[0]||V),o;o=r===!0||r===null?a():mG(r),o||=a();let s=EJ(V,TJ(e)),c=x.current.openEvent,l=c?.type===`mousedown`&&xJ(c);HY(o,{sync:l,preventScroll:o===V,shouldFocus(){if(!A.current)return!1;if(s)return!0;let t=TJ(e);return!(t!==o&&EJ(V,t))}})})},[r,_,V,oe,T,k,A,x]);let ce=q.useRef(null);$(()=>{if(r||!V){ce.current=null;return}ce.current&&=(ce.current.cancelled=!0,null);let e=NK(V),t=TJ(e),n=k.current==null;CX(t);function a(e){if(e.open||(L.current=yX(e.nativeEvent,R.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(BY(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(N.current=!0),e.reason===`outside-press`){if(e.nested)N.current=!1;else if(xJ(e.nativeEvent)||SJ(e.nativeEvent))N.current=!1;else{let e=!1;NK(V).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?N.current=!1:N.current=!0}}}b.on(`openchange`,a);function o(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&&O(t)!==`body`?t:null,s=n?o||a:a||o;return s||=wX()||null,typeof i==`boolean`?s:mG(i)||s||null}return()=>{b.off(`openchange`,a);let t=TJ(e),n=se(),r=EJ(y,t)||n.some(e=>e===t||EJ(e,t))||j&&RY(j.nodesRef.current,S(),!1).some(e=>EJ(e.context?.elements.floating,t)),s=E.current,c=L.current,l=o(c),u={cancelled:!1};ce.current=u,queueMicrotask(()=>{ce.current===u&&(ce.current=null);let n=TX(l),a=D.current??typeof s!=`boolean`;if(!u.cancelled&&s&&!N.current&&i(n)&&(a||n===t||t===e.body||r)){let e={preventScroll:!0};c===`keyboard`&&(e.focusVisible=!0),n.focus(e)}N.current=!1})}},[r,y,V,E,D,k,b,j,v,S,se]),$(()=>{if(!Hq||_||!y)return;let e=TJ(NK(y));i(e)&&zJ(e)&&EJ(y,e)&&e.blur()},[_,y]),$(()=>{if(!r&&M)return M.setFocusManagerState({modal:l,closeOnFocusOut:u,open:_,onOpenChange:t.setOpen,domReference:v}),()=>{M.setFocusManagerState(null)}},[r,M,l,_,t,u,v]),$(()=>{if(!r&&V)return EX(V),()=>{queueMicrotask(SX)}},[r,V]);let le=!r&&(!l||!w)&&(ae||l);return(0,J.jsxs)(q.Fragment,{children:[le&&(0,J.jsx)(oY,{"data-type":`inside`,ref:ee,onFocus:e=>{if(l){let e=oe();HY(e[e.length-1])}else M?.portalNode&&(N.current=!1,FY(e,M.portalNode)?MY(v)?.focus():mG(p??M.beforeOutsideRef)?.focus())}}),n,le&&(0,J.jsx)(oY,{"data-type":`inside`,ref:te,onFocus:e=>{l?HY(oe()[0]):M?.portalNode&&(u&&(N.current=!0),FY(e,M.portalNode)?NY(v)?.focus():mG(f??M.afterOutsideRef)?.focus())}})]})}function OX(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=oq}=t,l=e.context.dataRef,u=q.useRef(void 0),d=pG(),f=jG(),p=q.useMemo(()=>{function t(t,n,r,i){let a=sJ(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=CJ(e.pointerType,!0)&&SJ(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||CJ(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=OJ(s),p=zJ(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:CJ(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 q.useMemo(()=>n?{reference:p}:DW,[n,p])}function kX(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 AX(e){return e!=null&&e.clientX!=null}function jX(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=q.useRef(!1),l=q.useRef(null),[u,d]=q.useState(),[f,p]=q.useState([]),m=Q(t=>{e.set(`positionReference`,t)}),h=Q((t,n,i)=>{c.current||(!s.current.openEvent||AX(s.current.openEvent))&&e.set(`positionReference`,kX(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=Q(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=CJ(u)?a:i;q.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=b(a);function r(t){let n=OJ(t);EJ(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||AX(s.current.openEvent)?l.current=$J(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),q.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),q.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),q.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=q.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return q.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function MX(){return!1}function NX(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function PX(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:a=!0,outsidePressEvent:o=`sloppy`,referencePress:s=MX,bubbles:l,externalTree:u}=t,d=e.useState(`open`),f=e.useState(`floatingElement`),{dataRef:p,events:m}=e.context,h=hX(u),g=Q(typeof a==`function`?a:()=>!1),_=typeof a==`function`?g:a,v=_!==!1,y=Q(()=>o),{escapeKey:b,outsidePress:x}=NX(l),C=q.useRef(!1),w=q.useRef(!1),T=q.useRef(!1),E=q.useRef(!1),D=q.useRef(!1),O=q.useRef(``),k=q.useRef(null),A=jG(),j=jG(),M=jG(),N=Q(()=>{j.clear(),p.current.insideReactTree=!1}),P=Q(e=>{let t=p.current.floatingContext?.nodeId;return(h?RY(h.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),F=Q(t=>LJ(t,e.select(`floatingElement`))||LJ(t,e.select(`domReferenceElement`))),I=Q(t=>{s()&&e.setOpen(!1,sJ(oq,t.nativeEvent))}),L=Q(t=>{if(!d||!n||!r||t.key!==`Escape`)return;let i=bJ(t)?t.nativeEvent:t;if(D.current||i.isComposing||!b&&P(`__escapeKeyBubbles`))return;let a=sJ(fq,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!b&&!a.isPropagationAllowed&&t.stopPropagation()}),z=Q(()=>{p.current.insideReactTree=!0,j.start(0,N)}),ee=Q(t=>{if(!d||!n||t.button!==0)return;let r=OJ(t.nativeEvent);EJ(e.select(`floatingElement`),r)&&(C.current||(C.current=!0,w.current=!1))}),te=Q(e=>{d&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&C.current&&(w.current=!0)});q.useEffect(()=>{function e(e){e.open||(E.current=!1)}return m.on(`openchange`,e),()=>{m.off(`openchange`,e)}},[m]),q.useEffect(()=>N,[N]),q.useEffect(()=>{if(!d||!n)return d||(E.current=!1,D.current=!1,O.current=``,k.current=null),N;p.current.__escapeKeyBubbles=b,p.current.__outsidePressBubbles=x;let t=new AG,a=NK(f);function o(){M.clear(),D.current=!0}function s(){D.current=!0,M.start(Hq?5:0,()=>{D.current=!1})}function l(){T.current=!0,t.start(0,()=>{T.current=!1})}function u(){C.current=!1,w.current=!1}function m(){let e=O.current,t=e===`pen`||!e?`mouse`:e,n=y(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function g(e){let t=m();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function j(e){let t=p.current.floatingContext?.nodeId,n=h&&RY(h.nodesRef.current,t).some(t=>LJ(e,t.context?.elements.floating));return F(e)||n}function I(n){if(g(n)){n.type!==`click`&&!F(n)&&(t.clear(),T.current=!1),N();return}if(p.current.insideReactTree){N();return}let r=OJ(n),a=`[${BY(`inert`)}]`,o=B(r)?r.getRootNode():null,s=Array.from((S(o)?o:NK(e.select(`floatingElement`))).querySelectorAll(a)),l=e.context.triggerElements;if(r&&(l.hasElement(r)||l.hasMatchingElement(e=>EJ(e,r))))return;let u=B(r)?r:null;for(;u&&!R(u);){let e=c(u);if(R(e)||!B(e))break;u=e}if(!(s.length&&B(r)&&!RJ(r)&&!EJ(r,e.select(`floatingElement`))&&s.every(e=>!EJ(u,e)))){if(i(r)&&!(`touches`in n)){let e=R(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(!j(n)){if(m()===`intentional`){if(n.detail!==0&&!xJ(n)&&!E.current)return;if(T.current){t.clear(),T.current=!1;return}}typeof _==`function`&&!_(n)||P(`__outsidePressBubbles`)||(e.setOpen(!1,sJ(lq,n)),N())}}}function z(t){m()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!F(t)&&I(t)}function ee(t){if(m()!==`sloppy`||!e.select(`open`)||!n||F(t))return;let r=t.touches[0];r&&(k.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function te(e,t){let n=OJ(e);if(!n)return;let r=$J(n,e.type,()=>{t(e),r()})}function ne(e){O.current=`touch`,te(e,ee)}function re(e){A.clear(),e.type===`pointerdown`&&(e.button===0&&(E.current=!0),O.current=e.pointerType),(e.type!==`mousedown`||!k.current||k.current.dismissOnMouseDown)&&te(e,e=>{e.type===`pointerdown`?z(e):I(e)})}function ie(e){if(e.type===`pointercancel`&&(E.current=!1),!C.current)return;let n=w.current;u(),m()===`intentional`&&(e.type===`pointercancel`?n&&l():j(e)||(n?l():(typeof _!=`function`||_(e))&&(t.clear(),T.current=!0,N())))}function ae(e){if(m()!==`sloppy`||!k.current||F(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(k.current.dismissOnTouchEnd=!0),i>10&&(I(e),A.clear(),k.current=null)}function oe(e){te(e,ae)}function se(e){m()===`sloppy`&&k.current&&!F(e)&&(k.current.dismissOnTouchEnd&&I(e),A.clear(),k.current=null)}function ce(e){te(e,se)}let le=eY(r&&eY($J(a,`keydown`,L),$J(a,`compositionstart`,o),$J(a,`compositionend`,s)),v&&eY($J(a,`click`,re,!0),$J(a,`pointerdown`,re,!0),$J(a,`pointerup`,ie,!0),$J(a,`pointercancel`,ie,!0),$J(a,`mousedown`,re,!0),$J(a,`mouseup`,ie,!0),$J(a,`touchstart`,ne,{capture:!0,passive:!0}),$J(a,`touchmove`,oe,{capture:!0,passive:!0}),$J(a,`touchend`,ce,{capture:!0,passive:!0})));return()=>{le(),t.clear(),u(),T.current=!1}},[p,f,r,v,_,d,n,b,x,L,N,y,P,F,h,e,A,M]);let ne=q.useMemo(()=>({onKeyDown:L,onPointerDown:I,onClick:I}),[L,I]),re=q.useMemo(()=>({onKeyDown:L,onPointerDown:te,onMouseDown:te,onClickCapture:z,onMouseDownCapture(e){z(),ee(e)},onPointerDownCapture(e){z(),ee(e)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[L,z,ee,te]);return q.useMemo(()=>n?{reference:ne,floating:re,trigger:ne}:{},[n,ne,re])}function FX(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),$(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};B(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 IX(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=Q(i),{mounted:c,setMounted:l,transitionStatus:u}=TG(t,!1,!1,o),d=!t&&r;$(()=>{t&&s(!1)},[t,s]);let f=q.useRef(c),p=q.useRef(!1),m=Qq(),h=()=>{f.current=!1,l(!1),a()};$(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=Q(()=>{f.current&&(t?(p.current=!0,m()):h())});return xG({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var LX={tabIndex:-1,[kJ]:``};function RX(e){return t=>t!==`touch`||e.current}function zX(e,t=!1){let n=nJ(),r=mX()!=null,i=mW(()=>e(n,r)).current;return FX({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function BX({handle:e,store:t}){return $(()=>e.attachStore(t),[e,t]),null}function VX(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function HX(e,t){let n=q.useRef(null);return Q(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),VX(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),VX(t))})}function UX(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 WX(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function GX(e,t,n,r={}){let i=n.reason,a=i===sq,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=WX(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=UX(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?ud.flushSync(l):l()}function KX(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=HX(e,n),o=Q(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=Q(e=>{a(e),e&&o(e)});return $(()=>(s(t.current),()=>s(null)),[s,t,n,e]),$(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function qX(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=q.useRef(null),i=e.useState(`open`);$(()=>{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=sJ(aq);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 JX(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=IX({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 mW(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function YX(e,t){e.useSyncedValues(t),$(()=>()=>{e.update({activeTriggerProps:DW,inactiveTriggerProps:DW,popupProps:DW})},[e])}function XX(e,t){$(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),$(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var ZX=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}},QX=n((e=>{var t=F();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,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),$X=n(((e,t)=>{t.exports=QX()})),eZ=n((e=>{var t=F(),n=$X();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),tZ=n(((e,t)=>{t.exports=eZ()})),nZ=[],rZ=void 0;function iZ(){return rZ}function aZ(e){nZ.push(e)}function oZ(e){let t=(t,n)=>{let r=mW(cZ).current,i;try{rZ=r;for(let e of nZ)e.before(r);i=e(t,n);for(let e of nZ)e.after(r);r.didInitialize=!0}finally{rZ=void 0}return i};return t.displayName=e.displayName||e.name,t}function sZ(e){return q.forwardRef(oZ(e))}function cZ(){return{didInitialize:!1}}var lZ=$X(),uZ=tZ(),dZ=SW(19)?mZ:hZ;function fZ(e,t,n,r,i){return dZ(e,t,n,r,i)}function pZ(e,t,n,r,i){let a=q.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,lZ.useSyncExternalStore)(e.subscribe,a,a)}aZ({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,lZ.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function mZ(e,t,n,r,i){let a=iZ();if(!a)return pZ(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 hZ(e,t,n,r,i){return(0,uZ.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var gZ=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 fZ(this,e,t,n,r)}},_Z=class extends gZ{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){q.useDebugValue(e);let n=this;$(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;$(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;$(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){q.useDebugValue(e);let n=this,r=t!==void 0;$(()=>{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 q.useDebugValue(e),fZ(this,this.selectors[e],t,n,r)}useContextCallback(e,t){q.useDebugValue(e);let n=Q(t??TW);this.context[e]=n}useStateSetter(e){let t=q.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)}})}},vZ={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},yZ=class extends _Z{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:uX(),nested:n,triggerElements:i},vZ),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&wJ(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 bZ(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new yZ({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:DW,inactiveTriggerProps:DW,popupProps:DW}}var xZ=e=>e.triggerIdProp??e.activeTriggerId,SZ=e=>e.openProp??e.open,CZ=e=>(e.popupElement?.id??e.floatingId)||void 0;function wZ(e,t){return t!==void 0&&SZ(e)&&xZ(e)===t}function TZ(e,t){return wZ(e,t)?!0:t!==void 0&&SZ(e)&&xZ(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var EZ={open:SZ,mounted:e=>e.mounted,transitionStatus:e=>SZ(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:xZ,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:CZ,isTriggerActive:(e,t)=>t!==void 0&&xZ(e)===t,isOpenedByTrigger:(e,t)=>wZ(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&xZ(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>TZ(e,t)?CZ(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function DZ(e){let t=q.useCallback(t=>e===void 0?TW:e.subscribeStore(t),[e]),n=q.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,lZ.useSyncExternalStore)(t,n,()=>e?.serverStore)}function OZ(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=nJ(),a=mX()!=null,o=mW(()=>new yZ({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ZX,floatingId:i,syncOnly:!1,nested:a})).current;return $(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=B(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 kZ=Bq&&Hq;function AZ(e,t={}){let{enabled:n=!0,delay:r}=t,{events:a,dataRef:o}=e.context,s=q.useRef(!1),c=q.useRef(null),l=q.useRef(!0),u=jG();q.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=b(t);function a(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&i(t)&&t===TJ(NK(t))&&(s.current=!0,c.current=t)}function o(){l.current=!0}function u(){l.current=!1}return eY($J(r,`blur`,a),kZ&&$J(r,`keydown`,o,!0),kZ&&$J(r,`pointerdown`,u,!0))},[e,n]),q.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);B(t)&&(c.current=t,s.current=!0)}}return a.on(`openchange`,t),()=>{a.off(`openchange`,t)}},[a,n,e]);let d=q.useMemo(()=>{function t(){s.current=!1,c.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(s.current){if(c.current===i)return;t()}let a=OJ(n.nativeEvent);if(B(a)){if(kZ&&!n.relatedTarget){if(!l.current&&!zJ(a))return}else if(!HJ(a))return}let o=IJ(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&o||!r?e.setOpen(!0,sJ(cq,d,f)):u.start(r,()=>{s.current||e.setOpen(!0,sJ(cq,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,a=B(r)&&r.hasAttribute(BY(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let t=e.select(`domReferenceElement`),n=TJ(NK(t));!r&&n===t||EJ(o.current.floatingContext?.refs.floating.current,n)||EJ(t,n)||a||IJ(r??n,e.context.triggerElements)||e.setOpen(!1,sJ(cq,i))})}}},[o,r,e,u]);return q.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var jZ=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new AG;restTimeout=new AG;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},MZ=new WeakMap;function NZ(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&MZ.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),MZ.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function PZ(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=MZ.get(n);a&&a!==e&&NZ(a),NZ(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,MZ.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function FZ(e){let t=e.context.dataRef.current,n=mW(()=>t.hoverInteractionState??jZ.create()).current;return t.hoverInteractionState||=n,lG(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function IZ(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=hX(),u=mX(),d=FZ(e),f=jG(),p=Q(()=>qJ(c.current.openEvent?.type,d.interactedInside)),m=Q(()=>JJ(c.current.openEvent?.type)),h=Q(()=>{NZ(d)});$(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),q.useEffect(()=>h,[h]),$(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&B(s)&&o){let e=s,t=o,n=NK(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??DJ(e,`[data-rootownerid]`)??n.body;return PZ(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),q.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&RY(l.nodesRef.current,u).length>0)}function a(t){let n=GJ(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,sJ(sq,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=OJ(e);BJ(t)?d.interactedInside=DJ(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(IJ(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&B(o)&&RY(l.nodesRef.current,r,!1).some(e=>EJ(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,sJ(sq,n)),l.events.emit(`floating.closed`,n)})}let y=o;return eY(y&&$J(y,`mouseenter`,g),y&&$J(y,`mouseleave`,_),y&&$J(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var LZ={current:null};function RZ(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=LZ,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=hX(l),v=FZ(e),y=q.useRef(!1),b=tY(i),x=tY(r),S=tY(o),C=tY(n),w=tY(p),T=tY(f),E=Q(()=>qJ(h.current.openEvent?.type,v.interactedInside)),D=Q(()=>w.current?.()!==!1),O=Q((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!EJ(t,n);if(!B(r))return!1;let a=r;return i.hasMatchingElement(e=>EJ(e,a))&&(!t||!EJ(t,a))}),k=Q(()=>{v.handler&&=(NK(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=Q(()=>{NZ(v)});return u&&(v.handleCloseOptions=i?.__options),q.useEffect(()=>k,[k]),q.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===sq,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]),q.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=GJ(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,sJ(sq,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,sJ(sq,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!B(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!CJ(v.pointerType))return;let n=KJ(S.current),r=GJ(x.current,`open`,v.pointerType),i=OJ(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(B(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(EJ(t,i)){c=t;break}}B(o)&&B(s)&&!e.context.triggerElements.hasElement(o)&&EJ(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&&B(c)&&B(s)&&EJ(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?D()&&e.setOpen(!0,sJ(sq,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,sJ(sq,t,c))}):g&&D()&&e.setOpen(!0,sJ(sq,t,c)))}function o(n){if(E()){A();return}k();let r=NK(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!IJ(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`&&EJ(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){EJ(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?$J(r,`mouseout`,l):void 0;return s?eY($J(r,`mousemove`,i,{once:!0}),$J(r,`mouseenter`,i),$J(r,`mouseleave`,o),f):eY($J(r,`mouseenter`,i),$J(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),q.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&&!CJ(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;PZ(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=KJ(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,sJ(sq,n,r))}v.pointerType===`touch`?ud.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function zZ(e){return Hq&&e.movementX===0&&e.movementY===0}function BZ(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function VZ(e,t){return BZ(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function HZ(e,t,n){return BZ(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function UZ(e,t,n){return BZ(t,n?e===jJ:e===MJ,e===PJ)}function WZ(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:BZ(t,n?e===MJ:e===jJ,e===NJ)}function GZ(e,t){let{listRef:n,activeIndex:r,onNavigate:a=()=>{},enabled:o=!0,selectedIndex:s=null,allowEscape:c=!1,loopFocus:l=!1,nested:u=!1,rtl:d=!1,virtual:f=!1,focusItemOnOpen:p=`auto`,focusItemOnHover:m=!0,openOnArrowKeyDown:h=!0,disabledIndices:g=void 0,orientation:_=`vertical`,triggerOrientation:v=_,parentOrientation:y,id:b,resetOnPointerLeave:x=!0,externalTree:S,nestedReturnFocusRef:C,grid:w}=t,T=w!=null,E=e.useState(`open`),D=e.useState(`floatingElement`),O=e.useState(`domReferenceElement`),k=e.context.dataRef,A=UJ(D),j=VJ(O),M=tY(A),N=mX(),P=hX(S),F=q.useRef(p),I=q.useRef(s??-1),L=q.useRef(null),R=q.useRef(!0),z=Q(e=>{a(I.current===-1?null:I.current,e)}),B=q.useRef(!!D),ee=q.useRef(E),te=q.useRef(!1),ne=q.useRef(!1),re=q.useRef(null),ie=tY(g),ae=tY(E),V=tY(s),oe=tY(x),se=pG(),ce=pG(),le=Q(()=>{se.cancel();function e(e){f||(re.current=HY(e,{sync:te.current,preventScroll:!0}))}let t=n.current[I.current],r=ne.current;t&&e(t),(te.current?e=>e():e=>se.request(e))(()=>{let i=n.current[I.current]||t;i&&(t||e(i),he&&(r||!R.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});$(()=>{k.current.orientation=_},[k,_]),$(()=>{E||(L.current=null),E&&p===`auto`||(F.current=p)},[E,p]),$(()=>{o&&(E&&D?(I.current=s??-1,F.current&&s!=null&&(ne.current=!0,z())):B.current&&(I.current=-1,z()))},[o,E,D,s,z]),$(()=>{if(o){if(!E)te.current=!1;else if(D){if(r==null){if(te.current=!1,V.current!=null)return;if(B.current&&(I.current=-1,le()),(!ee.current||!B.current)&&F.current&&(L.current!=null||F.current===!0&&L.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ce.request(e):queueMicrotask)(t),e+=1):(I.current=L.current==null||HZ(L.current,v,d)||u?cY(n):lY(n),L.current=null,z())};t()}}else sY(n.current,r)||(I.current=r,le(),ne.current=!1)}}},[o,E,D,r,V,u,n,v,d,z,le,ce]),$(()=>{if(!o||D||!P||f||!B.current)return;let e=P.nodesRef.current,t=e.find(e=>e.id===N)?.context?.elements.floating,n=TJ(NK(O??t??null)),r=e.some(e=>e.context&&EJ(e.context.elements.floating,n));t&&!r&&R.current&&t.focus({preventScroll:!0})},[o,D,O,P,N,f]),$(()=>{ee.current=E,B.current=!!D});let ue=r!=null,de=Q(e=>{if(!ae.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(I.current!==t||r!==t)&&(I.current=t,z(e))}),fe=Q(()=>y??P?.nodesRef.current.find(e=>e.id===N)?.context?.dataRef?.current.orientation),pe=Q(()=>cY(n,ie.current)),me=Q(t=>{if(R.current=!1,te.current=!0,t.which===229||!ae.current&&t.currentTarget===M.current)return;if(u&&WZ(t.key,_,d,T)){VZ(t.key,fe())||yJ(t),e.setOpen(!1,sJ(pq,t.nativeEvent));let n=C?.current??O;i(n)&&n.focus();return}r!=null&&r!==I.current&&!sY(n.current,r)&&(I.current=r);let a=I.current,o=cY(n,g),s=lY(n,g);if(j||(t.key===`Home`&&(yJ(t),I.current=o,z(t)),t.key===`End`&&(yJ(t),I.current=s,z(t))),w!=null){let e=w(t,I.current,n,_,l,d,g,o,s);if(e!=null&&e!==I.current&&(I.current=e,z(t)),_===`both`)return}if(VZ(t.key,_)){yJ(t);let e=TJ(t.currentTarget.ownerDocument);if(E&&!f&&EJ(t.currentTarget,e)&&!n.current.some(t=>t!=null&&EJ(t,e))){I.current=HZ(t.key,_,d)?o:s,z(t),r===I.current&&le();return}let{index:i,wrapped:u}=uY(n.current,a,{decrement:!HZ(t.key,_,d),loopFocus:l,allowEscape:c,disabledIndices:g,minIndex:o,maxIndex:s});u&&(te.current=!1),I.current=i,z(t)}}),he=q.useMemo(()=>({onFocus(e){te.current=!0,de(e)},onClick({currentTarget:e}){f||e.focus({preventScroll:!0})},onMouseMove(e){zZ(e)||(te.current=!0,ne.current=!1,m&&de(e))},onPointerLeave(e){if(!ae.current||!R.current||e.pointerType===`touch`)return;te.current=!0;let t=e.relatedTarget;if(m&&!n.current.includes(t)&&oe.current&&(re.current?.(),re.current=null,I.current=-1,z(e),!f)){let e=M.current,t=TJ(NK(e));e&&EJ(e,t)&&e.focus({preventScroll:!0})}}}),[de,ae,M,m,n,z,oe,f]),ge=q.useMemo(()=>f&&E&&ue&&{"aria-activedescendant":`${b}-${r}`},[f,E,ue,b,r]),_e=q.useMemo(()=>({...j?{}:ge,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&E&&!f){let n=OJ(t.nativeEvent);if(n&&!EJ(M.current,n))return;yJ(t);let r=sJ(dq,t.nativeEvent);e.setOpen(!1,r);let a=C?.current??O;!r.isCanceled&&i(a)&&a.focus()}else me(t)},onPointerMove(e){zZ(e)||(R.current=!0)}}),[ge,me,M,j,e,E,f,O,C]),ve=q.useMemo(()=>{function t(t){e.setOpen(!0,sJ(pq,t.nativeEvent,t.currentTarget))}function n(e){p===`auto`&&xJ(e.nativeEvent)&&(F.current=!f)}function r(e){F.current=p,p===`auto`&&SJ(e.nativeEvent)&&(F.current=!0)}return{onKeyDown(n){let r=e.select(`open`);R.current=!1;let i=n.key.startsWith(`Arrow`),a=UZ(n.key,fe(),d),o=VZ(n.key,r?_:v),s=(u?a:o)||n.key===`Enter`||n.key.trim()===``;if(f&&r&&(!u||zJ(n.currentTarget)))return me(n);if(r||h||!i){if(s){let e=VZ(n.key,fe());L.current=u&&e?null:n.key}u?a&&(yJ(n),r?(I.current=pe(),z(n),f&&M.current?.focus()):t(n)):o&&(V.current!=null&&(I.current=V.current),yJ(n),!r&&h?t(n):me(n),r&&z(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!f&&(I.current=-1,z(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[me,p,pe,u,z,e,h,_,v,fe,d,V,f,M]),ye=q.useMemo(()=>({...ge,...ve}),[ge,ve]);return q.useMemo(()=>o?{reference:ye,floating:_e,item:he,trigger:ve}:{},[o,ye,_e,ve,he])}function KZ(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=Q(s),f=e.useState(`open`),p=jG(),m=q.useRef(``),h=q.useRef(u??i??-1),g=q.useRef(null),_=Q(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!mY(n)||n?.matches(`:disabled`)?!1:o==null||!fY(EW,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===` `&&(yJ(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!==` `&&(yJ(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=Q(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);EJ(r,n)||EJ(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});$(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=q.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return q.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var qZ=.1,JZ=qZ*qZ,YZ=.5;function XZ(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ZZ(e,t,n,r,i,a,o,s,c,l){let u=!1;return XZ(e,t,n,r,i,a)&&(u=!u),XZ(e,t,i,a,o,s)&&(u=!u),XZ(e,t,o,s,c,l)&&(u=!u),XZ(e,t,c,l,n,r)&&(u=!u),u}function QZ(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function $Z(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 eQ(e={}){let{blockPointerEvents:t=!1}=e,n=new AG,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*JZ;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=OJ(r),g=r.type===`mouseleave`,_=EJ(u,h),v=EJ(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&B(r.relatedTarget)&&EJ(u,r.relatedTarget))return;function y(){return!!(s&&RY(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=$Z(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=$Z(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=$Z(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=$Z(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!QZ(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?YZ/2:YZ*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+YZ+1,o=C||T?S.bottom-YZ:S.top,s=C?T?S.bottom-YZ:S.top:S.bottom-YZ;M=ZZ(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?YZ/2:YZ*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-YZ,o=C||T?S.top+YZ:S.bottom,s=C?T?S.top+YZ:S.bottom:S.top+YZ;M=ZZ(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?YZ/2:YZ*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+YZ+1,o=w||E?S.right-YZ:S.left,s=w?E?S.right-YZ:S.left:S.right-YZ;M=ZZ(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?YZ/2:YZ*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-YZ,o=w||E?S.left+YZ:S.right,s=w?E?S.left+YZ:S.right:S.left+YZ;M=ZZ(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 tQ=q.createContext(void 0);function nQ(e){let t=q.useContext(tQ);if(t===void 0&&!e)throw Error($W(69));return t}var rQ=`ArrowUp`,iQ=`ArrowDown`,aQ=`ArrowLeft`,oQ=`ArrowRight`,sQ=new Set([rQ,iQ,aQ,oQ,`Home`,`End`]),cQ=[`Shift`,`Control`,`Alt`,`Meta`];function lQ(e){return i(e)&&e.tagName===`INPUT`}function uQ(e){return!!(lQ(e)&&e.selectionStart!=null||i(e)&&e.tagName===`TEXTAREA`)}function dQ(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=fQ(e,t,`left`),a=pQ(e),o=pQ(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=fQ(e,t,`top`),r=pQ(e),i=pQ(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 fQ(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 pQ(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 mQ(e){return e===`starting`?eX:DW}var hQ=q.createContext(void 0);function gQ(){return q.useContext(hQ)}function _Q(e,t){let n=YW(e.render);if(q.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function vQ(e,t,n){let r=_Q(e,t),i=r===t?void 0:r;return[r,q.useCallback(e=>n?.(e?i:void 0),[i,n])]}function yQ(e,t,n){let r=YW(e.render),i=q.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 bQ=q.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}=HK(),m=gQ(),{side:h,align:g}=BK(),_=nQ(!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]=vQ(e,u,d),L=yQ(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),xG({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}}),q.useEffect(()=>{function e(e){l.setOpen(!1,sJ(e.reason,e.domEvent))}return O.events.on(`close`,e),()=>{O.events.off(`close`,e)}},[O.events,l]),IZ(D,{enabled:A&&!j&&!z&&w.type!==`menubar`,closeDelay:k});let ee=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:te,handleFocus:ne}=(q.useContext(wq)?.useParentHandoff??SQ)(l,w,v,f),re=GW(`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:nq,props:[b,{id:F,...P?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":L},onKeyDown(e){R?.onPopupKeyDown?.(e),_&&sQ.has(e.key)&&e.stopPropagation()},onFocus:ne},mQ(y),c,{"data-rootownerid":E}]}),ie=w.type===void 0||z;(C||w.type===`menubar`&&T!==`outside-press`)&&(ie=!0);let ae=R?.getReturnElement??te;return(0,J.jsx)(DX,{context:D,openInteractionType:M,modal:z,disabled:!x,returnFocus:a??ae??ie,explicitReturnFocus:a===void 0&&ae?!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})}),xQ={parentVirtualFocusRef:void 0,handleFocus:void 0};function SQ(){return xQ}var CQ=q.forwardRef(function(e,t){let n=Tq()?.Popup??bQ;return(0,J.jsx)(n,{...e,ref:t})}),wQ=q.createContext(void 0);function TQ(){let e=q.useContext(wQ);if(e===void 0)throw Error($W(32));return e}var EQ=q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=HK();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,J.jsx)(wQ.Provider,{value:n,children:(0,J.jsx)(lX,{ref:t,...r,portalOwnerRole:o})})});function DQ(e){return SW(19)?e:e?`true`:void 0}function OQ(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`),c=r.useState(`floatingId`),[l,u]=q.useState(null),d=q.useRef(null),f=hX(n),p=q.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=oe({...e,elements:{...p,...l&&{reference:l}}}),h=q.useCallback(e=>{let t=B(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=q.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=q.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=q.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return $(()=>{o&&(d.current=o)},[o]),$(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),q.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var kQ=q.createContext(void 0);function AQ(){return q.useContext(kQ)?.direction??`ltr`}var jQ=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:s,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=h(e,t)||{};if(u==null)return{};let f=A(d),m={x:n,y:r},g=le(i),_=o(g),v=await s.getDimensions(u),y=g===`y`,b=y?`top`:`left`,x=y?`bottom`:`right`,S=y?`clientHeight`:`clientWidth`,C=a.reference[_]+a.reference[g]-m[g]-a.floating[_],T=m[g]-a.reference[g],E=c.floating[S]||a.floating[_],D=C/2-T/2,O=E/2-v[_]/2-1,k=Math.min(f[b],O),j=Math.min(f[x],O),M=k,N=E-v[_]-j,P=E/2-v[_]/2+D,F=p(M,P,N),I=!l.arrow&&w(i)!=null&&P!==F&&a.reference[_]/2-(P<M?k:j)-v[_]/2<0,L=I?P<M?P-M:P-N:0;return{[g]:m[g]+L,data:{[g]:F,centerOffset:P-F-L,...I&&{alignmentOffset:L}},reset:I}}}),MQ=(e,t)=>{let{name:n,fn:r}=jQ(e);return{name:n,fn:r,options:[e,t]}},NQ={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}}}},PQ={sideX:`left`,sideY:`top`},FQ=`--available-width`,IQ=`--available-height`,LQ=`--anchor-width`,RQ=`--anchor-height`,zQ=`--transform-origin`,BQ=FQ,VQ=IQ;function HQ(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 UQ(e,t,n){let{rects:r,placement:i}=e;return{side:HQ(t,f(i),n),align:w(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function WQ(e){return GQ(e,OQ)}function GQ(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:p=!1,inline:m,keepMounted:h=!1,floatingRootContext:g,mounted:_,collisionAvoidance:v,shift:y,nodeId:x,adaptiveOrigin:S,lazyFlip:C=!1,externalTree:T}=e,D=v.side||`flip`,O=v.align||`flip`,A=v.fallbackAxisSide||`end`,j=y?.crossAxis??!1,N=y?.rootBoundary,F=typeof n==`function`?n:void 0,I=Q(F),L=F?I:n,R=tY(n),z=tY(_),B=AQ()===`rtl`,[ee,ne]=q.useState(null);!_&&ee!==null&&ne(null);let re=C===`placement`,ie=ee?f(ee):null,V=ee&&re?w(ee)||`center`:null,oe=ie||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":B?`left`:`right`,"inline-start":B?`right`:`left`}[i],se=V||o,le=se===`center`?oe:`${oe}-${se}`,ue=l;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:c===`clipping-ancestors`?`clippingAncestors`:c,padding:ue},ge=q.useRef(null),_e=tY(a),ve=tY(s),ye=typeof a==`function`?0:a,be=typeof s==`function`?0:s,xe=[];m&&xe.push(m),xe.push(ae(e=>{let t=UQ(e,i,B),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,B,i]));let Se=O===`none`&&D!==`shift`,Ce=!Se&&(u||j||D===`shift`),we=D===`none`?null:te({...he,padding:{top:ue.top+1+de,right:ue.right+1+me,bottom:ue.bottom+1+fe,left:ue.left+1+pe},mainAxis:!j&&D===`flip`,crossAxis:O===`flip`&&`alignment`,fallbackAxisSideDirection:A}),Te=Se?null:ce({...he,rootBoundary:N,mainAxis:O!==`none`,crossAxis:Ce,limiter:u||j?void 0:M(e=>{if(!ge.current)return{};let{width:t,height:n}=ge.current.getBoundingClientRect(),r=k(f(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,u,j,N,ue,O]);D===`shift`||O===`shift`||se===`center`?xe.push(Te,we):xe.push(we,Te),xe.push(P({...he,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!z.current)return;let i=e.style;i.setProperty(BQ,`${t}px`),i.setProperty(VQ,`${n}px`);let a=b(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(LQ,`${u}px`),i.setProperty(RQ,`${d}px`)}}),MQ(e=>({element:ge.current||NK(e.elements.floating).createElement(`div`),padding:ge.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=f(r),u=w(r),d=k(l)===`y`,p=ge.current,m=typeof a==`function`?a(UQ(e,i,B)):a,h;h=!p&&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?p?.clientWidth||0:p?.clientHeight||0)/2}px`;let g=l===`top`||l===`left`?`calc(100% + ${m}px)`:`${-m}px`;return Ce&&d&&Math.abs(n.shift?.y||0)>m&&(g=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(zQ,d?`${h} ${g}`:`${g} ${h}`),{}}},NQ,S),$(()=>{!_&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[_,g]);let H=q.useMemo(()=>({ancestorScroll:!p,elementResize:!p&&typeof ResizeObserver<`u`,layoutShift:!p&&typeof IntersectionObserver<`u`}),[p]),{refs:Ee,elements:De,x:Oe,y:ke,middlewareData:Ae,update:je,placement:Me,context:Ne,isPositioned:Pe,floatingStyles:Fe}=t({rootContext:g,open:h?_:void 0,placement:le,middleware:xe,strategy:r,whileElementsMounted:h?void 0:(...e)=>E(...e,H),nodeId:x,externalTree:T}),{sideX:Ie,sideY:Le}=Ae.adaptiveOrigin||PQ,Re=Pe?r:`fixed`,ze=q.useMemo(()=>{let e;return e=Pe?S?{position:Re,[Ie]:Oe,[Le]:ke}:{...Fe,position:Re}:{position:Re,top:0,left:0},e[BQ]=`100vw`,e[VQ]=`100vh`,Pe||(e.opacity=0),e},[S,Re,Ie,Oe,Le,ke,Fe,Pe]),Be=q.useRef(null);$(()=>{if(!_)return;let e=R.current,t=typeof e==`function`?e():e,n=(KQ(t)?t.current:t)||null;n!==Be.current&&(Ee.setPositionReference(n),Be.current=n)},[_,Ee,L,R]),q.useEffect(()=>{if(!_)return;let e=R.current;typeof e!=`function`&&KQ(e)&&e.current!==Be.current&&(Ee.setPositionReference(e.current),Be.current=e.current)},[_,Ee,L,R]),q.useEffect(()=>{if(h&&_&&De.reference&&De.floating)return E(De.reference,De.floating,je,H)},[h,_,De,je,H]);let Ve=f(Me),He=HQ(i,Ve,B),Ue=w(Me)||`center`,We=!!Ae.hide?.referenceHidden;$(()=>{C&&_&&Pe&&(Ve!==oe||re&&Ue!==se)&&ne(Me)},[C,re,_,Pe,Me,Ve,Ue,oe,se]);let Ge=q.useMemo(()=>({position:`absolute`,top:Ae.arrow?.y,left:Ae.arrow?.x}),[Ae.arrow]),Ke=Ae.arrow?.centerOffset!==0;return q.useMemo(()=>({positionerStyles:ze,arrowStyles:Ge,arrowRef:ge,arrowUncentered:Ke,side:He,align:Ue,physicalSide:Ve,anchorHidden:We,refs:Ee,context:Ne,isPositioned:Pe,update:je}),[ze,Ge,ge,Ke,He,Ue,Ve,We,Ee,Ne,Pe,je])}function KQ(e){return e!=null&&`current`in e}function qQ(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Q(i),[,o]=q.useState(0),s=mW(YQ).current,c=mW(JQ).current,l=q.useRef(0),u=q.useRef(!0),d=q.useRef(null),f=q.useRef(null),p=Q(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=Q((e,t)=>{c.set(e,t),p()}),h=Q(e=>{c.delete(e),p()}),g=Q(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(!QQ(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&$Q(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=ZQ(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=Q(()=>{let[e,t]=XQ(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))});$(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),$(()=>{u.current&&v()}),$(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=Q(e=>(s.add(e),()=>{s.delete(e)})),b=q.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,J.jsx)(Yq.Provider,{value:b,children:t})}function JQ(){return new Map}function YQ(){return new Set}function XQ(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)=>$Q(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 ZQ(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function QQ(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 $Q(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var e$=q.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,J.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function t$(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=q.useRef(null),o=q.useRef(null),s=bG(r);$(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),$(()=>{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 n$(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),GW(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},mQ(r),i],stateAttributesMapping:tq})}var r$={},i$={},a$=``;function o$(e,t){return y(e)?e:t}function s$(e,t,n){return/hidden|clip/.test(e.getComputedStyle(o$(t,n)).overflowY)}function c$(e){if(typeof document>`u`)return!1;let t=NK(e);return b(t).innerWidth-t.documentElement.clientWidth>0}function l$(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=NK(e),n=t.documentElement,r=t.body,i=o$(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 u$(e){let t=NK(e),n=t.documentElement,r=t.body,i=o$(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 d$(e){let t=NK(e),n=t.documentElement,r=t.body,i=b(n),a=0,o=0,s=!1,c=fG.create();if(Hq&&(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,r$={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},a$=n.style.scrollBehavior,i$={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=o$(n,r);s=l$(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,r$),Object.assign(r.style,i$),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=a$)}function d(){u(),c.request(l)}l();let f=$J(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var f$=new class{lockCount=0;restore=null;timeoutLock=AG.create();timeoutUnlock=AG.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=NK(e),n=t.documentElement,r=t.body,i=b(n);if(s$(i,n,r)){let t=new i.MutationObserver(()=>{s$(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=Lq||!c$(e);this.restore=a?u$(e):d$(e)}};function p$(e=!0,t=null){$(()=>{if(e)return f$.acquire(t)},[e,t])}var m$=20;function h$(e,t,n,r){let[i,a]=q.useState(!1);$(()=>{if(!e||!t||n==null){a(!1);return}let r=NK(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-m$)},[e,t,n]),p$(e&&(!t||i),r)}var g$=q.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=nX,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=HK(),x=TQ(),S=iq(!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??rX):C.type===`menubar`&&(re??=C.context.orientation===`vertical`?`inline-end`:`bottom`,ie??=`start`);let ae=C.type===`context-menu`,V=WQ({anchor:z,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:re,sideOffset:B,align:ie,alignOffset:ee,arrowPadding:ae?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:x,disableAnchorTracking:m,collisionAvoidance:ne,shift:ae?{crossAxis:!(`side`in ne&&ne.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:T,adaptiveOrigin:P,lazyFlip:y?`placement`:!1});q.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,sJ(_q)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[v,T.events,I]),q.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,sJ(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,v]);let oe=jG();q.useEffect(()=>{D||oe.clear()},[D,oe]),q.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,sJ(_q))}):v.setOpen(!1,sJ(_q))}else oe.clear()}}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,v,oe]),q.useEffect(()=>{let e={open:D,nodeId:I,parentNodeId:L,reason:v.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,v,I,L]),t$({store:v,domReference:R,positionerElement:M,open:D});let se={open:D,side:V.side,align:V.align,anchorHidden:V.anchorHidden,nested:C.type===`menu`,instant:N},ce=C.type===`menubar`&&C.context.modal;h$(D&&(ce||O&&F!==`trigger-hover`),k===`touch`,M,A);let le=n$(e,se,{styles:V.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,J.jsxs)(zK.Provider,{value:V,children:[ue&&(0,J.jsx)(e$,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:DQ(!D),cutout:de}),(0,J.jsx)(_X,{id:I,children:(0,J.jsx)(qQ,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:le})})]})}),_$=q.createContext(null);function v$(e){let t=q.useContext(_$);if(t===null&&!e)throw Error($W(5));return t}function y$(e){let t=q.useRef(``),n=q.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:q.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 b$(e,t){let n=q.useRef(e),r=Q(t);$(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function x$(e,t){let{onClick:n,onPointerDown:r}=y$(Q((n,r)=>{(typeof e==`function`?e():e)||t(r||(Lq?`touch`:``))}));return q.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function S$(e){let[t,n]=q.useState(null),r=x$(e,n);return b$(e,t=>{t&&!e&&n(null)}),q.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function C$(e){return e==null?aq:e.type.startsWith(`key`)?mq:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?hq:aq}var w$={...EZ,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=EZ.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>Hq&&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`&&!EZ.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`)}},T$=class extends _Z{constructor(e,t,n=!1){let r=new ZX,i=D$(r,t,n,e);super(i,E$(r),w$),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 E$(e){return{positionerRef:q.createRef(),popupRef:q.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:q.createRef(),beforeTriggerFocusGuardRef:q.createRef(),beforeContentFocusGuardRef:q.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function D$(e,t,n=!1,r){return{...bZ(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:DW,inputProps:DW,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new dX,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:DW,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var O$=q.createContext(null);function k$(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function A$(e,t){return e===`list-navigation`||k$(e,t)}var j$=oZ(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=iq(!0),C=HK(!0),w=v$(!0),T=C?.store,E=C?.virtualFocus??!1,D=q.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=rJ(),k=rJ(),[A,j]=q.useState(void 0),M=(A??k)||void 0,N=mX(),P=D.type===`menu`?D.store:void 0,F=(n??o)&&P?.state.transitionStatus===`starting`,I=mW(()=>F?P?.state.instantType:void 0).current,L=mW(()=>{let e=new T$({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=gX(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`),ae=L.useState(`parent`),V=L.useState(`activeIndex`),oe=L.useState(`keyboardOpen`),se=L.useState(`payload`),ce=L.useState(`floatingParentNodeId`),le=q.useRef(null),ue=q.useRef(ae.type!==`context-menu`),de=jG(),fe=q.useRef(!0),pe=jG(),me=ce!=null,{openMethod:he,triggerProps:ge}=S$(B);L.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:ae.type===void 0?c:void 0,openMethod:he,rootId:O}),qX(L);let{forceUnmount:_e,transitionStatus:ve}=JX(B,L,()=>{L.set(`allowMouseEnter`,!1)},F),ye=bG(L.context.popupRef);q.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]),$(()=>{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]),q.useEffect(()=>{B||(le.current=null),ae.type===`context-menu`&&(B?de.start(500,()=>{ue.current=!0}):(de.clear(),ue.current=!1))},[de,B,ae.type]),$(()=>{!B&&!ne&&L.set(`hoverEnabled`,!0)},[B,ne,L]);let be=Q((e,t)=>{let n=t.reason;if(!e&&!L.select(`open`)||B===e&&t.trigger===ee&&ie===n)return;let i=WX(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=UX(L.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&A$(n,a),s.instantType=ae.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:k$(n,a)?`click`:o?`dismiss`:void 0,L.update(s)}),xe=FX({popupStore:L,floatingRootContext:L.state.floatingRootContext,floatingId:M,nested:N!=null,onOpenChange:be}),Se=xe.context.events;$(()=>{let e=({open:e,eventDetails:t})=>be(e,t);return Se.on(`setOpen`,e),()=>{Se?.off(`setOpen`,e)}},[Se,be]),$(()=>L.subscribeToParentMenu(),[L]);let Ce=q.useCallback(()=>{L.setOpen(!1,sJ(xq))},[L]);q.useImperativeHandle(d,()=>({unmount:_e,close:Ce}),[_e,Ce]);let we;ae.type===`context-menu`&&(we=ae.context),q.useImperativeHandle(we?.positionerRef,()=>te,[te]),q.useImperativeHandle(we?.actionsRef,()=>({setOpen:be}),[be]);let Te=PX(xe,{enabled:!re,bubbles:{escapeKey:f&&ae.type===`menu`},outsidePress(){return ae.type!==`context-menu`||le.current?.type===`contextmenu`||ue.current},externalTree:me?R:void 0}),H=AQ(),Ee=GZ(xe,{enabled:!re,listRef:L.context.itemDomElements,activeIndex:V,virtual:v,nested:ae.type===`menubar`||!v&&ae.type!==void 0,parentOrientation:ae.type===`menubar`?ae.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:EW,onNavigate(e,t){L.setActiveIndex(e,C$(t),t?.nativeEvent)},openOnArrowKeyDown:ae.type!==`context-menu`&&!(v&&_),externalTree:!v&&me?R:void 0,nestedReturnFocusRef:P?.context.virtualFocusRef,focusItemOnHover:g,resetOnPointerLeave:x}),De=q.useCallback(e=>{L.context.typingRef.current=e},[L]),Oe=KZ(xe,{enabled:!re&&!v,listRef:L.context.itemLabels,elementsRef:L.context.itemDomElements,activeIndex:V,resetMs:500,onMatch:(e,t)=>{B&&e!==V&&L.setActiveIndex(e,mq,t.nativeEvent)},onTyping:De}),ke=Q(a),Ae=q.useRef(-1),je=Q(()=>{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=aq,L.context.highlightEvent=void 0,a&&ke(t,cJ(r,i,{label:t===void 0?void 0:L.context.itemLabels.current[n]??void 0}))});$(()=>{je()},[V,je]);let Me=q.useMemo(()=>{if(!v)return Ee.reference;if(!Ee.trigger)return DW;let{onFocus:e,...t}=Ee.trigger;return t},[v,Ee.reference,Ee.trigger]);L.useSyncedValue(`inputProps`,v?Ee.reference??DW:DW);let Ne=q.useMemo(()=>{let e=MW(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=q.useMemo(()=>{let e=MW(Ee.trigger,Te.trigger,ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[Ee.trigger,Te.trigger,ge]);mW(()=>(L.update({inactiveTriggerProps:Pe}),null)),YX(L,{floatingRootContext:xe,activeTriggerProps:Ne,inactiveTriggerProps:Pe,popupProps:q.useMemo(()=>MW(LX,{onMouseMove(){L.set(`allowMouseEnter`,!0),ae.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),[ae.type,L,Oe.floating,Ee.floating,Te.floating]),itemProps:Ee.item??DW});let Fe=q.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,J.jsxs)(VK.Provider,{value:Fe,children:[p&&(0,J.jsx)(BX,{handle:p,store:L}),Ie]});return(ae.type===void 0||ae.type===`context-menu`)&&(Le=(0,J.jsx)(vX,{externalTree:R,children:Le})),Le});function M$(e){let t=q.useContext(O$);if(t===null)return(0,J.jsx)(j$,{...e});let n=t.Root;return(0,J.jsx)(O$.Provider,{value:null,children:(0,J.jsx)(n,{...t.options,...e})})}var N$={};function P$(e){HK();let t=q.useContext(O$);if(t!==null){let n=t.SubmenuRoot;return(0,J.jsx)(O$.Provider,{value:null,children:(0,J.jsx)(n,{...t.options,...e})})}return(0,J.jsx)(hQ.Provider,{value:N$,children:(0,J.jsx)(j$,{...e,isSubmenu:!0})})}var F$=5;function I$(e,t){let n=L$(t);return e.clientX>=n.left-F$&&e.clientX<=n.right+F$&&e.clientY>=n.top-F$&&e.clientY<=n.bottom+F$}function L$(e){let t=e.getBoundingClientRect(),n=b(e);if(Wq)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 R$(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=jK(),{ref:i,index:a}=Zq(e),o=n===a,s=q.useRef(null),c=hW(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 z$(e){let{render:t,className:n,style:r,state:i=DW,props:a=EW,refs:o=EW,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=R$({metadata:s});return GW(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function B$(e){if(i(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!R(e))return B$(c(e))}function V$(e,t){function n(n,r,i){let a=n.currentTarget;ud.flushSync(()=>{e.setOpen(!1,sJ(dq,n.nativeEvent,a))}),PY(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&&FY(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function H$(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=q.useRef(!1);return q.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,NK(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:DW,[t,n,r])}var U$=sZ(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=HK(!0),h=DZ(d)??m?.store;if(!h)throw Error($W(85));let g=rJ(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),x=q.useRef(null),S=G$(),C=jK(!0),w=hX(),T=q.useMemo(()=>w??new dX,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=KX(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:gX(T),floatingParentNodeId:mX(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=FK({disabled:A,native:o});q.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=q.useRef(null),P=jG(),F=Q(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;EJ(N.current,t)||EJ(h.select(`positionerElement`),t)||t===N.current||t!=null&&B$(t)===h.select(`rootId`)||I$(e,N.current)||T.events.emit(`close`,{domEvent:e,reason:gq})});q.useEffect(()=>{let e=NK(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=RZ(v,{enabled:(c??I)&&!A&&(!O||I&&!D),handleClose:eQ({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=W$(y,h.select(`lastOpenChangeReason`)),z=OX(v,{enabled:!A,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&R}),B=AZ(v,{enabled:!A&&I}),ee=H$({open:y,enabled:O,mouseDownAction:`open`}),te=q.useMemo(()=>MW(B.reference,z.reference),[B.reference,z.reference]),ne=h.useState(`triggerProps`,D),re=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:ie,handleFocusTargetFocus:ae}=V$(h,x),V={disabled:A,open:y},oe=[N,t,M,E,x],se=[te,L??DW,ne,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),NK(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},re,O?{role:`menuitem`}:{},ee,p,j],ce=GW(`button`,e,{enabled:!O,stateAttributesMapping:eq,state:V,ref:oe,props:se});return O?(0,J.jsx)(z$,{tag:`button`,render:n,className:r,style:i,state:V,refs:oe,props:se,stateAttributesMapping:eq}):y?(0,J.jsxs)(q.Fragment,{children:[(0,J.jsx)(oY,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:ie},`${g}-pre-focus-guard`),(0,J.jsx)(q.Fragment,{children:ce},g),(0,J.jsx)(oY,{ref:h.context.triggerFocusTargetRef,onFocus:ae},`${g}-post-focus-guard`)]}):(0,J.jsx)(q.Fragment,{children:ce},g)});function W$(e,t){let n=jG(),[r,i]=q.useState(!1);return $(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function G$(){let e=v$(!0);return q.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function K$(e){let[t,n]=q.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var q$=q.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return GW(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function J$(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Y$={"aria-expanded":void 0},X$=q.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=HK(!0);if(p?.parent.type!==`menu`)throw Error($W(37));let m=BK(),h=gQ(),{store:g,parentVirtualFocus:_}=p,v=p.parent.store,y=Zq({guess:!0,label:a}),b=rJ(o),x=g.useState(`open`),S=q.useRef(!1),C=g.useState(`positionerElement`),w=g.useState(`floatingRootContext`),T=g.useState(`floatingTreeRoot`),E=g.useState(`triggerPopupId`,b),D=HX(b,g),O=Q(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=q.useRef(null),A=q.useCallback(e=>{k.current=e,g.set(`activeTriggerElement`,e)},[g]);$(()=>(O(k.current),()=>O(null)),[O,b,g]),$(()=>{if(!x||!C)return;function e(e){OJ(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=q.useMemo(()=>({type:`submenu-trigger`,setActive(e){v.select(`highlightItemOnHover`)&&v.setActiveIndex(y.index,hq,e)}}),[v,y.index]),{getItemProps:L,itemRef:R}=Jq({closeOnClick:!1,disabled:N,highlighted:F,id:b,store:g,typingRef:v.context.typingRef,nativeButton:s,itemMetadata:I,nodeId:m?.context.nodeId}),z=RZ(w,{enabled:g.useState(`hoverEnabled`)&&c&&!N,handleClose:eQ({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=OX(w,{enabled:!N,event:`mousedown`,toggle:!0,ignoreMouse:c,stickIfOpen:c}).reference??DW,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&&Uq;return GW(`div`,e,{state:te,stateAttributesMapping:$K,props:[B,z,ee,h?.onTriggerKeyDown?{onKeyDown:h.onTriggerKeyDown}:void 0,P,ie?Y$:void 0,{"aria-controls":E,tabIndex:_||!(x||F)?-1:0,onFocus(e){g.select(`open`)&&S.current&&(S.current=!1,g.setOpen(!1,sJ(dq,e.nativeEvent)))},onBlur(){F&&v.setActiveIndex(null,aq)}},f,L],ref:[t,y.ref,R,O,A]})}),Z$=q.forwardRef(function(e,t){let n=Oq(e,t,`submenu-trigger`);if(!n.visible)return null;let r=n.props?MW(n.props,e):e;return(0,J.jsx)(X$,{...r,ref:n.ref})});function Q$(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function $$(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function e1(e){return $$(e?.[0])}function t1(e){return e1(e)?e.flatMap(e=>e.items):e}function n1(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(e1(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 r1(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 Q$(e)}function i1(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Q$(e.value):Q$(e)}function a1(e,t,n){function r(){return r1(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=t1(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 o1(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,J.jsx)(q.Fragment,{children:a1(r,t,n)},i)),e),[])}var s1=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),c1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),l1=e=>{let t=c1(e);return t.charAt(0).toUpperCase()+t.slice(1)},u1=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),d1=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},f1={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`},p1=(0,q.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,q.createElement)(`svg`,{ref:c,...f1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:u1(`lucide`,i),...!a&&!d1(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,q.createElement)(e,t)),...Array.isArray(a)?a:[a]])),m1=(e,t)=>{let n=(0,q.forwardRef)(({className:n,...r},i)=>(0,q.createElement)(p1,{ref:i,iconNode:t,className:u1(`lucide-${s1(l1(e))}`,`lucide-${e}`,n),...r}));return n.displayName=l1(e),n},h1=m1(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),g1=m1(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),_1=m1(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),v1=m1(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),y1=`data-valid`,b1=`data-invalid`,x1={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},S1={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},C1={valid(e){return e===null?null:e?{[y1]:``}:{[b1]:``}}},w1={invalid:void 0,name:void 0,validityData:{state:x1,errors:[],error:``,value:``,initialValue:null},setValidityData:TW,disabled:void 0,setTouched:TW,setDirty:TW,setFilled:TW,setFocused:TW,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:S1,registerFieldControl:TW,validation:{getValidationProps:(e,t=DW)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:TW,getInputControl:()=>null,commit:async()=>{},change:TW}},T1=q.createContext(w1);function E1(e=!0){let t=q.useContext(T1);if(t.setValidityData===TW&&!e)throw Error($W(28));return t}var D1=q.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:TW,validationMode:`onSubmit`,submitCountRef:{current:0}});function O1(){return q.useContext(D1)}var k1=q.createContext({controlId:void 0,registerControlId:TW,resetControlId:TW,labelId:void 0,setLabelId:TW,messageIds:[],setMessageIds:TW,getDescriptionProps:e=>e});function A1(){return q.useContext(k1)}function j1(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=A1(),o=rJ(),s=mW(()=>Symbol()),c=q.useRef(!1),l=q.useRef(!1),u=Q(()=>{c.current&&i!==TW&&(c.current=!1,i(s.current,void 0))});return $(()=>{if(!n||i===TW){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]),$(()=>u,[u]),(n?r:void 0)??t??o}function M1(e,t,n){let{setFocused:r,focusOwnerRef:i}=E1(),a=Q(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return $(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function N1(e,t,n,r,i=!0,a){let{registerFieldControl:o}=E1(),s=mW(()=>Symbol());$(()=>{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]),$(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var P1=q.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}=E1(),{clearErrors:S,elementRef:C,submitCountRef:w}=O1(),T=h||s,E=m??a,D={...p,disabled:T},{labelId:O}=A1(),k=j1({id:i}),A=o!==void 0,j=o==null?void 0:String(o),M=Q(()=>x.inputRef.current?.value);N1(x.inputRef,k,j,M,!T,a),$(()=>{let e=j??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[j,l,x.inputRef,y]),b$(j,()=>{j!==void 0&&(S(E),_(j!==(v.initialValue??``)),x.change(j))});let N=q.useRef(null),P=M1(T,N),F=jG();return GW(`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=sJ(aq,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:C1})}),F1=q.forwardRef(function(e,t){return(0,J.jsx)(P1,{ref:t,...e})}),I1=q.createContext(void 0);function L1(e){let t=q.useContext(I1);if(t===void 0&&!e)throw Error($W(47));return t}var R1={...EZ,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!EZ.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&EZ.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>EZ.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},z1=class extends _Z{constructor(e,t,n){let r=new ZX;super(B1(e,r,t,n),V1(r),R1)}setOpen=(e,t)=>{let n=t.reason===sq,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=WX(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=UX(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}),ud.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function B1(e,t,n,r=!1){let i={...bZ(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 V1(e){return{popupRef:q.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:q.createRef(),beforeTriggerFocusGuardRef:q.createRef(),beforeContentFocusGuardRef:q.createRef(),stickIfOpenTimeout:new AG,stickIfOpen:!0,triggerElements:e}}var H1=oZ(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=W1(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),XX(u,d),qX(u);let{forceUnmount:m}=JX(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),q.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),q.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,sJ(xq))}),[m,u]);let h=d||f||s!=null;return(0,J.jsxs)(I1.Provider,{value:u,children:[s&&(0,J.jsx)(BX,{handle:s,store:u}),h&&(0,J.jsx)(G1,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function U1(e){return L1(!0)?(0,J.jsx)(H1,{props:e}):(0,J.jsx)(vX,{children:(0,J.jsx)(H1,{props:e})})}function W1(e,t){let n=zX((e,n)=>new z1(t,e,n));return q.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function G1({store:e,modal:t}){let n=PX(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return YX(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var K1=sZ(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=L1(!0),h=DZ(s)??m;if(!h)throw Error($W(74));let g=rJ(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=q.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=KX(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=RZ(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:eQ(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=OX(v,{stickIfOpen:Q(()=>h.context.stickIfOpen)}),k=x$(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=FK({disabled:a,native:o}),N={open(e){return w?eq.open(e):$K.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:F}=V$(h,x),I=GW(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[tX]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),L=(0,J.jsx)(q.Fragment,{children:I},g);return E?(0,J.jsxs)(q.Fragment,{children:[(0,J.jsx)(oY,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),L,(0,J.jsx)(oY,{ref:h.context.triggerFocusTargetRef,onFocus:F})]}):L}),q1=q.createContext(void 0);function J1(){let e=q.useContext(q1);if(e===void 0)throw Error($W(45));return e}var Y1=q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return L1().useState(`mounted`)||n?(0,J.jsx)(q1.Provider,{value:n,children:(0,J.jsx)(lX,{ref:t,...r})}):null}),X1=q.createContext(void 0);function Z1(){let e=q.useContext(X1);if(!e)throw Error($W(46));return e}var Q1=q.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=rX,..._}=e,v=L1(),y=J1(),b=gX(),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=WQ({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`)});t$({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;h$(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=n$(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,J.jsxs)(X1.Provider,{value:j,children:[S&&M&&(0,J.jsx)(e$,{inert:DQ(!C),cutout:T}),(0,J.jsx)(_X,{id:b,children:P})]})}),$1=q.createContext(void 0);function e0(){let[e,t]=q.useState(0),n=Q(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:q.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var t0=q.forwardRef(function(e,t){let{render:n,className:r,style:a,initialFocus:o,finalFocus:s,...c}=e,l=L1(),u=Z1(),d=nQ(!0)!=null,{context:f,hasClosePart:p}=e0(),m=l.useState(`open`),h=l.useState(`openMethod`),g=l.useState(`instantType`),_=l.useState(`transitionStatus`),v=l.useState(`popupProps`),y=l.useState(`titleElementId`),b=l.useState(`descriptionElementId`),x=l.useState(`modal`),S=l.useState(`mounted`),C=l.useState(`openChangeReason`),w=l.useState(`activeTriggerElement`),T=l.useState(`floatingRootContext`),E=T.useState(`floatingId`),D=l.useState(`disabled`),O=l.useState(`openOnHover`),k=l.useState(`closeDelay`);xG({open:m,ref:l.context.popupRef,onComplete(){m&&l.context.onOpenChangeComplete?.(!0)}}),IZ(T,{enabled:O&&!D,closeDelay:k});let A=o===void 0?RX(l.context.popupRef):o,j=x!==!1&&p;l.useSyncedValue(`focusManagerModal`,j);let M=l.useStateSetter(`popupElement`),N=GW(`div`,e,{state:{open:m,side:u.side,align:u.align,instant:g,transitionStatus:_},ref:[t,l.context.popupRef,M],props:[v,{id:E,role:`dialog`,...LX,"aria-labelledby":y,"aria-describedby":b,onKeyDown(e){d&&sQ.has(e.key)&&e.stopPropagation()}},mQ(_),c],stateAttributesMapping:nq});return(0,J.jsx)(DX,{context:T,openInteractionType:h,modal:j,disabled:!S||C===`trigger-hover`,initialFocus:A,returnFocus:s,restoreFocus:`popup`,getInsideElements:()=>[l.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:i(w)?w:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,J.jsx)($1.Provider,{value:f,children:N})})});function n0(e){let t=q.useRef(!0);t.current&&(t.current=!1,e())}var r0=q.createContext(void 0),i0=q.createContext(void 0);function a0(){let e=q.useContext(r0);if(e===void 0)throw Error($W(60));return e}function o0(){let e=q.useContext(i0);if(e===void 0)throw Error($W(61));return e}function s0(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 c0=(e,t)=>Object.is(e,t);function l0(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function u0(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!s0(e,t,(e,t)=>l0(e,t,n)):e!==t}function d0(e,t,n){return e?e.some(e=>e!==void 0&&l0(t,e,n)):!1}function f0(e,t,n){return e?e.findIndex(e=>e!==void 0&&l0(e,t,n)):-1}function p0(e,t){if(t!==c0)return n=>d0(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 m0(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(p0(t,n)):f0(e,t,n);return i===-1?null:i}function h0(e,t,n,r,i,a){return d0(r,t,i)?a!=null&&e>a&&d0(r,n[a],i)?a:e:e===a?m0(n,r,i,!0):a}function g0(e,t,n){return e.filter(e=>!l0(t,e,n))}var _0={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:i1(t,r)!==``},hasNullItemLabel:(e,t)=>t?n1(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=>l0(t,e,n)):l0(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 v0(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function y0(e,t){return Math.max(0,e-t)}function b0(e,t){if(t<=0)return 0;let n=v0(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 x0(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=c0,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=O1(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=E1(),F=j1({id:t}),I=M||d,L=j??c,[R,z]=Cq({controlled:n,default:y?r??EW:r,name:`Select`,state:`value`}),[B,ee]=Cq({controlled:a,default:o,name:`Select`,state:`open`}),te=q.useRef([]),ne=q.useRef([]),re=q.useRef(null),ie=q.useRef(null),ae=q.useRef(0),V=q.useRef(null),oe=q.useRef([]),se=q.useRef(!1),ce=q.useRef(null),le=q.useRef(null),ue=q.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),de=q.useRef(!1),fe=q.useRef(R),{openMethod:pe,triggerProps:me}=S$(B),he=mW(()=>new _Z({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:DW,triggerProps:DW,itemRoot:{props:DW,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:TW,setOpen:TW,handleScrollArrowVisibility:TW,onOpenChangeComplete:TW,listRef:te,popupRef:re,scrollHandlerRef:ie,scrollArrowsMountedCountRef:ae,valueRef:V,valuesRef:oe,labelsRef:ne,typingRef:se,selectionRef:ue,firstItemTextRef:ce,selectedItemTextRef:le,alignItemWithTriggerActiveRef:de,initialValueRef:fe},_0)).current,[ge,_e]=q.useState(!1),{mounted:ve,transitionStatus:ye,forceUnmount:be}=IX({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=K$(pe),H=pe??Te,Ee=q.useMemo(()=>y?``:i1(R,x),[y,R,x]),De=q.useMemo(()=>y&&Array.isArray(R)?R.map(e=>i1(e,x)):i1(R,x),[y,R,x]);N1(tY(Ce),F,R,Q(()=>De),!I,c);let Oe=y?Array.isArray(R)&&R.length>0:R!=null&&Ee!==``;$(()=>{A(Oe)},[Oe,A]),$(function(){let e=m0(oe.current,R,S,y);e===null&&(le.current=null),!B&&he.set(`selectedIndex`,e)},[y,B,R,S,he]),b$(R,()=>{T(L),E(u0(R,k.initialValue,S)),N.change(R)});let ke=Q((e,t)=>{let n=t,r=WX(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)))});q.useImperativeHandle(h,()=>({unmount:be,close:()=>{he.state.open&&ke(!1,sJ(xq))}}),[be,ke,he]);let Ae=Q((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),je=Q(e=>{let t=y0(e.scrollHeight,e.clientHeight),n=b0(e.scrollTop,t),r=n>0,i=n<t;he.set(`scrollUpArrowVisible`,r),he.set(`scrollDownArrowVisible`,i)}),Me=OZ({open:B,onOpenChange:ke,elements:{reference:Ce,floating:we}}),Ne=OX(Me,{enabled:!I,event:`mousedown`}),Pe=PX(Me),Fe=GZ(Me,{enabled:!I,listRef:te,activeIndex:xe,selectedIndex:Se,disabledIndices:EW,onNavigate(e){(e!==null||B)&&he.set(`activeIndex`,e)},focusItemOnHover:C}),Ie=KZ(Me,{enabled:!I&&(B||!f&&!y),listRef:ne,activeIndex:xe,selectedIndex:Se,disabledIndices:e=>J$(te.current[e]),onMatch(e){B?he.set(`activeIndex`,e):Ae(oe.current[e],sJ(aq))},onTyping(e){se.current=e}}),Le=q.useMemo(()=>MW(Ie.reference,Fe.reference,Pe.reference,Ne.reference,me),[Ne.reference,Ie.reference,Fe.reference,Pe.reference,me]),Re=q.useMemo(()=>MW(LX,Ie.floating,Fe.floating,Pe.floating),[Ie.floating,Fe.floating,Pe.floating]),ze=Fe.item??DW,Be=q.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`,_),n0(()=>{he.update({popupProps:Re,triggerProps:Le,itemRoot:Be})}),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:Be,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:H});let Ve=hW(g,N.inputRef),He=y?void 0:L,Ue=q.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=i1(e,x);return(0,J.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,J.jsxs)(r0.Provider,{value:he,children:[(0,J.jsx)(i0.Provider,{value:Me,children:w}),(0,J.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=sJ(aq,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=oe.current.findIndex(t=>i1(t,x).toLowerCase()===e||r1(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&&He==null?`${F}-hidden-input`:void 0,form:l,name:He,autoComplete:u,value:Ee,disabled:I,required:p&&!(y&&Oe),readOnly:f,ref:Ve,style:L?aY:iY,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ue]})}function S0(e,t){return e??t}var C0=`data-popup-side`,w0=400,T0={...eq,...C1,popupSide:e=>e?{[C0]:e}:null,value:()=>null},E0=q.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}=E1(),{labelId:m}=A1(),h=a0(),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=S0(m,O);j1({id:i});let N=tY(w),P=q.useRef(null),F=M1(y,P),{getButtonProps:I,buttonRef:L}=FK({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=jG(),B=jG(),ee=jG();q.useEffect(()=>{if(b)return ee.start(w0,()=>{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=MW(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??UJ(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,sJ(aq,e.nativeEvent)),z.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){EJ(w,e.relatedTarget)||(l(!0),F(!1),u===`onBlur`&&d.commit(S))},onMouseDown(e){if(b)return;let t=NK(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;EJ(P.current,t)||EJ(N.current,t)||I$(e,P.current)||h.context.setOpen(!1,sJ(gq,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 GW(`button`,e,{ref:[t,P,L,R],state:re,stateAttributesMapping:T0,props:ne})}),D0={value:()=>null},O0=q.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=a0(),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)?o1(l,u,d):a1(l,u,d)),GW(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:D0})}),k0=q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return GW(`span`,e,{state:{open:a0().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:$K})}),A0=q.forwardRef(function(e,t){let n=a0(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,J.jsx)(lX,{ref:t,...e}):null}),j0=q.createContext(void 0);function M0(){let e=q.useContext(j0);if(!e)throw Error($W(59));return e}function N0(e,t){e&&Object.assign(e.style,t)}var P0={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},F0={position:`fixed`},I0=q.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=nX,style:_,...v}=e,y=a0(),b=o0(),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=q.useRef(null),j=q.useRef(null),[M,N]=q.useState(h),P=S&&M&&T!==`touch`;!S&&M!==h&&N(h),q.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>P),h$((P||C)&&x,T===`touch`,E,D);let F=WQ({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?F0:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};$(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=n$(e,R,{styles:L,transitionStatus:k,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x}),B=q.useRef(0),ee=Q(e=>{if(y.context.valuesRef.current.length===0)return;let t=B.current;B.current=e.size;let n=sJ(aq);if(t!==0&&!y.state.multiple&&w!==null&&f0(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&f0(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=>f0(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:``};N0(E,e),N0(y.context.popupRef.current,e)}}),te=q.useMemo(()=>({...F,side:I,alignItemWithTriggerActive:P,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:A,scrollDownArrowRef:j}),[F,I,P,N]);return(0,J.jsx)(qQ,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:ee,children:(0,J.jsxs)(j0.Provider,{value:te,children:[S&&C&&(0,J.jsx)(e$,{inert:DQ(!x),cutout:D}),z]})})}),L0=`base-ui-disable-scrollbar`,R0={className:L0,getElement(e){return(0,J.jsx)(`style`,{nonce:e,href:L0,precedence:`base-ui:low`,children:`.${L0}{scrollbar-width:none}.${L0}::-webkit-scrollbar{display:none}`})}},z0=q.createContext(void 0),B0={disableStyleElements:!1};function V0(){return q.useContext(z0)??B0}var H0=`--transform-origin`,U0={...tq,...wG},W0=q.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=a0(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=o0(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=M0(),_=nQ(!0)!=null,v=AQ(),{nonce:y,disableStyleElements:x}=V0(),S=s.useState(`id`),C=s.useState(`open`),w=s.useState(`openMethod`),T=s.useState(`mounted`),E=s.useState(`popupProps`),D=s.useState(`transitionStatus`),O=s.useState(`triggerElement`),k=s.useState(`positionerElement`),A=s.useState(`listElement`),j=q.useRef(!1),M=q.useRef(!1),N=q.useRef({}),P=pG(),F=Q(e=>{if(!k||!s.context.popupRef.current||!M.current)return;let t=k.style.top===`0px`,n=k.style.bottom===`0px`;if(j.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=q0(k),i=J0(k.getBoundingClientRect().height,`y`,r),a=NK(k),o=b(k),c=o.getComputedStyle(k),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=G0(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=K0(e),g=null,_=e=>{k.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=v0(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(j.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 x=Math.ceil(y);if(x!==0&&_(x),g!=null){let t=v0(g,0,K0(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}x>=f-1&&(j.current=!0),s.context.handleScrollArrowVisibility(e)});q.useImperativeHandle(s.context.scrollHandlerRef,()=>F,[F]),xG({open:C,ref:s.context.popupRef,onComplete(){C&&s.context.onOpenChangeComplete(!0)}});let I={open:C,transitionStatus:D,side:f,align:p};$(()=>{k&&s.context.popupRef.current&&!Object.keys(N.current).length&&(N.current={top:k.style.top||`0`,left:k.style.left||`0`,right:k.style.right,height:k.style.height,bottom:k.style.bottom,minHeight:k.style.minHeight,maxHeight:k.style.maxHeight,marginTop:k.style.marginTop,marginBottom:k.style.marginBottom})},[s,k]),$(()=>{C||m||(M.current=!1,j.current=!1,N0(k,N.current))},[C,m,k]),$(()=>{let e=s.context.popupRef.current;if(!C||!O||!k||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(M.current=!0,e.style.removeProperty(H0),!m){P.request(()=>s.context.handleScrollArrowVisibility(A||e));return}let t=Z0(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=b(k),i=r.getComputedStyle(k),a=r.getComputedStyle(e),o=NK(O),c=q0(O),l=Y0(O.getBoundingClientRect(),c),d=Y0(k.getBoundingClientRect(),c),f=l.height,p=A||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,y=parseFloat(i.marginBottom)||10,x=parseFloat(i.minHeight)||100,S=G0(a),C=o.documentElement.clientHeight-_-y,w=o.documentElement.clientWidth,T=C-l.bottom+f,E,D=v===`rtl`?l.right-d.width:l.left,M=0;if(t&&n){let e=Y0(n.getBoundingClientRect(),c);E=Y0(t.getBoundingClientRect(),c),D=d.left+(v===`rtl`?e.right-E.right:e.left-E.left);let r=e.top-l.top+e.height/2;M=E.top-d.top+E.height/2-r}let P=T+M+y+h,F=Math.min(C,P),I=C-_-y,L=P-F,R=w-5;k.style.left=`${v0(D,5,R-d.width)}px`,k.style.height=`${F}px`,k.style.maxHeight=`none`,k.style.marginTop=`${_}px`,k.style.marginBottom=`${y}px`,e.style.height=`100%`;let z=K0(p),B=L>=z-1;B&&(F=Math.min(C,d.height)-(L-z));let ee=l.top<20||l.bottom>C-20||Math.ceil(F)+1<Math.min(m,x),te=(r.visualViewport?.scale??1)!==1&&Hq;if(ee||te){N0(k,N.current),g(!1);return}let ne=Math.max(x,F);if(B){let e=Math.max(0,C-P);k.style.top=d.height>=I?`0`:`${e}px`,k.style.height=`${F}px`,p.scrollTop=K0(p)}else k.style.bottom=`0`,p.scrollTop=L;if(E){let t=d.top,n=d.height,r=E.top+E.height/2,i=v0(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(H0,`50% ${i}%`)}(ne===C||F>=S)&&(j.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,C,k,O,m,g,P,A,u,v,h]),q.useEffect(()=>{if(!m||!k||!C)return;let e=b(k);function t(e){s.context.setOpen(!1,sJ(Sq,e))}return $J(e,`resize`,t)},[s,m,k,C]);let L={...A?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${S}-list`},onKeyDown(e){_&&sQ.has(e.key)&&e.stopPropagation()},onScroll(e){A||F(e.currentTarget)},...m&&{style:A?{height:`100%`}:P0},className:!A&&m?R0.className:void 0},R=GW(`div`,e,{ref:[t,s.context.popupRef],state:I,stateAttributesMapping:U0,props:[E,L,mQ(D),o]});return(0,J.jsxs)(q.Fragment,{children:[!x&&R0.getElement(y),(0,J.jsx)(DX,{context:d,modal:!1,disabled:!T,openInteractionType:w,returnFocus:a,restoreFocus:!0,children:R})]})});function G0(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function K0(e){return y0(e.scrollHeight,e.clientHeight)}function q0(e){return s.getScale(e)}function J0(e,t,n){return e/n[t]}function Y0(e,t){return j({x:J0(e.x,`x`,t),y:J0(e.y,`y`,t),width:J0(e.width,`x`,t),height:J0(e.height,`y`,t)})}var X0=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Z0(e){let{style:t}=e,n={};for(let[e,r]of X0)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of X0){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Q0=q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=a0(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=M0(),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:P0},className:u&&d!==`touch`?R0.className:void 0};return GW(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})}),$0=q.createContext(void 0);function e2(){let e=q.useContext($0);if(!e)throw Error($W(57));return e}var t2=q.memo(q.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=q.useRef(null),d=Zq({guess:!0,label:o,textRef:u}),f=a0(),{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=q.useRef(null);$(()=>{let e=f.context.valuesRef.current;return e[C]=a,()=>{delete e[C]}},[C,a,f]),$(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=h0(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&l0(a,e,_),r&&(n=C)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[C,m,_,f,a]);let T=q.useRef(`mouse`),E=q.useRef(!1),{getButtonProps:D,buttonRef:O}=FK({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?g0(n,a,_):[...n,a];f.context.setValue(r,sJ(uq,e))}else f.context.setValue(a,sJ(uq,e)),f.context.setOpen(!1,sJ(uq,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&&xJ(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=GW(`div`,e,{ref:[O,t,d.ref,w],state:k,props:[p,M,l,D]}),P=q.useMemo(()=>({selected:x,index:C,textRef:u,selectedByFocus:S}),[x,C,u,S]);return(0,J.jsx)($0.Provider,{value:P,children:N})})),n2=q.memo(q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=q.useRef(null),{transitionStatus:l,setMounted:u}=TG(o),d=GW(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:wG});return xG({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),r2=q.forwardRef(function(e,t){let{selected:n}=e2();return e.keepMounted||n?(0,J.jsx)(n2,{...e,selected:n,ref:t}):null}),i2=q.memo(q.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=e2(),a=a0(),{render:o,className:s,style:c,...l}=e;return GW(`div`,e,{ref:[q.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})})),a2=q.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=a0(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=M0(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=jG(),v=c?f:d,{mounted:y,transitionStatus:b,setMounted:x}=TG(g);$(()=>(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]),xG({open:g,ref:v,onComplete(){g||x(!1)}});let S=GW(`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=y0(e.scrollHeight,e.clientHeight),r=b0(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=o2(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:wG});return y||o?S:null});function o2(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?b0(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?b0(l.offsetTop+l.offsetHeight-r+i,a):a}var s2=q.forwardRef(function(e,t){return(0,J.jsx)(a2,{...e,ref:t,direction:`down`})}),c2=q.forwardRef(function(e,t){return(0,J.jsx)(a2,{...e,ref:t,direction:`up`})}),l2=q.createContext(void 0);function u2(){let e=q.useContext(l2);if(e===void 0)throw Error($W(64));return e}var d2=`data-activation-direction`,f2={tabActivationDirection:e=>({[d2]:e})},p2=q.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=q.useRef([]),[f,p]=q.useState(()=>new Map),[m,h]=Cq({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=q.useState(()=>new Map),y=q.useRef(void 0),b=q.useCallback(e=>m2(_,e),[_]),[x,S]=q.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:C,tabActivationDirection:w}=x,T=w,E=!1;C!==m&&(T=h2(C,m,a,_),E=C!=null&&m!=null&&b(m)==null);let D=E?C:m,O=C!==D||w!==T;$(()=>{O&&S({previousValue:D,tabActivationDirection:T})},[D,O,T]);let k=Q((e,t)=>{t.activationDirection=h2(m,e,a,_),i?.(e,t),!t.isCanceled&&h(()=>e)}),A=Q((e,t)=>{i?.(e,sJ(t,void 0,void 0,{activationDirection:`none`}))}),j=Q((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=q.useCallback(e=>f.get(e),[f]),N=q.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),P=q.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=q.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),I=q.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),L=q.useRef(!u),R=q.useRef(r),z=q.useRef(u),B=q.useRef(!1);$(()=>{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,yq);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=yq;r?i=bq:t&&(i=vq),e(n,i)}else r&&F!=null&&(A(m,bq),L.current=!1)},[I,g,A,F,h,_,m]);let ee=GW(`div`,e,{state:{orientation:a,tabActivationDirection:T},ref:t,props:l,stateAttributesMapping:f2});return(0,J.jsx)(l2.Provider,{value:P,children:(0,J.jsx)(qQ,{elementsRef:d,children:ee})})});function m2(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function h2(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=m2(r,e),c=m2(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 g2=`data-composite-item-active`,_2=q.createContext(void 0);function v2(){let e=q.useContext(_2);if(e===void 0)throw Error($W(65));return e}var y2=q.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}=u2(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:_}=v2(),{highlightedIndex:v,onHighlightedIndexChange:y}=jK(),b=rJ(o),{compositeProps:x,compositeRef:S,index:C}=R$({metadata:q.useMemo(()=>({disabled:r,id:b,value:a}),[r,b,a])}),w=a===u,T=q.useRef(!1),E=q.useRef(null),D=Q(e=>{E.current?.(),E.current=e?g(e):null});$(()=>{if(T.current){T.current=!1;return}if(!(w&&C>-1&&v!==C))return;let e=_;if(e!=null){let t=TJ(NK(e));if(t&&EJ(e,t))return}r||y(C)},[w,C,v,y,r,_]);let{getButtonProps:O,buttonRef:k}=FK({disabled:r,native:s,focusableWhenDisabled:!0}),A=d(a),j=q.useRef(!1),M=q.useRef(!1);function N(e){f(a,sJ(aq,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=NK(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 GW(`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,[g2]:w?``:void 0,onKeyDownCapture(){T.current=!0}},l,O],stateAttributesMapping:f2})}),b2=`data-index`,x2={...f2,...wG},S2=q.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}=u2(),p=rJ(),{ref:m,index:h}=Zq(),g=r===c,{mounted:_,transitionStatus:v,setMounted:y}=TG(g),b=!_,x=l(r),S={hidden:b,orientation:u,tabActivationDirection:d,transitionStatus:v},C=q.useRef(null),w=GW(`div`,e,{state:S,ref:[t,m,C],props:[{"aria-labelledby":x,hidden:b,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:DQ(!g),[b2]:h},s],stateAttributesMapping:x2});return xG({open:g,ref:C,onComplete(){g||y(!1)}}),$(()=>{if(!(p==null||b&&!a))return f(r,p)},[b,a,r,p,f]),a||_?w:null});function C2(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=EW}=e,[p,m]=q.useState(0),h=r!=null,g=q.useRef(null),_=hW(g,c),v=q.useRef([]),y=q.useRef(!1),b=q.useRef(null),x=o??p,S=Q((e,t=!1)=>{if(b.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];dQ(g.current,t,a,n)}}),C=Q(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||fY(e,x,d)?S(w2(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(fY(t,x,d)){let e=dY(t,{disabledIndices:d});sY(t,e)||S(e)}dQ(g.current,r,a,n)});$(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(fY(e,x,d)){let t=dY(e,{disabledIndices:d});sY(e,t)||S(t)}},[d,o,x,v,S]);let w=Q((e,t,n)=>i?i(e,t,n,v):n),T=Q(e=>{let o=e.key===`Home`||e.key===`End`;if(!sQ.has(e.key)||!l&&o||T2(e,f)||!g.current)return;let s=a===`rtl`,c=s?aQ:oQ,p=s?oQ:aQ,m=n===`vertical`?iQ:c,_=n===`vertical`?rQ:p,y=OJ(e.nativeEvent);if(y!=null&&uQ(y)&&!J$(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=cY(v,d),T=lY(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=dY(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!sY(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=OJ(e.nativeEvent);t&&n!=null&&uQ(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:T},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:C,relayKeyboardEvent:T}}function w2(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!fY(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function T2(e,t){for(let n of cQ)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function E2(e){let{render:t,className:n,style:r,refs:i=EW,props:a=EW,state:o=DW,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}=C2({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:AQ(),disabledIndices:v,modifierKeys:y}),k=GW(x,e,{state:o,ref:i,props:[C,...a,S],stateAttributesMapping:s}),A=q.useMemo(()=>({highlightedIndex:w,onHighlightedIndexChange:T,highlightItemOnHover:b,relayKeyboardEvent:O}),[w,T,b,O]);return(0,J.jsx)(AK.Provider,{value:A,children:(0,J.jsx)(qQ,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:k})})}var D2=q.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}=u2(),[d,f]=q.useState(0),[p,m]=q.useState(null),h=q.useRef(new Set),g=q.useRef(new Set),_=q.useRef(null);$(()=>{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=Q(e=>(h.current.add(e),()=>{h.current.delete(e)})),y=Q(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=q.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:y,tabsListElement:p}),[n,v,y,p]);return(0,J.jsx)(_2.Provider,{value:S,children:(0,J.jsx)(E2,{render:a,className:r,style:o,state:b,refs:[t,m],props:[x,s],stateAttributesMapping:f2,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:EW})})}),O2=q.createContext(void 0);function k2(){return q.useContext(O2)}var A2=q.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=rJ(u||void 0),h=k2(),g=h?.value??[],_=(i||h?.disabled)??!1,[v,y]=Cq({controlled:h?m!==void 0&&g.indexOf(m)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:b,buttonRef:x}=FK({disabled:_,native:d}),S={disabled:_,pressed:v},C=[x,t],w=[{"aria-pressed":v,onClick(e){let t=!v,n=sJ(aq,e.nativeEvent);o?.(t,n),!n.isCanceled&&(m&&h?.setGroupValue?.(m,t,n),!n.isCanceled&&y(t))}},p,b],T=GW(`button`,e,{enabled:!h,state:S,ref:C,props:w}),E=q.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return h?(0,J.jsx)(z$,{tag:`button`,render:c,className:n,style:f,metadata:E,state:S,refs:C,props:w}):T}),j2=q.createContext(void 0);function M2(e){let t=q.useContext(j2);if(t===void 0&&!e)throw Error($W(72));return t}var N2={...EZ,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},P2=class extends _Z{constructor(e,t,n){let r=new ZX;super(F2(e,r,t,n),I2(r),N2)}setOpen=(e,t)=>{GX(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,sJ(oq,e))}};function F2(e,t,n,r=!1){return{...bZ(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 I2(e){return{popupRef:q.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var L2=oZ(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=zX((e,t)=>new P2({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}),qX(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=JX(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=q.useRef(null);$(()=>{m&&t&&p.setOpen(!1,sJ(vq))},[m,t,p]),$(()=>{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]),$(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),q.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,sJ(xq))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,J.jsxs)(j2.Provider,{value:p,children:[l&&(0,J.jsx)(BX,{handle:l,store:p}),T&&(0,J.jsx)(R2,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function R2({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=PX(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=jX(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=q.useMemo(()=>MW(a.reference,i.reference),[a.reference,i.reference]);return YX(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??DW}),null}var z2=q.createContext(void 0);function B2(){return q.useContext(z2)}var V2=`data-base-ui-tooltip-trigger`;function H2(e){let t=OJ(e);return B(t)?t:null}var U2=sZ(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=M2(!0),m=DZ(a)??p;if(!m)throw Error($W(82));let h=rJ(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=q.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=KX(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=B2(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=QJ(v,{open:_}),O=FZ(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=tY(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=q.useRef(!1),F=jG(),I=q.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=DJ(e,`[${V2}]`);return n!==null&&n!==t&&EJ(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=RZ(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?eQ():null,restMs:L,delay(){return u==null&&D?{close:GJ(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),ee=AZ(v,{enabled:!A}).reference,te=e=>{let t=P.current,n=H2(e),r=z(n),i=y.current,a=i&&n&&EJ(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,sJ(sq,e));else if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&CJ(I.current)){let t=()=>{P.current||j.current||m.select(`open`)||m.setOpen(!0,sJ(sq,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},ne=m.useState(`appliedTriggerProps`,S||M!==`none`);return GW(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,ee,ne,{onMouseOver(e){te(e.nativeEvent)},onFocus(e){R(H2(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,[FJ]:A?``:void 0,[V2]:A?void 0:``},f],stateAttributesMapping:$K})}),W2=q.createContext(void 0);function G2(){let e=q.useContext(W2);if(e===void 0)throw Error($W(70));return e}var K2=q.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=cX({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,J.jsxs)(q.Fragment,{children:[l,c&&ud.createPortal(n,c)]})}),q2=q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return M2().useState(`mounted`)||n?(0,J.jsx)(W2.Provider,{value:n,children:(0,J.jsx)(K2,{ref:t,...r})}):null}),J2=q.createContext(void 0);function Y2(){let e=q.useContext(J2);if(e===void 0)throw Error($W(71));return e}var X2=q.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=rX,style:g,..._}=e,v=M2(),y=G2(),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=WQ({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=n$(e,q.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,J.jsx)(J2.Provider,{value:D,children:O})}),Z2=q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=M2(),{side:s,align:c}=Y2(),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`);xG({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),IZ(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return GW(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[LX,f,mQ(d),a],stateAttributesMapping:nq})}),Q2=q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=M2(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Y2();return GW(`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:tq})}),$2=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=q.useMemo(()=>({open:t,close:n}),[t,n]);return(0,J.jsx)(z2.Provider,{value:t,children:(0,J.jsx)(ZJ,{delay:i,timeoutMs:r,children:e.children})})},e4=e=>{let{children:t,onSubmit:n,submitButton:r,...i}=e;return fk(i),(0,J.jsxs)(`form`,{className:`bn-form`,onSubmit:e=>{e.preventDefault(),n?.()},children:[t,r===`none`?null:r]})};function t4(...e){return OK(D(e))}function n4({className:e,size:t=`default`,...n}){return(0,J.jsx)(rG,{"data-slot":`avatar`,"data-size":t,className:t4(`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 r4({className:e,...t}){return(0,J.jsx)(OG,{"data-slot":`avatar-image`,className:t4(`aspect-square size-full rounded-full object-cover`,e),...t})}function i4({className:e,...t}){return(0,J.jsx)(MG,{"data-slot":`avatar-fallback`,className:t4(`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 a4=se(`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 o4({className:e,variant:t=`default`,render:n,...r}){return kK({defaultTagName:`span`,props:MW({className:t4(a4({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}var s4=se(`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 c4({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,J.jsx)(RK,{"data-slot":`button`,className:t4(s4({variant:t,size:n,className:e})),...r})}function l4({className:e,size:t=`default`,...n}){return(0,J.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:t4(`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 u4({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-content`,className:t4(`px-(--card-spacing)`,e),...t})}function d4({...e}){return(0,J.jsx)(M$,{"data-slot":`dropdown-menu`,...e})}function f4({...e}){return(0,J.jsx)(U$,{"data-slot":`dropdown-menu-trigger`,...e})}function p4({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,container:a,...o}){return(0,J.jsx)(EQ,{container:a,children:(0,J.jsx)(g$,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,J.jsx)(CQ,{"data-slot":`dropdown-menu-content`,className:t4(`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 m4({...e}){return(0,J.jsx)(hJ,{"data-slot":`dropdown-menu-group`,...e})}function h4({className:e,inset:t,...n}){return(0,J.jsx)(gJ,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:t4(`px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8`,e),...n})}function g4({className:e,inset:t,variant:n=`default`,...r}){return(0,J.jsx)(vJ,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:t4(`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 _4({...e}){return(0,J.jsx)(P$,{"data-slot":`dropdown-menu-sub`,...e})}function v4({className:e,inset:t,children:n,...r}){return(0,J.jsxs)(Z$,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:t4(`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,J.jsx)(_1,{className:`ml-auto`})]})}function y4({align:e=`start`,alignOffset:t=-3,side:n=`right`,sideOffset:r=0,className:i,...a}){return(0,J.jsx)(p4,{"data-slot":`dropdown-menu-sub-content`,className:t4(`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 b4({className:e,children:t,checked:n,inset:r,...i}){return(0,J.jsxs)(uJ,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":r,className:t4(`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,J.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,J.jsx)(dJ,{children:(0,J.jsx)(h1,{})})}),t]})}function x4({className:e,...t}){return(0,J.jsx)(q$,{"data-slot":`dropdown-menu-separator`,className:t4(`-mx-1 my-1 h-px bg-border`,e),...t})}function S4({className:e,type:t,...n}){return(0,J.jsx)(F1,{type:t,"data-slot":`input`,className:t4(`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 C4({className:e,...t}){return(0,J.jsx)(`label`,{"data-slot":`label`,className:t4(`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 w4({...e}){return(0,J.jsx)(U1,{"data-slot":`popover`,...e})}function T4({...e}){return(0,J.jsx)(K1,{"data-slot":`popover-trigger`,...e})}function E4({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,container:a,...o}){return(0,J.jsx)(Y1,{container:a,children:(0,J.jsx)(Q1,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,J.jsx)(t0,{"data-slot":`popover-content`,className:t4(`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 D4=x0;function O4({className:e,...t}){return(0,J.jsx)(O0,{"data-slot":`select-value`,className:t4(`flex flex-1 text-left`,e),...t})}function k4({className:e,size:t=`default`,children:n,...r}){return(0,J.jsxs)(E0,{"data-slot":`select-trigger`,"data-size":t,className:t4(`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,J.jsx)(k0,{render:(0,J.jsx)(g1,{className:`text-muted-foreground pointer-events-none size-4`})})]})}function A4({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,container:s,...c}){return(0,J.jsx)(A0,{container:s,children:(0,J.jsx)(I0,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,J.jsxs)(W0,{"data-slot":`select-content`,"data-align-trigger":o,className:t4(`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,J.jsx)(M4,{}),(0,J.jsx)(Q0,{children:t}),(0,J.jsx)(N4,{})]})})})}function j4({className:e,children:t,...n}){return(0,J.jsxs)(t2,{"data-slot":`select-item`,className:t4(`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,J.jsx)(i2,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,J.jsx)(r2,{render:(0,J.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,J.jsx)(h1,{className:`pointer-events-none`})})]})}function M4({className:e,...t}){return(0,J.jsx)(c2,{"data-slot":`select-scroll-up-button`,className:t4(`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,J.jsx)(v1,{})})}function N4({className:e,...t}){return(0,J.jsx)(s2,{"data-slot":`select-scroll-down-button`,className:t4(`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,J.jsx)(g1,{})})}function P4({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`skeleton`,className:t4(`animate-pulse rounded-md bg-muted`,e),...t})}function F4({className:e,orientation:t=`horizontal`,...n}){return(0,J.jsx)(p2,{"data-slot":`tabs`,"data-orientation":t,className:t4(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var I4=se(`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 L4({className:e,variant:t=`default`,...n}){return(0,J.jsx)(D2,{"data-slot":`tabs-list`,"data-variant":t,className:t4(I4({variant:t}),e),...n})}function R4({className:e,...t}){return(0,J.jsx)(y2,{"data-slot":`tabs-trigger`,className:t4(`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 z4({className:e,...t}){return(0,J.jsx)(S2,{"data-slot":`tabs-content`,className:t4(`flex-1 text-sm outline-none`,e),...t})}var B4=se(`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 V4({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,J.jsx)(A2,{"data-slot":`toggle`,className:t4(B4({variant:t,size:n,className:e})),...r})}function H4({delay:e=0,...t}){return(0,J.jsx)($2,{"data-slot":`tooltip-provider`,delay:e,...t})}function U4({...e}){return(0,J.jsx)(L2,{"data-slot":`tooltip`,...e})}function W4({...e}){return(0,J.jsx)(U2,{"data-slot":`tooltip-trigger`,...e})}function G4({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,container:o,...s}){return(0,J.jsx)(q2,{container:o,children:(0,J.jsx)(X2,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,J.jsxs)(Z2,{"data-slot":`tooltip-content`,className:t4(`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,J.jsx)(Q2,{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 K4={Avatar:{Avatar:n4,AvatarFallback:i4,AvatarImage:r4},Badge:{Badge:o4},Button:{Button:c4},Card:{Card:l4,CardContent:u4},DropdownMenu:{DropdownMenu:d4,DropdownMenuCheckboxItem:b4,DropdownMenuContent:p4,DropdownMenuGroup:m4,DropdownMenuItem:g4,DropdownMenuLabel:h4,DropdownMenuSeparator:x4,DropdownMenuSub:_4,DropdownMenuSubContent:y4,DropdownMenuSubTrigger:v4,DropdownMenuTrigger:f4},Input:{Input:S4},Label:{Label:C4},Popover:{Popover:w4,PopoverContent:E4,PopoverTrigger:T4},Select:{Select:D4,SelectContent:A4,SelectItem:j4,SelectTrigger:k4,SelectValue:O4},Skeleton:{Skeleton:P4},Tabs:{Tabs:F4,TabsContent:z4,TabsList:L4,TabsTrigger:R4},Toggle:{Toggle:V4},Tooltip:{Tooltip:U4,TooltipContent:G4,TooltipProvider:H4,TooltipTrigger:W4}},q4=(0,q.createContext)(void 0);function J4(){return(0,q.useContext)(q4)}var Y4=(0,q.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;fk(g);let _=dW([oW(c),t]),v=J4();return(0,J.jsxs)(`div`,{className:t4(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,J.jsxs)(`div`,{className:`flex-1`,children:[i&&(0,J.jsx)(v.Label.Label,{htmlFor:i,children:i}),(0,J.jsx)(v.Input.Input,{className:t4(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 X4(e){return e?{onFocusCapture(e){let t=e.relatedTarget;t instanceof HTMLElement&&!e.currentTarget.contains(t)&&t.focus({preventScroll:!0})}}:{}}var Z4=(0,q.createContext)({portalElement:null,preventFocusOnOpen:!1}),Q4=e=>{let{children:t,onOpenChange:n,position:r,portalElement:i,preventFocusOnOpen:a,sub:o,...s}=e;fk(s);let c=J4(),l={portalElement:i,preventFocusOnOpen:a??!1};return o?(0,J.jsx)(c.DropdownMenu.DropdownMenuSub,{onOpenChange:n,children:(0,J.jsx)(Z4.Provider,{value:l,children:t})}):(0,J.jsx)(c.DropdownMenu.DropdownMenu,{modal:!1,onOpenChange:n,children:(0,J.jsx)(Z4.Provider,{value:l,children:t})})},$4=e=>{let{children:t,sub:n,...r}=e;fk(r);let i=J4();return n?(0,J.jsx)(i.DropdownMenu.DropdownMenuSubTrigger,{children:t}):(0,J.jsx)(i.DropdownMenu.DropdownMenuTrigger,{render:t})},e3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,sub:i,...a}=e;fk(a);let o=J4(),{portalElement:s,preventFocusOnOpen:c}=(0,q.useContext)(Z4);return i?(0,J.jsx)(o.DropdownMenu.DropdownMenuSubContent,{className:n,container:s,ref:t,children:r}):(0,J.jsx)(o.DropdownMenu.DropdownMenuContent,{className:n,container:s,ref:t,...X4(c),children:r})}),t3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,icon:i,checked:a,subTrigger:o,onClick:s,...c}=e;fk(c);let l=J4();return o?(0,J.jsxs)(J.Fragment,{children:[i,r]}):a===void 0?(0,J.jsxs)(l.DropdownMenu.DropdownMenuItem,{className:n,ref:t,onClick:s,onMouseDown:fW,...c,children:[i,r,o&&(0,J.jsx)(_1,{className:`ml-auto h-4 w-4`})]}):(0,J.jsxs)(l.DropdownMenu.DropdownMenuCheckboxItem,{className:t4(n,`gap-1`,a?``:`px-2`),ref:t,checked:a,onClick:s,onMouseDown:fW,...c,children:[i,r]})}),n3=(0,q.forwardRef)((e,t)=>{let{className:n,...r}=e;fk(r);let i=J4();return(0,J.jsx)(i.DropdownMenu.DropdownMenuSeparator,{className:n,ref:t})}),r3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;fk(i);let a=J4();return(0,J.jsx)(a.DropdownMenu.DropdownMenuGroup,{children:(0,J.jsx)(a.DropdownMenu.DropdownMenuLabel,{className:n,ref:t,children:r})})}),i3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,icon:i,onClick:a,onDragEnd:o,onDragStart:s,draggable:c,label:l,...u}=e;fk(u,!1);let d=J4();return(0,J.jsxs)(d.Button.Button,{variant:`ghost`,className:t4(n,`text-gray-400`),ref:t,"aria-label":l,onClick:a,onDragStart:s,onDragEnd:o,draggable:c,...u,children:[i,r]})}),a3=(0,q.forwardRef)((e,t)=>{let{className:n,tabs:r,defaultOpenTab:i,openTab:a,setOpenTab:o,loading:s,...c}=e;fk(c);let l=J4();return(0,J.jsxs)(l.Tabs.Tabs,{className:t4(n,`bg-popover max-w-screen rounded-lg p-2`),ref:t,value:a,defaultValue:i,onValueChange:o,children:[(0,J.jsx)(l.Tabs.TabsList,{children:r.map(e=>(0,J.jsx)(l.Tabs.TabsTrigger,{value:e.name,children:e.name},e.name))}),r.map(e=>(0,J.jsx)(l.Tabs.TabsContent,{value:e.name,children:(0,J.jsx)(l.Card.Card,{children:(0,J.jsx)(l.Card.CardContent,{className:`p-4`,children:e.tabPanel})})},e.name))]})}),o3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return fk(i),(0,J.jsx)(`div`,{className:t4(n,`flex flex-col items-start justify-center gap-2`),ref:t,children:r})}),s3=(0,q.forwardRef)((e,t)=>{let{className:n,value:r,placeholder:i,onKeyDown:a,onChange:o,...s}=e;fk(s);let c=J4();return(0,J.jsx)(c.Input.Input,{"data-test":`embed-input`,className:t4(n,`w-80 max-w-full`),ref:t,value:r,placeholder:i,onKeyDown:a,onChange:o})}),c3=(0,q.createContext)(null),l3=e=>{let{children:t,open:n,onOpenChange:r,position:i,portalElement:a,...o}=e;fk(o);let s=J4();return(0,J.jsx)(s.Popover.Popover,{open:n,onOpenChange:r,children:(0,J.jsx)(c3.Provider,{value:a,children:t})})},u3=(0,q.forwardRef)((e,t)=>{let{children:n,...r}=e;fk(r);let i=J4();return(0,J.jsx)(i.Popover.PopoverTrigger,{ref:t,render:n})}),d3=(0,q.forwardRef)((e,t)=>{let{className:n,variant:r,children:i,...a}=e;fk(a);let o=J4(),s=(0,q.useContext)(c3);return(0,J.jsx)(o.Popover.PopoverContent,{sideOffset:8,container:s,initialFocus:!1,className:t4(n,`flex flex-col gap-2`,r===`panel-popover`?`w-fit max-w-none border-none p-0 shadow-none`:``),ref:t,children:i})}),f3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return fk(i,!1),(0,J.jsx)(`div`,{className:n,ref:t,...i,children:r})}),p3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,icon:i,onClick:a,onDragEnd:o,onDragStart:s,draggable:c,label:l,...u}=e;fk(u,!1);let d=J4();return(0,J.jsxs)(d.Button.Button,{variant:`ghost`,className:t4(n,`text-gray-400`),ref:t,"aria-label":l,onClick:a,onDragStart:s,onDragEnd:o,draggable:c,...u,children:[i,r]})}),m3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,id:i,columns:a,...o}=e;return fk(o),(0,J.jsx)(`div`,{className:t4(`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})}),h3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,columns:i,...a}=e;return fk(a),(0,J.jsx)(`div`,{className:n,style:{gridColumn:`1 / ${i+1}`},ref:t,children:r})}),g3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,id:i,...a}=e;return fk(a),(0,J.jsx)(`div`,{id:i,role:`listbox`,className:t4(`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})}),_3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return fk(i),(0,J.jsx)(`div`,{className:t4(`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,J.jsx)(`div`,{children:r})})}),v3=(0,q.forwardRef)((e,t)=>{let n=J4(),{className:r,item:i,isSelected:a,onClick:o,id:s,...c}=e;fk(c);let l=(0,q.useRef)(null);return(0,q.useEffect)(()=>{!l.current||!a||lW(l.current,l.current.closest(`.bn-suggestion-menu, #ai-suggestion-menu`))!==`none`&&l.current.scrollIntoView({block:`nearest`})},[a]),(0,J.jsxs)(`div`,{className:t4(`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:uW([t,l]),id:s,onMouseDown:e=>e.preventDefault(),onClick:o,role:`option`,"aria-selected":a||void 0,children:[i.icon&&(0,J.jsx)(`div`,{className:t4(`p-3`,e.item.size===`small`?`p-0`:``,r),"data-position":`left`,children:i.icon}),(0,J.jsxs)(`div`,{className:`flex-1`,children:[(0,J.jsx)(`div`,{className:t4(`text-base`,e.item.size===`small`?`text-sm`:``,r),children:i.title}),(0,J.jsx)(`div`,{className:t4(`text-xs`,e.item.size===`small`?`hidden`:``,r),children:i.subtext})]}),i.badge&&(0,J.jsx)(`div`,{"data-position":`right`,className:`text-xs`,children:(0,J.jsx)(n.Badge.Badge,{variant:`secondary`,children:i.badge})})]})}),y3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return fk(i),(0,J.jsx)(`div`,{className:t4(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,n),ref:t,children:r})}),b3=(0,q.forwardRef)((e,t)=>{let{className:n,...r}=e;return fk(r),(0,J.jsx)(`div`,{className:t4(n,`animate-spin`),ref:t,children:(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,viewBox:`0 -960 960 960`,width:`1em`,fill:`#e8eaed`,children:(0,J.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`})})})}),x3=(0,q.forwardRef)((e,t)=>{let{className:n,markClassName:r,backgroundColor:i,children:a,...o}=e;return fk(o),(0,J.jsx)(`span`,{className:t4(n,r),style:r?void 0:{backgroundColor:i},ref:t,children:a})}),S3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,onMouseDown:i,onClick:a,...o}=e;fk(o,!1);let s=J4();return(0,J.jsx)(s.Button.Button,{variant:`ghost`,className:t4(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})}),C3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,draggable:i,onDragStart:a,onDragEnd:o,style:s,label:c,...l}=e;fk(l,!1);let u=J4();return(0,J.jsx)(u.Button.Button,{variant:`ghost`,className:t4(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})}),w3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,onMouseEnter:i,onMouseLeave:a,variant:o,...s}=e;fk(s);let c=J4();return(0,J.jsx)(c.Tooltip.TooltipProvider,{delay:0,children:(0,J.jsx)(`div`,{className:t4(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})})}),T3=(0,q.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;fk(p,!1);let m=J4(),h=cz(),g=e=>{fW(e),f?.(e)},_=s===void 0?(0,J.jsxs)(m.Button.Button,{className:t4(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,J.jsxs)(m.Toggle.Toggle,{className:t4(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,J.jsxs)(m.Tooltip.Tooltip,{children:[(0,J.jsx)(m.Tooltip.TooltipTrigger,{render:_}),(0,J.jsxs)(m.Tooltip.TooltipContent,{container:h,className:`flex flex-col items-center whitespace-pre-wrap`,children:[(0,J.jsx)(`span`,{children:i}),a&&(0,J.jsx)(`span`,{children:a})]})]})}),E3=(0,q.forwardRef)((e,t)=>{let{className:n,items:r,isDisabled:i,portalElement:a,preventFocusOnOpen:o,...s}=e;fk(s);let c=J4(),l=e=>(0,J.jsxs)(`div`,{className:`flex items-center gap-1`,children:[e.icon,e.text]}),u=r.filter(e=>e.isSelected)[0];return u?(0,J.jsxs)(c.Select.Select,{value:u.text,onValueChange:e=>r.find(t=>t.text===e).onClick?.(),disabled:i,children:[(0,J.jsx)(c.Select.SelectTrigger,{className:`border-none`,onMouseDown:fW,children:(0,J.jsx)(c.Select.SelectValue,{})}),(0,J.jsx)(c.Select.SelectContent,{className:n,container:a,alignItemWithTrigger:!1,ref:t,...X4(o??!1),children:r.map(e=>(0,J.jsx)(c.Select.SelectItem,{disabled:e.isDisabled,value:e.text,onMouseDown:fW,children:(0,J.jsx)(l,{...e})},e.text))})]}):null}),D3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,selected:i,headerText:a,onFocus:o,onBlur:s,tabIndex:c,...l}=e;fk(l);let u=J4();return(0,J.jsxs)(u.Card.Card,{className:t4(n,`w-[300px]`,i?`bg-accent text-accent-foreground`:``),onFocus:o,onBlur:s,tabIndex:c,ref:t,children:[a&&(0,J.jsx)(`div`,{className:`px-4 pt-4 text-sm italic`,children:a}),r]})}),O3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return fk(i),(0,J.jsx)(`div`,{className:t4(n,`p-4`,n?.includes(`thread-comments`)?`flex flex-col gap-6 border-b`:``),ref:t,children:r})}),k3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;fk(i,!1);let a=J4();return(0,J.jsx)(a.Button.Button,{className:t4(n,`text-foreground w-fit bg-transparent p-0 hover:bg-transparent`),ref:t,children:r})}),A3=(0,q.forwardRef)((e,t)=>{let{authorInfo:n,timeString:r,edited:i,...a}=e,o=bz();fk(a,!1);let s=J4();return n===`loading`?(0,J.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-4`,children:[(0,J.jsx)(s.Skeleton.Skeleton,{className:`size-7 animate-pulse rounded-full bg-neutral-400`}),(0,J.jsx)(s.Skeleton.Skeleton,{className:`h-3 w-32 animate-pulse rounded-full bg-neutral-400`})]}):(0,J.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-4`,children:[(0,J.jsxs)(s.Avatar.Avatar,{children:[(0,J.jsx)(s.Avatar.AvatarImage,{src:n.avatarUrl,alt:n.username,className:`h-7 rounded-full`}),(0,J.jsx)(s.Avatar.AvatarFallback,{children:n.username[0]})]}),(0,J.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-sm font-bold`,children:n.username}),(0,J.jsxs)(`span`,{className:`text-xs`,children:[r,` `,i&&`(${o.comments.edited})`]})]})]})}),j3=(0,q.forwardRef)((e,t)=>{let{className:n,showActions:r,authorInfo:i,timeString:a,actions:o,edited:s,emojiPickerOpen:c,children:l,...u}=e;fk(u);let[d,f]=(0,q.useState)(!1),{focused:p,ref:m}=cW(),h=o&&(r===!0||r===void 0||r===`hover`&&d||p||c);return(0,J.jsxs)(`div`,{ref:t,className:t4(n,`relative flex flex-col gap-2`),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[h?(0,J.jsx)(`div`,{className:`absolute top-0 right-0 z-10`,ref:m,children:o}):null,(0,J.jsx)(A3,{...e}),l]})}),M3=(0,q.forwardRef)((e,t)=>{let{className:n,onFocus:r,onBlur:i,autoFocus:a,editor:o,editable:s,...c}=e;fk(c);let l=qR();return(0,J.jsx)(U3,{autoFocus:a,className:t4(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,J.jsx)(xH,{formattingToolbar:N3})})}),N3=()=>{let e=cH([]).filter(e=>e.key!==`nestBlockButton`&&e.key!==`unnestBlockButton`);return(0,J.jsx)(lH,{blockTypeSelectItems:[],children:e})},P3=(0,q.forwardRef)((e,t)=>{let{className:n,text:r,icon:i,isSelected:a,mainTooltip:o,secondaryTooltip:s,onClick:c,onMouseEnter:l,...u}=e;fk(u,!1);let d=J4(),f=cz(),p=(0,J.jsxs)(d.Button.Button,{variant:a?`secondary`:`outline`,className:t4(n,`flex h-7 items-center gap-1 rounded-full px-2.5`),onClick:c,onMouseEnter:l,ref:t,children:[(0,J.jsx)(`span`,{children:i}),(0,J.jsx)(`span`,{children:r})]});return o?(0,J.jsxs)(d.Tooltip.Tooltip,{children:[(0,J.jsx)(d.Tooltip.TooltipTrigger,{render:p}),(0,J.jsxs)(d.Tooltip.TooltipContent,{container:f,className:`flex flex-col items-center whitespace-pre-wrap`,children:[(0,J.jsx)(`span`,{children:o}),s&&(0,J.jsx)(`span`,{children:s})]})]}):p}),F3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;fk(i);let a=J4();return(0,J.jsx)(a.Tooltip.TooltipProvider,{delay:0,children:(0,J.jsx)(`div`,{className:t4(n,`flex w-full flex-row flex-wrap gap-1`),ref:t,children:r})})}),I3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return fk(i,!1),(0,J.jsx)(`div`,{className:t4(n),ref:t,children:r})}),L3=(0,q.forwardRef)((e,t)=>{let{className:n,selected:r,comparing:i,onClick:a,actions:o,children:s,...c}=e;fk(c,!1);let l=J4();return(0,J.jsxs)(l.Card.Card,{className:t4(n,r?`selected`:``,i?`comparing`:``,`gap-0 rounded-lg py-0 shadow-none`),onClick:a,ref:t,children:[s,o&&(0,J.jsx)(`div`,{className:`bn-snapshot-menu`,onClick:e=>e.stopPropagation(),children:o})]})}),R3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,type:i,onClick:a,label:o,...s}=e;fk(s);let c=J4();return(0,J.jsx)(c.Button.Button,{type:i,className:n,"aria-label":o,ref:t,onClick:a,children:r})}),z3=(0,q.forwardRef)((e,t)=>{let{className:n,accept:r,value:i,placeholder:a,onChange:o,...s}=e;fk(s);let c=J4();return(0,J.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})}),B3=(0,q.forwardRef)((e,t)=>{let{className:n,isSelected:r,onClick:i,item:a,id:o,...s}=e;fk(s);let c=(0,q.useRef)(null);return(0,q.useEffect)(()=>{!c.current||!r||lW(c.current,c.current.closest(`.bn-grid-suggestion-menu`))!==`none`&&c.current.scrollIntoView({block:`nearest`})},[r]),(0,J.jsx)(`div`,{className:t4(`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:uW([t,c]),id:o,role:`option`,onClick:i,"aria-selected":r||void 0,children:a.icon})}),V3=(0,q.forwardRef)((e,t)=>{let{className:n,children:r,columns:i,...a}=e;return fk(a),(0,J.jsx)(`div`,{className:n,style:{gridColumn:`1 / ${i+1}`},ref:t,children:r})}),H3={FormattingToolbar:{Root:w3,Button:T3,Select:E3},FilePanel:{Root:a3,Button:R3,FileInput:z3,TabPanel:o3,TextInput:s3},LinkToolbar:{Root:w3,Button:T3,Select:E3},SideMenu:{Root:f3,Button:p3},SuggestionMenu:{Root:g3,Item:v3,EmptyItem:_3,Label:y3,Loader:b3},GridSuggestionMenu:{Root:m3,Item:B3,EmptyItem:h3,Loader:V3},TableHandle:{Root:C3,ExtendButton:S3},Comments:{Comment:j3,Editor:M3,Card:D3,CardSection:O3,ExpandSectionsPrompt:k3},Versioning:{Sidebar:I3,Snapshot:L3},AttributionTooltip:{Root:x3},Generic:{Badge:{Root:P3,Group:F3},Toolbar:{Root:w3,Button:T3,Select:E3},Form:{Root:e4,TextInput:Y4},Menu:{Root:Q4,Trigger:$4,Dropdown:e3,Divider:n3,Label:r3,Item:t3,Button:i3},Popover:{Root:l3,Trigger:u3,Content:d3}}},U3=e=>{let{className:t,shadCNComponents:n,...r}=e,i=(0,q.useMemo)(()=>({...K4,...n}),[n]);return(0,J.jsx)(q4.Provider,{value:i,children:(0,J.jsx)(vz.Provider,{value:H3,children:(0,J.jsx)(PU,{className:hk(`bn-shadcn`,t||``),...r})})})},W3=`default`,G3=`💡`,K3={paragraph:`paragraph`,heading:`heading`,bullet:`bulletListItem`,numbered:`numberedListItem`,check:`checkListItem`,toggle:`toggleListItem`,quote:`quote`};function q3(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 J3=e=>({textAlignment:e?.align??`left`,textColor:e?.color??W3,backgroundColor:e?.background??W3});function Y3(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 X3(e){let t=new Map,n=(e,r)=>e.map((e,i)=>{let a=r[i];if(!a)return e;let o=Y3(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(Z3(e),e)}function Z3(e){return e.map(e=>{switch(e.type){case`paragraph`:case`bullet`:case`toggle`:case`quote`:case`heading`:case`numbered`:case`check`:return{type:K3[e.type]??`paragraph`,props:{...J3(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:q3(e.content),children:Z3(e.children??[])};case`callout`:return{type:`callout`,props:{icon:e.icon??`💡`,textColor:e.look?.color??W3,backgroundColor:e.look?.background??W3},content:q3(e.content),children:Z3(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=>q3(e))}))}};case`divider`:return{type:`divider`};case`embed`:case`source`:return{type:`embed`,props:{source:e.source}}}})}var Q3=(e,t)=>JSON.stringify(e,Object.keys(e).sort())===JSON.stringify(t,Object.keys(t).sort());function $3(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&&Q3(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:W3,a=typeof r.backgroundColor==`string`?r.backgroundColor:W3,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===W3?{}:{color:i},...a===W3?{}:{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 _l(t)}function e6(e){let t=e?.textAlignment,n=e?.textColor,r=e?.backgroundColor,i={...t===`center`||t===`right`||t===`justify`?{align:t}:{},...typeof n==`string`&&n!==W3?{color:n}:{},...typeof r==`string`&&r!==W3?{background:r}:{}};return Object.keys(i).length>0?{look:i}:{}}var t6=e=>{let t=r6(e.children??[]);return t.length>0?{children:t}:{}},n6=e=>e===2||e===3||e===4||e===5||e===6?e:1;function r6(e){let t=[];for(let n of e){let e=n.props??{};switch(n.type){case`paragraph`:t.push({type:`paragraph`,...e6(e),content:$3(n.content),...t6(n)});break;case`heading`:t.push({type:`heading`,level:n6(e.level),...e.isToggleable===!0?{toggle:!0}:{},...e6(e),content:$3(n.content),...t6(n)});break;case`bulletListItem`:t.push({type:`bullet`,...e6(e),content:$3(n.content),...t6(n)});break;case`numberedListItem`:{let r=e.start;t.push({type:`numbered`,...typeof r==`number`?{start:r}:{},...e6(e),content:$3(n.content),...t6(n)});break}case`checkListItem`:t.push({type:`check`,checked:e.checked===!0,...e6(e),content:$3(n.content),...t6(n)});break;case`toggleListItem`:t.push({type:`toggle`,...e6(e),content:$3(n.content),...t6(n)});break;case`quote`:t.push({type:`quote`,...e6(e),content:$3(n.content),...t6(n)});break;case`callout`:{let r=e.icon,i=e6(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:$3(n.content),...t6(n)});break}case`codeBlock`:{let r=e.language;t.push({type:`code`,...typeof r==`string`&&r!==``&&r!==`text`?{language:r}:{},code:$3(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=>$3(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 i6=40,a6=5;function o6(e,t,n=0){if(t===``)return;let r=t.slice(0,i6),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(`
233
- `).length}function s6(e){let t=document.createRange();t.selectNodeContents(e);let n=[...t.getClientRects()];return n.length>0?n:[e.getBoundingClientRect()]}function c6(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),!s6(o).some(e=>me(t,e)))continue;let c=o6(r,e,s);if(i.push({name:`the block`,source:{path:n,...c===void 0?{}:{line:c}},...e===``?{}:{text:e}}),i.length===a6)break}return i}function l6(e){let{children:t,...n}=e;return delete n.id,{...n,...t?{children:t.map(l6)}:{}}}var u6=e=>Array.isArray(e.content)?e.content.map(e=>e.type===`text`?e.text:e.content.map(e=>e.text).join(``)).join(``):``;function d6(e){let t=e.getSelection()?.blocks??[];return t.length>0?t:[e.getTextCursorPosition().block]}var f6=`.doc-scroll, .doc-body, .doc-column, .doc-title-row, .bn-container`,p6=`.doc-slash-menu, .bn-suggestion-menu, .bn-grid-suggestion-menu`;function m6(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 h6(e,t,n={}){let{onActions:r,onTitle:i}=n;(0,q.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(p6)){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`&&m6(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=u6(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&&u6(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&&u6(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||u6(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(p6)){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=d6(e),r=n.at(-1);if(r?.id===void 0)return;t.preventDefault(),t.stopPropagation(),e.insertBlocks(n.map(l6),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(f6)&&(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 g6=/^([a-z][a-z0-9+.-]*:|\/\/|#)/i;function _6(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 v6=e=>e.slice(0,Math.max(0,e.lastIndexOf(`/`))),y6=e=>e.slice(e.lastIndexOf(`/`)+1);function b6(e,t){if(g6.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 x6(e,t){let n=v6(e);return t.filter(t=>t.entry!==e).map(e=>({title:e.title??y6(e.dir),href:_6(n,e.entry),kind:e.kind,place:e.dir}))}function S6(e,t,n){let r=b6(v6(e),t);if(r!==void 0)return n.find(e=>e.entry===r||e.dir===r)?.entry??r}var C6=[`gray`,`brown`,`red`,`orange`,`yellow`,`green`,`blue`,`purple`,`pink`],w6=[{key:`paragraph`,icon:He,aliases:[`text`,`p`,`正文`,`文字`,`段落`],block:{type:`paragraph`}},{key:`heading1`,hint:`#`,icon:je,aliases:[`h1`,`title`,`标题`,`一级`],block:{type:`heading`,props:{level:1}}},{key:`heading2`,hint:`##`,icon:Me,aliases:[`h2`,`标题`,`二级`],block:{type:`heading`,props:{level:2}}},{key:`heading3`,hint:`###`,icon:Ne,aliases:[`h3`,`标题`,`三级`],block:{type:`heading`,props:{level:3}}},{key:`bullet`,hint:`-`,icon:Ce,aliases:[`ul`,`list`,`bullet`,`列表`,`无序`],block:{type:`bulletListItem`}},{key:`numbered`,hint:`1.`,icon:Le,aliases:[`ol`,`list`,`number`,`列表`,`有序`,`编号`],block:{type:`numberedListItem`}},{key:`check`,hint:`[]`,icon:Re,aliases:[`todo`,`task`,`checkbox`,`待办`,`任务`,`清单`],block:{type:`checkListItem`}},{key:`toggle`,hint:`>`,icon:Ie,aliases:[`fold`,`collapse`,`折叠`,`展开`],block:{type:`toggleListItem`}},{key:`quote`,hint:`"`,icon:Ue,aliases:[`blockquote`,`引用`],block:{type:`quote`}},{key:`callout`,icon:Pe,aliases:[`note`,`tip`,`warning`,`提示`,`注意`,`标注`],block:{type:`callout`}},{key:`code`,hint:"```",icon:Ae,aliases:[`pre`,`代码`],block:{type:`codeBlock`}},{key:`divider`,hint:`---`,icon:ze,aliases:[`hr`,`line`,`rule`,`分隔`,`横线`],block:{type:`divider`}},{key:`table`,icon:qe,aliases:[`grid`,`表格`],block:{type:`table`,content:{type:`tableContent`,rows:[{cells:[[],[],[]]},{cells:[[],[],[]]}]}}},{key:`image`,icon:ve,aliases:[`picture`,`photo`,`img`,`图片`,`照片`],block:{type:`image`}}],T6=[`paragraph`,`heading1`,`heading2`,`heading3`,`bullet`,`numbered`,`check`,`toggle`,`quote`,`callout`];function E6(e){let t=w6.find(t=>t.key===e);return t&&T6.includes(e)?t.block:void 0}function D6(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=w6.map(t=>({...t,title:e.blocks[t.key]}));if(n===``)return i;let a=T6.flatMap(t=>{let n=w6.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=C6.flatMap(t=>[{key:`color:text:${t}`,title:`${e.colorNames[t]} ${e.text}`,icon:Ve,aliases:[t,`color`,`颜色`,e.colorNames[t]],update:{type:``,props:{textColor:t}}},{key:`color:background:${t}`,title:`${e.colorNames[t]} ${e.background}`,icon:Ve,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 O6(){let e=JR();return t=>{if(t.block){wM(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 k6={doc:Be,video:we,slides:De,sheet:Ge,scenery:Te,model:Ee,website:H},A6=8;function j6(e,t){let n=t.trim().toLowerCase();return e.filter(e=>n===``||e.title.toLowerCase().includes(n)||e.place.toLowerCase().includes(n)).slice(0,A6).map(e=>({key:`link:${e.href}`,title:e.title,hint:e.place,icon:k6[e.kind],aliases:[]}))}function M6({items:e,selectedIndex:t,onItemClick:n,empty:r,testId:i=`doc-slash-menu`}){let a=(0,q.useRef)(null),[o,s]=(0,q.useState)(),[c,l]=(0,q.useState)(t);c!==t&&(l(t),s(void 0));let u=o??t,d=(0,q.useRef)(n);return(0,q.useEffect)(()=>{d.current=n}),(0,q.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,q.useEffect)(()=>{a.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[t]),(0,J.jsx)(`div`,{ref:a,role:`listbox`,"data-testid":i,className:`doc-menu doc-slash-menu`,children:e.length===0?(0,J.jsx)(`p`,{className:`doc-menu-empty`,children:r}):e.map((e,t)=>{let r=e.icon;return(0,J.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,J.jsx)(r,{size:16,"aria-hidden":!0,className:`doc-menu-icon`}),(0,J.jsx)(`span`,{className:`doc-menu-title`,children:e.title}),e.hint!==void 0&&(0,J.jsx)(`span`,{className:`doc-menu-hint`,"aria-hidden":!0,children:e.hint})]},e.key)})})}var N6=[{value:`left`,icon:Se},{value:`center`,icon:ye},{value:`right`,icon:xe},{value:`justify`,icon:be}];function P6({names:e}){let t=JR(),n=yz(),r=cz(),i=nz({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=N6.filter(({value:e})=>o===`text`||e!==`justify`),c=s.find(e=>e.value===a)?.icon??Se,l=e[a??`left`];return(0,J.jsxs)(n.Generic.Menu.Root,{position:`bottom-start`,portalElement:r,preventFocusOnOpen:!0,children:[(0,J.jsx)(n.Generic.Menu.Trigger,{children:(0,J.jsx)(n.FormattingToolbar.Button,{className:`doc-align-button`,label:l,mainTooltip:l,children:(0,J.jsx)(c,{size:15,"aria-hidden":!0})})}),(0,J.jsx)(n.Generic.Menu.Dropdown,{className:`bn-menu-dropdown doc-align-menu`,children:s.map(({value:r,icon:i})=>(0,J.jsx)(n.Generic.Menu.Item,{className:`bn-menu-item`,icon:(0,J.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 F6({aligns:e}){return(0,J.jsxs)(lH,{children:[(0,J.jsx)(ZV,{},`type`),(0,J.jsx)(jV,{basicTextStyle:`bold`},`bold`),(0,J.jsx)(jV,{basicTextStyle:`italic`},`italic`),(0,J.jsx)(jV,{basicTextStyle:`underline`},`underline`),(0,J.jsx)(jV,{basicTextStyle:`strike`},`strike`),(0,J.jsx)(jV,{basicTextStyle:`code`},`code`),(0,J.jsx)(RV,{},`color`),(0,J.jsx)(UV,{},`link`),(0,J.jsx)(P6,{names:e},`align`)]})}function I6({strings:e,onActions:t}){let n=JR(),r=yz(),i=$R(xP,{selector:e=>e?.block});return!r||!i?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(r.Generic.Menu.Item,{className:`bn-menu-item`,onClick:()=>{i.id!==void 0&&t(i.id)},children:[(0,J.jsx)(We,{size:15,"aria-hidden":!0}),e.turnInto,`…`]}),(0,J.jsxs)(r.Generic.Menu.Item,{className:`bn-menu-item`,onClick:()=>{i.id!==void 0&&n.insertBlocks([l6(i)],i.id,`after`)},children:[(0,J.jsx)(ge,{size:15,"aria-hidden":!0}),e.duplicate]})]})}function L6({label:e}){let t=JR(),n=yz(),r=$R(xP,{selector:e=>e?.block});return!n||!r?null:(0,J.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,J.jsx)(he,{size:15,"aria-hidden":!0}),e]})}function R6({strings:e,onActions:t,...n}){return(0,J.jsx)(LH,{...n,dragHandleMenu:()=>(0,J.jsxs)(FH,{children:[(0,J.jsx)(I6,{strings:e,onActions:t}),(0,J.jsxs)(jH,{children:[(0,J.jsx)(Ve,{size:15,"aria-hidden":!0}),e.colors]}),(0,J.jsx)(L6,{label:e.remove})]})})}function z6({actions:e,placeholder:t,empty:n,at:r,onClose:i}){let[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(0),l=(0,q.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,q.useEffect)(()=>{l.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[f,a]),(0,J.jsxs)(`div`,{className:`doc-actions`,style:{left:r.x,top:r.y},"data-testid":`doc-actions`,onMouseDown:e=>{e.stopPropagation()},children:[(0,J.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,J.jsx)(`div`,{ref:l,role:`listbox`,className:`doc-menu doc-actions-list`,children:d.length===0?(0,J.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,J.jsxs)(`div`,{children:[r?(0,J.jsx)(`p`,{className:`doc-menu-group`,children:e.group}):null,(0,J.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,J.jsx)(n,{size:16,"aria-hidden":!0,className:`doc-menu-icon`}),(0,J.jsx)(`span`,{className:`doc-menu-title`,children:e.title})]})]},e.key)})})]})}function B6(e){return w6.find(t=>t.key===e)?.icon??He}function V6(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 H6(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=V6(n.content).trim();r!==``&&t.push({id:n.id,level:e,text:r})}return t}function U6({entries:e,label:t,scroller:n,onGo:r}){let[i,a]=(0,q.useState)();return(0,q.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,J.jsxs)(`nav`,{"aria-label":t,className:`doc-outline`,"data-testid":`doc-outline`,children:[(0,J.jsx)(`p`,{className:`doc-outline-label`,children:t}),e.map(e=>(0,J.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 W6=1,G6=(e,t=!1)=>e.map(e=>({id:W6++,before:e.before,after:e.after.map(bl),...e.follows?{follows:bl(e.follows)}:{},...t?{away:!0}:{}}));function K6(e,t){return e.filter(e=>e.after.length>0?e.after.some(e=>t.has(e)):e.follows===void 0||t.has(e.follows))}function q6(e){return e.map(e=>`content`in e?e.content.map(e=>e.text).join(``):e.type===`code`?e.code:e.type===`table`?e.rows.map(e=>e.map(e=>e.map(e=>e.text).join(``)).join(` · `)).join(` / `):e.type===`image`?e.alt??e.src:e.type).join(` `).replace(/\s+/g,` `).trim()}function J6({items:e,rows:t,within:n,agent:r,strings:i,onKeep:a,onUndo:o}){let[s,c]=(0,q.useState)([]);return(0,q.useLayoutEffect)(()=>{let r=n.current;if(!r)return;let i=()=>{let n=r.getBoundingClientRect(),i=t,a=e=>r.querySelector(`.bn-block-outer[data-id="${CSS.escape(e)}"]`)?.getBoundingClientRect(),o=[];for(let t of e)if(t.after.length>0){let e=i.filter(e=>t.after.includes(e.key)).map(e=>a(e.id)).filter(e=>e!==void 0)[0];if(!e)continue;o.push({item:t,top:e.top-n.top,kind:t.before.length>0?`changed`:`added`})}else{let e=t.follows===void 0?void 0:i.find(e=>e.key===t.follows),r=e?a(e.id):void 0;if(t.follows!==void 0&&!r)continue;o.push({item:t,top:r?r.bottom-n.top-4:8,kind:`removed`})}c(o)};i();let a=new ResizeObserver(i);return a.observe(r),()=>{a.disconnect()}},[e,t,n]),(0,J.jsx)(`div`,{className:`doc-review`,"data-testid":`doc-review`,children:s.map(({item:e,top:t,kind:n})=>{let s=e.away?i.away:n===`changed`?i.changed(r):n===`added`?i.added(r):i.removed(r);return(0,J.jsxs)(`div`,{className:`doc-review-chip`,"data-kind":n,"data-away":e.away?``:void 0,style:{top:t},children:[(0,J.jsxs)(`button`,{type:`button`,className:`doc-review-flag`,"aria-label":s,"data-testid":`doc-review-flag`,children:[(0,J.jsx)(`span`,{className:`doc-review-dot`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`doc-review-name`,children:e.away?i.away:r})]}),(0,J.jsxs)(`div`,{className:`doc-review-detail`,children:[(0,J.jsx)(`span`,{className:`doc-review-what`,children:s}),e.before.length>0&&(0,J.jsxs)(`span`,{className:`doc-review-was`,"data-testid":`doc-review-was`,children:[(0,J.jsx)(`span`,{className:`doc-review-was-label`,children:i.was}),(0,J.jsx)(`span`,{className:`doc-review-was-words`,children:q6(e.before)})]}),(0,J.jsx)(`button`,{type:`button`,className:`doc-review-act`,onClick:()=>{o(e.id)},children:n===`removed`?i.restore:i.undo}),(0,J.jsx)(`button`,{type:`button`,className:`doc-review-act`,onClick:()=>{a(e.id)},children:i.keep})]})]},e.id)})})}var Y6=(0,q.createContext)(void 0);function X6(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 Z6({source:e}){let t=(0,q.useContext)(Y6);return(0,J.jsxs)(`div`,{contentEditable:!1,"data-doc-embed":``,className:`doc-embed`,children:[(0,J.jsx)(Ke,{size:18,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`doc-embed-name`,children:X6(e)}),(0,J.jsx)(`span`,{className:`doc-embed-note`,children:t?.embed})]})}var Q6=BU({type:`embed`,propSchema:{source:{default:``}},content:`none`},{render:e=>(0,J.jsx)(Z6,{source:e.block.props.source})}),$6=[G3,`ℹ️`,`⚠️`,`❗`,`✅`,`📌`],e8=BU({type:`callout`,propSchema:{icon:{default:G3},textColor:{default:`default`},backgroundColor:{default:`default`}},content:`inline`},{render:e=>(0,J.jsxs)(`div`,{className:`doc-callout`,"data-doc-callout":``,children:[(0,J.jsx)(`button`,{type:`button`,contentEditable:!1,className:`doc-callout-icon`,"aria-label":e.block.props.icon,onMouseDown:e=>{e.preventDefault()},onClick:()=>{let t=$6.indexOf(e.block.props.icon);e.editor.updateBlock(e.block,{props:{icon:$6[(t+1)%$6.length]??`💡`}})},children:e.block.props.icon}),(0,J.jsx)(`div`,{className:`doc-callout-text`,ref:e.contentRef})]})}),t8=new Set([`audio`,`video`,`file`]),n8=Object.fromEntries(Object.entries(DM).filter(([e])=>!t8.has(e))),r8=NM.create({blockSpecs:{...n8,embed:Q6(),callout:e8()}});function i8(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 a8(e,t){let n=[...e];for(let e of t)if(e.after.length>0){let t=new Set(e.after),r=n.findIndex(e=>t.has(bl(e)));if(r===-1)continue;let i=n.filter(e=>!t.has(bl(e)));i.splice(r,0,...e.before),n=i}else{let t=e.follows===void 0?0:n.findIndex(t=>bl(t)===e.follows)+1;if(e.follows!==void 0&&t===0)continue;n.splice(t,0,...e.before)}return n}var o8=e=>`doc-seen:${e}`;function s8(e){return Array.isArray(e)?e:void 0}function c8(e){return JSON.stringify(e).length>1e6?null:[...e]}function l8(e,t){let n=Kc(e);if(!(n.blocks.length===0&&n.problems.length>0)&&!xl(t,Sl(n.blocks)))return Cl(n,Yl(n.blocks,t))}function u8(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}function d8(e,t,n){let r=t?bl(t):void 0,i=n?bl(n):void 0,a=(e,t)=>e!==void 0&&t!==void 0&&bl(e)===t;return e.flatMap((e,t)=>{let n=t===0&&a(e.before[0],r)?e.before.slice(1):e.before,o=t===0&&a(e.after[0],i)?e.after.slice(1):e.after;if(n.length===0&&o.length===0)return[];let s=o.length===0&&!a(e.follows,i)?e.follows:void 0;return[{before:n,after:o,...s?{follows:s}:{}}]})}var f8=e=>`doc-toggles:${e}`;function p8(e){return typeof e!=`object`||!e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`boolean`))}var m8=e=>e.type===`toggleListItem`||e.type===`heading`&&e.props?.isToggleable===!0;function*h8(e){for(let t of e)yield t,yield*h8(t.children??[])}function g8(e,t){for(let n of h8(e)){if(!m8(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 _8(e,t){let n={};for(let r of h8(e)){if(!m8(r)||r.id===void 0)continue;let e=r6([r])[0];e&&(n[Y3(e)]=t?.querySelector(`.bn-block-outer[data-id="${CSS.escape(r.id)}"] .bn-toggle-wrapper`)?.getAttribute(`data-show-children`)===`true`)}return n}var v8=30,y8=8,b8=1e3,x8=`position:absolute;left:-12px;top:3px;bottom:3px;width:2px;border-radius:1px;background:var(--allyhub-agent-line)`,S8=iU;function C8({words:e}){let t=O6(),n=(0,q.useCallback)(t=>(0,J.jsx)(M6,{...t,empty:e.nothing}),[e.nothing]);return(0,J.jsx)(S8,{triggerCharacter:`/`,getItems:t=>Promise.resolve(D6(e,t)),suggestionMenuComponent:n,onItemClick:e=>{t(e)}})}function w8({links:e,empty:t}){let n=JR(),r=(0,q.useCallback)(e=>(0,J.jsx)(M6,{...e,empty:t,testId:`doc-mention-menu`}),[t]),i=(0,q.useRef)([]);return(0,J.jsx)(S8,{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(),j6(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 T8(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-v8/2}let i=(t.querySelector(`.bn-block-content`)??t).getBoundingClientRect();return i.top-n+Math.max(0,Math.min(i.height,54)/2-v8/2)}var E8=e=>e.flatMap(e=>e.model?[{id:e.id,key:bl(e.model)}]:[]);async function D8(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 O8({path:e,file:t,start:n,catchUp:r,toggles:i,words:o,context:s,autoFocus:c,className:l,onUnreadable:u}){let d=ne(),f=v6(e),p=s.agent?.name??o.agent,[h]=(0,q.useState)(()=>new Ql(n)),[g]=(0,q.useState)(()=>Tl(h.shown())),_=Sz({schema:r8,dictionary:i8(Gl(s.locale),o),tables:{headers:!0},...g.body.length>0?{initialContent:(()=>{let e=X3(g.body);return g8(e,i),e})()}:{},uploadFile:async e=>{let t=await d[`files/upload`]({dir:f,name:e.name,data:await D8(e)});return _6(f,t.path)},resolveFileUrl:async e=>{let t=b6(f,e);return t===void 0?e:(await d[`files/url`]({path:t})).url}},[h]),y=_,b=(0,q.useRef)(null);N({freeze:()=>Promise.resolve({key:`${e}@${String(t.text.length)}@${String(Math.round(b.current?.scrollTop??0))}`,what:`The doc ${e}`,source:{path:e}}),locate:n=>Promise.resolve(c6(document,n,e,t.text))});let x=(0,q.useRef)(null),[S,C]=(0,q.useState)(t.state);(0,q.useEffect)(()=>t.onState(C),[t]);let[w,E]=(0,q.useState)([]),[D,O]=(0,q.useState)([]),[k,A]=(0,q.useState)(()=>H6(y.document)),[j,M]=(0,q.useState)(()=>({block:g.title,value:El(g.title)})),P=(0,q.useRef)(j),F=(0,q.useRef)(null),I=(0,q.useCallback)((e,t)=>{P.current={block:e,value:t},M(P.current)},[]),L=(0,q.useCallback)(()=>{let e=r6(y.document),t=u8(e)&&!u8(Tl(h.shown()).body);return Ol(P.current.block,t?[]:e)},[y,h]),R=(0,q.useCallback)(e=>e<0?void 0:h.lineOf(e+ +!!Tl(h.shown()).title),[h]),z=(0,q.useCallback)(()=>y.document.map(e=>({id:e.id??``,model:r6([e])[0]})),[y]),B=(0,q.useCallback)(e=>{let{title:t,body:n}=Tl(e),r=El(t),i=P.current.value;I(t,i.replace(/\s+/g,` `).trim()===r?i:r);let a=z().filter(e=>e.model!==void 0),o=u8(a.map(e=>e.model)),s=m(o?[]:a.map(e=>e.model),n,bl);y.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=Z3(e.insert);if(o){let e=a[0];e&&n.length>0&&y.replaceBlocks([e.id],n)}else if(t.length>0)y.replaceBlocks(t,n);else if(n.length>0){let t=a[e.at],r=a.at(-1)??z().at(-1);t?y.insertBlocks(n,t.id,`before`):r&&y.insertBlocks(n,r.id,`after`)}}}),O(E8(z()))},[y,I,z]),ee=(0,q.useRef)(!r),te=(0,q.useCallback)(e=>{let t=!ee.current;ee.current=!0;let n=Tl(h.shown()).title,r=h.incoming(e,L());if(h.unreadable){u(e);return}r.show&&B(r.show);let i=d8(r.changes,n,Tl(h.shown()).title);i.length>0&&E(e=>[...e,...G6(i,t)])},[L,h,u,B]),re=(0,q.useRef)({held:L,take:te});(0,q.useLayoutEffect)(()=>{re.current={held:L,take:te}},[L,te]),(0,q.useLayoutEffect)(()=>(t.attach({save:e=>{if(ee.current)return h.adopt(e),h.unreadable?void 0:h.textFor(re.current.held())},take:(e,t)=>{ee.current&&h.adopt(t),re.current.take(e)}}),()=>{if(t.state!==`unsaved`||!ee.current||h.unreadable)return;let e;try{e=re.current.held()}catch{return}t.attach({save:t=>(h.adopt(t),h.unreadable?void 0:h.textFor(e)),take:()=>void 0}),t.flush()}),[t,h]),(0,q.useEffect)(()=>{if(ee.current)return;let e=requestAnimationFrame(()=>{ee.current||(te(t.text),h.textFor(L())!==void 0&&t.edited())});return()=>{cancelAnimationFrame(e)}},[t,L,h,te]);let ie=(0,q.useRef)(JSON.stringify(i)),V=(0,q.useCallback)(()=>{let t=_8(y.document,b.current),n=JSON.stringify(t);n!==ie.current&&(ie.current=n,d[`storage/set`]({key:f8(e),value:Object.keys(t).length===0?null:t}).catch(()=>void 0))},[y,d,e]),oe=(0,q.useCallback)(()=>{A(H6(y.document)),O(E8(z())),V(),t.edited()},[t,y,V,z]),se=(0,q.useCallback)(e=>{let t=e.replace(/\n/g,` `);I(Dl(P.current.block,t),t),oe()},[oe,I]);(0,q.useLayoutEffect)(()=>{let e=F.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()}},[j.value]);let ce=(0,q.useCallback)(e=>{let t=y.document[0];if(t?.id===void 0)return;let n=t.id;e===void 0||e===``&&u8(r6([t]))||(y.insertBlocks([{type:`paragraph`,content:e===``?[]:[{type:`text`,text:e,styles:{}}]}],t.id,`before`),n=y.document[0]?.id??t.id);try{_.setTextCursorPosition(n,`start`)}catch{}_.focus()},[_,y]),le=(0,q.useCallback)(e=>{let t=F.current;if(!t)return;let n=P.current.value.length;e!==void 0&&e!==``&&se(P.current.value+e),t.focus(),requestAnimationFrame(()=>{t.setSelectionRange(n,n)})},[se]),[me]=(0,q.useState)(c);(0,q.useEffect)(()=>{if(!me)return;let e=requestAnimationFrame(()=>{P.current.value.trim()===``?le():ce()});return()=>{cancelAnimationFrame(e)}},[me,ce,le]);let ve=(0,q.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!==``&&se(t.value.slice(0,t.selectionStart)),ce(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(),ce())},[se,ce]),ye=(0,q.useRef)([]),be=(0,q.useCallback)(async()=>{try{ye.current=(await T(d,`project/items`,{})).items}catch{}return ye.current},[d]);(0,q.useEffect)(()=>{be()},[be]);let xe=(0,q.useCallback)(async()=>x6(e,await be()),[be,e]);(0,q.useEffect)(()=>{let t=b.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!==``&&!g6.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(),be().then(t=>{let n=S6(e,r,t);n!==void 0&&d[`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)}},[d,be,e]),(0,q.useEffect)(()=>{let e=b.current;if(!e)return;let t=e=>{e.target?.closest(`.bn-toggle-button`)&&V()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}},[V]);let Se=(0,q.useMemo)(()=>K6(w,new Set(D.map(e=>e.key))),[D,w]),Ce=(0,q.useRef)(void 0),we=(0,q.useRef)(()=>void 0);(0,q.useEffect)(()=>{if(!ee.current)return;let t=()=>{let t=c8(a8(L(),Se)),n=JSON.stringify(t);n!==Ce.current&&(Ce.current=n,d[`storage/set`]({key:o8(e),value:t}).catch(()=>void 0))};we.current=t;let n=setTimeout(t,b8);return()=>{clearTimeout(n)}},[D,Se,L,d,e]),(0,q.useLayoutEffect)(()=>()=>{try{we.current()}catch{}},[]);let Te=(0,q.useMemo)(()=>{let e=new Set(Se.flatMap(e=>e.after));return D.filter(t=>e.has(t.key)).map(e=>e.id)},[D,Se]),H=(0,q.useCallback)(e=>{E(t=>t.filter(t=>t.id!==e))},[]),[Ee,De]=(0,q.useState)(-1),Oe=e=>{if(Se.length===0)return;let t=(Ee+e+Se.length)%Se.length;De(t);let n=Se[t];if(!n)return;let r=n.after[0]??n.follows,i=D.find(e=>e.key===r)?.id;i!==void 0&&x.current?.querySelector(`.bn-block-outer[data-id="${CSS.escape(i)}"]`)?.scrollIntoView({block:`center`,behavior:`smooth`})},ke=(0,q.useCallback)(e=>{y.transact(()=>{for(let t of Se.filter(t=>e.includes(t.id))){let e=E8(z()),n=Z3(t.before);if(t.after.length>0){let r=e.filter(e=>t.after.includes(e.key)).map(e=>e.id);r.length>0&&y.replaceBlocks(r,n)}else{let r=e.find(e=>e.key===t.follows),i=e[0];r?y.insertBlocks(n,r.id,`after`):i&&y.insertBlocks(n,i.id,`before`)}}}),E(t=>t.filter(t=>!e.includes(t.id)))},[y,z,Se]),Ae=(0,q.useCallback)(()=>(0,J.jsx)(F6,{aligns:o.aligns}),[o.aligns]),[je,Me]=(0,q.useState)(),Ne=(0,q.useCallback)(e=>{let t=b.current?.querySelector(`.bn-block-outer[data-id="${CSS.escape(e)}"]`),n=b.current?.closest(`.doc-sheet`);if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();Me({id:e,at:{x:Math.max(8,r.left-i.left),y:Math.min(r.top-i.top+28,i.height-320)}})},[]);h6(_,b,(0,q.useMemo)(()=>({onActions:Ne,onTitle:le}),[Ne,le]));let Pe=(0,q.useMemo)(()=>{let t=je?.id;if(t===void 0)return[];let n=()=>{let e=y.getSelection()?.blocks??[],n=y.document.find(e=>e.id===t);return e.some(e=>e.id===t)?e:n?[n]:[]};return[...T6.flatMap(e=>{let t=E6(e);return t?[{key:`turn:${e}`,title:o.blocks[e],icon:B6(e),group:o.turnInto,run:()=>{for(let e of n())e.id!==void 0&&y.updateBlock(e.id,t)}}]:[]}),{key:`duplicate`,title:o.duplicate,icon:ge,run:()=>{let e=n(),t=e.at(-1);t?.id!==void 0&&y.insertBlocks(e.map(l6),t.id,`after`)}},{key:`place`,title:o.copyPlace,icon:Fe,run:()=>{let n=R(y.document.findIndex(e=>e.id===t));navigator.clipboard.writeText(n===void 0?e:`${e}:${String(n)}`).catch(()=>void 0)}},{key:`delete`,title:o.remove,icon:he,run:()=>{y.removeBlocks(n().flatMap(e=>e.id===void 0?[]:[e.id]))}}]},[je,y,R,e,o]),Ie=(0,q.useCallback)(e=>(0,J.jsx)(R6,{...e,strings:o,onActions:Ne}),[Ne,o]),Le=(0,q.useMemo)(()=>({useFloatingOptions:{middleware:[ae(({elements:e})=>({mainAxis:y8,crossAxis:T8(e.reference)}))]}}),[]),Re=(0,q.useCallback)(e=>{b.current?.querySelector(`.bn-block-outer[data-id="${CSS.escape(e)}"]`)?.scrollIntoView({block:`start`,behavior:`smooth`})},[]),ze=Se.every(e=>e.away===!0),Be=j.block?.type===`heading`?j.block.look?.align:void 0;return(0,J.jsx)(`div`,{className:l,"data-testid":`doc-editor`,"data-state":S,lang:a[v(s.locale)],children:(0,J.jsxs)(`div`,{className:`doc-sheet`,children:[(0,J.jsx)(pe,{saved:{state:S}}),Se.length>0&&(0,J.jsxs)(`div`,{className:`doc-review-bar`,"data-testid":`doc-review-bar`,"data-away":ze?``:void 0,children:[(0,J.jsx)(`span`,{"data-testid":`doc-review-count`,children:ze?o.review.countAway(Se.length):o.review.count(p,Se.length)}),(0,J.jsxs)(`span`,{className:`doc-review-step`,children:[(0,J.jsx)(`button`,{type:`button`,"aria-label":o.review.previous,title:o.review.previous,onClick:()=>{Oe(-1)},children:(0,J.jsx)(fe,{size:14,"aria-hidden":!0})}),Ee>=0&&Ee<Se.length&&(0,J.jsx)(`span`,{className:`doc-review-position`,children:o.review.position(Ee+1,Se.length)}),(0,J.jsx)(`button`,{type:`button`,"aria-label":o.review.next,title:o.review.next,onClick:()=>{Oe(1)},children:(0,J.jsx)(de,{size:14,"aria-hidden":!0})})]}),(0,J.jsxs)(`button`,{type:`button`,onClick:()=>{ke(Se.map(e=>e.id))},children:[(0,J.jsx)(_e,{size:13,"aria-hidden":!0}),o.review.undoAll]}),(0,J.jsxs)(`button`,{type:`button`,onClick:()=>{E([])},children:[(0,J.jsx)(ue,{size:13,"aria-hidden":!0}),o.review.keepAll]})]}),je!==void 0&&(0,J.jsx)(z6,{actions:Pe,placeholder:o.find,empty:o.nothing,at:je.at,onClose:()=>{Me(void 0)}}),(0,J.jsxs)(`div`,{className:`doc-scroll`,ref:b,children:[Te.length>0&&(0,J.jsx)(`style`,{children:`${Te.map(e=>`.bn-block-outer[data-id="${CSS.escape(e)}"]>.bn-block::before`).join(`,`)}{content:"";${x8}}`}),(0,J.jsxs)(`div`,{className:`doc-body`,children:[(0,J.jsxs)(`div`,{className:`doc-column`,ref:x,children:[(0,J.jsx)(`div`,{className:`doc-title-row`,children:(0,J.jsx)(`textarea`,{ref:F,className:`doc-title`,"data-testid":`doc-title-field`,rows:1,value:j.value,placeholder:o.untitled,"aria-label":o.title,style:Be?{textAlign:Be}:void 0,onChange:e=>{se(e.target.value)},onKeyDown:ve})}),(0,J.jsxs)(U3,{editor:_,theme:s.theme,formattingToolbar:!1,slashMenu:!1,sideMenu:!1,onChange:oe,children:[(0,J.jsx)(xH,{formattingToolbar:Ae}),(0,J.jsx)(C8,{words:o}),(0,J.jsx)(w8,{links:xe,empty:o.nothingToLink}),(0,J.jsx)(zH,{sideMenu:Ie,floatingUIOptions:Le})]}),(0,J.jsx)(J6,{items:Se,rows:D,within:x,agent:p,strings:o.review,onKeep:H,onUndo:e=>{ke([e])}})]}),(0,J.jsx)(U6,{entries:k,label:o.outline,scroller:b,onGo:Re})]})]})]})})}function k8(e){let t=ne(),n=ie(),r=e.path??n?.item.entry,i=Wl.of(n?.locale),[o,s]=(0,q.useState)(),[c,l]=(0,q.useState)(),[u,d]=(0,q.useState)(),[f,p]=(0,q.useState)(0);(0,q.useEffect)(()=>{if(r===void 0)return;let e=!0,n,i=e=>t[`storage/get`]({key:e}).then(e=>e.value,()=>null);return Promise.all([g.open(t,r),i(o8(r)),i(f8(r))]).then(([t,i,a])=>{if(n=t,!e){t.close();return}let o=s8(i),c=o&&l8(t.text,o);s({path:r,file:t,start:c??t.text,catchUp:c!==void 0,toggles:p8(a)}),d(Zl(Kc(t.text))?t.text:void 0),l(void 0)},t=>{e&&l(t instanceof Error?t.message:``)}),()=>{e=!1,n?.close()}},[t,r]);let m=o?.file;(0,q.useEffect)(()=>{m&&u!==void 0&&m.attach({save:()=>void 0,take:e=>{Zl(Kc(e))?d(e):(d(void 0),p(e=>e+1))}})},[m,u]);let h=`doc-page${e.bare===!0?` doc-bare`:``} ${e.className??``}`,_=a[v(n?.locale)];return c===void 0?!o||!n||o.path!==r?(0,J.jsx)(`div`,{className:h,lang:_,children:(0,J.jsx)(`div`,{className:`doc-sheet`,children:(0,J.jsx)(`p`,{className:`doc-message`,children:i.loading})})}):u===void 0?(0,J.jsx)(Y6.Provider,{value:i,children:(0,J.jsx)(O8,{path:r,file:o.file,start:f===0?o.start:o.file.text,catchUp:f===0&&o.catchUp,toggles:o.toggles,words:i,context:n,autoFocus:e.autoFocus??!1,className:h,onUnreadable:d},`${r}:${String(f)}`)}):(0,J.jsx)(A8,{className:h,text:u,words:i,lang:_}):(0,J.jsx)(`div`,{className:h,lang:_,children:(0,J.jsx)(`div`,{className:`doc-sheet`,children:(0,J.jsx)(`p`,{role:`alert`,className:`doc-message doc-message-problem`,children:c})})})}function A8({className:e,text:t,words:n,lang:r}){let i=Kc(t).problems[0]?.message;return(0,J.jsx)(`div`,{className:e,lang:r,children:(0,J.jsx)(`div`,{className:`doc-sheet`,children:(0,J.jsxs)(`div`,{className:`doc-scroll doc-unreadable`,"data-testid":`doc-unreadable`,children:[(0,J.jsx)(`p`,{className:`doc-message`,children:n.unreadable}),(0,J.jsx)(`p`,{className:`doc-message doc-message-problem`,children:i}),(0,J.jsx)(`pre`,{children:t})]})})})}export{k8 as DocEditor};