@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{a as $}from"./frame-editor-chunk-9cf958dadb1e7379.js";var V=/^[A-Za-z0-9]{6,12}$/,j=/^ref:([A-Za-z0-9]{6,12})$/;var U="/api/internal",le=`${U}/tokens`,ue=`${U}/artifact-approval`;function S(e,t="timestamp"){let r=()=>{throw new Error(`${t}: invalid timestamp; use an ISO date/datetime (UTC when omitted), an explicit offset, or epoch milliseconds`)};if(typeof e=="number"){if(!Number.isFinite(e))return r();let f=new Date(e);return Number.isNaN(f.getTime())?r():f.toISOString()}if(e instanceof Date)return Number.isNaN(e.getTime())?r():e.toISOString();if(typeof e!="string")return r();let n=/^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}(?::?\d{2})?)?)?$/i.exec(e.trim());if(!n)return r();let a=n[1],o=new Date(`${a}T00:00:00.000Z`);if(Number.isNaN(o.getTime())||o.toISOString().slice(0,10)!==a)return r();let s=n[2]??"00",d=n[3]??"00",l=n[4]??"00";if(+s>23||+d>59||+l>59)return r();let h=(n[5]??"").padEnd(3,"0").slice(0,3),c=(n[6]??"Z").toUpperCase();/^[+-]\d{2}$/.test(c)&&(c+=":00"),/^[+-]\d{4}$/.test(c)&&(c=`${c.slice(0,3)}:${c.slice(3)}`);let T=new Date(`${a}T${s}:${d}:${l}.${h}${c}`);return Number.isNaN(T.getTime())?r():T.toISOString()}function x(e){try{return S(e),!0}catch{return!1}}var q=/^\d{4}-\d{2}-\d{2}$/;function B(e){return e==null?null:typeof e=="number"?"number":typeof e=="boolean"?"boolean":typeof e=="string"?q.test(e)?"date":/^[0-9]{4}-/.test(e)&&x(e)?"timestamp":"string":null}function D(e){let t=[],r=new Map;for(let n of e)for(let[a,o]of Object.entries(n)){!r.has(a)&&!t.includes(a)&&t.push(a);let s=B(o);if(s===null)continue;let d=r.get(a);d===void 0?r.set(a,s):d!==s&&r.set(a,"string")}return t.map(n=>({name:n,type:r.get(n)??"string"}))}function I(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Column must be {name, type, constraints?}");let t=e;if(typeof t.name!="string"||!t.name||t.name.includes("\0")||!["string","number","boolean","date","timestamp","user"].includes(String(t.type)))throw new Error("Invalid column name or type; use string, number, boolean, date, timestamp or user");if(Object.keys(t).some(n=>!["name","type","constraints","choices"].includes(n)))throw new Error("Unknown column attribute");let r={name:t.name,type:t.type};if(t.choices!==void 0){if(!Array.isArray(t.choices)||!t.choices.length||t.choices.length>100||t.choices.some(n=>n===null||typeof n!=(t.type==="number"?"number":t.type==="boolean"?"boolean":"string")||typeof n=="number"&&!Number.isFinite(n))||new Set(t.choices).size!==t.choices.length)throw new Error("Column choices must be 1\u2013100 unique values matching its type");r.choices=[...t.choices]}if(t.constraints!==void 0){if(t.type!=="user"||!t.constraints||typeof t.constraints!="object"||Array.isArray(t.constraints))throw new Error("User constraints must be an object");let n=t.constraints;if(Object.keys(n).some(o=>!["memberOf","self"].includes(o)))throw new Error("Unknown user constraint");if(n.self!==void 0&&typeof n.self!="boolean")throw new Error("self must be boolean");let a=n.memberOf;if(a!==void 0&&(!Array.isArray(a)||!a.length||a.some(o=>typeof o!="string"||o!=="current"&&!/^ref:[A-Za-z0-9]{6,12}$/.test(o))||new Set(a).size!==a.length))throw new Error("memberOf must be a nonempty array of unique document references or current");r.constraints={...a!==void 0?{memberOf:[...a]}:{},...n.self!==void 0?{self:n.self}:{}}}return r}var N=e=>e.startsWith("_")?"names beginning with _ belong to the built-ins ($_me.id, $_now, $_row.<column>)":e.startsWith("ref_")?"ref_<id> once named a dataset table; read a dataset through <Import>":e.includes("__")?"a double underscore is how SQL spells a built-in field ($_me.id binds as $_me__id)":null;var F="Import",H="Value",Q="Query",J="Mutation",w="Notify",O=["string","number","boolean","date","timestamp","user","table"];var L=/^[A-Za-z_]\w*$/;var K=/^\d{4}-\d{2}-\d{2}([T ].*)?$/,i=(e,t,r,n)=>({message:e,tag:r,start:t.start,end:t.end,...n?{attr:n}:{}}),p=(e,t)=>{let r=e.attributes.find(n=>n.name===t);if(r)return r.value.static?{attr:r,json:r.value.json}:{attr:r}};function E(e,t,r){let n=p(e,"name");if(!n)return r.push(i(`<${t}> needs a name attribute`,e,t,"name")),null;if(typeof n.json!="string"||!L.test(n.json))return r.push(i(`<${t}> name must be an identifier ([A-Za-z_][A-Za-z0-9_]*), got ${JSON.stringify(n.json??n.attr.value)}`,n.attr,t,"name")),null;let a=N(n.json);return a?(r.push(i(`<${t}> name "${n.json}" is reserved \u2014 ${a}`,n.attr,t,"name")),null):n.json}var z=(e,t)=>{if(e===null)return!0;switch(t){case"number":return typeof e=="number"&&Number.isFinite(e);case"boolean":return typeof e=="boolean";case"timestamp":return x(e);case"date":return typeof e=="string"&&K.test(e);case"user":case"string":return typeof e=="string"}},Y=new Set(["name","type","default","value","columns","source","column","constraints","url"]);function Ut(e){let t=H,r=[];for(let u of e.attributes)Y.has(u.name)?u.value.static||r.push(i(`<Value> attribute "${u.name}" must be a JSON literal, got ${u.value.exprType}`,u,t,u.name)):r.push(i(`<Value> takes name, type, default, value, columns, url \u2014 not "${u.name}"`,u,t,u.name));if(r.length)return{ok:!1,errors:r};let n=E(e,t,r);if(!n)return{ok:!1,errors:r};let a=p(e,"type"),o=p(e,"source"),s=p(e,"column"),d=p(e,"constraints"),l=a?.json??(o?"user":"string");if(o&&(typeof o.json!="string"||!/^ref:[A-Za-z0-9]{6,12}$/.test(o.json)||typeof s?.json!="string"||!s.json||a||d))return{ok:!1,errors:[i('A bound Value takes source="ref:<dataset>" and column="<field>"; type and constraints are inherited',e,t,"source")]};if(s&&!o)return{ok:!1,errors:[i("Value column requires source",e,t,"column")]};let h;if(d)try{h=I({name:n,type:l,constraints:d.json}).constraints}catch(u){return{ok:!1,errors:[i(u instanceof Error?u.message:"Invalid constraints",e,t,"constraints")]}}if(!O.includes(l))return{ok:!1,errors:[i(`<Value name="${n}"> type must be one of ${O.join(" | ")}, got ${JSON.stringify(a?.json)}`,a?.attr??e,t,"type")]};let c=p(e,"url");if(c&&typeof c.json!="boolean")return{ok:!1,errors:[i(`<Value name="${n}"> url must be true or false, got ${JSON.stringify(c.json??c.attr.value)}`,c.attr,t,"url")]};if(c&&l==="table")return{ok:!1,errors:[i(`<Value name="${n}" type="table"> takes no url= \u2014 only a scalar <Value> travels in the link`,c.attr,t,"url")]};let T=c?.json===!1,f=p(e,"default"),g=p(e,"value"),y=p(e,"columns");if(l==="table"){if(f&&r.push(i(`<Value name="${n}" type="table"> holds its rows in value=, not default=`,f.attr,t,"default")),!g)return{ok:!1,errors:[...r,i(`<Value name="${n}" type="table"> needs value={[{\u2026}, \u2026]} \u2014 a non-empty array of flat objects`,e,t,"value")]};let u=g.json;if(!Array.isArray(u)||u.length===0&&!y)return{ok:!1,errors:[...r,i(`<Value name="${n}"> value must be a non-empty array of flat objects, or value={[]} with columns={[{name, type}]}`,g.attr,t,"value")]};for(let[b,_]of u.entries()){if(_===null||typeof _!="object"||Array.isArray(_)){r.push(i(`<Value name="${n}"> value row ${b} is not an object \u2014 rows are flat objects`,g.attr,t,"value"));continue}for(let[A,k]of Object.entries(_))k!==null&&typeof k=="object"&&r.push(i(`<Value name="${n}"> value row ${b} column "${A}" is nested \u2014 rows are flat objects`,g.attr,t,"value"))}if(r.length)return{ok:!1,errors:r};let P=u,v=D(P);if(y){let b=y.json;if(!(Array.isArray(b)&&b.every(m=>m&&typeof m=="object"&&!Array.isArray(m)&&typeof m.name=="string"&&O.includes(m.type??"")&&m.type!=="table")))return{ok:!1,errors:[i(`<Value name="${n}"> columns must be [{name, type: string|number|boolean|date|timestamp|user}]`,y.attr,t,"columns")]};let A;try{A=b.map(I)}catch(m){return{ok:!1,errors:[i(m instanceof Error?m.message:"Invalid columns",e,t,"columns")]}}let k=new Set(A.map(m=>m.name));v=[...A,...v.filter(m=>!k.has(m.name))]}return{ok:!0,decl:{kind:"table",name:n,rows:P,columns:v,start:e.start,end:e.end}}}g&&r.push(i(`<Value name="${n}"> value= is for type="table" rows; a scalar's initial value is default=`,g.attr,t,"value")),y&&r.push(i(`<Value name="${n}"> columns= is for type="table"`,y.attr,t,"columns"));let R=f?.json??null;return f&&!z(R,l)&&r.push(i(`<Value name="${n}" type="${l}"> default ${JSON.stringify(R)} is not a ${l}${l==="date"?" (use YYYY-MM-DD)":""}`,f.attr,t,"default")),r.length?{ok:!1,errors:r}:{ok:!0,decl:{kind:"scalar",name:n,type:l,...o?{source:String(o.json).slice(4),column:String(s.json)}:{},...h?{constraints:h}:{},...T?{url:!1}:{},default:l==="timestamp"&&R!==null?S(R,n):R,start:e.start,end:e.end}}}function M(e){let t=e.children.filter(n=>!(n.type==="text"&&n.value.trim()==="")),r=t.length===1?t[0]:null;return r&&r.type==="expression"&&r.value.static&&typeof r.value.json=="string"?r.value.json:null}function C(e,t,r){let n=e.attributes.find(s=>s.name===t);if(!n)return;let a=n.value.static?n.value.json:void 0,o=typeof a=="string"?j.exec(a)?.[1]:void 0;if(!o){let s=typeof a=="string"&&V.test(a)?`ref:${a}`:"ref:<id>";r.push(i(`${t} must be a literal artifact reference: ${t}="${s}"`,n,e.tag,t));return}return o}function Lt(e){let t=F,r=[];for(let o of e.attributes)o.name!=="name"&&o.name!=="src"&&r.push(i(`<Import> takes only name= and src="ref:<id>" \u2014 not "${o.name}"`,o,t,o.name));if(e.children.some(o=>!(o.type==="text"&&o.value.trim()===""))&&r.push(i('<Import> has no children: <Import name="\u2026" src="ref:<id>" />',e,t)),r.length)return{ok:!1,errors:r};let n=E(e,t,r),a=C(e,"src",r);return e.attributes.some(o=>o.name==="src")||r.push(i(`<Import${n?` name="${n}"`:""}> needs src="ref:<id>" \u2014 the dataset or folder it reads`,e,t,"src")),!n||!a||r.length?{ok:!1,errors:r}:{ok:!0,decl:{name:n,ref:a,start:e.start,end:e.end}}}function qt(e){let t=Q,r=[];for(let s of e.attributes)s.name!=="name"&&s.name!=="source"&&r.push(i(`<Query> takes only name= and source= \u2014 the SQL is its child: <Query name="\u2026">{\`select \u2026\`}</Query>${s.name==="sql"?" (not a sql= attribute)":""}`,s,t,s.name));if(r.length)return{ok:!1,errors:r};let n=E(e,t,r);if(!n)return{ok:!1,errors:r};let a=M(e);if(a===null)return{ok:!1,errors:[i(`<Query name="${n}"> holds a single template-literal child with the SQL: <Query name="${n}">{\`select \u2026\`}</Query>`,e,t)]};if(a.trim()==="")return{ok:!1,errors:[i(`<Query name="${n}"> has empty SQL`,e,t)]};let o=C(e,"source",r);return r.length?{ok:!1,errors:r}:{ok:!0,decl:{name:n,sql:a,...o?{source:o}:{},start:e.start,end:e.end}}}function Bt(e){let t=[];for(let s of e.attributes)s.name!=="name"&&s.name!=="on"&&s.name!=="source"&&t.push(i("<Notify> takes only name=, on= and source=; its child is one static SQL template literal",s,w,s.name));let r=E(e,w,t),n=C(e,"source",t),a=p(e,"on");(typeof a?.json!="string"||!L.test(a.json)||N(a.json))&&t.push(i("<Notify> on= must name a declared persistent Mutation",a?.attr??e,w,"on"));let o=M(e);return(o===null||!o.trim())&&t.push(i("<Notify> holds one non-empty static SQL template-literal child returning to and message",e,w)),!r||t.length?{ok:!1,errors:t}:{ok:!0,decl:{name:r,on:a.json,sql:o,...n?{source:n}:{},start:e.start,end:e.end}}}function Ft(e){let t=J,r=[];for(let l of e.attributes)l.name==="source"?r.push(i('<Mutation> takes no source= \u2014 import the dataset (<Import name="\u2026" src="ref:<id>" />) and write its table by name: insert into <name>.rows \u2026',l,t,l.name)):l.name!=="name"&&l.name!=="expectedAffected"&&l.name!=="reset"&&r.push(i(`<Mutation> takes only name=, expectedAffected= and reset= \u2014 the SQL is its child: <Mutation name="\u2026">{\`insert into <import>.rows \u2026\`}</Mutation>${l.name==="sql"?" (not a sql= attribute)":""}`,l,t,l.name));if(r.length)return{ok:!1,errors:r};let n=E(e,t,r);if(!n)return{ok:!1,errors:r};let a=M(e);if(a===null)return{ok:!1,errors:[i(`<Mutation name="${n}"> holds a single template-literal child with the SQL: <Mutation name="${n}">{\`insert into <import>.rows \u2026\`}</Mutation>`,e,t)]};if(a.trim()==="")return{ok:!1,errors:[i(`<Mutation name="${n}"> has empty SQL`,e,t)]};let o=p(e,"expectedAffected");if(o&&(typeof o.json!="number"||!Number.isInteger(o.json)||o.json<0))return{ok:!1,errors:[i("<Mutation expectedAffected> must be a non-negative integer",o.attr,t,"expectedAffected")]};let s=p(e,"reset");if(s&&typeof s.json!="string")return{ok:!1,errors:[i(`<Mutation name="${n}"> reset must be a space-separated list of scalar <Value> names, got ${JSON.stringify(s.json??s.attr.value)}`,s.attr,t,"reset")]};let d=typeof s?.json=="string"?s.json.trim().split(/\s+/).filter(Boolean):[];return{ok:!0,decl:{name:n,sql:a,...o?{expectedAffected:o.json}:{},...d.length?{reset:d}:{},start:e.start,end:e.end}}}var Ht=new Set($);export{j as a,F as b,H as c,Q as d,J as e,w as f,Ut as g,Lt as h,qt as i,Bt as j,Ft as k};
1
+ import{a as $}from"./frame-editor-chunk-9cf958dadb1e7379.js";var V=/^[A-Za-z0-9]{6,12}$/,j=/^ref:([A-Za-z0-9]{6,12})$/;var U="/api/internal",le=`${U}/tokens`,ue=`${U}/artifact-approval`;function A(e,t="timestamp"){let r=()=>{throw new Error(`${t}: invalid timestamp; use an ISO date/datetime (UTC when omitted), an explicit offset, or epoch milliseconds`)};if(typeof e=="number"){if(!Number.isFinite(e))return r();let f=new Date(e);return Number.isNaN(f.getTime())?r():f.toISOString()}if(e instanceof Date)return Number.isNaN(e.getTime())?r():e.toISOString();if(typeof e!="string")return r();let n=/^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}(?::?\d{2})?)?)?$/i.exec(e.trim());if(!n)return r();let a=n[1],o=new Date(`${a}T00:00:00.000Z`);if(Number.isNaN(o.getTime())||o.toISOString().slice(0,10)!==a)return r();let s=n[2]??"00",d=n[3]??"00",l=n[4]??"00";if(+s>23||+d>59||+l>59)return r();let h=(n[5]??"").padEnd(3,"0").slice(0,3),c=(n[6]??"Z").toUpperCase();/^[+-]\d{2}$/.test(c)&&(c+=":00"),/^[+-]\d{4}$/.test(c)&&(c=`${c.slice(0,3)}:${c.slice(3)}`);let T=new Date(`${a}T${s}:${d}:${l}.${h}${c}`);return Number.isNaN(T.getTime())?r():T.toISOString()}function x(e){try{return A(e),!0}catch{return!1}}var q=/^\d{4}-\d{2}-\d{2}$/;function B(e){return e==null?null:typeof e=="number"?"number":typeof e=="boolean"?"boolean":typeof e=="string"?q.test(e)?"date":/^[0-9]{4}-/.test(e)&&x(e)?"timestamp":"string":null}function N(e){let t=[],r=new Map;for(let n of e)for(let[a,o]of Object.entries(n)){!r.has(a)&&!t.includes(a)&&t.push(a);let s=B(o);if(s===null)continue;let d=r.get(a);d===void 0?r.set(a,s):d!==s&&r.set(a,"string")}return t.map(n=>({name:n,type:r.get(n)??"string"}))}function D(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Column must be {name, type, constraints?}");let t=e;if(typeof t.name!="string"||!t.name||t.name.includes("\0")||!["string","number","boolean","date","timestamp","user"].includes(String(t.type)))throw new Error("Invalid column name or type; use string, number, boolean, date, timestamp or user");if(Object.keys(t).some(n=>!["name","type","constraints","choices"].includes(n)))throw new Error("Unknown column attribute");let r={name:t.name,type:t.type};if(t.choices!==void 0){if(!Array.isArray(t.choices)||!t.choices.length||t.choices.length>100||t.choices.some(n=>n===null||typeof n!=(t.type==="number"?"number":t.type==="boolean"?"boolean":"string")||typeof n=="number"&&!Number.isFinite(n))||new Set(t.choices).size!==t.choices.length)throw new Error("Column choices must be 1\u2013100 unique values matching its type");r.choices=[...t.choices]}if(t.constraints!==void 0){if(t.type!=="user"||!t.constraints||typeof t.constraints!="object"||Array.isArray(t.constraints))throw new Error("User constraints must be an object");let n=t.constraints;if(Object.keys(n).some(o=>!["memberOf","self"].includes(o)))throw new Error("Unknown user constraint");if(n.self!==void 0&&typeof n.self!="boolean")throw new Error("self must be boolean");let a=n.memberOf;if(a!==void 0&&(!Array.isArray(a)||!a.length||a.some(o=>typeof o!="string"||o!=="current"&&!/^ref:[A-Za-z0-9]{6,12}$/.test(o))||new Set(a).size!==a.length))throw new Error("memberOf must be a nonempty array of unique document references or current");r.constraints={...a!==void 0?{memberOf:[...a]}:{},...n.self!==void 0?{self:n.self}:{}}}return r}var I=e=>e.startsWith("_")?"names beginning with _ belong to the built-ins ($_me.id, $_now, $_row.<column>)":e.startsWith("ref_")?"ref_<id> once named a dataset table; read a dataset through <Import>":e.includes("__")?"a double underscore is how SQL spells a built-in field ($_me.id binds as $_me__id)":null;var F="Import",H="Value",Q="Query",J="Mutation",w="Notify",C=["string","number","boolean","date","timestamp","user","table"];var L=/^[A-Za-z_]\w*$/;var W=/^\d{4}-\d{2}-\d{2}([T ].*)?$/,i=(e,t,r,n)=>({message:e,tag:r,start:t.start,end:t.end,...n?{attr:n}:{}}),p=(e,t)=>{let r=e.attributes.find(n=>n.name===t);if(r)return r.value.static?{attr:r,json:r.value.json}:{attr:r}};function S(e,t,r){let n=p(e,"name");if(!n)return r.push(i(`<${t}> needs a name attribute`,e,t,"name")),null;if(typeof n.json!="string"||!L.test(n.json))return r.push(i(`<${t}> name must be an identifier ([A-Za-z_][A-Za-z0-9_]*), got ${JSON.stringify(n.json??n.attr.value)}`,n.attr,t,"name")),null;let a=I(n.json);return a?(r.push(i(`<${t}> name "${n.json}" is reserved \u2014 ${a}`,n.attr,t,"name")),null):n.json}var K=(e,t)=>{if(e===null)return!0;switch(t){case"number":return typeof e=="number"&&Number.isFinite(e);case"boolean":return typeof e=="boolean";case"timestamp":return x(e);case"date":return typeof e=="string"&&W.test(e);case"user":case"string":return typeof e=="string"}},z=new Set(["name","type","default","value","columns","source","column","constraints","url"]);function qt(e){let t=H,r=[];for(let u of e.attributes)z.has(u.name)?u.value.static||r.push(i(`<Value> attribute "${u.name}" must be a JSON literal, got ${u.value.exprType}`,u,t,u.name)):r.push(i(`<Value> takes name, type, default, value, columns, url \u2014 not "${u.name}"`,u,t,u.name));if(r.length)return{ok:!1,errors:r};let n=S(e,t,r);if(!n)return{ok:!1,errors:r};let a=p(e,"type"),o=p(e,"source"),s=p(e,"column"),d=p(e,"constraints"),l=a?.json??(o?"user":"string");if(o&&(typeof o.json!="string"||!/^ref:[A-Za-z0-9]{6,12}$/.test(o.json)||typeof s?.json!="string"||!s.json||a||d))return{ok:!1,errors:[i('A bound Value takes source="ref:<dataset>" and column="<field>"; type and constraints are inherited',e,t,"source")]};if(s&&!o)return{ok:!1,errors:[i("Value column requires source",e,t,"column")]};let h;if(d)try{h=D({name:n,type:l,constraints:d.json}).constraints}catch(u){return{ok:!1,errors:[i(u instanceof Error?u.message:"Invalid constraints",e,t,"constraints")]}}if(!C.includes(l))return{ok:!1,errors:[i(`<Value name="${n}"> type must be one of ${C.join(" | ")}, got ${JSON.stringify(a?.json)}`,a?.attr??e,t,"type")]};let c=p(e,"url");if(c&&typeof c.json!="boolean")return{ok:!1,errors:[i(`<Value name="${n}"> url must be true or false, got ${JSON.stringify(c.json??c.attr.value)}`,c.attr,t,"url")]};if(c&&l==="table")return{ok:!1,errors:[i(`<Value name="${n}" type="table"> takes no url= \u2014 only a scalar <Value> travels in the link`,c.attr,t,"url")]};let T=c?.json===!1,f=p(e,"default"),g=p(e,"value"),y=p(e,"columns");if(l==="table"){if(f&&r.push(i(`<Value name="${n}" type="table"> holds its rows in value=, not default=`,f.attr,t,"default")),!g)return{ok:!1,errors:[...r,i(`<Value name="${n}" type="table"> needs value={[{\u2026}, \u2026]} \u2014 a non-empty array of flat objects`,e,t,"value")]};let u=g.json;if(!Array.isArray(u)||u.length===0&&!y)return{ok:!1,errors:[...r,i(`<Value name="${n}"> value must be a non-empty array of flat objects, or value={[]} with columns={[{name, type}]}`,g.attr,t,"value")]};for(let[b,_]of u.entries()){if(_===null||typeof _!="object"||Array.isArray(_)){r.push(i(`<Value name="${n}"> value row ${b} is not an object \u2014 rows are flat objects`,g.attr,t,"value"));continue}for(let[E,k]of Object.entries(_))k!==null&&typeof k=="object"&&r.push(i(`<Value name="${n}"> value row ${b} column "${E}" is nested \u2014 rows are flat objects`,g.attr,t,"value"))}if(r.length)return{ok:!1,errors:r};let M=u,v=N(M);if(y){let b=y.json;if(!(Array.isArray(b)&&b.every(m=>m&&typeof m=="object"&&!Array.isArray(m)&&typeof m.name=="string"&&C.includes(m.type??"")&&m.type!=="table")))return{ok:!1,errors:[i(`<Value name="${n}"> columns must be [{name, type: string|number|boolean|date|timestamp|user}]`,y.attr,t,"columns")]};let E;try{E=b.map(D)}catch(m){return{ok:!1,errors:[i(m instanceof Error?m.message:"Invalid columns",e,t,"columns")]}}let k=new Set(E.map(m=>m.name));v=[...E,...v.filter(m=>!k.has(m.name))]}return{ok:!0,decl:{kind:"table",name:n,rows:M,columns:v,start:e.start,end:e.end}}}g&&r.push(i(`<Value name="${n}"> value= is for type="table" rows; a scalar's initial value is default=`,g.attr,t,"value")),y&&r.push(i(`<Value name="${n}"> columns= is for type="table"`,y.attr,t,"columns"));let R=f?.json??null;return f&&!K(R,l)&&r.push(i(`<Value name="${n}" type="${l}"> default ${JSON.stringify(R)} is not a ${l}${l==="date"?" (use YYYY-MM-DD)":""}`,f.attr,t,"default")),r.length?{ok:!1,errors:r}:{ok:!0,decl:{kind:"scalar",name:n,type:l,...o?{source:String(o.json).slice(4),column:String(s.json)}:{},...h?{constraints:h}:{},...T?{url:!1}:{},default:l==="timestamp"&&R!==null?A(R,n):R,start:e.start,end:e.end}}}function O(e){let t=e.children.filter(n=>!(n.type==="text"&&n.value.trim()==="")),r=t.length===1?t[0]:null;return r&&r.type==="expression"&&r.value.static&&typeof r.value.json=="string"?r.value.json:null}function P(e,t,r){let n=e.attributes.find(s=>s.name===t);if(!n)return;let a=n.value.static?n.value.json:void 0,o=typeof a=="string"?j.exec(a)?.[1]:void 0;if(!o){let s=typeof a=="string"&&V.test(a)?`ref:${a}`:"ref:<id>";r.push(i(`${t} must be a literal artifact reference: ${t}="${s}"`,n,e.tag,t));return}return o}function Bt(e){let t=F,r=[];for(let o of e.attributes)o.name!=="name"&&o.name!=="src"&&r.push(i(`<Import> takes only name= and src="ref:<id>" \u2014 not "${o.name}"`,o,t,o.name));if(e.children.some(o=>!(o.type==="text"&&o.value.trim()===""))&&r.push(i('<Import> has no children: <Import name="\u2026" src="ref:<id>" />',e,t)),r.length)return{ok:!1,errors:r};let n=S(e,t,r),a=P(e,"src",r);return e.attributes.some(o=>o.name==="src")||r.push(i(`<Import${n?` name="${n}"`:""}> needs src="ref:<id>" \u2014 the dataset or folder it reads`,e,t,"src")),!n||!a||r.length?{ok:!1,errors:r}:{ok:!0,decl:{name:n,ref:a,start:e.start,end:e.end}}}function Ft(e){let t=Q,r=[];for(let s of e.attributes)s.name!=="name"&&s.name!=="source"&&r.push(i(`<Query> takes only name= and source= \u2014 the SQL is its child: <Query name="\u2026">{\`select \u2026\`}</Query>${s.name==="sql"?" (not a sql= attribute)":""}`,s,t,s.name));if(r.length)return{ok:!1,errors:r};let n=S(e,t,r);if(!n)return{ok:!1,errors:r};let a=O(e);if(a===null)return{ok:!1,errors:[i(`<Query name="${n}"> holds a single template-literal child with the SQL: <Query name="${n}">{\`select \u2026\`}</Query>`,e,t)]};if(a.trim()==="")return{ok:!1,errors:[i(`<Query name="${n}"> has empty SQL`,e,t)]};let o=P(e,"source",r);return r.length?{ok:!1,errors:r}:{ok:!0,decl:{name:n,sql:a,...o?{source:o}:{},start:e.start,end:e.end}}}function Ht(e){let t=[];for(let s of e.attributes)s.name!=="name"&&s.name!=="on"&&s.name!=="source"&&t.push(i("<Notify> takes only name=, on= and source=; its child is one static SQL template literal",s,w,s.name));let r=S(e,w,t),n=P(e,"source",t),a=p(e,"on");(typeof a?.json!="string"||!L.test(a.json)||I(a.json))&&t.push(i("<Notify> on= must name a declared persistent Mutation",a?.attr??e,w,"on"));let o=O(e);return(o===null||!o.trim())&&t.push(i("<Notify> holds one non-empty static SQL template-literal child returning to and message",e,w)),!r||t.length?{ok:!1,errors:t}:{ok:!0,decl:{name:r,on:a.json,sql:o,...n?{source:n}:{},start:e.start,end:e.end}}}function Qt(e){let t=J,r=[];for(let l of e.attributes)l.name==="source"?r.push(i('<Mutation> takes no source= \u2014 import the dataset (<Import name="\u2026" src="ref:<id>" />) and write its table by name: insert into <name>.rows \u2026',l,t,l.name)):l.name!=="name"&&l.name!=="expectedAffected"&&l.name!=="reset"&&r.push(i(`<Mutation> takes only name=, expectedAffected= and reset= \u2014 the SQL is its child: <Mutation name="\u2026">{\`insert into <import>.rows \u2026\`}</Mutation>${l.name==="sql"?" (not a sql= attribute)":""}`,l,t,l.name));if(r.length)return{ok:!1,errors:r};let n=S(e,t,r);if(!n)return{ok:!1,errors:r};let a=O(e);if(a===null)return{ok:!1,errors:[i(`<Mutation name="${n}"> holds a single template-literal child with the SQL: <Mutation name="${n}">{\`insert into <import>.rows \u2026\`}</Mutation>`,e,t)]};if(a.trim()==="")return{ok:!1,errors:[i(`<Mutation name="${n}"> has empty SQL`,e,t)]};let o=p(e,"expectedAffected");if(o&&(typeof o.json!="number"||!Number.isInteger(o.json)||o.json<0))return{ok:!1,errors:[i("<Mutation expectedAffected> must be a non-negative integer",o.attr,t,"expectedAffected")]};let s=p(e,"reset");if(s&&typeof s.json!="string")return{ok:!1,errors:[i(`<Mutation name="${n}"> reset must be a space-separated list of scalar <Value> names, got ${JSON.stringify(s.json??s.attr.value)}`,s.attr,t,"reset")]};let d=typeof s?.json=="string"?s.json.trim().split(/\s+/).filter(Boolean):[];return{ok:!0,decl:{name:n,sql:a,...o?{expectedAffected:o.json}:{},...d.length?{reset:d}:{},start:e.start,end:e.end}}}var Jt=new Set($);export{j as a,F as b,H as c,Q as d,J as e,w as f,qt as g,Bt as h,Ft as i,Ht as j,Qt as k};
@@ -1,2 +1,2 @@
1
- import{a as ee,d as te,e as ne,f as oe,g as re,h as se,i as w,k as le,l as O,m as P,n as ae,o as k,p as ie}from"./frame-editor-chunk-21789a4eef83142b.js";import"./frame-editor-chunk-c2b9018371100824.js";import"./frame-editor-chunk-9cf958dadb1e7379.js";import"./frame-editor-chunk-ac2f29681de6bf43.js";import"./frame-editor-chunk-ef5bf251af92a6aa.js";import{a as S}from"./frame-editor-chunk-345f7ca24ec61af0.js";import"./frame-editor-chunk-2f1573d8ed6065bd.js";import"./frame-editor-chunk-9dbaaa1b267ebd74.js";var q="data-mx-island-literals",de="data-mx-module-data",Re=`<script type="application/json" ${q}=`,Ke=`<script type="application/json" ${de}>`,Te="<\/script>",Je=new RegExp(`${Re}"[0-9a-f]{16}">[\\s\\S]*?${Te.replace("/","\\/")}`,"g"),Ye=new RegExp(`<script type="application\\/json" ${de}(?:="")?>`);var Qe=`const $moduleData = JSON.parse(document.getElementById("${w}").textContent).moduleData;
1
+ import{a as ee,d as te,e as ne,f as oe,g as re,h as se,i as w,k as le,l as O,m as P,n as ae,o as k,p as ie}from"./frame-editor-chunk-21789a4eef83142b.js";import"./frame-editor-chunk-a6db6db210776f5c.js";import"./frame-editor-chunk-9cf958dadb1e7379.js";import"./frame-editor-chunk-ac2f29681de6bf43.js";import"./frame-editor-chunk-ef5bf251af92a6aa.js";import{a as S}from"./frame-editor-chunk-345f7ca24ec61af0.js";import"./frame-editor-chunk-2f1573d8ed6065bd.js";import"./frame-editor-chunk-9dbaaa1b267ebd74.js";var q="data-mx-island-literals",de="data-mx-module-data",Re=`<script type="application/json" ${q}=`,Ke=`<script type="application/json" ${de}>`,Te="<\/script>",Je=new RegExp(`${Re}"[0-9a-f]{16}">[\\s\\S]*?${Te.replace("/","\\/")}`,"g"),Ye=new RegExp(`<script type="application\\/json" ${de}(?:="")?>`);var Qe=`const $moduleData = JSON.parse(document.getElementById("${w}").textContent).moduleData;
2
2
  `;var Ie=/^(\$|%24)/i;function ce(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function we(e){let n=e.replace(/^[?]/,"");if(!n)return[];let t=[];for(let o of n.split("&")){if(!o)continue;let r=o.indexOf("="),a=r<0?o:o.slice(0,r),i=r<0?"":o.slice(r+1),l=Ie.test(a),d=l?ce(a):null;t.push({raw:o,ours:l,name:d&&d.startsWith("$")?d.slice(1):null,value:l?ce(i):null})}return t}var fe=e=>new Map(e.values.flatMap(n=>n.kind==="scalar"&&n.type&&n.type!=="table"&&n.url!==!1?[[n.name,{name:n.name,type:n.type,default:n.default??null}]]:[]));function Ne(e,n){let t={};for(let o of fe(e).values()){if(!Object.prototype.hasOwnProperty.call(n,o.name)){t[o.name]=null;continue}let r=n[o.name];if(Object.is(r,o.default)){t[o.name]=null;continue}if(r===null){t[o.name]="";continue}if(typeof r=="object"){t[o.name]=null;continue}t[o.name]=String(r)}return t}var ue=e=>encodeURIComponent(e).replace(/%24/g,"$");function me(e,n,t){let o=we(e).filter(l=>!l.ours).map(l=>l.raw),r=Ne(n,t),a=[];for(let l of fe(n).values()){let d=r[l.name];d!=null&&a.push(`${ue(`$${l.name}`)}=${ue(d)}`)}let i=[...o,...a].join("&");return i?`?${i}`:""}var I="data-hk",Le=["data-mx-tw","data-mx-story-css","data-mx-font-vars","data-mx-author"],ve=6,Oe=250;function he(e,n){if(!e||!n)return e===n;let t=o=>JSON.stringify({...o,queries:o.queries.map(({start:r,end:a,...i})=>i),mutations:o.mutations.map(({start:r,end:a,...i})=>i)});return t(e)===t(n)}var K=class extends Error{},L=e=>new K(e),Q=e=>import(e);async function dt(e,n={}){let t=e.document,o=t.querySelector(P),r=t.body?.getAttribute(ae);if(!o||!r)throw L("the page has no live story");let a=n.surface??(e.origin==="null"?"raw":"app"),i=o[O],l=i?.morph??null;if(i&&i.mode()!=="read")throw L("the document is being edited");let d=i?.store??null,f=d?me(e.location.search,d.flow,d.getState().values):e.location.search,u=await ke(e,le(r,f,a),n.fetch??e.fetch.bind(e),a),c=u.querySelector(P);if(!c)throw L("the fragment carries no story");let s=u.body.getAttribute(k);if(s&&s===t.body.getAttribute(k))return;let g=B(t),y=B(u);if(g&&y&&W(t)!==W(u))throw L("the island build changed under the page");let M=n.importModule??Q,D=y?new URL(y,t.baseURI).href:null,E=null;if(l&&D&&y!==g){let p=u.querySelector(`script[${q}]`),A=p?t.importNode(p,!0):null;A&&t.body.append(A);try{E=await Se(l,D,M)}finally{A?.remove()}if(E.FLOW&&!d)throw L("the new version declares data the running islands have no store for")}let b=l?C(o,[...l.islands.keys()]):new Map,m=new Map;if(l&&y&&y===g)for(let p of l.islands.keys())b.has(p)&&m.set(p,p);else if(l&&E){let p=new Map;for(let[T,N]of b){let x=N[0].id;x&&p.set(x,T)}let A=C(c,E.ISLANDS.map(([T])=>T));for(let[T,,N]of E.ISLANDS){let x=A.get(T)?.[0]?.id,U=x?p.get(x):void 0;N&&U&&l.islands.get(U)?.[0]===N&&![...m.values()].includes(U)&&m.set(T,U)}}if(l){let p=new Set(m.values());for(let[A,[,T]]of[...l.islands])p.has(A)||(l.islands.delete(A),T())}let h=Ce(o,e),R=h?null:ne(e),_=R?ye(o,R.path):null,v=o.querySelector(".mx-rail")||c.querySelector(".mx-rail"),G=o.querySelector('.mx-rail-row[aria-current="true"]'),Me=G?[...o.querySelectorAll(".mx-doc [data-mx-slide]")][[...o.querySelectorAll(".mx-rail-row")].indexOf(G)]?.id:null,$=t.activeElement instanceof HTMLElement&&o.contains(t.activeElement)?t.activeElement:null;l&&pe(t)&&await l.restartAuthor(null);let X=n.mode?.()??ee(e);z(o,c,X),j(o,c,{keep:m,oldUnits:b,used:new Set,kept:new Set([...m.values()].filter(p=>p!=="d-").flatMap(p=>b.get(p)??[])),preserveCharts:!!y&&y===g}),De(t,u,{adopted:!!n.adopted,override:X});let F=u.getElementById(w);if(F){let p=t.getElementById(w);p?p.textContent=F.textContent:t.body.append(t.importNode(F,!0))}if(s&&t.body.setAttribute(k,s),l){let p=new Map(l.islands);l.islands.clear();for(let[A,T]of m){let N=p.get(T);N&&l.islands.set(A,N)}if(E){E.FLOW&&d&&!he(E.FLOW,d.flow)&&d.replaceFlow({flow:E.FLOW});for(let A of E.ISLANDS)m.has(A[0])||l.hydrate(A)}}else D&&await M(D);Ee(t,u);let Z=pe(u);if(l&&Z&&await l.restartAuthor(Z),v&&t.dispatchEvent(new CustomEvent("mx:deck-morphed",{detail:{slideId:Me}})),$&&!$.isConnected&&$.id&&t.getElementById($.id)?.focus({preventScroll:!0}),h){let p=t.getElementById(h.id)?.getBoundingClientRect().top;p!==void 0&&Math.abs(p-h.top)>1&&e.scrollBy({top:p-h.top})}else if(R&&_!==null){let p=ye(o,R.path);p!==null&&Math.abs(p-_)>1&&oe(e,R)}}async function ke(e,n,t,o){for(let r=0;;r++){let a=o==="raw"&&e.origin==="null"&&new URL(n,e.document.baseURI).searchParams.has("key"),i=await t(n,{credentials:a?"omit":"same-origin",cache:"no-store"});if(i.status===409&&r<ve){await new Promise(l=>e.setTimeout(l,Oe*(r+1)));continue}if(!i.ok)throw L(`the story fragment answered ${i.status}`);return new DOMParser().parseFromString(await i.text(),"text/html")}}function Ce(e,n){let o=[...e.querySelectorAll(`[id][${S}]`)].filter(r=>{let a=r.getBoundingClientRect();return a.height>0&&a.height<=n.innerHeight&&a.bottom>0&&a.top<n.innerHeight}).sort((r,a)=>r.getBoundingClientRect().top-a.getBoundingClientRect().top)[0];return o?{id:o.id,top:o.getBoundingClientRect().top}:null}function pe(e){try{let n=JSON.parse(e.getElementById(w)?.textContent||"null");return typeof n?.authorScript=="string"&&n.authorScript?n.authorScript:null}catch{return null}}var H=e=>[...e.querySelectorAll('script[type="module"][src]')].find(n=>n.getAttribute("src").startsWith(`${se}/`))??null,B=e=>H(e)?.getAttribute("src")??null,ct=B,J=e=>[...e.querySelectorAll('link[rel="modulepreload"][href]')].find(n=>n.getAttribute("href").startsWith(`${re}/boot-`))??null,W=e=>J(e)?.getAttribute("href")??null;function Ee(e,n){let t=(o,r,a)=>{if(!r){o?.remove();return}if(o?.isEqualNode(r))return;let i=e.importNode(r,!0);o?o.replaceWith(i):a.append(i)};t(H(e),H(n),e.body),t(J(e),J(n),e.head)}async function Se(e,n,t){let o=null;e.take=i=>{o=i,e.modules.set(i.ISLANDS,i),i.TREE&&e.trees.set(i.TREE,i)};let r;try{r=await t(n)}finally{delete e.take}let a=o??(r?.ISLANDS?e.modules.get(r.ISLANDS):r?.TREE?e.trees.get(r.TREE):void 0);if(!a)throw L("the new version's module did not hand in its islands");return a}function V(e){if(e.nodeType!==1)return null;let n=e.getAttribute(I),t=n?n.indexOf("-"):-1,o=t>0?n.slice(0,t+1):null;return o==="d-"?null:o}function C(e,n){let t=new Map;for(let o of n){if(!ie.test(o))continue;let r=`[${I}^="${o}"]`,a=[...e.querySelectorAll(r)].filter(i=>!i.parentElement?.closest(r));a.length&&t.set(o,a)}return t}function xe(e,n,t){for(let o of[e,...e.querySelectorAll(`[${I}^="${n}"]`)]){let r=o.getAttribute(I);r?.startsWith(n)&&o.setAttribute(I,t+r.slice(n.length))}}var Pe="data-mx-edit-region";function _e(e,n,t){let o=e.moveBefore;if(typeof o=="function"&&n.isConnected&&e.isConnected)try{o.call(e,n,t);return}catch{}e.insertBefore(n,t)}function j(e,n,t){let o=e.ownerDocument,r=[...e.childNodes],a=new Map,i=new Map;for(let s of r)s.nodeType===1&&(!V(s)||t.stableElementIds?.has(s.id))&&s.id&&a.set(s.id,s);for(let s of r)if(s.nodeType===1){let g=s.getAttribute(S);g&&t.stableOldPaths?.has(g)&&i.set(g,s)}let l=s=>{let g=s?t.stableElementPaths?.get(s):void 0;return g===void 0?void 0:i.get(g)},d=e.firstChild,f=s=>{if(t.used.add(s),s===d){d=d.nextSibling;return}_e(e,s,d)},u=new Set,c=new Set;for(let s of n.childNodes)s.nodeType===1&&s.id&&c.add(s.id);for(let s of[...n.childNodes]){let g=t.editRegions?.size&&s.nodeType===1?t.editRegions.get(s.getAttribute(Pe)??""):void 0;if(g){f(g);continue}let y=V(s);if(y){let m=t.keep.get(y);if(m===void 0){let h=s.id,R=h&&t.stableElementIds?.has(h)?a.get(h):void 0,_=l(s.getAttribute(S)),v=R??_;v&&Y(v,s)?(ge(v,s),f(v)):f(o.importNode(s,!0));continue}if(u.has(y))continue;u.add(y);for(let h of t.oldUnits.get(m)??[])y!==m&&xe(h,m,y),f(h);continue}let M=s.nodeType===1&&s.id?a.get(s.id):void 0,D=s.nodeType===1?s.getAttribute(S):null,E=l(D),b=M&&!t.used.has(M)?M:E&&!t.used.has(E)?E:Be(d,s,t,c);if(b&&!t.used.has(b)&&Y(b,s)){if(b.nodeType===1){let m=b,h=s,R=t.preserveCharts&&m.getAttribute("aria-label")==="Question embed"&&h.getAttribute("aria-label")==="Question embed"&&m.getAttribute(S)===h.getAttribute(S);!R&&!t.stableElementIds?.has(m.id)&&!(D&&t.stableElementPaths?.has(D))?m.isEqualNode(h)||(z(m,h,null),j(m,h,t)):R||ge(m,h)}else b.nodeValue!==s.nodeValue&&(b.nodeValue=s.nodeValue);f(b);continue}f(He(o,s,t))}for(let s of r)!t.used.has(s)&&!t.kept.has(s)&&s.parentNode===e&&e.removeChild(s)}function ge(e,n){for(let t of[I,S]){let o=[e,...e.querySelectorAll(`[${t}]`)].filter(a=>a.hasAttribute(t)),r=[n,...n.querySelectorAll(`[${t}]`)].filter(a=>a.hasAttribute(t));o.length===r.length&&o.forEach((a,i)=>{let l=r[i].getAttribute(t);a.getAttribute(t)!==l&&a.setAttribute(t,l)})}}var $e=e=>"get"in e?e:new Map([...e].map(n=>[n,n])),be=e=>"get"in e?new Set(e.values()):e,Ae=e=>"get"in e?new Set(e.keys()):e;function Ue(e,n,t,o=new Set,r=new Map){let a=c=>[...new Set([...c.querySelectorAll(`[${I}]`)].map(V).filter(s=>!!s))],i=C(e,a(e)),l=C(n,a(n)),d=new Map([...i].map(([c,s])=>[s[0]?.id,c])),f=new Map;for(let[c,s]of l){let g=s[0]?.id,y=g&&t.has(g)?d.get(g):void 0;y&&![...f.values()].includes(y)&&f.set(c,y)}let u=new Set([...[...f.values()].flatMap(c=>i.get(c)??[]),...r.values()]);z(e,n,null),j(e,n,{keep:f,oldUnits:i,used:new Set,kept:u,stableElementIds:t,stableElementPaths:$e(o),stableOldPaths:be(o),editRegions:r})}function ut(e,n,t){if(!t.querySelector(P))return"the fragment carries no story";if(!B(t))return null;if(!e[O])return"the version has islands and the page runs none";let o=W(n),r=W(t);return o&&r&&o!==r?"the island build changed under the page":null}function ft(e,n){De(e,n,{adopted:!0,override:null});let t=n.getElementById(w);if(t){let r=e.getElementById(w);r?r.textContent=t.textContent:e.body.append(e.importNode(t,!0))}let o=n.body.getAttribute(k);o&&e.body.setAttribute(k,o),Ee(e,n)}function mt(e,n,t){let o=[...e.querySelectorAll(`[${I}^="d-"]`)],r=o[0];if(!r||!o.every(l=>r.contains(l)))return!1;let a=Ae(t),i=o.filter(l=>l!==r&&l.hasAttribute(S)&&(n.has(l.id)||a.has(l.getAttribute(S))));return o.every(l=>l===r||i.some(d=>d.contains(l)))}function pt(e,n,t,o=!1){let a=e[O]?.morph;if(!a)return;let i=be(t);for(let[l,[,d]]of[...a.islands]){let f=C(e,[l]).get(l)?.[0];l!=="d-"&&f&&(n.has(f.id)||i.has(f.getAttribute(S)??""))||l==="d-"&&o||(a.islands.delete(l),d())}}async function qe(e,n,t,o=Q){let a=n[O]?.morph,i=H(t);if(!a||!i)return null;let l=new URL(i.getAttribute("src"),e.document.baseURI).href,d=t.querySelector(`script[${q}]`),f=d?e.document.importNode(d,!0):null;f&&e.document.body.append(f);try{return await Se(a,l,o)}finally{f?.remove()}}async function gt(e,n,t,o,r,a=Q,i,l=new Map,d=!1){let f=n[O],u=f?.morph;if(!u)return;let c=i!==void 0?i:await qe(e,n,t,a);if(!c)return;let s=Ae(r);c.FLOW&&f.store&&!he(c.FLOW,f.store.flow)&&f.store.replaceFlow({flow:c.FLOW});for(let g of c.ISLANDS){let y=C(n,[g[0]]).get(g[0])?.[0];if(!(!y||g[0]!=="d-"&&(o.has(y.id)||s.has(y.getAttribute(S)??"")))&&!(g[0]==="d-"&&d&&u.islands.has("d-"))&&(u.hydrate(g),g[0]==="d-"&&f.mode?.()==="edit")){let M=t.querySelector(P);if(!M)continue;let D=M.querySelectorAll(`[${S}][${I}]`),E=new Set([...o,...[...D].map(m=>m.id).filter(Boolean)]),b=new Set([...s,...[...D].map(m=>m.getAttribute(S)).filter(m=>!!m)]);Ue(n,M,E,b,l)}}}function He(e,n,t){if(n.nodeType!==1)return e.importNode(n,!1);let o=e.importNode(n,!1);return j(o,n,t),o}function Be(e,n,t,o){for(let r=e;r;r=r.nextSibling)if(!(t.used.has(r)||t.kept.has(r)||V(r))&&!(r.nodeType===1&&r.id&&o.has(r.id))&&Y(r,n))return r;return null}var Y=(e,n)=>e.nodeType===n.nodeType&&(e.nodeType!==1||e.tagName===n.tagName);function z(e,n,t){for(let o of[...e.attributes])n.hasAttributeNS(o.namespaceURI,o.localName)||e.removeAttributeNS(o.namespaceURI,o.localName);for(let o of[...n.attributes]){let r=o.value;t&&o.name==="class"&&e.hasAttribute("data-mx-inline-story")&&(r=We(r,t)),e.getAttributeNS(o.namespaceURI,o.localName)!==r&&e.setAttributeNS(o.namespaceURI,o.name,r)}}var We=(e,n)=>[...e.split(/\s+/).filter(t=>t&&t!=="light"&&t!=="dark"),n].join(" ");function De(e,n,{adopted:t,override:o}){let r=u=>[...u.attributes].find(c=>c.name.startsWith("data-mx-"))?.name??null,a=new Map;for(let u of n.head.querySelectorAll("style")){let c=r(u);c&&a.set(c,u.textContent??"")}let i=new Set;for(let u of[...e.head.querySelectorAll("style")]){let c=r(u);if(!c)continue;i.add(c);let s=a.get(c);if(s===void 0){Le.includes(c)&&u.remove();continue}u.textContent!==s&&(u.textContent=s)}for(let[u,c]of a){if(i.has(u))continue;let s=e.createElement("style");s.setAttribute(u,""),s.textContent=c,e.head.append(s)}if(t)return;let l=n.querySelector("title")?.textContent;l&&e.title!==l&&(e.title=l);let d=e.documentElement,f=n.documentElement.getAttribute("data-theme");f?d.setAttribute("data-theme",f):d.removeAttribute("data-theme"),te(d,o,n.documentElement.classList.contains("dark")?"dark":"light")}function ye(e,n){let t=[...e.querySelectorAll(`[${S}]`)].find(o=>o.getAttribute(S)===n);return t?t.getBoundingClientRect().top:null}export{K as MorphRefused,ft as adoptVersionRecord,pt as disposeChangedDraftIslands,mt as draftTreeKept,gt as hydrateDraftIslands,qe as loadDraftModule,Ue as morphDraftDom,dt as morphStory,ut as readRestoreBlocker,he as sameDataflow,ct as versionModuleUrl};
@@ -1 +1 @@
1
- import{a as m}from"./frame-editor-chunk-c2b9018371100824.js";import{a as R}from"./frame-editor-chunk-469766f5b284e4d8.js";var k="(max-width: 640px) 100vw, 768px";var w=t=>typeof t=="string"&&t.startsWith("ref:")?m.exec(t)?.[1]??null:null;var I=[["img","src",!1],["File","src",!0]],E=/^https?:\/\//i;function A(t){try{return new URL(t).href}catch{return t}}var C=t=>R(A(t)),$=t=>{let e=(t??"").split("/").pop()??"";return/^[0-9a-f]{8}/.test(e)?e.slice(0,8):null};function c(t,e){let n=`/assets/${C(t)}`,s=e&&typeof e=="object"?$(e.object_key):null;return s?`${n}?v=${s}`:n}var v=(t,e)=>{let n=c(t,e);return`${n}${n.includes("?")?"&":"?"}w=${e.small_width}`};function _(t,e){let{width:n,small_width:s}=e;return!e.small_object_key||!s||!n||n<=s?null:`${v(t,e)} ${s}w, ${c(t,e)} ${n}w`}var P=2,W=t=>E.test(t);function K(t,e,n){return w(t)?n?`${n}${n.includes("?")?"&":"?"}u=${encodeURIComponent(t)}`:null:W(t)?e(t)?c(t):n?`${n}${n.includes("?")?"&":"?"}u=${encodeURIComponent(t)}`:t:null}var Z=t=>e=>"get"in t?t.get(e)??!1:t.has(e),d=(t,e)=>{for(let n of t)n.type==="element"&&(e(n),d(n.children,e))},y=t=>I.filter(([e,,n])=>t.isComponent===n&&(n?t.tag===e:t.tag.toLowerCase()===e)).map(([,e])=>e),o=(t,e)=>t.attributes.find(n=>n.name.toLowerCase()===e.toLowerCase()),x=(t,e)=>{let n=o(t,e);return!n||!n.value.static||typeof n.value.json!="string"?null:E.test(n.value.json)?n.value.json:null};function a(t,e,n){let s=o(t,e);if(s){s.value={static:!0,json:n};return}t.attributes.push({name:e,value:{static:!0,json:n},start:t.start,end:t.start})}function Q(t,e,n={}){let s=!1;if(d(t,r=>{for(let h of y(r)){let g=x(r,h);g&&e(g)&&(s=!0)}}),!s)return t;let u=0,l=structuredClone(t);return d(l,r=>{let g=!r.isComponent&&r.tag.toLowerCase()==="img"?u++:-1;for(let p of y(r)){let f=x(r,p);if(!f)continue;let i=e(f);if(!i||(a(r,p,c(f,i)),p!=="src"||r.isComponent||typeof i!="object")||(i.width&&i.height&&!o(r,"width")&&!o(r,"height")&&(a(r,"width",String(i.width)),a(r,"height",String(i.height))),i.placeholder&&!o(r,"style")&&a(r,"style",{backgroundImage:`url(${i.placeholder})`,backgroundSize:"cover",backgroundRepeat:"no-repeat"}),n.capture))continue;let b=o(r,"srcset")||o(r,"sizes")?null:_(f,i);b&&(a(r,"srcSet",b),a(r,"sizes",k)),g>=P&&!o(r,"loading")&&(a(r,"loading","lazy"),o(r,"decoding")||a(r,"decoding","async"))}}),l}var S=/url\(\s*(['"]?)(https?:\/\/[^'")\s]+)\1\s*\)/gi;function X(t,e){return t.replace(S,(n,s,u)=>{let l=e(u);return l?`url(${s}${c(u,l)}${s})`:n})}function Y(t){return[...new Set([...t.matchAll(S)].map(e=>e[2]))]}export{A as a,C as b,c,W as d,K as e,Z as f,Q as g,X as h,Y as i};
1
+ import{a as m}from"./frame-editor-chunk-a6db6db210776f5c.js";import{a as R}from"./frame-editor-chunk-469766f5b284e4d8.js";var k="(max-width: 640px) 100vw, 768px";var w=t=>typeof t=="string"&&t.startsWith("ref:")?m.exec(t)?.[1]??null:null;var I=[["img","src",!1],["File","src",!0]],E=/^https?:\/\//i;function A(t){try{return new URL(t).href}catch{return t}}var C=t=>R(A(t)),$=t=>{let e=(t??"").split("/").pop()??"";return/^[0-9a-f]{8}/.test(e)?e.slice(0,8):null};function c(t,e){let n=`/assets/${C(t)}`,s=e&&typeof e=="object"?$(e.object_key):null;return s?`${n}?v=${s}`:n}var v=(t,e)=>{let n=c(t,e);return`${n}${n.includes("?")?"&":"?"}w=${e.small_width}`};function _(t,e){let{width:n,small_width:s}=e;return!e.small_object_key||!s||!n||n<=s?null:`${v(t,e)} ${s}w, ${c(t,e)} ${n}w`}var P=2,W=t=>E.test(t);function K(t,e,n){return w(t)?n?`${n}${n.includes("?")?"&":"?"}u=${encodeURIComponent(t)}`:null:W(t)?e(t)?c(t):n?`${n}${n.includes("?")?"&":"?"}u=${encodeURIComponent(t)}`:t:null}var Z=t=>e=>"get"in t?t.get(e)??!1:t.has(e),d=(t,e)=>{for(let n of t)n.type==="element"&&(e(n),d(n.children,e))},y=t=>I.filter(([e,,n])=>t.isComponent===n&&(n?t.tag===e:t.tag.toLowerCase()===e)).map(([,e])=>e),o=(t,e)=>t.attributes.find(n=>n.name.toLowerCase()===e.toLowerCase()),x=(t,e)=>{let n=o(t,e);return!n||!n.value.static||typeof n.value.json!="string"?null:E.test(n.value.json)?n.value.json:null};function a(t,e,n){let s=o(t,e);if(s){s.value={static:!0,json:n};return}t.attributes.push({name:e,value:{static:!0,json:n},start:t.start,end:t.start})}function Q(t,e,n={}){let s=!1;if(d(t,r=>{for(let h of y(r)){let g=x(r,h);g&&e(g)&&(s=!0)}}),!s)return t;let u=0,l=structuredClone(t);return d(l,r=>{let g=!r.isComponent&&r.tag.toLowerCase()==="img"?u++:-1;for(let p of y(r)){let f=x(r,p);if(!f)continue;let i=e(f);if(!i||(a(r,p,c(f,i)),p!=="src"||r.isComponent||typeof i!="object")||(i.width&&i.height&&!o(r,"width")&&!o(r,"height")&&(a(r,"width",String(i.width)),a(r,"height",String(i.height))),i.placeholder&&!o(r,"style")&&a(r,"style",{backgroundImage:`url(${i.placeholder})`,backgroundSize:"cover",backgroundRepeat:"no-repeat"}),n.capture))continue;let b=o(r,"srcset")||o(r,"sizes")?null:_(f,i);b&&(a(r,"srcSet",b),a(r,"sizes",k)),g>=P&&!o(r,"loading")&&(a(r,"loading","lazy"),o(r,"decoding")||a(r,"decoding","async"))}}),l}var S=/url\(\s*(['"]?)(https?:\/\/[^'")\s]+)\1\s*\)/gi;function X(t,e){return t.replace(S,(n,s,u)=>{let l=e(u);return l?`url(${s}${c(u,l)}${s})`:n})}function Y(t){return[...new Set([...t.matchAll(S)].map(e=>e[2]))]}export{A as a,C as b,c,W as d,K as e,Z as f,Q as g,X as h,Y as i};
@@ -1 +1 @@
1
- var x="/islands",S=`${x}/d`;var A=600*1e3;var u="mx-story-data";var c="/api/internal",$=`${c}/tokens`,j=`${c}/artifact-approval`;var a=/^ref:([A-Za-z0-9]{6,12})$/;var m=["Dialog","DialogTrigger","DialogContent","DialogClose","Mermaid","DeckGL","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","CardAction","Badge","Button","Alert","AlertTitle","AlertDescription","Table","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","Separator","Skeleton","Progress","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis","Avatar","AvatarImage","AvatarFallback","AvatarBadge","AvatarGroup","AvatarGroupCount","Tabs","TabsList","TabsTrigger","TabsContent","Accordion","AccordionItem","AccordionTrigger","AccordionContent","Collapsible","CollapsibleTrigger","CollapsibleContent","Tooltip","TooltipTrigger","TooltipContent","TooltipProvider","Popover","PopoverTrigger","PopoverContent","PopoverAnchor","PopoverHeader","PopoverTitle","PopoverDescription","Grid","GridItem","Input","Textarea","Select","Slider","DatePicker","Segmented","Switch","SlideDeck","Slide","File","Icon","User","UserImage","UserHandle","SignIn","DataTable","Column","For","Files"];var _=["svg","g","defs","path","line","polyline","polygon","rect","circle","ellipse","text","tspan","linearGradient","radialGradient","stop","clipPath","title","desc"],ot=["div","span","p","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","a","strong","em","b","i","u","s","code","pre","kbd","samp","var","blockquote","cite","q","abbr","mark","small","sub","sup","del","ins","img","figure","figcaption","picture","source","video","audio","track","iframe","section","article","aside","header","footer","main","nav","address","hr","br","wbr","time","data","details","summary","button","input","label","select","option","optgroup","textarea","fieldset","legend","output","meter","progress","datalist","canvas","dialog","template",..._];var p=["Question","Number",...m];var wt=new Set(p);var f=e=>typeof e=="string"&&e.startsWith("ref:")?a.exec(e)?.[1]??null:null;async function jt(e,g,y,i,b){let r=f(e);if(g&&r)return`/a/${r}/raw`;let s=i.get(e);if(s)return s;if(!r&&!/^https?:\/\//i.test(e))return null;let t=y??void 0;if(!t)try{t=JSON.parse(document.getElementById(u)?.textContent??"{}").assetsUrl}catch{t=void 0}if(!t)return null;let l=await fetch(`${t}${t.includes("?")?"&":"?"}u=${encodeURIComponent(e)}`,{headers:{Accept:"application/json"},signal:b});if(!l.ok)return null;let n=await l.json();return n.url&&i.set(e,n.url),n.url??null}export{jt as mapImage};
1
+ var x="/islands",S=`${x}/d`;var E=600*1e3;var u="mx-story-data";var c="/api/internal",$=`${c}/tokens`,V=`${c}/artifact-approval`;var a=/^ref:([A-Za-z0-9]{6,12})$/;var m=["Dialog","DialogTrigger","DialogContent","DialogClose","Mermaid","DeckGL","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","CardAction","Badge","Button","Alert","AlertTitle","AlertDescription","Table","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","Separator","Skeleton","Progress","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis","Avatar","AvatarImage","AvatarFallback","AvatarBadge","AvatarGroup","AvatarGroupCount","Tabs","TabsList","TabsTrigger","TabsContent","Accordion","AccordionItem","AccordionTrigger","AccordionContent","Collapsible","CollapsibleTrigger","CollapsibleContent","Tooltip","TooltipTrigger","TooltipContent","TooltipProvider","Popover","PopoverTrigger","PopoverContent","PopoverAnchor","PopoverHeader","PopoverTitle","PopoverDescription","Grid","GridItem","Input","Textarea","Select","Slider","DatePicker","Segmented","Switch","SlideDeck","Slide","File","Icon","User","UserImage","UserHandle","SignIn","DataTable","Column","For","Files"];var _=["svg","g","defs","path","line","polyline","polygon","rect","circle","ellipse","text","tspan","linearGradient","radialGradient","stop","clipPath","title","desc"],st=["div","span","p","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","a","strong","em","b","i","u","s","code","pre","kbd","samp","var","blockquote","cite","q","abbr","mark","small","sub","sup","del","ins","img","figure","figcaption","picture","source","video","audio","track","iframe","section","article","aside","header","footer","main","nav","address","hr","br","wbr","time","data","details","summary","button","input","label","select","option","optgroup","textarea","fieldset","legend","output","meter","progress","datalist","canvas","dialog","template",..._];var p=["Question","Number",...m];var vt=new Set(p);var f=e=>typeof e=="string"&&e.startsWith("ref:")?a.exec(e)?.[1]??null:null;async function Ut(e,g,y,i,b){let r=f(e);if(g&&r)return`/a/${r}/raw`;let s=i.get(e);if(s)return s;if(!r&&!/^https?:\/\//i.test(e))return null;let t=y??void 0;if(!t)try{t=JSON.parse(document.getElementById(u)?.textContent??"{}").assetsUrl}catch{t=void 0}if(!t)return null;let l=await fetch(`${t}${t.includes("?")?"&":"?"}u=${encodeURIComponent(e)}`,{headers:{Accept:"application/json"},signal:b});if(!l.ok)return null;let n=await l.json();return n.url&&i.set(e,n.url),n.url??null}export{Ut as mapImage};
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-adcd632c8be50ba7.js";import"./chunk-8a5671e74f9b2466.js";import"./chunk-cf6a60ba490f3515.js";import"./chunk-a4866c30bdb9375b.js";import"./chunk-8426c32d0201eda6.js";import"./chunk-5ad7185e3c58e3d1.js";import"./chunk-3ee47a6fd7b65a6d.js";import"./chunk-5de75caaf78870a0.js";import"./chunk-dd593b723712ff5e.js";import"./chunk-be4d193df7d4144e.js";import"./chunk-f3978ee5975e9bfa.js";import"./chunk-25503ca584cd62bc.js";import"./chunk-e817ee4addba2d95.js";import"./chunk-f9e82ddaac694d1e.js";import"./chunk-8f85f5a5c4820f2b.js";import"./chunk-6c38a77acb85dcf8.js";import"./chunk-e3951c3b89c87427.js";import"./chunk-26bc72c61d8ecfe4.js";import"./chunk-71e9c1cf64534cc0.js";export{f as Alert,h as AlertDescription,g as AlertTitle,c as Badge,p as Button,i as Card,m as CardAction,n as CardContent,l as CardDescription,o as CardFooter,j as CardHeader,k as CardTitle,e as Icon,d as Progress,a as rowAttrs,b as stableRowKey};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-5e05b99cb275660b.js";import"./chunk-8a5671e74f9b2466.js";import"./chunk-cf6a60ba490f3515.js";import"./chunk-a4866c30bdb9375b.js";import"./chunk-8426c32d0201eda6.js";import"./chunk-5ad7185e3c58e3d1.js";import"./chunk-3ee47a6fd7b65a6d.js";import"./chunk-5de75caaf78870a0.js";import"./chunk-dd593b723712ff5e.js";import"./chunk-be4d193df7d4144e.js";import"./chunk-f3978ee5975e9bfa.js";import"./chunk-25503ca584cd62bc.js";import"./chunk-d924d4620b11b893.js";import"./chunk-f9e82ddaac694d1e.js";import"./chunk-8f85f5a5c4820f2b.js";import"./chunk-6c38a77acb85dcf8.js";import"./chunk-e3951c3b89c87427.js";import"./chunk-26bc72c61d8ecfe4.js";import"./chunk-71e9c1cf64534cc0.js";export{f as Alert,h as AlertDescription,g as AlertTitle,c as Badge,p as Button,i as Card,m as CardAction,n as CardContent,l as CardDescription,o as CardFooter,j as CardHeader,k as CardTitle,e as Icon,d as Progress,a as rowAttrs,b as stableRowKey};
@@ -0,0 +1,2 @@
1
+ �@,
2
+ l�4;)͛�����I=kW���l����"� n�v��f��5�v�e��������7�s���|,�r�څr�>L)ɰ<zO���� �����=������@;sZw5��ro�B����e���Na�A���XQ�� �a�M<v��`!���A������8^�;���:mZ�����T\8��Y��Ď��uН�����I�3���J��~1(�OY!�6���G�b�ؑ�H�v�8�SK�Ч6G��Q�6�^���S��g��pGN�����84�7En��x98�e�QQ��U!^��+}r����Ry$d��x�,�h��o�t��l[|��8�8���x�Ǥ�{�8��$\A?��N�-s�t��(�^��?
@@ -1 +1 @@
1
- import{a as ot}from"./chunk-adcd632c8be50ba7.js";import{a as Ze,b as rt,c as Ke}from"./chunk-8a5671e74f9b2466.js";import{v as tt}from"./chunk-cf6a60ba490f3515.js";import"./chunk-a4866c30bdb9375b.js";import{a as nt,b as he}from"./chunk-8426c32d0201eda6.js";import"./chunk-5ad7185e3c58e3d1.js";import{a as et}from"./chunk-3ee47a6fd7b65a6d.js";import"./chunk-5de75caaf78870a0.js";import"./chunk-dd593b723712ff5e.js";import"./chunk-be4d193df7d4144e.js";import"./chunk-f3978ee5975e9bfa.js";import"./chunk-25503ca584cd62bc.js";import{d as Ye,h as Fe,i as Qe,j as Xe}from"./chunk-e817ee4addba2d95.js";import{b as qe}from"./chunk-f9e82ddaac694d1e.js";import"./chunk-8f85f5a5c4820f2b.js";import{b as He}from"./chunk-6c38a77acb85dcf8.js";import{a as Ie,c as y,e as ve,f as W,i as ge,j as M,n as ne,o as oe,p as v,q as p,s as R,t as ie,w as ze}from"./chunk-e3951c3b89c87427.js";import{e as te,g as re,h as ce,i as Re,k as Me,l as Ge,n as Ne,u as C,v as V,y as Te,z as X}from"./chunk-26bc72c61d8ecfe4.js";import"./chunk-71e9c1cf64534cc0.js";function it(){let e=new Map,o=new Set,i=()=>{for(let n of[...o])n()},l=(n,c)=>{e.set(n,Object.freeze(c)),i()},a=n=>{e.delete(n)&&i()};return{get:n=>e.get(n),subscribe(n){return o.add(n),()=>{o.delete(n)}},begin(n,c,d){e.has(n)||l(n,{draft:c,original:c,row:Object.freeze({...d}),phase:"editing",error:null})},change(n,c){let d=e.get(n);!d||d.phase==="pending"||d.phase==="saved"||Object.is(d.draft,c)&&d.phase==="editing"||l(n,{...d,draft:c,phase:"editing",error:null})},cancel:a,async commit(n,c){let d=e.get(n);if(!d||d.phase==="pending"||d.phase==="saved")return;if(Object.is(d.draft,d.original)){a(n);return}let r={...d,phase:"pending",error:null};l(n,r);try{await c(r.draft,r.original,r.row),e.get(n)===r&&l(n,{...r,phase:"saved"})}catch(s){e.get(n)===r&&l(n,{...r,phase:"error",error:s instanceof Error?s.message:String(s)})}},reconcile(n,c){let d=e.get(n);d?.phase==="saved"&&Object.is(d.draft,c)&&a(n)}}}var gt=y('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="size-4 shrink-0 opacity-50"aria-hidden=true><path d="m6 9 6 6 6-6">'),bt=y('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="size-3.5 shrink-0"aria-hidden=true><path d="M20 6 9 17l-5-5">'),vt=y('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="size-3.5 shrink-0 opacity-50"aria-hidden=true><path d="M8 2v4"></path><path d="M16 2v4"></path><rect width=18 height=18 x=3 y=4 rx=2></rect><path d="M3 10h18">'),ht=y('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4 aria-hidden=true><path>'),yt=y("<span role=alert class=mx-write-error>"),pt=y("<button type=button role=option aria-selected=false>Create \u201C<!$><!/>\u201D"),xt=y('<div class="flex justify-end border-t border-border p-1.5"><button type=button aria-label=Done class="rounded-sm px-2 py-1 text-sm font-medium hover:bg-accent">Done'),$t=y('<div><div class="border-b border-border p-1.5"><input type=text role=searchbox placeholder="Type to filter\u2026"class="h-8 w-full min-w-36 rounded-sm border border-input bg-background px-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/50"></div><div role=listbox><!$><!/><!$><!/></div><div class="border-t border-border p-1.5"></div><!$><!/>'),wt=y("<button type=button role=option><span class=truncate></span><!$><!/>"),_t=y('<div role=status class="px-2 py-3 text-center text-sm text-muted-foreground">No matches'),St=y("<span role=alert>Expected a JSON array of strings."),kt=y('<div><div class="relative min-w-0"><button type=button aria-haspopup=listbox class="inline-flex w-full items-center justify-between gap-2 rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 h-8 min-w-0 border border-transparent bg-transparent px-2 hover:border-border hover:bg-muted/60"><span></span><!$><!/></button><!$><!/>'),Ct=y('<button type=button class="rounded-sm px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground">Clear'),Dt=y('<button type=button class="rounded-sm px-1.5 py-0.5 text-primary transition-colors hover:bg-accent">Today'),Et=y('<div class="mt-2 flex items-center justify-between border-t border-border pt-2 text-sm"><!$><!/><!$><!/>'),Ot=y('<div role=dialog><div class="flex items-center justify-between"><span class="px-1 text-sm font-medium"><!$><!/> <!$><!/></span><span class="flex items-center gap-1"><button type=button aria-label="Previous month"class="flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"></button><button type=button aria-label="Next month"class="flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"></button></span></div><div class="mt-2 grid grid-cols-7 gap-y-0.5"><!$><!/><!$><!/></div><!$><!/>'),jt=y('<span aria-hidden=true class="flex size-8 items-center justify-center text-[11px] font-medium uppercase text-muted-foreground">'),Mt=y("<button type=button>"),Nt=y("<span>"),Tt=y('<div><div class="relative w-full min-w-0"><button type=button aria-haspopup=dialog class="inline-flex items-center justify-between rounded-md text-sm tabular-nums transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 h-8 w-full min-w-0 gap-1 border border-transparent bg-transparent px-1 hover:border-border hover:bg-muted/60"><span></span><!$><!/>'),Lt=y("<select>"),At=y("<textarea>"),Pt=y("<input>"),Rt=e=>typeof e=="string"&&e.length<=256&&!/[\u0000-\u001f]/.test(e)||typeof e=="number"&&Number.isFinite(e),It=["for","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","aria-details","aria-errormessage","aria-flowto","headers","list","form"];function zt(e,o,i){let l=ot(e,o,null);if(!i?.owner)return l;let a=Rt(i.key)?i.key:void 0,n=["table",i.owner,typeof a,a??["index",i.index],i.column],c=d=>i.ids.includes(d);l.id&&(a!==void 0&&Object.assign(l,nt(i.owner,{kind:"table",rowKey:a,columnKey:i.column,templateNodeId:l.id})),l.id=he(n,l.id));for(let d of It){let r=l[d];r!==void 0&&(l[d]=r.split(/\s+/).map(s=>c(s)?he(n,s):s).join(" "))}for(let[d,r]of Object.entries(l))d==="href"&&r.startsWith("#")&&c(r.slice(1))?l[d]=`#${he(n,r.slice(1))}`:/^url\(#[^)]+\)$/.test(r)&&c(r.slice(5,-1))&&(l[d]=`url(#${he(n,r.slice(5,-1))})`);return l}var lt=new WeakMap,Ft=e=>{let o=lt.get(e);return o||lt.set(e,o=it()),o},Ht=e=>Object.fromEntries(Object.entries(e).filter(o=>{let i=o[1];return i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"&&Number.isFinite(i)})),ye=e=>typeof e=="string"?e:void 0,le=(...e)=>e.filter(Boolean).join(" ");function Kt(e,o){if(typeof e=="string"&&Fe(e)){let[i,l]=o?.columns??[];return o&&i?o.rows.map(a=>{let n=String(a[i.name]??"");return{value:n,label:l?String(a[l.name]??n):n}}):[]}return Array.isArray(e)?e.map(i=>typeof i=="object"&&i!==null?{value:String(i.value??""),label:String(i.label??i.value??"")}:{value:String(i),label:String(i)}):[]}var ue=e=>{if(!e)return[];try{let o=JSON.parse(e);if(Array.isArray(o)&&o.every(i=>typeof i=="string"))return[...new Set(o)]}catch{}return null},Bt=["--background","--foreground","--popover","--popover-foreground","--primary","--primary-foreground","--muted","--muted-foreground","--accent","--accent-foreground","--border","--input","--ring","--radius","--font-body","--font-mono"],Vt=e=>e.closest("dialog")??e.ownerDocument.body;function ct(e){let o=e.closest("[data-theme], .dark, .light");return{dataTheme:o?.dataset.theme,className:le(o?.classList.contains("dark")&&"dark",o?.classList.contains("light")&&"light")||void 0}}function Wt(e,o,i){let l=e.ownerDocument.defaultView,a=()=>{let n=l.getComputedStyle(e);for(let D of Bt){let S=n.getPropertyValue(D);S?o.style.setProperty(D,S):o.style.removeProperty(D)}Object.assign(o.style,{fontFamily:n.fontFamily,colorScheme:n.colorScheme,direction:n.direction});let c=e.getBoundingClientRect(),d=Math.min(i??Math.max(c.width,200),l.innerWidth-16),r=o.getBoundingClientRect().height,s=l.innerHeight-c.bottom-12,_=s>=r||s>=c.top-12?c.bottom+4:c.top-r-4;Object.assign(o.style,{position:"fixed",zIndex:"50",width:`${d}px`,left:`${Math.max(8,Math.min(c.left,l.innerWidth-d-8))}px`,top:`${Math.max(8,Math.min(_,l.innerHeight-r-8))}px`,maxHeight:`${l.innerHeight-16}px`,overflowY:"auto"})};return a(),l.addEventListener("resize",a),e.ownerDocument.addEventListener("scroll",a,!0),()=>{l.removeEventListener("resize",a),e.ownerDocument.removeEventListener("scroll",a,!0)}}function ut(e,o,i,l){ce(()=>{let a=o();if(!e()||!a)return;let n=Me(i);Vt(a).append(n);let c=Wt(a,n,l);Ne(()=>{c(),n.remove()})})}var dt=(e,o,i,l)=>{let a=et(e,l,o,i);ce(Ge(e,n=>{n&&a()}))},Jt=()=>p(gt),Ut=()=>p(bt),Gt=()=>p(vt),at=e=>(()=>{var o=p(ht),i=o.firstChild;return W(i,"d",e),o})();var ft="rounded-md border border-border bg-popover text-popover-foreground shadow-md";function Mn(e){let o=He(),i=o.store(),l=Ft(o),{row:a,cell:n}=e,c=Re(()=>Object.fromEntries(Object.entries(e.p).map(([f,O])=>[f,(f==="args"||f==="set")&&O&&typeof O=="object"?Qe(O,a):qe(O,a)]))),d=JSON.stringify([n.table,typeof n.key,n.key,n.column,e.path]),r=()=>c().value??null,s=rt(()=>o.mutationUnavailable(e.run),{value:Ke}),[_,D]=te(0);ze||Ne(l.subscribe(()=>D(f=>f+1)));let S=()=>(_(),l.get(d));ce(()=>{S()?.phase,l.reconcile(d,r())});let J=()=>s()===null,E=()=>{let f=S();return f?f.draft:r()},F=()=>S()?.phase==="pending"||S()?.phase==="saved",H=()=>!J()||F()||c().disabled===!0,m=()=>Ze(s()),h=()=>l.begin(d,r(),Ht(a)),k=()=>l.cancel(d),x=f=>{h(),l.change(d,f)},Z=()=>{let f=o.viewer();return f&&"id"in f?f.id:null},I=()=>{if(!J()||!i)return;let f=c().args,O=f&&typeof f=="object"?Xe(f,ee=>ee===Ye?Z():i.getValue(ee)):{};l.commit(d,(ee,q,Y)=>i.mutate(e.run,{...O,_value:ee},{...Y}))},L=()=>ye(c()["aria-label"])??ye(c().label)??`${n.column} ${String(n.key)}`,N=()=>o.tableSnapshot(n.data)?.columns.find(f=>f.name===e.field)?.type,$=f=>f===null?null:N()==="number"?f===""?null:Number(f):N()==="boolean"?f==="true":f,K=()=>zt(e.attrs,a,n),B=()=>e.tag==="Select"?C(qt,V(()=>({authored:c,label:L,value:E,session:S,disabled:H,busy:F,unavailable:s,change:x,commit:I,cancel:k,begin:h,typed:$,valueType:N,attrs:K,cls:e.cls,cell:n,field:e.field}),{get children(){return e.children}})):e.tag==="DatePicker"?C(Zt,V(()=>({authored:c,label:L,value:E,disabled:H,busy:F,unavailable:s,change:x,commit:I,valueType:N,attrs:K,cls:e.cls}))):C(en,V(()=>({tag:e.tag,authored:c,label:L,value:E,disabled:H,reason:m,begin:h,change:x,commit:I,cancel:k,typed:$,attrs:K,cls:e.cls,sessions:l,identity:d}),{get children(){return e.children}}));return C(tt,{get reason(){return m()},fullWidth:!0,get children(){return[Ie(()=>B()),C(X,{get when(){return S()?.error},children:f=>(()=>{var O=p(yt);return v(O,f),O})()})]}})}function qt(e){let o=He(),i=o.store(),l=()=>e.authored(),a=()=>e.valueType()!=="user"&&l().multiple===!0,n=()=>e.valueType()!=="user"&&l().allowCreate===!0,c=()=>ye(l().placeholder)??"None",[d,r]=te(i?.getState().userOptions);i&&!ze&&Ne(i.subscribe(()=>r(()=>i.getState().userOptions)));let s=Re(()=>{let t=e.valueType()==="user",u,g=l().options;if(g===void 0&&t)u=d()?.[`${e.cell.data}.${e.field}`]??[];else{let T=Fe(g),P=T?o.table(T):void 0;u=Kt(g,P),t&&(!P||P.columns.length===1)&&(u=u.map(j=>({...j,label:j.label===j.value?o.people()[j.value]?.name??j.label:j.label})))}let A=l().exclude;return A===void 0?u:u.filter(T=>T.value!==String(A))}),_=()=>{let t=e.value();return t===null?null:String(t)},D=()=>{let t=e.session();return t?t.draft===null?null:String(t.draft):void 0},[S,J]=te(!1),[E,F]=te(""),[H,m]=te(-1),[h,k]=te(ue(Me(_))??[]),x=()=>D()===void 0?h():ue(D())??[],Z=()=>a()&&(ue(_())===null||D()!==void 0&&ue(D())===null),I=()=>e.disabled()||Z(),L=!1,N,$,K,B=()=>[...!a()&&l().nullable===!0?[{value:null,label:c()}]:[],...s(),...a()?x().filter(t=>!s().some(u=>u.value===t)).map(t=>({value:t,label:t})):[]],f=()=>{let t=E().trim().toLocaleLowerCase();return t?B().filter(u=>u.label.toLocaleLowerCase().includes(t)||u.value!==null&&u.value.toLocaleLowerCase().includes(t)):B()},O=()=>a()&&n()&&!!E().trim()&&!B().some(t=>t.value===E().trim()),ee=()=>{if(a()){let u=ue(_())??[];return u.length?u.map(g=>s().find(A=>A.value===g)?.label??g).join(", "):c()}let t=_();return t===null?c():s().find(u=>u.value===t)?.label??t},q=t=>{L=t,J(t),t&&e.begin()},Y=(t=!0)=>{q(!1),F(""),m(-1),t&&N?.querySelector("button")?.focus()},be=t=>{let u=[...new Set(t)];D()===void 0&&k(u),e.change(JSON.stringify(u))},de=(t=!0)=>{if(I()||!L)return;L=!1;let u=JSON.stringify(x());e.change(e.typed(u)),e.commit(),Y(t)},fe=()=>{L&&(L=!1,e.cancel(),Y())};ce(()=>{(Z()||l().disabled===!0||e.unavailable()!==null&&e.unavailable()!==Ke)&&L&&q(!1)});let pe=()=>{I()||S()||(a()&&D()===void 0&&k(ue(_())??[]),q(!0),F(""),m(-1))},xe=t=>{if(!I()){if(a()&&t!==null){be(x().includes(t)?x().filter(u=>u!==t):[...x(),t]),F(""),m(-1),K?.focus();return}e.change(e.typed(t)),e.commit(),L=!1,Y()}},$e=t=>{x().includes(t)||be([...x(),t]),F(""),m(-1)},Le=t=>m(u=>Math.max(0,Math.min(f().length+(O()?1:0)-1,u+t))),we=t=>B().some(u=>u.label.toLocaleLowerCase().includes(t)||u.value!==null&&u.value.toLocaleLowerCase().includes(t)),_e=t=>{if(t.key==="Escape"){t.preventDefault(),t.stopPropagation(),fe();return}t.key==="ArrowDown"||t.key==="ArrowUp"?(t.preventDefault(),Le(t.key==="ArrowDown"?1:-1)):t.key==="Enter"&&H()>=0&&f()[H()]?(t.preventDefault(),xe(f()[H()].value)):t.key==="Enter"&&a()&&n()&&E().trim()&&(t.preventDefault(),$e(E().trim()))},w=t=>{if(t.key==="Escape"){t.preventDefault(),t.stopPropagation(),fe();return}if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),pe(),m(t.key==="ArrowDown"?0:Math.max(0,B().length-1));return}I()||t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&(t.preventDefault(),a()&&D()===void 0&&k(ue(_())??[]),q(!0),F(t.key),m(we(t.key.toLocaleLowerCase())?0:-1))};return dt(()=>S(),()=>N,()=>$,()=>a()?de(!1):Y(!1)),ut(()=>S(),()=>N,()=>{let t=ct(N),u=(()=>{var g=p($t),A=g.firstChild,T=A.firstChild,P=A.nextSibling,j=P.firstChild,[Se,Ae]=R(j.nextSibling),Pe=Se.nextSibling,[ke,U]=R(Pe.nextSibling),me=P.nextSibling,Ce=me.nextSibling,[De,Ee]=R(Ce.nextSibling),Be=$;return typeof Be=="function"?oe(Be,g):$=g,ne(g,V(()=>({"data-theme":t.dataTheme}),{get class(){return le(t.className,ft)},"on:focusout":b=>{if(!L)return;let z=b.relatedTarget;z&&($?.contains(z)||N?.contains(z))||(a()?de(!1):Y(!1))},"on:keydown":b=>{b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),fe())}}),!1,!0),M(T,"keydown",_e),M(T,"input",b=>{let z=b.currentTarget.value;F(z),m(we(z.trim().toLocaleLowerCase())?0:-1)}),oe(b=>{K=b,ce(()=>b.setAttribute("value",E()))},T),ne(P,V(()=>({"aria-multiselectable":a()?"true":void 0}),{get"aria-label"(){return e.label()},class:"max-h-56 overflow-y-auto p-1","on:mousedown":b=>b.preventDefault()}),!1,!0),v(P,C(Te,{get each(){return f()},children:(b,z)=>{let ae=()=>a()?b.value!==null&&x().includes(b.value):b.value===_();return(()=>{var G=p(wt),Oe=G.firstChild,Ve=Oe.nextSibling,[se,je]=R(Ve.nextSibling);return M(G,"mouseenter",()=>m(z())),M(G,"click",()=>xe(b.value)),v(Oe,()=>b.label),v(G,C(X,{get when(){return ae()},get children(){return C(Ut,{})}}),se,je),re(Q=>{var We=ae()?"true":"false",Je=b.label,Ue=le("flex w-full cursor-pointer items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-left text-sm",z()===H()&&"bg-accent text-accent-foreground",b.value===null&&!ae()&&"text-muted-foreground");return We!==Q.e&&W(G,"aria-selected",Q.e=We),Je!==Q.t&&W(G,"aria-label",Q.t=Je),Ue!==Q.a&&ge(G,Q.a=Ue),Q},{e:void 0,t:void 0,a:void 0}),G})()}}),Se,Ae),v(P,C(X,{get when(){return O()},get fallback(){return C(X,{get when(){return f().length===0},get children(){return p(_t)}})},get children(){var b=p(pt),z=b.firstChild,ae=z.nextSibling,[G,Oe]=R(ae.nextSibling),Ve=G.nextSibling;return M(b,"mouseenter",()=>m(f().length)),M(b,"click",()=>$e(E().trim())),v(b,()=>E().trim(),G,Oe),re(se=>{var je=`Create ${E().trim()}`,Q=le("flex w-full cursor-pointer rounded-sm px-2 py-1.5 text-left text-sm",H()===f().length&&"bg-accent text-accent-foreground");return je!==se.e&&W(b,"aria-label",se.e=je),Q!==se.t&&ge(b,se.t=Q),se},{e:void 0,t:void 0}),b}}),ke,U),M(me,"click",fe),v(me,()=>e.children),v(g,C(X,{get when(){return a()},get children(){var b=p(xt),z=b.firstChild;return M(z,"click",()=>de()),M(z,"mousedown",ae=>ae.preventDefault()),b}}),De,Ee),re(()=>W(T,"aria-label",e.label()?`Search ${e.label()}`:"Search options")),re(()=>ve(T,"value",E())),ie(),g})();return queueMicrotask(()=>K?.focus({preventScroll:!0})),u}),(()=>{var t=p(kt),u=t.firstChild,g=u.firstChild,A=g.firstChild,T=A.nextSibling,[P,j]=R(T.nextSibling),Se=g.nextSibling,[Ae,Pe]=R(Se.nextSibling);ne(t,V(()=>e.attrs(),{get class(){return e.cls}},()=>({"aria-busy":e.busy()?"true":void 0,"aria-description":e.unavailable()??void 0})),!1,!0);var ke=N;return typeof ke=="function"?oe(ke,u):N=u,M(g,"keydown",w),M(g,"click",()=>{S()?a()?de():Y():pe()}),v(A,ee),v(g,C(Jt,{}),P,j),v(u,C(X,{get when(){return Z()},get children(){return p(St)}}),Ae,Pe),re(U=>{var me=e.label(),Ce=S()?"true":"false",De=I(),Ee=le("truncate",_()===null&&"text-muted-foreground");return me!==U.e&&W(g,"aria-label",U.e=me),Ce!==U.t&&W(g,"aria-expanded",U.t=Ce),De!==U.a&&ve(g,"disabled",U.a=De),Ee!==U.o&&ge(A,U.o=Ee),U},{e:void 0,t:void 0,a:void 0,o:void 0}),ie(),t})()}var Yt=["January","February","March","April","May","June","July","August","September","October","November","December"],Qt=["S","M","T","W","T","F","S"],st=e=>String(e).padStart(2,"0"),mt=(e,o,i)=>`${e}-${st(o)}-${st(i)}`;function Xt(e,o){let i=-new Date(e,o-1,1).getDay(),l=Math.ceil((-i+new Date(e,o,0).getDate())/7)*7;return Array.from({length:l},(a,n)=>{let c=new Date(e,o-1,1+i+n);return{iso:mt(c.getFullYear(),c.getMonth()+1,c.getDate()),day:c.getDate(),inMonth:c.getMonth()===o-1}})}function Zt(e){let o=()=>e.authored(),i=()=>ye(o().min),l=()=>ye(o().max),a=()=>{let m=e.value();return typeof m=="string"?e.valueType()==="timestamp"?m.slice(0,10):m:null},[n,c]=te(!1),[d,r]=te(null),s,_,D=new Date,S=mt(D.getFullYear(),D.getMonth()+1,D.getDate()),J=()=>{let m=d();if(m)return m;let h=/^(\d{4})-(\d{2})/.exec(a()??"");return h?{y:Number(h[1]),m:Number(h[2])}:{y:D.getFullYear(),m:D.getMonth()+1}},E=m=>{let h=i(),k=l();return h!==void 0&&m<h||k!==void 0&&m>k},F=m=>{let h=J().m+m;r({y:J().y+Math.floor((h-1)/12),m:(h-1+12)%12+1})},H=m=>{e.change(m),e.commit(),c(!1)};return dt(()=>n(),()=>s,()=>_,()=>c(!1)),ut(()=>n()&&!e.disabled(),()=>s,()=>{let m=ct(s);return(()=>{var h=p(Ot),k=h.firstChild,x=k.firstChild,Z=x.firstChild,[I,L]=R(Z.nextSibling),N=I.nextSibling,$=N.nextSibling,[K,B]=R($.nextSibling),f=x.nextSibling,O=f.firstChild,ee=O.nextSibling,q=k.nextSibling,Y=q.firstChild,[be,de]=R(Y.nextSibling),fe=be.nextSibling,[pe,xe]=R(fe.nextSibling),$e=q.nextSibling,[Le,we]=R($e.nextSibling),_e=_;return typeof _e=="function"?oe(_e,h):_=h,ne(h,V({get"aria-label"(){return Ie(()=>!!e.label())()?`${e.label()} calendar`:"calendar"}},()=>({"data-theme":m.dataTheme}),{get class(){return le(m.className,ft.replace("bg-popover","bg-popover p-3"))},"on:keydown":w=>{w.key==="Escape"&&(w.preventDefault(),w.stopPropagation(),c(!1))}}),!1,!0),v(x,()=>Yt[J().m-1],I,L),v(x,()=>J().y,K,B),M(O,"click",()=>F(-1)),v(O,()=>at("m15 18-6-6 6-6")),M(ee,"click",()=>F(1)),v(ee,()=>at("m9 18 6-6-6-6")),v(q,C(Te,{each:Qt,children:w=>(()=>{var t=p(jt);return v(t,w),t})()}),be,de),v(q,C(Te,{get each(){return Xt(J().y,J().m)},children:w=>{let t=()=>a()===w.iso;return(()=>{var u=p(Mt);return M(u,"click",()=>H(w.iso)),v(u,()=>w.day),re(g=>{var A=w.iso,T=t()?"true":"false",P=E(w.iso),j=le("flex size-8 items-center justify-center rounded-sm text-sm tabular-nums transition-colors",t()?"bg-primary font-medium text-primary-foreground":"hover:bg-accent hover:text-accent-foreground",!w.inMonth&&!t()&&"text-muted-foreground/50",!t()&&w.iso===S&&"font-semibold text-primary",E(w.iso)&&"cursor-not-allowed opacity-30 hover:bg-transparent");return A!==g.e&&W(u,"aria-label",g.e=A),T!==g.t&&W(u,"aria-pressed",g.t=T),P!==g.a&&ve(u,"disabled",g.a=P),j!==g.o&&ge(u,g.o=j),g},{e:void 0,t:void 0,a:void 0,o:void 0}),u})()}}),pe,xe),v(h,C(X,{get when(){return o().nullable===!0||!E(S)},get children(){var w=p(Et),t=w.firstChild,[u,g]=R(t.nextSibling),A=u.nextSibling,[T,P]=R(A.nextSibling);return v(w,C(X,{get when(){return o().nullable===!0},get fallback(){return p(Nt)},get children(){var j=p(Ct);return M(j,"click",()=>H(null)),j}}),u,g),v(w,C(X,{get when(){return!E(S)},get children(){var j=p(Dt);return M(j,"click",()=>H(S)),j}}),T,P),w}}),Le,we),ie(),h})()},256),(()=>{var m=p(Tt),h=m.firstChild,k=h.firstChild,x=k.firstChild,Z=x.nextSibling,[I,L]=R(Z.nextSibling);ne(m,V(()=>e.attrs(),{get class(){return e.cls}},()=>({"aria-busy":e.busy()?"true":void 0,"aria-description":e.unavailable()??void 0})),!1,!0);var N=s;return typeof N=="function"?oe(N,h):s=h,M(k,"keydown",$=>{$.key==="Escape"&&c(!1)}),M(k,"click",()=>{r(null),c(!n())}),v(x,()=>a()??"Pick a date"),v(k,C(Gt,{}),I,L),re($=>{var K=e.label(),B=n()?"true":"false",f=e.disabled(),O=le("truncate",a()===null&&"text-muted-foreground");return K!==$.e&&W(k,"aria-label",$.e=K),B!==$.t&&W(k,"aria-expanded",$.t=B),f!==$.a&&ve(k,"disabled",$.a=f),O!==$.o&&ge(x,$.o=O),$},{e:void 0,t:void 0,a:void 0,o:void 0}),ie(),m})()}function en(e){let o=()=>{let r=e.value();return r===null?"":String(r)},i=r=>{if(!r.validity.valid){r.reportValidity();return}let s=e.sessions.get(e.identity);if(!(!s||s.phase!=="editing"&&s.phase!=="error")){if(e.authored().type==="number"){let _=s.draft===""||s.draft===null?null:Number(s.draft);if(_!==null&&!Number.isFinite(_))return;e.sessions.change(e.identity,_)}e.commit()}},l=r=>{let s=r.currentTarget;e.change(e.tag==="select"?e.typed(s.value):s.value)},a=r=>{r.validity.valid&&setTimeout(()=>{r.isConnected&&i(r)},0)},n=r=>{let s=r.currentTarget;r.key==="Escape"?(r.preventDefault(),e.cancel(),s.blur()):r.key==="Enter"&&!(e.tag==="textarea"&&r.shiftKey)&&(r.preventDefault(),i(s))},c=()=>({...e.attrs(),"aria-label":e.label(),"aria-description":e.reason()??void 0,class:e.cls}),d=r=>ce(()=>{let s=o();r.value!==s&&(r.value=s),r instanceof HTMLInputElement&&r.setAttribute("value",s)});return e.tag==="select"?(()=>{var r=p(Lt);return oe(s=>queueMicrotask(()=>d(s)),r),ne(r,V(c,{get disabled(){return e.disabled()},get"on:focus"(){return e.begin},"on:change":s=>{l(s),i(s.currentTarget)},"on:blur":s=>a(s.currentTarget),"on:keydown":n}),!1,!0),v(r,()=>e.children),ie(),r})():e.tag==="textarea"?(()=>{var r=p(At);return ne(r,V(c,{get disabled(){return e.disabled()}},()=>({"prop:value":o()}),{get"on:focus"(){return e.begin},"on:input":l,"on:blur":s=>a(s.currentTarget),"on:keydown":n}),!1,!0),v(r,()=>Me(o)),ie(),r})():(()=>{var r=p(Pt);return oe(d,r),ne(r,V(c,{get value(){return o()},get disabled(){return e.disabled()},get"on:focus"(){return e.begin},"on:input":l,"on:blur":s=>a(s.currentTarget),"on:keydown":n}),!1,!1),ie(),r})()}export{Mn as CellControl,zt as cellAttrs};
1
+ import{a as ot}from"./chunk-5e05b99cb275660b.js";import{a as Ze,b as rt,c as Ke}from"./chunk-8a5671e74f9b2466.js";import{v as tt}from"./chunk-cf6a60ba490f3515.js";import"./chunk-a4866c30bdb9375b.js";import{a as nt,b as he}from"./chunk-8426c32d0201eda6.js";import"./chunk-5ad7185e3c58e3d1.js";import{a as et}from"./chunk-3ee47a6fd7b65a6d.js";import"./chunk-5de75caaf78870a0.js";import"./chunk-dd593b723712ff5e.js";import"./chunk-be4d193df7d4144e.js";import"./chunk-f3978ee5975e9bfa.js";import"./chunk-25503ca584cd62bc.js";import{d as Ye,h as Fe,i as Qe,j as Xe}from"./chunk-d924d4620b11b893.js";import{b as qe}from"./chunk-f9e82ddaac694d1e.js";import"./chunk-8f85f5a5c4820f2b.js";import{b as He}from"./chunk-6c38a77acb85dcf8.js";import{a as Ie,c as y,e as ve,f as W,i as ge,j as M,n as ne,o as oe,p as v,q as p,s as R,t as ie,w as ze}from"./chunk-e3951c3b89c87427.js";import{e as te,g as re,h as ce,i as Re,k as Me,l as Ge,n as Ne,u as C,v as V,y as Te,z as X}from"./chunk-26bc72c61d8ecfe4.js";import"./chunk-71e9c1cf64534cc0.js";function it(){let e=new Map,o=new Set,i=()=>{for(let n of[...o])n()},l=(n,c)=>{e.set(n,Object.freeze(c)),i()},a=n=>{e.delete(n)&&i()};return{get:n=>e.get(n),subscribe(n){return o.add(n),()=>{o.delete(n)}},begin(n,c,d){e.has(n)||l(n,{draft:c,original:c,row:Object.freeze({...d}),phase:"editing",error:null})},change(n,c){let d=e.get(n);!d||d.phase==="pending"||d.phase==="saved"||Object.is(d.draft,c)&&d.phase==="editing"||l(n,{...d,draft:c,phase:"editing",error:null})},cancel:a,async commit(n,c){let d=e.get(n);if(!d||d.phase==="pending"||d.phase==="saved")return;if(Object.is(d.draft,d.original)){a(n);return}let r={...d,phase:"pending",error:null};l(n,r);try{await c(r.draft,r.original,r.row),e.get(n)===r&&l(n,{...r,phase:"saved"})}catch(s){e.get(n)===r&&l(n,{...r,phase:"error",error:s instanceof Error?s.message:String(s)})}},reconcile(n,c){let d=e.get(n);d?.phase==="saved"&&Object.is(d.draft,c)&&a(n)}}}var gt=y('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="size-4 shrink-0 opacity-50"aria-hidden=true><path d="m6 9 6 6 6-6">'),bt=y('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="size-3.5 shrink-0"aria-hidden=true><path d="M20 6 9 17l-5-5">'),vt=y('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="size-3.5 shrink-0 opacity-50"aria-hidden=true><path d="M8 2v4"></path><path d="M16 2v4"></path><rect width=18 height=18 x=3 y=4 rx=2></rect><path d="M3 10h18">'),ht=y('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4 aria-hidden=true><path>'),yt=y("<span role=alert class=mx-write-error>"),pt=y("<button type=button role=option aria-selected=false>Create \u201C<!$><!/>\u201D"),xt=y('<div class="flex justify-end border-t border-border p-1.5"><button type=button aria-label=Done class="rounded-sm px-2 py-1 text-sm font-medium hover:bg-accent">Done'),$t=y('<div><div class="border-b border-border p-1.5"><input type=text role=searchbox placeholder="Type to filter\u2026"class="h-8 w-full min-w-36 rounded-sm border border-input bg-background px-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/50"></div><div role=listbox><!$><!/><!$><!/></div><div class="border-t border-border p-1.5"></div><!$><!/>'),wt=y("<button type=button role=option><span class=truncate></span><!$><!/>"),_t=y('<div role=status class="px-2 py-3 text-center text-sm text-muted-foreground">No matches'),St=y("<span role=alert>Expected a JSON array of strings."),kt=y('<div><div class="relative min-w-0"><button type=button aria-haspopup=listbox class="inline-flex w-full items-center justify-between gap-2 rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 h-8 min-w-0 border border-transparent bg-transparent px-2 hover:border-border hover:bg-muted/60"><span></span><!$><!/></button><!$><!/>'),Ct=y('<button type=button class="rounded-sm px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground">Clear'),Dt=y('<button type=button class="rounded-sm px-1.5 py-0.5 text-primary transition-colors hover:bg-accent">Today'),Et=y('<div class="mt-2 flex items-center justify-between border-t border-border pt-2 text-sm"><!$><!/><!$><!/>'),Ot=y('<div role=dialog><div class="flex items-center justify-between"><span class="px-1 text-sm font-medium"><!$><!/> <!$><!/></span><span class="flex items-center gap-1"><button type=button aria-label="Previous month"class="flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"></button><button type=button aria-label="Next month"class="flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"></button></span></div><div class="mt-2 grid grid-cols-7 gap-y-0.5"><!$><!/><!$><!/></div><!$><!/>'),jt=y('<span aria-hidden=true class="flex size-8 items-center justify-center text-[11px] font-medium uppercase text-muted-foreground">'),Mt=y("<button type=button>"),Nt=y("<span>"),Tt=y('<div><div class="relative w-full min-w-0"><button type=button aria-haspopup=dialog class="inline-flex items-center justify-between rounded-md text-sm tabular-nums transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 h-8 w-full min-w-0 gap-1 border border-transparent bg-transparent px-1 hover:border-border hover:bg-muted/60"><span></span><!$><!/>'),Lt=y("<select>"),At=y("<textarea>"),Pt=y("<input>"),Rt=e=>typeof e=="string"&&e.length<=256&&!/[\u0000-\u001f]/.test(e)||typeof e=="number"&&Number.isFinite(e),It=["for","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","aria-details","aria-errormessage","aria-flowto","headers","list","form"];function zt(e,o,i){let l=ot(e,o,null);if(!i?.owner)return l;let a=Rt(i.key)?i.key:void 0,n=["table",i.owner,typeof a,a??["index",i.index],i.column],c=d=>i.ids.includes(d);l.id&&(a!==void 0&&Object.assign(l,nt(i.owner,{kind:"table",rowKey:a,columnKey:i.column,templateNodeId:l.id})),l.id=he(n,l.id));for(let d of It){let r=l[d];r!==void 0&&(l[d]=r.split(/\s+/).map(s=>c(s)?he(n,s):s).join(" "))}for(let[d,r]of Object.entries(l))d==="href"&&r.startsWith("#")&&c(r.slice(1))?l[d]=`#${he(n,r.slice(1))}`:/^url\(#[^)]+\)$/.test(r)&&c(r.slice(5,-1))&&(l[d]=`url(#${he(n,r.slice(5,-1))})`);return l}var lt=new WeakMap,Ft=e=>{let o=lt.get(e);return o||lt.set(e,o=it()),o},Ht=e=>Object.fromEntries(Object.entries(e).filter(o=>{let i=o[1];return i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"&&Number.isFinite(i)})),ye=e=>typeof e=="string"?e:void 0,le=(...e)=>e.filter(Boolean).join(" ");function Kt(e,o){if(typeof e=="string"&&Fe(e)){let[i,l]=o?.columns??[];return o&&i?o.rows.map(a=>{let n=String(a[i.name]??"");return{value:n,label:l?String(a[l.name]??n):n}}):[]}return Array.isArray(e)?e.map(i=>typeof i=="object"&&i!==null?{value:String(i.value??""),label:String(i.label??i.value??"")}:{value:String(i),label:String(i)}):[]}var ue=e=>{if(!e)return[];try{let o=JSON.parse(e);if(Array.isArray(o)&&o.every(i=>typeof i=="string"))return[...new Set(o)]}catch{}return null},Bt=["--background","--foreground","--popover","--popover-foreground","--primary","--primary-foreground","--muted","--muted-foreground","--accent","--accent-foreground","--border","--input","--ring","--radius","--font-body","--font-mono"],Vt=e=>e.closest("dialog")??e.ownerDocument.body;function ct(e){let o=e.closest("[data-theme], .dark, .light");return{dataTheme:o?.dataset.theme,className:le(o?.classList.contains("dark")&&"dark",o?.classList.contains("light")&&"light")||void 0}}function Wt(e,o,i){let l=e.ownerDocument.defaultView,a=()=>{let n=l.getComputedStyle(e);for(let D of Bt){let S=n.getPropertyValue(D);S?o.style.setProperty(D,S):o.style.removeProperty(D)}Object.assign(o.style,{fontFamily:n.fontFamily,colorScheme:n.colorScheme,direction:n.direction});let c=e.getBoundingClientRect(),d=Math.min(i??Math.max(c.width,200),l.innerWidth-16),r=o.getBoundingClientRect().height,s=l.innerHeight-c.bottom-12,_=s>=r||s>=c.top-12?c.bottom+4:c.top-r-4;Object.assign(o.style,{position:"fixed",zIndex:"50",width:`${d}px`,left:`${Math.max(8,Math.min(c.left,l.innerWidth-d-8))}px`,top:`${Math.max(8,Math.min(_,l.innerHeight-r-8))}px`,maxHeight:`${l.innerHeight-16}px`,overflowY:"auto"})};return a(),l.addEventListener("resize",a),e.ownerDocument.addEventListener("scroll",a,!0),()=>{l.removeEventListener("resize",a),e.ownerDocument.removeEventListener("scroll",a,!0)}}function ut(e,o,i,l){ce(()=>{let a=o();if(!e()||!a)return;let n=Me(i);Vt(a).append(n);let c=Wt(a,n,l);Ne(()=>{c(),n.remove()})})}var dt=(e,o,i,l)=>{let a=et(e,l,o,i);ce(Ge(e,n=>{n&&a()}))},Jt=()=>p(gt),Ut=()=>p(bt),Gt=()=>p(vt),at=e=>(()=>{var o=p(ht),i=o.firstChild;return W(i,"d",e),o})();var ft="rounded-md border border-border bg-popover text-popover-foreground shadow-md";function Mn(e){let o=He(),i=o.store(),l=Ft(o),{row:a,cell:n}=e,c=Re(()=>Object.fromEntries(Object.entries(e.p).map(([f,O])=>[f,(f==="args"||f==="set")&&O&&typeof O=="object"?Qe(O,a):qe(O,a)]))),d=JSON.stringify([n.table,typeof n.key,n.key,n.column,e.path]),r=()=>c().value??null,s=rt(()=>o.mutationUnavailable(e.run),{value:Ke}),[_,D]=te(0);ze||Ne(l.subscribe(()=>D(f=>f+1)));let S=()=>(_(),l.get(d));ce(()=>{S()?.phase,l.reconcile(d,r())});let J=()=>s()===null,E=()=>{let f=S();return f?f.draft:r()},F=()=>S()?.phase==="pending"||S()?.phase==="saved",H=()=>!J()||F()||c().disabled===!0,m=()=>Ze(s()),h=()=>l.begin(d,r(),Ht(a)),k=()=>l.cancel(d),x=f=>{h(),l.change(d,f)},Z=()=>{let f=o.viewer();return f&&"id"in f?f.id:null},I=()=>{if(!J()||!i)return;let f=c().args,O=f&&typeof f=="object"?Xe(f,ee=>ee===Ye?Z():i.getValue(ee)):{};l.commit(d,(ee,q,Y)=>i.mutate(e.run,{...O,_value:ee},{...Y}))},L=()=>ye(c()["aria-label"])??ye(c().label)??`${n.column} ${String(n.key)}`,N=()=>o.tableSnapshot(n.data)?.columns.find(f=>f.name===e.field)?.type,$=f=>f===null?null:N()==="number"?f===""?null:Number(f):N()==="boolean"?f==="true":f,K=()=>zt(e.attrs,a,n),B=()=>e.tag==="Select"?C(qt,V(()=>({authored:c,label:L,value:E,session:S,disabled:H,busy:F,unavailable:s,change:x,commit:I,cancel:k,begin:h,typed:$,valueType:N,attrs:K,cls:e.cls,cell:n,field:e.field}),{get children(){return e.children}})):e.tag==="DatePicker"?C(Zt,V(()=>({authored:c,label:L,value:E,disabled:H,busy:F,unavailable:s,change:x,commit:I,valueType:N,attrs:K,cls:e.cls}))):C(en,V(()=>({tag:e.tag,authored:c,label:L,value:E,disabled:H,reason:m,begin:h,change:x,commit:I,cancel:k,typed:$,attrs:K,cls:e.cls,sessions:l,identity:d}),{get children(){return e.children}}));return C(tt,{get reason(){return m()},fullWidth:!0,get children(){return[Ie(()=>B()),C(X,{get when(){return S()?.error},children:f=>(()=>{var O=p(yt);return v(O,f),O})()})]}})}function qt(e){let o=He(),i=o.store(),l=()=>e.authored(),a=()=>e.valueType()!=="user"&&l().multiple===!0,n=()=>e.valueType()!=="user"&&l().allowCreate===!0,c=()=>ye(l().placeholder)??"None",[d,r]=te(i?.getState().userOptions);i&&!ze&&Ne(i.subscribe(()=>r(()=>i.getState().userOptions)));let s=Re(()=>{let t=e.valueType()==="user",u,g=l().options;if(g===void 0&&t)u=d()?.[`${e.cell.data}.${e.field}`]??[];else{let T=Fe(g),P=T?o.table(T):void 0;u=Kt(g,P),t&&(!P||P.columns.length===1)&&(u=u.map(j=>({...j,label:j.label===j.value?o.people()[j.value]?.name??j.label:j.label})))}let A=l().exclude;return A===void 0?u:u.filter(T=>T.value!==String(A))}),_=()=>{let t=e.value();return t===null?null:String(t)},D=()=>{let t=e.session();return t?t.draft===null?null:String(t.draft):void 0},[S,J]=te(!1),[E,F]=te(""),[H,m]=te(-1),[h,k]=te(ue(Me(_))??[]),x=()=>D()===void 0?h():ue(D())??[],Z=()=>a()&&(ue(_())===null||D()!==void 0&&ue(D())===null),I=()=>e.disabled()||Z(),L=!1,N,$,K,B=()=>[...!a()&&l().nullable===!0?[{value:null,label:c()}]:[],...s(),...a()?x().filter(t=>!s().some(u=>u.value===t)).map(t=>({value:t,label:t})):[]],f=()=>{let t=E().trim().toLocaleLowerCase();return t?B().filter(u=>u.label.toLocaleLowerCase().includes(t)||u.value!==null&&u.value.toLocaleLowerCase().includes(t)):B()},O=()=>a()&&n()&&!!E().trim()&&!B().some(t=>t.value===E().trim()),ee=()=>{if(a()){let u=ue(_())??[];return u.length?u.map(g=>s().find(A=>A.value===g)?.label??g).join(", "):c()}let t=_();return t===null?c():s().find(u=>u.value===t)?.label??t},q=t=>{L=t,J(t),t&&e.begin()},Y=(t=!0)=>{q(!1),F(""),m(-1),t&&N?.querySelector("button")?.focus()},be=t=>{let u=[...new Set(t)];D()===void 0&&k(u),e.change(JSON.stringify(u))},de=(t=!0)=>{if(I()||!L)return;L=!1;let u=JSON.stringify(x());e.change(e.typed(u)),e.commit(),Y(t)},fe=()=>{L&&(L=!1,e.cancel(),Y())};ce(()=>{(Z()||l().disabled===!0||e.unavailable()!==null&&e.unavailable()!==Ke)&&L&&q(!1)});let pe=()=>{I()||S()||(a()&&D()===void 0&&k(ue(_())??[]),q(!0),F(""),m(-1))},xe=t=>{if(!I()){if(a()&&t!==null){be(x().includes(t)?x().filter(u=>u!==t):[...x(),t]),F(""),m(-1),K?.focus();return}e.change(e.typed(t)),e.commit(),L=!1,Y()}},$e=t=>{x().includes(t)||be([...x(),t]),F(""),m(-1)},Le=t=>m(u=>Math.max(0,Math.min(f().length+(O()?1:0)-1,u+t))),we=t=>B().some(u=>u.label.toLocaleLowerCase().includes(t)||u.value!==null&&u.value.toLocaleLowerCase().includes(t)),_e=t=>{if(t.key==="Escape"){t.preventDefault(),t.stopPropagation(),fe();return}t.key==="ArrowDown"||t.key==="ArrowUp"?(t.preventDefault(),Le(t.key==="ArrowDown"?1:-1)):t.key==="Enter"&&H()>=0&&f()[H()]?(t.preventDefault(),xe(f()[H()].value)):t.key==="Enter"&&a()&&n()&&E().trim()&&(t.preventDefault(),$e(E().trim()))},w=t=>{if(t.key==="Escape"){t.preventDefault(),t.stopPropagation(),fe();return}if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),pe(),m(t.key==="ArrowDown"?0:Math.max(0,B().length-1));return}I()||t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&(t.preventDefault(),a()&&D()===void 0&&k(ue(_())??[]),q(!0),F(t.key),m(we(t.key.toLocaleLowerCase())?0:-1))};return dt(()=>S(),()=>N,()=>$,()=>a()?de(!1):Y(!1)),ut(()=>S(),()=>N,()=>{let t=ct(N),u=(()=>{var g=p($t),A=g.firstChild,T=A.firstChild,P=A.nextSibling,j=P.firstChild,[Se,Ae]=R(j.nextSibling),Pe=Se.nextSibling,[ke,U]=R(Pe.nextSibling),me=P.nextSibling,Ce=me.nextSibling,[De,Ee]=R(Ce.nextSibling),Be=$;return typeof Be=="function"?oe(Be,g):$=g,ne(g,V(()=>({"data-theme":t.dataTheme}),{get class(){return le(t.className,ft)},"on:focusout":b=>{if(!L)return;let z=b.relatedTarget;z&&($?.contains(z)||N?.contains(z))||(a()?de(!1):Y(!1))},"on:keydown":b=>{b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),fe())}}),!1,!0),M(T,"keydown",_e),M(T,"input",b=>{let z=b.currentTarget.value;F(z),m(we(z.trim().toLocaleLowerCase())?0:-1)}),oe(b=>{K=b,ce(()=>b.setAttribute("value",E()))},T),ne(P,V(()=>({"aria-multiselectable":a()?"true":void 0}),{get"aria-label"(){return e.label()},class:"max-h-56 overflow-y-auto p-1","on:mousedown":b=>b.preventDefault()}),!1,!0),v(P,C(Te,{get each(){return f()},children:(b,z)=>{let ae=()=>a()?b.value!==null&&x().includes(b.value):b.value===_();return(()=>{var G=p(wt),Oe=G.firstChild,Ve=Oe.nextSibling,[se,je]=R(Ve.nextSibling);return M(G,"mouseenter",()=>m(z())),M(G,"click",()=>xe(b.value)),v(Oe,()=>b.label),v(G,C(X,{get when(){return ae()},get children(){return C(Ut,{})}}),se,je),re(Q=>{var We=ae()?"true":"false",Je=b.label,Ue=le("flex w-full cursor-pointer items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-left text-sm",z()===H()&&"bg-accent text-accent-foreground",b.value===null&&!ae()&&"text-muted-foreground");return We!==Q.e&&W(G,"aria-selected",Q.e=We),Je!==Q.t&&W(G,"aria-label",Q.t=Je),Ue!==Q.a&&ge(G,Q.a=Ue),Q},{e:void 0,t:void 0,a:void 0}),G})()}}),Se,Ae),v(P,C(X,{get when(){return O()},get fallback(){return C(X,{get when(){return f().length===0},get children(){return p(_t)}})},get children(){var b=p(pt),z=b.firstChild,ae=z.nextSibling,[G,Oe]=R(ae.nextSibling),Ve=G.nextSibling;return M(b,"mouseenter",()=>m(f().length)),M(b,"click",()=>$e(E().trim())),v(b,()=>E().trim(),G,Oe),re(se=>{var je=`Create ${E().trim()}`,Q=le("flex w-full cursor-pointer rounded-sm px-2 py-1.5 text-left text-sm",H()===f().length&&"bg-accent text-accent-foreground");return je!==se.e&&W(b,"aria-label",se.e=je),Q!==se.t&&ge(b,se.t=Q),se},{e:void 0,t:void 0}),b}}),ke,U),M(me,"click",fe),v(me,()=>e.children),v(g,C(X,{get when(){return a()},get children(){var b=p(xt),z=b.firstChild;return M(z,"click",()=>de()),M(z,"mousedown",ae=>ae.preventDefault()),b}}),De,Ee),re(()=>W(T,"aria-label",e.label()?`Search ${e.label()}`:"Search options")),re(()=>ve(T,"value",E())),ie(),g})();return queueMicrotask(()=>K?.focus({preventScroll:!0})),u}),(()=>{var t=p(kt),u=t.firstChild,g=u.firstChild,A=g.firstChild,T=A.nextSibling,[P,j]=R(T.nextSibling),Se=g.nextSibling,[Ae,Pe]=R(Se.nextSibling);ne(t,V(()=>e.attrs(),{get class(){return e.cls}},()=>({"aria-busy":e.busy()?"true":void 0,"aria-description":e.unavailable()??void 0})),!1,!0);var ke=N;return typeof ke=="function"?oe(ke,u):N=u,M(g,"keydown",w),M(g,"click",()=>{S()?a()?de():Y():pe()}),v(A,ee),v(g,C(Jt,{}),P,j),v(u,C(X,{get when(){return Z()},get children(){return p(St)}}),Ae,Pe),re(U=>{var me=e.label(),Ce=S()?"true":"false",De=I(),Ee=le("truncate",_()===null&&"text-muted-foreground");return me!==U.e&&W(g,"aria-label",U.e=me),Ce!==U.t&&W(g,"aria-expanded",U.t=Ce),De!==U.a&&ve(g,"disabled",U.a=De),Ee!==U.o&&ge(A,U.o=Ee),U},{e:void 0,t:void 0,a:void 0,o:void 0}),ie(),t})()}var Yt=["January","February","March","April","May","June","July","August","September","October","November","December"],Qt=["S","M","T","W","T","F","S"],st=e=>String(e).padStart(2,"0"),mt=(e,o,i)=>`${e}-${st(o)}-${st(i)}`;function Xt(e,o){let i=-new Date(e,o-1,1).getDay(),l=Math.ceil((-i+new Date(e,o,0).getDate())/7)*7;return Array.from({length:l},(a,n)=>{let c=new Date(e,o-1,1+i+n);return{iso:mt(c.getFullYear(),c.getMonth()+1,c.getDate()),day:c.getDate(),inMonth:c.getMonth()===o-1}})}function Zt(e){let o=()=>e.authored(),i=()=>ye(o().min),l=()=>ye(o().max),a=()=>{let m=e.value();return typeof m=="string"?e.valueType()==="timestamp"?m.slice(0,10):m:null},[n,c]=te(!1),[d,r]=te(null),s,_,D=new Date,S=mt(D.getFullYear(),D.getMonth()+1,D.getDate()),J=()=>{let m=d();if(m)return m;let h=/^(\d{4})-(\d{2})/.exec(a()??"");return h?{y:Number(h[1]),m:Number(h[2])}:{y:D.getFullYear(),m:D.getMonth()+1}},E=m=>{let h=i(),k=l();return h!==void 0&&m<h||k!==void 0&&m>k},F=m=>{let h=J().m+m;r({y:J().y+Math.floor((h-1)/12),m:(h-1+12)%12+1})},H=m=>{e.change(m),e.commit(),c(!1)};return dt(()=>n(),()=>s,()=>_,()=>c(!1)),ut(()=>n()&&!e.disabled(),()=>s,()=>{let m=ct(s);return(()=>{var h=p(Ot),k=h.firstChild,x=k.firstChild,Z=x.firstChild,[I,L]=R(Z.nextSibling),N=I.nextSibling,$=N.nextSibling,[K,B]=R($.nextSibling),f=x.nextSibling,O=f.firstChild,ee=O.nextSibling,q=k.nextSibling,Y=q.firstChild,[be,de]=R(Y.nextSibling),fe=be.nextSibling,[pe,xe]=R(fe.nextSibling),$e=q.nextSibling,[Le,we]=R($e.nextSibling),_e=_;return typeof _e=="function"?oe(_e,h):_=h,ne(h,V({get"aria-label"(){return Ie(()=>!!e.label())()?`${e.label()} calendar`:"calendar"}},()=>({"data-theme":m.dataTheme}),{get class(){return le(m.className,ft.replace("bg-popover","bg-popover p-3"))},"on:keydown":w=>{w.key==="Escape"&&(w.preventDefault(),w.stopPropagation(),c(!1))}}),!1,!0),v(x,()=>Yt[J().m-1],I,L),v(x,()=>J().y,K,B),M(O,"click",()=>F(-1)),v(O,()=>at("m15 18-6-6 6-6")),M(ee,"click",()=>F(1)),v(ee,()=>at("m9 18 6-6-6-6")),v(q,C(Te,{each:Qt,children:w=>(()=>{var t=p(jt);return v(t,w),t})()}),be,de),v(q,C(Te,{get each(){return Xt(J().y,J().m)},children:w=>{let t=()=>a()===w.iso;return(()=>{var u=p(Mt);return M(u,"click",()=>H(w.iso)),v(u,()=>w.day),re(g=>{var A=w.iso,T=t()?"true":"false",P=E(w.iso),j=le("flex size-8 items-center justify-center rounded-sm text-sm tabular-nums transition-colors",t()?"bg-primary font-medium text-primary-foreground":"hover:bg-accent hover:text-accent-foreground",!w.inMonth&&!t()&&"text-muted-foreground/50",!t()&&w.iso===S&&"font-semibold text-primary",E(w.iso)&&"cursor-not-allowed opacity-30 hover:bg-transparent");return A!==g.e&&W(u,"aria-label",g.e=A),T!==g.t&&W(u,"aria-pressed",g.t=T),P!==g.a&&ve(u,"disabled",g.a=P),j!==g.o&&ge(u,g.o=j),g},{e:void 0,t:void 0,a:void 0,o:void 0}),u})()}}),pe,xe),v(h,C(X,{get when(){return o().nullable===!0||!E(S)},get children(){var w=p(Et),t=w.firstChild,[u,g]=R(t.nextSibling),A=u.nextSibling,[T,P]=R(A.nextSibling);return v(w,C(X,{get when(){return o().nullable===!0},get fallback(){return p(Nt)},get children(){var j=p(Ct);return M(j,"click",()=>H(null)),j}}),u,g),v(w,C(X,{get when(){return!E(S)},get children(){var j=p(Dt);return M(j,"click",()=>H(S)),j}}),T,P),w}}),Le,we),ie(),h})()},256),(()=>{var m=p(Tt),h=m.firstChild,k=h.firstChild,x=k.firstChild,Z=x.nextSibling,[I,L]=R(Z.nextSibling);ne(m,V(()=>e.attrs(),{get class(){return e.cls}},()=>({"aria-busy":e.busy()?"true":void 0,"aria-description":e.unavailable()??void 0})),!1,!0);var N=s;return typeof N=="function"?oe(N,h):s=h,M(k,"keydown",$=>{$.key==="Escape"&&c(!1)}),M(k,"click",()=>{r(null),c(!n())}),v(x,()=>a()??"Pick a date"),v(k,C(Gt,{}),I,L),re($=>{var K=e.label(),B=n()?"true":"false",f=e.disabled(),O=le("truncate",a()===null&&"text-muted-foreground");return K!==$.e&&W(k,"aria-label",$.e=K),B!==$.t&&W(k,"aria-expanded",$.t=B),f!==$.a&&ve(k,"disabled",$.a=f),O!==$.o&&ge(x,$.o=O),$},{e:void 0,t:void 0,a:void 0,o:void 0}),ie(),m})()}function en(e){let o=()=>{let r=e.value();return r===null?"":String(r)},i=r=>{if(!r.validity.valid){r.reportValidity();return}let s=e.sessions.get(e.identity);if(!(!s||s.phase!=="editing"&&s.phase!=="error")){if(e.authored().type==="number"){let _=s.draft===""||s.draft===null?null:Number(s.draft);if(_!==null&&!Number.isFinite(_))return;e.sessions.change(e.identity,_)}e.commit()}},l=r=>{let s=r.currentTarget;e.change(e.tag==="select"?e.typed(s.value):s.value)},a=r=>{r.validity.valid&&setTimeout(()=>{r.isConnected&&i(r)},0)},n=r=>{let s=r.currentTarget;r.key==="Escape"?(r.preventDefault(),e.cancel(),s.blur()):r.key==="Enter"&&!(e.tag==="textarea"&&r.shiftKey)&&(r.preventDefault(),i(s))},c=()=>({...e.attrs(),"aria-label":e.label(),"aria-description":e.reason()??void 0,class:e.cls}),d=r=>ce(()=>{let s=o();r.value!==s&&(r.value=s),r instanceof HTMLInputElement&&r.setAttribute("value",s)});return e.tag==="select"?(()=>{var r=p(Lt);return oe(s=>queueMicrotask(()=>d(s)),r),ne(r,V(c,{get disabled(){return e.disabled()},get"on:focus"(){return e.begin},"on:change":s=>{l(s),i(s.currentTarget)},"on:blur":s=>a(s.currentTarget),"on:keydown":n}),!1,!0),v(r,()=>e.children),ie(),r})():e.tag==="textarea"?(()=>{var r=p(At);return ne(r,V(c,{get disabled(){return e.disabled()}},()=>({"prop:value":o()}),{get"on:focus"(){return e.begin},"on:input":l,"on:blur":s=>a(s.currentTarget),"on:keydown":n}),!1,!0),v(r,()=>Me(o)),ie(),r})():(()=>{var r=p(Pt);return oe(d,r),ne(r,V(c,{get value(){return o()},get disabled(){return e.disabled()},get"on:focus"(){return e.begin},"on:input":l,"on:blur":s=>a(s.currentTarget),"on:keydown":n}),!1,!1),ie(),r})()}export{Mn as CellControl,zt as cellAttrs};
@@ -1 +1 @@
1
- import{c as Se}from"./chunk-cbdf5c4f9c5093ea.js";import{a as we}from"./chunk-3ee47a6fd7b65a6d.js";import{g as _e,h as le}from"./chunk-e817ee4addba2d95.js";import"./chunk-8f85f5a5c4820f2b.js";import{b as z}from"./chunk-6c38a77acb85dcf8.js";import{a as q,c as v,e as O,f as _,i as J,j,m as Y,n as I,o as B,p as m,q as g,s as S,t as H,y as ye}from"./chunk-e3951c3b89c87427.js";import{e as ce,g as M,h as pe,k as $e,u as b,v as A,y as ee,z as F}from"./chunk-26bc72c61d8ecfe4.js";import"./chunk-71e9c1cf64534cc0.js";var Ge=v("<span>"),Ue=v('<span class="ml-auto normal-case tracking-normal tabular-nums text-foreground">'),Ke=v('<span class="flex items-baseline gap-3 text-[11px] font-medium uppercase tracking-wider text-muted-foreground"><!$><!/><!$><!/>'),Qe=v("<div><!$><!/><!$><!/>"),Ne=v("<textarea>"),Me=v("<input>"),Xe=v('<div role=group class="inline-flex w-fit items-center gap-0.5 rounded-md border border-input bg-muted/40 p-0.5 shadow-xs">'),Oe=v("<button type=button>"),Ze=v("<button type=button role=switch><span aria-hidden=true>"),et=v('<input type=range class="h-1.5 w-44 cursor-pointer appearance-none rounded-full bg-border disabled:cursor-not-allowed disabled:opacity-50 [&amp;::-webkit-slider-thumb]:size-4 [&amp;::-webkit-slider-thumb]:appearance-none [&amp;::-webkit-slider-thumb]:rounded-full [&amp;::-webkit-slider-thumb]:bg-primary [&amp;::-webkit-slider-thumb]:shadow-sm [&amp;::-moz-range-thumb]:size-4 [&amp;::-moz-range-thumb]:rounded-full [&amp;::-moz-range-thumb]:border-0 [&amp;::-moz-range-thumb]:bg-primary">'),tt=v('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="size-4 shrink-0 opacity-50"aria-hidden=true><path d="M8 2v4"></path><path d="M16 2v4"></path><rect width=18 height=18 x=3 y=4 rx=2></rect><path d="M3 10h18">'),nt=v('<div class="mt-2 flex items-center justify-between border-t border-border pt-2 text-sm"><span></span><button type=button class="rounded-sm px-1.5 py-0.5 text-primary transition-colors hover:bg-accent">Today'),rt=v('<div role=dialog class="rounded-md border border-border bg-popover p-3 text-popover-foreground shadow-md"style=position:fixed;z-index:50;width:256px><div class="flex items-center justify-between"><span class="px-1 text-sm font-medium"><!$><!/> <!$><!/></span><span class="flex items-center gap-1"><button type=button aria-label="Previous month"class="flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground">\u2039</button><button type=button aria-label="Next month"class="flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground">\u203A</button></span></div><div class="mt-2 grid grid-cols-7 gap-y-0.5"><!$><!/><!$><!/></div><!$><!/>'),ot=v('<div class=relative><button type=button aria-haspopup=dialog class="inline-flex items-center justify-between rounded-md text-sm tabular-nums transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 h-9 w-40 gap-2 border border-input bg-background px-3 shadow-xs hover:bg-muted/40"><span></span><!$><!/></button><!$><!/>'),at=v('<span aria-hidden=true class="flex size-8 items-center justify-center text-[11px] font-medium uppercase text-muted-foreground">'),lt=v("<option value>All"),it=v("<select><!$><!/><!$><!/><!$><!/>"),st=v("<option>"),V=(...e)=>e.filter(Boolean).join(" "),C=e=>typeof e=="string"?e:void 0,ze=e=>typeof e=="string"&&!le(e)?e:typeof e=="number"?String(e):null,w=(e,r="value")=>typeof e[r]=="string"?le(e[r]):null,ie=(e,r="value")=>{let n=w(e,r);return n?z().value(n):e[r]},te=(e,r="value")=>{let n=w(e,r);return!!n&&Object.hasOwn(z().values(),n)&&e.disabled!==!0},ut="mx-control relative inline-flex flex-col gap-1.5 align-top",ke="w-full rounded-md border border-input bg-background px-3 text-sm text-foreground shadow-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",dt=new Set(["label","placeholder","className","value","options","multiple","allowCreate","valueFormat","checked","min","max","step","format","prefix","suffix","disabled","children","data"]);function ct(e,r=[]){let n=new Set([...dt,...r]);return Object.fromEntries(Object.entries(e).filter(([o])=>!n.has(o)))}function ne(e){return(()=>{var r=g(Qe),n=r.firstChild,[o,u]=S(n.nextSibling),l=o.nextSibling,[t,a]=S(l.nextSibling);return I(r,A(()=>ct(e.authored,e.extra),{get class(){return V(ut,C(e.authored.className))}}),!1,!0),m(r,b(F,{get when(){return e.authored.label||e.trailing},get children(){var d=g(Ke),s=d.firstChild,[p,N]=S(s.nextSibling),D=p.nextSibling,[c,P]=S(D.nextSibling);return m(d,b(F,{get when(){return e.authored.label},get children(){var $=g(Ge);return m($,()=>C(e.authored.label)),$}}),p,N),m(d,b(F,{get when(){return e.trailing},get children(){var $=g(Ue);return m($,()=>e.trailing),$}}),c,P),d}}),o,u),m(r,()=>e.children,t,a),H(),r})()}var mt=new Set(["text","number","email","url","search","password"]);function Pe(e){let r=z(),n=()=>w(e)?String(ie(e)??""):ze(e.value)??"",u={"aria-label":C(e["aria-label"])??C(e.label),placeholder:C(e.placeholder),required:e.required===!0||void 0,autofocus:e.autoFocus===!0||void 0,disabled:!te(e),readOnly:!w(e)||void 0},l=t=>{let a=w(e);a&&r.setValue(a,t.target.value,{debounce:!0})};return b(ne,{authored:e,extra:["type","required","autoFocus","rows","readOnly","name","run","aria-label","multiline"],get children(){return q(()=>!!e.multiline)()?(()=>{var t=g(Ne);return I(t,A(u,()=>({"prop:value":n()}),{get textContent(){return $e(n)},"on:input":l,get rows(){return q(()=>typeof e.rows=="number")()?e.rows:3},get class(){return V(ke,"min-w-64 resize-y py-2 leading-normal")}}),!1,!1),H(),t})():(()=>{var t=g(Me);return B(a=>a.setAttribute("value",n()),t),I(t,A(u,{get value(){return n()},"on:input":l,get type(){return q(()=>!!(typeof e.type=="string"&&mt.has(e.type)))()?e.type:"text"},get min(){return e.min},get max(){return e.max},get step(){return e.step},get class(){return V(ke,"h-9 min-w-48",e.type==="number"&&"tabular-nums")}}),!1,!1),H(),t})()}})}var Rt=e=>b(Pe,e),qt=e=>b(Pe,A(e,{multiline:!0}));function ft(e,r){if(typeof e=="string"&&le(e)){let[n,o]=r?.columns??[];return r&&n?r.rows.map(u=>({value:String(u[n.name]??""),label:String(u[o?.name??n.name]??u[n.name]??"")})):[]}return Array.isArray(e)?e.map(n=>typeof n=="object"&&n!==null?{value:String(n.value??""),label:String(n.label??n.value??"")}:{value:String(n),label:String(n)}):[]}function gt(e){let r=w(e,"options");return ft(e.options,r?z().table(r):void 0)}var bt=e=>{let r=w(e);return!!r&&z().nullable(r)},me=e=>w(e)?ie(e)==null?null:String(ie(e)):ze(e.value);function Jt(e){let r=z(),n=()=>[...bt(e)?[{value:null,label:C(e.placeholder)??"All"}]:[],...gt(e)];return b(ne,{authored:e,get children(){var o=g(Xe);return m(o,b(ee,{get each(){return n()},children:u=>(()=>{var l=g(Oe);return j(l,"click",()=>{let t=w(e);t&&r.setValue(t,u.value,void 0)}),m(l,()=>u.label),M(t=>{var a=u.value===me(e),d=!te(e),s=V("h-8 rounded-[5px] px-3 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",u.value===me(e)?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground");return a!==t.e&&_(l,"aria-pressed",t.e=a),d!==t.t&&O(l,"disabled",t.t=d),s!==t.a&&J(l,t.a=s),t},{e:void 0,t:void 0,a:void 0}),l})()})),M(()=>_(o,"aria-label",C(e.label))),o}})}function Yt(e){let r=z(),n=()=>{let o=w(e,"checked"),u=o?r.value(o):e.checked;return u===!0||u==="true"};return b(ne,{authored:e,get children(){var o=g(Ze),u=o.firstChild;return j(o,"click",()=>{let l=w(e,"checked");l&&r.setValue(l,!n(),void 0)}),M(l=>{var t=C(e.label),a=n(),d=!te(e,"checked"),s=V("inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",n()?"bg-primary":"bg-input"),p=V("block size-4 rounded-full bg-background shadow-sm transition-transform",n()?"translate-x-[18px]":"translate-x-0.5");return t!==l.e&&_(o,"aria-label",l.e=t),a!==l.t&&_(o,"aria-checked",l.t=a),d!==l.a&&O(o,"disabled",l.a=d),s!==l.o&&J(o,l.o=s),p!==l.i&&J(u,l.i=p),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),o}})}function Wt(e){let r=z(),n=typeof e.min=="number"?e.min:0,o=typeof e.max=="number"?e.max:100,u=()=>{if(!w(e))return typeof e.value=="number"?e.value:null;let t=ie(e);return t==null?null:Number(t)},l=()=>{let t=u();if(t==null||Number.isNaN(t))return"\u2014";let a=String(t),d=C(e.format);if(d)try{a=Se(d)(t)}catch{}return`${C(e.prefix)??""}${a}${C(e.suffix)??""}`};return b(ne,{authored:e,get trailing(){return l()},get children(){var t=g(et);return j(t,"input",a=>{let d=w(e);d&&r.setValue(d,Number(a.currentTarget.value),void 0)}),B(a=>a.setAttribute("value",String(u()??n)),t),_(t,"min",n),_(t,"max",o),M(a=>{var d=C(e.label),s=typeof e.step=="number"?e.step:void 0,p=!te(e),N=!w(e)||void 0;return d!==a.e&&_(t,"aria-label",a.e=d),s!==a.t&&_(t,"step",a.t=s),p!==a.a&&O(t,"disabled",a.a=p),N!==a.o&&O(t,"readOnly",a.o=N),a},{e:void 0,t:void 0,a:void 0,o:void 0}),M(()=>O(t,"value",u()??n)),t}})}var vt=()=>g(tt),ht=["January","February","March","April","May","June","July","August","September","October","November","December"],xt=["S","M","T","W","T","F","S"],Ce=e=>String(e).padStart(2,"0"),je=e=>`${e.getFullYear()}-${Ce(e.getMonth()+1)}-${Ce(e.getDate())}`;function pt(e,r){let n=-new Date(e,r-1,1).getDay(),o=Math.ceil((-n+new Date(e,r,0).getDate())/7)*7;return Array.from({length:o},(u,l)=>{let t=new Date(e,r-1,1+n+l);return{date:je(t),day:t.getDate(),inMonth:t.getMonth()===r-1}})}function Gt(e){let r=z(),[n,o]=ce(!1),[u,l]=ce(null),t=()=>me(e),a=new Date,d=je(a),s=()=>u()??(/^\d{4}-\d{2}-\d{2}$/.test(t()??"")?{y:Number(t().slice(0,4)),m:Number(t().slice(5,7))}:{y:a.getFullYear(),m:a.getMonth()+1}),p=h=>typeof e.min=="string"&&h<e.min||typeof e.max=="string"&&h>e.max,N=h=>{let x=w(e);x&&r.setValue(x,h,void 0),o(!1)},D=h=>{let x=s().m+h;l({y:s().y+Math.floor((x-1)/12),m:(x-1+12)%12+1})},c,P,$,L=we(n,()=>o(!1),()=>P,()=>$);return b(ne,{authored:e,get children(){var h=g(ot),x=h.firstChild,W=x.firstChild,se=W.nextSibling,[ue,de]=S(se.nextSibling),re=x.nextSibling,[T,R]=S(re.nextSibling),fe=c;typeof fe=="function"?B(fe,h):c=h,j(x,"click",()=>{l(null),n()||L(),o(!n())});var ge=P;return typeof ge=="function"?B(ge,x):P=x,m(W,()=>t()??"Pick a date"),m(x,vt,ue,de),m(h,b(F,{get when(){return n()},get children(){return b(ye,{get mount(){return c.ownerDocument.body},get children(){var f=g(rt),G=f.firstChild,E=G.firstChild,oe=E.firstChild,[U,De]=S(oe.nextSibling),Te=U.nextSibling,Ae=Te.nextSibling,[Ve,Ee]=S(Ae.nextSibling),Fe=E.nextSibling,be=Fe.firstChild,Ie=be.nextSibling,ae=G.nextSibling,Be=ae.firstChild,[ve,He]=S(Be.nextSibling),Le=ve.nextSibling,[Re,qe]=S(Le.nextSibling),Je=ae.nextSibling,[Ye,We]=S(Je.nextSibling),he=$;return typeof he=="function"?B(he,f):$=f,m(E,()=>ht[s().m-1],U,De),m(E,()=>s().y,Ve,Ee),j(be,"click",()=>D(-1)),j(Ie,"click",()=>D(1)),m(ae,b(ee,{each:xt,children:i=>(()=>{var y=g(at);return m(y,i),y})()}),ve,He),m(ae,b(ee,{get each(){return pt(s().y,s().m)},children:i=>(()=>{var y=g(Oe);return j(y,"click",()=>N(i.date)),m(y,()=>i.day),M(k=>{var K=i.date,Q=i.date===t(),X=p(i.date),Z=V("flex size-8 items-center justify-center rounded-sm text-sm tabular-nums transition-colors",i.date===t()?"bg-primary font-medium text-primary-foreground":"hover:bg-accent hover:text-accent-foreground",!i.inMonth&&i.date!==t()&&"text-muted-foreground/50",i.date===d&&i.date!==t()&&"font-semibold text-primary",p(i.date)&&"cursor-not-allowed opacity-30 hover:bg-transparent");return K!==k.e&&_(y,"aria-label",k.e=K),Q!==k.t&&_(y,"aria-pressed",k.t=Q),X!==k.a&&O(y,"disabled",k.a=X),Z!==k.o&&J(y,k.o=Z),k},{e:void 0,t:void 0,a:void 0,o:void 0}),y})()}),Re,qe),m(f,b(F,{get when(){return!p(d)},get children(){var i=g(nt),y=i.firstChild,k=y.nextSibling;return j(k,"click",()=>N(d)),i}}),Ye,We),M(i=>{var y=e.label?`${e.label} calendar`:"calendar",k=c.closest("[data-theme]")?.dataset.theme,K=`${c.getBoundingClientRect().left}px`,Q=`${c.getBoundingClientRect().bottom+4}px`,X=getComputedStyle(c).getPropertyValue("--popover"),Z=getComputedStyle(c).getPropertyValue("--popover-foreground"),xe=getComputedStyle(c).getPropertyValue("--border");return y!==i.e&&_(f,"aria-label",i.e=y),k!==i.t&&_(f,"data-theme",i.t=k),K!==i.a&&Y(f,"left",i.a=K),Q!==i.o&&Y(f,"top",i.o=Q),X!==i.i&&Y(f,"--popover",i.i=X),Z!==i.n&&Y(f,"--popover-foreground",i.n=Z),xe!==i.s&&Y(f,"--border",i.s=xe),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),f}})}}),T,R),M(f=>{var G=C(e.label),E=n(),oe=!te(e),U=V("truncate",t()===null&&"text-muted-foreground");return G!==f.e&&_(x,"aria-label",f.e=G),E!==f.t&&_(x,"aria-expanded",f.t=E),oe!==f.a&&O(x,"disabled",f.a=oe),U!==f.o&&J(W,f.o=U),f},{e:void 0,t:void 0,a:void 0,o:void 0}),h}})}function Ut(e){let r=z(),{tag:n,bind:o,children:u,...l}=e,t=o?.value??o?.checked,a=()=>t?r.value(t):e.value,d=s=>{if(!t)return;let p=s.currentTarget,N=r.valueType(t);r.setValue(t,o?.checked?p.checked:_e(N,p.value),n==="select"||o?.checked?void 0:{debounce:!0})};if(n==="select"){let s=()=>o?.options?r.table(o.options):void 0,p=()=>{let c=o?.value;return!!c&&r.nullable(c)},N=()=>{let c=s(),[P,$]=c?.columns??[];return c&&P?c.rows.map(L=>{let h=String(L[P.name]??"");return{value:h,label:$?String(L[$.name]??h):h}}):[]},D;return pe(()=>{N(),D.value=String(a()??"")}),(()=>{var c=g(it),P=c.firstChild,[$,L]=S(P.nextSibling),h=$.nextSibling,[x,W]=S(h.nextSibling),se=x.nextSibling,[ue,de]=S(se.nextSibling),re=D;return typeof re=="function"?B(re,c):D=c,I(c,A(l,{onChange:d}),!1,!0),m(c,b(F,{get when(){return q(()=>!!s())()&&p()},get children(){var T=g(lt);return M(()=>O(T,"selected",a()==null)),T}}),$,L),m(c,b(ee,{get each(){return N()},children:T=>(()=>{var R=g(st);return m(R,()=>T.label),M(()=>O(R,"selected",T.value===String(a()??""))),M(()=>O(R,"value",T.value)),R})()}),x,W),m(c,u,ue,de),H(),c})()}return n==="textarea"?(()=>{var s=g(Ne);return I(s,A(l,{get value(){return String(a()??"")},onInput:d}),!1,!0),m(s,u),H(),s})():(()=>{var s=g(Me);return I(s,A(l,{get value(){return String(a()??"")},get checked(){return q(()=>!!o?.checked)()?a()===!0:void 0},onInput:d,get onChange(){return o?.checked?d:void 0}}),!1,!1),H(),s})()}export{Ut as BoundNative,Gt as DatePicker,Rt as Input,Jt as Segmented,Wt as Slider,Yt as Switch,qt as Textarea};
1
+ import{c as Se}from"./chunk-cbdf5c4f9c5093ea.js";import{a as we}from"./chunk-3ee47a6fd7b65a6d.js";import{g as _e,h as le}from"./chunk-d924d4620b11b893.js";import"./chunk-8f85f5a5c4820f2b.js";import{b as z}from"./chunk-6c38a77acb85dcf8.js";import{a as q,c as v,e as O,f as _,i as J,j,m as Y,n as I,o as B,p as m,q as g,s as S,t as H,y as ye}from"./chunk-e3951c3b89c87427.js";import{e as ce,g as M,h as pe,k as $e,u as b,v as A,y as ee,z as F}from"./chunk-26bc72c61d8ecfe4.js";import"./chunk-71e9c1cf64534cc0.js";var Ge=v("<span>"),Ue=v('<span class="ml-auto normal-case tracking-normal tabular-nums text-foreground">'),Ke=v('<span class="flex items-baseline gap-3 text-[11px] font-medium uppercase tracking-wider text-muted-foreground"><!$><!/><!$><!/>'),Qe=v("<div><!$><!/><!$><!/>"),Ne=v("<textarea>"),Me=v("<input>"),Xe=v('<div role=group class="inline-flex w-fit items-center gap-0.5 rounded-md border border-input bg-muted/40 p-0.5 shadow-xs">'),Oe=v("<button type=button>"),Ze=v("<button type=button role=switch><span aria-hidden=true>"),et=v('<input type=range class="h-1.5 w-44 cursor-pointer appearance-none rounded-full bg-border disabled:cursor-not-allowed disabled:opacity-50 [&amp;::-webkit-slider-thumb]:size-4 [&amp;::-webkit-slider-thumb]:appearance-none [&amp;::-webkit-slider-thumb]:rounded-full [&amp;::-webkit-slider-thumb]:bg-primary [&amp;::-webkit-slider-thumb]:shadow-sm [&amp;::-moz-range-thumb]:size-4 [&amp;::-moz-range-thumb]:rounded-full [&amp;::-moz-range-thumb]:border-0 [&amp;::-moz-range-thumb]:bg-primary">'),tt=v('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="size-4 shrink-0 opacity-50"aria-hidden=true><path d="M8 2v4"></path><path d="M16 2v4"></path><rect width=18 height=18 x=3 y=4 rx=2></rect><path d="M3 10h18">'),nt=v('<div class="mt-2 flex items-center justify-between border-t border-border pt-2 text-sm"><span></span><button type=button class="rounded-sm px-1.5 py-0.5 text-primary transition-colors hover:bg-accent">Today'),rt=v('<div role=dialog class="rounded-md border border-border bg-popover p-3 text-popover-foreground shadow-md"style=position:fixed;z-index:50;width:256px><div class="flex items-center justify-between"><span class="px-1 text-sm font-medium"><!$><!/> <!$><!/></span><span class="flex items-center gap-1"><button type=button aria-label="Previous month"class="flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground">\u2039</button><button type=button aria-label="Next month"class="flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground">\u203A</button></span></div><div class="mt-2 grid grid-cols-7 gap-y-0.5"><!$><!/><!$><!/></div><!$><!/>'),ot=v('<div class=relative><button type=button aria-haspopup=dialog class="inline-flex items-center justify-between rounded-md text-sm tabular-nums transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 h-9 w-40 gap-2 border border-input bg-background px-3 shadow-xs hover:bg-muted/40"><span></span><!$><!/></button><!$><!/>'),at=v('<span aria-hidden=true class="flex size-8 items-center justify-center text-[11px] font-medium uppercase text-muted-foreground">'),lt=v("<option value>All"),it=v("<select><!$><!/><!$><!/><!$><!/>"),st=v("<option>"),V=(...e)=>e.filter(Boolean).join(" "),C=e=>typeof e=="string"?e:void 0,ze=e=>typeof e=="string"&&!le(e)?e:typeof e=="number"?String(e):null,w=(e,r="value")=>typeof e[r]=="string"?le(e[r]):null,ie=(e,r="value")=>{let n=w(e,r);return n?z().value(n):e[r]},te=(e,r="value")=>{let n=w(e,r);return!!n&&Object.hasOwn(z().values(),n)&&e.disabled!==!0},ut="mx-control relative inline-flex flex-col gap-1.5 align-top",ke="w-full rounded-md border border-input bg-background px-3 text-sm text-foreground shadow-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",dt=new Set(["label","placeholder","className","value","options","multiple","allowCreate","valueFormat","checked","min","max","step","format","prefix","suffix","disabled","children","data"]);function ct(e,r=[]){let n=new Set([...dt,...r]);return Object.fromEntries(Object.entries(e).filter(([o])=>!n.has(o)))}function ne(e){return(()=>{var r=g(Qe),n=r.firstChild,[o,u]=S(n.nextSibling),l=o.nextSibling,[t,a]=S(l.nextSibling);return I(r,A(()=>ct(e.authored,e.extra),{get class(){return V(ut,C(e.authored.className))}}),!1,!0),m(r,b(F,{get when(){return e.authored.label||e.trailing},get children(){var d=g(Ke),s=d.firstChild,[p,N]=S(s.nextSibling),D=p.nextSibling,[c,P]=S(D.nextSibling);return m(d,b(F,{get when(){return e.authored.label},get children(){var $=g(Ge);return m($,()=>C(e.authored.label)),$}}),p,N),m(d,b(F,{get when(){return e.trailing},get children(){var $=g(Ue);return m($,()=>e.trailing),$}}),c,P),d}}),o,u),m(r,()=>e.children,t,a),H(),r})()}var mt=new Set(["text","number","email","url","search","password"]);function Pe(e){let r=z(),n=()=>w(e)?String(ie(e)??""):ze(e.value)??"",u={"aria-label":C(e["aria-label"])??C(e.label),placeholder:C(e.placeholder),required:e.required===!0||void 0,autofocus:e.autoFocus===!0||void 0,disabled:!te(e),readOnly:!w(e)||void 0},l=t=>{let a=w(e);a&&r.setValue(a,t.target.value,{debounce:!0})};return b(ne,{authored:e,extra:["type","required","autoFocus","rows","readOnly","name","run","aria-label","multiline"],get children(){return q(()=>!!e.multiline)()?(()=>{var t=g(Ne);return I(t,A(u,()=>({"prop:value":n()}),{get textContent(){return $e(n)},"on:input":l,get rows(){return q(()=>typeof e.rows=="number")()?e.rows:3},get class(){return V(ke,"min-w-64 resize-y py-2 leading-normal")}}),!1,!1),H(),t})():(()=>{var t=g(Me);return B(a=>a.setAttribute("value",n()),t),I(t,A(u,{get value(){return n()},"on:input":l,get type(){return q(()=>!!(typeof e.type=="string"&&mt.has(e.type)))()?e.type:"text"},get min(){return e.min},get max(){return e.max},get step(){return e.step},get class(){return V(ke,"h-9 min-w-48",e.type==="number"&&"tabular-nums")}}),!1,!1),H(),t})()}})}var Rt=e=>b(Pe,e),qt=e=>b(Pe,A(e,{multiline:!0}));function ft(e,r){if(typeof e=="string"&&le(e)){let[n,o]=r?.columns??[];return r&&n?r.rows.map(u=>({value:String(u[n.name]??""),label:String(u[o?.name??n.name]??u[n.name]??"")})):[]}return Array.isArray(e)?e.map(n=>typeof n=="object"&&n!==null?{value:String(n.value??""),label:String(n.label??n.value??"")}:{value:String(n),label:String(n)}):[]}function gt(e){let r=w(e,"options");return ft(e.options,r?z().table(r):void 0)}var bt=e=>{let r=w(e);return!!r&&z().nullable(r)},me=e=>w(e)?ie(e)==null?null:String(ie(e)):ze(e.value);function Jt(e){let r=z(),n=()=>[...bt(e)?[{value:null,label:C(e.placeholder)??"All"}]:[],...gt(e)];return b(ne,{authored:e,get children(){var o=g(Xe);return m(o,b(ee,{get each(){return n()},children:u=>(()=>{var l=g(Oe);return j(l,"click",()=>{let t=w(e);t&&r.setValue(t,u.value,void 0)}),m(l,()=>u.label),M(t=>{var a=u.value===me(e),d=!te(e),s=V("h-8 rounded-[5px] px-3 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",u.value===me(e)?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground");return a!==t.e&&_(l,"aria-pressed",t.e=a),d!==t.t&&O(l,"disabled",t.t=d),s!==t.a&&J(l,t.a=s),t},{e:void 0,t:void 0,a:void 0}),l})()})),M(()=>_(o,"aria-label",C(e.label))),o}})}function Yt(e){let r=z(),n=()=>{let o=w(e,"checked"),u=o?r.value(o):e.checked;return u===!0||u==="true"};return b(ne,{authored:e,get children(){var o=g(Ze),u=o.firstChild;return j(o,"click",()=>{let l=w(e,"checked");l&&r.setValue(l,!n(),void 0)}),M(l=>{var t=C(e.label),a=n(),d=!te(e,"checked"),s=V("inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",n()?"bg-primary":"bg-input"),p=V("block size-4 rounded-full bg-background shadow-sm transition-transform",n()?"translate-x-[18px]":"translate-x-0.5");return t!==l.e&&_(o,"aria-label",l.e=t),a!==l.t&&_(o,"aria-checked",l.t=a),d!==l.a&&O(o,"disabled",l.a=d),s!==l.o&&J(o,l.o=s),p!==l.i&&J(u,l.i=p),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),o}})}function Wt(e){let r=z(),n=typeof e.min=="number"?e.min:0,o=typeof e.max=="number"?e.max:100,u=()=>{if(!w(e))return typeof e.value=="number"?e.value:null;let t=ie(e);return t==null?null:Number(t)},l=()=>{let t=u();if(t==null||Number.isNaN(t))return"\u2014";let a=String(t),d=C(e.format);if(d)try{a=Se(d)(t)}catch{}return`${C(e.prefix)??""}${a}${C(e.suffix)??""}`};return b(ne,{authored:e,get trailing(){return l()},get children(){var t=g(et);return j(t,"input",a=>{let d=w(e);d&&r.setValue(d,Number(a.currentTarget.value),void 0)}),B(a=>a.setAttribute("value",String(u()??n)),t),_(t,"min",n),_(t,"max",o),M(a=>{var d=C(e.label),s=typeof e.step=="number"?e.step:void 0,p=!te(e),N=!w(e)||void 0;return d!==a.e&&_(t,"aria-label",a.e=d),s!==a.t&&_(t,"step",a.t=s),p!==a.a&&O(t,"disabled",a.a=p),N!==a.o&&O(t,"readOnly",a.o=N),a},{e:void 0,t:void 0,a:void 0,o:void 0}),M(()=>O(t,"value",u()??n)),t}})}var vt=()=>g(tt),ht=["January","February","March","April","May","June","July","August","September","October","November","December"],xt=["S","M","T","W","T","F","S"],Ce=e=>String(e).padStart(2,"0"),je=e=>`${e.getFullYear()}-${Ce(e.getMonth()+1)}-${Ce(e.getDate())}`;function pt(e,r){let n=-new Date(e,r-1,1).getDay(),o=Math.ceil((-n+new Date(e,r,0).getDate())/7)*7;return Array.from({length:o},(u,l)=>{let t=new Date(e,r-1,1+n+l);return{date:je(t),day:t.getDate(),inMonth:t.getMonth()===r-1}})}function Gt(e){let r=z(),[n,o]=ce(!1),[u,l]=ce(null),t=()=>me(e),a=new Date,d=je(a),s=()=>u()??(/^\d{4}-\d{2}-\d{2}$/.test(t()??"")?{y:Number(t().slice(0,4)),m:Number(t().slice(5,7))}:{y:a.getFullYear(),m:a.getMonth()+1}),p=h=>typeof e.min=="string"&&h<e.min||typeof e.max=="string"&&h>e.max,N=h=>{let x=w(e);x&&r.setValue(x,h,void 0),o(!1)},D=h=>{let x=s().m+h;l({y:s().y+Math.floor((x-1)/12),m:(x-1+12)%12+1})},c,P,$,L=we(n,()=>o(!1),()=>P,()=>$);return b(ne,{authored:e,get children(){var h=g(ot),x=h.firstChild,W=x.firstChild,se=W.nextSibling,[ue,de]=S(se.nextSibling),re=x.nextSibling,[T,R]=S(re.nextSibling),fe=c;typeof fe=="function"?B(fe,h):c=h,j(x,"click",()=>{l(null),n()||L(),o(!n())});var ge=P;return typeof ge=="function"?B(ge,x):P=x,m(W,()=>t()??"Pick a date"),m(x,vt,ue,de),m(h,b(F,{get when(){return n()},get children(){return b(ye,{get mount(){return c.ownerDocument.body},get children(){var f=g(rt),G=f.firstChild,E=G.firstChild,oe=E.firstChild,[U,De]=S(oe.nextSibling),Te=U.nextSibling,Ae=Te.nextSibling,[Ve,Ee]=S(Ae.nextSibling),Fe=E.nextSibling,be=Fe.firstChild,Ie=be.nextSibling,ae=G.nextSibling,Be=ae.firstChild,[ve,He]=S(Be.nextSibling),Le=ve.nextSibling,[Re,qe]=S(Le.nextSibling),Je=ae.nextSibling,[Ye,We]=S(Je.nextSibling),he=$;return typeof he=="function"?B(he,f):$=f,m(E,()=>ht[s().m-1],U,De),m(E,()=>s().y,Ve,Ee),j(be,"click",()=>D(-1)),j(Ie,"click",()=>D(1)),m(ae,b(ee,{each:xt,children:i=>(()=>{var y=g(at);return m(y,i),y})()}),ve,He),m(ae,b(ee,{get each(){return pt(s().y,s().m)},children:i=>(()=>{var y=g(Oe);return j(y,"click",()=>N(i.date)),m(y,()=>i.day),M(k=>{var K=i.date,Q=i.date===t(),X=p(i.date),Z=V("flex size-8 items-center justify-center rounded-sm text-sm tabular-nums transition-colors",i.date===t()?"bg-primary font-medium text-primary-foreground":"hover:bg-accent hover:text-accent-foreground",!i.inMonth&&i.date!==t()&&"text-muted-foreground/50",i.date===d&&i.date!==t()&&"font-semibold text-primary",p(i.date)&&"cursor-not-allowed opacity-30 hover:bg-transparent");return K!==k.e&&_(y,"aria-label",k.e=K),Q!==k.t&&_(y,"aria-pressed",k.t=Q),X!==k.a&&O(y,"disabled",k.a=X),Z!==k.o&&J(y,k.o=Z),k},{e:void 0,t:void 0,a:void 0,o:void 0}),y})()}),Re,qe),m(f,b(F,{get when(){return!p(d)},get children(){var i=g(nt),y=i.firstChild,k=y.nextSibling;return j(k,"click",()=>N(d)),i}}),Ye,We),M(i=>{var y=e.label?`${e.label} calendar`:"calendar",k=c.closest("[data-theme]")?.dataset.theme,K=`${c.getBoundingClientRect().left}px`,Q=`${c.getBoundingClientRect().bottom+4}px`,X=getComputedStyle(c).getPropertyValue("--popover"),Z=getComputedStyle(c).getPropertyValue("--popover-foreground"),xe=getComputedStyle(c).getPropertyValue("--border");return y!==i.e&&_(f,"aria-label",i.e=y),k!==i.t&&_(f,"data-theme",i.t=k),K!==i.a&&Y(f,"left",i.a=K),Q!==i.o&&Y(f,"top",i.o=Q),X!==i.i&&Y(f,"--popover",i.i=X),Z!==i.n&&Y(f,"--popover-foreground",i.n=Z),xe!==i.s&&Y(f,"--border",i.s=xe),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),f}})}}),T,R),M(f=>{var G=C(e.label),E=n(),oe=!te(e),U=V("truncate",t()===null&&"text-muted-foreground");return G!==f.e&&_(x,"aria-label",f.e=G),E!==f.t&&_(x,"aria-expanded",f.t=E),oe!==f.a&&O(x,"disabled",f.a=oe),U!==f.o&&J(W,f.o=U),f},{e:void 0,t:void 0,a:void 0,o:void 0}),h}})}function Ut(e){let r=z(),{tag:n,bind:o,children:u,...l}=e,t=o?.value??o?.checked,a=()=>t?r.value(t):e.value,d=s=>{if(!t)return;let p=s.currentTarget,N=r.valueType(t);r.setValue(t,o?.checked?p.checked:_e(N,p.value),n==="select"||o?.checked?void 0:{debounce:!0})};if(n==="select"){let s=()=>o?.options?r.table(o.options):void 0,p=()=>{let c=o?.value;return!!c&&r.nullable(c)},N=()=>{let c=s(),[P,$]=c?.columns??[];return c&&P?c.rows.map(L=>{let h=String(L[P.name]??"");return{value:h,label:$?String(L[$.name]??h):h}}):[]},D;return pe(()=>{N(),D.value=String(a()??"")}),(()=>{var c=g(it),P=c.firstChild,[$,L]=S(P.nextSibling),h=$.nextSibling,[x,W]=S(h.nextSibling),se=x.nextSibling,[ue,de]=S(se.nextSibling),re=D;return typeof re=="function"?B(re,c):D=c,I(c,A(l,{onChange:d}),!1,!0),m(c,b(F,{get when(){return q(()=>!!s())()&&p()},get children(){var T=g(lt);return M(()=>O(T,"selected",a()==null)),T}}),$,L),m(c,b(ee,{get each(){return N()},children:T=>(()=>{var R=g(st);return m(R,()=>T.label),M(()=>O(R,"selected",T.value===String(a()??""))),M(()=>O(R,"value",T.value)),R})()}),x,W),m(c,u,ue,de),H(),c})()}return n==="textarea"?(()=>{var s=g(Ne);return I(s,A(l,{get value(){return String(a()??"")},onInput:d}),!1,!0),m(s,u),H(),s})():(()=>{var s=g(Me);return I(s,A(l,{get value(){return String(a()??"")},get checked(){return q(()=>!!o?.checked)()?a()===!0:void 0},onInput:d,get onChange(){return o?.checked?d:void 0}}),!1,!1),H(),s})()}export{Ut as BoundNative,Gt as DatePicker,Rt as Input,Jt as Segmented,Wt as Slider,Yt as Switch,qt as Textarea};