admin-ui-starter-kit 0.6.1 → 0.6.4

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 (498) hide show
  1. package/.agents/skills/component-library-rules/references/components/services__hooks.md +6 -1
  2. package/dist/_shared/{auth-B_KVUjsB.cjs → auth-DdezEtKK.cjs} +2 -2
  3. package/dist/_shared/{auth-B_KVUjsB.cjs.map → auth-DdezEtKK.cjs.map} +1 -1
  4. package/dist/_shared/{auth-C_TgyzDl.js → auth-e7yab9pK.js} +2 -2
  5. package/dist/_shared/{auth-C_TgyzDl.js.map → auth-e7yab9pK.js.map} +1 -1
  6. package/dist/_shared/{buttons-C8jy-jMd.cjs → buttons-Bek9F7qK.cjs} +2 -2
  7. package/dist/_shared/{buttons-C8jy-jMd.cjs.map → buttons-Bek9F7qK.cjs.map} +1 -1
  8. package/dist/_shared/{buttons-MxvdokeK.js → buttons-DcynMPnE.js} +2 -2
  9. package/dist/_shared/{buttons-MxvdokeK.js.map → buttons-DcynMPnE.js.map} +1 -1
  10. package/dist/_shared/cards-CbbHly7W.cjs +2 -0
  11. package/dist/_shared/cards-CbbHly7W.cjs.map +1 -0
  12. package/dist/_shared/{cards-CtBoSZG9.js → cards-RZxRLx3f.js} +6 -6
  13. package/dist/_shared/cards-RZxRLx3f.js.map +1 -0
  14. package/dist/_shared/{comments-DGBxF9fD.js → comments-BJqgvSFY.js} +2 -2
  15. package/dist/_shared/{comments-DGBxF9fD.js.map → comments-BJqgvSFY.js.map} +1 -1
  16. package/dist/_shared/{comments-C8iXy9XO.cjs → comments-BjPciQfo.cjs} +2 -2
  17. package/dist/_shared/{comments-C8iXy9XO.cjs.map → comments-BjPciQfo.cjs.map} +1 -1
  18. package/dist/_shared/{data-display-C_44_V-W.cjs → data-display-C21skrV4.cjs} +2 -2
  19. package/dist/_shared/{data-display-C_44_V-W.cjs.map → data-display-C21skrV4.cjs.map} +1 -1
  20. package/dist/_shared/{data-display-CRFaMkxT.js → data-display-C5-1dZua.js} +71 -71
  21. package/dist/_shared/{data-display-CRFaMkxT.js.map → data-display-C5-1dZua.js.map} +1 -1
  22. package/dist/_shared/{forms-qnwoUqxf.js → forms-BoquZE2Y.js} +3 -3
  23. package/dist/_shared/{forms-qnwoUqxf.js.map → forms-BoquZE2Y.js.map} +1 -1
  24. package/dist/_shared/{forms-rmKcy5uO.cjs → forms-CzrEYejY.cjs} +2 -2
  25. package/dist/_shared/{forms-rmKcy5uO.cjs.map → forms-CzrEYejY.cjs.map} +1 -1
  26. package/dist/_shared/{overlays-CdtMAkKG.js → overlays-DW8OIK5R.js} +134 -47
  27. package/dist/_shared/overlays-DW8OIK5R.js.map +1 -0
  28. package/dist/_shared/overlays-Du65iCkx.cjs +2 -0
  29. package/dist/_shared/overlays-Du65iCkx.cjs.map +1 -0
  30. package/dist/_shared/{page-C6EzwvTz.cjs → page-D8UMXREv.cjs} +2 -2
  31. package/dist/_shared/{page-C6EzwvTz.cjs.map → page-D8UMXREv.cjs.map} +1 -1
  32. package/dist/_shared/{page-DCW1eWCJ.js → page-D9LNsHMN.js} +2 -2
  33. package/dist/_shared/{page-DCW1eWCJ.js.map → page-D9LNsHMN.js.map} +1 -1
  34. package/dist/_shared/{settings-QOBrbgdN.js → settings-BeZOIEJB.js} +2 -2
  35. package/dist/_shared/{settings-QOBrbgdN.js.map → settings-BeZOIEJB.js.map} +1 -1
  36. package/dist/_shared/{settings-DbAyxMrX.cjs → settings-DI-K34bW.cjs} +2 -2
  37. package/dist/_shared/{settings-DbAyxMrX.cjs.map → settings-DI-K34bW.cjs.map} +1 -1
  38. package/dist/_shared/{table-CUA_A-oO.js → table-B_pqCQxC.js} +3 -3
  39. package/dist/_shared/table-B_pqCQxC.js.map +1 -0
  40. package/dist/_shared/table-CGVOXtdv.cjs +2 -0
  41. package/dist/_shared/table-CGVOXtdv.cjs.map +1 -0
  42. package/dist/components/base/buttons/index.cjs +1 -1
  43. package/dist/components/base/buttons/index.js +1 -1
  44. package/dist/components/base/cards/index.cjs +1 -1
  45. package/dist/components/base/cards/index.js +1 -1
  46. package/dist/components/base/forms/index.cjs +1 -1
  47. package/dist/components/base/forms/index.js +1 -1
  48. package/dist/components/base/table/index.cjs +1 -1
  49. package/dist/components/base/table/index.js +1 -1
  50. package/dist/components/composed/admin/index.cjs +1 -1
  51. package/dist/components/composed/admin/index.js +2 -2
  52. package/dist/components/composed/ai/index.cjs +1 -1
  53. package/dist/components/composed/ai/index.js +2 -2
  54. package/dist/components/composed/analytics/index.cjs +1 -1
  55. package/dist/components/composed/analytics/index.js +1 -1
  56. package/dist/components/composed/cards/index.cjs +1 -1
  57. package/dist/components/composed/cards/index.js +2 -2
  58. package/dist/components/composed/commerce/index.cjs +1 -1
  59. package/dist/components/composed/commerce/index.js +2 -2
  60. package/dist/components/composed/dark-surfaces/index.cjs +1 -1
  61. package/dist/components/composed/dark-surfaces/index.js +1 -1
  62. package/dist/components/composed/data-display/index.cjs +1 -1
  63. package/dist/components/composed/data-display/index.js +1 -1
  64. package/dist/components/composed/data-display/metadata/metadata-list.d.ts.map +1 -1
  65. package/dist/components/composed/navigation/index.cjs +1 -1
  66. package/dist/components/composed/navigation/index.js +1 -1
  67. package/dist/components/composed/timelines/index.cjs +1 -1
  68. package/dist/components/composed/timelines/index.js +1 -1
  69. package/dist/components/features/activities/index.cjs +1 -1
  70. package/dist/components/features/activities/index.js +1 -1
  71. package/dist/components/features/card/index.cjs +1 -1
  72. package/dist/components/features/card/index.js +2 -2
  73. package/dist/components/features/comments/index.cjs +1 -1
  74. package/dist/components/features/comments/index.js +1 -1
  75. package/dist/components/features/event-log/index.cjs +1 -1
  76. package/dist/components/features/event-log/index.js +2 -2
  77. package/dist/components/features/media-library/index.cjs +1 -1
  78. package/dist/components/features/media-library/index.js +2 -2
  79. package/dist/components/features/overlays/hooks/index.d.ts +1 -0
  80. package/dist/components/features/overlays/hooks/index.d.ts.map +1 -1
  81. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +33 -0
  82. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts.map +1 -0
  83. package/dist/components/features/overlays/index.cjs +1 -1
  84. package/dist/components/features/overlays/index.d.ts +1 -1
  85. package/dist/components/features/overlays/index.d.ts.map +1 -1
  86. package/dist/components/features/overlays/index.js +2 -2
  87. package/dist/components/features/products/index.cjs +1 -1
  88. package/dist/components/features/products/index.js +4 -4
  89. package/dist/components/features/resource/index.cjs +1 -1
  90. package/dist/components/features/resource/index.js +2 -2
  91. package/dist/components/features/schema-form/index.cjs +1 -1
  92. package/dist/components/features/schema-form/index.js +2 -2
  93. package/dist/components/layout/auth/index.cjs +1 -1
  94. package/dist/components/layout/auth/index.js +1 -1
  95. package/dist/components/layout/index.cjs +1 -1
  96. package/dist/components/layout/index.js +3 -3
  97. package/dist/components/layout/page/index.cjs +1 -1
  98. package/dist/components/layout/page/index.js +1 -1
  99. package/dist/components/layout/settings/index.cjs +1 -1
  100. package/dist/components/layout/settings/index.js +1 -1
  101. package/dist/services/actions/index.cjs +1 -1
  102. package/dist/services/actions/index.js +1 -1
  103. package/dist/showcase/assets/{AreaChart-CGkuyNyy.js → AreaChart-Y0ZwblHU.js} +1 -1
  104. package/dist/showcase/assets/{CompositeItem-DAQ048AO.js → CompositeItem-BIY_Cp7P.js} +1 -1
  105. package/dist/showcase/assets/{CompositeRoot-8-OuCMMq.js → CompositeRoot-DSPvBRQr.js} +1 -1
  106. package/dist/showcase/assets/{DialogTrigger-1P-jwcoH.js → DialogTrigger-DHUp8vXe.js} +1 -1
  107. package/dist/showcase/assets/{LabelableContext-BDyZArAc.js → LabelableContext-CasUI4hR.js} +1 -1
  108. package/dist/showcase/assets/{PreviewLayout-wYGhlcJt.js → PreviewLayout-B_l930k0.js} +1 -1
  109. package/dist/showcase/assets/{RadioGroup-DuiI4W--.js → RadioGroup-BgZ-UH79.js} +1 -1
  110. package/dist/showcase/assets/{ScrollAreaCorner-Df5uTkWT.js → ScrollAreaCorner-BbwFElLA.js} +1 -1
  111. package/dist/showcase/assets/{Separator-BuTBo5a_.js → Separator-dQuencsA.js} +1 -1
  112. package/dist/showcase/assets/{ToolbarRootContext-B4S4Fn7d.js → ToolbarRootContext-BE0hbejq.js} +1 -1
  113. package/dist/showcase/assets/{accordion-D3beuJpC.js → accordion-D93ZNsLn.js} +1 -1
  114. package/dist/showcase/assets/{accordion-variants-BTMpfSPI.js → accordion-variants-Bl4bIQH4.js} +1 -1
  115. package/dist/showcase/assets/{action-menu-DsAr1OqF.js → action-menu--rEgMzDi.js} +1 -1
  116. package/dist/showcase/assets/{actions-BzyHAEZR.js → actions-3iedOWD9.js} +1 -1
  117. package/dist/showcase/assets/{activities-BgoelWKu.js → activities-CyrAWFlu.js} +1 -1
  118. package/dist/showcase/assets/{activities-feed-card-DI4MIm3-.js → activities-feed-card-bhIATc2O.js} +1 -1
  119. package/dist/showcase/assets/{admin-n-JemkNh.js → admin-CZzNsj2q.js} +1 -1
  120. package/dist/showcase/assets/{ai-BXyk1mT0.js → ai-CasHwkW4.js} +1 -1
  121. package/dist/showcase/assets/{ai-artifact-C8CmZ94f.js → ai-artifact-BgWvrLAb.js} +1 -1
  122. package/dist/showcase/assets/{ai-chat-CTQQ4e4X.js → ai-chat-seS9aW-1.js} +1 -1
  123. package/dist/showcase/assets/{ai-elements-DGnlBq8E.js → ai-elements-Tku5_ous.js} +1 -1
  124. package/dist/showcase/assets/{ai-tool-call-bHnWNBtN.js → ai-tool-call-BU6xbmXG.js} +1 -1
  125. package/dist/showcase/assets/{alert-bPnj3_cC.js → alert-6Emt6KX2.js} +1 -1
  126. package/dist/showcase/assets/{alert-CIHGXUul.js → alert-B6aLWiRW.js} +1 -1
  127. package/dist/showcase/assets/{alert-N79A6qIx.js → alert-CtoTQ0vN.js} +1 -1
  128. package/dist/showcase/assets/{api-key-list-Bf1KoRJq.js → api-key-list-C0glWR3z.js} +1 -1
  129. package/dist/showcase/assets/{api-key-list-DyZ_DaRx.js → api-key-list-DcWSbY3u.js} +1 -1
  130. package/dist/showcase/assets/{app-sidebar-Co0LUSvz.js → app-sidebar-D_eNP_jh.js} +1 -1
  131. package/dist/showcase/assets/arrow-down-qyKZ1H5j.js +1 -0
  132. package/dist/showcase/assets/arrow-left-C9I0h_su.js +1 -0
  133. package/dist/showcase/assets/arrow-right-DswaRsr6.js +1 -0
  134. package/dist/showcase/assets/arrow-up-5BijPOxK.js +1 -0
  135. package/dist/showcase/assets/arrow-up-right-CbVVNT6g.js +1 -0
  136. package/dist/showcase/assets/{avatar-DKLsNeBi.js → avatar-BYHVCvVW.js} +1 -1
  137. package/dist/showcase/assets/{avatar-D3kvVy00.js → avatar-BlLAVC87.js} +1 -1
  138. package/dist/showcase/assets/{avatar-CJaCYGWf.js → avatar-DQTXjcS4.js} +1 -1
  139. package/dist/showcase/assets/{avatar-CxwFyL4T.js → avatar-DveZy09C.js} +1 -1
  140. package/dist/showcase/assets/{badge-CSMmwDLr.js → badge-Bth3mRTh.js} +1 -1
  141. package/dist/showcase/assets/{badge-check-TQRmqI7C.js → badge-check-DocF8Ho3.js} +1 -1
  142. package/dist/showcase/assets/{bell-CwRy7zpP.js → bell-DXBoeAzi.js} +1 -1
  143. package/dist/showcase/assets/{bot-Bt02Uzhq.js → bot-Ch-Y1HK8.js} +1 -1
  144. package/dist/showcase/assets/{box-Bfv5RQBf.js → box-72m9QSDa.js} +1 -1
  145. package/dist/showcase/assets/{braces-CxUoAPd4.js → braces-CC17X3TE.js} +1 -1
  146. package/dist/showcase/assets/{brain-CNapE0CP.js → brain-Dvbla_5x.js} +1 -1
  147. package/dist/showcase/assets/{brand-CBq1YoS0.js → brand-D5ciAq8v.js} +1 -1
  148. package/dist/showcase/assets/{breadcrumb-DyXpErBT.js → breadcrumb-BBCaOVyz.js} +1 -1
  149. package/dist/showcase/assets/{breadcrumb-DRioiUd_.js → breadcrumb-Bt8yVTCj.js} +1 -1
  150. package/dist/showcase/assets/{breadcrumbs-BzHeoItO.js → breadcrumbs-CkVWfcAN.js} +1 -1
  151. package/dist/showcase/assets/{briefcase-N74Hu0O2.js → briefcase-8rQTJwpE.js} +1 -1
  152. package/dist/showcase/assets/{building-2-D81ygy-F.js → building-2-CV7gTtXz.js} +1 -1
  153. package/dist/showcase/assets/{button-Bgqg7AmN.js → button-HGjoBio3.js} +1 -1
  154. package/dist/showcase/assets/{button-group-DPV1XIW3.js → button-group-LWToSCrp.js} +1 -1
  155. package/dist/showcase/assets/{buttons-qpZWlILG.js → buttons-Bn_dX6Kk.js} +1 -1
  156. package/dist/showcase/assets/{calendar-DcYyOrNY.js → calendar-BTsffmY8.js} +1 -1
  157. package/dist/showcase/assets/{calendar-BXG5CwbY.js → calendar-Bhpyn4u0.js} +1 -1
  158. package/dist/showcase/assets/{calendar-D-CSqGtC.js → calendar-DjrUTKcD.js} +1 -1
  159. package/dist/showcase/assets/{calendar-days-CNNiyV9e.js → calendar-days-BKCkzWjV.js} +1 -1
  160. package/dist/showcase/assets/{camera-D0yVo0xC.js → camera-EjpDG3mc.js} +1 -1
  161. package/dist/showcase/assets/{card-CH7Ev3xS.js → card-Bp6iGuOF.js} +1 -1
  162. package/dist/showcase/assets/{card-Bl-y9-8y.js → card-CHc6AVFt.js} +1 -1
  163. package/dist/showcase/assets/card-primitives-Bv6XGPJd.js +1 -0
  164. package/dist/showcase/assets/{card-radio-group-DpeIWyiO.js → card-radio-group-Ce9FsiSv.js} +1 -1
  165. package/dist/showcase/assets/{cards-7xave3ub.js → cards-_CGG9zir.js} +1 -1
  166. package/dist/showcase/assets/{carousel--kHTFkC7.js → carousel-BVbsKH2W.js} +1 -1
  167. package/dist/showcase/assets/{cell-renderers-Cx8rAZln.js → cell-renderers-CosD6Gby.js} +1 -1
  168. package/dist/showcase/assets/{chart-DU8INHbt.js → chart-CwOp8Sf8.js} +1 -1
  169. package/dist/showcase/assets/{chart-column-Dbekq8cy.js → chart-column-sz871NdJ.js} +1 -1
  170. package/dist/showcase/assets/{checkbox-ClPnzko9.js → checkbox-BO38TYqr.js} +1 -1
  171. package/dist/showcase/assets/checkbox-W4MhlPlJ.js +1 -0
  172. package/dist/showcase/assets/chevron-down-BFh1Fz2P.js +1 -0
  173. package/dist/showcase/assets/chevron-left-C5_X5glO.js +1 -0
  174. package/dist/showcase/assets/chevron-up-DPH3boVS.js +1 -0
  175. package/dist/showcase/assets/chevrons-up-down-CM5mIDaw.js +1 -0
  176. package/dist/showcase/assets/circle-BFDzL1iF.js +1 -0
  177. package/dist/showcase/assets/{circle-alert-9j29FrsT.js → circle-alert-C6MbOB0m.js} +1 -1
  178. package/dist/showcase/assets/circle-check-C0X85t4j.js +1 -0
  179. package/dist/showcase/assets/circle-check-big-CBaodck_.js +1 -0
  180. package/dist/showcase/assets/circle-dot-DdRpIhnL.js +1 -0
  181. package/dist/showcase/assets/{circle-question-mark-BRiF5RV4.js → circle-question-mark-CKlcead7.js} +1 -1
  182. package/dist/showcase/assets/{circle-x-BF20gddw.js → circle-x-MO44aKHe.js} +1 -1
  183. package/dist/showcase/assets/clock-3-CXQJFcbh.js +1 -0
  184. package/dist/showcase/assets/clock-GhBJJ6n1.js +1 -0
  185. package/dist/showcase/assets/{code-xml-D2f-X63y.js → code-xml-BSX7Qyi5.js} +1 -1
  186. package/dist/showcase/assets/{collapsible-CF0oQTVS.js → collapsible-CZLTO5EH.js} +1 -1
  187. package/dist/showcase/assets/{collapsible-Ru5-bssh.js → collapsible-LrDO_sSQ.js} +1 -1
  188. package/dist/showcase/assets/{combobox-DpJTW_Rq.js → combobox-TmDBXkM-.js} +1 -1
  189. package/dist/showcase/assets/{command-Dno8Ogez.js → command-9-r1qrJt.js} +1 -1
  190. package/dist/showcase/assets/{command-LRFStKBy.js → command-DGne3l9s.js} +1 -1
  191. package/dist/showcase/assets/{comment-composer-Dht7nfbv.js → comment-composer-BI0qnvuY.js} +1 -1
  192. package/dist/showcase/assets/{comment-item-B6IgQsMr.js → comment-item-Cedds6Lm.js} +1 -1
  193. package/dist/showcase/assets/{comments-B3ksV3Mn.js → comments-De02NOns.js} +1 -1
  194. package/dist/showcase/assets/{commerce-B1_Offbz.js → commerce-DldtS83o.js} +1 -1
  195. package/dist/showcase/assets/{composite-BjQWIYF-.js → composite-BjZZlzzb.js} +1 -1
  196. package/dist/showcase/assets/{contact-card-Bss4YHZz.js → contact-card-muCZ3uXV.js} +1 -1
  197. package/dist/showcase/assets/{content-container-D4BM1Zro.js → content-container-BxSLICeL.js} +1 -1
  198. package/dist/showcase/assets/{copyable-Dst8oaw5.js → copyable-DYhhmTqM.js} +1 -1
  199. package/dist/showcase/assets/{copyable-C0J88R_R.js → copyable-MNU75-J9.js} +1 -1
  200. package/dist/showcase/assets/{course-card-BuqwjqtO.js → course-card-Dl1wsuJx.js} +1 -1
  201. package/dist/showcase/assets/{cpu-CFy0M0rN.js → cpu-CsWq4fcX.js} +1 -1
  202. package/dist/showcase/assets/{credit-card-CFq0S1Ma.js → credit-card-B0AUZiWw.js} +1 -1
  203. package/dist/showcase/assets/{css-variables-BAALjDwD.js → css-variables-Be7DzahT.js} +1 -1
  204. package/dist/showcase/assets/{currency-BZzZRv2_.js → currency-BtPM_Xtw.js} +1 -1
  205. package/dist/showcase/assets/{dark-surfaces-CVKt2Yww.js → dark-surfaces-DRFERSEv.js} +1 -1
  206. package/dist/showcase/assets/{data-view-Be0uoLqL.js → data-view-DmWd0h7G.js} +2 -2
  207. package/dist/showcase/assets/{data-view-D6_zyFwk.js → data-view-DnLH2o0i.js} +1 -1
  208. package/dist/showcase/assets/{database-DSC-ysYT.js → database-C0YqGaQ_.js} +1 -1
  209. package/dist/showcase/assets/{date-block-Bgu_LMxB.js → date-block-BQH25FLS.js} +1 -1
  210. package/dist/showcase/assets/{date-picker-ByYEZGMg.js → date-picker-BF-jevhh.js} +1 -1
  211. package/dist/showcase/assets/{date-pickers-DzSQrvWs.js → date-pickers-q2v3ajJm.js} +1 -1
  212. package/dist/showcase/assets/{dense-info-BhFkOQbt.js → dense-info-Cb-roqDU.js} +1 -1
  213. package/dist/showcase/assets/{design-system-consistency-D6iCJLcr.js → design-system-consistency-DMSJknaM.js} +1 -1
  214. package/dist/showcase/assets/{dialog-C1heXuxu.js → dialog-C0ALRmbP.js} +1 -1
  215. package/dist/showcase/assets/{dialog-DzrcsKvl.js → dialog-CbXon08k.js} +1 -1
  216. package/dist/showcase/assets/{display-utilities-eu-EVMrx.js → display-utilities-kBUVw7o3.js} +1 -1
  217. package/dist/showcase/assets/{dist-DV4Tv32d.js → dist-CTSkWj_M.js} +1 -1
  218. package/dist/showcase/assets/{dist-BlIID0_L.js → dist-W8bxVfew.js} +1 -1
  219. package/dist/showcase/assets/{dollar-sign-qp4G3P_K.js → dollar-sign-VNxVZleW.js} +1 -1
  220. package/dist/showcase/assets/{download-zlcHjSdS.js → download-Ds_6eIpx.js} +1 -1
  221. package/dist/showcase/assets/{dropdown-menu-DZ47rJaE.js → dropdown-menu-C1G_y9dv.js} +1 -1
  222. package/dist/showcase/assets/{dropzone-Dx4EqBHu.js → dropzone-CxOLmdkt.js} +1 -1
  223. package/dist/showcase/assets/{earth-BuXqXHh6.js → earth-HLyEI1oq.js} +1 -1
  224. package/dist/showcase/assets/{ellipsis-DgAjMZHc.js → ellipsis-BLyAd9A-.js} +1 -1
  225. package/dist/showcase/assets/{ellipsis-vertical-BA8_YMyV.js → ellipsis-vertical-TG4mYU2J.js} +1 -1
  226. package/dist/showcase/assets/{empty-DXjKmyNv.js → empty-B54k9xAG.js} +1 -1
  227. package/dist/showcase/assets/{empty-item-DIGWYsI0.js → empty-item-BmA4rmq7.js} +1 -1
  228. package/dist/showcase/assets/{empty-state-BSc0tQNC.js → empty-state-CH7gjjg7.js} +1 -1
  229. package/dist/showcase/assets/{empty-state-CkixFVN1.js → empty-state-hUKvmKa-.js} +1 -1
  230. package/dist/showcase/assets/{enhanced-activities-CKbHgR4f.js → enhanced-activities-BRDVL9RR.js} +1 -1
  231. package/dist/showcase/assets/{enhanced-combobox-DAKQyFUg.js → enhanced-combobox-2wbQJS6R.js} +1 -1
  232. package/dist/showcase/assets/{esm-C3PfkuOc.js → esm-CUTefMLr.js} +1 -1
  233. package/dist/showcase/assets/{event-calendar-rNju8jaT.js → event-calendar-Bf9xFZlt.js} +1 -1
  234. package/dist/showcase/assets/{event-log-BUK1blGb.js → event-log-CeRDSL-h.js} +1 -1
  235. package/dist/showcase/assets/{example-PsbgbESI.js → example-CJMJcnb4.js} +1 -1
  236. package/dist/showcase/assets/{external-link-CgB9zfWz.js → external-link-CvXhYrnd.js} +1 -1
  237. package/dist/showcase/assets/{eye-YnIHbdKe.js → eye-Cl_GfUKH.js} +1 -1
  238. package/dist/showcase/assets/{feature-announcement-CWwjAPI1.js → feature-announcement-Dw0SokLo.js} +1 -1
  239. package/dist/showcase/assets/{file-3Z2xkc-8.js → file-CJFWrwy1.js} +1 -1
  240. package/dist/showcase/assets/{file-text-BQeGXxPG.js → file-text-BTTFP8Jo.js} +1 -1
  241. package/dist/showcase/assets/{filter-layout-D7YskzbC.js → filter-layout-DUVqG5Ql.js} +1 -1
  242. package/dist/showcase/assets/{filters-2YY_wVwq.js → filters-BLcCaplV.js} +1 -1
  243. package/dist/showcase/assets/{flag-Bw3wwRgF.js → flag-BxI3EGPG.js} +1 -1
  244. package/dist/showcase/assets/{folder-open-CZ5Bq4lK.js → folder-open-4d8qsiAj.js} +1 -1
  245. package/dist/showcase/assets/{form-field-AWNJL9FM.js → form-field-Dhy0eM5B.js} +1 -1
  246. package/dist/showcase/assets/{format-DUU7-42g.js → format-zGqa9Olc.js} +1 -1
  247. package/dist/showcase/assets/{forms-CWJ3HBbk.js → forms-D99qG5Gb.js} +1 -1
  248. package/dist/showcase/assets/{funnel-vxNNph7w.js → funnel-Cg7SOShf.js} +1 -1
  249. package/dist/showcase/assets/{generic-DlyFJDj6.js → generic-CfrG943t.js} +1 -1
  250. package/dist/showcase/assets/{getPseudoElementBounds-CibNto5h.js → getPseudoElementBounds-lw5shsdM.js} +1 -1
  251. package/dist/showcase/assets/{gift-BjRHqTcQ.js → gift-BXtKbzvA.js} +1 -1
  252. package/dist/showcase/assets/{giftcard-cards-DcujCFff.js → giftcard-cards-CqYaN0jC.js} +1 -1
  253. package/dist/showcase/assets/{git-branch-B7XnpQE0.js → git-branch-BWAuIMOQ.js} +1 -1
  254. package/dist/showcase/assets/{global-search-CWvNfmpe.js → global-search-CHUva8pR.js} +1 -1
  255. package/dist/showcase/assets/{global-search-Ct7I1Xd2.js → global-search-Df7JovOG.js} +1 -1
  256. package/dist/showcase/assets/{globe-CHleXWd2.js → globe-CvIW_foU.js} +1 -1
  257. package/dist/showcase/assets/{gradient-card-Bw4oJljh.js → gradient-card-CdM2J1Hv.js} +1 -1
  258. package/dist/showcase/assets/{hash-BVGqnm6_.js → hash-wBs5gyr_.js} +1 -1
  259. package/dist/showcase/assets/{header-CgApizpk.js → header-DXPFmpUT.js} +1 -1
  260. package/dist/showcase/assets/{header-notifications-B2v1Mdri.js → header-notifications-FsnCJLpe.js} +1 -1
  261. package/dist/showcase/assets/{heart-BwvHCA-d.js → heart-B4fOMIr6.js} +1 -1
  262. package/dist/showcase/assets/{hooks-A_AQLIRZ.js → hooks-DtMOMalj.js} +6 -3
  263. package/dist/showcase/assets/{house-opqNxOmP.js → house-hebmAxEE.js} +1 -1
  264. package/dist/showcase/assets/{icon-badge-ognVhKWR.js → icon-badge-DrZ5qGpa.js} +1 -1
  265. package/dist/showcase/assets/{icon-badge-CsG95J1Z.js → icon-badge-JEug_P_U.js} +1 -1
  266. package/dist/showcase/assets/{image-apDSlTAx.js → image-CxNywgkb.js} +1 -1
  267. package/dist/showcase/assets/{inbox-WrbeTKEw.js → inbox-DqAmGdDd.js} +1 -1
  268. package/dist/showcase/assets/index-DujM0kEF.css +2 -0
  269. package/dist/showcase/assets/{index-QESvAJrb.js → index-jD-KSiHu.js} +2 -2
  270. package/dist/showcase/assets/inertValue-Dg9TwvOb.js +1 -0
  271. package/dist/showcase/assets/{info-C3G9KRCx.js → info-B5fZn_ZC.js} +1 -1
  272. package/dist/showcase/assets/{inline-stat-CO01t7SJ.js → inline-stat-CklKufoA.js} +1 -1
  273. package/dist/showcase/assets/{inline-stat-BnjUqzDM.js → inline-stat-Dep7oHIi.js} +1 -1
  274. package/dist/showcase/assets/{input-yYoqWQQ7.js → input-CkNgwwCs.js} +1 -1
  275. package/dist/showcase/assets/{input-CBJy1dMs.js → input-DAPMRlKO.js} +1 -1
  276. package/dist/showcase/assets/{input-group-CZyYSq4r.js → input-group-06D68uB6.js} +1 -1
  277. package/dist/showcase/assets/{input-group-Dfqufdp4.js → input-group-Bq9aXQPG.js} +1 -1
  278. package/dist/showcase/assets/{inputs-Bhw_FGDY.js → inputs-C8G3y-zR.js} +1 -1
  279. package/dist/showcase/assets/{installation-DnvS2ZUn.js → installation-BV5xOvoE.js} +1 -1
  280. package/dist/showcase/assets/{invoice-header-B9Ak8GXX.js → invoice-header-BcUxzT68.js} +1 -1
  281. package/dist/showcase/assets/{invoice-items-DY5zUZhE.js → invoice-items-B42Jfxl7.js} +1 -1
  282. package/dist/showcase/assets/{invoice-mini-BAryECEH.js → invoice-mini-RJGdlErg.js} +1 -1
  283. package/dist/showcase/assets/{invoice-table-BUvjee74.js → invoice-table--MdP6ysv.js} +1 -1
  284. package/dist/showcase/assets/isSameDay-srttAIjD.js +1 -0
  285. package/dist/showcase/assets/isToday-BPub5Zvi.js +1 -0
  286. package/dist/showcase/assets/{italic-CjQCLJci.js → italic-1BNA_XlU.js} +1 -1
  287. package/dist/showcase/assets/{item-DxPwk321.js → item-B9KyqUGa.js} +1 -1
  288. package/dist/showcase/assets/{item-D1Jxrpia.js → item-DoIlPm6J.js} +1 -1
  289. package/dist/showcase/assets/{item-BMSdEK3V.js → item-ffIfXEGd.js} +1 -1
  290. package/dist/showcase/assets/{kanban-DXWCGieQ.js → kanban-Cfad3edR.js} +1 -1
  291. package/dist/showcase/assets/{key-round-DpuhXiJQ.js → key-round-J11Zc216.js} +1 -1
  292. package/dist/showcase/assets/{label-D1wLK5nY.js → label-DqaB8ZB2.js} +1 -1
  293. package/dist/showcase/assets/{languages-CGYZVmbV.js → languages-D9UaP3QU.js} +1 -1
  294. package/dist/showcase/assets/{layers-DJZSVGAu.js → layers-QXZ9Jfej.js} +1 -1
  295. package/dist/showcase/assets/{layout-app-shell-UX63nzTO.js → layout-app-shell-CW1eRJmU.js} +1 -1
  296. package/dist/showcase/assets/{layout-auth-Bav5BBqp.js → layout-auth-j4K6lveg.js} +1 -1
  297. package/dist/showcase/assets/{layout-containers-DMHD2zdV.js → layout-containers-NclLtsV0.js} +1 -1
  298. package/dist/showcase/assets/{layout-header-CGesu_kM.js → layout-header-B8AOTiwL.js} +1 -1
  299. package/dist/showcase/assets/{layout-page-DHXu8SIv.js → layout-page-DM79QHyW.js} +1 -1
  300. package/dist/showcase/assets/{layout-primitives-CokzGwd2.js → layout-primitives-Dyop-WMt.js} +1 -1
  301. package/dist/showcase/assets/{layout-sidebar-CLUYajcu.js → layout-sidebar-uBNaHqjD.js} +1 -1
  302. package/dist/showcase/assets/{layout-users-DHUNAnFA.js → layout-users-BkhDiOOz.js} +1 -1
  303. package/dist/showcase/assets/{layout-workspace-y0v2FpDW.js → layout-workspace-C2hSimZW.js} +1 -1
  304. package/dist/showcase/assets/{lib-g_kR7X9Z.js → lib-CDssULuD.js} +1 -1
  305. package/dist/showcase/assets/{list-checks-CXt8visd.js → list-checks-DA2jqXdm.js} +1 -1
  306. package/dist/showcase/assets/{lock-CpZ5kLUd.js → lock-BDZLNQLR.js} +1 -1
  307. package/dist/showcase/assets/{lock-keyhole-Cy2raRO6.js → lock-keyhole-CWYENd9O.js} +1 -1
  308. package/dist/showcase/assets/{mail-Cj6uT4TA.js → mail-CCdaRmft.js} +1 -1
  309. package/dist/showcase/assets/{mail-check-Di70bdf6.js → mail-check-DZF1VbCX.js} +1 -1
  310. package/dist/showcase/assets/{map-DMXbG_04.js → map-CDFEmmZH.js} +3 -3
  311. package/dist/showcase/assets/{map-pin-EKhu7vEj.js → map-pin-CdV-R6nt.js} +1 -1
  312. package/dist/showcase/assets/{media-library-Dnp9S0oW.js → media-library-BJyn1s9d.js} +1 -1
  313. package/dist/showcase/assets/{mention-inline-suggestions-Bp-fVNYF.js → mention-inline-suggestions-DPO6FhXx.js} +1 -1
  314. package/dist/showcase/assets/{mentions-DNRk30XZ.js → mentions-DtWHbcS6.js} +1 -1
  315. package/dist/showcase/assets/{menus-DFURb5VL.js → menus-BmjngFE4.js} +1 -1
  316. package/dist/showcase/assets/{message-square-DG0qIsG_.js → message-square-bM29txT3.js} +1 -1
  317. package/dist/showcase/assets/{metadata-list-Cb1DQd4S.js → metadata-list-DvYTAJri.js} +1 -1
  318. package/dist/showcase/assets/metadata-list-xVUTVyy9.js +1 -0
  319. package/dist/showcase/assets/{metric-BkzIsP8H.js → metric-BPNCh4eA.js} +1 -1
  320. package/dist/showcase/assets/{metric-bar-CU73nx89.js → metric-bar-BX4sCMrM.js} +1 -1
  321. package/dist/showcase/assets/{metric-grid-BMLMbLjE.js → metric-grid-IyHP3nmU.js} +1 -1
  322. package/dist/showcase/assets/{metric-trend-chip-Dutl5uZo.js → metric-trend-chip-Dih8eR17.js} +1 -1
  323. package/dist/showcase/assets/{metrics-analytics-bar-AqG2oyIy.js → metrics-analytics-bar-DK16RNMs.js} +1 -1
  324. package/dist/showcase/assets/{metrics-analytics-cards-CrFHmR2f.js → metrics-analytics-cards-Byyl13YT.js} +1 -1
  325. package/dist/showcase/assets/{metrics-comparison-CY-DyLv7.js → metrics-comparison-DGHFMBL-.js} +1 -1
  326. package/dist/showcase/assets/{metrics-heatmap-BmX_CkiP.js → metrics-heatmap-Bl6C7i0j.js} +1 -1
  327. package/dist/showcase/assets/{metrics-inline-badge-C1IFjdJN.js → metrics-inline-badge-Bz79zbNK.js} +1 -1
  328. package/dist/showcase/assets/{metrics-kpi-row-8Kbn034e.js → metrics-kpi-row-DzZ9dRFY.js} +1 -1
  329. package/dist/showcase/assets/{metrics-micro-grid-CodO02yA.js → metrics-micro-grid-DyoQiuzr.js} +1 -1
  330. package/dist/showcase/assets/{metrics-overview-CdPqEAAG.js → metrics-overview-DoyHPEZw.js} +1 -1
  331. package/dist/showcase/assets/{metrics-stat-cards-Cw7UMWmb.js → metrics-stat-cards-B1b7NFqW.js} +1 -1
  332. package/dist/showcase/assets/minus-BE2L5hVc.js +1 -0
  333. package/dist/showcase/assets/{money-display-CFfUZLus.js → money-display-CXQ_8LfA.js} +1 -1
  334. package/dist/showcase/assets/{month-year-picker-ChVcYm9f.js → month-year-picker-ra8FEN8F.js} +1 -1
  335. package/dist/showcase/assets/{navigation-Boyt1q-1.js → navigation-CFfVZQJ1.js} +1 -1
  336. package/dist/showcase/assets/{navigation-CThYYxkL.js → navigation-Da0MVkqr.js} +1 -1
  337. package/dist/showcase/assets/{navigation-extras-CxLc-Mqx.js → navigation-extras-LpsdoXfx.js} +1 -1
  338. package/dist/showcase/assets/{onboarding-checklist-C15gqmFc.js → onboarding-checklist-DPNatNOk.js} +1 -1
  339. package/dist/showcase/assets/{overflow-tab-bar-B2Htn-Ft.js → overflow-tab-bar-C0vTzcEY.js} +1 -1
  340. package/dist/showcase/assets/{overlays-Cpj4akiw.js → overlays-Blmbun0J.js} +1 -1
  341. package/dist/showcase/assets/{overlays-CPZfp0nk.js → overlays-t0joc10Y.js} +1 -1
  342. package/dist/showcase/assets/{overview-BB-Xbkff.js → overview-Ckq8vbOR.js} +1 -1
  343. package/dist/showcase/assets/{package-DLn6nx-u.js → package-Cjod_a06.js} +1 -1
  344. package/dist/showcase/assets/{package-check-B0wyBUSU.js → package-check-JRHaNnkl.js} +1 -1
  345. package/dist/showcase/assets/{page-BPFNsNh7.js → page-9xr7xnuW.js} +1 -1
  346. package/dist/showcase/assets/page-action-button-BRXnfsEx.js +1 -0
  347. package/dist/showcase/assets/{page-header-BGqE9hzO.js → page-header-Bdlxfn_9.js} +1 -1
  348. package/dist/showcase/assets/{pagination-T4FmLNHn.js → pagination-CeaYhOvv.js} +1 -1
  349. package/dist/showcase/assets/{pagination-Be6ynLCp.js → pagination-DdZZHvNF.js} +1 -1
  350. package/dist/showcase/assets/{paperclip-B_kxXzSN.js → paperclip-BRM-yXTB.js} +1 -1
  351. package/dist/showcase/assets/{password-input-qfQ5eIU4.js → password-input-1FVEugoO.js} +1 -1
  352. package/dist/showcase/assets/{pencil-DlDLApli.js → pencil-DiG2dQ8F.js} +1 -1
  353. package/dist/showcase/assets/{phone-D8tvvbSQ.js → phone-BREyNZN-.js} +1 -1
  354. package/dist/showcase/assets/plus-CQcelTNc.js +1 -0
  355. package/dist/showcase/assets/{popover-Bu7aaPjE.js → popover-Czmwspmc.js} +1 -1
  356. package/dist/showcase/assets/{popover-menu-CD_JfEeq.js → popover-menu-beuCaiLt.js} +1 -1
  357. package/dist/showcase/assets/{popover-BsCx2XMI.js → popover-uqk7myG2.js} +1 -1
  358. package/dist/showcase/assets/{products-BzHX1ta0.js → products-DGNqIbLs.js} +1 -1
  359. package/dist/showcase/assets/{progress-jIJ_EIKE.js → progress-D76Df908.js} +1 -1
  360. package/dist/showcase/assets/{progress-CpW2ZGAy.js → progress-DjUprSDD.js} +1 -1
  361. package/dist/showcase/assets/{props-table-CCcohuyT.js → props-table-DoDq8Mvr.js} +1 -1
  362. package/dist/showcase/assets/{quote-Bc9eHVKi.js → quote-BvGGgyJ0.js} +1 -1
  363. package/dist/showcase/assets/{receipt-B77_VWtt.js → receipt-rgnlMgyi.js} +1 -1
  364. package/dist/showcase/assets/{receipt-text-BlL_TJsS.js → receipt-text-CBQrVlnU.js} +1 -1
  365. package/dist/showcase/assets/{refinement-guide-BpzOvT_R.js → refinement-guide-B_BpIMxm.js} +1 -1
  366. package/dist/showcase/assets/{refresh-cw-CELG4taF.js → refresh-cw-C-yHy6B7.js} +1 -1
  367. package/dist/showcase/assets/{resolveValueLabel-LRTUaJTb.js → resolveValueLabel-0bwEvIG-.js} +1 -1
  368. package/dist/showcase/assets/{resource-BT8_ck3n.js → resource-8f61BZ8t.js} +1 -1
  369. package/dist/showcase/assets/{resource-C7J3yZp6.js → resource-BEh6R0gu.js} +1 -1
  370. package/dist/showcase/assets/{resource-selector-card-Ay8ImvKg.js → resource-selector-card-DJwXY_Ms.js} +1 -1
  371. package/dist/showcase/assets/{rich-text-editor-CdGVvtsm.js → rich-text-editor-D433iv0N.js} +1 -1
  372. package/dist/showcase/assets/{rich-text-editor-DVtTVuZ6.js → rich-text-editor-vTRfWsOK.js} +1 -1
  373. package/dist/showcase/assets/rotate-ccw-JuE4H14F.js +1 -0
  374. package/dist/showcase/assets/{route-CgBh1oKF.js → route-eSu1bFNn.js} +1 -1
  375. package/dist/showcase/assets/{save-BFsAGR7O.js → save-Bpjj-rBP.js} +1 -1
  376. package/dist/showcase/assets/{schema-form-CaF-lBkN.js → schema-form-DmOpxd96.js} +1 -1
  377. package/dist/showcase/assets/{scroll-area-CpDi_6FP.js → scroll-area-B9OdCBy9.js} +1 -1
  378. package/dist/showcase/assets/{scroll-area-BkZULoZA.js → scroll-area-BH80l2As.js} +1 -1
  379. package/dist/showcase/assets/{section-D-N8Ze16.js → section-BPNIPavy.js} +1 -1
  380. package/dist/showcase/assets/{select-ReMZs8K6.js → select-BauiG1a3.js} +1 -1
  381. package/dist/showcase/assets/{select-C9Mfb_Gj.js → select-CPopSr5c.js} +1 -1
  382. package/dist/showcase/assets/{send-C6PbwpHN.js → send-DNCcBKXs.js} +1 -1
  383. package/dist/showcase/assets/{separator-CywPSoE0.js → separator-BK0beCOv.js} +1 -1
  384. package/dist/showcase/assets/{separator-Ha9YxI2x.js → separator-CKM9A-mm.js} +1 -1
  385. package/dist/showcase/assets/{settings-2-CVq5Uyv5.js → settings-2-B8fz7JZB.js} +1 -1
  386. package/dist/showcase/assets/{settings-DkTHc0Ob.js → settings-Cy2y3sQw.js} +1 -1
  387. package/dist/showcase/assets/{sheet-k-P0gWlk.js → sheet-C7VWkXE1.js} +1 -1
  388. package/dist/showcase/assets/{shield-Cme7_JJR.js → shield-ClPev4gS.js} +1 -1
  389. package/dist/showcase/assets/{shield-alert-CxV0S5w0.js → shield-alert-6XO5YZ5u.js} +1 -1
  390. package/dist/showcase/assets/{shield-check-BW_7p6Xf.js → shield-check-DSfGVZq0.js} +1 -1
  391. package/dist/showcase/assets/{shopping-bag-CoR8AMYU.js → shopping-bag-DzMrGvpF.js} +1 -1
  392. package/dist/showcase/assets/{showcase-m3FzbvoC.js → showcase-DuZaO6q9.js} +1 -1
  393. package/dist/showcase/assets/{sidebar-bz_FzvjM.js → sidebar-7y9EQYWf.js} +1 -1
  394. package/dist/showcase/assets/{sidebar.context-BWMPnGn6.js → sidebar.context-DUheJD8t.js} +1 -1
  395. package/dist/showcase/assets/{skeleton-BJMnQDgf.js → skeleton-Dgr8Vabr.js} +1 -1
  396. package/dist/showcase/assets/{skeleton-DoWW5XZD.js → skeleton-HSpErFqw.js} +1 -1
  397. package/dist/showcase/assets/{slider-BH1Gtp_p.js → slider-B7f81APg.js} +1 -1
  398. package/dist/showcase/assets/{smart-card-C6-idFYI.js → smart-card-p97LLZCW.js} +1 -1
  399. package/dist/showcase/assets/{sonner-CGZ3FC4U.js → sonner-CWazrN19.js} +1 -1
  400. package/dist/showcase/assets/{sortable.esm-CE0TA9V_.js → sortable.esm-uufol7Mz.js} +1 -1
  401. package/dist/showcase/assets/{sparkles-8yQFcmte.js → sparkles-Z4V23xKK.js} +1 -1
  402. package/dist/showcase/assets/{spinner-CNveVfOr.js → spinner-BUgjAjWE.js} +1 -1
  403. package/dist/showcase/assets/{spinner-CO8LjtjY.js → spinner-CXu7z8-j.js} +1 -1
  404. package/dist/showcase/assets/{spinner-BYUX0luk.js → spinner-DCwR0mnD.js} +1 -1
  405. package/dist/showcase/assets/{square-pen-CWylvezY.js → square-pen-jwp_OWMQ.js} +1 -1
  406. package/dist/showcase/assets/{stacked-avatars-DiNA5OJK.js → stacked-avatars-CHEpTotO.js} +1 -1
  407. package/dist/showcase/assets/{star-t53uwwyp.js → star-Ck8Lg5hm.js} +1 -1
  408. package/dist/showcase/assets/startOfDay-BzULZHy4.js +1 -0
  409. package/dist/showcase/assets/{styles-CwpnwrEQ.js → styles-CNYitflH.js} +1 -1
  410. package/dist/showcase/assets/{suggestions-CvxZxsmc.js → suggestions-CSF9MlKl.js} +1 -1
  411. package/dist/showcase/assets/{switch-CewkokYT.js → switch-BX9KSLIF.js} +1 -1
  412. package/dist/showcase/assets/{switch-D-7uqDR8.js → switch-Bn0WaWa9.js} +1 -1
  413. package/dist/showcase/assets/{sync-DnBSRAwH.js → sync-BuKBnqWW.js} +1 -1
  414. package/dist/showcase/assets/{table-3cUcSCBR.js → table-DNJcLaud.js} +42 -20
  415. package/dist/showcase/assets/{table-ds5oNU0h.js → table-NfpOWGsG.js} +1 -1
  416. package/dist/showcase/assets/{table-actions-CrujG5R-.js → table-actions-Ci9Yszp0.js} +1 -1
  417. package/dist/showcase/assets/{tabs-C-hJfSn5.js → tabs-CYNFQdIr.js} +1 -1
  418. package/dist/showcase/assets/{tabs-GG911oaV.js → tabs-Cm_p6znb.js} +1 -1
  419. package/dist/showcase/assets/{tags-input-DBeIaeVn.js → tags-input-DE4QZqS_.js} +1 -1
  420. package/dist/showcase/assets/{text-button-EZojp9Ye.js → text-button-D9llh4pU.js} +1 -1
  421. package/dist/showcase/assets/{text-link-DcKeYjEX.js → text-link-ZT6QGJOL.js} +1 -1
  422. package/dist/showcase/assets/{textarea-DgNgSl1g.js → textarea-CgcHuGVq.js} +1 -1
  423. package/dist/showcase/assets/{textarea-PXKZSiRa.js → textarea-D2uT_GJt.js} +1 -1
  424. package/dist/showcase/assets/{timelines-CaF_Ze8z.js → timelines-BEFO7tJ0.js} +1 -1
  425. package/dist/showcase/assets/{toggle-group-D_iuhL1G.js → toggle-group-oYpa59lN.js} +1 -1
  426. package/dist/showcase/assets/{toggles-BKaayRmE.js → toggles-BL93YmQo.js} +1 -1
  427. package/dist/showcase/assets/{toggles-group-DRAksOw2.js → toggles-group-BG-xiQCY.js} +1 -1
  428. package/dist/showcase/assets/{tooltip-B_LnC5D2.js → tooltip-BMI7zHwP.js} +1 -1
  429. package/dist/showcase/assets/{trash-2-DhUpICQq.js → trash-2-CtRtVsCy.js} +1 -1
  430. package/dist/showcase/assets/trending-up-2NQ-P8vB.js +1 -0
  431. package/dist/showcase/assets/{truck-D6SGLjv1.js → truck-Cl0nyN_j.js} +1 -1
  432. package/dist/showcase/assets/{typography-qEz6MMn9.js → typography-C7pCPhg7.js} +1 -1
  433. package/dist/showcase/assets/{ui-badge-BA334hdB.js → ui-badge-BvmuMzSq.js} +1 -1
  434. package/dist/showcase/assets/{ui-card-CjqUyGvB.js → ui-card-B7ziOMAn.js} +1 -1
  435. package/dist/showcase/assets/{ui-table-cDgI6WMk.js → ui-table-BEFHakBU.js} +1 -1
  436. package/dist/showcase/assets/{upload-tray-BcA-7pqW.js → upload-tray-CMKqTtEp.js} +1 -1
  437. package/dist/showcase/assets/{use-layout-link-DIUWH-oo.js → use-layout-link-nEU6ctSs.js} +1 -1
  438. package/dist/showcase/assets/{useAnchoredPopupScrollLock-BavpibMb.js → useAnchoredPopupScrollLock-B1xyKMh7.js} +1 -1
  439. package/dist/showcase/assets/{useAriaLabelledBy-HDEJjv0f.js → useAriaLabelledBy-BMlFgz-H.js} +1 -1
  440. package/dist/showcase/assets/{useCollapsiblePanel-CL0pCuxO.js → useCollapsiblePanel-BEzH6TC2.js} +1 -1
  441. package/dist/showcase/assets/{useCompositeItem-LkMSD9DW.js → useCompositeItem-CIuww7-p.js} +1 -1
  442. package/dist/showcase/assets/{useCompositeListItem-C_oLUvf8.js → useCompositeListItem-PrMTh4tz.js} +1 -1
  443. package/dist/showcase/assets/{useLabelableId-DDpjUdIO.js → useLabelableId-BBLkeLGr.js} +1 -1
  444. package/dist/showcase/assets/{useOpenInteractionType-DQOSh-Eu.js → useOpenInteractionType-CW0quo3l.js} +1 -1
  445. package/dist/showcase/assets/useRender-6NNMHJJU.js +1 -0
  446. package/dist/showcase/assets/{useTriggerFocusGuards-BPFrAxlp.js → useTriggerFocusGuards-DEza_iee.js} +1 -1
  447. package/dist/showcase/assets/{useValueChanged-lYlHqRM1.js → useValueChanged-BmWIb3SN.js} +1 -1
  448. package/dist/showcase/assets/user-BDIP5UPS.js +1 -0
  449. package/dist/showcase/assets/{user-plus-B1Pi7SNv.js → user-plus-BCqHFh2h.js} +1 -1
  450. package/dist/showcase/assets/{users-DAlxvktS.js → users-Bh7xGRX2.js} +1 -1
  451. package/dist/showcase/assets/{vendor-profile-ClJ6G6SO.js → vendor-profile-BlYcRbPI.js} +1 -1
  452. package/dist/showcase/assets/{video-DxooIkh-.js → video-BucshqNW.js} +1 -1
  453. package/dist/showcase/assets/{wrench-BiwmotMF.js → wrench-DQvhyTEb.js} +1 -1
  454. package/dist/showcase/assets/x-DyuS4YRT.js +1 -0
  455. package/dist/showcase/assets/{zap-a90eC6iO.js → zap-Dpn8_pnQ.js} +1 -1
  456. package/dist/showcase/index.html +2 -2
  457. package/dist/style.css +1 -1
  458. package/package.json +1 -1
  459. package/dist/_shared/cards-BKFwMTjM.cjs +0 -2
  460. package/dist/_shared/cards-BKFwMTjM.cjs.map +0 -1
  461. package/dist/_shared/cards-CtBoSZG9.js.map +0 -1
  462. package/dist/_shared/overlays-CdtMAkKG.js.map +0 -1
  463. package/dist/_shared/overlays-Diy_H0Au.cjs +0 -2
  464. package/dist/_shared/overlays-Diy_H0Au.cjs.map +0 -1
  465. package/dist/_shared/table-CUA_A-oO.js.map +0 -1
  466. package/dist/_shared/table-mPchjiRn.cjs +0 -2
  467. package/dist/_shared/table-mPchjiRn.cjs.map +0 -1
  468. package/dist/showcase/assets/arrow-down-BttnoDxP.js +0 -1
  469. package/dist/showcase/assets/arrow-left-B1kFGJ8v.js +0 -1
  470. package/dist/showcase/assets/arrow-right-Md96ra7v.js +0 -1
  471. package/dist/showcase/assets/arrow-up-B9e9cP-q.js +0 -1
  472. package/dist/showcase/assets/arrow-up-right-BOHJNdrp.js +0 -1
  473. package/dist/showcase/assets/card-primitives-CiU5lL3a.js +0 -1
  474. package/dist/showcase/assets/checkbox-Qhh92dbS.js +0 -1
  475. package/dist/showcase/assets/chevron-down-BqrI6QzQ.js +0 -1
  476. package/dist/showcase/assets/chevron-left-TJKYH3rG.js +0 -1
  477. package/dist/showcase/assets/chevron-up-CPuAmh-d.js +0 -1
  478. package/dist/showcase/assets/chevrons-up-down-DZB44PVY.js +0 -1
  479. package/dist/showcase/assets/circle-CY0DkTje.js +0 -1
  480. package/dist/showcase/assets/circle-check-BkFKejsY.js +0 -1
  481. package/dist/showcase/assets/circle-check-big-vu3Znqdx.js +0 -1
  482. package/dist/showcase/assets/circle-dot-CsBIkbEH.js +0 -1
  483. package/dist/showcase/assets/clock-3-mhWDhdka.js +0 -1
  484. package/dist/showcase/assets/clock-Dd-urPd2.js +0 -1
  485. package/dist/showcase/assets/index-CCxHwV7T.css +0 -2
  486. package/dist/showcase/assets/inertValue-DrANZiJk.js +0 -1
  487. package/dist/showcase/assets/isSameDay-DVP1ae2V.js +0 -1
  488. package/dist/showcase/assets/isToday-CNAQB-p9.js +0 -1
  489. package/dist/showcase/assets/metadata-list-BhlsEWYT.js +0 -1
  490. package/dist/showcase/assets/minus-B1es6KJX.js +0 -1
  491. package/dist/showcase/assets/page-action-button-DMS8Vcmz.js +0 -1
  492. package/dist/showcase/assets/plus-BkhJjfUv.js +0 -1
  493. package/dist/showcase/assets/rotate-ccw-MwEZ1b11.js +0 -1
  494. package/dist/showcase/assets/startOfDay-BKFJecZ3.js +0 -1
  495. package/dist/showcase/assets/trending-up-Kfm5l65O.js +0 -1
  496. package/dist/showcase/assets/useRender-CnmFaF3Y.js +0 -1
  497. package/dist/showcase/assets/user-DLuRcjl0.js +0 -1
  498. package/dist/showcase/assets/x-idpnOHil.js +0 -1
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-D-N8Ze16.js";import{t as s}from"./arrow-left-B1kFGJ8v.js";import{t as c}from"./arrow-right-Md96ra7v.js";import{Or as l,r as u,t as d}from"./example-PsbgbESI.js";import{t as f}from"./circle-check-BkFKejsY.js";import{n as p,t as m}from"./dropzone-Dx4EqBHu.js";import{t as h}from"./file-3Z2xkc-8.js";import{t as g}from"./image-apDSlTAx.js";import{t as _}from"./info-C3G9KRCx.js";import{t as v}from"./layers-DJZSVGAu.js";import{t as y}from"./lock-CpZ5kLUd.js";import{t as b}from"./plus-BkhJjfUv.js";import{t as x}from"./star-t53uwwyp.js";import{t as ee}from"./trash-2-DhUpICQq.js";import{t as S}from"./video-DxooIkh-.js";import{t as te}from"./x-idpnOHil.js";import{N as C,P as w,a as T,d as ne,l as E,n as D}from"./index-QESvAJrb.js";import{t as O}from"./props-table-CCcohuyT.js";import{i as k,r as A,t as j}from"./alert-bPnj3_cC.js";import{t as re}from"./smart-card-C6-idFYI.js";import{t as M}from"./input-yYoqWQQ7.js";import{t as N}from"./select-ReMZs8K6.js";import{n as P}from"./switch-D-7uqDR8.js";import{n as F}from"./form-field-AWNJL9FM.js";import{t as ie}from"./dialog-C1heXuxu.js";var ae=E(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),oe=E(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),se=E(`images`,[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]]),ce=E(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),I=E(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),le={title:`Add media`,description:`Pick from the library, or upload new files.`,close:`Close media library`,tabs:{library:`Library`,upload:`Upload`},searchPlaceholder:`Search by name or tag...`,clearSearch:`Clear search`,typeFilterLabel:`Type`,collectionFilterLabel:`Collection`,sortLabel:`Sort`,viewLabel:`View`,allTypes:`All`,images:`Images`,videos:`Videos`,files:`Files`,allCollections:`All collections`,sortNewest:`Newest`,sortName:`Name`,sortSize:`Size`,sortUsage:`Most used`,gridView:`Grid view`,tableView:`Table view`,countAll:`{count} items`,countFiltered:`{count} of {total} items`,emptyLibraryTitle:`Library is empty`,emptyLibraryDescription:`Upload images or videos to start building the library.`,emptyFilteredTitle:`No media matches`,emptyFilteredDescription:`Try a different search term, or clear the filters.`,clearFilters:`Clear filters`,uploadMedia:`Upload media`,loading:`Loading media...`,errorTitle:`Media could not load`,errorDescription:`Try again or adjust your filters.`,cardDetails:`Details for {name}`,privateLabel:`Private`,publicLabel:`Public`,typeImage:`Image`,typeVideo:`Video`,typeFile:`File`,unknownSize:`Unknown`,notUsed:`Not used yet`,usedIn:`{count} {count, plural, one {place} other {places}}`,table:{name:`Name`,type:`Type`,size:`Size`,collection:`Collection`,used:`Used`},detail:{title:`Details`,altText:`Alt text`,altPlaceholder:`Describe this media for screen readers`,collection:`Collection`,tags:`Tags`,tagsPlaceholder:`Comma-separated`,public:`Public`,publicHint:`Served from the public CDN`,privateHint:`Only visible in the admin`,type:`Type`,size:`Size`,dimensions:`Dimensions`,uploaded:`Uploaded`,usedIn:`Used in`,replace:`Replace file`,delete:`Delete`,close:`Close details`},upload:{dropTitle:`Drag files here or click to browse`,dropHint:`JPG, PNG, WebP, SVG and MP4 up to 50 MB per file`,dragOver:`Release to stage files`,collection:`Collection`,tags:`Tags`,tagsPlaceholder:`Comma-separated`,public:`Public`,publicHint:`Serve from the public CDN`,noFiles:`No files staged`,stagedCount:`{count} {count, plural, one {file} other {files}}`,removeFile:`Remove {name}`,uploading:`Uploading`,done:`Done`},footer:{pickOne:`Pick one item`,pickMany:`Pick one or more items`,selectedCount:`{count} selected`,clear:`Clear`,cancel:`Cancel`,confirmEmpty:`Add to product`,confirmOne:`Add 1 item`,confirmMany:`Add {count} items`,noFiles:`No files staged`,stagedSummary:`{count} {count, plural, one {file} other {files}} · {size}`,upload:`Upload`,uploadMany:`Upload {count} files`,uploading:`Uploading...`},gallery:{emptyTitle:`No media attached`,emptyDescription:`Add images, video, or files to this resource.`,add:`Add media`,addMore:`Add more`,addTile:`Add another media item`,cover:`Cover`,primary:`Primary`,setPrimary:`Set primary`,remove:`Remove`,movePrevious:`Move previous`,moveNext:`Move next`,itemPosition:`{index} of {total}`,maxReached:`Maximum reached`}};function L(e,t){return e.replace(/\{(\w+), plural, one \{([^}]*)\} other \{([^}]*)\}\}/g,(e,n,r,i)=>Number(t[n])===1?r:i).replace(/\{(\w+)\}/g,(e,n)=>String(t[n]??``))}var R=t(n(),1),z={collection:void 0,tags:[],public:!0},ue=[],B={getId:e=>e.id,getName:e=>e.name,getType:e=>e.type,getSrc:e=>e.src,getAlt:e=>e.alt,getSize:e=>e.size,getWidth:e=>e.width,getHeight:e=>e.height,getDuration:e=>e.duration,getCollection:e=>e.collection,getTags:e=>e.tags??[],getPublic:e=>e.public,getUploadedAt:e=>e.uploadedAt,getUsageCount:e=>e.usageCount,getTint:e=>e.tint,getMimeType:e=>e.mimeType};function V(e){return{...B,...e??{}}}function H(e){return!e||e<=0?``:e>=1048576?`${(e/1048576).toFixed(1)} MB`:`${Math.max(1,Math.round(e/1024))} KB`}function U(e,t){let n=t.getWidth(e),r=t.getHeight(e);return!n||!r?``:`${n} x ${r}`}function W(e,t){let n=t.getUploadedAt(e);if(!n)return 0;let r=(n instanceof Date?n:new Date(n)).getTime();return Number.isFinite(r)?r:0}function de(e){return e.type.startsWith(`image/`)?`image`:e.type.startsWith(`video/`)?`video`:`file`}function fe(e){if(e.type.startsWith(`image/`)&&!(typeof URL>`u`||typeof URL.createObjectURL!=`function`))return URL.createObjectURL(e)}function pe(e){!e||typeof URL>`u`||typeof URL.revokeObjectURL!=`function`||URL.revokeObjectURL(e)}function me(e){return Array.isArray(e)?{items:e,total:e.length}:e}function he(e,t){return t&&typeof e==`object`&&e?{...e,...t}:e}function ge(e,t,n,r,i){let a=n.trim().toLowerCase();return e.filter(e=>r!==`all`&&t.getType(e)!==r||i!==`all`&&t.getCollection(e)!==i?!1:a?[t.getName(e),t.getAlt(e),t.getCollection(e),...t.getTags(e)].filter(Boolean).join(` `).toLowerCase().includes(a):!0)}function _e(e,t,n){let r=e.slice();return n===`name`?r.sort((e,n)=>t.getName(e).localeCompare(t.getName(n))):n===`size`?r.sort((e,n)=>(t.getSize(n)??0)-(t.getSize(e)??0)):n===`usage`?r.sort((e,n)=>(t.getUsageCount(n)??0)-(t.getUsageCount(e)??0)):r.sort((e,n)=>W(n,t)-W(e,t)),r}function ve({items:e=ue,fetcher:t,accessors:n,selectionMode:r=`multiple`,value:i,defaultValue:a=[],onValueChange:o,onItemUpdate:s,onItemDelete:c,onUpload:l,onError:u,initialTab:d=`library`,defaultView:f=`grid`,defaultQuery:p=``,defaultType:m=`all`,defaultCollection:h=`all`,defaultSort:g=`newest`,defaultUploadOptions:_}={}){let v=(0,R.useMemo)(()=>V(n),[n]),[y,b]=(0,R.useState)(d),[x,ee]=(0,R.useState)(f),[S,te]=(0,R.useState)(p),[C,w]=(0,R.useState)(m),[T,ne]=(0,R.useState)(h),[E,D]=(0,R.useState)(g),[O,k]=(0,R.useState)(null),[A,j]=(0,R.useState)(()=>[...a]),[re,M]=(0,R.useState)([]),[N,P]=(0,R.useState)(),[F,ie]=(0,R.useState)(!1),[ae,oe]=(0,R.useState)(null),[se,ce]=(0,R.useState)([]),[I,le]=(0,R.useState)(()=>new Set),[L,B]=(0,R.useState)({}),[H,U]=(0,R.useState)([]),[W,ve]=(0,R.useState)(!1),[G,ye]=(0,R.useState)({...z,..._,tags:_?.tags??z.tags}),be=i!==void 0,K=(0,R.useMemo)(()=>be?[...i??[]]:A,[A,be,i]),q=(0,R.useMemo)(()=>new Set(K),[K]),xe=(0,R.useRef)(new Set);(0,R.useEffect)(()=>{if(!t)return;let e=new AbortController;return ie(!0),oe(null),t({query:S,type:C,collection:T===`all`?void 0:T,sort:E,signal:e.signal}).then(t=>{if(e.signal.aborted)return;let n=me(t);M(n.items),P(n.total)}).catch(t=>{e.signal.aborted||(oe(t),u?.(t))}).finally(()=>{e.signal.aborted||ie(!1)}),()=>e.abort()},[T,t,u,S,E,C]),(0,R.useEffect)(()=>{let e=xe.current;return()=>{for(let t of e)pe(t);e.clear()}},[]);let Se=(0,R.useMemo)(()=>t?re:[...se,...e],[se,re,t,e]),J=(0,R.useMemo)(()=>Se.filter(e=>!I.has(v.getId(e))).map(e=>he(e,L[v.getId(e)])),[v,L,I,Se]),Ce=(0,R.useMemo)(()=>{let e=t?J:ge(J,v,S,C,T);return t?e:_e(e,v,E)},[v,T,t,J,S,E,C]),we=N??J.length,Te=Ce.length,Ee=(0,R.useMemo)(()=>J.filter(e=>q.has(v.getId(e))),[v,J,q]),De=!!S.trim()||C!==`all`||T!==`all`,Y=(0,R.useCallback)(e=>{be||j(e);let t=new Set(e),n=J.filter(e=>t.has(v.getId(e)));o?.(e,n)},[v,be,o,J]),Oe=(0,R.useCallback)(e=>{let t=new Set(r===`single`?[]:q);q.has(e)&&r!==`single`?t.delete(e):t.add(e),Y(Array.from(t))},[Y,q,r]),ke=(0,R.useCallback)(()=>Y([]),[Y]),Ae=(0,R.useCallback)(()=>{te(``),w(`all`),ne(`all`)},[]),je=(0,R.useCallback)(e=>{U(t=>[...t,...e.map((e,t)=>{let n=fe(e);return n&&xe.current.add(n),{id:`staged-${Date.now()}-${t}`,file:e,name:e.name,size:e.size,type:de(e),src:n,progress:0,status:`staged`}})])},[]),Me=(0,R.useCallback)(e=>{U(t=>{let n=t.find(t=>t.id===e);return n?.src&&(pe(n.src),xe.current.delete(n.src)),t.filter(t=>t.id!==e)})},[]),Ne=(0,R.useCallback)(()=>{U(e=>{for(let t of e)t.src&&(pe(t.src),xe.current.delete(t.src));return[]})},[]),Pe=(0,R.useCallback)(e=>{ye(t=>({...t,...e}))},[]),Fe=(0,R.useCallback)((e,t)=>{U(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]);return{tab:y,setTab:b,view:x,setView:ee,query:S,setQuery:te,type:C,setType:w,collection:T,setCollection:ne,sort:E,setSort:D,detailId:O,setDetailId:k,items:J,visibleItems:Ce,selectedIds:K,selectedItems:Ee,selectedSet:q,toggleSelection:Oe,clearSelection:ke,clearFilters:Ae,loading:F,error:ae,hasFilters:De,totalCount:we,filteredCount:Te,stagedFiles:H,addFiles:je,removeStagedFile:Me,clearStagedFiles:Ne,updateUploadOptions:Pe,uploadOptions:G,uploading:W,startUpload:(0,R.useCallback)(async()=>{if(W||H.length===0)return;ve(!0),U(e=>e.map(e=>({...e,status:`uploading`,progress:0})));let e={setProgress:(e,t)=>{Fe(e,{progress:Math.max(0,Math.min(100,t))})},setFileStatus:(e,t,n)=>Fe(e,{status:t,error:n})};try{let t=H.map(e=>e.file),n=await l?.(t,G,e);if(U(e=>e.map(e=>({...e,status:`done`,progress:100}))),n?.length){ce(e=>[...n,...e]);let e=n.map(e=>v.getId(e));Y(r===`single`?e.slice(0,1):Array.from(new Set([...e,...K])))}Ne(),b(`library`)}catch(e){oe(e),U(e=>e.map(e=>e.status===`uploading`?{...e,status:`error`,error:`Upload failed`}:e)),u?.(e)}finally{ve(!1)}},[v,Y,Ne,u,l,K,r,Fe,H,G,W]),updateItem:(0,R.useCallback)((e,t)=>{let n=v.getId(e);B(e=>({...e,[n]:{...e[n],...t}})),s?.(e,t)},[v,s]),removeItem:(0,R.useCallback)(e=>{let t=v.getId(e);le(e=>new Set(e).add(t)),q.has(t)&&Y(K.filter(e=>e!==t)),c?.(e)},[v,Y,c,K,q]),accessors:v}}var G=ne();function ye(e,t){return e===`image`?(0,G.jsx)(g,{className:t??`size-4`}):e===`video`?(0,G.jsx)(S,{className:t??`size-4`}):(0,G.jsx)(h,{className:t??`size-4`})}function be(e,t){return e===`image`?t.typeImage:e===`video`?t.typeVideo:t.typeFile}function K(e,t){return e?L(t.usedIn,{count:e}):t.notUsed}function q({children:e,tint:t,className:n}){return(0,G.jsx)(`div`,{className:D(`media-library-preview relative overflow-hidden bg-muted`,n),style:t?{background:t}:void 0,children:e})}function xe({src:e,alt:t,type:n,className:r,loading:i=`lazy`}){let[a,o]=(0,R.useState)(!1);return(0,R.useEffect)(()=>{o(!1)},[e]),!e||a?(0,G.jsx)(`div`,{className:`media-library-preview--fallback flex size-full items-center justify-center text-muted-foreground`,children:ye(n,`size-6`)}):(0,G.jsx)(`img`,{src:e,alt:t,loading:i,className:r,onError:()=>o(!0)})}function Se({icon:e,title:t,description:n,action:r,className:i}){return(0,G.jsxs)(`div`,{className:D(`media-library-empty-state--component flex min-h-64 flex-col items-center justify-center rounded-lg border border-dashed border-border bg-muted/20 px-6 py-10 text-center`,i),children:[(0,G.jsx)(`div`,{className:`mb-3 inline-flex size-10 items-center justify-center rounded-full bg-muted text-muted-foreground`,children:e??(0,G.jsx)(g,{className:`size-5`})}),(0,G.jsx)(a,{tag:`div`,weight:`semibold`,children:t}),!!n&&(0,G.jsx)(a,{type:`secondary`,size:`xs`,className:`mt-1 max-w-sm`,children:n}),!!r&&(0,G.jsx)(`div`,{className:`mt-4`,children:r})]})}function J({query:e,type:t,typeFilters:n,collection:r,sort:i,view:a,collections:o=[],strings:s,onQueryChange:c,onTypeChange:l,onCollectionChange:d,onSortChange:f,onViewChange:p,onClearFilters:m,toolbarEnd:_}){let v=[{value:`all`,label:s.allTypes,icon:null},{value:`image`,label:s.images,icon:g},{value:`video`,label:s.videos,icon:S},{value:`file`,label:s.files,icon:h}].filter(e=>(n??[`all`,`image`,`video`]).includes(e.value)),y=[{value:`all`,label:s.allCollections},...o.map(e=>({value:e.value,label:String(e.label)}))],b=[{value:`newest`,label:s.sortNewest},{value:`name`,label:s.sortName},{value:`size`,label:s.sortSize},{value:`usage`,label:s.sortUsage}];return(0,G.jsxs)(`div`,{className:`media-library-toolbar--component flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`min-w-52 flex-1`,children:(0,G.jsx)(M,{value:e,onChange:e=>c(e.target.value),placeholder:s.searchPlaceholder,startIcon:T,clearable:!0,onClear:()=>c(``),strings:{clear:s.clearSearch},className:`rounded-full bg-muted/20`})}),(0,G.jsx)(`div`,{className:`media-library-toolbar--type-toggle flex h-9 items-center rounded-md bg-muted p-0.5`,role:`tablist`,"aria-label":s.typeFilterLabel,children:v.map(e=>{let n=e.icon,r=t===e.value;return(0,G.jsxs)(u,{type:`button`,role:`tab`,"aria-selected":r,variant:`secondary`,buttonStyle:`ghost`,className:D(`h-8 rounded-sm px-3 text-xs shadow-none`,r?`bg-background text-foreground shadow-xs hover:bg-background`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),onClick:()=>l(e.value),children:[n&&(0,G.jsx)(n,{className:`size-3.5`}),e.label]},e.value)})}),(0,G.jsx)(`div`,{className:`min-w-40`,children:(0,G.jsx)(N,{value:r,options:y,onChange:e=>d(e??`all`),placeholder:s.collectionFilterLabel,"aria-label":s.collectionFilterLabel,className:`bg-background`})}),(0,G.jsx)(`div`,{className:`min-w-32`,children:(0,G.jsx)(N,{value:i,options:b,onChange:e=>f(e??`newest`),placeholder:s.sortLabel,"aria-label":s.sortLabel,className:`bg-background`})}),(0,G.jsxs)(`div`,{className:`media-library-toolbar--view-toggle ml-auto flex h-9 items-center rounded-md bg-muted p-0.5`,children:[(0,G.jsx)(u,{type:`button`,variant:a===`grid`?`dark`:`secondary`,buttonStyle:a===`grid`?`solid`:`ghost`,size:`icon-small`,className:D(a===`grid`&&`bg-background text-foreground shadow-xs hover:bg-background`),"aria-label":s.gridView,onClick:()=>p(`grid`),children:(0,G.jsx)(ae,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:a===`table`?`dark`:`secondary`,buttonStyle:a===`table`?`solid`:`ghost`,size:`icon-small`,className:D(a===`table`&&`bg-background text-foreground shadow-xs hover:bg-background`),"aria-label":s.tableView,onClick:()=>p(`table`),children:(0,G.jsx)(ce,{className:`size-3.5`})})]}),!!e&&(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,onClick:m,children:s.clearFilters}),_]})}function Ce({item:e,selected:t=!1,density:n=`comfortable`,showMeta:r=!0,accessors:o,strings:s,onToggle:c,onDetails:d,className:f}){let p=o.getType(e),m=o.getName(e),h=o.getSrc(e),g=o.getAlt(e)||m,b=o.getSize(e),x=o.getUsageCount(e),ee=o.getPublic(e)===!1,S=o.getDuration(e);return(0,G.jsxs)(`div`,{"data-selected":t||void 0,"data-density":n,className:D(`media-library-card--component group/card overflow-hidden rounded-xl border border-border/70 bg-card text-left shadow-xs transition-all`,`hover:border-primary/30 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,t&&`media-library-card--selected border-primary ring-1 ring-primary`,f),onClick:c,children:[(0,G.jsxs)(q,{tint:o.getTint(e),className:D(n===`compact`?`aspect-square`:`aspect-[4/3]`),children:[(0,G.jsx)(xe,{src:h,alt:g,type:p,className:`size-full object-cover`}),(0,G.jsx)(`span`,{className:D(`media-library-card--check absolute left-2 top-2 inline-flex size-5 items-center justify-center rounded-md border border-border bg-background/95 text-transparent opacity-0 shadow-xs backdrop-blur transition-opacity group-hover/card:opacity-100 group-focus-visible/card:opacity-100`,t&&`bg-primary text-primary-foreground opacity-100`),"aria-hidden":`true`,children:(0,G.jsx)(l,{className:`size-3`})}),!!d&&(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`solid`,size:`icon-small`,className:`media-library-card--details absolute right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100`,"aria-label":L(s.cardDetails,{name:m}),onClick:e=>{e.stopPropagation(),d()},children:(0,G.jsx)(_,{className:`size-3.5`})}),p===`video`&&!!S&&(0,G.jsxs)(i,{variant:`secondary`,className:`media-library-card--duration absolute bottom-2 left-2 bg-foreground text-background`,children:[(0,G.jsx)(I,{className:`size-3 fill-current`}),S]}),ee&&(0,G.jsx)(i,{variant:`secondary`,className:`media-library-card--private absolute bottom-2 right-2 bg-background/90`,children:(0,G.jsx)(y,{className:`size-3`})})]}),(0,G.jsxs)(`div`,{className:`media-library-card--body grid gap-1 px-3 py-2.5`,children:[(0,G.jsx)(a,{tag:`div`,weight:`semibold`,size:`xs`,className:`truncate`,children:m}),r&&(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(a,{size:`xxs`,type:`secondary`,className:`truncate`,children:H(b)||s.unknownSize}),!!x&&(0,G.jsxs)(a,{tag:`span`,size:`xxs`,type:`secondary`,className:`ml-auto inline-flex items-center gap-1`,children:[(0,G.jsx)(v,{className:`size-3`}),x]})]})]})]})}function we({items:e,selectedSet:t,accessors:n,strings:r,onToggle:o,onDetails:s}){return(0,G.jsxs)(`div`,{className:`media-library-table--component min-w-180`,children:[(0,G.jsxs)(`div`,{className:`sticky top-0 z-10 grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-3 border-b border-border bg-background px-3 py-2`,children:[(0,G.jsx)(`span`,{}),(0,G.jsx)(`span`,{}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.name}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.type}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.size}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.collection}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.used}),(0,G.jsx)(`span`,{})]}),e.map(e=>{let c=n.getId(e),d=t.has(c),f=n.getType(e),p=n.getName(e),m=n.getSrc(e),h=n.getPublic(e)===!1;return(0,G.jsxs)(`div`,{"data-selected":d||void 0,className:D(`media-library-table--row grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-3 border-b border-border/60 px-3 py-2 last:border-b-0`,`cursor-pointer rounded-lg transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,d&&`bg-primary/10`),onClick:()=>o(c),children:[(0,G.jsx)(`span`,{className:D(`inline-flex size-5 items-center justify-center rounded-md border border-border text-transparent`,d&&`border-primary bg-primary text-primary-foreground`),"aria-hidden":`true`,children:(0,G.jsx)(l,{className:`size-3`})}),(0,G.jsx)(q,{tint:n.getTint(e),className:`size-9 rounded-md`,children:m?(0,G.jsx)(`img`,{src:m,alt:``,loading:`lazy`,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:ye(f,`size-4`)})}),(0,G.jsxs)(a,{tag:`div`,weight:`semibold`,size:`xs`,className:`flex min-w-0 items-center gap-1 truncate`,children:[(0,G.jsx)(`span`,{className:`truncate`,children:p}),h&&(0,G.jsx)(y,{className:`size-3 shrink-0 text-muted-foreground`})]}),(0,G.jsx)(i,{variant:`secondary`,children:be(f,r)}),(0,G.jsx)(a,{size:`xs`,type:`secondary`,children:H(n.getSize(e))||r.unknownSize}),(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`truncate`,children:n.getCollection(e)||`-`}),(0,G.jsx)(a,{size:`xs`,type:`secondary`,children:n.getUsageCount(e)?n.getUsageCount(e):`-`}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,"aria-label":L(r.cardDetails,{name:p}),onClick:e=>{e.stopPropagation(),s(c)},children:(0,G.jsx)(_,{className:`size-3.5`})})]},c)})]})}function Te({item:e,collections:t=[],accessors:n,strings:r,onClose:o,onUpdate:c,onRemove:l,renderDetail:d}){if(!e)return null;let f=n.getName(e),m=n.getType(e),h=n.getSrc(e),g=n.getCollection(e)??t[0]?.value??``,_=n.getTags(e),v=n.getPublic(e)??!0,y=d?.(e,{accessors:n,update:c,remove:l,close:o});return y?(0,G.jsx)(G.Fragment,{children:y}):(0,G.jsxs)(`aside`,{className:`media-library-detail-panel--component flex min-h-0 w-full flex-col border-l border-border bg-background lg:w-72`,children:[(0,G.jsxs)(`div`,{className:`media-library-detail-panel--header flex items-center gap-2 border-b border-border px-3 py-2.5`,children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,"aria-label":r.detail.close,onClick:o,children:(0,G.jsx)(s,{className:`size-3.5`})}),(0,G.jsx)(a,{weight:`semibold`,children:r.detail.title})]}),(0,G.jsxs)(`div`,{className:`media-library-detail-panel--body grid min-h-0 gap-4 overflow-y-auto p-4`,children:[(0,G.jsxs)(q,{tint:n.getTint(e),className:`aspect-[4/3] rounded-lg border border-border`,children:[(0,G.jsx)(xe,{src:h,alt:n.getAlt(e)||f,type:m,className:`size-full object-cover`}),m===`video`&&!!n.getDuration(e)&&(0,G.jsxs)(i,{className:`absolute bottom-2 right-2 bg-foreground text-background`,children:[(0,G.jsx)(I,{className:`size-3 fill-current`}),n.getDuration(e)]})]}),(0,G.jsx)(a,{tag:`div`,weight:`semibold`,className:`break-words`,children:f}),(0,G.jsx)(`dl`,{className:`media-library-detail-panel--facts grid gap-2`,children:[[r.detail.type,be(m,r)],[r.detail.size,H(n.getSize(e))||r.unknownSize],[r.detail.dimensions,U(e,n)||`-`],[r.detail.uploaded,String(n.getUploadedAt(e)??`-`)],[r.detail.usedIn,K(n.getUsageCount(e),r)]].map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,G.jsx)(`dt`,{children:(0,G.jsx)(a,{tag:`span`,size:`xs`,type:`secondary`,children:e})}),(0,G.jsx)(`dd`,{className:`m-0 text-right`,children:(0,G.jsx)(a,{tag:`span`,size:`xs`,weight:`medium`,children:t})})]},e))}),(0,G.jsx)(F,{label:r.detail.altText,children:(0,G.jsx)(M,{value:n.getAlt(e)??``,placeholder:r.detail.altPlaceholder,onChange:e=>c({alt:e.target.value})})}),(0,G.jsx)(F,{label:r.detail.collection,children:(0,G.jsx)(N,{value:g,options:t.map(e=>({value:e.value,label:String(e.label)})),"aria-label":r.detail.collection,onChange:e=>c({collection:e})})}),(0,G.jsx)(F,{label:r.detail.tags,children:(0,G.jsx)(M,{value:_.join(`, `),placeholder:r.detail.tagsPlaceholder,onChange:e=>c({tags:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})})}),(0,G.jsxs)(`div`,{className:`media-library-detail-panel--public flex items-center justify-between gap-4 rounded-lg border border-border bg-muted/20 p-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(a,{weight:`semibold`,size:`xs`,children:r.detail.public}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,children:v?r.detail.publicHint:r.detail.privateHint})]}),(0,G.jsx)(P,{checked:v,onCheckedChange:e=>c({public:e})})]}),(0,G.jsxs)(`div`,{className:`media-library-detail-panel--actions flex flex-wrap gap-2`,children:[(0,G.jsxs)(u,{type:`button`,variant:`secondary`,buttonStyle:`outline`,children:[(0,G.jsx)(p,{className:`size-3.5`}),r.detail.replace]}),(0,G.jsxs)(u,{type:`button`,variant:`error`,buttonStyle:`ghost`,onClick:l,children:[(0,G.jsx)(ee,{className:`size-3.5`}),r.detail.delete]})]})]})]})}function Ee({stagedFiles:e,uploadOptions:t,collections:n=[],uploading:r=!1,strings:o,onFiles:s,onRemoveFile:c,onOptionsChange:l,empty:d}){return(0,G.jsxs)(`div`,{className:`media-library-upload-panel--component grid gap-4 p-4`,children:[(0,G.jsx)(m,{onDrop:s,accept:`image/*,video/*`,multiple:!0,size:`default`,strings:{instruction:o.upload.dropTitle,helper:o.upload.dropHint,dragOver:o.upload.dragOver}}),e.length>0?(0,G.jsx)(`div`,{className:`media-library-upload-panel--staged grid gap-2`,children:e.map(e=>(0,G.jsxs)(`div`,{className:`media-library-upload-panel--staged-file flex items-center gap-3 rounded-lg border border-border bg-card p-2`,children:[(0,G.jsx)(q,{className:`size-10 rounded-md`,children:e.src?(0,G.jsx)(`img`,{src:e.src,alt:e.name,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:ye(e.type,`size-4`)})}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex items-baseline gap-3`,children:[(0,G.jsx)(a,{weight:`semibold`,size:`xs`,className:`truncate`,children:e.name}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,className:`ml-auto shrink-0`,children:H(e.size)})]}),(e.status===`uploading`||e.status===`done`)&&(0,G.jsx)(`div`,{className:`mt-2 h-1 overflow-hidden rounded-full bg-muted`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-primary transition-[width]`,style:{width:`${e.progress}%`}})}),e.status===`error`&&(0,G.jsx)(a,{size:`xxs`,type:`error`,children:e.error})]}),e.status===`done`?(0,G.jsx)(i,{variant:`success`,children:o.upload.done}):e.status===`uploading`?(0,G.jsxs)(a,{size:`xxs`,type:`secondary`,className:`tabular-nums`,children:[Math.round(e.progress),`%`]}):(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:r,"aria-label":L(o.upload.removeFile,{name:e.name}),onClick:()=>c(e.id),children:(0,G.jsx)(te,{className:`size-3.5`})})]},e.id))}):d,(0,G.jsxs)(`div`,{className:`media-library-upload-panel--options grid gap-3 rounded-lg border border-border bg-muted/20 p-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]`,children:[(0,G.jsx)(F,{label:o.upload.collection,children:(0,G.jsx)(N,{value:t.collection??n[0]?.value,options:n.map(e=>({value:e.value,label:String(e.label)})),"aria-label":o.upload.collection,onChange:e=>l({collection:e})})}),(0,G.jsx)(F,{label:o.upload.tags,children:(0,G.jsx)(M,{value:t.tags.join(`, `),placeholder:o.upload.tagsPlaceholder,onChange:e=>l({tags:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 md:self-end`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(a,{weight:`semibold`,size:`xs`,children:o.upload.public}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,children:o.upload.publicHint})]}),(0,G.jsx)(P,{checked:t.public,onCheckedChange:e=>l({public:e})})]})]})]})}function De({tab:e,selectedIds:t,selectionMode:n,stagedFiles:r,strings:i,onClearSelection:o,className:s}){let c=t.length,l=r.reduce((e,t)=>e+t.size,0),d=r.length,f=D(`media-library-footer-summary--component flex min-w-0 items-center gap-3`,s);return e===`upload`?(0,G.jsx)(`div`,{className:f,"aria-live":`polite`,children:(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`truncate`,children:d===0?i.footer.noFiles:L(i.footer.stagedSummary,{count:d,size:H(l)})})}):(0,G.jsx)(`div`,{className:f,"aria-live":`polite`,children:c>0?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(a,{weight:`semibold`,size:`xs`,className:`whitespace-nowrap`,children:L(i.footer.selectedCount,{count:c})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`small`,onClick:o,children:i.footer.clear})]}):(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`truncate`,children:n===`single`?i.footer.pickOne:i.footer.pickMany})})}function Y({tab:e,selectedItems:t,selectedIds:n,stagedFiles:r,uploading:i=!1,strings:a,confirmLabel:o,cancelLabel:s,onCancel:c,onConfirm:l,onUpload:d,onCancelUpload:f,className:p}){let m=n.length,h=r.length;return e===`upload`?(0,G.jsxs)(`div`,{className:D(`media-library-footer-actions--component flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,p),children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,disabled:i,onClick:f,children:s??a.footer.cancel}),(0,G.jsx)(u,{type:`button`,disabled:h===0||i,onClick:d,loading:i,loadingLabels:{loading:a.footer.uploading},children:h<=1?a.footer.upload:L(a.footer.uploadMany,{count:h})})]}):(0,G.jsxs)(`div`,{className:D(`media-library-footer-actions--component flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,p),children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,onClick:c,children:s??a.footer.cancel}),(0,G.jsx)(u,{type:`button`,disabled:m===0,onClick:l,children:o??(m===0?a.footer.confirmEmpty:t.length===1?a.footer.confirmOne:L(a.footer.confirmMany,{count:m}))})]})}function Oe({tab:e,selectedItems:t,selectedIds:n,selectionMode:r,stagedFiles:i,uploading:a=!1,strings:o,confirmLabel:s,cancelLabel:c,onCancel:l,onConfirm:u,onClearSelection:d,onUpload:f,onCancelUpload:p,chrome:m=`section`,className:h}){return(0,G.jsxs)(`footer`,{className:D(`media-library-footer--component flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,m===`section`&&`border-t border-border bg-background px-4 py-3`,h),children:[(0,G.jsx)(De,{tab:e,selectedIds:n,selectionMode:r,stagedFiles:i,strings:o,onClearSelection:d}),(0,G.jsx)(Y,{tab:e,selectedItems:t,selectedIds:n,stagedFiles:i,uploading:a,strings:o,confirmLabel:s,cancelLabel:c,onCancel:l,onConfirm:u,onUpload:f,onCancelUpload:p})]})}var ke=t(w(),1),Ae=(0,R.createContext)(null);function je(e,t,n){return(0,R.useMemo)(()=>{if(e)return e;let r=new Set;for(let e of t){let t=n(e);t&&r.add(t)}return Array.from(r).map(e=>({value:e,label:e}))},[e,n,t])}function Me({title:e,description:t,confirmLabel:n,cancelLabel:r,selectionMode:i=`multiple`,density:o=`comfortable`,showMeta:s=!0,allowUpload:c=!0,typeFilters:l,confirmOnSelect:d=!1,onConfirm:f,onCancel:m,onClose:h,strings:_,slots:v,heightClassName:y,className:b,items:x,fetcher:ee,accessors:S,collections:te,value:w,defaultValue:T,onValueChange:ne,onItemUpdate:E,onItemDelete:O,onUpload:re,onError:M,initialTab:N,defaultView:P,defaultQuery:F,defaultType:ie,defaultCollection:ae,defaultSort:oe,defaultUploadOptions:se,...ce}){let I=C(le,_),z=ve({items:x,fetcher:ee,accessors:S,collections:te,selectionMode:i,value:w,defaultValue:T,onValueChange:ne,onItemUpdate:E,onItemDelete:O,onUpload:re,onError:M,initialTab:N,defaultView:P,defaultQuery:F,defaultType:ie,defaultCollection:ae,defaultSort:oe,defaultUploadOptions:se}),ue=je(te,z.items,z.accessors.getCollection),B=c?z.tab:`library`,V=z.detailId?z.items.find(e=>z.accessors.getId(e)===z.detailId)??null:null,H=(0,R.useContext)(Ae),U=!v?.footer,W=H&&U?(0,G.jsx)(De,{tab:B,selectedIds:z.selectedIds,selectionMode:i,stagedFiles:z.stagedFiles,strings:I,onClearSelection:z.clearSelection,className:`media-library-dialog--selection-summary shrink-0 justify-end`}):null,de=!!(e||t||v?.headerStart),fe=!!(c||v?.headerEnd||W),pe=de||fe,me=()=>{f?.(z.selectedItems,z.selectedIds),h?.()},he=()=>{m?.(),h?.()},ge=e=>{let t=z.accessors.getId(e);z.toggleSelection(t),d&&(f?.([e],[t]),h?.())},_e=z.filteredCount===z.totalCount?L(I.countAll,{count:z.totalCount}):L(I.countFiltered,{count:z.filteredCount,total:z.totalCount}),ye=v?.footer??(H?(0,G.jsx)(Y,{tab:B,selectedItems:z.selectedItems,selectedIds:z.selectedIds,stagedFiles:z.stagedFiles,uploading:z.uploading,strings:I,confirmLabel:n,cancelLabel:r,onCancel:he,onConfirm:me,onUpload:z.startUpload,onCancelUpload:()=>{z.clearStagedFiles(),z.setTab(`library`)},className:`ml-auto`}):(0,G.jsx)(Oe,{tab:B,selectedItems:z.selectedItems,selectedIds:z.selectedIds,selectionMode:i,stagedFiles:z.stagedFiles,uploading:z.uploading,strings:I,confirmLabel:n,cancelLabel:r,onCancel:he,onConfirm:me,onClearSelection:z.clearSelection,onUpload:z.startUpload,onCancelUpload:()=>{z.clearStagedFiles(),z.setTab(`library`)}}));return(0,G.jsxs)(`section`,{className:D(`media-library--component flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-background`,y??`h-190 max-h-[calc(100vh-7rem)]`,b),...ce,children:[pe&&(0,G.jsxs)(`header`,{className:`media-library--header flex flex-col gap-3 border-b border-border px-4 py-3 lg:flex-row lg:items-center lg:justify-between`,children:[de&&(0,G.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[v?.headerStart,(e||t)&&(0,G.jsxs)(`div`,{className:`min-w-0`,children:[!!e&&(0,G.jsx)(a,{tag:`div`,weight:`semibold`,children:e}),!!t&&(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`mt-0.5`,children:t})]})]}),fe&&(0,G.jsxs)(`div`,{className:D(`flex min-w-0 flex-wrap items-center gap-2`,W?`flex-1 justify-between`:`lg:justify-end`),children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[c&&(0,G.jsxs)(`div`,{className:`media-library--tabs flex items-center rounded-md bg-muted p-0.5`,role:`tablist`,children:[(0,G.jsxs)(u,{type:`button`,role:`tab`,"aria-selected":B===`library`,variant:`secondary`,buttonStyle:`ghost`,className:D(`h-8 rounded-sm px-3 shadow-none`,B===`library`?`bg-background text-foreground shadow-xs hover:bg-background`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),onClick:()=>z.setTab(`library`),children:[(0,G.jsx)(g,{className:`size-3.5`}),I.tabs.library]}),(0,G.jsxs)(u,{type:`button`,role:`tab`,"aria-selected":B===`upload`,variant:`secondary`,buttonStyle:`ghost`,className:D(`h-8 rounded-sm px-3 shadow-none`,B===`upload`?`bg-background text-foreground shadow-xs hover:bg-background`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),onClick:()=>z.setTab(`upload`),children:[(0,G.jsx)(p,{className:`size-3.5`}),I.tabs.upload,z.stagedFiles.length>0&&(0,G.jsx)(`span`,{className:`rounded-full bg-background/20 px-1.5 text-xxs tabular-nums`,children:z.stagedFiles.length})]})]}),v?.headerEnd]}),W]})]}),(0,G.jsxs)(`div`,{className:`media-library--body flex min-h-0 flex-1`,children:[B===`upload`?(0,G.jsx)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,children:(0,G.jsx)(Ee,{stagedFiles:z.stagedFiles,uploadOptions:z.uploadOptions,collections:ue,uploading:z.uploading,strings:I,onFiles:z.addFiles,onRemoveFile:z.removeStagedFile,onOptionsChange:z.updateUploadOptions,empty:v?.uploadEmpty})}):(0,G.jsxs)(`div`,{className:D(`media-library--library min-w-0 flex-1 flex-col`,V?`hidden lg:flex`:`flex`),children:[(0,G.jsxs)(`div`,{className:`media-library--toolbar border-b border-border/70 px-4 py-3`,children:[(0,G.jsx)(J,{query:z.query,type:z.type,typeFilters:l,collection:z.collection,sort:z.sort,view:z.view,collections:ue,strings:I,onQueryChange:z.setQuery,onTypeChange:z.setType,onCollectionChange:z.setCollection,onSortChange:z.setSort,onViewChange:z.setView,onClearFilters:z.clearFilters,toolbarEnd:v?.toolbarEnd}),(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`mt-2`,"aria-live":`polite`,children:_e})]}),(0,G.jsx)(`div`,{className:`media-library--results min-h-0 flex-1 overflow-y-auto p-4`,children:z.loading?v?.loading??(0,G.jsx)(`div`,{className:`flex min-h-64 items-center justify-center`,children:(0,G.jsx)(a,{type:`secondary`,children:I.loading})}):z.error?v?.error??(0,G.jsxs)(j,{variant:`destructive`,children:[(0,G.jsx)(k,{children:I.errorTitle}),(0,G.jsx)(A,{children:I.errorDescription})]}):z.visibleItems.length===0?v?.empty??(0,G.jsx)(Se,{title:z.hasFilters?I.emptyFilteredTitle:I.emptyLibraryTitle,description:z.hasFilters?I.emptyFilteredDescription:I.emptyLibraryDescription,action:z.hasFilters?(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`outline`,onClick:z.clearFilters,children:I.clearFilters}):c?(0,G.jsxs)(u,{type:`button`,onClick:()=>z.setTab(`upload`),children:[(0,G.jsx)(p,{className:`size-3.5`}),I.uploadMedia]}):void 0}):z.view===`table`?(0,G.jsx)(`div`,{className:`overflow-x-auto`,children:(0,G.jsx)(we,{items:z.visibleItems,selectedSet:z.selectedSet,selectionMode:i,accessors:z.accessors,strings:I,onToggle:e=>{let t=z.items.find(t=>z.accessors.getId(t)===e);t&&ge(t)},onDetails:z.setDetailId})}):(0,G.jsx)(`div`,{className:D(`media-library--grid grid gap-3`,o===`compact`?`grid-cols-[repeat(auto-fill,minmax(136px,1fr))]`:`grid-cols-[repeat(auto-fill,minmax(168px,1fr))]`),children:z.visibleItems.map(e=>{let t=z.accessors.getId(e),n={id:t,selected:z.selectedSet.has(t),selectionMode:i,accessors:z.accessors,toggle:()=>ge(e),openDetails:()=>z.setDetailId(t)},r=v?.renderItem?.(e,n);return r?(0,G.jsx)(`div`,{children:r},t):(0,G.jsx)(Ce,{item:e,selected:n.selected,density:o,showMeta:s,selectionMode:i,accessors:z.accessors,strings:I,onToggle:n.toggle,onDetails:n.openDetails},t)})})})]}),B===`library`&&(0,G.jsx)(Te,{item:V,collections:ue,accessors:z.accessors,strings:I,onClose:()=>z.setDetailId(null),onUpdate:e=>V&&z.updateItem(V,e),onRemove:()=>{V&&(z.removeItem(V),z.setDetailId(null))},renderDetail:v?.renderDetail})]}),H?H.element?(0,ke.createPortal)(ye,H.element):null:ye]})}function Ne({open:e,onOpenChange:t,trigger:n,dialogTitle:r,dialogDescription:i,onClose:a,className:o,dialogClassName:s,contentClassName:c,closeOnEscape:l=!0,closeOnBackdropClick:u=!0,...d}){let f=C(le,d.strings),[p,m]=(0,R.useState)(!1),[h,g]=(0,R.useState)(null),_=e!==void 0,v=_?e:p,y=e=>{_||m(e),t?.(e)},b=()=>{y(!1),a?.()};return(0,G.jsx)(Ae.Provider,{value:{element:h},children:(0,G.jsx)(ie,{open:v,onOpenChange:y,onClose:a,trigger:n,title:r??f.title,description:i??f.description,size:`full`,showCancel:!1,showConfirm:!1,footer:(0,G.jsx)(`div`,{ref:g,className:`media-library-dialog--footer`}),className:D(`media-library-dialog--component max-h-[calc(100vh-2rem)] max-w-[min(1060px,calc(100vw-2rem))]`,s),contentClassName:D(`media-library-dialog--body flex min-h-0 flex-col overflow-hidden p-0`,c),closeOnBackdropClick:u,closeOnEscape:l,children:(0,G.jsx)(Me,{...d,onClose:b,className:D(`media-library-dialog--library rounded-none border-0`,o),heightClassName:d.heightClassName??`min-h-0 flex-1`,strings:d.strings})})})}function Pe(e,t,n){let r=e.slice(),[i]=r.splice(t,1);return i===void 0||r.splice(n,0,i),r}function Fe({items:e,accessors:t,title:n,description:r,primaryId:o,onPrimaryChange:l,onRemove:d,onReorder:f,onAdd:p,maxItems:m,layout:g=`field`,density:_=`comfortable`,readOnly:v=!1,empty:S,action:w,renderItem:T,strings:ne,className:E,...O}){let k=C(le,ne),A=V(t),j=e.length,re=o??(j>0?A.getId(e[0]):void 0),M=!v&&!!p&&(m===void 0||j<m),N=M&&(g===`field`||j>0)?(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`outline`,icon:b,onClick:p,children:k.gallery.add}):m!==void 0&&j>=m?(0,G.jsx)(i,{variant:`secondary`,children:k.gallery.maxReached}):null,P=(t,n)=>{if(n<0||n>=j||t===n)return;let r=Pe(e,t,n);f?.(r.map(e=>A.getId(e)),r)},F=!!(n||r||w||N),ie=j===0&&g!==`field`,ae=()=>!M||g!==`field`?null:(0,G.jsxs)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,className:D(`media-resource-gallery--add-tile h-auto min-h-24 w-full flex-col rounded-lg border border-dashed border-border bg-background text-muted-foreground shadow-none`,`aspect-square hover:border-primary/50 hover:bg-primary/5 hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`),"aria-label":k.gallery.addTile,onClick:p,children:[(0,G.jsx)(b,{className:`size-4`}),(0,G.jsx)(`span`,{className:`sr-only`,children:k.gallery.addTile})]});return(0,G.jsxs)(`section`,{className:D(`media-resource-gallery--component rounded-lg border border-border bg-card shadow-xs`,E),"data-layout":g,"data-density":_,...O,children:[F&&(0,G.jsxs)(`header`,{className:`media-resource-gallery--header flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[!!n&&(0,G.jsx)(a,{tag:`div`,weight:`semibold`,children:n}),!!r&&(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`mt-0.5`,children:r})]}),(0,G.jsx)(`div`,{className:`media-resource-gallery--actions flex flex-wrap items-center gap-2`,children:w??N})]}),ie?(0,G.jsx)(`div`,{className:`media-resource-gallery--empty p-4 pt-0`,children:S??(0,G.jsx)(Se,{title:k.gallery.emptyTitle,description:k.gallery.emptyDescription,action:M?(0,G.jsx)(u,{type:`button`,icon:oe,onClick:p,children:k.gallery.add}):void 0})}):(0,G.jsxs)(`div`,{className:D(`media-resource-gallery--items p-4`,F&&`pt-0`,g===`list`?`grid gap-2`:g===`field`?`grid grid-cols-[repeat(auto-fill,minmax(96px,1fr))] gap-3 sm:grid-cols-[repeat(auto-fill,minmax(108px,1fr))]`:_===`compact`?`grid grid-cols-[repeat(auto-fill,minmax(132px,1fr))] gap-3`:`grid grid-cols-[repeat(auto-fill,minmax(164px,1fr))] gap-3`),children:[e.map((e,t)=>{let n=A.getId(e),r=A.getName(e),o=A.getType(e),f=A.getSrc(e),p=A.getAlt(e)||r,m=n===re,_=A.getPublic(e)===!1,b=A.getDuration(e),S=t>0,C=t<j-1,w=T?.(e,{id:n,index:t,total:j,primary:m,accessors:A,canMovePrevious:S,canMoveNext:C,setPrimary:()=>l?.(n,e),remove:()=>d?.(n,e),movePrevious:()=>P(t,t-1),moveNext:()=>P(t,t+1)});return w?(0,G.jsx)(`div`,{children:w},n):g===`field`?(0,G.jsxs)(`div`,{className:D(`media-resource-gallery--item group/gallery relative aspect-square overflow-hidden rounded-lg border border-border bg-background shadow-xs`,`transition-colors hover:border-primary/40 focus-within:border-primary/50`,m&&`col-span-2 row-span-2 min-h-52`),"data-primary":m||void 0,children:[f?(0,G.jsx)(`img`,{src:f,alt:p,loading:`lazy`,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center bg-muted text-muted-foreground`,children:(0,G.jsx)(h,{className:m?`size-7`:`size-5`})}),m&&(0,G.jsx)(i,{variant:`secondary`,className:`absolute left-2 top-2 bg-background/90 shadow-xs`,children:k.gallery.cover}),o===`video`&&!!b&&(0,G.jsxs)(i,{variant:`secondary`,className:`absolute bottom-2 left-2 bg-foreground text-background`,children:[(0,G.jsx)(I,{className:`size-3 fill-current`}),b]}),_&&(0,G.jsx)(`span`,{className:`absolute bottom-2 right-2 inline-flex size-6 items-center justify-center rounded-full border border-border bg-background/90 text-muted-foreground shadow-xs`,children:(0,G.jsx)(y,{className:`size-3`})}),!v&&(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`solid`,size:`icon-small`,className:`absolute right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/gallery:opacity-100 group-focus-within/gallery:opacity-100`,"aria-label":k.gallery.remove,onClick:()=>d?.(n,e),children:(0,G.jsx)(te,{className:`size-3.5`})})]},n):g===`list`?(0,G.jsxs)(`div`,{className:`media-resource-gallery--item flex min-w-0 items-center gap-3 rounded-lg border border-border bg-background p-2`,"data-primary":m||void 0,children:[(0,G.jsx)(`div`,{className:`relative size-12 shrink-0 overflow-hidden rounded-md bg-muted`,children:f?(0,G.jsx)(`img`,{src:f,alt:p,loading:`lazy`,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:(0,G.jsx)(h,{className:`size-4`})})}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(a,{tag:`div`,weight:`semibold`,size:`xs`,className:`truncate`,children:r}),m&&(0,G.jsx)(i,{variant:`info`,children:k.gallery.primary})]}),(0,G.jsxs)(a,{size:`xxs`,type:`secondary`,children:[L(k.gallery.itemPosition,{index:t+1,total:j}),` · `,H(A.getSize(e))||k.unknownSize]})]}),!v&&(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:m,"aria-label":k.gallery.setPrimary,onClick:()=>l?.(n,e),children:(0,G.jsx)(x,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:!S,"aria-label":k.gallery.movePrevious,onClick:()=>P(t,t-1),children:(0,G.jsx)(s,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:!C,"aria-label":k.gallery.moveNext,onClick:()=>P(t,t+1),children:(0,G.jsx)(c,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`error`,buttonStyle:`ghost`,size:`icon-small`,"aria-label":k.gallery.remove,onClick:()=>d?.(n,e),children:(0,G.jsx)(ee,{className:`size-3.5`})})]})]},n):(0,G.jsxs)(`div`,{className:`media-resource-gallery--item group/gallery overflow-hidden rounded-lg border border-border bg-background shadow-xs transition-colors hover:border-primary/40`,"data-primary":m||void 0,children:[(0,G.jsxs)(`div`,{className:`relative aspect-[4/3] bg-muted`,children:[f?(0,G.jsx)(`img`,{src:f,alt:p,loading:`lazy`,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:(0,G.jsx)(h,{className:`size-6`})}),(0,G.jsxs)(`div`,{className:`absolute left-2 top-2 flex flex-wrap gap-1`,children:[m&&(0,G.jsx)(i,{variant:`info`,children:k.gallery.primary}),(0,G.jsx)(i,{variant:`secondary`,children:L(k.gallery.itemPosition,{index:t+1,total:j})})]})]}),(0,G.jsxs)(`div`,{className:`media-resource-gallery--item-body grid gap-2 p-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(a,{tag:`div`,weight:`semibold`,size:`xs`,className:`truncate`,children:r}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,children:H(A.getSize(e))||k.unknownSize})]}),!v&&(0,G.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:m,"aria-label":k.gallery.setPrimary,onClick:()=>l?.(n,e),children:(0,G.jsx)(x,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:!S,"aria-label":k.gallery.movePrevious,onClick:()=>P(t,t-1),children:(0,G.jsx)(s,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:!C,"aria-label":k.gallery.moveNext,onClick:()=>P(t,t+1),children:(0,G.jsx)(c,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`error`,buttonStyle:`ghost`,size:`icon-small`,className:`ml-auto`,"aria-label":k.gallery.remove,onClick:()=>d?.(n,e),children:(0,G.jsx)(ee,{className:`size-3.5`})})]})]})]},n)}),ae()]})]})}var Ie=e({AsyncFetcherLibrary:()=>Ye,ConfirmOnSelectDialog:()=>Je,EmbeddedLibrary:()=>We,EmptyAndErrorStates:()=>Xe,ExternalResourceGallery:()=>qe,HeadlessSelection:()=>Ze,ProductMediaDialog:()=>Ge,ResourceGalleryList:()=>Ke}),Le=[{value:`Products`,label:`Products`},{value:`Lifestyle`,label:`Lifestyle`},{value:`Banners`,label:`Banners`}];function X(e,t,n){let r=`
1
+ import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-BPNIPavy.js";import{t as s}from"./arrow-left-C9I0h_su.js";import{t as c}from"./arrow-right-DswaRsr6.js";import{Or as l,r as u,t as d}from"./example-CJMJcnb4.js";import{t as f}from"./circle-check-C0X85t4j.js";import{n as p,t as m}from"./dropzone-CxOLmdkt.js";import{t as h}from"./file-CJFWrwy1.js";import{t as g}from"./image-CxNywgkb.js";import{t as _}from"./info-B5fZn_ZC.js";import{t as v}from"./layers-QXZ9Jfej.js";import{t as y}from"./lock-BDZLNQLR.js";import{t as b}from"./plus-CQcelTNc.js";import{t as x}from"./star-Ck8Lg5hm.js";import{t as ee}from"./trash-2-CtRtVsCy.js";import{t as S}from"./video-BucshqNW.js";import{t as te}from"./x-DyuS4YRT.js";import{N as C,P as w,a as T,d as ne,l as E,n as D}from"./index-jD-KSiHu.js";import{t as O}from"./props-table-DoDq8Mvr.js";import{i as k,r as A,t as j}from"./alert-6Emt6KX2.js";import{t as re}from"./smart-card-p97LLZCW.js";import{t as M}from"./input-CkNgwwCs.js";import{t as N}from"./select-BauiG1a3.js";import{n as P}from"./switch-Bn0WaWa9.js";import{n as F}from"./form-field-Dhy0eM5B.js";import{t as ie}from"./dialog-C0ALRmbP.js";var ae=E(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),oe=E(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),se=E(`images`,[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]]),ce=E(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),I=E(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),le={title:`Add media`,description:`Pick from the library, or upload new files.`,close:`Close media library`,tabs:{library:`Library`,upload:`Upload`},searchPlaceholder:`Search by name or tag...`,clearSearch:`Clear search`,typeFilterLabel:`Type`,collectionFilterLabel:`Collection`,sortLabel:`Sort`,viewLabel:`View`,allTypes:`All`,images:`Images`,videos:`Videos`,files:`Files`,allCollections:`All collections`,sortNewest:`Newest`,sortName:`Name`,sortSize:`Size`,sortUsage:`Most used`,gridView:`Grid view`,tableView:`Table view`,countAll:`{count} items`,countFiltered:`{count} of {total} items`,emptyLibraryTitle:`Library is empty`,emptyLibraryDescription:`Upload images or videos to start building the library.`,emptyFilteredTitle:`No media matches`,emptyFilteredDescription:`Try a different search term, or clear the filters.`,clearFilters:`Clear filters`,uploadMedia:`Upload media`,loading:`Loading media...`,errorTitle:`Media could not load`,errorDescription:`Try again or adjust your filters.`,cardDetails:`Details for {name}`,privateLabel:`Private`,publicLabel:`Public`,typeImage:`Image`,typeVideo:`Video`,typeFile:`File`,unknownSize:`Unknown`,notUsed:`Not used yet`,usedIn:`{count} {count, plural, one {place} other {places}}`,table:{name:`Name`,type:`Type`,size:`Size`,collection:`Collection`,used:`Used`},detail:{title:`Details`,altText:`Alt text`,altPlaceholder:`Describe this media for screen readers`,collection:`Collection`,tags:`Tags`,tagsPlaceholder:`Comma-separated`,public:`Public`,publicHint:`Served from the public CDN`,privateHint:`Only visible in the admin`,type:`Type`,size:`Size`,dimensions:`Dimensions`,uploaded:`Uploaded`,usedIn:`Used in`,replace:`Replace file`,delete:`Delete`,close:`Close details`},upload:{dropTitle:`Drag files here or click to browse`,dropHint:`JPG, PNG, WebP, SVG and MP4 up to 50 MB per file`,dragOver:`Release to stage files`,collection:`Collection`,tags:`Tags`,tagsPlaceholder:`Comma-separated`,public:`Public`,publicHint:`Serve from the public CDN`,noFiles:`No files staged`,stagedCount:`{count} {count, plural, one {file} other {files}}`,removeFile:`Remove {name}`,uploading:`Uploading`,done:`Done`},footer:{pickOne:`Pick one item`,pickMany:`Pick one or more items`,selectedCount:`{count} selected`,clear:`Clear`,cancel:`Cancel`,confirmEmpty:`Add to product`,confirmOne:`Add 1 item`,confirmMany:`Add {count} items`,noFiles:`No files staged`,stagedSummary:`{count} {count, plural, one {file} other {files}} · {size}`,upload:`Upload`,uploadMany:`Upload {count} files`,uploading:`Uploading...`},gallery:{emptyTitle:`No media attached`,emptyDescription:`Add images, video, or files to this resource.`,add:`Add media`,addMore:`Add more`,addTile:`Add another media item`,cover:`Cover`,primary:`Primary`,setPrimary:`Set primary`,remove:`Remove`,movePrevious:`Move previous`,moveNext:`Move next`,itemPosition:`{index} of {total}`,maxReached:`Maximum reached`}};function L(e,t){return e.replace(/\{(\w+), plural, one \{([^}]*)\} other \{([^}]*)\}\}/g,(e,n,r,i)=>Number(t[n])===1?r:i).replace(/\{(\w+)\}/g,(e,n)=>String(t[n]??``))}var R=t(n(),1),z={collection:void 0,tags:[],public:!0},ue=[],B={getId:e=>e.id,getName:e=>e.name,getType:e=>e.type,getSrc:e=>e.src,getAlt:e=>e.alt,getSize:e=>e.size,getWidth:e=>e.width,getHeight:e=>e.height,getDuration:e=>e.duration,getCollection:e=>e.collection,getTags:e=>e.tags??[],getPublic:e=>e.public,getUploadedAt:e=>e.uploadedAt,getUsageCount:e=>e.usageCount,getTint:e=>e.tint,getMimeType:e=>e.mimeType};function V(e){return{...B,...e??{}}}function H(e){return!e||e<=0?``:e>=1048576?`${(e/1048576).toFixed(1)} MB`:`${Math.max(1,Math.round(e/1024))} KB`}function U(e,t){let n=t.getWidth(e),r=t.getHeight(e);return!n||!r?``:`${n} x ${r}`}function W(e,t){let n=t.getUploadedAt(e);if(!n)return 0;let r=(n instanceof Date?n:new Date(n)).getTime();return Number.isFinite(r)?r:0}function de(e){return e.type.startsWith(`image/`)?`image`:e.type.startsWith(`video/`)?`video`:`file`}function fe(e){if(e.type.startsWith(`image/`)&&!(typeof URL>`u`||typeof URL.createObjectURL!=`function`))return URL.createObjectURL(e)}function pe(e){!e||typeof URL>`u`||typeof URL.revokeObjectURL!=`function`||URL.revokeObjectURL(e)}function me(e){return Array.isArray(e)?{items:e,total:e.length}:e}function he(e,t){return t&&typeof e==`object`&&e?{...e,...t}:e}function ge(e,t,n,r,i){let a=n.trim().toLowerCase();return e.filter(e=>r!==`all`&&t.getType(e)!==r||i!==`all`&&t.getCollection(e)!==i?!1:a?[t.getName(e),t.getAlt(e),t.getCollection(e),...t.getTags(e)].filter(Boolean).join(` `).toLowerCase().includes(a):!0)}function _e(e,t,n){let r=e.slice();return n===`name`?r.sort((e,n)=>t.getName(e).localeCompare(t.getName(n))):n===`size`?r.sort((e,n)=>(t.getSize(n)??0)-(t.getSize(e)??0)):n===`usage`?r.sort((e,n)=>(t.getUsageCount(n)??0)-(t.getUsageCount(e)??0)):r.sort((e,n)=>W(n,t)-W(e,t)),r}function ve({items:e=ue,fetcher:t,accessors:n,selectionMode:r=`multiple`,value:i,defaultValue:a=[],onValueChange:o,onItemUpdate:s,onItemDelete:c,onUpload:l,onError:u,initialTab:d=`library`,defaultView:f=`grid`,defaultQuery:p=``,defaultType:m=`all`,defaultCollection:h=`all`,defaultSort:g=`newest`,defaultUploadOptions:_}={}){let v=(0,R.useMemo)(()=>V(n),[n]),[y,b]=(0,R.useState)(d),[x,ee]=(0,R.useState)(f),[S,te]=(0,R.useState)(p),[C,w]=(0,R.useState)(m),[T,ne]=(0,R.useState)(h),[E,D]=(0,R.useState)(g),[O,k]=(0,R.useState)(null),[A,j]=(0,R.useState)(()=>[...a]),[re,M]=(0,R.useState)([]),[N,P]=(0,R.useState)(),[F,ie]=(0,R.useState)(!1),[ae,oe]=(0,R.useState)(null),[se,ce]=(0,R.useState)([]),[I,le]=(0,R.useState)(()=>new Set),[L,B]=(0,R.useState)({}),[H,U]=(0,R.useState)([]),[W,ve]=(0,R.useState)(!1),[G,ye]=(0,R.useState)({...z,..._,tags:_?.tags??z.tags}),be=i!==void 0,K=(0,R.useMemo)(()=>be?[...i??[]]:A,[A,be,i]),q=(0,R.useMemo)(()=>new Set(K),[K]),xe=(0,R.useRef)(new Set);(0,R.useEffect)(()=>{if(!t)return;let e=new AbortController;return ie(!0),oe(null),t({query:S,type:C,collection:T===`all`?void 0:T,sort:E,signal:e.signal}).then(t=>{if(e.signal.aborted)return;let n=me(t);M(n.items),P(n.total)}).catch(t=>{e.signal.aborted||(oe(t),u?.(t))}).finally(()=>{e.signal.aborted||ie(!1)}),()=>e.abort()},[T,t,u,S,E,C]),(0,R.useEffect)(()=>{let e=xe.current;return()=>{for(let t of e)pe(t);e.clear()}},[]);let Se=(0,R.useMemo)(()=>t?re:[...se,...e],[se,re,t,e]),J=(0,R.useMemo)(()=>Se.filter(e=>!I.has(v.getId(e))).map(e=>he(e,L[v.getId(e)])),[v,L,I,Se]),Ce=(0,R.useMemo)(()=>{let e=t?J:ge(J,v,S,C,T);return t?e:_e(e,v,E)},[v,T,t,J,S,E,C]),we=N??J.length,Te=Ce.length,Ee=(0,R.useMemo)(()=>J.filter(e=>q.has(v.getId(e))),[v,J,q]),De=!!S.trim()||C!==`all`||T!==`all`,Y=(0,R.useCallback)(e=>{be||j(e);let t=new Set(e),n=J.filter(e=>t.has(v.getId(e)));o?.(e,n)},[v,be,o,J]),Oe=(0,R.useCallback)(e=>{let t=new Set(r===`single`?[]:q);q.has(e)&&r!==`single`?t.delete(e):t.add(e),Y(Array.from(t))},[Y,q,r]),ke=(0,R.useCallback)(()=>Y([]),[Y]),Ae=(0,R.useCallback)(()=>{te(``),w(`all`),ne(`all`)},[]),je=(0,R.useCallback)(e=>{U(t=>[...t,...e.map((e,t)=>{let n=fe(e);return n&&xe.current.add(n),{id:`staged-${Date.now()}-${t}`,file:e,name:e.name,size:e.size,type:de(e),src:n,progress:0,status:`staged`}})])},[]),Me=(0,R.useCallback)(e=>{U(t=>{let n=t.find(t=>t.id===e);return n?.src&&(pe(n.src),xe.current.delete(n.src)),t.filter(t=>t.id!==e)})},[]),Ne=(0,R.useCallback)(()=>{U(e=>{for(let t of e)t.src&&(pe(t.src),xe.current.delete(t.src));return[]})},[]),Pe=(0,R.useCallback)(e=>{ye(t=>({...t,...e}))},[]),Fe=(0,R.useCallback)((e,t)=>{U(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]);return{tab:y,setTab:b,view:x,setView:ee,query:S,setQuery:te,type:C,setType:w,collection:T,setCollection:ne,sort:E,setSort:D,detailId:O,setDetailId:k,items:J,visibleItems:Ce,selectedIds:K,selectedItems:Ee,selectedSet:q,toggleSelection:Oe,clearSelection:ke,clearFilters:Ae,loading:F,error:ae,hasFilters:De,totalCount:we,filteredCount:Te,stagedFiles:H,addFiles:je,removeStagedFile:Me,clearStagedFiles:Ne,updateUploadOptions:Pe,uploadOptions:G,uploading:W,startUpload:(0,R.useCallback)(async()=>{if(W||H.length===0)return;ve(!0),U(e=>e.map(e=>({...e,status:`uploading`,progress:0})));let e={setProgress:(e,t)=>{Fe(e,{progress:Math.max(0,Math.min(100,t))})},setFileStatus:(e,t,n)=>Fe(e,{status:t,error:n})};try{let t=H.map(e=>e.file),n=await l?.(t,G,e);if(U(e=>e.map(e=>({...e,status:`done`,progress:100}))),n?.length){ce(e=>[...n,...e]);let e=n.map(e=>v.getId(e));Y(r===`single`?e.slice(0,1):Array.from(new Set([...e,...K])))}Ne(),b(`library`)}catch(e){oe(e),U(e=>e.map(e=>e.status===`uploading`?{...e,status:`error`,error:`Upload failed`}:e)),u?.(e)}finally{ve(!1)}},[v,Y,Ne,u,l,K,r,Fe,H,G,W]),updateItem:(0,R.useCallback)((e,t)=>{let n=v.getId(e);B(e=>({...e,[n]:{...e[n],...t}})),s?.(e,t)},[v,s]),removeItem:(0,R.useCallback)(e=>{let t=v.getId(e);le(e=>new Set(e).add(t)),q.has(t)&&Y(K.filter(e=>e!==t)),c?.(e)},[v,Y,c,K,q]),accessors:v}}var G=ne();function ye(e,t){return e===`image`?(0,G.jsx)(g,{className:t??`size-4`}):e===`video`?(0,G.jsx)(S,{className:t??`size-4`}):(0,G.jsx)(h,{className:t??`size-4`})}function be(e,t){return e===`image`?t.typeImage:e===`video`?t.typeVideo:t.typeFile}function K(e,t){return e?L(t.usedIn,{count:e}):t.notUsed}function q({children:e,tint:t,className:n}){return(0,G.jsx)(`div`,{className:D(`media-library-preview relative overflow-hidden bg-muted`,n),style:t?{background:t}:void 0,children:e})}function xe({src:e,alt:t,type:n,className:r,loading:i=`lazy`}){let[a,o]=(0,R.useState)(!1);return(0,R.useEffect)(()=>{o(!1)},[e]),!e||a?(0,G.jsx)(`div`,{className:`media-library-preview--fallback flex size-full items-center justify-center text-muted-foreground`,children:ye(n,`size-6`)}):(0,G.jsx)(`img`,{src:e,alt:t,loading:i,className:r,onError:()=>o(!0)})}function Se({icon:e,title:t,description:n,action:r,className:i}){return(0,G.jsxs)(`div`,{className:D(`media-library-empty-state--component flex min-h-64 flex-col items-center justify-center rounded-lg border border-dashed border-border bg-muted/20 px-6 py-10 text-center`,i),children:[(0,G.jsx)(`div`,{className:`mb-3 inline-flex size-10 items-center justify-center rounded-full bg-muted text-muted-foreground`,children:e??(0,G.jsx)(g,{className:`size-5`})}),(0,G.jsx)(a,{tag:`div`,weight:`semibold`,children:t}),!!n&&(0,G.jsx)(a,{type:`secondary`,size:`xs`,className:`mt-1 max-w-sm`,children:n}),!!r&&(0,G.jsx)(`div`,{className:`mt-4`,children:r})]})}function J({query:e,type:t,typeFilters:n,collection:r,sort:i,view:a,collections:o=[],strings:s,onQueryChange:c,onTypeChange:l,onCollectionChange:d,onSortChange:f,onViewChange:p,onClearFilters:m,toolbarEnd:_}){let v=[{value:`all`,label:s.allTypes,icon:null},{value:`image`,label:s.images,icon:g},{value:`video`,label:s.videos,icon:S},{value:`file`,label:s.files,icon:h}].filter(e=>(n??[`all`,`image`,`video`]).includes(e.value)),y=[{value:`all`,label:s.allCollections},...o.map(e=>({value:e.value,label:String(e.label)}))],b=[{value:`newest`,label:s.sortNewest},{value:`name`,label:s.sortName},{value:`size`,label:s.sortSize},{value:`usage`,label:s.sortUsage}];return(0,G.jsxs)(`div`,{className:`media-library-toolbar--component flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`min-w-52 flex-1`,children:(0,G.jsx)(M,{value:e,onChange:e=>c(e.target.value),placeholder:s.searchPlaceholder,startIcon:T,clearable:!0,onClear:()=>c(``),strings:{clear:s.clearSearch},className:`rounded-full bg-muted/20`})}),(0,G.jsx)(`div`,{className:`media-library-toolbar--type-toggle flex h-9 items-center rounded-md bg-muted p-0.5`,role:`tablist`,"aria-label":s.typeFilterLabel,children:v.map(e=>{let n=e.icon,r=t===e.value;return(0,G.jsxs)(u,{type:`button`,role:`tab`,"aria-selected":r,variant:`secondary`,buttonStyle:`ghost`,className:D(`h-8 rounded-sm px-3 text-xs shadow-none`,r?`bg-background text-foreground shadow-xs hover:bg-background`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),onClick:()=>l(e.value),children:[n&&(0,G.jsx)(n,{className:`size-3.5`}),e.label]},e.value)})}),(0,G.jsx)(`div`,{className:`min-w-40`,children:(0,G.jsx)(N,{value:r,options:y,onChange:e=>d(e??`all`),placeholder:s.collectionFilterLabel,"aria-label":s.collectionFilterLabel,className:`bg-background`})}),(0,G.jsx)(`div`,{className:`min-w-32`,children:(0,G.jsx)(N,{value:i,options:b,onChange:e=>f(e??`newest`),placeholder:s.sortLabel,"aria-label":s.sortLabel,className:`bg-background`})}),(0,G.jsxs)(`div`,{className:`media-library-toolbar--view-toggle ml-auto flex h-9 items-center rounded-md bg-muted p-0.5`,children:[(0,G.jsx)(u,{type:`button`,variant:a===`grid`?`dark`:`secondary`,buttonStyle:a===`grid`?`solid`:`ghost`,size:`icon-small`,className:D(a===`grid`&&`bg-background text-foreground shadow-xs hover:bg-background`),"aria-label":s.gridView,onClick:()=>p(`grid`),children:(0,G.jsx)(ae,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:a===`table`?`dark`:`secondary`,buttonStyle:a===`table`?`solid`:`ghost`,size:`icon-small`,className:D(a===`table`&&`bg-background text-foreground shadow-xs hover:bg-background`),"aria-label":s.tableView,onClick:()=>p(`table`),children:(0,G.jsx)(ce,{className:`size-3.5`})})]}),!!e&&(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,onClick:m,children:s.clearFilters}),_]})}function Ce({item:e,selected:t=!1,density:n=`comfortable`,showMeta:r=!0,accessors:o,strings:s,onToggle:c,onDetails:d,className:f}){let p=o.getType(e),m=o.getName(e),h=o.getSrc(e),g=o.getAlt(e)||m,b=o.getSize(e),x=o.getUsageCount(e),ee=o.getPublic(e)===!1,S=o.getDuration(e);return(0,G.jsxs)(`div`,{"data-selected":t||void 0,"data-density":n,className:D(`media-library-card--component group/card overflow-hidden rounded-xl border border-border/70 bg-card text-left shadow-xs transition-all`,`hover:border-primary/30 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,t&&`media-library-card--selected border-primary ring-1 ring-primary`,f),onClick:c,children:[(0,G.jsxs)(q,{tint:o.getTint(e),className:D(n===`compact`?`aspect-square`:`aspect-[4/3]`),children:[(0,G.jsx)(xe,{src:h,alt:g,type:p,className:`size-full object-cover`}),(0,G.jsx)(`span`,{className:D(`media-library-card--check absolute left-2 top-2 inline-flex size-5 items-center justify-center rounded-md border border-border bg-background/95 text-transparent opacity-0 shadow-xs backdrop-blur transition-opacity group-hover/card:opacity-100 group-focus-visible/card:opacity-100`,t&&`bg-primary text-primary-foreground opacity-100`),"aria-hidden":`true`,children:(0,G.jsx)(l,{className:`size-3`})}),!!d&&(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`solid`,size:`icon-small`,className:`media-library-card--details absolute right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100`,"aria-label":L(s.cardDetails,{name:m}),onClick:e=>{e.stopPropagation(),d()},children:(0,G.jsx)(_,{className:`size-3.5`})}),p===`video`&&!!S&&(0,G.jsxs)(i,{variant:`secondary`,className:`media-library-card--duration absolute bottom-2 left-2 bg-foreground text-background`,children:[(0,G.jsx)(I,{className:`size-3 fill-current`}),S]}),ee&&(0,G.jsx)(i,{variant:`secondary`,className:`media-library-card--private absolute bottom-2 right-2 bg-background/90`,children:(0,G.jsx)(y,{className:`size-3`})})]}),(0,G.jsxs)(`div`,{className:`media-library-card--body grid gap-1 px-3 py-2.5`,children:[(0,G.jsx)(a,{tag:`div`,weight:`semibold`,size:`xs`,className:`truncate`,children:m}),r&&(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(a,{size:`xxs`,type:`secondary`,className:`truncate`,children:H(b)||s.unknownSize}),!!x&&(0,G.jsxs)(a,{tag:`span`,size:`xxs`,type:`secondary`,className:`ml-auto inline-flex items-center gap-1`,children:[(0,G.jsx)(v,{className:`size-3`}),x]})]})]})]})}function we({items:e,selectedSet:t,accessors:n,strings:r,onToggle:o,onDetails:s}){return(0,G.jsxs)(`div`,{className:`media-library-table--component min-w-180`,children:[(0,G.jsxs)(`div`,{className:`sticky top-0 z-10 grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-3 border-b border-border bg-background px-3 py-2`,children:[(0,G.jsx)(`span`,{}),(0,G.jsx)(`span`,{}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.name}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.type}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.size}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.collection}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,weight:`semibold`,children:r.table.used}),(0,G.jsx)(`span`,{})]}),e.map(e=>{let c=n.getId(e),d=t.has(c),f=n.getType(e),p=n.getName(e),m=n.getSrc(e),h=n.getPublic(e)===!1;return(0,G.jsxs)(`div`,{"data-selected":d||void 0,className:D(`media-library-table--row grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-3 border-b border-border/60 px-3 py-2 last:border-b-0`,`cursor-pointer rounded-lg transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,d&&`bg-primary/10`),onClick:()=>o(c),children:[(0,G.jsx)(`span`,{className:D(`inline-flex size-5 items-center justify-center rounded-md border border-border text-transparent`,d&&`border-primary bg-primary text-primary-foreground`),"aria-hidden":`true`,children:(0,G.jsx)(l,{className:`size-3`})}),(0,G.jsx)(q,{tint:n.getTint(e),className:`size-9 rounded-md`,children:m?(0,G.jsx)(`img`,{src:m,alt:``,loading:`lazy`,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:ye(f,`size-4`)})}),(0,G.jsxs)(a,{tag:`div`,weight:`semibold`,size:`xs`,className:`flex min-w-0 items-center gap-1 truncate`,children:[(0,G.jsx)(`span`,{className:`truncate`,children:p}),h&&(0,G.jsx)(y,{className:`size-3 shrink-0 text-muted-foreground`})]}),(0,G.jsx)(i,{variant:`secondary`,children:be(f,r)}),(0,G.jsx)(a,{size:`xs`,type:`secondary`,children:H(n.getSize(e))||r.unknownSize}),(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`truncate`,children:n.getCollection(e)||`-`}),(0,G.jsx)(a,{size:`xs`,type:`secondary`,children:n.getUsageCount(e)?n.getUsageCount(e):`-`}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,"aria-label":L(r.cardDetails,{name:p}),onClick:e=>{e.stopPropagation(),s(c)},children:(0,G.jsx)(_,{className:`size-3.5`})})]},c)})]})}function Te({item:e,collections:t=[],accessors:n,strings:r,onClose:o,onUpdate:c,onRemove:l,renderDetail:d}){if(!e)return null;let f=n.getName(e),m=n.getType(e),h=n.getSrc(e),g=n.getCollection(e)??t[0]?.value??``,_=n.getTags(e),v=n.getPublic(e)??!0,y=d?.(e,{accessors:n,update:c,remove:l,close:o});return y?(0,G.jsx)(G.Fragment,{children:y}):(0,G.jsxs)(`aside`,{className:`media-library-detail-panel--component flex min-h-0 w-full flex-col border-l border-border bg-background lg:w-72`,children:[(0,G.jsxs)(`div`,{className:`media-library-detail-panel--header flex items-center gap-2 border-b border-border px-3 py-2.5`,children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,"aria-label":r.detail.close,onClick:o,children:(0,G.jsx)(s,{className:`size-3.5`})}),(0,G.jsx)(a,{weight:`semibold`,children:r.detail.title})]}),(0,G.jsxs)(`div`,{className:`media-library-detail-panel--body grid min-h-0 gap-4 overflow-y-auto p-4`,children:[(0,G.jsxs)(q,{tint:n.getTint(e),className:`aspect-[4/3] rounded-lg border border-border`,children:[(0,G.jsx)(xe,{src:h,alt:n.getAlt(e)||f,type:m,className:`size-full object-cover`}),m===`video`&&!!n.getDuration(e)&&(0,G.jsxs)(i,{className:`absolute bottom-2 right-2 bg-foreground text-background`,children:[(0,G.jsx)(I,{className:`size-3 fill-current`}),n.getDuration(e)]})]}),(0,G.jsx)(a,{tag:`div`,weight:`semibold`,className:`break-words`,children:f}),(0,G.jsx)(`dl`,{className:`media-library-detail-panel--facts grid gap-2`,children:[[r.detail.type,be(m,r)],[r.detail.size,H(n.getSize(e))||r.unknownSize],[r.detail.dimensions,U(e,n)||`-`],[r.detail.uploaded,String(n.getUploadedAt(e)??`-`)],[r.detail.usedIn,K(n.getUsageCount(e),r)]].map(([e,t])=>(0,G.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,G.jsx)(`dt`,{children:(0,G.jsx)(a,{tag:`span`,size:`xs`,type:`secondary`,children:e})}),(0,G.jsx)(`dd`,{className:`m-0 text-right`,children:(0,G.jsx)(a,{tag:`span`,size:`xs`,weight:`medium`,children:t})})]},e))}),(0,G.jsx)(F,{label:r.detail.altText,children:(0,G.jsx)(M,{value:n.getAlt(e)??``,placeholder:r.detail.altPlaceholder,onChange:e=>c({alt:e.target.value})})}),(0,G.jsx)(F,{label:r.detail.collection,children:(0,G.jsx)(N,{value:g,options:t.map(e=>({value:e.value,label:String(e.label)})),"aria-label":r.detail.collection,onChange:e=>c({collection:e})})}),(0,G.jsx)(F,{label:r.detail.tags,children:(0,G.jsx)(M,{value:_.join(`, `),placeholder:r.detail.tagsPlaceholder,onChange:e=>c({tags:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})})}),(0,G.jsxs)(`div`,{className:`media-library-detail-panel--public flex items-center justify-between gap-4 rounded-lg border border-border bg-muted/20 p-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(a,{weight:`semibold`,size:`xs`,children:r.detail.public}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,children:v?r.detail.publicHint:r.detail.privateHint})]}),(0,G.jsx)(P,{checked:v,onCheckedChange:e=>c({public:e})})]}),(0,G.jsxs)(`div`,{className:`media-library-detail-panel--actions flex flex-wrap gap-2`,children:[(0,G.jsxs)(u,{type:`button`,variant:`secondary`,buttonStyle:`outline`,children:[(0,G.jsx)(p,{className:`size-3.5`}),r.detail.replace]}),(0,G.jsxs)(u,{type:`button`,variant:`error`,buttonStyle:`ghost`,onClick:l,children:[(0,G.jsx)(ee,{className:`size-3.5`}),r.detail.delete]})]})]})]})}function Ee({stagedFiles:e,uploadOptions:t,collections:n=[],uploading:r=!1,strings:o,onFiles:s,onRemoveFile:c,onOptionsChange:l,empty:d}){return(0,G.jsxs)(`div`,{className:`media-library-upload-panel--component grid gap-4 p-4`,children:[(0,G.jsx)(m,{onDrop:s,accept:`image/*,video/*`,multiple:!0,size:`default`,strings:{instruction:o.upload.dropTitle,helper:o.upload.dropHint,dragOver:o.upload.dragOver}}),e.length>0?(0,G.jsx)(`div`,{className:`media-library-upload-panel--staged grid gap-2`,children:e.map(e=>(0,G.jsxs)(`div`,{className:`media-library-upload-panel--staged-file flex items-center gap-3 rounded-lg border border-border bg-card p-2`,children:[(0,G.jsx)(q,{className:`size-10 rounded-md`,children:e.src?(0,G.jsx)(`img`,{src:e.src,alt:e.name,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:ye(e.type,`size-4`)})}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex items-baseline gap-3`,children:[(0,G.jsx)(a,{weight:`semibold`,size:`xs`,className:`truncate`,children:e.name}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,className:`ml-auto shrink-0`,children:H(e.size)})]}),(e.status===`uploading`||e.status===`done`)&&(0,G.jsx)(`div`,{className:`mt-2 h-1 overflow-hidden rounded-full bg-muted`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-primary transition-[width]`,style:{width:`${e.progress}%`}})}),e.status===`error`&&(0,G.jsx)(a,{size:`xxs`,type:`error`,children:e.error})]}),e.status===`done`?(0,G.jsx)(i,{variant:`success`,children:o.upload.done}):e.status===`uploading`?(0,G.jsxs)(a,{size:`xxs`,type:`secondary`,className:`tabular-nums`,children:[Math.round(e.progress),`%`]}):(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:r,"aria-label":L(o.upload.removeFile,{name:e.name}),onClick:()=>c(e.id),children:(0,G.jsx)(te,{className:`size-3.5`})})]},e.id))}):d,(0,G.jsxs)(`div`,{className:`media-library-upload-panel--options grid gap-3 rounded-lg border border-border bg-muted/20 p-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]`,children:[(0,G.jsx)(F,{label:o.upload.collection,children:(0,G.jsx)(N,{value:t.collection??n[0]?.value,options:n.map(e=>({value:e.value,label:String(e.label)})),"aria-label":o.upload.collection,onChange:e=>l({collection:e})})}),(0,G.jsx)(F,{label:o.upload.tags,children:(0,G.jsx)(M,{value:t.tags.join(`, `),placeholder:o.upload.tagsPlaceholder,onChange:e=>l({tags:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 md:self-end`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(a,{weight:`semibold`,size:`xs`,children:o.upload.public}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,children:o.upload.publicHint})]}),(0,G.jsx)(P,{checked:t.public,onCheckedChange:e=>l({public:e})})]})]})]})}function De({tab:e,selectedIds:t,selectionMode:n,stagedFiles:r,strings:i,onClearSelection:o,className:s}){let c=t.length,l=r.reduce((e,t)=>e+t.size,0),d=r.length,f=D(`media-library-footer-summary--component flex min-w-0 items-center gap-3`,s);return e===`upload`?(0,G.jsx)(`div`,{className:f,"aria-live":`polite`,children:(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`truncate`,children:d===0?i.footer.noFiles:L(i.footer.stagedSummary,{count:d,size:H(l)})})}):(0,G.jsx)(`div`,{className:f,"aria-live":`polite`,children:c>0?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(a,{weight:`semibold`,size:`xs`,className:`whitespace-nowrap`,children:L(i.footer.selectedCount,{count:c})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`small`,onClick:o,children:i.footer.clear})]}):(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`truncate`,children:n===`single`?i.footer.pickOne:i.footer.pickMany})})}function Y({tab:e,selectedItems:t,selectedIds:n,stagedFiles:r,uploading:i=!1,strings:a,confirmLabel:o,cancelLabel:s,onCancel:c,onConfirm:l,onUpload:d,onCancelUpload:f,className:p}){let m=n.length,h=r.length;return e===`upload`?(0,G.jsxs)(`div`,{className:D(`media-library-footer-actions--component flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,p),children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,disabled:i,onClick:f,children:s??a.footer.cancel}),(0,G.jsx)(u,{type:`button`,disabled:h===0||i,onClick:d,loading:i,loadingLabels:{loading:a.footer.uploading},children:h<=1?a.footer.upload:L(a.footer.uploadMany,{count:h})})]}):(0,G.jsxs)(`div`,{className:D(`media-library-footer-actions--component flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,p),children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,onClick:c,children:s??a.footer.cancel}),(0,G.jsx)(u,{type:`button`,disabled:m===0,onClick:l,children:o??(m===0?a.footer.confirmEmpty:t.length===1?a.footer.confirmOne:L(a.footer.confirmMany,{count:m}))})]})}function Oe({tab:e,selectedItems:t,selectedIds:n,selectionMode:r,stagedFiles:i,uploading:a=!1,strings:o,confirmLabel:s,cancelLabel:c,onCancel:l,onConfirm:u,onClearSelection:d,onUpload:f,onCancelUpload:p,chrome:m=`section`,className:h}){return(0,G.jsxs)(`footer`,{className:D(`media-library-footer--component flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,m===`section`&&`border-t border-border bg-background px-4 py-3`,h),children:[(0,G.jsx)(De,{tab:e,selectedIds:n,selectionMode:r,stagedFiles:i,strings:o,onClearSelection:d}),(0,G.jsx)(Y,{tab:e,selectedItems:t,selectedIds:n,stagedFiles:i,uploading:a,strings:o,confirmLabel:s,cancelLabel:c,onCancel:l,onConfirm:u,onUpload:f,onCancelUpload:p})]})}var ke=t(w(),1),Ae=(0,R.createContext)(null);function je(e,t,n){return(0,R.useMemo)(()=>{if(e)return e;let r=new Set;for(let e of t){let t=n(e);t&&r.add(t)}return Array.from(r).map(e=>({value:e,label:e}))},[e,n,t])}function Me({title:e,description:t,confirmLabel:n,cancelLabel:r,selectionMode:i=`multiple`,density:o=`comfortable`,showMeta:s=!0,allowUpload:c=!0,typeFilters:l,confirmOnSelect:d=!1,onConfirm:f,onCancel:m,onClose:h,strings:_,slots:v,heightClassName:y,className:b,items:x,fetcher:ee,accessors:S,collections:te,value:w,defaultValue:T,onValueChange:ne,onItemUpdate:E,onItemDelete:O,onUpload:re,onError:M,initialTab:N,defaultView:P,defaultQuery:F,defaultType:ie,defaultCollection:ae,defaultSort:oe,defaultUploadOptions:se,...ce}){let I=C(le,_),z=ve({items:x,fetcher:ee,accessors:S,collections:te,selectionMode:i,value:w,defaultValue:T,onValueChange:ne,onItemUpdate:E,onItemDelete:O,onUpload:re,onError:M,initialTab:N,defaultView:P,defaultQuery:F,defaultType:ie,defaultCollection:ae,defaultSort:oe,defaultUploadOptions:se}),ue=je(te,z.items,z.accessors.getCollection),B=c?z.tab:`library`,V=z.detailId?z.items.find(e=>z.accessors.getId(e)===z.detailId)??null:null,H=(0,R.useContext)(Ae),U=!v?.footer,W=H&&U?(0,G.jsx)(De,{tab:B,selectedIds:z.selectedIds,selectionMode:i,stagedFiles:z.stagedFiles,strings:I,onClearSelection:z.clearSelection,className:`media-library-dialog--selection-summary shrink-0 justify-end`}):null,de=!!(e||t||v?.headerStart),fe=!!(c||v?.headerEnd||W),pe=de||fe,me=()=>{f?.(z.selectedItems,z.selectedIds),h?.()},he=()=>{m?.(),h?.()},ge=e=>{let t=z.accessors.getId(e);z.toggleSelection(t),d&&(f?.([e],[t]),h?.())},_e=z.filteredCount===z.totalCount?L(I.countAll,{count:z.totalCount}):L(I.countFiltered,{count:z.filteredCount,total:z.totalCount}),ye=v?.footer??(H?(0,G.jsx)(Y,{tab:B,selectedItems:z.selectedItems,selectedIds:z.selectedIds,stagedFiles:z.stagedFiles,uploading:z.uploading,strings:I,confirmLabel:n,cancelLabel:r,onCancel:he,onConfirm:me,onUpload:z.startUpload,onCancelUpload:()=>{z.clearStagedFiles(),z.setTab(`library`)},className:`ml-auto`}):(0,G.jsx)(Oe,{tab:B,selectedItems:z.selectedItems,selectedIds:z.selectedIds,selectionMode:i,stagedFiles:z.stagedFiles,uploading:z.uploading,strings:I,confirmLabel:n,cancelLabel:r,onCancel:he,onConfirm:me,onClearSelection:z.clearSelection,onUpload:z.startUpload,onCancelUpload:()=>{z.clearStagedFiles(),z.setTab(`library`)}}));return(0,G.jsxs)(`section`,{className:D(`media-library--component flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-background`,y??`h-190 max-h-[calc(100vh-7rem)]`,b),...ce,children:[pe&&(0,G.jsxs)(`header`,{className:`media-library--header flex flex-col gap-3 border-b border-border px-4 py-3 lg:flex-row lg:items-center lg:justify-between`,children:[de&&(0,G.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[v?.headerStart,(e||t)&&(0,G.jsxs)(`div`,{className:`min-w-0`,children:[!!e&&(0,G.jsx)(a,{tag:`div`,weight:`semibold`,children:e}),!!t&&(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`mt-0.5`,children:t})]})]}),fe&&(0,G.jsxs)(`div`,{className:D(`flex min-w-0 flex-wrap items-center gap-2`,W?`flex-1 justify-between`:`lg:justify-end`),children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[c&&(0,G.jsxs)(`div`,{className:`media-library--tabs flex items-center rounded-md bg-muted p-0.5`,role:`tablist`,children:[(0,G.jsxs)(u,{type:`button`,role:`tab`,"aria-selected":B===`library`,variant:`secondary`,buttonStyle:`ghost`,className:D(`h-8 rounded-sm px-3 shadow-none`,B===`library`?`bg-background text-foreground shadow-xs hover:bg-background`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),onClick:()=>z.setTab(`library`),children:[(0,G.jsx)(g,{className:`size-3.5`}),I.tabs.library]}),(0,G.jsxs)(u,{type:`button`,role:`tab`,"aria-selected":B===`upload`,variant:`secondary`,buttonStyle:`ghost`,className:D(`h-8 rounded-sm px-3 shadow-none`,B===`upload`?`bg-background text-foreground shadow-xs hover:bg-background`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),onClick:()=>z.setTab(`upload`),children:[(0,G.jsx)(p,{className:`size-3.5`}),I.tabs.upload,z.stagedFiles.length>0&&(0,G.jsx)(`span`,{className:`rounded-full bg-background/20 px-1.5 text-xxs tabular-nums`,children:z.stagedFiles.length})]})]}),v?.headerEnd]}),W]})]}),(0,G.jsxs)(`div`,{className:`media-library--body flex min-h-0 flex-1`,children:[B===`upload`?(0,G.jsx)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,children:(0,G.jsx)(Ee,{stagedFiles:z.stagedFiles,uploadOptions:z.uploadOptions,collections:ue,uploading:z.uploading,strings:I,onFiles:z.addFiles,onRemoveFile:z.removeStagedFile,onOptionsChange:z.updateUploadOptions,empty:v?.uploadEmpty})}):(0,G.jsxs)(`div`,{className:D(`media-library--library min-w-0 flex-1 flex-col`,V?`hidden lg:flex`:`flex`),children:[(0,G.jsxs)(`div`,{className:`media-library--toolbar border-b border-border/70 px-4 py-3`,children:[(0,G.jsx)(J,{query:z.query,type:z.type,typeFilters:l,collection:z.collection,sort:z.sort,view:z.view,collections:ue,strings:I,onQueryChange:z.setQuery,onTypeChange:z.setType,onCollectionChange:z.setCollection,onSortChange:z.setSort,onViewChange:z.setView,onClearFilters:z.clearFilters,toolbarEnd:v?.toolbarEnd}),(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`mt-2`,"aria-live":`polite`,children:_e})]}),(0,G.jsx)(`div`,{className:`media-library--results min-h-0 flex-1 overflow-y-auto p-4`,children:z.loading?v?.loading??(0,G.jsx)(`div`,{className:`flex min-h-64 items-center justify-center`,children:(0,G.jsx)(a,{type:`secondary`,children:I.loading})}):z.error?v?.error??(0,G.jsxs)(j,{variant:`destructive`,children:[(0,G.jsx)(k,{children:I.errorTitle}),(0,G.jsx)(A,{children:I.errorDescription})]}):z.visibleItems.length===0?v?.empty??(0,G.jsx)(Se,{title:z.hasFilters?I.emptyFilteredTitle:I.emptyLibraryTitle,description:z.hasFilters?I.emptyFilteredDescription:I.emptyLibraryDescription,action:z.hasFilters?(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`outline`,onClick:z.clearFilters,children:I.clearFilters}):c?(0,G.jsxs)(u,{type:`button`,onClick:()=>z.setTab(`upload`),children:[(0,G.jsx)(p,{className:`size-3.5`}),I.uploadMedia]}):void 0}):z.view===`table`?(0,G.jsx)(`div`,{className:`overflow-x-auto`,children:(0,G.jsx)(we,{items:z.visibleItems,selectedSet:z.selectedSet,selectionMode:i,accessors:z.accessors,strings:I,onToggle:e=>{let t=z.items.find(t=>z.accessors.getId(t)===e);t&&ge(t)},onDetails:z.setDetailId})}):(0,G.jsx)(`div`,{className:D(`media-library--grid grid gap-3`,o===`compact`?`grid-cols-[repeat(auto-fill,minmax(136px,1fr))]`:`grid-cols-[repeat(auto-fill,minmax(168px,1fr))]`),children:z.visibleItems.map(e=>{let t=z.accessors.getId(e),n={id:t,selected:z.selectedSet.has(t),selectionMode:i,accessors:z.accessors,toggle:()=>ge(e),openDetails:()=>z.setDetailId(t)},r=v?.renderItem?.(e,n);return r?(0,G.jsx)(`div`,{children:r},t):(0,G.jsx)(Ce,{item:e,selected:n.selected,density:o,showMeta:s,selectionMode:i,accessors:z.accessors,strings:I,onToggle:n.toggle,onDetails:n.openDetails},t)})})})]}),B===`library`&&(0,G.jsx)(Te,{item:V,collections:ue,accessors:z.accessors,strings:I,onClose:()=>z.setDetailId(null),onUpdate:e=>V&&z.updateItem(V,e),onRemove:()=>{V&&(z.removeItem(V),z.setDetailId(null))},renderDetail:v?.renderDetail})]}),H?H.element?(0,ke.createPortal)(ye,H.element):null:ye]})}function Ne({open:e,onOpenChange:t,trigger:n,dialogTitle:r,dialogDescription:i,onClose:a,className:o,dialogClassName:s,contentClassName:c,closeOnEscape:l=!0,closeOnBackdropClick:u=!0,...d}){let f=C(le,d.strings),[p,m]=(0,R.useState)(!1),[h,g]=(0,R.useState)(null),_=e!==void 0,v=_?e:p,y=e=>{_||m(e),t?.(e)},b=()=>{y(!1),a?.()};return(0,G.jsx)(Ae.Provider,{value:{element:h},children:(0,G.jsx)(ie,{open:v,onOpenChange:y,onClose:a,trigger:n,title:r??f.title,description:i??f.description,size:`full`,showCancel:!1,showConfirm:!1,footer:(0,G.jsx)(`div`,{ref:g,className:`media-library-dialog--footer`}),className:D(`media-library-dialog--component max-h-[calc(100vh-2rem)] max-w-[min(1060px,calc(100vw-2rem))]`,s),contentClassName:D(`media-library-dialog--body flex min-h-0 flex-col overflow-hidden p-0`,c),closeOnBackdropClick:u,closeOnEscape:l,children:(0,G.jsx)(Me,{...d,onClose:b,className:D(`media-library-dialog--library rounded-none border-0`,o),heightClassName:d.heightClassName??`min-h-0 flex-1`,strings:d.strings})})})}function Pe(e,t,n){let r=e.slice(),[i]=r.splice(t,1);return i===void 0||r.splice(n,0,i),r}function Fe({items:e,accessors:t,title:n,description:r,primaryId:o,onPrimaryChange:l,onRemove:d,onReorder:f,onAdd:p,maxItems:m,layout:g=`field`,density:_=`comfortable`,readOnly:v=!1,empty:S,action:w,renderItem:T,strings:ne,className:E,...O}){let k=C(le,ne),A=V(t),j=e.length,re=o??(j>0?A.getId(e[0]):void 0),M=!v&&!!p&&(m===void 0||j<m),N=M&&(g===`field`||j>0)?(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`outline`,icon:b,onClick:p,children:k.gallery.add}):m!==void 0&&j>=m?(0,G.jsx)(i,{variant:`secondary`,children:k.gallery.maxReached}):null,P=(t,n)=>{if(n<0||n>=j||t===n)return;let r=Pe(e,t,n);f?.(r.map(e=>A.getId(e)),r)},F=!!(n||r||w||N),ie=j===0&&g!==`field`,ae=()=>!M||g!==`field`?null:(0,G.jsxs)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,className:D(`media-resource-gallery--add-tile h-auto min-h-24 w-full flex-col rounded-lg border border-dashed border-border bg-background text-muted-foreground shadow-none`,`aspect-square hover:border-primary/50 hover:bg-primary/5 hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`),"aria-label":k.gallery.addTile,onClick:p,children:[(0,G.jsx)(b,{className:`size-4`}),(0,G.jsx)(`span`,{className:`sr-only`,children:k.gallery.addTile})]});return(0,G.jsxs)(`section`,{className:D(`media-resource-gallery--component rounded-lg border border-border bg-card shadow-xs`,E),"data-layout":g,"data-density":_,...O,children:[F&&(0,G.jsxs)(`header`,{className:`media-resource-gallery--header flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[!!n&&(0,G.jsx)(a,{tag:`div`,weight:`semibold`,children:n}),!!r&&(0,G.jsx)(a,{size:`xs`,type:`secondary`,className:`mt-0.5`,children:r})]}),(0,G.jsx)(`div`,{className:`media-resource-gallery--actions flex flex-wrap items-center gap-2`,children:w??N})]}),ie?(0,G.jsx)(`div`,{className:`media-resource-gallery--empty p-4 pt-0`,children:S??(0,G.jsx)(Se,{title:k.gallery.emptyTitle,description:k.gallery.emptyDescription,action:M?(0,G.jsx)(u,{type:`button`,icon:oe,onClick:p,children:k.gallery.add}):void 0})}):(0,G.jsxs)(`div`,{className:D(`media-resource-gallery--items p-4`,F&&`pt-0`,g===`list`?`grid gap-2`:g===`field`?`grid grid-cols-[repeat(auto-fill,minmax(96px,1fr))] gap-3 sm:grid-cols-[repeat(auto-fill,minmax(108px,1fr))]`:_===`compact`?`grid grid-cols-[repeat(auto-fill,minmax(132px,1fr))] gap-3`:`grid grid-cols-[repeat(auto-fill,minmax(164px,1fr))] gap-3`),children:[e.map((e,t)=>{let n=A.getId(e),r=A.getName(e),o=A.getType(e),f=A.getSrc(e),p=A.getAlt(e)||r,m=n===re,_=A.getPublic(e)===!1,b=A.getDuration(e),S=t>0,C=t<j-1,w=T?.(e,{id:n,index:t,total:j,primary:m,accessors:A,canMovePrevious:S,canMoveNext:C,setPrimary:()=>l?.(n,e),remove:()=>d?.(n,e),movePrevious:()=>P(t,t-1),moveNext:()=>P(t,t+1)});return w?(0,G.jsx)(`div`,{children:w},n):g===`field`?(0,G.jsxs)(`div`,{className:D(`media-resource-gallery--item group/gallery relative aspect-square overflow-hidden rounded-lg border border-border bg-background shadow-xs`,`transition-colors hover:border-primary/40 focus-within:border-primary/50`,m&&`col-span-2 row-span-2 min-h-52`),"data-primary":m||void 0,children:[f?(0,G.jsx)(`img`,{src:f,alt:p,loading:`lazy`,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center bg-muted text-muted-foreground`,children:(0,G.jsx)(h,{className:m?`size-7`:`size-5`})}),m&&(0,G.jsx)(i,{variant:`secondary`,className:`absolute left-2 top-2 bg-background/90 shadow-xs`,children:k.gallery.cover}),o===`video`&&!!b&&(0,G.jsxs)(i,{variant:`secondary`,className:`absolute bottom-2 left-2 bg-foreground text-background`,children:[(0,G.jsx)(I,{className:`size-3 fill-current`}),b]}),_&&(0,G.jsx)(`span`,{className:`absolute bottom-2 right-2 inline-flex size-6 items-center justify-center rounded-full border border-border bg-background/90 text-muted-foreground shadow-xs`,children:(0,G.jsx)(y,{className:`size-3`})}),!v&&(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`solid`,size:`icon-small`,className:`absolute right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/gallery:opacity-100 group-focus-within/gallery:opacity-100`,"aria-label":k.gallery.remove,onClick:()=>d?.(n,e),children:(0,G.jsx)(te,{className:`size-3.5`})})]},n):g===`list`?(0,G.jsxs)(`div`,{className:`media-resource-gallery--item flex min-w-0 items-center gap-3 rounded-lg border border-border bg-background p-2`,"data-primary":m||void 0,children:[(0,G.jsx)(`div`,{className:`relative size-12 shrink-0 overflow-hidden rounded-md bg-muted`,children:f?(0,G.jsx)(`img`,{src:f,alt:p,loading:`lazy`,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:(0,G.jsx)(h,{className:`size-4`})})}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(a,{tag:`div`,weight:`semibold`,size:`xs`,className:`truncate`,children:r}),m&&(0,G.jsx)(i,{variant:`info`,children:k.gallery.primary})]}),(0,G.jsxs)(a,{size:`xxs`,type:`secondary`,children:[L(k.gallery.itemPosition,{index:t+1,total:j}),` · `,H(A.getSize(e))||k.unknownSize]})]}),!v&&(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:m,"aria-label":k.gallery.setPrimary,onClick:()=>l?.(n,e),children:(0,G.jsx)(x,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:!S,"aria-label":k.gallery.movePrevious,onClick:()=>P(t,t-1),children:(0,G.jsx)(s,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:!C,"aria-label":k.gallery.moveNext,onClick:()=>P(t,t+1),children:(0,G.jsx)(c,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`error`,buttonStyle:`ghost`,size:`icon-small`,"aria-label":k.gallery.remove,onClick:()=>d?.(n,e),children:(0,G.jsx)(ee,{className:`size-3.5`})})]})]},n):(0,G.jsxs)(`div`,{className:`media-resource-gallery--item group/gallery overflow-hidden rounded-lg border border-border bg-background shadow-xs transition-colors hover:border-primary/40`,"data-primary":m||void 0,children:[(0,G.jsxs)(`div`,{className:`relative aspect-[4/3] bg-muted`,children:[f?(0,G.jsx)(`img`,{src:f,alt:p,loading:`lazy`,className:`size-full object-cover`}):(0,G.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:(0,G.jsx)(h,{className:`size-6`})}),(0,G.jsxs)(`div`,{className:`absolute left-2 top-2 flex flex-wrap gap-1`,children:[m&&(0,G.jsx)(i,{variant:`info`,children:k.gallery.primary}),(0,G.jsx)(i,{variant:`secondary`,children:L(k.gallery.itemPosition,{index:t+1,total:j})})]})]}),(0,G.jsxs)(`div`,{className:`media-resource-gallery--item-body grid gap-2 p-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(a,{tag:`div`,weight:`semibold`,size:`xs`,className:`truncate`,children:r}),(0,G.jsx)(a,{size:`xxs`,type:`secondary`,children:H(A.getSize(e))||k.unknownSize})]}),!v&&(0,G.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:m,"aria-label":k.gallery.setPrimary,onClick:()=>l?.(n,e),children:(0,G.jsx)(x,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:!S,"aria-label":k.gallery.movePrevious,onClick:()=>P(t,t-1),children:(0,G.jsx)(s,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,disabled:!C,"aria-label":k.gallery.moveNext,onClick:()=>P(t,t+1),children:(0,G.jsx)(c,{className:`size-3.5`})}),(0,G.jsx)(u,{type:`button`,variant:`error`,buttonStyle:`ghost`,size:`icon-small`,className:`ml-auto`,"aria-label":k.gallery.remove,onClick:()=>d?.(n,e),children:(0,G.jsx)(ee,{className:`size-3.5`})})]})]})]},n)}),ae()]})]})}var Ie=e({AsyncFetcherLibrary:()=>Ye,ConfirmOnSelectDialog:()=>Je,EmbeddedLibrary:()=>We,EmptyAndErrorStates:()=>Xe,ExternalResourceGallery:()=>qe,HeadlessSelection:()=>Ze,ProductMediaDialog:()=>Ge,ResourceGalleryList:()=>Ke}),Le=[{value:`Products`,label:`Products`},{value:`Lifestyle`,label:`Lifestyle`},{value:`Banners`,label:`Banners`}];function X(e,t,n){let r=`
2
2
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 360">
3
3
  <defs>
4
4
  <linearGradient id="g" x1="0" x2="1" y1="0" y2="1">
@@ -1 +1 @@
1
- import{o as e,p as t}from"./section-D-N8Ze16.js";import{Er as n,r}from"./example-PsbgbESI.js";import{N as i,d as a,n as o}from"./index-QESvAJrb.js";import{t as s}from"./popover-BsCx2XMI.js";import{i as c}from"./command-Dno8Ogez.js";import{a as l,i as u,n as d,r as f,t as p}from"./command-LRFStKBy.js";var m=a(),h={primary:`secondary`,success:`success`,warning:`warning`,destructive:`destructive`,info:`info`,secondary:`secondary`},g=({mention:t,resource:n,asLink:r=!0,onClick:i,trailing:a,className:s})=>{if(n?.renderChip)return(0,m.jsx)(m.Fragment,{children:n.renderChip(t)});let c=h[n?.tone??`secondary`]??h.secondary,l=n?.icon,u=(0,m.jsxs)(e,{variant:c,inline:!0,"data-ref-id":t.id,"data-ref-kind":t.kind,className:o(`mention-chip--component`,`align-[-0.15em] cursor-default whitespace-nowrap`,s),children:[l?(0,m.jsx)(l,{className:`size-3 shrink-0`,"aria-hidden":!0}):null,(0,m.jsx)(`span`,{className:`truncate max-w-[14rem]`,children:t.label}),a]});return r&&t.href?(0,m.jsx)(`a`,{href:t.href,target:`_blank`,rel:`noreferrer noopener`,onClick:i,className:`inline align-baseline no-underline hover:opacity-90`,children:u}):i?(0,m.jsx)(`span`,{onClick:i,className:`inline align-baseline`,children:u}):u},_={title:`Insert reference`,searchPlaceholder:`Search…`,empty:`No matches.`,loading:`Searching…`},v={title:`Insert reference`,empty:`No matches.`,loading:`Searching…`};function y({open:e,activeKind:a,setActiveKind:h,kinds:g,resources:v,query:y,setQuery:b,suggestions:x,isLoading:S,onSelect:C,strings:w,className:T}){let E=i(_,w);return e?(0,m.jsxs)(s,{align:`start`,className:o(`mention-picker--component`,`w-72 overflow-hidden p-0`,T),children:[(0,m.jsxs)(`div`,{className:`border-b border-border/60 px-3 py-2`,children:[(0,m.jsx)(t,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wide`,children:E.title}),g.length>1&&(0,m.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:g.map(e=>{let t=v?.[e],n=t?.icon,i=e===a;return(0,m.jsxs)(r,{type:`button`,variant:i?`primary`:`secondary`,buttonStyle:i?`solid`:`ghost`,size:`small`,onClick:()=>h(e),className:o(`h-auto gap-1 rounded px-1.5 py-0.5 text-xxs font-medium ring-1 ring-inset transition-colors`,i?`bg-primary text-primary-foreground ring-primary`:`bg-muted text-muted-foreground ring-border/60 hover:bg-muted/80`),children:[n?(0,m.jsx)(n,{className:`size-3`}):null,(0,m.jsx)(`span`,{children:t?.label??String(e)})]},e)})})]}),(0,m.jsxs)(p,{shouldFilter:!1,children:[(0,m.jsx)(c,{placeholder:E.searchPlaceholder,value:y,onValueChange:b}),(0,m.jsxs)(l,{children:[S?(0,m.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-center gap-2 py-3`,children:[(0,m.jsx)(n,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),(0,m.jsx)(t,{tag:`span`,size:`xs`,type:`secondary`,children:E.loading})]}):null,(0,m.jsx)(d,{children:E.empty}),(0,m.jsx)(f,{children:x.map(e=>{let n=e.kind??a??``;return(0,m.jsx)(u,{value:`${n}:${e.id}`,onSelect:()=>C(e),children:(0,m.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col leading-tight`,children:[(0,m.jsx)(t,{tag:`span`,size:`xs`,weight:`medium`,className:`truncate`,children:e.label}),e.description?(0,m.jsx)(t,{tag:`span`,size:`xxs`,type:`secondary`,className:`mt-0.5 truncate`,children:e.description}):null]})},`${n}:${e.id}`)})})]})]})]}):null}function b({open:e,activeKind:a,setActiveKind:s,kinds:c,resources:l,suggestionsByKind:u,suggestions:d,isLoading:f,query:p,onManualKindChange:h,onSelect:g,strings:_,className:y}){let b=i(v,_);return e?(0,m.jsxs)(`div`,{onMouseDown:e=>e.preventDefault(),className:o(`mention-inline-suggestions--component`,`bg-popover text-popover-foreground absolute left-0 top-full z-40 mt-1 w-80 max-w-[min(theme(spacing.96),100%)]`,`border-border/60 rounded-md border shadow-md ring-1 ring-foreground/[0.04]`,`overflow-hidden`,y),children:[(0,m.jsxs)(`div`,{className:`border-b border-border/60 px-3 py-2`,children:[(0,m.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,m.jsx)(t,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wide`,children:b.title}),p?(0,m.jsxs)(t,{tag:`span`,size:`xxs`,type:`secondary`,className:`truncate font-mono`,children:[`“`,p,`”`]}):null]}),c.length>1&&(0,m.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:c.map(e=>{let t=l?.[e],n=t?.icon,i=e===a,c=u?.[e]?.length??0;return(0,m.jsxs)(r,{type:`button`,variant:i?`primary`:`secondary`,buttonStyle:i?`solid`:`ghost`,size:`small`,onClick:()=>{s(e),h?.()},className:o(`h-auto gap-1 rounded px-1.5 py-0.5 text-xxs font-medium ring-1 ring-inset transition-colors`,i?`bg-primary text-primary-foreground ring-primary`:c>0?`bg-muted text-foreground ring-border/60 hover:bg-muted/80`:`bg-muted/40 text-muted-foreground ring-border/40 hover:bg-muted/60`),children:[n?(0,m.jsx)(n,{className:`size-3`}):null,(0,m.jsx)(`span`,{children:t?.label??String(e)}),c>0&&(0,m.jsx)(`span`,{className:o(`tabular-nums`,i?`opacity-90`:`opacity-70`),children:c})]},e)})})]}),(0,m.jsxs)(`div`,{className:`max-h-72 overflow-y-auto py-1`,...d.length>0?{role:`listbox`,"aria-label":b.title}:{},children:[f?(0,m.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-center gap-2 py-3`,children:[(0,m.jsx)(n,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),(0,m.jsx)(t,{tag:`span`,size:`xs`,type:`secondary`,children:b.loading})]}):null,!f&&d.length===0?(0,m.jsx)(`div`,{className:`px-3 py-3`,children:(0,m.jsx)(t,{size:`xs`,type:`secondary`,children:b.empty})}):null,d.map(e=>{let n=e.kind??a??``;return(0,m.jsx)(r,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`default`,role:`option`,"data-ref-id":`${n}:${e.id}`,onClick:()=>g(e),className:o(`h-auto w-full min-w-0 justify-start gap-2 rounded-none px-3 py-1.5 text-left`,`hover:bg-muted/60 focus-visible:bg-muted/60 transition-colors`),children:(0,m.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col leading-tight`,children:[(0,m.jsx)(t,{tag:`span`,size:`xs`,weight:`medium`,className:`truncate`,children:e.label}),e.description?(0,m.jsx)(t,{tag:`span`,size:`xxs`,type:`secondary`,className:`mt-0.5 truncate`,children:e.description}):null]})},`${n}:${e.id}`)})]})]}):null}export{y as n,g as r,b as t};
1
+ import{o as e,p as t}from"./section-BPNIPavy.js";import{Er as n,r}from"./example-CJMJcnb4.js";import{N as i,d as a,n as o}from"./index-jD-KSiHu.js";import{t as s}from"./popover-uqk7myG2.js";import{i as c}from"./command-9-r1qrJt.js";import{a as l,i as u,n as d,r as f,t as p}from"./command-DGne3l9s.js";var m=a(),h={primary:`secondary`,success:`success`,warning:`warning`,destructive:`destructive`,info:`info`,secondary:`secondary`},g=({mention:t,resource:n,asLink:r=!0,onClick:i,trailing:a,className:s})=>{if(n?.renderChip)return(0,m.jsx)(m.Fragment,{children:n.renderChip(t)});let c=h[n?.tone??`secondary`]??h.secondary,l=n?.icon,u=(0,m.jsxs)(e,{variant:c,inline:!0,"data-ref-id":t.id,"data-ref-kind":t.kind,className:o(`mention-chip--component`,`align-[-0.15em] cursor-default whitespace-nowrap`,s),children:[l?(0,m.jsx)(l,{className:`size-3 shrink-0`,"aria-hidden":!0}):null,(0,m.jsx)(`span`,{className:`truncate max-w-[14rem]`,children:t.label}),a]});return r&&t.href?(0,m.jsx)(`a`,{href:t.href,target:`_blank`,rel:`noreferrer noopener`,onClick:i,className:`inline align-baseline no-underline hover:opacity-90`,children:u}):i?(0,m.jsx)(`span`,{onClick:i,className:`inline align-baseline`,children:u}):u},_={title:`Insert reference`,searchPlaceholder:`Search…`,empty:`No matches.`,loading:`Searching…`},v={title:`Insert reference`,empty:`No matches.`,loading:`Searching…`};function y({open:e,activeKind:a,setActiveKind:h,kinds:g,resources:v,query:y,setQuery:b,suggestions:x,isLoading:S,onSelect:C,strings:w,className:T}){let E=i(_,w);return e?(0,m.jsxs)(s,{align:`start`,className:o(`mention-picker--component`,`w-72 overflow-hidden p-0`,T),children:[(0,m.jsxs)(`div`,{className:`border-b border-border/60 px-3 py-2`,children:[(0,m.jsx)(t,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wide`,children:E.title}),g.length>1&&(0,m.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:g.map(e=>{let t=v?.[e],n=t?.icon,i=e===a;return(0,m.jsxs)(r,{type:`button`,variant:i?`primary`:`secondary`,buttonStyle:i?`solid`:`ghost`,size:`small`,onClick:()=>h(e),className:o(`h-auto gap-1 rounded px-1.5 py-0.5 text-xxs font-medium ring-1 ring-inset transition-colors`,i?`bg-primary text-primary-foreground ring-primary`:`bg-muted text-muted-foreground ring-border/60 hover:bg-muted/80`),children:[n?(0,m.jsx)(n,{className:`size-3`}):null,(0,m.jsx)(`span`,{children:t?.label??String(e)})]},e)})})]}),(0,m.jsxs)(p,{shouldFilter:!1,children:[(0,m.jsx)(c,{placeholder:E.searchPlaceholder,value:y,onValueChange:b}),(0,m.jsxs)(l,{children:[S?(0,m.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-center gap-2 py-3`,children:[(0,m.jsx)(n,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),(0,m.jsx)(t,{tag:`span`,size:`xs`,type:`secondary`,children:E.loading})]}):null,(0,m.jsx)(d,{children:E.empty}),(0,m.jsx)(f,{children:x.map(e=>{let n=e.kind??a??``;return(0,m.jsx)(u,{value:`${n}:${e.id}`,onSelect:()=>C(e),children:(0,m.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col leading-tight`,children:[(0,m.jsx)(t,{tag:`span`,size:`xs`,weight:`medium`,className:`truncate`,children:e.label}),e.description?(0,m.jsx)(t,{tag:`span`,size:`xxs`,type:`secondary`,className:`mt-0.5 truncate`,children:e.description}):null]})},`${n}:${e.id}`)})})]})]})]}):null}function b({open:e,activeKind:a,setActiveKind:s,kinds:c,resources:l,suggestionsByKind:u,suggestions:d,isLoading:f,query:p,onManualKindChange:h,onSelect:g,strings:_,className:y}){let b=i(v,_);return e?(0,m.jsxs)(`div`,{onMouseDown:e=>e.preventDefault(),className:o(`mention-inline-suggestions--component`,`bg-popover text-popover-foreground absolute left-0 top-full z-40 mt-1 w-80 max-w-[min(theme(spacing.96),100%)]`,`border-border/60 rounded-md border shadow-md ring-1 ring-foreground/[0.04]`,`overflow-hidden`,y),children:[(0,m.jsxs)(`div`,{className:`border-b border-border/60 px-3 py-2`,children:[(0,m.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,m.jsx)(t,{size:`xxs`,type:`secondary`,weight:`medium`,className:`uppercase tracking-wide`,children:b.title}),p?(0,m.jsxs)(t,{tag:`span`,size:`xxs`,type:`secondary`,className:`truncate font-mono`,children:[`“`,p,`”`]}):null]}),c.length>1&&(0,m.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:c.map(e=>{let t=l?.[e],n=t?.icon,i=e===a,c=u?.[e]?.length??0;return(0,m.jsxs)(r,{type:`button`,variant:i?`primary`:`secondary`,buttonStyle:i?`solid`:`ghost`,size:`small`,onClick:()=>{s(e),h?.()},className:o(`h-auto gap-1 rounded px-1.5 py-0.5 text-xxs font-medium ring-1 ring-inset transition-colors`,i?`bg-primary text-primary-foreground ring-primary`:c>0?`bg-muted text-foreground ring-border/60 hover:bg-muted/80`:`bg-muted/40 text-muted-foreground ring-border/40 hover:bg-muted/60`),children:[n?(0,m.jsx)(n,{className:`size-3`}):null,(0,m.jsx)(`span`,{children:t?.label??String(e)}),c>0&&(0,m.jsx)(`span`,{className:o(`tabular-nums`,i?`opacity-90`:`opacity-70`),children:c})]},e)})})]}),(0,m.jsxs)(`div`,{className:`max-h-72 overflow-y-auto py-1`,...d.length>0?{role:`listbox`,"aria-label":b.title}:{},children:[f?(0,m.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-center gap-2 py-3`,children:[(0,m.jsx)(n,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),(0,m.jsx)(t,{tag:`span`,size:`xs`,type:`secondary`,children:b.loading})]}):null,!f&&d.length===0?(0,m.jsx)(`div`,{className:`px-3 py-3`,children:(0,m.jsx)(t,{size:`xs`,type:`secondary`,children:b.empty})}):null,d.map(e=>{let n=e.kind??a??``;return(0,m.jsx)(r,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`default`,role:`option`,"data-ref-id":`${n}:${e.id}`,onClick:()=>g(e),className:o(`h-auto w-full min-w-0 justify-start gap-2 rounded-none px-3 py-1.5 text-left`,`hover:bg-muted/60 focus-visible:bg-muted/60 transition-colors`),children:(0,m.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col leading-tight`,children:[(0,m.jsx)(t,{tag:`span`,size:`xs`,weight:`medium`,className:`truncate`,children:e.label}),e.description?(0,m.jsx)(t,{tag:`span`,size:`xxs`,type:`secondary`,className:`mt-0.5 truncate`,children:e.description}):null]})},`${n}:${e.id}`)})]})]}):null}export{y as n,g as r,b as t};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-D-N8Ze16.js";import{t as s}from"./calendar-days-CNNiyV9e.js";import{r as c,t as l}from"./example-PsbgbESI.js";import{t as u}from"./hash-BVGqnm6_.js";import{d,l as f}from"./index-QESvAJrb.js";import{t as p}from"./props-table-CCcohuyT.js";import{i as m,t as h}from"./popover-Bu7aaPjE.js";import{n as g,r as _,t as v}from"./mention-inline-suggestions-Bp-fVNYF.js";var y=f(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),b=e({InlineMentionSuggestions:()=>T,MentionPickerPopover:()=>E}),x=t(n(),1),S=d(),C={user:{label:`People`,icon:y,trigger:`@`,tone:`primary`},booking:{label:`Bookings`,icon:s,trigger:`#`,tone:`info`}},w=[{id:`user-1`,kind:`user`,label:`Maya Chen`,description:`Account owner`},{id:`booking-1048`,kind:`booking`,label:`Booking #1048`,description:`Chef table, Jun 24`}];function T(){let[e,t]=(0,x.useState)(`user`),[n,r]=(0,x.useState)(null),o=w.filter(t=>t.kind===e);return(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsxs)(`div`,{className:`relative min-h-44 rounded-md border border-border/60 bg-card p-3`,children:[(0,S.jsxs)(a,{size:`sm`,children:[`Loop `,(0,S.jsx)(`span`,{className:`font-medium text-primary`,children:`@ma`}),` into the booking note.`]}),(0,S.jsx)(v,{open:!0,activeKind:e,setActiveKind:t,kinds:[`user`,`booking`],resources:C,query:`ma`,suggestions:o,suggestionsByKind:{user:w.filter(e=>e.kind===`user`),booking:w.filter(e=>e.kind===`booking`)},isLoading:!1,onSelect:r})]}),n?(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(a,{size:`xs`,type:`secondary`,children:`Selected`}),(0,S.jsx)(i,{variant:`secondary`,children:n.label})]}):null]})}function E(){let[e,t]=(0,x.useState)(!1),[n,r]=(0,x.useState)(`user`),[i,o]=(0,x.useState)(``),[s,l]=(0,x.useState)(null),d=w.filter(e=>{let t=n===null||e.kind===n,r=e.label.toLowerCase().includes(i.toLowerCase());return t&&r});return(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsxs)(h,{open:e,onOpenChange:t,children:[(0,S.jsx)(m,{asChild:!0,children:(0,S.jsx)(c,{type:`button`,variant:`secondary`,icon:u,children:`Add reference`})}),(0,S.jsx)(g,{open:e,activeKind:n,setActiveKind:r,kinds:[`user`,`booking`],resources:C,query:i,setQuery:o,suggestions:d,isLoading:!1,onSelect:e=>{l(e),t(!1)}})]}),s?(0,S.jsx)(_,{mention:{id:s.id,kind:s.kind??`user`,label:s.label},resource:C[s.kind??`user`]}):(0,S.jsx)(a,{size:`xs`,type:`secondary`,children:`No reference selected.`})]})}var D=`import { useState } from 'react';
1
+ import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-BPNIPavy.js";import{t as s}from"./calendar-days-BKCkzWjV.js";import{r as c,t as l}from"./example-CJMJcnb4.js";import{t as u}from"./hash-wBs5gyr_.js";import{d,l as f}from"./index-jD-KSiHu.js";import{t as p}from"./props-table-DoDq8Mvr.js";import{i as m,t as h}from"./popover-Czmwspmc.js";import{n as g,r as _,t as v}from"./mention-inline-suggestions-DPO6FhXx.js";var y=f(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),b=e({InlineMentionSuggestions:()=>T,MentionPickerPopover:()=>E}),x=t(n(),1),S=d(),C={user:{label:`People`,icon:y,trigger:`@`,tone:`primary`},booking:{label:`Bookings`,icon:s,trigger:`#`,tone:`info`}},w=[{id:`user-1`,kind:`user`,label:`Maya Chen`,description:`Account owner`},{id:`booking-1048`,kind:`booking`,label:`Booking #1048`,description:`Chef table, Jun 24`}];function T(){let[e,t]=(0,x.useState)(`user`),[n,r]=(0,x.useState)(null),o=w.filter(t=>t.kind===e);return(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsxs)(`div`,{className:`relative min-h-44 rounded-md border border-border/60 bg-card p-3`,children:[(0,S.jsxs)(a,{size:`sm`,children:[`Loop `,(0,S.jsx)(`span`,{className:`font-medium text-primary`,children:`@ma`}),` into the booking note.`]}),(0,S.jsx)(v,{open:!0,activeKind:e,setActiveKind:t,kinds:[`user`,`booking`],resources:C,query:`ma`,suggestions:o,suggestionsByKind:{user:w.filter(e=>e.kind===`user`),booking:w.filter(e=>e.kind===`booking`)},isLoading:!1,onSelect:r})]}),n?(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(a,{size:`xs`,type:`secondary`,children:`Selected`}),(0,S.jsx)(i,{variant:`secondary`,children:n.label})]}):null]})}function E(){let[e,t]=(0,x.useState)(!1),[n,r]=(0,x.useState)(`user`),[i,o]=(0,x.useState)(``),[s,l]=(0,x.useState)(null),d=w.filter(e=>{let t=n===null||e.kind===n,r=e.label.toLowerCase().includes(i.toLowerCase());return t&&r});return(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsxs)(h,{open:e,onOpenChange:t,children:[(0,S.jsx)(m,{asChild:!0,children:(0,S.jsx)(c,{type:`button`,variant:`secondary`,icon:u,children:`Add reference`})}),(0,S.jsx)(g,{open:e,activeKind:n,setActiveKind:r,kinds:[`user`,`booking`],resources:C,query:i,setQuery:o,suggestions:d,isLoading:!1,onSelect:e=>{l(e),t(!1)}})]}),s?(0,S.jsx)(_,{mention:{id:s.id,kind:s.kind??`user`,label:s.label},resource:C[s.kind??`user`]}):(0,S.jsx)(a,{size:`xs`,type:`secondary`,children:`No reference selected.`})]})}var D=`import { useState } from 'react';
2
2
  import { CalendarDays, Hash, UserRound } from 'lucide-react';
3
3
 
4
4
  import { Badge } from '@/components/base/badge';
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{c as r,n as i,t as a}from"./section-D-N8Ze16.js";import{C as o,Cn as s,Ct as c,Dr as l,Dt as u,E as d,Ht as f,J as p,Jt as m,K as h,Kt as g,M as _,Mn as v,Nn as y,O as b,Ot as x,Qt as S,S as C,Sr as w,T,Tt as ee,Ut as E,Vn as te,X as D,Xt as ne,Y as O,Yn as k,Yt as re,Zt as A,_r as ie,_t as j,ar as ae,br as oe,bt as se,ct as ce,d as M,dt as N,en as le,er as ue,f as de,fr as P,ft as fe,g as F,gn as pe,hn as me,hr as I,ir as he,jn as L,jt as ge,kt as _e,lr as ve,lt as ye,m as be,mr as xe,mt as Se,nr as Ce,ot as we,p as Te,pr as Ee,q as De,sn as Oe,t as R,u as z,ut as B,v as V,vt as H,w as ke,wn as Ae,wt as je,x as Me,y as Ne,yn as Pe,yt as Fe}from"./example-PsbgbESI.js";import{t as Ie}from"./chevron-down-BqrI6QzQ.js";import{t as Le}from"./external-link-CgB9zfWz.js";import{t as Re}from"./square-pen-CWylvezY.js";import{t as ze}from"./trash-2-DhUpICQq.js";import{P as Be,d as U,n as W}from"./index-QESvAJrb.js";import{a as Ve}from"./useOpenInteractionType-DQOSh-Eu.js";import{t as G}from"./inertValue-DrANZiJk.js";import{t as He}from"./useControlled-BHUji6Sp.js";import{C as Ue,S as We,_ as Ge,a as Ke,b as qe,c as K,d as Je,f as Ye,g as Xe,h as Ze,i as Qe,l as $e,m as et,o as tt,p as q,r as J,t as nt,u as rt,v as it,x as at,y as ot}from"./dropdown-menu-DZ47rJaE.js";import{t as st}from"./CompositeItem-DAQ048AO.js";import{t as ct}from"./Separator-BuTBo5a_.js";import{t as lt}from"./CompositeRoot-8-OuCMMq.js";import{a as ut,i as dt,n as ft,o as pt,r as mt,t as ht}from"./command-Dno8Ogez.js";function gt(e){let t=ie(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=w(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r;return(f(n)!==a||f(r)!==o)&&(n=a,r=o),{width:n,height:r}}var Y=t(n(),1),X=U();function _t(e){let[t,n]=Y.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=Y.useRef(null),i=Y.useRef(null),a=Y.useRef(null),o=Y.useRef(null),s=Y.useRef(!0),c=Y.useRef(null),l=se(),u=Y.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,X.jsx)(qe.Provider,{value:u,children:(0,X.jsx)(We.Provider,{value:void 0,children:(0,X.jsx)(Je,{...e})})})}var vt=500,yt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:s,internalBackdropRef:c,backdropRef:l,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:p}=at(!1),{store:m}=Ue(!1),h=m.useState(`open`),_=m.useState(`disabled`),b=Y.useRef(null),x=Y.useRef(null),C=k(),w=k(),T=Y.useRef(!1);function ee(e,t,n){let r=n.type.startsWith(`touch`);f.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),T.current=!1,s.current?.setOpen(!0,S(Ae,n)),w.start(vt,()=>{T.current=!0})}function E(e){_||(d.current=!0,te(e),ee(e.clientX,e.clientY,e.nativeEvent),A(g(b.current),`mouseup`,e=>{if(d.current=!1,!T.current)return;w.clear(),T.current=!1;let t=y(e);v(u.current,t)||p&&t&&rt(t)===p||s.current?.setOpen(!1,S(le,e))},{once:!0}))}function D(e){if(!_&&(d.current=!1,e.touches.length===1)){e.stopPropagation();let t=e.touches[0];x.current={x:t.clientX,y:t.clientY},C.start(vt,()=>{x.current&&ee(x.current.x,x.current.y,e.nativeEvent)})}}function ne(e){if(C.isStarted()&&x.current&&e.touches.length===1){let t=e.touches[0],n=Math.abs(t.clientX-x.current.x),r=Math.abs(t.clientY-x.current.y);(n>10||r>10)&&C.clear()}}function O(){C.clear(),x.current=null}return Y.useEffect(()=>{function e(e){if(_)return;let t=y(e);(v(b.current,t)||v(c.current,t)||v(l.current,t))&&e.preventDefault()}return A(g(b.current),`contextmenu`,e)},[l,_,c]),Ce(`div`,e,{state:{open:h},ref:[b,t],props:[{onContextMenu:E,onTouchStart:D,onTouchMove:ne,onTouchEnd:O,onTouchCancel:O,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:Ne})});function bt({...e}){return(0,X.jsx)(_t,{"data-slot":`context-menu`,...e})}function xt({className:e,...t}){return(0,X.jsx)(yt,{"data-slot":`context-menu-trigger`,className:W(`select-none`,e),...t})}function St({className:e,align:t=`start`,alignOffset:n=4,side:r=`right`,sideOffset:i=0,...a}){return(0,X.jsx)(Ze,{children:(0,X.jsx)(et,{className:`isolate z-50 outline-none`,align:t,alignOffset:n,side:r,sideOffset:i,children:(0,X.jsx)(Xe,{"data-slot":`context-menu-content`,className:W(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-36 rounded-md p-1 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none`,e),...a})})})}function Ct({...e}){return(0,X.jsx)(ot,{"data-slot":`context-menu-group`,...e})}function wt({className:e,inset:t,...n}){return(0,X.jsx)(it,{"data-slot":`context-menu-label`,"data-inset":t,className:W(`text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8`,e),...n})}function Tt({className:e,inset:t,variant:n=`default`,...r}){return(0,X.jsx)(Ge,{"data-slot":`context-menu-item`,"data-inset":t,"data-variant":n,className:W(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive focus:*:[svg]:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...r})}function Et({className:e,...t}){return(0,X.jsx)(ct,{"data-slot":`context-menu-separator`,className:W(`bg-border -mx-1 my-1 h-px`,e),...t})}var Dt=function(e){return e.modal=`data-modal`,e.orientation=`data-orientation`,e.hasSubmenuOpen=`data-has-submenu-open`,e}({}),Ot={hasSubmenuOpen(e){return e?{[Dt.hasSubmenuOpen]:``}:null}},kt=Y.forwardRef(function(e,t){let{orientation:n=`horizontal`,loopFocus:r=!0,render:i,className:a,modal:o=!0,disabled:s=!1,id:c,style:l,...u}=e,[d,f]=Y.useState(null),[p,m]=Y.useState(!1),h=F(c),g={orientation:n,modal:o,hasSubmenuOpen:p},_=Y.useRef(null),v=Y.useRef(!1),y=Y.useMemo(()=>({contentElement:d,setContentElement:f,setHasSubmenuOpen:m,hasSubmenuOpen:p,modal:o,disabled:s,orientation:n,allowMouseUpTriggerRef:v,rootId:h}),[d,p,o,s,n,h]);return(0,X.jsx)(Ye.Provider,{value:y,children:(0,X.jsx)(ye,{children:(0,X.jsx)(At,{children:(0,X.jsx)(lt,{render:i,className:a,style:l,state:g,stateAttributesMapping:Ot,refs:[t,f,_],props:[{role:`menubar`,id:h,"aria-orientation":n},u],orientation:n,loopFocus:r,enableHomeAndEndKeys:!0,highlightItemOnHover:p})})})})});function At(e){let t=B(),{events:n}=fe(),r=q();return Y.useEffect(()=>{function e(e){!e.nodeId||e.parentNodeId!==t||(e.open?r.hasSubmenuOpen||r.setHasSubmenuOpen(!0):e.reason!==`sibling-open`&&e.reason!==`list-navigation`&&r.setHasSubmenuOpen(!1))}return n.on(`menuopenchange`,e),()=>{n.off(`menuopenchange`,e)}},[n,t,r]),(0,X.jsx)(ce,{id:t,children:e.children})}function jt({className:e,...t}){return(0,X.jsx)(kt,{"data-slot":`menubar`,className:W(`flex h-9 items-center rounded-3xl border p-1`,e),...t})}function Mt({...e}){return(0,X.jsx)(nt,{"data-slot":`menubar-menu`,...e})}function Nt({className:e,...t}){return(0,X.jsx)($e,{"data-slot":`menubar-trigger`,className:W(`flex items-center rounded-2xl px-2 py-0.75 text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted`,e),...t})}function Pt({className:e,align:t=`start`,alignOffset:n=-4,sideOffset:r=8,...i}){return(0,X.jsx)(J,{"data-slot":`menubar-content`,align:t,alignOffset:n,sideOffset:r,className:W(`dark min-w-48 rounded-3xl p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!`,e),...i})}function Ft({className:e,inset:t,variant:n=`default`,...r}){return(0,X.jsx)(Ke,{"data-slot":`menubar-item`,"data-inset":t,"data-variant":n,className:W(`group/menubar-item gap-2.5 rounded-2xl px-3 py-2 text-sm font-medium focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function It({className:e,...t}){return(0,X.jsx)(K,{"data-slot":`menubar-separator`,className:W(`-mx-1 my-1 h-px bg-border/50`,e),...t})}var Lt=Y.createContext(void 0);function Z(e){let t=Y.useContext(Lt);if(t===void 0&&!e)throw Error(P(41));return t}var Rt=Y.createContext(void 0);function zt(){return Y.useContext(Rt)}var Q=function(e){return e.availableWidth=`--available-width`,e.availableHeight=`--available-height`,e.anchorWidth=`--anchor-width`,e.anchorHeight=`--anchor-height`,e.transformOrigin=`--transform-origin`,e.positionerWidth=`--positioner-width`,e.positionerHeight=`--positioner-height`,e}({}),$=function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e}({});function Bt(e,t,n,r){e.style.setProperty($.popupWidth,`${n}px`),e.style.setProperty($.popupHeight,`${r}px`),t.style.setProperty(Q.positionerWidth,`${n}px`),t.style.setProperty(Q.positionerHeight,`${r}px`)}var Vt=new Set([s,Pe,Oe]);function Ht(e){let t=parseFloat(e.style.getPropertyValue(Q.positionerWidth))||0,n=parseFloat(e.style.getPropertyValue(Q.positionerHeight))||0;return t<=0||n<=0?null:{width:t,height:n}}var Ut=Y.forwardRef(function(e,t){let{defaultValue:n=null,value:r,onValueChange:i,actionsRef:a,delay:o=50,closeDelay:s=50,orientation:c=`horizontal`,onOpenChangeComplete:l}=e,u=N()!=null,d=Z(!0),[f,p]=He({controlled:r,default:n,name:`NavigationMenu`,state:`value`}),m=f!=null,_=Y.useRef(void 0),y=Y.useRef(null),[b,x]=Y.useState(null),[S,C]=Y.useState(null),[T,ee]=Y.useState(null),[E,te]=Y.useState(null),[ne,O]=Y.useState(null),[k,re]=Y.useState(void 0),[A,ie]=Y.useState(!1),j=Y.useRef(null),ae=Y.useRef(null),oe=Y.useRef(null),se=Y.useRef(null),ce=Y.useRef(null),M=Y.useRef(null),le=Y.useRef({abortController:null,owner:null}),{mounted:ue,setMounted:de,transitionStatus:P}=D(m);xe(()=>{if(m||!b||!S)return;let e=Ht(b);e&&Bt(S,b,e.width,e.height)},[m,S,b]),Y.useEffect(()=>{ie(!1)},[f]);let fe=I((e,t)=>{e??(_.current=t.reason),e!==f&&i?.(e,t),!t.isCanceled&&(e??(O(null),re(void 0)),p(e),u&&e==null&&t.reason===`link-press`&&d&&d.setValue(null,t))}),F=I(()=>{let e=L(g(y.current));!(_.current&&Vt.has(_.current))&&w(j.current)&&(e===g(S).body||v(S,e))&&S&&(j.current.focus({preventScroll:!0}),j.current=void 0),de(!1),l?.(!1),O(null),re(void 0),ae.current=null,_.current=void 0});Y.useImperativeHandle(a,()=>({unmount:F}),[F]),h({enabled:!a,open:m,ref:{current:S},onComplete(){m||F()}}),h({enabled:!a,open:m,ref:{current:E},onComplete(){m||F()}});let pe=m?ne:null,me=Y.useMemo(()=>({open:m,value:f,setValue:fe,mounted:ue,transitionStatus:P,positionerElement:b,setPositionerElement:x,popupElement:S,setPopupElement:C,viewportElement:T,setViewportElement:ee,viewportTargetElement:E,setViewportTargetElement:te,activationDirection:pe,setActivationDirection:O,floatingRootContext:k,setFloatingRootContext:re,currentContentRef:ae,nested:u,rootRef:y,beforeInsideRef:oe,afterInsideRef:se,beforeOutsideRef:ce,afterOutsideRef:M,prevTriggerElementRef:j,popupAutoSizeResetRef:le,delay:o,closeDelay:s,orientation:c,viewportInert:A,setViewportInert:ie}),[m,f,fe,ue,P,b,S,T,E,pe,k,u,o,s,c,A]),he=(0,X.jsx)(Lt.Provider,{value:me,children:(0,X.jsx)(Wt,{componentProps:e,forwardedRef:t,children:e.children})});return u?he:(0,X.jsx)(ye,{children:he})});function Wt(e){let{className:t,render:n,defaultValue:r,value:i,onValueChange:a,actionsRef:o,delay:s,closeDelay:c,orientation:l,onOpenChangeComplete:u,style:d,...f}=e.componentProps,p=B(),{rootRef:m,nested:h,open:g}=Z(),_={open:g,nested:h},v=Ce(h?`div`:`nav`,e.componentProps,{state:_,ref:[e.forwardedRef,m],props:f});return(0,X.jsx)(Rt.Provider,{value:p,children:(0,X.jsx)(ce,{id:p,children:v})})}var Gt=`data-base-ui-navigation-menu-trigger`,Kt=Y.createContext(void 0);function qt(){return Y.useContext(Kt)}var Jt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,s=zt(),{orientation:c,open:l,floatingRootContext:u,positionerElement:d,value:f,closeDelay:p,viewportElement:m,nested:h}=Z(),g=Y.useMemo(()=>_(),[]),v=u||g,b=d!=null||f==null;o(v,{enabled:!!u&&(d!=null||m!=null||f==null),closeDelay:p,nodeId:s});let x=we(v,{enabled:b,outsidePressEvent:`intentional`,outsidePress(e){return y(e)?.closest(`[${Gt}]`)===null}}),S=u?x:void 0,C={open:l},w=h?ae:{onKeyDown(e){(c===`horizontal`&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)||c===`vertical`&&(e.key===`ArrowUp`||e.key===`ArrowDown`))&&e.stopPropagation()}},T=[S?.floating||ae,w,a],ee=Ce(`ul`,e,{state:C,ref:t,props:T,enabled:h});return h?(0,X.jsx)(Kt.Provider,{value:S,children:ee}):(0,X.jsx)(Kt.Provider,{value:S,children:(0,X.jsx)(lt,{render:n,className:r,style:i,state:C,refs:[t],props:T,loopFocus:!1,orientation:c,tag:`ul`})})}),Yt=Y.createContext(void 0);function Xt(){let e=Y.useContext(Yt);if(!e)throw Error(P(39));return e}var Zt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a,...o}=e,s=F(),c=a??s,l=Ce(`li`,e,{ref:t,props:o}),u=Y.useMemo(()=>({value:c}),[c]);return(0,X.jsx)(Yt.Provider,{value:u,children:l})}),Qt=t(Be(),1),$t={...V,...O,activationDirection(e){return e?{"data-activation-direction":e}:null}},en=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,{mounted:s,viewportElement:c,value:l,activationDirection:u,currentContentRef:d,viewportTargetElement:f}=Z(),{value:p}=Xt(),m=zt(),g=s&&l===p,_=Y.useRef(null),[b,x]=Y.useState(!1),[S,C]=Y.useState(!1),{mounted:w,setMounted:T,transitionStatus:ee}=D(g);w&&!s&&T(!1),h({ref:_,open:g,onComplete(){g||T(!1)}}),xe(()=>{g&&_.current&&(d.current=_.current)},[g,d]);let E={open:g,transitionStatus:ee,activationDirection:u},te=I(e=>{e&&g&&(d.current=e)}),ne={onFocus(e){y(e.nativeEvent)?.hasAttribute(`data-base-ui-focus-guard`)||C(!0)},onBlur(e){v(e.currentTarget,e.relatedTarget)||C(!1)}},O=!g&&w?{style:{position:`absolute`,top:0,left:0},inert:G(!S),...ne}:ne,k=f||c,re=a&&!w,A=a&&!k&&!b;return a&&k&&!b&&x(!0),A?(0,X.jsx)(lt,{render:n,className:r,style:i,state:E,refs:[t],props:[O,{hidden:!0},o],stateAttributesMapping:$t}):!k||!w&&!a?null:Qt.createPortal((0,X.jsx)(ce,{id:m,children:(0,X.jsx)(lt,{render:n,className:r,style:i,state:E,refs:[t,_,te],props:[O,re?{hidden:!0}:ae,o],stateAttributesMapping:$t})}),k)});function tn({currentTarget:e,relatedTarget:t},n){let{popupElement:r,rootRef:i,tree:a,nodeId:o}=n,s=a?c(a.nodesRef.current,o).some(e=>v(e.context?.elements.floating,t)):[];return r?!v(r,e)&&!v(r,t)&&!v(i.current,t)&&!s&&!(v(r,t)&&t?.hasAttribute(`data-base-ui-focus-guard`)):!v(i.current,t)&&!s}var nn={width:0,height:0},rn=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,nativeButton:a=!0,disabled:o,...c}=e,{value:l,setValue:f,mounted:h,open:g,positionerElement:_,setActivationDirection:y,setFloatingRootContext:ee,popupElement:D,viewportElement:ne,transitionStatus:O,rootRef:ie,beforeOutsideRef:j,afterOutsideRef:ae,afterInsideRef:se,beforeInsideRef:ce,prevTriggerElementRef:M,popupAutoSizeResetRef:N,currentContentRef:le,delay:ue,closeDelay:de,orientation:P,setViewportInert:F,nested:me}=Z(),{value:L}=Xt(),ye=zt(),Se=fe(),Ce=qt(),we=be(),Te=k(),R=m(),z=m(),B=m(),V=m(),[H,je]=Y.useState(null),[Pe,Ie]=Y.useState(!0),[Le,Re]=Y.useState(``),ze=Y.useRef(null),Be=Y.useRef(!1),U=Y.useRef(nn),W=Y.useRef(!1),G=g&&l===L,He=re(G),Ue=(_!=null||l==null)&&!o,We=_||ne,Ge=(We!=null||l==null)&&!o,Ke=De(D,!1,!1),qe=Y.useCallback(e=>{ze.current=e,je(e)},[]),K=I((e=!1)=>{!e&&N.current.owner!==L||(N.current.abortController?.abort(),N.current.abortController=null,N.current.owner=null)});xe(()=>{G||(z.cancel(),V.cancel(),K())},[G,z,V,K]);function Je(){D&&(D.style.setProperty($.popupWidth,`auto`),D.style.setProperty($.popupHeight,`auto`))}function Ye(){!D||!_||(D.style.removeProperty($.popupWidth),D.style.removeProperty($.popupHeight),_.style.removeProperty(Q.positionerWidth),_.style.removeProperty(Q.positionerHeight))}function Xe(){K(!0);let e=new AbortController;N.current.abortController=e,N.current.owner=L,Ke(()=>{N.current.abortController!==e||N.current.owner!==L||(N.current.abortController=null,N.current.owner=null,Je())},e.signal)}let Ze=I((e,t,n={})=>{if(!D||!_)return;K(!0);let{syncPositioner:r=!1}=n;Ye();let{width:i,height:a}=gt(D),o=i||U.current.width,s=a||U.current.height;(t===0||e===0)&&(e=o,t=s),D.style.setProperty($.popupWidth,`${e}px`),D.style.setProperty($.popupHeight,`${t}px`),_.style.setProperty(Q.positionerWidth,`${r?e:o}px`),_.style.setProperty(Q.positionerHeight,`${r?t:s}px`),V.request(()=>{He.current&&(D.style.setProperty($.popupWidth,`${o}px`),D.style.setProperty($.popupHeight,`${s}px`),r&&(_.style.setProperty(Q.positionerWidth,`${o}px`),_.style.setProperty(Q.positionerHeight,`${s}px`)),Xe())})}),Qe=I((e,t)=>{!D||!_||(V.cancel(),z.cancel(),K(!0),!(e===0||t===0)&&(Bt(D,_,e,t),z.request(()=>{z.request(()=>{Ye();let{width:n,height:r}=gt(D),i=n||e||U.current.width,a=r||t||U.current.height;Bt(D,_,e,t),V.request(()=>{He.current&&(Bt(D,_,i,a),Xe())})})})))}),$e=I(()=>{if(!D||!_)return;V.cancel(),K(!0),Ye();let{width:e,height:t}=gt(D);e===0||t===0||(U.current={width:e,height:t},Je(),_.style.setProperty(Q.positionerWidth,`${e}px`),_.style.setProperty(Q.positionerHeight,`${t}px`))}),et=I(()=>{if(!D)return{size:U.current,syncPositioner:!1};let e=D.style.getPropertyValue($.popupWidth),t=D.style.getPropertyValue($.popupHeight);return e!==``&&e!==`auto`&&t!==``&&t!==`auto`?{size:{width:D.offsetWidth||U.current.width,height:D.offsetHeight||U.current.height},syncPositioner:!0}:{size:U.current,syncPositioner:!1}});Y.useEffect(()=>{g||(Te.clear(),z.cancel(),B.cancel(),V.cancel(),K(!0),W.current=!1,Re(``))},[Te,g,z,B,V,K]),Y.useEffect(()=>{h||(U.current=nn)},[h]),xe(()=>{if(!D||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(()=>{U.current={width:D.offsetWidth,height:D.offsetHeight}});return e.observe(D),()=>{e.disconnect()}},[D]),Y.useEffect(()=>{if(!g||!G||!D||!_)return;let e=oe(_);function t(){B.cancel(),B.request($e)}let n=A(e,`resize`,t);return()=>{B.cancel(),n()}},[g,G,D,_,B,$e]),Y.useEffect(()=>{let e=le.current;if(!e||!D||!G||typeof MutationObserver!=`function`)return;let t=new MutationObserver(()=>{if(O===`starting`||D.hasAttribute(p.startingStyle)){$e();return}let{size:e,syncPositioner:t}=et();if(t){Qe(e.width,e.height);return}Ze(e.width,e.height)});return t.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`hidden`]}),()=>{t.disconnect()}},[le,D,G,O,et,Qe,Ze,$e]),Y.useEffect(()=>(G&&g&&D&&Be.current&&(Be.current=!1,R.request(()=>{j.current?.focus()})),()=>{R.cancel()}),[j,R,G,g,D]),xe(()=>{if(He.current&&g&&D){let e=le.current?.querySelector(`[data-nested]`)!=null;if(O===`starting`&&e)return V.request($e),()=>{V.cancel()};if(W.current){W.current=!1;return}let{width:t,height:n}=gt(D);Ze(t,n)}},[le,Ze,He,g,D,V,$e,O]);function tt(e,t){let n=t.reason===s;if(!Ue||Le===`touch`&&n||!e&&l!==L)return;function r(){n&&(Ie(!0),Te.clear(),Te.start(500,()=>{Ie(!1)})),e?f(L,t):(f(null,t),Re(``))}n?Qt.flushSync(r):r()}let q=b({open:g,onOpenChange:tt,elements:{reference:H,floating:We}}),J=d(q),nt=Le!==`touch`;Y.useEffect(()=>{g||(q.context.dataRef.current.openEvent=void 0,J.pointerType=void 0,J.interactedInside=!1,J.restTimeoutPending=!1,J.openChangeTimeout.clear(),J.restTimeout.clear(),T(J))},[q,J,g]);let rt=I(()=>!me||_||!ze.current||!We?null:on(ze.current,We,ye));function it(){return!me||!_?ze.current?.closest(`ul`)??null:null}let at=C(q,{enabled:Ge,move:!1,handleClose:Me({blockPointerEvents:nt,getScope:it}),restMs:h&&_?0:ue,delay:{close:de},triggerElementRef:ze,getHandleCloseContext:rt}),ot=Y.useMemo(()=>at?{reference:at}:void 0,[at]),ct=Ve(q,{enabled:Ue,stickIfOpen:Pe,toggle:G}),lt=Y.useMemo(()=>Ee(ct.reference,ot?.reference),[ct.reference,ot]);xe(()=>{G&&(ee(q),M.current=H)},[G,q,ee,M,H]);function ut(e){Qt.flushSync(()=>{let t=w(e.currentTarget)?e.currentTarget:null,n=M.current?.getBoundingClientRect();if(h&&n&&H){let e=H.getBoundingClientRect(),t=e.left>n.left,r=e.top>n.top;P===`horizontal`&&e.left!==n.left?y(t?`right`:`left`):P===`vertical`&&e.top!==n.top&&y(r?`down`:`up`)}if(e.type!==`click`&&l!=null&&(q.context.dataRef.current.openEvent=void 0),!(Le===`touch`&&e.type!==`click`)&&(l!=null&&e.type!==`keydown`&&f(L,S(e.type===`mouseenter`?s:Ae,e.nativeEvent)),e.type===`mouseenter`&&nt&&(!me||!_)&&We&&t)){let e=()=>{ke(J,{scopeElement:it()??t.ownerDocument.body,referenceElement:t,floatingElement:We})};l!=null&&l!==L?queueMicrotask(e):e()}})}let dt=I(e=>{if(o)return;if(!D||!_){ut(e);return}let{width:t,height:n}=gt(D),r=l!=null&&l!==L&&(e.type===`click`||Le!==`touch`);ut(e),r&&(W.current=!0),Ze(t,n)}),ft={open:G};function pt(e){Re(e.pointerType)}function mt(e){pt(e),T(J)}let ht={tabIndex:0,onMouseEnter:dt,onClick:dt,onPointerEnter:pt,onPointerDown:mt,"aria-expanded":G,"aria-controls":G?D?.id:void 0,[Gt]:``,onFocus(){G&&F(!1)},onMouseMove(){Be.current=!1},onKeyDown(e){if(Be.current=!0,me)return;let t=we===`rtl`?`ArrowLeft`:`ArrowRight`,n=P===`horizontal`&&e.key===`ArrowDown`,r=P===`vertical`&&e.key===t;(n||r)&&(f(L,S(pe,e.nativeEvent)),dt(e),te(e))},onBlur(e){_&&D&&tn({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:D,rootRef:ie,tree:Se,nodeId:ye})&&f(null,S(Oe,e.nativeEvent))}},{getButtonProps:_t,buttonRef:vt}=ve({disabled:o,focusableWhenDisabled:!0,native:a}),yt=We;return(0,X.jsxs)(Y.Fragment,{children:[(0,X.jsx)(st,{tag:`button`,render:n,className:r,style:i,state:ft,stateAttributesMapping:Ne,refs:[t,qe,vt],props:[lt,Ce?.reference||he,ht,c,_t]}),G&&(0,X.jsxs)(Y.Fragment,{children:[(0,X.jsx)(E,{ref:j,onFocus:e=>{yt&&ge(e,yt)?ce.current?.focus():x(H)?.focus()}}),(0,X.jsx)(`span`,{"aria-owns":ne?.id,style:Fe}),(0,X.jsx)(E,{ref:ae,onFocus:e=>{if(yt&&ge(e,yt))Qt.flushSync(()=>{F(!1)}),(se.current||H)?.focus();else{let t=u(H);me&&!_&&yt&&t&&v(yt,t)&&(t=_e(se.current)),t?.focus(),(!me||_)&&!v(ie.current,t)&&f(null,S(`focus-out`,e.nativeEvent))}}})]})]})});function an(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.left+n.width/2,a=n.top+n.height/2,o=r.left+r.width/2,s=r.top+r.height/2,c=o-i,l=s-a;return Math.abs(c)>=Math.abs(l)?c>=0?`right`:`left`:l>=0?`bottom`:`top`}function on(e,t,n){return{placement:an(e,t),elements:{domReference:e,floating:t},nodeId:n}}var sn=Y.createContext(void 0);function cn(){let e=Y.useContext(sn);if(e===void 0)throw Error(P(40));return e}var ln=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{mounted:i}=Z();return i||n?(0,X.jsx)(sn.Provider,{value:n,children:(0,X.jsx)(Se,{ref:t,...r})}):null}),un=Y.createContext(void 0);function dn(e=!1){let t=Y.useContext(un);if(!t&&!e)throw Error(P(42));return t}var fn=_(),pn=Y.forwardRef(function(e,t){let{open:n,mounted:r,positionerElement:i,setPositionerElement:a,floatingRootContext:o,nested:s,transitionStatus:c}=Z(),{className:l,render:u,anchor:d,positionMethod:f=`absolute`,side:p=`bottom`,align:m=`center`,sideOffset:h=0,alignOffset:g=0,collisionBoundary:_=`clipping-ancestors`,collisionPadding:v=5,collisionAvoidance:y=s?H:j,arrowPadding:b=5,sticky:x=!1,disableAnchorTracking:S=!1,style:C,...w}=e,T=cn(),E=zt(),te=k(),D=k(),[O,re]=Y.useState(n),ie=Y.useRef(n),ae=Y.useRef(null),se=Y.useRef(null);Y.useEffect(()=>{if(!i)return;function e(e){i&&ge(e)&&(e.type===`focusin`?ee:je)(i)}return ne(A(i,`focusin`,e,!0),A(i,`focusout`,e,!0))},[i]);let ce=(o||fn).useState(`domReferenceElement`),M=de({anchor:d??ce??se,positionMethod:f,mounted:r,side:p,sideOffset:h,align:m,alignOffset:g,arrowPadding:b,collisionBoundary:_,collisionPadding:v,sticky:x,disableAnchorTracking:S,keepMounted:T,floatingRootContext:o,collisionAvoidance:y,nodeId:E,adaptiveOrigin:Te}),N={open:n,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:O};Y.useEffect(()=>{if(!n)return;ie.current&&te.start(0,()=>{ie.current=!1,D.isStarted()||re(!1)});function e(){Qt.flushSync(()=>{re(!0)}),D.start(100,()=>{re(!1)})}return A(oe(i),`resize`,e)},[n,te,D,i]);let le=z(e,N,{styles:M.positionerStyles,transitionStatus:c,props:w,refs:[t,a,ae],hidden:!r,inert:!n});return(0,X.jsx)(un.Provider,{value:M,children:le})}),mn=_();function hn({children:e}){let{beforeInsideRef:t,beforeOutsideRef:n,afterInsideRef:r,afterOutsideRef:i,positionerElement:a,viewportElement:o,floatingRootContext:s}=Z(),c=!!dn(!0),l=a||o;return!s&&!c?e:(0,X.jsxs)(Y.Fragment,{children:[(0,X.jsx)(E,{ref:t,onFocus:e=>{l&&ge(e,l)?u(l)?.focus():n.current?.focus()}}),e,(0,X.jsx)(E,{ref:r,onFocus:e=>{l&&ge(e,l)?x(l)?.focus():i.current?.focus()}})]})}var gn=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,id:o,...s}=e,c=se(o),{setViewportElement:l,setViewportTargetElement:u,floatingRootContext:d,prevTriggerElementRef:f,viewportInert:p,setViewportInert:m}=Z(),h=!!dn(!0),g=(d||mn).useState(`domReferenceElement`);xe(()=>{g&&(f.current=g)},[g,f]);let _=Ce(`div`,e,{ref:[t,l],props:[{id:c,onBlur(e){let t=e.relatedTarget,n=e.currentTarget;t&&!v(n,t)&&t!==g&&m(!0)},...!h&&p&&{inert:G(!0)},children:h?a:(0,X.jsx)(hn,{children:(0,X.jsx)(`div`,{ref:u,children:a})})},s]});return h?(0,X.jsx)(hn,{children:_}):_}),_n={...V,...O},vn=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{open:s,transitionStatus:c,setPopupElement:l}=Z(),u=dn(),d=be(),f=F(a),p={open:s,transitionStatus:c,side:u.side,align:u.align,anchorHidden:u.anchorHidden},m=u.side===`left`;d===`rtl`?m||=u.side===`inline-end`:m||=u.side===`inline-start`;let h=u.side===`top`||m;return Ce(`nav`,e,{state:p,ref:[t,l],props:[{id:f,tabIndex:-1,style:h?{position:`absolute`,[u.side===`top`?`bottom`:`top`]:`0`,[m?`right`:`left`]:`0`}:{}},M(c),o],stateAttributesMapping:_n})}),yn=Y.forwardRef(function(e,t){let{className:n,render:r,active:i=!1,closeOnClick:a=!1,style:o,...s}=e,{setValue:c,popupElement:l,positionerElement:u,rootRef:d}=Z(),f=zt(),p=fe();return(0,X.jsx)(st,{tag:`a`,render:r,className:n,style:o,state:{active:i},refs:[t],props:[{"aria-current":i?`page`:void 0,tabIndex:void 0,onClick(e){a&&c(null,S(me,e.nativeEvent))},onBlur(e){u&&l&&tn({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:l,rootRef:d,tree:p,nodeId:f})&&c(null,S(Oe,e.nativeEvent))}},s]})});function bn({align:e=`start`,className:t,children:n,...r}){return(0,X.jsxs)(Ut,{"data-slot":`navigation-menu`,className:W(`group/navigation-menu relative flex max-w-max flex-1 items-center justify-center`,t),...r,children:[n,(0,X.jsx)(En,{align:e})]})}function xn({className:e,...t}){return(0,X.jsx)(Jt,{"data-slot":`navigation-menu-list`,className:W(`group flex flex-1 list-none items-center justify-center gap-0`,e),...t})}function Sn({className:e,...t}){return(0,X.jsx)(Zt,{"data-slot":`navigation-menu-item`,className:W(`relative`,e),...t})}var Cn=r(`group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-3xl px-4.5 py-2.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted`);function wn({className:e,children:t,...n}){return(0,X.jsxs)(rn,{"data-slot":`navigation-menu-trigger`,className:W(Cn(),`group`,e),...n,children:[t,` `,(0,X.jsx)(Ie,{className:`relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180`,"aria-hidden":`true`})]})}function Tn({className:e,...t}){return(0,X.jsx)(en,{"data-slot":`navigation-menu-content`,className:W(`data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-2.5 pr-3 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-3xl group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/5 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:dark:ring-foreground/10 group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95`,e),...t})}function En({className:e,side:t=`bottom`,sideOffset:n=8,align:r=`start`,alignOffset:i=0,...a}){return(0,X.jsx)(ln,{children:(0,X.jsx)(pn,{side:t,sideOffset:n,align:r,alignOffset:i,className:W(`isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0`,e),...a,children:(0,X.jsx)(vn,{className:`data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-3xl bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/5 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 dark:ring-foreground/10`,children:(0,X.jsx)(gn,{className:`relative size-full overflow-hidden`})})})})}function Dn({className:e,...t}){return(0,X.jsx)(yn,{"data-slot":`navigation-menu-link`,className:W(`flex items-center gap-1.5 rounded-3xl p-3 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-2xl data-[active=true]:bg-muted/50 data-[active=true]:hover:bg-muted data-[active=true]:focus:bg-muted [&_svg:not([class*='size-'])]:size-4`,e),...t})}var On=e({CommandPalette:()=>Nn,ContextMenuRightClick:()=>Mn,DropdownMenuExample:()=>kn,MenubarExample:()=>An,NavigationMenuExample:()=>jn});function kn(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(nt,{children:[(0,X.jsx)($e,{render:e=>(0,X.jsx)(ue,{variant:`outline`,...e,children:`Open menu`})}),(0,X.jsxs)(J,{children:[(0,X.jsxs)(Qe,{children:[(0,X.jsx)(tt,{children:`Actions`}),(0,X.jsx)(K,{}),(0,X.jsxs)(Ke,{children:[(0,X.jsx)(Re,{className:`size-3.5`}),` Edit`]}),(0,X.jsxs)(Ke,{children:[(0,X.jsx)(l,{className:`size-3.5`}),` Duplicate`]})]}),(0,X.jsx)(K,{}),(0,X.jsxs)(Ke,{variant:`destructive`,children:[(0,X.jsx)(ze,{className:`size-3.5`}),` Delete`]})]})]})})}function An(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(jt,{children:[(0,X.jsxs)(Mt,{children:[(0,X.jsx)(Nt,{children:`File`}),(0,X.jsxs)(Pt,{children:[(0,X.jsx)(Ft,{children:`New workspace`}),(0,X.jsx)(Ft,{children:`Import data`}),(0,X.jsx)(It,{}),(0,X.jsx)(Ft,{variant:`destructive`,children:`Archive`})]})]}),(0,X.jsxs)(Mt,{children:[(0,X.jsx)(Nt,{children:`View`}),(0,X.jsxs)(Pt,{children:[(0,X.jsx)(Ft,{children:`Compact rows`}),(0,X.jsx)(Ft,{children:`Show filters`})]})]})]})})}function jn(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsx)(bn,{children:(0,X.jsxs)(xn,{children:[(0,X.jsxs)(Sn,{children:[(0,X.jsx)(wn,{children:`Operations`}),(0,X.jsx)(Tn,{children:(0,X.jsxs)(`div`,{className:`grid w-90 gap-1`,children:[(0,X.jsxs)(Dn,{href:`#orders`,children:[(0,X.jsx)(Le,{className:`size-4`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`font-medium`,children:`Orders`}),(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Review active fulfillment queues.`})]})]}),(0,X.jsxs)(Dn,{href:`#inventory`,children:[(0,X.jsx)(Le,{className:`size-4`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`font-medium`,children:`Inventory`}),(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Monitor low-stock and replenishment signals.`})]})]})]})})]}),(0,X.jsx)(Sn,{children:(0,X.jsx)(Dn,{href:`#reports`,children:`Reports`})})]})})})}function Mn(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(bt,{children:[(0,X.jsx)(xt,{children:(0,X.jsx)(`div`,{className:`flex h-24 w-full items-center justify-center rounded-md border border-dashed border-border text-sm text-muted-foreground`,children:`Right-click here`})}),(0,X.jsxs)(St,{children:[(0,X.jsxs)(Ct,{children:[(0,X.jsx)(wt,{children:`File`}),(0,X.jsx)(Et,{}),(0,X.jsxs)(Tt,{children:[(0,X.jsx)(Re,{className:`size-3.5`}),` Rename`]}),(0,X.jsxs)(Tt,{children:[(0,X.jsx)(l,{className:`size-3.5`}),` Copy`]})]}),(0,X.jsx)(Et,{}),(0,X.jsxs)(Tt,{variant:`destructive`,children:[(0,X.jsx)(ze,{className:`size-3.5`}),` Delete`]})]})]})})}function Nn(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(ht,{className:`rounded-md border border-border`,children:[(0,X.jsx)(dt,{placeholder:`Type a command…`}),(0,X.jsxs)(pt,{children:[(0,X.jsx)(ft,{children:`No results.`}),(0,X.jsxs)(mt,{heading:`Actions`,children:[(0,X.jsx)(ut,{children:`Create order`}),(0,X.jsx)(ut,{children:`Add customer`}),(0,X.jsx)(ut,{children:`Generate invoice`})]}),(0,X.jsxs)(mt,{heading:`Navigation`,children:[(0,X.jsx)(ut,{children:`Go to Orders`}),(0,X.jsx)(ut,{children:`Go to Settings`})]})]})]})})}var Pn=`import { Copy, Edit, ExternalLink, Trash2 } from 'lucide-react';
1
+ import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{c as r,n as i,t as a}from"./section-BPNIPavy.js";import{C as o,Cn as s,Ct as c,Dr as l,Dt as u,E as d,Ht as f,J as p,Jt as m,K as h,Kt as g,M as _,Mn as v,Nn as y,O as b,Ot as x,Qt as S,S as C,Sr as w,T,Tt as ee,Ut as E,Vn as te,X as D,Xt as ne,Y as O,Yn as k,Yt as re,Zt as A,_r as ie,_t as j,ar as ae,br as oe,bt as se,ct as ce,d as M,dt as N,en as le,er as ue,f as de,fr as P,ft as fe,g as F,gn as pe,hn as me,hr as I,ir as he,jn as L,jt as ge,kt as _e,lr as ve,lt as ye,m as be,mr as xe,mt as Se,nr as Ce,ot as we,p as Te,pr as Ee,q as De,sn as Oe,t as R,u as z,ut as B,v as V,vt as H,w as ke,wn as Ae,wt as je,x as Me,y as Ne,yn as Pe,yt as Fe}from"./example-CJMJcnb4.js";import{t as Ie}from"./chevron-down-BFh1Fz2P.js";import{t as Le}from"./external-link-CvXhYrnd.js";import{t as Re}from"./square-pen-jwp_OWMQ.js";import{t as ze}from"./trash-2-CtRtVsCy.js";import{P as Be,d as U,n as W}from"./index-jD-KSiHu.js";import{a as Ve}from"./useOpenInteractionType-CW0quo3l.js";import{t as G}from"./inertValue-Dg9TwvOb.js";import{t as He}from"./useControlled-BHUji6Sp.js";import{C as Ue,S as We,_ as Ge,a as Ke,b as qe,c as K,d as Je,f as Ye,g as Xe,h as Ze,i as Qe,l as $e,m as et,o as tt,p as q,r as J,t as nt,u as rt,v as it,x as at,y as ot}from"./dropdown-menu-C1G_y9dv.js";import{t as st}from"./CompositeItem-BIY_Cp7P.js";import{t as ct}from"./Separator-dQuencsA.js";import{t as lt}from"./CompositeRoot-DSPvBRQr.js";import{a as ut,i as dt,n as ft,o as pt,r as mt,t as ht}from"./command-9-r1qrJt.js";function gt(e){let t=ie(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=w(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r;return(f(n)!==a||f(r)!==o)&&(n=a,r=o),{width:n,height:r}}var Y=t(n(),1),X=U();function _t(e){let[t,n]=Y.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=Y.useRef(null),i=Y.useRef(null),a=Y.useRef(null),o=Y.useRef(null),s=Y.useRef(!0),c=Y.useRef(null),l=se(),u=Y.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,X.jsx)(qe.Provider,{value:u,children:(0,X.jsx)(We.Provider,{value:void 0,children:(0,X.jsx)(Je,{...e})})})}var vt=500,yt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:s,internalBackdropRef:c,backdropRef:l,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:p}=at(!1),{store:m}=Ue(!1),h=m.useState(`open`),_=m.useState(`disabled`),b=Y.useRef(null),x=Y.useRef(null),C=k(),w=k(),T=Y.useRef(!1);function ee(e,t,n){let r=n.type.startsWith(`touch`);f.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),T.current=!1,s.current?.setOpen(!0,S(Ae,n)),w.start(vt,()=>{T.current=!0})}function E(e){_||(d.current=!0,te(e),ee(e.clientX,e.clientY,e.nativeEvent),A(g(b.current),`mouseup`,e=>{if(d.current=!1,!T.current)return;w.clear(),T.current=!1;let t=y(e);v(u.current,t)||p&&t&&rt(t)===p||s.current?.setOpen(!1,S(le,e))},{once:!0}))}function D(e){if(!_&&(d.current=!1,e.touches.length===1)){e.stopPropagation();let t=e.touches[0];x.current={x:t.clientX,y:t.clientY},C.start(vt,()=>{x.current&&ee(x.current.x,x.current.y,e.nativeEvent)})}}function ne(e){if(C.isStarted()&&x.current&&e.touches.length===1){let t=e.touches[0],n=Math.abs(t.clientX-x.current.x),r=Math.abs(t.clientY-x.current.y);(n>10||r>10)&&C.clear()}}function O(){C.clear(),x.current=null}return Y.useEffect(()=>{function e(e){if(_)return;let t=y(e);(v(b.current,t)||v(c.current,t)||v(l.current,t))&&e.preventDefault()}return A(g(b.current),`contextmenu`,e)},[l,_,c]),Ce(`div`,e,{state:{open:h},ref:[b,t],props:[{onContextMenu:E,onTouchStart:D,onTouchMove:ne,onTouchEnd:O,onTouchCancel:O,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:Ne})});function bt({...e}){return(0,X.jsx)(_t,{"data-slot":`context-menu`,...e})}function xt({className:e,...t}){return(0,X.jsx)(yt,{"data-slot":`context-menu-trigger`,className:W(`select-none`,e),...t})}function St({className:e,align:t=`start`,alignOffset:n=4,side:r=`right`,sideOffset:i=0,...a}){return(0,X.jsx)(Ze,{children:(0,X.jsx)(et,{className:`isolate z-50 outline-none`,align:t,alignOffset:n,side:r,sideOffset:i,children:(0,X.jsx)(Xe,{"data-slot":`context-menu-content`,className:W(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-36 rounded-md p-1 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none`,e),...a})})})}function Ct({...e}){return(0,X.jsx)(ot,{"data-slot":`context-menu-group`,...e})}function wt({className:e,inset:t,...n}){return(0,X.jsx)(it,{"data-slot":`context-menu-label`,"data-inset":t,className:W(`text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8`,e),...n})}function Tt({className:e,inset:t,variant:n=`default`,...r}){return(0,X.jsx)(Ge,{"data-slot":`context-menu-item`,"data-inset":t,"data-variant":n,className:W(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive focus:*:[svg]:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...r})}function Et({className:e,...t}){return(0,X.jsx)(ct,{"data-slot":`context-menu-separator`,className:W(`bg-border -mx-1 my-1 h-px`,e),...t})}var Dt=function(e){return e.modal=`data-modal`,e.orientation=`data-orientation`,e.hasSubmenuOpen=`data-has-submenu-open`,e}({}),Ot={hasSubmenuOpen(e){return e?{[Dt.hasSubmenuOpen]:``}:null}},kt=Y.forwardRef(function(e,t){let{orientation:n=`horizontal`,loopFocus:r=!0,render:i,className:a,modal:o=!0,disabled:s=!1,id:c,style:l,...u}=e,[d,f]=Y.useState(null),[p,m]=Y.useState(!1),h=F(c),g={orientation:n,modal:o,hasSubmenuOpen:p},_=Y.useRef(null),v=Y.useRef(!1),y=Y.useMemo(()=>({contentElement:d,setContentElement:f,setHasSubmenuOpen:m,hasSubmenuOpen:p,modal:o,disabled:s,orientation:n,allowMouseUpTriggerRef:v,rootId:h}),[d,p,o,s,n,h]);return(0,X.jsx)(Ye.Provider,{value:y,children:(0,X.jsx)(ye,{children:(0,X.jsx)(At,{children:(0,X.jsx)(lt,{render:i,className:a,style:l,state:g,stateAttributesMapping:Ot,refs:[t,f,_],props:[{role:`menubar`,id:h,"aria-orientation":n},u],orientation:n,loopFocus:r,enableHomeAndEndKeys:!0,highlightItemOnHover:p})})})})});function At(e){let t=B(),{events:n}=fe(),r=q();return Y.useEffect(()=>{function e(e){!e.nodeId||e.parentNodeId!==t||(e.open?r.hasSubmenuOpen||r.setHasSubmenuOpen(!0):e.reason!==`sibling-open`&&e.reason!==`list-navigation`&&r.setHasSubmenuOpen(!1))}return n.on(`menuopenchange`,e),()=>{n.off(`menuopenchange`,e)}},[n,t,r]),(0,X.jsx)(ce,{id:t,children:e.children})}function jt({className:e,...t}){return(0,X.jsx)(kt,{"data-slot":`menubar`,className:W(`flex h-9 items-center rounded-3xl border p-1`,e),...t})}function Mt({...e}){return(0,X.jsx)(nt,{"data-slot":`menubar-menu`,...e})}function Nt({className:e,...t}){return(0,X.jsx)($e,{"data-slot":`menubar-trigger`,className:W(`flex items-center rounded-2xl px-2 py-0.75 text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted`,e),...t})}function Pt({className:e,align:t=`start`,alignOffset:n=-4,sideOffset:r=8,...i}){return(0,X.jsx)(J,{"data-slot":`menubar-content`,align:t,alignOffset:n,sideOffset:r,className:W(`dark min-w-48 rounded-3xl p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!`,e),...i})}function Ft({className:e,inset:t,variant:n=`default`,...r}){return(0,X.jsx)(Ke,{"data-slot":`menubar-item`,"data-inset":t,"data-variant":n,className:W(`group/menubar-item gap-2.5 rounded-2xl px-3 py-2 text-sm font-medium focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function It({className:e,...t}){return(0,X.jsx)(K,{"data-slot":`menubar-separator`,className:W(`-mx-1 my-1 h-px bg-border/50`,e),...t})}var Lt=Y.createContext(void 0);function Z(e){let t=Y.useContext(Lt);if(t===void 0&&!e)throw Error(P(41));return t}var Rt=Y.createContext(void 0);function zt(){return Y.useContext(Rt)}var Q=function(e){return e.availableWidth=`--available-width`,e.availableHeight=`--available-height`,e.anchorWidth=`--anchor-width`,e.anchorHeight=`--anchor-height`,e.transformOrigin=`--transform-origin`,e.positionerWidth=`--positioner-width`,e.positionerHeight=`--positioner-height`,e}({}),$=function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e}({});function Bt(e,t,n,r){e.style.setProperty($.popupWidth,`${n}px`),e.style.setProperty($.popupHeight,`${r}px`),t.style.setProperty(Q.positionerWidth,`${n}px`),t.style.setProperty(Q.positionerHeight,`${r}px`)}var Vt=new Set([s,Pe,Oe]);function Ht(e){let t=parseFloat(e.style.getPropertyValue(Q.positionerWidth))||0,n=parseFloat(e.style.getPropertyValue(Q.positionerHeight))||0;return t<=0||n<=0?null:{width:t,height:n}}var Ut=Y.forwardRef(function(e,t){let{defaultValue:n=null,value:r,onValueChange:i,actionsRef:a,delay:o=50,closeDelay:s=50,orientation:c=`horizontal`,onOpenChangeComplete:l}=e,u=N()!=null,d=Z(!0),[f,p]=He({controlled:r,default:n,name:`NavigationMenu`,state:`value`}),m=f!=null,_=Y.useRef(void 0),y=Y.useRef(null),[b,x]=Y.useState(null),[S,C]=Y.useState(null),[T,ee]=Y.useState(null),[E,te]=Y.useState(null),[ne,O]=Y.useState(null),[k,re]=Y.useState(void 0),[A,ie]=Y.useState(!1),j=Y.useRef(null),ae=Y.useRef(null),oe=Y.useRef(null),se=Y.useRef(null),ce=Y.useRef(null),M=Y.useRef(null),le=Y.useRef({abortController:null,owner:null}),{mounted:ue,setMounted:de,transitionStatus:P}=D(m);xe(()=>{if(m||!b||!S)return;let e=Ht(b);e&&Bt(S,b,e.width,e.height)},[m,S,b]),Y.useEffect(()=>{ie(!1)},[f]);let fe=I((e,t)=>{e??(_.current=t.reason),e!==f&&i?.(e,t),!t.isCanceled&&(e??(O(null),re(void 0)),p(e),u&&e==null&&t.reason===`link-press`&&d&&d.setValue(null,t))}),F=I(()=>{let e=L(g(y.current));!(_.current&&Vt.has(_.current))&&w(j.current)&&(e===g(S).body||v(S,e))&&S&&(j.current.focus({preventScroll:!0}),j.current=void 0),de(!1),l?.(!1),O(null),re(void 0),ae.current=null,_.current=void 0});Y.useImperativeHandle(a,()=>({unmount:F}),[F]),h({enabled:!a,open:m,ref:{current:S},onComplete(){m||F()}}),h({enabled:!a,open:m,ref:{current:E},onComplete(){m||F()}});let pe=m?ne:null,me=Y.useMemo(()=>({open:m,value:f,setValue:fe,mounted:ue,transitionStatus:P,positionerElement:b,setPositionerElement:x,popupElement:S,setPopupElement:C,viewportElement:T,setViewportElement:ee,viewportTargetElement:E,setViewportTargetElement:te,activationDirection:pe,setActivationDirection:O,floatingRootContext:k,setFloatingRootContext:re,currentContentRef:ae,nested:u,rootRef:y,beforeInsideRef:oe,afterInsideRef:se,beforeOutsideRef:ce,afterOutsideRef:M,prevTriggerElementRef:j,popupAutoSizeResetRef:le,delay:o,closeDelay:s,orientation:c,viewportInert:A,setViewportInert:ie}),[m,f,fe,ue,P,b,S,T,E,pe,k,u,o,s,c,A]),he=(0,X.jsx)(Lt.Provider,{value:me,children:(0,X.jsx)(Wt,{componentProps:e,forwardedRef:t,children:e.children})});return u?he:(0,X.jsx)(ye,{children:he})});function Wt(e){let{className:t,render:n,defaultValue:r,value:i,onValueChange:a,actionsRef:o,delay:s,closeDelay:c,orientation:l,onOpenChangeComplete:u,style:d,...f}=e.componentProps,p=B(),{rootRef:m,nested:h,open:g}=Z(),_={open:g,nested:h},v=Ce(h?`div`:`nav`,e.componentProps,{state:_,ref:[e.forwardedRef,m],props:f});return(0,X.jsx)(Rt.Provider,{value:p,children:(0,X.jsx)(ce,{id:p,children:v})})}var Gt=`data-base-ui-navigation-menu-trigger`,Kt=Y.createContext(void 0);function qt(){return Y.useContext(Kt)}var Jt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,s=zt(),{orientation:c,open:l,floatingRootContext:u,positionerElement:d,value:f,closeDelay:p,viewportElement:m,nested:h}=Z(),g=Y.useMemo(()=>_(),[]),v=u||g,b=d!=null||f==null;o(v,{enabled:!!u&&(d!=null||m!=null||f==null),closeDelay:p,nodeId:s});let x=we(v,{enabled:b,outsidePressEvent:`intentional`,outsidePress(e){return y(e)?.closest(`[${Gt}]`)===null}}),S=u?x:void 0,C={open:l},w=h?ae:{onKeyDown(e){(c===`horizontal`&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)||c===`vertical`&&(e.key===`ArrowUp`||e.key===`ArrowDown`))&&e.stopPropagation()}},T=[S?.floating||ae,w,a],ee=Ce(`ul`,e,{state:C,ref:t,props:T,enabled:h});return h?(0,X.jsx)(Kt.Provider,{value:S,children:ee}):(0,X.jsx)(Kt.Provider,{value:S,children:(0,X.jsx)(lt,{render:n,className:r,style:i,state:C,refs:[t],props:T,loopFocus:!1,orientation:c,tag:`ul`})})}),Yt=Y.createContext(void 0);function Xt(){let e=Y.useContext(Yt);if(!e)throw Error(P(39));return e}var Zt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a,...o}=e,s=F(),c=a??s,l=Ce(`li`,e,{ref:t,props:o}),u=Y.useMemo(()=>({value:c}),[c]);return(0,X.jsx)(Yt.Provider,{value:u,children:l})}),Qt=t(Be(),1),$t={...V,...O,activationDirection(e){return e?{"data-activation-direction":e}:null}},en=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,{mounted:s,viewportElement:c,value:l,activationDirection:u,currentContentRef:d,viewportTargetElement:f}=Z(),{value:p}=Xt(),m=zt(),g=s&&l===p,_=Y.useRef(null),[b,x]=Y.useState(!1),[S,C]=Y.useState(!1),{mounted:w,setMounted:T,transitionStatus:ee}=D(g);w&&!s&&T(!1),h({ref:_,open:g,onComplete(){g||T(!1)}}),xe(()=>{g&&_.current&&(d.current=_.current)},[g,d]);let E={open:g,transitionStatus:ee,activationDirection:u},te=I(e=>{e&&g&&(d.current=e)}),ne={onFocus(e){y(e.nativeEvent)?.hasAttribute(`data-base-ui-focus-guard`)||C(!0)},onBlur(e){v(e.currentTarget,e.relatedTarget)||C(!1)}},O=!g&&w?{style:{position:`absolute`,top:0,left:0},inert:G(!S),...ne}:ne,k=f||c,re=a&&!w,A=a&&!k&&!b;return a&&k&&!b&&x(!0),A?(0,X.jsx)(lt,{render:n,className:r,style:i,state:E,refs:[t],props:[O,{hidden:!0},o],stateAttributesMapping:$t}):!k||!w&&!a?null:Qt.createPortal((0,X.jsx)(ce,{id:m,children:(0,X.jsx)(lt,{render:n,className:r,style:i,state:E,refs:[t,_,te],props:[O,re?{hidden:!0}:ae,o],stateAttributesMapping:$t})}),k)});function tn({currentTarget:e,relatedTarget:t},n){let{popupElement:r,rootRef:i,tree:a,nodeId:o}=n,s=a?c(a.nodesRef.current,o).some(e=>v(e.context?.elements.floating,t)):[];return r?!v(r,e)&&!v(r,t)&&!v(i.current,t)&&!s&&!(v(r,t)&&t?.hasAttribute(`data-base-ui-focus-guard`)):!v(i.current,t)&&!s}var nn={width:0,height:0},rn=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,nativeButton:a=!0,disabled:o,...c}=e,{value:l,setValue:f,mounted:h,open:g,positionerElement:_,setActivationDirection:y,setFloatingRootContext:ee,popupElement:D,viewportElement:ne,transitionStatus:O,rootRef:ie,beforeOutsideRef:j,afterOutsideRef:ae,afterInsideRef:se,beforeInsideRef:ce,prevTriggerElementRef:M,popupAutoSizeResetRef:N,currentContentRef:le,delay:ue,closeDelay:de,orientation:P,setViewportInert:F,nested:me}=Z(),{value:L}=Xt(),ye=zt(),Se=fe(),Ce=qt(),we=be(),Te=k(),R=m(),z=m(),B=m(),V=m(),[H,je]=Y.useState(null),[Pe,Ie]=Y.useState(!0),[Le,Re]=Y.useState(``),ze=Y.useRef(null),Be=Y.useRef(!1),U=Y.useRef(nn),W=Y.useRef(!1),G=g&&l===L,He=re(G),Ue=(_!=null||l==null)&&!o,We=_||ne,Ge=(We!=null||l==null)&&!o,Ke=De(D,!1,!1),qe=Y.useCallback(e=>{ze.current=e,je(e)},[]),K=I((e=!1)=>{!e&&N.current.owner!==L||(N.current.abortController?.abort(),N.current.abortController=null,N.current.owner=null)});xe(()=>{G||(z.cancel(),V.cancel(),K())},[G,z,V,K]);function Je(){D&&(D.style.setProperty($.popupWidth,`auto`),D.style.setProperty($.popupHeight,`auto`))}function Ye(){!D||!_||(D.style.removeProperty($.popupWidth),D.style.removeProperty($.popupHeight),_.style.removeProperty(Q.positionerWidth),_.style.removeProperty(Q.positionerHeight))}function Xe(){K(!0);let e=new AbortController;N.current.abortController=e,N.current.owner=L,Ke(()=>{N.current.abortController!==e||N.current.owner!==L||(N.current.abortController=null,N.current.owner=null,Je())},e.signal)}let Ze=I((e,t,n={})=>{if(!D||!_)return;K(!0);let{syncPositioner:r=!1}=n;Ye();let{width:i,height:a}=gt(D),o=i||U.current.width,s=a||U.current.height;(t===0||e===0)&&(e=o,t=s),D.style.setProperty($.popupWidth,`${e}px`),D.style.setProperty($.popupHeight,`${t}px`),_.style.setProperty(Q.positionerWidth,`${r?e:o}px`),_.style.setProperty(Q.positionerHeight,`${r?t:s}px`),V.request(()=>{He.current&&(D.style.setProperty($.popupWidth,`${o}px`),D.style.setProperty($.popupHeight,`${s}px`),r&&(_.style.setProperty(Q.positionerWidth,`${o}px`),_.style.setProperty(Q.positionerHeight,`${s}px`)),Xe())})}),Qe=I((e,t)=>{!D||!_||(V.cancel(),z.cancel(),K(!0),!(e===0||t===0)&&(Bt(D,_,e,t),z.request(()=>{z.request(()=>{Ye();let{width:n,height:r}=gt(D),i=n||e||U.current.width,a=r||t||U.current.height;Bt(D,_,e,t),V.request(()=>{He.current&&(Bt(D,_,i,a),Xe())})})})))}),$e=I(()=>{if(!D||!_)return;V.cancel(),K(!0),Ye();let{width:e,height:t}=gt(D);e===0||t===0||(U.current={width:e,height:t},Je(),_.style.setProperty(Q.positionerWidth,`${e}px`),_.style.setProperty(Q.positionerHeight,`${t}px`))}),et=I(()=>{if(!D)return{size:U.current,syncPositioner:!1};let e=D.style.getPropertyValue($.popupWidth),t=D.style.getPropertyValue($.popupHeight);return e!==``&&e!==`auto`&&t!==``&&t!==`auto`?{size:{width:D.offsetWidth||U.current.width,height:D.offsetHeight||U.current.height},syncPositioner:!0}:{size:U.current,syncPositioner:!1}});Y.useEffect(()=>{g||(Te.clear(),z.cancel(),B.cancel(),V.cancel(),K(!0),W.current=!1,Re(``))},[Te,g,z,B,V,K]),Y.useEffect(()=>{h||(U.current=nn)},[h]),xe(()=>{if(!D||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(()=>{U.current={width:D.offsetWidth,height:D.offsetHeight}});return e.observe(D),()=>{e.disconnect()}},[D]),Y.useEffect(()=>{if(!g||!G||!D||!_)return;let e=oe(_);function t(){B.cancel(),B.request($e)}let n=A(e,`resize`,t);return()=>{B.cancel(),n()}},[g,G,D,_,B,$e]),Y.useEffect(()=>{let e=le.current;if(!e||!D||!G||typeof MutationObserver!=`function`)return;let t=new MutationObserver(()=>{if(O===`starting`||D.hasAttribute(p.startingStyle)){$e();return}let{size:e,syncPositioner:t}=et();if(t){Qe(e.width,e.height);return}Ze(e.width,e.height)});return t.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`hidden`]}),()=>{t.disconnect()}},[le,D,G,O,et,Qe,Ze,$e]),Y.useEffect(()=>(G&&g&&D&&Be.current&&(Be.current=!1,R.request(()=>{j.current?.focus()})),()=>{R.cancel()}),[j,R,G,g,D]),xe(()=>{if(He.current&&g&&D){let e=le.current?.querySelector(`[data-nested]`)!=null;if(O===`starting`&&e)return V.request($e),()=>{V.cancel()};if(W.current){W.current=!1;return}let{width:t,height:n}=gt(D);Ze(t,n)}},[le,Ze,He,g,D,V,$e,O]);function tt(e,t){let n=t.reason===s;if(!Ue||Le===`touch`&&n||!e&&l!==L)return;function r(){n&&(Ie(!0),Te.clear(),Te.start(500,()=>{Ie(!1)})),e?f(L,t):(f(null,t),Re(``))}n?Qt.flushSync(r):r()}let q=b({open:g,onOpenChange:tt,elements:{reference:H,floating:We}}),J=d(q),nt=Le!==`touch`;Y.useEffect(()=>{g||(q.context.dataRef.current.openEvent=void 0,J.pointerType=void 0,J.interactedInside=!1,J.restTimeoutPending=!1,J.openChangeTimeout.clear(),J.restTimeout.clear(),T(J))},[q,J,g]);let rt=I(()=>!me||_||!ze.current||!We?null:on(ze.current,We,ye));function it(){return!me||!_?ze.current?.closest(`ul`)??null:null}let at=C(q,{enabled:Ge,move:!1,handleClose:Me({blockPointerEvents:nt,getScope:it}),restMs:h&&_?0:ue,delay:{close:de},triggerElementRef:ze,getHandleCloseContext:rt}),ot=Y.useMemo(()=>at?{reference:at}:void 0,[at]),ct=Ve(q,{enabled:Ue,stickIfOpen:Pe,toggle:G}),lt=Y.useMemo(()=>Ee(ct.reference,ot?.reference),[ct.reference,ot]);xe(()=>{G&&(ee(q),M.current=H)},[G,q,ee,M,H]);function ut(e){Qt.flushSync(()=>{let t=w(e.currentTarget)?e.currentTarget:null,n=M.current?.getBoundingClientRect();if(h&&n&&H){let e=H.getBoundingClientRect(),t=e.left>n.left,r=e.top>n.top;P===`horizontal`&&e.left!==n.left?y(t?`right`:`left`):P===`vertical`&&e.top!==n.top&&y(r?`down`:`up`)}if(e.type!==`click`&&l!=null&&(q.context.dataRef.current.openEvent=void 0),!(Le===`touch`&&e.type!==`click`)&&(l!=null&&e.type!==`keydown`&&f(L,S(e.type===`mouseenter`?s:Ae,e.nativeEvent)),e.type===`mouseenter`&&nt&&(!me||!_)&&We&&t)){let e=()=>{ke(J,{scopeElement:it()??t.ownerDocument.body,referenceElement:t,floatingElement:We})};l!=null&&l!==L?queueMicrotask(e):e()}})}let dt=I(e=>{if(o)return;if(!D||!_){ut(e);return}let{width:t,height:n}=gt(D),r=l!=null&&l!==L&&(e.type===`click`||Le!==`touch`);ut(e),r&&(W.current=!0),Ze(t,n)}),ft={open:G};function pt(e){Re(e.pointerType)}function mt(e){pt(e),T(J)}let ht={tabIndex:0,onMouseEnter:dt,onClick:dt,onPointerEnter:pt,onPointerDown:mt,"aria-expanded":G,"aria-controls":G?D?.id:void 0,[Gt]:``,onFocus(){G&&F(!1)},onMouseMove(){Be.current=!1},onKeyDown(e){if(Be.current=!0,me)return;let t=we===`rtl`?`ArrowLeft`:`ArrowRight`,n=P===`horizontal`&&e.key===`ArrowDown`,r=P===`vertical`&&e.key===t;(n||r)&&(f(L,S(pe,e.nativeEvent)),dt(e),te(e))},onBlur(e){_&&D&&tn({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:D,rootRef:ie,tree:Se,nodeId:ye})&&f(null,S(Oe,e.nativeEvent))}},{getButtonProps:_t,buttonRef:vt}=ve({disabled:o,focusableWhenDisabled:!0,native:a}),yt=We;return(0,X.jsxs)(Y.Fragment,{children:[(0,X.jsx)(st,{tag:`button`,render:n,className:r,style:i,state:ft,stateAttributesMapping:Ne,refs:[t,qe,vt],props:[lt,Ce?.reference||he,ht,c,_t]}),G&&(0,X.jsxs)(Y.Fragment,{children:[(0,X.jsx)(E,{ref:j,onFocus:e=>{yt&&ge(e,yt)?ce.current?.focus():x(H)?.focus()}}),(0,X.jsx)(`span`,{"aria-owns":ne?.id,style:Fe}),(0,X.jsx)(E,{ref:ae,onFocus:e=>{if(yt&&ge(e,yt))Qt.flushSync(()=>{F(!1)}),(se.current||H)?.focus();else{let t=u(H);me&&!_&&yt&&t&&v(yt,t)&&(t=_e(se.current)),t?.focus(),(!me||_)&&!v(ie.current,t)&&f(null,S(`focus-out`,e.nativeEvent))}}})]})]})});function an(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.left+n.width/2,a=n.top+n.height/2,o=r.left+r.width/2,s=r.top+r.height/2,c=o-i,l=s-a;return Math.abs(c)>=Math.abs(l)?c>=0?`right`:`left`:l>=0?`bottom`:`top`}function on(e,t,n){return{placement:an(e,t),elements:{domReference:e,floating:t},nodeId:n}}var sn=Y.createContext(void 0);function cn(){let e=Y.useContext(sn);if(e===void 0)throw Error(P(40));return e}var ln=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{mounted:i}=Z();return i||n?(0,X.jsx)(sn.Provider,{value:n,children:(0,X.jsx)(Se,{ref:t,...r})}):null}),un=Y.createContext(void 0);function dn(e=!1){let t=Y.useContext(un);if(!t&&!e)throw Error(P(42));return t}var fn=_(),pn=Y.forwardRef(function(e,t){let{open:n,mounted:r,positionerElement:i,setPositionerElement:a,floatingRootContext:o,nested:s,transitionStatus:c}=Z(),{className:l,render:u,anchor:d,positionMethod:f=`absolute`,side:p=`bottom`,align:m=`center`,sideOffset:h=0,alignOffset:g=0,collisionBoundary:_=`clipping-ancestors`,collisionPadding:v=5,collisionAvoidance:y=s?H:j,arrowPadding:b=5,sticky:x=!1,disableAnchorTracking:S=!1,style:C,...w}=e,T=cn(),E=zt(),te=k(),D=k(),[O,re]=Y.useState(n),ie=Y.useRef(n),ae=Y.useRef(null),se=Y.useRef(null);Y.useEffect(()=>{if(!i)return;function e(e){i&&ge(e)&&(e.type===`focusin`?ee:je)(i)}return ne(A(i,`focusin`,e,!0),A(i,`focusout`,e,!0))},[i]);let ce=(o||fn).useState(`domReferenceElement`),M=de({anchor:d??ce??se,positionMethod:f,mounted:r,side:p,sideOffset:h,align:m,alignOffset:g,arrowPadding:b,collisionBoundary:_,collisionPadding:v,sticky:x,disableAnchorTracking:S,keepMounted:T,floatingRootContext:o,collisionAvoidance:y,nodeId:E,adaptiveOrigin:Te}),N={open:n,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:O};Y.useEffect(()=>{if(!n)return;ie.current&&te.start(0,()=>{ie.current=!1,D.isStarted()||re(!1)});function e(){Qt.flushSync(()=>{re(!0)}),D.start(100,()=>{re(!1)})}return A(oe(i),`resize`,e)},[n,te,D,i]);let le=z(e,N,{styles:M.positionerStyles,transitionStatus:c,props:w,refs:[t,a,ae],hidden:!r,inert:!n});return(0,X.jsx)(un.Provider,{value:M,children:le})}),mn=_();function hn({children:e}){let{beforeInsideRef:t,beforeOutsideRef:n,afterInsideRef:r,afterOutsideRef:i,positionerElement:a,viewportElement:o,floatingRootContext:s}=Z(),c=!!dn(!0),l=a||o;return!s&&!c?e:(0,X.jsxs)(Y.Fragment,{children:[(0,X.jsx)(E,{ref:t,onFocus:e=>{l&&ge(e,l)?u(l)?.focus():n.current?.focus()}}),e,(0,X.jsx)(E,{ref:r,onFocus:e=>{l&&ge(e,l)?x(l)?.focus():i.current?.focus()}})]})}var gn=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,id:o,...s}=e,c=se(o),{setViewportElement:l,setViewportTargetElement:u,floatingRootContext:d,prevTriggerElementRef:f,viewportInert:p,setViewportInert:m}=Z(),h=!!dn(!0),g=(d||mn).useState(`domReferenceElement`);xe(()=>{g&&(f.current=g)},[g,f]);let _=Ce(`div`,e,{ref:[t,l],props:[{id:c,onBlur(e){let t=e.relatedTarget,n=e.currentTarget;t&&!v(n,t)&&t!==g&&m(!0)},...!h&&p&&{inert:G(!0)},children:h?a:(0,X.jsx)(hn,{children:(0,X.jsx)(`div`,{ref:u,children:a})})},s]});return h?(0,X.jsx)(hn,{children:_}):_}),_n={...V,...O},vn=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{open:s,transitionStatus:c,setPopupElement:l}=Z(),u=dn(),d=be(),f=F(a),p={open:s,transitionStatus:c,side:u.side,align:u.align,anchorHidden:u.anchorHidden},m=u.side===`left`;d===`rtl`?m||=u.side===`inline-end`:m||=u.side===`inline-start`;let h=u.side===`top`||m;return Ce(`nav`,e,{state:p,ref:[t,l],props:[{id:f,tabIndex:-1,style:h?{position:`absolute`,[u.side===`top`?`bottom`:`top`]:`0`,[m?`right`:`left`]:`0`}:{}},M(c),o],stateAttributesMapping:_n})}),yn=Y.forwardRef(function(e,t){let{className:n,render:r,active:i=!1,closeOnClick:a=!1,style:o,...s}=e,{setValue:c,popupElement:l,positionerElement:u,rootRef:d}=Z(),f=zt(),p=fe();return(0,X.jsx)(st,{tag:`a`,render:r,className:n,style:o,state:{active:i},refs:[t],props:[{"aria-current":i?`page`:void 0,tabIndex:void 0,onClick(e){a&&c(null,S(me,e.nativeEvent))},onBlur(e){u&&l&&tn({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:l,rootRef:d,tree:p,nodeId:f})&&c(null,S(Oe,e.nativeEvent))}},s]})});function bn({align:e=`start`,className:t,children:n,...r}){return(0,X.jsxs)(Ut,{"data-slot":`navigation-menu`,className:W(`group/navigation-menu relative flex max-w-max flex-1 items-center justify-center`,t),...r,children:[n,(0,X.jsx)(En,{align:e})]})}function xn({className:e,...t}){return(0,X.jsx)(Jt,{"data-slot":`navigation-menu-list`,className:W(`group flex flex-1 list-none items-center justify-center gap-0`,e),...t})}function Sn({className:e,...t}){return(0,X.jsx)(Zt,{"data-slot":`navigation-menu-item`,className:W(`relative`,e),...t})}var Cn=r(`group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-3xl px-4.5 py-2.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted`);function wn({className:e,children:t,...n}){return(0,X.jsxs)(rn,{"data-slot":`navigation-menu-trigger`,className:W(Cn(),`group`,e),...n,children:[t,` `,(0,X.jsx)(Ie,{className:`relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180`,"aria-hidden":`true`})]})}function Tn({className:e,...t}){return(0,X.jsx)(en,{"data-slot":`navigation-menu-content`,className:W(`data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-2.5 pr-3 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-3xl group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/5 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:dark:ring-foreground/10 group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95`,e),...t})}function En({className:e,side:t=`bottom`,sideOffset:n=8,align:r=`start`,alignOffset:i=0,...a}){return(0,X.jsx)(ln,{children:(0,X.jsx)(pn,{side:t,sideOffset:n,align:r,alignOffset:i,className:W(`isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0`,e),...a,children:(0,X.jsx)(vn,{className:`data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-3xl bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/5 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 dark:ring-foreground/10`,children:(0,X.jsx)(gn,{className:`relative size-full overflow-hidden`})})})})}function Dn({className:e,...t}){return(0,X.jsx)(yn,{"data-slot":`navigation-menu-link`,className:W(`flex items-center gap-1.5 rounded-3xl p-3 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-2xl data-[active=true]:bg-muted/50 data-[active=true]:hover:bg-muted data-[active=true]:focus:bg-muted [&_svg:not([class*='size-'])]:size-4`,e),...t})}var On=e({CommandPalette:()=>Nn,ContextMenuRightClick:()=>Mn,DropdownMenuExample:()=>kn,MenubarExample:()=>An,NavigationMenuExample:()=>jn});function kn(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(nt,{children:[(0,X.jsx)($e,{render:e=>(0,X.jsx)(ue,{variant:`outline`,...e,children:`Open menu`})}),(0,X.jsxs)(J,{children:[(0,X.jsxs)(Qe,{children:[(0,X.jsx)(tt,{children:`Actions`}),(0,X.jsx)(K,{}),(0,X.jsxs)(Ke,{children:[(0,X.jsx)(Re,{className:`size-3.5`}),` Edit`]}),(0,X.jsxs)(Ke,{children:[(0,X.jsx)(l,{className:`size-3.5`}),` Duplicate`]})]}),(0,X.jsx)(K,{}),(0,X.jsxs)(Ke,{variant:`destructive`,children:[(0,X.jsx)(ze,{className:`size-3.5`}),` Delete`]})]})]})})}function An(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(jt,{children:[(0,X.jsxs)(Mt,{children:[(0,X.jsx)(Nt,{children:`File`}),(0,X.jsxs)(Pt,{children:[(0,X.jsx)(Ft,{children:`New workspace`}),(0,X.jsx)(Ft,{children:`Import data`}),(0,X.jsx)(It,{}),(0,X.jsx)(Ft,{variant:`destructive`,children:`Archive`})]})]}),(0,X.jsxs)(Mt,{children:[(0,X.jsx)(Nt,{children:`View`}),(0,X.jsxs)(Pt,{children:[(0,X.jsx)(Ft,{children:`Compact rows`}),(0,X.jsx)(Ft,{children:`Show filters`})]})]})]})})}function jn(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsx)(bn,{children:(0,X.jsxs)(xn,{children:[(0,X.jsxs)(Sn,{children:[(0,X.jsx)(wn,{children:`Operations`}),(0,X.jsx)(Tn,{children:(0,X.jsxs)(`div`,{className:`grid w-90 gap-1`,children:[(0,X.jsxs)(Dn,{href:`#orders`,children:[(0,X.jsx)(Le,{className:`size-4`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`font-medium`,children:`Orders`}),(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Review active fulfillment queues.`})]})]}),(0,X.jsxs)(Dn,{href:`#inventory`,children:[(0,X.jsx)(Le,{className:`size-4`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`font-medium`,children:`Inventory`}),(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Monitor low-stock and replenishment signals.`})]})]})]})})]}),(0,X.jsx)(Sn,{children:(0,X.jsx)(Dn,{href:`#reports`,children:`Reports`})})]})})})}function Mn(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(bt,{children:[(0,X.jsx)(xt,{children:(0,X.jsx)(`div`,{className:`flex h-24 w-full items-center justify-center rounded-md border border-dashed border-border text-sm text-muted-foreground`,children:`Right-click here`})}),(0,X.jsxs)(St,{children:[(0,X.jsxs)(Ct,{children:[(0,X.jsx)(wt,{children:`File`}),(0,X.jsx)(Et,{}),(0,X.jsxs)(Tt,{children:[(0,X.jsx)(Re,{className:`size-3.5`}),` Rename`]}),(0,X.jsxs)(Tt,{children:[(0,X.jsx)(l,{className:`size-3.5`}),` Copy`]})]}),(0,X.jsx)(Et,{}),(0,X.jsxs)(Tt,{variant:`destructive`,children:[(0,X.jsx)(ze,{className:`size-3.5`}),` Delete`]})]})]})})}function Nn(){return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(ht,{className:`rounded-md border border-border`,children:[(0,X.jsx)(dt,{placeholder:`Type a command…`}),(0,X.jsxs)(pt,{children:[(0,X.jsx)(ft,{children:`No results.`}),(0,X.jsxs)(mt,{heading:`Actions`,children:[(0,X.jsx)(ut,{children:`Create order`}),(0,X.jsx)(ut,{children:`Add customer`}),(0,X.jsx)(ut,{children:`Generate invoice`})]}),(0,X.jsxs)(mt,{heading:`Navigation`,children:[(0,X.jsx)(ut,{children:`Go to Orders`}),(0,X.jsx)(ut,{children:`Go to Settings`})]})]})]})})}var Pn=`import { Copy, Edit, ExternalLink, Trash2 } from 'lucide-react';
2
2
  import { Button } from '@/components/ui/button';
3
3
  import {
4
4
  DropdownMenu,
@@ -1 +1 @@
1
- import{l as e}from"./index-QESvAJrb.js";var t=e(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]);export{t};
1
+ import{l as e}from"./index-jD-KSiHu.js";var t=e(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]);export{t};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-D-N8Ze16.js";import{t as ee}from"./badge-check-TQRmqI7C.js";import{t as s}from"./building-2-D81ygy-F.js";import{t as c}from"./calendar-days-CNNiyV9e.js";import{Dr as l,Or as te,r as ne,t as u}from"./example-PsbgbESI.js";import{t as d}from"./clock-Dd-urPd2.js";import{t as f}from"./credit-card-CFq0S1Ma.js";import{t as p}from"./external-link-CgB9zfWz.js";import{t as m}from"./git-branch-B7XnpQE0.js";import{t as h}from"./globe-CHleXWd2.js";import{t as g}from"./hash-BVGqnm6_.js";import{t as _}from"./mail-Cj6uT4TA.js";import{t as v}from"./map-pin-EKhu7vEj.js";import{t as y}from"./phone-D8tvvbSQ.js";import{t as b}from"./shield-check-BW_7p6Xf.js";import{t as x}from"./user-DLuRcjl0.js";import{d as re,l as ie}from"./index-QESvAJrb.js";import{t as ae}from"./props-table-CCcohuyT.js";import{t as S}from"./smart-card-C6-idFYI.js";import{r as oe,t as se}from"./avatar-D3kvVy00.js";import{t as C}from"./metadata-list-BhlsEWYT.js";var w=ie(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),T=e({APISurface:()=>z,Dense4ColumnOverview:()=>K,EmptyStateFallbacksCustomRenderers:()=>X,HorizontalPillSummary:()=>J,RowsReceiptStyle:()=>U,RowsTwoColumnWithHairlines:()=>H,RowsWithIconsTooltips:()=>W,SectionedMultiCard:()=>G,Vertical2ColumnNoIcons:()=>B,Vertical3ColumnWithIcons:()=>q,VerticalSingleColumnNoIcons:()=>V,WithTitleSeparator:()=>Y}),E=t(n(),1),D=re();function O({value:e,mono:t=!0}){let[n,r]=(0,E.useState)(!1);return(0,D.jsxs)(ne,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`small`,onClick:()=>{try{navigator.clipboard.writeText(e)}catch{}r(!0),setTimeout(()=>r(!1),1200)},className:`group -ml-space-sm h-auto gap-space-sm rounded-radius px-space-sm py-space-2xs text-sm shadow-none transition-colors hover:bg-muted/60`,title:`Copy to clipboard`,children:[(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`medium`,className:t?`font-mono tabular-nums`:`tabular-nums`,children:e}),n?(0,D.jsx)(te,{className:`size-icon-sm text-success`,"aria-hidden":`true`}):(0,D.jsx)(l,{className:`size-icon-sm text-muted-foreground/50 opacity-0 transition-opacity group-hover:opacity-100`,"aria-hidden":`true`})]})}function k({initials:e,name:t,sub:n}){return(0,D.jsxs)(`span`,{className:`inline-flex items-center gap-space-md`,children:[(0,D.jsx)(se,{size:`small`,children:(0,D.jsx)(oe,{className:`text-xxs font-semibold`,children:e})}),(0,D.jsxs)(`span`,{className:`inline-flex flex-col leading-tight`,children:[(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`medium`,className:`text-sm`,children:t}),!!n&&(0,D.jsx)(a,{tag:`span`,size:`inherit`,type:`secondary`,className:`text-xs`,children:n})]})]})}var A=[{id:`name`,label:`Name`,value:`Sarah Smitha`},{id:`email`,label:`Email`,value:`maria@example.com`},{id:`role`,label:`Role`,value:`Workspace owner`},{id:`joined`,label:`Joined`,value:`March 14, 2025`},{id:`lastSeen`,label:`Last seen`,value:`2 hours ago`},{id:`timezone`,label:`Timezone`,value:`Europe/New York (UTC+02:00)`}],j=[{id:`sku`,label:`SKU`,icon:g,value:(0,D.jsx)(O,{value:`SP-204-WL`}),tooltip:`Internal stock-keeping unit`},{id:`category`,label:`Category`,icon:w,value:(0,D.jsx)(i,{variant:`secondary`,children:`Wellness`})},{id:`status`,label:`Status`,icon:ee,value:(0,D.jsx)(i,{variant:`success`,children:`Active`})},{id:`created`,label:`Created`,icon:c,value:`Apr 12, 2026`},{id:`updated`,label:`Last updated`,icon:d,value:`Apr 28, 2026 · 14:32`},{id:`version`,label:`Version`,icon:m,value:(0,D.jsx)(O,{value:`v3.2.1`})}],M=[{id:`id`,label:`Booking ID`,value:(0,D.jsx)(O,{value:`BKG-2026-0412`})},{id:`customer`,label:`Customer`,value:(0,D.jsx)(k,{initials:`MP`,name:`Sarah Smitha`,sub:`maria@example.com`})},{id:`experience`,label:`Experience`,value:`Spa Day Voucher`,description:`Wellness · 90 minutes · 2 guests`},{id:`scheduled`,label:`Scheduled for`,value:`Apr 18, 2026 · 14:00`,description:`Confirmed by SMS`},{id:`status`,label:`Status`,value:(0,D.jsx)(i,{variant:`success`,children:`Paid`})},{id:`amount`,label:`Total`,value:(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`semibold`,className:`text-sm tabular-nums`,children:`180.00 USD`})}],N=[{id:`sub`,label:`Subtotal`,value:`180.00 USD`},{id:`tax`,label:`VAT (20%)`,value:`36.00 USD`},{id:`discount`,label:`Discount`,value:(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`medium`,type:`success`,className:`text-sm tabular-nums`,children:`−25.00 USD`})},{id:`total`,label:`Total`,value:(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`bold`,className:`text-sm tabular-nums`,children:`191.00 USD`})}],P=[{id:`name`,label:`Name`,icon:x,value:`Sarah Smitha`},{id:`email`,label:`Email`,icon:_,value:(0,D.jsx)(O,{value:`maria@example.com`,mono:!1})},{id:`phone`,label:`Phone`,icon:y,value:(0,D.jsx)(O,{value:`+1 888 123 456`})},{id:`address`,label:`Address`,icon:v,value:`ul. Vitosha 24, New York 1000`,description:`USA`}],F=[{id:`card`,label:`Card`,icon:f,value:`Visa ending 4242`},{id:`billing`,label:`Billing address`,icon:s,value:`ul. Slavyanska 9, Los Angeles`},{id:`verified`,label:`Verified`,icon:b,value:(0,D.jsx)(i,{variant:`success`,children:`Yes`})}],I=[{id:`created`,label:`Created`,value:`Apr 12, 2026`},{id:`by`,label:`By`,value:`Sarah P.`},{id:`version`,label:`Version`,value:`v3.2.1`},{id:`env`,label:`Env`,value:`production`}],L=[{id:`sku`,label:`SKU`,value:`SP-204-WL`},{id:`isbn`,label:`ISBN`,value:null,emptyLabel:`Not assigned`},{id:`barcode`,label:`Barcode`,value:void 0},{id:`website`,label:`Website`,icon:h,render:()=>(0,D.jsxs)(`a`,{href:`#`,className:`inline-flex items-center gap-space-sm text-primary hover:underline`,children:[(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`medium`,className:`text-sm`,children:`example.com`}),(0,D.jsx)(p,{className:`size-icon-sm`,"aria-hidden":`true`})]})}],R=[{id:`plan`,label:`Plan`,value:`Pro Annual`},{id:`seats`,label:`Seats`,value:`12 / 50`},{id:`next`,label:`Next billing`,value:`May 12, 2026`}];function z(){return(0,D.jsxs)(a,{type:`secondary`,className:`max-w-2xl`,children:[`Each item is `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`{ id, label, value, icon?, tooltip?, description?, render?, emptyLabel? }`}),`. List-level props choose `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`layout`}),`, `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`columns`}),`, `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`dense`}),`, `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`title`}),`, `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`titleSeparator`}),`, and `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`separator`}),`. Per-item `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`render`}),` is for status pills, copyable IDs, links, and inline edit affordances.`]})}function B(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(S,{title:`Account details`,padding:`default`,children:(0,D.jsx)(C,{items:A,columns:2})})})}function V(){return(0,D.jsx)(`div`,{className:`w-full max-w-sm`,children:(0,D.jsx)(S,{title:`Profile`,children:(0,D.jsx)(C,{items:A.slice(0,4),columns:1})})})}function H(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(S,{title:`Booking #BKG-2026-0412`,padding:`default`,children:(0,D.jsx)(C,{items:M,layout:`rows`})})})}function U(){return(0,D.jsx)(`div`,{className:`w-full max-w-sm`,children:(0,D.jsx)(S,{title:`Receipt`,padding:`small`,children:(0,D.jsx)(C,{items:N,layout:`rows`,dense:!0})})})}function W(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(S,{title:`Product details`,padding:`default`,children:(0,D.jsx)(C,{items:j,layout:`rows`})})})}function G(){return(0,D.jsxs)(`div`,{className:`grid w-full max-w-4xl gap-space-lg lg:grid-cols-2`,children:[(0,D.jsx)(S,{title:`Customer`,children:(0,D.jsx)(C,{items:P,layout:`rows`})}),(0,D.jsx)(S,{title:`Payment`,children:(0,D.jsx)(C,{items:F,layout:`rows`})})]})}function K(){return(0,D.jsx)(`div`,{className:`w-full max-w-4xl`,children:(0,D.jsx)(S,{title:`Dense overview`,padding:`small`,children:(0,D.jsx)(C,{items:j,columns:4,dense:!0})})})}function q(){return(0,D.jsx)(`div`,{className:`w-full max-w-4xl`,children:(0,D.jsx)(S,{title:`Product overview`,children:(0,D.jsx)(C,{items:j,columns:3})})})}function J(){return(0,D.jsxs)(`div`,{className:`grid w-full max-w-3xl gap-space-md`,children:[(0,D.jsx)(S,{padding:`small`,children:(0,D.jsx)(C,{items:I,layout:`horizontal`,separator:`·`})}),(0,D.jsx)(S,{padding:`small`,children:(0,D.jsx)(C,{items:I,layout:`horizontal`,separator:`:`,itemSeparator:!0})}),(0,D.jsx)(S,{padding:`small`,surface:`flat`,className:`rounded-lg bg-muted/30`,children:(0,D.jsx)(C,{items:R,layout:`horizontal`,separator:`:`,itemSeparator:`•`})})]})}function Y(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(C,{title:`Inventory metadata`,titleSeparator:!0,items:j,columns:2})})}function X(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(S,{title:`Mixed`,padding:`default`,children:(0,D.jsx)(C,{items:L,layout:`rows`})})})}var Z=`import { useState } from 'react';
1
+ import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{n as r,o as i,p as a,t as o}from"./section-BPNIPavy.js";import{t as ee}from"./badge-check-DocF8Ho3.js";import{t as s}from"./building-2-CV7gTtXz.js";import{t as c}from"./calendar-days-BKCkzWjV.js";import{Dr as l,Or as te,r as ne,t as u}from"./example-CJMJcnb4.js";import{t as d}from"./clock-GhBJJ6n1.js";import{t as f}from"./credit-card-B0AUZiWw.js";import{t as p}from"./external-link-CvXhYrnd.js";import{t as m}from"./git-branch-BWAuIMOQ.js";import{t as h}from"./globe-CvIW_foU.js";import{t as g}from"./hash-wBs5gyr_.js";import{t as _}from"./mail-CCdaRmft.js";import{t as v}from"./map-pin-CdV-R6nt.js";import{t as y}from"./phone-BREyNZN-.js";import{t as b}from"./shield-check-DSfGVZq0.js";import{t as x}from"./user-BDIP5UPS.js";import{d as re,l as ie}from"./index-jD-KSiHu.js";import{t as ae}from"./props-table-DoDq8Mvr.js";import{t as S}from"./smart-card-p97LLZCW.js";import{r as oe,t as se}from"./avatar-BlLAVC87.js";import{t as C}from"./metadata-list-xVUTVyy9.js";var w=ie(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),T=e({APISurface:()=>z,Dense4ColumnOverview:()=>K,EmptyStateFallbacksCustomRenderers:()=>X,HorizontalPillSummary:()=>J,RowsReceiptStyle:()=>U,RowsTwoColumnWithHairlines:()=>H,RowsWithIconsTooltips:()=>W,SectionedMultiCard:()=>G,Vertical2ColumnNoIcons:()=>B,Vertical3ColumnWithIcons:()=>q,VerticalSingleColumnNoIcons:()=>V,WithTitleSeparator:()=>Y}),E=t(n(),1),D=re();function O({value:e,mono:t=!0}){let[n,r]=(0,E.useState)(!1);return(0,D.jsxs)(ne,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`small`,onClick:()=>{try{navigator.clipboard.writeText(e)}catch{}r(!0),setTimeout(()=>r(!1),1200)},className:`group -ml-space-sm h-auto gap-space-sm rounded-radius px-space-sm py-space-2xs text-sm shadow-none transition-colors hover:bg-muted/60`,title:`Copy to clipboard`,children:[(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`medium`,className:t?`font-mono tabular-nums`:`tabular-nums`,children:e}),n?(0,D.jsx)(te,{className:`size-icon-sm text-success`,"aria-hidden":`true`}):(0,D.jsx)(l,{className:`size-icon-sm text-muted-foreground/50 opacity-0 transition-opacity group-hover:opacity-100`,"aria-hidden":`true`})]})}function k({initials:e,name:t,sub:n}){return(0,D.jsxs)(`span`,{className:`inline-flex items-center gap-space-md`,children:[(0,D.jsx)(se,{size:`small`,children:(0,D.jsx)(oe,{className:`text-xxs font-semibold`,children:e})}),(0,D.jsxs)(`span`,{className:`inline-flex flex-col leading-tight`,children:[(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`medium`,className:`text-sm`,children:t}),!!n&&(0,D.jsx)(a,{tag:`span`,size:`inherit`,type:`secondary`,className:`text-xs`,children:n})]})]})}var A=[{id:`name`,label:`Name`,value:`Sarah Smitha`},{id:`email`,label:`Email`,value:`maria@example.com`},{id:`role`,label:`Role`,value:`Workspace owner`},{id:`joined`,label:`Joined`,value:`March 14, 2025`},{id:`lastSeen`,label:`Last seen`,value:`2 hours ago`},{id:`timezone`,label:`Timezone`,value:`Europe/New York (UTC+02:00)`}],j=[{id:`sku`,label:`SKU`,icon:g,value:(0,D.jsx)(O,{value:`SP-204-WL`}),tooltip:`Internal stock-keeping unit`},{id:`category`,label:`Category`,icon:w,value:(0,D.jsx)(i,{variant:`secondary`,children:`Wellness`})},{id:`status`,label:`Status`,icon:ee,value:(0,D.jsx)(i,{variant:`success`,children:`Active`})},{id:`created`,label:`Created`,icon:c,value:`Apr 12, 2026`},{id:`updated`,label:`Last updated`,icon:d,value:`Apr 28, 2026 · 14:32`},{id:`version`,label:`Version`,icon:m,value:(0,D.jsx)(O,{value:`v3.2.1`})}],M=[{id:`id`,label:`Booking ID`,value:(0,D.jsx)(O,{value:`BKG-2026-0412`})},{id:`customer`,label:`Customer`,value:(0,D.jsx)(k,{initials:`MP`,name:`Sarah Smitha`,sub:`maria@example.com`})},{id:`experience`,label:`Experience`,value:`Spa Day Voucher`,description:`Wellness · 90 minutes · 2 guests`},{id:`scheduled`,label:`Scheduled for`,value:`Apr 18, 2026 · 14:00`,description:`Confirmed by SMS`},{id:`status`,label:`Status`,value:(0,D.jsx)(i,{variant:`success`,children:`Paid`})},{id:`amount`,label:`Total`,value:(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`semibold`,className:`text-sm tabular-nums`,children:`180.00 USD`})}],N=[{id:`sub`,label:`Subtotal`,value:`180.00 USD`},{id:`tax`,label:`VAT (20%)`,value:`36.00 USD`},{id:`discount`,label:`Discount`,value:(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`medium`,type:`success`,className:`text-sm tabular-nums`,children:`−25.00 USD`})},{id:`total`,label:`Total`,value:(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`bold`,className:`text-sm tabular-nums`,children:`191.00 USD`})}],P=[{id:`name`,label:`Name`,icon:x,value:`Sarah Smitha`},{id:`email`,label:`Email`,icon:_,value:(0,D.jsx)(O,{value:`maria@example.com`,mono:!1})},{id:`phone`,label:`Phone`,icon:y,value:(0,D.jsx)(O,{value:`+1 888 123 456`})},{id:`address`,label:`Address`,icon:v,value:`ul. Vitosha 24, New York 1000`,description:`USA`}],F=[{id:`card`,label:`Card`,icon:f,value:`Visa ending 4242`},{id:`billing`,label:`Billing address`,icon:s,value:`ul. Slavyanska 9, Los Angeles`},{id:`verified`,label:`Verified`,icon:b,value:(0,D.jsx)(i,{variant:`success`,children:`Yes`})}],I=[{id:`created`,label:`Created`,value:`Apr 12, 2026`},{id:`by`,label:`By`,value:`Sarah P.`},{id:`version`,label:`Version`,value:`v3.2.1`},{id:`env`,label:`Env`,value:`production`}],L=[{id:`sku`,label:`SKU`,value:`SP-204-WL`},{id:`isbn`,label:`ISBN`,value:null,emptyLabel:`Not assigned`},{id:`barcode`,label:`Barcode`,value:void 0},{id:`website`,label:`Website`,icon:h,render:()=>(0,D.jsxs)(`a`,{href:`#`,className:`inline-flex items-center gap-space-sm text-primary hover:underline`,children:[(0,D.jsx)(a,{tag:`span`,size:`inherit`,weight:`medium`,className:`text-sm`,children:`example.com`}),(0,D.jsx)(p,{className:`size-icon-sm`,"aria-hidden":`true`})]})}],R=[{id:`plan`,label:`Plan`,value:`Pro Annual`},{id:`seats`,label:`Seats`,value:`12 / 50`},{id:`next`,label:`Next billing`,value:`May 12, 2026`}];function z(){return(0,D.jsxs)(a,{type:`secondary`,className:`max-w-2xl`,children:[`Each item is `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`{ id, label, value, icon?, tooltip?, description?, render?, emptyLabel? }`}),`. List-level props choose `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`layout`}),`, `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`columns`}),`, `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`dense`}),`, `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`title`}),`, `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`titleSeparator`}),`, and `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`separator`}),`. Per-item `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`render`}),` is for status pills, copyable IDs, links, and inline edit affordances.`]})}function B(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(S,{title:`Account details`,padding:`default`,children:(0,D.jsx)(C,{items:A,columns:2})})})}function V(){return(0,D.jsx)(`div`,{className:`w-full max-w-sm`,children:(0,D.jsx)(S,{title:`Profile`,children:(0,D.jsx)(C,{items:A.slice(0,4),columns:1})})})}function H(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(S,{title:`Booking #BKG-2026-0412`,padding:`default`,children:(0,D.jsx)(C,{items:M,layout:`rows`})})})}function U(){return(0,D.jsx)(`div`,{className:`w-full max-w-sm`,children:(0,D.jsx)(S,{title:`Receipt`,padding:`small`,children:(0,D.jsx)(C,{items:N,layout:`rows`,dense:!0})})})}function W(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(S,{title:`Product details`,padding:`default`,children:(0,D.jsx)(C,{items:j,layout:`rows`})})})}function G(){return(0,D.jsxs)(`div`,{className:`grid w-full max-w-4xl gap-space-lg lg:grid-cols-2`,children:[(0,D.jsx)(S,{title:`Customer`,children:(0,D.jsx)(C,{items:P,layout:`rows`})}),(0,D.jsx)(S,{title:`Payment`,children:(0,D.jsx)(C,{items:F,layout:`rows`})})]})}function K(){return(0,D.jsx)(`div`,{className:`w-full max-w-4xl`,children:(0,D.jsx)(S,{title:`Dense overview`,padding:`small`,children:(0,D.jsx)(C,{items:j,columns:4,dense:!0})})})}function q(){return(0,D.jsx)(`div`,{className:`w-full max-w-4xl`,children:(0,D.jsx)(S,{title:`Product overview`,children:(0,D.jsx)(C,{items:j,columns:3})})})}function J(){return(0,D.jsxs)(`div`,{className:`grid w-full max-w-3xl gap-space-md`,children:[(0,D.jsx)(S,{padding:`small`,children:(0,D.jsx)(C,{items:I,layout:`horizontal`,separator:`·`})}),(0,D.jsx)(S,{padding:`small`,children:(0,D.jsx)(C,{items:I,layout:`horizontal`,separator:`:`,itemSeparator:!0})}),(0,D.jsx)(S,{padding:`small`,surface:`flat`,className:`rounded-lg bg-muted/30`,children:(0,D.jsx)(C,{items:R,layout:`horizontal`,separator:`:`,itemSeparator:`•`})})]})}function Y(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(C,{title:`Inventory metadata`,titleSeparator:!0,items:j,columns:2})})}function X(){return(0,D.jsx)(`div`,{className:`w-full max-w-3xl`,children:(0,D.jsx)(S,{title:`Mixed`,padding:`default`,children:(0,D.jsx)(C,{items:L,layout:`rows`})})})}var Z=`import { useState } from 'react';
2
2
  import {
3
3
  BadgeCheck,
4
4
  Building2,
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{f as n,p as r}from"./section-BPNIPavy.js";import{a as i,c as a,o,r as s}from"./example-CJMJcnb4.js";import{t as c}from"./info-B5fZn_ZC.js";import{N as l,d as u,n as d}from"./index-jD-KSiHu.js";import{t as f}from"./separator-CKM9A-mm.js";var p=e(t(),1),m={formatInfoAriaLabel:e=>`${e} info`,infoFallback:`Info`},h=u(),g={1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4`},_={start:`justify-start`,end:`justify-end`,center:`justify-center`,between:`justify-between`,around:`justify-around`,evenly:`justify-evenly`},v={start:`items-start`,center:`items-center`,end:`items-end`,baseline:`items-baseline`},y=(e,t)=>e.id?e.id:`metadata-${typeof e.label==`string`?e.label:`${t}`}-${t}`;function b({triggerProps:e,ariaLabel:t}){let{className:n,...r}=e;return(0,h.jsx)(s,{...r,type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,className:d(`metadata-list--info-trigger -mx-space-2xs inline-flex size-avatar-sm shrink-0 items-center justify-center rounded-sm`,`text-muted-foreground transition-colors hover:text-foreground`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,n),"aria-label":t,children:(0,h.jsx)(c,{className:`size-icon-sm cursor-help`})})}function x({items:e,columns:t=2,dense:s=!1,emptyLabel:c=`—`,title:u,titleSeparator:x=!1,className:S,gapClassName:C,labelClassName:w,valueClassName:T,descriptionClassName:E,layout:D=`vertical`,justify:O=`start`,align:k=`center`,separator:A=`: `,itemSeparator:j=!1,wrap:M=!0,strings:N}){let P=l(m,N),F=p.useMemo(()=>e.filter(Boolean),[e]);if(p.useEffect(()=>{},[D,F]),F.length===0)return null;let I=g[t]??g[2],L=C??(s?`gap-space-md`:`gap-space-xl`),R=s?`gap-space-xs`:`gap-space-sm`,z=`text-xxs`,B=s?`text-xs`:`text-sm`,V=`font-medium text-xxs text-muted-foreground uppercase tracking-wide`,H=u!=null,U=H&&x;if(D===`horizontal`){let e=_[O]??_.start,t=v[k]??v.center,l=typeof j==`string`?j:j?` | `:``,m=s?`gap-space-sm`:`gap-space-md`,g=M?`flex-wrap`:`flex-nowrap`;return(0,h.jsxs)(`div`,{className:d(`metadata-list--component`,`metadata-list-container`,S),children:[!!H&&(0,h.jsx)(n,{tag:`h6`,className:d(`mb-space-sm`,V),children:u}),!!U&&(0,h.jsx)(f,{className:`mb-2`}),(0,h.jsx)(`div`,{className:d(`flex`,g,e,t,m),children:F.map((e,t)=>{let n=y(e,t),u=e.emptyLabel??c,f=e.value??u,m=e.icon,g=e.tooltip!==null&&e.tooltip!==void 0,_=typeof e.render==`function`,v=l&&t<F.length-1;return(0,h.jsxs)(p.Fragment,{children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-space-sm`,children:[!!m&&(0,h.jsx)(m,{className:d(`flex-shrink-0`,s?`size-icon-sm`:`size-icon`,`text-muted-foreground`)}),(0,h.jsx)(r,{size:`inherit`,type:`secondary`,className:d(`metadata--field tracking-wide whitespace-nowrap`,z,w),children:e.label}),!!g&&(0,h.jsxs)(i,{children:[(0,h.jsx)(a,{render:t=>(0,h.jsx)(b,{triggerProps:t,ariaLabel:typeof e.label==`string`?P.formatInfoAriaLabel(e.label):P.infoFallback})}),(0,h.jsx)(o,{side:`top`,align:`start`,className:`max-w-xs`,children:(0,h.jsx)(r,{type:`inverse`,size:`xs`,children:e.tooltip})})]}),(0,h.jsx)(r,{size:`inherit`,type:`secondary`,children:A}),_?e.render?.(e):(0,h.jsx)(r,{weight:`medium`,className:d(B,`leading-tight`,T),children:f})]}),!!v&&(0,h.jsx)(r,{size:`inherit`,type:`secondary`,children:l})]},n)})})]})}if(D===`rows`){let e=s?`py-row-y-sm`:`py-row-y`;return(0,h.jsxs)(`div`,{className:d(`metadata-list--component`,`metadata-list-container`,S),children:[!!H&&(0,h.jsx)(n,{tag:`h6`,className:d(`mb-space-md`,V),children:u}),!!U&&(0,h.jsx)(f,{className:`mb-2`}),(0,h.jsx)(`dl`,{className:`divide-y divide-border/50`,children:F.map((t,n)=>{let l=y(t,n),u=t.emptyLabel??c,f=t.value??u,p=t.icon,m=t.tooltip!==null&&t.tooltip!==void 0,g=typeof t.render==`function`;return(0,h.jsxs)(`div`,{className:d(`grid items-baseline gap-x-space-lg gap-y-space-sm grid-cols-[minmax(9rem,1fr)_2fr]`,e),children:[(0,h.jsxs)(`dt`,{className:`flex items-center gap-space-sm min-w-0`,children:[!!p&&(0,h.jsx)(p,{className:d(`flex-shrink-0 text-muted-foreground`,s?`size-icon-sm`:`size-icon`)}),(0,h.jsx)(r,{type:`secondary`,className:d(`metadata--field truncate tracking-wide`,z,w),children:t.label}),!!m&&(0,h.jsxs)(i,{children:[(0,h.jsx)(a,{render:e=>(0,h.jsx)(b,{triggerProps:e,ariaLabel:typeof t.label==`string`?P.formatInfoAriaLabel(t.label):P.infoFallback})}),(0,h.jsx)(o,{side:`top`,align:`start`,className:`max-w-xs`,children:(0,h.jsx)(r,{type:`inverse`,size:`xs`,children:t.tooltip})})]})]}),(0,h.jsxs)(`dd`,{className:`min-w-0`,children:[g?t.render?.(t):(0,h.jsx)(r,{weight:`medium`,className:d(B,`break-words leading-tight`,T),children:f}),!!t.description&&(0,h.jsx)(r,{size:`inherit`,type:`secondary`,className:d(`mt-space-2xs text-xxs leading-snug`,E),children:t.description})]})]},l)})})]})}return(0,h.jsxs)(`div`,{className:d(`metadata-list--component`,`metadata-list-container`,S),children:[!!H&&(0,h.jsx)(n,{tag:`h6`,className:d(`mb-space-sm`,V),children:u}),!!U&&(0,h.jsx)(f,{className:`mb-2`}),(0,h.jsx)(`div`,{className:d(`grid`,I,L),children:F.map((e,t)=>{let n=y(e,t),l=e.emptyLabel??c,u=e.value??l,f=e.icon,p=e.tooltip!==null&&e.tooltip!==void 0,m=typeof e.render==`function`;return(0,h.jsxs)(`div`,{className:d(`grid min-w-0`,R),children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-space-sm`,children:[!!f&&(0,h.jsx)(f,{className:d(`flex-shrink-0`,s?`size-icon-sm`:`size-icon`,`text-muted-foreground`)}),(0,h.jsx)(r,{size:`inherit`,type:`secondary`,className:d(`metadata--field tracking-wide`,z,w),children:e.label}),!!p&&(0,h.jsxs)(i,{children:[(0,h.jsx)(a,{render:t=>(0,h.jsx)(b,{triggerProps:t,ariaLabel:typeof e.label==`string`?P.formatInfoAriaLabel(e.label):P.infoFallback})}),(0,h.jsx)(o,{side:`top`,align:`start`,className:`max-w-xs`,children:(0,h.jsx)(r,{type:`inverse`,size:`xs`,children:e.tooltip})})]})]}),m?e.render?.(e):(0,h.jsx)(r,{weight:`medium`,className:d(B,`leading-tight`,T),children:u}),!!e.description&&(0,h.jsx)(r,{size:`inherit`,type:`secondary`,className:d(`text-xxs leading-snug`,E),children:e.description})]},n)})})]})}x.displayName=`MetadataList`;export{x as t};