@afbin/cli 0.4.1 → 0.4.2

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 (468) hide show
  1. package/README.md +5 -0
  2. package/dist/afbin.mjs +33 -12
  3. package/dist/index.mjs +11 -1
  4. package/dist/runtime/dist/web/.vite/manifest.json +216 -216
  5. package/dist/runtime/dist/web/assets/{Account-CvOF6jpD.js → Account-qnxwLep7.js} +1 -1
  6. package/dist/runtime/dist/web/assets/Account-qnxwLep7.js.br +0 -0
  7. package/dist/runtime/dist/web/assets/Account-qnxwLep7.js.gz +0 -0
  8. package/dist/runtime/dist/web/assets/{ArtifactAddress-DORDne01.js → ArtifactAddress-1ftOG9A5.js} +2 -2
  9. package/dist/runtime/dist/web/assets/ArtifactAddress-1ftOG9A5.js.br +0 -0
  10. package/dist/runtime/dist/web/assets/ArtifactAddress-1ftOG9A5.js.gz +0 -0
  11. package/dist/runtime/dist/web/assets/{ArtifactData-BdL9R2dA.js → ArtifactData-CZq-MLWc.js} +1 -1
  12. package/dist/runtime/dist/web/assets/ArtifactData-CZq-MLWc.js.br +0 -0
  13. package/dist/runtime/dist/web/assets/ArtifactData-CZq-MLWc.js.gz +0 -0
  14. package/dist/runtime/dist/web/assets/{ArtifactEditor-BZXbOk_F.js → ArtifactEditor-Cd_-Z6DK.js} +1 -1
  15. package/dist/runtime/dist/web/assets/ArtifactEditor-Cd_-Z6DK.js.br +0 -0
  16. package/dist/runtime/dist/web/assets/ArtifactEditor-Cd_-Z6DK.js.gz +0 -0
  17. package/dist/runtime/dist/web/assets/{AssetPageHeader-DX2RcYTv.js → AssetPageHeader-BqdRtu9K.js} +1 -1
  18. package/dist/runtime/dist/web/assets/AssetPageHeader-BqdRtu9K.js.br +0 -0
  19. package/dist/runtime/dist/web/assets/AssetPageHeader-BqdRtu9K.js.gz +0 -0
  20. package/dist/runtime/dist/web/assets/{Assets-dgdXIgAW.js → Assets-D6htDZnu.js} +1 -1
  21. package/dist/runtime/dist/web/assets/Assets-D6htDZnu.js.br +0 -0
  22. package/dist/runtime/dist/web/assets/Assets-D6htDZnu.js.gz +0 -0
  23. package/dist/runtime/dist/web/assets/{AvatarCircle-MNnIhRvg.js → AvatarCircle-CBpOuCGy.js} +1 -1
  24. package/dist/runtime/dist/web/assets/AvatarCircle-CBpOuCGy.js.br +0 -0
  25. package/dist/runtime/dist/web/assets/AvatarCircle-CBpOuCGy.js.gz +0 -0
  26. package/dist/runtime/dist/web/assets/{Chat-V1ku1-60.js → Chat-DueKnMAf.js} +1 -1
  27. package/dist/runtime/dist/web/assets/Chat-DueKnMAf.js.br +0 -0
  28. package/dist/runtime/dist/web/assets/Chat-DueKnMAf.js.gz +0 -0
  29. package/dist/runtime/dist/web/assets/{ConfirmDialog-Ph1VDgNN.js → ConfirmDialog-hdkXS1mg.js} +1 -1
  30. package/dist/runtime/dist/web/assets/ConfirmDialog-hdkXS1mg.js.br +0 -0
  31. package/dist/runtime/dist/web/assets/ConfirmDialog-hdkXS1mg.js.gz +0 -0
  32. package/dist/runtime/dist/web/assets/{DatasetCatalogView-DBJEPKFI.js → DatasetCatalogView-DKNdjYA_.js} +1 -1
  33. package/dist/runtime/dist/web/assets/DatasetCatalogView-DKNdjYA_.js.br +0 -0
  34. package/dist/runtime/dist/web/assets/DatasetCatalogView-DKNdjYA_.js.gz +0 -0
  35. package/dist/runtime/dist/web/assets/{DatasetEditor-CMqN1duq.js → DatasetEditor-C22-4oJL.js} +1 -1
  36. package/dist/runtime/dist/web/assets/DatasetEditor-C22-4oJL.js.br +0 -0
  37. package/dist/runtime/dist/web/assets/DatasetEditor-C22-4oJL.js.gz +0 -0
  38. package/dist/runtime/dist/web/assets/{Docs-DVoW7b7v.js → Docs-B80IZLN8.js} +1 -1
  39. package/dist/runtime/dist/web/assets/Docs-B80IZLN8.js.br +0 -0
  40. package/dist/runtime/dist/web/assets/Docs-B80IZLN8.js.gz +0 -0
  41. package/dist/runtime/dist/web/assets/{Document-udhy5mlX.js → Document-C6-E9V3_.js} +4 -4
  42. package/dist/runtime/dist/web/assets/Document-C6-E9V3_.js.br +0 -0
  43. package/dist/runtime/dist/web/assets/Document-C6-E9V3_.js.gz +0 -0
  44. package/dist/runtime/dist/web/assets/{DocumentChrome-EUbW_JvA.js → DocumentChrome-Bw4_z5yQ.js} +1 -1
  45. package/dist/runtime/dist/web/assets/DocumentChrome-Bw4_z5yQ.js.br +0 -0
  46. package/dist/runtime/dist/web/assets/DocumentChrome-Bw4_z5yQ.js.gz +0 -0
  47. package/dist/runtime/dist/web/assets/{DocumentSharing-BuTXuflA.js → DocumentSharing-BiTakFtn.js} +1 -1
  48. package/dist/runtime/dist/web/assets/DocumentSharing-BiTakFtn.js.br +0 -0
  49. package/dist/runtime/dist/web/assets/DocumentSharing-BiTakFtn.js.gz +0 -0
  50. package/dist/runtime/dist/web/assets/{FileUpload-D6RTOrHD.js → FileUpload-B-da-wki.js} +1 -1
  51. package/dist/runtime/dist/web/assets/FileUpload-B-da-wki.js.br +0 -0
  52. package/dist/runtime/dist/web/assets/FileUpload-B-da-wki.js.gz +0 -0
  53. package/dist/runtime/dist/web/assets/{Folder-DoNsFB2I.js → Folder-B-OlCz39.js} +1 -1
  54. package/dist/runtime/dist/web/assets/Folder-B-OlCz39.js.br +0 -0
  55. package/dist/runtime/dist/web/assets/Folder-B-OlCz39.js.gz +0 -0
  56. package/dist/runtime/dist/web/assets/{ForkArtifact-DDmXl1BZ.js → ForkArtifact-DXYU1-qL.js} +1 -1
  57. package/dist/runtime/dist/web/assets/ForkArtifact-DXYU1-qL.js.br +0 -0
  58. package/dist/runtime/dist/web/assets/ForkArtifact-DXYU1-qL.js.gz +0 -0
  59. package/dist/runtime/dist/web/assets/{GetStarted-YjltMEeN.js → GetStarted-CFsSvXR0.js} +1 -1
  60. package/dist/runtime/dist/web/assets/GetStarted-CFsSvXR0.js.br +0 -0
  61. package/dist/runtime/dist/web/assets/GetStarted-CFsSvXR0.js.gz +0 -0
  62. package/dist/runtime/dist/web/assets/{Home-DijnltFZ.js → Home-BSO7YYXA.js} +1 -1
  63. package/dist/runtime/dist/web/assets/Home-BSO7YYXA.js.br +0 -0
  64. package/dist/runtime/dist/web/assets/Home-BSO7YYXA.js.gz +0 -0
  65. package/dist/runtime/dist/web/assets/{Login-DLwn4aUr.js → Login-CszZ8VGu.js} +1 -1
  66. package/dist/runtime/dist/web/assets/Login-CszZ8VGu.js.br +0 -0
  67. package/dist/runtime/dist/web/assets/Login-CszZ8VGu.js.gz +0 -0
  68. package/dist/runtime/dist/web/assets/{NotFound-svz4wCeL.js → NotFound-D2MOGkIO.js} +1 -1
  69. package/dist/runtime/dist/web/assets/NotFound-D2MOGkIO.js.br +0 -0
  70. package/dist/runtime/dist/web/assets/NotFound-D2MOGkIO.js.gz +0 -0
  71. package/dist/runtime/dist/web/assets/{Notifications-BGeJKv2W.js → Notifications-M7BiDhSo.js} +1 -1
  72. package/dist/runtime/dist/web/assets/Notifications-M7BiDhSo.js.br +0 -0
  73. package/dist/runtime/dist/web/assets/Notifications-M7BiDhSo.js.gz +0 -0
  74. package/dist/runtime/dist/web/assets/{Profile-B38GeCbR.js → Profile-DqV5PMEi.js} +2 -2
  75. package/dist/runtime/dist/web/assets/Profile-DqV5PMEi.js.br +0 -0
  76. package/dist/runtime/dist/web/assets/Profile-DqV5PMEi.js.gz +0 -0
  77. package/dist/runtime/dist/web/assets/{Program-D3-Gfvjo.js → Program-CdwfK2zE.js} +1 -1
  78. package/dist/runtime/dist/web/assets/Program-CdwfK2zE.js.br +0 -0
  79. package/dist/runtime/dist/web/assets/Program-CdwfK2zE.js.gz +0 -0
  80. package/dist/runtime/dist/web/assets/{RowMenu-J4Gbci3B.js → RowMenu-B2c9LyOb.js} +1 -1
  81. package/dist/runtime/dist/web/assets/RowMenu-B2c9LyOb.js.br +0 -0
  82. package/dist/runtime/dist/web/assets/RowMenu-B2c9LyOb.js.gz +0 -0
  83. package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js +1 -0
  84. package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js.br +0 -0
  85. package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js.gz +0 -0
  86. package/dist/runtime/dist/web/assets/{ScreenshotEditor-CUmN5F2q.js → ScreenshotEditor-B8g3LiBx.js} +1 -1
  87. package/dist/runtime/dist/web/assets/ScreenshotEditor-B8g3LiBx.js.br +0 -0
  88. package/dist/runtime/dist/web/assets/ScreenshotEditor-B8g3LiBx.js.gz +0 -0
  89. package/dist/runtime/dist/web/assets/{ShareLink-n8KhtnaI.js → ShareLink-qbYss_Eh.js} +1 -1
  90. package/dist/runtime/dist/web/assets/ShareLink-qbYss_Eh.js.br +0 -0
  91. package/dist/runtime/dist/web/assets/ShareLink-qbYss_Eh.js.gz +0 -0
  92. package/dist/runtime/dist/web/assets/{Shelf-BgwHOaeW.js → Shelf-anhc5No9.js} +1 -1
  93. package/dist/runtime/dist/web/assets/Shelf-anhc5No9.js.br +0 -0
  94. package/dist/runtime/dist/web/assets/Shelf-anhc5No9.js.gz +0 -0
  95. package/dist/runtime/dist/web/assets/{SocialPreviewEditor-DwHHRW29.js → SocialPreviewEditor-B4nUY6FA.js} +1 -1
  96. package/dist/runtime/dist/web/assets/SocialPreviewEditor-B4nUY6FA.js.br +0 -0
  97. package/dist/runtime/dist/web/assets/SocialPreviewEditor-B4nUY6FA.js.gz +0 -0
  98. package/dist/runtime/dist/web/assets/{Starter-I01MNooi.js → Starter-DrID859q.js} +1 -1
  99. package/dist/runtime/dist/web/assets/Starter-DrID859q.js.br +0 -0
  100. package/dist/runtime/dist/web/assets/Starter-DrID859q.js.gz +0 -0
  101. package/dist/runtime/dist/web/assets/{Trash-Cu0KXeW7.js → Trash-DoKID_ux.js} +1 -1
  102. package/dist/runtime/dist/web/assets/Trash-DoKID_ux.js.br +0 -0
  103. package/dist/runtime/dist/web/assets/Trash-DoKID_ux.js.gz +0 -0
  104. package/dist/runtime/dist/web/assets/{Welcome-B8iPt_Nh.js → Welcome-Ct29u9Y9.js} +1 -1
  105. package/dist/runtime/dist/web/assets/Welcome-Ct29u9Y9.js.br +0 -0
  106. package/dist/runtime/dist/web/assets/Welcome-Ct29u9Y9.js.gz +0 -0
  107. package/dist/runtime/dist/web/assets/{WorkspaceLayout-fF_ot7EK.js → WorkspaceLayout-Qf3x5yOM.js} +1 -1
  108. package/dist/runtime/dist/web/assets/WorkspaceLayout-Qf3x5yOM.js.br +0 -0
  109. package/dist/runtime/dist/web/assets/WorkspaceLayout-Qf3x5yOM.js.gz +0 -0
  110. package/dist/runtime/dist/web/assets/{browser-artifact-write-ZsGe-hXr.js → browser-artifact-write-CG72iseh.js} +1 -1
  111. package/dist/runtime/dist/web/assets/browser-artifact-write-CG72iseh.js.br +0 -0
  112. package/dist/runtime/dist/web/assets/browser-artifact-write-CG72iseh.js.gz +0 -0
  113. package/dist/runtime/dist/web/assets/{chevron-down-COGO5cmx.js → chevron-down-M1fHuk7u.js} +1 -1
  114. package/dist/runtime/dist/web/assets/{chevron-left-BJZiR3W-.js → chevron-left-NHmvDJpN.js} +1 -1
  115. package/dist/runtime/dist/web/assets/{copy-PNNAtmJH.js → copy-v5iTV3kk.js} +1 -1
  116. package/dist/runtime/dist/web/assets/copy-v5iTV3kk.js.br +0 -0
  117. package/dist/runtime/dist/web/assets/copy-v5iTV3kk.js.gz +0 -0
  118. package/dist/runtime/dist/web/assets/{database-CKOnpvwb.js → database-BbH2eTSj.js} +1 -1
  119. package/dist/runtime/dist/web/assets/database-BbH2eTSj.js.br +2 -0
  120. package/dist/runtime/dist/web/assets/database-BbH2eTSj.js.gz +0 -0
  121. package/dist/runtime/dist/web/assets/{document-update-client-DUF0zs2Z.js → document-update-client-td73lQ81.js} +1 -1
  122. package/dist/runtime/dist/web/assets/document-update-client-td73lQ81.js.br +0 -0
  123. package/dist/runtime/dist/web/assets/document-update-client-td73lQ81.js.gz +0 -0
  124. package/dist/runtime/dist/web/assets/{dom-mounter-64phOf1s.js → dom-mounter-BSxIt5bC.js} +1 -1
  125. package/dist/runtime/dist/web/assets/dom-mounter-BSxIt5bC.js.br +0 -0
  126. package/dist/runtime/dist/web/assets/dom-mounter-BSxIt5bC.js.gz +0 -0
  127. package/dist/runtime/dist/web/assets/{download-j-nqks7p.js → download-Dk3mxCBK.js} +1 -1
  128. package/dist/runtime/dist/web/assets/download-Dk3mxCBK.js.br +0 -0
  129. package/dist/runtime/dist/web/assets/download-Dk3mxCBK.js.gz +0 -0
  130. package/dist/runtime/dist/web/assets/{eye-BNpzRKAK.js → eye-DEiYMLrO.js} +1 -1
  131. package/dist/runtime/dist/web/assets/eye-DEiYMLrO.js.br +0 -0
  132. package/dist/runtime/dist/web/assets/eye-DEiYMLrO.js.gz +0 -0
  133. package/dist/runtime/dist/web/assets/{file-up-DH-HiKEX.js → file-up-GoLKOXxO.js} +1 -1
  134. package/dist/runtime/dist/web/assets/file-up-GoLKOXxO.js.br +1 -0
  135. package/dist/runtime/dist/web/assets/file-up-GoLKOXxO.js.gz +0 -0
  136. package/dist/runtime/dist/web/assets/{git-fork-PQOXxmWW.js → git-fork-CN41g1lF.js} +1 -1
  137. package/dist/runtime/dist/web/assets/git-fork-CN41g1lF.js.br +0 -0
  138. package/dist/runtime/dist/web/assets/git-fork-CN41g1lF.js.gz +0 -0
  139. package/dist/runtime/dist/web/assets/{http-C2exCIpl.js → http-DEdzW08u.js} +1 -1
  140. package/dist/runtime/dist/web/assets/http-DEdzW08u.js.br +0 -0
  141. package/dist/runtime/dist/web/assets/http-DEdzW08u.js.gz +0 -0
  142. package/dist/runtime/dist/web/assets/{list-Dj3WErnh.js → list-CA_o21oZ.js} +1 -1
  143. package/dist/runtime/dist/web/assets/list-CA_o21oZ.js.br +0 -0
  144. package/dist/runtime/dist/web/assets/list-CA_o21oZ.js.gz +0 -0
  145. package/dist/runtime/dist/web/assets/{loader-circle-BXxJOPx-.js → loader-circle-2p_rsu6P.js} +1 -1
  146. package/dist/runtime/dist/web/assets/{lock-B1nhk71f.js → lock-BRsIxNP2.js} +1 -1
  147. package/dist/runtime/dist/web/assets/lock-BRsIxNP2.js.br +0 -0
  148. package/dist/runtime/dist/web/assets/lock-BRsIxNP2.js.gz +0 -0
  149. package/dist/runtime/dist/web/assets/{person-mentions-BEjAedYZ.js → person-mentions-C7vQd7Vr.js} +1 -1
  150. package/dist/runtime/dist/web/assets/person-mentions-C7vQd7Vr.js.br +0 -0
  151. package/dist/runtime/dist/web/assets/person-mentions-C7vQd7Vr.js.gz +0 -0
  152. package/dist/runtime/dist/web/assets/{plus-BtWrAD8F.js → plus-BNzHjmEg.js} +1 -1
  153. package/dist/runtime/dist/web/assets/{rotate-ccw-CSJ78xUE.js → rotate-ccw-CIMUmeuJ.js} +1 -1
  154. package/dist/runtime/dist/web/assets/rotate-ccw-CIMUmeuJ.js.br +0 -0
  155. package/dist/runtime/dist/web/assets/rotate-ccw-CIMUmeuJ.js.gz +0 -0
  156. package/dist/runtime/dist/web/assets/{search-agWZofH1.js → search-CmIkt7xE.js} +1 -1
  157. package/dist/runtime/dist/web/assets/{session-D__Apnw9.js → session-BsshdoaV.js} +1 -1
  158. package/dist/runtime/dist/web/assets/session-BsshdoaV.js.br +0 -0
  159. package/dist/runtime/dist/web/assets/session-BsshdoaV.js.gz +0 -0
  160. package/dist/runtime/dist/web/assets/{shelf-CeaX4iBg.js → shelf-DUXW45ap.js} +1 -1
  161. package/dist/runtime/dist/web/assets/shelf-DUXW45ap.js.br +0 -0
  162. package/dist/runtime/dist/web/assets/shelf-DUXW45ap.js.gz +0 -0
  163. package/dist/runtime/dist/web/assets/{solid-app-BtmRR9Ax.js → solid-app-BNcsMwv4.js} +2 -2
  164. package/dist/runtime/dist/web/assets/solid-app-BNcsMwv4.js.br +0 -0
  165. package/dist/runtime/dist/web/assets/solid-app-BNcsMwv4.js.gz +0 -0
  166. package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css +2 -0
  167. package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css.br +0 -0
  168. package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css.gz +0 -0
  169. package/dist/runtime/dist/web/assets/{undo-2-Di8QrlfX.js → undo-2--XbU60MY.js} +1 -1
  170. package/dist/runtime/dist/web/assets/undo-2--XbU60MY.js.br +0 -0
  171. package/dist/runtime/dist/web/assets/undo-2--XbU60MY.js.gz +0 -0
  172. package/dist/runtime/dist/web/assets/{users-BJrdLUkX.js → users-Bm0xpNrq.js} +1 -1
  173. package/dist/runtime/dist/web/assets/users-Bm0xpNrq.js.br +0 -0
  174. package/dist/runtime/dist/web/assets/users-Bm0xpNrq.js.gz +0 -0
  175. package/dist/runtime/dist/web/solid-app.html +2 -2
  176. package/dist/runtime/draft-compile-worker.mjs +10 -0
  177. package/dist/runtime/host.mjs +12 -2
  178. package/dist/runtime/lambda-page-runtime.js +1 -1
  179. package/dist/runtime/lib/build-assets/.server-reader-cache.json +1 -1
  180. package/dist/runtime/lib/build-assets/offline/.build-cache.json +10 -7
  181. package/dist/runtime/lib/build-assets/offline/manifest.json +4 -4
  182. package/dist/runtime/lib/build-assets/offline/solid.js.gz +0 -0
  183. package/dist/runtime/lib/build-assets/prepared-sources.sha256 +1 -1
  184. package/dist/runtime/pool-worker.mjs +3 -0
  185. package/dist/runtime/preview/{ScreenshotEditor-R3UODF65.js → ScreenshotEditor-LHC3JZSA.js} +1 -1
  186. package/dist/runtime/preview/{annotate-U27XXRZK.js → annotate-THM7GL72.js} +1 -1
  187. package/dist/runtime/preview/chrome.css +1 -1
  188. package/dist/runtime/preview/{chunk-7RMKAFBO.js → chunk-4O7LVK2Q.js} +1 -1
  189. package/dist/runtime/preview/chunk-7T3V6PAW.js +1 -0
  190. package/dist/runtime/preview/{chunk-3KKU74WM.js → chunk-RDT3C3F6.js} +1 -1
  191. package/dist/runtime/preview/client.js +13 -13
  192. package/dist/runtime/preview/connect.js +1 -0
  193. package/dist/runtime/preview/{dom-mounter-3OQN7G4J.js → dom-mounter-2URPGP2F.js} +1 -1
  194. package/dist/runtime/preview/{engine-I6R47UTB.js → engine-5UO3LPN5.js} +1 -1
  195. package/dist/runtime/preview/{selection-actions-426G2H4N.js → selection-actions-LBFPODLD.js} +1 -1
  196. package/dist/runtime/preview/{session-UFN5GQK2.js → session-A2Z3M7QD.js} +1 -1
  197. package/dist/runtime/preview/update-parts-ZLXTYSVY.js +1 -0
  198. package/dist/runtime/preview.mjs +74496 -74135
  199. package/dist/runtime/public/chat/install.ps1 +1 -1
  200. package/dist/runtime/public/chat/install.sh +1 -1
  201. package/dist/runtime/public/chat/release.json +1 -1
  202. package/dist/runtime/public/islands/{boot-74e9143aa374c62b.js → boot-281adc05179334e6.js} +1 -1
  203. package/dist/runtime/public/islands/boot-281adc05179334e6.js.br +0 -0
  204. package/dist/runtime/public/islands/boot-281adc05179334e6.js.gz +0 -0
  205. package/dist/runtime/public/islands/{chunk-51a4b62dc42f3594.js → chunk-1af2f1c5f3e99805.js} +1 -1
  206. package/dist/runtime/public/islands/chunk-1af2f1c5f3e99805.js.br +0 -0
  207. package/dist/runtime/public/islands/chunk-1af2f1c5f3e99805.js.gz +0 -0
  208. package/dist/runtime/public/islands/{chunk-f451297257164687.js → chunk-2f5d885a7394f865.js} +1 -1
  209. package/dist/runtime/public/islands/chunk-2f5d885a7394f865.js.br +0 -0
  210. package/dist/runtime/public/islands/{chunk-f451297257164687.js.gz → chunk-2f5d885a7394f865.js.gz} +0 -0
  211. package/dist/runtime/public/islands/{chunk-68a083200dbd5bf7.js → chunk-3cb86bf7badbd2c3.js} +1 -1
  212. package/dist/runtime/public/islands/chunk-3cb86bf7badbd2c3.js.br +0 -0
  213. package/dist/runtime/public/islands/chunk-3cb86bf7badbd2c3.js.gz +0 -0
  214. package/dist/runtime/public/islands/{chunk-adcd632c8be50ba7.js → chunk-5e05b99cb275660b.js} +1 -1
  215. package/dist/runtime/public/islands/chunk-5e05b99cb275660b.js.br +0 -0
  216. package/dist/runtime/public/islands/{chunk-adcd632c8be50ba7.js.gz → chunk-5e05b99cb275660b.js.gz} +0 -0
  217. package/dist/runtime/public/islands/{chunk-e817ee4addba2d95.js → chunk-d924d4620b11b893.js} +1 -1
  218. package/dist/runtime/public/islands/chunk-d924d4620b11b893.js.br +0 -0
  219. package/dist/runtime/public/islands/chunk-d924d4620b11b893.js.gz +0 -0
  220. package/dist/runtime/public/islands/{chunk-1fa28532f51beb9c.js → chunk-dfe07cc2b19c50cc.js} +1 -1
  221. package/dist/runtime/public/islands/{frame-editor-6b8a50886fff8604.js → frame-editor-66b0c0d98283e912.js} +1 -1
  222. package/dist/runtime/public/islands/frame-editor-66b0c0d98283e912.js.br +0 -0
  223. package/dist/runtime/public/islands/frame-editor-66b0c0d98283e912.js.gz +0 -0
  224. package/dist/runtime/public/islands/{frame-editor-chunk-87b0311faf57261c.js → frame-editor-chunk-091e41cba1670be1.js} +1 -1
  225. package/dist/runtime/public/islands/frame-editor-chunk-091e41cba1670be1.js.br +0 -0
  226. package/dist/runtime/public/islands/frame-editor-chunk-091e41cba1670be1.js.gz +0 -0
  227. package/dist/runtime/public/islands/{frame-editor-chunk-69c553d9c4562981.js → frame-editor-chunk-5ea52db3a6d93294.js} +1 -1
  228. package/dist/runtime/public/islands/frame-editor-chunk-5ea52db3a6d93294.js.br +2 -0
  229. package/dist/runtime/public/islands/frame-editor-chunk-5ea52db3a6d93294.js.gz +0 -0
  230. package/dist/runtime/public/islands/{frame-editor-chunk-c2b9018371100824.js → frame-editor-chunk-a6db6db210776f5c.js} +1 -1
  231. package/dist/runtime/public/islands/frame-editor-chunk-a6db6db210776f5c.js.br +0 -0
  232. package/dist/runtime/public/islands/frame-editor-chunk-a6db6db210776f5c.js.gz +0 -0
  233. package/dist/runtime/public/islands/{frame-editor-chunk-a13dce46b9b8401f.js → frame-editor-chunk-c9facbfeee3c9bed.js} +1 -1
  234. package/dist/runtime/public/islands/frame-editor-chunk-c9facbfeee3c9bed.js.br +0 -0
  235. package/dist/runtime/public/islands/frame-editor-chunk-c9facbfeee3c9bed.js.gz +0 -0
  236. package/dist/runtime/public/islands/{frame-editor-chunk-b06f17fc7dae17e8.js → frame-editor-chunk-d6c77179f72db0ab.js} +1 -1
  237. package/dist/runtime/public/islands/frame-editor-chunk-d6c77179f72db0ab.js.br +0 -0
  238. package/dist/runtime/public/islands/frame-editor-chunk-d6c77179f72db0ab.js.gz +0 -0
  239. package/dist/runtime/public/islands/{image-map-a9f95f7e8d0712c1.js → image-map-7419ab54ff59434a.js} +1 -1
  240. package/dist/runtime/public/islands/image-map-7419ab54ff59434a.js.br +0 -0
  241. package/dist/runtime/public/islands/image-map-7419ab54ff59434a.js.gz +0 -0
  242. package/dist/runtime/public/islands/{kit-basic-cbabcc4b41d6132a.js → kit-basic-c22b54dcd2ea6161.js} +1 -1
  243. package/dist/runtime/public/islands/kit-basic-c22b54dcd2ea6161.js.br +2 -0
  244. package/dist/runtime/public/islands/kit-basic-c22b54dcd2ea6161.js.gz +0 -0
  245. package/dist/runtime/public/islands/{kit-cells-cefbceccdfd0dbe0.js → kit-cells-55ade213f1751716.js} +1 -1
  246. package/dist/runtime/public/islands/kit-cells-55ade213f1751716.js.br +0 -0
  247. package/dist/runtime/public/islands/kit-cells-55ade213f1751716.js.gz +0 -0
  248. package/dist/runtime/public/islands/{kit-controls-81d17a10f9d457f2.js → kit-controls-4f1b98d7d87c4b21.js} +1 -1
  249. package/dist/runtime/public/islands/kit-controls-4f1b98d7d87c4b21.js.br +0 -0
  250. package/dist/runtime/public/islands/kit-controls-4f1b98d7d87c4b21.js.gz +0 -0
  251. package/dist/runtime/public/islands/{kit-data-43947f36f1c501aa.js → kit-data-e1012fd12092b177.js} +1 -1
  252. package/dist/runtime/public/islands/kit-data-e1012fd12092b177.js.br +0 -0
  253. package/dist/runtime/public/islands/kit-data-e1012fd12092b177.js.gz +0 -0
  254. package/dist/runtime/public/islands/{kit-dialog-eedc51ce82feec4b.js → kit-dialog-1e427336472b2906.js} +1 -1
  255. package/dist/runtime/public/islands/kit-dialog-1e427336472b2906.js.br +0 -0
  256. package/dist/runtime/public/islands/kit-dialog-1e427336472b2906.js.gz +0 -0
  257. package/dist/runtime/public/islands/{kit-embed-3c8886cbfa06f74d.js → kit-embed-c7019820c5200806.js} +1 -1
  258. package/dist/runtime/public/islands/kit-embed-c7019820c5200806.js.br +0 -0
  259. package/dist/runtime/public/islands/kit-embed-c7019820c5200806.js.gz +0 -0
  260. package/dist/runtime/public/islands/{kit-files-b7a2cb758f00a68b.js → kit-files-dc0b71ca71f2151c.js} +1 -1
  261. package/dist/runtime/public/islands/kit-files-dc0b71ca71f2151c.js.br +0 -0
  262. package/dist/runtime/public/islands/kit-files-dc0b71ca71f2151c.js.gz +0 -0
  263. package/dist/runtime/public/islands/{kit-image-126e12fcae4215c1.js → kit-image-b31acf4d31a4eeaf.js} +1 -1
  264. package/dist/runtime/public/islands/kit-image-b31acf4d31a4eeaf.js.br +0 -0
  265. package/dist/runtime/public/islands/kit-image-b31acf4d31a4eeaf.js.gz +0 -0
  266. package/dist/runtime/public/islands/{kit-people-5b6f5dd4aa82b657.js → kit-people-6feb1b730c5fd37f.js} +1 -1
  267. package/dist/runtime/public/islands/kit-people-6feb1b730c5fd37f.js.br +0 -0
  268. package/dist/runtime/public/islands/kit-people-6feb1b730c5fd37f.js.gz +0 -0
  269. package/dist/runtime/public/islands/{kit-static-28174bd8f593f8c0.js → kit-static-853aed2cd04c1b4a.js} +1 -1
  270. package/dist/runtime/public/islands/kit-static-853aed2cd04c1b4a.js.br +0 -0
  271. package/dist/runtime/public/islands/kit-static-853aed2cd04c1b4a.js.gz +0 -0
  272. package/dist/runtime/public/islands/manifest.json +211 -211
  273. package/dist/runtime/public/islands/manifest.json.br +0 -0
  274. package/dist/runtime/public/islands/manifest.json.gz +0 -0
  275. package/dist/runtime/public/islands/{morph-engine-4e664485be475dbf.js → morph-engine-c61693caf767d9bd.js} +1 -1
  276. package/dist/runtime/public/islands/morph-engine-c61693caf767d9bd.js.br +0 -0
  277. package/dist/runtime/public/islands/morph-engine-c61693caf767d9bd.js.gz +0 -0
  278. package/dist/runtime/public/islands/offline-ba3717e06bc69a4e.json.gzip +0 -0
  279. package/dist/runtime/public/islands/{page-5f87c34c7c181387.js → page-c3ae4acf0988c2b6.js} +1 -1
  280. package/dist/runtime/public/islands/page-c3ae4acf0988c2b6.js.br +0 -0
  281. package/dist/runtime/public/islands/page-c3ae4acf0988c2b6.js.gz +0 -0
  282. package/dist/runtime/public/islands/{rt-30ff0d94ee3732a1.js → rt-2ab0fed85481c574.js} +1 -1
  283. package/dist/runtime/public/islands/rt-2ab0fed85481c574.js.br +0 -0
  284. package/dist/runtime/public/islands/rt-2ab0fed85481c574.js.gz +0 -0
  285. package/dist/runtime/public/islands/{sqlite-engine-9fc56fea8b1e2aaf.js → sqlite-engine-f3956693df7cfa5c.js} +8 -8
  286. package/dist/runtime/public/islands/sqlite-engine-f3956693df7cfa5c.js.br +0 -0
  287. package/dist/runtime/public/islands/sqlite-engine-f3956693df7cfa5c.js.gz +0 -0
  288. package/dist/runtime/public/islands/{ssr-456cabbcb26f723d.js → ssr-ce6931fb7bda9b08.js} +3 -0
  289. package/dist/runtime/public/islands/ssr-ce6931fb7bda9b08.js.br +0 -0
  290. package/dist/runtime/public/islands/ssr-ce6931fb7bda9b08.js.gz +0 -0
  291. package/dist/runtime/public/islands/{url-sync-74b5212f7b3417d7.js → url-sync-b179b054c9d958a7.js} +1 -1
  292. package/dist/runtime/public/islands/url-sync-b179b054c9d958a7.js.br +0 -0
  293. package/dist/runtime/public/islands/url-sync-b179b054c9d958a7.js.gz +0 -0
  294. package/dist/share/man/man1/afbin.1 +6 -4
  295. package/dist/skills/artifactbin/references/commands.md +4 -2
  296. package/dist/skills/artifactbin/references/publishing.md +5 -3
  297. package/npm-shrinkwrap.json +2 -2
  298. package/package.json +1 -1
  299. package/dist/runtime/dist/web/assets/Account-CvOF6jpD.js.br +0 -0
  300. package/dist/runtime/dist/web/assets/Account-CvOF6jpD.js.gz +0 -0
  301. package/dist/runtime/dist/web/assets/ArtifactAddress-DORDne01.js.br +0 -0
  302. package/dist/runtime/dist/web/assets/ArtifactAddress-DORDne01.js.gz +0 -0
  303. package/dist/runtime/dist/web/assets/ArtifactData-BdL9R2dA.js.br +0 -0
  304. package/dist/runtime/dist/web/assets/ArtifactData-BdL9R2dA.js.gz +0 -0
  305. package/dist/runtime/dist/web/assets/ArtifactEditor-BZXbOk_F.js.br +0 -0
  306. package/dist/runtime/dist/web/assets/ArtifactEditor-BZXbOk_F.js.gz +0 -0
  307. package/dist/runtime/dist/web/assets/AssetPageHeader-DX2RcYTv.js.br +0 -0
  308. package/dist/runtime/dist/web/assets/AssetPageHeader-DX2RcYTv.js.gz +0 -0
  309. package/dist/runtime/dist/web/assets/Assets-dgdXIgAW.js.br +0 -0
  310. package/dist/runtime/dist/web/assets/Assets-dgdXIgAW.js.gz +0 -0
  311. package/dist/runtime/dist/web/assets/AvatarCircle-MNnIhRvg.js.br +0 -0
  312. package/dist/runtime/dist/web/assets/AvatarCircle-MNnIhRvg.js.gz +0 -0
  313. package/dist/runtime/dist/web/assets/Chat-V1ku1-60.js.br +0 -0
  314. package/dist/runtime/dist/web/assets/Chat-V1ku1-60.js.gz +0 -0
  315. package/dist/runtime/dist/web/assets/ConfirmDialog-Ph1VDgNN.js.br +0 -0
  316. package/dist/runtime/dist/web/assets/ConfirmDialog-Ph1VDgNN.js.gz +0 -0
  317. package/dist/runtime/dist/web/assets/DatasetCatalogView-DBJEPKFI.js.br +0 -0
  318. package/dist/runtime/dist/web/assets/DatasetCatalogView-DBJEPKFI.js.gz +0 -0
  319. package/dist/runtime/dist/web/assets/DatasetEditor-CMqN1duq.js.br +0 -0
  320. package/dist/runtime/dist/web/assets/DatasetEditor-CMqN1duq.js.gz +0 -0
  321. package/dist/runtime/dist/web/assets/Docs-DVoW7b7v.js.br +0 -0
  322. package/dist/runtime/dist/web/assets/Docs-DVoW7b7v.js.gz +0 -0
  323. package/dist/runtime/dist/web/assets/Document-udhy5mlX.js.br +0 -0
  324. package/dist/runtime/dist/web/assets/Document-udhy5mlX.js.gz +0 -0
  325. package/dist/runtime/dist/web/assets/DocumentChrome-EUbW_JvA.js.br +0 -0
  326. package/dist/runtime/dist/web/assets/DocumentChrome-EUbW_JvA.js.gz +0 -0
  327. package/dist/runtime/dist/web/assets/DocumentSharing-BuTXuflA.js.br +0 -0
  328. package/dist/runtime/dist/web/assets/DocumentSharing-BuTXuflA.js.gz +0 -0
  329. package/dist/runtime/dist/web/assets/FileUpload-D6RTOrHD.js.br +0 -0
  330. package/dist/runtime/dist/web/assets/FileUpload-D6RTOrHD.js.gz +0 -0
  331. package/dist/runtime/dist/web/assets/Folder-DoNsFB2I.js.br +0 -0
  332. package/dist/runtime/dist/web/assets/Folder-DoNsFB2I.js.gz +0 -0
  333. package/dist/runtime/dist/web/assets/ForkArtifact-DDmXl1BZ.js.br +0 -0
  334. package/dist/runtime/dist/web/assets/ForkArtifact-DDmXl1BZ.js.gz +0 -0
  335. package/dist/runtime/dist/web/assets/GetStarted-YjltMEeN.js.br +0 -0
  336. package/dist/runtime/dist/web/assets/GetStarted-YjltMEeN.js.gz +0 -0
  337. package/dist/runtime/dist/web/assets/Home-DijnltFZ.js.br +0 -0
  338. package/dist/runtime/dist/web/assets/Home-DijnltFZ.js.gz +0 -0
  339. package/dist/runtime/dist/web/assets/Login-DLwn4aUr.js.br +0 -0
  340. package/dist/runtime/dist/web/assets/Login-DLwn4aUr.js.gz +0 -0
  341. package/dist/runtime/dist/web/assets/NotFound-svz4wCeL.js.br +0 -0
  342. package/dist/runtime/dist/web/assets/NotFound-svz4wCeL.js.gz +0 -0
  343. package/dist/runtime/dist/web/assets/Notifications-BGeJKv2W.js.br +0 -0
  344. package/dist/runtime/dist/web/assets/Notifications-BGeJKv2W.js.gz +0 -0
  345. package/dist/runtime/dist/web/assets/Profile-B38GeCbR.js.br +0 -0
  346. package/dist/runtime/dist/web/assets/Profile-B38GeCbR.js.gz +0 -0
  347. package/dist/runtime/dist/web/assets/Program-D3-Gfvjo.js.br +0 -0
  348. package/dist/runtime/dist/web/assets/Program-D3-Gfvjo.js.gz +0 -0
  349. package/dist/runtime/dist/web/assets/RowMenu-J4Gbci3B.js.br +0 -0
  350. package/dist/runtime/dist/web/assets/RowMenu-J4Gbci3B.js.gz +0 -0
  351. package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js +0 -1
  352. package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js.br +0 -0
  353. package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js.gz +0 -0
  354. package/dist/runtime/dist/web/assets/ScreenshotEditor-CUmN5F2q.js.br +0 -0
  355. package/dist/runtime/dist/web/assets/ScreenshotEditor-CUmN5F2q.js.gz +0 -0
  356. package/dist/runtime/dist/web/assets/ShareLink-n8KhtnaI.js.br +0 -0
  357. package/dist/runtime/dist/web/assets/ShareLink-n8KhtnaI.js.gz +0 -0
  358. package/dist/runtime/dist/web/assets/Shelf-BgwHOaeW.js.br +0 -0
  359. package/dist/runtime/dist/web/assets/Shelf-BgwHOaeW.js.gz +0 -0
  360. package/dist/runtime/dist/web/assets/SocialPreviewEditor-DwHHRW29.js.br +0 -0
  361. package/dist/runtime/dist/web/assets/SocialPreviewEditor-DwHHRW29.js.gz +0 -0
  362. package/dist/runtime/dist/web/assets/Starter-I01MNooi.js.br +0 -0
  363. package/dist/runtime/dist/web/assets/Starter-I01MNooi.js.gz +0 -0
  364. package/dist/runtime/dist/web/assets/Trash-Cu0KXeW7.js.br +0 -0
  365. package/dist/runtime/dist/web/assets/Trash-Cu0KXeW7.js.gz +0 -0
  366. package/dist/runtime/dist/web/assets/Welcome-B8iPt_Nh.js.br +0 -0
  367. package/dist/runtime/dist/web/assets/Welcome-B8iPt_Nh.js.gz +0 -0
  368. package/dist/runtime/dist/web/assets/WorkspaceLayout-fF_ot7EK.js.br +0 -0
  369. package/dist/runtime/dist/web/assets/WorkspaceLayout-fF_ot7EK.js.gz +0 -0
  370. package/dist/runtime/dist/web/assets/browser-artifact-write-ZsGe-hXr.js.br +0 -0
  371. package/dist/runtime/dist/web/assets/browser-artifact-write-ZsGe-hXr.js.gz +0 -0
  372. package/dist/runtime/dist/web/assets/copy-PNNAtmJH.js.br +0 -0
  373. package/dist/runtime/dist/web/assets/copy-PNNAtmJH.js.gz +0 -0
  374. package/dist/runtime/dist/web/assets/database-CKOnpvwb.js.br +0 -3
  375. package/dist/runtime/dist/web/assets/database-CKOnpvwb.js.gz +0 -0
  376. package/dist/runtime/dist/web/assets/document-update-client-DUF0zs2Z.js.br +0 -0
  377. package/dist/runtime/dist/web/assets/document-update-client-DUF0zs2Z.js.gz +0 -0
  378. package/dist/runtime/dist/web/assets/dom-mounter-64phOf1s.js.br +0 -0
  379. package/dist/runtime/dist/web/assets/dom-mounter-64phOf1s.js.gz +0 -0
  380. package/dist/runtime/dist/web/assets/download-j-nqks7p.js.br +0 -0
  381. package/dist/runtime/dist/web/assets/download-j-nqks7p.js.gz +0 -0
  382. package/dist/runtime/dist/web/assets/eye-BNpzRKAK.js.br +0 -0
  383. package/dist/runtime/dist/web/assets/eye-BNpzRKAK.js.gz +0 -0
  384. package/dist/runtime/dist/web/assets/file-up-DH-HiKEX.js.br +0 -0
  385. package/dist/runtime/dist/web/assets/file-up-DH-HiKEX.js.gz +0 -0
  386. package/dist/runtime/dist/web/assets/git-fork-PQOXxmWW.js.br +0 -0
  387. package/dist/runtime/dist/web/assets/git-fork-PQOXxmWW.js.gz +0 -0
  388. package/dist/runtime/dist/web/assets/http-C2exCIpl.js.br +0 -0
  389. package/dist/runtime/dist/web/assets/http-C2exCIpl.js.gz +0 -0
  390. package/dist/runtime/dist/web/assets/list-Dj3WErnh.js.br +0 -0
  391. package/dist/runtime/dist/web/assets/list-Dj3WErnh.js.gz +0 -0
  392. package/dist/runtime/dist/web/assets/lock-B1nhk71f.js.br +0 -0
  393. package/dist/runtime/dist/web/assets/lock-B1nhk71f.js.gz +0 -0
  394. package/dist/runtime/dist/web/assets/person-mentions-BEjAedYZ.js.br +0 -0
  395. package/dist/runtime/dist/web/assets/person-mentions-BEjAedYZ.js.gz +0 -0
  396. package/dist/runtime/dist/web/assets/rotate-ccw-CSJ78xUE.js.br +0 -0
  397. package/dist/runtime/dist/web/assets/rotate-ccw-CSJ78xUE.js.gz +0 -0
  398. package/dist/runtime/dist/web/assets/session-D__Apnw9.js.br +0 -0
  399. package/dist/runtime/dist/web/assets/session-D__Apnw9.js.gz +0 -0
  400. package/dist/runtime/dist/web/assets/shelf-CeaX4iBg.js.br +0 -0
  401. package/dist/runtime/dist/web/assets/shelf-CeaX4iBg.js.gz +0 -0
  402. package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css +0 -2
  403. package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css.br +0 -0
  404. package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css.gz +0 -0
  405. package/dist/runtime/dist/web/assets/solid-app-BtmRR9Ax.js.br +0 -0
  406. package/dist/runtime/dist/web/assets/solid-app-BtmRR9Ax.js.gz +0 -0
  407. package/dist/runtime/dist/web/assets/undo-2-Di8QrlfX.js.br +0 -0
  408. package/dist/runtime/dist/web/assets/undo-2-Di8QrlfX.js.gz +0 -0
  409. package/dist/runtime/dist/web/assets/users-BJrdLUkX.js.br +0 -0
  410. package/dist/runtime/dist/web/assets/users-BJrdLUkX.js.gz +0 -0
  411. package/dist/runtime/preview/update-parts-OJC3ZSRW.js +0 -1
  412. package/dist/runtime/public/islands/boot-74e9143aa374c62b.js.br +0 -0
  413. package/dist/runtime/public/islands/boot-74e9143aa374c62b.js.gz +0 -0
  414. package/dist/runtime/public/islands/chunk-51a4b62dc42f3594.js.br +0 -0
  415. package/dist/runtime/public/islands/chunk-51a4b62dc42f3594.js.gz +0 -0
  416. package/dist/runtime/public/islands/chunk-68a083200dbd5bf7.js.br +0 -0
  417. package/dist/runtime/public/islands/chunk-68a083200dbd5bf7.js.gz +0 -0
  418. package/dist/runtime/public/islands/chunk-adcd632c8be50ba7.js.br +0 -0
  419. package/dist/runtime/public/islands/chunk-e817ee4addba2d95.js.br +0 -0
  420. package/dist/runtime/public/islands/chunk-e817ee4addba2d95.js.gz +0 -0
  421. package/dist/runtime/public/islands/chunk-f451297257164687.js.br +0 -0
  422. package/dist/runtime/public/islands/frame-editor-6b8a50886fff8604.js.br +0 -0
  423. package/dist/runtime/public/islands/frame-editor-6b8a50886fff8604.js.gz +0 -0
  424. package/dist/runtime/public/islands/frame-editor-chunk-69c553d9c4562981.js.br +0 -1
  425. package/dist/runtime/public/islands/frame-editor-chunk-69c553d9c4562981.js.gz +0 -0
  426. package/dist/runtime/public/islands/frame-editor-chunk-87b0311faf57261c.js.br +0 -0
  427. package/dist/runtime/public/islands/frame-editor-chunk-87b0311faf57261c.js.gz +0 -0
  428. package/dist/runtime/public/islands/frame-editor-chunk-a13dce46b9b8401f.js.br +0 -0
  429. package/dist/runtime/public/islands/frame-editor-chunk-a13dce46b9b8401f.js.gz +0 -0
  430. package/dist/runtime/public/islands/frame-editor-chunk-b06f17fc7dae17e8.js.br +0 -0
  431. package/dist/runtime/public/islands/frame-editor-chunk-b06f17fc7dae17e8.js.gz +0 -0
  432. package/dist/runtime/public/islands/frame-editor-chunk-c2b9018371100824.js.br +0 -0
  433. package/dist/runtime/public/islands/frame-editor-chunk-c2b9018371100824.js.gz +0 -0
  434. package/dist/runtime/public/islands/image-map-a9f95f7e8d0712c1.js.br +0 -0
  435. package/dist/runtime/public/islands/image-map-a9f95f7e8d0712c1.js.gz +0 -0
  436. package/dist/runtime/public/islands/kit-basic-cbabcc4b41d6132a.js.br +0 -0
  437. package/dist/runtime/public/islands/kit-basic-cbabcc4b41d6132a.js.gz +0 -0
  438. package/dist/runtime/public/islands/kit-cells-cefbceccdfd0dbe0.js.br +0 -0
  439. package/dist/runtime/public/islands/kit-cells-cefbceccdfd0dbe0.js.gz +0 -0
  440. package/dist/runtime/public/islands/kit-controls-81d17a10f9d457f2.js.br +0 -0
  441. package/dist/runtime/public/islands/kit-controls-81d17a10f9d457f2.js.gz +0 -0
  442. package/dist/runtime/public/islands/kit-data-43947f36f1c501aa.js.br +0 -0
  443. package/dist/runtime/public/islands/kit-data-43947f36f1c501aa.js.gz +0 -0
  444. package/dist/runtime/public/islands/kit-dialog-eedc51ce82feec4b.js.br +0 -0
  445. package/dist/runtime/public/islands/kit-dialog-eedc51ce82feec4b.js.gz +0 -0
  446. package/dist/runtime/public/islands/kit-embed-3c8886cbfa06f74d.js.br +0 -0
  447. package/dist/runtime/public/islands/kit-embed-3c8886cbfa06f74d.js.gz +0 -0
  448. package/dist/runtime/public/islands/kit-files-b7a2cb758f00a68b.js.br +0 -0
  449. package/dist/runtime/public/islands/kit-files-b7a2cb758f00a68b.js.gz +0 -0
  450. package/dist/runtime/public/islands/kit-image-126e12fcae4215c1.js.br +0 -0
  451. package/dist/runtime/public/islands/kit-image-126e12fcae4215c1.js.gz +0 -0
  452. package/dist/runtime/public/islands/kit-people-5b6f5dd4aa82b657.js.br +0 -0
  453. package/dist/runtime/public/islands/kit-people-5b6f5dd4aa82b657.js.gz +0 -0
  454. package/dist/runtime/public/islands/kit-static-28174bd8f593f8c0.js.br +0 -0
  455. package/dist/runtime/public/islands/kit-static-28174bd8f593f8c0.js.gz +0 -0
  456. package/dist/runtime/public/islands/morph-engine-4e664485be475dbf.js.br +0 -0
  457. package/dist/runtime/public/islands/morph-engine-4e664485be475dbf.js.gz +0 -0
  458. package/dist/runtime/public/islands/offline-4446a94ed9f706c3.json.gzip +0 -0
  459. package/dist/runtime/public/islands/page-5f87c34c7c181387.js.br +0 -0
  460. package/dist/runtime/public/islands/page-5f87c34c7c181387.js.gz +0 -0
  461. package/dist/runtime/public/islands/rt-30ff0d94ee3732a1.js.br +0 -0
  462. package/dist/runtime/public/islands/rt-30ff0d94ee3732a1.js.gz +0 -0
  463. package/dist/runtime/public/islands/sqlite-engine-9fc56fea8b1e2aaf.js.br +0 -0
  464. package/dist/runtime/public/islands/sqlite-engine-9fc56fea8b1e2aaf.js.gz +0 -0
  465. package/dist/runtime/public/islands/ssr-456cabbcb26f723d.js.br +0 -0
  466. package/dist/runtime/public/islands/ssr-456cabbcb26f723d.js.gz +0 -0
  467. package/dist/runtime/public/islands/url-sync-74b5212f7b3417d7.js.br +0 -0
  468. package/dist/runtime/public/islands/url-sync-74b5212f7b3417d7.js.gz +0 -0
@@ -1 +1 @@
1
- import{I as e,M as t,O as n,T as r,_ as i,a,b as o,i as s,k as c,l,m as u,n as d,o as f,p,r as m,s as h}from"./web-Ckpee-ZJ.js";import{t as g}from"./chevron-down-COGO5cmx.js";import{n as _}from"./ShareLink-n8KhtnaI.js";import{t as v}from"./database-CKOnpvwb.js";import{i as y}from"./Shelf-BgwHOaeW.js";import{t as b}from"./eye-BNpzRKAK.js";import{t as x}from"./file-up-DH-HiKEX.js";import{t as S}from"./git-fork-PQOXxmWW.js";import{n as C,t as w}from"./users-BJrdLUkX.js";import{v as T}from"./person-mentions-BEjAedYZ.js";import{t as E}from"./plus-BtWrAD8F.js";import{E as D,G as O,H as k,V as A,Y as j,l as M}from"./solid-app-BtmRR9Ax.js";import{a as N}from"./share-roles-c4EwFuyA.js";import{t as P}from"./DialogShell-BA3tWbeJ.js";import{t as F}from"./GetStarted-YjltMEeN.js";var I=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]],L=t=>r(O,e(t,{iconNode:I,name:`activity`})),R=[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]],z=t=>r(O,e(t,{iconNode:R,name:`file-plus-corner`})),B=[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]],V=t=>r(O,e(t,{iconNode:B,name:`layout-dashboard`})),H=[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]],U=t=>r(O,e(t,{iconNode:H,name:`maximize-2`})),W=p(`<div role=menu aria-label="Create menu"class="absolute inset-x-0 top-[calc(100%+0.35rem)] z-40 rounded-[6px] border border-edge-bright bg-surface p-1 shadow-xl"><button type=button role=menuitem class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">Artifact</button><button type=button role=menuitem class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">Folder</button><a role=menuitem href=/programs/new class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">Program</a><div class="mt-1 border-t border-edge pt-1"><span class="block px-2.5 pt-1.5 pb-1 font-mono text-[9.5px] uppercase tracking-[0.14em] text-faint">assets</span><a role=menuitem class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">File</a><a role=menuitem href=/datasets/new class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">Dataset`),G=p(`<div class="relative z-30 lg:border-b lg:border-edge lg:pb-3"><button type=button aria-label=Create aria-haspopup=menu class="group flex h-9 w-full items-center rounded-[5px] border border-accent bg-accent px-3 font-mono text-xs font-semibold text-bg"><span class=ml-2>Create</span></button><a href=/schedules class="mt-2 block rounded border border-edge px-3 py-2 text-center font-mono text-[11px] text-muted">Schedules</a><nav aria-label="Workspace shortcuts"class="mt-2 grid grid-cols-2 gap-1"><a href=/assets aria-label=Assets class="flex h-7 items-center justify-center gap-1.5 rounded border border-edge bg-raised font-mono text-[11px] text-muted">Assets</a><a href=/trash aria-label=Trash class="flex h-7 items-center justify-center gap-1.5 rounded border border-edge bg-raised font-mono text-[11px] text-muted">Trash`),K=p(`<p role=alert class=text-danger>`),q=p(`<form class=p-5><label for=workspace-folder-name class="block font-mono text-xs">Folder name</label><input id=workspace-folder-name autofocus required class="mt-2 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"><div class="mt-5 flex justify-end gap-2"><button type=button>cancel</button><button type=submit class="rounded bg-accent px-3 py-1 text-bg">`),J=p(`<div class="fixed inset-0 z-[100] flex items-center justify-center p-3"><button type=button aria-label="Close create dialog by clicking outside"class="absolute inset-0 bg-black/45"></button><div role=dialog aria-modal=true><header class="flex items-center justify-between border-b border-edge p-4"><h2 class="font-mono text-sm font-semibold">New </h2><button type=button aria-label="Close create dialog">×`),Y=p(`<p class="mb-3 font-mono text-xs">create inside this folder with <code>parent_id: &quot;<!>&quot;`),X=p(`<div class=p-5>`);function Z(e){let[n,i]=t(!1),[a,p]=t(null),[m,h]=t(``),[b,S]=t(!1),[C,w]=t(``),D,O,k=N(n,()=>i(!1),()=>O,()=>D),A=e=>{i(!1),p(e)},I=async t=>{t.preventDefault();let n=m().trim();if(!n||b())return;S(!0),w(``);let r=await M(`/api/my/artifacts`,`POST`,{format:`folder`,title:n,parent_id:e.parentId??null}).catch(()=>null);if(S(!1),!r?.ok){w(`Could not create the folder. Try again.`);return}j(),e.onCreated(),p(null),h(``)};return(()=>{var t=G(),S=t.firstChild,w=S.firstChild,j=S.nextSibling,M=j.nextSibling.firstChild,N=M.firstChild,L=M.nextSibling,R=L.firstChild,B=D;typeof B==`function`?u(B,t):D=t,S.$$click=()=>{n()||k(),i(e=>!e)};var V=O;return typeof V==`function`?u(V,S):O=S,f(S,r(E,{size:15}),w),f(S,r(g,{size:14,class:`ml-auto`}),null),f(t,r(o,{get when(){return n()},get children(){var t=W(),n=t.firstChild,i=n.firstChild,a=n.nextSibling,o=a.firstChild,s=a.nextSibling,u=s.firstChild,d=s.nextSibling.firstChild.nextSibling,p=d.firstChild,m=d.nextSibling,h=m.firstChild;return n.$$click=()=>A(`artifact`),f(n,r(z,{size:14}),i),a.$$click=()=>A(`folder`),f(a,r(y,{size:14}),o),f(s,r(z,{size:14}),u),f(d,r(x,{size:14}),p),f(m,r(_,{size:14}),h),c(()=>l(d,`href`,e.parentId?`/files/new?parent_id=${encodeURIComponent(e.parentId)}`:`/files/new`)),t}}),j),f(M,r(v,{size:13}),N),f(L,r(T,{size:13}),R),f(t,r(o,{get when(){return a()},children:t=>r(d,{get mount(){return document.body},get children(){return r(P,{onClose:()=>p(null),initialFocus:`[autofocus]`,get children(){var n=J(),i=n.firstChild,a=i.nextSibling,u=a.firstChild.firstChild;u.firstChild;var d=u.nextSibling;return i.$$click=()=>p(null),f(u,t,null),d.$$click=()=>p(null),f(a,r(o,{get when(){return t()===`folder`},get fallback(){return(()=>{var t=X();return f(t,r(o,{get when(){return e.parentId},get children(){var t=Y(),n=t.firstChild.nextSibling,r=n.firstChild.nextSibling;return r.nextSibling,f(n,()=>e.parentId,r),t}}),null),f(t,r(F,{heading:!1,frame:!1}),null),t})()},get children(){var e=q(),t=e.firstChild.nextSibling,n=t.nextSibling,i=n.firstChild,a=i.nextSibling;return e.addEventListener(`submit`,e=>void I(e)),t.$$input=e=>h(e.currentTarget.value),f(e,r(o,{get when(){return C()},get children(){var e=K();return f(e,C),e}}),n),i.$$click=()=>p(null),f(a,()=>b()?`creating…`:`create folder`),c(()=>a.disabled=!m().trim()||b()),c(()=>t.value=m()),e}}),null),c(e=>{var n=t()===`artifact`?`Create new artifact`:`Create new folder`,r=`relative z-10 w-full rounded-[9px] border border-edge-bright bg-surface shadow-2xl ${t()===`artifact`?`max-w-3xl`:`max-w-md`}`;return n!==e.e&&l(a,`aria-label`,e.e=n),r!==e.t&&s(a,e.t=r),e},{e:void 0,t:void 0}),n}})}})}),null),c(()=>l(S,`aria-expanded`,n())),t})()}a([`click`,`input`]);var Q=p(`<button type=button aria-label="Expand dashboard"class="text-faint hover:text-accent">`),ee=p(`<div role=group><div class="flex gap-3 font-mono text-[9px]"><button type=button aria-label="Focus views"class=text-accent>views</button><button type=button aria-label="Focus likes"class=text-muted>likes</button></div><svg aria-label="Engagement Vega chart"role=img viewBox="0 0 240 140"preserveAspectRatio=none class="h-[14.25rem] w-full border-b border-edge"><polyline fill=none stroke=var(--color-accent) stroke-width=2 class=cursor-pointer></polyline><polyline fill=none stroke=var(--color-muted) stroke-width=2 class=cursor-pointer></polyline></svg><p class="mt-1 font-mono text-[8px] leading-relaxed text-faint">click a line or legend to focus · double-click to reset`),te=p(`<section class="min-w-0 reveal"><div class="mb-4 flex items-center justify-between gap-3 border-b border-edge pb-3"><h1 class="flex items-center gap-1.5 font-mono text-xs font-semibold text-fg">Dashboard</h1></div><dl></dl><div class=mt-5><div class=mb-2.5><h2 class="flex items-center gap-1.5 font-mono text-xs font-semibold text-fg">Engagement over time</h2><p class="mt-1 flex flex-wrap items-center gap-x-2.5 gap-y-1 font-mono text-[9px] tabular-nums text-faint"><span> views</span><span> likes</span><span>last 30 days`),ne=p(`<div class="fixed inset-0 z-[100] flex items-center justify-center overflow-hidden p-3 sm:p-8"><button type=button aria-label="Close expanded dashboard by clicking outside"class="absolute inset-0 cursor-default border-0 bg-black/50 p-0 backdrop-blur-[2px]"></button><div role=dialog aria-modal=true aria-label="Expanded dashboard"class="relative z-10 flex min-w-0 max-w-6xl flex-col overflow-hidden rounded-[9px] border border-edge-bright bg-surface shadow-2xl"style="width:calc(100vw - 1.5rem);max-height:calc(100svh - 1.5rem)"><button type=button aria-label="Close expanded dashboard"autofocus class="absolute top-4 right-4 z-10 bg-surface text-muted hover:text-fg"></button><div class="min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto px-5 py-5 sm:px-8 sm:py-7">`),re=p(`<div><dt class="flex items-center gap-1.5 font-mono text-[9px] uppercase tracking-[0.11em] text-faint"><span></span></dt><dd class="mt-1.5 font-mono text-lg leading-none font-medium tabular-nums text-fg">`),ie=p(`<div class="flex h-36 items-end border-b border-edge pb-3"><p class="font-mono text-[11px] text-faint">No engagement in the last 30 days.`),ae=e=>{let t=(e,t)=>{let n=Math.floor(e*10)/10;return`${Number.isInteger(n)?n.toFixed(0):n.toFixed(1)}${t}`};return e>=1e6?t(e/1e6,`m`):e>=1e3?t(e/1e3,`k`):D(e)};function $(a){let[u,p]=t(null),[m,g]=t(!1),_=()=>a.viewsOverTime??[],y=()=>a.likesOverTime??[],x=n(()=>_().reduce((e,t)=>e+t,0)),T=n(()=>y().reduce((e,t)=>e+t,0)),E=n(()=>[{label:`artifacts`,value:a.stats?.artifacts??a.rows.filter(e=>e.format===`markup`).length,Icon:k},{label:`assets`,value:a.stats?.assets??a.rows.filter(e=>e.format!==`markup`&&e.format!==`folder`).length,Icon:v},{label:`views`,value:a.stats?.views??a.rows.filter(e=>e.format===`markup`).reduce((e,t)=>e+(t.views??0),0),Icon:b},{label:`likes`,value:a.likes??0,Icon:C},{label:`followers`,value:a.followers??0,Icon:w},{label:`forks`,value:a.forks??0,Icon:S}]),O=n(()=>Math.max(1,..._(),...y())),j=e=>{let t=Math.max(_().length,y().length,2);return Array.from({length:t},(n,r)=>{let i=e[r-(t-e.length)]??0;return`${r/(t-1)*240},${130-i/O()*115}`}).join(` `)};return[r(o,{get when(){return!m()||a.expanded},get children(){var e=te(),t=e.firstChild,n=t.firstChild,d=n.firstChild,m=t.nextSibling,h=m.nextSibling,v=h.firstChild.firstChild,b=v.firstChild,S=v.nextSibling.firstChild,C=S.firstChild,w=S.nextSibling,O=w.firstChild;return f(n,r(V,{size:12,class:`text-accent`}),d),f(t,r(o,{get when(){return!a.expanded},get children(){var e=Q();return e.$$click=()=>g(!0),f(e,r(U,{size:13})),e}}),null),f(m,r(i,{get each(){return E()},children:({label:e,value:t,Icon:n},i)=>(()=>{var a=re(),o=a.firstChild,u=o.firstChild,d=o.nextSibling;return f(o,r(n,{size:10,class:`transition-colors group-hover:text-accent`}),u),f(u,e),f(d,()=>ae(t)),c(n=>{var r=`group py-2.5 ${i()%2?`border-l border-edge pl-3`:`pr-3`} ${i()>1?`border-t border-edge`:``}`,o=`${D(t)} ${e}`;return r!==n.e&&s(a,n.e=r),o!==n.t&&l(d,`title`,n.t=o),n},{e:void 0,t:void 0}),a})()})),f(v,r(L,{size:12,class:`text-accent`}),b),f(S,x,C),f(w,T,O),f(h,r(o,{get when(){return x()+T()>0},get fallback(){return ie()},get children(){var e=ee(),t=e.firstChild,n=t.firstChild,r=n.nextSibling,i=t.nextSibling,a=i.firstChild,o=a.nextSibling;return n.$$click=()=>p(u()===`views`?null:`views`),r.$$click=()=>p(u()===`likes`?null:`likes`),i.$$dblclick=()=>p(null),a.$$click=()=>p(u()===`views`?null:`views`),o.$$click=()=>p(u()===`likes`?null:`likes`),c(t=>{var i=`Interactive engagement chart: ${x()} views and ${T()} likes in the last 30 days`,s=u()===`views`,c=u()===`likes`,d=j(_()),f=u()===`likes`?.18:1,p=j(y()),m=u()===`views`?.18:1;return i!==t.e&&l(e,`aria-label`,t.e=i),s!==t.t&&l(n,`aria-pressed`,t.t=s),c!==t.a&&l(r,`aria-pressed`,t.a=c),d!==t.o&&l(a,`points`,t.o=d),f!==t.i&&l(a,`opacity`,t.i=f),p!==t.n&&l(o,`points`,t.n=p),m!==t.s&&l(o,`opacity`,t.s=m),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),e}}),null),c(t=>{var n=a.expanded?`Expanded dashboard content`:`Dashboard`,r=a.expanded?`Expanded dashboard metrics`:`Dashboard metrics`,i=`grid grid-cols-2 border-b border-edge ${a.expanded?`sm:grid-cols-3 lg:grid-cols-6`:``}`;return n!==t.e&&l(e,`aria-label`,t.e=n),r!==t.t&&l(m,`aria-label`,t.t=r),i!==t.a&&s(m,t.a=i),t},{e:void 0,t:void 0,a:void 0}),e}}),r(o,{get when(){return h(()=>!!m())()&&!a.expanded},get children(){return r(d,{get mount(){return document.body},get children(){return r(P,{onClose:()=>g(!1),get children(){var t=ne(),n=t.firstChild,i=n.nextSibling.firstChild,o=i.nextSibling;return n.$$click=()=>g(!1),i.$$click=()=>g(!1),f(i,r(A,{size:16})),f(o,r($,e(a,{expanded:!0}))),t}})}})}})]}a([`click`,`dblclick`]);var oe=p(`<div aria-label="Loading workspace"role=status aria-busy=true class="grid gap-10 lg:grid-cols-[minmax(0,1fr)_16rem] xl:grid-cols-[minmax(0,1fr)_18rem] motion-safe:animate-pulse"><span class=sr-only>Loading workspace</span><div aria-hidden=true><div class="mb-6 h-9 w-40 rounded bg-surface"></div><div class="grid grid-cols-2 gap-6 sm:grid-cols-3"><div class="h-44 rounded border border-edge bg-surface"></div></div></div><div aria-hidden=true class="hidden border-l border-edge pl-6 lg:block"><div class="h-10 rounded bg-surface"></div><div class="mt-12 h-80 rounded border border-edge bg-surface">`),se=p(`<div class="grid gap-y-3 lg:grid-cols-[minmax(0,1fr)_16rem] lg:gap-x-10 lg:gap-y-0 xl:grid-cols-[minmax(0,1fr)_18rem]"><div class="lg:col-start-2 lg:row-start-1 lg:pl-6"></div><div class="min-w-0 lg:col-start-1 lg:row-start-1"></div><aside aria-label="Dashboard rail"class="min-w-0 border-t border-edge pt-6 lg:col-start-2 lg:row-start-1 lg:border-t-0 lg:border-l lg:pt-24 lg:pl-6">`),ce=p(`<div role=alert>Could not load workspace insights. <button type=button aria-label="Retry workspace insights">Try again`),le=p(`<div aria-label="Loading workspace insights"role=status aria-busy=true class="min-h-80 motion-safe:animate-pulse"><span class=sr-only>Loading workspace insights</span><div class="h-32 rounded border border-edge bg-surface"></div><div class="mt-6 h-40 rounded border border-edge bg-surface">`),ue=`mx-auto max-w-[80rem] px-4 sm:px-6`;function de(){return oe()}function fe(e){let t=()=>e.insights===void 0&&`viewsOverTime`in e.workspace?e.workspace:e.insights;return(()=>{var n=se(),i=n.firstChild,a=i.nextSibling,s=a.nextSibling;return f(i,r(Z,{get parentId(){return e.parentId},get onCreated(){return e.onCreated}})),f(a,()=>e.children),f(s,r(o,{get when(){return t()},get fallback(){return r(o,{get when(){return e.insightsError},get fallback(){return le()},get children(){var t=ce(),n=t.firstChild.nextSibling;return m(n,`click`,e.onCreated,!0),t}})},children:t=>r($,{get rows(){return e.workspace.artifacts.map(e=>({...e,views:t().views?.[e.id]??(`views`in e?e.views:0)}))},get stats(){return t().stats},get viewsOverTime(){return t().viewsOverTime},get likes(){return t().likes},get likesOverTime(){return t().likesOverTime},get followers(){return t().followers},get forks(){return t().forks}})})),c(()=>l(n,`aria-label`,e.label??`Home workspace`)),n})()}a([`click`]);export{fe as n,de as r,ue as t};
1
+ import{I as e,M as t,O as n,T as r,_ as i,a,b as o,i as s,k as c,l,m as u,n as d,o as f,p,r as m,s as h}from"./web-Ckpee-ZJ.js";import{t as g}from"./chevron-down-M1fHuk7u.js";import{n as _}from"./ShareLink-qbYss_Eh.js";import{t as v}from"./database-BbH2eTSj.js";import{i as y}from"./Shelf-anhc5No9.js";import{t as b}from"./eye-DEiYMLrO.js";import{t as x}from"./file-up-GoLKOXxO.js";import{t as S}from"./git-fork-CN41g1lF.js";import{n as C,t as w}from"./users-Bm0xpNrq.js";import{v as T}from"./person-mentions-C7vQd7Vr.js";import{t as E}from"./plus-BNzHjmEg.js";import{E as D,G as O,H as k,V as A,Y as j,l as M}from"./solid-app-BNcsMwv4.js";import{a as N}from"./share-roles-c4EwFuyA.js";import{t as P}from"./DialogShell-BA3tWbeJ.js";import{t as F}from"./GetStarted-CFsSvXR0.js";var I=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]],L=t=>r(O,e(t,{iconNode:I,name:`activity`})),R=[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]],z=t=>r(O,e(t,{iconNode:R,name:`file-plus-corner`})),B=[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]],V=t=>r(O,e(t,{iconNode:B,name:`layout-dashboard`})),H=[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]],U=t=>r(O,e(t,{iconNode:H,name:`maximize-2`})),W=p(`<div role=menu aria-label="Create menu"class="absolute inset-x-0 top-[calc(100%+0.35rem)] z-40 rounded-[6px] border border-edge-bright bg-surface p-1 shadow-xl"><button type=button role=menuitem class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">Artifact</button><button type=button role=menuitem class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">Folder</button><a role=menuitem href=/programs/new class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">Program</a><div class="mt-1 border-t border-edge pt-1"><span class="block px-2.5 pt-1.5 pb-1 font-mono text-[9.5px] uppercase tracking-[0.14em] text-faint">assets</span><a role=menuitem class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">File</a><a role=menuitem href=/datasets/new class="group flex w-full cursor-pointer items-center gap-2.5 rounded-[4px] px-2.5 py-2 text-left font-mono text-[11.5px] text-fg no-underline hover:bg-accent-soft hover:text-accent">Dataset`),G=p(`<div class="relative z-30 lg:border-b lg:border-edge lg:pb-3"><button type=button aria-label=Create aria-haspopup=menu class="group flex h-9 w-full items-center rounded-[5px] border border-accent bg-accent px-3 font-mono text-xs font-semibold text-bg"><span class=ml-2>Create</span></button><a href=/schedules class="mt-2 block rounded border border-edge px-3 py-2 text-center font-mono text-[11px] text-muted">Schedules</a><nav aria-label="Workspace shortcuts"class="mt-2 grid grid-cols-2 gap-1"><a href=/assets aria-label=Assets class="flex h-7 items-center justify-center gap-1.5 rounded border border-edge bg-raised font-mono text-[11px] text-muted">Assets</a><a href=/trash aria-label=Trash class="flex h-7 items-center justify-center gap-1.5 rounded border border-edge bg-raised font-mono text-[11px] text-muted">Trash`),K=p(`<p role=alert class=text-danger>`),q=p(`<form class=p-5><label for=workspace-folder-name class="block font-mono text-xs">Folder name</label><input id=workspace-folder-name autofocus required class="mt-2 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"><div class="mt-5 flex justify-end gap-2"><button type=button>cancel</button><button type=submit class="rounded bg-accent px-3 py-1 text-bg">`),J=p(`<div class="fixed inset-0 z-[100] flex items-center justify-center p-3"><button type=button aria-label="Close create dialog by clicking outside"class="absolute inset-0 bg-black/45"></button><div role=dialog aria-modal=true><header class="flex items-center justify-between border-b border-edge p-4"><h2 class="font-mono text-sm font-semibold">New </h2><button type=button aria-label="Close create dialog">×`),Y=p(`<p class="mb-3 font-mono text-xs">create inside this folder with <code>parent_id: &quot;<!>&quot;`),X=p(`<div class=p-5>`);function Z(e){let[n,i]=t(!1),[a,p]=t(null),[m,h]=t(``),[b,S]=t(!1),[C,w]=t(``),D,O,k=N(n,()=>i(!1),()=>O,()=>D),A=e=>{i(!1),p(e)},I=async t=>{t.preventDefault();let n=m().trim();if(!n||b())return;S(!0),w(``);let r=await M(`/api/my/artifacts`,`POST`,{format:`folder`,title:n,parent_id:e.parentId??null}).catch(()=>null);if(S(!1),!r?.ok){w(`Could not create the folder. Try again.`);return}j(),e.onCreated(),p(null),h(``)};return(()=>{var t=G(),S=t.firstChild,w=S.firstChild,j=S.nextSibling,M=j.nextSibling.firstChild,N=M.firstChild,L=M.nextSibling,R=L.firstChild,B=D;typeof B==`function`?u(B,t):D=t,S.$$click=()=>{n()||k(),i(e=>!e)};var V=O;return typeof V==`function`?u(V,S):O=S,f(S,r(E,{size:15}),w),f(S,r(g,{size:14,class:`ml-auto`}),null),f(t,r(o,{get when(){return n()},get children(){var t=W(),n=t.firstChild,i=n.firstChild,a=n.nextSibling,o=a.firstChild,s=a.nextSibling,u=s.firstChild,d=s.nextSibling.firstChild.nextSibling,p=d.firstChild,m=d.nextSibling,h=m.firstChild;return n.$$click=()=>A(`artifact`),f(n,r(z,{size:14}),i),a.$$click=()=>A(`folder`),f(a,r(y,{size:14}),o),f(s,r(z,{size:14}),u),f(d,r(x,{size:14}),p),f(m,r(_,{size:14}),h),c(()=>l(d,`href`,e.parentId?`/files/new?parent_id=${encodeURIComponent(e.parentId)}`:`/files/new`)),t}}),j),f(M,r(v,{size:13}),N),f(L,r(T,{size:13}),R),f(t,r(o,{get when(){return a()},children:t=>r(d,{get mount(){return document.body},get children(){return r(P,{onClose:()=>p(null),initialFocus:`[autofocus]`,get children(){var n=J(),i=n.firstChild,a=i.nextSibling,u=a.firstChild.firstChild;u.firstChild;var d=u.nextSibling;return i.$$click=()=>p(null),f(u,t,null),d.$$click=()=>p(null),f(a,r(o,{get when(){return t()===`folder`},get fallback(){return(()=>{var t=X();return f(t,r(o,{get when(){return e.parentId},get children(){var t=Y(),n=t.firstChild.nextSibling,r=n.firstChild.nextSibling;return r.nextSibling,f(n,()=>e.parentId,r),t}}),null),f(t,r(F,{heading:!1,frame:!1}),null),t})()},get children(){var e=q(),t=e.firstChild.nextSibling,n=t.nextSibling,i=n.firstChild,a=i.nextSibling;return e.addEventListener(`submit`,e=>void I(e)),t.$$input=e=>h(e.currentTarget.value),f(e,r(o,{get when(){return C()},get children(){var e=K();return f(e,C),e}}),n),i.$$click=()=>p(null),f(a,()=>b()?`creating…`:`create folder`),c(()=>a.disabled=!m().trim()||b()),c(()=>t.value=m()),e}}),null),c(e=>{var n=t()===`artifact`?`Create new artifact`:`Create new folder`,r=`relative z-10 w-full rounded-[9px] border border-edge-bright bg-surface shadow-2xl ${t()===`artifact`?`max-w-3xl`:`max-w-md`}`;return n!==e.e&&l(a,`aria-label`,e.e=n),r!==e.t&&s(a,e.t=r),e},{e:void 0,t:void 0}),n}})}})}),null),c(()=>l(S,`aria-expanded`,n())),t})()}a([`click`,`input`]);var Q=p(`<button type=button aria-label="Expand dashboard"class="text-faint hover:text-accent">`),ee=p(`<div role=group><div class="flex gap-3 font-mono text-[9px]"><button type=button aria-label="Focus views"class=text-accent>views</button><button type=button aria-label="Focus likes"class=text-muted>likes</button></div><svg aria-label="Engagement Vega chart"role=img viewBox="0 0 240 140"preserveAspectRatio=none class="h-[14.25rem] w-full border-b border-edge"><polyline fill=none stroke=var(--color-accent) stroke-width=2 class=cursor-pointer></polyline><polyline fill=none stroke=var(--color-muted) stroke-width=2 class=cursor-pointer></polyline></svg><p class="mt-1 font-mono text-[8px] leading-relaxed text-faint">click a line or legend to focus · double-click to reset`),te=p(`<section class="min-w-0 reveal"><div class="mb-4 flex items-center justify-between gap-3 border-b border-edge pb-3"><h1 class="flex items-center gap-1.5 font-mono text-xs font-semibold text-fg">Dashboard</h1></div><dl></dl><div class=mt-5><div class=mb-2.5><h2 class="flex items-center gap-1.5 font-mono text-xs font-semibold text-fg">Engagement over time</h2><p class="mt-1 flex flex-wrap items-center gap-x-2.5 gap-y-1 font-mono text-[9px] tabular-nums text-faint"><span> views</span><span> likes</span><span>last 30 days`),ne=p(`<div class="fixed inset-0 z-[100] flex items-center justify-center overflow-hidden p-3 sm:p-8"><button type=button aria-label="Close expanded dashboard by clicking outside"class="absolute inset-0 cursor-default border-0 bg-black/50 p-0 backdrop-blur-[2px]"></button><div role=dialog aria-modal=true aria-label="Expanded dashboard"class="relative z-10 flex min-w-0 max-w-6xl flex-col overflow-hidden rounded-[9px] border border-edge-bright bg-surface shadow-2xl"style="width:calc(100vw - 1.5rem);max-height:calc(100svh - 1.5rem)"><button type=button aria-label="Close expanded dashboard"autofocus class="absolute top-4 right-4 z-10 bg-surface text-muted hover:text-fg"></button><div class="min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto px-5 py-5 sm:px-8 sm:py-7">`),re=p(`<div><dt class="flex items-center gap-1.5 font-mono text-[9px] uppercase tracking-[0.11em] text-faint"><span></span></dt><dd class="mt-1.5 font-mono text-lg leading-none font-medium tabular-nums text-fg">`),ie=p(`<div class="flex h-36 items-end border-b border-edge pb-3"><p class="font-mono text-[11px] text-faint">No engagement in the last 30 days.`),ae=e=>{let t=(e,t)=>{let n=Math.floor(e*10)/10;return`${Number.isInteger(n)?n.toFixed(0):n.toFixed(1)}${t}`};return e>=1e6?t(e/1e6,`m`):e>=1e3?t(e/1e3,`k`):D(e)};function $(a){let[u,p]=t(null),[m,g]=t(!1),_=()=>a.viewsOverTime??[],y=()=>a.likesOverTime??[],x=n(()=>_().reduce((e,t)=>e+t,0)),T=n(()=>y().reduce((e,t)=>e+t,0)),E=n(()=>[{label:`artifacts`,value:a.stats?.artifacts??a.rows.filter(e=>e.format===`markup`).length,Icon:k},{label:`assets`,value:a.stats?.assets??a.rows.filter(e=>e.format!==`markup`&&e.format!==`folder`).length,Icon:v},{label:`views`,value:a.stats?.views??a.rows.filter(e=>e.format===`markup`).reduce((e,t)=>e+(t.views??0),0),Icon:b},{label:`likes`,value:a.likes??0,Icon:C},{label:`followers`,value:a.followers??0,Icon:w},{label:`forks`,value:a.forks??0,Icon:S}]),O=n(()=>Math.max(1,..._(),...y())),j=e=>{let t=Math.max(_().length,y().length,2);return Array.from({length:t},(n,r)=>{let i=e[r-(t-e.length)]??0;return`${r/(t-1)*240},${130-i/O()*115}`}).join(` `)};return[r(o,{get when(){return!m()||a.expanded},get children(){var e=te(),t=e.firstChild,n=t.firstChild,d=n.firstChild,m=t.nextSibling,h=m.nextSibling,v=h.firstChild.firstChild,b=v.firstChild,S=v.nextSibling.firstChild,C=S.firstChild,w=S.nextSibling,O=w.firstChild;return f(n,r(V,{size:12,class:`text-accent`}),d),f(t,r(o,{get when(){return!a.expanded},get children(){var e=Q();return e.$$click=()=>g(!0),f(e,r(U,{size:13})),e}}),null),f(m,r(i,{get each(){return E()},children:({label:e,value:t,Icon:n},i)=>(()=>{var a=re(),o=a.firstChild,u=o.firstChild,d=o.nextSibling;return f(o,r(n,{size:10,class:`transition-colors group-hover:text-accent`}),u),f(u,e),f(d,()=>ae(t)),c(n=>{var r=`group py-2.5 ${i()%2?`border-l border-edge pl-3`:`pr-3`} ${i()>1?`border-t border-edge`:``}`,o=`${D(t)} ${e}`;return r!==n.e&&s(a,n.e=r),o!==n.t&&l(d,`title`,n.t=o),n},{e:void 0,t:void 0}),a})()})),f(v,r(L,{size:12,class:`text-accent`}),b),f(S,x,C),f(w,T,O),f(h,r(o,{get when(){return x()+T()>0},get fallback(){return ie()},get children(){var e=ee(),t=e.firstChild,n=t.firstChild,r=n.nextSibling,i=t.nextSibling,a=i.firstChild,o=a.nextSibling;return n.$$click=()=>p(u()===`views`?null:`views`),r.$$click=()=>p(u()===`likes`?null:`likes`),i.$$dblclick=()=>p(null),a.$$click=()=>p(u()===`views`?null:`views`),o.$$click=()=>p(u()===`likes`?null:`likes`),c(t=>{var i=`Interactive engagement chart: ${x()} views and ${T()} likes in the last 30 days`,s=u()===`views`,c=u()===`likes`,d=j(_()),f=u()===`likes`?.18:1,p=j(y()),m=u()===`views`?.18:1;return i!==t.e&&l(e,`aria-label`,t.e=i),s!==t.t&&l(n,`aria-pressed`,t.t=s),c!==t.a&&l(r,`aria-pressed`,t.a=c),d!==t.o&&l(a,`points`,t.o=d),f!==t.i&&l(a,`opacity`,t.i=f),p!==t.n&&l(o,`points`,t.n=p),m!==t.s&&l(o,`opacity`,t.s=m),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),e}}),null),c(t=>{var n=a.expanded?`Expanded dashboard content`:`Dashboard`,r=a.expanded?`Expanded dashboard metrics`:`Dashboard metrics`,i=`grid grid-cols-2 border-b border-edge ${a.expanded?`sm:grid-cols-3 lg:grid-cols-6`:``}`;return n!==t.e&&l(e,`aria-label`,t.e=n),r!==t.t&&l(m,`aria-label`,t.t=r),i!==t.a&&s(m,t.a=i),t},{e:void 0,t:void 0,a:void 0}),e}}),r(o,{get when(){return h(()=>!!m())()&&!a.expanded},get children(){return r(d,{get mount(){return document.body},get children(){return r(P,{onClose:()=>g(!1),get children(){var t=ne(),n=t.firstChild,i=n.nextSibling.firstChild,o=i.nextSibling;return n.$$click=()=>g(!1),i.$$click=()=>g(!1),f(i,r(A,{size:16})),f(o,r($,e(a,{expanded:!0}))),t}})}})}})]}a([`click`,`dblclick`]);var oe=p(`<div aria-label="Loading workspace"role=status aria-busy=true class="grid gap-10 lg:grid-cols-[minmax(0,1fr)_16rem] xl:grid-cols-[minmax(0,1fr)_18rem] motion-safe:animate-pulse"><span class=sr-only>Loading workspace</span><div aria-hidden=true><div class="mb-6 h-9 w-40 rounded bg-surface"></div><div class="grid grid-cols-2 gap-6 sm:grid-cols-3"><div class="h-44 rounded border border-edge bg-surface"></div></div></div><div aria-hidden=true class="hidden border-l border-edge pl-6 lg:block"><div class="h-10 rounded bg-surface"></div><div class="mt-12 h-80 rounded border border-edge bg-surface">`),se=p(`<div class="grid gap-y-3 lg:grid-cols-[minmax(0,1fr)_16rem] lg:gap-x-10 lg:gap-y-0 xl:grid-cols-[minmax(0,1fr)_18rem]"><div class="lg:col-start-2 lg:row-start-1 lg:pl-6"></div><div class="min-w-0 lg:col-start-1 lg:row-start-1"></div><aside aria-label="Dashboard rail"class="min-w-0 border-t border-edge pt-6 lg:col-start-2 lg:row-start-1 lg:border-t-0 lg:border-l lg:pt-24 lg:pl-6">`),ce=p(`<div role=alert>Could not load workspace insights. <button type=button aria-label="Retry workspace insights">Try again`),le=p(`<div aria-label="Loading workspace insights"role=status aria-busy=true class="min-h-80 motion-safe:animate-pulse"><span class=sr-only>Loading workspace insights</span><div class="h-32 rounded border border-edge bg-surface"></div><div class="mt-6 h-40 rounded border border-edge bg-surface">`),ue=`mx-auto max-w-[80rem] px-4 sm:px-6`;function de(){return oe()}function fe(e){let t=()=>e.insights===void 0&&`viewsOverTime`in e.workspace?e.workspace:e.insights;return(()=>{var n=se(),i=n.firstChild,a=i.nextSibling,s=a.nextSibling;return f(i,r(Z,{get parentId(){return e.parentId},get onCreated(){return e.onCreated}})),f(a,()=>e.children),f(s,r(o,{get when(){return t()},get fallback(){return r(o,{get when(){return e.insightsError},get fallback(){return le()},get children(){var t=ce(),n=t.firstChild.nextSibling;return m(n,`click`,e.onCreated,!0),t}})},children:t=>r($,{get rows(){return e.workspace.artifacts.map(e=>({...e,views:t().views?.[e.id]??(`views`in e?e.views:0)}))},get stats(){return t().stats},get viewsOverTime(){return t().viewsOverTime},get likes(){return t().likes},get likesOverTime(){return t().likesOverTime},get followers(){return t().followers},get forks(){return t().forks}})})),c(()=>l(n,`aria-label`,e.label??`Home workspace`)),n})()}a([`click`]);export{fe as n,de as r,ue as t};
@@ -1 +1 @@
1
- import{i as e,n as t,o as n,s as r,t as i}from"./document-update-client-DUF0zs2Z.js";import{n as a,t as o}from"./http-C2exCIpl.js";function s(n){let i,a=null,o=0,s=new Map,c=()=>{i?.terminate(),i=null,a=null;for(let e of s.values())e(null);s.clear()},l=()=>{if(i!==void 0)return i;try{i=n()}catch{i=null}return i?(i.onmessage=e=>{let t=s.get(e.data.id);t&&(s.delete(e.data.id),t(e.data))},i.onerror=e=>{e.preventDefault?.(),c()},i.onmessageerror=()=>c(),i):null},u=(e,t,n)=>new Promise(r=>{s.set(t.id,r);try{e.postMessage(t),n?.()}catch{s.delete(t.id),r(null)}}),d=async(e,t)=>{let{nodes:n,claimedIds:r,...i}=t,a=Object.keys(n),s=Object.keys(r),c=Math.max(1,Math.ceil(a.length/200),Math.ceil(s.length/200)),l=(e,t,n)=>Object.fromEntries(t.slice(n*200,(n+1)*200).map(t=>[t,e[t]]));for(let t=0;t<c;t++)t&&await new Promise(e=>setTimeout(e,0)),e.postMessage({id:++o,kind:`graph-part`,...t===0?{graph:i}:{},nodes:l(n,a,t),claimedIds:l(r,s,t)})},f=Promise.resolve(),p=(e,t)=>{let n=f.then(()=>m(e,t));return f=n.catch(()=>{}),n},m=async(e,n)=>{let r=l();if(r){let{document:s,...c}=e,l=s!==a&&!!s&&Object.keys(s.nodes).length>200;if(l&&(a=null,await d(r,s)),i!==r)return t(e,n);let f=await u(r,{id:++o,base:c,change:n,...l?{staged:!0}:s===a?{}:{document:s}},()=>{a=s});if(f){if(!f.ok)throw Error(f.message);if(`update`in f)return{update:f.update,...f.context===void 0?{}:{context:f.context}}}}return t(e,n)};return Object.assign(p,{advance:async(t,n,i)=>{let s=e(t,n,i);if(!s)return null;let c=a===t?l():null;if(c){let e=await u(c,{id:++o,kind:`advance`,version:n,patch:i},()=>{a=s});if(e?.ok&&`source`in e)return{document:s,source:e.source};a===s&&(a=null)}return{document:s,source:r(s)}},warm:e=>l()?p(e,{}).then(()=>{},()=>{}):Promise.resolve(),offThread:()=>!!l()})}var c=s(()=>typeof Worker>`u`?null:new Worker(new URL(`/assets/document-prepare.worker-DbqBFReF.js`,``+import.meta.url),{type:`module`,name:`document-prepare`}));function l(e,t,n){return c.advance(e,t,n)}function u(){return c.offThread()}function d(e){return c.warm(e)}async function f(e,t,n){return i(await c(t,n),t=>e.prepare(t))}async function p(e,t,n){let r=o(e),i=await r.head();if(!i.ok)return i;let s=await i.json();if(typeof s.state!=`string`||!Number.isSafeInteger(s.version))return Response.json({error:`invalid_response`,details:[{message:`Refresh the artifact before saving.`}]},{status:502});let{source:c,annotationOps:l,...u}=t;if(c!==void 0&&s.edit_id!==n)return Response.json({error:`doc_changed`,edit_id:s.edit_id,version:s.version,source:s.markup},{status:409});if(s.document?.kind===`graph`&&s.format!==`folder`){let t=new Set([`title`,`description`,`theme`,`template`,`colorMode`,`visibility`,`linkRole`,`parent_id`,`shares`]);if(Object.keys(u).some(e=>!t.has(e)))return Response.json({error:`invalid_metadata`,allowed:[...t]},{status:400});let n=Object.fromEntries(Object.entries(u).filter(([e])=>[`title`,`description`,`theme`,`template`,`colorMode`].includes(e))),i=await f(a(e),{...s,document:s.document,meta:s},{source:c,metadata:n,annotationOps:l}),o=Object.fromEntries(Object.entries(u).filter(([e])=>[`visibility`,`linkRole`,`parent_id`,`shares`].includes(e)).map(([e,t])=>[e===`parent_id`?`parentId`:e,t]));return Object.keys(o).length&&Object.assign(i,{settings:o,expectedSharingRevision:s.sharing_revision??0,expectedParentIds:s.ancestor_ids??[]}),r.edits({edit_id:s.edit_id,document_update:i})}return c===void 0?r.patch({...u,expectedState:s.state}):Response.json({error:`not_editable`},{status:400})}async function m(e,t){let r=await e.load();if(!r)return null;let i=await e.version(t);if(!i)return null;if(i.format!==`markup`){let n=await e.revert({version:t,expectedVersion:r.version,expectedState:r.state});return n.ok?n.body.version:null}if(typeof i.markup!=`string`)return null;if(i.previous_engine)throw Error(i.previous_engine);let a=r.document?.kind===`graph`?r.document:n(``,r.version),o=await f(e,{...r,document:a,meta:{...r}},{source:i.markup,whole:!0,metadata:{title:i.title??null,description:i.description??null,theme:i.meta.theme??null,template:i.meta.template??null,colorMode:i.meta.colorMode??null}}),s=await e.commitEdit({edit_id:r.edit_id,document_update:o});return s.ok?s.body.version:null}export{u as a,f as i,p as n,d as o,l as r,m as t};
1
+ import{i as e,n as t,o as n,s as r,t as i}from"./document-update-client-td73lQ81.js";import{n as a,t as o}from"./http-DEdzW08u.js";function s(n){let i,a=null,o=0,s=new Map,c=()=>{i?.terminate(),i=null,a=null;for(let e of s.values())e(null);s.clear()},l=()=>{if(i!==void 0)return i;try{i=n()}catch{i=null}return i?(i.onmessage=e=>{let t=s.get(e.data.id);t&&(s.delete(e.data.id),t(e.data))},i.onerror=e=>{e.preventDefault?.(),c()},i.onmessageerror=()=>c(),i):null},u=(e,t,n)=>new Promise(r=>{s.set(t.id,r);try{e.postMessage(t),n?.()}catch{s.delete(t.id),r(null)}}),d=async(e,t)=>{let{nodes:n,claimedIds:r,...i}=t,a=Object.keys(n),s=Object.keys(r),c=Math.max(1,Math.ceil(a.length/200),Math.ceil(s.length/200)),l=(e,t,n)=>Object.fromEntries(t.slice(n*200,(n+1)*200).map(t=>[t,e[t]]));for(let t=0;t<c;t++)t&&await new Promise(e=>setTimeout(e,0)),e.postMessage({id:++o,kind:`graph-part`,...t===0?{graph:i}:{},nodes:l(n,a,t),claimedIds:l(r,s,t)})},f=Promise.resolve(),p=(e,t)=>{let n=f.then(()=>m(e,t));return f=n.catch(()=>{}),n},m=async(e,n)=>{let r=l();if(r){let{document:s,...c}=e,l=s!==a&&!!s&&Object.keys(s.nodes).length>200;if(l&&(a=null,await d(r,s)),i!==r)return t(e,n);let f=await u(r,{id:++o,base:c,change:n,...l?{staged:!0}:s===a?{}:{document:s}},()=>{a=s});if(f){if(!f.ok)throw Error(f.message);if(`update`in f)return{update:f.update,...f.context===void 0?{}:{context:f.context}}}}return t(e,n)};return Object.assign(p,{advance:async(t,n,i)=>{let s=e(t,n,i);if(!s)return null;let c=a===t?l():null;if(c){let e=await u(c,{id:++o,kind:`advance`,version:n,patch:i},()=>{a=s});if(e?.ok&&`source`in e)return{document:s,source:e.source};a===s&&(a=null)}return{document:s,source:r(s)}},warm:e=>l()?p(e,{}).then(()=>{},()=>{}):Promise.resolve(),offThread:()=>!!l()})}var c=s(()=>typeof Worker>`u`?null:new Worker(new URL(`/assets/document-prepare.worker-DbqBFReF.js`,``+import.meta.url),{type:`module`,name:`document-prepare`}));function l(e,t,n){return c.advance(e,t,n)}function u(){return c.offThread()}function d(e){return c.warm(e)}async function f(e,t,n){return i(await c(t,n),t=>e.prepare(t))}async function p(e,t,n){let r=o(e),i=await r.head();if(!i.ok)return i;let s=await i.json();if(typeof s.state!=`string`||!Number.isSafeInteger(s.version))return Response.json({error:`invalid_response`,details:[{message:`Refresh the artifact before saving.`}]},{status:502});let{source:c,annotationOps:l,...u}=t;if(c!==void 0&&s.edit_id!==n)return Response.json({error:`doc_changed`,edit_id:s.edit_id,version:s.version,source:s.markup},{status:409});if(s.document?.kind===`graph`&&s.format!==`folder`){let t=new Set([`title`,`description`,`theme`,`template`,`colorMode`,`visibility`,`linkRole`,`parent_id`,`shares`]);if(Object.keys(u).some(e=>!t.has(e)))return Response.json({error:`invalid_metadata`,allowed:[...t]},{status:400});let n=Object.fromEntries(Object.entries(u).filter(([e])=>[`title`,`description`,`theme`,`template`,`colorMode`].includes(e))),i=await f(a(e),{...s,document:s.document,meta:s},{source:c,metadata:n,annotationOps:l}),o=Object.fromEntries(Object.entries(u).filter(([e])=>[`visibility`,`linkRole`,`parent_id`,`shares`].includes(e)).map(([e,t])=>[e===`parent_id`?`parentId`:e,t]));return Object.keys(o).length&&Object.assign(i,{settings:o,expectedSharingRevision:s.sharing_revision??0,expectedParentIds:s.ancestor_ids??[]}),r.edits({edit_id:s.edit_id,document_update:i})}return c===void 0?r.patch({...u,expectedState:s.state}):Response.json({error:`not_editable`},{status:400})}async function m(e,t){let r=await e.load();if(!r)return null;let i=await e.version(t);if(!i)return null;if(i.format!==`markup`){let n=await e.revert({version:t,expectedVersion:r.version,expectedState:r.state});return n.ok?n.body.version:null}if(typeof i.markup!=`string`)return null;if(i.previous_engine)throw Error(i.previous_engine);let a=r.document?.kind===`graph`?r.document:n(``,r.version),o=await f(e,{...r,document:a,meta:{...r}},{source:i.markup,whole:!0,metadata:{title:i.title??null,description:i.description??null,theme:i.meta.theme??null,template:i.meta.template??null,colorMode:i.meta.colorMode??null}}),s=await e.commitEdit({edit_id:r.edit_id,document_update:o});return s.ok?s.body.version:null}export{u as a,f as i,p as n,d as o,l as r,m as t};
@@ -1 +1 @@
1
- import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BtmRR9Ax.js";var r=[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]],i=i=>t(n,e(i,{iconNode:r,name:`chevron-down`}));export{i as t};
1
+ import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BNcsMwv4.js";var r=[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]],i=i=>t(n,e(i,{iconNode:r,name:`chevron-down`}));export{i as t};
@@ -1 +1 @@
1
- import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BtmRR9Ax.js";var r=[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]],i=i=>t(n,e(i,{iconNode:r,name:`chevron-left`}));export{i as t};
1
+ import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BNcsMwv4.js";var r=[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]],i=i=>t(n,e(i,{iconNode:r,name:`chevron-left`}));export{i as t};
@@ -1 +1 @@
1
- import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BtmRR9Ax.js";var r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]],i=i=>t(n,e(i,{iconNode:r,name:`copy`}));export{i as t};
1
+ import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BNcsMwv4.js";var r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]],i=i=>t(n,e(i,{iconNode:r,name:`copy`}));export{i as t};
@@ -1 +1 @@
1
- import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BtmRR9Ax.js";var r=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]],i=i=>t(n,e(i,{iconNode:r,name:`database`}));export{i as t};
1
+ import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BNcsMwv4.js";var r=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]],i=i=>t(n,e(i,{iconNode:r,name:`database`}));export{i as t};
@@ -0,0 +1,2 @@
1
+ ;��J���I���ATR����E�9����[�Q a�`�?p[7+��y��������1.|����OU �%�@�����^�a�).B'�"�g�=�A3 �3z�i�4�r��)��Z��\ܧ[�NdzC��`��Z���������O
2
+ ����e�ӷ�w0�ާQ/:/_X�T��
@@ -1,4 +1,4 @@
1
- import{a as e,i as t,l as n,o as r,t as i,u as a}from"./jsx-vj4cHW_Q.js";import{_ as o,a as s,c,d as l,f as u,g as ee,h as d,i as f,l as p,m,o as te,p as ne,s as h,t as re,u as ie}from"./person-mentions-BEjAedYZ.js";import{O as ae,k as oe}from"./solid-app-BtmRR9Ax.js";import{i as se,n as ce,t as le}from"./serialize-n0A-pNlo.js";import"./src-CcX8uAQo.js";import{n as ue}from"./artifact-reference-ChS4TSVz.js";import{n as de}from"./annotation-range-DqD0nTBm.js";import{t as fe}from"./runtime-id-CM5my_RX.js";var pe=[{component:!1,tag:`img`,attribute:`src`,kind:`image`},{component:!1,tag:`img`,attribute:`srcset`,kind:`image`,list:!0},{component:!1,tag:`source`,attribute:`srcset`,kind:`image`,list:!0},{component:!1,tag:`video`,attribute:`poster`,kind:`image`},{component:!0,tag:`File`,attribute:`src`,kind:`pdf`},{component:!1,tag:`a`,attribute:`href`,kind:`asset`},{component:!1,tag:`video`,attribute:`src`,kind:`file`},{component:!1,tag:`audio`,attribute:`src`,kind:`file`},{component:!1,tag:`source`,attribute:`src`,kind:`file`},{component:!1,tag:`track`,attribute:`src`,kind:`file`}],me=`Helmet`,he={title:null,style:null,script:null,meta:[],imports:[],values:[],queries:[],mutations:[]},ge=e=>({imports:e.imports,values:e.values,queries:e.queries,mutations:e.mutations,...e.notifications?.length?{notifications:e.notifications}:{}}),_e={[f]:ie,[c]:m,[h]:ne,[s]:l,[te]:u},ve=[`title`,`style`,`script`,`meta`],ye=[`name`,`content`],be=e=>e.type===`element`&&e.isComponent&&e.tag===`Helmet`;function xe(e,t=[]){for(let n of e)n.type===`element`&&(be(n)&&t.push(n),xe(n.children,t));return t}var Se=e=>e.children.filter(e=>e.type!==`text`||e.value.trim()!==``);function Ce(e,t){let n=Se(e);if(n.length===0)return``;if(n.length!==1)return null;let r=n[0];return r.type===`text`?t?r.value:null:r.type===`expression`&&r.value.static&&typeof r.value.json==`string`?r.value.json:null}function we(e){let t=e.attributes.filter(e=>e.name===`type`);return t.length?t.length!==1||!t[0].value.static?`invalid`:t[0].value.json===`server`?`server`:t[0].value.json===`module`?`browser`:`invalid`:`browser`}function Te(e){let t=[],n=xe(e);for(let e of n.slice(1))t.push({message:`A document may carry only one <Helmet> — another begins at offset ${n[0].start}.`,tag:me,start:e.start,end:e.end});let r=n[0];if(!r)return t;if(r.attributes.length>0){let e=r.attributes[0];t.push({message:`<Helmet> takes no attributes (got "${e.name}")`,tag:me,attr:e.name,start:e.start,end:e.end})}let i=new Set,a=new Set;for(let e of Se(r)){if(e.type===`element`&&e.isComponent&&_e[e.tag]){let n=_e[e.tag](e);n.ok||t.push(...n.errors);continue}if(e.type!==`element`||!ve.includes(e.tag.toLowerCase())||e.isComponent){t.push({message:`<Helmet> may only contain <title>, <style>, <script>, <meta>, <Import>, <Value>, <Query>, <Mutation>, <Notify>`,start:e.start,end:e.end,...e.type===`element`?{tag:e.tag}:{}});continue}let n=e.tag.toLowerCase();if(n===`meta`){let r=new Map(e.attributes.map(e=>[e.name.toLowerCase(),e])),i=e.attributes.find(e=>!ye.includes(e.name.toLowerCase()));if(i){t.push({message:`<meta> inside <Helmet> carries name and content only (got "${i.name}") — http-equiv and charset are the document's own to set`,tag:n,attr:i.name,start:i.start,end:i.end});continue}let o=r.get(`name`),s=r.get(`content`),c=o?.value.static&&typeof o.value.json==`string`?o.value.json:null,l=s?.value.static&&typeof s.value.json==`string`?s.value.json:null;if(!c||l===null){t.push({message:`<meta> needs both name and content as string literals`,tag:n,start:e.start,end:e.end});continue}if(a.has(c)){t.push({message:`<Helmet> already carries a <meta name="${c}">`,tag:n,start:e.start,end:e.end});continue}c===`artifactbin:og-image`&&!/^ref:[A-Za-z0-9_-]+$/.test(l)&&t.push({message:`artifactbin:og-image needs an uploaded image reference: ref:<imageId>`,tag:n,start:e.start,end:e.end}),a.add(c);continue}let r=n,o=r===`script`?we(e):null;r===`script`&&o===`invalid`&&t.push({message:`<script> type must be "server" or "module" (or omitted for a browser module)`,tag:n,start:e.start,end:e.end});let s=r===`script`&&o===`server`?`server script`:r;if(i.has(s)){t.push({message:`<Helmet> may carry at most one ${s===`server script`?`<script type="server">`:`<${r}>`}`,tag:n,start:e.start,end:e.end});continue}i.add(s);let c=e.attributes.find(e=>r!==`script`||e.name!==`type`);if(c){let e=c;t.push({message:`<${r}> inside <Helmet> takes no attributes (got "${e.name}")`,tag:n,attr:e.name,start:e.start,end:e.end})}let l=Ce(e,r===`title`);if(l===null){t.push({message:r===`title`?`<title> holds a single text child`:`<${r}> holds a single template-literal child: <${r}>{\`…\`}</${r}>`,tag:n,start:e.start,end:e.end});continue}r===`script`&&/<\/script/i.test(l)&&t.push({message:`script text may not contain "<\/script" (it cannot be escaped in serialized HTML) — split the string, e.g. "</scr" + "ipt"`,tag:n,start:e.start,end:e.end})}return t}function Ee(e){let t={...he,meta:[],imports:[],values:[],queries:[],mutations:[]};for(let n of Se(e)){if(n.type!==`element`)continue;if(n.isComponent){if(n.tag===`Import`){let e=ie(n);e.ok&&t.imports.push(e.decl)}else if(n.tag===`Value`){let e=m(n);e.ok&&t.values.push(e.decl)}else if(n.tag===`Query`){let e=ne(n);e.ok&&t.queries.push(e.decl)}else if(n.tag===`Mutation`){let e=l(n);e.ok&&t.mutations.push(e.decl)}else if(n.tag===`Notify`){let e=u(n);e.ok&&(t.notifications??=[]).push(e.decl)}continue}let e=n.tag.toLowerCase();if(e===`script`){let e=we(n);e===`server`?t.serverScript??=Ce(n,!1)??void 0:e===`browser`&&(t.script??=Ce(n,!1))}else if(e===`title`||e===`style`)t[e]=t[e]??Ce(n,e===`title`);else if(e===`meta`){let e=e=>{let t=n.attributes.find(t=>t.name.toLowerCase()===e);return t?.value.static&&typeof t.value.json==`string`?t.value.json:null},r=e(`name`),i=e(`content`);r&&i!==null&&!t.meta.some(e=>e.name===r)&&t.meta.push({name:r,content:i})}}return t}function De(e){let t=[],n=!1;for(let r of e){if(r.type!==`element`){t.push(r);continue}if(be(r)){n=!0;continue}let e=De(r.children);e===r.children?t.push(r):(n=!0,t.push({...r,children:e}))}return n?t:e}function Oe(e){let t=ke.get(e);if(t)return t;let n=xe(e)[0]??null,r=n?{helmet:n,content:Ee(n),body:De(e)}:{helmet:null,content:he,body:e};return ke.set(e,r),r}var ke=new WeakMap;function Ae(e){let{helmet:t,body:n}=Oe(e);return t?[t,...n]:e}var je=new Set(`address.article.aside.blockquote.details.dialog.div.dl.dd.dt.fieldset.figcaption.figure.footer.header.hr.h1.h2.h3.h4.h5.h6.li.main.nav.ol.p.pre.section.summary.table.ul`.split(`.`)),Me=new Set([`button`,`template`,`table`,`td`,`th`,`caption`,`object`,`marquee`,`applet`]),Ne=new Set([`blockquote`,`dd`,`div`,`dl`,`dt`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`hr`,`li`,`ol`,`p`,`pre`,`table`,`ul`]),Pe=e=>e.type===`element`;function Fe(e,t=!1){return e.some(e=>{if(!Pe(e))return!1;if(e.isComponent)return e.tag===`For`&&(!t||Fe(e.children,t));let n=e.tag.toLowerCase();return(t?Ne:je).has(n)?!0:!Me.has(n)&&Fe(e.children,t||n===`svg`)})}function Ie(e){let t=!1,n=e.map(e=>{if(!Pe(e))return e;let n=Ie(e.children),r=!e.isComponent&&e.tag.toLowerCase()===`p`&&Fe(e.children);return!r&&n===e.children?e:(t=!0,{...e,...r?{tag:`div`}:{},children:n})});return t?n:e}function Le(e){let t=new Set,n=e.type===`element`?{...e,children:[]}:e;for(let e of p([n]))t.add(`use:${e.name}`);if(e.type===`element`){t.add(`tag:${e.tag}`);let n=t=>{let n=e.attributes.find(e=>e.name===t)?.value;return n?.static&&typeof n.json==`string`?n.json:void 0},r=n(`id`);if(r&&t.add(`id:${r}`),[`Value`,`Query`,`Mutation`].includes(e.tag)){let r=n(`name`);if(r&&t.add(`declaration:${r}`),e.tag!==`Value`){let n=e.children.map(e=>e.type===`text`?e.value:e.type===`expression`&&e.value.static&&typeof e.value.json==`string`?e.value.json:``).join(``);for(let e of n.match(/[A-Za-z_]\w*/g)??[])t.add(`dependency:${e}`)}}}return[...t].sort()}var Re=[`first`,`last`,`sum`,`avg`,`median`,`min`,`max`,`count`];function ze(e){if(typeof e!=`string`)return null;let t=ue.exec(e);return t?t[1]:null}function Be(e,t){for(let n of e)n.type===`element`&&(t(n),Be(n.children,t))}var Ve=(e,t)=>{let n=e.attributes.find(e=>e.name.toLowerCase()===t.toLowerCase())?.value;return n&&n.static?n.json:void 0};function He(t){let r=n(t);if(!r.ok)return null;let i=[];return Be(r.nodes,t=>{let n=t.tag;if(t.isComponent&&n===`Import`){let e=ie(t);e.ok&&i.push({id:e.decl.ref,kind:`dataset`,via:`sql`});return}if(t.isComponent&&(n===`Query`||n===`Notify`)){let e=n===`Notify`?u(t):ne(t);e.ok&&e.decl.source&&i.push({id:e.decl.source,kind:`dataset`,via:`sql`});return}if(!t.isComponent&&n.toLowerCase()===`meta`&&[`artifactbin:og-image`,`artifactbin:pwa-icon`].includes(String(Ve(t,`name`)))){let e=ze(Ve(t,`content`));e&&i.push({id:e,kind:`image`})}if(n===`Value`){let e=ze(Ve(t,`source`));e&&i.push({id:e,kind:`dataset`})}let r=Ve(t,`data`),a=Ve(t,`viz`),o=a?ze(a.recipe):null;o&&i.push({id:o,kind:`viz`,element:{viz:a??null,dataRef:typeof r==`string`?r:null}});for(let r of pe){if(r.component!==t.isComponent||r.tag!==(t.isComponent?n:n.toLowerCase()))continue;let a=Ve(t,r.attribute),o=r.list&&typeof a==`string`?e(a,r.attribute):[a];for(let e of o){let t=ze(e);t&&i.push({id:t,kind:r.kind})}}}),i}var Ue={Question:{required:`data`,usage:`Use data="$name" — a <Query> or table <Value> declared in <Helmet> — plus viz={{"kind":"vega-lite","spec":{…}}}`,table:!0},Number:{required:`data`,usage:`Use data="$name" — a <Query> or table <Value> declared in <Helmet>`,table:!0},DataTable:{required:`data`,usage:`Use data="$name" — a <Query> or table <Value> declared in <Helmet>`,table:!0},Files:{required:`data`,usage:`Use data="$name" — a <Query> over a folder's children (<Import name="files" src="ref:<folderId>" />, select * from files.rows)`,table:!0},File:{required:`src`,usage:`Use src="ref:<pdf id>" — the id create_artifact returned for a pdf — or src="<public https link to a .pdf>" (+ optionally title="…")`}};function We(e){let t=[];for(let n of e.attributes)if(n.value.static&&(e.tag===`Number`&&n.name===`format`&&typeof n.value.json==`string`&&!oe(n.value.json)&&t.push({attr:n.name,spec:n.value.json,start:n.start,end:n.end}),e.tag===`DataTable`&&n.name===`columns`&&Array.isArray(n.value.json)))for(let e of n.value.json){let r=e&&typeof e==`object`?e.fmt:void 0;typeof r==`string`&&!oe(r)&&t.push({attr:n.name,spec:r,start:n.start,end:n.end})}return t}function Ge(e){let t=n(e);if(!t.ok)return[];let r=[];return Be(t.nodes,e=>{let t=Ue[e.tag];if(!t)return;if(e.tag===`Number`){let t=e.attributes.find(e=>e.name===`agg`),n=t?.value.static?t.value.json:void 0;t&&!Re.some(e=>e===n)&&r.push({message:`<Number agg>: expected one of ${Re.join(`, `)} ("mean" is avg; the final row's cell is last).`,tag:e.tag,attr:`agg`,start:t.start,end:t.end})}for(let t of We(e))r.push({message:`<${e.tag} ${t.attr}=${JSON.stringify(t.spec)}>: ${JSON.stringify(t.spec)} is not a number format — write ${ae}.`,tag:e.tag,attr:t.attr,start:t.start,end:t.end});let n=t.required;if(e.tag===`Question`){let t=e.attributes.find(e=>e.name===`singleValueConfig`),n=e.attributes.find(e=>e.name===`viz`),i=n?.value.static&&n.value.json&&typeof n.value.json==`object`&&!Array.isArray(n.value.json)?n.value.json:null,a=i&&`singleValueConfig`in i&&i.kind!==`single_value`;if(t||a){let i=t??n;r.push({message:`<Question> KPI tile: singleValueConfig lives INSIDE viz with kind "single_value" — viz={{"kind":"single_value","yCols":["<numeric column>"],"singleValueConfig":{"label":"…","prefix":"$","suffix":"","format":",.0f"}}} (the column is summed over the table's rows; format is a d3-format spec). Written any other way it renders as a table.`,tag:e.tag,attr:i.name,start:i.start,end:i.end});return}if(i&&!(`spec`in i)&&(`mark`in i||`encoding`in i)){r.push({message:`<Question viz={…}> is the ENVELOPE, not the spec: a top-level "mark"/"encoding" renders a blank chart. Wrap it — viz={{"kind":"vega-lite","spec":{"mark":"line","encoding":{…}}}}.`,tag:e.tag,attr:n.name,start:n.start,end:n.end});return}}let i=e.attributes.find(e=>e.name.toLowerCase()===n);if(i){if(!t.table||i.value.static&&d(i.value.json))return;let n=i.value.static?i.value.json:void 0,a=i.value.static?JSON.stringify(n):i.value.exprType;r.push({message:`<${e.tag} data=${a.length>40?a.slice(0,40)+`…`:a}> does not name a declared table. ${t.usage}`+(typeof n==`string`&&n.startsWith(`ref:`)?` — a dataset is read through SQL: <Import name="data" src="${n}" /><Query name="rows">{\`select * from data.rows\`}</Query>, then data="$rows".`:`.`),tag:e.tag,attr:i.name,start:i.start,end:i.end});return}let a=[...new Set(e.attributes.map(e=>e.name.toLowerCase()))].filter(e=>e!==`title`&&e!==`height`&&e!==`classname`);r.push({message:`<${e.tag}> has no "${n}" prop, so nothing resolves and the embed renders empty. `+t.usage+(a.length?`. Found: ${a.join(`, `)}.`:`.`),tag:e.tag,start:e.start,end:e.end})}),r}var Ke=new Set(`section.article.div.p.span.h1.h2.h3.h4.h5.h6.ul.ol.li.strong.em.blockquote.header.footer.main.aside.a.b.i.u.s`.split(`.`)),qe=/\b(?:class(?:Name)?|data-design|style)\s*=|<\/?style\b|\{\s*\$_row\.|\/people\//i,Je=e=>typeof e==`string`&&!e.includes(`\0`)&&!e.includes(`\r`)&&e.isWellFormed()&&!qe.test(e);function Ye(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=String.fromCharCode(r&255,r>>>8)}return btoa(t)}function Xe(e){let t=atob(e),n=``;for(let e=0;e<t.length;e+=2)n+=String.fromCharCode(t.charCodeAt(e)|t.charCodeAt(e+1)<<8);return n}var Ze=e=>typeof e==`string`&&(e.includes(`\0`)||!e.isWellFormed());function Qe(e){return Ze(e)?[`string16`,Ye(e)]:Array.isArray(e)?[`array`,e.map(Qe)]:e&&typeof e==`object`?[`object`,Object.entries(e).map(([e,t])=>[Ze(e)?Qe(e):e,Qe(t)])]:[`value`,e]}function $e(e){switch(e[0]){case`string16`:return Xe(e[1]);case`array`:return e[1].map($e);case`object`:return Object.fromEntries(e[1].map(([e,t])=>[typeof e==`string`?e:$e(e),$e(t)]));case`value`:return e[1]}}function et(e){return Array.isArray(e)?e.map(et):!e||typeof e!=`object`?e:Object.fromEntries(Object.entries(e).filter(([e])=>e!==`start`&&e!==`end`).map(([e,t])=>[e,e===`json`?Qe(t):et(t)]))}function tt(e){return Array.isArray(e)?e.map(tt):!e||typeof e!=`object`?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,e===`json`?$e(t):tt(t)]))}var nt=e=>({schema:1,kind:`jsx`,roots:et(e)});function rt(e){if(e.kind===`jsx`)return tt(e.roots);let t=n(e.source);if(!t.ok)throw Error(t.error);return t.nodes}var it=()=>fe(),at=e=>new TextEncoder().encode(e).length,ot=`$root`,st=`validated-graph-v3`;function ct(e){if(e.type!==`element`||!e.children.length)return[le([e])];let t=it(),n=e.children.map((e,n)=>`Graph${t}Child${n}End`),r=le([{...e,children:n.map(e=>({type:`text`,value:e,start:0,end:0}))}]),i=[],a=0,o=e.control?.kind===`and`?n.slice(0,1):n;for(let e of o){let t=r.indexOf(e,a);if(t<a||r.indexOf(e,t+e.length)!==-1)throw Error(`Invalid child serialization boundary`);i.push(r.slice(a,t)),a=t+e.length}return i.push(r.slice(a)),e.control?.kind===`and`&&i.push(``),i}function lt(e,t,n,r){let i=[],a=t;for(let t of r){if(t.start<a||t.end<t.start||t.end>n)throw Error(`Invalid original source boundary`);i.push(e.slice(a,t.start)),a=t.end}return i.push(e.slice(a,n)),i}function ut(e,t,r={}){if(r.preserveSource&&typeof e!=`string`)throw Error(`Original source is required for lossless migration`);let i=r.preserveSource&&typeof e==`string`?e:null,a=typeof e==`string`?n(e):{ok:!0,nodes:e};if(!a.ok)throw Error(a.error);let o={},s=(e,n,r={})=>{let{implicit:a=!1,helmet:c=!1,parentTag:l=``}=r;if(a&&(e.type!==`element`||e.control?.kind!==`fragment`||e.children.length))throw Error(`An AND expression has no editable false branch`);let u=e.graphKey??it();if(u===`$root`||Object.hasOwn(o,u))throw Error(`Duplicate internal node identity`);let{graphKey:ee,...d}=e,f=e.type===`element`?e.children:[],p=e.type===`element`&&e.control?.kind===`and`,m=a?[``]:i===null?ct(e):lt(i,e.start,e.end,p?f.slice(0,1):f);i!==null&&p&&!a&&m.push(``);let te=d.type===`element`?{...d,children:[]}:d,ne=e.type===`element`&&[`Query`,`Mutation`].includes(e.tag)?e:te,h=e.type!==`element`||e.control?[]:(He(le([ne]))??[]).map(({id:e,kind:t})=>({id:e,kind:t})),re={ast:nt([te]),selectors:Le(e),refs:h,parent:n,children:[],parts:m,bytes:at(m.join(``)),units:m.reduce((e,t)=>e+t.length,0),partUnits:m.map(e=>e.length),subtreeUnits:0,prose:e.type===`text`&&!c&&Ke.has(l)&&Je(e.value),selfVersion:t,childrenVersion:t,subtreeVersion:t};return o[u]=re,e.type===`element`&&(re.children=e.children.map((t,n)=>s(t,u,{implicit:e.control?.kind===`and`&&n===1,helmet:c||e.tag===`Helmet`,parentTag:e.tag}))),re.subtreeUnits=re.units+re.children.reduce((e,t)=>e+o[t].subtreeUnits,0),u},c=a.nodes.map(e=>s(e,ot)),l=i===null?c.map(()=>``).concat(``):lt(i,0,i.length,a.nodes),u=l.reduce((e,t)=>e+t.length,0);return o[ot]={ast:null,selectors:[],refs:[],parent:null,children:c,parts:l,bytes:at(l.join(``)),units:u,partUnits:l.map(e=>e.length),subtreeUnits:u+c.reduce((e,t)=>e+o[t].subtreeUnits,0),prose:!1,selfVersion:t,childrenVersion:t,subtreeVersion:t},{schema:3,kind:`graph`,policy:st,nodes:o,claimedIds:Object.fromEntries(Object.values(o).flatMap(e=>e.selectors.filter(e=>e.startsWith(`id:`)).map(e=>[e.slice(3),t]))),bytes:Object.values(o).reduce((e,t)=>e+t.bytes,0)}}function dt(e,t){let n=[],r=new Set([t]),i=e.nodes[t]?.parent;if(i===void 0)throw Error(`Node does not exist`);for(;i!==null;){if(r.has(i)||!e.nodes[i])throw Error(`Invalid parent chain`);r.add(i),n.push(i),i=e.nodes[i].parent}return n}function ft(e){let t=new Set,n=r=>{let i=e.nodes[r];if(!i?.ast||t.has(r))throw Error(`Invalid document graph`);t.add(r);let a=rt(i.ast)[0];if(!a)throw Error(`Missing node data`);return a.graphKey=r,a.type===`element`&&(a.children=i.children.map(n)),t.delete(r),a},r=e.nodes[ot];if(!r)throw Error(`Missing document root`);return r.children.map(n)}function pt(e){let t=new Set,n=r=>{let i=e.nodes[r];if(!i||t.has(r))throw Error(`Invalid document graph`);if(t.add(r),i.children.length&&i.parts.length!==i.children.length+1)throw Error(`Invalid source boundaries`);let a=i.parts[0]+i.children.map((e,t)=>n(e)+i.parts[t+1]).join(``);return t.delete(r),a};return n(ot)}function mt(e){let t=[],n=new Set,r=i=>{let a=e.nodes[i];for(let e of a.refs)n.has(e.id)||(n.add(e.id),t.push(e));a.children.forEach(r)};return r(ot),t}var ht={assign:0,create:0,clone:0,discard:0,update:0};function g(e,t){return ht.assign+=1,{...e,...t}}function gt(e){return Array.isArray(e)}function _t(e){return v(typeof e,`bigint`)}function vt(e){return v(typeof e,`boolean`)}function yt(e){return v(e,null)}function bt(e){return Number.isFinite(e)}function xt(e){return _(e)&&!gt(e)}function _(e){return v(typeof e,`object`)&&!yt(e)}function St(e){return v(typeof e,`string`)}function v(e,t){return e===t}function Ct(e,t){return e>t}function y(e,t,n){return v(e.length,0)?n():t(e[0],e.slice(1))}function wt(e){return v(e,`__proto__`)||v(e,`constructor`)||v(e,`prototype`)}function b(e,t){return wt(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function x(e){return Object.getOwnPropertyNames(e)}function Tt(e){return Object.values(e)}function Et(e){return _(e)&&b(e,`~guard`)}function Dt(e){return e}function Ot(e){return e.map(e=>Mt(e))}function kt(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){let r=n[e];b(r,`value`)&&Object.defineProperty(t,e,{...r,value:Mt(r.value)})}return t}function At(e){return new RegExp(e.source,e.flags)}function jt(e){return e}function Mt(e){return e instanceof RegExp?At(e):Et(e)?Dt(e):gt(e)?Ot(e):_(e)?kt(e):jt(e)}function Nt(e){return ht.clone+=1,Mt(e)}var Pt={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1};function Ft(){return Pt}function It(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function Lt(e,t){return{...e,...t}}function S(e,t,n={}){ht.create+=1;let r=Ft(),i=Lt(t,n),a=r.enumerableKind?Lt(i,e):It(i,e);return r.immutableTypes?Object.freeze(a):a}function Rt(e,t){ht.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(Nt(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function C(e,t,n){ht.update+=1;let r=Ft(),i=Nt(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function w(e,t){return _(e)&&b(e,`~kind`)&&v(e[`~kind`],t)}function zt(e){return _(e)}function Bt(e){return _(e)&&b(e,`~kind`)&&b(e,`type`)&&v(e[`~kind`],`OptionalAddAction`)&&zt(e.type)}function Vt(e){return _(e)&&b(e,`~kind`)&&b(e,`type`)&&v(e[`~kind`],`OptionalRemoveAction`)&&zt(e.type)}function Ht(e){return _(e)&&b(e,`~kind`)&&b(e,`type`)&&v(e[`~kind`],`ReadonlyAddAction`)&&zt(e.type)}function Ut(e){return _(e)&&b(e,`~kind`)&&b(e,`type`)&&v(e[`~kind`],`ReadonlyRemoveAction`)&&zt(e.type)}function T(e,t,n){return S({"~kind":`Deferred`},{action:e,parameters:t,options:n},{})}function Wt(e){return w(e,`Deferred`)}function Gt(e,t){return S({"~kind":`Promise`},{type:`promise`,item:e},t)}function Kt(e){return w(e,`Promise`)}function qt(e){return Rt(e,[`~kind`,`type`,`item`])}function Jt(e){return C(e,{"~immutable":!0},{})}function Yt(e){return Jt(e)}function Xt(e){return zt(e)&&b(e,`~immutable`)}function Zt(e){return Rt(e,[`~optional`])}function Qt(e){return C(e,{"~optional":!0},{})}function E(e){return Qt(e)}function $t(e){return zt(e)&&b(e,`~optional`)}function en(e){return Rt(e,[`~readonly`])}function tn(e){return C(e,{"~readonly":!0},{})}function nn(e){return tn(e)}function rn(e){return zt(e)&&b(e,`~readonly`)}function an(e){return w(e,`Base`)}function D(e,t){return S({"~kind":`Array`},{type:`array`,items:e},t)}function O(e){return w(e,`Array`)}function on(e){return Rt(e,[`~kind`,`type`,`items`])}function sn(e,t){return S({"~kind":`AsyncIterator`},{type:`asyncIterator`,iteratorItems:e},t)}function cn(e){return w(e,`AsyncIterator`)}function ln(e){return Rt(e,[`~kind`,`type`,`iteratorItems`])}function un(e,t,n={}){return S({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function dn(e){return w(e,`Constructor`)}function fn(e){return Rt(e,[`~kind`,`type`,`parameters`,`instanceType`])}function pn(e,t,n={}){return S({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function mn(e){return w(e,`Function`)}function hn(e){return Rt(e,[`~kind`,`type`,`parameters`,`returnType`])}function gn(e,t){return S({"~kind":`Ref`},{$ref:e},t)}function _n(e){return w(e,`Ref`)}function vn(e,t){return S({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function yn(e){return w(e,`Generic`)}function bn(e){return S({"~kind":`Any`},{},e)}function xn(e){return w(e,`Any`)}var Sn=`(?!)`;function k(e){return S({"~kind":`Never`},{not:{}},e)}function Cn(e){return w(e,`Never`)}function wn(e){return x(e).filter(t=>!$t(e[t]))}function Tn(e){return x(e)}function En(e){return Tt(e)}function A(e,t={}){let n=wn(e);return S({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function j(e){return w(e,`Object`)}function Dn(e){return Rt(e,[`~kind`,`type`,`properties`,`required`])}function M(e,t={}){return S({"~kind":`Union`},{anyOf:e},t)}function N(e){return w(e,`Union`)}function On(e){return Rt(e,[`~kind`,`anyOf`])}function kn(e){return S({"~kind":`Unknown`},{},e)}function An(e){return w(e,`Unknown`)}function jn(e,t,n){return S({"~kind":`Cyclic`},{$defs:x(e).reduce((t,n)=>({...t,[n]:C(e[n],{},{$id:n})}),{}),$ref:t},n)}function Mn(e){return w(e,`Cyclic`)}function Nn(e){return C(e,{"~unsafe":null},{})}function Pn(e){return xt(e)&&b(e,`~unsafe`)&&yt(e[`~unsafe`])}function P(e){return w(e,`Infer`)}function Fn(e){return w(e,`Enum`)}function In(e,t={}){return S({"~kind":`Intersect`},{allOf:e},t)}function F(e){return w(e,`Intersect`)}function Ln(e){return Rt(e,[`~kind`,`allOf`])}function Rn(){throw Error(`Unreachable`)}var zn;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(zn||={}),Array.from({length:256}).map((e,t)=>BigInt(t));var Bn=new Float64Array(1);new DataView(Bn.buffer),new Uint8Array(Bn.buffer),new TextEncoder;var Vn=`-?(?:0|[1-9][0-9]*)n`;function Hn(e){return S({"~kind":`BigInt`},{type:`bigint`},e)}function Un(e){return w(e,`BigInt`)}function Wn(e){return S({"~kind":`Boolean`},{type:`boolean`},e)}function Gn(e){return w(e,`Boolean`)}var Kn=`-?(?:0|[1-9][0-9]*)`;function qn(e){return S({"~kind":`Integer`},{type:`integer`},e)}function Jn(e){return w(e,`Integer`)}function Yn(e,t){return S({"~kind":`Iterator`},{type:`iterator`,iteratorItems:e},t)}function Xn(e){return w(e,`Iterator`)}function Zn(e){return Rt(e,[`~kind`,`type`,`iteratorItems`])}var Qn=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function $n(e){return _t(e)?`bigint`:vt(e)?`boolean`:bt(e)?`number`:St(e)?`string`:(()=>{throw new Qn(e)})()}function I(e,t){return S({"~kind":`Literal`},{type:$n(e),const:e},t)}function er(e){return _t(e)||vt(e)||bt(e)||St(e)}function tr(e){return L(e)&&bt(e.const)}function nr(e){return L(e)&&St(e.const)}function L(e){return w(e,`Literal`)}function rr(e){return S({"~kind":`Null`},{type:`null`},e)}function ir(e){return w(e,`Null`)}var ar=`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`;function R(e){return S({"~kind":`Number`},{type:`number`},e)}function or(e){return w(e,`Number`)}function sr(e){return S({"~kind":`Symbol`},{type:`symbol`},e)}function cr(e){return w(e,`Symbol`)}function z(e){return S({"~kind":`String`},{type:`string`},e)}function lr(e){return w(e,`String`)}function ur(e){let t=Ca(e);return v(t.length,2)?t[0]:[]}function dr(e){return!0}function fr(e){return y(e,(e,t)=>mr(e)?fr(t):!1,()=>!0)}function pr(e){return!v(e.length,0)&&fr(e)}function mr(e){return N(e)?pr(e.anyOf):L(e)?dr(e.const):!1}function hr(e){return pr(e)}function gr(e){return S({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function _r(e,t,n=[]){return y(e,(e,r)=>_r(r,t,[...n,`${e}${t}`]),()=>n)}function vr(e,t){return v(e.length,0)?[`${t}`]:_r(e,t)}function yr(e,t,n=[]){return y(t,(t,r)=>yr(e,r,[...n,...br(e,t)]),()=>n)}function br(e,t){return N(t)?yr(e,t.anyOf):L(t)?vr(e,t.const):Rn()}function xr(e,t){return y(t,(t,n)=>xr(br(e,t),n),()=>e)}function Sr(e){return e.map(e=>I(e))}function Cr(e){return M(Sr(xr([],e)))}function wr(e){return v(e.length,0)?Rn():v(e.length,1)&&L(e[0])?e[0]:Cr(e)}function Tr(e){let t=ur(e);return v(t.length,0)?z():hr(t)?wr(t):gr(e)}function Er(e){let t=Tr(e);return Wa(t)?z():t}function Dr(e,t){return S({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function Or(e){return Dr(bi,e)}function kr(e){return A({true:e,false:e})}function Ar(e){return St(e)||bt(e)?I(e):yt(e)?rr():k()}function jr(e){return e.map(e=>Ar(e))}function Mr(e){return M(jr(e))}function Nr(e){return Mr(e.enum)}function Pr(e,t){return hi(Mr(e),t)}function Fr(e,t){return Dr(vi,t)}function Ir(e,t={}){let[n,r,i]=[e,e.length,!1];return S({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function B(e){return w(e,`Tuple`)}function Lr(e){return Rt(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function Rr(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function zr(e){return A(Rr(e.items))}function Br(e,t){return rn(e)?!!rn(t):!1}function Vr(e,t){return $t(e)?!!$t(t):!1}function Hr(e,t){let n=Br(e,t),r=Vr(e,t),i=en(Zt(V([e,t])));return n&&r?tn(Qt(i)):n&&!r?tn(i):!n&&r?Qt(i):i}function Ur(e,t,n){return n in e?n in t?Hr(e[n],t[n]):e[n]:n in t?t[n]:k()}function Wr(e,t){return[...new Set([...x(t),...x(e)])].reduce((n,r)=>({...n,[r]:Ur(e,t,r)}),{})}function Gr(e){return j(e)?e.properties:B(e)?Rr(e.items):Rn()}function Kr(e,t){return A(Wr(Gr(e),Gr(t)))}function qr(e,t){let n=Hs(e,t);return v(n,`left-inside`)?e:v(n,`right-inside`)||v(n,`equal`)?t:k()}function Jr(e){return j(e)||B(e)}function Yr(e,t){let n=N(e),r=N(t);return n||r}function Xr(e,t){let n=ti(e),r=ti(t),i=Yr(n,r),a=Jr(n),o=Jr(r);return i?V([n,r]):a&&o?Kr(n,r):a&&!o?n:!a&&o?r:qr(n,r)}function Zr(e,t,n=[]){return y(t,(t,r)=>Zr(e,r,[...n,Xr(e,t)]),()=>v(n.length,0)?[e]:n)}function Qr(e,t,n=[]){return y(e,(e,r)=>Qr(r,t,[...n,...$r([e],t)]),()=>n)}function $r(e,t=[]){return y(e,(e,n)=>N(e)?$r(n,Qr(e.anyOf,t)):$r(n,Zr(e,t)),()=>t)}function V(e){return qs($r(e))}function ei(e){return qs(e)}function ti(e){return F(e)?V(e.allOf):N(e)?ei(e.anyOf):e}function ni(e){return v(e.length,1)?e[0]:v(e.length,0)?k():M(e)}function ri(e,t){return hi(V(e),t)}function ii(e,t){return St(e)||bt(e)?A({[e]:t}):v(e,!1)?A({false:t}):v(e,!0)?A({true:t}):A({})}function ai(e,t){return Dr(yi,t)}function oi(e,t){return b(e,`pattern`)&&(St(e.pattern)||e.pattern instanceof RegExp)?Dr(e.pattern.toString(),t):Dr(bi,t)}function si(e,t){return hr(ur(e))?hi(Er(e),t):Dr(e,t)}function ci(e){return N(e)?li(e.anyOf):[e]}function li(e){return e.reduce((e,t)=>[...e,...ci(t)],[])}function ui(e){return e.some(e=>lr(e)||or(e)||Jn(e))}function di(e,t){return v(ui(e),!0)?Dr(bi,t):void 0}function fi(e,t){return e.reduce((e,n)=>L(n)&&(St(n.const)||bt(n.const))?{...e,[n.const]:t}:e,{})}function pi(e,t){return A(fi(e,t))}function mi(e,t){let n=li(e),r=di(n,t);return zt(r)?r:pi(n,t)}function hi(e,t){return xn(e)?Or(t):Gn(e)?kr(t):Fn(e)?Pr(e.enum,t):Jn(e)?Fr(e,t):F(e)?ri(e.allOf,t):L(e)?ii(e.const,t):or(e)?ai(e,t):N(e)?mi(e.anyOf,t):lr(e)?oi(e,t):Wa(e)?si(e.pattern,t):A({})}function gi(e,t,n){return X([e])?C(hi(e,t),{},n):xi(e,t,n)}function _i(e,t,n,r,i){return gi(Z(e,t,n),Z(e,t,r),i)}var vi=`^${Kn}$`,yi=`^${ar}$`,bi=`^.*$`;function xi(e,t,n={}){return T(`Record`,[e,t],n)}function H(e,t,n={}){return gi(e,t,n)}function Si(e,t){return Dr(e,t)}function Ci(e){return x(e.patternProperties)[0]}function wi(e){let t=Ci(e);return v(t,bi)?z():v(t,vi)?qn():v(t,yi)?R():Tr(t)}function Ti(e){return e.patternProperties[Ci(e)]}function Ei(e){return w(e,`Record`)}function Di(e){return S({"~kind":`Rest`},{type:`rest`,items:e},{})}function Oi(e){return w(e,`Rest`)}function ki(e){return w(e,`This`)}function Ai(e){return S({"~kind":`Undefined`},{type:`undefined`},e)}function ji(e){return w(e,`Undefined`)}function Mi(e){return w(e,`Void`)}function Ni(e){return Hn()}function Pi(e){return z()}function Fi(e){return R()}function Ii(e){return qn()}function Li(e){return k()}function Ri(e){return I(e)}function zi(e){return e}function Bi(e){return M(e[1])}function Vi(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Hi(e){return[e[0],...e[1]]}function Ui(e){return e}function Wi(e){return e[1]}function Gi(e){return v(e.length,2)}function Ki(e,t,n){return Gi(e)?t(e[0],e[1]):n()}function qi(e,t){return v(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function Ji(e,t){for(let n=0;n<e.length;n++){let r=qi(e[n],t);if(Gi(r))return r}return[]}function Yi(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var Xi=[...Yi(97,122),...Yi(65,90)],Zi=[`0`,...Yi(49,57)],Qi=`//`,$i=`/*`,ea=`*/`;function ta(e){let t=e.indexOf(ea);return v(t,-1)?``:e.slice(t+2)}function na(e){let t=e.indexOf(`
1
+ import{a as e,i as t,l as n,o as r,t as i,u as a}from"./jsx-vj4cHW_Q.js";import{_ as o,a as s,c,d as l,f as u,g as ee,h as d,i as f,l as p,m,o as te,p as ne,s as h,t as re,u as ie}from"./person-mentions-C7vQd7Vr.js";import{O as ae,k as oe}from"./solid-app-BNcsMwv4.js";import{i as se,n as ce,t as le}from"./serialize-n0A-pNlo.js";import"./src-CcX8uAQo.js";import{n as ue}from"./artifact-reference-ChS4TSVz.js";import{n as de}from"./annotation-range-DqD0nTBm.js";import{t as fe}from"./runtime-id-CM5my_RX.js";var pe=[{component:!1,tag:`img`,attribute:`src`,kind:`image`},{component:!1,tag:`img`,attribute:`srcset`,kind:`image`,list:!0},{component:!1,tag:`source`,attribute:`srcset`,kind:`image`,list:!0},{component:!1,tag:`video`,attribute:`poster`,kind:`image`},{component:!0,tag:`File`,attribute:`src`,kind:`pdf`},{component:!1,tag:`a`,attribute:`href`,kind:`asset`},{component:!1,tag:`video`,attribute:`src`,kind:`file`},{component:!1,tag:`audio`,attribute:`src`,kind:`file`},{component:!1,tag:`source`,attribute:`src`,kind:`file`},{component:!1,tag:`track`,attribute:`src`,kind:`file`}],me=`Helmet`,he={title:null,style:null,script:null,meta:[],imports:[],values:[],queries:[],mutations:[]},ge=e=>({imports:e.imports,values:e.values,queries:e.queries,mutations:e.mutations,...e.notifications?.length?{notifications:e.notifications}:{}}),_e={[f]:ie,[c]:m,[h]:ne,[s]:l,[te]:u},ve=[`title`,`style`,`script`,`meta`],ye=[`name`,`content`],be=e=>e.type===`element`&&e.isComponent&&e.tag===`Helmet`;function xe(e,t=[]){for(let n of e)n.type===`element`&&(be(n)&&t.push(n),xe(n.children,t));return t}var Se=e=>e.children.filter(e=>e.type!==`text`||e.value.trim()!==``);function Ce(e,t){let n=Se(e);if(n.length===0)return``;if(n.length!==1)return null;let r=n[0];return r.type===`text`?t?r.value:null:r.type===`expression`&&r.value.static&&typeof r.value.json==`string`?r.value.json:null}function we(e){let t=e.attributes.filter(e=>e.name===`type`);return t.length?t.length!==1||!t[0].value.static?`invalid`:t[0].value.json===`server`?`server`:t[0].value.json===`module`?`browser`:`invalid`:`browser`}function Te(e){let t=[],n=xe(e);for(let e of n.slice(1))t.push({message:`A document may carry only one <Helmet> — another begins at offset ${n[0].start}.`,tag:me,start:e.start,end:e.end});let r=n[0];if(!r)return t;if(r.attributes.length>0){let e=r.attributes[0];t.push({message:`<Helmet> takes no attributes (got "${e.name}")`,tag:me,attr:e.name,start:e.start,end:e.end})}let i=new Set,a=new Set;for(let e of Se(r)){if(e.type===`element`&&e.isComponent&&_e[e.tag]){let n=_e[e.tag](e);n.ok||t.push(...n.errors);continue}if(e.type!==`element`||!ve.includes(e.tag.toLowerCase())||e.isComponent){t.push({message:`<Helmet> may only contain <title>, <style>, <script>, <meta>, <Import>, <Value>, <Query>, <Mutation>, <Notify>`,start:e.start,end:e.end,...e.type===`element`?{tag:e.tag}:{}});continue}let n=e.tag.toLowerCase();if(n===`meta`){let r=new Map(e.attributes.map(e=>[e.name.toLowerCase(),e])),i=e.attributes.find(e=>!ye.includes(e.name.toLowerCase()));if(i){t.push({message:`<meta> inside <Helmet> carries name and content only (got "${i.name}") — http-equiv and charset are the document's own to set`,tag:n,attr:i.name,start:i.start,end:i.end});continue}let o=r.get(`name`),s=r.get(`content`),c=o?.value.static&&typeof o.value.json==`string`?o.value.json:null,l=s?.value.static&&typeof s.value.json==`string`?s.value.json:null;if(!c||l===null){t.push({message:`<meta> needs both name and content as string literals`,tag:n,start:e.start,end:e.end});continue}if(a.has(c)){t.push({message:`<Helmet> already carries a <meta name="${c}">`,tag:n,start:e.start,end:e.end});continue}c===`artifactbin:og-image`&&!/^ref:[A-Za-z0-9_-]+$/.test(l)&&t.push({message:`artifactbin:og-image needs an uploaded image reference: ref:<imageId>`,tag:n,start:e.start,end:e.end}),a.add(c);continue}let r=n,o=r===`script`?we(e):null;r===`script`&&o===`invalid`&&t.push({message:`<script> type must be "server" or "module" (or omitted for a browser module)`,tag:n,start:e.start,end:e.end});let s=r===`script`&&o===`server`?`server script`:r;if(i.has(s)){t.push({message:`<Helmet> may carry at most one ${s===`server script`?`<script type="server">`:`<${r}>`}`,tag:n,start:e.start,end:e.end});continue}i.add(s);let c=e.attributes.find(e=>r!==`script`||e.name!==`type`);if(c){let e=c;t.push({message:`<${r}> inside <Helmet> takes no attributes (got "${e.name}")`,tag:n,attr:e.name,start:e.start,end:e.end})}let l=Ce(e,r===`title`);if(l===null){t.push({message:r===`title`?`<title> holds a single text child`:`<${r}> holds a single template-literal child: <${r}>{\`…\`}</${r}>`,tag:n,start:e.start,end:e.end});continue}r===`script`&&/<\/script/i.test(l)&&t.push({message:`script text may not contain "<\/script" (it cannot be escaped in serialized HTML) — split the string, e.g. "</scr" + "ipt"`,tag:n,start:e.start,end:e.end})}return t}function Ee(e){let t={...he,meta:[],imports:[],values:[],queries:[],mutations:[]};for(let n of Se(e)){if(n.type!==`element`)continue;if(n.isComponent){if(n.tag===`Import`){let e=ie(n);e.ok&&t.imports.push(e.decl)}else if(n.tag===`Value`){let e=m(n);e.ok&&t.values.push(e.decl)}else if(n.tag===`Query`){let e=ne(n);e.ok&&t.queries.push(e.decl)}else if(n.tag===`Mutation`){let e=l(n);e.ok&&t.mutations.push(e.decl)}else if(n.tag===`Notify`){let e=u(n);e.ok&&(t.notifications??=[]).push(e.decl)}continue}let e=n.tag.toLowerCase();if(e===`script`){let e=we(n);e===`server`?t.serverScript??=Ce(n,!1)??void 0:e===`browser`&&(t.script??=Ce(n,!1))}else if(e===`title`||e===`style`)t[e]=t[e]??Ce(n,e===`title`);else if(e===`meta`){let e=e=>{let t=n.attributes.find(t=>t.name.toLowerCase()===e);return t?.value.static&&typeof t.value.json==`string`?t.value.json:null},r=e(`name`),i=e(`content`);r&&i!==null&&!t.meta.some(e=>e.name===r)&&t.meta.push({name:r,content:i})}}return t}function De(e){let t=[],n=!1;for(let r of e){if(r.type!==`element`){t.push(r);continue}if(be(r)){n=!0;continue}let e=De(r.children);e===r.children?t.push(r):(n=!0,t.push({...r,children:e}))}return n?t:e}function Oe(e){let t=ke.get(e);if(t)return t;let n=xe(e)[0]??null,r=n?{helmet:n,content:Ee(n),body:De(e)}:{helmet:null,content:he,body:e};return ke.set(e,r),r}var ke=new WeakMap;function Ae(e){let{helmet:t,body:n}=Oe(e);return t?[t,...n]:e}var je=new Set(`address.article.aside.blockquote.details.dialog.div.dl.dd.dt.fieldset.figcaption.figure.footer.header.hr.h1.h2.h3.h4.h5.h6.li.main.nav.ol.p.pre.section.summary.table.ul`.split(`.`)),Me=new Set([`button`,`template`,`table`,`td`,`th`,`caption`,`object`,`marquee`,`applet`]),Ne=new Set([`blockquote`,`dd`,`div`,`dl`,`dt`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`hr`,`li`,`ol`,`p`,`pre`,`table`,`ul`]),Pe=e=>e.type===`element`;function Fe(e,t=!1){return e.some(e=>{if(!Pe(e))return!1;if(e.isComponent)return e.tag===`For`&&(!t||Fe(e.children,t));let n=e.tag.toLowerCase();return(t?Ne:je).has(n)?!0:!Me.has(n)&&Fe(e.children,t||n===`svg`)})}function Ie(e){let t=!1,n=e.map(e=>{if(!Pe(e))return e;let n=Ie(e.children),r=!e.isComponent&&e.tag.toLowerCase()===`p`&&Fe(e.children);return!r&&n===e.children?e:(t=!0,{...e,...r?{tag:`div`}:{},children:n})});return t?n:e}function Le(e){let t=new Set,n=e.type===`element`?{...e,children:[]}:e;for(let e of p([n]))t.add(`use:${e.name}`);if(e.type===`element`){t.add(`tag:${e.tag}`);let n=t=>{let n=e.attributes.find(e=>e.name===t)?.value;return n?.static&&typeof n.json==`string`?n.json:void 0},r=n(`id`);if(r&&t.add(`id:${r}`),[`Value`,`Query`,`Mutation`].includes(e.tag)){let r=n(`name`);if(r&&t.add(`declaration:${r}`),e.tag!==`Value`){let n=e.children.map(e=>e.type===`text`?e.value:e.type===`expression`&&e.value.static&&typeof e.value.json==`string`?e.value.json:``).join(``);for(let e of n.match(/[A-Za-z_]\w*/g)??[])t.add(`dependency:${e}`)}}}return[...t].sort()}var Re=[`first`,`last`,`sum`,`avg`,`median`,`min`,`max`,`count`];function ze(e){if(typeof e!=`string`)return null;let t=ue.exec(e);return t?t[1]:null}function Be(e,t){for(let n of e)n.type===`element`&&(t(n),Be(n.children,t))}var Ve=(e,t)=>{let n=e.attributes.find(e=>e.name.toLowerCase()===t.toLowerCase())?.value;return n&&n.static?n.json:void 0};function He(t){let r=n(t);if(!r.ok)return null;let i=[];return Be(r.nodes,t=>{let n=t.tag;if(t.isComponent&&n===`Import`){let e=ie(t);e.ok&&i.push({id:e.decl.ref,kind:`dataset`,via:`sql`});return}if(t.isComponent&&(n===`Query`||n===`Notify`)){let e=n===`Notify`?u(t):ne(t);e.ok&&e.decl.source&&i.push({id:e.decl.source,kind:`dataset`,via:`sql`});return}if(!t.isComponent&&n.toLowerCase()===`meta`&&[`artifactbin:og-image`,`artifactbin:pwa-icon`].includes(String(Ve(t,`name`)))){let e=ze(Ve(t,`content`));e&&i.push({id:e,kind:`image`})}if(n===`Value`){let e=ze(Ve(t,`source`));e&&i.push({id:e,kind:`dataset`})}let r=Ve(t,`data`),a=Ve(t,`viz`),o=a?ze(a.recipe):null;o&&i.push({id:o,kind:`viz`,element:{viz:a??null,dataRef:typeof r==`string`?r:null}});for(let r of pe){if(r.component!==t.isComponent||r.tag!==(t.isComponent?n:n.toLowerCase()))continue;let a=Ve(t,r.attribute),o=r.list&&typeof a==`string`?e(a,r.attribute):[a];for(let e of o){let t=ze(e);t&&i.push({id:t,kind:r.kind})}}}),i}var Ue={Question:{required:`data`,usage:`Use data="$name" — a <Query> or table <Value> declared in <Helmet> — plus viz={{"kind":"vega-lite","spec":{…}}}`,table:!0},Number:{required:`data`,usage:`Use data="$name" — a <Query> or table <Value> declared in <Helmet>`,table:!0},DataTable:{required:`data`,usage:`Use data="$name" — a <Query> or table <Value> declared in <Helmet>`,table:!0},Files:{required:`data`,usage:`Use data="$name" — a <Query> over a folder's children (<Import name="files" src="ref:<folderId>" />, select * from files.rows)`,table:!0},File:{required:`src`,usage:`Use src="ref:<pdf id>" — the id create_artifact returned for a pdf — or src="<public https link to a .pdf>" (+ optionally title="…")`}};function We(e){let t=[];for(let n of e.attributes)if(n.value.static&&(e.tag===`Number`&&n.name===`format`&&typeof n.value.json==`string`&&!oe(n.value.json)&&t.push({attr:n.name,spec:n.value.json,start:n.start,end:n.end}),e.tag===`DataTable`&&n.name===`columns`&&Array.isArray(n.value.json)))for(let e of n.value.json){let r=e&&typeof e==`object`?e.fmt:void 0;typeof r==`string`&&!oe(r)&&t.push({attr:n.name,spec:r,start:n.start,end:n.end})}return t}function Ge(e){let t=n(e);if(!t.ok)return[];let r=[];return Be(t.nodes,e=>{let t=Ue[e.tag];if(!t)return;if(e.tag===`Number`){let t=e.attributes.find(e=>e.name===`agg`),n=t?.value.static?t.value.json:void 0;t&&!Re.some(e=>e===n)&&r.push({message:`<Number agg>: expected one of ${Re.join(`, `)} ("mean" is avg; the final row's cell is last).`,tag:e.tag,attr:`agg`,start:t.start,end:t.end})}for(let t of We(e))r.push({message:`<${e.tag} ${t.attr}=${JSON.stringify(t.spec)}>: ${JSON.stringify(t.spec)} is not a number format — write ${ae}.`,tag:e.tag,attr:t.attr,start:t.start,end:t.end});let n=t.required;if(e.tag===`Question`){let t=e.attributes.find(e=>e.name===`singleValueConfig`),n=e.attributes.find(e=>e.name===`viz`),i=n?.value.static&&n.value.json&&typeof n.value.json==`object`&&!Array.isArray(n.value.json)?n.value.json:null,a=i&&`singleValueConfig`in i&&i.kind!==`single_value`;if(t||a){let i=t??n;r.push({message:`<Question> KPI tile: singleValueConfig lives INSIDE viz with kind "single_value" — viz={{"kind":"single_value","yCols":["<numeric column>"],"singleValueConfig":{"label":"…","prefix":"$","suffix":"","format":",.0f"}}} (the column is summed over the table's rows; format is a d3-format spec). Written any other way it renders as a table.`,tag:e.tag,attr:i.name,start:i.start,end:i.end});return}if(i&&!(`spec`in i)&&(`mark`in i||`encoding`in i)){r.push({message:`<Question viz={…}> is the ENVELOPE, not the spec: a top-level "mark"/"encoding" renders a blank chart. Wrap it — viz={{"kind":"vega-lite","spec":{"mark":"line","encoding":{…}}}}.`,tag:e.tag,attr:n.name,start:n.start,end:n.end});return}}let i=e.attributes.find(e=>e.name.toLowerCase()===n);if(i){if(!t.table||i.value.static&&d(i.value.json))return;let n=i.value.static?i.value.json:void 0,a=i.value.static?JSON.stringify(n):i.value.exprType;r.push({message:`<${e.tag} data=${a.length>40?a.slice(0,40)+`…`:a}> does not name a declared table. ${t.usage}`+(typeof n==`string`&&n.startsWith(`ref:`)?` — a dataset is read through SQL: <Import name="data" src="${n}" /><Query name="rows">{\`select * from data.rows\`}</Query>, then data="$rows".`:`.`),tag:e.tag,attr:i.name,start:i.start,end:i.end});return}let a=[...new Set(e.attributes.map(e=>e.name.toLowerCase()))].filter(e=>e!==`title`&&e!==`height`&&e!==`classname`);r.push({message:`<${e.tag}> has no "${n}" prop, so nothing resolves and the embed renders empty. `+t.usage+(a.length?`. Found: ${a.join(`, `)}.`:`.`),tag:e.tag,start:e.start,end:e.end})}),r}var Ke=new Set(`section.article.div.p.span.h1.h2.h3.h4.h5.h6.ul.ol.li.strong.em.blockquote.header.footer.main.aside.a.b.i.u.s`.split(`.`)),qe=/\b(?:class(?:Name)?|data-design|style)\s*=|<\/?style\b|\{\s*\$_row\.|\/people\//i,Je=e=>typeof e==`string`&&!e.includes(`\0`)&&!e.includes(`\r`)&&e.isWellFormed()&&!qe.test(e);function Ye(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=String.fromCharCode(r&255,r>>>8)}return btoa(t)}function Xe(e){let t=atob(e),n=``;for(let e=0;e<t.length;e+=2)n+=String.fromCharCode(t.charCodeAt(e)|t.charCodeAt(e+1)<<8);return n}var Ze=e=>typeof e==`string`&&(e.includes(`\0`)||!e.isWellFormed());function Qe(e){return Ze(e)?[`string16`,Ye(e)]:Array.isArray(e)?[`array`,e.map(Qe)]:e&&typeof e==`object`?[`object`,Object.entries(e).map(([e,t])=>[Ze(e)?Qe(e):e,Qe(t)])]:[`value`,e]}function $e(e){switch(e[0]){case`string16`:return Xe(e[1]);case`array`:return e[1].map($e);case`object`:return Object.fromEntries(e[1].map(([e,t])=>[typeof e==`string`?e:$e(e),$e(t)]));case`value`:return e[1]}}function et(e){return Array.isArray(e)?e.map(et):!e||typeof e!=`object`?e:Object.fromEntries(Object.entries(e).filter(([e])=>e!==`start`&&e!==`end`).map(([e,t])=>[e,e===`json`?Qe(t):et(t)]))}function tt(e){return Array.isArray(e)?e.map(tt):!e||typeof e!=`object`?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,e===`json`?$e(t):tt(t)]))}var nt=e=>({schema:1,kind:`jsx`,roots:et(e)});function rt(e){if(e.kind===`jsx`)return tt(e.roots);let t=n(e.source);if(!t.ok)throw Error(t.error);return t.nodes}var it=()=>fe(),at=e=>new TextEncoder().encode(e).length,ot=`$root`,st=`validated-graph-v3`;function ct(e){if(e.type!==`element`||!e.children.length)return[le([e])];let t=it(),n=e.children.map((e,n)=>`Graph${t}Child${n}End`),r=le([{...e,children:n.map(e=>({type:`text`,value:e,start:0,end:0}))}]),i=[],a=0,o=e.control?.kind===`and`?n.slice(0,1):n;for(let e of o){let t=r.indexOf(e,a);if(t<a||r.indexOf(e,t+e.length)!==-1)throw Error(`Invalid child serialization boundary`);i.push(r.slice(a,t)),a=t+e.length}return i.push(r.slice(a)),e.control?.kind===`and`&&i.push(``),i}function lt(e,t,n,r){let i=[],a=t;for(let t of r){if(t.start<a||t.end<t.start||t.end>n)throw Error(`Invalid original source boundary`);i.push(e.slice(a,t.start)),a=t.end}return i.push(e.slice(a,n)),i}function ut(e,t,r={}){if(r.preserveSource&&typeof e!=`string`)throw Error(`Original source is required for lossless migration`);let i=r.preserveSource&&typeof e==`string`?e:null,a=typeof e==`string`?n(e):{ok:!0,nodes:e};if(!a.ok)throw Error(a.error);let o={},s=(e,n,r={})=>{let{implicit:a=!1,helmet:c=!1,parentTag:l=``}=r;if(a&&(e.type!==`element`||e.control?.kind!==`fragment`||e.children.length))throw Error(`An AND expression has no editable false branch`);let u=e.graphKey??it();if(u===`$root`||Object.hasOwn(o,u))throw Error(`Duplicate internal node identity`);let{graphKey:ee,...d}=e,f=e.type===`element`?e.children:[],p=e.type===`element`&&e.control?.kind===`and`,m=a?[``]:i===null?ct(e):lt(i,e.start,e.end,p?f.slice(0,1):f);i!==null&&p&&!a&&m.push(``);let te=d.type===`element`?{...d,children:[]}:d,ne=e.type===`element`&&[`Query`,`Mutation`].includes(e.tag)?e:te,h=e.type!==`element`||e.control?[]:(He(le([ne]))??[]).map(({id:e,kind:t})=>({id:e,kind:t})),re={ast:nt([te]),selectors:Le(e),refs:h,parent:n,children:[],parts:m,bytes:at(m.join(``)),units:m.reduce((e,t)=>e+t.length,0),partUnits:m.map(e=>e.length),subtreeUnits:0,prose:e.type===`text`&&!c&&Ke.has(l)&&Je(e.value),selfVersion:t,childrenVersion:t,subtreeVersion:t};return o[u]=re,e.type===`element`&&(re.children=e.children.map((t,n)=>s(t,u,{implicit:e.control?.kind===`and`&&n===1,helmet:c||e.tag===`Helmet`,parentTag:e.tag}))),re.subtreeUnits=re.units+re.children.reduce((e,t)=>e+o[t].subtreeUnits,0),u},c=a.nodes.map(e=>s(e,ot)),l=i===null?c.map(()=>``).concat(``):lt(i,0,i.length,a.nodes),u=l.reduce((e,t)=>e+t.length,0);return o[ot]={ast:null,selectors:[],refs:[],parent:null,children:c,parts:l,bytes:at(l.join(``)),units:u,partUnits:l.map(e=>e.length),subtreeUnits:u+c.reduce((e,t)=>e+o[t].subtreeUnits,0),prose:!1,selfVersion:t,childrenVersion:t,subtreeVersion:t},{schema:3,kind:`graph`,policy:st,nodes:o,claimedIds:Object.fromEntries(Object.values(o).flatMap(e=>e.selectors.filter(e=>e.startsWith(`id:`)).map(e=>[e.slice(3),t]))),bytes:Object.values(o).reduce((e,t)=>e+t.bytes,0)}}function dt(e,t){let n=[],r=new Set([t]),i=e.nodes[t]?.parent;if(i===void 0)throw Error(`Node does not exist`);for(;i!==null;){if(r.has(i)||!e.nodes[i])throw Error(`Invalid parent chain`);r.add(i),n.push(i),i=e.nodes[i].parent}return n}function ft(e){let t=new Set,n=r=>{let i=e.nodes[r];if(!i?.ast||t.has(r))throw Error(`Invalid document graph`);t.add(r);let a=rt(i.ast)[0];if(!a)throw Error(`Missing node data`);return a.graphKey=r,a.type===`element`&&(a.children=i.children.map(n)),t.delete(r),a},r=e.nodes[ot];if(!r)throw Error(`Missing document root`);return r.children.map(n)}function pt(e){let t=new Set,n=r=>{let i=e.nodes[r];if(!i||t.has(r))throw Error(`Invalid document graph`);if(t.add(r),i.children.length&&i.parts.length!==i.children.length+1)throw Error(`Invalid source boundaries`);let a=i.parts[0]+i.children.map((e,t)=>n(e)+i.parts[t+1]).join(``);return t.delete(r),a};return n(ot)}function mt(e){let t=[],n=new Set,r=i=>{let a=e.nodes[i];for(let e of a.refs)n.has(e.id)||(n.add(e.id),t.push(e));a.children.forEach(r)};return r(ot),t}var ht={assign:0,create:0,clone:0,discard:0,update:0};function g(e,t){return ht.assign+=1,{...e,...t}}function gt(e){return Array.isArray(e)}function _t(e){return v(typeof e,`bigint`)}function vt(e){return v(typeof e,`boolean`)}function yt(e){return v(e,null)}function bt(e){return Number.isFinite(e)}function xt(e){return _(e)&&!gt(e)}function _(e){return v(typeof e,`object`)&&!yt(e)}function St(e){return v(typeof e,`string`)}function v(e,t){return e===t}function Ct(e,t){return e>t}function y(e,t,n){return v(e.length,0)?n():t(e[0],e.slice(1))}function wt(e){return v(e,`__proto__`)||v(e,`constructor`)||v(e,`prototype`)}function b(e,t){return wt(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function x(e){return Object.getOwnPropertyNames(e)}function Tt(e){return Object.values(e)}function Et(e){return _(e)&&b(e,`~guard`)}function Dt(e){return e}function Ot(e){return e.map(e=>Mt(e))}function kt(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){let r=n[e];b(r,`value`)&&Object.defineProperty(t,e,{...r,value:Mt(r.value)})}return t}function At(e){return new RegExp(e.source,e.flags)}function jt(e){return e}function Mt(e){return e instanceof RegExp?At(e):Et(e)?Dt(e):gt(e)?Ot(e):_(e)?kt(e):jt(e)}function Nt(e){return ht.clone+=1,Mt(e)}var Pt={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1};function Ft(){return Pt}function It(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function Lt(e,t){return{...e,...t}}function S(e,t,n={}){ht.create+=1;let r=Ft(),i=Lt(t,n),a=r.enumerableKind?Lt(i,e):It(i,e);return r.immutableTypes?Object.freeze(a):a}function Rt(e,t){ht.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(Nt(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function C(e,t,n){ht.update+=1;let r=Ft(),i=Nt(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function w(e,t){return _(e)&&b(e,`~kind`)&&v(e[`~kind`],t)}function zt(e){return _(e)}function Bt(e){return _(e)&&b(e,`~kind`)&&b(e,`type`)&&v(e[`~kind`],`OptionalAddAction`)&&zt(e.type)}function Vt(e){return _(e)&&b(e,`~kind`)&&b(e,`type`)&&v(e[`~kind`],`OptionalRemoveAction`)&&zt(e.type)}function Ht(e){return _(e)&&b(e,`~kind`)&&b(e,`type`)&&v(e[`~kind`],`ReadonlyAddAction`)&&zt(e.type)}function Ut(e){return _(e)&&b(e,`~kind`)&&b(e,`type`)&&v(e[`~kind`],`ReadonlyRemoveAction`)&&zt(e.type)}function T(e,t,n){return S({"~kind":`Deferred`},{action:e,parameters:t,options:n},{})}function Wt(e){return w(e,`Deferred`)}function Gt(e,t){return S({"~kind":`Promise`},{type:`promise`,item:e},t)}function Kt(e){return w(e,`Promise`)}function qt(e){return Rt(e,[`~kind`,`type`,`item`])}function Jt(e){return C(e,{"~immutable":!0},{})}function Yt(e){return Jt(e)}function Xt(e){return zt(e)&&b(e,`~immutable`)}function Zt(e){return Rt(e,[`~optional`])}function Qt(e){return C(e,{"~optional":!0},{})}function E(e){return Qt(e)}function $t(e){return zt(e)&&b(e,`~optional`)}function en(e){return Rt(e,[`~readonly`])}function tn(e){return C(e,{"~readonly":!0},{})}function nn(e){return tn(e)}function rn(e){return zt(e)&&b(e,`~readonly`)}function an(e){return w(e,`Base`)}function D(e,t){return S({"~kind":`Array`},{type:`array`,items:e},t)}function O(e){return w(e,`Array`)}function on(e){return Rt(e,[`~kind`,`type`,`items`])}function sn(e,t){return S({"~kind":`AsyncIterator`},{type:`asyncIterator`,iteratorItems:e},t)}function cn(e){return w(e,`AsyncIterator`)}function ln(e){return Rt(e,[`~kind`,`type`,`iteratorItems`])}function un(e,t,n={}){return S({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function dn(e){return w(e,`Constructor`)}function fn(e){return Rt(e,[`~kind`,`type`,`parameters`,`instanceType`])}function pn(e,t,n={}){return S({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function mn(e){return w(e,`Function`)}function hn(e){return Rt(e,[`~kind`,`type`,`parameters`,`returnType`])}function gn(e,t){return S({"~kind":`Ref`},{$ref:e},t)}function _n(e){return w(e,`Ref`)}function vn(e,t){return S({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function yn(e){return w(e,`Generic`)}function bn(e){return S({"~kind":`Any`},{},e)}function xn(e){return w(e,`Any`)}var Sn=`(?!)`;function k(e){return S({"~kind":`Never`},{not:{}},e)}function Cn(e){return w(e,`Never`)}function wn(e){return x(e).filter(t=>!$t(e[t]))}function Tn(e){return x(e)}function En(e){return Tt(e)}function A(e,t={}){let n=wn(e);return S({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function j(e){return w(e,`Object`)}function Dn(e){return Rt(e,[`~kind`,`type`,`properties`,`required`])}function M(e,t={}){return S({"~kind":`Union`},{anyOf:e},t)}function N(e){return w(e,`Union`)}function On(e){return Rt(e,[`~kind`,`anyOf`])}function kn(e){return S({"~kind":`Unknown`},{},e)}function An(e){return w(e,`Unknown`)}function jn(e,t,n){return S({"~kind":`Cyclic`},{$defs:x(e).reduce((t,n)=>({...t,[n]:C(e[n],{},{$id:n})}),{}),$ref:t},n)}function Mn(e){return w(e,`Cyclic`)}function Nn(e){return C(e,{"~unsafe":null},{})}function Pn(e){return xt(e)&&b(e,`~unsafe`)&&yt(e[`~unsafe`])}function P(e){return w(e,`Infer`)}function Fn(e){return w(e,`Enum`)}function In(e,t={}){return S({"~kind":`Intersect`},{allOf:e},t)}function F(e){return w(e,`Intersect`)}function Ln(e){return Rt(e,[`~kind`,`allOf`])}function Rn(){throw Error(`Unreachable`)}var zn;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(zn||={}),Array.from({length:256}).map((e,t)=>BigInt(t));var Bn=new Float64Array(1);new DataView(Bn.buffer),new Uint8Array(Bn.buffer),new TextEncoder;var Vn=`-?(?:0|[1-9][0-9]*)n`;function Hn(e){return S({"~kind":`BigInt`},{type:`bigint`},e)}function Un(e){return w(e,`BigInt`)}function Wn(e){return S({"~kind":`Boolean`},{type:`boolean`},e)}function Gn(e){return w(e,`Boolean`)}var Kn=`-?(?:0|[1-9][0-9]*)`;function qn(e){return S({"~kind":`Integer`},{type:`integer`},e)}function Jn(e){return w(e,`Integer`)}function Yn(e,t){return S({"~kind":`Iterator`},{type:`iterator`,iteratorItems:e},t)}function Xn(e){return w(e,`Iterator`)}function Zn(e){return Rt(e,[`~kind`,`type`,`iteratorItems`])}var Qn=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function $n(e){return _t(e)?`bigint`:vt(e)?`boolean`:bt(e)?`number`:St(e)?`string`:(()=>{throw new Qn(e)})()}function I(e,t){return S({"~kind":`Literal`},{type:$n(e),const:e},t)}function er(e){return _t(e)||vt(e)||bt(e)||St(e)}function tr(e){return L(e)&&bt(e.const)}function nr(e){return L(e)&&St(e.const)}function L(e){return w(e,`Literal`)}function rr(e){return S({"~kind":`Null`},{type:`null`},e)}function ir(e){return w(e,`Null`)}var ar=`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`;function R(e){return S({"~kind":`Number`},{type:`number`},e)}function or(e){return w(e,`Number`)}function sr(e){return S({"~kind":`Symbol`},{type:`symbol`},e)}function cr(e){return w(e,`Symbol`)}function z(e){return S({"~kind":`String`},{type:`string`},e)}function lr(e){return w(e,`String`)}function ur(e){let t=Ca(e);return v(t.length,2)?t[0]:[]}function dr(e){return!0}function fr(e){return y(e,(e,t)=>mr(e)?fr(t):!1,()=>!0)}function pr(e){return!v(e.length,0)&&fr(e)}function mr(e){return N(e)?pr(e.anyOf):L(e)?dr(e.const):!1}function hr(e){return pr(e)}function gr(e){return S({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function _r(e,t,n=[]){return y(e,(e,r)=>_r(r,t,[...n,`${e}${t}`]),()=>n)}function vr(e,t){return v(e.length,0)?[`${t}`]:_r(e,t)}function yr(e,t,n=[]){return y(t,(t,r)=>yr(e,r,[...n,...br(e,t)]),()=>n)}function br(e,t){return N(t)?yr(e,t.anyOf):L(t)?vr(e,t.const):Rn()}function xr(e,t){return y(t,(t,n)=>xr(br(e,t),n),()=>e)}function Sr(e){return e.map(e=>I(e))}function Cr(e){return M(Sr(xr([],e)))}function wr(e){return v(e.length,0)?Rn():v(e.length,1)&&L(e[0])?e[0]:Cr(e)}function Tr(e){let t=ur(e);return v(t.length,0)?z():hr(t)?wr(t):gr(e)}function Er(e){let t=Tr(e);return Wa(t)?z():t}function Dr(e,t){return S({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function Or(e){return Dr(bi,e)}function kr(e){return A({true:e,false:e})}function Ar(e){return St(e)||bt(e)?I(e):yt(e)?rr():k()}function jr(e){return e.map(e=>Ar(e))}function Mr(e){return M(jr(e))}function Nr(e){return Mr(e.enum)}function Pr(e,t){return hi(Mr(e),t)}function Fr(e,t){return Dr(vi,t)}function Ir(e,t={}){let[n,r,i]=[e,e.length,!1];return S({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function B(e){return w(e,`Tuple`)}function Lr(e){return Rt(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function Rr(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function zr(e){return A(Rr(e.items))}function Br(e,t){return rn(e)?!!rn(t):!1}function Vr(e,t){return $t(e)?!!$t(t):!1}function Hr(e,t){let n=Br(e,t),r=Vr(e,t),i=en(Zt(V([e,t])));return n&&r?tn(Qt(i)):n&&!r?tn(i):!n&&r?Qt(i):i}function Ur(e,t,n){return n in e?n in t?Hr(e[n],t[n]):e[n]:n in t?t[n]:k()}function Wr(e,t){return[...new Set([...x(t),...x(e)])].reduce((n,r)=>({...n,[r]:Ur(e,t,r)}),{})}function Gr(e){return j(e)?e.properties:B(e)?Rr(e.items):Rn()}function Kr(e,t){return A(Wr(Gr(e),Gr(t)))}function qr(e,t){let n=Hs(e,t);return v(n,`left-inside`)?e:v(n,`right-inside`)||v(n,`equal`)?t:k()}function Jr(e){return j(e)||B(e)}function Yr(e,t){let n=N(e),r=N(t);return n||r}function Xr(e,t){let n=ti(e),r=ti(t),i=Yr(n,r),a=Jr(n),o=Jr(r);return i?V([n,r]):a&&o?Kr(n,r):a&&!o?n:!a&&o?r:qr(n,r)}function Zr(e,t,n=[]){return y(t,(t,r)=>Zr(e,r,[...n,Xr(e,t)]),()=>v(n.length,0)?[e]:n)}function Qr(e,t,n=[]){return y(e,(e,r)=>Qr(r,t,[...n,...$r([e],t)]),()=>n)}function $r(e,t=[]){return y(e,(e,n)=>N(e)?$r(n,Qr(e.anyOf,t)):$r(n,Zr(e,t)),()=>t)}function V(e){return qs($r(e))}function ei(e){return qs(e)}function ti(e){return F(e)?V(e.allOf):N(e)?ei(e.anyOf):e}function ni(e){return v(e.length,1)?e[0]:v(e.length,0)?k():M(e)}function ri(e,t){return hi(V(e),t)}function ii(e,t){return St(e)||bt(e)?A({[e]:t}):v(e,!1)?A({false:t}):v(e,!0)?A({true:t}):A({})}function ai(e,t){return Dr(yi,t)}function oi(e,t){return b(e,`pattern`)&&(St(e.pattern)||e.pattern instanceof RegExp)?Dr(e.pattern.toString(),t):Dr(bi,t)}function si(e,t){return hr(ur(e))?hi(Er(e),t):Dr(e,t)}function ci(e){return N(e)?li(e.anyOf):[e]}function li(e){return e.reduce((e,t)=>[...e,...ci(t)],[])}function ui(e){return e.some(e=>lr(e)||or(e)||Jn(e))}function di(e,t){return v(ui(e),!0)?Dr(bi,t):void 0}function fi(e,t){return e.reduce((e,n)=>L(n)&&(St(n.const)||bt(n.const))?{...e,[n.const]:t}:e,{})}function pi(e,t){return A(fi(e,t))}function mi(e,t){let n=li(e),r=di(n,t);return zt(r)?r:pi(n,t)}function hi(e,t){return xn(e)?Or(t):Gn(e)?kr(t):Fn(e)?Pr(e.enum,t):Jn(e)?Fr(e,t):F(e)?ri(e.allOf,t):L(e)?ii(e.const,t):or(e)?ai(e,t):N(e)?mi(e.anyOf,t):lr(e)?oi(e,t):Wa(e)?si(e.pattern,t):A({})}function gi(e,t,n){return X([e])?C(hi(e,t),{},n):xi(e,t,n)}function _i(e,t,n,r,i){return gi(Z(e,t,n),Z(e,t,r),i)}var vi=`^${Kn}$`,yi=`^${ar}$`,bi=`^.*$`;function xi(e,t,n={}){return T(`Record`,[e,t],n)}function H(e,t,n={}){return gi(e,t,n)}function Si(e,t){return Dr(e,t)}function Ci(e){return x(e.patternProperties)[0]}function wi(e){let t=Ci(e);return v(t,bi)?z():v(t,vi)?qn():v(t,yi)?R():Tr(t)}function Ti(e){return e.patternProperties[Ci(e)]}function Ei(e){return w(e,`Record`)}function Di(e){return S({"~kind":`Rest`},{type:`rest`,items:e},{})}function Oi(e){return w(e,`Rest`)}function ki(e){return w(e,`This`)}function Ai(e){return S({"~kind":`Undefined`},{type:`undefined`},e)}function ji(e){return w(e,`Undefined`)}function Mi(e){return w(e,`Void`)}function Ni(e){return Hn()}function Pi(e){return z()}function Fi(e){return R()}function Ii(e){return qn()}function Li(e){return k()}function Ri(e){return I(e)}function zi(e){return e}function Bi(e){return M(e[1])}function Vi(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Hi(e){return[e[0],...e[1]]}function Ui(e){return e}function Wi(e){return e[1]}function Gi(e){return v(e.length,2)}function Ki(e,t,n){return Gi(e)?t(e[0],e[1]):n()}function qi(e,t){return v(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function Ji(e,t){for(let n=0;n<e.length;n++){let r=qi(e[n],t);if(Gi(r))return r}return[]}function Yi(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var Xi=[...Yi(97,122),...Yi(65,90)],Zi=[`0`,...Yi(49,57)],Qi=`//`,$i=`/*`,ea=`*/`;function ta(e){let t=e.indexOf(ea);return v(t,-1)?``:e.slice(t+2)}function na(e){let t=e.indexOf(`
2
2
  `);return v(t,-1)?``:e.slice(t)}function ra(e){return e.replace(/^[ \t\r\f\v]+/,``)}function ia(e){let t=ra(e);return t.startsWith($i)?ia(ta(t.slice(2))):t.startsWith(Qi)?ia(na(t.slice(2))):t}function aa(e){let t=e.trimStart();return t.startsWith($i)?aa(ta(t.slice(2))):t.startsWith(Qi)?aa(na(t.slice(2))):t}[...Zi];function oa(e,t){return Ji([e],t)}function sa(e,t){return v(e,``)?[``,t]:e.startsWith(`
3
3
  `)?oa(e,ia(t)):e.startsWith(` `)?oa(e,t):oa(e,aa(t))}[...Xi,...Zi],[...Zi];function ca(e){return v(e,``)?[]:[e.slice(0,1),e.slice(1)]}function la(e,t){return y(e,(e,n)=>t.startsWith(e)?!0:la(n,t),()=>!1)}function ua(e,t,n=``){return Ki(ca(t),(r,i)=>la(e,t)?[n,t]:ua(e,i,`${n}${r}`),()=>[])}function da(e,t){return Ki(ua(e,t),(e,t)=>v(e,``)?[]:[e,t],()=>[])}var U=(e,t,n=()=>[])=>e.length===2?t(e):n(),fa=e=>U(sa(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[Ni(e),t]),pa=e=>U(sa(`.*`,e),([e,t])=>[Pi(e),t]),ma=e=>U(sa(`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`,e),([e,t])=>[Fi(e),t]),ha=e=>U(sa(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[Ii(e),t]),ga=e=>U(sa(`(?!)`,e),([e,t])=>[Li(e),t]),_a=e=>U(da([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[Ri(e),t]),va=e=>U(U(fa(e),([e,t])=>[e,t],()=>U(pa(e),([e,t])=>[e,t],()=>U(ma(e),([e,t])=>[e,t],()=>U(ha(e),([e,t])=>[e,t],()=>U(ga(e),([e,t])=>[e,t],()=>U(ya(e),([e,t])=>[e,t],()=>U(_a(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[zi(e),t]),ya=e=>U(U(sa(`(`,e),([e,t])=>U(Sa(t),([t,n])=>U(sa(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Bi(e),t]),ba=e=>U(U(U(xa(e),([e,t])=>U(sa(`|`,t),([t,n])=>U(ba(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>U(U(xa(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>U([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[Vi(e),t]),xa=e=>U(U(va(e),([e,t])=>U(Sa(t),([t,n])=>[[e,t],n])),([e,t])=>[Hi(e),t]),Sa=e=>U(U(ba(e),([e,t])=>[e,t],()=>U(xa(e),([e,t])=>[e,t],()=>[])),([e,t])=>[Ui(e),t]),Ca=e=>U(U(sa(`^`,e),([e,t])=>U(Sa(t),([t,n])=>U(sa(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Wi(e),t]);function wa(e){return e.join(`|`)}function Ta(e){return e.slice(1,e.length-1)}function Ea(e,t,n){return La(t,`${n}${e}`)}function Da(e,t){return La(e,`${t}${Vn}`)}function Oa(e,t){return La(e,`${t}${Kn}`)}function ka(e,t){return La(e,`${t}${ar}`)}function Aa(e,t){return Ia(M([I(`false`),I(`true`)]),e,t)}function ja(e,t){return La(e,`${t}.*`)}function Ma(e,t,n){return La(t,`${n}${Ta(e)}`)}function Na(e,t,n){return Ia(Ba(e,{}),t,n)}function Pa(e,t,n){return Fa(jr(e),t,n)}function Fa(e,t,n,r=[]){return y(e,(e,i)=>Fa(i,t,n,[...r,Ia(e,[],``)]),()=>La(t,`${n}(${wa(r)})`))}function Ia(e,t,n){return Fn(e)?Pa(e.enum,t,n):Jn(e)?Oa(t,n):L(e)?Ea(e.const,t,n):Un(e)?Da(t,n):Gn(e)?Aa(t,n):or(e)?ka(t,n):lr(e)?ja(t,n):Wa(e)?Ma(e.pattern,t,n):Ua(e)?Na(e.parameters[0],t,n):N(e)?Fa(e.anyOf,t,n):Sn}function La(e,t){return y(e,(e,n)=>Ia(e,n,t),()=>t)}function Ra(e){return`^${La(e,``)}$`}function za(e){return gr(Ra(e))}function Ba(e,t){return X(e)?C(za(e),{},t):Ha(e,t)}function Va(e,t,n,r){return Ba(Bd(e,t,n),r)}function Ha(e,t={}){return T(`TemplateLiteral`,[e],t)}function Ua(e){return zt(e)&&b(e,`action`)&&v(e.action,`TemplateLiteral`)}function Wa(e){return w(e,`TemplateLiteral`)}function Ga(e){return S({"~kind":`ExtendsUnion`},{inferred:e})}function Ka(e){return _(e)&&b(e,`~kind`)&&b(e,`inferred`)&&v(e[`~kind`],`ExtendsUnion`)&&_(e.inferred)}function W(e){return S({"~kind":`ExtendsTrue`},{inferred:e})}function qa(e){return _(e)&&b(e,`~kind`)&&b(e,`inferred`)&&v(e[`~kind`],`ExtendsTrue`)&&_(e.inferred)}function G(){return S({"~kind":`ExtendsFalse`},{})}function Ja(e){return _(e)&&b(e,`~kind`)&&v(e[`~kind`],`ExtendsFalse`)}function K(e){return Ka(e)||qa(e)}function q(e,t,n){return K(e)?t(e.inferred):n()}function Ya(e,t,n,r){return q(Y(e,n,r),r=>W(g(g(e,r),{[t]:n})),()=>G())}function Xa(e,t){return W(e)}function Za(e,t,n){return Y(e,t,Mr(n))}function Qa(e,t,n){return y(n,(n,r)=>q(Y(e,t,n),e=>Qa(e,t,r),()=>G()),()=>W(e))}function $a(e,t,n){return Y(e,t,Er(n))}function eo(e,t,n){return y(n,(n,r)=>q(Y(e,t,n),e=>W(e),()=>eo(e,t,r)),()=>G())}function J(e,t,n){return xn(n)?Xa(e,t):Fn(n)?Za(e,t,n.enum):P(n)?Ya(e,n.name,t,n.extends):F(n)?Qa(e,t,n.allOf):Wa(n)?$a(e,t,n.pattern):N(n)?eo(e,t,n.anyOf):An(n)?W(e):G()}function to(e,t,n){return P(n)?J(e,t,n):xn(n)||An(n)?W(e):Ga(e)}function no(e,t){let n=Xt(e),r=Xt(t);return n&&r||!n&&r?!0:!(n&&!r)}function ro(e,t,n,r){return O(r)?no(t,r)?Y(e,n,r.items):G():J(e,t,r)}function io(e,t,n){return cn(n)?Y(e,t,n.iteratorItems):J(e,sn(t),n)}function ao(e,t,n){return Un(n)?W(e):J(e,t,n)}function oo(e,t,n){return Gn(n)?W(e):J(e,t,n)}function so(e,t,n,r,i){let a=P(r)?t:r,o=P(r)?r:t,s=$t(t),c=$t(r);return!s&&c?G():q(Y(e,a,o),e=>uo(e,n,i),()=>G())}function co(e,t,n,r){return y(r,(r,i)=>so(e,t,n,r,i),()=>$t(t)?W(e):G())}function lo(e,t,n){return y(t,(t,r)=>co(e,t,r,n),()=>W(e))}function uo(e,t,n){return lo(e,t,n)}function fo(e,t,n){return Mi(n)?W(e):Y(e,t,n)}function po(e,t,n,r){return xn(r)||An(r)?W(e):dn(r)?q(uo(e,t,r.parameters),e=>fo(e,n,r.instanceType),()=>G()):G()}function mo(e,t,n){return Y(e,Nr(t),n)}function ho(e,t,n,r){return xn(r)||An(r)?W(e):mn(r)?q(uo(e,t,r.parameters),e=>fo(e,n,r.returnType),()=>G()):G()}function go(e,t,n){return Jn(n)||or(n)?W(e):J(e,t,n)}function _o(e,t,n){return Y(e,V(t),n)}function vo(e,t,n){return Xn(n)?Y(e,t,n.iteratorItems):J(e,Yn(t),n)}function yo(e,t,n){return t===n?W(e):G()}function bo(e,t,n){return L(n)?yo(e,t,n.const):Un(n)?W(e):J(e,I(t),n)}function xo(e,t,n){return L(n)?yo(e,t,n.const):Gn(n)?W(e):J(e,I(t),n)}function So(e,t,n){return L(n)?yo(e,t,n.const):or(n)?W(e):J(e,I(t),n)}function Co(e,t,n){return L(n)?yo(e,t,n.const):lr(n)?W(e):J(e,I(t),n)}function wo(e,t,n){return _t(t.const)?bo(e,t.const,n):vt(t.const)?xo(e,t.const,n):bt(t.const)?So(e,t.const,n):St(t.const)?Co(e,t.const,n):Rn()}function To(e,t,n){return P(n)?J(e,t,n):W(e)}function Eo(e,t,n){return ir(n)?W(e):J(e,t,n)}function Do(e,t,n){return or(n)?W(e):J(e,t,n)}function Oo(e,t,n){return $t(t)?$t(n)?W(e):G():W(e)}function ko(e,t,n){return P(n)&&Cn(n.extends)?G():q(Y(e,t,n),e=>Oo(e,t,n),()=>G())}function Ao(e,t){return e.reduce((e,n)=>n in t&&K(t[n])?{...e,...t[n].inferred}:Rn(),{})}function jo(e,t,n){let r={};for(let i of x(n))r[i]=i in t?ko({},t[i],n[i]):$t(n[i])?P(n[i])?W(g(e,{[n[i].name]:n[i].extends})):W(e):G();let i=Tt(r).every(e=>K(e)),a=i?Ao(x(r),r):{};return i?W(a):G()}function Mo(e,t,n){let r=jo(e,t,n);return K(r)?W(g(e,r.inferred)):G()}function No(e,t,n){return Mo(e,t,n)}function Po(e,t,n){return j(n)?No(e,t,n.properties):J(e,A(t),n)}function Fo(e,t,n){return Kt(n)?Y(e,t,n.item):J(e,Gt(t),n)}function Io(e,t,n){return lr(n)?W(e):J(e,t,n)}function Lo(e,t,n){return cr(n)?W(e):J(e,t,n)}function Ro(e,t,n){return Y(e,Er(t),n)}function zo(e,t){return S({"~kind":`Inferrable`},{name:e,type:t},{})}function Bo(e){return _(e)&&b(e,`~kind`)&&b(e,`name`)&&b(e,`type`)&&v(e[`~kind`],`Inferrable`)&&St(e.name)&&_(e.type)}function Vo(e){return Oi(e)?P(e.items)?O(e.items.extends)?zo(e.items.name,e.items.extends.items):An(e.items.extends)?zo(e.items.name,e.items.extends):void 0:Rn():void 0}function Ho(e){return P(e)?zo(e.name,e.extends):void 0}function Uo(e,t,n=[]){return y(e,(e,r)=>q(Y({},e,t),()=>Uo(r,t,[...n,e]),()=>void 0),()=>n)}function Wo(e,t,n,r){let i=Uo(n,r);return gt(i)?W(g(e,{[t]:Ir(i)})):G()}function Go(e,t,n,r){let i=Uo(n,r);return gt(i)?W(g(e,{[t]:M(i)})):G()}function Ko(e){return[...e].reverse()}function qo(e,t){return t?Ko(e):e}function Jo(e){let t=e.length>0?e[0]:void 0;return zt(zt(t)?Vo(t):void 0)}function Yo(e,t,n,r,i,a){return q(Y(e,n,i),e=>Qo(e,t,r,a),()=>G())}function Xo(e,t,n,r,i){let a=Vo(r);return Bo(a)?Wo(e,a.name,qo(n,t),a.type):y(n,(n,a)=>Yo(e,t,n,a,r,i),()=>G())}function Zo(e,t,n,r){return y(r,(r,i)=>Xo(e,t,n,r,i),()=>v(n.length,0)?W(e):G())}function Qo(e,t,n,r){return Zo(e,t,n,r)}function $o(e,t,n){let r=zd(e,{callstack:[]},n),i=Jo(r);return Qo(e,i,qo(t,i),qo(r,i))}function es(e,t,n){let r=Ho(n);return Bo(r)?Go(e,r.name,t,r.type):y(t,(t,r)=>q(Y(e,t,n),e=>es(e,r,n),()=>G()),()=>W(e))}function ts(e,t,n){let r=zd(e,{callstack:[]},t);return B(n)?$o(e,r,n.items):O(n)?es(e,r,n.items):J(e,Ir(r),n)}function ns(e,t,n){return Mi(n)||ji(n)?W(e):J(e,t,n)}function rs(e,t,n){return y(n,(n,r)=>q(Y(e,t,n),e=>W(e),()=>rs(e,t,r)),()=>G())}function is(e,t,n){return y(t,(t,r)=>q(rs(e,t,n),e=>is(e,r,n),()=>G()),()=>W(e))}function as(e,t,n){let r=Ho(n);return Bo(r)?Go(e,r.name,t,r.type):N(n)?is(e,t,n.anyOf):is(e,t,[n])}function os(e,t,n){return P(n)?J(e,t,n):xn(n)||An(n)?W(e):G()}function ss(e,t,n){return Mi(n)?W(e):J(e,t,n)}function Y(e,t,n){return xn(t)?to(e,t,n):O(t)?ro(e,t,t.items,n):cn(t)?io(e,t.iteratorItems,n):Un(t)?ao(e,t,n):Gn(t)?oo(e,t,n):dn(t)?po(e,t.parameters,t.instanceType,n):Fn(t)?mo(e,t,n):mn(t)?ho(e,t.parameters,t.returnType,n):Jn(t)?go(e,t,n):F(t)?_o(e,t.allOf,n):Xn(t)?vo(e,t.iteratorItems,n):L(t)?wo(e,t,n):Cn(t)?To(e,t,n):ir(t)?Eo(e,t,n):or(t)?Do(e,t,n):j(t)?Po(e,t.properties,n):Kt(t)?Fo(e,t.item,n):lr(t)?Io(e,t,n):cr(t)?Lo(e,t,n):Wa(t)?Ro(e,t.pattern,n):B(t)?ts(e,t.items,n):ji(t)?ns(e,t,n):N(t)?as(e,t.anyOf,n):An(t)?os(e,t,n):Mi(t)?ss(e,t,n):G()}function cs(e,t){return V([...e,A(t)])}function ls(e,t,n){return X(e)?C(cs(e,t),{},n):ds(e,t,n)}function us(e,t,n,r,i){return ls(Bd(e,t,n),Rd(e,t,r),i)}function ds(e,t,n={}){return T(`Interface`,[e,t],n)}function fs(e){return zt(e)&&b(e,`action`)&&v(e.action,`Interface`)}function ps(e,t,n){return e.includes(n)?!0:gs([...e,n],t,t[n])}function ms(e,t,n){return hs(e,t,En(n))}function hs(e,t,n){return y(n,(n,r)=>gs(e,t,n)?!0:hs(e,t,r),()=>!1)}function gs(e,t,n){return _n(n)?ps(e,t,n.$ref):O(n)?gs(e,t,n.items):cn(n)?gs(e,t,n.iteratorItems):dn(n)?hs(e,t,[...n.parameters,n.instanceType]):mn(n)?hs(e,t,[...n.parameters,n.returnType]):fs(n)?ms(e,t,n.parameters[1]):F(n)?hs(e,t,n.allOf):Xn(n)?gs(e,t,n.iteratorItems):j(n)?ms(e,t,n.properties):Kt(n)?gs(e,t,n.item):N(n)?hs(e,t,n.anyOf):B(n)?hs(e,t,n.items):Ei(n)?gs(e,t,Ti(n)):!1}function _s(e,t,n){return gs(e,t,n)}function vs(e,t){return t.reduce((t,n)=>n in e?_s([n],e,e[n])?[...t,n]:t:Rn(),[])}function ys(e){return vs(e,Tn(e))}function bs(e,t,n){return n.includes(t)?n:t in e?Cs(e,e[t],[...n,t]):Rn()}function xs(e,t,n){return Ss(e,En(t),n)}function Ss(e,t,n){return t.reduce((t,n)=>Cs(e,n,t),n)}function Cs(e,t,n){return _n(t)?bs(e,t.$ref,n):O(t)?Cs(e,t.items,n):cn(t)?Cs(e,t.iteratorItems,n):dn(t)?Ss(e,[...t.parameters,t.instanceType],n):mn(t)?Ss(e,[...t.parameters,t.returnType],n):fs(t)?xs(e,t.parameters[1],n):F(t)?Ss(e,t.allOf,n):Xn(t)?Cs(e,t.iteratorItems,n):j(t)?xs(e,t.properties,n):Kt(t)?Cs(e,t.item,n):N(t)?Ss(e,t.anyOf,n):B(t)?Ss(e,t.items,n):Ei(t)?Cs(e,Ti(t),n):n}function ws(e,t,n){return Cs(e,n,[t])}function Ts(e){return bn()}function Es(e){return x(e).reduce((t,n)=>({...t,[n]:Os(e[n])}),{})}function Ds(e){return e.reduce((e,t)=>[...e,Os(t)],[])}function Os(e){return _n(e)?Ts(e.$ref):O(e)?D(Os(e.items),on(e)):cn(e)?sn(Os(e.iteratorItems)):dn(e)?un(Ds(e.parameters),Os(e.instanceType)):mn(e)?pn(Ds(e.parameters),Os(e.returnType)):F(e)?In(Ds(e.allOf)):Xn(e)?Yn(Os(e.iteratorItems)):j(e)?A(Es(e.properties)):Kt(e)?Gt(Os(e.item)):Ei(e)?H(wi(e),Os(Ti(e))):N(e)?M(Ds(e.anyOf)):B(e)?Ir(Ds(e.items)):e}function ks(e,t){return t in e?Os(e[t]):kn()}function As(e){return ks(e.$defs,e.$ref)}function js(e,t,n){let r=Bd(e,{callstack:[]},t),i=Rd({},{callstack:[]},n);return V([...r,A(i)])}function Ms(e,t){return x(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=fs(r)?js(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function Ns(e,t,n){return jn(Ms(e,ws(e,t,n)),t)}function Ps(e,t){return t in e?_n(e[t])?Ps(e,e[t].$ref):e[t]:k()}function Fs(e,t){return Ps(e,t)}function Is(e){return Mn(e)?As(e):Pn(e)?kn():e}function Ls(e,t,n){return Y(e,Is(t),Is(n))}var Rs=`equal`,zs=`disjoint`,Bs=`left-inside`,Vs=`right-inside`;function Hs(e,t){let n=[An(e)?G():Ls({},e,t),An(e)?W({}):Ls({},t,e)];return K(n[0])&&K(n[1])?Rs:K(n[0])&&Ja(n[1])?Bs:Ja(n[0])&&K(n[1])?Vs:zs}function Us(e,t){return t.filter(t=>Hs(e,t)!==`right-inside`)}function Ws(e,t){return v(t.some(t=>{let n=Hs(e,t);return v(n,`left-inside`)||v(n,`equal`)}),!1)}function Gs(e,t){let n=ti(e);return xn(n)?[n]:Ws(n,t)?[...Us(n,t),n]:t}function Ks(e){return e.reduce((e,t)=>j(t)?[...e,t]:Cn(t)?e:Gs(t,e),[])}function qs(e){let t=li(Ks(e));return t.length===0?k():t.length===1?t[0]:M(t)}function Js(e,t){return C(ti(e),{},t)}function Ys(e,t,n,r){return Js(Z(e,t,n),r)}function Xs(e,t=[]){return Wt(e)&&v(e.action,`Conditional`)?_n(e.parameters[0])?Xs(e.parameters[2],Xs(e.parameters[3],[...t,e.parameters[0].$ref])):Xs(e.parameters[2],Xs(e.parameters[3],t)):Wt(e)&&v(e.action,`Mapped`)&&Wt(e.parameters[1])&&v(e.parameters[1].action,`KeyOf`)&&_n(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function Zs(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function Qs(e,t,n=[]){return y(e,(e,r)=>y(t,(t,i)=>Qs(r,i,[...n,[t,e]]),()=>n),()=>n)}function $s(e){return N(e)?[...e.anyOf]:[e]}function ec(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function tc(e,t){return t.reduce((t,n)=>[...t,...ec(e,n)],[])}function nc(e){return e.reduce((e,t)=>v(t[0],!0)?tc(e,$s(t[1])):tc(e,[t[1]]),[[]])}function rc(e,t,n){let r=Qs(t,Zs(e,Xs(n)));return Wt(n)&&v(n.action,`Conditional`)||Wt(n)&&v(n.action,`Mapped`)?nc(r):[t]}function ic(){return[`(not-resolvable)`,k()]}function ac(){return[`(not-generic)`,k()]}function oc(e,t,n){return[e,vn(t,n)]}function sc(e,t,n){return t in e?cc(e,t,e[t],n):ic()}function cc(e,t,n,r){return yn(n)?oc(t,n.parameters,n.expression):_n(n)?sc(e,n.$ref,r):ac()}function lc(e,t,n){return cc(e,`(anonymous)`,t,n)}function uc(e,t,n){if(P(t)||Sc(t)||K(Ls({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function dc(e,t,n,r,i){let a=Z(e,t,i);return uc(n,a,r),g(e,{[n]:a})}function fc(e,t,n,r,i){let a=Z(e,t,n.extends),o=Z(e,t,n.equals);return y(i,(i,o)=>pc(dc(e,t,n.name,a,i),t,r,o),()=>pc(dc(e,t,n.name,a,o),t,r,[]))}function pc(e,t,n,r){return y(n,(n,i)=>fc(e,t,n,i,r),()=>e)}function mc(e,t,n,r){return pc(e,t,n,r)}function hc(e){return Ct(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function gc(e,t){return v(hc(e),t)}function _c(e,t,n,r,i,a){return Z(e,t,Z(mc(e,t,r,a),{callstack:[...t.callstack,n.$ref]},i))}function vc(e,t,n,r,i,a){return a.reduce((a,o)=>[...a,_c(e,t,n,r,i,o)],[])}function yc(e,t,n,r,i,a){let o=vc(e,t,n,r,i,rc(r,a,i));return v(o.length,1)?o[0]:ei(o)}function bc(e,t,n,r){let i=Bd(e,t,r),a=lc(e,n,r),o=a[0],s=a[1];return yn(s)?gc(t,o)?xc(gn(o),i):yc(e,t,gn(o),s.parameters,s.expression,i):xc(n,i)}function xc(e,t){return S({"~kind":`Call`},{target:e,arguments:t},{})}function Sc(e){return w(e,`Call`)}function Cc(e,t){return e(t)}function wc(e,t){return St(t)?I(Cc(e,t)):I(t)}function Tc(e,t){return Dc(e,Er(t))}function Ec(e,t){return M(t.map(t=>Dc(e,t)))}function Dc(e,t){return L(t)?wc(e,t.const):Wa(t)?Tc(e,t.pattern):N(t)?Ec(e,t.anyOf):t}function Oc(e,t={}){return T(`Capitalize`,[e],t)}function kc(e,t={}){return T(`Lowercase`,[e],t)}function Ac(e,t={}){return T(`Uncapitalize`,[e],t)}function jc(e,t={}){return T(`Uppercase`,[e],t)}var Mc=e=>e[0].toUpperCase()+e.slice(1),Nc=e=>e.toLowerCase(),Pc=e=>e[0].toLowerCase()+e.slice(1),Fc=e=>e.toUpperCase();function Ic(e,t){return X([e])?C(Dc(Mc,e),{},t):Oc(e,t)}function Lc(e,t){return X([e])?C(Dc(Nc,e),{},t):kc(e,t)}function Rc(e,t){return X([e])?C(Dc(Pc,e),{},t):Ac(e,t)}function zc(e,t){return X([e])?C(Dc(Fc,e),{},t):jc(e,t)}function Bc(e,t,n,r){return Ic(Z(e,t,n),r)}function Vc(e,t,n,r){return Lc(Z(e,t,n),r)}function Hc(e,t,n,r){return Rc(Z(e,t,n),r)}function Uc(e,t,n,r){return zc(Z(e,t,n),r)}function Wc(e,t,n,r,i={}){return T(`Conditional`,[e,t,n,r],i)}function Gc(e,t,n,r,i,a){let o=Ls(e,n,r);return Ka(o)?M([Z(o.inferred,t,i),Z(e,t,a)]):qa(o)?Z(o.inferred,t,i):Z(e,t,a)}function Kc(e,t,n,r,i,a,o){return X([n,r])?C(Gc(e,t,n,r,i,a),{},o):Wc(n,r,i,a,o)}function qc(e,t,n,r,i,a,o){return Kc(e,t,Z(e,t,n),Z(e,t,r),i,a,o)}function Jc(e,t={}){return T(`ConstructorParameters`,[e],t)}function Yc(e){return Ir(zd({},{callstack:[]},dn(e)?e.parameters:[]))}function Xc(e,t){return X([e])?C(Yc(e),{},t):Jc(e,t)}function Zc(e,t,n,r){return Xc(Z(e,t,n),r)}function Qc(e,t,n={}){return T(`Exclude`,[e,t],n)}function $c(e,t){return e.reduce((e,n)=>[...e,...el(n,t)],[])}function el(e,t){return K(Ls({},e,t))?[]:[e]}function tl(e,t){return ei(Fn(e)?$c(jr(e.enum),t):N(e)?$c(li(e.anyOf),t):el(e,t))}function nl(e,t,n){return X([e,t])?C(tl(e,t),{},n):Qc(e,t,n)}function rl(e,t,n,r,i){return nl(Z(e,t,n),Z(e,t,r),i)}function il(e,t,n={}){return T(`Extract`,[e,t],n)}function al(e,t){return e.reduce((e,n)=>[...e,...ol(n,t)],[])}function ol(e,t){return K(Ls({},e,t))?[e]:[]}function sl(e,t){return ei(Fn(e)?al(jr(e.enum),t):N(e)?al(li(e.anyOf),t):ol(e,t))}function cl(e,t,n){return X([e,t])?C(sl(e,t),{},n):il(e,t,n)}function ll(e,t,n,r,i){return cl(Z(e,t,n),Z(e,t,r),i)}function ul(e,t,n={}){return T(`Index`,[e,t],n)}function dl(e,t){return yl(Fs(e,t))}function fl(e,t){let n=x(e).filter(e=>!b(t,e)),r=x(t).filter(t=>!b(e,t)),i=x(e).filter(e=>b(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:V([e[r],t[r]])}),{});return g(g(a,o),s)}function pl(e){return e.reduce((e,t)=>fl(e,yl(t)),{})}function ml(e){return e}function hl(e){return yl(zr(Ir(e)))}function gl(e,t){return x(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:ei([e[r],t[r]])}),{})}function _l(e,t){return y(e,(e,n)=>_l(n,gl(t,yl(e))),()=>t)}function vl(e){return y(e,(e,t)=>_l(t,yl(e)),()=>Rn())}function yl(e){return Mn(e)?dl(e.$defs,e.$ref):F(e)?pl(e.allOf):N(e)?vl(e.anyOf):B(e)?hl(e.items):j(e)?ml(e.properties):{}}function bl(e){return A(yl(e))}var xl=RegExp(`^(?:0|[1-9][0-9]*)$`);function Sl(e){let t=`${e}`;return xl.test(t)?parseInt(t):e}function Cl(e){return I(Sl(e))}function wl(e){return e.map(e=>Tl(e))}function Tl(e){return F(e)?In(wl(e.allOf)):N(e)?M(wl(e.anyOf)):L(e)?Cl(e.const):e}function El(e,t){return K(Ls({},Tl(t),R()))?e:L(t)&&v(t.const,`length`)?R():k()}function Dl(e,t){return Nl(Fs(e,t))}function Ol(e){return e.reduce((e,t)=>[...e,...Nl(t)],[])}function kl(e){return Ol(jr(e))}function Al(e){return Nl(V(e))}function jl(e){return[`${e}`]}function Ml(e){return Nl(Er(e))}function Nl(e){return Mn(e)?Dl(e.$defs,e.$ref):Fn(e)?kl(e.enum):F(e)?Al(e.allOf):L(e)?jl(e.const):Wa(e)?Ml(e.pattern):N(e)?Ol(e.anyOf):[]}function Pl(e){return Nl(e)}function Fl(e,t){return t.map(t=>Il(e,t))}function Il(e,t){return O(t)?D(Il(e,t.items)):cn(t)?sn(Il(e,t.iteratorItems)):dn(t)?un(Fl(e,t.parameters),Il(e,t.instanceType)):mn(t)?pn(Fl(e,t.parameters),Il(e,t.returnType)):Xn(t)?Yn(Il(e,t.iteratorItems)):Kt(t)?Gt(Il(e,t.item)):B(t)?Ir(Fl(e,t.items)):N(t)?M(Fl(e,t.anyOf)):F(t)?In(Fl(e,t.allOf)):ki(t)?A(e):t}function Ll(e,t){return Il(e,t)}function Rl(e,t){return Ll(e,t in e?e[t]:k())}function zl(e,t){return t.reduce((t,n)=>[...t,Rl(e,n)],[])}function Bl(e,t){return ei(zl(e,Pl(t)))}var Vl=new RegExp(vi);function Hl(e){return e.filter(e=>Vl.test(e))}function Ul(e){return ei(zl(e,Hl(Tn(e))))}function Wl(e,t){return or(t)?Ul(e):Bl(e,t)}function Gl(e){return I(Sl(e))}function Kl(e){return e.map(e=>ql(e))}function ql(e){return F(e)?In(Kl(e.allOf)):N(e)?M(Kl(e.anyOf)):L(e)?Gl(e.const):e}function Jl(e,t){return e.reduceRight((e,n,r)=>K(Ls({},I(r),t))?[n,...e]:e,[])}function Yl(e,t){return ni(Jl(e,ql(t)))}function Xl(e){return ni(e)}function Zl(e,t){return L(t)&&v(t.const,`length`)?I(e.length):or(t)||Jn(t)?Xl(e):Yl(e,t)}function Ql(e,t){return O(e)?El(e.items,t):j(e)?Wl(e.properties,t):B(e)?Zl(e.items,t):k()}function $l(e){return Mn(e)||F(e)||N(e)?bl(e):e}function eu(e,t,n){return X([e,t])?C(Ql($l(e),t),{},n):ul(e,t,n)}function tu(e,t,n,r,i){return eu(Z(e,t,n),Z(e,t,r),i)}function nu(e,t={}){return T(`InstanceType`,[e],t)}function ru(e){return dn(e)?e.instanceType:k()}function iu(e,t){return X([e])?C(ru(e),{},t):nu(e,t)}function au(e,t,n,r={}){return iu(Z(e,t,n),r)}function ou(e,t={}){return T(`KeyOf`,[e],t)}function su(){return M([R(),z(),sr()])}function cu(e){return R()}function lu(e){return e.reduce((e,t)=>er(t)?[...e,I(Sl(t))]:Rn(),[])}function uu(e){return ni(lu(x(e)))}function du(e){return wi(e)}function fu(e){return ni(e.map((e,t)=>I(t)))}function pu(e){return xn(e)?su():O(e)?cu(e.items):j(e)?uu(e.properties):Ei(e)?du(e):B(e)?fu(e.items):k()}function mu(e){return Mn(e)||F(e)||N(e)?bl(e):e}function hu(e,t){return X([e])?C(pu(mu(e)),{},t):ou(e,t)}function gu(e,t,n,r){return hu(Z(e,t,n),r)}function _u(e,t,n,r,i={}){return T(`Mapped`,[e,t,n,r],i)}function vu(e){return xu(Er(e))}function yu(e){return e.reduce((e,t)=>[...e,...xu(t)],[])}function bu(e){return bt(e)?[I(`${e}`)]:[I(e)]}function xu(e){return Fn(e)?yu(jr(e.enum)):L(e)?bu(e.const):Wa(e)?vu(e.pattern):N(e)?yu(e.anyOf):[e]}function Su(e){return xu(e)}function Cu(e){return Wa(e)?Er(e.pattern):e}function wu(e,t,n,r,i,a){let o=g(e,{[n.name]:r}),s=Cu(Z(o,t,i)),c=Z(o,t,a);return tr(s)||nr(s)?{[s.const]:c}:{}}function Tu(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,wu(e,t,n,o,i,a)],[])}function Eu(e){return e.reduce((e,t)=>[...e,A(t)],[])}function Du(e,t,n,r,i,a){return V(Eu(Tu(e,t,n,Su(r),i,a)))}function Ou(e,t,n,r,i,a,o){return X([r])?C(Du(e,t,n,r,i,a),{},o):_u(n,r,i,a,o)}function ku(e,t,n,r,i,a,o){return Ou(e,t,n,Z(e,t,r),i,a,o)}function Au(e,t){return x(e).filter(e=>t.includes(e)).reduce((t,n)=>({...t,[n]:Ns(e,n,e[n])}),{})}function ju(e,t){return x(e).filter(e=>!t.includes(e)).reduce((t,n)=>({...t,[n]:Z(e,{callstack:[]},e[n])}),{})}function Mu(e,t){let n=ys(e),r=Au(e,n),i=ju(e,n);return C({...r,...i},{},t)}function Nu(e,t,n,r){return Mu(g(e,n),r)}function Pu(e,t={}){return T(`NonNullable`,[e],t)}function Fu(e){return nl(e,M([rr(),Ai()]),{})}function Iu(e,t){return X([e])?C(Fu(e),{},t):Pu(e,t)}function Lu(e,t,n,r){return Iu(Z(e,t,n),r)}function Ru(e,t,n={}){return T(`Omit`,[e,t],n)}function zu(e){let t=bl(e);return j(t)?t.properties:Rn()}function Bu(e,t){return x(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function Vu(e,t){return A(Bu(zu(e),Pl(t)))}function Hu(e,t,n){return X([e,t])?C(Vu(e,t),{},n):Ru(e,t,n)}function Uu(e,t,n,r,i){return Hu(Z(e,t,n),Z(e,t,r),i)}function Wu(e,t){return T(`Options`,[e,t],{})}function Gu(e,t){return X([e])?C(e,{},t):Wu(e,t)}function Ku(e,t,n,r){return Gu(Z(e,t,n),r)}function qu(e,t={}){return T(`Parameters`,[e],t)}function Ju(e){return Ir(zd({},{callstack:[]},mn(e)?e.parameters:[]))}function Yu(e,t){return X([e])?C(Ju(e),{},t):qu(e,t)}function Xu(e,t,n,r){return Yu(Z(e,t,n),r)}function Zu(e,t={}){return T(`Partial`,[e],t)}function Qu(e,t){let n=nd(Fs(e,t));return jn(g(e,{[t]:n}),t)}function $u(e){return V(e.map(e=>nd(e)))}function ed(e){return M(e.map(e=>nd(e)))}function td(e){return A(x(e).reduce((t,n)=>({...t,[n]:E(e[n])}),{}))}function nd(e){return Mn(e)?Qu(e.$defs,e.$ref):F(e)?$u(e.allOf):N(e)?ed(e.anyOf):j(e)?td(e.properties):A({})}function rd(e,t){return X([e])?C(nd(e),{},t):Zu(e,t)}function id(e,t,n,r){return rd(Z(e,t,n),r)}function ad(e,t,n={}){return T(`Pick`,[e,t],n)}function od(e,t){return x(e).reduce((n,r)=>t.includes(r)?g(n,{[r]:e[r]}):n,{})}function sd(e,t){return A(od(zu(e),Pl(t)))}function cd(e,t,n){return X([e,t])?C(sd(e,t),{},n):ad(e,t,n)}function ld(e,t,n,r,i){return cd(Z(e,t,n),Z(e,t,r),i)}function ud(e,t={}){return T(`ReadonlyObject`,[e],t)}function dd(e){return Yt(D(e))}function fd(e,t){let n=_d(Fs(e,t));return jn(g(e,{[t]:n}),t)}function pd(e){return V(e.map(e=>_d(e)))}function md(e){return A(x(e).reduce((t,n)=>({...t,[n]:nn(e[n])}),{}))}function hd(e){return Yt(Ir(e))}function gd(e){return M(e.map(e=>_d(e)))}function _d(e){return O(e)?dd(e.items):Mn(e)?fd(e.$defs,e.$ref):F(e)?pd(e.allOf):j(e)?md(e.properties):B(e)?hd(e.items):N(e)?gd(e.anyOf):e}function vd(e,t){return X([e])?C(_d(e),{},t):ud(e)}function yd(e,t,n,r){return vd(Z(e,t,n),r)}function bd(e,t,n,r){return r in e?_s([r],e,e[r])?n:Z(e,t,e[r]):n}function xd(e,t){let n=Td(Fs(e,t));return jn(g(e,{[t]:n}),t)}function Sd(e){return V(e.map(e=>Td(e)))}function Cd(e){return M(e.map(e=>Td(e)))}function wd(e){return A(x(e).reduce((t,n)=>({...t,[n]:Zt(e[n])}),{}))}function Td(e){return Mn(e)?xd(e.$defs,e.$ref):F(e)?Sd(e.allOf):N(e)?Cd(e.anyOf):j(e)?wd(e.properties):A({})}function Ed(e,t={}){return T(`Required`,[e],t)}function Dd(e,t){return X([e])?C(Td(e),{},t):Ed(e,t)}function Od(e,t,n,r){return Dd(Z(e,t,n),r)}function kd(e,t={}){return T(`ReturnType`,[e],t)}function Ad(e){return mn(e)?e.returnType:k()}function jd(e,t){return X([e])?C(Ad(e),{},t):kd(e,t)}function Md(e,t,n,r={}){return jd(Z(e,t,n),r)}function Nd(e){return Oi(e)?B(e.items)?Pd(e.items.items):P(e.items)||_n(e.items)?[e]:[k()]:[e]}function Pd(e){return e.reduce((e,t)=>[...e,...Nd(t)],[])}function X(e){return y(e,(e,t)=>!_n(e)&&X(t),()=>!0)}function Fd(e,t,n){return Ut(e)?Fd(e.type,`remove`,n):Vt(e)?Fd(e.type,t,`remove`):Ht(e)?Fd(e.type,`add`,n):Bt(e)?Fd(e.type,t,`add`):[e,t,n]}function Id(e,t){return v(e,`remove`)?en(t):v(e,`add`)?tn(t):t}function Ld(e,t){return v(e,`remove`)?Zt(t):v(e,`add`)?Qt(t):t}function Rd(e,t,n){return x(n).reduce((r,i)=>({...r,[i]:Z(e,t,n[i])}),{})}function zd(e,t,n){return Pd(Bd(e,t,n))}function Bd(e,t,n){return n.map(n=>Z(e,t,n))}function Vd(e,t,n,r,i){return v(n,`Awaited`)?Wd(e,t,r[0],i):v(n,`Capitalize`)?Bc(e,t,r[0],i):v(n,`Conditional`)?qc(e,t,r[0],r[1],r[2],r[3],i):v(n,`ConstructorParameters`)?Zc(e,t,r[0],i):v(n,`Evaluate`)?Ys(e,t,r[0],i):v(n,`Exclude`)?rl(e,t,r[0],r[1],i):v(n,`Extract`)?ll(e,t,r[0],r[1],i):v(n,`Index`)?tu(e,t,r[0],r[1],i):v(n,`InstanceType`)?au(e,t,r[0],i):v(n,`Interface`)?us(e,t,r[0],r[1],i):v(n,`KeyOf`)?gu(e,t,r[0],i):v(n,`Lowercase`)?Vc(e,t,r[0],i):v(n,`Mapped`)?ku(e,t,r[0],r[1],r[2],r[3],i):v(n,`Module`)?Nu(e,t,r[0],i):v(n,`NonNullable`)?Lu(e,t,r[0],i):v(n,`Pick`)?ld(e,t,r[0],r[1],i):v(n,`Options`)?Ku(e,t,r[0],r[1]):v(n,`Parameters`)?Xu(e,t,r[0],i):v(n,`Partial`)?id(e,t,r[0],i):v(n,`Omit`)?Uu(e,t,r[0],r[1],i):v(n,`ReadonlyObject`)?yd(e,t,r[0],i):v(n,`Record`)?_i(e,t,r[0],r[1],i):v(n,`Required`)?Od(e,t,r[0],i):v(n,`ReturnType`)?Md(e,t,r[0],i):v(n,`TemplateLiteral`)?Va(e,t,r[0],i):v(n,`Uncapitalize`)?Hc(e,t,r[0],i):v(n,`Uppercase`)?Uc(e,t,r[0],i):T(n,r,i)}function Z(e,t,n){let r=Xt(n),i=Fd(n,rn(n)?`add`:`none`,$t(n)?`add`:`none`),a=an(i[0])?i[0].Clone():i[0],o=_n(a)?bd(e,t,a,a.$ref):O(a)?D(Z(e,t,a.items),on(a)):cn(a)?sn(Z(e,t,a.iteratorItems),ln(a)):Sc(a)?bc(e,t,a.target,a.arguments):dn(a)?un(Bd(e,t,a.parameters),Z(e,t,a.instanceType),fn(a)):Wt(a)?Vd(e,t,a.action,a.parameters,a.options):mn(a)?pn(Bd(e,t,a.parameters),Z(e,t,a.returnType),hn(a)):F(a)?In(Bd(e,t,a.allOf),Ln(a)):Xn(a)?Yn(Z(e,t,a.iteratorItems),Zn(a)):j(a)?A(Rd(e,t,a.properties),Dn(a)):Kt(a)?Gt(Z(e,t,a.item),qt(a)):Ei(a)?Si(Ci(a),Z(e,t,Ti(a))):Oi(a)?Di(Z(e,t,a.items)):B(a)?Ir(zd(e,t,a.items),Lr(a)):N(a)?M(Bd(e,t,a.anyOf),On(a)):a,s=r?Yt(o):o;return Id(i[1],Ld(i[2],s))}function Hd(e){return Kt(e)?Hd(e.item):e}function Ud(e,t){return X([e])?C(Hd(e),{},t):Gd(e,t)}function Wd(e,t,n,r){return Ud(Z(e,t,n),r)}function Gd(e,t={}){return T(`Awaited`,[e],t)}var Kd=[`modernist`,`organic`,`industry`,`terminal`,`manuscript`,`pop`],qd=[`volta`,`phosphor`,`drafting`,`meridian`,`dossier`,`riso`,`almanac`,`redline`,`nocturne`,`broadsheet`,`signout`,`sorbet`,`arcade`],Q=(e,t)=>Nn({type:`string`,enum:[...e],...t?{description:t}:{}}),$=e=>E(M([e,rr()])),Jd=(e,t)=>E(M([e,rr()],{description:t})),Yd=[...Kd,...qd],Xd=[`editorial`,`deck`,`scrolly`,`dashboard`,`plan`,`app`,`landing`];A({description:$(z()),story:Jd(z({format:`jsx`}),'One self-contained, FLUID RESPONSIVE document rendered as a single scrolling story page. STYLING — the built-in DESIGN SYSTEM: put `data-design="tw"` and the `@container` class on your full-width root wrapper. Every Tailwind v4 utility works (arbitrary values included) — the platform compiles exactly the classes you use at save time. Responsiveness: Tailwind CONTAINER-QUERY variants (`@lg:`, `@2xl:` — NEVER viewport `md:`/`lg:`). COMPONENTS: the body is STATIC JSX — plain HTML content tags styled with Tailwind (`className=`) plus the registered shadcn/ui component set: '+se.join(`, `)+`. These are the ONLY Capitalized tags allowed. For prose columns/sidebars, prefer <Grid mode="flow"><GridItem w={8}>…</GridItem><GridItem w={4}>…</GridItem></Grid>. Flow stacks on phones, grows with content, and supports direct column manipulation. Use w and optional minHeight (pixels), never x/y/h, in flow. POSITIONED DASHBOARDS — <Grid><GridItem x={0} y={0} w={8} h={5}>…</GridItem>…</Grid>: 12 columns × 86px rows.`),format:E(M([I(`jsx`),rr()],{description:`'jsx' = the story field holds shadcn JSX source rendered by the story interpreter`})),theme:E($(Q(Yd,`Design theme for the story (format:'jsx' only) — picks the named design PERSONALITY (fonts, corner radius, chart palette, a light AND a dark token set) the story renders with. One of the six built-in themes; omit/null for the neutral default. Components and utility classes are identical across themes and modes, only the tokens change.`))),template:E($(Q(Xd,`Story template (format:'jsx' only) — the document's structural genre: 'editorial' (long-read magazine feature), 'deck' (slide-section presentation), 'scrolly' (playful scrollytelling), 'dashboard' (a Grid of draggable KPI/chart tiles with minimal prose), plan (visual proposals, flows and milestones), 'app' (a tool people operate: state, actions, outcomes), 'landing' (one offering, one next action). METADATA ONLY: it records intent and drives the structure YOU write; no automatic CSS or layout is applied.`))),colorMode:E($(Q([`light`,`dark`],`The AUTHOR'S DEFAULT mode for the story surface. Every theme carries both a light and a dark palette; omit/null to open in the theme's own default mode (light when unthemed). Readers can flip the rendered mode at view time regardless.`)))},{title:`StoryContent`});var Zd=[`table`,`bar`,`line`,`scatter`,`area`,`funnel`,`pie`,`pivot`,`trend`,`waterfall`,`combo`,`radar`,`geo`,`single_value`,`row`,`choropleth`,`point_map`];Q(Zd);var Qd={mapName:$(z({description:`base GeoJSON map: 'world', 'us-states', 'india-states'`})),showTiles:$(Wn({description:`toggle OpenStreetMap tile layer`})),pinnedCenter:$(D(R(),{description:`pinned map center as [lat, lng]`})),pinnedZoom:$(qn({description:`pinned map zoom level`}))},$d=M([A({...Qd,subType:I(`choropleth`,{description:`geo visualization sub-type`}),regionCol:$(z({description:`column matching GeoJSON feature names`})),valueCol:$(z({description:`numeric value column for fill color`})),colorScale:$(z({description:`color scale: 'green' (default), 'blue', 'red-yellow-green'`}))},{title:`ChoroplethConfig`}),A({...Qd,subType:I(`points`,{description:`geo visualization sub-type`}),latCol:$(z({description:`latitude column`})),lngCol:$(z({description:`longitude column`})),valueCol:$(z({description:`numeric value column for bubble sizing (optional)`})),colorCol:$(z({description:`column for coloring points by value (categorical or numeric)`})),colorScale:$(z({description:`color scale for numeric colorCol: 'green' (default), 'blue', 'red-yellow-green'`})),minRadius:$(qn({description:`minimum circle radius in pixels (default 5, range 1-20)`})),radiusScale:$(R({description:`radius multiplier (default 1, e.g. 2 = double size)`}))},{title:`PointsConfig`}),A({...Qd,subType:I(`lines`,{description:`geo visualization sub-type`}),latCol:$(z({description:`origin latitude column`})),lngCol:$(z({description:`origin longitude column`})),latCol2:$(z({description:`destination latitude column`})),lngCol2:$(z({description:`destination longitude column`}))},{title:`LinesConfig`}),A({...Qd,subType:I(`heatmap`,{description:`geo visualization sub-type`}),latCol:$(z({description:`latitude column`})),lngCol:$(z({description:`longitude column`})),valueCol:$(z({description:`numeric intensity column (optional, defaults to 1)`})),colorScale:$(z({description:`color scale: 'green' (default), 'blue', 'red-yellow-green'`}))},{title:`HeatmapConfig`})]);Q([`SUM`,`AVG`,`COUNT`,`MIN`,`MAX`]),Q([`+`,`-`,`*`,`/`]);var ef=A({column:z({description:`column name for the measure`}),aggFunction:E(Q([`SUM`,`AVG`,`COUNT`,`MIN`,`MAX`],`aggregation function to apply (SUM, AVG, COUNT, MIN, MAX)`))},{title:`PivotValueConfig`}),tf=A({name:z({description:`display label, e.g. 'YoY Change'`}),operandA:z({description:`dimension value, e.g. '2024'`}),operandB:z({description:`dimension value, e.g. '2023'`}),operator:Q([`+`,`-`,`*`,`/`],`arithmetic operator: +, -, *, /`),dimensionLevel:$(qn({description:`which dimension level to match (0=top-level, 1=second level, etc.). Defaults to 0.`})),parentValues:$(D(z(),{description:`parent dimension values to scope the formula when dimensionLevel > 0, e.g. ['PnL'] means only match within the PnL group`}))},{title:`PivotFormula`}),nf=A({rows:D(z(),{description:`dimension columns for row headers`}),columns:D(z(),{description:`dimension columns for column headers`}),values:D(ef,{description:`measures with per-value aggregation functions`}),showRowTotals:$(Wn({description:`show row totals column`})),showColumnTotals:$(Wn({description:`show column totals row`})),showHeatmap:$(Wn({description:`show heatmap conditional formatting`})),compact:$(Wn({description:`DEPRECATED compact heatmap mode (GitHub-contribution-graph look) — kept rendering for legacy pivots; prefer the dedicated heatmap viz type (vega-lite rect mark) instead`})),heatmapScale:$(z({description:`heatmap color scale: 'red-yellow-green' (default), 'green' (single-hue like GitHub), 'blue' (single-hue blue)`})),rowFormulas:$(D(tf,{description:`formulas combining top-level row dimension values`})),columnFormulas:$(D(tf,{description:`formulas combining top-level column dimension values`}))},{title:`PivotConfig`});Q([`linear`,`log`]);var rf=A({xScale:$(Q([`linear`,`log`],`X-axis scale type: 'linear' (default) or 'log'`)),yScale:$(Q([`linear`,`log`],`Y-axis scale type: 'linear' (default) or 'log'`)),xMin:$(R({description:`explicit X-axis minimum value`})),xMax:$(R({description:`explicit X-axis maximum value`})),yMin:$(R({description:`explicit Y-axis minimum value`})),yMax:$(R({description:`explicit Y-axis maximum value`})),yTitle:$(z({description:`optional Y-axis title override for charts with a single Y axis`})),dualAxis:$(Wn({description:`enable dual Y-axis mode. When true, yRightCols in VizSettings determines which columns go on the right axis.`}))},{title:`AxisConfig`}),af=A({alias:$(z({description:`display name override for the column header`})),format:$(z({description:`d3 format string for numeric values — the VEGA-TIER vocabulary (recipe sources): e.g. ',.0f', '$,.2f', '.2~s'. Takes precedence over decimalPoints/prefix/suffix. DOM grids (table/pivot) ignore it — they use the fields below.`})),decimalPoints:$(qn({description:`number of decimal places (0-4) for numeric columns`})),dateFormat:$(z({description:`date display format as a Unicode date pattern, e.g. 'yyyy-MM-dd', 'MM/dd/yyyy', 'dd/MM/yyyy', 'MMM dd, yyyy', "MMM'yy", 'yyyy', 'yyyy-MM-dd HH:mm', 'HH:mm:ss'. Tokens: yyyy (4-digit year), yy (2-digit year), MMMM (full month), MMM (short month), MM (month number), dd (day), HH (hours 24h), mm (minutes), ss (seconds).`})),prefix:$(z({description:`string to prepend to displayed values (e.g. '$', '€')`})),suffix:$(z({description:`string to append to displayed values (e.g. '%', ' units', 'k')`}))},{title:`ColumnFormatConfig`}),of=M([A({id:z({description:`stable unique id for this rule`}),column:z({description:`the column whose value the condition is checked against`}),operator:Q([`=`,`!=`,`>`,`<`,`>=`,`<=`,`contains`],`comparison operator`),value:z({description:`value to compare against (coerced to number for numeric columns)`}),target:Q([`cell`,`row`,`column`],`what gets painted when the condition matches: the matching 'cell', the entire 'row', or the entire 'column'`),bgColor:z({description:`background color as a hex string, e.g. '#fde68a'`})},{title:`ConditionFormatRule`}),A({id:z({description:`stable unique id for this rule`}),column:z({description:`numeric column whose cells are painted with a min→max colour ramp over the column values (heatmap cells)`}),scale:Q([`red-yellow-green`,`green`,`blue`],`colour ramp: 'red-yellow-green' (diverging, default), 'green' (single-hue, GitHub-like), 'blue' (single-hue)`)},{title:`ColorScaleFormatRule`})],{title:`ConditionalFormatRule`}),sf=A({colors:$(H(z(),z(),{description:`color overrides mapping series index to color key (e.g. {'0': 'danger', '2': 'warning'}).`})),opacity:$(R({description:`series opacity from 0.1 to 1.0`})),markerSize:$(qn({description:`point marker size for charts that render markers, such as scatter and line`})),stacked:$(Wn({description:`whether bar and area series should be stacked. Defaults to true for those chart types.`})),showDataLabels:$(Wn({description:`show numeric value labels on each data point. Defaults to false.`})),dataLabelColor:$(z({description:`color for the data value labels as a hex string, e.g. '#ffffff'. Defaults to black on bars and the series color otherwise. Only relevant when showDataLabels is true.`}))},{title:`VisualizationStyleConfig`});Q([`last`,`previous`]);var cf=A({compareMode:$(Q([`last`,`previous`],`which periods to compare: 'last' (default, last vs second-to-last) or 'previous' (second-to-last vs third-to-last, skips partial current period)`))},{title:`TrendConfig`}),lf=A({label:$(z({description:`override the displayed label (defaults to the metric column name); set to an empty string to hide the label`})),prefix:$(z({description:`text shown immediately before the number, e.g. '$'`})),suffix:$(z({description:`text shown immediately after the number, e.g. '%' or ' MRR'`})),valueSize:$(z({description:`CSS font-size for the number, e.g. '4rem' or 'clamp(2rem, 10cqi, 6rem)'. Omit for the responsive default.`})),valueColor:$(z({description:`CSS color for the number, e.g. "#16a34a" (a CSS color string, not a theme token)`})),valueWeight:$(qn({description:`font weight for the number (100-900)`})),labelColor:$(z({description:`CSS color for the label`})),align:$(Q([`left`,`center`,`right`],`horizontal alignment of the value block (default center)`))},{title:`SingleValueConfig`}),uf=A({x:M([z(),R()],{description:`X-axis value to anchor the annotation to`}),series:$(z({description:`series name to anchor the annotation to`})),text:z({description:`annotation label text`})},{title:`ChartAnnotation`});A({type:Q(Zd,`type of the visualization (default is table)`),typeLocked:$(Wn({description:`true once the user manually picked the chart type — semantic (GUI) exploration then stops auto-switching it. Unset/false = the type still tracks the query shape.`})),xCols:$(D(z(),{description:`list of column names in the x axis (for non-pivot chart types)`})),yCols:$(D(z(),{description:`list of column names in the y axis (for non-pivot chart types). When dualAxis is enabled in axisConfig, these are the left-axis columns.`})),yRightCols:$(D(z(),{description:`list of column names for the right Y axis (only used when axisConfig.dualAxis is true)`})),tooltipCols:$(D(z(),{description:`additional columns to show in chart tooltips without changing grouping or series structure`})),pivotConfig:Jd(nf,`pivot table configuration (only used when type is 'pivot')`),columnFormats:$(H(z(),af,{description:`per-column display formatting keyed by column name. Only set when user asks to rename columns, change decimal places, or change date format. Good defaults are applied automatically.`})),conditionalFormats:$(D(of,{description:`conditional background-color rules for table viz. Each rule paints a cell/row/column a color when a condition on a column holds. Only used when type is 'table'.`})),styleConfig:Jd(sf,`shared visual styling for the chart, such as colors, opacity, and marker size.`),annotations:$(D(uf,{description:`annotations for cartesian charts. Each annotation specifies x, series, and text.`})),axisConfig:Jd(rf,`axis configuration for scale type (linear or log). Only set when user explicitly requests log scale.`),trendConfig:Jd(cf,`trend chart configuration (only used when type is 'trend')`),geoConfig:Jd($d,`geo map configuration (only used when type is 'geo')`),singleValueConfig:Jd(lf,`single-value (big number) styling — label, prefix/suffix, font size/color/weight, alignment. The number stays live; these only decorate it. Only used when type is 'single_value'.`)},{title:`VizSettings`});var df=`vega-lite@6`,ff=`vega@6`,pf=A({kind:I(`recipe`),recipe:z({description:`a SHIPPED recipe id, e.g. 'minusx/funnel@1' or 'minusx/waterfall@1'. The chart is generated from the recipe + bindings at render time — nothing else to author. Available recipes and their bindings are listed in the questions skill.`}),bindings:H(z(),M([z(),D(z())]),{description:`recipe binding slots → query-result column names (validated against the actual columns). Multi-capable slots (e.g. radar's value) accept an ARRAY of columns — one series per column.`}),params:$(H(z(),kn(),{description:`optional recipe params (see the recipe docs); omit for defaults`})),columnFormats:$(H(z(),af,{description:"per-column display formatting keyed by RESULT column name, applied at materialization: `alias` renames displays derived from the column name (waterfall y-axis title, radar series names); decimalPoints/prefix/suffix reshape the value labels (waterfall bars, funnel values). Omit for defaults."}))},{title:`VizSourceRecipe`}),mf=M([A({kind:I(`vega-lite`),grammar:I(df,{description:`pinned grammar major version; never fetched from the network`}),spec:H(z(),kn(),{description:'a Vega-Lite spec. Omit `data` — the query result is injected as the named dataset "main" (`data: {"name": "main"}`); external data URLs are rejected. Validated against the official Vega-Lite schema and the query-result columns.'}),detachedFrom:$(pf)},{title:`VizSourceVegaLite`}),A({kind:I(`vega`),grammar:I(ff,{description:`pinned grammar major version; never fetched from the network`}),spec:H(z(),kn(),{description:'a native Vega spec. The query result is bound as the named dataset "main" (`data: [{"name": "main"}]`); external data URLs are rejected. Edit this directly to fully customize a detached chart.'}),assets:Jd(H(z(),z()),`named boundary/lookup datasets the spec references → asset ids (geo maps), injected at render`),detachedFrom:$(pf)},{title:`VizSourceVega`}),pf,A({kind:I(`table`),wrapColumns:E($(D(z(),{description:`result column names whose body cells wrap onto multiple lines. Omit/null/[] for the default single-line ellipsis behavior.`}))),columnFormats:$(H(z(),af,{description:"per-column display formatting keyed by RESULT column name: `alias` + `format` (d3 — the unified viz vocabulary, numbers and dates). Legacy decimalPoints/dateFormat/prefix/suffix also honored. Omit for sensible defaults."})),conditionalFormats:$(D(of,{description:`conditional background-color rules — each paints cells/rows/columns a color when a condition on a column holds. Omit for none.`})),css:$(z({description:`CSS overrides for the table LOOKS (the DOM tier equivalent of a chart spec), scoped to this table automatically. Write rules against the stable class contract: .mx-table, .mx-column, .mx-header-row, .mx-th, .mx-row, .mx-cell, .mx-col-<columnName> (per-column), .mx-column-type-<text|number|date|json>, .mx-type-icon (+ .mx-type-icon-<text|number|date|json>), .mx-sort-icon, .mx-filter-icon, .mx-toolbar (bottom bar), .mx-row-odd/.mx-row-even (zebra stripe parity — the default stripe is a CSS rule, restyle or unset it here). Use source.wrapColumns for text wrapping so virtual row heights are measured. Table padding is customizable with --mx-cell-padding-block/inline and --mx-header-padding-block/inline. No @import and no external url() — both are rejected. Omit for the default theme.`}))},{title:`VizSourceTable`}),A({kind:I(`pivot`),config:nf,columnFormats:$(H(z(),af,{description:"per-column display formatting keyed by RESULT column name: `alias` renames dimension/value headers, `format` (d3) formats cells and date headers. Omit for sensible defaults."})),conditionalFormats:$(D(of,{description:`conditional background-color rules over VALUE columns (keyed by result column name): condition rules paint cells/rows/columns when a predicate holds; colour-scale rules paint cells min→max along a ramp. Omit for none.`})),css:$(z({description:"CSS overrides for the pivot LOOKS, scoped to this pivot automatically. The pivot shares the table's class contract — .mx-table, .mx-header-row, .mx-th, .mx-row (+ .mx-row-odd/.mx-row-even zebra), .mx-cell, .mx-col-<columnName> (per value column), .mx-toolbar — plus the root class `.mx-pivot` for element selectors (`.mx-pivot th { … }`). No @import and no external url() — both are rejected. Omit for the default theme."}))},{title:`VizSourcePivot`})],{title:`VizSource`});A({version:I(2),source:mf,dataBindings:$(H(z(),kn(),{description:`RESERVED: query param bindings (re-execute). Not yet implemented — omit.`})),viewParams:$(H(z(),kn(),{description:`RESERVED: presentation-only params/signals. Not yet implemented — omit.`})),interactions:$(H(z(),kn(),{description:`RESERVED: typed interaction outputs. Not yet implemented — omit.`})),assets:$(H(z(),z(),{description:`RESERVED: named-asset registry refs (e.g. topojson boundaries). Not yet implemented — omit.`}))},{title:`VizEnvelope`});var hf=A({name:z({description:`slot name referenced by {{name}} tokens in the template`}),label:z({description:`human label shown on the drop zone`}),accepts:D(Q([`nominal`,`quantitative`,`temporal`]),{description:`column kinds this slot accepts (drives drop-zone hints and the {{name:kind}} fallback)`}),multi:E(Wn({description:`slot takes an ARRAY of columns (e.g. a fold field list); {{name}} must then be a whole-value token`}))},{title:`VizRecipeBinding`}),gf=A({name:z({description:`param name referenced by {{name}} tokens in the template`}),label:z(),default:E(kn({description:`value used when the param is omitted at use`}))},{title:`VizRecipeParam`});A({description:z({description:`one-liner advertised to the agent — say what the chart shows`}),engine:Q([`vega-lite`,`vega`],`grammar of the template`),bindings:D(hf,{description:`declared slots; every slot is required at use`}),params:E($(D(gf))),template:H(z(),kn(),{description:'the spec with {{slot}} tokens. Whole-string "{{slot}}" substitutes the bound value verbatim (arrays for multi slots); embedded {{slot}} string-replaces; "{{slot:kind}}" resolves the bound column\'s kind (quantitative|temporal|nominal) for encoding types. Omit `data` — the query result is injected as the named dataset "main"; external data URLs are rejected.'})},{title:`VizRecipeContent`});var _f=`id`,vf=`data-annotation-anchor`,yf=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,bf=yf+`0123456789`,xf=64,Sf=4096,Cf=(e,t)=>e.attributes.find(e=>e.name===t),wf=e=>{let t=e?.value;return t?.static&&typeof t.json==`string`&&t.json!==``&&!/[\t\n\f\r ]/.test(t.json)?t.json:null},Tf=e=>{let t=e?.value;return t?.static&&typeof t.json==`string`?t.json:null},Ef=e=>!e.control;function Df(e){let t=[],n=(e,r)=>{for(let i=0;i<e.length;i++){let a=e[i];if(a.type!==`element`||a.tag===`Helmet`)continue;let o=r?`${r}.${i}`:String(i);Ef(a)&&t.push({node:a,path:o}),n(a.children,o)}};return n(e,``),t}function Of(e){let t=n(e);if(!t.ok)throw Error(`node-ids: invalid JSX${t.pos===void 0?``:` at ${t.pos}`}: ${t.error}`);return t.nodes}function kf(e){let t=n(e);if(!t.ok)return!1;let r=new Set;for(let{node:e}of Df(t.nodes)){let t=wf(Cf(e,vf));if(t){if(r.has(t))return!0;r.add(t)}}return!1}var Af=e=>JSON.stringify(e)??`undefined`;function jf(e,t){let n=e=>{let n=t.get(e);return n===void 0&&(n=String(t.size),t.set(e,n)),n},r=new Map,i=e=>{if(e.type===`text`)return n(Af([`text`,e.value]));if(e.type===`expression`)return n(Af([`expression`,e.value]));let t=e.attributes.filter(e=>e.name!==_f&&e.name!==vf).map(e=>[e.name,e.value]),a=e.children.map(i),o=n(Af([`element`,e.tag,e.selfClosing,t,a]));return r.set(e,o),o};for(let t of e)i(t);return r}function Mf(){let e=e=>{let t=new Uint32Array(1),n=Math.floor(4294967296/e)*e;do globalThis.crypto.getRandomValues(t);while(t[0]>=n);return t[0]%e};return yf[e(52)]+Array.from({length:3},()=>bf[e(62)]).join(``)}function Nf(e,t,n){let r=Cf(e,t);r?r.value={static:!0,json:n}:e.attributes.push({name:t,value:{static:!0,json:n},start:e.start,end:e.start})}function Pf(e,t){e.attributes=e.attributes.filter(e=>e.name!==t)}function Ff(e,t={}){let n=Of(e),r=Df(n),i=new Set(t.reservedIds??[]),a=new Set;for(let{node:e}of r){let t=wf(Cf(e,_f));t&&(i.add(t),a.add(t));let n=wf(Cf(e,vf));n&&i.add(n)}let o=t.previousSource?Of(t.previousSource):[],s=Df(o);for(let{node:e}of s){let t=wf(Cf(e,_f));t&&i.add(t)}let c=new Map,l=jf(n,c),u=jf(o,c),ee=new Map,d=new Map;for(let{node:e}of r)if(!wf(Cf(e,_f))){let t=l.get(e);ee.set(t,(ee.get(t)??0)+1)}for(let{node:e}of s){let t=wf(Cf(e,_f));if(!t)continue;let n=u.get(e),r=d.get(n)??[];r.push(t),d.set(n,r)}let f=new Set,p=[],m=[],te=0,ne=0,h=0,re=()=>{let e=t.mint??Mf;for(let t=0;t<xf;t++){let t=e();if(/^[A-Za-z][A-Za-z0-9]{3}$/.test(t)&&!i.has(t)&&!f.has(t))return t}for(;h<Sf;h++){let e=h,t=yf[e%52];e=Math.floor(e/52);for(let n=0;n<3;n++)t+=bf[e%62],e=Math.floor(e/62);if(!i.has(t)&&!f.has(t))return h++,t}throw Error(`node-ids: id space exhausted within bounded fallback`)},ie=[];for(let{node:e,path:n}of r){let r=Cf(e,_f),o=wf(r),s=Tf(r),c=wf(Cf(e,vf)),u=c?t.legacyAliases?.get(c):void 0,h;if(o&&!f.has(o))h=o;else if(!o&&u&&!f.has(u)&&!a.has(u))h=u,Nf(e,_f,h),m.push({legacyKey:c,nodeId:h,path:n}),t.retireLegacyAliases&&Pf(e,vf);else if(!o&&c&&!f.has(c)&&!a.has(c))h=c,Nf(e,_f,h),Pf(e,vf);else{let i=!o&&!c?d.get(l.get(e)):void 0,u=i?.length===1&&ee.get(l.get(e))===1&&!f.has(i[0])&&!a.has(i[0])?i[0]:null;h=u??re(),Nf(e,_f,h),u?ne++:te++,r&&p.push({path:n,from:s,to:h,reason:o?`duplicate`:`invalid`}),c&&m.push({legacyKey:c,nodeId:h,path:n}),c&&t.retireLegacyAliases&&Pf(e,vf)}o&&h===o&&c&&o!==c&&(m.push({legacyKey:c,nodeId:h,path:n}),t.retireLegacyAliases&&Pf(e,vf)),f.add(h),i.add(h),ie.push(h)}return{source:le(n),ids:ie,minted:te,carried:ne,repairs:p,aliases:m}}function If(e){let t=new Map;for(let{node:n,path:r}of Df(Of(e))){let e=wf(Cf(n,_f));!e||t.has(e)||t.set(e,{id:e,path:r,node:n,legacyKey:wf(Cf(n,vf))})}return t}function Lf(e){if(!Array.isArray(e)||e.length>64)return null;let t=0,n=0;for(let r of e){if(!r||typeof r!=`object`||typeof r.id!=`string`||!/^[a-zA-Z0-9-]{16,64}$/.test(r.id)||![`map`,`undo`,`redo`].includes(r.kind))return null;if(r.kind===`map`){if(!Array.isArray(r.maps)||r.maps.length>64)return null;for(let e of r.maps)if(!e||![`fromId`,`toId`,`fromText`,`toText`].every(t=>typeof e[t]==`string`&&e[t].length<=1e6)||!Array.isArray(e.segments)||e.segments.length>1e4||(t+=e.fromText.length+e.toText.length,n+=e.segments.length,t>1e6||n>1e4||e.fromId.length>128||e.toId.length>128)||e.segments.some(e=>!e||![`from`,`to`,`length`].every(t=>Number.isSafeInteger(e[t])&&Number(e[t])>=0)))return null}}return e}var Rf=e=>{if(e.type!==`element`||e.control)return;let t=e.attributes.find(e=>e.name===`id`)?.value;return t?.static&&typeof t.json==`string`?t.json:void 0},zf=(e,t)=>e.type===t.type&&(e.type!==`element`||t.type===`element`&&e.tag===t.tag&&JSON.stringify(e.control)===JSON.stringify(t.control)),Bf=(e,t)=>{for(let n of e)t(n),n.type===`element`&&Bf(n.children,t)};function Vf(e,t,r){let i=n(t);if(!i.ok)throw Error(i.error);let a=ft(e),o=new Map,s=new Set,c=new Set;Bf(a,e=>{let t=Rf(e);if(t){if(o.has(t))throw Error(`Duplicate authored node identity`);o.set(t,e)}}),Bf(i.nodes,e=>{let t=Rf(e);if(t){if(s.has(t))throw Error(`Duplicate authored node identity`);s.add(t)}});let l=(e,t)=>{let n=new Map,r=(e,t)=>{!t?.graphKey||c.has(t.graphKey)||!zf(e,t)||(e.graphKey=t.graphKey,c.add(t.graphKey),n.set(e,t))};for(let t of e){let e=Rf(t);e&&r(t,o.get(e))}let i=new Map,a=new Map;for(let e of t)if(!Rf(e)&&e.graphKey&&!c.has(e.graphKey)){let t=le([e]);i.set(t,[...i.get(t)??[],e])}for(let t of e)if(!Rf(t)){let e=le([t]);a.set(e,(a.get(e)??0)+1)}for(let t of e)if(!Rf(t)){let e=le([t]),n=i.get(e);n?.length===1&&a.get(e)===1&&r(t,n[0])}e.length===t.length&&e.every((e,r)=>{let i=t[r];return n.has(e)?n.get(e)===i:!Rf(e)&&!Rf(i)&&!!i.graphKey&&!c.has(i.graphKey)&&le([e])===le([i])})&&e.forEach((e,i)=>{n.has(e)||r(e,t[i])});let s=t.filter(e=>!Rf(e)&&e.graphKey&&!c.has(e.graphKey)),u=e.filter(e=>!Rf(e)&&!n.has(e));s.length===1&&u.length===1&&r(u[0],s[0]);for(let t of e)if(t.type===`element`){let e=n.get(t);l(t.children,e?.type===`element`?e.children:[])}};return l(i.nodes,a),ut(i.nodes,r)}var Hf=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function Uf(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>Uf(e,t[n]));if(Hf(e)&&Hf(t)){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&Uf(e[n],t[n]))}return!1}function Wf(e,t){let n=[],r=(e,t,i)=>{if(!Uf(e,t)){if(typeof e==`string`&&typeof t==`string`){let r=Array.from(e),a=Array.from(t),o=0,s=0;for(;o<r.length&&o<a.length&&r[o]===a[o];)o++;for(;s<r.length-o&&s<a.length-o&&r[r.length-s-1]===a[a.length-s-1];)s++;let c={kind:`text`,path:i,start:o,deleteCount:r.length-o-s,value:a.slice(o,a.length-s).join(``)};if(JSON.stringify(c).length<JSON.stringify({kind:`set`,path:i,value:t}).length){n.push(c);return}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length===t.length){t.forEach((t,n)=>r(e[n],t,[...i,String(n)]));return}let a=0,o=0;for(;a<e.length&&a<t.length&&Uf(e[a],t[a]);)a++;for(;o<e.length-a&&o<t.length-a&&Uf(e[e.length-o-1],t[t.length-o-1]);)o++;for(let t=e.length-o-1;t>=a;t--)n.push({kind:`delete`,path:[...i,String(t)]});for(let e=a;e<t.length-o;e++)n.push({kind:`insert`,path:[...i,String(e)],value:t[e]});return}if(Hf(e)&&Hf(t)){for(let r of Object.keys(e))Object.hasOwn(t,r)||n.push({kind:`delete`,path:[...i,r]});for(let[a,o]of Object.entries(t))Object.hasOwn(e,a)?r(e[a],o,[...i,a]):n.push({kind:`set`,path:[...i,a],value:o});return}n.push({kind:`set`,path:i,value:t})}};return r(e,t,[]),n.length>48?[{kind:`set`,path:[],value:t}]:n}function Gf(e,t){let n=structuredClone(e);for(let e of t){let t=n;for(let n of e.path.slice(0,-1))t=t[n];let r=e.path.at(-1),i=r===void 0?n:t[r];if(e.kind===`delete`){Array.isArray(t)?t.splice(Number(r),1):delete t[r];continue}let a=structuredClone(e.value);if(e.kind===`text`){let t=Array.from(i);a=t.slice(0,e.start).join(``)+e.value+t.slice(e.start+e.deleteCount).join(``)}r===void 0?n=a:e.kind===`insert`&&Array.isArray(t)?t.splice(Number(r),0,a):Object.defineProperty(t,r,{value:a,enumerable:!0,writable:!0,configurable:!0})}return n}var Kf=e=>Array.isArray(e)?e.map(Kf):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>[e,Kf(t)])):e,qf=(e,t)=>JSON.stringify(Kf(e))===JSON.stringify(Kf(t));function Jf(e,t,n,r={}){let i=new Map,a={},o=[],s={},c=new Set,l=(t,n)=>{let r=e.nodes[t];if(!r)throw Error(`Missing validation dependency`);i.set(`${t}:${n}`,{key:t,facet:n,version:r[n]})},u=(t,n)=>{for(let r of dt(t,n))c.add(r),e.nodes[r]&&l(r,`selfVersion`)};for(let[n,r]of Object.entries(e.nodes)){let i=t.nodes[n];if(!i){o.push(n),l(n,`subtreeVersion`),u(e,n);continue}let a=!qf(r.children,i.children),ee=!qf(r.parts,i.parts)&&(!a||r.parts.join(``)!==i.parts.join(``)),d=!qf(r.ast,i.ast)||ee||!qf(r.selectors,i.selectors)||!qf(r.refs,i.refs)||r.prose!==i.prose||r.parent!==i.parent;if(!d&&!a)continue;let f={parts:i.parts,partUnits:i.partUnits,bytes:i.bytes,units:i.units};d&&(Object.assign(f,{ast:i.ast,parent:i.parent,selectors:i.selectors,refs:i.refs,prose:i.prose}),l(n,`subtreeVersion`)),a&&(f.children=i.children,l(n,`childrenVersion`),l(n,`selfVersion`)),s[n]={patches:Wf(Object.fromEntries(Object.keys(f).map(e=>[e,r[e]])),f).flatMap(e=>e.path.length?[e]:Object.entries(f).map(([e,t])=>({kind:`set`,path:[e],value:t}))),self:d,children:a},c.add(n),u(e,n),u(t,n)}for(let[n,r]of Object.entries(t.nodes))e.nodes[n]||(a[n]=structuredClone(r),c.add(n),u(t,n));r.whole&&l(ot,`subtreeVersion`);for(let e of r.reads??[])l(e.key,e.facet);let ee=e=>new Set(Object.values(e.nodes).flatMap(e=>e.selectors.filter(e=>e.startsWith(`id:`)).map(e=>e.slice(3)))),d=ee(e),f=[...ee(t)].filter(e=>!d.has(e)).map(t=>({id:t,version:Object.hasOwn(e.claimedIds,t)?e.claimedIds[t]:null})),p=Yf(e),m=[...new Set(r.selectors??[])].map(e=>({selector:e,keys:p(e)}));return{baseVersion:n,claims:f,reads:[...i.values()],selections:m,inserted:a,removed:o,updated:s,touched:[...c].filter(e=>!!t.nodes[e]),byteDelta:t.bytes-e.bytes,unitDeltas:Object.fromEntries(Object.entries(t.nodes).filter(([t,n])=>e.nodes[t]&&e.nodes[t].subtreeUnits!==n.subtreeUnits).map(([t,n])=>[t,n.subtreeUnits-e.nodes[t].subtreeUnits]))}}function Yf(e){let t=null;return n=>{if(!t){t=new Map;for(let[n,r]of Object.entries(e.nodes))for(let e of new Set(r.selectors)){let r=t.get(e);r?r.push(n):t.set(e,[n])}for(let e of t.values())e.sort()}return[...t.get(n)??[]]}}function Xf(e,t,n){let r={...e.nodes},i={...e.claimedIds},a=t+1,o=new Set,s=e=>{if(e===`__proto__`||!Object.hasOwn(r,e))return null;let t=r[e];return t?(o.has(e)||(r[e]=structuredClone(t),o.add(e)),r[e]):null};for(let e of n.removed)delete r[e];for(let[e,t]of Object.entries(n.inserted))r[e]={...structuredClone(t),selfVersion:a,childrenVersion:a,subtreeVersion:a},o.add(e);for(let[e,t]of Object.entries(n.updated)){let n=s(e);if(!n)return null;Object.assign(n,Gf(n,t.patches)),t.self&&(n.selfVersion=a),t.children&&(n.childrenVersion=a)}for(let e of n.touched){let t=s(e);if(!t)return null;t.subtreeVersion=a}for(let[e,t]of Object.entries(n.unitDeltas)){let n=s(e);if(!n)return null;n.subtreeUnits+=t}for(let{id:e}of n.claims)Object.defineProperty(i,e,{value:a,enumerable:!0,writable:!0,configurable:!0});return{...e,nodes:r,claimedIds:i,bytes:e.bytes+n.byteDelta}}var Zf=new Set([`Helmet`]);function Qf(e,t){let n=Jf(e,t,0),r=new Set,i=new Set,a=new Set,o=new Set,s=new Map,c=ft(t),l=new Map,u=e=>{for(let t of e)l.set(t.graphKey,t),t.type===`element`&&u(t.children)};u(c);let ee=(t,n)=>{e.nodes[t]&&s.set(`${t}:${n}`,{key:t,facet:n})},d=new Set([...n.removed,...Object.keys(n.inserted),...Object.keys(n.updated)]),f=new Set;for(let n of[e,t])for(let e of d)if(n.nodes[e])for(let t of[e,...dt(n,e)])for(let e of n.nodes[t].selectors)e.startsWith(`declaration:`)&&f.add(e.slice(12));let p=[],m=new Set,te=e=>{i.has(e)||(i.add(e),ee(e,`selfVersion`),e!==`$root`&&p.push({key:e,whole:!1}))},ne=t=>{let n=l.get(t);if(n?.type!==`element`||n.tag!==`Column`)return!1;let r=e.nodes[t]?.ast,i=r?rt(r)[0]:void 0;return i?.type!==`element`||i.tag!==`Column`||JSON.stringify(i.attributes.find(e=>e.name===`col`)?.value)!==JSON.stringify(n.attributes.find(e=>e.name===`col`)?.value)},h=(e,n=!0)=>{if(e!==`$root`&&t.nodes[e]){for(let r of[e,...dt(t,e)]){let t=l.get(r);t?.type===`element`&&(Zf.has(t.tag)||t.tag===`DataTable`&&(r===e||ne(e))||t.control&&t.control.kind!==`fragment`)&&(e=r,n=!0)}for(let n of dt(t,e))te(n);if(!n){te(e);return}r.has(e)||(r.add(e),ee(e,`subtreeVersion`),p.push({key:e,whole:!0}))}},re=Yf(t),ie=e=>(a.add(e),re(e)),ae=e=>{for(let t of ie(`declaration:${e}`))h(t)},oe=new Set,se=e=>{if(!oe.has(e)){oe.add(e);for(let n of[`use:${e}`,`dependency:${e}`])for(let e of ie(n)){h(e);for(let n of t.nodes[e].selectors)n.startsWith(`declaration:`)&&se(n.slice(12))}}};for(let[e,t]of Object.entries(n.updated))h(e,t.self);for(let e of Object.keys(n.inserted))h(e);for(let r of n.removed){for(let n of dt(e,r))if(t.nodes[n]){h(n,!1);break}for(let t of e.nodes[r].selectors)t.startsWith(`use:`)&&ae(t.slice(4)),t.startsWith(`declaration:`)&&se(t.slice(12))}for(let e of f)se(e);for(;p.length;){let e=p.pop(),n=(e,r)=>{let i=`${e}:${r}`;if(m.has(i))return;m.add(i);let a=t.nodes[e];for(let t of a.selectors)if(t.startsWith(`id:`))ie(t).length>1&&o.add(`Duplicate authored node identity: ${t.slice(3)}`);else if(t.startsWith(`use:`))ae(t.slice(4));else if(t.startsWith(`dependency:`))ae(t.slice(11));else if(t===`tag:Helmet`)for(let n of ie(t))n!==e&&h(n);else if(t.startsWith(`declaration:`)){let n=t.slice(12);for(let n of ie(t))n!==e&&h(n);let r=l.get(e);(f.has(n)||r?.type===`element`&&r.tag===`Mutation`)&&se(n)}if(r)for(let e of a.children)n(e,!0)};n(e.key,e.whole)}let ce=e=>e.flatMap(e=>{let t=e.graphKey;return r.has(t)?[e]:i.has(t)?e.type===`element`?[{...e,children:ce(e.children)}]:[e]:[]});return{source:le(ce(c)),reads:[...s.values()],selectors:[...a].sort(),errors:[...o]}}var $f=class extends Error{operationIndex;constructor(e,t){super(e),this.operationIndex=t,this.name=`DocumentOperationError`}},ep=e=>Array.isArray(e)&&e.length<=128&&e.every(e=>Number.isSafeInteger(e)&&e>=0),tp=(e,t=0)=>t<128&&(e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e)||Array.isArray(e)&&e.every(e=>tp(e,t+1))||!!e&&typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype&&Object.values(e).every(e=>tp(e,t+1)));function np(e){if(!Array.isArray(e)||!e.length||e.length>64)return null;for(let t of e){if(!t||typeof t!=`object`)return null;if(t.kind===`replaceDocument`){if(typeof t.source!=`string`)return null;continue}if(t.kind===`insert`){if(!ep(t.parent)||!Number.isSafeInteger(t.index)||t.index<0||typeof t.source!=`string`)return null;continue}if(!ep(t.path)||!t.path.length)return null;switch(t.kind){case`setText`:if(typeof t.value!=`string`)return null;break;case`setAttribute`:if(!tp(t.value))return null;case`removeAttribute`:if(typeof t.name!=`string`||!/^[A-Za-z_][\w:.-]*$/.test(t.name))return null;break;case`replace`:if(typeof t.source!=`string`)return null;break;case`move`:if(!ep(t.parent)||!Number.isSafeInteger(t.index)||t.index<0)return null;break;case`delete`:break;default:return null}}return e}function rp(e,t){if(!np(t))throw new $f(`Malformed document operations`,-1);let r=-1,i=e=>{throw new $f(e,r)},a=e=>{let t=n(e);return t.ok?t.nodes:i(t.error)},o=structuredClone(e),s=e=>{let t=o;for(let n of e){let e=t[n];if(!e||e.type!==`element`)return i(`Parent is not an element`);t=e.children}return t},c=e=>{let t=s(e.slice(0,-1)),n=e[e.length-1];return typeof n==`number`&&Object.hasOwn(t,n)?t[n]:i(`Node does not exist`)};for(let e of t){if(r++,e.kind===`replaceDocument`){o=a(e.source);continue}if(e.kind===`insert`){let t=s(e.parent);e.index>t.length&&i(`Insertion index is out of range`),t.splice(e.index,0,...a(e.source));continue}let t=c(e.path);switch(e.kind){case`setText`:t.type===`text`?(t.value=e.value,delete t.slot):i(`Target is not a text node`);break;case`setAttribute`:case`removeAttribute`:{t.type!==`element`&&i(`Target is not an element`);let n=t,r=n.attributes.findIndex(t=>t.name===e.name);if(e.kind===`removeAttribute`){r>=0&&n.attributes.splice(r,1);break}let a={name:e.name,value:{static:!0,json:structuredClone(e.value)},start:0,end:0};r>=0?n.attributes[r]=a:n.attributes.push(a);break}case`delete`:case`replace`:s(e.path.slice(0,-1)).splice(e.path[e.path.length-1],1,...e.kind===`replace`?a(e.source):[]);break;case`move`:{e.parent.length>=e.path.length&&e.path.every((t,n)=>t===e.parent[n])&&i(`Cannot move a node into itself or its descendant`);let n=s(e.parent),r=s(e.path.slice(0,-1)),a=n.length-+(n===r);e.index>a&&i(`Move index is out of range`),r.splice(e.path[e.path.length-1],1),n.splice(e.index,0,t);break}}}return o}var ip=[`connect`,`script`,`style`,`img`,`frame`,`media`];Object.freeze({connect:[],script:[],style:[],img:[],frame:[],media:[]});var ap=()=>({connect:[],script:[],style:[],img:[],frame:[],media:[]}),op=`csp-`,sp=e=>`${op}${e}`,cp=`[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?`,lp=RegExp(`^https://(\\*\\.)?(${cp}(?:\\.${cp})*)(:\\d{1,5})?$`);function up(e){let t=e.endsWith(`/`)&&/^https:\/\/[^/]+\/$/i.test(e)?e.slice(0,-1):e;if(!/^https:\/\//i.test(t))return{ok:!1,reason:`must be an https:// origin`};let n=t.slice(8);if(/[/?#]/.test(n))return{ok:!1,reason:`must be an origin only: no path, query or fragment`};if(n.includes(`@`))return{ok:!1,reason:`must not carry credentials`};let r=`https://${n.toLowerCase()}`,i=lp.exec(r);if(!i)return{ok:!1,reason:n.includes(`*`)?`a wildcard is only allowed as a whole leading label, as in https://*.example.com`:`is not a valid host`};let[,a,o,s]=i;return a&&o.split(`.`).length<2?{ok:!1,reason:`a wildcard must cover a subdomain of a named site, as in https://*.example.com`}:s&&Number(s.slice(1))>65535?{ok:!1,reason:`has an invalid port`}:{ok:!0,origin:r}}function dp(e,t){for(let n of e?.children??[]){if(n.type!==`element`||n.tag.toLowerCase()!==`meta`)continue;let e=n.attributes.find(e=>e.name.toLowerCase()===`name`);if(e?.value.static&&e.value.json===t)return n}return null}function fp(e,t){let n=dp(e,t);if(!n)return{};let r=n.attributes.find(e=>e.name.toLowerCase()===`content`);return r?{start:r.start,end:r.end}:{start:n.start,end:n.end}}function pp(e,t){let n=[],r=ap();for(let i of e.meta){if(!i.name.startsWith(op))continue;let e=i.name.slice(4),a=fp(t,i.name);if(!ip.includes(e)){n.push({message:`the Helmet meta ${i.name} is not a policy a document can extend — use ${ip.map(sp).join(`, `)}`,tag:`meta`,attr:`name`,value:i.name,...a});continue}let o=i.content.trim().split(/\s+/).filter(Boolean);if(o.length===0){n.push({message:`the Helmet meta ${i.name} lists no origins — name each https origin, separated by spaces`,tag:`meta`,attr:`content`,value:i.content,...a});continue}let s=[];for(let e of o){let t=up(e);t.ok?s.includes(t.origin)||s.push(t.origin):n.push({message:`the Helmet meta ${i.name}: "${e}" ${t.reason}`,tag:`meta`,attr:`content`,value:e,...a})}s.length>10&&n.push({message:`the Helmet meta ${i.name} names ${s.length} origins; the cap is 10`,tag:`meta`,attr:`content`,value:i.content,...a}),r[e]=s.slice(0,10)}return n.length?{ok:!1,errors:n,extensions:r}:{ok:!0,extensions:r}}function mp(e,i={}){let s=n(e);if(!s.ok)return{errors:[a(e,s)]};let c=Oe(s.nodes),l=Te(s.nodes),u=pp(c.content,c.helmet);return{split:c,errors:[...hp(s.nodes),...l,...u.ok?[]:u.errors,...r(c.body,c.content.queries.length?void 0:Object.fromEntries(c.content.values.flatMap(e=>e.kind===`table`?[[e.name,e.columns]]:[]))).errors.map(e=>({message:e})),...t(c.body,{components:o,allowedHtmlTags:ce,stylePolicy:`allow`,scriptComponents:i.scriptComponents??(c.content.script?`any`:void 0)}),...Ge(e),...l.length?[]:ee(ge(c.content),p(c.body))]}}function hp(e){let t=[];for(let n of e)if(n.type===`element`){for(let e of n.attributes){if(![`href`,`src`,`source`,`poster`,`srcSet`,`srcset`].includes(e.name)||!e.value.static||typeof e.value.json!=`string`)continue;let n=e.name.toLowerCase()===`srcset`?e.value.json.split(`,`).map(e=>e.trim().split(/\s+/)[0]??``):[e.value.json];for(let r of n)r&&!r.startsWith(`#`)&&!r.startsWith(`$`)&&!r.startsWith(`/`)&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&t.push({message:e.name===`href`?`Local file references are not supported. Run afbin add --json and use /a/ID for document navigation links.`:`Local file references are not supported. Run afbin add --json and use ref:ID for dataset and media references.`,start:e.start,end:e.end})}t.push(...hp(n.children))}return t}function gp(e){let t=n(e);return!t.ok||Te(t.nodes).length>0?e:le(Ie(Ae(t.nodes)))}var _p=/\bdata-design\s*=\s*(?:"tw"|'tw')/;function vp(e){return!!e&&_p.test(e)}var yp=/\bclass(?:Name)?\s*=\s*(?:"([^"]*)"|'([^']*)')/g,bp=e=>e.replace(/&quot;/g,`"`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).replace(/&amp;/g,`&`);function xp(e){let t=new Set;for(let n of e.matchAll(yp))for(let e of bp(n[1]??n[2]??``).split(/\s+/))e&&t.add(e);return[...t].sort()}function Sp(e,t){let n=pt(e.document),r=t.operations?pt(ut(rp(ft(e.document),t.operations),e.version)):t.source??n;if(r=i(r)?.source??r,r.includes(`\0`)||!r.isWellFormed())throw Error(`Document source must be valid Unicode without NUL characters`);if(r=gp(r),kf(r))throw Error(`Ambiguous duplicate legacy annotation anchors`);let a=Ff(r,{previousSource:n,reservedIds:Object.keys(e.document.claimedIds),retireLegacyAliases:!0}),o=mp(a.source);if(o.errors.length)throw Error(o.errors.map(e=>e.message).join(`
4
4
  `));let s=t.whole||t.operations?.some(e=>e.kind===`replaceDocument`)||!1,c=s?ut(a.source,e.version):Vf(e.document,a.source,e.version);if(c.bytes>2e6)throw Error(`Document exceeds the publication size limit`);let l=Qf(e.document,c);if(l.errors.length)throw Error(l.errors.join(`
@@ -1,4 +1,4 @@
1
- import"./jsx-vj4cHW_Q.js";import{D as e,G as t,L as n,M as r,O as i,R as a,T as o,_ as s,a as c,b as l,c as u,k as d,l as f,m as p,o as m,p as h,r as g,u as _,z as v}from"./web-Ckpee-ZJ.js";import{f as y}from"./DocumentChrome-EUbW_JvA.js";import{_ as b}from"./person-mentions-BEjAedYZ.js";import{t as x}from"./serialize-n0A-pNlo.js";import{E as S,a as C,c as w,d as T,i as E,n as D,r as ee,t as O}from"./grid-layout-pVrfI_vF.js";import{n as k,r as te,t as ne}from"./flow-view-Bp05LtJW.js";var re=`
1
+ import"./jsx-vj4cHW_Q.js";import{D as e,G as t,L as n,M as r,O as i,R as a,T as o,_ as s,a as c,b as l,c as u,k as d,l as f,m as p,o as m,p as h,r as g,u as _,z as v}from"./web-Ckpee-ZJ.js";import{f as y}from"./DocumentChrome-Bw4_z5yQ.js";import{_ as b}from"./person-mentions-C7vQd7Vr.js";import{t as x}from"./serialize-n0A-pNlo.js";import{E as S,a as C,c as w,d as T,i as E,n as D,r as ee,t as O}from"./grid-layout-pVrfI_vF.js";import{n as k,r as te,t as ne}from"./flow-view-Bp05LtJW.js";var re=`
2
2
  .react-grid-layout { position: relative; }
3
3
  .mx-grid-grip { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; z-index: 4; border: 1px solid rgba(100,116,139,.3); border-radius: 50%; background: white; color: #64748b; cursor: grab; touch-action: none; opacity: 0; }
4
4
  .react-grid-item:hover > .mx-grid-grip, .react-grid-item:focus-within > .mx-grid-grip,
@@ -1 +1 @@
1
- import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BtmRR9Ax.js";var r=[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]],i=i=>t(n,e(i,{iconNode:r,name:`download`}));export{i as t};
1
+ import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BNcsMwv4.js";var r=[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]],i=i=>t(n,e(i,{iconNode:r,name:`download`}));export{i as t};
@@ -1 +1 @@
1
- import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BtmRR9Ax.js";var r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]],i=i=>t(n,e(i,{iconNode:r,name:`eye`}));export{i as t};
1
+ import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BNcsMwv4.js";var r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]],i=i=>t(n,e(i,{iconNode:r,name:`eye`}));export{i as t};
@@ -1 +1 @@
1
- import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BtmRR9Ax.js";var r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]],i=i=>t(n,e(i,{iconNode:r,name:`file-up`}));export{i as t};
1
+ import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BNcsMwv4.js";var r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]],i=i=>t(n,e(i,{iconNode:r,name:`file-up`}));export{i as t};
@@ -0,0 +1 @@
1
+ �`�q�}����[ M)�ӹ��La��Q�ɀ�m[W�(�OtOP'��F�GIino��Á�Z ��+�Eh$�t�XHtx�q�AV�_�\�p<�[�D?�=J�S��e��+�h���T#r:�d4���ЖQ��U#������B0( �jjRiՂ�r6�`J���Vt˂��6 ���WP>�?����1�k��ϥ+k�<t"�a �Y�R�̯��S* �g���|w��z�#�9�I����M��������e�xkW;����wh��'�g�ˌ�)�
@@ -1 +1 @@
1
- import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BtmRR9Ax.js";var r=[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]],i=i=>t(n,e(i,{iconNode:r,name:`git-fork`}));export{i as t};
1
+ import{I as e,T as t}from"./web-Ckpee-ZJ.js";import{G as n}from"./solid-app-BNcsMwv4.js";var r=[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]],i=i=>t(n,e(i,{iconNode:r,name:`git-fork`}));export{i as t};