allyhub 0.18.0 → 0.20.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 (1050) hide show
  1. package/bin/allyhub.js +10 -0
  2. package/dist/args.js +1 -1
  3. package/dist/command.js +1 -1
  4. package/dist/commands/add.js +1 -1
  5. package/dist/commands/align.js +1 -1
  6. package/dist/commands/auth.js +1 -1
  7. package/dist/commands/check.js +1 -1
  8. package/dist/commands/cloud-tools.js +2 -2
  9. package/dist/commands/cloud.js +1 -1
  10. package/dist/commands/contributed.js +1 -1
  11. package/dist/commands/dev.js +5 -5
  12. package/dist/commands/export.js +3 -0
  13. package/dist/commands/found-extensions.js +2 -0
  14. package/dist/commands/frames/common.js +1 -1
  15. package/dist/commands/frames/doc.js +1 -1
  16. package/dist/commands/frames/piece.js +1 -1
  17. package/dist/commands/frames/sheet.js +1 -1
  18. package/dist/commands/frames.js +9 -9
  19. package/dist/commands/index.js +1 -1
  20. package/dist/commands/inspect/combos.js +1 -1
  21. package/dist/commands/inspect/common.js +3 -3
  22. package/dist/commands/inspect/facts.js +2 -2
  23. package/dist/commands/inspect/index.js +1 -1
  24. package/dist/commands/inspect/layout.js +1 -1
  25. package/dist/commands/inspect/views.js +1 -1
  26. package/dist/commands/list.js +2 -0
  27. package/dist/commands/mail.js +1 -1
  28. package/dist/commands/migrate.js +3 -0
  29. package/dist/commands/run-context.js +2 -0
  30. package/dist/commands/skills.js +3 -3
  31. package/dist/commands/upgrade.js +5 -0
  32. package/dist/commands.json +1 -0
  33. package/dist/fields.js +1 -1
  34. package/dist/help.js +3 -3
  35. package/dist/main.js +8 -7
  36. package/dist/node_modules/@allyhub/3d-extension/dist/build.js +1 -1
  37. package/dist/node_modules/@allyhub/3d-extension/dist/scenery-build.js +1 -1
  38. package/dist/node_modules/@allyhub/3d-extension/package.json +4 -3
  39. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  40. package/dist/node_modules/@allyhub/blocks/LICENSE +241 -0
  41. package/dist/node_modules/@allyhub/blocks/dist/alt.js +2 -0
  42. package/dist/node_modules/@allyhub/blocks/dist/elements.js +2 -0
  43. package/dist/node_modules/@allyhub/blocks/dist/flow-resolve.js +2 -0
  44. package/dist/node_modules/@allyhub/blocks/dist/flow-table.js +2 -0
  45. package/dist/node_modules/@allyhub/blocks/dist/format.js +2 -0
  46. package/dist/node_modules/@allyhub/blocks/dist/gantt.js +2 -0
  47. package/dist/node_modules/@allyhub/blocks/dist/grids.js +2 -0
  48. package/dist/node_modules/@allyhub/blocks/dist/html.js +75 -0
  49. package/dist/node_modules/@allyhub/blocks/dist/icons.generated.js +2 -0
  50. package/dist/node_modules/@allyhub/blocks/dist/icons.js +2 -0
  51. package/dist/node_modules/@allyhub/blocks/dist/index.js +2 -0
  52. package/dist/node_modules/@allyhub/blocks/dist/layout.js +2 -0
  53. package/dist/node_modules/@allyhub/blocks/dist/look.js +2 -0
  54. package/dist/node_modules/@allyhub/blocks/dist/measure.js +3 -0
  55. package/dist/node_modules/@allyhub/blocks/dist/model.js +2 -0
  56. package/dist/node_modules/@allyhub/blocks/dist/page.js +2 -0
  57. package/dist/node_modules/@allyhub/blocks/dist/palette.js +2 -0
  58. package/dist/node_modules/@allyhub/blocks/dist/path.js +2 -0
  59. package/dist/node_modules/@allyhub/blocks/dist/resolve.js +2 -0
  60. package/dist/node_modules/@allyhub/blocks/dist/samples.js +2 -0
  61. package/dist/node_modules/@allyhub/blocks/dist/sankey.js +2 -0
  62. package/dist/node_modules/@allyhub/blocks/dist/svg.js +2 -0
  63. package/dist/node_modules/@allyhub/blocks/dist/tidy.js +2 -0
  64. package/dist/node_modules/@allyhub/blocks/dist/trees.js +2 -0
  65. package/dist/node_modules/@allyhub/blocks/package.json +19 -0
  66. package/dist/node_modules/@allyhub/browser/dist/html.js +1 -1
  67. package/dist/node_modules/@allyhub/browser/package.json +1 -1
  68. package/dist/node_modules/@allyhub/build/dist/build-plugins.js +1 -1
  69. package/dist/node_modules/@allyhub/build/dist/fonts.js +9 -3
  70. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  71. package/dist/node_modules/@allyhub/build/dist/inspect-view.js +1 -1
  72. package/dist/node_modules/@allyhub/build/dist/meta-worker.js +1 -1
  73. package/dist/node_modules/@allyhub/build/dist/migrate.js +2 -0
  74. package/dist/node_modules/@allyhub/build/dist/plugin.js +9 -9
  75. package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
  76. package/dist/node_modules/@allyhub/build/dist/project-root.js +1 -1
  77. package/dist/node_modules/@allyhub/build/dist/scan.js +1 -1
  78. package/dist/node_modules/@allyhub/build/dist/sdk-parts.js +2 -0
  79. package/dist/node_modules/@allyhub/build/dist/vite.js +2 -2
  80. package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
  81. package/dist/node_modules/@allyhub/build/package.json +13 -1
  82. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  83. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  84. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +2 -1
  85. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +4 -3
  86. package/dist/node_modules/@allyhub/chart/dist/chart.js +4 -2
  87. package/dist/node_modules/@allyhub/chart/dist/chartex-xml.js +4 -0
  88. package/dist/node_modules/@allyhub/chart/dist/classic.js +2 -0
  89. package/dist/node_modules/@allyhub/chart/dist/embedded.js +2 -2
  90. package/dist/node_modules/@allyhub/chart/dist/extended.js +2 -0
  91. package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
  92. package/dist/node_modules/@allyhub/chart/dist/svg.js +1 -1
  93. package/dist/node_modules/@allyhub/chart/dist/tree.js +2 -0
  94. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  95. package/dist/node_modules/@allyhub/check/dist/check.js +2 -2
  96. package/dist/node_modules/@allyhub/check/package.json +1 -1
  97. package/dist/node_modules/@allyhub/cloud/dist/blobs.js +1 -1
  98. package/dist/node_modules/@allyhub/cloud/dist/call.js +4 -4
  99. package/dist/node_modules/@allyhub/cloud/dist/catalog.js +1 -1
  100. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  101. package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
  102. package/dist/node_modules/@allyhub/cloud/dist/credentials.js +1 -1
  103. package/dist/node_modules/@allyhub/cloud/dist/device.js +1 -1
  104. package/dist/node_modules/@allyhub/cloud/dist/errors.js +1 -1
  105. package/dist/node_modules/@allyhub/cloud/dist/index.js +1 -1
  106. package/dist/node_modules/@allyhub/cloud/dist/loopback.js +2 -2
  107. package/dist/node_modules/@allyhub/cloud/dist/mail.js +1 -1
  108. package/dist/node_modules/@allyhub/cloud/dist/records.js +1 -1
  109. package/dist/node_modules/@allyhub/cloud/dist/signin.js +2 -2
  110. package/dist/node_modules/@allyhub/cloud/dist/sites.js +1 -1
  111. package/dist/node_modules/@allyhub/cloud/dist/storage.js +2 -0
  112. package/dist/node_modules/@allyhub/cloud/dist/token.js +1 -1
  113. package/dist/node_modules/@allyhub/cloud/dist/tools.js +2 -0
  114. package/dist/node_modules/@allyhub/cloud/dist/uploads.js +2 -2
  115. package/dist/node_modules/@allyhub/cloud/dist/voice.js +1 -1
  116. package/dist/node_modules/@allyhub/cloud/package.json +5 -1
  117. package/dist/node_modules/@allyhub/components/package.json +1 -1
  118. package/dist/node_modules/@allyhub/dev-server/dist/background.js +1 -1
  119. package/dist/node_modules/@allyhub/dev-server/dist/item-process.js +2 -0
  120. package/dist/node_modules/@allyhub/dev-server/dist/item-worker.js +2 -0
  121. package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
  122. package/dist/node_modules/@allyhub/dev-server/dist/pages.js +20 -1
  123. package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
  124. package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
  125. package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
  126. package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
  127. package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
  128. package/dist/node_modules/@allyhub/dev-server/dist/writer.js +3 -3
  129. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  130. package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +1 -1
  131. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  132. package/dist/node_modules/@allyhub/doc/dist/blocks.js +2 -0
  133. package/dist/node_modules/@allyhub/doc/dist/chart.js +1 -1
  134. package/dist/node_modules/@allyhub/doc/dist/color.js +1 -1
  135. package/dist/node_modules/@allyhub/doc/dist/docx-read.js +12 -0
  136. package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -4
  137. package/dist/node_modules/@allyhub/doc/dist/html.js +83 -48
  138. package/dist/node_modules/@allyhub/doc/dist/index.js +1 -1
  139. package/dist/node_modules/@allyhub/doc/dist/markdown.js +1 -1
  140. package/dist/node_modules/@allyhub/doc/dist/merges.js +2 -0
  141. package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
  142. package/dist/node_modules/@allyhub/doc/dist/numbering.js +2 -0
  143. package/dist/node_modules/@allyhub/doc/dist/omml.js +3 -0
  144. package/dist/node_modules/@allyhub/doc/dist/page.js +2 -1
  145. package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
  146. package/dist/node_modules/@allyhub/doc/dist/parse.js +5 -4
  147. package/dist/node_modules/@allyhub/doc/dist/redline.js +2 -0
  148. package/dist/node_modules/@allyhub/doc/dist/revisions.js +2 -0
  149. package/dist/node_modules/@allyhub/doc/dist/shapes.js +4 -0
  150. package/dist/node_modules/@allyhub/doc/dist/styles.js +2 -0
  151. package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
  152. package/dist/node_modules/@allyhub/doc/dist/write.js +65 -39
  153. package/dist/node_modules/@allyhub/doc/package.json +5 -1
  154. package/dist/node_modules/@allyhub/doc-extension/dist/build.js +2 -2
  155. package/dist/node_modules/@allyhub/doc-extension/dist/cli/find.js +1 -1
  156. package/dist/node_modules/@allyhub/doc-extension/dist/cli/import.js +3 -0
  157. package/dist/node_modules/@allyhub/doc-extension/dist/cli/index.js +1 -1
  158. package/dist/node_modules/@allyhub/doc-extension/dist/cli/styles.js +4 -0
  159. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  160. package/dist/node_modules/@allyhub/doc-extension/dist/inspect.js +1 -1
  161. package/dist/node_modules/@allyhub/doc-extension/dist/project-tools.js +1 -1
  162. package/dist/node_modules/@allyhub/doc-extension/dist/tools.js +1 -1
  163. package/dist/node_modules/@allyhub/doc-extension/dist/workspace.js +1 -1
  164. package/dist/node_modules/@allyhub/doc-extension/package.json +22 -2
  165. package/dist/node_modules/@allyhub/doc-print/dist/drawn.js +4 -4
  166. package/dist/node_modules/@allyhub/doc-print/dist/index.js +1 -1
  167. package/dist/node_modules/@allyhub/doc-print/dist/layout.js +8 -7
  168. package/dist/node_modules/@allyhub/doc-print/dist/print.js +22 -16
  169. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  170. package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
  171. package/dist/node_modules/@allyhub/export/package.json +1 -1
  172. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  173. package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
  174. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  175. package/dist/node_modules/@allyhub/formats/dist/data/blocks-flow.js +2 -0
  176. package/dist/node_modules/@allyhub/formats/dist/data/blocks.d.ts +146 -0
  177. package/dist/node_modules/@allyhub/formats/dist/data/blocks.js +2 -0
  178. package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.d.ts +9 -0
  179. package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.js +2 -0
  180. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +47 -40
  181. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
  182. package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.d.ts +6 -0
  183. package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.js +2 -0
  184. package/dist/node_modules/@allyhub/formats/dist/data/diagrams.d.ts +29 -0
  185. package/dist/node_modules/@allyhub/formats/dist/data/diagrams.js +2 -0
  186. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +18 -0
  187. package/dist/node_modules/@allyhub/formats/dist/data/faces.js +1 -1
  188. package/dist/node_modules/@allyhub/formats/dist/data/page-data.d.ts +59 -0
  189. package/dist/node_modules/@allyhub/formats/dist/data/page-data.js +2 -0
  190. package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +1 -1
  191. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +698 -258
  192. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  193. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +14104 -2167
  194. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  195. package/dist/node_modules/@allyhub/formats/dist/data/themes.d.ts +82 -0
  196. package/dist/node_modules/@allyhub/formats/dist/data/themes.js +2 -0
  197. package/dist/node_modules/@allyhub/formats/dist/data/tokens.d.ts +67 -0
  198. package/dist/node_modules/@allyhub/formats/dist/data/tokens.js +2 -0
  199. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
  200. package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
  201. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +7 -0
  202. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  203. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +36 -10
  204. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  205. package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +1 -1
  206. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +3260 -290
  207. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  208. package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +45 -0
  209. package/dist/node_modules/@allyhub/formats/dist/tolerant.js +2 -0
  210. package/dist/node_modules/@allyhub/formats/package.json +25 -1
  211. package/dist/node_modules/@allyhub/html-extension/dist/project-tools.js +21 -9
  212. package/dist/node_modules/@allyhub/html-extension/dist/tools.js +1 -1
  213. package/dist/node_modules/@allyhub/html-extension/markup/allyhub.yaml +2 -0
  214. package/dist/node_modules/@allyhub/html-extension/markup/markup.json +14 -4
  215. package/dist/node_modules/@allyhub/html-extension/markup/pages/budget.html +22 -1
  216. package/dist/node_modules/@allyhub/html-extension/package.json +9 -1
  217. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  218. package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +1 -1
  219. package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +2 -2
  220. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  221. package/dist/node_modules/@allyhub/image-extension/dist/build-plugins.js +1 -1
  222. package/dist/node_modules/@allyhub/image-extension/dist/cli.js +1 -1
  223. package/dist/node_modules/@allyhub/image-extension/package.json +2 -2
  224. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +1 -1
  225. package/dist/node_modules/@allyhub/image-measure/dist/layout.js +2 -2
  226. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  227. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  228. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  229. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  230. package/dist/node_modules/@allyhub/image-sdk/dist/block.js +2 -0
  231. package/dist/node_modules/@allyhub/image-sdk/dist/blocks.js +2 -0
  232. package/dist/node_modules/@allyhub/image-sdk/dist/index.js +1 -1
  233. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  234. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  235. package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -3
  236. package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +3 -3
  237. package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
  238. package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
  239. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +1 -600
  240. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  241. package/dist/node_modules/@allyhub/media/package.json +5 -1
  242. package/dist/node_modules/@allyhub/media-extension/dist/analyses/faces.js +1 -1
  243. package/dist/node_modules/@allyhub/media-extension/dist/asr/hear.js +1 -1
  244. package/dist/node_modules/@allyhub/media-extension/dist/asr/transcribe.js +1 -1
  245. package/dist/node_modules/@allyhub/media-extension/dist/ocr/text.js +1 -1
  246. package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
  247. package/dist/node_modules/@allyhub/media-extension/dist/vision/index-media.js +3 -2
  248. package/dist/node_modules/@allyhub/media-extension/dist/vision/track.js +1 -1
  249. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  250. package/dist/node_modules/@allyhub/model/package.json +1 -1
  251. package/dist/node_modules/@allyhub/office-extension/markup/csv/allyhub.yaml +2 -0
  252. package/dist/node_modules/@allyhub/office-extension/markup/csv/markup.json +1 -1
  253. package/dist/node_modules/@allyhub/office-extension/markup/document/allyhub.yaml +2 -0
  254. package/dist/node_modules/@allyhub/office-extension/markup/presentation/allyhub.yaml +2 -0
  255. package/dist/node_modules/@allyhub/office-extension/markup/workbook/allyhub.yaml +2 -0
  256. package/dist/node_modules/@allyhub/office-extension/markup/workbook/markup.json +1 -1
  257. package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
  258. package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
  259. package/dist/node_modules/@allyhub/ooxml/dist/mce.js +1 -1
  260. package/dist/node_modules/@allyhub/ooxml/dist/node.js +1 -1
  261. package/dist/node_modules/@allyhub/ooxml/dist/ns.js +1 -1
  262. package/dist/node_modules/@allyhub/ooxml/dist/opc.js +1 -1
  263. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  264. package/dist/node_modules/@allyhub/piece/dist/export.d.ts +1 -1
  265. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +1 -2
  266. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +2 -0
  267. package/dist/node_modules/@allyhub/piece/dist/look.d.ts +10 -2
  268. package/dist/node_modules/@allyhub/piece/dist/look.js +1 -1
  269. package/dist/node_modules/@allyhub/piece/dist/media.d.ts +9 -3
  270. package/dist/node_modules/@allyhub/piece/dist/script.js +1 -1
  271. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +5 -2
  272. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +2 -2
  273. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  274. package/dist/node_modules/@allyhub/project/dist/media-index.js +1 -1
  275. package/dist/node_modules/@allyhub/project/package.json +1 -1
  276. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  277. package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
  278. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  279. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  280. package/dist/node_modules/@allyhub/protocol/dist/errors.js +1 -1
  281. package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
  282. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  283. package/dist/node_modules/@allyhub/protocol/dist/jsonrpc.js +1 -1
  284. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
  285. package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
  286. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  287. package/dist/node_modules/@allyhub/protocol/dist/page-frame.js +2 -0
  288. package/dist/node_modules/@allyhub/protocol/dist/paywall.js +1 -1
  289. package/dist/node_modules/@allyhub/protocol/dist/purposes.js +1 -1
  290. package/dist/node_modules/@allyhub/protocol/dist/registry.js +1 -1
  291. package/dist/node_modules/@allyhub/protocol/dist/sites.js +1 -1
  292. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  293. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  294. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  295. package/dist/node_modules/@allyhub/protocol/package.json +41 -1
  296. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  297. package/dist/node_modules/@allyhub/render/dist/errors.js +1 -1
  298. package/dist/node_modules/@allyhub/render/dist/post-probe.js +1 -1
  299. package/dist/node_modules/@allyhub/render/package.json +9 -1
  300. package/dist/node_modules/@allyhub/runtime/dist/footage.js +1 -1
  301. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  302. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
  303. package/dist/node_modules/@allyhub/runtimes/dist/declared.js +1 -1
  304. package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
  305. package/dist/node_modules/@allyhub/runtimes/dist/manifest.js +1 -1
  306. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +2 -2
  307. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +3 -3
  308. package/dist/node_modules/@allyhub/runtimes/package.json +9 -1
  309. package/dist/node_modules/@allyhub/scaffold/dist/index.js +12 -8
  310. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  311. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  312. package/dist/node_modules/@allyhub/scenery-host/dist/bundle.js +3 -3
  313. package/dist/node_modules/@allyhub/scenery-host/dist/fact.d.ts +1 -1
  314. package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.js +2 -2
  315. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  316. package/dist/node_modules/@allyhub/sheet/dist/annotations.js +1 -1
  317. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  318. package/dist/node_modules/@allyhub/sheet/dist/api/charts.js +1 -1
  319. package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
  320. package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
  321. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  322. package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
  323. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  324. package/dist/node_modules/@allyhub/sheet/dist/calc/server.js +1 -1
  325. package/dist/node_modules/@allyhub/sheet/dist/cell-styles.js +2 -0
  326. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  327. package/dist/node_modules/@allyhub/sheet/dist/check.js +1 -1
  328. package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
  329. package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
  330. package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
  331. package/dist/node_modules/@allyhub/sheet/dist/heatmap.js +2 -0
  332. package/dist/node_modules/@allyhub/sheet/dist/html.js +9 -9
  333. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  334. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  335. package/dist/node_modules/@allyhub/sheet/dist/paginate.js +1 -1
  336. package/dist/node_modules/@allyhub/sheet/dist/printed.js +1 -1
  337. package/dist/node_modules/@allyhub/sheet/dist/sdk.js +1 -1
  338. package/dist/node_modules/@allyhub/sheet/dist/sparklines.js +2 -0
  339. package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
  340. package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
  341. package/dist/node_modules/@allyhub/sheet/dist/theme.js +2 -0
  342. package/dist/node_modules/@allyhub/sheet/dist/tiles.js +2 -0
  343. package/dist/node_modules/@allyhub/sheet/dist/units.js +2 -0
  344. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  345. package/dist/node_modules/@allyhub/sheet/dist/write.js +14 -14
  346. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  347. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  348. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  349. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  350. package/dist/node_modules/@allyhub/sheet/dist/xlsx/theme.js +1 -1
  351. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  352. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  353. package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
  354. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/open.js +1 -1
  355. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +7 -7
  356. package/dist/node_modules/@allyhub/sheet-extension/dist/code.js +1 -1
  357. package/dist/node_modules/@allyhub/sheet-extension/dist/evaluate.js +2 -2
  358. package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -2
  359. package/dist/node_modules/@allyhub/sheet-extension/dist/inspect.js +2 -2
  360. package/dist/node_modules/@allyhub/sheet-extension/dist/migrations.js +4 -0
  361. package/dist/node_modules/@allyhub/sheet-extension/dist/project-tools.js +1 -1
  362. package/dist/node_modules/@allyhub/sheet-extension/dist/tools.js +1 -1
  363. package/dist/node_modules/@allyhub/sheet-extension/package.json +7 -3
  364. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  365. package/dist/node_modules/@allyhub/slides-core/dist/blocks.js +2 -0
  366. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  367. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  368. package/dist/node_modules/@allyhub/slides-core/dist/code.js +1 -1
  369. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  370. package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
  371. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  372. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  373. package/dist/node_modules/@allyhub/slides-core/dist/model.js +1 -1
  374. package/dist/node_modules/@allyhub/slides-core/dist/office-layouts.js +2 -0
  375. package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
  376. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  377. package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
  378. package/dist/node_modules/@allyhub/slides-core/dist/styles/brief.js +2 -0
  379. package/dist/node_modules/@allyhub/slides-core/dist/styles/editorial.js +2 -0
  380. package/dist/node_modules/@allyhub/slides-core/dist/styles/index.js +2 -0
  381. package/dist/node_modules/@allyhub/slides-core/dist/styles/kit.js +2 -0
  382. package/dist/node_modules/@allyhub/slides-core/dist/styles/layouts.js +2 -0
  383. package/dist/node_modules/@allyhub/slides-core/dist/styles/pitch.js +2 -0
  384. package/dist/node_modules/@allyhub/slides-core/dist/styles/stage.js +2 -0
  385. package/dist/node_modules/@allyhub/slides-core/dist/styles/tiles.js +2 -0
  386. package/dist/node_modules/@allyhub/slides-core/dist/theme.js +1 -1
  387. package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
  388. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  389. package/dist/node_modules/@allyhub/slides-extension/dist/check.js +1 -1
  390. package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +2 -2
  391. package/dist/node_modules/@allyhub/slides-extension/dist/deck-fonts.js +1 -1
  392. package/dist/node_modules/@allyhub/slides-extension/dist/project-tools.js +1 -1
  393. package/dist/node_modules/@allyhub/slides-extension/package.json +24 -1
  394. package/dist/node_modules/@allyhub/slides-pptx/dist/charts.js +1 -1
  395. package/dist/node_modules/@allyhub/slides-pptx/dist/fonts.js +1 -1
  396. package/dist/node_modules/@allyhub/slides-pptx/dist/image-size.js +2 -0
  397. package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +3 -3
  398. package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +7 -2
  399. package/dist/node_modules/@allyhub/slides-pptx/dist/import/names.js +1 -1
  400. package/dist/node_modules/@allyhub/slides-pptx/dist/import/script.js +1 -1
  401. package/dist/node_modules/@allyhub/slides-pptx/dist/index.js +1 -1
  402. package/dist/node_modules/@allyhub/slides-pptx/dist/mtx.js +2 -0
  403. package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +3 -2
  404. package/dist/node_modules/@allyhub/slides-pptx/dist/read/chartex.js +3 -0
  405. package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
  406. package/dist/node_modules/@allyhub/slides-pptx/dist/read/index.js +2 -2
  407. package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
  408. package/dist/node_modules/@allyhub/slides-pptx/dist/read/table.js +1 -1
  409. package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
  410. package/dist/node_modules/@allyhub/slides-pptx/dist/read/timing.js +1 -1
  411. package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
  412. package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
  413. package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
  414. package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +3 -2
  415. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  416. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
  417. package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +1 -1
  418. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  419. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  420. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/LICENSE +93 -0
  421. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-italic.woff2 +0 -0
  422. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-normal.woff2 +0 -0
  423. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-italic.woff2 +0 -0
  424. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-normal.woff2 +0 -0
  425. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-italic.woff2 +0 -0
  426. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-normal.woff2 +0 -0
  427. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-italic.woff2 +0 -0
  428. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-normal.woff2 +0 -0
  429. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400-italic.css +1 -0
  430. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400.css +1 -0
  431. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700-italic.css +1 -0
  432. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700.css +1 -0
  433. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400-italic.css +1 -0
  434. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400.css +1 -0
  435. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700-italic.css +1 -0
  436. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700.css +1 -0
  437. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/LICENSE +93 -0
  438. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-400-normal.woff2 +0 -0
  439. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-ext-400-normal.woff2 +0 -0
  440. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-400.css +1 -0
  441. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-ext-400.css +1 -0
  442. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/400-italic.css +1 -79
  443. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/400.css +1 -79
  444. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/700-italic.css +1 -79
  445. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/700.css +1 -79
  446. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/arial.css +1 -316
  447. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +1 -19
  448. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +1 -19
  449. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +1 -19
  450. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +1 -19
  451. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +1 -76
  452. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/400-italic.css +1 -69
  453. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/400.css +1 -69
  454. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/700-italic.css +1 -69
  455. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/700.css +1 -69
  456. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/calibri.css +1 -276
  457. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +1 -79
  458. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +1 -79
  459. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +1 -79
  460. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +1 -79
  461. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +1 -316
  462. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/LICENSE +93 -0
  463. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-italic.woff2 +0 -0
  464. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  465. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-italic.woff2 +0 -0
  466. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-normal.woff2 +0 -0
  467. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-italic.woff2 +0 -0
  468. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-normal.woff2 +0 -0
  469. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-italic.woff2 +0 -0
  470. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-normal.woff2 +0 -0
  471. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400-italic.css +1 -0
  472. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400.css +1 -0
  473. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700-italic.css +1 -0
  474. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700.css +1 -0
  475. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400-italic.css +1 -0
  476. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400.css +1 -0
  477. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700-italic.css +1 -0
  478. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700.css +1 -0
  479. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/LICENSE +93 -0
  480. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-italic.woff2 +0 -0
  481. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-normal.woff2 +0 -0
  482. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-italic.woff2 +0 -0
  483. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-normal.woff2 +0 -0
  484. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-italic.woff2 +0 -0
  485. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-normal.woff2 +0 -0
  486. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-italic.woff2 +0 -0
  487. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-normal.woff2 +0 -0
  488. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400-italic.css +1 -0
  489. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400.css +1 -0
  490. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700-italic.css +1 -0
  491. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700.css +1 -0
  492. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400-italic.css +1 -0
  493. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400.css +1 -0
  494. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700-italic.css +1 -0
  495. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700.css +1 -0
  496. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/LICENSE +93 -0
  497. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-italic.woff2 +0 -0
  498. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-normal.woff2 +0 -0
  499. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-italic.woff2 +0 -0
  500. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-normal.woff2 +0 -0
  501. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-italic.woff2 +0 -0
  502. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-normal.woff2 +0 -0
  503. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-italic.woff2 +0 -0
  504. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-normal.woff2 +0 -0
  505. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400-italic.css +1 -0
  506. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400.css +1 -0
  507. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700-italic.css +1 -0
  508. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700.css +1 -0
  509. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400-italic.css +1 -0
  510. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400.css +1 -0
  511. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700-italic.css +1 -0
  512. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700.css +1 -0
  513. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-color-emoji/emoji.css +1 -8
  514. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/400.css +1 -1009
  515. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/700.css +1 -1009
  516. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/microsoft-yahei.css +1 -2018
  517. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/LICENSE +93 -0
  518. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-italic.woff2 +0 -0
  519. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-normal.woff2 +0 -0
  520. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-italic.woff2 +0 -0
  521. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-normal.woff2 +0 -0
  522. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-italic.woff2 +0 -0
  523. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-normal.woff2 +0 -0
  524. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-italic.woff2 +0 -0
  525. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-normal.woff2 +0 -0
  526. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400-italic.css +1 -0
  527. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400.css +1 -0
  528. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700-italic.css +1 -0
  529. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700.css +1 -0
  530. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400-italic.css +1 -0
  531. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400.css +1 -0
  532. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700-italic.css +1 -0
  533. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700.css +1 -0
  534. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +1 -79
  535. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +1 -79
  536. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +1 -79
  537. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +1 -79
  538. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +1 -316
  539. package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
  540. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +42 -0
  541. package/dist/node_modules/@allyhub/stage-page/dist/style-faces.js +2 -0
  542. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  543. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +96 -92
  544. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  545. package/dist/node_modules/@allyhub/telemetry/dist/doc.js +1 -1
  546. package/dist/node_modules/@allyhub/telemetry/dist/errors.js +1 -1
  547. package/dist/node_modules/@allyhub/telemetry/dist/limit.js +2 -0
  548. package/dist/node_modules/@allyhub/telemetry/dist/telemetry.js +2 -2
  549. package/dist/node_modules/@allyhub/telemetry/package.json +5 -1
  550. package/dist/node_modules/@allyhub/text-extension/markup/allyhub.yaml +2 -0
  551. package/dist/node_modules/@allyhub/text-extension/markup-file/allyhub.yaml +2 -0
  552. package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
  553. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
  554. package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -1
  555. package/dist/node_modules/@allyhub/video-core/dist/seams.js +1 -1
  556. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  557. package/dist/node_modules/@allyhub/video-extension/dist/build-plugins.js +1 -1
  558. package/dist/node_modules/@allyhub/video-extension/dist/cli/reference-text.js +1 -1
  559. package/dist/node_modules/@allyhub/video-extension/dist/inspect/index.js +1 -1
  560. package/dist/node_modules/@allyhub/video-extension/dist/inspect/joins.js +1 -1
  561. package/dist/node_modules/@allyhub/video-extension/dist/inspect/loop.js +3 -0
  562. package/dist/node_modules/@allyhub/video-extension/package.json +7 -26
  563. package/dist/node_modules/@allyhub/video-measure/dist/check.js +2 -2
  564. package/dist/node_modules/@allyhub/video-measure/dist/index.js +1 -1
  565. package/dist/node_modules/@allyhub/video-measure/dist/plans.js +2 -2
  566. package/dist/node_modules/@allyhub/video-measure/dist/reference/video.js +1 -1
  567. package/dist/node_modules/@allyhub/video-measure/dist/seams.js +1 -1
  568. package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
  569. package/dist/node_modules/@allyhub/video-measure/package.json +5 -1
  570. package/dist/node_modules/@allyhub/video-sdk/dist/config.js +2 -0
  571. package/dist/node_modules/@allyhub/video-sdk/dist/free.js +1 -1
  572. package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +1 -1
  573. package/dist/node_modules/@allyhub/video-sdk/package.json +5 -1
  574. package/dist/node_modules/@allyhub/website/dist/index.js +1 -1
  575. package/dist/node_modules/@allyhub/website/dist/website.js +2 -2
  576. package/dist/node_modules/@allyhub/website/package.json +1 -1
  577. package/dist/node_modules/@allyhub/website-extension/dist/build.js +1 -1
  578. package/dist/node_modules/@allyhub/website-extension/package.json +6 -6
  579. package/dist/node_modules/@allyhub/x-extension/dist/build.js +1 -1
  580. package/dist/node_modules/@allyhub/x-extension/package.json +8 -4
  581. package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +3 -3
  582. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  583. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  584. package/dist/node_modules/@allyhub/x-view/src/style.css +1 -709
  585. package/dist/package.json +14 -14
  586. package/dist/project.js +1 -1
  587. package/dist/resources.js +1 -1
  588. package/dist/sdk-docs.js +1 -1
  589. package/dist/self-upgrade.js +2 -0
  590. package/dist/slot.js +4 -0
  591. package/dist/telemetry.js +1 -1
  592. package/dist/text/batch-text.js +1 -1
  593. package/dist/text/facts-text.js +5 -5
  594. package/dist/text/format.js +2 -2
  595. package/dist/update-notice.js +3 -0
  596. package/dist/version.js +1 -1
  597. package/dist/works.js +1 -1
  598. package/editor-web/assets/{abnfDiagram-WEYOIA3C-Hy4-O0wN.js → abnfDiagram-WEYOIA3C-BkVJMd53.js} +1 -1
  599. package/editor-web/assets/{architecture-WOLXFQ4H-43JEVxqz.js → architecture-WOLXFQ4H-C6rnaynZ.js} +1 -1
  600. package/editor-web/assets/{architectureDiagram-ZHVYKT53-7bFTl41n.js → architectureDiagram-ZHVYKT53-D3vrh8LK.js} +1 -1
  601. package/editor-web/assets/arrow-down-D-QZrqcz.js +1 -0
  602. package/editor-web/assets/arrow-up-B1zjKUHX.js +1 -0
  603. package/editor-web/assets/article-DHf6mOY_.js +7 -0
  604. package/editor-web/assets/article-Dns1-Xh-.js +3 -0
  605. package/editor-web/assets/{audio-lines-PZj77e7t.js → audio-lines-BFoW_IeO.js} +1 -1
  606. package/editor-web/assets/bar-button-CKPfx2AB.js +1 -0
  607. package/editor-web/assets/{blockDiagram-RJAE7QA3-DcoNo1WH.js → blockDiagram-RJAE7QA3-BKngt8H7.js} +1 -1
  608. package/editor-web/assets/{browser-C9NP0ZYz.js → browser-DEGNhKTV.js} +1 -1
  609. package/editor-web/assets/{c4Diagram-XDPPPE54-CsMt61gx.js → c4Diagram-XDPPPE54-j7sUELqF.js} +1 -1
  610. package/editor-web/assets/calc-worker-Cr4a0xmt.js +168 -0
  611. package/editor-web/assets/channel-CVWSV3su.js +1 -0
  612. package/editor-web/assets/{chart-no-axes-column-Be0lFcGF.js → chart-no-axes-column-Dyy25XZ_.js} +1 -1
  613. package/editor-web/assets/chip-Bn_9JRRG.js +1 -0
  614. package/editor-web/assets/{chunk-2E7WHVMD-fj-TJIRG.js → chunk-2E7WHVMD-BXa-uRSi.js} +1 -1
  615. package/editor-web/assets/{chunk-4EMNKR2T-Du5cRy-Y.js → chunk-4EMNKR2T-B3ntcsZN.js} +1 -1
  616. package/editor-web/assets/{chunk-55XCU76K-BHXxBBtm.js → chunk-55XCU76K-AMvnFwUg.js} +1 -1
  617. package/editor-web/assets/{chunk-7S6XSTFO-R5HW6X5I.js → chunk-7S6XSTFO-BA6esfFu.js} +1 -1
  618. package/editor-web/assets/{chunk-AQDTSKZB-C98F2BUb.js → chunk-AQDTSKZB-BT_vANXs.js} +1 -1
  619. package/editor-web/assets/{chunk-DSNLSHJZ-NIGsJ2cK.js → chunk-DSNLSHJZ-DoUgmzGB.js} +1 -1
  620. package/editor-web/assets/{chunk-HAGFOTED-BtHxtfW5.js → chunk-HAGFOTED-DtnIrCZb.js} +1 -1
  621. package/editor-web/assets/{chunk-HNE4Q36P-BI8i7Vkk.js → chunk-HNE4Q36P-BlPwQx3_.js} +1 -1
  622. package/editor-web/assets/{chunk-NQOKRVIF-DP_Z_zEA.js → chunk-NQOKRVIF-D2r7jp2r.js} +1 -1
  623. package/editor-web/assets/{chunk-UHW7PFBP-C_8bui28.js → chunk-UHW7PFBP-Cmc0_F5o.js} +1 -1
  624. package/editor-web/assets/{chunk-VQ5W62QI-CKZgzWB2.js → chunk-VQ5W62QI-nJSMqAr0.js} +1 -1
  625. package/editor-web/assets/{chunk-WQQL4CDK-Ff4DgCht.js → chunk-WQQL4CDK-Btq2nbF6.js} +1 -1
  626. package/editor-web/assets/{chunk-YZO67HFG-Csbx1-pi.js → chunk-YZO67HFG-DTbcCoGt.js} +1 -1
  627. package/editor-web/assets/{chunk-ZAUX2LTX-BO1kcV3w.js → chunk-ZAUX2LTX-DVwkg-2N.js} +1 -1
  628. package/editor-web/assets/{chunk-ZCHMQSOR-CxeNZYZG.js → chunk-ZCHMQSOR-BV39jOOE.js} +1 -1
  629. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-D8eHQa5i.js → classDiagram-v2-4MYWR3UA-Cj74-fhM.js} +1 -1
  630. package/editor-web/assets/code-Ch6AB5bZ.js +1 -0
  631. package/editor-web/assets/collaborator-XiHOxwGM.js +1 -0
  632. package/editor-web/assets/{copy-CuJSs0nI.js → copy-SoaMYqsN.js} +1 -1
  633. package/editor-web/assets/{createLucideIcon-lm_6n8YT.js → createLucideIcon-euu7Wcd9.js} +1 -1
  634. package/editor-web/assets/{cynefin-EF2NZ3EQ-lIUY3WQQ.js → cynefin-EF2NZ3EQ-C0CkiipV.js} +1 -1
  635. package/editor-web/assets/{cynefinDiagram-WF24UDRP-CFOOhEEs.js → cynefinDiagram-WF24UDRP-hdsnJ4cI.js} +1 -1
  636. package/editor-web/assets/{dagre-NK4GIZVX-DdHVup2I.js → dagre-NK4GIZVX-CC7WSgaK.js} +1 -1
  637. package/editor-web/assets/deck-DQpNIS2p.js +1 -0
  638. package/editor-web/assets/{diagram-CBK3MWTC-CFAD9Y2B.js → diagram-CBK3MWTC-DmaVm13J.js} +1 -1
  639. package/editor-web/assets/{diagram-I5XIIV2D-DZJAn95A.js → diagram-I5XIIV2D-De8jqp7b.js} +1 -1
  640. package/editor-web/assets/{diagram-ODIL2UCW-BcIeYTaY.js → diagram-ODIL2UCW-B5pBTulX.js} +1 -1
  641. package/editor-web/assets/{diagram-PFBEJUXE-CnZmh_fl.js → diagram-PFBEJUXE-BYsXg5_w.js} +1 -1
  642. package/editor-web/assets/{diagram-RJA3I4VV-DpDd9rGx.js → diagram-RJA3I4VV-DZ8f6bYe.js} +1 -1
  643. package/editor-web/assets/{diagram-TYUNFSNR-ouGiUQcR.js → diagram-TYUNFSNR-qXHUsauD.js} +1 -1
  644. package/editor-web/assets/dist--z0ZHp4T.js +16 -0
  645. package/editor-web/assets/dist-9kuRjUTN.js +41 -0
  646. package/editor-web/assets/dist-B3rd02Cg.js +6 -0
  647. package/editor-web/assets/dist-B5GOGGEe.js +1 -0
  648. package/editor-web/assets/dist-Bx6q9kCu.js +1 -0
  649. package/editor-web/assets/dist-C4hHtrJr.js +1 -0
  650. package/editor-web/assets/dist-CCXJewsi.js +19 -0
  651. package/editor-web/assets/dist-CfK2BLl8.js +4 -0
  652. package/editor-web/assets/dist-Cmux3oJ_.js +1 -0
  653. package/editor-web/assets/dist-Cspf85KV.js +6 -0
  654. package/editor-web/assets/dist-DA72-4WB.js +82 -0
  655. package/editor-web/assets/{dist-DruvDNQe.js → dist-DAhe-kFC.js} +5 -5
  656. package/editor-web/assets/dist-DIJnhQFK.js +9 -0
  657. package/editor-web/assets/dist-DOrGo1GD.js +19 -0
  658. package/editor-web/assets/{dist-Bd8IxQPP.js → dist-DQ6RpEJD.js} +2 -2
  659. package/editor-web/assets/dist-DjiCHlSu.js +35 -0
  660. package/editor-web/assets/dist-Do4a40Wn.js +19 -0
  661. package/editor-web/assets/dist-FKEWS3Co.js +547 -0
  662. package/editor-web/assets/dist-QKd2i6kG.js +5 -0
  663. package/editor-web/assets/dist-SGnOfLhx.js +24 -0
  664. package/editor-web/assets/dist-VmVB7tl4.js +3 -0
  665. package/editor-web/assets/{docx-draw-C4aiB8HI.js → docx-draw-L54blreB.js} +1 -1
  666. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-HRjVlbUf.js → ebnfDiagram-V4P3TTPT-B7-IfVI-.js} +1 -1
  667. package/editor-web/assets/{elk-QONTBCTQ-BFmtKyOf.js → elk-QONTBCTQ-Gj_WaeBn.js} +1 -1
  668. package/editor-web/assets/{erDiagram-KYQIGQAA-C9gcGEgK.js → erDiagram-KYQIGQAA-BDF6Qoqx.js} +1 -1
  669. package/editor-web/assets/esm-PQD5Pn8a.js +21 -0
  670. package/editor-web/assets/{eventmodeling-K75KTNOO-Bpma5Bdb.js → eventmodeling-K75KTNOO-elxVXXEe.js} +1 -1
  671. package/editor-web/assets/{file-question-mark-DlIjUK37.js → file-question-mark-PeZgyqkK.js} +1 -1
  672. package/editor-web/assets/flowDiagram-IUGLLWBU-B-25n8zE.js +1 -0
  673. package/editor-web/assets/{ganttDiagram-R7GPNTJY-CE5ut4C3.js → ganttDiagram-R7GPNTJY-CEogW3jW.js} +1 -1
  674. package/editor-web/assets/{gitGraph-VSP46ZUC-Dva3iGx2.js → gitGraph-VSP46ZUC-Bh9cRWFa.js} +1 -1
  675. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-CJXFsAWp.js → gitGraphDiagram-PDYL7XHY-BQAvdM_V.js} +1 -1
  676. package/editor-web/assets/{group-BdrTp7gi.js → group-DwM2yqU8.js} +1 -1
  677. package/editor-web/assets/hint-CbwoSBMw.js +1 -0
  678. package/editor-web/assets/index-CXisi0Cj.css +2 -0
  679. package/editor-web/assets/index-wMlfx8aT.js +28 -0
  680. package/editor-web/assets/{info-OHQRW6UA-BY0AOfex.js → info-OHQRW6UA-CdPrqere.js} +1 -1
  681. package/editor-web/assets/{infoDiagram-MVDRKAX5-4Up1gMvC.js → infoDiagram-MVDRKAX5-uwIMeP44.js} +1 -1
  682. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-BkvB9Qbn.js → ishikawaDiagram-HPEHV2GE-rtfvqK7E.js} +1 -1
  683. package/editor-web/assets/iso-UwGLGD3F.js +1 -0
  684. package/editor-web/assets/{italic-zw4_eUNF.js → italic-BV7iHxoP.js} +1 -1
  685. package/editor-web/assets/{journeyDiagram-BOSHW7O7-BxV09WdR.js → journeyDiagram-BOSHW7O7-mmhfIyVG.js} +1 -1
  686. package/editor-web/assets/{kanban-definition-FNSA4HC5-zTJtIDPG.js → kanban-definition-FNSA4HC5-Fe7jBsi-.js} +1 -1
  687. package/editor-web/assets/{link-DopSU3aa.js → link-CFOv3nz-.js} +1 -1
  688. package/editor-web/assets/{mermaid-parser.core-BWT9UQh_.js → mermaid-parser.core-BxOSjBH9.js} +3 -3
  689. package/editor-web/assets/{mermaid.core-DFf_Vg5X.js → mermaid.core-BOln9YdH.js} +4 -4
  690. package/editor-web/assets/{mindmap-definition-6OY57UG3-BYexiugS.js → mindmap-definition-6OY57UG3-M3Q1LOtO.js} +1 -1
  691. package/editor-web/assets/minus-ngE8owxs.js +1 -0
  692. package/editor-web/assets/{packet-JDAUHWVQ-DX_kSrI6.js → packet-JDAUHWVQ-Dbb0TUG6.js} +1 -1
  693. package/editor-web/assets/{pegDiagram-ECIUJNBX-I3SrcMLp.js → pegDiagram-ECIUJNBX-BZMRpSFC.js} +1 -1
  694. package/editor-web/assets/{pie-XZMESJXO-BmAFSw3E.js → pie-XZMESJXO-Ctm9XdKp.js} +1 -1
  695. package/editor-web/assets/{pieDiagram-GNMPY74T-DIZKcme5.js → pieDiagram-GNMPY74T-cGbs5ZTl.js} +1 -1
  696. package/editor-web/assets/progress-DZQTiRLv.js +6 -0
  697. package/editor-web/assets/{quadrantDiagram-D57K4MC3-CO3oSqpQ.js → quadrantDiagram-D57K4MC3-BUe_zsxT.js} +1 -1
  698. package/editor-web/assets/{radar-ABXABTNO-D5CkFrrb.js → radar-ABXABTNO-CCmKtqLs.js} +1 -1
  699. package/editor-web/assets/{railroad-I3PHUGI6-BeKY1p0K.js → railroad-I3PHUGI6-k-yhjhjA.js} +1 -1
  700. package/editor-web/assets/{railroad-abnf-LNEFI6M7-CIYV9_3-.js → railroad-abnf-LNEFI6M7-B-PvntB3.js} +1 -1
  701. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DN0zDl6d.js → railroad-ebnf-DWYD2UWJ-Ds2rua1h.js} +1 -1
  702. package/editor-web/assets/{railroad-peg-JR7BVNR7-Bd_GcO24.js → railroad-peg-JR7BVNR7-jNZ2wEp2.js} +1 -1
  703. package/editor-web/assets/{railroadDiagram-Y72NRBL7-DlFoiMhb.js → railroadDiagram-Y72NRBL7-CTqSQ15w.js} +1 -1
  704. package/editor-web/assets/react-Byupo4pA.js +1 -0
  705. package/editor-web/assets/replace-CLLMtF4e.js +1 -0
  706. package/editor-web/assets/{requirementDiagram-EQYSW5RA-LWAEz8Gy.js → requirementDiagram-EQYSW5RA-CUblhR5M.js} +1 -1
  707. package/editor-web/assets/ribbon-DajdQ_Ya.js +1 -0
  708. package/editor-web/assets/row-Bei9HNEe.js +1 -0
  709. package/editor-web/assets/{sankeyDiagram-SY24JHO5-B_pZGwUK.js → sankeyDiagram-SY24JHO5-nSz6zDX3.js} +1 -1
  710. package/editor-web/assets/schemas-C21MyseF.js +1 -0
  711. package/editor-web/assets/{iso-ahTwmFwH.js → schemas-DlRAoVtq.js} +1 -1
  712. package/editor-web/assets/{scissors-B_xOiUhd.js → scissors-m6QcoEf2.js} +1 -1
  713. package/editor-web/assets/search-D75Bi2GU.js +1 -0
  714. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-bNhyCq0C.js → sequenceDiagram-BLEHNHQU-DxTpOYuo.js} +1 -1
  715. package/editor-web/assets/{session-Beijw9EK.js → session-BhClkDyr.js} +1 -1
  716. package/editor-web/assets/{sigma-DSUsJhMn.js → sigma-B4AWtnVA.js} +1 -1
  717. package/editor-web/assets/snapshots-DwGHDN3t.js +1 -0
  718. package/editor-web/assets/sound-DkR3qxSt.js +1 -0
  719. package/editor-web/assets/split-DBAbwPZ5.js +3 -0
  720. package/editor-web/assets/{square-arrow-out-up-right-DF5dvsSp.js → square-arrow-out-up-right-1NqFsNDe.js} +1 -1
  721. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DI-oM3qz.js → stateDiagram-v2-A6IESKWZ-C3e14iHY.js} +1 -1
  722. package/editor-web/assets/{sticky-note-BdkIu5_D.js → sticky-note-s4QfzaBB.js} +1 -1
  723. package/editor-web/assets/surface-CIF0Ae0z.js +1 -0
  724. package/editor-web/assets/swatch-BUzr_XmH.js +1 -0
  725. package/editor-web/assets/{swimlanes-B3ENRKFQ-awDmoLdW.js → swimlanes-B3ENRKFQ-DPPdzNzu.js} +1 -1
  726. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B8n3zOw_.js +8 -0
  727. package/editor-web/assets/switch-DrZxoPQS.js +1 -0
  728. package/editor-web/assets/{syntax-CU_WPKxt.js → syntax-emXV4DnN.js} +1 -1
  729. package/editor-web/assets/table-BW43XXVd.js +1 -0
  730. package/editor-web/assets/tabs-BwU2E7bU.js +1 -0
  731. package/editor-web/assets/text-wrap-Baus6l-V.js +1 -0
  732. package/editor-web/assets/textarea-BX_ax3X8.js +1 -0
  733. package/editor-web/assets/{timeline-definition-JXYKGLGB-CayduPvL.js → timeline-definition-JXYKGLGB-DRTJ1_Er.js} +1 -1
  734. package/editor-web/assets/tolerant-DM9s0Mt1.js +1 -0
  735. package/editor-web/assets/{treeView-D4JQ5SDB-BVEuNzCO.js → treeView-D4JQ5SDB-BYJ_m-i5.js} +1 -1
  736. package/editor-web/assets/{treemap-SAJKECNS-BOB14HP3.js → treemap-SAJKECNS-BcU6I6Rg.js} +1 -1
  737. package/editor-web/assets/type-CvZ0HZsV.js +41 -0
  738. package/editor-web/assets/{undo-2-C47jrRp5.js → undo-2-DCbMWoug.js} +1 -1
  739. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-DxT99uaq.js → usecaseDiagram-WPOLBNNX-YV92pS4o.js} +1 -1
  740. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-CWUKom-r.js → vennDiagram-Q3Y3IDCW-oAvfHZtf.js} +1 -1
  741. package/editor-web/assets/video-SJvDRCJK.js +1 -0
  742. package/editor-web/assets/{wardley-7MLQ67FV-BAQyTneD.js → wardley-7MLQ67FV-BLNiqxtt.js} +1 -1
  743. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-CiIYz4lZ.js → wardleyDiagram-IVAIDKWA-SppgC6xW.js} +1 -1
  744. package/editor-web/assets/{whole-word-D3ZAtnkw.js → whole-word-C9TkGBCY.js} +1 -1
  745. package/editor-web/assets/{words-0Ww2RyT4.js → words-BUlNNuH2.js} +3 -3
  746. package/editor-web/assets/words-zMedmPWc.js +3 -0
  747. package/editor-web/assets/workbook-BZKYx4WB.js +41 -0
  748. package/editor-web/assets/{xychartDiagram-4URNHDU4-D_D5IGmd.js → xychartDiagram-4URNHDU4-BHMn_jwJ.js} +1 -1
  749. package/editor-web/assets/{zoom-in-PgsC94hP.js → zoom-in-yAGKspfC.js} +1 -1
  750. package/editor-web/index.html +9 -8
  751. package/package.json +3 -3
  752. package/CHANGELOG.md +0 -243
  753. package/dist/commands/render.js +0 -3
  754. package/dist/node_modules/@allyhub/browser/dist/browser.d.ts +0 -24
  755. package/dist/node_modules/@allyhub/browser/dist/capture.d.ts +0 -61
  756. package/dist/node_modules/@allyhub/browser/dist/cdp.d.ts +0 -51
  757. package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +0 -29
  758. package/dist/node_modules/@allyhub/browser/dist/flags.d.ts +0 -13
  759. package/dist/node_modules/@allyhub/browser/dist/frames.d.ts +0 -35
  760. package/dist/node_modules/@allyhub/browser/dist/html.d.ts +0 -19
  761. package/dist/node_modules/@allyhub/browser/dist/index.d.ts +0 -10
  762. package/dist/node_modules/@allyhub/browser/dist/launch.d.ts +0 -35
  763. package/dist/node_modules/@allyhub/browser/dist/page.d.ts +0 -74
  764. package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +0 -18
  765. package/dist/node_modules/@allyhub/browser/dist/server.d.ts +0 -26
  766. package/dist/node_modules/@allyhub/build/dist/build-plugins.d.ts +0 -91
  767. package/dist/node_modules/@allyhub/build/dist/cli-command.d.ts +0 -84
  768. package/dist/node_modules/@allyhub/build/dist/code.d.ts +0 -26
  769. package/dist/node_modules/@allyhub/build/dist/content.d.ts +0 -64
  770. package/dist/node_modules/@allyhub/build/dist/data.d.ts +0 -11
  771. package/dist/node_modules/@allyhub/build/dist/evaluate.d.ts +0 -44
  772. package/dist/node_modules/@allyhub/build/dist/file-check.d.ts +0 -35
  773. package/dist/node_modules/@allyhub/build/dist/files.d.ts +0 -4
  774. package/dist/node_modules/@allyhub/build/dist/fonts.d.ts +0 -26
  775. package/dist/node_modules/@allyhub/build/dist/generated.d.ts +0 -29
  776. package/dist/node_modules/@allyhub/build/dist/imports.d.ts +0 -17
  777. package/dist/node_modules/@allyhub/build/dist/index.d.ts +0 -37
  778. package/dist/node_modules/@allyhub/build/dist/inspect-view.d.ts +0 -119
  779. package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +0 -530
  780. package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +0 -9
  781. package/dist/node_modules/@allyhub/build/dist/matrix.d.ts +0 -19
  782. package/dist/node_modules/@allyhub/build/dist/media.d.ts +0 -10
  783. package/dist/node_modules/@allyhub/build/dist/messages.d.ts +0 -60
  784. package/dist/node_modules/@allyhub/build/dist/meta-worker.d.ts +0 -59
  785. package/dist/node_modules/@allyhub/build/dist/meta.d.ts +0 -24
  786. package/dist/node_modules/@allyhub/build/dist/model-info.d.ts +0 -6
  787. package/dist/node_modules/@allyhub/build/dist/move-refs.d.ts +0 -16
  788. package/dist/node_modules/@allyhub/build/dist/places.d.ts +0 -23
  789. package/dist/node_modules/@allyhub/build/dist/plugin.d.ts +0 -50
  790. package/dist/node_modules/@allyhub/build/dist/prepare.d.ts +0 -138
  791. package/dist/node_modules/@allyhub/build/dist/project-root.d.ts +0 -19
  792. package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +0 -136
  793. package/dist/node_modules/@allyhub/build/dist/references.d.ts +0 -6
  794. package/dist/node_modules/@allyhub/build/dist/scan.d.ts +0 -45
  795. package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +0 -80
  796. package/dist/node_modules/@allyhub/build/dist/takes.d.ts +0 -9
  797. package/dist/node_modules/@allyhub/build/dist/types.d.ts +0 -11
  798. package/dist/node_modules/@allyhub/build/dist/uses.d.ts +0 -44
  799. package/dist/node_modules/@allyhub/build/dist/version.d.ts +0 -56
  800. package/dist/node_modules/@allyhub/build/dist/vite.d.ts +0 -115
  801. package/dist/node_modules/@allyhub/build/dist/work.d.ts +0 -38
  802. package/dist/node_modules/@allyhub/cloud/dist/blobs.d.ts +0 -48
  803. package/dist/node_modules/@allyhub/cloud/dist/call.d.ts +0 -91
  804. package/dist/node_modules/@allyhub/cloud/dist/catalog.d.ts +0 -12
  805. package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +0 -64
  806. package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +0 -40
  807. package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +0 -76
  808. package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +0 -14
  809. package/dist/node_modules/@allyhub/cloud/dist/errors.d.ts +0 -24
  810. package/dist/node_modules/@allyhub/cloud/dist/hashes.d.ts +0 -43
  811. package/dist/node_modules/@allyhub/cloud/dist/index.d.ts +0 -19
  812. package/dist/node_modules/@allyhub/cloud/dist/keychain.d.ts +0 -18
  813. package/dist/node_modules/@allyhub/cloud/dist/loopback.d.ts +0 -22
  814. package/dist/node_modules/@allyhub/cloud/dist/mail.d.ts +0 -16
  815. package/dist/node_modules/@allyhub/cloud/dist/pkce.d.ts +0 -11
  816. package/dist/node_modules/@allyhub/cloud/dist/records.d.ts +0 -42
  817. package/dist/node_modules/@allyhub/cloud/dist/signin-worker.d.ts +0 -2
  818. package/dist/node_modules/@allyhub/cloud/dist/signin.d.ts +0 -48
  819. package/dist/node_modules/@allyhub/cloud/dist/sites.d.ts +0 -20
  820. package/dist/node_modules/@allyhub/cloud/dist/token.d.ts +0 -20
  821. package/dist/node_modules/@allyhub/cloud/dist/uploads.d.ts +0 -58
  822. package/dist/node_modules/@allyhub/cloud/dist/voice.d.ts +0 -22
  823. package/dist/node_modules/@allyhub/jobs/dist/index.d.ts +0 -3
  824. package/dist/node_modules/@allyhub/jobs/dist/jobs.d.ts +0 -139
  825. package/dist/node_modules/@allyhub/jobs/dist/show.d.ts +0 -41
  826. package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +0 -195
  827. package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +0 -8
  828. package/dist/node_modules/@allyhub/measure/dist/image.d.ts +0 -16
  829. package/dist/node_modules/@allyhub/measure/dist/index.d.ts +0 -4
  830. package/dist/node_modules/@allyhub/media/dist/analysis.d.ts +0 -25
  831. package/dist/node_modules/@allyhub/media/dist/audio.d.ts +0 -16
  832. package/dist/node_modules/@allyhub/media/dist/beats.d.ts +0 -100
  833. package/dist/node_modules/@allyhub/media/dist/cache.d.ts +0 -26
  834. package/dist/node_modules/@allyhub/media/dist/errors.d.ts +0 -34
  835. package/dist/node_modules/@allyhub/media/dist/fetch.d.ts +0 -11
  836. package/dist/node_modules/@allyhub/media/dist/grid.d.ts +0 -101
  837. package/dist/node_modules/@allyhub/media/dist/index.d.ts +0 -21
  838. package/dist/node_modules/@allyhub/media/dist/picture.d.ts +0 -130
  839. package/dist/node_modules/@allyhub/media/dist/probe.d.ts +0 -52
  840. package/dist/node_modules/@allyhub/media/dist/progress.d.ts +0 -16
  841. package/dist/node_modules/@allyhub/media/dist/run.d.ts +0 -25
  842. package/dist/node_modules/@allyhub/media/dist/sheet.d.ts +0 -67
  843. package/dist/node_modules/@allyhub/media/dist/shots.d.ts +0 -110
  844. package/dist/node_modules/@allyhub/media/dist/sync.d.ts +0 -156
  845. package/dist/node_modules/@allyhub/media/dist/tools.d.ts +0 -25
  846. package/dist/node_modules/@allyhub/media/dist/video.d.ts +0 -35
  847. package/dist/node_modules/@allyhub/media/dist/vision/cache.d.ts +0 -42
  848. package/dist/node_modules/@allyhub/media/dist/vision/probe.d.ts +0 -39
  849. package/dist/node_modules/@allyhub/media/dist/vision/types.d.ts +0 -2
  850. package/dist/node_modules/@allyhub/media/dist/voice-shape.d.ts +0 -51
  851. package/dist/node_modules/@allyhub/model/dist/authoring.d.ts +0 -48
  852. package/dist/node_modules/@allyhub/model/dist/bevel-attributes.d.ts +0 -19
  853. package/dist/node_modules/@allyhub/model/dist/bevel-collapse.d.ts +0 -12
  854. package/dist/node_modules/@allyhub/model/dist/bevel-corner-plan.d.ts +0 -24
  855. package/dist/node_modules/@allyhub/model/dist/bevel-deform.d.ts +0 -5
  856. package/dist/node_modules/@allyhub/model/dist/bevel-fans.d.ts +0 -12
  857. package/dist/node_modules/@allyhub/model/dist/bevel-junction.d.ts +0 -16
  858. package/dist/node_modules/@allyhub/model/dist/bevel-marks.d.ts +0 -14
  859. package/dist/node_modules/@allyhub/model/dist/bevel-metric.d.ts +0 -4
  860. package/dist/node_modules/@allyhub/model/dist/bevel-mixed.d.ts +0 -12
  861. package/dist/node_modules/@allyhub/model/dist/bevel-offsets.d.ts +0 -22
  862. package/dist/node_modules/@allyhub/model/dist/bevel-patch.d.ts +0 -45
  863. package/dist/node_modules/@allyhub/model/dist/bevel-profile.d.ts +0 -13
  864. package/dist/node_modules/@allyhub/model/dist/bevel-projection.d.ts +0 -10
  865. package/dist/node_modules/@allyhub/model/dist/bevel-reflex.d.ts +0 -10
  866. package/dist/node_modules/@allyhub/model/dist/bevel-square-out.d.ts +0 -18
  867. package/dist/node_modules/@allyhub/model/dist/bevel-strips.d.ts +0 -8
  868. package/dist/node_modules/@allyhub/model/dist/bmesh-cycles.d.ts +0 -52
  869. package/dist/node_modules/@allyhub/model/dist/build-cache.d.ts +0 -42
  870. package/dist/node_modules/@allyhub/model/dist/build-job.d.ts +0 -34
  871. package/dist/node_modules/@allyhub/model/dist/build-worker.d.ts +0 -2
  872. package/dist/node_modules/@allyhub/model/dist/build.d.ts +0 -67
  873. package/dist/node_modules/@allyhub/model/dist/cancel.d.ts +0 -8
  874. package/dist/node_modules/@allyhub/model/dist/curve-math.d.ts +0 -21
  875. package/dist/node_modules/@allyhub/model/dist/curve-mesh.d.ts +0 -30
  876. package/dist/node_modules/@allyhub/model/dist/evaluation-guard.d.ts +0 -11
  877. package/dist/node_modules/@allyhub/model/dist/export.d.ts +0 -12
  878. package/dist/node_modules/@allyhub/model/dist/mesh-queries.d.ts +0 -34
  879. package/dist/node_modules/@allyhub/model/dist/names.d.ts +0 -9
  880. package/dist/node_modules/@allyhub/model/dist/png.d.ts +0 -12
  881. package/dist/node_modules/@allyhub/model/dist/polygon-triangulation.d.ts +0 -4
  882. package/dist/node_modules/@allyhub/model/dist/program-location.d.ts +0 -7
  883. package/dist/node_modules/@allyhub/model/dist/report.d.ts +0 -70
  884. package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +0 -21
  885. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +0 -4
  886. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +0 -17
  887. package/dist/node_modules/@allyhub/piece/dist/page/runtimes.d.ts +0 -9
  888. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +0 -661
  889. package/dist/node_modules/@allyhub/protocol/dist/account.js +0 -2
  890. package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +0 -30
  891. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +0 -200
  892. package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +0 -44
  893. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +0 -68
  894. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +0 -77
  895. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +0 -2
  896. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +0 -577
  897. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +0 -674
  898. package/dist/node_modules/@allyhub/protocol/dist/errors.d.ts +0 -7
  899. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +0 -803
  900. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +0 -103
  901. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +0 -247
  902. package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +0 -8
  903. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +0 -38
  904. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +0 -91
  905. package/dist/node_modules/@allyhub/protocol/dist/jsonrpc.d.ts +0 -83
  906. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +0 -144
  907. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +0 -274
  908. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +0 -211
  909. package/dist/node_modules/@allyhub/protocol/dist/open.d.ts +0 -13
  910. package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +0 -134
  911. package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +0 -59
  912. package/dist/node_modules/@allyhub/protocol/dist/peer.js +0 -2
  913. package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +0 -21
  914. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +0 -125
  915. package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +0 -47
  916. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +0 -191
  917. package/dist/node_modules/@allyhub/protocol/dist/routes.d.ts +0 -14
  918. package/dist/node_modules/@allyhub/protocol/dist/routes.js +0 -2
  919. package/dist/node_modules/@allyhub/protocol/dist/runtimes.d.ts +0 -96
  920. package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +0 -35
  921. package/dist/node_modules/@allyhub/protocol/dist/shape.js +0 -2
  922. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +0 -156
  923. package/dist/node_modules/@allyhub/protocol/dist/shares.js +0 -2
  924. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +0 -34
  925. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +0 -2
  926. package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +0 -298
  927. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +0 -503
  928. package/dist/node_modules/@allyhub/protocol/dist/sources.d.ts +0 -14
  929. package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +0 -264
  930. package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +0 -2
  931. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +0 -18
  932. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +0 -2
  933. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +0 -97
  934. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +0 -2
  935. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +0 -196
  936. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +0 -578
  937. package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +0 -71
  938. package/dist/node_modules/@allyhub/protocol/dist/turns.js +0 -2
  939. package/dist/node_modules/@allyhub/runtimes/dist/bundled.d.ts +0 -10
  940. package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +0 -14
  941. package/dist/node_modules/@allyhub/runtimes/dist/download.d.ts +0 -38
  942. package/dist/node_modules/@allyhub/runtimes/dist/errors.d.ts +0 -20
  943. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +0 -15
  944. package/dist/node_modules/@allyhub/runtimes/dist/home.d.ts +0 -2
  945. package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +0 -12
  946. package/dist/node_modules/@allyhub/runtimes/dist/lock.d.ts +0 -14
  947. package/dist/node_modules/@allyhub/runtimes/dist/manifest.d.ts +0 -3
  948. package/dist/node_modules/@allyhub/runtimes/dist/node-program.d.ts +0 -12
  949. package/dist/node_modules/@allyhub/runtimes/dist/packages.d.ts +0 -101
  950. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +0 -73
  951. package/dist/node_modules/@allyhub/runtimes/dist/unpack.d.ts +0 -14
  952. package/dist/node_modules/@allyhub/scenery-host/dist/allyhub.d.ts +0 -20
  953. package/dist/node_modules/@allyhub/scenery-host/dist/bake/digest.d.ts +0 -14
  954. package/dist/node_modules/@allyhub/scenery-host/dist/bake/envmap.d.ts +0 -21
  955. package/dist/node_modules/@allyhub/scenery-host/dist/bake/run.d.ts +0 -63
  956. package/dist/node_modules/@allyhub/scenery-host/dist/budget.d.ts +0 -40
  957. package/dist/node_modules/@allyhub/scenery-host/dist/bundle.d.ts +0 -92
  958. package/dist/node_modules/@allyhub/scenery-host/dist/commands.d.ts +0 -54
  959. package/dist/node_modules/@allyhub/scenery-host/dist/draw2d.d.ts +0 -47
  960. package/dist/node_modules/@allyhub/scenery-host/dist/glass.d.ts +0 -39
  961. package/dist/node_modules/@allyhub/scenery-host/dist/index.d.ts +0 -25
  962. package/dist/node_modules/@allyhub/scenery-host/dist/inventory.d.ts +0 -18
  963. package/dist/node_modules/@allyhub/scenery-host/dist/layer/fidelity.d.ts +0 -70
  964. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +0 -7
  965. package/dist/node_modules/@allyhub/scenery-host/dist/layer/moire.d.ts +0 -6
  966. package/dist/node_modules/@allyhub/scenery-host/dist/measure/contacts.d.ts +0 -45
  967. package/dist/node_modules/@allyhub/scenery-host/dist/measure/health.d.ts +0 -10
  968. package/dist/node_modules/@allyhub/scenery-host/dist/measure/index.d.ts +0 -110
  969. package/dist/node_modules/@allyhub/scenery-host/dist/measure/relations.d.ts +0 -17
  970. package/dist/node_modules/@allyhub/scenery-host/dist/measure/solid.d.ts +0 -32
  971. package/dist/node_modules/@allyhub/scenery-host/dist/measure/support.d.ts +0 -11
  972. package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.d.ts +0 -32
  973. package/dist/node_modules/@allyhub/scenery-host/dist/queries/inventory.d.ts +0 -5
  974. package/dist/node_modules/@allyhub/scenery-host/dist/queries/map.d.ts +0 -5
  975. package/dist/node_modules/@allyhub/scenery-host/dist/queries/view.d.ts +0 -10
  976. package/dist/node_modules/@allyhub/scenery-host/dist/scene.d.ts +0 -35
  977. package/dist/node_modules/@allyhub/scenery-host/dist/screen-dom.d.ts +0 -24
  978. package/dist/node_modules/@allyhub/scenery-host/dist/stage/bakes.d.ts +0 -42
  979. package/dist/node_modules/@allyhub/scenery-host/dist/stage/index.d.ts +0 -6
  980. package/dist/node_modules/@allyhub/scenery-host/dist/stage/page.d.ts +0 -70
  981. package/dist/node_modules/@allyhub/scenery-host/dist/stage/solve.d.ts +0 -49
  982. package/dist/node_modules/@allyhub/scenery-host/dist/stage/version.d.ts +0 -73
  983. package/dist/node_modules/@allyhub/scenery-host/dist/stage/view.d.ts +0 -18
  984. package/dist/node_modules/@allyhub/scenery-host/dist/steady.d.ts +0 -4
  985. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +0 -134
  986. package/dist/node_modules/@allyhub/video-extension/dist/inspect/motion.js +0 -4
  987. package/dist/node_modules/@allyhub/video-measure/dist/still.js +0 -2
  988. package/editor-web/assets/arrow-down-B8VUPCGi.js +0 -1
  989. package/editor-web/assets/arrow-up-Ds4juY8X.js +0 -1
  990. package/editor-web/assets/article-CS48wwvk.js +0 -3
  991. package/editor-web/assets/article-Cyle57uq.js +0 -7
  992. package/editor-web/assets/bar-button-J9vbfzTx.js +0 -1
  993. package/editor-web/assets/calc-worker-BdHh5LXM.js +0 -45
  994. package/editor-web/assets/channel-HUlo15J7.js +0 -1
  995. package/editor-web/assets/chart-amT4lgX3.js +0 -2
  996. package/editor-web/assets/chart-file-CfbWK9l1.js +0 -1
  997. package/editor-web/assets/code-CD-CbJG9.js +0 -1
  998. package/editor-web/assets/collaborator-BU4qU7O3.js +0 -1
  999. package/editor-web/assets/deck-CtEtDHo2.js +0 -1
  1000. package/editor-web/assets/dist-BBshIz1Q.js +0 -5
  1001. package/editor-web/assets/dist-BI8QjOsV.js +0 -1
  1002. package/editor-web/assets/dist-BajH5QfK.js +0 -24
  1003. package/editor-web/assets/dist-Bl74xqMW.js +0 -19
  1004. package/editor-web/assets/dist-BrUtQth3.js +0 -18
  1005. package/editor-web/assets/dist-CN5A7Au2.js +0 -1
  1006. package/editor-web/assets/dist-CcL6r6l3.js +0 -1
  1007. package/editor-web/assets/dist-D2E3cgRP.js +0 -4
  1008. package/editor-web/assets/dist-D3C6FyrO.js +0 -82
  1009. package/editor-web/assets/dist-DGKjn59H.js +0 -16
  1010. package/editor-web/assets/dist-NQNQ5HqZ.js +0 -17
  1011. package/editor-web/assets/dist-SV0sOVIC.js +0 -43
  1012. package/editor-web/assets/dist-YW8hS4IM.js +0 -9
  1013. package/editor-web/assets/dist-Y_XZZa8q.js +0 -531
  1014. package/editor-web/assets/dist-ZrBAbqyJ.js +0 -3
  1015. package/editor-web/assets/dist-d4dayaWE.js +0 -17
  1016. package/editor-web/assets/dist-elglzHMT.js +0 -6
  1017. package/editor-web/assets/dist-hHcrvNn9.js +0 -1
  1018. package/editor-web/assets/esm-DzxAod8Q.js +0 -21
  1019. package/editor-web/assets/file-exclamation-point-_L3ElCJ5.js +0 -1
  1020. package/editor-web/assets/flowDiagram-IUGLLWBU-tz5ewhC5.js +0 -1
  1021. package/editor-web/assets/hint-rlht0uxG.js +0 -1
  1022. package/editor-web/assets/index-Dvh1t1om.css +0 -2
  1023. package/editor-web/assets/index-q7X6hdHp.js +0 -28
  1024. package/editor-web/assets/minus-CbPnUIOy.js +0 -1
  1025. package/editor-web/assets/progress-CwKcXARv.js +0 -6
  1026. package/editor-web/assets/props-form-DUFxM5eb.js +0 -1
  1027. package/editor-web/assets/react-Edyoga_4.js +0 -1
  1028. package/editor-web/assets/row-C_svyL8o.js +0 -1
  1029. package/editor-web/assets/schemas-moE_A7Nj.js +0 -1
  1030. package/editor-web/assets/search-Ba2BbT6T.js +0 -1
  1031. package/editor-web/assets/slides-oQ_C0SVJ.js +0 -1
  1032. package/editor-web/assets/snapshots-Dd0Wd_qM.js +0 -1
  1033. package/editor-web/assets/sound-bTlco_K3.js +0 -1
  1034. package/editor-web/assets/split-zARio3J8.js +0 -3
  1035. package/editor-web/assets/strikethrough-BwXWi4zg.js +0 -1
  1036. package/editor-web/assets/surface-DtCjIlrq.js +0 -1
  1037. package/editor-web/assets/svg-CWIBMIQ9.js +0 -1
  1038. package/editor-web/assets/swatch-DhztHwPU.js +0 -1
  1039. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-X35m3xN6.js +0 -8
  1040. package/editor-web/assets/switch-8MU4Nfxe.js +0 -1
  1041. package/editor-web/assets/table-DRbddzx0.js +0 -1
  1042. package/editor-web/assets/tabs-BHBvbekZ.js +0 -1
  1043. package/editor-web/assets/tag-CIfWT8B_.js +0 -1
  1044. package/editor-web/assets/text-align-start-Cic2-TLh.js +0 -1
  1045. package/editor-web/assets/textarea-D7TnPwv1.js +0 -1
  1046. package/editor-web/assets/video-oJ3qa1Qv.js +0 -1
  1047. package/editor-web/assets/words-XlXG79Ur.js +0 -3
  1048. package/editor-web/assets/workbook-DznVDqoE.js +0 -45
  1049. package/editor-web/assets/x-DlhyIKuu.js +0 -41
  1050. /package/dist/node_modules/@allyhub/{protocol/dist/runtimes.js → runtimes/dist/schema.js} +0 -0
@@ -0,0 +1,5 @@
1
+ import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,b as n,c as r,f as i,m as a,s as o}from"./react-Byupo4pA.js";import{Ot as s,_t as c,i as l,jt as u,r as d}from"./type-CvZ0HZsV.js";import{C as f,S as p,_ as m,a as ee,l as h,s as g}from"./schemas-DlRAoVtq.js";import{t as _}from"./session-BhClkDyr.js";import{t as v}from"./jsx-runtime-DePvh3-m.js";import{C as y,_ as b,d as x,f as S,g as C,h as w,u as T}from"./bar-button-CKPfx2AB.js";import{C as te,E as ne,S as re,b as ie,i as ae}from"./dist-Cspf85KV.js";import{a as oe,i as se,r as E}from"./progress-DZQTiRLv.js";import{t as D}from"./createLucideIcon-euu7Wcd9.js";import{t as ce}from"./arrow-down-D-QZrqcz.js";import{t as le}from"./arrow-up-B1zjKUHX.js";import{t as ue}from"./chart-no-axes-column-Dyy25XZ_.js";import{a as de,c as O,i as fe,l as pe,n as me,r as k,s as he,t as ge}from"./split-DBAbwPZ5.js";import{n as _e,t as ve}from"./undo-2-DCbMWoug.js";import{p as A}from"./index-wMlfx8aT.js";import{t as j}from"./collaborator-XiHOxwGM.js";import{c as M,d as N,i as P,n as F,p as I,s as L}from"./browser-DEGNhKTV.js";import{S as R,b as z,d as ye,f as be,i as xe,l as Se,m as Ce,n as B,p as we,t as V,u as Te,v as Ee,y as H}from"./words-BUlNNuH2.js";var U=D(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),De=D(`flag`,[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]),W=[`following`,`mentionedUsers`,`subscribers`,`verified`],G=f().regex(/^[0-9]{1,19}$/u,`a post's id: 1 to 19 digits`),Oe=p({file:f().min(1),alt:f().optional()},{error:e=>e.code===`invalid_type`?`a medium is { file: ./picture.png, alt: … }: its file, from this file's folder, and its alt text`:void 0}),ke=p({options:g(f()),duration_minutes:m().int()},{error:e=>e.code===`invalid_type`?`a poll is { options: [ … ], duration_minutes: … }`:void 0}),Ae=p({text:f().default(``).transform(e=>e.replace(/\n+$/u,``)),media:g(Oe).optional(),poll:ke.optional(),made_with_ai:h().optional(),paid_partnership:h().optional(),reply:p({in_reply_to_tweet_id:G}).optional(),quote_tweet_id:G.optional()},{error:e=>e.code===`invalid_type`?`a post is { text: …, media: [ … ], poll: … }`:void 0}),je=p({reply_settings:ee(W).optional(),posts:g(Ae,{error:`posts is the list of its posts: posts: [ { text: … }, … ]`}).min(1,`posts holds at least one post`)},{error:e=>e.code===`invalid_type`?`an x-post's file is { posts: [ { text: … }, … ] }, with reply_settings beside posts`:void 0});function Me(e,t){let n=e;for(let e of t)if(N(n)){let t=n.items.find(t=>t.key?.value===e);if(!t)return n;n=t.value??t.key}else if(I(n)&&typeof e==`number`){let t=n.items[e];if(!t)return n;n=t}else return n;return n}function K(e){let t=new P,n=F(e,{lineCounter:t,prettyErrors:!1}),r=e=>{let r=Me(n.contents,e)?.range?.[0];return r===void 0?void 0:t.linePos(r).line};if(n.errors.length>0)return{errors:n.errors.map(e=>({path:[],message:e.message})),line:e=>e.length===0&&n.errors[0]?.linePos?.[0]?n.errors[0].linePos[0].line:r(e)};let i=je.safeParse(n.toJS());return i.success?{value:i.data,errors:[],line:r}:{errors:i.error.issues.map(e=>({path:e.path.filter(e=>typeof e==`string`||typeof e==`number`),message:e.message})),line:r}}function Ne(e,t){let n=e.createNode(t);return t.includes(`
2
+ `)&&(n.type=M.BLOCK_LITERAL),n}var q=e=>JSON.stringify(e,(e,t)=>typeof t==`object`&&t&&!Array.isArray(t)?Object.fromEntries(Object.entries(t).sort(([e],[t])=>e<t?-1:+(e>t))):t),J=(e,t)=>q(e)===q(t);function Pe(e){return{text:e.text,media:e.media===void 0||e.media.length===0?void 0:e.media,poll:e.poll}}function Fe(e,t){let n=F(e),r=K(e).value;if(r!==void 0&&J(r,t))return e;N(n.contents)||(n.contents=new L),t.reply_settings===void 0?n.deleteIn([`reply_settings`]):n.getIn([`reply_settings`])!==t.reply_settings&&n.setIn([`reply_settings`],t.reply_settings);let i=n.getIn([`posts`]),a=I(i)?i:void 0,o=(a?.items??[]).map(e=>N(e)?e:void 0),s=(r?.posts??[]).map(e=>q(e)),c=new Set,l=t.posts.map(()=>void 0);t.posts.forEach((e,t)=>{let n=s.findIndex((t,n)=>!c.has(n)&&o[n]&&t===q(e));n>=0&&(c.add(n),l[t]=n)}),t.posts.forEach((e,t)=>{l[t]===void 0&&o[t]&&!c.has(t)&&(c.add(t),l[t]=t)});let u=t.posts.map((e,t)=>{let r=l[t],i=r===void 0?void 0:o[r],a=Pe(e);if(!i){let t=n.createNode({});t.set(`text`,Ne(n,e.text));for(let e of[`media`,`poll`])a[e]!==void 0&&t.set(e,n.createNode(a[e]));return t}let s=i.get(`text`);(typeof s!=`string`||s.replace(/\n+$/u,``)!==e.text)&&i.set(`text`,Ne(n,e.text));for(let e of[`media`,`poll`]){let t=a[e],r=i.get(e,!0);t===void 0?r!==void 0&&i.delete(e):J(r?.toJSON?.(),t)||i.set(e,n.createNode(t))}return i});return a?a.items=u:n.setIn([`posts`],n.createNode(u)),n.toString({flowCollectionPadding:!1,lineWidth:0})}function Ie(e,t,n){let r=(e,t,n)=>J(t,e)?n:t,i=t.posts.length===e.posts.length?n.posts.length:n.posts.length===e.posts.length?t.posts.length:n.posts.length,a=[];for(let o=0;o<i;o++){let i=e.posts[o],s=t.posts[o],c=n.posts[o],l=c??s;if(l===void 0)continue;if(s===void 0||c===void 0||i===void 0){a.push(l);continue}let u={...c,text:r(i.text,s.text,c.text)};delete u.media,delete u.poll,a.push({...u,...Y(`media`,r(i.media,s.media,c.media)),...Y(`poll`,r(i.poll,s.poll,c.poll))})}let o={...n,posts:a};return delete o.reply_settings,{...o,...Y(`reply_settings`,r(e.reply_settings,t.reply_settings,n.reply_settings))}}function Y(e,t){return t===void 0?{}:{[e]:t}}var X=e(n(),1),Z=v();function Le(e){let t=e?.part??e?.board;if(typeof t!=`string`)return;let n=/^post-(\d+)$/u.exec(t)?.[1];return n===void 0?void 0:Number(n)-1}var Re=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function ze(e,t){let n=e?.posts??[],r=t.posts;for(let e=0;e<r.length;e++)if(!Re(n[e],r[e]))return e;if(n.length>r.length&&r.length>0)return r.length-1}function Be(e,t){let n=K(e),r=n.value?.posts.length??0,i=e.split(`
3
+ `).length;for(let e=0;e<r;e++){let a=n.line([`posts`,e]);if(a===void 0)continue;let o=e+1<r?n.line([`posts`,e+1]):void 0,s=o===void 0?i:o-1;if(a<=t.to&&t.from<=s)return e}}function Ve(e,t){if(e.from!==void 0&&e.path===t.path)return Be(t.text,{from:e.from,to:e.to??e.from})}var He=class e{session;file;unreadable=!1;landed;snapshot;listeners=new Set;amending;stops=[];constructor(e){this.session=e,this.read(e.text),this.snapshot=this.make(),e.attach({save:e=>{if(this.file===void 0||this.unreadable)return;let t=Fe(e,this.file);return t===e?void 0:t},take:(e,t,n)=>{let r=K(e),i=K(t).value,a=n?.kind===`agent`&&r.value?ze(i,r.value):void 0;a!==void 0&&(this.landed={post:a,at:Date.now()}),r.value?(this.file=this.file===void 0||i===void 0?r.value:Ie(i,this.file,r.value),this.unreadable=!1):(this.file=void 0,this.unreadable=!0),this.emit()}}),this.stops.push(e.onState(()=>{this.emit()}),e.onUndo(()=>{this.emit()}))}read(e){let t=K(e);this.file=t.value,this.unreadable=t.value===void 0}static async open(t,n){return new e(await _.open(t,n))}make(){return{file:this.file,state:this.session.state,canUndo:this.session.canUndo,canRedo:this.session.canRedo,unreadable:this.unreadable,landed:this.landed}}emit(){this.snapshot=this.make();for(let e of this.listeners)e()}get text(){return this.session.text}get(){return this.snapshot}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}edit(e,t,n){let r=this.file;if(r===void 0||this.unreadable)return;let i=t(r);if(i!==r){if(n!==void 0&&this.amending?.key===n&&this.session.canUndo){let e=this.amending.from;this.session.undo(),this.push(this.amending.label,e,i)}else this.amending=n===void 0?void 0:{key:n,from:r,label:e},this.push(e,r,i)}}settle(){this.amending=void 0}push(e,t,n){this.file=n,this.session.pushEdit({label:e,undo:()=>{this.file=t,this.emit()},redo:()=>{this.file=n,this.emit()}}),this.emit()}undo(){this.amending=void 0,this.session.undo()}redo(){this.amending=void 0,this.session.redo()}async close(){for(let e of this.stops.splice(0))e();await this.session.close()}},Q=(e,t,n)=>({...e,posts:e.posts.map((e,r)=>r===t?n(e):e)});function Ue(e,t){let n={...e};return t===void 0||t.length===0?delete n.media:n.media=t,n}function We(e){let t={...e};return delete t.poll,t}function Ge({text:e}){let t=V(),{weighted:n}=z(e),r=R.length.most,i=r-n,a=i<0&&n<=R.length.premium,o=n>R.length.premium,s=Math.min(1,n/r),l=2*Math.PI*9;return(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs tabular-nums`,"aria-label":i>=0?t.left(i):t.over(-i),"data-testid":`x-count`,children:[i<=20?(0,Z.jsx)(`span`,{className:c(o?`text-destructive`:a?`text-warning`:`text-muted-foreground`),children:a?n:i}):null,(0,Z.jsxs)(`svg`,{width:`22`,height:`22`,viewBox:`0 0 22 22`,"aria-hidden":`true`,children:[(0,Z.jsx)(`circle`,{cx:`11`,cy:`11`,r:9,fill:`none`,stroke:`var(--ak-x-line)`,strokeWidth:`2`}),(0,Z.jsx)(`circle`,{cx:`11`,cy:`11`,r:9,fill:`none`,stroke:o?`#f4212e`:a||i<=20?`#ffd400`:`var(--ak-x-link)`,strokeWidth:`2`,strokeDasharray:`${String(s*l)} ${String(l)}`,transform:`rotate(-90 11 11)`})]})]})}function Ke(e){let t=V();return(0,Z.jsx)(O,{alt:e.alt??``,onAlt:e.onAlt,most:R.alt,trigger:(0,Z.jsx)(l,{variant:`secondary`,size:`xs`,className:`bg-media/75 text-on-media font-bold`,"aria-label":t.altText,children:t.alt})})}function qe(e){let t=V();return(0,Z.jsx)(l,{variant:`secondary`,size:`icon-sm`,className:`bg-media/75 text-on-media absolute top-2 right-2 rounded-full`,"aria-label":t.removeMedium,onClick:e.onRemove,children:(0,Z.jsx)(d,{})})}function Je(e){let t=V(),{options:n,duration_minutes:r}=e.poll,i={days:Math.floor(r/1440),hours:Math.floor(r%1440/60),minutes:r%60},a=(t,n)=>{let r={...i,[t]:Math.max(0,Math.floor(n))};e.onChange({...e.poll,duration_minutes:r.days*1440+r.hours*60+r.minutes})};return(0,Z.jsxs)(`div`,{className:`mt-3 flex flex-col gap-2 rounded-2xl border border-[var(--ak-x-line)] p-3`,"data-testid":`x-poll`,children:[n.map((r,i)=>{let a=H(r)-R.poll.option;return(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(`input`,{className:`aria-invalid:border-destructive h-10 flex-1 rounded-md border border-[var(--ak-x-line)] bg-transparent px-3 text-[15px] outline-none focus:border-[var(--ak-x-link)]`,value:r,"aria-invalid":a>0||void 0,maxLength:R.poll.option,placeholder:t.option(i+1),"aria-label":t.option(i+1),onChange:t=>{e.onChange({...e.poll,options:n.map((e,n)=>n===i?t.target.value:e)},`option-${String(i)}`)}}),a>0?(0,Z.jsx)(`span`,{className:`text-destructive text-sm`,children:t.over(a)}):null,n.length>R.poll.least?(0,Z.jsx)(l,{variant:`ghost`,size:`icon-sm`,"aria-label":t.removeOption,onClick:()=>{e.onChange({...e.poll,options:n.filter((e,t)=>t!==i)})},children:(0,Z.jsx)(d,{})}):null]},i)}),n.length<R.poll.most?(0,Z.jsxs)(l,{variant:`ghost`,size:`sm`,className:`self-start text-[var(--ak-x-link)]`,onClick:()=>{e.onChange({...e.poll,options:[...n,``]})},children:[(0,Z.jsx)(A,{}),t.addOption]}):null,(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 border-t border-[var(--ak-x-line)] pt-2 text-sm`,children:[(0,Z.jsx)(`span`,{className:`text-muted-foreground mr-auto self-center`,children:t.pollLength}),[`days`,`hours`,`minutes`].map(e=>(0,Z.jsxs)(`label`,{className:`flex flex-col gap-0.5 text-xs`,children:[(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:t[e]}),(0,Z.jsx)(`input`,{type:`number`,min:0,className:`h-8 w-16 rounded-md border border-[var(--ak-x-line)] bg-transparent px-2 text-sm`,value:i[e],onChange:t=>{a(e,Number(t.target.value))}})]},e)),(0,Z.jsx)(l,{variant:`ghost`,size:`sm`,className:`text-destructive`,onClick:e.onRemove,children:t.removePoll})]})]})}function Ye(e){let t=V(),n=t.replies[e.value??`everyone`];return(0,Z.jsxs)(T,{children:[(0,Z.jsx)(y,{asChild:!0,disabled:e.disabled,children:(0,Z.jsxs)(l,{variant:`ghost`,size:`sm`,className:`ak-x-c-replies -ml-2 gap-1 px-2 font-bold text-[var(--ak-x-link)]`,children:[(0,Z.jsx)(U,{}),n]})}),(0,Z.jsxs)(S,{align:`start`,className:`w-72`,children:[(0,Z.jsx)(w,{children:t.whoCanReply}),(0,Z.jsx)(C,{value:e.value??`everyone`,onValueChange:t=>{e.onChange(t===`everyone`?void 0:W.includes(t)?t:void 0)},children:[`everyone`,...W].map(e=>(0,Z.jsx)(b,{value:e,children:t.replies[e]},e))})]})]})}function Xe(e){let t=V(),n=e.post.made_with_ai===!0||e.post.paid_partnership===!0;return(0,Z.jsxs)(T,{children:[(0,Z.jsx)(y,{asChild:!0,children:(0,Z.jsx)(l,{variant:`ghost`,size:`icon-sm`,className:`text-[var(--ak-x-link)]`,"aria-label":t.disclosure,title:t.disclosure,"aria-pressed":n,children:(0,Z.jsx)(De,{className:c(n&&`fill-current`)})})}),(0,Z.jsxs)(S,{align:`start`,className:`w-56`,children:[(0,Z.jsx)(w,{children:t.disclosure}),(0,Z.jsx)(x,{checked:e.post.made_with_ai===!0,onCheckedChange:t=>{e.onChange({made_with_ai:t})},children:t.madeWithAi}),(0,Z.jsx)(x,{checked:e.post.paid_partnership===!0,onCheckedChange:t=>{e.onChange({paid_partnership:t})},children:t.paidPartnership})]})]})}function $(e){return(0,Z.jsx)(l,{variant:`ghost`,size:`icon-sm`,className:`text-[var(--ak-x-link)] disabled:text-[var(--ak-x-muted)]`,"aria-label":e.label,title:e.label,disabled:e.disabled,onClick:e.onClick,children:e.children})}var Ze=3e4;function Qe({doc:e,dir:n,entry:o}){let c=V(),f=r(),p=a(),m=(0,X.useSyncExternalStore)(t=>e.subscribe(t),()=>e.get()),[ee,h]=(0,X.useState)(),[g,_]=(0,X.useState)(0),[v,y]=(0,X.useState)(),b=(0,X.useRef)([]);(0,X.useEffect)(()=>{if(v===void 0)return;let e=b.current[v.post];e!=null&&(e.focus(),e.setSelectionRange(v.at,v.at),_(v.post),y(void 0))},[v]);let{shown:x,updating:S}=oe(m.file),C=p||S,{agent:w,following:T}=t(),D=ne(),O=(()=>{if(w?.doing===void 0)return;let t=Le(w.place);if(t!==void 0)return t;let n=m.landed!==void 0&&m.landed.at>=w.at-Ze;return n&&w.source?.path===o?m.landed?.post:(w.source?Ve(w.source,{path:o,text:e.text}):void 0)??(n?m.landed?.post:void 0)})(),M=O!==void 0&&O<(x?.posts.length??0)?O:void 0,N=(0,X.useRef)([]),P=(0,X.useRef)([]);(0,X.useEffect)(()=>{if(T&&M!==void 0)for(let e of[N.current[M],P.current[M]])e?.scrollIntoView({block:`nearest`})},[T,M,m.landed]);let F=fe(n,(x?.posts??[]).flatMap(e=>(e.media??[]).map(e=>e.file)));i({hold:()=>Promise.resolve({key:`${o}@${String(e.text.length)}`,what:`The X post ${o}${(x?.posts.length??0)>1?`, a thread of ${String(x?.posts.length??0)} posts`:``}`,source:{path:o}}),locate:t=>{let n=x?.posts??[],r=K(e.text),i=e=>{let t=e?.getBoundingClientRect();return t&&t.width>0&&t.height>0?{x:t.x,y:t.y,width:t.width,height:t.height}:void 0},a=e=>e!==void 0&&u(t,e),c=n.flatMap((e,t)=>{if(!a(i(N.current[t]))&&!a(i(P.current[t])))return[];let n=r.line([`posts`,t]);return[{name:`post ${String(t+1)} of the thread`,source:{path:o,...n===void 0?{}:{line:n}},...e.text===``?{}:{text:e.text}}]}),l=s(t)[0],d=e=>e!==void 0&&l!==void 0&&l.x>=e.x&&l.x<=e.x+e.width&&l.y>=e.y&&l.y<=e.y+e.height,f=n.findIndex((e,t)=>d(i(N.current[t]))),p=n.findIndex((e,t)=>d(i(P.current[t]))),m=f>=0?`in post ${String(f+1)}, where it is written`:p>=0?`in post ${String(p+1)}, as X's timeline will show it`:void 0;return Promise.resolve({elements:c,...m===void 0?{}:{where:m}})}});let I=t=>{(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`z`&&(t.preventDefault(),t.shiftKey?e.redo():e.undo())},L=(t,n,r)=>{C||e.edit(t,n,r)},z=e=>(e.media??[]).map(e=>{let t=F.get(e.file),n=k(e.file),r=n?void 0:Ee(e.file.split(`.`).pop()??``);return t===void 0?{kind:`made`,label:n?c.made:e.file}:{kind:r??`picture`,src:t,alt:e.alt,file:e.file}}),B=(0,Z.jsx)(ae,{start:C?void 0:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(l,{variant:`ghost`,size:`icon-sm`,"aria-label":c.undo,title:c.undo,disabled:!m.canUndo,onClick:()=>{e.undo()},children:(0,Z.jsx)(ve,{})}),(0,Z.jsx)(l,{variant:`ghost`,size:`icon-sm`,"aria-label":c.redo,title:c.redo,disabled:!m.canRedo,onClick:()=>{e.redo()},children:(0,Z.jsx)(_e,{})})]}),saved:{state:m.state},exports:{}}),H=f?.theme===`dark`;if(x===void 0)return(0,Z.jsxs)(`div`,{className:`bg-background flex size-full flex-col`,"data-testid":`x-post-editor`,children:[B,(0,Z.jsx)(E,{className:`flex min-h-0 flex-1 items-center justify-center`})]});let U=x.posts,De=Math.min(g,U.length-1),W=e=>{L(c.steps.add,t=>({...t,posts:[...t.posts.slice(0,e+1),{text:``},...t.posts.slice(e+1)]})),y({post:e+1,at:0})},G=e=>{let t=U[e],n=U[e-1];if(t===void 0||n===void 0)return!1;let r=e=>(e.media?.length??0)>0||e.poll!==void 0;if(r(t)&&r(n))return!1;let i=n.text===``||t.text===``?``:`
4
+
5
+ `;return L(c.steps.join,a=>({...a,posts:[...a.posts.slice(0,e-1),{...n,...r(t)?{...t.media?{media:t.media}:{},...t.poll?{poll:t.poll}:{}}:{},text:n.text+i+t.text},...a.posts.slice(e+1)]})),y({post:e-1,at:n.text.length+i.length}),!0},Oe=(0,Z.jsx)(`div`,{className:`ak-x ak-x-editing ak-x-composer`,"data-theme":H?`dark`:`light`,children:U.map((t,r)=>{let i=r===U.length-1,a=r===De,s=t.media??[],u=s.filter(e=>Ee(e.file.split(`.`).pop()??``)===`picture`||k(e.file)).length,f=s.length>=R.pictures||s.length>u;return(0,Z.jsxs)(`div`,{ref:e=>{N.current[r]=e},className:`ak-x-c-post`,"data-here":a?``:void 0,"data-testid":`x-post`,onFocusCapture:()=>{_(r)},onPointerDown:()=>{_(r)},children:[(0,Z.jsxs)(`div`,{className:`ak-x-side`,children:[(0,Z.jsx)(`div`,{className:`ak-x-avatar`,"aria-hidden":`true`,children:Te.name.slice(0,1)}),i?null:(0,Z.jsx)(`div`,{className:`ak-x-thread-line`})]}),(0,Z.jsxs)(`div`,{className:`ak-x-body`,children:[a&&r>0&&!C?(0,Z.jsx)(l,{variant:`ghost`,size:`icon-sm`,className:`ak-x-c-remove`,"aria-label":c.remove,title:c.remove,onClick:()=>{L(c.steps.remove,e=>({...e,posts:e.posts.filter((e,t)=>t!==r)})),y({post:r-1,at:U[r-1]?.text.length??0})},children:(0,Z.jsx)(d,{})}):null,(0,Z.jsxs)(`div`,{className:`ak-x-field`,children:[(0,Z.jsx)(be,{text:t.text,whole:!0}),(0,Z.jsx)(`textarea`,{ref:e=>{b.current[r]=e},dir:`auto`,value:t.text,placeholder:r===0?c.whatsHappening:c.addAnother,"aria-label":r===0?c.whatsHappening:c.addAnother,readOnly:C,"data-testid":`x-text`,onChange:e=>{let t=e.target.value;L(c.steps.text,e=>Q(e,r,e=>({...e,text:t})),`text-${String(r)}`)},onBlur:()=>{e.settle()},onKeyDown:e=>{let t=e.currentTarget;if(e.key===`Backspace`&&r>0&&t.selectionStart===0&&t.selectionEnd===0&&!C){G(r)&&e.preventDefault();return}if(e.key!==`Enter`||!(e.metaKey||e.ctrlKey))return;e.preventDefault();let n=t.selectionStart;L(c.steps.split,e=>{let t=e.posts[r];if(!t)return e;let i=t.text.slice(0,n).replace(/\s+$/u,``),a=t.text.slice(n).replace(/^\s+/u,``);return{...e,posts:[...e.posts.slice(0,r),{...t,text:i},{text:a},...e.posts.slice(r+1)]}}),y({post:r+1,at:0})}})]}),(0,Z.jsx)(Se,{media:z(t),onAlt:C?void 0:e=>(0,Z.jsx)(Ke,{alt:s[e]?.alt,onAlt:t=>{L(c.steps.alt,n=>Q(n,r,n=>({...n,media:(n.media??[]).map((n,r)=>{if(r!==e)return n;let i={file:n.file};return t.trim()===``?i:{...i,alt:t}})})))}}),onMedium:C?void 0:e=>(0,Z.jsx)(qe,{onRemove:()=>{L(c.steps.media,t=>Q(t,r,t=>Ue(t,(t.media??[]).filter((t,n)=>n!==e))))}})}),t.poll===void 0?null:C?(0,Z.jsx)(`div`,{className:`ak-x-poll`,children:t.poll.options.map((e,t)=>(0,Z.jsx)(`div`,{className:`ak-x-option`,dir:`auto`,children:e},t))}):(0,Z.jsx)(Je,{poll:t.poll,onChange:(e,t)=>{L(c.steps.poll,t=>Q(t,r,t=>({...t,poll:e})),t===void 0?void 0:`${t}-${String(r)}`)},onRemove:()=>{L(c.steps.poll,e=>Q(e,r,e=>We(e)))}}),t.quote_tweet_id===void 0?null:(0,Z.jsx)(we,{id:t.quote_tweet_id}),a?(0,Z.jsx)(Ye,{value:x.reply_settings,disabled:C,onChange:e=>{L(c.whoCanReply,t=>{let n={...t};return e===void 0?delete n.reply_settings:n.reply_settings=e,n})}}):null,a&&!C?(0,Z.jsxs)(`div`,{className:`ak-x-c-tools`,children:[(0,Z.jsxs)(ie,{open:ee===r,onOpenChange:e=>{h(e?r:void 0)},children:[(0,Z.jsx)(te,{asChild:!0,children:(0,Z.jsx)(l,{variant:`ghost`,size:`icon-sm`,className:`text-[var(--ak-x-link)] disabled:text-[var(--ak-x-muted)]`,"aria-label":c.addMedia,title:c.addMedia,disabled:f||t.poll!==void 0,children:(0,Z.jsx)(pe,{})})}),(0,Z.jsx)(re,{className:`w-auto`,align:`start`,children:(0,Z.jsx)(me,{self:o,types:xe,testId:`x-picker`,onPick:e=>{h(void 0),L(c.steps.media,t=>Q(t,r,t=>({...t,media:[...t.media??[],{file:de(n,e)}]})))}})})]}),(0,Z.jsx)($,{label:c.addPoll,disabled:t.poll!==void 0||s.length>0,onClick:()=>{L(c.steps.poll,e=>Q(e,r,e=>({...e,poll:{options:[``,``],duration_minutes:1440}})))},children:(0,Z.jsx)(ue,{})}),(0,Z.jsx)(Xe,{post:t,onChange:e=>{L(c.disclosure,t=>Q(t,r,t=>{let n={...t,...e};return n.made_with_ai!==!0&&delete n.made_with_ai,n.paid_partnership!==!0&&delete n.paid_partnership,n}))}}),(0,Z.jsx)(`span`,{className:`flex-1`}),(0,Z.jsx)($,{label:c.moveUp,disabled:r===0,onClick:()=>{L(c.steps.move,e=>{let t=[...e.posts],[n]=t.splice(r,1);return n&&t.splice(r-1,0,n),{...e,posts:t}}),_(r-1)},children:(0,Z.jsx)(le,{})}),(0,Z.jsx)($,{label:c.moveDown,disabled:i,onClick:()=>{L(c.steps.move,e=>{let t=[...e.posts],[n]=t.splice(r,1);return n&&t.splice(r+1,0,n),{...e,posts:t}}),_(r+1)},children:(0,Z.jsx)(ce,{})}),(0,Z.jsx)(Ge,{text:t.text}),(0,Z.jsx)(`span`,{className:`bg-rule mx-1 h-6 w-px`,"aria-hidden":`true`}),(0,Z.jsx)(l,{variant:`outline`,size:`icon-xs`,className:`rounded-full border-[var(--ak-x-line)] text-[var(--ak-x-link)]`,"aria-label":c.addPost,title:c.addPost,onClick:()=>{W(r)},children:(0,Z.jsx)(A,{})})]}):null]}),w&&M===r?(0,Z.jsx)(j,{"data-testid":`x-agent-box`,label:D(w),className:`inset-x-1 inset-y-0`}):null]},r)})}),ke=(0,Z.jsx)(`div`,{className:`ak-x`,"data-theme":H?`dark`:`light`,children:U.map((e,t)=>(0,Z.jsxs)(`div`,{ref:e=>{P.current[t]=e},className:`relative`,children:[(0,Z.jsx)(ye,{post:{text:e.text,media:z(e),poll:e.poll,quote:e.quote_tweet_id},joined:t<U.length-1,published:!0}),w&&M===t?(0,Z.jsx)(j,{"data-testid":`x-agent-shown`,className:`inset-0`}):null]},t))});return(0,Z.jsxs)(`div`,{className:`bg-background flex size-full flex-col`,"data-testid":`x-post-editor`,onKeyDown:I,children:[B,(0,Z.jsx)(Ce.Provider,{value:he,children:(0,Z.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[S?(0,Z.jsx)(se,{}):null,(0,Z.jsx)(ge,{edit:Oe,preview:ke,width:598,background:H?`#000000`:`#ffffff`,testId:`x-preview`})]})})]})}function $e(){let e=V(),t=o(),n=r(),i=n?.item.entry,a=n?.item.dir??``,[s,c]=(0,X.useState)(),[l,u]=(0,X.useState)(!1);return(0,X.useEffect)(()=>{if(i===void 0)return;let e,n=!0;return He.open(t,i).then(t=>{n?(e=t,c(t)):t.close()},e=>{reportError(e),n&&u(!0)}),()=>{n=!1,e?.close()}},[t,i]),l?(0,Z.jsx)(`div`,{className:`flex size-full`,"data-testid":`x-post-editor`,"data-state":`updating`,children:(0,Z.jsx)(E,{})}):!s||i===void 0?(0,Z.jsx)(`div`,{className:`text-muted-foreground flex size-full items-center justify-center text-sm`,"data-testid":`x-post-editor`,"data-state":`loading`,children:e.loading}):(0,Z.jsx)(Qe,{doc:s,dir:a,entry:i})}export{He as PostDocument,B as WORDS,$e as XPostEditor,$e as default};
@@ -0,0 +1,24 @@
1
+ import{i as e,n as t}from"./rolldown-runtime-COiEfhsA.js";import{a as n,b as r,c as i,d as a,f as o,h as s,l as c,m as l,s as u}from"./react-Byupo4pA.js";import{Dt as d,Ot as f,St as p,_t as m,bt as h,i as g,jt as _,n as v,t as y,xt as b}from"./type-CvZ0HZsV.js";import{C as x,E as S,S as C,_ as w,a as T,f as E,g as D,l as O,s as k,v as A}from"./schemas-DlRAoVtq.js";import{F as j,S as ee,_ as te,b as ne,g as re,j as M,x as ie}from"./snapshots-DwGHDN3t.js";import{t as ae}from"./session-BhClkDyr.js";import{r as oe,t as se}from"./schemas-C21MyseF.js";import{t as N}from"./jsx-runtime-DePvh3-m.js";import{A as P,O as F,a as ce,i as I,l as le,n as ue,o as de,t as fe}from"./bar-button-CKPfx2AB.js";import{D as pe,E as me,a as he,c as ge,i as L,n as R,r as _e}from"./dist-Cspf85KV.js";import{a as z,i as ve,r as ye}from"./progress-DZQTiRLv.js";import{i as B,n as be,r as V,t as xe}from"./hint-CbwoSBMw.js";import{t as H}from"./createLucideIcon-euu7Wcd9.js";import{t as Se}from"./audio-lines-BFoW_IeO.js";import{n as Ce,t as we}from"./undo-2-DCbMWoug.js";import{t as Te}from"./scissors-m6QcoEf2.js";import{S as Ee,j as De}from"./index-wMlfx8aT.js";import{n as Oe,r as ke,t as Ae}from"./collaborator-XiHOxwGM.js";import{a as je,c as U,d as Me,j as Ne,n as W,r as Pe,s as Fe,t as Ie}from"./dist-DIJnhQFK.js";var Le=[`error`,`saving`,`unsaved`,`saved`],Re=class e{host;options;sessions=new Map;opening=new Map;done=[];undone=[];stateListeners=new Set;undoListeners=new Set;stops=[];last=`saved`;closed=!1;constructor(e,t){this.host=e,this.options={...t,report:!1}}static async open(t,n,r={}){let i=new e(t,r);return await Promise.all(n.map(e=>i.add(e))),i}add(e){let t=this.sessions.get(e);if(t)return Promise.resolve(t);let n=this.opening.get(e);return n||(n=ae.open(this.host,e,this.options).then(t=>(this.sessions.set(e,t),this.opening.delete(e),this.stops.push(t.onState(()=>{this.stateChanged()})),this.closed&&t.close(),t)),this.opening.set(e,n)),n}file(e){return this.sessions.get(e)}get paths(){return[...this.sessions.keys()]}get state(){let e=[...this.sessions.values()].map(e=>e.state);return Le.find(t=>e.includes(t))??`saved`}get error(){return[...this.sessions.values()].find(e=>e.error!==void 0)?.error}onState(e){return this.stateListeners.add(e),()=>this.stateListeners.delete(e)}stateChanged(){let e=this.state;if(e!==this.last){this.last=e;for(let t of this.stateListeners)t(e);this.host[`editor/state`]&&this.host[`editor/state`]({state:e,...e===`error`&&this.error!==void 0?{message:this.error}:{}}).catch(()=>void 0)}}edited(e){for(let t of e)this.sessions.get(t)?.edited()}pushEdit(e){this.closed||(this.done.push(e),this.undone.length=0,this.edited(e.files),this.undoChanged())}amend(e){let t=this.done.pop();if(!t){this.pushEdit(e);return}let n=[...new Set([...t.files,...e.files])];this.done.push({label:e.label,files:n,undo:()=>{e.undo(),t.undo()},redo:()=>{t.redo(),e.redo()}}),this.undone.length=0,this.edited(e.files),this.undoChanged()}get canUndo(){return this.done.length>0}get canRedo(){return this.undone.length>0}get undoLabel(){return this.done.at(-1)?.label}get redoLabel(){return this.undone.at(-1)?.label}undo(){let e=this.done.pop();return e?(e.undo(),this.undone.push(e),this.edited(e.files),this.undoChanged(),!0):!1}redo(){let e=this.undone.pop();return e?(e.redo(),this.done.push(e),this.edited(e.files),this.undoChanged(),!0):!1}onUndo(e){return this.undoListeners.add(e),()=>this.undoListeners.delete(e)}undoChanged(){for(let e of this.undoListeners)e()}async flush(){await Promise.all([...this.sessions.values()].map(e=>e.flush()))}async close(){this.closed=!0;for(let e of this.stops.splice(0))e();await Promise.all([...this.sessions.values()].map(e=>e.close()))}},ze=H(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),Be=H(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]),G=H(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),K=H(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Ve=H(`skip-back`,[[`path`,{d:`M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z`,key:`15892j`}],[`path`,{d:`M3 20V4`,key:`1ptbpl`}]]),He=H(`step-back`,[[`path`,{d:`M13.971 4.285A2 2 0 0 1 17 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z`,key:`19qhus`}],[`path`,{d:`M21 20V4`,key:`cb8qj8`}]]),Ue=H(`step-forward`,[[`path`,{d:`M10.029 4.285A2 2 0 0 0 7 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`1ystz2`}],[`path`,{d:`M3 4v16`,key:`1ph11n`}]]),We=H(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Ge=H(`volume-1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),Ke=H(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),q=e(r(),1),J=N(),qe=e=>Number.isFinite(e)&&e>0?e:0,Y=e=>{let t=qe(e);return`${String(Math.floor(t/60))}:${String(Math.floor(t%60)).padStart(2,`0`)}`},Je=e=>{let t=qe(e);return`${String(Math.floor(t/60))}:${(t%60).toFixed(1).padStart(4,`0`)}`},Ye=(e,t)=>Math.floor(e*t+1e-9)/t,Xe=e=>e.split(/[/\\]/u).at(-1)??e,Ze=D({fps:w(),width:w(),height:w(),duration:w(),parts:k(S())}),Qe=C({from:E().positive(),to:E().positive()}),$e=Qe.extend({key:x().min(1),layers:k(Qe).optional(),sounds:Qe.optional(),messages:k(Qe.extend({key:x().min(1)})).optional()}),et={"video/versions":j(C({item:M}),C({piece:x(),kind:x(),title:x().optional(),width:w(),height:w(),versions:k(C({key:x(),lang:x().optional()}))}),`A video's or a deck's versions, one per language: what its stage, its timeline and its exports are asked for.`),"video/stage":j(C({...ne,start:C({t:w().nonnegative().optional(),part:x().optional(),offset:w().nonnegative().optional(),dur:w().positive().optional()}).optional(),play:O().optional(),chrome:O().optional(),mode:T([`code`]).optional()}),re,`The address of a version's stage page, for a sandboxed frame: it plays the piece and talks to its parent by postMessage.`),"video/timeline":j(C(ne),C({timeline:Ze,text:k(S())}),`A version's timeline, drawn nowhere.`),"video/still":j(C({...ne,t:w().nonnegative().optional()}),C({t:w(),image:ee,width:E().positive(),height:E().positive(),duration:w().nonnegative()}),`A moment of a version as the render draws it, as a picture.`),"video/stills":j(C({...ne,moments:k(w().nonnegative()).min(1).max(32)}),C({stills:k(C({t:w(),image:ee}))}),"Several moments of a version as the render draws them: what `video/still` gives, on one page."),"video/sources":j(C({item:M}),C({files:k(C({path:M,parts:k($e),music:k(Qe).optional()}))}),`Where each part, its layers, its sounds and its script's messages are written in the piece's code and its script, by line, and the video's music: what a change to those lines changes.`)},tt=ie(et),nt=b({en:{loading:`Loading the preview`,previewTitle:`Preview`,denoising:`Denoising the speech; playing it as recorded`,uncut:e=>`No person matte for ${e} yet: layers behind the person show in front`,play:`Play`,pause:`Pause`,seek:`Seek`,toStart:`Go to start`,frameBack:`Previous frame`,frameForward:`Next frame`,mute:`Mute`,unmute:`Unmute`,volume:`Volume`,withKey:(e,t)=>`${e} (${t})`,keys:{space:`Space`,home:`Home`},prevPage:`Previous page`,nextPage:`Next page`,pageOf:(e,t)=>`Page ${String(e)} of ${String(t)}`,timeOf:(e,t,n)=>`${e} of ${t}${n?`, ${n}`:``}`,hideTimeline:`Hide timeline`,showTimeline:`Show timeline`,rows:{scenes:`Scenes`,voice:`Speech`,music:`Music`,sound:`Sound`},noVoice:`No speech`,noMusic:`No music`,noCues:`No sound cues`,ducked:`lowered under speech`,version:`Language`,script:`Script`,scriptHint:`Delete words to cut them. Delete struck words to keep them.`,scriptReadOnly:`What the video says.`,noScript:`Nobody speaks in this video.`,undo:`Undo`,redo:`Redo`,undoWhat:e=>`Undo ${e}`,redoWhat:e=>`Redo ${e}`,cutWords:`Cut`,keepWords:`Keep`,noEdits:`Words are cut only in a take whose code names an edits file: ask the agent to add one.`,resizeScript:`Script width`,resizeTimeline:`Timeline height`},"zh-cn":{loading:`正在加载预览`,previewTitle:`预览`,denoising:`正在降噪,先播原声`,uncut:e=>`${e} 还没有人像遮罩:人物后面的图层暂时画在人物前面`,play:`播放`,pause:`暂停`,seek:`进度`,toStart:`回到开头`,frameBack:`上一帧`,frameForward:`下一帧`,mute:`静音`,unmute:`取消静音`,volume:`音量`,withKey:(e,t)=>`${e}(${t})`,keys:{space:`空格`,home:`Home`},prevPage:`上一页`,nextPage:`下一页`,pageOf:(e,t)=>`第 ${String(e)} 页,共 ${String(t)} 页`,timeOf:(e,t,n)=>`${e} / ${t}${n?`,${n}`:``}`,hideTimeline:`收起时间线`,showTimeline:`展开时间线`,rows:{scenes:`分段`,voice:`说话`,music:`音乐`,sound:`音效`},noVoice:`没有人说话`,noMusic:`没有音乐`,noCues:`没有音效`,ducked:`有人说话时压低`,version:`语言`,script:`文稿`,scriptHint:`删掉文字就剪掉这段;删掉划线的文字就恢复。`,scriptReadOnly:`视频里说的话。`,noScript:`这个视频里没有人说话。`,undo:`撤销`,redo:`重做`,undoWhat:e=>`撤销「${e}」`,redoWhat:e=>`重做「${e}」`,cutWords:`剪掉`,keepWords:`保留`,noEdits:`只有代码里给这段录音指定了剪辑文件,才能在这里剪词:可以让 agent 加一个。`,resizeScript:`文稿宽度`,resizeTimeline:`时间线高度`},"zh-tw":{loading:`正在載入預覽`,previewTitle:`預覽`,denoising:`正在降噪,先播放原始錄音`,uncut:e=>`${e} 還沒有人像遮罩:人物後方的圖層暫時顯示在人物前面`,play:`播放`,pause:`暫停`,seek:`播放位置`,toStart:`回到開頭`,frameBack:`上一格`,frameForward:`下一格`,mute:`靜音`,unmute:`取消靜音`,volume:`音量`,withKey:(e,t)=>`${e}(${t})`,keys:{space:`空白鍵`,home:`Home`},prevPage:`上一頁`,nextPage:`下一頁`,pageOf:(e,t)=>`第 ${String(e)} 頁,共 ${String(t)} 頁`,timeOf:(e,t,n)=>`${e} / ${t}${n?`,${n}`:``}`,hideTimeline:`收合時間軸`,showTimeline:`展開時間軸`,rows:{scenes:`段落`,voice:`語音`,music:`音樂`,sound:`音效`},noVoice:`沒有語音`,noMusic:`沒有音樂`,noCues:`沒有音效`,ducked:`有語音時降低音量`,version:`語言`,script:`文稿`,scriptHint:`刪掉文字就剪掉這段;刪掉劃線的文字就復原。`,scriptReadOnly:`影片裡說的話。`,noScript:`這部影片裡沒有人說話。`,undo:`復原`,redo:`重做`,undoWhat:e=>`復原「${e}」`,redoWhat:e=>`重做「${e}」`,cutWords:`剪掉`,keepWords:`保留`,noEdits:`只有程式碼為這段錄音指定了剪輯檔,才能在這裡剪詞:可以請 agent 加一個。`,resizeScript:`文稿寬度`,resizeTimeline:`時間軸高度`},ja:{loading:`プレビューを読み込み中`,previewTitle:`プレビュー`,denoising:`音声のノイズを除去中。録音のまま再生しています`,uncut:e=>`${e} の人物マットはまだありません。人物の後ろのレイヤーが前に表示されます`,play:`再生`,pause:`一時停止`,seek:`再生位置`,toStart:`先頭へ`,frameBack:`前のフレーム`,frameForward:`次のフレーム`,mute:`ミュート`,unmute:`ミュート解除`,volume:`音量`,withKey:(e,t)=>`${e}(${t})`,keys:{space:`スペース`,home:`Home`},prevPage:`前のページ`,nextPage:`次のページ`,pageOf:(e,t)=>`${String(e)} / ${String(t)} ページ`,timeOf:(e,t,n)=>`${e} / ${t}${n?`、${n}`:``}`,hideTimeline:`タイムラインを隠す`,showTimeline:`タイムラインを表示`,rows:{scenes:`シーン`,voice:`音声`,music:`音楽`,sound:`効果音`},noVoice:`音声なし`,noMusic:`音楽なし`,noCues:`効果音なし`,ducked:`音声の間は音量を下げる`,version:`言語`,script:`台本`,scriptHint:`言葉を削除するとカットされます。取り消し線の言葉を削除すると元に戻ります。`,scriptReadOnly:`動画の中で話していること。`,noScript:`この動画では誰も話していません。`,undo:`取り消す`,redo:`やり直す`,undoWhat:e=>`「${e}」を取り消す`,redoWhat:e=>`「${e}」をやり直す`,cutWords:`カット`,keepWords:`残す`,noEdits:`単語をカットできるのは、コードがカットファイルを指定しているテイクだけです。エージェントに追加を頼んでください。`,resizeScript:`台本の幅`,resizeTimeline:`タイムラインの高さ`},ko:{loading:`미리보기를 불러오는 중`,previewTitle:`미리보기`,denoising:`음성의 잡음을 제거하는 중입니다. 녹음된 그대로 재생합니다`,uncut:e=>`${e}의 인물 매트가 아직 없습니다. 인물 뒤 레이어가 앞에 보입니다`,play:`재생`,pause:`일시정지`,seek:`재생 위치`,toStart:`처음으로`,frameBack:`이전 프레임`,frameForward:`다음 프레임`,mute:`음소거`,unmute:`음소거 해제`,volume:`볼륨`,withKey:(e,t)=>`${e} (${t})`,keys:{space:`스페이스`,home:`Home`},prevPage:`이전 페이지`,nextPage:`다음 페이지`,pageOf:(e,t)=>`${String(t)}페이지 중 ${String(e)}페이지`,timeOf:(e,t,n)=>`${e} / ${t}${n?`, ${n}`:``}`,hideTimeline:`타임라인 숨기기`,showTimeline:`타임라인 보기`,rows:{scenes:`장면`,voice:`음성`,music:`음악`,sound:`사운드`},noVoice:`음성 없음`,noMusic:`음악 없음`,noCues:`효과음 없음`,ducked:`음성 아래로 낮춤`,version:`언어`,script:`대본`,scriptHint:`단어를 지우면 잘립니다. 줄 그어진 단어를 지우면 다시 살아납니다.`,scriptReadOnly:`영상에서 하는 말.`,noScript:`이 영상에는 말하는 사람이 없습니다.`,undo:`실행 취소`,redo:`다시 실행`,undoWhat:e=>`'${e}' 실행 취소`,redoWhat:e=>`'${e}' 다시 실행`,cutWords:`자르기`,keepWords:`남기기`,noEdits:`코드에 편집 파일이 지정된 테이크에서만 단어를 잘라낼 수 있습니다. 에이전트에게 추가해 달라고 요청하세요.`,resizeScript:`대본 너비`,resizeTimeline:`타임라인 높이`},es:{loading:`Cargando la vista previa`,previewTitle:`Vista previa`,denoising:`Reduciendo el ruido de la voz; se reproduce tal como se grabó`,uncut:e=>`Aún no hay máscara de persona para ${e}: las capas detrás de la persona se ven delante`,play:`Reproducir`,pause:`Pausa`,seek:`Buscar`,toStart:`Ir al inicio`,frameBack:`Fotograma anterior`,frameForward:`Fotograma siguiente`,mute:`Silenciar`,unmute:`Activar sonido`,volume:`Volumen`,withKey:(e,t)=>`${e} (${t})`,keys:{space:`Espacio`,home:`Inicio`},prevPage:`Página anterior`,nextPage:`Página siguiente`,pageOf:(e,t)=>`Página ${String(e)} de ${String(t)}`,timeOf:(e,t,n)=>`${e} de ${t}${n?`, ${n}`:``}`,hideTimeline:`Ocultar la línea de tiempo`,showTimeline:`Mostrar la línea de tiempo`,rows:{scenes:`Escenas`,voice:`Voz`,music:`Música`,sound:`Sonido`},noVoice:`Sin voz`,noMusic:`Sin música`,noCues:`Sin efectos de sonido`,ducked:`bajada bajo la voz`,version:`Idioma`,script:`Guion`,scriptHint:`Borra palabras para cortarlas. Borra las tachadas para recuperarlas.`,scriptReadOnly:`Lo que dice el vídeo.`,noScript:`Nadie habla en este vídeo.`,undo:`Deshacer`,redo:`Rehacer`,undoWhat:e=>`Deshacer: ${e}`,redoWhat:e=>`Rehacer: ${e}`,cutWords:`Cortar`,keepWords:`Mantener`,noEdits:`Solo se pueden cortar palabras en una toma cuyo código indique un archivo de cortes: pide al agente que añada uno.`,resizeScript:`Ancho del guion`,resizeTimeline:`Altura de la línea de tiempo`},fr:{loading:`Chargement de l’aperçu`,previewTitle:`Aperçu`,denoising:`Débruitage de la voix\xA0; lecture telle qu’enregistrée`,uncut:e=>`Pas encore de masque de personne pour ${e}\u00a0: les calques derrière la personne passent devant`,play:`Lire`,pause:`Pause`,seek:`Position`,toStart:`Aller au début`,frameBack:`Image précédente`,frameForward:`Image suivante`,mute:`Couper le son`,unmute:`Activer le son`,volume:`Volume`,withKey:(e,t)=>`${e} (${t})`,keys:{space:`Espace`,home:`Début`},prevPage:`Page précédente`,nextPage:`Page suivante`,pageOf:(e,t)=>`Page ${String(e)} sur ${String(t)}`,timeOf:(e,t,n)=>`${e} sur ${t}${n?`, ${n}`:``}`,hideTimeline:`Masquer la timeline`,showTimeline:`Afficher la timeline`,rows:{scenes:`Scènes`,voice:`Voix`,music:`Musique`,sound:`Son`},noVoice:`Pas de voix`,noMusic:`Pas de musique`,noCues:`Pas d’effets sonores`,ducked:`baissée sous la voix`,version:`Langue`,script:`Script`,scriptHint:`Supprimez des mots pour les couper. Supprimez des mots barrés pour les garder.`,scriptReadOnly:`Ce que dit la vidéo.`,noScript:`Personne ne parle dans cette vidéo.`,undo:`Annuler`,redo:`Rétablir`,undoWhat:e=>`Annuler : ${e}`,redoWhat:e=>`Rétablir : ${e}`,cutWords:`Couper`,keepWords:`Garder`,noEdits:`On ne coupe des mots que dans une prise dont le code nomme un fichier de coupes : demandez à l’agent d’en ajouter un.`,resizeScript:`Largeur du script`,resizeTimeline:`Hauteur de la chronologie`},de:{loading:`Vorschau wird geladen`,previewTitle:`Vorschau`,denoising:`Sprache wird entrauscht; Wiedergabe wie aufgenommen`,uncut:e=>`Noch keine Personenmaske für ${e}: Ebenen hinter der Person erscheinen davor`,play:`Abspielen`,pause:`Pause`,seek:`Springen`,toStart:`Zum Anfang`,frameBack:`Vorheriges Bild`,frameForward:`Nächstes Bild`,mute:`Stummschalten`,unmute:`Ton an`,volume:`Lautstärke`,withKey:(e,t)=>`${e} (${t})`,keys:{space:`Leertaste`,home:`Pos1`},prevPage:`Vorherige Seite`,nextPage:`Nächste Seite`,pageOf:(e,t)=>`Seite ${String(e)} von ${String(t)}`,timeOf:(e,t,n)=>`${e} von ${t}${n?`, ${n}`:``}`,hideTimeline:`Zeitleiste ausblenden`,showTimeline:`Zeitleiste einblenden`,rows:{scenes:`Szenen`,voice:`Sprache`,music:`Musik`,sound:`Ton`},noVoice:`Keine Sprache`,noMusic:`Keine Musik`,noCues:`Keine Soundeffekte`,ducked:`unter Sprache abgesenkt`,version:`Sprache`,script:`Skript`,scriptHint:`Wörter löschen schneidet sie heraus. Durchgestrichene Wörter löschen behält sie wieder.`,scriptReadOnly:`Was im Video gesagt wird.`,noScript:`In diesem Video spricht niemand.`,undo:`Rückgängig`,redo:`Wiederholen`,undoWhat:e=>`Rückgängig: ${e}`,redoWhat:e=>`Wiederholen: ${e}`,cutWords:`Schneiden`,keepWords:`Behalten`,noEdits:`Wörter lassen sich nur in einer Aufnahme schneiden, deren Code eine Schnittdatei nennt: Bitte den Agenten, eine anzulegen.`,resizeScript:`Breite des Skripts`,resizeTimeline:`Höhe der Zeitleiste`},pt:{loading:`Carregando a prévia`,previewTitle:`Prévia`,denoising:`Removendo o ruído da fala; tocando como foi gravada`,uncut:e=>`Ainda não há máscara de pessoa para ${e}: as camadas atrás da pessoa aparecem na frente`,play:`Reproduzir`,pause:`Pausar`,seek:`Posição`,toStart:`Ir para o início`,frameBack:`Quadro anterior`,frameForward:`Próximo quadro`,mute:`Silenciar`,unmute:`Ativar som`,volume:`Volume`,withKey:(e,t)=>`${e} (${t})`,keys:{space:`Espaço`,home:`Home`},prevPage:`Página anterior`,nextPage:`Próxima página`,pageOf:(e,t)=>`Página ${String(e)} de ${String(t)}`,timeOf:(e,t,n)=>`${e} de ${t}${n?`, ${n}`:``}`,hideTimeline:`Ocultar a linha do tempo`,showTimeline:`Mostrar a linha do tempo`,rows:{scenes:`Cenas`,voice:`Fala`,music:`Música`,sound:`Som`},noVoice:`Sem fala`,noMusic:`Sem música`,noCues:`Sem efeitos sonoros`,ducked:`abaixada sob a fala`,version:`Idioma`,script:`Roteiro`,scriptHint:`Apague palavras para cortá-las. Apague palavras riscadas para mantê-las.`,scriptReadOnly:`O que o vídeo diz.`,noScript:`Ninguém fala neste vídeo.`,undo:`Desfazer`,redo:`Refazer`,undoWhat:e=>`Desfazer: ${e}`,redoWhat:e=>`Refazer: ${e}`,cutWords:`Cortar`,keepWords:`Manter`,noEdits:`Só é possível cortar palavras numa tomada cujo código indique um arquivo de cortes: peça ao agente para adicionar um.`,resizeScript:`Largura do roteiro`,resizeTimeline:`Altura da linha do tempo`}});function X(){return nt.of(i()?.locale)}var rt={...te,...et};function it(e,t,n){return at(rt,e,t,n)}function at(e,t,n,r){let i=u(),[a,o]=(0,q.useState)(),s=JSON.stringify([t,n,...r]);return(0,q.useEffect)(()=>{if(n===void 0)return;let r=!0;return ie(e)(i,t,n).then(e=>{r&&o({key:s,data:e})},e=>{r&&o({key:s,error:e instanceof Error?e:Error(String(e))})}),()=>{r=!1}},[i,s]),{data:a?.data,error:a?.key===s?a.error:void 0}}function ot(){let[e,t]=(0,q.useState)(0);return c(`project/changed`,e=>{t(e.revision)}),e}function st(){let e=u(),[t,n]=(0,q.useState)();return(0,q.useEffect)(()=>{let t=!0;return De(e,`check/results`,{}).then(e=>{t&&n(t=>t??e)},()=>void 0),()=>{t=!1}},[e]),c(`check/changed`,n),t}function ct(e,t){let n=u(),[r,i]=(0,q.useState)();(0,q.useEffect)(()=>{let r=!0;return n[`storage/get`]({key:e}).then(n=>{r&&i({key:e,value:n.value===null?t:n.value})},()=>{r&&i({key:e,value:t})}),()=>{r=!1}},[n,e]);let a=(0,q.useCallback)(t=>{i({key:e,value:t}),n[`storage/set`]({key:e,value:t}).catch(()=>void 0)},[n,e]);return[r?.key===e?r.value:void 0,a]}async function lt(e,t){try{return(await e[`files/url`]({path:t})).url}catch{return}}var ut=A({t:w().nonnegative()});function dt(e){let t=ut.safeParse(e);return t.success?t.data:void 0}var ft=e=>({t:Math.round(Math.max(0,e)*1e3)/1e3});function pt(e,t){return e.versions.find(e=>e.key===t)??e.versions[0]}function mt(e,t,n){return e.filter(e=>e.piece===t&&(e.combo===void 0||n.lang===void 0||e.combo.lang===n.lang))}function ht(e,t){try{return new Intl.DisplayNames([t],{type:`language`}).of(e)??e}catch{return e}}var gt=e=>e.still;function _t(e){let t=e?.t;return typeof t==`number`&&Number.isFinite(t)&&t>=0?t:void 0}var vt=e=>e?.sound===!0,yt=(e,t)=>e.from<=t.to&&t.from<=e.to;function bt(e,t){let n=e.find(e=>e.path===t.path);if(!n||t.from===void 0)return;let r={from:t.from,to:t.to??t.from};if(n.music?.some(e=>yt(e,r)))return{music:!0};let i=n.parts.filter(e=>yt(e,r)).sort((e,t)=>e.to-e.from-(t.to-t.from))[0];if(!i)return;let a=i.layers?.findIndex(e=>yt(e,r))??-1,o=i.messages?.find(e=>yt(e,r))?.key,s=i.sounds!==void 0&&yt(i.sounds,r);return{part:i.key,...a>=0?{layer:a}:{},...o===void 0?{}:{message:o},...s?{sounds:s}:{}}}function xt(e,t){return e.parts.find(e=>e.speech?.edits===t)?.key}var St=new Set([`start`,`end`,`still`,`at`]);function Ct(e,t){let n=e.start;return JSON.stringify({part:{...e,steps:e.steps?.map(e=>e-n)},text:t},(e,t)=>typeof t==`number`&&St.has(e)?Math.round((t-n)*1e3)/1e3:t)}function wt(e,t){let n=new Map(e.timeline.parts.map(t=>[t.key,Ct(t,e.text.find(e=>e.key===t.key))]));return t.timeline.parts.filter(e=>n.get(e.key)!==Ct(e,t.text.find(t=>t.key===e.key))).map(e=>e.key)}function Tt(e,t,n={}){let r=e.parts.find(e=>e.key===t);if(r)return{t:gt(r),part:t,...n.layer===void 0?{}:{layer:n.layer},...n.message===void 0?{}:{message:n.message}}}function Et(e){let t=e.audio.music,n=e.audio.mix;return JSON.stringify({file:t?.file,from:t?.from,loop:t?.loop,bpm:t?.tempo?.source===`given`?t.tempo.bpm:void 0,gain:t?.gain?.map(e=>e.db),mix:n?{music:n.music,musicAlone:n.musicAlone,duck:n.duck,musicFade:n.musicFade}:void 0})}function Dt(e,t){return JSON.stringify(e.filter(e=>e.part===t.key).map(e=>({...e,t:Math.round((e.t-t.start)*1e3)/1e3})))}function Ot(e,t){let n=new Map(e.parts.map(t=>[t.key,Dt(e.cues,t)]));return{music:Et(e)!==Et(t),cues:t.parts.filter(e=>(n.get(e.key)??`[]`)!==Dt(t.cues,e)).map(e=>e.key)}}function kt(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&Mt(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46){if(r++,r<e.length&&Mt(e.charCodeAt(r)))for(r++;r<e.length&&Mt(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r)}let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101)){if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&Mt(e.charCodeAt(r))){for(r++;r<e.length&&Mt(e.charCodeAt(r));)r++;n=r}else d=3}return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
2
+ `;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r}else{if(a>=0&&a<=31){if(jt(a)){t+=e.substring(i,r),d=2;break}d=6}r++}}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(At(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(At(t));return o=15}if(jt(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
3
+ `),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!jt(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,jt(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!Mt(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(At(e)||jt(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function At(e){return e===32||e===9}function jt(e){return e===10||e===13}function Mt(e){return e>=48&&e<=57}var Nt;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(Nt||={});var Z=Array(20).fill(0).map((e,t)=>` `.repeat(t)),Pt=200,Ft={" ":{"\n":Array(Pt).fill(0).map((e,t)=>`
4
+ `+` `.repeat(t)),"\r":Array(Pt).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(Pt).fill(0).map((e,t)=>`\r
5
+ `+` `.repeat(t))}," ":{"\n":Array(Pt).fill(0).map((e,t)=>`
6
+ `+` `.repeat(t)),"\r":Array(Pt).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(Pt).fill(0).map((e,t)=>`\r
7
+ `+` `.repeat(t))}},It=[`
8
+ `,`\r`,`\r
9
+ `];function Lt(e,t,n){let r,i,a,o,s;if(t){for(o=t.offset,s=o+t.length,a=o;a>0&&!Vt(e,a-1);)a--;let c=s;for(;c<e.length&&!Vt(e,c);)c++;i=e.substring(a,c),r=zt(i,n)}else i=e,r=0,a=0,o=0,s=e.length;let c=Bt(n,e),l=It.includes(c),u=0,d=0,f;f=n.insertSpaces?Z[n.tabSize||4]??Rt(Z[1],n.tabSize||4):` `;let p=f===` `?` `:` `,m=kt(i,!1),h=!1;function g(){if(u>1)return Rt(c,u)+Rt(f,r+d);let e=f.length*(r+d);return!l||e>Ft[p][c].length?c+Rt(f,r+d):e<=0?c:Ft[p][c][e]}function _(){let e=m.scan();for(u=0;e===15||e===14;)e===14&&n.keepLines?u+=1:e===14&&(u=1),e=m.scan();return h=e===16||m.getTokenError()!==0,e}let v=[];function y(n,r,i){!h&&(!t||r<s&&i>o)&&e.substring(r,i)!==n&&v.push({offset:r,length:i-r,content:n})}let b=_();if(n.keepLines&&u>0&&y(Rt(c,u),0,0),b!==17){let e=m.getTokenOffset()+a;y(f.length*r<20&&n.insertSpaces?Z[f.length*r]:Rt(f,r),a,e)}for(;b!==17;){let e=m.getTokenOffset()+m.getTokenLength()+a,t=_(),r=``,i=!1;for(;u===0&&(t===12||t===13);){let n=m.getTokenOffset()+a;y(Z[1],e,n),e=m.getTokenOffset()+m.getTokenLength()+a,i=t===12,r=i?g():``,t=_()}if(t===2)b!==1&&d--,n.keepLines&&u>0||!n.keepLines&&b!==1?r=g():n.keepLines&&(r=Z[1]);else if(t===4)b!==3&&d--,n.keepLines&&u>0||!n.keepLines&&b!==3?r=g():n.keepLines&&(r=Z[1]);else{switch(b){case 3:case 1:d++,r=n.keepLines&&u>0||!n.keepLines?g():Z[1];break;case 5:r=n.keepLines&&u>0||!n.keepLines?g():Z[1];break;case 12:r=g();break;case 13:u>0?r=g():i||(r=Z[1]);break;case 6:n.keepLines&&u>0?r=g():i||(r=Z[1]);break;case 10:n.keepLines&&u>0?r=g():t===6&&!i&&(r=``);break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&u>0?r=g():(t===12||t===13)&&!i?r=Z[1]:t!==5&&t!==17&&(h=!0);break;case 16:h=!0}u>0&&(t===12||t===13)&&(r=g())}t===17&&(r=n.keepLines&&u>0?g():n.insertFinalNewline?c:``);let o=m.getTokenOffset()+a;y(r,e,o),b=t}return v}function Rt(e,t){let n=``;for(let r=0;r<t;r++)n+=e;return n}function zt(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===Z[1])r++;else if(t===` `)r+=i;else break;n++}return Math.floor(r/i)}function Bt(e,t){for(let e=0;e<t.length;e++){let n=t.charAt(e);if(n===`\r`)return e+1<t.length&&t.charAt(e+1)===`
10
+ `?`\r
11
+ `:`\r`;if(n===`
12
+ `)return`
13
+ `}return e&&e.eol||`
14
+ `}function Vt(e,t){return`\r
15
+ `.indexOf(e.charAt(t))!==-1}var Ht;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ht||={});function Ut(e,t=[],n=Ht.DEFAULT){let r={type:`array`,offset:-1,length:-1,children:[],parent:void 0};function i(e){r.type===`property`&&(r.length=e-r.offset,r=r.parent)}function a(e){return r.children.push(e),e}Gt(e,{onObjectBegin:e=>{r=a({type:`object`,offset:e,length:-1,parent:r,children:[]})},onObjectProperty:(e,t,n)=>{r=a({type:`property`,offset:t,length:-1,parent:r,children:[]}),r.children.push({type:`string`,value:e,offset:t,length:n,parent:r})},onObjectEnd:(e,t)=>{i(e+t),r.length=e+t-r.offset,r=r.parent,i(e+t)},onArrayBegin:(e,t)=>{r=a({type:`array`,offset:e,length:-1,parent:r,children:[]})},onArrayEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,i(e+t)},onLiteralValue:(e,t,n)=>{a({type:Kt(e),offset:t,length:n,parent:r,value:e}),i(t+n)},onSeparator:(e,t,n)=>{r.type===`property`&&(e===`:`?r.colonOffset=t:e===`,`&&i(t))},onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n);let o=r.children[0];return o&&delete o.parent,o}function Wt(e,t){if(!e)return;let n=e;for(let e of t)if(typeof e==`string`){if(n.type!==`object`||!Array.isArray(n.children))return;let t=!1;for(let r of n.children)if(Array.isArray(r.children)&&r.children[0].value===e&&r.children.length===2){n=r.children[1],t=!0;break}if(!t)return}else{let t=e;if(n.type!==`array`||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}function Gt(e,t,n=Ht.DEFAULT){let r=kt(e,!1),i=[],a=0;function o(e){return e?()=>a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(e){return e?()=>{a>0?a++:e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(a=1)}:()=>!0}function u(e){return e?()=>{a>0&&a--,a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let d=l(t.onObjectBegin),f=c(t.onObjectProperty),p=u(t.onObjectEnd),m=l(t.onArrayBegin),h=u(t.onArrayEnd),g=c(t.onLiteralValue),_=s(t.onSeparator),v=o(t.onComment),y=s(t.onError),b=n&&n.disallowComments,x=n&&n.allowTrailingComma;function S(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:b||C(11);break;case 2:C(12);break;case 6:C(16)}switch(e){case 12:case 13:b?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){S();break}if(n.indexOf(e)!==-1)break;e=S()}}}function w(e){let t=r.getTokenValue();return e?g(t):(f(t),i.push(t)),S(),!0}function T(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return S(),!0}function E(){return r.getToken()===10?(w(!1),r.getToken()===6?(_(`:`),S(),k()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),!0):(C(3,[],[2,5]),!1)}function D(){d(),S();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||C(4,[],[]),_(`,`),S(),r.getToken()===2&&x)break}else e&&C(6,[],[]);E()||C(4,[],[2,5]),e=!0}return p(),r.getToken()===2?S():C(7,[2],[]),!0}function O(){m(),S();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||C(4,[],[]),_(`,`),S(),r.getToken()===4&&x)break}else t&&C(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,k()||C(4,[],[4,5]),t=!0}return h(),e||i.pop(),r.getToken()===4?S():C(8,[4],[]),!0}function k(){switch(r.getToken()){case 3:return O();case 1:return D();case 10:return w(!0);default:return T()}}return S(),r.getToken()===17?n.allowEmptyContent?!0:(C(4,[],[]),!1):k()?(r.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}function Kt(e){switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`string`:return`string`;case`object`:return e?Array.isArray(e)?`array`:`object`:`null`;default:return`null`}}function qt(e,t,n,r){let i=t.slice(),a=Ut(e,[]),o,s;for(;i.length>0&&(s=i.pop(),o=Wt(a,i),o===void 0&&n!==void 0);)n=typeof s==`string`?{[s]:n}:[n];if(!o){if(n===void 0)throw Error(`Can not delete in empty document`);return Jt(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}if(o.type===`object`&&typeof s==`string`&&Array.isArray(o.children)){let t=Wt(o,[s]);if(t!==void 0){if(n===void 0){if(!t.parent)throw Error(`Malformed AST`);let n=o.children.indexOf(t.parent),i,a=t.parent.offset+t.parent.length;if(n>0){let e=o.children[n-1];i=e.offset+e.length}else i=o.offset+1,o.children.length>1&&(a=o.children[1].offset);return Jt(e,{offset:i,length:a-i,content:``},r)}return Jt(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},r)}{if(n===void 0)return[];let t=`${JSON.stringify(s)}: ${JSON.stringify(n)}`,i=r.getInsertionIndex?r.getInsertionIndex(o.children.map(e=>e.children[0].value)):o.children.length,a;if(i>0){let e=o.children[i-1];a={offset:e.offset+e.length,length:0,content:`,`+t}}else a=o.children.length===0?{offset:o.offset+1,length:0,content:t}:{offset:o.offset+1,length:0,content:t+`,`};return Jt(e,a,r)}}if(o.type===`array`&&typeof s==`number`&&Array.isArray(o.children)){let t=s;if(t===-1){let t=`${JSON.stringify(n)}`,i;if(o.children.length===0)i={offset:o.offset+1,length:0,content:t};else{let e=o.children[o.children.length-1];i={offset:e.offset+e.length,length:0,content:`,`+t}}return Jt(e,i,r)}if(n===void 0&&o.children.length>=0){let t=s,n=o.children[t],i;if(o.children.length===1)i={offset:o.offset+1,length:o.length-2,content:``};else if(o.children.length-1===t){let e=o.children[t-1],n=e.offset+e.length;i={offset:n,length:o.offset+o.length-2-n,content:``}}else i={offset:n.offset,length:o.children[t+1].offset-n.offset,content:``};return Jt(e,i,r)}if(n!==void 0){let t,i=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>s){let e=o.children[s];t={offset:e.offset,length:e.length,content:i}}else if(o.children.length===0||s===0)t={offset:o.offset+1,length:0,content:o.children.length===0?i:i+`,`};else{let e=s>o.children.length?o.children.length:s,n=o.children[e-1];t={offset:n.offset+n.length,length:0,content:`,`+i}}return Jt(e,t,r)}throw Error(`Can not ${n===void 0?`remove`:r.isArrayInsertion?`insert`:`modify`} Array index ${t} as length is not sufficient`)}throw Error(`Can not add ${typeof s==`number`?`property`:`index`} to parent of type ${o.type}`)}function Jt(e,t,n){if(!n.formattingOptions)return[t];let r=Yt(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!Vt(r,i-1);)i--;for(;a<r.length&&!Vt(r,a);)a++}let o=Lt(r,{offset:i,length:a-i},{...n.formattingOptions,keepLines:!1});for(let e=o.length-1;e>=0;e--){let t=o[e];r=Yt(r,t),i=Math.min(i,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}let s=e.length-(r.length-a)-i;return[{offset:i,length:s,content:r.substring(i,a)}]}function Yt(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var Xt;(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(Xt||={});var Zt;(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(Zt||={});var Qt=Ut,$t=Wt,en;(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(en||={});function tn(e,t,n,r){return qt(e,t,n,r)}function nn(e,t){let n=t.slice(0).sort((e,t)=>{let n=e.offset-t.offset;return n===0?e.length-t.length:n}),r=e.length;for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.offset+i.length<=r)e=Yt(e,i);else throw Error(`Overlapping edit`);r=i.offset}return e}function rn(e){let t=e.includes(`\r
16
+ `)?`\r
17
+ `:`
18
+ `,n=/\n([ \t]+)"/.exec(e)?.[1]??` `;return n.startsWith(` `)?{insertSpaces:!1,tabSize:1,eol:t}:{insertSpaces:!0,tabSize:n.length,eol:t}}var an=80;function on(e){if(Array.isArray(e))return`[${e.map(on).join(`, `)}]`;if(typeof e==`object`&&e){let t=Object.entries(e).map(([e,t])=>`${JSON.stringify(e)}: ${on(t)}`);return t.length?`{ ${t.join(`, `)} }`:`{}`}return JSON.stringify(e)}var sn={type:`object`,offset:0,length:0};function cn(e,t,n,r){let i=rn(e);if(t.length===0){let e=i.insertSpaces?i.tabSize:` `;return`${JSON.stringify(n,null,e)}${i.eol??`
19
+ `}`}let a=[...t],o=e.trim()===``?`{}
20
+ `:e,s=$t(Qt(o)??sn,a),c=s===void 0||!o.slice(s.offset,s.offset+s.length).includes(`
21
+ `);if(o=nn(o,tn(o,a,n,{formattingOptions:i,...r?{getInsertionIndex:r}:{}})),typeof n==`object`&&n&&c){let e=$t(Qt(o)??sn,a),t=on(n);if(e){let n=o.lastIndexOf(`
22
+ `,e.offset)+1;e.offset-n+t.length+1<=an&&(o=o.slice(0,e.offset)+t+o.slice(e.offset+e.length))}}return o}var ln=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0;function un(e){if(typeof e!=`object`||!e||Array.isArray(e))return`an edits file is a JSON object: { version: 1, remove, sounds, inWord, maxPause, pad }`;let t=e;if(t.version!==1)return`version is 1`;for(let e of[`take`,`$schema`])if(t[e]!==void 0&&typeof t[e]!=`string`)return`${e} is a string`;let n=Object.keys(t).filter(e=>![`version`,`remove`,`sounds`,`inWord`,`maxPause`,`pad`,`take`,`$schema`].includes(e));if(n.length>0)return`unknown field${n.length>1?`s`:``} ${n.join(`, `)} (an edits file has version, remove, sounds, inWord, maxPause, pad and take)`;let r={};if(t.remove!==void 0){if(!Array.isArray(t.remove))return`remove is a list of { from, to, text }`;let e=[];for(let[n,r]of t.remove.entries()){let t=r,i=t?.from,a=t?.to,o=t?.text;if(typeof i!=`number`||typeof a!=`number`||!Number.isInteger(i)||!Number.isInteger(a)||i<0||a<i||o!==void 0&&typeof o!=`string`)return`remove[${String(n)}] is not { from, to, text } with word indices from ≤ to`;e.push({from:i,to:a,...o===void 0?{}:{text:o}})}r.remove=e}for(let e of[`sounds`,`inWord`]){if(t[e]===void 0)continue;if(!Array.isArray(t[e]))return`${e} is a list of { from, to } in seconds of the take`;let n=[];for(let[r,i]of t[e].entries()){let t=i,a=t?.from,o=t?.to;if(!ln(a)||!ln(o)||o<=a)return`${e}[${String(r)}] is not { from, to } in seconds with from < to`;n.push({from:a,to:o})}r[e]=n}let i=t.maxPause;if(i!==void 0){if(typeof i!=`number`||!Number.isFinite(i)||i<.05||i>10)return`maxPause is seconds, from 0.05 to 10`;r.maxPause=i}let a=t.pad;if(a!==void 0){let e=a,t=typeof a==`object`&&e!==null&&!Array.isArray(a),n=t?Object.keys(e).filter(e=>e!==`before`&&e!==`after`):[],i=e=>e===void 0||ln(e)&&e<=2;if(!t||n.length>0||!i(e.before)||!i(e.after))return`pad is { before, after }: seconds of silence kept before and after each cut, each from 0 to 2`;let o=e.before,s=e.after;r.pad={...o===void 0?{}:{before:o},...s===void 0?{}:{after:s}}}return r}function dn(e,t){if(e.length===0)return 0;let n=e[0];if(!n||t<=n.t)return n?.db??0;for(let n=1;n<e.length;n++){let r=e[n-1],i=e[n];if(r&&i&&t<=i.t)return i.t===r.t?i.db:r.db+(i.db-r.db)*(t-r.t)/(i.t-r.t)}return e.at(-1)?.db??0}function fn(e,t){let n=e.speed??1,r=e.cuts&&e.cuts.length>0?e.cuts:[{at:e.start,from:e.from}];for(let i=0;i<r.length;i++){let a=r[i];if(!a)continue;let o=r[i+1]?.at??e.end,s=a.from+(o-a.at)*n;if(t>=a.from-1e-6&&t<s+1e-6)return a.at+(t-a.from)/n}}function pn(e,t){return(e?.remove??[]).some(e=>t>=e.from&&t<=e.to)}function mn(e,t,n){return e.parts.flatMap(e=>{let r=e.speech;if(!r)return[];let i=t.get(r.file);if(!i)return[];let[a,o]=r.words??[0,i.length-1],s=r.edits===void 0?void 0:n.get(r.edits),c=[];for(let e=a;e<=o&&e<i.length;e++){let t=i[e];if(!t)continue;let n=pn(s,e),a=n?void 0:fn(r,t.start),o=n?void 0:fn(r,Math.max(t.start,t.end-1e-4));c.push({i:e,text:t.text,start:t.start,end:t.end,removed:n,...a===void 0?{}:{film:a},...o===void 0?{}:{filmEnd:o}})}return[{part:e.key,title:e.title??e.key,file:r.file,...r.edits===void 0?{}:{edits:r.edits},words:c}]})}function hn(e){let t=[...e].sort((e,t)=>e.from-t.from),n=[];for(let e of t){let t=n.at(-1);t&&e.from<=t.to+1?(t.to=Math.max(t.to,e.to),delete t.text):n.push({...e})}return n}function gn(e,t,n){return e.slice(t,n+1).map(e=>e.text).join(` `)}function _n(e,t){return e.map(e=>({from:e.from,to:e.to,text:gn(t,e.from,e.to)}))}function vn(e,t,n,r){let[i,a]=t<=n?[t,n]:[n,t],o=_n(hn([...e?.remove??[],{from:i,to:a}]),r);return{version:1,...e??{},remove:o}}function yn(e,t,n,r){let[i,a]=t<=n?[t,n]:[n,t],o=[];for(let t of e?.remove??[])t.to<i||t.from>a?o.push(t):(t.from<i&&o.push({from:t.from,to:i-1}),t.to>a&&o.push({from:a+1,to:t.to}));let s={version:1,...e??{},remove:_n(hn(o),r)};return s.remove?.length===0&&delete s.remove,s}function bn(e,t){let n=e=>{let t=new Set;for(let n of e?.remove??[])for(let e=n.from;e<=n.to;e++)t.add(e);return t},r=n(e),i=n(t);return{cut:[...i].filter(e=>!r.has(e)).sort((e,t)=>e-t),kept:[...r].filter(e=>!i.has(e)).sort((e,t)=>e-t)}}var xn=/[.?!…。?!](["'”’)\]」』]*)$/u;function Sn(e){let t=[[]];for(let n of e)t.at(-1)?.push(n),xn.test(n.text)&&t.push([]);return t.length>1&&t.at(-1)?.length===0&&t.pop(),t}function Cn(e){if(e.trim()!==``)try{let t=un(JSON.parse(e));return typeof t==`string`?void 0:t}catch{return}}var wn=class{text;constructor(e){this.text=e}get list(){return Cn(this.text)}setRemove(e){let t=e?.length?e:void 0;this.text=this.text.trim()===``?`${JSON.stringify({version:1,...t?{remove:t}:{}},null,2)}\n`:cn(this.text,[`remove`],t)}take(e,t){let n=this.list?.remove,r=JSON.stringify(n)===JSON.stringify(Cn(t)?.remove);this.text=r||e.trim()===``?e:cn(e,[`remove`],n)}};function Tn(e){let t=u(),[n,r]=(0,q.useState)(0),i=(0,q.useCallback)(()=>{r(e=>e+1)},[]),a=(0,q.useRef)(void 0),o=(0,q.useRef)(void 0),s=(0,q.useRef)(new Map),c=(0,q.useRef)(new Map),[l,d]=(0,q.useState)();(0,q.useEffect)(()=>{if(e)return;let n=Re.open(t,[]);a.current=n;let r=s.current,l=c.current,u;return n.then(e=>{o.current=e,u=e.onUndo(i),i()}),()=>{u?.(),a.current=void 0,o.current=void 0,r.clear(),l.clear(),n.then(e=>e.close())}},[t,e,i]);let f=(0,q.useCallback)(e=>{let t=a.current;if(t===void 0)return;let n=c.current.get(e);return n||(n=t.then(async t=>{let n=await t.add(e),r=s.current.get(e);if(r)return r;let a=new wn(n.text);return n.attach({save:()=>a.text===n.text?void 0:a.text,take:(t,n,r)=>{a.take(t,n),r?.kind===`agent`&&d({path:e,...bn(Cn(n),Cn(t))}),i()}}),s.current.set(e,a),i(),a}),c.current.set(e,n)),n},[i]),p=t=>{let n=s.current.get(t);if(!n)e||f(t);else return n.list},m=(t,n)=>{let r=o.current;!e&&r&&n.length!==0&&(async()=>{let e=[];for(let t of n){let n=f(t.path);if(n===void 0)return;e.push(n)}let a=await Promise.all(e),o=n.flatMap((e,t)=>{let n=a[t];if(!n)return[];let r=n.list?.remove,i=e.next(n.list).remove;return n.setRemove(i),{undo:()=>{n.setRemove(r)},redo:()=>{n.setRemove(i)}}});r.pushEdit({label:t,files:[...new Set(n.map(e=>e.path))],undo:()=>{for(let e of[...o].reverse())e.undo();i()},redo:()=>{for(let e of o)e.redo();i()}}),i()})()},h=o.current;return{listOf:p,apply:m,undo:()=>{o.current?.undo()},redo:()=>{o.current?.redo()},canUndo:h?.canUndo??!1,canRedo:h?.canRedo??!1,undoLabel:h?.undoLabel,redoLabel:h?.redoLabel,tick:n,byAgent:l}}var En=(e,t)=>({...e,outline:e.outline.map(e=>e.map(e=>({x:(e.x-t.x)/t.width,y:(e.y-t.y)/t.height})))}),Dn=(e,t)=>({...e,outline:e.outline.map(e=>e.map(e=>({x:t.x+e.x*t.width,y:t.y+e.y*t.height})))}),On=e=>e.outline.map(e=>`M${e.map(e=>`${String(e.x)} ${String(e.y)}`).join(`L`)}Z`).join(``),kn=(e,t)=>e!==void 0&&On(e)===On(t);function An({moment:e,box:t,pick:n,label:r,ref:i}){let[a,o]=(0,q.useState)(),[s,c]=(0,q.useState)(),l=t=>t?.moment===e?t.layer:void 0,u=l(s),d=l(a);(0,q.useImperativeHandle)(i,()=>({selected:()=>{let e=t();return u&&e?Dn(u,e):void 0}}),[u]);let f=(0,q.useRef)({busy:!1,over:!1}),p=(0,q.useRef)(!0);(0,q.useEffect)(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=async e=>{let r=t(),i=r?await n(e):void 0;return i&&r?En(i,r):void 0},h=t=>{let n=f.current;if(n.over=t!==void 0,t===void 0){delete n.next,o(void 0);return}if(n.next=t,n.busy)return;n.busy=!0;let r=()=>{let t=n.next;delete n.next,t===void 0?n.busy=!1:m(t).then(t=>{p.current&&(n.over&&o(t?{layer:t,moment:e}:void 0),r())})};r()},g=u!==void 0;(0,q.useEffect)(()=>{if(!g)return;let e=e=>{e.key===`Escape`&&c(void 0)};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[g]);let _=u?(e=>{let t=e.outline.flat(),n=t.map(e=>e.x),r=t.map(e=>e.y);return{centre:(Math.min(...n)+Math.max(...n))/2,bottom:Math.max(...r)}})(u):void 0;return(0,J.jsxs)(`div`,{role:`application`,"aria-label":r,"data-testid":`stage-select`,className:`absolute inset-0`,onPointerMove:e=>{e.buttons===0&&h({x:e.clientX,y:e.clientY})},onPointerLeave:()=>{h(void 0)},onPointerDown:t=>{if(t.button!==0&&t.button!==2)return;let n=t.button===2;m({x:t.clientX,y:t.clientY}).then(t=>{p.current&&(t?c({layer:t,moment:e}):n||c(void 0))})},children:[(0,J.jsxs)(`svg`,{"aria-hidden":!0,"data-note-chrome":``,viewBox:`0 0 1 1`,preserveAspectRatio:`none`,className:`pointer-events-none absolute inset-0 size-full overflow-visible`,children:[d&&!kn(u,d)?(0,J.jsxs)(`g`,{"data-testid":`stage-hovered`,children:[(0,J.jsx)(`path`,{d:On(d),vectorEffect:`non-scaling-stroke`,className:`stroke-sheet/80 fill-none stroke-[3px]`}),(0,J.jsx)(`path`,{d:On(d),vectorEffect:`non-scaling-stroke`,className:`stroke-pencil fill-none stroke-1`})]}):null,u?(0,J.jsxs)(`g`,{"data-testid":`stage-selected`,children:[(0,J.jsx)(`path`,{d:On(u),vectorEffect:`non-scaling-stroke`,className:`stroke-sheet fill-none stroke-[5px]`}),(0,J.jsx)(`path`,{d:On(u),vectorEffect:`non-scaling-stroke`,className:`stroke-pencil fill-none stroke-2`})]}):null]}),_?(0,J.jsx)(`div`,{className:`absolute mt-2 -translate-x-1/2`,style:{left:`${String(_.centre*100)}%`,top:`${String(Math.min(1,_.bottom)*100)}%`},children:(0,J.jsx)(he,{})}):null]})}function jn(e,t){return`${e.file===void 0?e.key===void 0?`the ${e.layer} layer`:`layer ${JSON.stringify(e.key)} (${e.layer})`:`the footage ${e.file}`}${e.name===void 0||e.name===e.key?``:`, at ${JSON.stringify(e.name)} in it,`} of ${t} ${e.part}`}function Mn(e){if(typeof e==`object`&&e&&e.allyhub===!0&&typeof e.type==`string`)return e}function Nn(e,t){e?.postMessage({allyhub:!0,...t},`*`)}function Pn(e,t,n,r,i=window){if(!e||t.width===0||t.height===0)return Promise.resolve([]);let a=crypto.randomUUID();return new Promise(o=>{let s=e=>{clearTimeout(l),i.removeEventListener(`message`,c),o(e)},c=t=>{if(t.source!==e)return;let n=Mn(t.data);n?.type===`located`&&n.id===a&&s(n.layers)},l=setTimeout(()=>{s([])},r);i.addEventListener(`message`,c),Nn(e,{type:`locate`,id:a,mark:d(n,({x:e,y:n})=>({x:(e-t.x)/t.width,y:(n-t.y)/t.height}))})})}function Fn(e,t,n,r,i=window){if(!e||t.width===0||t.height===0)return Promise.resolve(void 0);let a=crypto.randomUUID();return new Promise(o=>{let s=e=>{clearTimeout(l),i.removeEventListener(`message`,c),o(e&&{...e,outline:e.outline.map(e=>e.map(e=>({x:t.x+e.x*t.width,y:t.y+e.y*t.height})))})},c=t=>{if(t.source!==e)return;let n=Mn(t.data);n?.type===`picked`&&n.id===a&&s(n.picked)},l=setTimeout(()=>{s(void 0)},r);i.addEventListener(`message`,c),Nn(e,{type:`pick`,id:a,at:{x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}})})}function In(e,t,n){let r=new Map(t.map(e=>[e.key,e])),i=e.parts.flatMap(e=>{let t=e.speech;if(!t)return[];let n=r.get(e.key);return[{...n?.speechKey===void 0?{}:{key:n.speechKey},part:e.key,start:t.start,end:t.end,text:n?.spoken??``,file:t.file,from:t.from,speed:t.speed??1,...t.cuts?{cuts:t.cuts}:{}}]}),a=n?.music,o;if(a&&a.segments.length>0){let t=a.segments[0],n=a.segments.at(-1),r=Math.min(e.duration,a.until??(n?n.at+n.dur:e.duration)),i=[];for(let e=1;e<a.duck.length;e++){let t=a.duck[e-1],n=a.duck[e];if(t&&n&&t.db<0&&n.db<0){let e=i.at(-1);e&&Math.abs(e.end-t.t)<1e-9?e.end=n.t:i.push({start:t.t,end:n.t})}}o={file:a.file,start:t?.at??0,end:r,stretches:a.segments.map(e=>({at:e.at,from:e.from,dur:e.dur})),ducked:i,duck:a.duck,fadeIn:a.fadeIn,fadeOut:a.fadeOut}}return{cues:e.cues,speech:i,music:o}}function Ln(e,t){if(t<e.start||t>=e.end)return;let n=e.start,r=e.from;for(let i of e.cuts??[]){if(i.at>t)break;n=i.at,r=i.from}return r+(t-n)*e.speed}function Rn(e,t){for(let n=e.stretches.length-1;n>=0;n--){let r=e.stretches[n];if(r&&t>=r.at&&t<r.at+r.dur)return r.from+(t-r.at)}}function zn(e,t){let n=10**(dn(e.duck,t)/20);return e.fadeIn>0&&t-e.start<e.fadeIn&&(n*=Math.max(0,t-e.start)/e.fadeIn),e.fadeOut>0&&e.end-t<e.fadeOut&&(n*=Math.max(0,e.end-t)/e.fadeOut),Math.max(0,n)}function Bn(e){let t=new Set((e.index??[]).filter(e=>e.matte===!0).map(e=>e.file));return e.parts.flatMap(n=>{let r=(e.footage??[]).find(e=>e.part===n.key&&t.has(e.file));return r?[{part:n.key,file:r.file}]:[]})}var Vn=48,Hn=20,Un=`allyhub.video.volume`;function Wn(){try{let e=JSON.parse(localStorage.getItem(Un)??`null`);if(typeof e==`object`&&e&&`level`in e&&typeof e.level==`number`&&`muted`in e&&typeof e.muted==`boolean`)return{level:Math.min(1,Math.max(0,e.level)),muted:e.muted}}catch{}return{level:1,muted:!1}}var Gn=e=>e.muted?0:e.level,Kn=1e3,qn=20,Jn=1500,Yn=15e3,Xn=1500,Zn=300,Qn=e=>({timeline:e.timeline,texts:e.text,uncut:Bn(e.timeline)});function $n({item:e,version:t,revision:n,width:r,height:c,start:l,overlay:d,onLoaded:p,onError:h,onState:g,timelineOpen:y,onTimelineOpen:b,ref:x}){let S=X(),C=u(),w=(0,q.useRef)(null),T=(0,q.useRef)(new Map),[E,D]=(0,q.useState)(),[O,k]=(0,q.useState)(),[A,j]=(0,q.useState)(),[ee,te]=(0,q.useState)(),[ne,re]=(0,q.useState)(),[M,ie]=(0,q.useState)(!1),[ae,oe]=(0,q.useState)(),se=s(ae),[N,P]=(0,q.useState)({t:l?.t??0,part:void 0,playing:!1}),[F,ce]=(0,q.useState)(Wn),I=(0,q.useRef)(F),[le,ue]=(0,q.useState)(0),[de,fe]=(0,q.useState)(),pe=(0,q.useRef)(1),me=(0,q.useRef)(void 0),he=(0,q.useRef)(!1),L=(0,q.useCallback)(e=>{let t=ft(e);me.current!==t.t&&(me.current=t.t,C[`editor/place`]({place:t}).catch(()=>void 0))},[C]),R=(0,q.useRef)({shown:E,pending:O,play:N,view:ee,onLoaded:p,onError:h,onState:g});(0,q.useEffect)(()=>{R.current={shown:E,pending:O,play:N,view:ee,onLoaded:p,onError:h,onState:g}});let _e=e=>e===void 0?void 0:w.current?.querySelector(`iframe[data-frame="${String(e.id)}"]`)?.contentWindow,z=e=>{Nn(_e(R.current.shown),e)};(0,q.useImperativeHandle)(x,()=>({seek:e=>{z({type:`seek`,t:e}),L(e)},play:()=>{z({type:`play`})},pause:()=>{z({type:`pause`})},objects:e=>new Promise(t=>{let n=setTimeout(()=>{T.current.delete(e),t(void 0)},Xn);T.current.set(e,e=>{clearTimeout(n),t(e)}),z({type:`objects`,t:e})})}));let ve=n=>tt(C,`video/stage`,{item:e,version:t,start:n,chrome:!1}).then(e=>(oe(e.probe),e.url)),ye=`${e}\n${t}`,B=(0,q.useRef)(e);(0,q.useEffect)(()=>{let{shown:t,play:n}=R.current,r=B.current===e;B.current=e;let i={t:0},a=t?r?{t:n.t}:i:l??i,o=!0;return ve(a).then(e=>{o&&(D({id:pe.current++,src:e}),k(void 0),j(void 0),re(void 0))},e=>{if(!o)return;let t=e instanceof Error?e.message:String(e);re(t),R.current.onError?.(t)}),()=>{o=!1}},[ye]);let be=(0,q.useRef)(n);(0,q.useEffect)(()=>{if(n===be.current)return;be.current=n;let{shown:e,play:t,view:r}=R.current;if(!e)return;let i=r?.timeline.parts.find(e=>t.t>=e.start&&t.t<e.end),a=i?{t:t.t,part:i.key,offset:t.t-i.start,dur:i.end-i.start}:{t:t.t},o=!0;return ve(a).then(e=>{o&&k({id:pe.current++,src:e,from:t.t})},e=>{o&&R.current.onError?.(e instanceof Error?e.message:String(e))}),()=>{o=!1}},[n]),(0,q.useEffect)(()=>{if(!A)return;let e=setTimeout(()=>{j(void 0)},Zn);return()=>{clearTimeout(e)}},[A]),(0,q.useEffect)(()=>{if(!O)return;let e=setTimeout(()=>{k(void 0),R.current.onError?.(`The stage did not draw within ${String(Yn)} ms.`)},Yn);return()=>{clearTimeout(e)}},[O]),(0,q.useEffect)(()=>{let e=e=>{let t=Mn(e.data);if(!t)return;let{shown:n,pending:r}=R.current,i=[n,r].find(t=>t!==void 0&&_e(t)===e.source);if(!i)return;let a=i.id===r?.id;if(t.type===`objects`){if(a)return;T.current.get(t.t)?.(t),T.current.delete(t.t);let n=R.current.play.t;Math.abs(t.t-n)>1e-6&&Nn(e.source,{type:`seek`,t:n})}else if(t.type===`sound`)i.denoising=t.denoising,a||ie(t.denoising);else if(t.type===`loaded`){Nn(e.source,{type:`volume`,level:Gn(I.current)});let n={kind:t.kind,timeline:t.timeline,text:t.text,reads:t.reads,problems:t.problems,mix:t.mix};if(a){i.loaded=n;return}te(Qn(n)),re(void 0),R.current.onLoaded?.(n)}else if(t.type===`error`)a?k(void 0):re(t.message),R.current.onError?.(t.message);else if(t.type===`time`){if(a){if(!i.loaded)return;j(n&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?n:void 0),D(i),k(void 0),ue(e=>e+1),ie(i.denoising===!0),te(Qn(i.loaded)),re(void 0),R.current.onLoaded?.(i.loaded);let t=R.current.play.t;if(i.from!==void 0&&Math.abs(t-i.from)>1e-6){Nn(e.source,{type:`seek`,t});return}}let r={t:t.t,part:t.part,playing:t.playing};r.playing&&he.current||L(r.t),he.current=r.playing,fe(i.id),P(r),R.current.onState?.(r)}};return window.addEventListener(`message`,e),()=>{window.removeEventListener(`message`,e)}},[L]);let V=ee?.timeline,[xe,H]=V?[V.width,V.height]:[r,c],Se=ee?.uncut.find(e=>e.part===N.part);(0,q.useEffect)(()=>{I.current=F,z({type:`volume`,level:Gn(F)});try{localStorage.setItem(Un,JSON.stringify(F))}catch{}},[F]);let Ce=N.playing;(0,q.useEffect)(()=>{if(V===void 0)return;let e=1/V.fps,t=Math.max(0,V.duration-e),n=e=>{let n=Math.min(Math.max(Ye(e,V.fps),0),t);Nn(_e(R.current.shown),{type:`seek`,t:n}),L(n)},r=r=>{if(r.metaKey||r.ctrlKey||r.altKey||r.defaultPrevented)return;let i=r.target;if(i instanceof HTMLElement&&(i.isContentEditable||i.closest(`input,textarea,select,button,a,[role=slider],[role=menuitem],[role=dialog]`)))return;let a=R.current.play.t,o=r.key.length===1?r.key.toLowerCase():r.key;if(o===` `||o===`k`)Nn(_e(R.current.shown),{type:Ce?`pause`:`play`});else if(o===`ArrowLeft`)n(a-e);else if(o===`ArrowRight`)n(a+e);else if(o===`Home`)n(0);else if(o===`End`)n(t);else if(o===`m`)ce(e=>({...e,muted:!e.muted}));else return;r.preventDefault()};return window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r)}},[Ce,V,L]);let we=e=>{z({type:`seek`,t:e}),L(e)},Te=(e,t)=>(0,J.jsx)(`iframe`,{"data-frame":e.id,src:e.src,title:S.previewTitle,...se?{sandbox:`allow-scripts`}:{},allow:`autoplay`,"data-testid":t===`shown`?`stage`:t===`pending`?`stage-pending`:`stage-leaving`,className:m(`absolute -inset-0.5 size-[calc(100%+4px)] border-0`,t===`pending`&&`pointer-events-none opacity-0`,t===`leaving`&&`ak-stage-leaving pointer-events-none z-[1]`)},e.id),Ee=V?`bg-background`:`bg-black`,De=()=>{let e=w.current?.getBoundingClientRect();return e&&e.width>0&&e.height>0?{x:e.x,y:e.y,width:e.width,height:e.height}:void 0},Oe=ge()!==void 0,ke=(0,q.useRef)(null),Ae=i()?.item.entry,je=e=>{let t=e.piece??Ae;return{name:jn(e,`part`),...t===void 0?{}:{source:{path:t}},...e.text===void 0?{}:{text:e.text}}},U=()=>{let{t:e,part:t}=R.current.play;return`on the picture at ${e.toFixed(2)} s${t===void 0?``:`, in the part ${t}`}`},Me=e=>({element:je(e),outline:e.outline,where:U()}),Ne=e=>{let t=De();return t?Fn(_e(R.current.shown),t,e,Jn):Promise.resolve(void 0)},W=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`absolute inset-0 isolate`,children:[A&&se!==void 0?Te(A,`leaving`):null,E&&se!==void 0?Te(E,`shown`):null,O&&se!==void 0?Te(O,`pending`):null]}),Oe&&E&&V&&!N.playing&&N.t>=.05?(0,J.jsx)(An,{ref:ke,moment:`${String(E.id)}@${N.t.toFixed(4)}`,box:De,pick:Ne,label:S.previewTitle}):null,V||ne!==void 0?null:(0,J.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,J.jsx)(v,{label:S.loading,className:`[&>span]:bg-on-media/80`})}),M?(0,J.jsx)(`span`,{className:`bg-background/90 text-muted-foreground absolute top-2 right-2 rounded-sm px-2 py-0.5 font-mono text-micro`,"data-testid":`denoising`,children:S.denoising}):null,V?(0,J.jsx)(`span`,{"aria-hidden":!0,"data-testid":`play-affordance`,"data-shown":!N.playing&&N.t<.05?``:void 0,className:`bg-foreground/92 text-background pointer-events-none absolute top-1/2 left-1/2 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-md opacity-0 transition-opacity data-[shown]:opacity-100`,children:(0,J.jsx)(K,{className:`size-6 translate-x-px fill-current`})}):null,Se?(0,J.jsx)(`span`,{className:`bg-background/90 text-muted-foreground absolute top-2 left-2 max-w-[calc(100%-1rem)] rounded-sm px-2 py-0.5 font-mono text-micro`,"data-testid":`uncut`,children:S.uncut(Se.file)}):null,d]}),Pe=de!==void 0&&de===E?.id,Fe=async()=>{z({type:`pause`});let e=Date.now()+Kn;for(;R.current.play.playing&&Date.now()<e;)await new Promise(e=>{setTimeout(e,qn)})};o({hold:async()=>{await Fe();let{t:n,part:r}=R.current.play;return{key:`${e}@${t}@${n.toFixed(3)}@${String(R.current.shown?.id??0)}`,what:`The video ${e}, version ${t}, at ${n.toFixed(2)} s${r===void 0?``:`, in the part ${r}`}`,...Ae===void 0?{}:{source:{path:Ae}}}},locate:e=>{let t=De(),n=f(e)[0],r=t!==void 0&&n!==void 0&&n.x>=t.x&&n.x<=t.x+t.width&&n.y>=t.y&&n.y<=t.y+t.height,i=[...document.querySelectorAll(`[data-row]`)].filter(t=>_(e,t.getBoundingClientRect())).map(e=>({name:`the ${e.dataset.row??``} row of the timeline`}));return Promise.resolve({elements:i,...r?{}:{where:`on the timeline`}})},selected:()=>{let e=ke.current?.selected();return Promise.resolve(e?[Me(e)]:[])}}),a({element:()=>E?w.current:void 0,pictures:async()=>{let n=De();if(!n)return[];let r=await tt(C,`video/still`,{item:e,version:t,t:R.current.play.t}).catch(()=>void 0);return r?[{rect:n,mime:r.image.mime,data:r.image.data}]:[]},locate:async e=>{let t=De(),{t:n,part:r}=R.current.play;return{elements:(t?await Pn(_e(R.current.shown),t,e,Jn):[]).map(je),where:`on the picture at ${n.toFixed(2)} s${r===void 0?``:`, in the part ${r}`}`}},pick:async e=>{let t=await Ne(e);return t?Me(t):void 0}});let Ie=!y,Le=Vn+(Ie?Hn:0)+3,Re=`min(100cqw - 2px, (100cqh - ${String(Le)}px) * ${String(xe/H)})`;return(0,J.jsx)(`div`,{className:`flex h-full min-h-0 flex-col gap-2`,"data-testid":`video-preview`,"data-t":N.t.toFixed(4),"data-ready":Pe?``:void 0,"data-swaps":le,children:(0,J.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center [container-type:size]`,children:(0,J.jsxs)(`div`,{className:`box-content overflow-hidden border shadow-[0_1px_2px_rgb(0_0_0/0.06),0_14px_36px_-14px_rgb(0_0_0/0.22)]`,style:{width:Re},"data-testid":`player`,children:[(0,J.jsx)(`div`,{ref:w,className:m(`relative mx-auto overflow-hidden`,Ee),style:{width:Re,height:`calc(${Re} * ${String(H/xe)})`},children:W}),V?(0,J.jsx)(tr,{timeline:V,state:N,folded:Ie,volume:F,onVolume:ce,onOpen:b,onToggle:()=>{z({type:N.playing?`pause`:`play`})},onSeek:we}):(0,J.jsx)(`div`,{className:`border-t`,style:{height:Le-3}})]})})})}var er=2;function tr({timeline:e,state:t,folded:n,volume:r,onVolume:i,onOpen:a,onToggle:o,onSeek:s}){let c=X(),{duration:l,fps:u}=e,d=Math.max(0,l-1/u),f=e=>{s(Math.min(Math.max(Ye(e,u),0),d))},p=(e,t,n,r,i)=>(0,J.jsx)(g,{size:`icon-sm`,variant:`ghost`,className:m(`text-muted-foreground`,i.className),"aria-label":e,title:c.withKey(e,t),"data-testid":i.testid,onClick:r,children:n});return(0,J.jsxs)(`div`,{className:`border-t [container-type:inline-size]`,"data-testid":`transport`,children:[n?(0,J.jsx)(`div`,{className:`px-3 pt-1`,style:{height:Hn},children:(0,J.jsx)(rr,{timeline:e,state:t,onSeek:s})}):null,(0,J.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto_1fr] items-center gap-2 px-3`,style:{height:Vn},children:[(0,J.jsxs)(`span`,{className:`min-w-0 justify-self-start truncate font-mono text-xs tabular-nums`,"data-testid":`clock`,children:[Y(Math.min(t.t,l)),(0,J.jsxs)(`span`,{className:`text-muted-foreground @max-[18rem]:hidden`,children:[` / `,Y(l)]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[p(c.toStart,c.keys.home,(0,J.jsx)(Ve,{}),()=>{f(0)},{testid:`to-start`,className:`@max-[22rem]:hidden`}),p(c.frameBack,`←`,(0,J.jsx)(He,{}),()=>{f(t.t-1/u)},{testid:`frame-back`,className:`@max-[22rem]:hidden`}),(0,J.jsx)(g,{size:`icon`,className:`mx-1 rounded-full`,"aria-label":t.playing?c.pause:c.play,title:c.withKey(t.playing?c.pause:c.play,c.keys.space),"data-testid":`play`,onClick:o,children:t.playing?(0,J.jsx)(G,{className:`fill-current`}):(0,J.jsx)(K,{className:`translate-x-px fill-current`})}),p(c.frameForward,`→`,(0,J.jsx)(Ue,{}),()=>{f(t.t+1/u)},{testid:`frame-forward`,className:`@max-[22rem]:hidden`})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-0.5 justify-self-end`,children:[(0,J.jsx)(nr,{volume:r,onVolume:i}),n?(0,J.jsx)(g,{size:`icon-sm`,variant:`ghost`,className:`text-muted-foreground -mr-1`,"aria-label":c.showTimeline,title:c.showTimeline,"aria-expanded":!1,"data-testid":`timeline-toggle`,onClick:()=>{a(!0)},children:(0,J.jsx)(F,{})}):null]})]})]})}function nr({volume:e,onVolume:t}){let n=X(),r=Gn(e),i=r===0?Ke:r<.5?Ge:We,a=e.muted?n.unmute:n.mute;return(0,J.jsxs)(`div`,{className:`group/volume flex items-center`,"data-testid":`volume`,children:[(0,J.jsx)(`input`,{type:`range`,min:0,max:100,step:1,value:Math.round(r*100),"aria-label":n.volume,"data-testid":`volume-slider`,className:`accent-foreground h-1 w-0 cursor-pointer opacity-0 group-focus-within/volume:mr-1 group-focus-within/volume:w-20 group-focus-within/volume:opacity-100 group-hover/volume:mr-1 group-hover/volume:w-20 group-hover/volume:opacity-100 motion-safe:transition-[width,opacity,margin] motion-safe:duration-150`,onChange:e=>{let n=Number(e.currentTarget.value)/100;t({level:n,muted:n===0})}}),(0,J.jsx)(g,{size:`icon-sm`,variant:`ghost`,className:`text-muted-foreground`,"aria-label":a,title:n.withKey(a,`M`),"aria-pressed":e.muted,"data-testid":`mute`,onClick:()=>{t(e.muted&&e.level===0?{level:1,muted:!1}:{...e,muted:!e.muted})},children:(0,J.jsx)(i,{})})]})}function rr({timeline:e,state:t,onSeek:n}){let r=X(),{duration:i,fps:a}=e,o=Math.max(0,i-1/a),s=e.parts.length?e.parts.map((e,t)=>({key:e.key,name:e.title??String(t+1),start:e.start,end:e.end})):[{key:``,name:``,start:0,end:i}],c=(s.length-1)*er,[l,u]=(0,q.useState)(),[d,f]=(0,q.useState)(),p=Math.min(l??t.t,i),m=e=>Math.max(0,s.findIndex((t,n)=>n===s.length-1||e<t.end)),h=s[m(p)],g=e=>{let t=e.currentTarget.getBoundingClientRect(),n=Math.min(t.width,Math.max(0,e.clientX-t.left)),r=Math.max(1,t.width-c),l=0,u=i;for(let e of s){let t=r*(e.end-e.start)/Math.max(i,1e-6);if(n<=l+t+er/2){let r=Math.min(1,Math.max(0,(n-l)/Math.max(t,1)));u=e.start+r*(e.end-e.start);break}l+=t+er}return{x:n,t:Math.min(Math.max(Ye(u,a),0),o)}},_=e=>{n(Math.min(Math.max(Ye(e,a),0),o))},v=d?s[m(d.t)]?.name:void 0;return(0,J.jsxs)(`div`,{role:`slider`,tabIndex:0,"aria-label":r.seek,"aria-valuemin":0,"aria-valuemax":Math.round(i*100)/100,"aria-valuenow":Math.round(p*100)/100,"aria-valuetext":r.timeOf(Y(p),Y(i),h?.name??``),"data-testid":`scrubber`,className:`group/scrub focus-visible:outline-ring relative h-6 min-w-0 flex-1 cursor-pointer touch-none rounded-sm outline-none focus-visible:outline-1 focus-visible:outline-solid focus-visible:-outline-offset-1`,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId);let t=g(e);u(t.t),f(t),n(t.t)},onPointerMove:e=>{let t=g(e);f(t),l!==void 0&&t.t!==l&&(u(t.t),n(t.t))},onPointerUp:()=>{u(void 0)},onPointerCancel:()=>{u(void 0)},onPointerLeave:()=>{f(void 0)},onKeyDown:e=>{if(e.key===`ArrowLeft`)_(t.t-1);else if(e.key===`ArrowRight`)_(t.t+1);else if(e.key===`Home`)_(0);else if(e.key===`End`)_(o);else return;e.preventDefault()},children:[(0,J.jsx)(`div`,{className:`absolute inset-x-0 top-1/2 flex h-1 -translate-y-1/2 transition-[height] duration-100 group-hover/scrub:h-1.5`,style:{gap:er},children:s.map(e=>{let t=Math.max(e.end-e.start,1e-6),n=Math.min(1,Math.max(0,(p-e.start)/t));return(0,J.jsx)(`span`,{"data-chapter":e.key,className:`bg-rule-strong relative min-w-0 overflow-hidden`,style:{flexGrow:t,flexBasis:0},children:(0,J.jsx)(`span`,{className:`bg-foreground absolute inset-y-0 left-0`,style:{width:`${String(n*100)}%`}})},e.key)})}),(0,J.jsx)(`span`,{"aria-hidden":!0,className:`bg-foreground ring-background pointer-events-none absolute top-1/2 h-3 w-[3px] -translate-x-1/2 -translate-y-1/2 ring-1`,style:{left:`calc((100% - ${String(c)}px) * ${String(p/Math.max(i,1e-6))} + ${String(m(p)*er)}px)`}}),d?(0,J.jsxs)(`span`,{role:`tooltip`,"data-testid":`scrub-tip`,className:`bg-popover text-popover-foreground shadow-overlay pointer-events-none absolute bottom-full z-10 mb-1.5 flex max-w-[16rem] -translate-x-1/2 items-baseline gap-2 rounded-sm px-2 py-1 whitespace-nowrap`,style:{left:d.x},children:[v?(0,J.jsx)(`span`,{className:`truncate font-serif text-dense`,children:v}):null,(0,J.jsx)(`span`,{className:`text-muted-foreground font-mono text-micro tabular-nums`,children:Y(d.t)})]}):null]})}function ir(e){let t=(0,q.useRef)(void 0),n=t=>Math.round(Math.max(e.min,Math.min(e.max,t))),r=e.orientation===`vertical`,i=e.after===!0?-1:1,a=e=>r?e.clientX:e.clientY,[o,s]=r?[`ArrowLeft`,`ArrowRight`]:[`ArrowUp`,`ArrowDown`];return(0,J.jsx)(`div`,{role:`separator`,"aria-orientation":e.orientation,"aria-label":e.label,"aria-valuenow":e.value,"aria-valuemin":e.min,"aria-valuemax":e.max,tabIndex:0,"data-testid":e.testid,className:r?`group relative z-30 w-px shrink-0 cursor-col-resize bg-border outline-none before:absolute before:inset-y-0 before:-inset-x-1.5 before:content-['']`:`group relative z-30 h-px shrink-0 cursor-row-resize bg-border outline-none before:absolute before:-inset-y-1.5 before:inset-x-0 before:content-['']`,onPointerDown:n=>{t.current={at:a(n),value:e.value},n.currentTarget.setPointerCapture(n.pointerId)},onPointerMove:r=>{let o=t.current;o&&e.onChange(n(o.value+i*(a(r)-o.at)))},onPointerUp:()=>{t.current=void 0},onKeyDown:t=>{let r=(t.shiftKey?40:8)*i;if(t.key===s)e.onChange(n(e.value+r));else if(t.key===o)e.onChange(n(e.value-r));else return;t.preventDefault()},children:(0,J.jsx)(`span`,{"aria-hidden":!0,className:`group-hover:bg-rule-strong group-focus-visible:bg-pencil pointer-events-none absolute inset-0`})})}function ar(e,t,n,r=4){let i=e.map(({x:e,width:n},r)=>{let i=e+n>t&&e-n>=0?`before`:`after`;return i===`after`?{i:r,side:i,from:e,to:e+n}:{i:r,side:i,from:e-n,to:e}}),a=[],o=e.map(()=>null);for(let e of[...i].sort((e,t)=>e.from-t.from||e.i-t.i)){let t=0;for(;t<n&&(a[t]??-1/0)+r>e.from;)t++;t!==n&&(a[t]=e.to,o[e.i]={lane:t,side:e.side})}return o}var or=.01,sr=new Map;async function cr(e){try{let t=await fetch(e);if(!t.ok)return;let n=await t.arrayBuffer(),r=await new OfflineAudioContext(1,1,44100).decodeAudioData(n),i=r.sampleRate/50,a=Math.ceil(r.length/i),o=new Float32Array(a),s=0;for(let e=0;e<r.numberOfChannels;e++){let t=r.getChannelData(e);for(let e=0;e<a;e++){let n=Math.min(t.length,Math.floor((e+1)*i)),r=o[e]??0;for(let a=Math.floor(e*i);a<n;a++){let e=Math.abs(t[a]??0);e>r&&(r=e)}o[e]=r,r>s&&(s=r)}}if(s<or)return;let c=Float32Array.from(o).sort(),l=c[Math.floor(c.length*.95)]??s;return{duration:r.duration,data:o,max:l>0?l:s}}catch{return}}function lr(e){let t=sr.get(e);return t||(t=cr(e),sr.set(e,t)),t}function ur(e){let[t,n]=(0,q.useState)();(0,q.useEffect)(()=>{if(e===void 0)return;let t=!0;return lr(e).then(r=>{t&&n({url:e,peaks:r})}),()=>{t=!1}},[e]);let r=t?.url===e?t:void 0;return{peaks:r?.peaks,settled:e===void 0||r!==void 0}}function dr(e,t,n){let r=Math.max(0,Math.floor(t*50)),i=Math.min(e.data.length,Math.max(r+1,Math.ceil(n*50))),a=0;for(let t=r;t<i;t++){let n=e.data[t]??0;n>a&&(a=n)}return a}var fr={scenes:`text-track-scene`,voice:`text-track-voice`,music:`text-track-music`,sound:`text-track-sound`},Q={ruler:28,scenes:36,voice:40,music:32,sound:28},pr={parts:[],music:!1,cues:[],listening:!1,round:0};function mr(e){return Q.ruler+1+Q.scenes+1+e.reduce((e,t)=>e+Q[t]+1,0)}var hr=6;function gr(e,t){let n=e=>e.join(` `).replace(/\s+([.,!?;:。,!?;:、])/g,`$1`).trim(),[r,...i]=e;if(r===t&&i.length>0){let e=n(i);if(/^[^a-z]/.test(e))return e}return n(e)}function _r(e){return e<=60?{minor:1,major:5}:e<=180?{minor:1,major:10}:e<=600?{minor:5,major:30}:e<=1800?{minor:10,major:60}:{minor:60,major:300}}var $=(e,t)=>`${String(e/Math.max(t,1e-6)*100)}%`;function vr({title:e,mono:t=!1,time:n,line:r,children:i}){return(0,J.jsxs)(V,{children:[(0,J.jsx)(be,{asChild:!0,children:i}),(0,J.jsx)(B,{side:`top`,sideOffset:6,className:`max-w-[20rem]`,children:(0,J.jsxs)(`span`,{className:`flex flex-col gap-0.5 text-left`,children:[(0,J.jsx)(`span`,{className:m(t&&`font-mono text-micro`),children:e}),(0,J.jsx)(`span`,{className:`font-mono text-micro tabular-nums opacity-70`,children:n}),r?(0,J.jsx)(`span`,{className:`opacity-80`,children:r}):null]})})]})}function yr(e){let t=u(),[n,r]=(0,q.useState)();return(0,q.useEffect)(()=>{let n=!0;return lt(t,e).then(t=>{n&&r({file:e,url:t})}),()=>{n=!1}},[t,e]),n?.file===e?n.url:void 0}function br({file:e,from:t,to:n,sample:r,alpha:i,className:a}){let o=(0,q.useRef)(null),{peaks:s,settled:c}=ur(yr(e)),[l,u]=(0,q.useState)(!1);return(0,q.useEffect)(()=>{let e=o.current;if(!e||!s)return;let a=()=>{let a=window.devicePixelRatio||1,o=Math.round(e.clientWidth*a),c=Math.round(e.clientHeight*a);if(!o||!c)return;e.width=o,e.height=c;let l=e.getContext(`2d`);if(!l)return;l.fillStyle=getComputedStyle(e).color,l.globalAlpha=i;let d=1/Math.max(s.max,.05),f=n-t,p=c-2*Math.round(2*a);for(let e=0;e<o;e+=2){let n=r(t+e/o*f);if(!n)continue;let i=dr(s,n.at,n.at+2/o*f)*d*n.gain,a=Math.max(1,Math.round(Math.min(1,i)**xr*p));l.fillRect(e,Math.round((c-a)/2),1,a)}u(!0)};a();let c=new ResizeObserver(a);c.observe(e);let l=new MutationObserver(a);return l.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}),()=>{c.disconnect(),l.disconnect()}},[s,t,n,r,i]),(0,J.jsx)(`canvas`,{ref:o,"aria-hidden":!0,"data-wave":l?`ready`:c?`none`:`pending`,className:m(`pointer-events-none absolute inset-0 size-full opacity-0 transition-opacity data-[wave=ready]:opacity-100`,a)})}var xr=.7,Sr=`focus-visible:outline-ring absolute inset-y-1 overflow-hidden rounded-xs border focus-visible:outline-1 focus-visible:outline-solid focus-visible:-outline-offset-1`;function Cr({line:e,duration:t,onSeek:n}){let r=(0,q.useCallback)(t=>{let n=Ln(e,t);return n===void 0?void 0:{at:n,gain:1}},[e]);return(0,J.jsx)(vr,{title:e.text,time:`${Je(e.start)} – ${Je(e.end)} · ${Xe(e.file)}`,children:(0,J.jsxs)(`button`,{type:`button`,"data-sentence":e.key??e.part,"data-start":e.start.toFixed(4),className:m(Sr,`bg-track-voice/15 border-track-voice/60 hover:bg-track-voice/25 text-left`),style:{left:$(e.start,t),width:$(e.end-e.start,t)},onPointerDown:e=>{e.stopPropagation()},onClick:()=>{n(e.start)},children:[(0,J.jsx)(`span`,{className:`absolute inset-x-1.5 top-0 block h-[14px] truncate text-micro leading-[14px]`,children:e.text}),(0,J.jsx)(`span`,{className:`absolute inset-x-0 top-[14px] bottom-0`,children:(0,J.jsx)(br,{file:e.file,from:e.start,to:e.end,sample:r,alpha:.7,className:`text-track-voice`})})]})})}var wr=2,Tr=.75;function Er({parts:e,duration:t}){let n=(0,q.useRef)(null),r=(0,q.useRef)(new Map),[i,a]=(0,q.useState)(0),[o,s]=(0,q.useState)(()=>new Map),c=e.flatMap(e=>(e.anchors??[]).map(t=>({id:`${e.key}@${t.name}`,part:e.key,anchor:t}))),l=c.map(e=>e.id).join(`
23
+ `);(0,q.useLayoutEffect)(()=>{let e=n.current;if(!e)return;let t=()=>{a(e.clientWidth);let t=new Map;for(let[e,n]of r.current)t.set(e,n.offsetWidth);s(e=>e.size===t.size&&[...t].every(([t,n])=>e.get(t)===n)?e:t)};t();let i=new ResizeObserver(t);i.observe(e);for(let e of r.current.values())i.observe(e);return()=>{i.disconnect()}},[l]);let u=ar(c.map(e=>({x:e.anchor.at/Math.max(t,1e-6)*i,width:o.get(e.id)??0})),i,wr);return(0,J.jsx)(`div`,{ref:n,className:`pointer-events-none absolute inset-0`,children:c.map((e,n)=>(0,J.jsx)(Dr,{part:e.part,anchor:e.anchor,duration:t,place:u[n]??null,nameRef:t=>(r.current.set(e.id,t),()=>{r.current.delete(e.id)})},e.id))})}function Dr({part:e,anchor:t,duration:n,place:r,nameRef:i}){let{at:a,end:o}=t,s=(a,o)=>(0,J.jsx)(`span`,{"data-anchor":`${e}:${t.name}${a?`:end`:``}`,"data-time":o.toFixed(4),title:t.name,className:`before:bg-foreground/70 absolute inset-y-0 z-10 -ml-1 w-2 before:absolute before:inset-y-0 before:left-1/2 before:w-px`,style:{left:$(o,n)},children:!a&&(0,J.jsx)(`span`,{ref:i,"data-anchor-lane":r?String(r.lane):void 0,className:m(`bg-background text-muted-foreground absolute rounded-xs px-0.5 font-mono text-micro leading-3 whitespace-nowrap`,r?.side===`before`?`right-1/2 mr-px`:`left-1/2 ml-px`,!r&&`invisible`),style:{bottom:`${String((r?.lane??0)*Tr)}rem`},children:t.name})},a?`end`:`at`);return(0,J.jsxs)(J.Fragment,{children:[o!==void 0&&o>a&&(0,J.jsx)(`span`,{className:`bg-foreground/50 pointer-events-none absolute bottom-0 z-10 h-px`,style:{left:$(a,n),width:$(o-a,n)}}),s(!1,a),o!==void 0&&s(!0,o)]})}function Or({music:e,duration:t,ducked:n}){let{start:r,end:i}=e,a=(0,q.useCallback)(t=>{let n=Rn(e,t);return n===void 0?void 0:{at:n,gain:zn(e,t)}},[e]),o=Xe(e.file);return(0,J.jsx)(vr,{mono:!0,title:o,time:`${Je(r)} – ${Je(i)}`,line:e.ducked.length?n:void 0,children:(0,J.jsxs)(`div`,{"data-music":o,className:m(Sr,`bg-track-music/15 border-track-music/60`),style:{left:$(r,t),width:$(i-r,t)},children:[(0,J.jsx)(br,{file:e.file,from:r,to:i,sample:a,alpha:.6,className:`text-track-music`}),(0,J.jsx)(`span`,{className:`bg-background/85 text-foreground absolute top-1/2 left-1.5 -translate-y-1/2 rounded-xs px-1 font-mono text-micro leading-[14px]`,children:o})]})})}var kr=(0,q.memo)(function({timeline:e,texts:t,tracks:n,rows:r,current:i,second:a,marks:o,onSeek:s}){let c=X(),{duration:l,parts:u}=e,d=e=>(0,J.jsx)(`span`,{className:`text-muted-foreground bg-background pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 px-1 text-xs leading-4`,children:e}),f=n.speech,p=n.music?[n.music]:[],h=n.cues,g=e=>u.find(t=>t.key===e)?.title??e;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`relative border-t`,style:{height:Q.scenes+1},"data-row":`scenes`,children:[u.map((e,n)=>{let r=e.key===i,o=e.title??e.key,c=t.find(t=>t.key===e.key),u=c?.spoken??gr(c?.onScreen??[],o),d=(e.end-e.start)*a<56;return(0,J.jsx)(vr,{title:(0,J.jsx)(`span`,{className:`font-serif text-dense`,children:o}),time:`${Je(e.start)} – ${Je(e.end)}`,line:u||void 0,children:(0,J.jsxs)(`button`,{type:`button`,"data-chapter":e.key,"data-start":e.start.toFixed(4),"aria-current":r?`true`:void 0,className:m(Sr,`flex items-center gap-1.5 px-2 text-left transition-colors`,r?`bg-track-scene/25 border-track-scene`:`bg-track-scene/10 border-track-scene/45 hover:bg-track-scene/20`),style:{left:$(e.start,l),width:`calc(${$(e.end-e.start,l)} - 1px)`},onPointerDown:e=>{e.stopPropagation()},onClick:()=>{s(e.start)},children:[(0,J.jsx)(`span`,{className:m(`font-mono text-micro tabular-nums`,r?`text-foreground/70`:`text-muted-foreground`),children:String(n+1)}),d?null:(0,J.jsx)(`span`,{className:m(`min-w-0 truncate font-serif text-xs`,r?`font-semibold`:`text-foreground/80`),children:o})]})},e.key)}),u.filter(e=>o.parts.includes(e.key)).map(e=>(0,J.jsx)(`span`,{"aria-hidden":!0,"data-testid":`agent-changed`,"data-part":e.key,className:`ak-agent-wash bg-agent/25 outline-agent pointer-events-none absolute inset-y-1 rounded-xs outline-2`,style:{left:$(e.start,l),width:`calc(${$(e.end-e.start,l)} - 1px)`}},`${String(o.round)}:${e.key}`))]}),r.includes(`voice`)?(0,J.jsxs)(`div`,{className:`relative border-t`,style:{height:Q.voice+1},"data-row":`voice`,children:[f.length>0?f.map(e=>(0,J.jsx)(Cr,{line:e,duration:l,onSeek:s},`${e.part}@${String(e.start)}`)):d(c.noVoice),(0,J.jsx)(Er,{parts:u,duration:l})]}):null,r.includes(`music`)?(0,J.jsxs)(`div`,{className:`relative border-t`,style:{height:Q.music+1},"data-row":`music`,children:[p.length?p.map(e=>(0,J.jsx)(Or,{music:e,duration:l,ducked:c.ducked},`${e.file}@${String(e.start)}`)):d(c.noMusic),o.music?p.map(e=>(0,J.jsx)(`span`,{"aria-hidden":!0,"data-testid":`agent-music`,className:`outline-agent pointer-events-none absolute inset-y-1 rounded-xs outline-2`,style:{left:$(e.start,l),width:$(e.end-e.start,l)}},`${e.file}@${String(e.start)}`)):null]}):null,r.includes(`sound`)?(0,J.jsxs)(`div`,{className:`relative border-t`,style:{height:Q.sound+1},"data-row":`sound`,children:[(0,J.jsx)(`span`,{className:`bg-rule-strong absolute inset-x-0 top-1/2 h-px`}),h.length?h.map((e,t)=>(0,J.jsx)(vr,{mono:!0,title:e.sound,time:`${Je(e.t)} · ${g(e.part)}`,line:e.what,children:(0,J.jsx)(`span`,{"data-cue":e.sound,"data-agent":o.cues.includes(e.part)?``:void 0,className:`absolute top-1/2 block size-[7px] -translate-y-1/2`,style:{left:$(e.t,l)},children:(0,J.jsx)(`span`,{className:m(`block size-full rotate-45`,o.cues.includes(e.part)?`bg-agent`:`bg-track-sound`,e.t*a<5?`translate-x-[2px]`:`-translate-x-1/2`)})})},`${e.sound}@${String(e.t)}#${String(t)}`)):d(c.noCues)]}):null]})});function Ar({timeline:e,texts:t,tracks:n,rows:r,state:i,agent:a,marks:o=pr,transport:s,onSeek:c}){let l=X(),{duration:u,fps:d,parts:f}=e,p=Math.max(0,u-1/d),h=(0,q.useRef)(null),_=(0,q.useRef)(null),[v,b]=(0,q.useState)(0),[x,S]=(0,q.useState)(!1),[C,w]=(0,q.useState)();(0,q.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t=()=>{b(e.clientWidth)};t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[]);let T=v>0&&v/u<hr,E=T?Math.ceil(u*hr):v,D=E/Math.max(u,1e-6),{t:O,playing:k}=i;(0,q.useEffect)(()=>{let e=_.current;if(!e)return;let t=t=>{let n=Math.min(Math.max(t,0),u)*D;e.style.transform=`translateX(${String(n)}px)`;let r=h.current;T&&k&&r&&(n<r.scrollLeft+24||n>r.scrollLeft+r.clientWidth-24)&&(r.scrollLeft=Math.max(0,n-r.clientWidth*.2))};if(t(O),!k)return;let n=performance.now(),r=requestAnimationFrame(function e(i){t(Math.min(O+(i-n)/1e3,p)),r=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(r)}},[O,k,D,u,p,T]);let A=e=>{let t=e.currentTarget.getBoundingClientRect(),n=Math.min(t.width,Math.max(0,e.clientX-t.left))/Math.max(t.width,1)*u;return Math.min(Math.max(Ye(n,d),0),p)},j=e=>{c(Math.min(Math.max(Ye(e,d),0),p))},ee=f.find(e=>i.t>=e.start&&i.t<e.end)??f.at(-1),{minor:te,major:ne}=_r(u),re=[];for(let e=0;e<=u+1e-6;e+=te)re.push(e);let M=(e,t)=>(0,J.jsxs)(`div`,{className:`flex items-center gap-1.5 overflow-hidden border-t pr-2 pl-3 max-[559px]:justify-center max-[559px]:px-0`,style:{height:Q[e]+1},"data-track":e,children:[(0,J.jsx)(`span`,{role:`img`,"aria-label":l.rows[e],className:m(`shrink-0 [&_svg]:size-3.5`,fr[e]),children:t}),(0,J.jsx)(y,{"aria-hidden":!0,className:`text-micro whitespace-nowrap max-[559px]:hidden`,children:l.rows[e]})]});return(0,J.jsx)(xe,{children:(0,J.jsxs)(`div`,{className:`relative flex`,style:{height:mr(r)},"data-testid":`timeline`,children:[(0,J.jsxs)(`div`,{className:`w-max min-w-20 shrink-0 border-r max-[559px]:w-10 max-[559px]:min-w-10`,children:[s?(0,J.jsx)(`div`,{className:`flex items-center gap-1.5 pr-1 pl-2 max-[559px]:justify-center max-[559px]:px-0`,style:{height:Q.ruler},"data-testid":`timeline-corner`,children:(0,J.jsx)(g,{size:`icon-xs`,variant:`ghost`,className:`text-muted-foreground ml-auto`,"aria-label":l.hideTimeline,title:l.hideTimeline,"aria-expanded":!0,"data-testid":`timeline-toggle`,onClick:s.onFold,children:(0,J.jsx)(P,{})})}):(0,J.jsx)(`div`,{style:{height:Q.ruler}}),M(`scenes`,(0,J.jsx)(Ee,{})),r.includes(`voice`)?M(`voice`,(0,J.jsx)(ze,{})):null,r.includes(`music`)?M(`music`,(0,J.jsx)(Be,{})):null,r.includes(`sound`)?M(`sound`,(0,J.jsx)(Se,{})):null]}),(0,J.jsx)(`div`,{ref:h,className:m(`relative min-w-0 flex-1 overflow-y-hidden border-l border-transparent`,T?`overflow-x-auto`:`overflow-x-hidden`),"data-testid":`tracks`,children:(0,J.jsxs)(`div`,{className:`relative h-full cursor-pointer touch-none`,style:{width:E||`100%`},onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),S(!0),c(A(e))},onPointerMove:e=>{let t=A(e);w(t),x&&c(t)},onPointerUp:()=>{S(!1)},onPointerCancel:()=>{S(!1)},onPointerLeave:()=>{w(void 0)},children:[(0,J.jsx)(`div`,{role:`slider`,tabIndex:0,"aria-label":l.seek,"aria-valuemin":0,"aria-valuemax":Math.round(u*100)/100,"aria-valuenow":Math.round(i.t*100)/100,"aria-valuetext":l.timeOf(Y(i.t),Y(u),ee?.title??``),"data-testid":`scrubber`,className:`focus-visible:outline-ring relative outline-none focus-visible:outline-1 focus-visible:outline-solid focus-visible:-outline-offset-1`,style:{height:Q.ruler},onKeyDown:e=>{if(e.key===`ArrowLeft`)j(i.t-1);else if(e.key===`ArrowRight`)j(i.t+1);else if(e.key===`Home`)j(0);else if(e.key===`End`)j(p);else return;e.preventDefault()},children:re.map(e=>{let t=Math.abs(e/ne-Math.round(e/ne))<1e-6;return(0,J.jsxs)(`span`,{className:`absolute bottom-0`,style:{left:$(e,u)},children:[(0,J.jsx)(`span`,{className:m(`absolute bottom-0 left-0 w-px`,t?`bg-lead-soft h-2`:`bg-rule-strong h-1`)}),t&&(u-e)*D>34?(0,J.jsx)(`span`,{className:`text-muted-foreground absolute bottom-[7px] left-1 font-mono text-micro leading-none tabular-nums`,children:Y(e)}):null]},e)})}),(0,J.jsx)(kr,{timeline:e,texts:t,tracks:n,rows:r,current:i.part??ee?.key,second:D,marks:o,onSeek:c}),C===void 0?null:(0,J.jsxs)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 left-0 z-10`,style:{transform:`translateX(${String(C*D)}px)`},"data-testid":`hover-guide`,children:[(0,J.jsx)(`span`,{className:`bg-foreground/25 absolute inset-y-0 left-0 w-px`}),(0,J.jsx)(`span`,{className:`bg-popover text-popover-foreground absolute top-0.5 left-1 rounded-xs border px-1 font-mono text-micro leading-[14px] tabular-nums`,children:Y(C)})]}),a?.t===void 0?null:(0,J.jsx)(Oe,{"aria-hidden":!0,"data-testid":`agent-marker`,className:`z-20`,label:a.label,flag:Math.min(a.t,u)*D>E-140?`before`:`after`,style:{left:Math.min(a.t,u)*D}}),(0,J.jsxs)(`div`,{ref:_,"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 left-0 z-20 will-change-transform`,"data-testid":`playhead`,children:[(0,J.jsx)(`span`,{className:`bg-foreground absolute inset-y-0 left-0 w-px`}),(0,J.jsx)(`svg`,{viewBox:`0 0 9 9`,className:`text-foreground absolute top-0 -left-1 size-[9px]`,children:(0,J.jsx)(`path`,{d:`M0 0h9v4L4.5 9 0 4z`,fill:`currentColor`})})]})]})}),a&&o.listening&&r.length>0?(0,J.jsx)(Ae,{"aria-hidden":!0,"data-testid":`agent-listening`,label:a.label,className:`z-30`,style:{left:0,right:0,top:Q.ruler+1+Q.scenes+1,bottom:0}}):null]})})}var jr=new U(`scriptAgent`),Mr=new Ne({nodes:{doc:{content:`part*`},part:{content:`sentence+`,attrs:{part:{default:``},title:{default:``}},toDOM:e=>[`div`,{"data-part":String(e.attrs.part),class:`ak-script-part`},0]},sentence:{content:`word*`,toDOM:()=>[`div`,{class:`ak-script-sentence`},0]},word:{inline:!0,atom:!0,selectable:!1,group:`inline`,attrs:{part:{default:``},i:{default:0},text:{default:``},removed:{default:!1},film:{default:null}},leafText:e=>`${String(e.attrs.text)} `,toDOM:e=>[`span`,{"data-word":String(e.attrs.i),"data-removed":e.attrs.removed===!0?``:void 0,class:`ak-word`},[`span`,{class:`ak-word-text`},String(e.attrs.text)],` `]},text:{group:`inline`}}});function Nr(e){return Mr.node(`doc`,null,e.map(e=>Mr.node(`part`,{part:e.part,title:e.title},Sn(e.words).map(t=>Mr.node(`sentence`,null,t.map(t=>Mr.node(`word`,{part:e.part,i:t.i,text:t.text,removed:t.removed,film:t.film??null})))))))}function Pr(e,t,n){let r;return e.descendants((e,i)=>{if(e.type.name!==`word`)return!0;let a=i+e.nodeSize;return n===`before`&&a<=t&&(r={from:i,to:a}),n===`after`&&i>=t&&!r&&(r={from:i,to:a}),!1}),r}function Fr(e,t,n){let r=new Map;return e.nodesBetween(t,n,e=>{if(e.type.name!==`word`)return;let t=String(e.attrs.part),n=Number(e.attrs.i),i=e.attrs.removed===!0,a=r.get(t);a?(a.first=Math.min(a.first,n),a.last=Math.max(a.last,n),a.struck=a.struck&&i):r.set(t,{part:t,first:n,last:n,struck:i})}),[...r.values()]}var Ir=44,Lr=48;function Rr(e,t){let n=e.state.selection;if(n.empty||!t)return;let r=Fr(e.state.doc,n.from,n.to);if(r.length===0)return;let i=t.getBoundingClientRect(),a=e.coordsAtPos(n.from,1),o=e.coordsAtPos(n.to,-1),s=a.top-i.top+t.scrollTop-Ir;return{top:s>=t.scrollTop?s:o.bottom-i.top+t.scrollTop+6,left:Math.min(Math.max(Lr,(a.left+o.right)/2-i.left+t.scrollLeft),Math.max(Lr,t.clientWidth-Lr)),runs:r,restore:r.every(e=>e.struck)}}function zr({script:e,t,playing:n=!1,readOnly:r,agent:i,following:a=!1,onSeek:o,onToggle:s,note:c,onCut:l}){let u=X(),d=(0,q.useRef)(null),f=(0,q.useRef)(null),p=(0,q.useRef)(null),[h,g]=(0,q.useState)(),_=(0,q.useRef)({onSeek:o,onCut:l,onToggle:s,t,readOnly:r});(0,q.useEffect)(()=>{_.current={onSeek:o,onCut:l,onToggle:s,t,readOnly:r}}),(0,q.useEffect)(()=>{let e=d.current;if(!e)return;let t=new Fe({state:{init:()=>-1,apply:(e,n)=>{let r=e.getMeta(t);return typeof r==`number`?r:n}},props:{decorations(e){let n=t.getState(e)??-1;if(n<0)return W.empty;let r;return e.doc.descendants((e,t)=>{if(e.type.name!==`word`)return!0;let i=e.attrs.film;return i!==null&&i<=n&&(r=Ie.node(t,t+e.nodeSize,{class:`ak-word-now`})),!0}),r?W.create(e.doc,[r]):W.empty}}}),n=new Fe({key:jr,state:{init:()=>null,apply:(e,t)=>{let n=e.getMeta(jr);return n===void 0?t:n}},props:{decorations(e){let t=jr.getState(e);if(!t)return W.empty;let n=new Set(t.words?.cut),r=new Set(t.words?.kept),i=[];return e.doc.descendants((e,a)=>{if(e.type.name===`part`)return e.attrs.part===t.part&&(i.push(Ie.node(a,a+e.nodeSize,{class:`ak-script-agent`,"data-agent":t.label,"data-testid":`script-agent`})),!0);if(e.type.name!==`word`)return!0;let o=e.attrs.i,s=n.has(o)?`cut`:r.has(o)?`kept`:void 0;return s&&i.push(Ie.node(a,a+e.nodeSize,{class:`ak-word-agent`,"data-agent-word":s})),!1}),W.create(e.doc,i)}}}),r=new Fe({props:{decorations(e){let{from:t,to:n,empty:r}=e.selection;if(r)return W.empty;let i=[];return e.doc.nodesBetween(t,n,(e,r)=>e.type.name!==`word`||(r<n&&r+e.nodeSize>t&&i.push(Ie.node(r,r+e.nodeSize,{class:`ak-word-picked`})),!1)),W.create(e.doc,i)}}}),i=new Pe(e,{state:je.create({doc:Nr([]),plugins:[t,n,r]}),attributes:{class:`outline-none`,"aria-label":u.script,role:`textbox`,"aria-multiline":`true`,spellcheck:`false`},editable:()=>!_.current.readOnly,dispatchTransaction(e){e.docChanged||(this.updateState(this.state.apply(e)),e.selectionSet&&g(Rr(this,f.current)))},handleKeyDown(e,t){if(t.key===` `&&!t.metaKey&&!t.ctrlKey&&!t.altKey)return _.current.onToggle?.(),!0;if(t.key!==`Backspace`&&t.key!==`Delete`)return t.key.length===1&&!t.metaKey&&!t.ctrlKey;if(_.current.readOnly)return!0;let n=e.state.selection,r=n.from,i=n.to;if(n.empty){let n=Pr(e.state.doc,r,t.key===`Backspace`?`before`:`after`);if(!n)return!0;({from:r,to:i}=n)}let a=Fr(e.state.doc,r,i);return a.length===0||_.current.onCut(a.map(e=>({part:e.part,first:e.first,last:e.last,restore:e.struck}))),!0},handleDoubleClickOn(e,t,n){return n.type.name===`word`&&(e.dispatch(e.state.tr.setSelection(Me.create(e.state.doc,t,t+n.nodeSize))),!0)},handleClickOn(e,t,n){if(n.type.name!==`word`)return!1;let r=n.attrs.film;return r!==null&&_.current.onSeek(r),!1},handleDOMEvents:{blur:()=>(g(void 0),!1),focus:e=>(g(Rr(e,f.current)),!1)},handlePaste:()=>!0,handleDrop:()=>!0});return p.current=i,()=>{i.destroy(),p.current=null}},[]),(0,q.useEffect)(()=>{let t=p.current;if(!t)return;let n=Nr(e);if(n.eq(t.state.doc))return;let r=t.state.selection,i=n.content.size,a=je.create({doc:n,plugins:t.state.plugins,selection:Me.between(n.resolve(Math.min(r.from,i)),n.resolve(Math.min(r.to,i)))});t.updateState(a),t.hasFocus()&&g(Rr(t,f.current))},[e]);let v=i?.part,y=i?.label,b=i?.words,x=JSON.stringify(b??null);return(0,q.useEffect)(()=>{let e=p.current;e&&e.dispatch(e.state.tr.setMeta(jr,v===void 0||y===void 0?null:{part:v,label:y,words:b}))},[v,y,x,e]),(0,q.useEffect)(()=>{if(!a||v===void 0)return;let e=d.current?.querySelector(`[data-part="${CSS.escape(v)}"]`);(e?.querySelector(`.ak-word-agent`)??e)?.scrollIntoView({block:`nearest`})},[a,v,x]),(0,q.useEffect)(()=>{let e=p.current;if(!e)return;let n=e.state.plugins[0];n&&e.dispatch(e.state.tr.setMeta(n,t))},[t]),(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,"data-testid":`script`,"data-playing":n?``:void 0,children:[(0,J.jsxs)(`div`,{className:`text-muted-foreground border-b px-3 py-2 text-micro`,children:[e.length===0?u.noScript:r?u.scriptReadOnly:u.scriptHint,c===void 0||e.length===0?null:(0,J.jsx)(`span`,{className:`mt-1 block`,"data-testid":`script-note`,children:c})]}),(0,J.jsxs)(`div`,{ref:f,className:`relative min-h-0 flex-1 overflow-auto`,children:[(0,J.jsx)(`div`,{ref:d,className:m(`px-3 py-2 text-read`,`[&_.ak-script-part]:mb-3 [&_.ak-script-part]:rounded-sm [&_.ak-script-sentence]:mb-1`,`[&_.ak-word]:cursor-pointer [&_.ak-word-text]:-mx-0.5 [&_.ak-word-text]:rounded-[3px] [&_.ak-word-text]:px-0.5 [&_.ak-word:not(.ak-word-now):hover_.ak-word-text]:bg-secondary`,`[&_.ak-word[data-removed]_.ak-word-text]:text-muted-foreground [&_.ak-word[data-removed]_.ak-word-text]:line-through`,`[&_.ak-word-agent_.ak-word-text]:bg-agent/15 [&_.ak-word-agent_.ak-word-text]:text-agent-text`,`[&_.ak-word-now_.ak-word-text]:bg-here [[data-playing]_&_.ak-word-now_.ak-word-text]:bg-highlight [[data-playing]_&_.ak-word-now_.ak-word-text]:text-on-highlight`,`[&_*::selection]:bg-transparent [&_.ak-word.ak-word-picked_.ak-word-text]:bg-[var(--allyhub-pencil-select)] [&_.ak-word.ak-word-picked_.ak-word-text]:text-foreground`)}),h&&!r?(0,J.jsx)(`div`,{className:`bg-sheet border-rule absolute z-10 flex -translate-x-1/2 items-center rounded-lg border p-1 shadow-[var(--shadow-overlay)]`,style:{top:h.top,left:h.left},"data-testid":`script-bar`,children:(0,J.jsxs)(fe,{"data-testid":h.restore?`keep-words`:`cut-words`,onMouseDown:e=>{e.preventDefault()},onClick:()=>{l(h.runs.map(e=>({part:e.part,first:e.first,last:e.last,restore:h.restore})))},children:[h.restore?(0,J.jsx)(pe,{}):(0,J.jsx)(Te,{}),h.restore?u.keepWords:u.cutWords]})}):null]})]})}var Br=1200,Vr=4e3,Hr=150,Ur=1e4,Wr=220,Gr=640,Kr={initial:272,least:200,share:.5},qr=[[`voice`,`music`,`sound`],[`voice`],[]],Jr=mr(qr[0]??[]),Yr=mr([]);function Xr(e,t){let n=u(),[r,i]=(0,q.useState)(new Map),[a,o]=(0,q.useState)(),s=e.join(`
24
+ `);return(0,q.useEffect)(()=>{let t=!0;return Promise.all(e.map(async e=>{try{let t=await n[`files/read`]({path:oe(e)}),r=se(`words`,JSON.parse(t.text));return r.ok?[e,r.value.words]:void 0}catch{return}})).then(e=>{t&&(i(new Map(e.filter(e=>e!==void 0))),o(s))}),()=>{t=!1}},[n,s,t]),{words:r,read:a===s}}var Zr=e=>e instanceof HTMLElement&&e.closest(`[data-testid=script]`)===null&&(e.isContentEditable||e.closest(`input,textarea,select,[role=dialog]`)!==null);function Qr({item:e,piece:t,version:r,revision:i,start:a,updating:o=!1,loaded:s,onLoaded:c}){let d=X(),f=u(),p=l(),h=(0,q.useRef)(null),[_,y]=(0,q.useState)(),[b,x]=(0,q.useState)(),[S,C]=(0,q.useState)({t:a?.t??0,part:void 0,playing:!1}),[w,T]=(0,q.useState)(!1);(0,q.useEffect)(()=>{if(_===void 0)return;let e=setTimeout(()=>{x(_)},Br);return()=>{clearTimeout(e)}},[_]);let E=_!==void 0&&b===_?_:void 0,[D,O]=(0,q.useState)(r.key);D!==r.key&&(O(r.key),y(void 0));let k=(0,q.useRef)(null),[A,j]=(0,q.useState)(1/0);(0,q.useEffect)(()=>{let e=k.current;if(!e)return;let t=new ResizeObserver(()=>{j(e.clientWidth)});return t.observe(e),()=>{t.disconnect()}},[]);let[ee=Kr.initial,te]=ct(`video-editor.script-width`,Kr.initial),[ne=Jr,re]=ct(`video-editor.timeline-height`,Jr),[M=!0,ie]=ct(`video-editor.timeline`,!0),ae=Math.max(Kr.least,Math.round((Number.isFinite(A)?A:1600)*Kr.share)),oe=Math.min(ae,Math.max(Kr.least,ee)),se=qr.find(e=>mr(e)<=ne)??qr[2]??[],N=(0,q.useMemo)(()=>s?.kind===`video`?In(s.timeline,s.text,s.mix):void 0,[s]),P=s?.kind===`video`?s.timeline:void 0,{words:F,read:ce}=Xr((0,q.useMemo)(()=>[...new Set((P?.parts??[]).flatMap(e=>e.speech?[e.speech.file]:[]))],[P]),i),I=Tn(p),le=new Map;for(let e of P?.parts??[]){let t=e.speech?.edits;if(t===void 0)continue;let n=I.listOf(t);n&&le.set(t,n)}let ue=(0,q.useMemo)(()=>P?mn(P,F,le):[],[P,F,I.tick]),[de,fe]=(0,q.useState)(!1);!de&&(s!==void 0&&w&&ce||_!==void 0)&&fe(!0),(0,q.useEffect)(()=>{let e=setTimeout(()=>{fe(!0)},Ur);return()=>{clearTimeout(e)}},[]);let[pe,he]=(0,q.useState)(!0);(0,q.useEffect)(()=>{if(!de)return;let e=setTimeout(()=>{he(!1)},Wr);return()=>{clearTimeout(e)}},[de]);let ge=ue.filter(e=>e.edits!==void 0),L=p||ge.length===0,R=!p&&ge.length<ue.length?d.noEdits:void 0,_e=e=>{let t=[];for(let n of e){let e=ue.find(e=>e.part===n.part);if(e?.edits===void 0)continue;let r=F.get(e.file)??[];t.push({path:e.edits,next:e=>n.restore?yn(e,n.first,n.last,r):vn(e,n.first,n.last,r)})}I.apply(e.every(e=>e.restore)?d.keepWords:d.cutWords,t)},z=(0,q.useRef)(I);(0,q.useEffect)(()=>{z.current=I}),(0,q.useEffect)(()=>{if(p)return;let e=e=>{if(Zr(e.target))return;let t=e.target instanceof HTMLElement&&e.target.closest(`[data-testid=script]`)!==null;if(e.defaultPrevented&&!t||!(e.metaKey||e.ctrlKey)||e.altKey)return;let n=e.key.toLowerCase(),r=z.current,i=n===`z`&&e.shiftKey||n===`y`&&!e.shiftKey;if(n===`z`&&!e.shiftKey&&r.canUndo)r.undo();else if(i&&r.canRedo)r.redo();else return;e.preventDefault()};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[p]);let{agent:B,following:be}=n(),V=B?.doing!==void 0,xe=me(),[H,Se]=(0,q.useState)(),Te=B?.source?.path;(0,q.useEffect)(()=>{if(Te===void 0||H?.revision===i)return;let t=!0;return tt(f,`video/sources`,{item:e}).then(e=>{t&&Se({revision:i,files:e.files})},()=>void 0),()=>{t=!1}},[f,e,i,Te,H?.revision]);let[Ee,De]=(0,q.useState)(s),[Oe,je]=(0,q.useState)(),[U,Me]=(0,q.useState)();if(s!==Ee&&(De(s),Ee&&s&&B?.doing===`editing`)){let e=wt({timeline:Ee.timeline,text:Ee.text},s),t=Ot(Ee.timeline,s.timeline),[n]=e,r=n===void 0?void 0:Tt(s.timeline,n);r&&je(r),(e.length>0||t.music||t.cues.length>0)&&Me({parts:e,...t,round:(U?.round??0)+1})}(0,q.useEffect)(()=>{if(!U)return;let e=setTimeout(()=>{Me(void 0)},Vr);return()=>{clearTimeout(e)}},[U]);let[Ne,W]=(0,q.useState)(),[Pe,Fe]=(0,q.useState)(I.byAgent);I.byAgent!==Pe&&(Fe(I.byAgent),W(I.byAgent));let[Ie,Le]=(0,q.useState)(V);Ie!==V&&(Le(V),V||(je(void 0),W(void 0)));let Re=V?B.source:void 0,ze=Re&&P?xt(P,Re.path):void 0,Be=Re&&H&&ze===void 0?bt(H.files,Re):void 0,G=(()=>{if(!V||!P)return;let e=_t(B.place);return e===void 0?(ze===void 0?Be?.part===void 0?void 0:Tt(P,Be.part,Be):Tt(P,ze))??Oe:{t:e}})(),K=G?.t,Ve=B?xe(B):``,He=Be?.music===!0,Ue=Be?.sounds===!0&&Be.part!==void 0?Be.part:void 0,We=V&&vt(B.place),Ge=(0,q.useMemo)(()=>({parts:U?.parts??[],music:U?.music===!0||He,cues:[...new Set([...U?.cues??[],...Ue===void 0?[]:[Ue]])],listening:We,round:U?.round??0}),[U,He,Ue,We]),Ke=Ne&&P&&G?.part!==void 0&&xt(P,Ne.path)===G.part?{cut:Ne.cut,kept:Ne.kept}:void 0,qe=(0,q.useRef)(S.t);(0,q.useEffect)(()=>{qe.current=S.t}),(0,q.useEffect)(()=>{be&&K!==void 0&&!S.playing&&(Math.abs(qe.current-K)<1/240||h.current?.seek(K))},[be,K,S.playing]);let Y=K!==void 0&&!S.playing&&Math.abs(S.t-K)<=1/(P?.fps??30)+1e-6,Je=G?.part,Ye=G?.layer,Xe=G?.message,Ze=Y&&Je!==void 0&&(Ye!==void 0||Xe!==void 0),[Qe,$e]=(0,q.useState)();(0,q.useEffect)(()=>{if(!Ze)return;let e=!0,t=setTimeout(()=>{h.current?.objects(S.t).then(t=>{e&&$e(t)})},Hr);return()=>{e=!1,clearTimeout(t)}},[Ze,S.t,s]);let et=Ze&&Qe&&Math.abs(Qe.t-S.t)<1e-6?Qe:void 0,nt=(Ye===void 0?void 0:et?.layers?.find(e=>e.part===Je&&e.index===Ye)?.box)??(Xe===void 0?void 0:et?.texts.find(e=>e.keys.includes(Xe))?.box),rt=(e,t)=>`${String(e/t*100)}%`,it=()=>{S.playing?h.current?.pause():h.current?.play()},at=ue.length>0&&A>=Gr,ot=(e,t,n,r,i)=>(0,J.jsx)(g,{size:`icon-sm`,variant:`ghost`,"aria-label":e,title:e,disabled:r,"data-testid":i,onClick:n,children:t});return(0,J.jsxs)(`div`,{ref:k,className:`bg-paper relative flex size-full min-h-0 flex-col`,"data-testid":`workbench`,"data-opened":de?``:void 0,children:[pe?(0,J.jsx)(`div`,{className:m(`bg-paper absolute inset-0 z-20 flex items-center justify-center motion-safe:transition-opacity motion-safe:duration-200`,de&&`pointer-events-none opacity-0`),"data-testid":`opening`,children:de?null:(0,J.jsx)(v,{label:d.loading})}):null,(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[at?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`flex min-h-0 shrink-0`,style:{width:oe},children:(0,J.jsxs)(`aside`,{className:`bg-background flex min-h-0 flex-col overflow-hidden w-full`,"aria-label":d.script,children:[(0,J.jsxs)(`div`,{className:`flex h-9 items-center gap-1 border-b pr-1 pl-3`,children:[(0,J.jsx)(`h2`,{className:`flex-1 text-xs font-medium`,children:d.script}),L?null:(0,J.jsxs)(J.Fragment,{children:[ot(I.undoLabel===void 0?d.undo:d.undoWhat(I.undoLabel),(0,J.jsx)(we,{}),I.undo,!I.canUndo,`undo`),ot(I.redoLabel===void 0?d.redo:d.redoWhat(I.redoLabel),(0,J.jsx)(Ce,{}),I.redo,!I.canRedo,`redo`)]})]}),(0,J.jsx)(zr,{script:ue,t:S.t,playing:S.playing,readOnly:L,note:R,agent:B&&G?.part!==void 0?{part:G.part,label:Ve,words:Ke}:void 0,following:be,onSeek:e=>{h.current?.seek(e)},onToggle:it,onCut:_e})]})}),(0,J.jsx)(ir,{orientation:`vertical`,value:oe,min:Kr.least,max:ae,label:d.resizeScript,onChange:te,testid:`script-splitter`})]}):null,(0,J.jsx)(`div`,{className:`bg-stone-2 min-h-0 min-w-0 flex-1 px-4 py-3 min-[560px]:px-6`,children:(0,J.jsx)($n,{ref:h,item:e,version:r.key,revision:i,start:a,width:t.width,height:t.height,timelineOpen:M,onTimelineOpen:ie,overlay:(0,J.jsxs)(J.Fragment,{children:[B&&Y&&P?nt?(0,J.jsx)(Ae,{"data-testid":`agent-box`,label:Ve,style:{left:rt(nt[0],P.width),top:rt(nt[1],P.height),width:rt(nt[2],P.width),height:rt(nt[3],P.height)}}):(0,J.jsx)(ke,{"data-testid":`agent-tag`,label:Ve,className:`absolute top-2 left-2`}):null,E!==void 0&&s===void 0?(0,J.jsx)(ye,{className:`bg-background absolute inset-0 z-20 flex items-center justify-center`}):o||E!==void 0?(0,J.jsx)(ve,{}):null]}),onState:e=>{C(e),T(!0)},onLoaded:e=>{c(e),y(void 0)},onError:y})})]}),P&&N&&M?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ir,{orientation:`horizontal`,value:mr(se),min:Yr,max:Jr,after:!0,label:d.resizeTimeline,onChange:re,testid:`timeline-splitter`}),(0,J.jsx)(`div`,{className:`bg-background shrink-0`,children:(0,J.jsx)(Ar,{timeline:P,texts:s?.text??[],tracks:N,rows:se,state:S,agent:B?{t:K,label:Ve}:void 0,marks:Ge,transport:{onFold:()=>{ie(!1)}},onSeek:e=>{h.current?.seek(e)}})})]}):null]})}function $r(e,t,n){let r=t.versions.filter(e=>n?.includes(e.key)!==!1).flatMap(n=>mt(e,t.piece,n)).filter(e=>e.level===`error`).map(e=>`${e.code}: ${e.message}`);return new Set(r).size}function ei(){let e=X(),t=i(),n=t?.item.id,r=h[p(t?.locale)],a=dt(t?.place),o=ot(),{data:s,error:c}=it(`video/versions`,n===void 0?void 0:{item:n},[o]),{shown:l,updating:u}=z(s),[d,f]=ct(`video-editor.version:${n??``}`,``),m=st(),g=l?pt(l,d):void 0,[_,y]=(0,q.useState)(),b=g&&_?.key===`${n??``}\n${g.key}`?_.loaded:void 0;if(n===void 0||!l&&!c)return(0,J.jsx)(`div`,{className:`bg-paper flex h-full items-center justify-center`,children:(0,J.jsx)(v,{label:e.loading})});if(!l||!g)return(0,J.jsx)(ye,{className:`bg-paper flex h-full items-center justify-center`});let x=e=>e.lang===void 0?e.key:ht(e.lang,r),S=l.kind===`video`?b?.timeline:void 0,C=l.kind===`video`&&b!==void 0&&!b.text.some(e=>e.spoken!==void 0);return(0,J.jsxs)(`div`,{className:`flex size-full min-h-0 flex-col`,"data-testid":`video-editor`,children:[(0,J.jsx)(L,{start:l.versions.length>1?(0,J.jsx)(_e,{testid:`video-bar`,children:(0,J.jsx)(R,{id:`language`,children:(0,J.jsxs)(I,{value:g.key,onValueChange:e=>{f(e)},children:[(0,J.jsx)(ue,{"aria-label":e.version,className:`max-w-[16rem]`,"data-testid":`version`,children:(0,J.jsx)(le,{})}),(0,J.jsx)(ce,{position:`popper`,align:`start`,children:l.versions.map(e=>(0,J.jsx)(de,{value:e.key,className:`text-xs`,title:e.key,children:x(e)},e.key))})]})})}):void 0,exports:{versions:l.versions.map(e=>({key:e.key,label:x(e)})),shown:g.key,facts:[`${String(l.width)} × ${String(l.height)}`,...S?[`${String(S.fps)} fps`,Y(S.duration)]:[]].join(` · `),unavailable:C?{srt:e.noVoice}:{},check:{waiting:m?.status===`waiting`||m?.status===`running`,problems:e=>m?.status===`done`?$r(m.problems,l,e):0}}}),(0,J.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,J.jsx)(Qr,{item:n,piece:l,version:g,revision:o,start:a,updating:u,loaded:b,onLoaded:e=>{y({key:`${n}\n${g.key}`,loaded:e})}})})]})}var ti=t({Preview:()=>$n,VideoEditor:()=>ei,WORDS:()=>nt,Workbench:()=>Qr,aboutVersion:()=>mt,default:()=>ei,languageName:()=>ht,locateInStage:()=>Pn,musicAt:()=>Rn,musicGain:()=>zn,mustFix:()=>$r,pickInStage:()=>Fn,placeLabels:()=>ar,postCommand:()=>Nn,speechAt:()=>Ln,stageLayerName:()=>jn,stageMessage:()=>Mn,tracksOf:()=>In,uncutParts:()=>Bn,useCheck:()=>st,useRevision:()=>ot,useStored:()=>ct,useTool:()=>it,useToolOf:()=>at,useVideoWords:()=>X,versionNamed:()=>pt});export{K as _,jn as a,pt as c,ct as d,it as f,We as g,Ke as h,Fn as i,st as l,tt as m,$r as n,Mn as o,at as p,Pn as r,ht as s,ti as t,ot as u,G as v};
@@ -0,0 +1,3 @@
1
+ import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,b as n,c as r,f as i,m as a,s as o}from"./react-Byupo4pA.js";import{_t as s,i as c,jt as l,r as u}from"./type-CvZ0HZsV.js";import{C as d,D as f,S as p,a as m,l as h,s as g}from"./schemas-DlRAoVtq.js";import{t as _}from"./session-BhClkDyr.js";import{t as v}from"./jsx-runtime-DePvh3-m.js";import{A as ee,C as te,D as ne,_ as y,f as re,g as ie,u as ae}from"./bar-button-CKPfx2AB.js";import{C as b,E as oe,S as se,b as x,i as ce}from"./dist-Cspf85KV.js";import{a as le,i as ue,r as de}from"./progress-DZQTiRLv.js";import{t as S}from"./createLucideIcon-euu7Wcd9.js";import{t as fe}from"./chart-no-axes-column-Dyy25XZ_.js";import{a as pe,c as C,i as me,l as he,n as ge,r as w,s as _e,t as ve}from"./split-DBAbwPZ5.js";import{t as ye}from"./link-CFOv3nz-.js";import{n as be,t as xe}from"./undo-2-DCbMWoug.js";import{p as T,v as Se}from"./index-wMlfx8aT.js";import{t as Ce}from"./collaborator-XiHOxwGM.js";import{c as we,d as E,i as D,n as O,p as k,s as Te}from"./browser-DEGNhKTV.js";import{_ as A,a as Ee,b as j,c as De,f as Oe,g as M,h as N,i as ke,m as Ae,n as P,o as F,p as je,t as I,u as Me,v as L,y as R}from"./words-zMedmPWc.js";var Ne=S(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),z=d().min(1),B=p({file:z,title:d().optional(),altText:d().optional()},{error:e=>e.code===`invalid_type`?`content.media is { file: ./demo.mp4, title: …, altText: … }`:void 0}),V=p({file:z,altText:d().optional()},{error:e=>e.code===`invalid_type`?`a picture of multiImage is { file: ./a.png, altText: … }`:void 0}),H=p({images:g(V)},{error:e=>e.code===`invalid_type`?`content.multiImage is { images: [ { file: ./a.png }, … ] }`:void 0}),U=p({question:d(),options:g(p({text:d()},{error:`a poll's option is { text: … }`})),settings:p({duration:m(A).optional()}).optional()},{error:e=>e.code===`invalid_type`?`content.poll is { question: …, options: [ { text: … }, … ], settings: { duration: SEVEN_DAYS } }`:void 0}),W=p({source:f({error:`an article's source is a web address`}),title:d().optional(),description:d().optional(),thumbnail:z.optional()},{error:e=>e.code===`invalid_type`?`content.article is { source: https://…, title: …, description: …, thumbnail: ./card.png }`:void 0}),G=p({media:B.optional(),multiImage:H.optional(),poll:U.optional(),article:W.optional()},{error:e=>e.code===`invalid_type`?`content is one of media, multiImage, poll or article`:void 0}).superRefine((e,t)=>{let n=Object.keys(e).filter(t=>e[t]!==void 0);n.length>1&&t.addIssue({code:`custom`,message:`content holds one kind, and holds ${n.join(` and `)}: a post is pictures, a video, a document, a poll or a link, never two`})}),Pe=p({commentary:d().default(``).transform(e=>e.replace(/\n+$/u,``)),visibility:m(j).optional(),content:G.optional(),isReshareDisabledByAuthor:h().optional()},{error:e=>e.code===`invalid_type`?`a linkedin-post's file is { commentary: …, content: … }, with visibility beside them`:void 0});function Fe(e,t){let n=e;for(let e of t)if(E(n)){let t=n.items.find(t=>t.key?.value===e);if(!t)return n;n=t.value??t.key}else if(k(n)&&typeof e==`number`){let t=n.items[e];if(!t)return n;n=t}else return n;return n}function K(e){let t=new D,n=O(e,{lineCounter:t,prettyErrors:!1}),r=e=>{let r=Fe(n.contents,e)?.range?.[0];return r===void 0?void 0:t.linePos(r).line};if(n.errors.length>0)return{errors:n.errors.map(e=>({path:[],message:e.message})),line:e=>e.length===0&&n.errors[0]?.linePos?.[0]?n.errors[0].linePos[0].line:r(e)};let i=Pe.safeParse(n.toJS()??{});return i.success?{value:i.data,errors:[],line:r}:{errors:i.error.issues.map(e=>({path:e.path.filter(e=>typeof e==`string`||typeof e==`number`),message:e.message})),line:r}}function Ie(e){let t=e.content;return t===void 0?[]:t.media?[{file:t.media.file,path:[`content`,`media`,`file`],role:`media`,altText:t.media.altText}]:t.multiImage?t.multiImage.images.map((e,t)=>({file:e.file,path:[`content`,`multiImage`,`images`,t,`file`],role:`picture`,altText:e.altText})):t.article?.thumbnail===void 0?[]:[{file:t.article.thumbnail,path:[`content`,`article`,`thumbnail`],role:`thumbnail`}]}function Le(e){let t=e.toLowerCase();for(let e of[`picture`,`video`,`document`])if(R[e].includes(t))return e}var Re=[`commentary`,`visibility`,`content`],q=e=>JSON.stringify(e,(e,t)=>typeof t==`object`&&t&&!Array.isArray(t)?Object.fromEntries(Object.entries(t).sort(([e],[t])=>e<t?-1:+(e>t))):t),J=(e,t)=>q(e)===q(t);function ze(e,t){let n=e.createNode(t);return t.includes(`
2
+ `)&&(n.type=we.BLOCK_LITERAL),n}function Be(e,t){let n=K(e).value;if(n!==void 0&&J(n,t))return e;let r=O(e);E(r.contents)||(r.contents=new Te);let i=r.contents;for(let e of Re){let n=t[e],a=i.get(e,!0);if(n===void 0||e===`commentary`&&n===``)a!==void 0&&i.delete(e);else if(e===`commentary`){let t=i.get(e);(typeof t!=`string`||t.replace(/\n+$/u,``)!==n)&&i.set(e,ze(r,n))}else J(a?.toJSON?.(),n)||i.set(e,r.createNode(n))}if(i.items.length>1){let e=i.items.findIndex(e=>e.key?.value===`commentary`);if(e>0){let[t]=i.items.splice(e,1);t&&i.items.unshift(t)}}return r.toString({flowCollectionPadding:!1,lineWidth:0})}function Ve(e,t,n){let r=r=>J(t[r],e[r])?n[r]:t[r],i=r(`visibility`),a=r(`content`);return{...n.isReshareDisabledByAuthor===void 0?{}:{isReshareDisabledByAuthor:n.isReshareDisabledByAuthor},commentary:r(`commentary`),...i===void 0?{}:{visibility:i},...a===void 0?{}:{content:a}}}var Y=e(n(),1),X=v(),He=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Ue=class e{session;file;unreadable=!1;landed;snapshot;listeners=new Set;amending;stops=[];constructor(e){this.session=e,this.read(e.text),this.snapshot=this.make(),e.attach({save:e=>{if(this.file===void 0||this.unreadable)return;let t=Be(e,this.file);return t===e?void 0:t},take:(e,t,n)=>{let r=K(e),i=K(t).value;n?.kind===`agent`&&r.value&&!He(i,r.value)&&(this.landed=Date.now()),r.value?(this.file=this.file===void 0||i===void 0?r.value:Ve(i,this.file,r.value),this.unreadable=!1):(this.file=void 0,this.unreadable=!0),this.emit()}}),this.stops.push(e.onState(()=>{this.emit()}),e.onUndo(()=>{this.emit()}))}read(e){let t=K(e);this.file=t.value,this.unreadable=t.value===void 0}static async open(t,n){return new e(await _.open(t,n))}make(){return{file:this.file,state:this.session.state,canUndo:this.session.canUndo,canRedo:this.session.canRedo,unreadable:this.unreadable,landed:this.landed}}emit(){this.snapshot=this.make();for(let e of this.listeners)e()}get text(){return this.session.text}get(){return this.snapshot}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}edit(e,t,n){let r=this.file;if(r===void 0||this.unreadable)return;let i=t(r);if(i!==r){if(n!==void 0&&this.amending?.key===n&&this.session.canUndo){let e=this.amending.from;this.session.undo(),this.push(this.amending.label,e,i)}else this.amending=n===void 0?void 0:{key:n,from:r,label:e},this.push(e,r,i)}}settle(){this.amending=void 0}push(e,t,n){this.file=n,this.session.pushEdit({label:e,undo:()=>{this.file=t,this.emit()},redo:()=>{this.file=n,this.emit()}}),this.emit()}undo(){this.amending=void 0,this.session.undo()}redo(){this.amending=void 0,this.session.redo()}async close(){for(let e of this.stops.splice(0))e();await this.session.close()}},We=3e4;function Z(e,t){let n={...e};return t===void 0?delete n.content:n.content=t,n}function Q(e){return w(e)?e.includes(`#`)?`picture`:void 0:Le(e.split(`.`).pop()??``)}function Ge(e,t){if(Q(t)===`picture`){if(e?.multiImage)return{multiImage:{images:[...e.multiImage.images,{file:t}]}};if(e?.media&&Q(e.media.file)===`picture`)return{multiImage:{images:[{file:e.media.file,...e.media.altText===void 0?{}:{altText:e.media.altText}},{file:t}]}}}return{media:{file:t}}}function Ke({text:e}){let t=I(),{left:n}=M(e);return n>100?null:(0,X.jsx)(`span`,{className:s(`text-sm tabular-nums`,n<0?`text-destructive font-semibold`:`text-muted-foreground`),"aria-label":n>=0?t.left(n):t.over(-n),"data-testid":`linkedin-count`,children:n})}function $(e){return(0,X.jsx)(c,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,disabled:e.disabled,onClick:e.onClick,children:e.children})}function qe(e){let t=I();return(0,X.jsxs)(`div`,{className:`absolute top-2 right-2 flex gap-1`,children:[e.alt===void 0?null:(0,X.jsx)(C,{alt:e.alt.value??``,onAlt:e.alt.onAlt,most:L.alt,trigger:(0,X.jsx)(c,{variant:`secondary`,size:`xs`,className:`bg-media/75 text-on-media font-bold`,children:t.alt})}),(0,X.jsx)(c,{variant:`secondary`,size:`icon-sm`,className:`bg-media/75 text-on-media rounded-full`,"aria-label":t.remove,title:t.remove,onClick:e.onRemove,children:(0,X.jsx)(u,{})})]})}function Je(e){let t=I(),n=`aria-invalid:border-destructive h-10 w-full rounded-md border border-[var(--ak-li-border)] bg-transparent px-3 text-sm outline-none focus:border-[var(--ak-li-link)]`,r=N(e.poll.question)-L.poll.question;return(0,X.jsxs)(`div`,{className:`mx-3 flex flex-col gap-2 rounded-lg border border-[var(--ak-li-border)] p-3`,"data-testid":`linkedin-poll`,children:[(0,X.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-[var(--ak-li-muted)]`,children:[t.question,(0,X.jsx)(`input`,{className:n,value:e.poll.question,readOnly:e.locked,"aria-invalid":r>0||void 0,maxLength:L.poll.question,onChange:t=>{e.onChange({...e.poll,question:t.target.value},`question`)}})]}),e.poll.options.map((r,i)=>{let a=N(r.text)-L.poll.option;return(0,X.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-[var(--ak-li-muted)]`,children:[t.option(i+1),(0,X.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(`input`,{className:n,value:r.text,readOnly:e.locked,"aria-invalid":a>0||void 0,maxLength:L.poll.option,onChange:t=>{e.onChange({...e.poll,options:e.poll.options.map((e,n)=>n===i?{text:t.target.value}:e)},`option-${String(i)}`)}}),a>0?(0,X.jsx)(`span`,{className:`text-destructive text-xs`,children:t.over(a)}):null,!e.locked&&e.poll.options.length>L.poll.least?(0,X.jsx)(c,{variant:`ghost`,size:`icon-sm`,"aria-label":t.removeOption,title:t.removeOption,onClick:()=>{e.onChange({...e.poll,options:e.poll.options.filter((e,t)=>t!==i)})},children:(0,X.jsx)(u,{})}):null]})]},i)}),!e.locked&&e.poll.options.length<L.poll.most?(0,X.jsxs)(c,{variant:`outline`,size:`sm`,className:`self-start rounded-full`,onClick:()=>{e.onChange({...e.poll,options:[...e.poll.options,{text:``}]})},children:[(0,X.jsx)(T,{}),t.addOption]}):null,(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-[var(--ak-li-border)] pt-2 text-sm`,children:[(0,X.jsxs)(`label`,{className:`mr-auto flex items-center gap-2`,children:[(0,X.jsx)(`span`,{className:`text-[var(--ak-li-muted)]`,children:t.duration}),(0,X.jsx)(`select`,{className:`h-8 rounded-md border border-[var(--ak-li-border)] bg-transparent px-2`,value:e.poll.settings?.duration??`SEVEN_DAYS`,disabled:e.locked,onChange:t=>{e.onChange({...e.poll,settings:{duration:t.target.value}})},children:A.map(e=>(0,X.jsx)(`option`,{value:e,children:t.durations[e]},e))})]}),e.locked?null:(0,X.jsx)(c,{variant:`ghost`,size:`sm`,className:`text-destructive`,onClick:e.onRemove,children:t.removePoll})]})]})}function Ye(e){let t=I(),n=(t,n)=>(0,X.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-[var(--ak-li-muted)]`,children:[n,(0,X.jsx)(`input`,{className:`h-9 w-full rounded-md border border-[var(--ak-li-border)] bg-transparent px-3 text-sm text-[var(--ak-li-fg)] outline-none focus:border-[var(--ak-li-link)]`,value:e.article[t]??``,readOnly:e.locked,onChange:n=>{let r=n.target.value,{title:i,description:a,...o}={...e.article,[t]:r};e.onChange({...o,...i===void 0||i===``?{}:{title:i},...a===void 0||a===``?{}:{description:a}},t)}})]});return(0,X.jsxs)(`div`,{className:`mx-3 mb-2 flex flex-col gap-2 rounded-lg border border-[var(--ak-li-border)] p-3`,"data-testid":`linkedin-link`,children:[n(`source`,t.link.source),n(`title`,t.link.title),n(`description`,t.link.description)]})}function Xe({doc:e,dir:n,entry:o}){let s=I(),u=r(),d=a(),f=(0,Y.useSyncExternalStore)(t=>e.subscribe(t),()=>e.get()),[p,m]=(0,Y.useState)(),[h,g]=(0,Y.useState)(!1),{shown:_,updating:v}=le(f.file),S=d||v,{agent:C,following:T}=t(),we=oe(),E=C?.doing!==void 0&&(C.source?.path===o||f.landed!==void 0&&f.landed>=C.at-We),D=(0,Y.useRef)(null),O=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{T&&E&&(D.current?.scrollIntoView({block:`nearest`}),O.current?.scrollIntoView({block:`nearest`}))},[T,E,f.landed]);let k=me(n,_?Ie(_).map(e=>e.file):[]);i({hold:()=>Promise.resolve({key:`${o}@${String(e.text.length)}`,what:`The LinkedIn post ${o}`,source:{path:o}}),locate:e=>{let t=e=>{let t=e?.getBoundingClientRect();return t&&t.width>0&&t.height>0?{x:t.x,y:t.y,width:t.width,height:t.height}:void 0},n=t(D.current),r=t(O.current),i=n!==void 0&&l(e,n),a=r!==void 0&&l(e,r);if(!i&&!a)return Promise.resolve({elements:[]});let s=new Map;for(let n of[D.current,O.current])n?.querySelectorAll(`.ak-li-content img`).forEach((n,r)=>{let i=t(n);i!==void 0&&l(e,i)&&s.set(r,n.alt)});return Promise.resolve({elements:[{name:`the post`,source:{path:o},..._?.commentary?{text:_.commentary}:{}},...[...s].map(([e,t])=>({name:`picture ${String(e+1)} of the post`,source:{path:o},...t===``?{}:{text:t}}))],where:i?`where the post is written`:`as LinkedIn's feed will show it`})}});let Te=t=>{(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`z`&&(t.preventDefault(),t.shiftKey?e.redo():e.undo())},A=(t,n,r)=>{S||e.edit(t,n,r)},j=(0,X.jsx)(ce,{start:S?void 0:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)($,{label:s.undo,disabled:!f.canUndo,onClick:()=>{e.undo()},children:(0,X.jsx)(xe,{})}),(0,X.jsx)($,{label:s.redo,disabled:!f.canRedo,onClick:()=>{e.redo()},children:(0,X.jsx)(be,{})})]}),saved:{state:f.state},exports:{}}),M=u?.theme===`dark`;if(_===void 0)return(0,X.jsxs)(`div`,{className:`bg-background flex size-full flex-col`,"data-testid":`linkedin-post-editor`,children:[j,(0,X.jsx)(de,{className:`flex min-h-0 flex-1 items-center justify-center`})]});let N=_.content,P=(e,t)=>{let n=k.get(e),r=Q(e);return r===`document`?{kind:`document`,file:e,label:e.split(`/`).pop()}:n===void 0?{kind:`made`,label:w(e)?`${e} · ${s.made}`:e,file:e}:{kind:r??`picture`,src:n,alt:t,file:e}},R=N?.media?{type:`media`,medium:P(N.media.file,N.media.altText),title:N.media.title}:N?.multiImage?{type:`multiImage`,images:N.multiImage.images.map(e=>P(e.file,e.altText))}:N?.poll?{type:`poll`,question:N.poll.question,options:N.poll.options.map(e=>e.text),duration:N.poll.settings?.duration}:N?.article?{type:`article`,source:N.article.source,title:N.article.title,description:N.article.description,thumbnail:N.article.thumbnail===void 0?void 0:P(N.article.thumbnail)}:void 0,z=e=>{A(s.steps.media,t=>{let n=t.content;if(n?.multiImage){let r=n.multiImage.images.filter((t,n)=>n!==e),[i]=r;return Z(t,r.length>1?{multiImage:{images:r}}:i?{media:i}:void 0)}if(n?.article){let e={...n.article};return delete e.thumbnail,Z(t,{article:e})}return Z(t,void 0)})},B=e=>{let t=(N?.multiImage?N.multiImage.images:N?.media&&Q(N.media.file)===`picture`?[N.media]:[])[e];if(t!==void 0)return{value:t.altText,onAlt:t=>{A(s.steps.alt,n=>{let r=e=>{let n={...e};return t.trim()===``?delete n.altText:n.altText=t,n},i=n.content;return i?.multiImage?Z(n,{multiImage:{images:i.multiImage.images.map((t,n)=>n===e?r(t):t)}}):i?.media?Z(n,{media:r(i.media)}):n})}}},V=N?.poll!==void 0||N?.article!==void 0||(N?.multiImage?.images.length??0)>=L.pictures.most||N?.media!==void 0&&Q(N.media.file)!==`picture`,H=(e,t)=>(0,X.jsx)(se,{className:`w-auto`,align:`start`,children:(0,X.jsx)(ge,{self:o,types:e,testId:`linkedin-picker`,onPick:e=>{m(void 0),t(pe(n,e))}})}),U=_.visibility??`PUBLIC`,W=(0,X.jsxs)(`div`,{ref:D,className:`ak-li ak-li-composer relative`,"data-theme":M?`dark`:`light`,"data-testid":`linkedin-composer`,children:[(0,X.jsxs)(`div`,{className:`ak-li-c-head`,children:[(0,X.jsx)(De,{visibility:U,avatar:64}),(0,X.jsxs)(ae,{children:[(0,X.jsx)(te,{asChild:!0,disabled:S,children:(0,X.jsxs)(c,{variant:`secondary`,size:`sm`,className:`ak-li-pill`,"data-testid":`linkedin-visibility`,children:[U===`CONNECTIONS`?(0,X.jsx)(Ne,{}):(0,X.jsx)(Se,{}),s.postTo(U===`CONNECTIONS`?s.connections:s.anyone),(0,X.jsx)(ee,{})]})}),(0,X.jsx)(re,{align:`start`,children:(0,X.jsxs)(ie,{value:U,onValueChange:e=>{A(s.steps.visibility,t=>{let n={...t};return e===`PUBLIC`?delete n.visibility:n.visibility=`CONNECTIONS`,n})},children:[(0,X.jsx)(y,{value:`PUBLIC`,children:s.anyone}),(0,X.jsx)(y,{value:`CONNECTIONS`,children:s.connections})]})})]})]}),(0,X.jsxs)(`div`,{className:`ak-li-field`,children:[(0,X.jsxs)(`div`,{className:`ak-li-field-words`,"aria-hidden":`true`,children:[(0,X.jsx)(Ae,{text:_.commentary}),_.commentary.endsWith(`
3
+ `)?`​`:null]}),(0,X.jsx)(`textarea`,{dir:`auto`,value:_.commentary,placeholder:s.share,"aria-label":s.share,readOnly:S,"data-testid":`linkedin-commentary`,onChange:e=>{let t=e.target.value;A(s.steps.text,e=>({...e,commentary:t}),`commentary`)},onBlur:()=>{e.settle()}})]}),N?.poll?(0,X.jsx)(Je,{poll:N.poll,locked:S,onChange:(e,t)=>{A(s.steps.poll,t=>Z(t,{poll:e}),t===void 0?void 0:`poll-${t}`)},onRemove:()=>{A(s.steps.poll,e=>Z(e,void 0))}}):(0,X.jsxs)(X.Fragment,{children:[N?.article?(0,X.jsx)(Ye,{article:N.article,locked:S,onChange:(e,t)=>{A(s.steps.link,t=>Z(t,{article:e}),`link-${t??``}`)}}):null,(0,X.jsx)(Me,{content:R,onMedium:S?void 0:e=>(0,X.jsx)(qe,{alt:B(e),onRemove:()=>{z(e)}})}),N?.media&&Q(N.media.file)!==`picture`?(0,X.jsx)(`input`,{className:`ak-li-doc-title-field`,value:N.media.title??``,placeholder:s.documentTitle,"aria-label":s.documentTitle,readOnly:S,onChange:e=>{let t=e.target.value;A(s.steps.title,e=>{let n=e.content?.media;if(!n)return e;let r={...n};return t===``?delete r.title:r.title=t,Z(e,{media:r})},`title`)}}):null]}),S?null:(0,X.jsxs)(`div`,{className:`ak-li-c-tools`,children:[(0,X.jsxs)(x,{open:p===`media`,onOpenChange:e=>{m(e?`media`:void 0)},children:[(0,X.jsx)(b,{asChild:!0,children:(0,X.jsx)(c,{variant:`ghost`,size:`icon-sm`,"aria-label":N?.multiImage?s.addPicture:s.addMedia,title:N?.multiImage?s.addPicture:s.addMedia,disabled:V,children:(0,X.jsx)(he,{})})}),H(N?.multiImage||N?.media?F:Ee,e=>{A(s.steps.media,t=>Z(t,Ge(t.content,e)))})]}),(0,X.jsxs)(x,{open:p===`document`,onOpenChange:e=>{m(e?`document`:void 0)},children:[(0,X.jsx)(b,{asChild:!0,children:(0,X.jsx)(c,{variant:`ghost`,size:`icon-sm`,"aria-label":s.addDocument,title:s.addDocument,disabled:N!==void 0,children:(0,X.jsx)(ne,{})})}),H(ke,e=>{A(s.steps.media,t=>Z(t,{media:{file:e}}))})]}),(0,X.jsx)($,{label:s.addPoll,disabled:N!==void 0,onClick:()=>{A(s.steps.poll,e=>Z(e,{poll:{question:``,options:[{text:``},{text:``}]}}))},children:(0,X.jsx)(fe,{})}),(0,X.jsx)($,{label:s.addLink,disabled:N!==void 0,onClick:()=>{A(s.steps.link,e=>Z(e,{article:{source:`https://`}}))},children:(0,X.jsx)(ye,{})}),N?.article&&N.article.thumbnail===void 0?(0,X.jsxs)(x,{open:p===`thumbnail`,onOpenChange:e=>{m(e?`thumbnail`:void 0)},children:[(0,X.jsx)(b,{asChild:!0,children:(0,X.jsxs)(c,{variant:`ghost`,size:`sm`,children:[(0,X.jsx)(he,{}),s.link.thumbnail]})}),H(F,e=>{A(s.steps.link,t=>t.content?.article?Z(t,{article:{...t.content.article,thumbnail:e}}):t)})]}):null,(0,X.jsx)(`span`,{className:`flex-1`}),(0,X.jsx)(Ke,{text:_.commentary})]}),C&&E?(0,X.jsx)(Ce,{"data-testid":`linkedin-agent-box`,label:we(C),className:`inset-1`}):null]}),G={commentary:_.commentary,visibility:U,content:R},Pe=(0,X.jsxs)(`div`,{ref:O,className:`ak-li ak-li-previews relative`,"data-theme":M?`dark`:`light`,children:[(0,X.jsx)(Oe,{post:G,lines:3,onFolded:g}),h?(0,X.jsx)(Oe,{post:G}):null,C&&E?(0,X.jsx)(Ce,{"data-testid":`linkedin-agent-shown`,className:`inset-0`}):null]});return(0,X.jsxs)(`div`,{className:`bg-background flex size-full flex-col`,"data-testid":`linkedin-post-editor`,onKeyDown:Te,children:[j,(0,X.jsx)(je.Provider,{value:_e,children:(0,X.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[v?(0,X.jsx)(ue,{}):null,(0,X.jsx)(ve,{edit:W,preview:Pe,width:552,background:M?`#000000`:`#f4f2ee`,testId:`linkedin-preview`})]})})]})}function Ze(){let e=I(),t=o(),n=r(),i=n?.item.entry,a=n?.item.dir??``,[s,c]=(0,Y.useState)(),[l,u]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{if(i===void 0)return;let e,n=!0;return Ue.open(t,i).then(t=>{n?(e=t,c(t)):t.close()},e=>{reportError(e),n&&u(!0)}),()=>{n=!1,e?.close()}},[t,i]),l?(0,X.jsx)(`div`,{className:`flex size-full`,"data-testid":`linkedin-post-editor`,"data-state":`updating`,children:(0,X.jsx)(de,{})}):!s||i===void 0?(0,X.jsx)(`div`,{className:`text-muted-foreground flex size-full items-center justify-center text-sm`,"data-testid":`linkedin-post-editor`,"data-state":`loading`,children:e.loading}):(0,X.jsx)(Xe,{doc:s,dir:a,entry:i})}export{Ze as LinkedInPostEditor,Ze as default,Ue as PostDocument,P as WORDS};
@@ -1,4 +1,4 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./docx-preview-pcg9ioe3.js","./rolldown-runtime-COiEfhsA.js"])))=>i.map(i=>d[i]);
2
- import{a as e,r as t}from"./browser-C1XuTMlp.js";import{p as n}from"./index-q7X6hdHp.js";import{t as r}from"./purify.es-B9ve_eFf.js";var i=class extends Error{constructor(e){super(e),this.name=`NotWordDocumentError`}},a=/^word\/document\d*\.xml$/u;function o(n,r){let o=e(r),s=[];try{t(n,{filter:e=>(o(e),s.push(e.name),!1)})}catch(e){throw e instanceof Error&&typeof e.code==`number`?new i(`It is not a zip file, as a .docx file is.`):e}if(!s.includes(`[Content_Types].xml`)||!s.some(e=>a.test(e)))throw new i(`It has no Word document part.`)}var s=[`http:`,`https:`,`mailto:`];function c(e){let t=e.trim();if(!URL.canParse(t))return;let n=new URL(t);return s.includes(n.protocol)?n.href:void 0}var l=e=>/^(?:data:image\/|blob:)/iu.test(e.trim()),u=/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/giu,d=/"(?:[^"\\\n]|\\[\s\S])*"|'(?:[^'\\\n]|\\[\s\S])*'/gu,f=/(?:image-set|image|src|element|cross-fade)\(/iu;function p(e){for(let t of e.matchAll(u))if(!l(t[1]??t[2]??t[3]??``))return!1;let t=e.replace(u,``).replace(d,`""`);return!t.includes(`\\`)&&!f.test(t)}var m={className:`docx`,inWrapper:!0,breakPages:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,renderAltChunks:!1,ignoreFonts:!0,useBase64URL:!0,renderChanges:!1,renderComments:!1,experimental:!1,debug:!1},h={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,mathMl:!0},FORBID_TAGS:[`style`,`iframe`,`frame`,`object`,`embed`,`form`,`input`,`button`,`textarea`,`select`,`video`,`audio`,`source`,`track`,`link`,`meta`,`base`],FORBID_ATTR:[`srcset`,`ping`,`action`,`formaction`,`background`,`poster`],ALLOW_UNKNOWN_PROTOCOLS:!1,ALLOWED_URI_REGEXP:/^(?:https?:|mailto:|data:image\/)/iu};function g(e){for(let t=e.length-1;t>=0;t--){let n=e.item(t);p(e.getPropertyValue(n))||e.removeProperty(n)}}function _(e){for(let t=e.cssRules.length-1;t>=0;t--){let n=e.cssRules.item(t);n instanceof CSSStyleRule||n instanceof CSSPageRule?g(n.style):n instanceof CSSGroupingRule?_(n):e.deleteRule(t)}}function v(e){let t=new CSSStyleSheet;return t.replaceSync(e),_(t),Array.from(t.cssRules,e=>e.cssText).join(`
2
+ import{a as e,r as t}from"./browser-C1XuTMlp.js";import{u as n}from"./index-wMlfx8aT.js";import{t as r}from"./purify.es-B9ve_eFf.js";var i=class extends Error{constructor(e){super(e),this.name=`NotWordDocumentError`}},a=/^word\/document\d*\.xml$/u;function o(n,r){let o=e(r),s=[];try{t(n,{filter:e=>(o(e),s.push(e.name),!1)})}catch(e){throw e instanceof Error&&typeof e.code==`number`?new i(`It is not a zip file, as a .docx file is.`):e}if(!s.includes(`[Content_Types].xml`)||!s.some(e=>a.test(e)))throw new i(`It has no Word document part.`)}var s=[`http:`,`https:`,`mailto:`];function c(e){let t=e.trim();if(!URL.canParse(t))return;let n=new URL(t);return s.includes(n.protocol)?n.href:void 0}var l=e=>/^(?:data:image\/|blob:)/iu.test(e.trim()),u=/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/giu,d=/"(?:[^"\\\n]|\\[\s\S])*"|'(?:[^'\\\n]|\\[\s\S])*'/gu,f=/(?:image-set|image|src|element|cross-fade)\(/iu;function p(e){for(let t of e.matchAll(u))if(!l(t[1]??t[2]??t[3]??``))return!1;let t=e.replace(u,``).replace(d,`""`);return!t.includes(`\\`)&&!f.test(t)}var m={className:`docx`,inWrapper:!0,breakPages:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,renderAltChunks:!1,ignoreFonts:!0,useBase64URL:!0,renderChanges:!1,renderComments:!1,experimental:!1,debug:!1},h={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,mathMl:!0},FORBID_TAGS:[`style`,`iframe`,`frame`,`object`,`embed`,`form`,`input`,`button`,`textarea`,`select`,`video`,`audio`,`source`,`track`,`link`,`meta`,`base`],FORBID_ATTR:[`srcset`,`ping`,`action`,`formaction`,`background`,`poster`],ALLOW_UNKNOWN_PROTOCOLS:!1,ALLOWED_URI_REGEXP:/^(?:https?:|mailto:|data:image\/)/iu};function g(e){for(let t=e.length-1;t>=0;t--){let n=e.item(t);p(e.getPropertyValue(n))||e.removeProperty(n)}}function _(e){for(let t=e.cssRules.length-1;t>=0;t--){let n=e.cssRules.item(t);n instanceof CSSStyleRule||n instanceof CSSPageRule?g(n.style):n instanceof CSSGroupingRule?_(n):e.deleteRule(t)}}function v(e){let t=new CSSStyleSheet;return t.replaceSync(e),_(t),Array.from(t.cssRules,e=>e.cssText).join(`
3
3
  `)}function y(e){r.sanitize(e,h);for(let t of e.querySelectorAll(`*`)){if(t instanceof HTMLAnchorElement){let e=c(t.getAttribute(`href`)??``);e===void 0?t.removeAttribute(`href`):(t.setAttribute(`href`,e),t.setAttribute(`target`,`_blank`),t.setAttribute(`rel`,`noopener noreferrer`))}let e=t instanceof HTMLImageElement||t instanceof SVGImageElement,n=!1;for(let r of[`src`,`href`,`xlink:href`]){if(t instanceof HTMLAnchorElement&&r===`href`)continue;let i=t.getAttribute(r);i!==null&&(e&&l(i)?n=!0:t.removeAttribute(r))}e&&!n?t.remove():t.hasAttribute(`style`)&&g(t.style)}}async function b(e){o(e);let{parseAsync:t,renderDocument:r}=await n(async()=>{let{parseAsync:e,renderDocument:t}=await import(`./docx-preview-pcg9ioe3.js`);return{parseAsync:e,renderDocument:t}},__vite__mapDeps([0,1]),import.meta.url),i=await r(await t(new Blob([new Uint8Array(e)]),m),m),a=document.createElement(`div`),s=[];for(let e of i)e instanceof HTMLStyleElement?s.push(e.textContent):a.append(e);return y(a),{css:s.map(v).join(`
4
4
  `),body:a}}export{b as drawWordDocumentHeld};
@@ -1 +1 @@
1
- import{f as e,t}from"./mermaid-parser.core-BWT9UQh_.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as r}from"./d3-selection-COWvaQNI.js";import"./chunk-DSNLSHJZ-NIGsJ2cK.js";import{n as i,r as a,t as o}from"./chunk-2E7WHVMD-fj-TJIRG.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-DFf_Vg5X.js";var c=e().RailroadEbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=n(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=n((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=n(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
1
+ import{f as e,t}from"./mermaid-parser.core-BxOSjBH9.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as r}from"./d3-selection-COWvaQNI.js";import"./chunk-DSNLSHJZ-DoUgmzGB.js";import{n as i,r as a,t as o}from"./chunk-2E7WHVMD-BXa-uRSi.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-BOln9YdH.js";var c=e().RailroadEbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=n(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=n((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=n(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};