allyhub 0.18.0 → 0.19.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 (580) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/allyhub.js +10 -0
  3. package/dist/args.js +1 -1
  4. package/dist/command.js +1 -1
  5. package/dist/commands/add.js +1 -1
  6. package/dist/commands/auth.js +1 -1
  7. package/dist/commands/cloud-tools.js +1 -1
  8. package/dist/commands/cloud.js +1 -1
  9. package/dist/commands/contributed.js +1 -1
  10. package/dist/commands/found-extensions.js +2 -0
  11. package/dist/commands/frames/common.js +1 -1
  12. package/dist/commands/frames/doc.js +1 -1
  13. package/dist/commands/frames.js +9 -9
  14. package/dist/commands/index.js +1 -1
  15. package/dist/commands/inspect/common.js +3 -3
  16. package/dist/commands/inspect/index.js +1 -1
  17. package/dist/commands/inspect/layout.js +1 -1
  18. package/dist/commands/inspect/views.js +1 -1
  19. package/dist/commands/list.js +2 -0
  20. package/dist/commands/mail.js +1 -1
  21. package/dist/commands/render.js +1 -1
  22. package/dist/commands/run-context.js +2 -0
  23. package/dist/commands.json +1 -0
  24. package/dist/fields.js +1 -1
  25. package/dist/main.js +7 -7
  26. package/dist/node_modules/@allyhub/3d-extension/dist/build.js +1 -1
  27. package/dist/node_modules/@allyhub/3d-extension/dist/scenery-build.js +1 -1
  28. package/dist/node_modules/@allyhub/3d-extension/package.json +3 -2
  29. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  30. package/dist/node_modules/@allyhub/browser/package.json +1 -1
  31. package/dist/node_modules/@allyhub/build/dist/build-plugins.js +1 -1
  32. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  33. package/dist/node_modules/@allyhub/build/dist/meta-worker.js +1 -1
  34. package/dist/node_modules/@allyhub/build/dist/plugin.js +9 -9
  35. package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
  36. package/dist/node_modules/@allyhub/build/dist/project-root.js +1 -1
  37. package/dist/node_modules/@allyhub/build/dist/scan.js +1 -1
  38. package/dist/node_modules/@allyhub/build/dist/sdk-parts.js +2 -0
  39. package/dist/node_modules/@allyhub/build/dist/vite.js +2 -2
  40. package/dist/node_modules/@allyhub/build/package.json +9 -1
  41. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  42. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  43. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  44. package/dist/node_modules/@allyhub/check/dist/check.js +2 -2
  45. package/dist/node_modules/@allyhub/check/package.json +1 -1
  46. package/dist/node_modules/@allyhub/cloud/dist/blobs.js +1 -1
  47. package/dist/node_modules/@allyhub/cloud/dist/call.js +1 -1
  48. package/dist/node_modules/@allyhub/cloud/dist/catalog.js +1 -1
  49. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  50. package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
  51. package/dist/node_modules/@allyhub/cloud/dist/credentials.js +1 -1
  52. package/dist/node_modules/@allyhub/cloud/dist/device.js +1 -1
  53. package/dist/node_modules/@allyhub/cloud/dist/errors.js +1 -1
  54. package/dist/node_modules/@allyhub/cloud/dist/index.js +1 -1
  55. package/dist/node_modules/@allyhub/cloud/dist/loopback.js +2 -2
  56. package/dist/node_modules/@allyhub/cloud/dist/mail.js +1 -1
  57. package/dist/node_modules/@allyhub/cloud/dist/records.js +1 -1
  58. package/dist/node_modules/@allyhub/cloud/dist/signin.js +2 -2
  59. package/dist/node_modules/@allyhub/cloud/dist/sites.js +1 -1
  60. package/dist/node_modules/@allyhub/cloud/dist/token.js +1 -1
  61. package/dist/node_modules/@allyhub/cloud/dist/tools.js +2 -0
  62. package/dist/node_modules/@allyhub/cloud/dist/uploads.js +1 -1
  63. package/dist/node_modules/@allyhub/cloud/dist/voice.js +1 -1
  64. package/dist/node_modules/@allyhub/cloud/package.json +5 -1
  65. package/dist/node_modules/@allyhub/components/package.json +1 -1
  66. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  67. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  68. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  69. package/dist/node_modules/@allyhub/doc-extension/dist/cli/find.js +1 -1
  70. package/dist/node_modules/@allyhub/doc-extension/dist/workspace.js +1 -1
  71. package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
  72. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  73. package/dist/node_modules/@allyhub/export/package.json +1 -1
  74. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  75. package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
  76. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  77. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +24 -7
  78. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  79. package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +1 -1
  80. package/dist/node_modules/@allyhub/formats/package.json +25 -1
  81. package/dist/node_modules/@allyhub/html-extension/package.json +1 -1
  82. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  83. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  84. package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
  85. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  86. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  87. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  88. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  89. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  90. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  91. package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
  92. package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
  93. package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
  94. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +1 -600
  95. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  96. package/dist/node_modules/@allyhub/media/package.json +5 -1
  97. package/dist/node_modules/@allyhub/media-extension/dist/asr/hear.js +1 -1
  98. package/dist/node_modules/@allyhub/media-extension/dist/vision/track.js +1 -1
  99. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  100. package/dist/node_modules/@allyhub/model/package.json +1 -1
  101. package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
  102. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  103. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +1 -2
  104. package/dist/node_modules/@allyhub/piece/dist/media.d.ts +1 -1
  105. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +2 -2
  106. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +2 -2
  107. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  108. package/dist/node_modules/@allyhub/project/package.json +1 -1
  109. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  110. package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
  111. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  112. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  113. package/dist/node_modules/@allyhub/protocol/dist/errors.js +1 -1
  114. package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
  115. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  116. package/dist/node_modules/@allyhub/protocol/dist/jsonrpc.js +1 -1
  117. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
  118. package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
  119. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  120. package/dist/node_modules/@allyhub/protocol/dist/paywall.js +1 -1
  121. package/dist/node_modules/@allyhub/protocol/dist/purposes.js +1 -1
  122. package/dist/node_modules/@allyhub/protocol/dist/registry.js +1 -1
  123. package/dist/node_modules/@allyhub/protocol/dist/sites.js +1 -1
  124. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  125. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  126. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  127. package/dist/node_modules/@allyhub/protocol/package.json +41 -1
  128. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  129. package/dist/node_modules/@allyhub/render/dist/errors.js +1 -1
  130. package/dist/node_modules/@allyhub/render/dist/post-probe.js +1 -1
  131. package/dist/node_modules/@allyhub/render/package.json +9 -1
  132. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  133. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
  134. package/dist/node_modules/@allyhub/runtimes/dist/declared.js +1 -1
  135. package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
  136. package/dist/node_modules/@allyhub/runtimes/dist/manifest.js +1 -1
  137. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
  138. package/dist/node_modules/@allyhub/runtimes/package.json +9 -1
  139. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  140. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  141. package/dist/node_modules/@allyhub/scenery-host/dist/bundle.js +3 -3
  142. package/dist/node_modules/@allyhub/scenery-host/dist/fact.d.ts +1 -1
  143. package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.js +2 -2
  144. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  145. package/dist/node_modules/@allyhub/sheet/dist/annotations.js +1 -1
  146. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  147. package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
  148. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  149. package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
  150. package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
  151. package/dist/node_modules/@allyhub/sheet/dist/html.js +6 -6
  152. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  153. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  154. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/open.js +1 -1
  155. package/dist/node_modules/@allyhub/sheet-extension/dist/code.js +1 -1
  156. package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -2
  157. package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
  158. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  159. package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
  160. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  161. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  162. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  163. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/400-italic.css +1 -79
  164. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/400.css +1 -79
  165. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/700-italic.css +1 -79
  166. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/700.css +1 -79
  167. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/arial.css +1 -316
  168. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +1 -19
  169. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +1 -19
  170. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +1 -19
  171. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +1 -19
  172. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +1 -76
  173. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/400-italic.css +1 -69
  174. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/400.css +1 -69
  175. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/700-italic.css +1 -69
  176. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/700.css +1 -69
  177. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/calibri.css +1 -276
  178. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +1 -79
  179. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +1 -79
  180. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +1 -79
  181. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +1 -79
  182. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +1 -316
  183. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-color-emoji/emoji.css +1 -8
  184. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/400.css +1 -1009
  185. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/700.css +1 -1009
  186. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/microsoft-yahei.css +1 -2018
  187. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +1 -79
  188. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +1 -79
  189. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +1 -79
  190. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +1 -79
  191. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +1 -316
  192. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  193. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  194. package/dist/node_modules/@allyhub/telemetry/dist/doc.js +1 -1
  195. package/dist/node_modules/@allyhub/telemetry/dist/errors.js +1 -1
  196. package/dist/node_modules/@allyhub/telemetry/dist/telemetry.js +2 -2
  197. package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
  198. package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
  199. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  200. package/dist/node_modules/@allyhub/video-extension/dist/build-plugins.js +1 -1
  201. package/dist/node_modules/@allyhub/video-extension/package.json +6 -2
  202. package/dist/node_modules/@allyhub/video-measure/dist/plans.js +2 -2
  203. package/dist/node_modules/@allyhub/video-measure/dist/reference/video.js +1 -1
  204. package/dist/node_modules/@allyhub/video-measure/package.json +5 -1
  205. package/dist/node_modules/@allyhub/video-sdk/dist/config.js +2 -0
  206. package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +1 -1
  207. package/dist/node_modules/@allyhub/video-sdk/package.json +5 -1
  208. package/dist/node_modules/@allyhub/website/package.json +1 -1
  209. package/dist/node_modules/@allyhub/website-extension/dist/build.js +1 -1
  210. package/dist/node_modules/@allyhub/website-extension/package.json +4 -4
  211. package/dist/node_modules/@allyhub/x-extension/dist/build.js +1 -1
  212. package/dist/node_modules/@allyhub/x-extension/package.json +8 -2
  213. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  214. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  215. package/dist/node_modules/@allyhub/x-view/src/style.css +1 -709
  216. package/dist/package.json +14 -14
  217. package/dist/project.js +1 -1
  218. package/dist/resources.js +1 -1
  219. package/dist/sdk-docs.js +1 -1
  220. package/dist/slot.js +4 -0
  221. package/dist/telemetry.js +1 -1
  222. package/dist/version.js +1 -1
  223. package/editor-web/assets/{abnfDiagram-WEYOIA3C-Hy4-O0wN.js → abnfDiagram-WEYOIA3C-DYaMS_BB.js} +1 -1
  224. package/editor-web/assets/{architecture-WOLXFQ4H-43JEVxqz.js → architecture-WOLXFQ4H-g_Tjfl_y.js} +1 -1
  225. package/editor-web/assets/{architectureDiagram-ZHVYKT53-7bFTl41n.js → architectureDiagram-ZHVYKT53-CqdhofOL.js} +1 -1
  226. package/editor-web/assets/{article-CS48wwvk.js → article-8evPh712.js} +1 -1
  227. package/editor-web/assets/{article-Cyle57uq.js → article-BhRtWYMd.js} +1 -1
  228. package/editor-web/assets/{blockDiagram-RJAE7QA3-DcoNo1WH.js → blockDiagram-RJAE7QA3-Bc-28Bci.js} +1 -1
  229. package/editor-web/assets/{c4Diagram-XDPPPE54-CsMt61gx.js → c4Diagram-XDPPPE54-CTGJb8FB.js} +1 -1
  230. package/editor-web/assets/{calc-worker-BdHh5LXM.js → calc-worker-oEIqrrTM.js} +1 -1
  231. package/editor-web/assets/channel-wIj_OqDm.js +1 -0
  232. package/editor-web/assets/{chart-file-CfbWK9l1.js → chart-file-dGiRgFcH.js} +1 -1
  233. package/editor-web/assets/{chunk-2E7WHVMD-fj-TJIRG.js → chunk-2E7WHVMD-B2MPOVTU.js} +1 -1
  234. package/editor-web/assets/{chunk-4EMNKR2T-Du5cRy-Y.js → chunk-4EMNKR2T-BUV1ZHP0.js} +1 -1
  235. package/editor-web/assets/{chunk-55XCU76K-BHXxBBtm.js → chunk-55XCU76K-BZlpspL5.js} +1 -1
  236. package/editor-web/assets/{chunk-7S6XSTFO-R5HW6X5I.js → chunk-7S6XSTFO-CpKeisWE.js} +1 -1
  237. package/editor-web/assets/{chunk-AQDTSKZB-C98F2BUb.js → chunk-AQDTSKZB-BJqwAPyo.js} +1 -1
  238. package/editor-web/assets/{chunk-DSNLSHJZ-NIGsJ2cK.js → chunk-DSNLSHJZ-D6oPWl_W.js} +1 -1
  239. package/editor-web/assets/{chunk-HAGFOTED-BtHxtfW5.js → chunk-HAGFOTED-B5pk4MZF.js} +1 -1
  240. package/editor-web/assets/{chunk-HNE4Q36P-BI8i7Vkk.js → chunk-HNE4Q36P-DHbSPvxQ.js} +1 -1
  241. package/editor-web/assets/{chunk-NQOKRVIF-DP_Z_zEA.js → chunk-NQOKRVIF-CcL_GcRA.js} +1 -1
  242. package/editor-web/assets/{chunk-UHW7PFBP-C_8bui28.js → chunk-UHW7PFBP-YgiOL6XE.js} +1 -1
  243. package/editor-web/assets/{chunk-VQ5W62QI-CKZgzWB2.js → chunk-VQ5W62QI-p14b4UYc.js} +1 -1
  244. package/editor-web/assets/{chunk-WQQL4CDK-Ff4DgCht.js → chunk-WQQL4CDK-BWW0x-XH.js} +1 -1
  245. package/editor-web/assets/{chunk-YZO67HFG-Csbx1-pi.js → chunk-YZO67HFG-oG3qd68C.js} +1 -1
  246. package/editor-web/assets/{chunk-ZAUX2LTX-BO1kcV3w.js → chunk-ZAUX2LTX-CpcheH0u.js} +1 -1
  247. package/editor-web/assets/{chunk-ZCHMQSOR-CxeNZYZG.js → chunk-ZCHMQSOR-cWQvLl1w.js} +1 -1
  248. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-D8eHQa5i.js → classDiagram-v2-4MYWR3UA-7PG7YcdU.js} +1 -1
  249. package/editor-web/assets/{cynefin-EF2NZ3EQ-lIUY3WQQ.js → cynefin-EF2NZ3EQ-CtcknEQ_.js} +1 -1
  250. package/editor-web/assets/{cynefinDiagram-WF24UDRP-CFOOhEEs.js → cynefinDiagram-WF24UDRP-Ca7VIsjN.js} +1 -1
  251. package/editor-web/assets/{dagre-NK4GIZVX-DdHVup2I.js → dagre-NK4GIZVX-BzcSLtsr.js} +1 -1
  252. package/editor-web/assets/deck-C7fN0Qtn.js +1 -0
  253. package/editor-web/assets/{diagram-CBK3MWTC-CFAD9Y2B.js → diagram-CBK3MWTC-DpRmTGlG.js} +1 -1
  254. package/editor-web/assets/{diagram-I5XIIV2D-DZJAn95A.js → diagram-I5XIIV2D-BTrs_AX8.js} +1 -1
  255. package/editor-web/assets/{diagram-ODIL2UCW-BcIeYTaY.js → diagram-ODIL2UCW-CkIVjPqH.js} +1 -1
  256. package/editor-web/assets/{diagram-PFBEJUXE-CnZmh_fl.js → diagram-PFBEJUXE-BlFMbAG1.js} +1 -1
  257. package/editor-web/assets/{diagram-RJA3I4VV-DpDd9rGx.js → diagram-RJA3I4VV-D3f8VJ-D.js} +1 -1
  258. package/editor-web/assets/{diagram-TYUNFSNR-ouGiUQcR.js → diagram-TYUNFSNR-Bbpngj6F.js} +1 -1
  259. package/editor-web/assets/{dist-DGKjn59H.js → dist-3iovns9K.js} +1 -1
  260. package/editor-web/assets/dist-BkHnbOEj.js +4 -0
  261. package/editor-web/assets/dist-BvOrNcK-.js +19 -0
  262. package/editor-web/assets/dist-CEIszq39.js +1 -0
  263. package/editor-web/assets/{dist-BI8QjOsV.js → dist-CU5RbLNH.js} +1 -1
  264. package/editor-web/assets/dist-CWZj8IAm.js +1 -0
  265. package/editor-web/assets/{dist-NQNQ5HqZ.js → dist-C_Mtrnif.js} +3 -3
  266. package/editor-web/assets/{dist-BajH5QfK.js → dist-CdqpwdCV.js} +4 -4
  267. package/editor-web/assets/{dist-SV0sOVIC.js → dist-CjT76RAw.js} +1 -1
  268. package/editor-web/assets/{dist-elglzHMT.js → dist-CpzEn9T8.js} +1 -1
  269. package/editor-web/assets/dist-CrFYWl5-.js +3 -0
  270. package/editor-web/assets/{dist-hHcrvNn9.js → dist-D4eBFGVL.js} +1 -1
  271. package/editor-web/assets/dist-DTcjb3cP.js +18 -0
  272. package/editor-web/assets/dist-D_WSM29I.js +17 -0
  273. package/editor-web/assets/{dist-Y_XZZa8q.js → dist-Dp_9ISjP.js} +10 -10
  274. package/editor-web/assets/{dist-BBshIz1Q.js → dist-J-tPYKGS.js} +4 -4
  275. package/editor-web/assets/{docx-draw-C4aiB8HI.js → docx-draw-CoK1oqQD.js} +1 -1
  276. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-HRjVlbUf.js → ebnfDiagram-V4P3TTPT-BaKj-yL6.js} +1 -1
  277. package/editor-web/assets/{elk-QONTBCTQ-BFmtKyOf.js → elk-QONTBCTQ-Cn2qv1_U.js} +1 -1
  278. package/editor-web/assets/{erDiagram-KYQIGQAA-C9gcGEgK.js → erDiagram-KYQIGQAA-Bd7AEIDo.js} +1 -1
  279. package/editor-web/assets/{esm-DzxAod8Q.js → esm-Cjv8ogpP.js} +1 -1
  280. package/editor-web/assets/{eventmodeling-K75KTNOO-Bpma5Bdb.js → eventmodeling-K75KTNOO-Sfp7_461.js} +1 -1
  281. package/editor-web/assets/flowDiagram-IUGLLWBU-BlVUglzw.js +1 -0
  282. package/editor-web/assets/{ganttDiagram-R7GPNTJY-CE5ut4C3.js → ganttDiagram-R7GPNTJY-CBqcGdHI.js} +1 -1
  283. package/editor-web/assets/{gitGraph-VSP46ZUC-Dva3iGx2.js → gitGraph-VSP46ZUC-WTokXKTW.js} +1 -1
  284. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-CJXFsAWp.js → gitGraphDiagram-PDYL7XHY-BIWZHD9q.js} +1 -1
  285. package/editor-web/assets/index-BQWZnyAQ.js +28 -0
  286. package/editor-web/assets/{info-OHQRW6UA-BY0AOfex.js → info-OHQRW6UA-COC6G-_J.js} +1 -1
  287. package/editor-web/assets/{infoDiagram-MVDRKAX5-4Up1gMvC.js → infoDiagram-MVDRKAX5-DpaqdKBD.js} +1 -1
  288. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-BkvB9Qbn.js → ishikawaDiagram-HPEHV2GE-Dyn2MAy1.js} +1 -1
  289. package/editor-web/assets/{iso-ahTwmFwH.js → iso-DoC-ZoBr.js} +1 -1
  290. package/editor-web/assets/{journeyDiagram-BOSHW7O7-BxV09WdR.js → journeyDiagram-BOSHW7O7-DeSVfmm7.js} +1 -1
  291. package/editor-web/assets/{kanban-definition-FNSA4HC5-zTJtIDPG.js → kanban-definition-FNSA4HC5-Bfg0lj7B.js} +1 -1
  292. package/editor-web/assets/{mermaid-parser.core-BWT9UQh_.js → mermaid-parser.core-CyhovuYE.js} +3 -3
  293. package/editor-web/assets/{mermaid.core-DFf_Vg5X.js → mermaid.core-Dx1fBVUG.js} +4 -4
  294. package/editor-web/assets/{mindmap-definition-6OY57UG3-BYexiugS.js → mindmap-definition-6OY57UG3-QEU2HF_m.js} +1 -1
  295. package/editor-web/assets/{packet-JDAUHWVQ-DX_kSrI6.js → packet-JDAUHWVQ-ReJTa_hw.js} +1 -1
  296. package/editor-web/assets/{pegDiagram-ECIUJNBX-I3SrcMLp.js → pegDiagram-ECIUJNBX-Bo1jFrvb.js} +1 -1
  297. package/editor-web/assets/{pie-XZMESJXO-BmAFSw3E.js → pie-XZMESJXO-BrtYafNA.js} +1 -1
  298. package/editor-web/assets/{pieDiagram-GNMPY74T-DIZKcme5.js → pieDiagram-GNMPY74T-Cj0zQqs_.js} +1 -1
  299. package/editor-web/assets/{props-form-DUFxM5eb.js → props-form-BpSXbrSF.js} +1 -1
  300. package/editor-web/assets/{quadrantDiagram-D57K4MC3-CO3oSqpQ.js → quadrantDiagram-D57K4MC3-D5npDAVn.js} +1 -1
  301. package/editor-web/assets/{radar-ABXABTNO-D5CkFrrb.js → radar-ABXABTNO-C8RDrRqi.js} +1 -1
  302. package/editor-web/assets/{railroad-I3PHUGI6-BeKY1p0K.js → railroad-I3PHUGI6-ebDrmYTK.js} +1 -1
  303. package/editor-web/assets/{railroad-abnf-LNEFI6M7-CIYV9_3-.js → railroad-abnf-LNEFI6M7-BxKuqg6V.js} +1 -1
  304. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DN0zDl6d.js → railroad-ebnf-DWYD2UWJ-DOclnfpr.js} +1 -1
  305. package/editor-web/assets/{railroad-peg-JR7BVNR7-Bd_GcO24.js → railroad-peg-JR7BVNR7-DN0A1fpq.js} +1 -1
  306. package/editor-web/assets/{railroadDiagram-Y72NRBL7-DlFoiMhb.js → railroadDiagram-Y72NRBL7-B3PjoVWw.js} +1 -1
  307. package/editor-web/assets/{requirementDiagram-EQYSW5RA-LWAEz8Gy.js → requirementDiagram-EQYSW5RA-DLdzkQk5.js} +1 -1
  308. package/editor-web/assets/{sankeyDiagram-SY24JHO5-B_pZGwUK.js → sankeyDiagram-SY24JHO5-Dip4Piv_.js} +1 -1
  309. package/editor-web/assets/schemas-CQ_UU8-Z.js +1 -0
  310. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-bNhyCq0C.js → sequenceDiagram-BLEHNHQU-QnPcoybL.js} +1 -1
  311. package/editor-web/assets/{session-Beijw9EK.js → session-DMlLCFWg.js} +1 -1
  312. package/editor-web/assets/slides-7xWhREpt.js +1 -0
  313. package/editor-web/assets/snapshots-BLX4NTQC.js +1 -0
  314. package/editor-web/assets/{split-zARio3J8.js → split-tFGKk-x8.js} +1 -1
  315. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DI-oM3qz.js → stateDiagram-v2-A6IESKWZ-D103CiMX.js} +1 -1
  316. package/editor-web/assets/{swimlanes-B3ENRKFQ-awDmoLdW.js → swimlanes-B3ENRKFQ-y4gCqEoa.js} +1 -1
  317. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DKzB_wSf.js +8 -0
  318. package/editor-web/assets/{tabs-BHBvbekZ.js → tabs-CuEawka3.js} +1 -1
  319. package/editor-web/assets/{timeline-definition-JXYKGLGB-CayduPvL.js → timeline-definition-JXYKGLGB-BMp76v4V.js} +1 -1
  320. package/editor-web/assets/{treeView-D4JQ5SDB-BVEuNzCO.js → treeView-D4JQ5SDB-Q_GYyk0b.js} +1 -1
  321. package/editor-web/assets/{treemap-SAJKECNS-BOB14HP3.js → treemap-SAJKECNS-B5lRWdQB.js} +1 -1
  322. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-DxT99uaq.js → usecaseDiagram-WPOLBNNX--QRllA-U.js} +1 -1
  323. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-CWUKom-r.js → vennDiagram-Q3Y3IDCW-CzkATPA3.js} +1 -1
  324. package/editor-web/assets/{video-oJ3qa1Qv.js → video-D0uTbHWx.js} +1 -1
  325. package/editor-web/assets/{wardley-7MLQ67FV-BAQyTneD.js → wardley-7MLQ67FV-BXzwcdJa.js} +1 -1
  326. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-CiIYz4lZ.js → wardleyDiagram-IVAIDKWA-BQvC8Agx.js} +1 -1
  327. package/editor-web/assets/{words-0Ww2RyT4.js → words-CaUHhQHf.js} +1 -1
  328. package/editor-web/assets/workbook-CiCXkjmN.js +45 -0
  329. package/editor-web/assets/{xychartDiagram-4URNHDU4-D_D5IGmd.js → xychartDiagram-4URNHDU4-aY-lsD5o.js} +1 -1
  330. package/editor-web/index.html +3 -3
  331. package/package.json +2 -2
  332. package/dist/node_modules/@allyhub/browser/dist/browser.d.ts +0 -24
  333. package/dist/node_modules/@allyhub/browser/dist/capture.d.ts +0 -61
  334. package/dist/node_modules/@allyhub/browser/dist/cdp.d.ts +0 -51
  335. package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +0 -29
  336. package/dist/node_modules/@allyhub/browser/dist/flags.d.ts +0 -13
  337. package/dist/node_modules/@allyhub/browser/dist/frames.d.ts +0 -35
  338. package/dist/node_modules/@allyhub/browser/dist/html.d.ts +0 -19
  339. package/dist/node_modules/@allyhub/browser/dist/index.d.ts +0 -10
  340. package/dist/node_modules/@allyhub/browser/dist/launch.d.ts +0 -35
  341. package/dist/node_modules/@allyhub/browser/dist/page.d.ts +0 -74
  342. package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +0 -18
  343. package/dist/node_modules/@allyhub/browser/dist/server.d.ts +0 -26
  344. package/dist/node_modules/@allyhub/build/dist/build-plugins.d.ts +0 -91
  345. package/dist/node_modules/@allyhub/build/dist/cli-command.d.ts +0 -84
  346. package/dist/node_modules/@allyhub/build/dist/code.d.ts +0 -26
  347. package/dist/node_modules/@allyhub/build/dist/content.d.ts +0 -64
  348. package/dist/node_modules/@allyhub/build/dist/data.d.ts +0 -11
  349. package/dist/node_modules/@allyhub/build/dist/evaluate.d.ts +0 -44
  350. package/dist/node_modules/@allyhub/build/dist/file-check.d.ts +0 -35
  351. package/dist/node_modules/@allyhub/build/dist/files.d.ts +0 -4
  352. package/dist/node_modules/@allyhub/build/dist/fonts.d.ts +0 -26
  353. package/dist/node_modules/@allyhub/build/dist/generated.d.ts +0 -29
  354. package/dist/node_modules/@allyhub/build/dist/imports.d.ts +0 -17
  355. package/dist/node_modules/@allyhub/build/dist/index.d.ts +0 -37
  356. package/dist/node_modules/@allyhub/build/dist/inspect-view.d.ts +0 -119
  357. package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +0 -530
  358. package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +0 -9
  359. package/dist/node_modules/@allyhub/build/dist/matrix.d.ts +0 -19
  360. package/dist/node_modules/@allyhub/build/dist/media.d.ts +0 -10
  361. package/dist/node_modules/@allyhub/build/dist/messages.d.ts +0 -60
  362. package/dist/node_modules/@allyhub/build/dist/meta-worker.d.ts +0 -59
  363. package/dist/node_modules/@allyhub/build/dist/meta.d.ts +0 -24
  364. package/dist/node_modules/@allyhub/build/dist/model-info.d.ts +0 -6
  365. package/dist/node_modules/@allyhub/build/dist/move-refs.d.ts +0 -16
  366. package/dist/node_modules/@allyhub/build/dist/places.d.ts +0 -23
  367. package/dist/node_modules/@allyhub/build/dist/plugin.d.ts +0 -50
  368. package/dist/node_modules/@allyhub/build/dist/prepare.d.ts +0 -138
  369. package/dist/node_modules/@allyhub/build/dist/project-root.d.ts +0 -19
  370. package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +0 -136
  371. package/dist/node_modules/@allyhub/build/dist/references.d.ts +0 -6
  372. package/dist/node_modules/@allyhub/build/dist/scan.d.ts +0 -45
  373. package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +0 -80
  374. package/dist/node_modules/@allyhub/build/dist/takes.d.ts +0 -9
  375. package/dist/node_modules/@allyhub/build/dist/types.d.ts +0 -11
  376. package/dist/node_modules/@allyhub/build/dist/uses.d.ts +0 -44
  377. package/dist/node_modules/@allyhub/build/dist/version.d.ts +0 -56
  378. package/dist/node_modules/@allyhub/build/dist/vite.d.ts +0 -115
  379. package/dist/node_modules/@allyhub/build/dist/work.d.ts +0 -38
  380. package/dist/node_modules/@allyhub/cloud/dist/blobs.d.ts +0 -48
  381. package/dist/node_modules/@allyhub/cloud/dist/call.d.ts +0 -91
  382. package/dist/node_modules/@allyhub/cloud/dist/catalog.d.ts +0 -12
  383. package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +0 -64
  384. package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +0 -40
  385. package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +0 -76
  386. package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +0 -14
  387. package/dist/node_modules/@allyhub/cloud/dist/errors.d.ts +0 -24
  388. package/dist/node_modules/@allyhub/cloud/dist/hashes.d.ts +0 -43
  389. package/dist/node_modules/@allyhub/cloud/dist/index.d.ts +0 -19
  390. package/dist/node_modules/@allyhub/cloud/dist/keychain.d.ts +0 -18
  391. package/dist/node_modules/@allyhub/cloud/dist/loopback.d.ts +0 -22
  392. package/dist/node_modules/@allyhub/cloud/dist/mail.d.ts +0 -16
  393. package/dist/node_modules/@allyhub/cloud/dist/pkce.d.ts +0 -11
  394. package/dist/node_modules/@allyhub/cloud/dist/records.d.ts +0 -42
  395. package/dist/node_modules/@allyhub/cloud/dist/signin-worker.d.ts +0 -2
  396. package/dist/node_modules/@allyhub/cloud/dist/signin.d.ts +0 -48
  397. package/dist/node_modules/@allyhub/cloud/dist/sites.d.ts +0 -20
  398. package/dist/node_modules/@allyhub/cloud/dist/token.d.ts +0 -20
  399. package/dist/node_modules/@allyhub/cloud/dist/uploads.d.ts +0 -58
  400. package/dist/node_modules/@allyhub/cloud/dist/voice.d.ts +0 -22
  401. package/dist/node_modules/@allyhub/jobs/dist/index.d.ts +0 -3
  402. package/dist/node_modules/@allyhub/jobs/dist/jobs.d.ts +0 -139
  403. package/dist/node_modules/@allyhub/jobs/dist/show.d.ts +0 -41
  404. package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +0 -195
  405. package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +0 -8
  406. package/dist/node_modules/@allyhub/measure/dist/image.d.ts +0 -16
  407. package/dist/node_modules/@allyhub/measure/dist/index.d.ts +0 -4
  408. package/dist/node_modules/@allyhub/media/dist/analysis.d.ts +0 -25
  409. package/dist/node_modules/@allyhub/media/dist/audio.d.ts +0 -16
  410. package/dist/node_modules/@allyhub/media/dist/beats.d.ts +0 -100
  411. package/dist/node_modules/@allyhub/media/dist/cache.d.ts +0 -26
  412. package/dist/node_modules/@allyhub/media/dist/errors.d.ts +0 -34
  413. package/dist/node_modules/@allyhub/media/dist/fetch.d.ts +0 -11
  414. package/dist/node_modules/@allyhub/media/dist/grid.d.ts +0 -101
  415. package/dist/node_modules/@allyhub/media/dist/index.d.ts +0 -21
  416. package/dist/node_modules/@allyhub/media/dist/picture.d.ts +0 -130
  417. package/dist/node_modules/@allyhub/media/dist/probe.d.ts +0 -52
  418. package/dist/node_modules/@allyhub/media/dist/progress.d.ts +0 -16
  419. package/dist/node_modules/@allyhub/media/dist/run.d.ts +0 -25
  420. package/dist/node_modules/@allyhub/media/dist/sheet.d.ts +0 -67
  421. package/dist/node_modules/@allyhub/media/dist/shots.d.ts +0 -110
  422. package/dist/node_modules/@allyhub/media/dist/sync.d.ts +0 -156
  423. package/dist/node_modules/@allyhub/media/dist/tools.d.ts +0 -25
  424. package/dist/node_modules/@allyhub/media/dist/video.d.ts +0 -35
  425. package/dist/node_modules/@allyhub/media/dist/vision/cache.d.ts +0 -42
  426. package/dist/node_modules/@allyhub/media/dist/vision/probe.d.ts +0 -39
  427. package/dist/node_modules/@allyhub/media/dist/vision/types.d.ts +0 -2
  428. package/dist/node_modules/@allyhub/media/dist/voice-shape.d.ts +0 -51
  429. package/dist/node_modules/@allyhub/model/dist/authoring.d.ts +0 -48
  430. package/dist/node_modules/@allyhub/model/dist/bevel-attributes.d.ts +0 -19
  431. package/dist/node_modules/@allyhub/model/dist/bevel-collapse.d.ts +0 -12
  432. package/dist/node_modules/@allyhub/model/dist/bevel-corner-plan.d.ts +0 -24
  433. package/dist/node_modules/@allyhub/model/dist/bevel-deform.d.ts +0 -5
  434. package/dist/node_modules/@allyhub/model/dist/bevel-fans.d.ts +0 -12
  435. package/dist/node_modules/@allyhub/model/dist/bevel-junction.d.ts +0 -16
  436. package/dist/node_modules/@allyhub/model/dist/bevel-marks.d.ts +0 -14
  437. package/dist/node_modules/@allyhub/model/dist/bevel-metric.d.ts +0 -4
  438. package/dist/node_modules/@allyhub/model/dist/bevel-mixed.d.ts +0 -12
  439. package/dist/node_modules/@allyhub/model/dist/bevel-offsets.d.ts +0 -22
  440. package/dist/node_modules/@allyhub/model/dist/bevel-patch.d.ts +0 -45
  441. package/dist/node_modules/@allyhub/model/dist/bevel-profile.d.ts +0 -13
  442. package/dist/node_modules/@allyhub/model/dist/bevel-projection.d.ts +0 -10
  443. package/dist/node_modules/@allyhub/model/dist/bevel-reflex.d.ts +0 -10
  444. package/dist/node_modules/@allyhub/model/dist/bevel-square-out.d.ts +0 -18
  445. package/dist/node_modules/@allyhub/model/dist/bevel-strips.d.ts +0 -8
  446. package/dist/node_modules/@allyhub/model/dist/bmesh-cycles.d.ts +0 -52
  447. package/dist/node_modules/@allyhub/model/dist/build-cache.d.ts +0 -42
  448. package/dist/node_modules/@allyhub/model/dist/build-job.d.ts +0 -34
  449. package/dist/node_modules/@allyhub/model/dist/build-worker.d.ts +0 -2
  450. package/dist/node_modules/@allyhub/model/dist/build.d.ts +0 -67
  451. package/dist/node_modules/@allyhub/model/dist/cancel.d.ts +0 -8
  452. package/dist/node_modules/@allyhub/model/dist/curve-math.d.ts +0 -21
  453. package/dist/node_modules/@allyhub/model/dist/curve-mesh.d.ts +0 -30
  454. package/dist/node_modules/@allyhub/model/dist/evaluation-guard.d.ts +0 -11
  455. package/dist/node_modules/@allyhub/model/dist/export.d.ts +0 -12
  456. package/dist/node_modules/@allyhub/model/dist/mesh-queries.d.ts +0 -34
  457. package/dist/node_modules/@allyhub/model/dist/names.d.ts +0 -9
  458. package/dist/node_modules/@allyhub/model/dist/png.d.ts +0 -12
  459. package/dist/node_modules/@allyhub/model/dist/polygon-triangulation.d.ts +0 -4
  460. package/dist/node_modules/@allyhub/model/dist/program-location.d.ts +0 -7
  461. package/dist/node_modules/@allyhub/model/dist/report.d.ts +0 -70
  462. package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +0 -21
  463. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +0 -4
  464. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +0 -17
  465. package/dist/node_modules/@allyhub/piece/dist/page/runtimes.d.ts +0 -9
  466. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +0 -661
  467. package/dist/node_modules/@allyhub/protocol/dist/account.js +0 -2
  468. package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +0 -30
  469. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +0 -200
  470. package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +0 -44
  471. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +0 -68
  472. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +0 -77
  473. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +0 -2
  474. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +0 -577
  475. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +0 -674
  476. package/dist/node_modules/@allyhub/protocol/dist/errors.d.ts +0 -7
  477. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +0 -803
  478. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +0 -103
  479. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +0 -247
  480. package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +0 -8
  481. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +0 -38
  482. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +0 -91
  483. package/dist/node_modules/@allyhub/protocol/dist/jsonrpc.d.ts +0 -83
  484. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +0 -144
  485. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +0 -274
  486. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +0 -211
  487. package/dist/node_modules/@allyhub/protocol/dist/open.d.ts +0 -13
  488. package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +0 -134
  489. package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +0 -59
  490. package/dist/node_modules/@allyhub/protocol/dist/peer.js +0 -2
  491. package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +0 -21
  492. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +0 -125
  493. package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +0 -47
  494. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +0 -191
  495. package/dist/node_modules/@allyhub/protocol/dist/routes.d.ts +0 -14
  496. package/dist/node_modules/@allyhub/protocol/dist/routes.js +0 -2
  497. package/dist/node_modules/@allyhub/protocol/dist/runtimes.d.ts +0 -96
  498. package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +0 -35
  499. package/dist/node_modules/@allyhub/protocol/dist/shape.js +0 -2
  500. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +0 -156
  501. package/dist/node_modules/@allyhub/protocol/dist/shares.js +0 -2
  502. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +0 -34
  503. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +0 -2
  504. package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +0 -298
  505. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +0 -503
  506. package/dist/node_modules/@allyhub/protocol/dist/sources.d.ts +0 -14
  507. package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +0 -264
  508. package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +0 -2
  509. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +0 -18
  510. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +0 -2
  511. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +0 -97
  512. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +0 -2
  513. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +0 -196
  514. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +0 -578
  515. package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +0 -71
  516. package/dist/node_modules/@allyhub/protocol/dist/turns.js +0 -2
  517. package/dist/node_modules/@allyhub/runtimes/dist/bundled.d.ts +0 -10
  518. package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +0 -14
  519. package/dist/node_modules/@allyhub/runtimes/dist/download.d.ts +0 -38
  520. package/dist/node_modules/@allyhub/runtimes/dist/errors.d.ts +0 -20
  521. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +0 -15
  522. package/dist/node_modules/@allyhub/runtimes/dist/home.d.ts +0 -2
  523. package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +0 -12
  524. package/dist/node_modules/@allyhub/runtimes/dist/lock.d.ts +0 -14
  525. package/dist/node_modules/@allyhub/runtimes/dist/manifest.d.ts +0 -3
  526. package/dist/node_modules/@allyhub/runtimes/dist/node-program.d.ts +0 -12
  527. package/dist/node_modules/@allyhub/runtimes/dist/packages.d.ts +0 -101
  528. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +0 -73
  529. package/dist/node_modules/@allyhub/runtimes/dist/unpack.d.ts +0 -14
  530. package/dist/node_modules/@allyhub/scenery-host/dist/allyhub.d.ts +0 -20
  531. package/dist/node_modules/@allyhub/scenery-host/dist/bake/digest.d.ts +0 -14
  532. package/dist/node_modules/@allyhub/scenery-host/dist/bake/envmap.d.ts +0 -21
  533. package/dist/node_modules/@allyhub/scenery-host/dist/bake/run.d.ts +0 -63
  534. package/dist/node_modules/@allyhub/scenery-host/dist/budget.d.ts +0 -40
  535. package/dist/node_modules/@allyhub/scenery-host/dist/bundle.d.ts +0 -92
  536. package/dist/node_modules/@allyhub/scenery-host/dist/commands.d.ts +0 -54
  537. package/dist/node_modules/@allyhub/scenery-host/dist/draw2d.d.ts +0 -47
  538. package/dist/node_modules/@allyhub/scenery-host/dist/glass.d.ts +0 -39
  539. package/dist/node_modules/@allyhub/scenery-host/dist/index.d.ts +0 -25
  540. package/dist/node_modules/@allyhub/scenery-host/dist/inventory.d.ts +0 -18
  541. package/dist/node_modules/@allyhub/scenery-host/dist/layer/fidelity.d.ts +0 -70
  542. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +0 -7
  543. package/dist/node_modules/@allyhub/scenery-host/dist/layer/moire.d.ts +0 -6
  544. package/dist/node_modules/@allyhub/scenery-host/dist/measure/contacts.d.ts +0 -45
  545. package/dist/node_modules/@allyhub/scenery-host/dist/measure/health.d.ts +0 -10
  546. package/dist/node_modules/@allyhub/scenery-host/dist/measure/index.d.ts +0 -110
  547. package/dist/node_modules/@allyhub/scenery-host/dist/measure/relations.d.ts +0 -17
  548. package/dist/node_modules/@allyhub/scenery-host/dist/measure/solid.d.ts +0 -32
  549. package/dist/node_modules/@allyhub/scenery-host/dist/measure/support.d.ts +0 -11
  550. package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.d.ts +0 -32
  551. package/dist/node_modules/@allyhub/scenery-host/dist/queries/inventory.d.ts +0 -5
  552. package/dist/node_modules/@allyhub/scenery-host/dist/queries/map.d.ts +0 -5
  553. package/dist/node_modules/@allyhub/scenery-host/dist/queries/view.d.ts +0 -10
  554. package/dist/node_modules/@allyhub/scenery-host/dist/scene.d.ts +0 -35
  555. package/dist/node_modules/@allyhub/scenery-host/dist/screen-dom.d.ts +0 -24
  556. package/dist/node_modules/@allyhub/scenery-host/dist/stage/bakes.d.ts +0 -42
  557. package/dist/node_modules/@allyhub/scenery-host/dist/stage/index.d.ts +0 -6
  558. package/dist/node_modules/@allyhub/scenery-host/dist/stage/page.d.ts +0 -70
  559. package/dist/node_modules/@allyhub/scenery-host/dist/stage/solve.d.ts +0 -49
  560. package/dist/node_modules/@allyhub/scenery-host/dist/stage/version.d.ts +0 -73
  561. package/dist/node_modules/@allyhub/scenery-host/dist/stage/view.d.ts +0 -18
  562. package/dist/node_modules/@allyhub/scenery-host/dist/steady.d.ts +0 -4
  563. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +0 -134
  564. package/editor-web/assets/channel-HUlo15J7.js +0 -1
  565. package/editor-web/assets/deck-CtEtDHo2.js +0 -1
  566. package/editor-web/assets/dist-Bl74xqMW.js +0 -19
  567. package/editor-web/assets/dist-BrUtQth3.js +0 -18
  568. package/editor-web/assets/dist-CN5A7Au2.js +0 -1
  569. package/editor-web/assets/dist-CcL6r6l3.js +0 -1
  570. package/editor-web/assets/dist-D2E3cgRP.js +0 -4
  571. package/editor-web/assets/dist-ZrBAbqyJ.js +0 -3
  572. package/editor-web/assets/dist-d4dayaWE.js +0 -17
  573. package/editor-web/assets/flowDiagram-IUGLLWBU-tz5ewhC5.js +0 -1
  574. package/editor-web/assets/index-q7X6hdHp.js +0 -28
  575. package/editor-web/assets/schemas-moE_A7Nj.js +0 -1
  576. package/editor-web/assets/slides-oQ_C0SVJ.js +0 -1
  577. package/editor-web/assets/snapshots-Dd0Wd_qM.js +0 -1
  578. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-X35m3xN6.js +0 -8
  579. package/editor-web/assets/workbook-DznVDqoE.js +0 -45
  580. /package/dist/node_modules/@allyhub/{protocol/dist/runtimes.js → runtimes/dist/schema.js} +0 -0
@@ -1,5 +1,5 @@
1
- import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,d as n,o as r,p as i,s as a,y as o}from"./react-Edyoga_4.js";import{Et as s,ht as c,kt as l,n as u,t as d}from"./x-DlhyIKuu.js";import{S as f,c as p,g as m,i as ee,o as h,x as g}from"./iso-ahTwmFwH.js";import{t as _}from"./session-Beijw9EK.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-J9vbfzTx.js";import{C as te,D as ne,i as re,w as ie,x as ae}from"./dist-elglzHMT.js";import{t as E}from"./createLucideIcon-lm_6n8YT.js";import{t as oe}from"./arrow-down-B8VUPCGi.js";import{t as se}from"./arrow-up-Ds4juY8X.js";import{t as ce}from"./chart-no-axes-column-Be0lFcGF.js";import{a as le,c as D,i as ue,l as de,n as fe,r as O,s as pe,t as me}from"./split-zARio3J8.js";import{n as he,t as ge}from"./undo-2-C47jrRp5.js";import{g as k}from"./index-q7X6hdHp.js";import{t as A}from"./collaborator-BU4qU7O3.js";import{f as j,i as _e,n as M,o as N,s as P,u as F}from"./browser-C9NP0ZYz.js";import{S as I,b as L,d as ve,f as ye,i as be,l as xe,m as Se,n as R,p as Ce,t as z,u as we,v as B,y as V}from"./words-0Ww2RyT4.js";var H=E(`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`}]]),U=E(`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`),Te=g({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}),Ee=g({options:h(f()),duration_minutes:m().int()},{error:e=>e.code===`invalid_type`?`a poll is { options: [ … ], duration_minutes: … }`:void 0}),De=g({text:f().default(``).transform(e=>e.replace(/\n+$/u,``)),media:h(Te).optional(),poll:Ee.optional(),made_with_ai:p().optional(),paid_partnership:p().optional(),reply:g({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}),Oe=g({reply_settings:ee(W).optional(),posts:h(De,{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 ke(e,t){let n=e;for(let e of t)if(F(n)){let t=n.items.find(t=>t.key?.value===e);if(!t)return n;n=t.value??t.key}else if(j(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 _e,n=M(e,{lineCounter:t,prettyErrors:!1}),r=e=>{let r=ke(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=Oe.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 Ae(e,t){let n=e.createNode(t);return t.includes(`
2
- `)&&(n.type=P.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 je(e){return{text:e.text,media:e.media===void 0||e.media.length===0?void 0:e.media,poll:e.poll}}function Me(e,t){let n=M(e),r=K(e).value;if(r!==void 0&&J(r,t))return e;F(n.contents)||(n.contents=new N),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=j(i)?i:void 0,o=(a?.items??[]).map(e=>F(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=je(e);if(!i){let t=n.createNode({});t.set(`text`,Ae(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`,Ae(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 Ne(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(o(),1),Z=v();function Pe(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 Fe=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Ie(e,t){let n=e?.posts??[],r=t.posts;for(let e=0;e<r.length;e++)if(!Fe(n[e],r[e]))return e;if(n.length>r.length&&r.length>0)return r.length-1}function Le(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 Re(e,t){if(e.from!==void 0&&e.path===t.path)return Le(t.text,{from:e.from,to:e.to??e.from})}var ze=class e{session;file;unreadable;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!==void 0)return;let t=Me(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?Ie(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:Ne(i,this.file,r.value),this.unreadable=void 0):(this.file=void 0,this.unreadable=r.errors.map(e=>e.message).join(` `)),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:t.errors.map(e=>e.message).join(` `)}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!==void 0)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 Be(e,t){let n={...e};return t===void 0||t.length===0?delete n.media:n.media=t,n}function Ve(e){let t={...e};return delete t.poll,t}function He({text:e}){let t=z(),{weighted:n}=L(e),r=I.length.most,i=r-n,a=i<0&&n<=I.length.premium,o=n>I.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 Ue(e){let t=z();return(0,Z.jsx)(D,{alt:e.alt??``,onAlt:e.onAlt,most:I.alt,trigger:(0,Z.jsx)(u,{variant:`secondary`,size:`xs`,className:`bg-media/75 text-on-media font-bold`,"aria-label":t.altText,children:t.alt})})}function We(e){let t=z();return(0,Z.jsx)(u,{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 Ge(e){let t=z(),{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=V(r)-I.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:I.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>I.poll.least?(0,Z.jsx)(u,{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<I.poll.most?(0,Z.jsxs)(u,{variant:`ghost`,size:`sm`,className:`self-start text-[var(--ak-x-link)]`,onClick:()=>{e.onChange({...e.poll,options:[...n,``]})},children:[(0,Z.jsx)(k,{}),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)(u,{variant:`ghost`,size:`sm`,className:`text-destructive`,onClick:e.onRemove,children:t.removePoll})]})]})}function Ke(e){let t=z(),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)(u,{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)(H,{}),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 qe(e){let t=z(),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)(u,{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)(U,{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)(u,{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 Je=3e4;function Ye({doc:e,dir:r,entry:o}){let c=z(),f=a(),p=i(),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 x=m.file,{agent:S,following:C}=t(),w=ne(),T=(()=>{if(S?.doing===void 0)return;let t=Pe(S.place);if(t!==void 0)return t;let n=m.landed!==void 0&&m.landed.at>=S.at-Je;return n&&S.source?.path===o?m.landed?.post:(S.source?Re(S.source,{path:o,text:e.text}):void 0)??(n?m.landed?.post:void 0)})(),E=T!==void 0&&T<(x?.posts.length??0)?T:void 0,D=(0,X.useRef)([]),j=(0,X.useRef)([]);(0,X.useEffect)(()=>{if(C&&E!==void 0)for(let e of[D.current[E],j.current[E]])e?.scrollIntoView({block:`nearest`})},[C,E,m.landed]);let _e=ue(r,(x?.posts??[]).flatMap(e=>(e.media??[]).map(e=>e.file)));n({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&&l(t,e),c=n.flatMap((e,t)=>{if(!a(i(D.current[t]))&&!a(i(j.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}}]}),u=s(t)[0],d=e=>e!==void 0&&u!==void 0&&u.x>=e.x&&u.x<=e.x+e.width&&u.y>=e.y&&u.y<=e.y+e.height,f=n.findIndex((e,t)=>d(i(D.current[t]))),p=n.findIndex((e,t)=>d(i(j.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 M=t=>{(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`z`&&(t.preventDefault(),t.shiftKey?e.redo():e.undo())},N=(t,n,r)=>{p||e.edit(t,n,r)},P=e=>(e.media??[]).map(e=>{let t=_e.get(e.file),n=O(e.file),r=n?void 0:B(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}}),F=(0,Z.jsx)(re,{start:p?void 0:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":c.undo,title:c.undo,disabled:!m.canUndo,onClick:()=>{e.undo()},children:(0,Z.jsx)(ge,{})}),(0,Z.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":c.redo,title:c.redo,disabled:!m.canRedo,onClick:()=>{e.redo()},children:(0,Z.jsx)(he,{})})]}),saved:{state:m.state},exports:{}}),L=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:[F,(0,Z.jsx)(`p`,{className:`text-muted-foreground mx-auto max-w-xl p-6 text-sm`,children:c.unreadable(m.unreadable??``)})]});let R=x.posts,V=Math.min(g,R.length-1),H=e=>{N(c.steps.add,t=>({...t,posts:[...t.posts.slice(0,e+1),{text:``},...t.posts.slice(e+1)]})),y({post:e+1,at:0})},U=e=>{let t=R[e],n=R[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===``?``:`
1
+ import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,d as n,o as r,p as i,s as a,y as o}from"./react-Edyoga_4.js";import{Et as s,ht as c,kt as l,n as u,t as d}from"./x-DlhyIKuu.js";import{a as f,b as p,h as m,r as h,s as g,x as _}from"./iso-DoC-ZoBr.js";import{t as v}from"./session-DMlLCFWg.js";import{t as y}from"./jsx-runtime-DePvh3-m.js";import{C as b,_ as x,d as S,f as C,g as w,h as T,u as E}from"./bar-button-J9vbfzTx.js";import{C as ee,D as te,i as ne,w as re,x as ie}from"./dist-CpzEn9T8.js";import{t as D}from"./createLucideIcon-lm_6n8YT.js";import{t as ae}from"./arrow-down-B8VUPCGi.js";import{t as oe}from"./arrow-up-Ds4juY8X.js";import{t as se}from"./chart-no-axes-column-Be0lFcGF.js";import{a as ce,c as O,i as le,l as ue,n as de,r as k,s as fe,t as pe}from"./split-tFGKk-x8.js";import{n as me,t as he}from"./undo-2-C47jrRp5.js";import{g as A}from"./index-BQWZnyAQ.js";import{t as ge}from"./collaborator-BU4qU7O3.js";import{f as j,i as _e,n as M,o as N,s as P,u as F}from"./browser-C9NP0ZYz.js";import{S as I,b as L,d as ve,f as ye,i as be,l as xe,m as Se,n as R,p as Ce,t as z,u as we,v as B,y as V}from"./words-CaUHhQHf.js";var H=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`}]]),U=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=_().regex(/^[0-9]{1,19}$/u,`a post's id: 1 to 19 digits`),Te=p({file:_().min(1),alt:_().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}),Ee=p({options:f(_()),duration_minutes:m().int()},{error:e=>e.code===`invalid_type`?`a poll is { options: [ … ], duration_minutes: … }`:void 0}),De=p({text:_().default(``).transform(e=>e.replace(/\n+$/u,``)),media:f(Te).optional(),poll:Ee.optional(),made_with_ai:g().optional(),paid_partnership:g().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}),Oe=p({reply_settings:h(W).optional(),posts:f(De,{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 ke(e,t){let n=e;for(let e of t)if(F(n)){let t=n.items.find(t=>t.key?.value===e);if(!t)return n;n=t.value??t.key}else if(j(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 _e,n=M(e,{lineCounter:t,prettyErrors:!1}),r=e=>{let r=ke(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=Oe.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 Ae(e,t){let n=e.createNode(t);return t.includes(`
2
+ `)&&(n.type=P.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 je(e){return{text:e.text,media:e.media===void 0||e.media.length===0?void 0:e.media,poll:e.poll}}function Me(e,t){let n=M(e),r=K(e).value;if(r!==void 0&&J(r,t))return e;F(n.contents)||(n.contents=new N),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=j(i)?i:void 0,o=(a?.items??[]).map(e=>F(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=je(e);if(!i){let t=n.createNode({});t.set(`text`,Ae(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`,Ae(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 Ne(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(o(),1),Z=y();function Pe(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 Fe=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Ie(e,t){let n=e?.posts??[],r=t.posts;for(let e=0;e<r.length;e++)if(!Fe(n[e],r[e]))return e;if(n.length>r.length&&r.length>0)return r.length-1}function Le(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 Re(e,t){if(e.from!==void 0&&e.path===t.path)return Le(t.text,{from:e.from,to:e.to??e.from})}var ze=class e{session;file;unreadable;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!==void 0)return;let t=Me(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?Ie(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:Ne(i,this.file,r.value),this.unreadable=void 0):(this.file=void 0,this.unreadable=r.errors.map(e=>e.message).join(` `)),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:t.errors.map(e=>e.message).join(` `)}static async open(t,n){return new e(await v.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!==void 0)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 Be(e,t){let n={...e};return t===void 0||t.length===0?delete n.media:n.media=t,n}function Ve(e){let t={...e};return delete t.poll,t}function He({text:e}){let t=z(),{weighted:n}=L(e),r=I.length.most,i=r-n,a=i<0&&n<=I.length.premium,o=n>I.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 Ue(e){let t=z();return(0,Z.jsx)(O,{alt:e.alt??``,onAlt:e.onAlt,most:I.alt,trigger:(0,Z.jsx)(u,{variant:`secondary`,size:`xs`,className:`bg-media/75 text-on-media font-bold`,"aria-label":t.altText,children:t.alt})})}function We(e){let t=z();return(0,Z.jsx)(u,{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 Ge(e){let t=z(),{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=V(r)-I.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:I.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>I.poll.least?(0,Z.jsx)(u,{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<I.poll.most?(0,Z.jsxs)(u,{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)(u,{variant:`ghost`,size:`sm`,className:`text-destructive`,onClick:e.onRemove,children:t.removePoll})]})]})}function Ke(e){let t=z(),n=t.replies[e.value??`everyone`];return(0,Z.jsxs)(E,{children:[(0,Z.jsx)(b,{asChild:!0,disabled:e.disabled,children:(0,Z.jsxs)(u,{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)(H,{}),n]})}),(0,Z.jsxs)(C,{align:`start`,className:`w-72`,children:[(0,Z.jsx)(T,{children:t.whoCanReply}),(0,Z.jsx)(w,{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)(x,{value:e,children:t.replies[e]},e))})]})]})}function qe(e){let t=z(),n=e.post.made_with_ai===!0||e.post.paid_partnership===!0;return(0,Z.jsxs)(E,{children:[(0,Z.jsx)(b,{asChild:!0,children:(0,Z.jsx)(u,{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)(U,{className:c(n&&`fill-current`)})})}),(0,Z.jsxs)(C,{align:`start`,className:`w-56`,children:[(0,Z.jsx)(T,{children:t.disclosure}),(0,Z.jsx)(S,{checked:e.post.made_with_ai===!0,onCheckedChange:t=>{e.onChange({made_with_ai:t})},children:t.madeWithAi}),(0,Z.jsx)(S,{checked:e.post.paid_partnership===!0,onCheckedChange:t=>{e.onChange({paid_partnership:t})},children:t.paidPartnership})]})]})}function $(e){return(0,Z.jsx)(u,{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 Je=3e4;function Ye({doc:e,dir:r,entry:o}){let c=z(),f=a(),p=i(),m=(0,X.useSyncExternalStore)(t=>e.subscribe(t),()=>e.get()),[h,g]=(0,X.useState)(),[_,v]=(0,X.useState)(0),[y,b]=(0,X.useState)(),x=(0,X.useRef)([]);(0,X.useEffect)(()=>{if(y===void 0)return;let e=x.current[y.post];e!=null&&(e.focus(),e.setSelectionRange(y.at,y.at),v(y.post),b(void 0))},[y]);let S=m.file,{agent:C,following:w}=t(),T=te(),E=(()=>{if(C?.doing===void 0)return;let t=Pe(C.place);if(t!==void 0)return t;let n=m.landed!==void 0&&m.landed.at>=C.at-Je;return n&&C.source?.path===o?m.landed?.post:(C.source?Re(C.source,{path:o,text:e.text}):void 0)??(n?m.landed?.post:void 0)})(),D=E!==void 0&&E<(S?.posts.length??0)?E:void 0,O=(0,X.useRef)([]),j=(0,X.useRef)([]);(0,X.useEffect)(()=>{if(w&&D!==void 0)for(let e of[O.current[D],j.current[D]])e?.scrollIntoView({block:`nearest`})},[w,D,m.landed]);let _e=le(r,(S?.posts??[]).flatMap(e=>(e.media??[]).map(e=>e.file)));n({hold:()=>Promise.resolve({key:`${o}@${String(e.text.length)}`,what:`The X post ${o}${(S?.posts.length??0)>1?`, a thread of ${String(S?.posts.length??0)} posts`:``}`,source:{path:o}}),locate:t=>{let n=S?.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&&l(t,e),c=n.flatMap((e,t)=>{if(!a(i(O.current[t]))&&!a(i(j.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}}]}),u=s(t)[0],d=e=>e!==void 0&&u!==void 0&&u.x>=e.x&&u.x<=e.x+e.width&&u.y>=e.y&&u.y<=e.y+e.height,f=n.findIndex((e,t)=>d(i(O.current[t]))),p=n.findIndex((e,t)=>d(i(j.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 M=t=>{(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`z`&&(t.preventDefault(),t.shiftKey?e.redo():e.undo())},N=(t,n,r)=>{p||e.edit(t,n,r)},P=e=>(e.media??[]).map(e=>{let t=_e.get(e.file),n=k(e.file),r=n?void 0:B(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}}),F=(0,Z.jsx)(ne,{start:p?void 0:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":c.undo,title:c.undo,disabled:!m.canUndo,onClick:()=>{e.undo()},children:(0,Z.jsx)(he,{})}),(0,Z.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":c.redo,title:c.redo,disabled:!m.canRedo,onClick:()=>{e.redo()},children:(0,Z.jsx)(me,{})})]}),saved:{state:m.state},exports:{}}),L=f?.theme===`dark`;if(S===void 0)return(0,Z.jsxs)(`div`,{className:`bg-background flex size-full flex-col`,"data-testid":`x-post-editor`,children:[F,(0,Z.jsx)(`p`,{className:`text-muted-foreground mx-auto max-w-xl p-6 text-sm`,children:c.unreadable(m.unreadable??``)})]});let R=S.posts,V=Math.min(_,R.length-1),H=e=>{N(c.steps.add,t=>({...t,posts:[...t.posts.slice(0,e+1),{text:``},...t.posts.slice(e+1)]})),b({post:e+1,at:0})},U=e=>{let t=R[e],n=R[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
4
 
5
- `;return N(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},W=(0,Z.jsx)(`div`,{className:`ak-x ak-x-editing ak-x-composer`,"data-theme":L?`dark`:`light`,children:R.map((t,n)=>{let i=n===R.length-1,a=n===V,s=t.media??[],l=s.filter(e=>B(e.file.split(`.`).pop()??``)===`picture`||O(e.file)).length,f=s.length>=I.pictures||s.length>l;return(0,Z.jsxs)(`div`,{ref:e=>{D.current[n]=e},className:`ak-x-c-post`,"data-here":a?``:void 0,"data-testid":`x-post`,onFocusCapture:()=>{_(n)},onPointerDown:()=>{_(n)},children:[(0,Z.jsxs)(`div`,{className:`ak-x-side`,children:[(0,Z.jsx)(`div`,{className:`ak-x-avatar`,"aria-hidden":`true`,children:we.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&&n>0&&!p?(0,Z.jsx)(u,{variant:`ghost`,size:`icon-sm`,className:`ak-x-c-remove`,"aria-label":c.remove,title:c.remove,onClick:()=>{N(c.steps.remove,e=>({...e,posts:e.posts.filter((e,t)=>t!==n)})),y({post:n-1,at:R[n-1]?.text.length??0})},children:(0,Z.jsx)(d,{})}):null,(0,Z.jsxs)(`div`,{className:`ak-x-field`,children:[(0,Z.jsx)(ye,{text:t.text,whole:!0}),(0,Z.jsx)(`textarea`,{ref:e=>{b.current[n]=e},dir:`auto`,value:t.text,placeholder:n===0?c.whatsHappening:c.addAnother,"aria-label":n===0?c.whatsHappening:c.addAnother,readOnly:p,"data-testid":`x-text`,onChange:e=>{let t=e.target.value;N(c.steps.text,e=>Q(e,n,e=>({...e,text:t})),`text-${String(n)}`)},onBlur:()=>{e.settle()},onKeyDown:e=>{let t=e.currentTarget;if(e.key===`Backspace`&&n>0&&t.selectionStart===0&&t.selectionEnd===0&&!p){U(n)&&e.preventDefault();return}if(e.key!==`Enter`||!(e.metaKey||e.ctrlKey))return;e.preventDefault();let r=t.selectionStart;N(c.steps.split,e=>{let t=e.posts[n];if(!t)return e;let i=t.text.slice(0,r).replace(/\s+$/u,``),a=t.text.slice(r).replace(/^\s+/u,``);return{...e,posts:[...e.posts.slice(0,n),{...t,text:i},{text:a},...e.posts.slice(n+1)]}}),y({post:n+1,at:0})}})]}),(0,Z.jsx)(xe,{media:P(t),onAlt:p?void 0:e=>(0,Z.jsx)(Ue,{alt:s[e]?.alt,onAlt:t=>{N(c.steps.alt,r=>Q(r,n,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:p?void 0:e=>(0,Z.jsx)(We,{onRemove:()=>{N(c.steps.media,t=>Q(t,n,t=>Be(t,(t.media??[]).filter((t,n)=>n!==e))))}})}),t.poll===void 0?null:p?(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)(Ge,{poll:t.poll,onChange:(e,t)=>{N(c.steps.poll,t=>Q(t,n,t=>({...t,poll:e})),t===void 0?void 0:`${t}-${String(n)}`)},onRemove:()=>{N(c.steps.poll,e=>Q(e,n,e=>Ve(e)))}}),t.quote_tweet_id===void 0?null:(0,Z.jsx)(Ce,{id:t.quote_tweet_id}),a?(0,Z.jsx)(Ke,{value:x.reply_settings,disabled:p,onChange:e=>{N(c.whoCanReply,t=>{let n={...t};return e===void 0?delete n.reply_settings:n.reply_settings=e,n})}}):null,a&&!p?(0,Z.jsxs)(`div`,{className:`ak-x-c-tools`,children:[(0,Z.jsxs)(ae,{open:ee===n,onOpenChange:e=>{h(e?n:void 0)},children:[(0,Z.jsx)(ie,{asChild:!0,children:(0,Z.jsx)(u,{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)(de,{})})}),(0,Z.jsx)(te,{className:`w-auto`,align:`start`,children:(0,Z.jsx)(fe,{self:o,types:be,testId:`x-picker`,onPick:e=>{h(void 0),N(c.steps.media,t=>Q(t,n,t=>({...t,media:[...t.media??[],{file:le(r,e)}]})))}})})]}),(0,Z.jsx)($,{label:c.addPoll,disabled:t.poll!==void 0||s.length>0,onClick:()=>{N(c.steps.poll,e=>Q(e,n,e=>({...e,poll:{options:[``,``],duration_minutes:1440}})))},children:(0,Z.jsx)(ce,{})}),(0,Z.jsx)(qe,{post:t,onChange:e=>{N(c.disclosure,t=>Q(t,n,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:n===0,onClick:()=>{N(c.steps.move,e=>{let t=[...e.posts],[r]=t.splice(n,1);return r&&t.splice(n-1,0,r),{...e,posts:t}}),_(n-1)},children:(0,Z.jsx)(se,{})}),(0,Z.jsx)($,{label:c.moveDown,disabled:i,onClick:()=>{N(c.steps.move,e=>{let t=[...e.posts],[r]=t.splice(n,1);return r&&t.splice(n+1,0,r),{...e,posts:t}}),_(n+1)},children:(0,Z.jsx)(oe,{})}),(0,Z.jsx)(He,{text:t.text}),(0,Z.jsx)(`span`,{className:`bg-rule mx-1 h-6 w-px`,"aria-hidden":`true`}),(0,Z.jsx)(u,{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:()=>{H(n)},children:(0,Z.jsx)(k,{})})]}):null]}),S&&E===n?(0,Z.jsx)(A,{"data-testid":`x-agent-box`,label:w(S),className:`inset-x-1 inset-y-0`}):null]},n)})}),G=(0,Z.jsx)(`div`,{className:`ak-x`,"data-theme":L?`dark`:`light`,children:R.map((e,t)=>(0,Z.jsxs)(`div`,{ref:e=>{j.current[t]=e},className:`relative`,children:[(0,Z.jsx)(ve,{post:{text:e.text,media:P(e),poll:e.poll,quote:e.quote_tweet_id},joined:t<R.length-1,published:!0}),S&&E===t?(0,Z.jsx)(A,{"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:M,children:[F,(0,Z.jsx)(Se.Provider,{value:pe,children:(0,Z.jsx)(me,{edit:W,preview:G,width:598,background:L?`#000000`:`#ffffff`,testId:`x-preview`})})]})}function Xe(){let e=z(),t=r(),n=a(),i=n?.item.entry,o=n?.item.dir??``,[s,c]=(0,X.useState)(),[l,u]=(0,X.useState)();return(0,X.useEffect)(()=>{if(i===void 0)return;let e,n=!0;return ze.open(t,i).then(t=>{n?(e=t,c(t)):t.close()},e=>{n&&u(e instanceof Error?e.message:String(e))}),()=>{n=!1,e?.close()}},[t,i]),!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":l===void 0?`loading`:`error`,children:l===void 0?e.loading:e.couldNotOpen(l)}):(0,Z.jsx)(Ye,{doc:s,dir:o,entry:i})}export{ze as PostDocument,R as WORDS,Xe as XPostEditor,Xe as default};
5
+ `;return N(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)]})),b({post:e-1,at:n.text.length+i.length}),!0},W=(0,Z.jsx)(`div`,{className:`ak-x ak-x-editing ak-x-composer`,"data-theme":L?`dark`:`light`,children:R.map((t,n)=>{let i=n===R.length-1,a=n===V,s=t.media??[],l=s.filter(e=>B(e.file.split(`.`).pop()??``)===`picture`||k(e.file)).length,f=s.length>=I.pictures||s.length>l;return(0,Z.jsxs)(`div`,{ref:e=>{O.current[n]=e},className:`ak-x-c-post`,"data-here":a?``:void 0,"data-testid":`x-post`,onFocusCapture:()=>{v(n)},onPointerDown:()=>{v(n)},children:[(0,Z.jsxs)(`div`,{className:`ak-x-side`,children:[(0,Z.jsx)(`div`,{className:`ak-x-avatar`,"aria-hidden":`true`,children:we.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&&n>0&&!p?(0,Z.jsx)(u,{variant:`ghost`,size:`icon-sm`,className:`ak-x-c-remove`,"aria-label":c.remove,title:c.remove,onClick:()=>{N(c.steps.remove,e=>({...e,posts:e.posts.filter((e,t)=>t!==n)})),b({post:n-1,at:R[n-1]?.text.length??0})},children:(0,Z.jsx)(d,{})}):null,(0,Z.jsxs)(`div`,{className:`ak-x-field`,children:[(0,Z.jsx)(ye,{text:t.text,whole:!0}),(0,Z.jsx)(`textarea`,{ref:e=>{x.current[n]=e},dir:`auto`,value:t.text,placeholder:n===0?c.whatsHappening:c.addAnother,"aria-label":n===0?c.whatsHappening:c.addAnother,readOnly:p,"data-testid":`x-text`,onChange:e=>{let t=e.target.value;N(c.steps.text,e=>Q(e,n,e=>({...e,text:t})),`text-${String(n)}`)},onBlur:()=>{e.settle()},onKeyDown:e=>{let t=e.currentTarget;if(e.key===`Backspace`&&n>0&&t.selectionStart===0&&t.selectionEnd===0&&!p){U(n)&&e.preventDefault();return}if(e.key!==`Enter`||!(e.metaKey||e.ctrlKey))return;e.preventDefault();let r=t.selectionStart;N(c.steps.split,e=>{let t=e.posts[n];if(!t)return e;let i=t.text.slice(0,r).replace(/\s+$/u,``),a=t.text.slice(r).replace(/^\s+/u,``);return{...e,posts:[...e.posts.slice(0,n),{...t,text:i},{text:a},...e.posts.slice(n+1)]}}),b({post:n+1,at:0})}})]}),(0,Z.jsx)(xe,{media:P(t),onAlt:p?void 0:e=>(0,Z.jsx)(Ue,{alt:s[e]?.alt,onAlt:t=>{N(c.steps.alt,r=>Q(r,n,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:p?void 0:e=>(0,Z.jsx)(We,{onRemove:()=>{N(c.steps.media,t=>Q(t,n,t=>Be(t,(t.media??[]).filter((t,n)=>n!==e))))}})}),t.poll===void 0?null:p?(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)(Ge,{poll:t.poll,onChange:(e,t)=>{N(c.steps.poll,t=>Q(t,n,t=>({...t,poll:e})),t===void 0?void 0:`${t}-${String(n)}`)},onRemove:()=>{N(c.steps.poll,e=>Q(e,n,e=>Ve(e)))}}),t.quote_tweet_id===void 0?null:(0,Z.jsx)(Ce,{id:t.quote_tweet_id}),a?(0,Z.jsx)(Ke,{value:S.reply_settings,disabled:p,onChange:e=>{N(c.whoCanReply,t=>{let n={...t};return e===void 0?delete n.reply_settings:n.reply_settings=e,n})}}):null,a&&!p?(0,Z.jsxs)(`div`,{className:`ak-x-c-tools`,children:[(0,Z.jsxs)(ie,{open:h===n,onOpenChange:e=>{g(e?n:void 0)},children:[(0,Z.jsx)(re,{asChild:!0,children:(0,Z.jsx)(u,{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)(ue,{})})}),(0,Z.jsx)(ee,{className:`w-auto`,align:`start`,children:(0,Z.jsx)(de,{self:o,types:be,testId:`x-picker`,onPick:e=>{g(void 0),N(c.steps.media,t=>Q(t,n,t=>({...t,media:[...t.media??[],{file:ce(r,e)}]})))}})})]}),(0,Z.jsx)($,{label:c.addPoll,disabled:t.poll!==void 0||s.length>0,onClick:()=>{N(c.steps.poll,e=>Q(e,n,e=>({...e,poll:{options:[``,``],duration_minutes:1440}})))},children:(0,Z.jsx)(se,{})}),(0,Z.jsx)(qe,{post:t,onChange:e=>{N(c.disclosure,t=>Q(t,n,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:n===0,onClick:()=>{N(c.steps.move,e=>{let t=[...e.posts],[r]=t.splice(n,1);return r&&t.splice(n-1,0,r),{...e,posts:t}}),v(n-1)},children:(0,Z.jsx)(oe,{})}),(0,Z.jsx)($,{label:c.moveDown,disabled:i,onClick:()=>{N(c.steps.move,e=>{let t=[...e.posts],[r]=t.splice(n,1);return r&&t.splice(n+1,0,r),{...e,posts:t}}),v(n+1)},children:(0,Z.jsx)(ae,{})}),(0,Z.jsx)(He,{text:t.text}),(0,Z.jsx)(`span`,{className:`bg-rule mx-1 h-6 w-px`,"aria-hidden":`true`}),(0,Z.jsx)(u,{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:()=>{H(n)},children:(0,Z.jsx)(A,{})})]}):null]}),C&&D===n?(0,Z.jsx)(ge,{"data-testid":`x-agent-box`,label:T(C),className:`inset-x-1 inset-y-0`}):null]},n)})}),G=(0,Z.jsx)(`div`,{className:`ak-x`,"data-theme":L?`dark`:`light`,children:R.map((e,t)=>(0,Z.jsxs)(`div`,{ref:e=>{j.current[t]=e},className:`relative`,children:[(0,Z.jsx)(ve,{post:{text:e.text,media:P(e),poll:e.poll,quote:e.quote_tweet_id},joined:t<R.length-1,published:!0}),C&&D===t?(0,Z.jsx)(ge,{"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:M,children:[F,(0,Z.jsx)(Se.Provider,{value:fe,children:(0,Z.jsx)(pe,{edit:W,preview:G,width:598,background:L?`#000000`:`#ffffff`,testId:`x-preview`})})]})}function Xe(){let e=z(),t=r(),n=a(),i=n?.item.entry,o=n?.item.dir??``,[s,c]=(0,X.useState)(),[l,u]=(0,X.useState)();return(0,X.useEffect)(()=>{if(i===void 0)return;let e,n=!0;return ze.open(t,i).then(t=>{n?(e=t,c(t)):t.close()},e=>{n&&u(e instanceof Error?e.message:String(e))}),()=>{n=!1,e?.close()}},[t,i]),!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":l===void 0?`loading`:`error`,children:l===void 0?e.loading:e.couldNotOpen(l)}):(0,Z.jsx)(Ye,{doc:s,dir:o,entry:i})}export{ze as PostDocument,R as WORDS,Xe as XPostEditor,Xe as default};
@@ -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{p as n}from"./index-BQWZnyAQ.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-CyhovuYE.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as r}from"./d3-selection-COWvaQNI.js";import"./chunk-DSNLSHJZ-D6oPWl_W.js";import{n as i,r as a,t as o}from"./chunk-2E7WHVMD-B2MPOVTU.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-Dx1fBVUG.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};