emdash 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1338) hide show
  1. package/dist/action-token-SK8zyN7w.mjs +26 -0
  2. package/dist/action-token-SK8zyN7w.mjs.map +1 -0
  3. package/dist/activation-CGlyigmg.mjs +387 -0
  4. package/dist/activation-CGlyigmg.mjs.map +1 -0
  5. package/dist/adapters-D9a1PfqH.d.mts +173 -0
  6. package/dist/adapters-D9a1PfqH.d.mts.map +1 -0
  7. package/dist/after-32yNRvd2.mjs +99 -0
  8. package/dist/after-32yNRvd2.mjs.map +1 -0
  9. package/dist/allowed-origins-CEug-p0t.mjs +116 -0
  10. package/dist/allowed-origins-CEug-p0t.mjs.map +1 -0
  11. package/dist/api/route-utils.d.mts +4 -4
  12. package/dist/api/route-utils.mjs +52 -53
  13. package/dist/api/route-utils.mjs.map +1 -1
  14. package/dist/api/schemas/index.d.mts +1 -1
  15. package/dist/api/schemas/index.mjs +9 -9
  16. package/dist/api--PYoyeTo.mjs +5098 -0
  17. package/dist/api--PYoyeTo.mjs.map +1 -0
  18. package/dist/api-tokens-DqSlkDVI.mjs +9 -0
  19. package/dist/api-tokens-DqSlkDVI.mjs.map +1 -0
  20. package/dist/api-tokens-GNCsIegW.mjs +173 -0
  21. package/dist/api-tokens-GNCsIegW.mjs.map +1 -0
  22. package/dist/apply-DVnupNeS.mjs +1760 -0
  23. package/dist/apply-DVnupNeS.mjs.map +1 -0
  24. package/dist/approvals-DTtYSB27.mjs +460 -0
  25. package/dist/approvals-DTtYSB27.mjs.map +1 -0
  26. package/dist/artifact-fetch-DIh7iyOV.mjs +659 -0
  27. package/dist/artifact-fetch-DIh7iyOV.mjs.map +1 -0
  28. package/dist/artifacts-Dvdp2KK-.mjs +323 -0
  29. package/dist/artifacts-Dvdp2KK-.mjs.map +1 -0
  30. package/dist/astro/index.d.mts +14 -13
  31. package/dist/astro/index.d.mts.map +1 -1
  32. package/dist/astro/index.mjs +52 -12
  33. package/dist/astro/index.mjs.map +1 -1
  34. package/dist/astro/middleware/auth.d.mts +12 -11
  35. package/dist/astro/middleware/auth.d.mts.map +1 -1
  36. package/dist/astro/middleware/auth.mjs +13 -11
  37. package/dist/astro/middleware/auth.mjs.map +1 -1
  38. package/dist/astro/middleware/media-usage-write-fence.mjs +5 -5
  39. package/dist/astro/middleware/redirect.mjs +17 -17
  40. package/dist/astro/middleware/request-context.mjs +12 -7
  41. package/dist/astro/middleware/request-context.mjs.map +1 -1
  42. package/dist/astro/middleware/setup.mjs +1 -1
  43. package/dist/astro/middleware.d.mts +12 -11
  44. package/dist/astro/middleware.d.mts.map +1 -1
  45. package/dist/astro/middleware.mjs +116 -116
  46. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +13 -13
  47. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +13 -13
  48. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +6 -6
  49. package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -7
  50. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +5 -5
  51. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +15 -15
  52. package/dist/astro/routes/api/admin/byline-fields/index.mjs +15 -15
  53. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +15 -15
  54. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +23 -24
  55. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
  56. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +23 -24
  57. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
  58. package/dist/astro/routes/api/admin/bylines/index.mjs +23 -24
  59. package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
  60. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +19 -19
  61. package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -8
  62. package/dist/astro/routes/api/admin/comments/bulk.mjs +18 -18
  63. package/dist/astro/routes/api/admin/comments/counts.mjs +8 -8
  64. package/dist/astro/routes/api/admin/comments/index.mjs +18 -18
  65. package/dist/astro/routes/api/admin/core-update.mjs +7 -7
  66. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +5 -5
  67. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +4 -4
  68. package/dist/astro/routes/api/admin/media-usage/activation.mjs +20 -20
  69. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +21 -21
  70. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +21 -21
  71. package/dist/astro/routes/api/admin/media-usage/progress.mjs +24 -24
  72. package/dist/astro/routes/api/admin/media-usage/repair.mjs +30 -30
  73. package/dist/astro/routes/api/admin/media-usage/work/index.mjs +21 -21
  74. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +21 -21
  75. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +5 -5
  76. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +5 -5
  77. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +8 -8
  78. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +8 -8
  79. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +74 -75
  80. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
  81. package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +6 -6
  82. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +73 -74
  83. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
  84. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +73 -74
  85. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
  86. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +84 -85
  87. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
  88. package/dist/astro/routes/api/admin/plugins/index.mjs +74 -75
  89. package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
  90. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +6 -6
  91. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +73 -74
  92. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
  93. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +83 -84
  94. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
  95. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +73 -74
  96. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
  97. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +73 -74
  98. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
  99. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +85 -86
  100. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
  101. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +8 -8
  102. package/dist/astro/routes/api/admin/plugins/registry/install.mjs +75 -76
  103. package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
  104. package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +6 -6
  105. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +74 -75
  106. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
  107. package/dist/astro/routes/api/admin/plugins/updates.mjs +73 -74
  108. package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
  109. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +5 -5
  110. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +73 -74
  111. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
  112. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +6 -6
  113. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +73 -74
  114. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
  115. package/dist/astro/routes/api/admin/transfer/_...path_.mjs +3 -3
  116. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +40 -41
  117. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -1
  118. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +40 -41
  119. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
  120. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +42 -43
  121. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
  122. package/dist/astro/routes/api/admin/transfer/capabilities.mjs +42 -43
  123. package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
  124. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +42 -43
  125. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -1
  126. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +43 -44
  127. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -1
  128. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +43 -44
  129. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -1
  130. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +42 -43
  131. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -1
  132. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +43 -44
  133. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
  134. package/dist/astro/routes/api/admin/transfer/exports/index.mjs +44 -45
  135. package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
  136. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +42 -43
  137. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -1
  138. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +42 -43
  139. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -1
  140. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +44 -45
  141. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -1
  142. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +42 -43
  143. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -1
  144. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +44 -45
  145. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -1
  146. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +42 -43
  147. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -1
  148. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +42 -43
  149. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -1
  150. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +44 -45
  151. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -1
  152. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +42 -43
  153. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -1
  154. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +42 -43
  155. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
  156. package/dist/astro/routes/api/admin/transfer/imports/index.mjs +44 -45
  157. package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
  158. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -3
  159. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +3 -3
  160. package/dist/astro/routes/api/admin/users/_id_/index.mjs +13 -13
  161. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +5 -5
  162. package/dist/astro/routes/api/admin/users/index.mjs +13 -13
  163. package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
  164. package/dist/astro/routes/api/auth/handover.mjs +6 -6
  165. package/dist/astro/routes/api/auth/invite/accept.mjs +3 -3
  166. package/dist/astro/routes/api/auth/invite/complete.mjs +19 -19
  167. package/dist/astro/routes/api/auth/invite/index.mjs +15 -15
  168. package/dist/astro/routes/api/auth/invite/register-options.mjs +16 -16
  169. package/dist/astro/routes/api/auth/logout.mjs +4 -4
  170. package/dist/astro/routes/api/auth/magic-link/send.mjs +18 -18
  171. package/dist/astro/routes/api/auth/magic-link/verify.mjs +15 -15
  172. package/dist/astro/routes/api/auth/me.mjs +14 -14
  173. package/dist/astro/routes/api/auth/mode.mjs +4 -4
  174. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +9 -9
  175. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  176. package/dist/astro/routes/api/auth/passkey/_id_.mjs +13 -13
  177. package/dist/astro/routes/api/auth/passkey/index.mjs +3 -3
  178. package/dist/astro/routes/api/auth/passkey/options.mjs +19 -19
  179. package/dist/astro/routes/api/auth/passkey/register/options.mjs +16 -16
  180. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +17 -17
  181. package/dist/astro/routes/api/auth/passkey/verify.mjs +19 -19
  182. package/dist/astro/routes/api/auth/signup/complete.mjs +19 -19
  183. package/dist/astro/routes/api/auth/signup/request.mjs +17 -17
  184. package/dist/astro/routes/api/auth/signup/verify.mjs +3 -3
  185. package/dist/astro/routes/api/calendar.mjs +14 -14
  186. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +14 -14
  187. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +20 -20
  188. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +4 -4
  189. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +18 -18
  190. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +4 -4
  191. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +17 -17
  192. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +5 -5
  193. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +10 -10
  194. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +33 -33
  195. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +18 -18
  196. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +35 -35
  197. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +35 -35
  198. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +5 -5
  199. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +4 -4
  200. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +18 -18
  201. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +26 -26
  202. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +4 -4
  203. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +18 -18
  204. package/dist/astro/routes/api/content/_collection_/_id_.mjs +18 -18
  205. package/dist/astro/routes/api/content/_collection_/authors.mjs +4 -4
  206. package/dist/astro/routes/api/content/_collection_/index.mjs +14 -14
  207. package/dist/astro/routes/api/content/_collection_/trash.mjs +14 -14
  208. package/dist/astro/routes/api/dashboard.mjs +11 -11
  209. package/dist/astro/routes/api/dev/emails.mjs +4 -4
  210. package/dist/astro/routes/api/dev/scheduled-tasks.mjs +112 -112
  211. package/dist/astro/routes/api/health.mjs +5 -5
  212. package/dist/astro/routes/api/import/probe.d.mts +3 -2
  213. package/dist/astro/routes/api/import/probe.d.mts.map +1 -1
  214. package/dist/astro/routes/api/import/probe.mjs +28 -28
  215. package/dist/astro/routes/api/import/wordpress/analyze.d.mts +4 -3
  216. package/dist/astro/routes/api/import/wordpress/analyze.d.mts.map +1 -1
  217. package/dist/astro/routes/api/import/wordpress/analyze.mjs +6 -28
  218. package/dist/astro/routes/api/import/wordpress/analyze.mjs.map +1 -1
  219. package/dist/astro/routes/api/import/wordpress/execute.d.mts +12 -11
  220. package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
  221. package/dist/astro/routes/api/import/wordpress/execute.mjs +26 -27
  222. package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
  223. package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -11
  224. package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -1
  225. package/dist/astro/routes/api/import/wordpress/media.mjs +18 -18
  226. package/dist/astro/routes/api/import/wordpress/prepare.mjs +19 -19
  227. package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
  228. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -12
  229. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -1
  230. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +29 -29
  231. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +28 -28
  232. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +12 -11
  233. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
  234. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +38 -39
  235. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
  236. package/dist/astro/routes/api/manifest.mjs +5 -5
  237. package/dist/astro/routes/api/mcp.mjs +96 -97
  238. package/dist/astro/routes/api/mcp.mjs.map +1 -1
  239. package/dist/astro/routes/api/media/_id_/confirm.mjs +19 -19
  240. package/dist/astro/routes/api/media/_id_/replace.mjs +15 -15
  241. package/dist/astro/routes/api/media/_id_/upload.mjs +8 -8
  242. package/dist/astro/routes/api/media/_id_/usage.mjs +32 -32
  243. package/dist/astro/routes/api/media/_id_.mjs +30 -30
  244. package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +5 -5
  245. package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -1
  246. package/dist/astro/routes/api/media/file/_...key_.mjs +57 -11
  247. package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
  248. package/dist/astro/routes/api/media/folders/_id_.mjs +15 -15
  249. package/dist/astro/routes/api/media/folders/index.mjs +15 -15
  250. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +4 -4
  251. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +4 -4
  252. package/dist/astro/routes/api/media/providers/index.mjs +4 -4
  253. package/dist/astro/routes/api/media/upload-url.mjs +17 -17
  254. package/dist/astro/routes/api/media.mjs +34 -34
  255. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +20 -19
  256. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
  257. package/dist/astro/routes/api/menus/_name_/items.mjs +20 -19
  258. package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
  259. package/dist/astro/routes/api/menus/_name_/reorder.mjs +20 -19
  260. package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
  261. package/dist/astro/routes/api/menus/_name_/translations.mjs +20 -19
  262. package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
  263. package/dist/astro/routes/api/menus/_name_.mjs +20 -19
  264. package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
  265. package/dist/astro/routes/api/menus/index.mjs +20 -19
  266. package/dist/astro/routes/api/menus/index.mjs.map +1 -1
  267. package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
  268. package/dist/astro/routes/api/oauth/device/authorize.mjs +7 -7
  269. package/dist/astro/routes/api/oauth/device/code.mjs +11 -11
  270. package/dist/astro/routes/api/oauth/device/token.mjs +10 -10
  271. package/dist/astro/routes/api/oauth/register.mjs +7 -7
  272. package/dist/astro/routes/api/oauth/token/refresh.mjs +7 -7
  273. package/dist/astro/routes/api/oauth/token/revoke.mjs +7 -7
  274. package/dist/astro/routes/api/oauth/token.d.mts.map +1 -1
  275. package/dist/astro/routes/api/oauth/token.mjs +8 -8
  276. package/dist/astro/routes/api/oauth/token.mjs.map +1 -1
  277. package/dist/astro/routes/api/openapi.json.mjs +20 -20
  278. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +10 -10
  279. package/dist/astro/routes/api/redirects/404s/index.mjs +21 -21
  280. package/dist/astro/routes/api/redirects/404s/summary.mjs +21 -21
  281. package/dist/astro/routes/api/redirects/_id_.mjs +22 -22
  282. package/dist/astro/routes/api/redirects/index.mjs +22 -22
  283. package/dist/astro/routes/api/relations/_id_/index.mjs +35 -35
  284. package/dist/astro/routes/api/relations/index.mjs +35 -35
  285. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +4 -4
  286. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +17 -17
  287. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +73 -74
  288. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -1
  289. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +73 -74
  290. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -1
  291. package/dist/astro/routes/api/schema/block-types/index.mjs +73 -74
  292. package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
  293. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +73 -74
  294. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
  295. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +73 -74
  296. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
  297. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +73 -74
  298. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
  299. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +73 -74
  300. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
  301. package/dist/astro/routes/api/schema/collections/index.mjs +73 -74
  302. package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
  303. package/dist/astro/routes/api/schema/collections/reorder.mjs +73 -74
  304. package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
  305. package/dist/astro/routes/api/schema/index.mjs +17 -17
  306. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +73 -74
  307. package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
  308. package/dist/astro/routes/api/schema/orphans/index.mjs +73 -74
  309. package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
  310. package/dist/astro/routes/api/search/enable.mjs +20 -19
  311. package/dist/astro/routes/api/search/enable.mjs.map +1 -1
  312. package/dist/astro/routes/api/search/index.mjs +19 -18
  313. package/dist/astro/routes/api/search/index.mjs.map +1 -1
  314. package/dist/astro/routes/api/search/rebuild.mjs +20 -19
  315. package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
  316. package/dist/astro/routes/api/search/stats.mjs +10 -9
  317. package/dist/astro/routes/api/search/stats.mjs.map +1 -1
  318. package/dist/astro/routes/api/search/suggest.mjs +19 -18
  319. package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
  320. package/dist/astro/routes/api/sections/_slug_.mjs +19 -18
  321. package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
  322. package/dist/astro/routes/api/sections/index.mjs +19 -18
  323. package/dist/astro/routes/api/sections/index.mjs.map +1 -1
  324. package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
  325. package/dist/astro/routes/api/settings/backups/archives/index.mjs +7 -7
  326. package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
  327. package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
  328. package/dist/astro/routes/api/settings/domain-notify.mjs +9 -9
  329. package/dist/astro/routes/api/settings/domain.mjs +21 -21
  330. package/dist/astro/routes/api/settings/email.mjs +5 -5
  331. package/dist/astro/routes/api/settings.mjs +27 -27
  332. package/dist/astro/routes/api/setup/admin-verify.mjs +22 -22
  333. package/dist/astro/routes/api/setup/admin.mjs +17 -17
  334. package/dist/astro/routes/api/setup/dev-bypass.mjs +45 -46
  335. package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
  336. package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
  337. package/dist/astro/routes/api/setup/index.mjs +51 -52
  338. package/dist/astro/routes/api/setup/index.mjs.map +1 -1
  339. package/dist/astro/routes/api/setup/status.mjs +5 -5
  340. package/dist/astro/routes/api/site/domain-proof.mjs +15 -15
  341. package/dist/astro/routes/api/snapshot.mjs +10 -10
  342. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +25 -25
  343. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +25 -25
  344. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +25 -25
  345. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +25 -25
  346. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +23 -23
  347. package/dist/astro/routes/api/taxonomies/_name_.mjs +25 -25
  348. package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +36 -36
  349. package/dist/astro/routes/api/taxonomies/index.mjs +25 -25
  350. package/dist/astro/routes/api/themes/preview.mjs +7 -7
  351. package/dist/astro/routes/api/typegen.mjs +5 -5
  352. package/dist/astro/routes/api/visual-editing/action-token.mjs +7 -7
  353. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +21 -21
  354. package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +3 -3
  355. package/dist/astro/routes/api/well-known/auth.mjs +1 -1
  356. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
  357. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
  358. package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts.map +1 -1
  359. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +28 -17
  360. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
  361. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts.map +1 -1
  362. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +24 -20
  363. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
  364. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +23 -20
  365. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
  366. package/dist/astro/routes/api/widget-areas/_name_.mjs +13 -10
  367. package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
  368. package/dist/astro/routes/api/widget-areas/index.mjs +23 -20
  369. package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
  370. package/dist/astro/routes/api/widget-components.mjs +4 -4
  371. package/dist/astro/routes/robots.txt.mjs +14 -14
  372. package/dist/astro/routes/sitemap-_collection_.xml.mjs +17 -17
  373. package/dist/astro/routes/sitemap.xml.mjs +15 -15
  374. package/dist/astro/types.d.mts +21 -19
  375. package/dist/astro/types.d.mts.map +1 -1
  376. package/dist/auth/providers/github.d.mts +1 -1
  377. package/dist/auth/providers/google.d.mts +1 -1
  378. package/dist/auth/providers/microsoft.d.mts +1 -1
  379. package/dist/authoritative-records-CQlB3JzE.mjs +5183 -0
  380. package/dist/authoritative-records-CQlB3JzE.mjs.map +1 -0
  381. package/dist/authorize-NJgp8kLI.mjs +74 -0
  382. package/dist/authorize-NJgp8kLI.mjs.map +1 -0
  383. package/dist/backup-8rPSJ28a.mjs +246 -0
  384. package/dist/backup-8rPSJ28a.mjs.map +1 -0
  385. package/dist/block-types-BbOrfnWs.mjs +132 -0
  386. package/dist/block-types-BbOrfnWs.mjs.map +1 -0
  387. package/dist/block-values-Dg0-8PPS.mjs +215 -0
  388. package/dist/block-values-Dg0-8PPS.mjs.map +1 -0
  389. package/dist/byline-DHJS-GGb.mjs +994 -0
  390. package/dist/byline-DHJS-GGb.mjs.map +1 -0
  391. package/dist/byline-fields-CiR8FvvF.mjs +280 -0
  392. package/dist/byline-fields-CiR8FvvF.mjs.map +1 -0
  393. package/dist/byline-fields-D6KYsEa7.mjs +123 -0
  394. package/dist/byline-fields-D6KYsEa7.mjs.map +1 -0
  395. package/dist/bylines-Bsg5cH4S.mjs +234 -0
  396. package/dist/bylines-Bsg5cH4S.mjs.map +1 -0
  397. package/dist/bylines-f_ZEc6Sn.mjs +150 -0
  398. package/dist/bylines-f_ZEc6Sn.mjs.map +1 -0
  399. package/dist/cache-5DHbpEWu.mjs +151 -0
  400. package/dist/cache-5DHbpEWu.mjs.map +1 -0
  401. package/dist/canonical-BudtH-Fx.mjs +174 -0
  402. package/dist/canonical-BudtH-Fx.mjs.map +1 -0
  403. package/dist/capture-triggers-BezAvWcB.mjs +362 -0
  404. package/dist/capture-triggers-BezAvWcB.mjs.map +1 -0
  405. package/dist/challenge-store-B1C0V4b3.mjs +51 -0
  406. package/dist/challenge-store-B1C0V4b3.mjs.map +1 -0
  407. package/dist/checksum-CEqvfxGX.mjs +162 -0
  408. package/dist/checksum-CEqvfxGX.mjs.map +1 -0
  409. package/dist/chrome-tags-BIKBMZYO.mjs +24 -0
  410. package/dist/chrome-tags-BIKBMZYO.mjs.map +1 -0
  411. package/dist/chunks-DiW8VMwz.mjs +25 -0
  412. package/dist/chunks-DiW8VMwz.mjs.map +1 -0
  413. package/dist/cli/index.mjs +52 -53
  414. package/dist/cli/index.mjs.map +1 -1
  415. package/dist/client/index.d.mts +46 -46
  416. package/dist/client/index.mjs +2 -2
  417. package/dist/collection-slugs-cache-DIrLjqH-.mjs +91 -0
  418. package/dist/collection-slugs-cache-DIrLjqH-.mjs.map +1 -0
  419. package/dist/comment-DB74Zpa4.mjs +335 -0
  420. package/dist/comment-DB74Zpa4.mjs.map +1 -0
  421. package/dist/comment-reaction-BScxIWUn.mjs +85 -0
  422. package/dist/comment-reaction-BScxIWUn.mjs.map +1 -0
  423. package/dist/comments-Cor_zKml.mjs +195 -0
  424. package/dist/comments-Cor_zKml.mjs.map +1 -0
  425. package/dist/comments-yiRFx3w5.mjs +99 -0
  426. package/dist/comments-yiRFx3w5.mjs.map +1 -0
  427. package/dist/components-Brp__9xo.mjs +112 -0
  428. package/dist/components-Brp__9xo.mjs.map +1 -0
  429. package/dist/config-D44_8G9J.d.mts +41 -0
  430. package/dist/config-D44_8G9J.d.mts.map +1 -0
  431. package/dist/config-DBU6iUQB.mjs +228 -0
  432. package/dist/config-DBU6iUQB.mjs.map +1 -0
  433. package/dist/config-sDhZvkLR.d.mts +6835 -0
  434. package/dist/config-sDhZvkLR.d.mts.map +1 -0
  435. package/dist/connection-BtEN_lP9.mjs +36 -0
  436. package/dist/connection-BtEN_lP9.mjs.map +1 -0
  437. package/dist/content-BKHUVsE5.mjs +2112 -0
  438. package/dist/content-BKHUVsE5.mjs.map +1 -0
  439. package/dist/content-list-query-ByP4jRpZ.d.mts +26 -0
  440. package/dist/content-list-query-ByP4jRpZ.d.mts.map +1 -0
  441. package/dist/content-policy-BmE0MPZY.mjs +46 -0
  442. package/dist/content-policy-BmE0MPZY.mjs.map +1 -0
  443. package/dist/content-repair-Ukdxoq-R.mjs +442 -0
  444. package/dist/content-repair-Ukdxoq-R.mjs.map +1 -0
  445. package/dist/context-CzjejcsE.mjs +2089 -0
  446. package/dist/context-CzjejcsE.mjs.map +1 -0
  447. package/dist/credits-BKREepht.mjs +110 -0
  448. package/dist/credits-BKREepht.mjs.map +1 -0
  449. package/dist/cron-D7obTIfk.mjs +306 -0
  450. package/dist/cron-D7obTIfk.mjs.map +1 -0
  451. package/dist/dashboard-ynr1qJWM.mjs +168 -0
  452. package/dist/dashboard-ynr1qJWM.mjs.map +1 -0
  453. package/dist/db/index.d.mts +3 -3
  454. package/dist/db/index.mjs +2 -2
  455. package/dist/db/libsql-migrations.d.mts +1 -1
  456. package/dist/db/libsql-migrations.mjs +5 -5
  457. package/dist/db/libsql.d.mts +1 -1
  458. package/dist/db/postgres-migrations.d.mts +1 -1
  459. package/dist/db/postgres-migrations.mjs +5 -5
  460. package/dist/db/postgres.d.mts +1 -1
  461. package/dist/db/sqlite-migrations.d.mts +1 -1
  462. package/dist/db/sqlite-migrations.mjs +5 -5
  463. package/dist/db/sqlite.d.mts +1 -1
  464. package/dist/db/sqlite.mjs +1 -1
  465. package/dist/default-C0W-PhAp.mjs +81 -0
  466. package/dist/default-C0W-PhAp.mjs.map +1 -0
  467. package/dist/deferred-tasks-wlMFJL95.d.mts +10 -0
  468. package/dist/deferred-tasks-wlMFJL95.d.mts.map +1 -0
  469. package/dist/dev-typegen-EBni_pOQ.mjs +29 -0
  470. package/dist/dev-typegen-EBni_pOQ.mjs.map +1 -0
  471. package/dist/device-flow-D1U392GC.mjs +519 -0
  472. package/dist/device-flow-D1U392GC.mjs.map +1 -0
  473. package/dist/dialect-helpers-B1XN2HGB.mjs +314 -0
  474. package/dist/dialect-helpers-B1XN2HGB.mjs.map +1 -0
  475. package/dist/digest-DJ1tHCgy.mjs +194 -0
  476. package/dist/digest-DJ1tHCgy.mjs.map +1 -0
  477. package/dist/direct-executor-Bs2g0ake.mjs +117 -0
  478. package/dist/direct-executor-Bs2g0ake.mjs.map +1 -0
  479. package/dist/dist-BUmWMTbN.mjs +810 -0
  480. package/dist/dist-BUmWMTbN.mjs.map +1 -0
  481. package/dist/email-console-FFVJWb9N.mjs +50 -0
  482. package/dist/email-console-FFVJWb9N.mjs.map +1 -0
  483. package/dist/email-locale-Bs3HFdnq.mjs +25 -0
  484. package/dist/email-locale-Bs3HFdnq.mjs.map +1 -0
  485. package/dist/emdash-runtime-C8T-pZpS.mjs +4425 -0
  486. package/dist/emdash-runtime-C8T-pZpS.mjs.map +1 -0
  487. package/dist/enrich-DFlfnd3u.mjs +194 -0
  488. package/dist/enrich-DFlfnd3u.mjs.map +1 -0
  489. package/dist/entry-lock-BulbgPBX.d.mts +4568 -0
  490. package/dist/entry-lock-BulbgPBX.d.mts.map +1 -0
  491. package/dist/entry-lock-CRVmruM0.mjs +1211 -0
  492. package/dist/entry-lock-CRVmruM0.mjs.map +1 -0
  493. package/dist/entry-lock-D-zJQ4q6.mjs +163 -0
  494. package/dist/entry-lock-D-zJQ4q6.mjs.map +1 -0
  495. package/dist/entry-locks-CJ9uhqg1.mjs +167 -0
  496. package/dist/entry-locks-CJ9uhqg1.mjs.map +1 -0
  497. package/dist/env-types-BE3bCvfP.mjs +38 -0
  498. package/dist/env-types-BE3bCvfP.mjs.map +1 -0
  499. package/dist/error-BCMgPxdn.mjs +90 -0
  500. package/dist/error-BCMgPxdn.mjs.map +1 -0
  501. package/dist/errors-8gJqv-XV.mjs +492 -0
  502. package/dist/errors-8gJqv-XV.mjs.map +1 -0
  503. package/dist/errors-B4f4It-2.mjs +120 -0
  504. package/dist/errors-B4f4It-2.mjs.map +1 -0
  505. package/dist/escape-lsNq38PP.mjs +9 -0
  506. package/dist/escape-lsNq38PP.mjs.map +1 -0
  507. package/dist/fence-Dagicj14.mjs +162 -0
  508. package/dist/fence-Dagicj14.mjs.map +1 -0
  509. package/dist/field-map-BSXdNGt5.mjs +84 -0
  510. package/dist/field-map-BSXdNGt5.mjs.map +1 -0
  511. package/dist/fts-manager-6861qcwk.mjs +489 -0
  512. package/dist/fts-manager-6861qcwk.mjs.map +1 -0
  513. package/dist/gc-CNkXB3mE.mjs +75 -0
  514. package/dist/gc-CNkXB3mE.mjs.map +1 -0
  515. package/dist/hash-BJaeek87.mjs +37 -0
  516. package/dist/hash-BJaeek87.mjs.map +1 -0
  517. package/dist/hreflang-8dUOJAPJ.d.mts +50 -0
  518. package/dist/hreflang-8dUOJAPJ.d.mts.map +1 -0
  519. package/dist/hreflang-BW5A4FLK.mjs +105 -0
  520. package/dist/hreflang-BW5A4FLK.mjs.map +1 -0
  521. package/dist/http-route-dispatch-rXKvTNm9.mjs +342 -0
  522. package/dist/http-route-dispatch-rXKvTNm9.mjs.map +1 -0
  523. package/dist/identity-CPRRSovU.mjs +35 -0
  524. package/dist/identity-CPRRSovU.mjs.map +1 -0
  525. package/dist/import-yVbfPyfd.mjs +2126 -0
  526. package/dist/import-yVbfPyfd.mjs.map +1 -0
  527. package/dist/index-VM7Fzxwe.d.mts +260 -0
  528. package/dist/index-VM7Fzxwe.d.mts.map +1 -0
  529. package/dist/index.d.mts +23 -22
  530. package/dist/index.mjs +104 -105
  531. package/dist/install-finalization-RU6VrHOX.mjs +58 -0
  532. package/dist/install-finalization-RU6VrHOX.mjs.map +1 -0
  533. package/dist/json-recordset-D0WhN2UA.mjs +12 -0
  534. package/dist/json-recordset-D0WhN2UA.mjs.map +1 -0
  535. package/dist/json-schema-v_D_pPNG.mjs +15 -0
  536. package/dist/json-schema-v_D_pPNG.mjs.map +1 -0
  537. package/dist/keys-CifIkT0N.mjs +61 -0
  538. package/dist/keys-CifIkT0N.mjs.map +1 -0
  539. package/dist/kinds-B_Qcl5pz.mjs +974 -0
  540. package/dist/kinds-B_Qcl5pz.mjs.map +1 -0
  541. package/dist/lifecycle-B8d7Rdqx.mjs +25 -0
  542. package/dist/lifecycle-B8d7Rdqx.mjs.map +1 -0
  543. package/dist/load-D4xtzm6h.mjs +28 -0
  544. package/dist/load-D4xtzm6h.mjs.map +1 -0
  545. package/dist/loader-DhnedqY4.mjs +1478 -0
  546. package/dist/loader-DhnedqY4.mjs.map +1 -0
  547. package/dist/loops-B2YS-Zzr.mjs +205 -0
  548. package/dist/loops-B2YS-Zzr.mjs.map +1 -0
  549. package/dist/manifest-builder-g1FLviel.mjs +196 -0
  550. package/dist/manifest-builder-g1FLviel.mjs.map +1 -0
  551. package/dist/manifest-schema-DNb4XmTS.mjs +497 -0
  552. package/dist/manifest-schema-DNb4XmTS.mjs.map +1 -0
  553. package/dist/marketplace-CqbgeIa7.mjs +257 -0
  554. package/dist/marketplace-CqbgeIa7.mjs.map +1 -0
  555. package/dist/media/image-endpoint.mjs +1 -1
  556. package/dist/media/index.d.mts +1 -1
  557. package/dist/media/index.mjs +3 -3
  558. package/dist/media/local-runtime.d.mts +14 -13
  559. package/dist/media/local-runtime.d.mts.map +1 -1
  560. package/dist/media/local-runtime.mjs +14 -14
  561. package/dist/media-BR4_t-Wd.mjs +416 -0
  562. package/dist/media-BR4_t-Wd.mjs.map +1 -0
  563. package/dist/media-CikS-q6E.mjs +294 -0
  564. package/dist/media-CikS-q6E.mjs.map +1 -0
  565. package/dist/media-DepNLhPq.mjs +383 -0
  566. package/dist/media-DepNLhPq.mjs.map +1 -0
  567. package/dist/media-allowlist-BMBLqyWh.mjs +45 -0
  568. package/dist/media-allowlist-BMBLqyWh.mjs.map +1 -0
  569. package/dist/media-folders-CI0Wydfo.mjs +210 -0
  570. package/dist/media-folders-CI0Wydfo.mjs.map +1 -0
  571. package/dist/media-url-BQgKvpQ5.mjs +43 -0
  572. package/dist/media-url-BQgKvpQ5.mjs.map +1 -0
  573. package/dist/media-usage-X1_20MY-.mjs +282 -0
  574. package/dist/media-usage-X1_20MY-.mjs.map +1 -0
  575. package/dist/media-usage-activation-bWusy3M2.mjs +78 -0
  576. package/dist/media-usage-activation-bWusy3M2.mjs.map +1 -0
  577. package/dist/media-usage-work-B2RaoJIa.mjs +151 -0
  578. package/dist/media-usage-work-B2RaoJIa.mjs.map +1 -0
  579. package/dist/media-usage-work-BCK2J-v_.mjs +1036 -0
  580. package/dist/media-usage-work-BCK2J-v_.mjs.map +1 -0
  581. package/dist/menus-B0Qqv_cS.mjs +837 -0
  582. package/dist/menus-B0Qqv_cS.mjs.map +1 -0
  583. package/dist/menus-oypxT1pI.mjs +3802 -0
  584. package/dist/menus-oypxT1pI.mjs.map +1 -0
  585. package/dist/menus-uEAxWAm1.mjs +92 -0
  586. package/dist/menus-uEAxWAm1.mjs.map +1 -0
  587. package/dist/migrations/index.d.mts +1 -1
  588. package/dist/migrations/index.mjs +4 -4
  589. package/dist/mime-D1We9jUx.mjs +81 -0
  590. package/dist/mime-D1We9jUx.mjs.map +1 -0
  591. package/dist/mode-C-D3qICy.mjs +23 -0
  592. package/dist/mode-C-D3qICy.mjs.map +1 -0
  593. package/dist/node-sqlite-compat-CrKzRr0J.mjs +63 -0
  594. package/dist/node-sqlite-compat-CrKzRr0J.mjs.map +1 -0
  595. package/dist/normalize-Cx-bNwhP.mjs +220 -0
  596. package/dist/normalize-Cx-bNwhP.mjs.map +1 -0
  597. package/dist/oauth-authorization-CPLgBrdo.mjs +287 -0
  598. package/dist/oauth-authorization-CPLgBrdo.mjs.map +1 -0
  599. package/dist/oauth-clients-BT0Pg-MO.mjs +266 -0
  600. package/dist/oauth-clients-BT0Pg-MO.mjs.map +1 -0
  601. package/dist/oauth-state-store-BndCfRum.mjs +50 -0
  602. package/dist/oauth-state-store-BndCfRum.mjs.map +1 -0
  603. package/dist/oauth-user-lookup-BDgF6IVG.mjs +26 -0
  604. package/dist/oauth-user-lookup-BDgF6IVG.mjs.map +1 -0
  605. package/dist/object-cache/memory.d.mts +1 -1
  606. package/dist/object-cache-DmKr09La.mjs +603 -0
  607. package/dist/object-cache-DmKr09La.mjs.map +1 -0
  608. package/dist/options-BUUgroHg.d.mts +81 -0
  609. package/dist/options-BUUgroHg.d.mts.map +1 -0
  610. package/dist/ownership-MiyA7qKO.mjs +12 -0
  611. package/dist/ownership-MiyA7qKO.mjs.map +1 -0
  612. package/dist/page/index.d.mts +2 -2
  613. package/dist/page/index.mjs +13 -13
  614. package/dist/parse-B_b6gZxG.mjs +81 -0
  615. package/dist/parse-B_b6gZxG.mjs.map +1 -0
  616. package/dist/parse-Dndx1QmN.d.mts +176 -0
  617. package/dist/parse-Dndx1QmN.d.mts.map +1 -0
  618. package/dist/passkey-config-D2Lua5__.mjs +46 -0
  619. package/dist/passkey-config-D2Lua5__.mjs.map +1 -0
  620. package/dist/paths-biDzFTY2.mjs +77 -0
  621. package/dist/paths-biDzFTY2.mjs.map +1 -0
  622. package/dist/placeholder-CSKu5OkD.d.mts +314 -0
  623. package/dist/placeholder-CSKu5OkD.d.mts.map +1 -0
  624. package/dist/plan-CCoqxNoU.mjs +135 -0
  625. package/dist/plan-CCoqxNoU.mjs.map +1 -0
  626. package/dist/plugin-test-runtime.d.mts +16 -14
  627. package/dist/plugin-test-runtime.d.mts.map +1 -1
  628. package/dist/plugin-test-runtime.mjs +114 -115
  629. package/dist/plugin-tool-name-DDUgN_0p.mjs +27 -0
  630. package/dist/plugin-tool-name-DDUgN_0p.mjs.map +1 -0
  631. package/dist/plugin-types.d.mts +1 -1
  632. package/dist/plugin-utils.d.mts +12 -11
  633. package/dist/plugin-utils.d.mts.map +1 -1
  634. package/dist/plugins/adapt-sandbox-entry.d.mts +12 -11
  635. package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
  636. package/dist/plugins/adapt-sandbox-entry.mjs +4 -4
  637. package/dist/plugins/host.d.mts +5 -5
  638. package/dist/plugins/host.mjs +50 -51
  639. package/dist/plugins-COJ2L49n.mjs +261 -0
  640. package/dist/plugins-COJ2L49n.mjs.map +1 -0
  641. package/dist/policy-BPugqmeV.mjs +53 -0
  642. package/dist/policy-BPugqmeV.mjs.map +1 -0
  643. package/dist/portable-text-BH4zgkSm.mjs +311 -0
  644. package/dist/portable-text-BH4zgkSm.mjs.map +1 -0
  645. package/dist/preview-DLexxwp3.mjs +107 -0
  646. package/dist/preview-DLexxwp3.mjs.map +1 -0
  647. package/dist/protocol-PoAfD_9W.d.mts +65 -0
  648. package/dist/protocol-PoAfD_9W.d.mts.map +1 -0
  649. package/dist/public-plugin-api-routes-CMljrTby.mjs +316 -0
  650. package/dist/public-plugin-api-routes-CMljrTby.mjs.map +1 -0
  651. package/dist/public-submission-ayqoyee4.mjs +251 -0
  652. package/dist/public-submission-ayqoyee4.mjs.map +1 -0
  653. package/dist/public-url-Bt98vysr.mjs +101 -0
  654. package/dist/public-url-Bt98vysr.mjs.map +1 -0
  655. package/dist/query-D62NntCZ.mjs +1146 -0
  656. package/dist/query-D62NntCZ.mjs.map +1 -0
  657. package/dist/query-LmPY2y0C.mjs +41 -0
  658. package/dist/query-LmPY2y0C.mjs.map +1 -0
  659. package/dist/range-CYfeXgGK.mjs +51 -0
  660. package/dist/range-CYfeXgGK.mjs.map +1 -0
  661. package/dist/rate-limit-C04Llsoc.mjs +127 -0
  662. package/dist/rate-limit-C04Llsoc.mjs.map +1 -0
  663. package/dist/receipt-BUsQCOeM.mjs +43 -0
  664. package/dist/receipt-BUsQCOeM.mjs.map +1 -0
  665. package/dist/redirect-CQAV7mCo.mjs +19 -0
  666. package/dist/redirect-CQAV7mCo.mjs.map +1 -0
  667. package/dist/redirect-DjLdw427.mjs +423 -0
  668. package/dist/redirect-DjLdw427.mjs.map +1 -0
  669. package/dist/redirect-paths-DOaVBp6E.mjs +36 -0
  670. package/dist/redirect-paths-DOaVBp6E.mjs.map +1 -0
  671. package/dist/redirects-Cpq1catN.mjs +446 -0
  672. package/dist/redirects-Cpq1catN.mjs.map +1 -0
  673. package/dist/redirects-CyvvZrCJ.mjs +148 -0
  674. package/dist/redirects-CyvvZrCJ.mjs.map +1 -0
  675. package/dist/registry/testing.mjs +3 -3
  676. package/dist/registry-B0-O575m.mjs +8374 -0
  677. package/dist/registry-B0-O575m.mjs.map +1 -0
  678. package/dist/relations-WIOojTL4.mjs +789 -0
  679. package/dist/relations-WIOojTL4.mjs.map +1 -0
  680. package/dist/request-context.d.mts +2 -2
  681. package/dist/request-meta-bwZ_NsvU.mjs +141 -0
  682. package/dist/request-meta-bwZ_NsvU.mjs.map +1 -0
  683. package/dist/resolve-BNnm8EkB.mjs +102 -0
  684. package/dist/resolve-BNnm8EkB.mjs.map +1 -0
  685. package/dist/route-cache-QSOyDEw0.mjs +20 -0
  686. package/dist/route-cache-QSOyDEw0.mjs.map +1 -0
  687. package/dist/route-wire-Ca_HWCZ5.mjs +197 -0
  688. package/dist/route-wire-Ca_HWCZ5.mjs.map +1 -0
  689. package/dist/routes-avqgc-8r.mjs +272 -0
  690. package/dist/routes-avqgc-8r.mjs.map +1 -0
  691. package/dist/runner-Bkkfk4O8.mjs +6669 -0
  692. package/dist/runner-Bkkfk4O8.mjs.map +1 -0
  693. package/dist/runner-Dfgp6-S_.d.mts +73 -0
  694. package/dist/runner-Dfgp6-S_.d.mts.map +1 -0
  695. package/dist/runtime.d.mts +13 -12
  696. package/dist/runtime.d.mts.map +1 -1
  697. package/dist/runtime.mjs +4 -3
  698. package/dist/runtime.mjs.map +1 -1
  699. package/dist/schema/project-env-types.mjs +42 -43
  700. package/dist/schema/project-env-types.mjs.map +1 -1
  701. package/dist/schema-B-3rntlX.mjs +815 -0
  702. package/dist/schema-B-3rntlX.mjs.map +1 -0
  703. package/dist/schema-BqBlUZtb.mjs +13 -0
  704. package/dist/schema-BqBlUZtb.mjs.map +1 -0
  705. package/dist/scopes-DNaY7Ey0.mjs +34 -0
  706. package/dist/scopes-DNaY7Ey0.mjs.map +1 -0
  707. package/dist/search-BPWTnpnD.mjs +450 -0
  708. package/dist/search-BPWTnpnD.mjs.map +1 -0
  709. package/dist/secrets-Dswzrz3k.mjs +369 -0
  710. package/dist/secrets-Dswzrz3k.mjs.map +1 -0
  711. package/dist/sections-rSao6rBG.mjs +346 -0
  712. package/dist/sections-rSao6rBG.mjs.map +1 -0
  713. package/dist/seed/index.d.mts +2 -2
  714. package/dist/seed/index.mjs +40 -41
  715. package/dist/seo/index.d.mts +3 -3
  716. package/dist/seo/index.mjs +27 -27
  717. package/dist/seo-B_H_pqOd.mjs +133 -0
  718. package/dist/seo-B_H_pqOd.mjs.map +1 -0
  719. package/dist/seo-ClB-dw9w.mjs +188 -0
  720. package/dist/seo-ClB-dw9w.mjs.map +1 -0
  721. package/dist/service-DpiUQVpp.mjs +150 -0
  722. package/dist/service-DpiUQVpp.mjs.map +1 -0
  723. package/dist/session-user-DiE4JKPP.mjs +61 -0
  724. package/dist/session-user-DiE4JKPP.mjs.map +1 -0
  725. package/dist/settings--XlUdUaI.mjs +66 -0
  726. package/dist/settings--XlUdUaI.mjs.map +1 -0
  727. package/dist/settings-D932YP2-.mjs +519 -0
  728. package/dist/settings-D932YP2-.mjs.map +1 -0
  729. package/dist/settings-Dd1uivmQ.mjs +73 -0
  730. package/dist/settings-Dd1uivmQ.mjs.map +1 -0
  731. package/dist/setup-complete-qsJYWutC.mjs +65 -0
  732. package/dist/setup-complete-qsJYWutC.mjs.map +1 -0
  733. package/dist/setup-nonce-CBFgUFXw.mjs +25 -0
  734. package/dist/setup-nonce-CBFgUFXw.mjs.map +1 -0
  735. package/dist/site-domain-oRGS_JfA.mjs +131 -0
  736. package/dist/site-domain-oRGS_JfA.mjs.map +1 -0
  737. package/dist/site-settings-DRHfX7bq.mjs +50 -0
  738. package/dist/site-settings-DRHfX7bq.mjs.map +1 -0
  739. package/dist/site-url-MB685I5X.mjs +45 -0
  740. package/dist/site-url-MB685I5X.mjs.map +1 -0
  741. package/dist/sitemap-name-B8QP8wud.mjs +26 -0
  742. package/dist/sitemap-name-B8QP8wud.mjs.map +1 -0
  743. package/dist/slug-aVnUV4SL.mjs +16 -0
  744. package/dist/slug-aVnUV4SL.mjs.map +1 -0
  745. package/dist/snapshot-BjaXDZQ5.mjs +414 -0
  746. package/dist/snapshot-BjaXDZQ5.mjs.map +1 -0
  747. package/dist/ssrf-BcYjyM4M.mjs +406 -0
  748. package/dist/ssrf-BcYjyM4M.mjs.map +1 -0
  749. package/dist/stage-CZQnXM_G.mjs +662 -0
  750. package/dist/stage-CZQnXM_G.mjs.map +1 -0
  751. package/dist/staged-ByBmPFtX.mjs +686 -0
  752. package/dist/staged-ByBmPFtX.mjs.map +1 -0
  753. package/dist/state-CFbGZziM.mjs +178 -0
  754. package/dist/state-CFbGZziM.mjs.map +1 -0
  755. package/dist/status-BFNdxzKc.mjs +30 -0
  756. package/dist/status-BFNdxzKc.mjs.map +1 -0
  757. package/dist/storage/local.d.mts +1 -1
  758. package/dist/storage/local.mjs +2 -2
  759. package/dist/storage/s3.d.mts +1 -1
  760. package/dist/storage/s3.mjs +1 -1
  761. package/dist/storage-query-BFp06Y0s.d.mts +1627 -0
  762. package/dist/storage-query-BFp06Y0s.d.mts.map +1 -0
  763. package/dist/tar-DFjExb9X.mjs +449 -0
  764. package/dist/tar-DFjExb9X.mjs.map +1 -0
  765. package/dist/target-CWZs2-o6.mjs +27 -0
  766. package/dist/target-CWZs2-o6.mjs.map +1 -0
  767. package/dist/taxonomies-5SR76j11.mjs +937 -0
  768. package/dist/taxonomies-5SR76j11.mjs.map +1 -0
  769. package/dist/taxonomies-B__VmCKQ.mjs +703 -0
  770. package/dist/taxonomies-B__VmCKQ.mjs.map +1 -0
  771. package/dist/taxonomy-CMI5fczd.mjs +563 -0
  772. package/dist/taxonomy-CMI5fczd.mjs.map +1 -0
  773. package/dist/tokens-BnhSnGwJ.mjs +171 -0
  774. package/dist/tokens-BnhSnGwJ.mjs.map +1 -0
  775. package/dist/transfer-BbKfufJ4.mjs +166 -0
  776. package/dist/transfer-BbKfufJ4.mjs.map +1 -0
  777. package/dist/transfer-DTGblAj2.mjs +8910 -0
  778. package/dist/transfer-DTGblAj2.mjs.map +1 -0
  779. package/dist/transfer-download-D9LQEDX0.mjs +33 -0
  780. package/dist/transfer-download-D9LQEDX0.mjs.map +1 -0
  781. package/dist/transformations-Bx4lYY0Y.mjs +196 -0
  782. package/dist/transformations-Bx4lYY0Y.mjs.map +1 -0
  783. package/dist/transport-Dzpn5b3i.mjs +137 -0
  784. package/dist/transport-Dzpn5b3i.mjs.map +1 -0
  785. package/dist/trusted-proxy-BU3Nx9g1.mjs +51 -0
  786. package/dist/trusted-proxy-BU3Nx9g1.mjs.map +1 -0
  787. package/dist/turnstile-Cs2wfkJG.mjs +58 -0
  788. package/dist/turnstile-Cs2wfkJG.mjs.map +1 -0
  789. package/dist/types-BAsCk5KU.d.mts +87 -0
  790. package/dist/types-BAsCk5KU.d.mts.map +1 -0
  791. package/dist/types-BuvSwT9Y.d.mts +375 -0
  792. package/dist/types-BuvSwT9Y.d.mts.map +1 -0
  793. package/dist/types-C4KT3Md2.d.mts +293 -0
  794. package/dist/types-C4KT3Md2.d.mts.map +1 -0
  795. package/dist/types-CVXHwIBB.d.mts +125 -0
  796. package/dist/types-CVXHwIBB.d.mts.map +1 -0
  797. package/dist/types-C_asjp1J.mjs.map +1 -1
  798. package/dist/types-CgfFGfO5.mjs +16 -0
  799. package/dist/types-CgfFGfO5.mjs.map +1 -0
  800. package/dist/types-Cj0_yZkn.mjs +18 -0
  801. package/dist/types-Cj0_yZkn.mjs.map +1 -0
  802. package/dist/types-CjftrmZR.d.mts +1741 -0
  803. package/dist/types-CjftrmZR.d.mts.map +1 -0
  804. package/dist/types-DKwRUA-x.d.mts +916 -0
  805. package/dist/types-DKwRUA-x.d.mts.map +1 -0
  806. package/dist/types-DwhEvIVb.mjs.map +1 -1
  807. package/dist/types-GwAyS5SH.d.mts +227 -0
  808. package/dist/types-GwAyS5SH.d.mts.map +1 -0
  809. package/dist/types-qHVygneX.mjs +77 -0
  810. package/dist/types-qHVygneX.mjs.map +1 -0
  811. package/dist/types-sUHaH7lC.mjs +37 -0
  812. package/dist/types-sUHaH7lC.mjs.map +1 -0
  813. package/dist/types-uU2YNYSt.d.mts +209 -0
  814. package/dist/types-uU2YNYSt.d.mts.map +1 -0
  815. package/dist/update-check-ABBJgg6M.mjs +161 -0
  816. package/dist/update-check-ABBJgg6M.mjs.map +1 -0
  817. package/dist/upload-attempts-DPFC4COv.mjs +32 -0
  818. package/dist/upload-attempts-DPFC4COv.mjs.map +1 -0
  819. package/dist/url-pattern-QATUE_rv.mjs +41 -0
  820. package/dist/url-pattern-QATUE_rv.mjs.map +1 -0
  821. package/dist/user-By8SzQxS.mjs +171 -0
  822. package/dist/user-By8SzQxS.mjs.map +1 -0
  823. package/dist/utils-D5uOi6WS.mjs +450 -0
  824. package/dist/utils-D5uOi6WS.mjs.map +1 -0
  825. package/dist/utils-Szp4iBQB.d.mts +376 -0
  826. package/dist/utils-Szp4iBQB.d.mts.map +1 -0
  827. package/dist/validate-DDvxy6qG.d.mts +468 -0
  828. package/dist/validate-DDvxy6qG.d.mts.map +1 -0
  829. package/dist/validate-Dz-TIOFB.mjs +524 -0
  830. package/dist/validate-Dz-TIOFB.mjs.map +1 -0
  831. package/dist/validation-Fc9ZSUS_.mjs +221 -0
  832. package/dist/validation-Fc9ZSUS_.mjs.map +1 -0
  833. package/dist/version-BZj18Q7G.mjs +9 -0
  834. package/dist/version-BZj18Q7G.mjs.map +1 -0
  835. package/dist/version-Bu6Nlbb5.mjs +7 -0
  836. package/dist/version-Bu6Nlbb5.mjs.map +1 -0
  837. package/dist/version-DqB7LIO7.mjs +49 -0
  838. package/dist/version-DqB7LIO7.mjs.map +1 -0
  839. package/dist/video-DytCnw3L.mjs +54 -0
  840. package/dist/video-DytCnw3L.mjs.map +1 -0
  841. package/dist/virtual-modules-DO954n7P.mjs +515 -0
  842. package/dist/virtual-modules-DO954n7P.mjs.map +1 -0
  843. package/dist/widgets-BUx_Mf2q.mjs +134 -0
  844. package/dist/widgets-BUx_Mf2q.mjs.map +1 -0
  845. package/dist/wxr-taxonomies-DbJtWrWM.mjs +454 -0
  846. package/dist/wxr-taxonomies-DbJtWrWM.mjs.map +1 -0
  847. package/dist/zod-generator--nlM0930.mjs +425 -0
  848. package/dist/zod-generator--nlM0930.mjs.map +1 -0
  849. package/package.json +5 -5
  850. package/src/api/handlers/content.ts +49 -18
  851. package/src/api/handlers/device-flow.ts +1 -3
  852. package/src/api/handlers/menus.ts +3 -3
  853. package/src/api/handlers/oauth-authorization.ts +1 -3
  854. package/src/astro/integration/admin-nav.ts +52 -0
  855. package/src/astro/integration/index.ts +7 -0
  856. package/src/astro/integration/runtime.ts +14 -0
  857. package/src/astro/integration/shims/use-sync-external-store-with-selector.js +2 -0
  858. package/src/astro/integration/shims/use-sync-external-store.js +4 -1
  859. package/src/astro/middleware/auth.ts +9 -2
  860. package/src/astro/routes/api/import/wordpress/analyze.ts +5 -29
  861. package/src/astro/routes/api/import/wordpress-plugin/execute.ts +3 -3
  862. package/src/astro/routes/api/media/file/[...key].ts +18 -4
  863. package/src/astro/routes/api/oauth/token.ts +5 -1
  864. package/src/astro/routes/api/widget-areas/[name]/reorder.ts +7 -1
  865. package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +3 -1
  866. package/src/astro/routes/api/widget-areas/[name]/widgets.ts +2 -1
  867. package/src/astro/routes/api/widget-areas/[name].ts +2 -1
  868. package/src/astro/routes/api/widget-areas/index.ts +2 -1
  869. package/src/astro/types.ts +4 -3
  870. package/src/auth/api-tokens.ts +3 -0
  871. package/src/cleanup.ts +44 -0
  872. package/src/components/inline-bubble-menu.tsx +109 -95
  873. package/src/components/inline-image.tsx +54 -48
  874. package/src/database/dialect-helpers.ts +10 -3
  875. package/src/database/repositories/byline.ts +22 -14
  876. package/src/database/repositories/content.ts +17 -4
  877. package/src/database/repositories/media.ts +17 -0
  878. package/src/database/repositories/menu.ts +163 -132
  879. package/src/database/repositories/types.ts +3 -3
  880. package/src/database/types.ts +1 -1
  881. package/src/emdash-runtime.ts +23 -7
  882. package/src/import/utils.ts +15 -2
  883. package/src/index.ts +1 -0
  884. package/src/loader.ts +106 -95
  885. package/src/media/content-disposition.ts +56 -0
  886. package/src/media/normalize.ts +2 -0
  887. package/src/media/usage/content-fields.ts +2 -1
  888. package/src/menus/index.ts +137 -25
  889. package/src/object-cache/index.ts +22 -0
  890. package/src/plugin-test-runtime.ts +1 -0
  891. package/src/query.ts +44 -40
  892. package/src/schema/types.ts +7 -6
  893. package/src/search/fts-manager.ts +5 -3
  894. package/src/seed/apply.ts +52 -44
  895. package/src/seed/types.ts +3 -3
  896. package/src/taxonomies/index.ts +22 -51
  897. package/src/transfer/import/advance.ts +12 -1
  898. package/src/transfer/import/scaffold.ts +7 -1
  899. package/src/transfer/import/stages.ts +53 -2
  900. package/src/utils/revalidating-cache.ts +85 -0
  901. package/src/visual-editing/toolbar.ts +7 -2
  902. package/src/widgets/index.ts +27 -13
  903. package/dist/action-token-B1ds4laA.mjs +0 -26
  904. package/dist/action-token-B1ds4laA.mjs.map +0 -1
  905. package/dist/activation-sGF9br3X.mjs +0 -387
  906. package/dist/activation-sGF9br3X.mjs.map +0 -1
  907. package/dist/adapters-BOMSX9PU.d.mts +0 -173
  908. package/dist/adapters-BOMSX9PU.d.mts.map +0 -1
  909. package/dist/after-PcEvMY_6.mjs +0 -96
  910. package/dist/after-PcEvMY_6.mjs.map +0 -1
  911. package/dist/allowed-origins-CovsTkm3.mjs +0 -116
  912. package/dist/allowed-origins-CovsTkm3.mjs.map +0 -1
  913. package/dist/api-C_LxFnOm.mjs +0 -5077
  914. package/dist/api-C_LxFnOm.mjs.map +0 -1
  915. package/dist/api-tokens-C7l0GUAF.mjs +0 -3
  916. package/dist/api-tokens-DQ9Ee-vP.mjs +0 -173
  917. package/dist/api-tokens-DQ9Ee-vP.mjs.map +0 -1
  918. package/dist/apply-CLjfxvyH.mjs +0 -1758
  919. package/dist/apply-CLjfxvyH.mjs.map +0 -1
  920. package/dist/approvals-ocK89i4H.mjs +0 -460
  921. package/dist/approvals-ocK89i4H.mjs.map +0 -1
  922. package/dist/artifact-fetch-CgvvpoWQ.mjs +0 -659
  923. package/dist/artifact-fetch-CgvvpoWQ.mjs.map +0 -1
  924. package/dist/artifacts-DwOYYBQm.mjs +0 -323
  925. package/dist/artifacts-DwOYYBQm.mjs.map +0 -1
  926. package/dist/authoritative-records-LPtrIGOY.mjs +0 -5183
  927. package/dist/authoritative-records-LPtrIGOY.mjs.map +0 -1
  928. package/dist/authorize-CoDsRRp5.mjs +0 -74
  929. package/dist/authorize-CoDsRRp5.mjs.map +0 -1
  930. package/dist/backup-2Wj-hTCN.mjs +0 -246
  931. package/dist/backup-2Wj-hTCN.mjs.map +0 -1
  932. package/dist/block-types-C3gJEe7l.mjs +0 -132
  933. package/dist/block-types-C3gJEe7l.mjs.map +0 -1
  934. package/dist/block-values-CgbMtSGU.mjs +0 -215
  935. package/dist/block-values-CgbMtSGU.mjs.map +0 -1
  936. package/dist/byline-CzGZC2Zs.mjs +0 -922
  937. package/dist/byline-CzGZC2Zs.mjs.map +0 -1
  938. package/dist/byline-fields-B1qHvRps.mjs +0 -280
  939. package/dist/byline-fields-B1qHvRps.mjs.map +0 -1
  940. package/dist/byline-fields-vYd_4Q1e.mjs +0 -123
  941. package/dist/byline-fields-vYd_4Q1e.mjs.map +0 -1
  942. package/dist/bylines-BF555iIz.mjs +0 -150
  943. package/dist/bylines-BF555iIz.mjs.map +0 -1
  944. package/dist/bylines-DJx6IWWi.mjs +0 -234
  945. package/dist/bylines-DJx6IWWi.mjs.map +0 -1
  946. package/dist/cache-BWzswWB-.mjs +0 -151
  947. package/dist/cache-BWzswWB-.mjs.map +0 -1
  948. package/dist/canonical-DjF_z6GI.mjs +0 -174
  949. package/dist/canonical-DjF_z6GI.mjs.map +0 -1
  950. package/dist/capture-triggers-D7g3fOZj.mjs +0 -362
  951. package/dist/capture-triggers-D7g3fOZj.mjs.map +0 -1
  952. package/dist/challenge-store-Cfjdvw86.mjs +0 -51
  953. package/dist/challenge-store-Cfjdvw86.mjs.map +0 -1
  954. package/dist/checksum-BF4acJwn.mjs +0 -162
  955. package/dist/checksum-BF4acJwn.mjs.map +0 -1
  956. package/dist/chrome-tags-BDs29G3g.mjs +0 -24
  957. package/dist/chrome-tags-BDs29G3g.mjs.map +0 -1
  958. package/dist/chunks-CYBOL-zn.mjs +0 -25
  959. package/dist/chunks-CYBOL-zn.mjs.map +0 -1
  960. package/dist/collection-slugs-cache-B2J5aESO.mjs +0 -91
  961. package/dist/collection-slugs-cache-B2J5aESO.mjs.map +0 -1
  962. package/dist/comment-DV7dybcs.mjs +0 -335
  963. package/dist/comment-DV7dybcs.mjs.map +0 -1
  964. package/dist/comment-reaction-CWwqiT6x.mjs +0 -85
  965. package/dist/comment-reaction-CWwqiT6x.mjs.map +0 -1
  966. package/dist/comments-DVjWJm8X.mjs +0 -99
  967. package/dist/comments-DVjWJm8X.mjs.map +0 -1
  968. package/dist/comments-Q-ILHCEI.mjs +0 -195
  969. package/dist/comments-Q-ILHCEI.mjs.map +0 -1
  970. package/dist/components-DnOmvvgg.mjs +0 -112
  971. package/dist/components-DnOmvvgg.mjs.map +0 -1
  972. package/dist/config-9IzA83_U.d.mts +0 -6811
  973. package/dist/config-9IzA83_U.d.mts.map +0 -1
  974. package/dist/config-BdQzFtmR.mjs +0 -228
  975. package/dist/config-BdQzFtmR.mjs.map +0 -1
  976. package/dist/config-Cs2RBkJ6.d.mts +0 -41
  977. package/dist/config-Cs2RBkJ6.d.mts.map +0 -1
  978. package/dist/connection-CiXgZyCY.mjs +0 -36
  979. package/dist/connection-CiXgZyCY.mjs.map +0 -1
  980. package/dist/content-Dt0Os_WQ.mjs +0 -2109
  981. package/dist/content-Dt0Os_WQ.mjs.map +0 -1
  982. package/dist/content-list-query-BK26u9Ly.d.mts +0 -26
  983. package/dist/content-list-query-BK26u9Ly.d.mts.map +0 -1
  984. package/dist/content-policy-BLDbNJOb.mjs +0 -46
  985. package/dist/content-policy-BLDbNJOb.mjs.map +0 -1
  986. package/dist/content-repair-CjwbLy4m.mjs +0 -442
  987. package/dist/content-repair-CjwbLy4m.mjs.map +0 -1
  988. package/dist/context-ErV7UdQY.mjs +0 -2089
  989. package/dist/context-ErV7UdQY.mjs.map +0 -1
  990. package/dist/credits-BRyjafiF.mjs +0 -110
  991. package/dist/credits-BRyjafiF.mjs.map +0 -1
  992. package/dist/cron-Bm5xa7tv.mjs +0 -306
  993. package/dist/cron-Bm5xa7tv.mjs.map +0 -1
  994. package/dist/dashboard-DVxQ5XiI.mjs +0 -168
  995. package/dist/dashboard-DVxQ5XiI.mjs.map +0 -1
  996. package/dist/default-B9Tf2n94.mjs +0 -81
  997. package/dist/default-B9Tf2n94.mjs.map +0 -1
  998. package/dist/deferred-tasks-CpPEqsga.d.mts +0 -9
  999. package/dist/deferred-tasks-CpPEqsga.d.mts.map +0 -1
  1000. package/dist/dev-typegen-ZeWYV8Jp.mjs +0 -29
  1001. package/dist/dev-typegen-ZeWYV8Jp.mjs.map +0 -1
  1002. package/dist/device-flow-BbYNZ9Xi.mjs +0 -521
  1003. package/dist/device-flow-BbYNZ9Xi.mjs.map +0 -1
  1004. package/dist/dialect-helpers-7_IqPdh9.mjs +0 -307
  1005. package/dist/dialect-helpers-7_IqPdh9.mjs.map +0 -1
  1006. package/dist/digest-DlBa7kJl.mjs +0 -194
  1007. package/dist/digest-DlBa7kJl.mjs.map +0 -1
  1008. package/dist/direct-executor-5T8gkhvA.mjs +0 -117
  1009. package/dist/direct-executor-5T8gkhvA.mjs.map +0 -1
  1010. package/dist/dist-DY0aOmAP.mjs +0 -810
  1011. package/dist/dist-DY0aOmAP.mjs.map +0 -1
  1012. package/dist/email-console-v3OM8It-.mjs +0 -50
  1013. package/dist/email-console-v3OM8It-.mjs.map +0 -1
  1014. package/dist/email-locale-CoZo-oZx.mjs +0 -25
  1015. package/dist/email-locale-CoZo-oZx.mjs.map +0 -1
  1016. package/dist/emdash-runtime-DwezbIqQ.mjs +0 -4392
  1017. package/dist/emdash-runtime-DwezbIqQ.mjs.map +0 -1
  1018. package/dist/enrich-C3XIJi0O.mjs +0 -194
  1019. package/dist/enrich-C3XIJi0O.mjs.map +0 -1
  1020. package/dist/entry-lock-CY7XpdSw.d.mts +0 -4568
  1021. package/dist/entry-lock-CY7XpdSw.d.mts.map +0 -1
  1022. package/dist/entry-lock-DDuWaAiP.mjs +0 -1211
  1023. package/dist/entry-lock-DDuWaAiP.mjs.map +0 -1
  1024. package/dist/entry-lock-D_Og9Gy3.mjs +0 -163
  1025. package/dist/entry-lock-D_Og9Gy3.mjs.map +0 -1
  1026. package/dist/entry-locks-Cp8_BcQQ.mjs +0 -167
  1027. package/dist/entry-locks-Cp8_BcQQ.mjs.map +0 -1
  1028. package/dist/env-types-Br8uywYA.mjs +0 -38
  1029. package/dist/env-types-Br8uywYA.mjs.map +0 -1
  1030. package/dist/error-CT2SsX5S.mjs +0 -90
  1031. package/dist/error-CT2SsX5S.mjs.map +0 -1
  1032. package/dist/errors-BMaCpLeS.mjs +0 -479
  1033. package/dist/errors-BMaCpLeS.mjs.map +0 -1
  1034. package/dist/errors-DlJwot7q.mjs +0 -120
  1035. package/dist/errors-DlJwot7q.mjs.map +0 -1
  1036. package/dist/escape-BfbDyuQ-.mjs +0 -9
  1037. package/dist/escape-BfbDyuQ-.mjs.map +0 -1
  1038. package/dist/fence-BOD3SxZG.mjs +0 -162
  1039. package/dist/fence-BOD3SxZG.mjs.map +0 -1
  1040. package/dist/field-defs-cache-C7sR7ZeU.mjs +0 -77
  1041. package/dist/field-defs-cache-C7sR7ZeU.mjs.map +0 -1
  1042. package/dist/field-map-C_rDXfdJ.mjs +0 -84
  1043. package/dist/field-map-C_rDXfdJ.mjs.map +0 -1
  1044. package/dist/fts-manager-BzFo0xx6.mjs +0 -483
  1045. package/dist/fts-manager-BzFo0xx6.mjs.map +0 -1
  1046. package/dist/gc-B_c3DPpi.mjs +0 -75
  1047. package/dist/gc-B_c3DPpi.mjs.map +0 -1
  1048. package/dist/hash-A-o2ZX8O.mjs +0 -37
  1049. package/dist/hash-A-o2ZX8O.mjs.map +0 -1
  1050. package/dist/hreflang-BpUK9Lcu.mjs +0 -105
  1051. package/dist/hreflang-BpUK9Lcu.mjs.map +0 -1
  1052. package/dist/hreflang-D07R-RbI.d.mts +0 -50
  1053. package/dist/hreflang-D07R-RbI.d.mts.map +0 -1
  1054. package/dist/http-route-dispatch-C2Ep2Uf6.mjs +0 -342
  1055. package/dist/http-route-dispatch-C2Ep2Uf6.mjs.map +0 -1
  1056. package/dist/identity-BivQ8wkV.mjs +0 -35
  1057. package/dist/identity-BivQ8wkV.mjs.map +0 -1
  1058. package/dist/import-B4UvHNJz.mjs +0 -2126
  1059. package/dist/import-B4UvHNJz.mjs.map +0 -1
  1060. package/dist/index-C37Ty40w.d.mts +0 -623
  1061. package/dist/index-C37Ty40w.d.mts.map +0 -1
  1062. package/dist/install-finalization-BbYaB4wj.mjs +0 -58
  1063. package/dist/install-finalization-BbYaB4wj.mjs.map +0 -1
  1064. package/dist/json-recordset-BjYIWFkV.mjs +0 -12
  1065. package/dist/json-recordset-BjYIWFkV.mjs.map +0 -1
  1066. package/dist/json-schema-Cde7le0s.mjs +0 -15
  1067. package/dist/json-schema-Cde7le0s.mjs.map +0 -1
  1068. package/dist/keys-CusTXpw-.mjs +0 -61
  1069. package/dist/keys-CusTXpw-.mjs.map +0 -1
  1070. package/dist/kinds-DogmNB6n.mjs +0 -974
  1071. package/dist/kinds-DogmNB6n.mjs.map +0 -1
  1072. package/dist/lifecycle-BLCoCz4T.mjs +0 -25
  1073. package/dist/lifecycle-BLCoCz4T.mjs.map +0 -1
  1074. package/dist/load-Dds3KhXr.mjs +0 -28
  1075. package/dist/load-Dds3KhXr.mjs.map +0 -1
  1076. package/dist/loader-D4w4XE7q.mjs +0 -1420
  1077. package/dist/loader-D4w4XE7q.mjs.map +0 -1
  1078. package/dist/loops-IYgzQdQu.mjs +0 -205
  1079. package/dist/loops-IYgzQdQu.mjs.map +0 -1
  1080. package/dist/manifest-builder-CGF5kujD.mjs +0 -196
  1081. package/dist/manifest-builder-CGF5kujD.mjs.map +0 -1
  1082. package/dist/manifest-schema-B0BxPSjB.mjs +0 -497
  1083. package/dist/manifest-schema-B0BxPSjB.mjs.map +0 -1
  1084. package/dist/marketplace-DNvEGLqU.mjs +0 -257
  1085. package/dist/marketplace-DNvEGLqU.mjs.map +0 -1
  1086. package/dist/media-BL9MRrSG.mjs +0 -294
  1087. package/dist/media-BL9MRrSG.mjs.map +0 -1
  1088. package/dist/media-B_x5B9EA.mjs +0 -373
  1089. package/dist/media-B_x5B9EA.mjs.map +0 -1
  1090. package/dist/media-allowlist-CpmqBbIQ.mjs +0 -45
  1091. package/dist/media-allowlist-CpmqBbIQ.mjs.map +0 -1
  1092. package/dist/media-folders-CNs_A_B-.mjs +0 -210
  1093. package/dist/media-folders-CNs_A_B-.mjs.map +0 -1
  1094. package/dist/media-qTTHVkls.mjs +0 -416
  1095. package/dist/media-qTTHVkls.mjs.map +0 -1
  1096. package/dist/media-url-GJboA1fl.mjs +0 -43
  1097. package/dist/media-url-GJboA1fl.mjs.map +0 -1
  1098. package/dist/media-usage-ClWgrX0d.mjs +0 -282
  1099. package/dist/media-usage-ClWgrX0d.mjs.map +0 -1
  1100. package/dist/media-usage-activation-B8Fjtq0h.mjs +0 -78
  1101. package/dist/media-usage-activation-B8Fjtq0h.mjs.map +0 -1
  1102. package/dist/media-usage-work-L8-Au4j-.mjs +0 -1036
  1103. package/dist/media-usage-work-L8-Au4j-.mjs.map +0 -1
  1104. package/dist/media-usage-work-LXgze5j9.mjs +0 -151
  1105. package/dist/media-usage-work-LXgze5j9.mjs.map +0 -1
  1106. package/dist/menus-BAxcbsbv.mjs +0 -818
  1107. package/dist/menus-BAxcbsbv.mjs.map +0 -1
  1108. package/dist/menus-BI6oBXco.mjs +0 -92
  1109. package/dist/menus-BI6oBXco.mjs.map +0 -1
  1110. package/dist/menus-fvGFd4m6.mjs +0 -3725
  1111. package/dist/menus-fvGFd4m6.mjs.map +0 -1
  1112. package/dist/mime-DwhtRyUt.mjs +0 -81
  1113. package/dist/mime-DwhtRyUt.mjs.map +0 -1
  1114. package/dist/mode-DIDSUwuN.mjs +0 -23
  1115. package/dist/mode-DIDSUwuN.mjs.map +0 -1
  1116. package/dist/node-sqlite-compat-Ddr_mlR9.mjs +0 -63
  1117. package/dist/node-sqlite-compat-Ddr_mlR9.mjs.map +0 -1
  1118. package/dist/normalize-Ip_hFAm8.mjs +0 -216
  1119. package/dist/normalize-Ip_hFAm8.mjs.map +0 -1
  1120. package/dist/oauth-authorization-CcMgeT8R.mjs +0 -274
  1121. package/dist/oauth-authorization-CcMgeT8R.mjs.map +0 -1
  1122. package/dist/oauth-clients-C_osi0PU.mjs +0 -266
  1123. package/dist/oauth-clients-C_osi0PU.mjs.map +0 -1
  1124. package/dist/oauth-state-store-DGLP-6CK.mjs +0 -50
  1125. package/dist/oauth-state-store-DGLP-6CK.mjs.map +0 -1
  1126. package/dist/oauth-user-lookup-z77Ee0Hm.mjs +0 -26
  1127. package/dist/oauth-user-lookup-z77Ee0Hm.mjs.map +0 -1
  1128. package/dist/object-cache-EjasjtoQ.mjs +0 -586
  1129. package/dist/object-cache-EjasjtoQ.mjs.map +0 -1
  1130. package/dist/options-CmUpkyKW.d.mts +0 -81
  1131. package/dist/options-CmUpkyKW.d.mts.map +0 -1
  1132. package/dist/ownership-DCk5NutQ.mjs +0 -12
  1133. package/dist/ownership-DCk5NutQ.mjs.map +0 -1
  1134. package/dist/parse-2W-E2f7w.mjs +0 -81
  1135. package/dist/parse-2W-E2f7w.mjs.map +0 -1
  1136. package/dist/parse-6pN8Xqg5.d.mts +0 -176
  1137. package/dist/parse-6pN8Xqg5.d.mts.map +0 -1
  1138. package/dist/passkey-config-DTTZB6EI.mjs +0 -46
  1139. package/dist/passkey-config-DTTZB6EI.mjs.map +0 -1
  1140. package/dist/paths-CQA62503.mjs +0 -77
  1141. package/dist/paths-CQA62503.mjs.map +0 -1
  1142. package/dist/placeholder-BlfXkucE.d.mts +0 -313
  1143. package/dist/placeholder-BlfXkucE.d.mts.map +0 -1
  1144. package/dist/plan-B95eiwnF.mjs +0 -135
  1145. package/dist/plan-B95eiwnF.mjs.map +0 -1
  1146. package/dist/plugin-tool-name-BDA7m4Xa.mjs +0 -27
  1147. package/dist/plugin-tool-name-BDA7m4Xa.mjs.map +0 -1
  1148. package/dist/plugins-BhxLJ008.mjs +0 -261
  1149. package/dist/plugins-BhxLJ008.mjs.map +0 -1
  1150. package/dist/policy-DOJ2sPqB.mjs +0 -53
  1151. package/dist/policy-DOJ2sPqB.mjs.map +0 -1
  1152. package/dist/portable-text-RCMpCj47.mjs +0 -311
  1153. package/dist/portable-text-RCMpCj47.mjs.map +0 -1
  1154. package/dist/preview-DFwL5APO.mjs +0 -107
  1155. package/dist/preview-DFwL5APO.mjs.map +0 -1
  1156. package/dist/protocol-B-ztxp_y.d.mts +0 -65
  1157. package/dist/protocol-B-ztxp_y.d.mts.map +0 -1
  1158. package/dist/public-plugin-api-routes-ik4fPZMv.mjs +0 -316
  1159. package/dist/public-plugin-api-routes-ik4fPZMv.mjs.map +0 -1
  1160. package/dist/public-submission-C5JZIykp.mjs +0 -251
  1161. package/dist/public-submission-C5JZIykp.mjs.map +0 -1
  1162. package/dist/public-url-CQwzRljH.mjs +0 -101
  1163. package/dist/public-url-CQwzRljH.mjs.map +0 -1
  1164. package/dist/query-DuwyFr5Z.mjs +0 -41
  1165. package/dist/query-DuwyFr5Z.mjs.map +0 -1
  1166. package/dist/query-eR_Nz70M.mjs +0 -1157
  1167. package/dist/query-eR_Nz70M.mjs.map +0 -1
  1168. package/dist/range-BQWPjWgQ.mjs +0 -51
  1169. package/dist/range-BQWPjWgQ.mjs.map +0 -1
  1170. package/dist/rate-limit-mPKeQ3sm.mjs +0 -127
  1171. package/dist/rate-limit-mPKeQ3sm.mjs.map +0 -1
  1172. package/dist/receipt-CmUpyuW5.mjs +0 -43
  1173. package/dist/receipt-CmUpyuW5.mjs.map +0 -1
  1174. package/dist/redirect-BtiMkehU.mjs +0 -19
  1175. package/dist/redirect-BtiMkehU.mjs.map +0 -1
  1176. package/dist/redirect-DcmNMvOs.mjs +0 -423
  1177. package/dist/redirect-DcmNMvOs.mjs.map +0 -1
  1178. package/dist/redirect-paths-K5i3xYfR.mjs +0 -36
  1179. package/dist/redirect-paths-K5i3xYfR.mjs.map +0 -1
  1180. package/dist/redirects-BA_TvtuH.mjs +0 -148
  1181. package/dist/redirects-BA_TvtuH.mjs.map +0 -1
  1182. package/dist/redirects-BIrRvgn4.mjs +0 -446
  1183. package/dist/redirects-BIrRvgn4.mjs.map +0 -1
  1184. package/dist/registry-DymfZkAN.mjs +0 -8374
  1185. package/dist/registry-DymfZkAN.mjs.map +0 -1
  1186. package/dist/relations-DrEs3Sc1.mjs +0 -789
  1187. package/dist/relations-DrEs3Sc1.mjs.map +0 -1
  1188. package/dist/request-meta-o8RIf9pa.mjs +0 -141
  1189. package/dist/request-meta-o8RIf9pa.mjs.map +0 -1
  1190. package/dist/resolve-CVy9xgy_.mjs +0 -102
  1191. package/dist/resolve-CVy9xgy_.mjs.map +0 -1
  1192. package/dist/route-cache-DAG5dPhh.mjs +0 -20
  1193. package/dist/route-cache-DAG5dPhh.mjs.map +0 -1
  1194. package/dist/route-wire-Xbsu8Vih.mjs +0 -197
  1195. package/dist/route-wire-Xbsu8Vih.mjs.map +0 -1
  1196. package/dist/routes-YQkSOsws.mjs +0 -272
  1197. package/dist/routes-YQkSOsws.mjs.map +0 -1
  1198. package/dist/runner-CLorw5vo.mjs +0 -6669
  1199. package/dist/runner-CLorw5vo.mjs.map +0 -1
  1200. package/dist/runner-g1A9P-wD.d.mts +0 -73
  1201. package/dist/runner-g1A9P-wD.d.mts.map +0 -1
  1202. package/dist/schema-Bss8qImF.mjs +0 -13
  1203. package/dist/schema-Bss8qImF.mjs.map +0 -1
  1204. package/dist/schema-C036pqEw.mjs +0 -815
  1205. package/dist/schema-C036pqEw.mjs.map +0 -1
  1206. package/dist/scopes-C_SoYl9x.mjs +0 -34
  1207. package/dist/scopes-C_SoYl9x.mjs.map +0 -1
  1208. package/dist/search-uNqCgePJ.mjs +0 -450
  1209. package/dist/search-uNqCgePJ.mjs.map +0 -1
  1210. package/dist/secrets-Cc_O3Kp-.mjs +0 -369
  1211. package/dist/secrets-Cc_O3Kp-.mjs.map +0 -1
  1212. package/dist/sections-BLusMa96.mjs +0 -346
  1213. package/dist/sections-BLusMa96.mjs.map +0 -1
  1214. package/dist/seo-BodxIpws.mjs +0 -188
  1215. package/dist/seo-BodxIpws.mjs.map +0 -1
  1216. package/dist/seo-DaMYIQY8.mjs +0 -133
  1217. package/dist/seo-DaMYIQY8.mjs.map +0 -1
  1218. package/dist/service-BuM1BRsA.mjs +0 -150
  1219. package/dist/service-BuM1BRsA.mjs.map +0 -1
  1220. package/dist/session-user-2DpQDMKw.mjs +0 -61
  1221. package/dist/session-user-2DpQDMKw.mjs.map +0 -1
  1222. package/dist/settings-B3ZmPF_8.mjs +0 -73
  1223. package/dist/settings-B3ZmPF_8.mjs.map +0 -1
  1224. package/dist/settings-P5hwPX6_.mjs +0 -66
  1225. package/dist/settings-P5hwPX6_.mjs.map +0 -1
  1226. package/dist/settings-yIqoN-Ok.mjs +0 -519
  1227. package/dist/settings-yIqoN-Ok.mjs.map +0 -1
  1228. package/dist/setup-complete-eu6MUQnt.mjs +0 -65
  1229. package/dist/setup-complete-eu6MUQnt.mjs.map +0 -1
  1230. package/dist/setup-nonce-CyPOapqY.mjs +0 -25
  1231. package/dist/setup-nonce-CyPOapqY.mjs.map +0 -1
  1232. package/dist/site-domain-8lEJl_0U.mjs +0 -131
  1233. package/dist/site-domain-8lEJl_0U.mjs.map +0 -1
  1234. package/dist/site-settings-uPkW0e6o.mjs +0 -50
  1235. package/dist/site-settings-uPkW0e6o.mjs.map +0 -1
  1236. package/dist/site-url-25SGVXwL.mjs +0 -45
  1237. package/dist/site-url-25SGVXwL.mjs.map +0 -1
  1238. package/dist/sitemap-name-DTK7CYnY.mjs +0 -26
  1239. package/dist/sitemap-name-DTK7CYnY.mjs.map +0 -1
  1240. package/dist/slug-BEDl2IJY.mjs +0 -16
  1241. package/dist/slug-BEDl2IJY.mjs.map +0 -1
  1242. package/dist/snapshot-CvkIBRLY.mjs +0 -414
  1243. package/dist/snapshot-CvkIBRLY.mjs.map +0 -1
  1244. package/dist/ssrf-mcCKMH6B.mjs +0 -406
  1245. package/dist/ssrf-mcCKMH6B.mjs.map +0 -1
  1246. package/dist/stage-BQfGzGOy.mjs +0 -662
  1247. package/dist/stage-BQfGzGOy.mjs.map +0 -1
  1248. package/dist/staged-B5vQGeSf.mjs +0 -686
  1249. package/dist/staged-B5vQGeSf.mjs.map +0 -1
  1250. package/dist/state-dO6t6OxV.mjs +0 -178
  1251. package/dist/state-dO6t6OxV.mjs.map +0 -1
  1252. package/dist/status-DSURZwKS.mjs +0 -30
  1253. package/dist/status-DSURZwKS.mjs.map +0 -1
  1254. package/dist/storage-query-Cy0SZ8iG.d.mts +0 -1619
  1255. package/dist/storage-query-Cy0SZ8iG.d.mts.map +0 -1
  1256. package/dist/tar-DWzcUZ_Q.mjs +0 -449
  1257. package/dist/tar-DWzcUZ_Q.mjs.map +0 -1
  1258. package/dist/target-C9htUbrT.mjs +0 -27
  1259. package/dist/target-C9htUbrT.mjs.map +0 -1
  1260. package/dist/taxonomies-By2aGvq2.mjs +0 -729
  1261. package/dist/taxonomies-By2aGvq2.mjs.map +0 -1
  1262. package/dist/taxonomies-CVRd_jz0.mjs +0 -937
  1263. package/dist/taxonomies-CVRd_jz0.mjs.map +0 -1
  1264. package/dist/taxonomy-BG_xu2Qf.mjs +0 -563
  1265. package/dist/taxonomy-BG_xu2Qf.mjs.map +0 -1
  1266. package/dist/tokens-U5vzgSrM.mjs +0 -171
  1267. package/dist/tokens-U5vzgSrM.mjs.map +0 -1
  1268. package/dist/transfer-DA0OSfaT.mjs +0 -8873
  1269. package/dist/transfer-DA0OSfaT.mjs.map +0 -1
  1270. package/dist/transfer-Pyf3d7ka.mjs +0 -166
  1271. package/dist/transfer-Pyf3d7ka.mjs.map +0 -1
  1272. package/dist/transfer-download-cX7SuWEy.mjs +0 -33
  1273. package/dist/transfer-download-cX7SuWEy.mjs.map +0 -1
  1274. package/dist/transformations-DczubD4j.mjs +0 -196
  1275. package/dist/transformations-DczubD4j.mjs.map +0 -1
  1276. package/dist/transport-DtIrjEFO.mjs +0 -137
  1277. package/dist/transport-DtIrjEFO.mjs.map +0 -1
  1278. package/dist/trusted-proxy-CDRd5Kmw.mjs +0 -51
  1279. package/dist/trusted-proxy-CDRd5Kmw.mjs.map +0 -1
  1280. package/dist/turnstile-Ct5YuFNY.mjs +0 -58
  1281. package/dist/turnstile-Ct5YuFNY.mjs.map +0 -1
  1282. package/dist/types-Bgujop4S.d.mts +0 -374
  1283. package/dist/types-Bgujop4S.d.mts.map +0 -1
  1284. package/dist/types-BirHUEXt.mjs +0 -18
  1285. package/dist/types-BirHUEXt.mjs.map +0 -1
  1286. package/dist/types-BqJgTL_y.d.mts +0 -293
  1287. package/dist/types-BqJgTL_y.d.mts.map +0 -1
  1288. package/dist/types-C-lrOt9T.d.mts +0 -87
  1289. package/dist/types-C-lrOt9T.d.mts.map +0 -1
  1290. package/dist/types-CCEHAhOv.d.mts +0 -916
  1291. package/dist/types-CCEHAhOv.d.mts.map +0 -1
  1292. package/dist/types-CLVwYRBr.d.mts +0 -227
  1293. package/dist/types-CLVwYRBr.d.mts.map +0 -1
  1294. package/dist/types-DVbTb4Hk.mjs +0 -77
  1295. package/dist/types-DVbTb4Hk.mjs.map +0 -1
  1296. package/dist/types-Ddku19Zw.d.mts +0 -209
  1297. package/dist/types-Ddku19Zw.d.mts.map +0 -1
  1298. package/dist/types-FIiGQ3PE.mjs +0 -16
  1299. package/dist/types-FIiGQ3PE.mjs.map +0 -1
  1300. package/dist/types-OauzCOY0.mjs +0 -37
  1301. package/dist/types-OauzCOY0.mjs.map +0 -1
  1302. package/dist/types-mQGTpP-4.d.mts +0 -1741
  1303. package/dist/types-mQGTpP-4.d.mts.map +0 -1
  1304. package/dist/types-nbjz3Mgm.d.mts +0 -125
  1305. package/dist/types-nbjz3Mgm.d.mts.map +0 -1
  1306. package/dist/update-check-hW32-0pf.mjs +0 -161
  1307. package/dist/update-check-hW32-0pf.mjs.map +0 -1
  1308. package/dist/upload-attempts-Bpik1TLF.mjs +0 -32
  1309. package/dist/upload-attempts-Bpik1TLF.mjs.map +0 -1
  1310. package/dist/url-pattern-CJeCyNij.mjs +0 -41
  1311. package/dist/url-pattern-CJeCyNij.mjs.map +0 -1
  1312. package/dist/user-nQInBZbE.mjs +0 -171
  1313. package/dist/user-nQInBZbE.mjs.map +0 -1
  1314. package/dist/utils-govudc_U.mjs +0 -442
  1315. package/dist/utils-govudc_U.mjs.map +0 -1
  1316. package/dist/validate-BxLvcDYh.mjs +0 -524
  1317. package/dist/validate-BxLvcDYh.mjs.map +0 -1
  1318. package/dist/validate-mnoVfASU.d.mts +0 -468
  1319. package/dist/validate-mnoVfASU.d.mts.map +0 -1
  1320. package/dist/validation-DQDEvh87.mjs +0 -221
  1321. package/dist/validation-DQDEvh87.mjs.map +0 -1
  1322. package/dist/version-BOFfLiVT.mjs +0 -49
  1323. package/dist/version-BOFfLiVT.mjs.map +0 -1
  1324. package/dist/version-Dcvx_C9g.mjs +0 -7
  1325. package/dist/version-Dcvx_C9g.mjs.map +0 -1
  1326. package/dist/version-DzTJ3gD7.mjs +0 -9
  1327. package/dist/version-DzTJ3gD7.mjs.map +0 -1
  1328. package/dist/video-BX7AI5nJ.mjs +0 -54
  1329. package/dist/video-BX7AI5nJ.mjs.map +0 -1
  1330. package/dist/virtual-modules-CU29aip9.mjs +0 -515
  1331. package/dist/virtual-modules-CU29aip9.mjs.map +0 -1
  1332. package/dist/widgets-HIeFmZxt.mjs +0 -121
  1333. package/dist/widgets-HIeFmZxt.mjs.map +0 -1
  1334. package/dist/wxr-taxonomies-DyOGhl8W.mjs +0 -454
  1335. package/dist/wxr-taxonomies-DyOGhl8W.mjs.map +0 -1
  1336. package/dist/zod-generator-VxCPVDpo.mjs +0 -425
  1337. package/dist/zod-generator-VxCPVDpo.mjs.map +0 -1
  1338. /package/dist/{ssrf-BBXcxG-f.mjs → ssrf-DM0E-D_8.mjs} +0 -0
@@ -0,0 +1,994 @@
1
+ import { f as __exportAll } from "./runner-Bkkfk4O8.mjs";
2
+ import { t as validateIdentifier } from "./validate-DANX1-Qi.mjs";
3
+ import { m as listTablesLike } from "./dialect-helpers-B1XN2HGB.mjs";
4
+ import { o as getLocaleRank } from "./config-Cs_AwWXI.mjs";
5
+ import { t as after } from "./after-32yNRvd2.mjs";
6
+ import { getRequestContext } from "./request-context.mjs";
7
+ import { n as initWithLock, t as createInitLock } from "./init-lock-BGmew3r1.mjs";
8
+ import { n as localeMatches, r as localeOrder } from "./query-BFHjCzSh.mjs";
9
+ import { l as invalidateBylineObjectCache, u as invalidateCollectionCache } from "./object-cache-DmKr09La.mjs";
10
+ import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-DiW8VMwz.mjs";
11
+ import { i as setRequestCacheEntry, n as peekRequestCache, r as requestCached, t as clearRequestCacheEntry } from "./request-cache-5z2WzWmh.mjs";
12
+ import { i as EmDashValidationError, l as decodeCursor, u as encodeCursor } from "./types-DwhEvIVb.mjs";
13
+ import { t as withTransaction } from "./transaction-CkoQ5wqQ.mjs";
14
+ import { n as BylineSchemaRegistry } from "./byline-registry-BhzpO41z.mjs";
15
+ import { sql } from "kysely";
16
+ import { ulid } from "ulidx";
17
+
18
+ //#region src/bylines/field-defs-cache.ts
19
+ const HOLDER_KEY = Symbol.for("emdash:byline-field-defs");
20
+ const g = globalThis;
21
+ const holder = g[HOLDER_KEY] ?? (() => {
22
+ const h = {
23
+ value: null,
24
+ hasValue: false,
25
+ cachedVersion: -1,
26
+ lock: createInitLock()
27
+ };
28
+ g[HOLDER_KEY] = h;
29
+ return h;
30
+ })();
31
+ const REQUEST_CACHE_KEY_VERSION = "byline-fields-version";
32
+ const REQUEST_CACHE_KEY_DEFS_PREFIX = "byline-field-defs:";
33
+ /**
34
+ * Reclaim window for the single-flight lock: if an owner holds it past
35
+ * this without publishing (e.g. its request was cancelled and the
36
+ * anchored fetch hasn't completed yet), the next reader reclaims and
37
+ * refetches. `listFields` is a single fast SELECT, so this only needs to
38
+ * cover a genuinely slow/stranded query. Mutable solely so tests can
39
+ * shorten it; production never changes it.
40
+ */
41
+ let reclaimDeadlineMs = 1e4;
42
+ /**
43
+ * Read the persisted `options.byline_fields_version` counter. Cached for
44
+ * the duration of the current request via `requestCached`. Returns `0`
45
+ * when the row is missing (matches `BylineSchemaRegistry.getVersion`).
46
+ */
47
+ async function getBylineFieldsVersion(db) {
48
+ return requestCached(REQUEST_CACHE_KEY_VERSION, () => new BylineSchemaRegistry(db).getVersion());
49
+ }
50
+ /**
51
+ * Resolve registered byline custom-field definitions. Two-tier cache:
52
+ * per-request via `requestCached`, then per-isolate via the global
53
+ * holder.
54
+ *
55
+ * The global holder is bypassed for isolated requests (playground / DO
56
+ * preview, which point at a divergent schema) and for dirty versions
57
+ * (odd counter — see `BylineSchemaRegistry`'s class JSDoc — indicates
58
+ * an in-flight or crashed mutation). Both bypass paths still hit the
59
+ * per-request cache, so a single render dedupes within itself.
60
+ *
61
+ * Always returns an array. Empty = no custom fields registered.
62
+ */
63
+ async function getBylineFieldDefs(db) {
64
+ const isolated = getRequestContext()?.dbIsIsolated === true;
65
+ const version = await getBylineFieldsVersion(db);
66
+ const dirty = version % 2 !== 0;
67
+ return requestCached(`${REQUEST_CACHE_KEY_DEFS_PREFIX}${version}`, async () => {
68
+ if (isolated || dirty) return new BylineSchemaRegistry(db).listFields();
69
+ return initWithLock(holder.lock, () => holder.hasValue && holder.cachedVersion === version ? holder.value : null, (isCurrentClaim) => (async () => {
70
+ const defs = await new BylineSchemaRegistry(db).listFields();
71
+ if (isCurrentClaim() && version >= holder.cachedVersion) {
72
+ holder.value = defs;
73
+ holder.hasValue = true;
74
+ holder.cachedVersion = version;
75
+ }
76
+ return defs;
77
+ })(), {
78
+ deadlineMs: reclaimDeadlineMs,
79
+ anchor: (promise) => after(() => promise)
80
+ });
81
+ });
82
+ }
83
+
84
+ //#endregion
85
+ //#region src/database/repositories/byline.ts
86
+ var byline_exports = /* @__PURE__ */ __exportAll({
87
+ BylineRepository: () => BylineRepository,
88
+ coerceFieldValue: () => coerceFieldValue
89
+ });
90
+ function preferLocalizedRows(rows, locale) {
91
+ if (locale === void 0) return rows;
92
+ const selected = /* @__PURE__ */ new Map();
93
+ for (const row of rows) {
94
+ const key = `${row.content_id ?? ""}:${row.translation_group ?? row.id}`;
95
+ const existing = selected.get(key);
96
+ if (!existing || getLocaleRank(row.locale, locale) < getLocaleRank(existing.locale, locale) || getLocaleRank(row.locale, locale) === getLocaleRank(existing.locale, locale) && row.id < existing.id) selected.set(key, row);
97
+ }
98
+ return rows.filter((row) => selected.get(`${row.content_id ?? ""}:${row.translation_group ?? row.id}`) === row);
99
+ }
100
+ function rowToByline(row) {
101
+ return {
102
+ id: row.id,
103
+ slug: row.slug,
104
+ displayName: row.display_name,
105
+ bio: row.bio,
106
+ avatarMediaId: row.avatar_media_id,
107
+ avatarStorageKey: row.avatar_storage_key ?? null,
108
+ avatarAlt: row.avatar_alt ?? null,
109
+ avatarBlurhash: row.avatar_blurhash ?? null,
110
+ avatarDominantColor: row.avatar_dominant_color ?? null,
111
+ websiteUrl: row.website_url,
112
+ userId: row.user_id,
113
+ isGuest: row.is_guest === 1,
114
+ createdAt: row.created_at,
115
+ updatedAt: row.updated_at,
116
+ locale: row.locale,
117
+ translationGroup: row.translation_group
118
+ };
119
+ }
120
+ /**
121
+ * Merge a single decoded value into a `BylineSummary.customFields` map.
122
+ * Centralised so the merge semantics (null storage, JSON.parse failure
123
+ * handling) live in one place across both translatable and group-shared
124
+ * paths.
125
+ *
126
+ * A stored row with `value = NULL` (representing an explicit null) is
127
+ * surfaced as `null` in `customFields`. A row with a malformed JSON
128
+ * payload is dropped silently with a `console.warn` — a corrupted
129
+ * payload shouldn't break the entire byline hydration; the field-defs
130
+ * cache will let admins replace the value, and the warning makes the
131
+ * issue debuggable. (Storage path uses `JSON.stringify`, so the only
132
+ * way to get malformed JSON is direct DB tampering or a future
133
+ * migration bug.)
134
+ */
135
+ function assignCustomFieldValue(summary, field, stored) {
136
+ const target = summary.customFields ?? {};
137
+ if (stored === null) target[field.slug] = null;
138
+ else try {
139
+ target[field.slug] = JSON.parse(stored);
140
+ } catch {
141
+ console.warn(`[BylineRepository] dropping malformed JSON for byline=${summary.id} field=${field.slug}: ${stored.slice(0, 60)}`);
142
+ return;
143
+ }
144
+ summary.customFields = target;
145
+ }
146
+ /**
147
+ * Coerce a raw write-path value to `CustomFieldValue`, throwing
148
+ * `EmDashValidationError` on type mismatch. `null` clears the field
149
+ * (DELETE in the write path).
150
+ *
151
+ * TODO: `field.required` is not enforced. The admin UI exposes the
152
+ * toggle but the backend accepts missing values; design pass needed
153
+ * on the enforcement model.
154
+ */
155
+ function coerceFieldValue(field, raw) {
156
+ if (raw === null) return null;
157
+ switch (field.type) {
158
+ case "string":
159
+ case "text":
160
+ if (typeof raw !== "string") throw new EmDashValidationError(`Byline field "${field.slug}" expects a string value (received ${typeof raw})`, {
161
+ slug: field.slug,
162
+ type: field.type,
163
+ received: typeof raw
164
+ });
165
+ return raw;
166
+ case "url": {
167
+ if (typeof raw !== "string") throw new EmDashValidationError(`Byline field "${field.slug}" expects a string value (received ${typeof raw})`, {
168
+ slug: field.slug,
169
+ type: field.type,
170
+ received: typeof raw
171
+ });
172
+ if (raw === "") return raw;
173
+ let parsed;
174
+ try {
175
+ parsed = new URL(raw);
176
+ } catch {
177
+ throw new EmDashValidationError(`Byline field "${field.slug}" expects a valid URL (received "${raw}")`, {
178
+ slug: field.slug,
179
+ type: field.type,
180
+ received: raw
181
+ });
182
+ }
183
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new EmDashValidationError(`Byline field "${field.slug}" must use http or https scheme (received "${parsed.protocol}")`, {
184
+ slug: field.slug,
185
+ type: field.type,
186
+ received: raw,
187
+ protocol: parsed.protocol
188
+ });
189
+ return raw;
190
+ }
191
+ case "boolean":
192
+ if (typeof raw !== "boolean") throw new EmDashValidationError(`Byline field "${field.slug}" expects a boolean value (received ${typeof raw})`, {
193
+ slug: field.slug,
194
+ type: field.type,
195
+ received: typeof raw
196
+ });
197
+ return raw;
198
+ case "select": {
199
+ if (typeof raw !== "string") throw new EmDashValidationError(`Byline field "${field.slug}" expects a string value (received ${typeof raw})`, {
200
+ slug: field.slug,
201
+ type: field.type,
202
+ received: typeof raw
203
+ });
204
+ const options = field.validation?.options ?? [];
205
+ if (!options.includes(raw)) throw new EmDashValidationError(`Byline field "${field.slug}" value "${raw}" is not one of the registered choices`, {
206
+ slug: field.slug,
207
+ value: raw,
208
+ options
209
+ });
210
+ return raw;
211
+ }
212
+ }
213
+ }
214
+ /**
215
+ * Byline repository for content credits.
216
+ *
217
+ * Bylines are per-locale (migration 040). Translations of the same byline
218
+ * share a `translation_group` ULID. `_emdash_content_bylines.byline_id` and
219
+ * `ec_*.primary_byline_id` store the translation_group (not a row id) so a
220
+ * single credit spans every locale variant of a byline.
221
+ *
222
+ * The repository does not resolve locale fallbacks on its own — callers
223
+ * supply the locale they want. Hydration is strict per locale: a credit at
224
+ * locale X renders iff a byline row exists at locale X within the credited
225
+ * translation group. This mirrors `TaxonomyRepository.getTermsForEntry` and
226
+ * the convention established by PR #916.
227
+ *
228
+ * Runtime helpers in `packages/core/src/bylines/index.ts` may layer fallback
229
+ * resolution on top for the "look up one byline by slug" path, but the
230
+ * relation-hydration methods on this class are always strict.
231
+ */
232
+ var BylineRepository = class {
233
+ constructor(db) {
234
+ this.db = db;
235
+ }
236
+ /**
237
+ * Merge `customFields` onto each `BylineSummary` produced from the
238
+ * given rows. Two batched queries total — one against
239
+ * `_emdash_byline_field_values` (keyed by `byline_id`), one against
240
+ * `_emdash_byline_field_group_values` (keyed by `translation_group`)
241
+ * — both chunked at `SQL_BATCH_SIZE` for D1's bound-parameter cap.
242
+ *
243
+ * When zero fields are registered, every row gets `customFields = {}`
244
+ * with no value-table reads (the field-defs cache returns `[]`).
245
+ * Group-shared values are looked up via the row's `translation_group`,
246
+ * so every locale sibling of the same byline identity sees the same
247
+ * non-translatable value without re-reading per row.
248
+ *
249
+ * **Duplicate-row handling.** Callers (notably `getContentBylinesMany`
250
+ * for list views with repeated authors) can pass the same byline row
251
+ * multiple times. We assign values by *iterating both `rows` and
252
+ * `summaries` in lockstep by index*, not by deduping into a Map keyed
253
+ * on byline id. A Map approach silently drops earlier duplicates' merge
254
+ * step (last writer wins, earlier instances keep their initial `{}`).
255
+ * Iterating by index gives every duplicate its own merged copy.
256
+ *
257
+ * Hydration is *strict per row* — values are merged onto whichever
258
+ * `BylineRow` produced them. Fallback semantics (e.g. "if no value
259
+ * for this locale, show the default-locale value") are not the
260
+ * repository's concern; consumers layer them on top if wanted, the
261
+ * same way `BylineRepository` doesn't resolve locale fallback for
262
+ * the base byline lookup.
263
+ */
264
+ async withCustomFields(rows) {
265
+ const summaries = rows.map(rowToByline);
266
+ for (const summary of summaries) summary.customFields = {};
267
+ await this.applyCustomFieldsTo(summaries);
268
+ return summaries;
269
+ }
270
+ async withCustomFieldsOne(row) {
271
+ if (!row) return null;
272
+ const [result] = await this.withCustomFields([row]);
273
+ return result ?? null;
274
+ }
275
+ /**
276
+ * Hydrate `customFields` on each `BylineSummary`, mutating in place.
277
+ *
278
+ * The public entry point for callers that fetch byline rows in
279
+ * multiple passes (e.g. `getBylinesForEntries`, which buckets by
280
+ * locale and calls `getContentBylinesMany` per bucket) and want a
281
+ * single batched hydration over the union of bylines, not one per
282
+ * pass. Use with the `skipHydration` option on the read methods to
283
+ * defer customFields work to a single call here.
284
+ *
285
+ * Two batched queries total (translatable + group-shared) regardless
286
+ * of how many bylines, locales, or translation_groups are in the
287
+ * input — meets the Phase 3 query-count envelope for mixed-locale
288
+ * list views even when sibling locales reference disjoint
289
+ * translation_groups.
290
+ *
291
+ * Replaces any existing `customFields` on each summary with a freshly
292
+ * fetched map. Callers that want to merge rather than replace should
293
+ * not use this entry point.
294
+ */
295
+ async hydrateBylineCustomFields(summaries) {
296
+ for (const summary of summaries) summary.customFields = {};
297
+ await this.applyCustomFieldsTo(summaries);
298
+ }
299
+ /**
300
+ * Shared merge engine for `withCustomFields` and
301
+ * `hydrateBylineCustomFields`. Reads field defs (cached), batches the
302
+ * translatable + group-shared fetches, and walks `summaries` directly
303
+ * to apply values.
304
+ *
305
+ * Iterates `summaries` (not a `summaryById` map) so duplicate
306
+ * `BylineSummary` objects sharing the same `id` — e.g. the same
307
+ * author credited to multiple entries — each get their own merged
308
+ * values. The previous Map-based dedup silently dropped earlier
309
+ * duplicates' merge step.
310
+ */
311
+ async applyCustomFieldsTo(summaries) {
312
+ if (summaries.length === 0) return;
313
+ const defs = await getBylineFieldDefs(this.db);
314
+ if (defs.length === 0) return;
315
+ const fieldById = new Map(defs.map((d) => [d.id, d]));
316
+ const translatableByByline = /* @__PURE__ */ new Map();
317
+ const bylineIds = [...new Set(summaries.map((s) => s.id))];
318
+ const loadTranslatable = async () => {
319
+ for (const chunk of chunks(bylineIds, SQL_BATCH_SIZE)) {
320
+ const trRows = await this.db.selectFrom("_emdash_byline_field_values").select([
321
+ "byline_id",
322
+ "field_id",
323
+ "value"
324
+ ]).where("byline_id", "in", chunk).execute();
325
+ for (const trRow of trRows) {
326
+ let fieldMap = translatableByByline.get(trRow.byline_id);
327
+ if (!fieldMap) {
328
+ fieldMap = /* @__PURE__ */ new Map();
329
+ translatableByByline.set(trRow.byline_id, fieldMap);
330
+ }
331
+ fieldMap.set(trRow.field_id, trRow.value);
332
+ }
333
+ }
334
+ };
335
+ const groups = [...new Set(summaries.map((s) => s.translationGroup).filter((g) => typeof g === "string" && g.length > 0))];
336
+ const [, groupByGroup] = await Promise.all([loadTranslatable(), this.loadGroupValuesByIds(groups)]);
337
+ for (const summary of summaries) {
338
+ const trValues = translatableByByline.get(summary.id);
339
+ if (trValues) for (const [fieldId, value] of trValues) {
340
+ const field = fieldById.get(fieldId);
341
+ if (!field || !field.translatable) continue;
342
+ assignCustomFieldValue(summary, field, value);
343
+ }
344
+ if (summary.translationGroup) {
345
+ const grpValues = groupByGroup.get(summary.translationGroup);
346
+ if (grpValues) for (const [fieldId, value] of grpValues) {
347
+ const field = fieldById.get(fieldId);
348
+ if (!field || field.translatable) continue;
349
+ assignCustomFieldValue(summary, field, value);
350
+ }
351
+ }
352
+ }
353
+ }
354
+ /**
355
+ * Resolve the group-shared custom-field values for a set of
356
+ * translation_groups, sharing work across hydration calls within the
357
+ * same request via per-group `requestCached` entries.
358
+ *
359
+ * The non-translatable storage table (`_emdash_byline_field_group_values`)
360
+ * is keyed by `translation_group`, which is locale-agnostic. Combining
361
+ * this method with `skipHydration` on `getContentBylinesMany` and a
362
+ * single `hydrateBylineCustomFields` call (see
363
+ * `getBylinesForEntries`) keeps mixed-locale list hydration to **one**
364
+ * batched group-shared SQL per request — even with disjoint
365
+ * translation_groups across locale buckets. Solo callers (`findById`,
366
+ * `findMany`, etc.) still get the same per-call batching they had
367
+ * before; the cache simply means a second call in the same request
368
+ * for an overlapping group is free.
369
+ *
370
+ * Cache key: `byline-field-group-values:${groupId}` — one entry per
371
+ * group. Writes use `setRequestCacheEntry` (idempotent, doesn't
372
+ * overwrite); `BylineRepository.update` calls `clearRequestCacheEntry`
373
+ * after a group-shared write to keep the cache fresh within the same
374
+ * request.
375
+ */
376
+ async loadGroupValuesByIds(groups) {
377
+ const result = /* @__PURE__ */ new Map();
378
+ if (groups.length === 0) return result;
379
+ const missing = [];
380
+ for (const g of groups) {
381
+ const cached = peekRequestCache(`byline-field-group-values:${g}`);
382
+ if (cached) result.set(g, await cached);
383
+ else missing.push(g);
384
+ }
385
+ if (missing.length === 0) return result;
386
+ const fetched = /* @__PURE__ */ new Map();
387
+ for (const g of missing) fetched.set(g, /* @__PURE__ */ new Map());
388
+ for (const chunk of chunks(missing, SQL_BATCH_SIZE)) {
389
+ const grpRows = await this.db.selectFrom("_emdash_byline_field_group_values").select([
390
+ "translation_group",
391
+ "field_id",
392
+ "value"
393
+ ]).where("translation_group", "in", chunk).execute();
394
+ for (const grpRow of grpRows) {
395
+ const fieldMap = fetched.get(grpRow.translation_group);
396
+ if (!fieldMap) continue;
397
+ fieldMap.set(grpRow.field_id, grpRow.value);
398
+ }
399
+ }
400
+ for (const g of missing) {
401
+ const m = fetched.get(g);
402
+ if (!m) continue;
403
+ setRequestCacheEntry(`byline-field-group-values:${g}`, m);
404
+ result.set(g, m);
405
+ }
406
+ return result;
407
+ }
408
+ /**
409
+ * Every byline column plus the avatar's media columns, folded in by the
410
+ * same `LEFT JOIN media` the credit-hydration queries use. Only the
411
+ * single-row finders select this; `findMany` stays a single-table scan.
412
+ */
413
+ selectBylineWithAvatar() {
414
+ return this.db.selectFrom("_emdash_bylines as b").leftJoin("media as m", "m.id", "b.avatar_media_id").selectAll("b").select([
415
+ "m.storage_key as avatar_storage_key",
416
+ "m.alt as avatar_alt",
417
+ "m.blurhash as avatar_blurhash",
418
+ "m.dominant_color as avatar_dominant_color"
419
+ ]);
420
+ }
421
+ async findById(id) {
422
+ const row = await this.selectBylineWithAvatar().where("b.id", "=", id).executeTakeFirst();
423
+ return this.withCustomFieldsOne(row);
424
+ }
425
+ /**
426
+ * Find a byline by slug. When `locale` is provided, filter by it strictly.
427
+ * When omitted, returns the lowest-locale-code match (deterministic across
428
+ * calls). Mirrors `TaxonomyRepository.findBySlug`.
429
+ */
430
+ async findBySlug(slug, options) {
431
+ let query = this.selectBylineWithAvatar().where("b.slug", "=", slug);
432
+ if (options?.locale !== void 0) query = query.where(localeMatches("b.locale", options.locale));
433
+ const row = await query.orderBy(options?.locale !== void 0 ? localeOrder("b.locale", options.locale) : "b.locale", "asc").orderBy("b.id", "asc").executeTakeFirst();
434
+ return this.withCustomFieldsOne(row);
435
+ }
436
+ /**
437
+ * Find the byline linked to a CMS user. Post-migration 040 the partial
438
+ * unique on user_id is `(user_id, locale)`, so `locale` is required to
439
+ * disambiguate when multiple locale variants exist. When omitted, returns
440
+ * the lowest-locale-code match.
441
+ */
442
+ async findByUserId(userId, options) {
443
+ let query = this.selectBylineWithAvatar().where("b.user_id", "=", userId);
444
+ if (options?.locale !== void 0) query = query.where(localeMatches("b.locale", options.locale));
445
+ const row = await query.orderBy(options?.locale !== void 0 ? localeOrder("b.locale", options.locale) : "b.locale", "asc").orderBy("b.id", "asc").executeTakeFirst();
446
+ return this.withCustomFieldsOne(row);
447
+ }
448
+ async findMany(options) {
449
+ const limit = Math.min(Math.max(options?.limit ?? 50, 1), 100);
450
+ let query = this.db.selectFrom("_emdash_bylines").selectAll().orderBy("created_at", "desc").orderBy("id", "desc").limit(limit + 1);
451
+ if (options?.search) {
452
+ const term = `%${options.search.replaceAll("\\", "\\\\").replaceAll("%", "\\%").replaceAll("_", "\\_")}%`;
453
+ query = query.where((eb) => eb.or([eb("display_name", "like", term), eb("slug", "like", term)]));
454
+ }
455
+ if (options?.isGuest !== void 0) query = query.where("is_guest", "=", options.isGuest ? 1 : 0);
456
+ if (options?.userId !== void 0) query = query.where("user_id", "=", options.userId);
457
+ if (options?.locale !== void 0) query = query.where(localeMatches("locale", options.locale));
458
+ if (options?.cursor) {
459
+ const decoded = decodeCursor(options.cursor);
460
+ query = query.where((eb) => eb.or([eb("created_at", "<", decoded.orderValue), eb.and([eb("created_at", "=", decoded.orderValue), eb("id", "<", decoded.id)])]));
461
+ }
462
+ const rows = await query.execute();
463
+ const pageRows = rows.slice(0, limit);
464
+ const items = await this.withCustomFields(pageRows);
465
+ const result = { items };
466
+ if (rows.length > limit) {
467
+ const last = items.at(-1);
468
+ if (last) result.nextCursor = encodeCursor(last.createdAt, last.id);
469
+ }
470
+ return result;
471
+ }
472
+ /**
473
+ * List every sibling row in `translation_group`. Used by the admin
474
+ * `TranslationsPanel` to render one entry per configured locale.
475
+ */
476
+ async listTranslations(id) {
477
+ const anchor = await this.findById(id);
478
+ if (!anchor) return [];
479
+ const group = anchor.translationGroup ?? anchor.id;
480
+ return this.findByTranslationGroup(group);
481
+ }
482
+ /**
483
+ * Direct lookup by `translation_group`. Returns every locale variant of a
484
+ * byline, ordered by locale code (deterministic).
485
+ */
486
+ async findByTranslationGroup(translationGroup) {
487
+ const rows = await this.db.selectFrom("_emdash_bylines").selectAll().where("translation_group", "=", translationGroup).orderBy("locale", "asc").execute();
488
+ return this.withCustomFields(rows);
489
+ }
490
+ /**
491
+ * Validate a `customFields` input map into a write list before any row
492
+ * write — throws `EmDashValidationError` on unknown slugs, type
493
+ * mismatches, or select-choice misses.
494
+ */
495
+ async resolveCustomFieldWrites(customFields) {
496
+ if (!customFields || Object.keys(customFields).length === 0) return [];
497
+ const defs = await getBylineFieldDefs(this.db);
498
+ const bySlug = new Map(defs.map((d) => [d.slug, d]));
499
+ const writes = [];
500
+ for (const [slug, raw] of Object.entries(customFields)) {
501
+ const field = bySlug.get(slug);
502
+ if (!field) throw new EmDashValidationError(`Unknown byline custom field "${slug}"`, {
503
+ slug,
504
+ registered: defs.map((d) => d.slug)
505
+ });
506
+ writes.push({
507
+ field,
508
+ value: coerceFieldValue(field, raw)
509
+ });
510
+ }
511
+ return writes;
512
+ }
513
+ /**
514
+ * Write a validated custom-field list against a byline row inside the
515
+ * caller's transaction. Per-field writes route to
516
+ * `_emdash_byline_field_values` (translatable) or
517
+ * `_emdash_byline_field_group_values` (group-shared); `null` clears.
518
+ * Returns `true` when any group-shared row was touched so the caller
519
+ * can invalidate the per-request cache post-commit.
520
+ */
521
+ async applyCustomFieldWritesInTrx(trx, bylineId, translationGroup, writes, now) {
522
+ if (writes.length === 0) return false;
523
+ let touchedGroupShared = false;
524
+ for (const { field, value } of writes) {
525
+ if (!field.translatable) touchedGroupShared = true;
526
+ if (field.translatable) if (value === null) await trx.deleteFrom("_emdash_byline_field_values").where("byline_id", "=", bylineId).where("field_id", "=", field.id).execute();
527
+ else {
528
+ const encoded = JSON.stringify(value);
529
+ await trx.insertInto("_emdash_byline_field_values").values({
530
+ byline_id: bylineId,
531
+ field_id: field.id,
532
+ value: encoded,
533
+ created_at: now,
534
+ updated_at: now
535
+ }).onConflict((oc) => oc.columns(["byline_id", "field_id"]).doUpdateSet({
536
+ value: encoded,
537
+ updated_at: now
538
+ })).execute();
539
+ }
540
+ else if (value === null) await trx.deleteFrom("_emdash_byline_field_group_values").where("translation_group", "=", translationGroup).where("field_id", "=", field.id).execute();
541
+ else {
542
+ const encoded = JSON.stringify(value);
543
+ await trx.insertInto("_emdash_byline_field_group_values").values({
544
+ translation_group: translationGroup,
545
+ field_id: field.id,
546
+ value: encoded,
547
+ created_at: now,
548
+ updated_at: now
549
+ }).onConflict((oc) => oc.columns(["translation_group", "field_id"]).doUpdateSet({
550
+ value: encoded,
551
+ updated_at: now
552
+ })).execute();
553
+ }
554
+ }
555
+ return touchedGroupShared;
556
+ }
557
+ async create(input) {
558
+ const id = ulid();
559
+ const now = (/* @__PURE__ */ new Date()).toISOString();
560
+ const customFieldWrites = await this.resolveCustomFieldWrites(input.customFields);
561
+ let translationGroup = id;
562
+ if (input.translationOf) {
563
+ const source = await this.findById(input.translationOf);
564
+ if (!source) throw new Error("Source byline for translation not found");
565
+ translationGroup = source.translationGroup ?? source.id;
566
+ }
567
+ let touchedGroupShared = false;
568
+ await withTransaction(this.db, async (trx) => {
569
+ await trx.insertInto("_emdash_bylines").values({
570
+ id,
571
+ slug: input.slug,
572
+ display_name: input.displayName,
573
+ bio: input.bio ?? null,
574
+ avatar_media_id: input.avatarMediaId ?? null,
575
+ website_url: input.websiteUrl ?? null,
576
+ user_id: input.userId ?? null,
577
+ is_guest: input.isGuest ? 1 : 0,
578
+ created_at: now,
579
+ updated_at: now,
580
+ ...input.locale !== void 0 ? { locale: input.locale } : {},
581
+ translation_group: translationGroup
582
+ }).execute();
583
+ touchedGroupShared = await this.applyCustomFieldWritesInTrx(trx, id, translationGroup, customFieldWrites, now);
584
+ });
585
+ if (touchedGroupShared) clearRequestCacheEntry(`byline-field-group-values:${translationGroup}`);
586
+ invalidateBylineObjectCache();
587
+ const byline = await this.findById(id);
588
+ if (!byline) throw new Error("Failed to create byline");
589
+ return byline;
590
+ }
591
+ async update(id, input) {
592
+ const existing = await this.findById(id);
593
+ if (!existing) return null;
594
+ const customFieldWrites = await this.resolveCustomFieldWrites(input.customFields);
595
+ const now = (/* @__PURE__ */ new Date()).toISOString();
596
+ const updates = { updated_at: now };
597
+ if (input.slug !== void 0) updates.slug = input.slug;
598
+ if (input.displayName !== void 0) updates.display_name = input.displayName;
599
+ if (input.bio !== void 0) updates.bio = input.bio;
600
+ if (input.avatarMediaId !== void 0) updates.avatar_media_id = input.avatarMediaId;
601
+ if (input.websiteUrl !== void 0) updates.website_url = input.websiteUrl;
602
+ if (input.userId !== void 0) updates.user_id = input.userId;
603
+ if (input.isGuest !== void 0) updates.is_guest = input.isGuest ? 1 : 0;
604
+ const group = existing.translationGroup ?? existing.id;
605
+ let touchedGroupShared = false;
606
+ await withTransaction(this.db, async (trx) => {
607
+ await trx.updateTable("_emdash_bylines").set(updates).where("id", "=", id).execute();
608
+ touchedGroupShared = await this.applyCustomFieldWritesInTrx(trx, id, group, customFieldWrites, now);
609
+ });
610
+ if (touchedGroupShared) clearRequestCacheEntry(`byline-field-group-values:${group}`);
611
+ invalidateBylineObjectCache();
612
+ return await this.findById(id);
613
+ }
614
+ /**
615
+ * Delete a byline row. When this row is the last sibling in its
616
+ * translation group, also drops every junction row pointing at the group,
617
+ * clears `primary_byline_id` references, and removes the byline's
618
+ * non-translatable custom-field values. When other siblings remain in
619
+ * the group, junctions, `primary_byline_id` pointers, and group-shared
620
+ * custom-field values stay intact — the credit (and its shared metadata)
621
+ * lives on at other locales.
622
+ *
623
+ * **Application-level cascade.** The byline domain has standardised on
624
+ * app-level cascade rather than trusting FK ON DELETE CASCADE, partly
625
+ * because migration 040 had to strip its own FK to support the
626
+ * translation_group remap (#1021), and partly so cleanup doesn't
627
+ * depend on `PRAGMA foreign_keys = ON` (set in production via
628
+ * `connection.ts:60`, but easy to bypass in tests, scripts, and
629
+ * one-off tools). Every byline-related deletion table is cleared
630
+ * explicitly here:
631
+ *
632
+ * - `_emdash_byline_field_values` (per-byline translatable values) —
633
+ * migration 041 declares FK ON DELETE CASCADE on `byline_id`; the
634
+ * explicit DELETE removes the dependency on that pragma.
635
+ * - `_emdash_content_bylines` — migration 040 dropped its FK.
636
+ * - `ec_*.primary_byline_id` — never had an FK.
637
+ * - `_emdash_byline_field_group_values` (translation-group-keyed) —
638
+ * keyed by a text column with no FK to bylines, so app-level cleanup
639
+ * is the only path.
640
+ *
641
+ * The FKs that remain (migration 041) serve as defense-in-depth.
642
+ */
643
+ async delete(id) {
644
+ const existing = await this.findById(id);
645
+ if (!existing) return false;
646
+ const group = existing.translationGroup ?? existing.id;
647
+ await withTransaction(this.db, async (trx) => {
648
+ await trx.deleteFrom("_emdash_byline_field_values").where("byline_id", "=", id).execute();
649
+ await trx.deleteFrom("_emdash_bylines").where("id", "=", id).execute();
650
+ const remaining = await trx.selectFrom("_emdash_bylines").select(({ fn }) => [fn.count("id").as("count")]).where("translation_group", "=", group).executeTakeFirst();
651
+ if (Number(remaining?.count ?? 0) > 0) return;
652
+ await trx.deleteFrom("_emdash_content_bylines").where("byline_id", "=", group).execute();
653
+ await trx.deleteFrom("_emdash_byline_field_group_values").where("translation_group", "=", group).execute();
654
+ const tableNames = await listTablesLike(trx, "ec_%");
655
+ for (const tableName of tableNames) {
656
+ validateIdentifier(tableName, "content table");
657
+ await sql`
658
+ UPDATE ${sql.ref(tableName)}
659
+ SET primary_byline_id = NULL
660
+ WHERE primary_byline_id = ${group}
661
+ `.execute(trx);
662
+ }
663
+ });
664
+ invalidateBylineObjectCache();
665
+ return true;
666
+ }
667
+ /**
668
+ * Strict per-locale credit hydration. Joins `_emdash_content_bylines` to
669
+ * `_emdash_bylines` on `translation_group = byline_id`, then filters to
670
+ * the requested locale. Credits whose translation group lacks a row at
671
+ * the requested locale are omitted — callers wanting fallback behaviour
672
+ * apply it themselves. Mirrors `TaxonomyRepository.getTermsForEntry`.
673
+ */
674
+ async getContentBylines(collectionSlug, contentId, options) {
675
+ let query = this.db.selectFrom("_emdash_content_bylines as cb").innerJoin("_emdash_bylines as b", "b.translation_group", "cb.byline_id").leftJoin("media as m", "m.id", "b.avatar_media_id").select([
676
+ "cb.sort_order as sort_order",
677
+ "cb.role_label as role_label",
678
+ "b.id as id",
679
+ "b.slug as slug",
680
+ "b.display_name as display_name",
681
+ "b.bio as bio",
682
+ "b.avatar_media_id as avatar_media_id",
683
+ "m.storage_key as avatar_storage_key",
684
+ "m.alt as avatar_alt",
685
+ "m.blurhash as avatar_blurhash",
686
+ "m.dominant_color as avatar_dominant_color",
687
+ "b.website_url as website_url",
688
+ "b.user_id as user_id",
689
+ "b.is_guest as is_guest",
690
+ "b.created_at as created_at",
691
+ "b.updated_at as updated_at",
692
+ "b.locale as locale",
693
+ "b.translation_group as translation_group"
694
+ ]).where("cb.collection_slug", "=", collectionSlug).where("cb.content_id", "=", contentId).orderBy("cb.sort_order", "asc");
695
+ if (options?.locale !== void 0) query = query.where(localeMatches("b.locale", options.locale));
696
+ const rows = preferLocalizedRows(await query.execute(), options?.locale);
697
+ const bylineRows = rows.map((row) => ({
698
+ id: row.id,
699
+ slug: row.slug,
700
+ display_name: row.display_name,
701
+ bio: row.bio,
702
+ avatar_media_id: row.avatar_media_id,
703
+ avatar_storage_key: row.avatar_storage_key,
704
+ avatar_alt: row.avatar_alt,
705
+ avatar_blurhash: row.avatar_blurhash,
706
+ avatar_dominant_color: row.avatar_dominant_color,
707
+ website_url: row.website_url,
708
+ user_id: row.user_id,
709
+ is_guest: row.is_guest,
710
+ created_at: row.created_at,
711
+ updated_at: row.updated_at,
712
+ locale: row.locale,
713
+ translation_group: row.translation_group
714
+ }));
715
+ const hydrated = await this.withCustomFields(bylineRows);
716
+ return rows.map((row, i) => {
717
+ const byline = hydrated[i];
718
+ if (!byline) throw new Error("getContentBylines: hydration row count mismatch");
719
+ return {
720
+ byline,
721
+ sortOrder: row.sort_order,
722
+ roleLabel: row.role_label
723
+ };
724
+ });
725
+ }
726
+ /**
727
+ * Does this entry have any explicit byline credits — at any locale?
728
+ *
729
+ * Used to disambiguate "no credits exist" (fall back to author-linked
730
+ * byline) from "credits exist but don't resolve at the requested locale"
731
+ * (strict per-locale model: render no byline). Without this check the
732
+ * locale-strict hydration would silently turn a missing translation into
733
+ * an author-inferred byline, contradicting editorial intent.
734
+ */
735
+ async hasContentBylines(collectionSlug, contentId) {
736
+ return await this.db.selectFrom("_emdash_content_bylines").select("id").where("collection_slug", "=", collectionSlug).where("content_id", "=", contentId).limit(1).executeTakeFirst() !== void 0;
737
+ }
738
+ /**
739
+ * Batch variant of `hasContentBylines`. Returns the set of content IDs
740
+ * that have at least one junction row (locale-agnostic).
741
+ */
742
+ async hasContentBylinesMany(collectionSlug, contentIds) {
743
+ const result = /* @__PURE__ */ new Set();
744
+ if (contentIds.length === 0) return result;
745
+ const uniqueContentIds = [...new Set(contentIds)];
746
+ for (const chunk of chunks(uniqueContentIds, SQL_BATCH_SIZE)) {
747
+ const rows = await this.db.selectFrom("_emdash_content_bylines").select("content_id").distinct().where("collection_slug", "=", collectionSlug).where("content_id", "in", chunk).execute();
748
+ for (const row of rows) result.add(row.content_id);
749
+ }
750
+ return result;
751
+ }
752
+ /**
753
+ * Batch variant of `getContentBylines`. Same strict-per-locale semantics
754
+ * applied to the requested locale (single value, not per-entry).
755
+ *
756
+ * When callers need per-entry-locale filtering (e.g. a list endpoint
757
+ * returning entries at mixed locales), they should group the input ids by
758
+ * the entry's locale and call this method once per group.
759
+ *
760
+ * When the caller will issue multiple `getContentBylinesMany` calls in
761
+ * one request (e.g. per locale bucket) and wants a *single* batched
762
+ * customFields hydration over the union of returned bylines, pass
763
+ * `skipHydration: true` on each call and finish with
764
+ * `hydrateBylineCustomFields(allBylines)`. The returned bylines carry
765
+ * `customFields = {}` until that hydration call runs — matching the
766
+ * "always populated" invariant from AC #6 — so callers that forget to
767
+ * hydrate get an empty map rather than `undefined`.
768
+ */
769
+ async getContentBylinesMany(collectionSlug, contentIds, options) {
770
+ const result = /* @__PURE__ */ new Map();
771
+ if (contentIds.length === 0) return result;
772
+ const uniqueContentIds = [...new Set(contentIds)];
773
+ for (const chunk of chunks(uniqueContentIds, SQL_BATCH_SIZE)) {
774
+ let query = this.db.selectFrom("_emdash_content_bylines as cb").innerJoin("_emdash_bylines as b", "b.translation_group", "cb.byline_id").leftJoin("media as m", "m.id", "b.avatar_media_id").select([
775
+ "cb.content_id as content_id",
776
+ "cb.sort_order as sort_order",
777
+ "cb.role_label as role_label",
778
+ "b.id as id",
779
+ "b.slug as slug",
780
+ "b.display_name as display_name",
781
+ "b.bio as bio",
782
+ "b.avatar_media_id as avatar_media_id",
783
+ "m.storage_key as avatar_storage_key",
784
+ "m.alt as avatar_alt",
785
+ "m.blurhash as avatar_blurhash",
786
+ "m.dominant_color as avatar_dominant_color",
787
+ "b.website_url as website_url",
788
+ "b.user_id as user_id",
789
+ "b.is_guest as is_guest",
790
+ "b.created_at as created_at",
791
+ "b.updated_at as updated_at",
792
+ "b.locale as locale",
793
+ "b.translation_group as translation_group"
794
+ ]).where("cb.collection_slug", "=", collectionSlug).where("cb.content_id", "in", chunk).orderBy("cb.sort_order", "asc");
795
+ if (options?.locale !== void 0) query = query.where(localeMatches("b.locale", options.locale));
796
+ const rows = preferLocalizedRows(await query.execute(), options?.locale);
797
+ const bylineRows = rows.map((row) => ({
798
+ id: row.id,
799
+ slug: row.slug,
800
+ display_name: row.display_name,
801
+ bio: row.bio,
802
+ avatar_media_id: row.avatar_media_id,
803
+ avatar_storage_key: row.avatar_storage_key,
804
+ avatar_alt: row.avatar_alt,
805
+ avatar_blurhash: row.avatar_blurhash,
806
+ avatar_dominant_color: row.avatar_dominant_color,
807
+ website_url: row.website_url,
808
+ user_id: row.user_id,
809
+ is_guest: row.is_guest,
810
+ created_at: row.created_at,
811
+ updated_at: row.updated_at,
812
+ locale: row.locale,
813
+ translation_group: row.translation_group
814
+ }));
815
+ let bylines;
816
+ if (options?.skipHydration === true) {
817
+ bylines = bylineRows.map(rowToByline);
818
+ for (const b of bylines) b.customFields = {};
819
+ } else bylines = await this.withCustomFields(bylineRows);
820
+ for (let i = 0; i < rows.length; i++) {
821
+ const row = rows[i];
822
+ const byline = bylines[i];
823
+ if (!row || !byline) continue;
824
+ const contentId = row.content_id;
825
+ const credit = {
826
+ byline,
827
+ sortOrder: row.sort_order,
828
+ roleLabel: row.role_label
829
+ };
830
+ const existing = result.get(contentId);
831
+ if (existing) existing.push(credit);
832
+ else result.set(contentId, [credit]);
833
+ }
834
+ }
835
+ return result;
836
+ }
837
+ /**
838
+ * Batch-fetch byline profiles linked to user IDs in a single query.
839
+ * Strict-locale variant of `findByUserId`.
840
+ *
841
+ * `skipHydration: true` returns bylines with `customFields = {}` so
842
+ * callers issuing multiple `findByUserIds` calls in one request (e.g.
843
+ * the per-locale-bucket author-fallback path in `getBylinesForEntries`)
844
+ * can defer customFields hydration to a single batched
845
+ * `hydrateBylineCustomFields` call across the union — keeping the
846
+ * Phase 3 query-count envelope at "+1 group-shared query per
847
+ * hydration pass" even when buckets fetch disjoint author bylines.
848
+ */
849
+ async findByUserIds(userIds, options) {
850
+ const result = /* @__PURE__ */ new Map();
851
+ if (userIds.length === 0) return result;
852
+ for (const chunk of chunks(userIds, SQL_BATCH_SIZE)) {
853
+ let query = this.db.selectFrom("_emdash_bylines as b").leftJoin("media as m", "m.id", "b.avatar_media_id").select([
854
+ "b.id as id",
855
+ "b.slug as slug",
856
+ "b.display_name as display_name",
857
+ "b.bio as bio",
858
+ "b.avatar_media_id as avatar_media_id",
859
+ "m.storage_key as avatar_storage_key",
860
+ "m.alt as avatar_alt",
861
+ "m.blurhash as avatar_blurhash",
862
+ "m.dominant_color as avatar_dominant_color",
863
+ "b.website_url as website_url",
864
+ "b.user_id as user_id",
865
+ "b.is_guest as is_guest",
866
+ "b.created_at as created_at",
867
+ "b.updated_at as updated_at",
868
+ "b.locale as locale",
869
+ "b.translation_group as translation_group"
870
+ ]).where("b.user_id", "in", chunk);
871
+ if (options?.locale !== void 0) query = query.where(localeMatches("b.locale", options.locale));
872
+ const rows = await query.execute();
873
+ let bylines;
874
+ if (options?.skipHydration === true) {
875
+ bylines = rows.map(rowToByline);
876
+ for (const b of bylines) b.customFields = {};
877
+ } else bylines = await this.withCustomFields(rows);
878
+ for (let i = 0; i < rows.length; i++) {
879
+ const row = rows[i];
880
+ const summary = bylines[i];
881
+ if (!row || !summary || !row.user_id) continue;
882
+ const existing = result.get(row.user_id);
883
+ if (!existing || options?.locale === void 0 || getLocaleRank(row.locale, options.locale) < getLocaleRank(existing.locale, options.locale) || getLocaleRank(row.locale, options.locale) === getLocaleRank(existing.locale, options.locale) && row.id < existing.id) result.set(row.user_id, summary);
884
+ }
885
+ }
886
+ return result;
887
+ }
888
+ /**
889
+ * Clone every junction row from `sourceContentId` to `targetContentId`,
890
+ * preserving `sort_order` and `role_label`. Used by the content
891
+ * translation flow: a newly created translation inherits the source's
892
+ * byline credits at the storage level. Because the junction stores
893
+ * `translation_group` (not a row id), the copy is locale-agnostic — the
894
+ * credits resolve to whichever locale variants of each byline exist when
895
+ * the translated entry is hydrated.
896
+ *
897
+ * No-op when the source has no credits. Skips when the target already
898
+ * has credits (idempotent for re-runs).
899
+ */
900
+ async copyContentBylines(collection, sourceContentId, targetContentId) {
901
+ validateIdentifier(collection, "collection slug");
902
+ const tableName = `ec_${collection}`;
903
+ validateIdentifier(tableName, "content table");
904
+ if (await this.db.selectFrom("_emdash_content_bylines").select("id").where("collection_slug", "=", collection).where("content_id", "=", targetContentId).executeTakeFirst()) return;
905
+ const sourceRows = await this.db.selectFrom("_emdash_content_bylines").select([
906
+ "byline_id",
907
+ "sort_order",
908
+ "role_label"
909
+ ]).where("collection_slug", "=", collection).where("content_id", "=", sourceContentId).orderBy("sort_order", "asc").execute();
910
+ if (sourceRows.length === 0) return;
911
+ const now = (/* @__PURE__ */ new Date()).toISOString();
912
+ await this.db.insertInto("_emdash_content_bylines").values(sourceRows.map((row) => ({
913
+ id: ulid(),
914
+ collection_slug: collection,
915
+ content_id: targetContentId,
916
+ byline_id: row.byline_id,
917
+ sort_order: row.sort_order,
918
+ role_label: row.role_label,
919
+ created_at: now
920
+ }))).execute();
921
+ const firstByline = sourceRows[0]?.byline_id ?? null;
922
+ await sql`
923
+ UPDATE ${sql.ref(tableName)}
924
+ SET primary_byline_id = ${firstByline}
925
+ WHERE id = ${targetContentId}
926
+ `.execute(this.db);
927
+ invalidateCollectionCache(collection);
928
+ }
929
+ /**
930
+ * Replace the set of byline credits on a content entry. Accepts row ids
931
+ * at the wire (consistent with how the admin sends them), translates
932
+ * each to its `translation_group` on write, and stores the group in
933
+ * `_emdash_content_bylines.byline_id` and `ec_*.primary_byline_id`.
934
+ *
935
+ * The returned credits are hydrated with strict-locale matching at the
936
+ * locale of the rows the caller supplied (i.e. the locale of the byline
937
+ * each `bylineId` resolves to) — adequate for the autosave round-trip,
938
+ * which then re-hydrates the entry against its own locale separately.
939
+ */
940
+ async setContentBylines(collectionSlug, contentId, inputBylines) {
941
+ validateIdentifier(collectionSlug, "collection slug");
942
+ const tableName = `ec_${collectionSlug}`;
943
+ validateIdentifier(tableName, "content table");
944
+ const idToGroup = /* @__PURE__ */ new Map();
945
+ const wireIds = [...new Set(inputBylines.map((item) => item.bylineId))];
946
+ for (const batch of chunks(wireIds, SQL_BATCH_SIZE)) {
947
+ const rows = await this.db.selectFrom("_emdash_bylines").select(["id", "translation_group"]).where("id", "in", batch).execute();
948
+ if (rows.length !== batch.length) throw new Error("One or more byline IDs do not exist");
949
+ for (const row of rows) idToGroup.set(row.id, row.translation_group ?? row.id);
950
+ }
951
+ const seenGroups = /* @__PURE__ */ new Set();
952
+ const bylines = [];
953
+ for (const item of inputBylines) {
954
+ const group = idToGroup.get(item.bylineId);
955
+ if (!group) throw new Error(`Missing translation_group for byline ${item.bylineId}`);
956
+ if (seenGroups.has(group)) continue;
957
+ seenGroups.add(group);
958
+ bylines.push({
959
+ ...item,
960
+ group
961
+ });
962
+ }
963
+ await this.db.deleteFrom("_emdash_content_bylines").where("collection_slug", "=", collectionSlug).where("content_id", "=", contentId).execute();
964
+ for (let i = 0; i < bylines.length; i++) {
965
+ const item = bylines[i];
966
+ if (!item) continue;
967
+ await this.db.insertInto("_emdash_content_bylines").values({
968
+ id: ulid(),
969
+ collection_slug: collectionSlug,
970
+ content_id: contentId,
971
+ byline_id: item.group,
972
+ sort_order: i,
973
+ role_label: item.roleLabel ?? null,
974
+ created_at: (/* @__PURE__ */ new Date()).toISOString()
975
+ }).execute();
976
+ }
977
+ const primaryGroup = bylines[0]?.group ?? null;
978
+ await sql`
979
+ UPDATE ${sql.ref(tableName)}
980
+ SET primary_byline_id = ${primaryGroup}
981
+ WHERE id = ${contentId}
982
+ `.execute(this.db);
983
+ invalidateCollectionCache(collectionSlug);
984
+ return await this.getContentBylines(collectionSlug, contentId);
985
+ }
986
+ async deleteContentBylines(collectionSlug, contentId) {
987
+ const result = await this.db.deleteFrom("_emdash_content_bylines").where("collection_slug", "=", collectionSlug).where("content_id", "=", contentId).executeTakeFirst();
988
+ return Number(result.numDeletedRows ?? 0);
989
+ }
990
+ };
991
+
992
+ //#endregion
993
+ export { byline_exports as n, coerceFieldValue as r, BylineRepository as t };
994
+ //# sourceMappingURL=byline-DHJS-GGb.mjs.map