@bendyline/gezel-service 1.0.7 → 1.1.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 (237) hide show
  1. package/dist/bin/gezeld.js +6253 -3616
  2. package/dist/handboek-content/whats-new/1.26224.md +1 -0
  3. package/dist/handboek-content/whats-new/1.26226.md +1 -0
  4. package/dist/handboek-content/whats-new/1.26231.md +1 -0
  5. package/dist/handboek-content/whats-new/1.26234.md +1 -0
  6. package/dist/handboek-content/whats-new/1.26237.md +1 -0
  7. package/dist/handboek-content/whats-new/1.26244.md +2 -1
  8. package/dist/handboek-content/whats-new/1.26247.md +88 -0
  9. package/dist/handboek-content/whats-new/whats-new-index.md +1 -0
  10. package/dist/index-store/static-index-worker.js +17 -1
  11. package/dist/index.d.ts +473 -209
  12. package/dist/index.js +6251 -3614
  13. package/dist/memory/embed-worker.js +58 -2
  14. package/dist/memory/image-embed-worker.js +8 -0
  15. package/dist/providers/llama-cpp/gguf-metadata-worker.js +2 -0
  16. package/dist/providers/mlx/python/gezel_mlx_server.py +18 -18
  17. package/dist/ui/assets/AmbientDashboardCard-Cf5fi_fY.js +1 -0
  18. package/dist/ui/assets/{AudioEngineSettings-BDrNIGGm.js → AudioEngineSettings-D3L7HOHe.js} +1 -1
  19. package/dist/ui/assets/{BenchmarksView-CHyujjs8.js → BenchmarksView-B68hrLCl.js} +1 -1
  20. package/dist/ui/assets/CatalogBrowser-DEM9t7Es.js +1 -0
  21. package/dist/ui/assets/{ChannelsSettings-Be_W1mr8.js → ChannelsSettings-DtK_k0Ul.js} +1 -1
  22. package/dist/ui/assets/ChatTimelineView-CQ4Sf4Ip.js +7 -0
  23. package/dist/ui/assets/ConfirmDialog-Dt1ed4Fh.js +1 -0
  24. package/dist/ui/assets/ConnectedAppsPanel-Cl8LEkrt.js +1 -0
  25. package/dist/ui/assets/CraftbookEditor-DEQRlQ2p.js +1 -0
  26. package/dist/ui/assets/{CraftbookScriptEditorView-DXIZYZT3.js → CraftbookScriptEditorView-DhXkkIdK.js} +1 -1
  27. package/dist/ui/assets/{CraftbookTabContent-Bm7t_b37.js → CraftbookTabContent-_oIdpQTG.js} +1 -1
  28. package/dist/ui/assets/{CraftbookToolsetSetup-DTEA-3K3.js → CraftbookToolsetSetup-BKg136L1.js} +1 -1
  29. package/dist/ui/assets/{CraftbooksView-C4X99TTe.js → CraftbooksView-Dm2zH-nW.js} +2 -2
  30. package/dist/ui/assets/{DiffpackReviewView-ClcNxtmF.js → DiffpackReviewView-EFLGJnwr.js} +1 -1
  31. package/dist/ui/assets/DocumentDetail-ClDRj2N-.js +1 -0
  32. package/dist/ui/assets/DocumentsView-ny9oieg2.js +1 -0
  33. package/dist/ui/assets/DropdownMenu-S4d9-3j3.js +1 -0
  34. package/dist/ui/assets/Ds4Settings-CeWlm5Vf.js +1 -0
  35. package/dist/ui/assets/EmbeddedChat-Hjrrgpao.js +1 -0
  36. package/dist/ui/assets/{FaceRecognitionCard-D3hdc7uU.js → FaceRecognitionCard-D7ufKqjI.js} +1 -1
  37. package/dist/ui/assets/FileMapView-DRjf59RH.js +1 -0
  38. package/dist/ui/assets/{FoldersSettings-BcNzl4vT.js → FoldersSettings-DDUhaFio.js} +1 -1
  39. package/dist/ui/assets/GezelDetail-Cph6pVGb.js +1 -0
  40. package/dist/ui/assets/{GezelJsonEditor-fOvYclu9.js → GezelJsonEditor-7vDGyBib.js} +1 -1
  41. package/dist/ui/assets/{GezellenView-BTzhHrxi.js → GezellenView-DQhcO1CP.js} +1 -1
  42. package/dist/ui/assets/{GildeUpdatesCard-Bq6XEpLP.js → GildeUpdatesCard-UKKNm_U8.js} +1 -1
  43. package/dist/ui/assets/{GithubSignInChip-CnlTCG8G.js → GithubSignInChip-DjM3qZsL.js} +1 -1
  44. package/dist/ui/assets/{HandboekMediaProvider-BfQW8_Nr.js → HandboekMediaProvider-DixaXTAH.js} +1 -1
  45. package/dist/ui/assets/HandboekView-BeNQqho9.js +1 -0
  46. package/dist/ui/assets/HistoryView-E2szGNGS.js +1 -0
  47. package/dist/ui/assets/{HomeView-CB_5TJIp.css → HomeView-CNeqCFPc.css} +1 -1
  48. package/dist/ui/assets/HomeView-CkiS3DXy.js +1 -0
  49. package/dist/ui/assets/{ImageEngineSettings-BpMfQy4f.js → ImageEngineSettings-BCKT7Gvi.js} +1 -1
  50. package/dist/ui/assets/{ImageRecognitionSettings-Ct-7-Oas.js → ImageRecognitionSettings-DD6syFez.js} +1 -1
  51. package/dist/ui/assets/IncompleteDownloads-BiPaaahS.js +1 -0
  52. package/dist/ui/assets/InstallProgressRow-DyKOI4MU.js +1 -0
  53. package/dist/ui/assets/KnowledgeCatalogsCard-B132vzRa.js +1 -0
  54. package/dist/ui/assets/KnowledgeView-CtPuIlN4.js +1 -0
  55. package/dist/ui/assets/LlamaCppSettings-D6zHcu4W.js +1 -0
  56. package/dist/ui/assets/{MarkdownField-D-0Zw7gM.js → MarkdownField-CK8K3fzj.js} +1 -1
  57. package/dist/ui/assets/MemoriesTree-DzjXzIrM.js +1 -0
  58. package/dist/ui/assets/{MicrophoneSettings-BIaFxyY_.js → MicrophoneSettings-1FH83SCq.js} +1 -1
  59. package/dist/ui/assets/MlxSettings-BYxUqFnJ.js +1 -0
  60. package/dist/ui/assets/ModelPicker-DoXPfQkQ.js +1 -0
  61. package/dist/ui/assets/{NewScriptDialog-D-gkY8TS.js → NewScriptDialog-C5X-7PMt.js} +1 -1
  62. package/dist/ui/assets/NewTaskDialog-Cyqtmigv.js +2 -0
  63. package/dist/ui/assets/{OllamaSettings-oIE2Mech.js → OllamaSettings-DkjmA-sB.js} +1 -1
  64. package/dist/ui/assets/ProjectChat-YEqUME6k.js +5 -0
  65. package/dist/ui/assets/{ProjectConnectionsTab-BZqp-oKI.js → ProjectConnectionsTab-dFCJpW93.js} +1 -1
  66. package/dist/ui/assets/ProjectGitStatusBar-CjZxG54t.js +1 -0
  67. package/dist/ui/assets/{ProjectGithubView-w8suLCsA.js → ProjectGithubView-CQ4-tmPx.js} +1 -1
  68. package/dist/ui/assets/{ProjectMailTab-DGo7eyB8.js → ProjectMailTab-NaScsZJf.js} +1 -1
  69. package/dist/ui/assets/ProjectOverviewView-ChjxbQas.js +1 -0
  70. package/dist/ui/assets/{ProjectTimeline-DRe3D9qY.js → ProjectTimeline-BZpdCisR.js} +1 -1
  71. package/dist/ui/assets/ProjectsView-J77ECk6V.js +7 -0
  72. package/dist/ui/assets/{RecommendedBadge-BKiDixnB.js → RecommendedBadge-D0m68PAu.js} +1 -1
  73. package/dist/ui/assets/{RemoteServersPanel-DGyl6-Rg.js → RemoteServersPanel-BdLOoORu.js} +1 -1
  74. package/dist/ui/assets/ScriptEditorTabs-BFvIiDFZ.js +2 -0
  75. package/dist/ui/assets/ScriptEditorView-B09rm1vz.js +5 -0
  76. package/dist/ui/assets/{ScriptsView-WQc28TmQ.js → ScriptsView-BvNAJXpo.js} +1 -1
  77. package/dist/ui/assets/{SecurityComplianceSettings-DsMEA4J3.js → SecurityComplianceSettings-DzGOnptO.js} +1 -1
  78. package/dist/ui/assets/SessionSwitcher-6okzcxT7.js +1 -0
  79. package/dist/ui/assets/SettingsView-Dur4dLhW.js +3 -0
  80. package/dist/ui/assets/SquisqIntegration-6v3yNOIP.js +2 -0
  81. package/dist/ui/assets/{StorageCleanupDialog-DHqwyMZZ.js → StorageCleanupDialog-OQlomMJD.js} +1 -1
  82. package/dist/ui/assets/{StorageUsageCard-CdT6SU51.js → StorageUsageCard-f6c6qTbM.js} +1 -1
  83. package/dist/ui/assets/Tabs-jE0Z5Tzd.js +1 -0
  84. package/dist/ui/assets/TaskTabContent-0w3kAUWR.js +1 -0
  85. package/dist/ui/assets/TasksView-BVMT4BAY.js +1 -0
  86. package/dist/ui/assets/{TerminalCodeEditor-77pBm6f3.js → TerminalCodeEditor-DO7zLKy-.js} +2 -2
  87. package/dist/ui/assets/ToolsetsEditor-Bb1wD5mV.js +8 -0
  88. package/dist/ui/assets/TransformToolbarButton-BWYkEB0d.js +5 -0
  89. package/dist/ui/assets/UnrecognizedModels-HtdMZUqK.js +1 -0
  90. package/dist/ui/assets/{VideoEngineSettings-DzMeINuv.js → VideoEngineSettings-Dq8Nw_tK.js} +1 -1
  91. package/dist/ui/assets/{WorkspaceIndexPane-DU4yd4Ai.js → WorkspaceIndexPane-fpDz4MwZ.js} +1 -1
  92. package/dist/ui/assets/{api-BX5xXiFs.js → api-BPraLwsh.js} +1 -1
  93. package/dist/ui/assets/chat-thread-memory-Be48zsyG.js +1 -0
  94. package/dist/ui/assets/chunk-6ECMNUIP-DDVjPyfK.js +15 -0
  95. package/dist/ui/assets/{chunk-6N2J7C2B-B5QIrD9m.js → chunk-6N2J7C2B-CsppiLVr.js} +1 -1
  96. package/dist/ui/assets/{chunk-A6N6IN3I-DXok09eC.js → chunk-A6N6IN3I-ofeM4l8g.js} +1 -1
  97. package/dist/ui/assets/chunk-B7GEAZBI-Divd2h1k.js +1 -0
  98. package/dist/ui/assets/chunk-DXYWKZ52-BXcAlClu.js +1 -0
  99. package/dist/ui/assets/chunk-FLR2ARKC-D7wrvQgT.js +2 -0
  100. package/dist/ui/assets/chunk-IIQYS2YH-DKZhWMpn.js +1 -0
  101. package/dist/ui/assets/{chunk-ILCJ3WFD-WRukZ7R1.js → chunk-ILCJ3WFD-CLZxw4Ge.js} +3 -3
  102. package/dist/ui/assets/chunk-OBADJV7C-CDVOcmYt.js +1 -0
  103. package/dist/ui/assets/chunk-Q77KNJIN-BIDRf0aP.js +6 -0
  104. package/dist/ui/assets/chunk-S5PCVMKU-Df5XzhSE.js +6 -0
  105. package/dist/ui/assets/chunk-UBFT2CDQ-FexGDigd.js +31 -0
  106. package/dist/ui/assets/{chunk-USU6HTKB-D5FmDzJU.js → chunk-USU6HTKB-B_p-YcDp.js} +1 -1
  107. package/dist/ui/assets/chunk-VKXOZTYP-BoVvWSBR.js +5 -0
  108. package/dist/ui/assets/{chunk-6RQOV3B3-CwvKotJw.js → chunk-VPWPEMZJ-DRKoa_j0.js} +1 -1
  109. package/dist/ui/assets/{chunk-WATAOG4Y-DXg2lov5.js → chunk-WATAOG4Y-C1EXVPmG.js} +1 -1
  110. package/dist/ui/assets/{container-B7jJtK5V.js → container-Ce94efbg.js} +1 -1
  111. package/dist/ui/assets/csv-62UGQMzZ.js +1 -0
  112. package/dist/ui/assets/data-B2kHjlc5.js +1 -0
  113. package/dist/ui/assets/dist-B9-VrAP8.js +2 -0
  114. package/dist/ui/assets/dist-BaHut5iX.js +2 -0
  115. package/dist/ui/assets/dist-BqGwkOe5.js +225 -0
  116. package/dist/ui/assets/dist-ZnIgkoEi.js +4 -0
  117. package/dist/ui/assets/{dist-BHl1ZAVG.js → dist-l6uUFZMV.js} +2 -2
  118. package/dist/ui/assets/dist-pLLFUPO-.js +1 -0
  119. package/dist/ui/assets/{doc-s6H7T0IO.js → doc-Dr5K49bx.js} +28 -28
  120. package/dist/ui/assets/document-companion-BQk2kS0F.js +1 -0
  121. package/dist/ui/assets/document-import-QoM9UxJr.js +1 -0
  122. package/dist/ui/assets/docx-sXa1Rf41.js +2 -0
  123. package/dist/ui/assets/{epub-B98SgHBz.js → epub-RopMP0ec.js} +4 -4
  124. package/dist/ui/assets/{export-options-Bu-tI6og.js → export-options-f7PKjEBb.js} +1 -1
  125. package/dist/ui/assets/extract-UTAOG7LV-4WDRw1o4.js +1 -0
  126. package/dist/ui/assets/file-browser-c2tf4MIb.js +5 -0
  127. package/dist/ui/assets/html-BGVOMhkv.js +253 -0
  128. package/dist/ui/assets/icons-DWaUNQbT.js +1 -0
  129. package/dist/ui/assets/images-JLBFCDD4-6JitW0hD.js +1 -0
  130. package/dist/ui/assets/index-B8NcxqcR.css +1 -0
  131. package/dist/ui/assets/index-C0DYtvfg.js +34 -0
  132. package/dist/ui/assets/index-J8TOMdvV.js +2 -0
  133. package/dist/ui/assets/{infer-kCLH1C8z.js → infer-LEGOsu64.js} +2 -2
  134. package/dist/ui/assets/ironcalc-BAi5gOlE.js +3 -0
  135. package/dist/ui/assets/layouts-2A7QNF6Y-CVwP7noP.js +1 -0
  136. package/dist/ui/assets/{mail-link-CI6YD6k2.js → mail-link-DXkmCd5b.js} +1 -1
  137. package/dist/ui/assets/markdown-baseline-9B52XlX2.js +1 -0
  138. package/dist/ui/assets/{markdown-Bi9b5f5Y.js → markdown-ryKA_OmY.js} +1 -1
  139. package/dist/ui/assets/materialize-A34OZGEU-xNNKzytx.js +1 -0
  140. package/dist/ui/assets/model-inventory-ykSm_IT5.js +1 -0
  141. package/dist/ui/assets/{model-quantization-BDzrELN_.js → model-quantization-CLO7XLoF.js} +1 -1
  142. package/dist/ui/assets/{monaco-base-BiVSa1J-.js → monaco-base-B1H1U1Sw.js} +1 -1
  143. package/dist/ui/assets/{monaco-setup-UeltVkg_.js → monaco-setup-DjhrGQui.js} +1 -1
  144. package/dist/ui/assets/{new-project-meta-0xhggGA_.js → new-project-meta-_f9sfcRX.js} +1 -1
  145. package/dist/ui/assets/outside-in-D73N1g_b.js +3 -0
  146. package/dist/ui/assets/{pdf-DgTjy3rN.js → pdf-BOjVDlCK.js} +3 -3
  147. package/dist/ui/assets/{pending-drafts-YVW6X55O.js → pending-drafts-B11MKQ9R.js} +1 -1
  148. package/dist/ui/assets/{poppetje-Ce-02Aqi.js → poppetje-DLB8uevw.js} +2 -2
  149. package/dist/ui/assets/pptx-BuxyNxQh.js +6 -0
  150. package/dist/ui/assets/primitives-CWrGZpPI.js +41 -0
  151. package/dist/ui/assets/run-export-ChaMXrKS.js +23 -0
  152. package/dist/ui/assets/squisq-formats-aAdypXoy.js +1 -0
  153. package/dist/ui/assets/standalone-source-q_Zzd1bd.js +11 -0
  154. package/dist/ui/assets/storage-D8pE2zg0.js +1 -0
  155. package/dist/ui/assets/styles-BhnF3s2q.css +1 -0
  156. package/dist/ui/assets/styles-CKVKwqoQ.js +550 -0
  157. package/dist/ui/assets/table-fcouR4db.js +1 -0
  158. package/dist/ui/assets/{terminal-monaco-setup-DNoK2tN4.js → terminal-monaco-setup-BAzrVzeR.js} +1 -1
  159. package/dist/ui/assets/{useCompactLayout-BarJPYcv.js → useCompactLayout-Dtolvzye.js} +0 -0
  160. package/dist/ui/assets/{useCopilotAvailability-BH1nLXQI.js → useCopilotAvailability-3xZvKgTF.js} +1 -1
  161. package/dist/ui/assets/{useDiffpacks-CK8W_OD_.js → useDiffpacks-Dsnr0wtX.js} +1 -1
  162. package/dist/ui/assets/{useGitSync-DWxX5-7K.js → useGitSync-BCTptQsp.js} +1 -1
  163. package/dist/ui/assets/{useShowWorkInProgressFeatures-DwwviLRO.js → useShowWorkInProgressFeatures-BhDNuQiU.js} +1 -1
  164. package/dist/ui/assets/{useTotalRamBytes-WoN_mi-V.js → useTotalRamBytes-DIx-_pf8.js} +1 -1
  165. package/dist/ui/assets/wasm-DdxEDD2H.js +1 -0
  166. package/dist/ui/assets/wasm_bg-DW9Xt_vt.wasm +0 -0
  167. package/dist/ui/assets/xlsx-DyBGuAO1.js +4 -0
  168. package/dist/ui/index.html +19 -18
  169. package/package.json +11 -11
  170. package/dist/ui/assets/AmbientDashboardCard-C1Ee-FKZ.js +0 -1
  171. package/dist/ui/assets/CatalogBrowser-Bz8ZtxPn.js +0 -1
  172. package/dist/ui/assets/ChatTimelineView-Do9EryEH.js +0 -7
  173. package/dist/ui/assets/ConfirmDialog-BHFs6vmJ.js +0 -1
  174. package/dist/ui/assets/ConnectedAppsPanel-BtMayq0R.js +0 -1
  175. package/dist/ui/assets/CraftbookEditor-D5jTzWwF.js +0 -1
  176. package/dist/ui/assets/DocumentDetail-CPU51d04.js +0 -1
  177. package/dist/ui/assets/DocumentsView-B6OyjvJ0.js +0 -1
  178. package/dist/ui/assets/DropdownMenu-D5fCzIrh.js +0 -1
  179. package/dist/ui/assets/Ds4Settings-CrUM_KGP.js +0 -1
  180. package/dist/ui/assets/EmbeddedChat-ue9ia-WY.js +0 -1
  181. package/dist/ui/assets/FileMapView-CxvfDLGA.js +0 -1
  182. package/dist/ui/assets/GezelDetail-DHuqBK55.js +0 -1
  183. package/dist/ui/assets/HandboekView-CPnnyj29.js +0 -1
  184. package/dist/ui/assets/HistoryView-B4VAfEMe.js +0 -1
  185. package/dist/ui/assets/HomeView-ccH60J6f.js +0 -1
  186. package/dist/ui/assets/KnowledgeCatalogsCard-Bi5Rx9Iz.js +0 -1
  187. package/dist/ui/assets/KnowledgeView-DAwjwLZo.js +0 -1
  188. package/dist/ui/assets/LlamaCppSettings-Ceyk9pDP.js +0 -1
  189. package/dist/ui/assets/MemoriesTree-BKZEPJpm.js +0 -1
  190. package/dist/ui/assets/MlxSettings-CG3wfuc3.js +0 -1
  191. package/dist/ui/assets/ModelPicker-CCBVjLMS.js +0 -1
  192. package/dist/ui/assets/NewPathDialog-D4jnNBfP.js +0 -1
  193. package/dist/ui/assets/NewTaskDialog-Ox9D612Z.js +0 -2
  194. package/dist/ui/assets/ProjectChat-DMwKnkW-.js +0 -5
  195. package/dist/ui/assets/ProjectGitStatusBar-C6bkCSby.js +0 -1
  196. package/dist/ui/assets/ProjectOverviewView-NNwXd_QQ.js +0 -1
  197. package/dist/ui/assets/ProjectsView-SBPgYOq8.js +0 -7
  198. package/dist/ui/assets/ScriptEditorTabs-paocQ6dj.js +0 -2
  199. package/dist/ui/assets/ScriptEditorView-N9zSLqqi.js +0 -5
  200. package/dist/ui/assets/SessionSwitcher-C8te7YSe.js +0 -1
  201. package/dist/ui/assets/SettingsView-Brl4JQkW.js +0 -3
  202. package/dist/ui/assets/Tabs-BAY1Q79B.js +0 -1
  203. package/dist/ui/assets/TaskTabContent-CNPJ4DQj.js +0 -1
  204. package/dist/ui/assets/TasksView-DuMjFS8S.js +0 -1
  205. package/dist/ui/assets/ToolsetsEditor-BdxHnIBj.js +0 -8
  206. package/dist/ui/assets/TransformToolbarButton-CVg5nz36.js +0 -5
  207. package/dist/ui/assets/UnrecognizedModels-Cw9Ku_bW.js +0 -1
  208. package/dist/ui/assets/chat-thread-memory-CZGcwgGo.js +0 -1
  209. package/dist/ui/assets/chunk-6ECMNUIP-C1kohb1U.js +0 -15
  210. package/dist/ui/assets/chunk-AONELFLA-Cv2nS9ga.js +0 -1
  211. package/dist/ui/assets/chunk-IIQYS2YH-Dxg6MAfT.js +0 -1
  212. package/dist/ui/assets/chunk-MIKKUKOD-XIkmalSN.js +0 -31
  213. package/dist/ui/assets/chunk-NNJLSQPW-DJA6camf.js +0 -5
  214. package/dist/ui/assets/chunk-S5PCVMKU-DbCZ5AUH.js +0 -6
  215. package/dist/ui/assets/csv-xmd1_Aqd.js +0 -4
  216. package/dist/ui/assets/dist-BPx-FyRH.js +0 -222
  217. package/dist/ui/assets/dist-Bvo52IGx.js +0 -1
  218. package/dist/ui/assets/dist-D5aoNQwk.js +0 -2
  219. package/dist/ui/assets/docx-Cj4A9MhC.js +0 -2
  220. package/dist/ui/assets/extract-UTAOG7LV-C4b7ycaL.js +0 -1
  221. package/dist/ui/assets/file-browser-80qWoVju.js +0 -5
  222. package/dist/ui/assets/html-C9TlzI57.js +0 -253
  223. package/dist/ui/assets/icons-C9dD-bDi.js +0 -1
  224. package/dist/ui/assets/images-ESPQKVTW-D7SgdVJ_.js +0 -1
  225. package/dist/ui/assets/index-D1m4Wx8V.css +0 -1
  226. package/dist/ui/assets/index-DXWR4qW1.js +0 -34
  227. package/dist/ui/assets/layouts-2A7QNF6Y-De2t-YXl.js +0 -1
  228. package/dist/ui/assets/markdown-baseline-HMqF2ChK.js +0 -1
  229. package/dist/ui/assets/outside-in-BFVUUcLa.js +0 -3
  230. package/dist/ui/assets/pptx-6ChgUEf4.js +0 -6
  231. package/dist/ui/assets/primitives-DEsn1shf.js +0 -41
  232. package/dist/ui/assets/run-export-BrYhHj1O.js +0 -23
  233. package/dist/ui/assets/standalone-source-D6mbpa3h.js +0 -11
  234. package/dist/ui/assets/storage-fn4FCEVK.js +0 -1
  235. package/dist/ui/assets/styles-C0EoNJbk.css +0 -1
  236. package/dist/ui/assets/styles-CKr_yrbn.js +0 -541
  237. package/dist/ui/assets/xlsx-DH7sTb3W.js +0 -4
@@ -0,0 +1,253 @@
1
+ import{i as e,n as t}from"./rolldown-runtime-aKtaBQYM.js";import{I as n,ft as r,h as i}from"./doc-Dr5K49bx.js";import{a,l as o,s}from"./chunk-O7JILDEF-CqcO1qaI.js";import{O as c,p as l}from"./chunk-GAZKTT4R-BkP6-w3z.js";import{F as u,I as d,n as f}from"./chunk-UBFT2CDQ-FexGDigd.js";import{l as p}from"./markdown-ryKA_OmY.js";import"./schemas-JY4jmLbC.js";import{t as m}from"./jszip.min-DhiFe-R7.js";import{n as h,t as g}from"./chunk-BXWNU4T5-CFA9w1DZ.js";import{n as _,r as v,t as y}from"./chunk-VPWPEMZJ-DRKoa_j0.js";var b=e(m(),1);function x(e){let t=new Set;function n(e){!e||e.startsWith(`data:`)||e.startsWith(`blob:`)||e.startsWith(`http://`)||e.startsWith(`https://`)||t.add(e)}function r(e){if(e)for(let t of e)t.type===`image`&&n(t.content.src),t.type===`video`&&(n(t.content.src),n(t.content.posterSrc)),t.type===`map`&&n(t.content.staticSrc)}function i(e){r(e.layers),e.contents&&S(e.contents,n),e.children&&e.children.forEach(i)}if(e.blocks.forEach(i),e.startBlock?.heroSrc&&n(e.startBlock.heroSrc),e.persistentLayers){for(let t of e.persistentLayers.bottomLayers??[])`src`in t&&typeof t.src==`string`&&n(t.src);for(let t of e.persistentLayers.topLayers??[])`src`in t&&typeof t.src==`string`&&n(t.src)}for(let n of e.blocks)w(n,t);return t}function S(e,t){for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;e.type===`image`&&typeof e.url==`string`&&t(e.url),(e.type===`htmlBlock`||e.type===`htmlInline`)&&Array.isArray(e.htmlChildren)&&C(e.htmlChildren,t),Array.isArray(e.children)&&S(e.children,t)}}function C(e,t){for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;if(e.type===`htmlElement`){if(e.tagName===`img`){let n=e.attributes;n&&typeof n.src==`string`&&t(n.src)}Array.isArray(e.children)&&C(e.children,t)}}}function w(e,t){if(!(!e||typeof e!=`object`)){for(let n of[`imageSrc`,`src`,`heroSrc`,`backgroundImage`,`posterSrc`,`staticSrc`,`videoSrc`,`thumbnailSrc`]){let r=e[n];typeof r==`string`&&r&&!r.startsWith(`data:`)&&!r.startsWith(`http`)&&t.add(r),r&&typeof r==`object`&&!Array.isArray(r)&&w(r,t)}if(Array.isArray(e))for(let n of e)n&&typeof n==`object`&&w(n,t);for(let n of[`images`,`accentImage`,`backgroundVideo`,`children`,`blocks`]){let r=e[n];if(Array.isArray(r))for(let e of r)e&&typeof e==`object`&&w(e,t);else r&&typeof r==`object`&&w(r,t)}}}function T(e){return e.replace(/<(?=!--|\/?script)/gi,`\\u003c`)}function ee(e){let t={},n={};if(!e)return{imageMap:t,imageAliases:n};let r=new Map;for(let[i,a]of e.entries()){let e=r.get(a);if(e!==void 0){n[i]=e;continue}r.set(a,i),t[i]=y(a,v(i))}return{imageMap:t,imageAliases:n}}function te(e,t){let{playerScript:n,basePath:r=`.`,images:i,mode:a=`slideshow`,title:o=`Squisq Document`,autoPlay:s=!1,showCodeCopyButton:c=!1,captionStyle:l,themeId:u,themeRegistry:d}=t;e=ne(e,u,d);let{imageMap:f,imageAliases:p}=ee(i),m=T(JSON.stringify(e)),h=T(JSON.stringify(f)),g=T(JSON.stringify(p));return`<!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>${D(o)}</title>
7
+ <style>
8
+ *,*::before,*::after{box-sizing:border-box}
9
+ html,body{margin:0;padding:0;height:100%;background:#1a1a2e;color:#e0e0e0;font-family:system-ui,-apple-system,sans-serif}
10
+ #squisq-root{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
11
+ ${a===`static`?`#squisq-root{display:block}`:``}
12
+ </style>
13
+ </head>
14
+ <body>
15
+ <div id="squisq-root"></div>
16
+ <script type="application/json" id="squisq-doc" data-squisq-doc="1">${m}<\/script>
17
+ <script>${T(n)}<\/script>
18
+ <script>
19
+ (function(){
20
+ var doc = JSON.parse(document.getElementById("squisq-doc").textContent);
21
+ var images = JSON.parse(${JSON.stringify(h)});
22
+ // Re-expand path/basename aliases that share a payload (see
23
+ // buildInlineImageMaps) so \`images\` has every key the resolver may ask for.
24
+ var aliases = JSON.parse(${JSON.stringify(g)});
25
+ for (var alias in aliases) {
26
+ if (Object.prototype.hasOwnProperty.call(aliases, alias)) {
27
+ images[alias] = images[aliases[alias]];
28
+ }
29
+ }
30
+ SquisqPlayer.mount(document.getElementById("squisq-root"), doc, {
31
+ mode: ${JSON.stringify(a)},
32
+ images: images,
33
+ autoPlay: ${JSON.stringify(s)},${l?`
34
+ captionStyle: ${JSON.stringify(l)},`:``}
35
+ showCodeCopyButton: ${JSON.stringify(c)},
36
+ basePath: ${JSON.stringify(r)}
37
+ });
38
+ })();
39
+ <\/script>
40
+ </body>
41
+ </html>`}function E(e,t){let{playerScriptPath:n,imagePathMap:r,audioPathMap:i,mode:a=`slideshow`,title:o=`Squisq Document`,autoPlay:s=!1,showCodeCopyButton:c=!1,captionStyle:l,themeId:u,themeRegistry:d,basePath:f=`.`}=t;e=ne(e,u,d);let p=T(JSON.stringify(e)),m=r?T(JSON.stringify(r)):`{}`,h=i?T(JSON.stringify(i)):`null`;return`<!DOCTYPE html>
42
+ <html lang="en">
43
+ <head>
44
+ <meta charset="UTF-8">
45
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
46
+ <title>${D(o)}</title>
47
+ <style>
48
+ *,*::before,*::after{box-sizing:border-box}
49
+ html,body{margin:0;padding:0;height:100%;background:#1a1a2e;color:#e0e0e0;font-family:system-ui,-apple-system,sans-serif}
50
+ #squisq-root{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
51
+ ${a===`static`?`#squisq-root{display:block}`:``}
52
+ </style>
53
+ </head>
54
+ <body>
55
+ <div id="squisq-root"></div>
56
+ <script type="application/json" id="squisq-doc" data-squisq-doc="1">${p}<\/script>
57
+ <script src="${D(n)}"><\/script>
58
+ <script>
59
+ (function(){
60
+ var doc = JSON.parse(document.getElementById("squisq-doc").textContent);
61
+ var images = JSON.parse(${JSON.stringify(m)});
62
+ var audio = ${h};
63
+ SquisqPlayer.mount(document.getElementById("squisq-root"), doc, {
64
+ mode: ${JSON.stringify(a)},
65
+ images: images,
66
+ audio: audio,
67
+ autoPlay: ${JSON.stringify(s)},${l?`
68
+ captionStyle: ${JSON.stringify(l)},`:``}
69
+ showCodeCopyButton: ${JSON.stringify(c)},
70
+ basePath: ${JSON.stringify(f)}
71
+ });
72
+ })();
73
+ <\/script>
74
+ </body>
75
+ </html>`}function ne(e,t,n){let r=t??e.themeId??o(e.frontmatter);if(!r)return e;if(e.customThemes?.some(e=>e.id===r)||!n)return r===e.themeId?e:{...e,themeId:r};let i=n.get(r);return i?{...e,themeId:r,customThemes:[...e.customThemes??[],i]}:r===e.themeId?e:{...e,themeId:r}}function D(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}function re(e,t={}){let{title:r=`Document`,images:i,links:a,themeId:s,iconsCss:c,htmlPolicy:l=`sanitize`,externalResources:u=`deny`}=t,d=s??o(e.frontmatter),f=t.theme??(d?n(e,d,t.themeRegistry):void 0),p=new g(e),m={images:i,links:a,htmlPolicy:l,footnotes:p},h=se(e.children,m)+ce(p,m),_=f&&u===`allow`?ve(f):``,v=oe(e),y=``;v&&(y=c?`<style data-fa-inline>
76
+ ${ie(c)}
77
+ </style>
78
+ `:u===`allow`?ae:``);let b=ie(`${f?_e(f):ge}
79
+ ${he}`);return`<!DOCTYPE html>
80
+ <html lang="en">
81
+ <head>
82
+ <meta charset="UTF-8">
83
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
84
+ <title>${N(r)}</title>
85
+ ${_}${y}<style>
86
+ ${b}
87
+ </style>
88
+ </head>
89
+ <body>
90
+ ${h}
91
+ </body>
92
+ </html>`}function ie(e){return e.replace(/</g,`\\3c `)}var ae=`<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.2.0/css/all.min.css" crossorigin="anonymous" referrerpolicy="no-referrer">
93
+ `;function oe(e){function t(e){if(!e||typeof e!=`object`)return!1;let n=e;if(n.type===`inlineIcon`)return!0;if(Array.isArray(n.children)){for(let e of n.children)if(t(e))return!0}return!1}return t(e)}function se(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i&&i.type===`heading`){let a=i,o=a.templateAnnotation?.template;if(o===`leftFeature`||o===`rightFeature`){let i=le(e,r),s=e.slice(r+1,i);n.push(ue(a,s,o,t)),r=i-1;continue}}n.push(A(i,t))}return n.join(`
94
+ `)}function ce(e,t){return e.isEmpty?``:[``,`<section class="squisq-footnotes" data-footnotes><hr>`,`<ol>`,...e.ordered().map(e=>{let{def:n}=h(e.identifier),r=e.definition?j(e.definition,t):``,i=Array.from({length:Math.max(e.citations,1)},(t,n)=>{let{ref:r}=h(e.identifier,n+1),i=e.citations>1?`\u21A9︎${n+1}`:`↩`;return`<a href="#${P(r)}" class="squisq-footnote-backref" aria-label="Back to reference ${e.number}">${i}</a>`}).join(` `);return`<li id="${P(n)}">${r}${i}</li>`}),`</ol>`,`</section>`].join(`
95
+ `)}function le(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(t&&t.type===`heading`)return n}return e.length}function ue(e,t,n,r){let i=`h${Math.min(Math.max(e.depth??2,1),6)}`,a=`<${i}>${j({children:e.children},r)}</${i}>`,o=fe(t),s=o.image?de(o.image,r):`<div class="squisq-feature__media squisq-feature__media--empty"></div>`,c=[a,...o.remaining.map(e=>A(e,r))].filter(e=>e.length>0).join(`
96
+ `);return`<section class="squisq-feature ${n===`leftFeature`?`squisq-feature--left`:`squisq-feature--right`}">
97
+ ${s}
98
+ <div class="squisq-feature__body">
99
+ ${c}
100
+ </div>
101
+ </section>`}function de(e,t){let n=d(t?.images?.get(e.src)??e.src,`media`);if(!n)return`<div class="squisq-feature__media squisq-feature__media--empty"></div>`;let r=[`src="${P(n)}"`,`alt="${P(e.alt)}"`];return typeof e.width==`number`&&r.push(`width="${e.width}"`),typeof e.height==`number`&&r.push(`height="${e.height}"`),`<div class="squisq-feature__media${typeof e.width==`number`||typeof e.height==`number`?` squisq-feature__media--sized`:``}"><img ${r.join(` `)} /></div>`}function fe(e){for(let t=0;t<e.length;t++){let n=pe(e[t]);if(!n)continue;let r=[...e];return n.replacement===null?r.splice(t,1):r[t]=n.replacement,{image:n.image,remaining:r}}return{image:null,remaining:e}}function pe(e){if(!e||typeof e!=`object`)return null;let t=e;if(t.type===`paragraph`&&Array.isArray(t.children)){let e=t.children,n=e.findIndex(e=>e.type===`image`&&typeof e.url==`string`);if(n>=0){let r=e[n],i=[...e.slice(0,n),...e.slice(n+1)].filter(e=>!me(e)),a=i.length===0?null:{...t,children:i};return{image:{src:r.url,alt:r.alt??``},replacement:a}}}if(t.type===`htmlBlock`&&Array.isArray(t.htmlChildren)){let e=O(t.htmlChildren);if(e)return{image:e,replacement:null}}return null}function me(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.type===`text`&&typeof t.value==`string`&&t.value.trim().length===0}function O(e){for(let t of e){if(t.type!==`htmlElement`)continue;if(t.tagName.toLowerCase()===`img`){let e=t.attributes.src;if(typeof e==`string`&&e)return{src:e,alt:typeof t.attributes.alt==`string`?t.attributes.alt:``,width:k(t.attributes.width),height:k(t.attributes.height)}}let e=O(t.children);if(e)return e}return null}function k(e){if(e===void 0)return;let t=parseFloat(e);return Number.isFinite(t)&&t>0?t:void 0}var he=` .squisq-feature {
102
+ display: flex;
103
+ flex-wrap: wrap;
104
+ gap: 1.5em;
105
+ align-items: center;
106
+ margin: 1.75em 0;
107
+ }
108
+ .squisq-feature--right { flex-direction: row-reverse; }
109
+ .squisq-feature__media {
110
+ flex: 0 0 42%;
111
+ min-width: 0;
112
+ }
113
+ .squisq-feature__media--empty { display: none; }
114
+ /* Default: image fills the media column. */
115
+ .squisq-feature__media img {
116
+ width: 100%;
117
+ height: auto;
118
+ display: block;
119
+ border-radius: 6px;
120
+ }
121
+ /* "Sized" media: the image carried explicit width/height attrs (the
122
+ WYSIWYG editor wrote them after a resize). Honor the attribute
123
+ values and center the image inside the media column with padding. */
124
+ .squisq-feature__media--sized {
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+ padding: 1em;
129
+ box-sizing: border-box;
130
+ }
131
+ /* Leave width and height untouched here -- the HTML attributes set
132
+ the intrinsic dimensions, and CSS overrides would silently discard
133
+ the author's sizing. max-width: 100% still keeps the image from
134
+ overflowing the column on narrow viewports; HTML5 derives the
135
+ aspect ratio from the width/height pair so the scale stays right. */
136
+ .squisq-feature__media--sized img {
137
+ max-width: 100%;
138
+ display: block;
139
+ border-radius: 6px;
140
+ }
141
+ .squisq-feature__body {
142
+ flex: 1 1 0;
143
+ min-width: 0;
144
+ }
145
+ .squisq-feature__body > :first-child { margin-top: 0; }
146
+ .squisq-feature__body > :last-child { margin-bottom: 0; }
147
+ @media (max-width: 600px) {
148
+ .squisq-feature, .squisq-feature--right { flex-direction: column; }
149
+ .squisq-feature__media { flex-basis: auto; width: 100%; }
150
+ }`,ge=` body { font-family: system-ui, -apple-system, sans-serif; max-width: 800px; margin: 2em auto; padding: 0 1em; line-height: 1.6; color: #1f2937; }
151
+ h1, h2, h3, h4, h5, h6 { margin-top: 1.5em; margin-bottom: 0.5em; }
152
+ pre { background: #f3f4f6; padding: 1em; border-radius: 4px; overflow-x: auto; }
153
+ code { background: #f3f4f6; padding: 0.15em 0.3em; border-radius: 3px; font-size: 0.9em; }
154
+ pre code { background: none; padding: 0; }
155
+ blockquote { border-left: 3px solid #d1d5db; margin-left: 0; padding-left: 1em; color: #6b7280; }
156
+ /* Images: cap at the container width so nothing overflows, but only
157
+ force aspect-ratio height when the author didn't set explicit
158
+ dimensions on the <img> tag. The WYSIWYG editor writes width/height
159
+ attributes after a resize — overriding them here would silently
160
+ ignore the user's sizing. */
161
+ img { max-width: 100%; }
162
+ img:not([width]):not([height]) { height: auto; }
163
+ a { color: #3b82f6; }
164
+ table { border-collapse: collapse; width: 100%; margin: 1em 0; }
165
+ th, td { border: 1px solid #d1d5db; padding: 6px 10px; text-align: left; }
166
+ th { background: #f3f4f6; font-weight: 600; }
167
+ hr { border: none; border-top: 1px solid #d1d5db; margin: 1.5em 0; }`;function _e(e){let t=c(e.typography.bodyFont,`system-ui, sans-serif`),n=c(e.typography.titleFont,`Georgia, serif`),r=c(e.typography.monoFont,`Consolas, monospace`),i=e.typography.lineHeight??1.6,a=e.typography.titleLineHeight??1.25,o=e.typography.titleWeight===`normal`?400:700,s=e.colors;return` :root {
168
+ --plain-bg: ${s.background};
169
+ --plain-text: ${s.text};
170
+ --plain-muted: ${s.textMuted};
171
+ --plain-primary: ${s.primary};
172
+ --plain-secondary: ${s.secondary};
173
+ --plain-accent: ${s.highlight};
174
+ --plain-bg-light: ${s.backgroundLight};
175
+ --plain-body-font: ${t};
176
+ --plain-title-font: ${n};
177
+ --plain-mono-font: ${r};
178
+ }
179
+ body {
180
+ font-family: var(--plain-body-font);
181
+ max-width: 800px;
182
+ margin: 2em auto;
183
+ padding: 0 1em;
184
+ line-height: ${i};
185
+ color: var(--plain-text);
186
+ background: var(--plain-bg);
187
+ }
188
+ h1, h2, h3, h4, h5, h6 {
189
+ font-family: var(--plain-title-font);
190
+ color: var(--plain-text);
191
+ margin-top: 1.5em;
192
+ margin-bottom: 0.5em;
193
+ line-height: ${a};
194
+ font-weight: ${o};
195
+ }
196
+ p { margin: 0.75em 0; }
197
+ pre {
198
+ background: var(--plain-bg-light);
199
+ padding: 1em;
200
+ border-radius: 4px;
201
+ overflow-x: auto;
202
+ font-family: var(--plain-mono-font);
203
+ }
204
+ code {
205
+ background: var(--plain-bg-light);
206
+ padding: 0.15em 0.3em;
207
+ border-radius: 3px;
208
+ font-size: 0.9em;
209
+ font-family: var(--plain-mono-font);
210
+ }
211
+ pre code { background: none; padding: 0; }
212
+ blockquote {
213
+ border-left: 3px solid var(--plain-primary);
214
+ margin-left: 0;
215
+ padding-left: 1em;
216
+ color: var(--plain-muted);
217
+ }
218
+ /* See DEFAULT_CSS comment: only auto-scale height when the author
219
+ didn't set explicit width/height attributes. */
220
+ img { max-width: 100%; }
221
+ img:not([width]):not([height]) { height: auto; }
222
+ /* Blend the theme primary toward the body text color so links stay
223
+ theme-flavored but read clearly on every theme's background \u2014 some
224
+ themes (e.g. Gezellig) pick a mid-tone primary that's almost
225
+ invisible on a dark page when used neat. Underline makes the link
226
+ unambiguous independent of the color contrast. */
227
+ a {
228
+ color: color-mix(in srgb, var(--plain-primary) 65%, var(--plain-text));
229
+ text-decoration: underline;
230
+ text-decoration-thickness: 1px;
231
+ text-underline-offset: 2px;
232
+ }
233
+ a:hover { color: var(--plain-accent); }
234
+ table { border-collapse: collapse; width: 100%; margin: 1em 0; }
235
+ th, td {
236
+ border: 1px solid color-mix(in srgb, var(--plain-muted) 30%, transparent);
237
+ padding: 6px 10px;
238
+ text-align: left;
239
+ }
240
+ th {
241
+ background: var(--plain-bg-light);
242
+ color: var(--plain-text);
243
+ font-family: var(--plain-title-font);
244
+ font-weight: 600;
245
+ }
246
+ hr {
247
+ border: none;
248
+ border-top: 1px solid color-mix(in srgb, var(--plain-muted) 40%, transparent);
249
+ margin: 1.5em 0;
250
+ }`}function ve(e){let t=l([e.typography.bodyFont,e.typography.titleFont,e.typography.monoFont]);return t?`<link rel="preconnect" href="https://fonts.googleapis.com">
251
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
252
+ <link rel="stylesheet" href="${P(t)}">
253
+ `:``}function A(e,t){if(!e)return``;switch(e.type){case`heading`:{let n=Math.min(Math.max(e.depth??1,1),6);return`<h${n}>${j(e,t)}</h${n}>`}case`paragraph`:return`<p>${j(e,t)}</p>`;case`text`:return N(e.value??``);case`strong`:return`<strong>${j(e,t)}</strong>`;case`emphasis`:return`<em>${j(e,t)}</em>`;case`delete`:return`<del>${j(e,t)}</del>`;case`superscript`:return`<sup>${j(e,t)}</sup>`;case`footnoteReference`:{if(!t?.footnotes)return`<sup class="squisq-footnote-ref">${N(e.label??e.identifier)}</sup>`;let{number:n,occurrence:r}=t.footnotes.cite(e.identifier),{ref:i,def:a}=h(e.identifier,r);return`<sup class="squisq-footnote-ref"><a href="#${P(a)}" id="${P(i)}">${n}</a></sup>`}case`footnoteDefinition`:return``;case`subscript`:return`<sub>${j(e,t)}</sub>`;case`inlineCode`:return`<code>${N(e.value??``)}</code>`;case`code`:return`<pre class="squisq-code-block"><code${e.lang?` class="language-${P(e.lang)}"`:``}>${N(e.value??``)}</code></pre>`;case`blockquote`:return`<blockquote>${j(e,t)}</blockquote>`;case`list`:{let n=e.ordered?`ol`:`ul`;return`<${n}${e.ordered&&typeof e.start==`number`&&e.start!==1?` start="${e.start}"`:``}>${j(e,t)}</${n}>`}case`listItem`:return`<li>${j(e,t)}</li>`;case`link`:{let n=e.url??``,r=d(t?.links?.get(n)??n,`link`);return r?`<a href="${P(r)}">${j(e,t)}</a>`:j(e,t)}case`image`:{let n=e.url??``,r=d(t?.images?.get(n)??n,`media`);return r?`<img src="${P(r)}" alt="${P(e.alt??``)}" />`:N(e.alt??``)}case`thematicBreak`:return`<hr />`;case`table`:return ye(e,t);case`inlineIcon`:return`<i class="fa-${P(e.family??`solid`)} fa-${P(e.name??``)}" data-icon="${P(e.token??`${e.family}:${e.name}`)}" aria-hidden="true"></i>`;case`htmlBlock`:case`htmlInline`:return M(t)===`strip`?``:xe(be(e.htmlChildren,t),t);default:{let n=e;return Array.isArray(n.children)?j(e,t):typeof n.value==`string`?N(n.value):``}}}function j(e,t){return e.children?e.children.map(e=>A(e,t)).join(``):e.value?N(e.value):``}function ye(e,t){let[n,...r]=e.children,i=[`<table>`];if(n){i.push(`<thead><tr>`);for(let e of n.children)i.push(`<th>${j(e,t)}</th>`);i.push(`</tr></thead>`)}if(r.length>0){i.push(`<tbody>`);for(let e of r){i.push(`<tr>`);for(let n of e.children)i.push(`<td>${j(n,t)}</td>`);i.push(`</tr>`)}i.push(`</tbody>`)}return i.push(`</table>`),i.join(``)}function M(e){return e?.htmlPolicy??`sanitize`}function be(e,t){return!e||e.length===0?[]:M(t)===`trusted`?e:u(e)}function xe(e,t){if(!e||e.length===0)return``;let n=M(t)===`trusted`,r=[];for(let i of e){if(i.type===`htmlText`){r.push(n?i.value:N(i.value));continue}if(i.type===`htmlComment`){n&&r.push(`<!--${i.value}-->`);continue}let e=i.tagName.toLowerCase(),a={...i.attributes};if((e===`img`||e===`video`||e===`audio`||e===`source`)&&typeof a.src==`string`&&(a.src=t?.images?.get(a.src)??a.src),(e===`video`||e===`audio`)&&typeof a.poster==`string`&&(a.poster=t?.images?.get(a.poster)??a.poster),!n){if(typeof a.src==`string`){let e=d(a.src,`media`);e?a.src=e:delete a.src}if(typeof a.poster==`string`){let e=d(a.poster,`media`);e?a.poster=e:delete a.poster}if(typeof a.href==`string`){let e=d(a.href,`link`);e?a.href=e:delete a.href}}let o=Object.entries(a).map(([e,t])=>` ${e}="${P(t)}"`).join(``);i.selfClosing?r.push(`<${e}${o} />`):r.push(`<${e}${o}>${xe(i.children,t)}</${e}>`)}return r.join(``)}function N(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function P(e){return N(e).replace(/"/g,`&quot;`)}async function Se(e){let{entryPath:t,readDocument:n,readBinary:r,title:i,theme:a,themeId:o,themeRegistry:s,maxDepth:c=1/0,entryAsIndex:l=!1}=e,u=L(t);if(!u)throw Error(`markdownDocsToPlainHtmlBundle: entryPath is required`);let d=I(u),p=l?d?`${d}/index.html`:`index.html`:u.slice(0,-3)+`.html`,m=e=>e===u?p:e.slice(0,-3)+`.html`,h=new b.default,g=new Set,_=[{path:u,depth:0}];for(;_.length>0;){let{path:e,depth:t}=_.shift();if(g.has(e))continue;g.add(e);let l=await n(e);if(l===null)throw Error(`markdownDocsToPlainHtmlBundle: failed to read "${e}"`);let u=f(l),p=I(e),v=new Map;for(let e of F(u)){let n=Ee(e);if(!n)continue;let i=R(p,n.path);if(i===null||!Oe(i,d))continue;if(we(i)){let e=await r(i),t=e?ke(i):null;e&&t&&h.file(t,e);continue}if(!i.toLowerCase().endsWith(`.md`))continue;let a=z(p,m(i))+n.fragment;v.set(e,a),t+1<=c&&!g.has(i)&&_.push({path:i,depth:t+1})}let y=await De(u,p,r);for(let[,{data:e,zipPath:t}]of y){let n=ke(t);n&&h.file(n,e)}let b=new Map;for(let[e,{zipPath:t}]of y)b.set(e,z(p,t));let x=re(u,{title:(t===0?i:void 0)??Ae(e,u),images:b,links:v,theme:a,themeId:o,themeRegistry:s}),S=m(e);h.file(S,x)}return h.generateAsync({type:`blob`,compression:`DEFLATE`,compressionOptions:{level:6}})}var Ce=/\.(csv|tsv|xlsx|parquet)$/i;function we(e){return Ce.test(e)}function F(e){let t=new Set;function n(e){for(let r of e)if(r.type===`htmlElement`){if(r.tagName.toLowerCase()===`a`){let e=r.attributes.href;typeof e==`string`&&e&&t.add(e)}n(r.children)}}function r(e){if(!e||typeof e!=`object`)return;let i=e;if(i.type===`link`&&typeof i.url==`string`&&i.url&&t.add(i.url),(i.type===`htmlBlock`||i.type===`htmlInline`)&&Array.isArray(i.htmlChildren)&&n(i.htmlChildren),Array.isArray(i.children))for(let e of i.children)r(e)}for(let t of e.children)r(t);return t}function Te(e){let t=new Set;function n(e){for(let r of e){if(r.type!==`htmlElement`)continue;let e=r.tagName.toLowerCase();if(e===`img`||e===`video`||e===`audio`||e===`source`){let e=r.attributes.src;typeof e==`string`&&e&&t.add(e)}if(e===`video`||e===`audio`){let e=r.attributes.poster;typeof e==`string`&&e&&t.add(e)}n(r.children)}}function r(e){if(!e||typeof e!=`object`)return;let i=e;if(i.type===`image`&&typeof i.url==`string`&&i.url&&t.add(i.url),(i.type===`htmlBlock`||i.type===`htmlInline`)&&Array.isArray(i.htmlChildren)&&n(i.htmlChildren),Array.isArray(i.children))for(let e of i.children)r(e)}for(let t of e.children)r(t);return t}function Ee(e){if(!e||e.startsWith(`#`)||/^[a-z][a-z0-9+.-]*:/.test(e)||e.startsWith(`//`)||e.startsWith(`/`))return null;let t=e.indexOf(`#`),n=e.indexOf(`?`),r=t>=0&&n>=0?Math.min(t,n):t>=0?t:n;return{path:r>=0?e.slice(0,r):e,fragment:t>=0?e.slice(t):``}}async function De(e,t,n){let r=new Map;for(let i of Te(e)){if(/^[a-z][a-z0-9+.-]*:/.test(i)||i.startsWith(`//`))continue;let e=R(t,i.replace(/[#?].*$/,``));if(e===null)continue;let a=await n(e);a&&r.set(i,{data:a,zipPath:e})}return r}function I(e){let t=e.lastIndexOf(`/`);return t<0?``:e.slice(0,t)}function L(e){let t=e.split(`/`),n=[];for(let e of t)if(!(e===``||e===`.`)){if(e===`..`){if(n.length===0)return null;n.pop();continue}n.push(e)}return n.join(`/`)}function R(e,t){return t.startsWith(`/`)?null:L(e?`${e}/${t}`:t)}function Oe(e,t){return!t||e===t||e.startsWith(t+`/`)}function z(e,t){let n=e?e.split(`/`):[],r=t.split(`/`),i=0;for(;i<n.length&&i<r.length-1&&n[i]===r[i];)i++;let a=n.length-i,o=r.slice(i),s=Array(a).fill(`..`).join(`/`);return s?`${s}/${o.join(`/`)}`:o.join(`/`)}function ke(e){let t=e.replace(/\\/g,`/`).replace(/^\/+/,``);return!t||t.split(`/`).some(e=>e===`..`)?null:t}function Ae(e,t){return a(t)||(e.split(`/`).pop()??e).replace(/\.md$/i,``)}async function je(e){let{entryPath:t,readDocument:n,readBinary:i,playerScript:a,title:o,themeId:s,themeRegistry:c,mode:l=`static`,showCodeCopyButton:u=!1,maxDepth:d=1/0,entryAsIndex:p=!1}=e,m=L(t);if(!m)throw Error(`markdownDocsToHtmlBundle: entryPath is required`);let h=I(m),g=p?h?`${h}/index.html`:`index.html`:m.slice(0,-3)+`.html`,_=e=>e===m?g:e.slice(0,-3)+`.html`,v=new b.default;v.file(`squisq-player.js`,a);let y=new Set,x=[{path:m,depth:0}];for(;x.length>0;){let{path:e,depth:t}=x.shift();if(y.has(e))continue;y.add(e);let a=await n(e);if(a===null)throw Error(`markdownDocsToHtmlBundle: failed to read "${e}"`);let p=f(a),m=I(e),g=new Map;for(let e of F(p)){let n=Pe(e);if(!n)continue;let r=R(m,n.path);if(r===null||!Oe(r,h))continue;if(we(r)){let e=await i(r),t=e?B(r):null;e&&t&&v.file(t,e);continue}if(!r.toLowerCase().endsWith(`.md`))continue;let a=z(m,_(r))+n.fragment;g.set(e,a),t+1<=d&&!y.has(r)&&x.push({path:r,depth:t+1})}let b=new Map;for(let e of Fe(p)){if(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`))continue;let t=R(m,e.replace(/[#?].*$/,``));if(t===null)continue;let n=await i(t);if(!n)continue;let r=B(t);r&&(v.file(r,n),b.set(e,z(m,t)))}let S=r(p);g.size>0&&(S=Me(S,g));let C=t===0?o??V(e,p):V(e,p),w=_(e),T=z(m,`squisq-player.js`),ee=E(S,{playerScriptPath:T,imagePathMap:b.size>0?Object.fromEntries(b.entries()):void 0,mode:l,showCodeCopyButton:u,title:C,themeId:s,themeRegistry:c});v.file(w,ee)}return v.generateAsync({type:`blob`,compression:`DEFLATE`,compressionOptions:{level:6}})}function Me(e,t){if(t.size===0)return e;function n(e){return e.map(e=>{if(e.type!==`htmlElement`)return e;let r=e.tagName.toLowerCase()===`a`&&typeof e.attributes.href==`string`&&t.has(e.attributes.href)?{...e.attributes,href:t.get(e.attributes.href)}:e.attributes;return{...e,attributes:r,children:n(e.children)}})}function r(e){if(e.type===`link`){let n=t.get(e.url)??e.url;return{...e,url:n,children:e.children.map(r)}}if(e.type===`htmlInline`){let t=e;return Array.isArray(t.htmlChildren)?{...e,htmlChildren:n(t.htmlChildren)}:e}if(`children`in e&&Array.isArray(e.children)){let t=e.children.map(r);return{...e,children:t}}return e}function i(e){if(e.type===`htmlBlock`){let t=e;return Array.isArray(t.htmlChildren)?{...e,htmlChildren:n(t.htmlChildren)}:e}if(`children`in e&&Array.isArray(e.children)){let t=e.children.map(e=>{let t=e;return t&&typeof t==`object`&&`type`in t?Ne(t.type)?i(e):r(e):e});return{...e,children:t}}return e}function a(e){let t={...e};return Array.isArray(e.contents)&&(t.contents=e.contents.map(i)),Array.isArray(e.children)&&(t.children=e.children.map(a)),t}return{...e,blocks:e.blocks.map(a)}}function Ne(e){return e===`paragraph`||e===`heading`||e===`list`||e===`listItem`||e===`blockquote`||e===`code`||e===`thematicBreak`||e===`table`||e===`tableRow`||e===`tableCell`||e===`htmlBlock`}function Pe(e){if(!e||e.startsWith(`#`)||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`)||e.startsWith(`/`))return null;let t=e.indexOf(`#`),n=e.indexOf(`?`),r=t>=0&&n>=0?Math.min(t,n):t>=0?t:n;return{path:r>=0?e.slice(0,r):e,fragment:t>=0?e.slice(t):``}}function Fe(e){let t=new Set;function n(e){for(let r of e)if(r.type===`htmlElement`){if(r.tagName.toLowerCase()===`img`){let e=r.attributes.src;typeof e==`string`&&e&&t.add(e)}n(r.children)}}function r(e){if(!e||typeof e!=`object`)return;let i=e;if(i.type===`image`&&typeof i.url==`string`&&i.url&&t.add(i.url),(i.type===`htmlBlock`||i.type===`htmlInline`)&&Array.isArray(i.htmlChildren)&&n(i.htmlChildren),Array.isArray(i.children))for(let e of i.children)r(e)}for(let t of e.children)r(t);return t}function B(e){let t=e.replace(/\\/g,`/`).replace(/^\/+/,``);return!t||t.split(`/`).some(e=>e===`..`)?null:t}function V(e,t){return a(t)||(e.split(`/`).pop()??e).replace(/\.md$/i,``)}var Ie=/[ \t\r\n]+$/,Le=/[ \t\r\n]+/,Re=/[\ufe0e\ufe0f]/gu,ze=/^[ \t\r\n\u2191\u21a9\u21b5^]+$/u,Be=/^[ \t[(]*(?:[0-9]{1,4}|[a-z]|[*†‡])[ \t\])]*$/i;function H(e){return e.type===`htmlElement`}function U(e,t){return e.attributes[t]}function W(e){return(U(e,`class`)??``).split(Le).filter(Boolean)}function Ve(e){if(U(e,`data-footnotes`)!==void 0||U(e,`epub:type`)?.includes(`footnotes`))return!0;let t=e.tagName.toLowerCase();return t!==`section`&&t!==`aside`&&t!==`div`&&t!==`ol`?!1:W(e).some(e=>e===`footnotes`||e===`footnote-list`||e===`squisq-footnotes`)}function G(e){return e.type===`htmlText`?e.value:H(e)?e.children.map(G).join(``):``}function He(e){return e.tagName.toLowerCase()===`a`?U(e,`data-footnote-backref`)!==void 0||W(e).some(e=>e.includes(`backref`)||e===`footnote-back`)?!0:ze.test(G(e).replace(Re,``)):!1}function K(e,t){for(let n of e){if(!H(n))continue;if(t(n))return n;let e=K(n.children,t);if(e)return e}return null}function Ue(e){let t=[];for(let n of e){if(H(n)){if(He(n))continue;t.push({...n,children:Ue(n.children)});continue}t.push(n)}return t}function q(e,t){let n=[];for(let r of e)if(r!==t){if(H(r)){n.push({...r,children:q(r.children,t)});continue}n.push(r)}return n}function We(e){let t=[...e];for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.type===`htmlText`){let r=n.value.replace(Ie,``);if(r===``){t.pop();continue}t[e]={...n,value:r};break}H(n)&&(t[e]={...n,children:We(n.children)});break}return t}function Ge(e){let t=new Map,n=e=>{for(let r of e){if(!H(r))continue;let e=U(r,`id`);if(r.tagName.toLowerCase()===`li`&&e){t.set(e,We(Ue(r.children)));continue}n(r.children)}};return n(e.children),t}function Ke(e,t){let n=e.replace(/^user-content-/,``).replace(/^fn[-_:]?/i,``).replace(/^footnote[-_:]?/i,``);return n===``||t.has(n)?e:n}function qe(e){let t=K(e,Ve);if(!t)return{nodes:e,bodies:new Map};let n=Ge(t);if(n.size===0)return{nodes:e,bodies:new Map};let r=new Map,i=new Map,a=new Set;for(let[e,t]of n){let n=Ke(e,a);a.add(n),i.set(e,n),r.set(n,t)}return{nodes:q(e,t),bodies:r,identifiers:i}}function Je(e){return e.map(e=>`value`in e&&typeof e.value==`string`?e.value:`children`in e&&Array.isArray(e.children)?Je(e.children):``).join(``)}function Ye(e){switch(e.type){case`paragraph`:case`heading`:case`blockquote`:case`list`:case`listItem`:case`table`:case`tableRow`:case`tableCell`:case`code`:case`footnoteDefinition`:return!0;default:return!1}}function Xe(e,t){let n=(e,r)=>{for(let i=0;i<e.length;i++){let a=e[i];if(a.type===`link`){let n=a.url.startsWith(`#`)?a.url.slice(1):null,o=n?t.get(n):void 0;o&&(r||Be.test(Je(a.children)))&&(e[i]={type:`footnoteReference`,identifier:o});continue}if(a.type===`superscript`){n(a.children,!0);let t=a.children.length===1?a.children[0]:null;t?.type===`footnoteReference`&&(e[i]=t);continue}`children`in a&&Array.isArray(a.children)&&n(a.children,r)}},r=e=>{for(let t of e){if(!(`children`in t)||!Array.isArray(t.children))continue;let e=t.children;e.length>0&&e.every(Ye)?r(e):n(e,!1)}};r(e)}function Ze(e){return[...e.entries()].map(([e,t])=>({type:`footnoteDefinition`,identifier:e,children:t}))}var Qe={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},$e=new Set([`div`,`section`,`article`,`header`,`footer`,`main`,`aside`,`nav`,`figure`,`figcaption`,`form`,`fieldset`,`body`,`html`,`center`]),et=new Set([`script`,`style`,`head`,`title`,`noscript`,`template`,`svg`]),tt=new Set([`strong`,`b`]),nt=new Set([`em`,`i`]),rt=new Set([`del`,`s`,`strike`]),it=new Set([`sup`]),at=new Set([`sub`]),ot=new Set([`span`,`font`,`abbr`,`mark`,`small`,`u`]),J=e=>e.type===`htmlElement`,Y=e=>e.type===`htmlText`,st=e=>e.replace(/\s+/g,` `);function X(e){let t=[];for(let n of e){if(Y(n)){let e=st(n.value);e&&t.push({type:`text`,value:e});continue}if(!J(n))continue;let e=n.tagName.toLowerCase();if(!et.has(e))if(e===`br`)t.push({type:`break`});else if(tt.has(e))t.push({type:`strong`,children:X(n.children)});else if(nt.has(e))t.push({type:`emphasis`,children:X(n.children)});else if(rt.has(e))t.push({type:`delete`,children:X(n.children)});else if(it.has(e))t.push({type:`superscript`,children:X(n.children)});else if(at.has(e))t.push({type:`subscript`,children:X(n.children)});else if(e===`code`||e===`kbd`||e===`samp`||e===`tt`)t.push({type:`inlineCode`,value:Z(n)});else if(e===`a`){let e=n.attributes.href??``,r=X(n.children);t.push({type:`link`,url:e,children:r.length>0?r:[{type:`text`,value:e}]})}else if(e===`img`){let e=n.attributes.src??``,r=n.attributes.alt;e&&t.push({type:`image`,url:e,...r?{alt:r}:{}})}else t.push(...X(n.children))}return t}function Z(e){return Y(e)?e.value:J(e)?e.children.map(Z).join(``):``}var ct=e=>e.every(e=>e.type===`text`&&e.value.trim()===``);function Q(e){let t=[],n=[],r=()=>{if(n.length===0)return;let e=X(n);n=[],e.length>0&&!ct(e)&&t.push({type:`paragraph`,children:e})};for(let i of e){if(Y(i)){n.push(i);continue}if(!J(i))continue;let e=i.tagName.toLowerCase();if(et.has(e))continue;let a=lt(i,e);a===`inline`?n.push(i):a&&(r(),t.push(...a))}return r(),t}function lt(e,t){if(t in Qe){let n=X(e.children);return[{type:`heading`,depth:Qe[t],children:n}]}if(t===`p`){let t=X(e.children);return t.length>0&&!ct(t)?[{type:`paragraph`,children:t}]:[]}if(t===`br`)return`inline`;if(t===`hr`)return[{type:`thematicBreak`}];if(t===`blockquote`)return[{type:`blockquote`,children:Q(e.children)}];if(t===`pre`)return[{type:`code`,value:ft(Z(e))}];if(t===`ul`||t===`ol`)return[ut(e,t===`ol`)];if(t===`table`){let t=dt(e);return t?[t]:[]}return $e.has(t)?Q(e.children):tt.has(t)||nt.has(t)||rt.has(t)||ot.has(t)||t===`a`||t===`img`||t===`code`||t===`kbd`||t===`samp`?`inline`:Q(e.children)}function ut(e,t){let n=[];for(let t of e.children)if(J(t)&&t.tagName.toLowerCase()===`li`){let e=Q(t.children);n.push({type:`listItem`,children:e})}let r=e.attributes.start,i=t&&r?Number.parseInt(r,10):void 0;return{type:`list`,ordered:t,...i!==void 0&&Number.isFinite(i)?{start:i}:{},children:n}}function dt(e){let t=[],n=e=>{for(let r of e.children){if(!J(r))continue;let e=r.tagName.toLowerCase();if(e===`tr`){let e=[];for(let t of r.children)J(t)&&(t.tagName.toLowerCase()===`td`||t.tagName.toLowerCase()===`th`)&&e.push({type:`tableCell`,children:X(t.children)});e.length>0&&t.push({type:`tableRow`,children:e})}else(e===`thead`||e===`tbody`||e===`tfoot`)&&n(r)}};return n(e),t.length===0?null:{type:`table`,children:t}}var ft=e=>e.replace(/\n+$/,``);function pt(e){if(typeof e==`string`)return e;let t=e instanceof Uint8Array?e:new Uint8Array(e);return new TextDecoder(`utf-8`).decode(t)}function mt(e){for(let t of e){if(!J(t))continue;if(t.tagName.toLowerCase()===`script`&&`data-squisq-doc`in t.attributes)return t;let e=mt(t.children);if(e)return e}}function ht(e){let t=e.attributes[`data-squisq-doc`];if(t!==`1`)throw Error(`Unsupported embedded Squisq Doc version "${t||`(missing)`}"`);let n;try{n=JSON.parse(Z(e))}catch{throw SyntaxError(`Invalid embedded Squisq Doc JSON`)}if(typeof n!=`object`||!n||typeof n.articleId!=`string`||!Number.isFinite(n.duration)||!Array.isArray(n.blocks)||n.audio===null||typeof n.audio!=`object`)throw TypeError(`Embedded Squisq Doc has an invalid shape`);return n}function $(e,t={}){t.signal?.throwIfAborted();let n=t.maxInputChars??16*1024*1024;if(!Number.isSafeInteger(n)||n<0)throw RangeError(`maxInputChars must be a non-negative safe integer`);if(e.length>n)throw RangeError(`HTML exceeds the ${n}-character safety limit`);let r=s(e),a=mt(r);if(a)return i(ht(a));let{nodes:o,bodies:c,identifiers:l}=qe(r),d=e=>t.sanitize===!1?e:u(e),f=Q(d(o));if(c.size>0){Xe(f,l??new Map);let e=new Map;for(let[t,n]of c)e.set(t,Q(d(n)));f.push(...Ze(e))}return{type:`document`,children:f}}async function gt(e,t={}){return $(pt(e),t)}function _t(e,t={}){return p($(e,t),{signal:t.signal})}function vt(e){let t=e.replace(/\\/g,`/`).replace(/^\/+/,``);return!t||t.split(`/`).some(e=>e===`..`)?null:t}function yt(e,t){if(!t.has(e))return e;let n=e.lastIndexOf(`.`),r=n>0?e.slice(0,n):e,i=n>0?e.slice(n):``,a=2;for(;t.has(`${r}-${a}${i}`);)a++;return`${r}-${a}${i}`}function bt(e,t){return t.signal?.throwIfAborted(),te(e,t)}async function xt(e,t){t.signal?.throwIfAborted();let{playerScript:n,images:r,audio:i,mode:a=`slideshow`,title:o,autoPlay:s,showCodeCopyButton:c,themeId:l,themeRegistry:u}=t,d=new b.default;d.file(`squisq-player.js`,n);let f={};if(r){let e=0;for(let[n,i]of r.entries()){e++&63||t.signal?.throwIfAborted();let r=vt(n);if(!r){console.warn(`[squisq] docToHtmlZip: skipped image with unsafe path "${n}" \u2014 the exported document will have a broken reference to it.`);continue}d.file(r,i),f[n]=r}}let p={};if(i){let e=0,n=new Set;for(let[r,a]of i.entries()){e++&63||t.signal?.throwIfAborted();let i=_(r),o=yt(i.includes(`.`)?i:`${i}.mp3`,n);n.add(o);let s=`audio/${o}`;d.file(s,a),p[r]=s}}let m=E(e,{playerScriptPath:`squisq-player.js`,imagePathMap:Object.keys(f).length>0?f:void 0,audioPathMap:Object.keys(p).length>0?p:void 0,mode:a,title:o,autoPlay:s,showCodeCopyButton:c,themeId:l,themeRegistry:u});return d.file(`index.html`,m),d.generateAsync({type:`blob`,compression:`DEFLATE`,compressionOptions:{level:6}})}var St=t({arrayBufferToBase64DataUrl:()=>y,collectImagePaths:()=>x,collectLinkRefs:()=>F,docToHtml:()=>bt,docToHtmlZip:()=>xt,extractFilename:()=>_,generateExternalHtml:()=>E,htmlToMarkdown:()=>_t,htmlToMarkdownDoc:()=>gt,htmlToMarkdownDocSync:()=>$,inferMimeType:()=>v,markdownDocToPlainHtml:()=>re,markdownDocsToHtmlBundle:()=>je,markdownDocsToPlainHtmlBundle:()=>Se});export{x as n,E as r,St as t};
@@ -0,0 +1 @@
1
+ import"./chunk-UBFT2CDQ-FexGDigd.js";import"./chunk-7ZAAICW4-BsCpYJH6.js";
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-B7GEAZBI-Divd2h1k.js";export{e as extToMime};