decocms 4.125.2 → 4.125.3

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 (235) hide show
  1. package/dist/client/assets/{AlertCircle-DHfPbwmm.js → AlertCircle-CZ-QDeuV.js} +1 -1
  2. package/dist/client/assets/{AreaChart-D-FRclvq.js → AreaChart-PqgF2jHX.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-aoYnUAfi.js → ArrowRight-DXCmKdZa.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-gaHL-JMD.js → ArrowUp-LJQPKGSl.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-owfb6ER7.js → ArrowUpRight-vT3FCoIv.js} +1 -1
  6. package/dist/client/assets/{Check-DIcuBCVN.js → Check-Cm-_V5_R.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-C9FuklSy.js → CheckCircle-qoB5WjsF.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-B9FSangp.js → ChevronDown-CA4KkhqD.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-BZGq8ec4.js → ChevronRight-CMz4AZPi.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-C8KS626_.js → ChevronUp-BV21uDxf.js} +1 -1
  11. package/dist/client/assets/{Copy01-DscCSlQa.js → Copy01-Dw68E968.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BrcjQf49.js → DotsVertical-BNei4o8j.js} +1 -1
  13. package/dist/client/assets/{Eye-BfHBDYah.js → Eye-CiAu08AP.js} +1 -1
  14. package/dist/client/assets/{FilterLines-CaezqqN6.js → FilterLines-CAURnmrQ.js} +1 -1
  15. package/dist/client/assets/{Globe01-B_-PRcJN.js → Globe01-uUOnACJu.js} +1 -1
  16. package/dist/client/assets/{Globe04-CnBEu-Tb.js → Globe04-D3KfA03M.js} +1 -1
  17. package/dist/client/assets/{HardDrive-D0rrQptf.js → HardDrive-CCwHa0Fy.js} +1 -1
  18. package/dist/client/assets/{Image01-BWs5Cl8W.js → Image01-BZNccv_a.js} +1 -1
  19. package/dist/client/assets/{Key01-meMXc90d.js → Key01-CVVLMWOk.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-d5DgJxpL.js → LayoutLeft-CV0Fxhgi.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-BWDB74Bl.js → LinkExternal01-BjDRa_cY.js} +1 -1
  22. package/dist/client/assets/{LogOut01-DsLUwoTk.js → LogOut01-C38fwgKw.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DdFs1Uqi.js → Monitor01-Dli6tPiq.js} +1 -1
  24. package/dist/client/assets/{Package-DgWT9bDS.js → Package-CPCNnWEf.js} +1 -1
  25. package/dist/client/assets/{Palette-DwuPeqfy.js → Palette-Db-LKztJ.js} +1 -1
  26. package/dist/client/assets/{Play-C3OJLofP.js → Play-C4HMbYn8.js} +1 -1
  27. package/dist/client/assets/{Plus-BMGy0gLt.js → Plus-CpiwlrZn.js} +1 -1
  28. package/dist/client/assets/{SearchLg-Bvo_jSOD.js → SearchLg-H4wZo23j.js} +1 -1
  29. package/dist/client/assets/{SearchMd-CwtuvWh8.js → SearchMd-6MO9LIdT.js} +1 -1
  30. package/dist/client/assets/{Settings02-B005Jn4G.js → Settings02-B-h6FN02.js} +1 -1
  31. package/dist/client/assets/{Shield01-BktOn7OY.js → Shield01-bNu8w9gG.js} +1 -1
  32. package/dist/client/assets/{Star01-COD8B803.js → Star01-DjJLECJ6.js} +1 -1
  33. package/dist/client/assets/{Stars01-DS-jsjsg.js → Stars01-CzMjKMFi.js} +1 -1
  34. package/dist/client/assets/{Stars02-Wk4f773E.js → Stars02-Bbgws80K.js} +1 -1
  35. package/dist/client/assets/{Sun-DMi1PxWR.js → Sun-B4mc9LiV.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-CQgBK8Zs.js → SwitchHorizontal01-DuoaUzSR.js} +1 -1
  37. package/dist/client/assets/{Tool01-CMGcVT4l.js → Tool01-6PfZASif.js} +1 -1
  38. package/dist/client/assets/{Tool02-Bg6EYrJZ.js → Tool02-CLezvx1y.js} +1 -1
  39. package/dist/client/assets/{Trash01-DmDxDqMT.js → Trash01-BzPhCj0r.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-cVD_6pKi.js → TrendUp01-CpOjLcn5.js} +1 -1
  41. package/dist/client/assets/{Upload01-B7Wisg2m.js → Upload01-DO6RDELr.js} +1 -1
  42. package/dist/client/assets/{User01-CrrDrMtl.js → User01-BVO_HkGm.js} +1 -1
  43. package/dist/client/assets/{Users01-B8Zwqemn.js → Users01-CNhdJX4T.js} +1 -1
  44. package/dist/client/assets/{Users03-CHFYRzMp.js → Users03-cwI7BUN7.js} +1 -1
  45. package/dist/client/assets/{X-kbNEvIkE.js → X-CtmjSXSI.js} +1 -1
  46. package/dist/client/assets/{XCircle-Bau-QYHG.js → XCircle-CzwEjrla.js} +1 -1
  47. package/dist/client/assets/{XClose-CiEZ9Mmp.js → XClose-DqRQWsv_.js} +1 -1
  48. package/dist/client/assets/{Zap-COQSXbiz.js → Zap-qLUG7PHb.js} +1 -1
  49. package/dist/client/assets/{ZapSquare-CWc873Is.js → ZapSquare-DoDW54wp.js} +1 -1
  50. package/dist/client/assets/{ZoomOut-BzQ5KRW5.js → ZoomOut-lBPK99wg.js} +1 -1
  51. package/dist/client/assets/{access-gate-BvtsfB8K.js → access-gate-CmlFUehn.js} +1 -1
  52. package/dist/client/assets/{add-section-modal-CjPlnHD2.js → add-section-modal-Ce531LLf.js} +1 -1
  53. package/dist/client/assets/{agent-icon-Bu8L0YTs.js → agent-icon-B3fL_4qg.js} +1 -1
  54. package/dist/client/assets/{agents-list-CcBRMCSX.js → agents-list-3exJW_ZK.js} +1 -1
  55. package/dist/client/assets/{ai-providers-Be8br1vH.js → ai-providers-wriu9zmN.js} +1 -1
  56. package/dist/client/assets/{alert-HFyMw3-6.js → alert-BJBvB6i3.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-CBCn_UdL.js → alert-dialog-Bkn1qxzY.js} +1 -1
  58. package/dist/client/assets/{app-editor-B1reldMi.js → app-editor-BniVRNQ-.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-Cy7UrKhy.js → auth-catchall-Bv9YUGkv.js} +1 -1
  60. package/dist/client/assets/{auth-Bprl3x_3.js → auth-drcOGxfQ.js} +1 -1
  61. package/dist/client/assets/{auth-entry-CNLeBO8A.js → auth-entry-Dh2ikAys.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-DRCdjhs2.js → auth-split-layout-CbrzRfOp.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-CRUUJSOy.js → authenticate-and-persist-oauth-BDzuTWDL.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-Cr4wP_05.js → automation-list-row-BBffEt-G.js} +1 -1
  65. package/dist/client/assets/{automation-runs-Cbng2BoT.js → automation-runs-BAjGrIup.js} +1 -1
  66. package/dist/client/assets/{automations-GVbUrn5l.js → automations-Ct2OyWck.js} +1 -1
  67. package/dist/client/assets/{autosend-DzUEXq6j.js → autosend-KM1E4PCJ.js} +1 -1
  68. package/dist/client/assets/{avatar-Dei6fpXi.js → avatar-0hL3yrCP.js} +1 -1
  69. package/dist/client/assets/{badge-Cmfr9I7J.js → badge-C6prLIIE.js} +1 -1
  70. package/dist/client/assets/{block-document-DIN2deJy.js → block-document-DfLzlux3.js} +1 -1
  71. package/dist/client/assets/{brand-context-h5RiCjnq.js → brand-context-HjdhL5BH.js} +1 -1
  72. package/dist/client/assets/{buckets-Dp3vPQTS.js → buckets-Ca1m9Q8x.js} +1 -1
  73. package/dist/client/assets/{bulk-category-panel-B1Gi9wUq.js → bulk-category-panel-96WbnSd9.js} +1 -1
  74. package/dist/client/assets/{calendar-DHty8QJT.js → calendar-DwaliwOT.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-CXxQs63z.js → capability-load-error-DzgULj7n.js} +1 -1
  76. package/dist/client/assets/{card-CaGEmByP.js → card-C1Y2PSik.js} +1 -1
  77. package/dist/client/assets/{category-editor-s0kMzuKL.js → category-editor-B13_VmwV.js} +1 -1
  78. package/dist/client/assets/{chat-context-DRXtbNYB.js → chat-context-gCdPvRKC.js} +1 -1
  79. package/dist/client/assets/{checkbox-DgJA_ceb.js → checkbox-B5jLcRRn.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-SqN0HJI8.js → cli-auth-success-BglGNsT_.js} +1 -1
  81. package/dist/client/assets/{collection-detail-DjW1_lm1.js → collection-detail-BmNRR59P.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-WGf1YkR8.js → collection-display-button-Brhatueg.js} +1 -1
  83. package/dist/client/assets/{collection-search-v6k7-ns_.js → collection-search-Bz1G1NWa.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-jxnyW-o6.js → collection-table-wrapper-COd9cD-H.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-BOJ9WXu0.js → collection-tabs-DQVw_umI.js} +1 -1
  86. package/dist/client/assets/{command-Dh8_6SVl.js → command-DuFMLmtV.js} +1 -1
  87. package/dist/client/assets/{commerce-onboarding-CSi5e0YX.js → commerce-onboarding-FKF0ReVp.js} +1 -1
  88. package/dist/client/assets/{companions-core-BSh9cT1E.js → companions-core-A0v28i3B.js} +1 -1
  89. package/dist/client/assets/{connect-ClEEolrx.js → connect-D3uBYCwm.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-C0flGaQ_.js → connect-desktop-dialog-C2zkS_Sy.js} +1 -1
  91. package/dist/client/assets/{connection-CauRFt6W.js → connection-CrsFYs6U.js} +1 -1
  92. package/dist/client/assets/{connection-card-CeYmR-Cx.js → connection-card-DXsdz2sa.js} +1 -1
  93. package/dist/client/assets/{connection-detail-_7qtrH4B.js → connection-detail-B9YMXUWV.js} +1 -1
  94. package/dist/client/assets/{connection-form-helpers-7iwRsPVv.js → connection-form-helpers-B_1XBoiA.js} +1 -1
  95. package/dist/client/assets/{connections-ZhIMcHMb.js → connections-Dn50jKzo.js} +1 -1
  96. package/dist/client/assets/{decopilot-sse-pool-DaQqKB35.js → decopilot-sse-pool-GYdw_EGb.js} +1 -1
  97. package/dist/client/assets/{dialog-G4ZiTvNx.js → dialog-Cvsx1gQ6.js} +1 -1
  98. package/dist/client/assets/{domain-settings-CweuNubx.js → domain-settings-DgGmvoMB.js} +1 -1
  99. package/dist/client/assets/{drawer-B75YbbdI.js → drawer-DJGwTsHm.js} +1 -1
  100. package/dist/client/assets/{dropdown-menu-Ds67TSY4.js → dropdown-menu-B0o8pIE_.js} +1 -1
  101. package/dist/client/assets/{empty-state-Bta4YdzD.js → empty-state-DxRSZyKc.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-DgxJXS5w.js → extract-connection-data-CHuTICVR.js} +1 -1
  103. package/dist/client/assets/{file-explorer-B6MpksVl.js → file-explorer-y7GBmU0M.js} +1 -1
  104. package/dist/client/assets/{file-type-icon-BBhjyJbf.js → file-type-icon-vDHix078.js} +1 -1
  105. package/dist/client/assets/{files-BIEklIkn.js → files-CjvSkpt7.js} +1 -1
  106. package/dist/client/assets/{form-I0GnjsKQ.js → form-BldCksIf.js} +1 -1
  107. package/dist/client/assets/{general-5tGulC2H.js → general-BSwlhnhX.js} +1 -1
  108. package/dist/client/assets/{github-repo-picker-C_zm2Ku6.js → github-repo-picker-C0elR76p.js} +1 -1
  109. package/dist/client/assets/{hooks-eTDNg0DR.js → hooks-pck-zibj.js} +1 -1
  110. package/dist/client/assets/{index-X6AHLbER.js → index-7q4rPo08.js} +1 -1
  111. package/dist/client/assets/{index-D8aJMO1V.js → index-BHPm_dnn.js} +1 -1
  112. package/dist/client/assets/{index-Dhdk7EaJ.js → index-Bbd-sl7_.js} +1 -1
  113. package/dist/client/assets/{index-BN2uaF1T.js → index-Bqi3rn24.js} +1 -1
  114. package/dist/client/assets/{index-BymC5LN8.js → index-Bs2rWvyP.js} +1 -1
  115. package/dist/client/assets/{index-GeOcC1AM.js → index-CbvdEi3E.js} +1 -1
  116. package/dist/client/assets/{index-DK_1_-so.js → index-Cd8xwYGk.js} +1 -1
  117. package/dist/client/assets/{index-DNyFrsaH.js → index-Cj8zKyTA.js} +1 -1
  118. package/dist/client/assets/{index-9mX7itVS.js → index-D5dHLdnR.js} +5 -5
  119. package/dist/client/assets/{index-BuUlXZv1.js → index-DkgcyEMi.js} +3 -3
  120. package/dist/client/assets/{index-D_e-AGWz.js → index-PVU3iBU7.js} +1 -1
  121. package/dist/client/assets/{index-4RDnlua4.js → index-ZwIDQEc7.js} +3 -3
  122. package/dist/client/assets/{index-BA_hCyLd.js → index-_a944_Ja.js} +1 -1
  123. package/dist/client/assets/{index-redirect-BdqCP6LK.js → index-redirect-CnB99gc0.js} +1 -1
  124. package/dist/client/assets/{input-DLUPJjpz.js → input-BheY0_Rg.js} +1 -1
  125. package/dist/client/assets/{integration-icon-DPwYpZT7.js → integration-icon-vHbSUBpI.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-DWZsYH7X.js → invite-member-dialog-DgHOS2un.js} +1 -1
  127. package/dist/client/assets/{label-DUcYIAKY.js → label-Ci7V3Gkt.js} +1 -1
  128. package/dist/client/assets/{layout-B8T6EBXg.js → layout-D63t_GrT.js} +1 -1
  129. package/dist/client/assets/{login-DcZyKofL.js → login-CidfJwCX.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-Dci8cSOd.js → mcp-oauth-BirVrg-4.js} +1 -1
  131. package/dist/client/assets/{members-BbTqeuTo.js → members-DAAqYy_g.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-dTalnsYm.js → monaco-editor-Dji0kJXe.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-C1tE-n8d.js → monitoring-stats-row-vSooG-ZI.js} +1 -1
  134. package/dist/client/assets/{multi-select-Cfgtgcax.js → multi-select-9ns2c7R3.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-CdS7aTBF.js → oauth-callback-B7n9ygqU.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ai-provider-CVxXEEWb.js → oauth-callback-ai-provider-BiYFB_JM.js} +1 -1
  137. package/dist/client/assets/{onboarding-6atU8fxu.js → onboarding-CCJr5bQG.js} +1 -1
  138. package/dist/client/assets/{org-install-BgWInxM1.js → org-install-CGdTjo9O.js} +1 -1
  139. package/dist/client/assets/{org-layout-CPBhzMru.js → org-layout-Bmf8aEDz.js} +1 -1
  140. package/dist/client/assets/{organization-choice-BSaRjkdA.js → organization-choice-Dtcnztt9.js} +1 -1
  141. package/dist/client/assets/{orgs-DGzKd1EY.js → orgs-B2Aju39S.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-C-18bHzi.js → page-seo-form-CnsbCtDH.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-Db1AKYTo.js +1 -0
  144. package/dist/client/assets/{popover-CgLqhHGP.js → popover-B2rUNmI8.js} +1 -1
  145. package/dist/client/assets/{post-editor-BaU667xO.js → post-editor-9qIeiGVU.js} +1 -1
  146. package/dist/client/assets/{primitives-CXNB8gAp.js → primitives-C4j302yw.js} +1 -1
  147. package/dist/client/assets/{profile-CtYiW70i.js → profile-JQaXVZBg.js} +1 -1
  148. package/dist/client/assets/project-app-view-DgNlr_bk.js +1 -0
  149. package/dist/client/assets/record-editor-BwykUxws.js +1 -0
  150. package/dist/client/assets/{redirect-editor-fK_i-XfS.js → redirect-editor-BlH85s90.js} +1 -1
  151. package/dist/client/assets/registry-DRAlLI3O.js +2 -0
  152. package/dist/client/assets/{registry-layout-CzJnSkGi.js → registry-layout-DB0-cytW.js} +1 -1
  153. package/dist/client/assets/{reports-BLso3NNn.js → reports-B614Ls--.js} +1 -1
  154. package/dist/client/assets/{require-capability-DJUF6EfI.js → require-capability-DxjGudfU.js} +1 -1
  155. package/dist/client/assets/{required-auth-layout-CY6VIKkl.js → required-auth-layout-CZjucmoK.js} +1 -1
  156. package/dist/client/assets/{reset-password-DDDOBPpI.js → reset-password-DO2dCDkE.js} +1 -1
  157. package/dist/client/assets/{roles-DiP4REKC.js → roles-rAnFwCku.js} +1 -1
  158. package/dist/client/assets/{search-input-DOMBq2Er.js → search-input-CIJgMttt.js} +1 -1
  159. package/dist/client/assets/{secrets-DPYYlx9C.js → secrets-CqoAhSOl.js} +1 -1
  160. package/dist/client/assets/{sections-editor-CK1krdST.js → sections-editor-D0AdM0Ab.js} +1 -1
  161. package/dist/client/assets/{select-BCZLKjJN.js → select-DQR9EgBM.js} +1 -1
  162. package/dist/client/assets/{select-model-CFjdb8F4.js → select-model-dmuMEpkE.js} +1 -1
  163. package/dist/client/assets/{self-tool-result-DeCekO3f.js → self-tool-result-D5yCtM0Z.js} +1 -1
  164. package/dist/client/assets/{seo-editor-C_DByLik.js → seo-editor-B_pGglgH.js} +1 -1
  165. package/dist/client/assets/{settings-layout-qfgj2V21.js → settings-layout-CPHfPUbP.js} +1 -1
  166. package/dist/client/assets/{settings-section-CWj3_FdW.js → settings-section-D-bXes5G.js} +1 -1
  167. package/dist/client/assets/{shell-controls-sgm1Ghqr.js → shell-controls-BgnLJicF.js} +1 -1
  168. package/dist/client/assets/{shell-layout-A4Klwqzt.js → shell-layout-BS8kK49C.js} +1 -1
  169. package/dist/client/assets/{sidebar-BZQNMiqx.js → sidebar-J-j2IvV0.js} +1 -1
  170. package/dist/client/assets/{skeleton-CXG2AFFX.js → skeleton-CLzUXhtl.js} +1 -1
  171. package/dist/client/assets/{sso-tXM51xor.js → sso-tZ4Ie0Fr.js} +1 -1
  172. package/dist/client/assets/{store-D6KLtEh2.js → store-B0ASMA5J.js} +1 -1
  173. package/dist/client/assets/store-registry-FnmA8dhX.js +2 -0
  174. package/dist/client/assets/{studio-tools-BanQp4TZ.js → studio-tools-rHjOSnQi.js} +1 -1
  175. package/dist/client/assets/{switch-DHbzmpde.js → switch-BtGpgb3o.js} +1 -1
  176. package/dist/client/assets/{table-wjz_t519.js → table-E-UvA1xv.js} +1 -1
  177. package/dist/client/assets/{tabs-BrQ8T12Z.js → tabs-up8r57Mg.js} +1 -1
  178. package/dist/client/assets/{textarea-yNbPp_V1.js → textarea-BnZTZtW9.js} +1 -1
  179. package/dist/client/assets/{toggle-group-BLBd1Na5.js → toggle-group-DVxLTEKO.js} +1 -1
  180. package/dist/client/assets/{toolbar-Cge5lcNV.js → toolbar--EPnc3B6.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-CWELZhBo.js → toolbar-icon-button-CaNHGM7W.js} +1 -1
  182. package/dist/client/assets/{tooltip-B8bYd-9r.js → tooltip-B2YmIjms.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-S5QPPawK.js → use-ai-providers-0qDHXlOR.js} +1 -1
  184. package/dist/client/assets/{use-api-keys-Cl5n0LhD.js → use-api-keys-BrAeSDZa.js} +1 -1
  185. package/dist/client/assets/{use-automations-Du6nHRym.js → use-automations-B0Nno8_v.js} +1 -1
  186. package/dist/client/assets/{use-autosave-BDYAiYhJ.js → use-autosave-_bd3isQi.js} +1 -1
  187. package/dist/client/assets/{use-capability-BiwL5b_x.js → use-capability-CS-NB1gC.js} +1 -1
  188. package/dist/client/assets/{use-clock-tick-7IVs3KNJ.js → use-clock-tick-CeED7IqB.js} +1 -1
  189. package/dist/client/assets/{use-connection-I-DnXuJH.js → use-connection-CSo41aqn.js} +1 -1
  190. package/dist/client/assets/{use-copy-DTsOKQvO.js → use-copy-C2ifJJog.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-dWUtRtkr.js → use-create-virtual-mcp-DnQQG-8Q.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-BMOZjMIM.js → use-debounced-autosave-BXT-0ys5.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-DZJqrsuG.js → use-debounced-value-2DbslpH9.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-UyEP8mkX.js → use-deco-credits-By5z-af9.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-BNKUFs1m.js → use-decopilot-events-COw0WPBt.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-CLvEM5JF.js → use-delete-connection-BV5ANhx2.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-D40uSnVH.js → use-deployment-admin-6E20zihG.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-Da4n5Wk_.js → use-file-configs-CHEcSIwu.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-CjI765bv.js → use-infinite-scroll-wD08Y4k3.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-_EoYHc02.js → use-join-requests-rpt-aP3J.js} +1 -1
  201. package/dist/client/assets/{use-mcp-auth-status-Cprl0lqq.js → use-mcp-auth-status-uDmHSw0u.js} +1 -1
  202. package/dist/client/assets/{use-mcp-client-Dggs_wtL.js → use-mcp-client-CnBcptHf.js} +1 -1
  203. package/dist/client/assets/{use-mcp-tools-BZb2_KlI.js → use-mcp-tools-DlrqSqti.js} +1 -1
  204. package/dist/client/assets/{use-members-DTLixo_2.js → use-members-DOMS00Vg.js} +1 -1
  205. package/dist/client/assets/{use-mobile-D_MHSYLt.js → use-mobile-BhHy2iMg.js} +1 -1
  206. package/dist/client/assets/{use-navigate-to-agent-D8r2um29.js → use-navigate-to-agent-BZlFQzeW.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-D8JQ0qMm.js → use-org-auth-client-Bn-yYVPA.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-BsOWFttQ.js → use-org-sso-DbQbqd6s.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-BsjAqShS.js → use-organization-roles-sWtJZHD9.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-Cfo4apco.js → use-organization-settings-DY8DWlGM.js} +1 -1
  211. package/dist/client/assets/{use-registry-app-Ccw5Zgoa.js → use-registry-app-G2lUEiKw.js} +1 -1
  212. package/dist/client/assets/{use-registry-connections-DL4Qbjni.js → use-registry-connections-CBy37-t1.js} +1 -1
  213. package/dist/client/assets/{use-secrets-CGKvz62m.js → use-secrets-BeZlwDXE.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-CAtTty8v.js → use-status-sounds-_pExVJlU.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-Butv57c-.js → use-view-mode-CF4g8owz.js} +1 -1
  216. package/dist/client/assets/{use-virtual-mcp-DcKgvXvy.js → use-virtual-mcp-Df1tC-Y2.js} +1 -1
  217. package/dist/client/assets/useInfiniteQuery-N6eM-XHg.js +1 -0
  218. package/dist/client/assets/{useQueries-CCY8hrOc.js → useQueries-D82btylQ.js} +1 -1
  219. package/dist/client/assets/{useRouterState-BmgvsVqw.js → useRouterState-Cr9l8diT.js} +1 -1
  220. package/dist/client/assets/useSuspenseInfiniteQuery-BfUEzMvx.js +1 -0
  221. package/dist/client/assets/{users-BrpQL4K3.js → users-o5DO6N3n.js} +1 -1
  222. package/dist/client/assets/{variant-calendar-DqtEssYW.js → variant-calendar-BwI6E3m5.js} +1 -1
  223. package/dist/client/assets/{view-mode-toggle-BRNVwU1R.js → view-mode-toggle-HvhNsFK1.js} +1 -1
  224. package/dist/client/index.html +1 -1
  225. package/dist/server/cli.js +435 -435
  226. package/dist/server/migrate.js +5 -5
  227. package/dist/server/server.js +253 -253
  228. package/package.json +1 -1
  229. package/dist/client/assets/page-seo-sheet-Cq6MSxcj.js +0 -1
  230. package/dist/client/assets/project-app-view-B-ZNnyXW.js +0 -1
  231. package/dist/client/assets/record-editor-CyFKknlv.js +0 -1
  232. package/dist/client/assets/registry-vH1Mc4gB.js +0 -2
  233. package/dist/client/assets/store-registry-DEiSeyxl.js +0 -2
  234. package/dist/client/assets/useInfiniteQuery-BkEklLkA.js +0 -1
  235. package/dist/client/assets/useSuspenseInfiniteQuery-D1lf4BBq.js +0 -1
@@ -1,2 +1,2 @@
1
- import{c as He,b as rt,r as V,m as Fe,j as n,af as Gn,B as Je,k as Wn,o as _a,t as Q,K as ja}from"./index-BuUlXZv1.js";import{a3 as Ea,a4 as ka,a5 as Ra,H as Un,J as Yt,a6 as qn,a7 as Jn,K as Yn,P as Qn,i as Xn,a8 as wa,V as Zn,W as es,a9 as Va,aa as Na,G as Da,L as ts,M as At,Q as ns,U as ss,N as as,_ as os,ab as Ta,ac as Mt,ad as Pa,S as is,ae as it,af as Ca,ag as Aa,ah as Ma,ai as Ka,e as La,k as Ba,aj as Fa,ak as Oa,al as Ia,am as $a,r as Gt,an as Wt,ao as za,ap as xt,aq as Tt,ar as Ha,as as Ga,at as Ze,au as Pn,av as Wa,aw as Pt,ax as Ut,ay as Ua,az as un,aA as qa,aB as wt,aC as Ja,aD as Ya,aE as Qa,aF as Xa,aG as Za,aH as bt,aI as eo,aJ as to,aK as no,m as so,aL as Cn,aM as Ct,aN as ao,aO as oo,aP as io,aQ as ro,aR as dn,aS as An,aT as Mn,aU as Vt,aV as qt,aW as Kn,aX as lo,aY as mn,aZ as co,a_ as uo,a$ as mo,b0 as Ln,b1 as fo,b2 as po}from"./index-9mX7itVS.js";import{t as go}from"./ChevronDown-B9FSangp.js";import{a0 as pn,V as rs,G as ho,z as ls,a1 as vo,a2 as So}from"./agent-icon-Bu8L0YTs.js";import{i as cs}from"./ChevronRight-BZGq8ec4.js";import{n as xo}from"./ChevronUp-C8KS626_.js";import{i as bo}from"./Globe01-B_-PRcJN.js";import{m as Jt}from"./automation-runs-Cbng2BoT.js";import{c as yt,T as _t,a as jt}from"./tooltip-B8bYd-9r.js";import{b as yo,h as _o,a as jo,c as Eo,d as ko,e as Ro}from"./dialog-G4ZiTvNx.js";import{I as wo}from"./input-DLUPJjpz.js";import{a as us}from"./Copy01-DscCSlQa.js";import{c as Vo}from"./ZoomOut-BzQ5KRW5.js";import{i as No}from"./Settings02-B005Jn4G.js";import{s as Do}from"./Eye-BfHBDYah.js";import{s as ds}from"./TrendUp01-cVD_6pKi.js";import{s as gn}from"./Plus-BMGy0gLt.js";import{s as ms}from"./Trash01-DmDxDqMT.js";import{i as To}from"./Zap-COQSXbiz.js";import{a as vt,D as fs,b as ps,c as gs,i as Po}from"./dropdown-menu-Ds67TSY4.js";import{S as Co,r as Bn,a as Ao,d as Mo,b as Ko,i as Lo,f as Bo,P as Fo,c as Oo}from"./page-seo-form-C-18bHzi.js";import{b as Io}from"./Tool01-CMGcVT4l.js";import{A as $o}from"./add-section-modal-CjPlnHD2.js";import"./ArrowUp-gaHL-JMD.js";import"./chat-context-DRXtbNYB.js";import"./autosend-DzUEXq6j.js";import"./hooks-eTDNg0DR.js";import"./use-mcp-client-Dggs_wtL.js";import"./auth-Bprl3x_3.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DaQqKB35.js";import"./studio-tools-BanQp4TZ.js";import"./use-virtual-mcp-DcKgvXvy.js";import"./use-ai-providers-S5QPPawK.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-BNKUFs1m.js";import"./use-organization-settings-Cfo4apco.js";import"./drawer-B75YbbdI.js";import"./collection-search-v6k7-ns_.js";import"./SearchMd-CwtuvWh8.js";import"./use-mobile-D_MHSYLt.js";import"./AreaChart-D-FRclvq.js";import"./index-BymC5LN8.js";import"./calendar-DHty8QJT.js";import"./X-kbNEvIkE.js";import"./shell-layout-A4Klwqzt.js";import"./avatar-Dei6fpXi.js";import"./User01-CrrDrMtl.js";import"./Users03-CHFYRzMp.js";import"./SearchLg-Bvo_jSOD.js";import"./Stars02-Wk4f773E.js";import"./XClose-CiEZ9Mmp.js";import"./CheckCircle-C9FuklSy.js";import"./FilterLines-CaezqqN6.js";import"./required-auth-layout-CY6VIKkl.js";import"./use-org-sso-BsOWFttQ.js";import"./index-4RDnlua4.js";import"./get-initials-D-f_fDFw.js";import"./SwitchHorizontal01-CQgBK8Zs.js";import"./popover-CgLqhHGP.js";import"./use-registry-app-Ccw5Zgoa.js";import"./use-mcp-tools-BZb2_KlI.js";import"./use-connection-I-DnXuJH.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-CRUUJSOy.js";import"./mcp-oauth-Dci8cSOd.js";import"./extract-connection-data-DgxJXS5w.js";import"./metadata-dUsYcpuu.js";import"./use-members-DTLixo_2.js";import"./use-org-auth-client-D8JQ0qMm.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./AlertCircle-DHfPbwmm.js";import"./DotsVertical-BrcjQf49.js";import"./use-copy-DTsOKQvO.js";import"./Check-DIcuBCVN.js";import"./LinkExternal01-BWDB74Bl.js";import"./command-Dh8_6SVl.js";import"./index-DNyFrsaH.js";import"./ArrowRight-aoYnUAfi.js";import"./companions-core-BSh9cT1E.js";import"./ZapSquare-CWc873Is.js";import"./Star01-COD8B803.js";import"./Image01-BWs5Cl8W.js";import"./Upload01-B7Wisg2m.js";import"./form-I0GnjsKQ.js";import"./label-DUcYIAKY.js";import"./select-BCZLKjJN.js";import"./tabs-BrQ8T12Z.js";import"./Tool02-Bg6EYrJZ.js";import"./toggle-group-BLBd1Na5.js";import"./use-deco-credits-UyEP8mkX.js";import"./sidebar-BZQNMiqx.js";import"./LayoutLeft-d5DgJxpL.js";import"./alert-dialog-CBCn_UdL.js";import"./toolbar-icon-button-CWELZhBo.js";import"./skeleton-CXG2AFFX.js";import"./github-repo-picker-C_zm2Ku6.js";import"./use-debounced-value-DZJqrsuG.js";import"./use-navigate-to-agent-D8r2um29.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./connection-card-CeYmR-Cx.js";import"./use-registry-connections-DL4Qbjni.js";import"./useInfiniteQuery-BkEklLkA.js";import"./use-infinite-scroll-CjI765bv.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CaGEmByP.js";import"./integration-icon-DPwYpZT7.js";import"./textarea-yNbPp_V1.js";import"./connection-form-helpers-7iwRsPVv.js";import"./collection-tabs-BOJ9WXu0.js";import"./badge-Cmfr9I7J.js";import"./useSuspenseInfiniteQuery-D1lf4BBq.js";import"./Monitor01-DdFs1Uqi.js";import"./connect-desktop-dialog-C0flGaQ_.js";import"./select-model-CFjdb8F4.js";import"./checkbox-DgJA_ceb.js";import"./Key01-meMXc90d.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CWj3_FdW.js";import"./ArrowUpRight-owfb6ER7.js";import"./Stars01-DS-jsjsg.js";import"./index-DK_1_-so.js";import"./Palette-DwuPeqfy.js";import"./file-type-icon-BBhjyJbf.js";import"./toolbar-Cge5lcNV.js";import"./Package-DgWT9bDS.js";import"./index-D8aJMO1V.js";import"./XCircle-Bau-QYHG.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CAtTty8v.js";import"./empty-state-Bta4YdzD.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-BiwL5b_x.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-Cprl0lqq.js";import"./Play-C3OJLofP.js";import"./use-debounced-autosave-BMOZjMIM.js";import"./index-X6AHLbER.js";import"./search-input-DOMBq2Er.js";import"./switch-DHbzmpde.js";import"./Users01-B8Zwqemn.js";import"./use-secrets-CGKvz62m.js";import"./useQueries-CCY8hrOc.js";import"./monaco-editor-dTalnsYm.js";import"./use-file-configs-Da4n5Wk_.js";import"./use-automations-Du6nHRym.js";import"./automation-list-row-Cr4wP_05.js";import"./Globe04-CnBEu-Tb.js";import"./HardDrive-D0rrQptf.js";import"./LogOut01-DsLUwoTk.js";import"./Sun-DMi1PxWR.js";import"./Shield01-BktOn7OY.js";import"./table-wjz_t519.js";import"./use-clock-tick-7IVs3KNJ.js";function zo(g){return g.schema?.definitions??g.schema?.$defs??{}}function Ho(g,e){const o=zo(e),d=o[btoa(g)];if(!d)return;let f=typeof d.image=="string"?d.image:void 0;if(!f&&Array.isArray(d.allOf)){const x=d.allOf.find(b=>typeof b.$ref=="string")?.$ref;if(typeof x=="string"){const b=x.replace("#/definitions/",""),m=o[b];f=typeof m?.image=="string"?m.image:void 0}}if(f?.includes("{{{"))return f}function Go(g,e){if(!e)return;const o=Ea(g);if(!o)return;const d=Ho(o.resolveType,e);if(!d)return;const f=ka(d,o.data);if(f)return Ra(f)}const Wo="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Uo="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function Fn(g){return Array.from({length:g},(e,o)=>({id:crypto.randomUUID(),index:o}))}function hs(g){return g.map((e,o)=>({...e,index:o}))}function qo(g,e){if(e===g.length)return g;if(e<g.length)return hs(g.slice(0,e));const o=Array.from({length:e-g.length},(d,f)=>({id:crypto.randomUUID(),index:g.length+f}));return[...g,...o]}function vs(g){const e=He.c(20),{section:o,raw:d,meta:f}=g,x=o.isSavedBlock===!0,b=o.isMultivariate===!0;let m;e[0]!==f||e[1]!==d?(m=d&&f?Go(d,f):void 0,e[0]=f,e[1]=d,e[2]=m):m=e[2];const h=m;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Vo,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=u):u=e[3];let y;e[4]!==h?(y=h&&n.jsx("img",{src:h,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=h,e[5]=y):y=e[5];let k;e[6]!==b||e[7]!==x?(k=x?{color:Da}:b?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=b,e[7]=x,e[8]=k):k=e[8];let D;e[9]!==k?(D=n.jsx(pn,{className:"h-4 w-4 shrink-0",style:k}),e[9]=k,e[10]=D):D=e[10];const E=o.isHidden&&"line-through opacity-50";let r;e[11]!==E?(r=Fe("min-w-0 flex-1 truncate text-sm font-medium",E),e[11]=E,e[12]=r):r=e[12];let p;e[13]!==o.label||e[14]!==r?(p=n.jsx("span",{className:r,children:o.label}),e[13]=o.label,e[14]=r,e[15]=p):p=e[15];let i;return e[16]!==y||e[17]!==D||e[18]!==p?(i=n.jsxs(n.Fragment,{children:[u,y,D,p]}),e[16]=y,e[17]=D,e[18]=p,e[19]=i):i=e[19],i}function Ss(g,e){const o=g.isSavedBlock===!0,d=g.isMultivariate===!0;return Fe("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?Wo:d?"text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Jo(g){const e=He.c(81),{section:o,raw:d,meta:f,sortableId:x,selected:b,onSelect:m,onDelete:h,onDuplicate:u,onMakeReusable:y,onToggleHidden:k,onToggleLazy:D,onAddVariant:E,onDetach:r}=g,p=rt(),i=d?Xn(d.__resolveType??""):!1;let P;e[0]!==o?(P=wa(o),e[0]=o,e[1]=P):P=e[1];const l=P;let R;e[2]!==x?(R={id:x,animateLayoutChanges:ei},e[2]=x,e[3]=R):R=e[3];const{attributes:A,listeners:z,setNodeRef:v,transform:C,isDragging:ie}=Zn(R);let L;e[4]!==C?(L=es.Transform.toString(C?{...C,x:0}:null),e[4]=C,e[5]=L):L=e[5];const ue=ie?0:void 0;let K;e[6]!==L||e[7]!==ue?(K={transform:L,opacity:ue},e[6]=L,e[7]=ue,e[8]=K):K=e[8];const ge=K;let B;e[9]!==o?(B=Va(o),e[9]=o,e[10]=B):B=e[10];const se=B,he="button",fe=0;let F;e[11]!==m?(F=G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),m())},e[11]=m,e[12]=F):F=e[12];const J=ie?"cursor-grabbing":"cursor-pointer";let X;e[13]!==o||e[14]!==b||e[15]!==J?(X=Fe("touch-none transition-colors",J,Ss(o,b)),e[13]=o,e[14]=b,e[15]=J,e[16]=X):X=e[16];let re;e[17]!==f||e[18]!==d||e[19]!==o?(re=n.jsx(vs,{section:o,raw:d,meta:f}),e[17]=f,e[18]=d,e[19]=o,e[20]=re):re=e[20];const O=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":p(i?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Fe("h-7 w-7 shrink-0",i?"":"opacity-0 group-hover:opacity-100"),onClick:G=>{G.stopPropagation(),D()},onPointerDown:Zo,children:n.jsx(To,{className:Fe("h-3.5 w-3.5",i&&"text-yellow-500")})})}),n.jsx(jt,{side:"bottom",children:p(i?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]});let Ke;e[21]!==k||e[22]!==o.isHidden||e[23]!==o.isMultivariate||e[24]!==p?(Ke=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":o.isHidden?p("sectionsEditor.sectionList.showSection"):p("sectionsEditor.sectionList.hideSection"),className:Fe("h-7 w-7 shrink-0",o.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:G=>{G.stopPropagation(),k()},onPointerDown:Xo,children:o.isHidden?n.jsx(No,{className:"h-3.5 w-3.5"}):n.jsx(Do,{className:"h-3.5 w-3.5"})})}),n.jsx(jt,{side:"bottom",children:o.isHidden?p("sectionsEditor.sectionList.showSection"):p("sectionsEditor.sectionList.hideSection")})]}),e[21]=k,e[22]=o.isHidden,e[23]=o.isMultivariate,e[24]=p,e[25]=Ke):Ke=e[25];let Z;e[26]!==p?(Z=p("sectionsEditor.sectionList.sectionActionsMenu"),e[26]=p,e[27]=Z):Z=e[27];let Le;e[28]===Symbol.for("react.memo_cache_sentinel")?(Le=n.jsx(rs,{className:"h-3.5 w-3.5"}),e[28]=Le):Le=e[28];let ve;e[29]!==Z?(ve=n.jsx(fs,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":Z,className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:Qo,onPointerDown:Yo,children:Le})}),e[29]=Z,e[30]=ve):ve=e[30];let de;e[31]!==u?(de=G=>{G.stopPropagation(),u()},e[31]=u,e[32]=de):de=e[32];let oe;e[33]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(us,{className:"h-4 w-4"}),e[33]=oe):oe=e[33];let ee;e[34]!==p?(ee=p("sectionsEditor.sectionList.duplicateMenuItem"),e[34]=p,e[35]=ee):ee=e[35];let le;e[36]!==de||e[37]!==ee?(le=n.jsxs(vt,{onClick:de,children:[oe,ee]}),e[36]=de,e[37]=ee,e[38]=le):le=e[38];let pe;e[39]!==l||e[40]!==E||e[41]!==p?(pe=l&&n.jsxs(vt,{className:Na,onClick:G=>{G.stopPropagation(),E()},children:[n.jsx(ds,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.addVariantMenuItem")]}),e[39]=l,e[40]=E,e[41]=p,e[42]=pe):pe=e[42];let ke;e[43]!==se||e[44]!==y||e[45]!==p?(ke=se&&n.jsxs(vt,{className:Uo,onClick:G=>{G.stopPropagation(),y()},children:[n.jsx(pn,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[43]=se,e[44]=y,e[45]=p,e[46]=ke):ke=e[46];let Re;e[47]!==r||e[48]!==o.isMultivariate||e[49]!==o.isSavedBlock||e[50]!==p?(Re=o.isSavedBlock===!0&&!o.isMultivariate&&n.jsxs(vt,{onClick:G=>{G.stopPropagation(),r()},children:[n.jsx(pn,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.detachMenuItem")]}),e[47]=r,e[48]=o.isMultivariate,e[49]=o.isSavedBlock,e[50]=p,e[51]=Re):Re=e[51];let Se;e[52]!==h?(Se=G=>{G.stopPropagation(),h()},e[52]=h,e[53]=Se):Se=e[53];let De;e[54]===Symbol.for("react.memo_cache_sentinel")?(De=n.jsx(ms,{className:"h-4 w-4"}),e[54]=De):De=e[54];let _e;e[55]!==p?(_e=p("sectionsEditor.sectionList.deleteMenuItem"),e[55]=p,e[56]=_e):_e=e[56];let I;e[57]!==Se||e[58]!==_e?(I=n.jsxs(vt,{className:"text-destructive focus:text-destructive",onClick:Se,children:[De,_e]}),e[57]=Se,e[58]=_e,e[59]=I):I=e[59];let ce;e[60]!==le||e[61]!==pe||e[62]!==ke||e[63]!==Re||e[64]!==I?(ce=n.jsxs(ps,{align:"end",className:"w-44",children:[le,pe,ke,Re,I]}),e[60]=le,e[61]=pe,e[62]=ke,e[63]=Re,e[64]=I,e[65]=ce):ce=e[65];let je;e[66]!==ve||e[67]!==ce?(je=n.jsxs(gs,{children:[ve,ce]}),e[66]=ve,e[67]=ce,e[68]=je):je=e[68];let Te;return e[69]!==A||e[70]!==z||e[71]!==m||e[72]!==v||e[73]!==ge||e[74]!==X||e[75]!==re||e[76]!==O||e[77]!==Ke||e[78]!==je||e[79]!==F?(Te=n.jsxs("div",{ref:v,style:ge,...A,...z,role:he,tabIndex:fe,onClick:m,onKeyDown:F,className:X,children:[re,O,Ke,je]}),e[69]=A,e[70]=z,e[71]=m,e[72]=v,e[73]=ge,e[74]=X,e[75]=re,e[76]=O,e[77]=Ke,e[78]=je,e[79]=F,e[80]=Te):Te=e[80],Te}function Yo(g){return g.stopPropagation()}function Qo(g){return g.stopPropagation()}function Xo(g){return g.stopPropagation()}function Zo(g){return g.stopPropagation()}function ei(){return!1}function ti(g){const e=He.c(104),{listKey:o,rawSections:d,sections:f,meta:x,selectedIndex:b,onSelect:m,onReorder:h,onDelete:u,onDuplicate:y,onMakeReusable:k,onToggleHidden:D,onToggleLazy:E,onAddVariant:r,onDetach:p,onAddSection:i,canAddSection:P}=g,l=P===void 0?!0:P,R=rt();let A;e[0]!==f.length?(A=()=>Fn(f.length),e[0]=f.length,e[1]=A):A=e[1];const[z,v]=V.useState(A),[C,ie]=V.useState(null),[L,ue]=V.useState(o),[K,ge]=V.useState(f.length),B=V.useRef(!1);L!==o?(ue(o),ge(f.length),v(Fn(f.length))):K!==f.length&&(ge(f.length),v(Ie=>qo(Ie,f.length)));let se;e[2]===Symbol.for("react.memo_cache_sentinel")?(se={activationConstraint:{distance:8}},e[2]=se):se=e[2];let he;e[3]===Symbol.for("react.memo_cache_sentinel")?(he={coordinateGetter:ts},e[3]=he):he=e[3];const fe=Un(Yt(Qn,se),Yt(Yn,he));let F;e[4]!==z?(F=z.map(ni),e[4]=z,e[5]=F):F=e[5];const J=F;let X;e[6]===Symbol.for("react.memo_cache_sentinel")?(X=Ie=>{ie(String(Ie.active.id))},e[6]=X):X=e[6];const re=X;let O;e[7]!==J||e[8]!==h?(O=Ie=>{ie(null);const{active:N,over:ae}=Ie;if(!ae||N.id===ae.id)return;const $=J.indexOf(String(N.id)),Xe=J.indexOf(String(ae.id));$===-1||Xe===-1||(v(et=>hs(At([...et],$,Xe))),B.current=!0,requestAnimationFrame(()=>{B.current=!1}),h?.($,Xe))},e[7]=J,e[8]=h,e[9]=O):O=e[9];const Ke=O;let Z;e[10]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{ie(null)},e[10]=Z):Z=e[10];const Le=Z;let ve,de,oe,ee,le,pe,ke,Re,Se,De,_e,I,ce,je,Te;if(e[11]!==C||e[12]!==l||e[13]!==z||e[14]!==J||e[15]!==Ke||e[16]!==x||e[17]!==i||e[18]!==r||e[19]!==u||e[20]!==p||e[21]!==y||e[22]!==k||e[23]!==m||e[24]!==D||e[25]!==E||e[26]!==d||e[27]!==f||e[28]!==b||e[29]!==fe||e[30]!==R){je=Symbol.for("react.early_return_sentinel");e:{const Ie=N=>{B.current||m(N)};if(e[46]!==C||e[47]!==l||e[48]!==z||e[49]!==i||e[50]!==d||e[51]!==f||e[52]!==R){const N=C?z.find(ae=>ae.id===C):null;if(ee=N!=null?f[N.index]:null,oe=N!=null?d[N.index]:void 0,z.length===0){let ae;e[56]!==R?(ae=R("sectionsEditor.sectionList.noSections"),e[56]=R,e[57]=ae):ae=e[57];let $;e[58]!==ae?($=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:ae}),e[58]=ae,e[59]=$):$=e[59];const Xe=!l;let et;e[60]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(gn,{size:14}),e[60]=et):et=e[60];let lt;e[61]!==R?(lt=R("sectionsEditor.sectionList.addSectionButton"),e[61]=R,e[62]=lt):lt=e[62];let ct;e[63]!==i||e[64]!==Xe||e[65]!==lt?(ct=n.jsxs(Je,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Xe,onClick:i,children:[et,lt]}),e[63]=i,e[64]=Xe,e[65]=lt,e[66]=ct):ct=e[66];let ut;e[67]!==$||e[68]!==ct?(ut=n.jsxs("div",{className:"space-y-2",children:[$,ct]}),e[67]=$,e[68]=ct,e[69]=ut):ut=e[69],je=ut;break e}ce=Fe(N&&"cursor-grabbing"),e[46]=C,e[47]=l,e[48]=z,e[49]=i,e[50]=d,e[51]=f,e[52]=R,e[53]=oe,e[54]=ee,e[55]=ce}else oe=e[53],ee=e[54],ce=e[55];de=ns,Re=fe,Se=ss,De=re,_e=Ke,I=Le,ve=as,pe=J,ke=os,Te="space-y-1",le=z.map(N=>{const ae=f[N.index];return ae?n.jsx(Jo,{sortableId:N.id,section:ae,raw:d[N.index],meta:x,selected:b===N.index,onSelect:()=>Ie(N.index),onDelete:()=>u(N.index),onDuplicate:()=>y(N.index),onMakeReusable:()=>k(N.index),onToggleHidden:()=>D(N.index),onToggleLazy:()=>E(N.index),onAddVariant:()=>r(N.index),onDetach:()=>p(N.index)},N.id):null})}e[11]=C,e[12]=l,e[13]=z,e[14]=J,e[15]=Ke,e[16]=x,e[17]=i,e[18]=r,e[19]=u,e[20]=p,e[21]=y,e[22]=k,e[23]=m,e[24]=D,e[25]=E,e[26]=d,e[27]=f,e[28]=b,e[29]=fe,e[30]=R,e[31]=ve,e[32]=de,e[33]=oe,e[34]=ee,e[35]=le,e[36]=pe,e[37]=ke,e[38]=Re,e[39]=Se,e[40]=De,e[41]=_e,e[42]=I,e[43]=ce,e[44]=je,e[45]=Te}else ve=e[31],de=e[32],oe=e[33],ee=e[34],le=e[35],pe=e[36],ke=e[37],Re=e[38],Se=e[39],De=e[40],_e=e[41],I=e[42],ce=e[43],je=e[44],Te=e[45];if(je!==Symbol.for("react.early_return_sentinel"))return je;let G;e[70]!==le||e[71]!==Te?(G=n.jsx("div",{className:Te,children:le}),e[70]=le,e[71]=Te,e[72]=G):G=e[72];let Ae;e[73]!==ve||e[74]!==pe||e[75]!==ke||e[76]!==G?(Ae=n.jsx(ve,{items:pe,strategy:ke,children:G}),e[73]=ve,e[74]=pe,e[75]=ke,e[76]=G,e[77]=Ae):Ae=e[77];let Oe;e[78]!==oe||e[79]!==ee||e[80]!==x?(Oe=ee?n.jsx("div",{className:Fe("cursor-grabbing shadow-lg ring-1 ring-border/60",Ss(ee,!1)),children:n.jsx(vs,{section:ee,raw:oe,meta:x})}):null,e[78]=oe,e[79]=ee,e[80]=x,e[81]=Oe):Oe=e[81];let ze;e[82]!==Oe?(ze=Gn.createPortal(n.jsx(qn,{dropAnimation:Jn,children:Oe}),document.body),e[82]=Oe,e[83]=ze):ze=e[83];let Be;e[84]!==de||e[85]!==Re||e[86]!==Se||e[87]!==De||e[88]!==_e||e[89]!==I||e[90]!==Ae||e[91]!==ze?(Be=n.jsxs(de,{sensors:Re,collisionDetection:Se,onDragStart:De,onDragEnd:_e,onDragCancel:I,children:[Ae,ze]}),e[84]=de,e[85]=Re,e[86]=Se,e[87]=De,e[88]=_e,e[89]=I,e[90]=Ae,e[91]=ze,e[92]=Be):Be=e[92];const xe=!l;let we;e[93]===Symbol.for("react.memo_cache_sentinel")?(we=n.jsx(gn,{size:14}),e[93]=we):we=e[93];let be;e[94]!==R?(be=R("sectionsEditor.sectionList.addSectionButton"),e[94]=R,e[95]=be):be=e[95];let te;e[96]!==i||e[97]!==xe||e[98]!==be?(te=n.jsxs(Je,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:xe,onClick:i,children:[we,be]}),e[96]=i,e[97]=xe,e[98]=be,e[99]=te):te=e[99];let me;return e[100]!==ce||e[101]!==Be||e[102]!==te?(me=n.jsxs("div",{className:ce,children:[Be,te]}),e[100]=ce,e[101]=Be,e[102]=te,e[103]=me):me=e[103],me}function ni(g){return g.id}function On(g){const e=He.c(57),{open:o,initialName:d,autoLabel:f,isPending:x,onSubmit:b,onOpenChange:m}=g,h=x===void 0?!1:x,u=rt(),[y,k]=V.useState(d),[D,E]=V.useState(o);o!==D&&(E(o),o&&k(d));let r;e[0]!==h||e[1]!==m?(r=re=>{!re&&!h&&m(!1)},e[0]=h,e[1]=m,e[2]=r):r=e[2];const p=r;let i;e[3]!==h||e[4]!==y||e[5]!==b?(i=async re=>{re.preventDefault(),!h&&await b(y.trim())},e[3]=h,e[4]=y,e[5]=b,e[6]=i):i=e[6];const P=i;let l;e[7]!==u?(l=u("sectionsEditor.variantRenameDialog.title"),e[7]=u,e[8]=l):l=e[8];let R;e[9]!==l?(R=n.jsx(yo,{children:l}),e[9]=l,e[10]=R):R=e[10];let A;e[11]!==f||e[12]!==u?(A=u("sectionsEditor.variantRenameDialog.description",{fallback:f||u("sectionsEditor.variantRenameDialog.defaultFallback")}),e[11]=f,e[12]=u,e[13]=A):A=e[13];let z;e[14]!==A?(z=n.jsx(_o,{children:A}),e[14]=A,e[15]=z):z=e[15];let v;e[16]!==R||e[17]!==z?(v=n.jsxs(jo,{children:[R,z]}),e[16]=R,e[17]=z,e[18]=v):v=e[18];let C;e[19]!==u?(C=u("sectionsEditor.variantRenameDialog.nameLabel"),e[19]=u,e[20]=C):C=e[20];let ie;e[21]!==C?(ie=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:C}),e[21]=C,e[22]=ie):ie=e[22];let L;e[23]===Symbol.for("react.memo_cache_sentinel")?(L=re=>k(re.target.value),e[23]=L):L=e[23];let ue;e[24]!==f||e[25]!==h||e[26]!==y?(ue=n.jsx(wo,{id:"variant-rename-name",value:y,onChange:L,placeholder:f,autoFocus:!0,disabled:h}),e[24]=f,e[25]=h,e[26]=y,e[27]=ue):ue=e[27];let K;e[28]!==ie||e[29]!==ue?(K=n.jsxs("div",{className:"space-y-1.5 py-4",children:[ie,ue]}),e[28]=ie,e[29]=ue,e[30]=K):K=e[30];let ge;e[31]!==m?(ge=()=>m(!1),e[31]=m,e[32]=ge):ge=e[32];let B;e[33]!==u?(B=u("sectionsEditor.variantRenameDialog.cancel"),e[33]=u,e[34]=B):B=e[34];let se;e[35]!==h||e[36]!==ge||e[37]!==B?(se=n.jsx(Je,{type:"button",variant:"outline",onClick:ge,disabled:h,children:B}),e[35]=h,e[36]=ge,e[37]=B,e[38]=se):se=e[38];let he;e[39]!==h||e[40]!==u?(he=h?n.jsxs(n.Fragment,{children:[n.jsx(Wn,{size:14,className:"animate-spin"}),u("sectionsEditor.variantRenameDialog.saving")]}):u("sectionsEditor.variantRenameDialog.save"),e[39]=h,e[40]=u,e[41]=he):he=e[41];let fe;e[42]!==h||e[43]!==he?(fe=n.jsx(Je,{type:"submit",disabled:h,children:he}),e[42]=h,e[43]=he,e[44]=fe):fe=e[44];let F;e[45]!==se||e[46]!==fe?(F=n.jsxs(Eo,{children:[se,fe]}),e[45]=se,e[46]=fe,e[47]=F):F=e[47];let J;e[48]!==P||e[49]!==K||e[50]!==F||e[51]!==v?(J=n.jsx(ko,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:P,children:[v,K,F]})}),e[48]=P,e[49]=K,e[50]=F,e[51]=v,e[52]=J):J=e[52];let X;return e[53]!==p||e[54]!==o||e[55]!==J?(X=n.jsx(Ro,{open:o,onOpenChange:p,children:J}),e[53]=p,e[54]=o,e[55]=J,e[56]=X):X=e[56],X}const si="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]",xs="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.2)]";function bs(g){const e=He.c(5),{rule:o,matchers:d}=g,f=o?.__resolveType??"";let x;if(e[0]!==d||e[1]!==f){const u=d.find(y=>y.resolveType===f)?.iconName??Ta(f);x=ho(u),e[0]=d,e[1]=f,e[2]=x}else x=e[2];const b=x;if(!b)return null;let m;return e[3]!==b?(m=n.jsx(b,{size:14,className:"shrink-0"}),e[3]=b,e[4]=m):m=e[4],m}function In(g){return g.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
1
+ import{c as He,b as rt,r as V,m as Fe,j as n,af as Gn,B as Je,k as Wn,o as _a,t as Q,K as ja}from"./index-DkgcyEMi.js";import{a3 as Ea,a4 as ka,a5 as Ra,H as Un,J as Yt,a6 as qn,a7 as Jn,K as Yn,P as Qn,i as Xn,a8 as wa,V as Zn,W as es,a9 as Va,aa as Na,G as Da,L as ts,M as At,Q as ns,U as ss,N as as,_ as os,ab as Ta,ac as Mt,ad as Pa,S as is,ae as it,af as Ca,ag as Aa,ah as Ma,ai as Ka,e as La,k as Ba,aj as Fa,ak as Oa,al as Ia,am as $a,r as Gt,an as Wt,ao as za,ap as xt,aq as Tt,ar as Ha,as as Ga,at as Ze,au as Pn,av as Wa,aw as Pt,ax as Ut,ay as Ua,az as un,aA as qa,aB as wt,aC as Ja,aD as Ya,aE as Qa,aF as Xa,aG as Za,aH as bt,aI as eo,aJ as to,aK as no,m as so,aL as Cn,aM as Ct,aN as ao,aO as oo,aP as io,aQ as ro,aR as dn,aS as An,aT as Mn,aU as Vt,aV as qt,aW as Kn,aX as lo,aY as mn,aZ as co,a_ as uo,a$ as mo,b0 as Ln,b1 as fo,b2 as po}from"./index-D5dHLdnR.js";import{t as go}from"./ChevronDown-CA4KkhqD.js";import{a0 as pn,V as rs,G as ho,z as ls,a1 as vo,a2 as So}from"./agent-icon-B3fL_4qg.js";import{i as cs}from"./ChevronRight-CMz4AZPi.js";import{n as xo}from"./ChevronUp-BV21uDxf.js";import{i as bo}from"./Globe01-uUOnACJu.js";import{m as Jt}from"./automation-runs-BAjGrIup.js";import{c as yt,T as _t,a as jt}from"./tooltip-B2YmIjms.js";import{b as yo,h as _o,a as jo,c as Eo,d as ko,e as Ro}from"./dialog-Cvsx1gQ6.js";import{I as wo}from"./input-BheY0_Rg.js";import{a as us}from"./Copy01-Dw68E968.js";import{c as Vo}from"./ZoomOut-lBPK99wg.js";import{i as No}from"./Settings02-B-h6FN02.js";import{s as Do}from"./Eye-CiAu08AP.js";import{s as ds}from"./TrendUp01-CpOjLcn5.js";import{s as gn}from"./Plus-CpiwlrZn.js";import{s as ms}from"./Trash01-BzPhCj0r.js";import{i as To}from"./Zap-qLUG7PHb.js";import{a as vt,D as fs,b as ps,c as gs,i as Po}from"./dropdown-menu-B0o8pIE_.js";import{S as Co,r as Bn,a as Ao,d as Mo,b as Ko,i as Lo,f as Bo,P as Fo,c as Oo}from"./page-seo-form-CnsbCtDH.js";import{b as Io}from"./Tool01-6PfZASif.js";import{A as $o}from"./add-section-modal-Ce531LLf.js";import"./ArrowUp-LJQPKGSl.js";import"./chat-context-gCdPvRKC.js";import"./autosend-KM1E4PCJ.js";import"./hooks-pck-zibj.js";import"./use-mcp-client-CnBcptHf.js";import"./auth-drcOGxfQ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-GYdw_EGb.js";import"./studio-tools-rHjOSnQi.js";import"./use-virtual-mcp-Df1tC-Y2.js";import"./use-ai-providers-0qDHXlOR.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-COw0WPBt.js";import"./use-organization-settings-DY8DWlGM.js";import"./drawer-DJGwTsHm.js";import"./collection-search-Bz1G1NWa.js";import"./SearchMd-6MO9LIdT.js";import"./use-mobile-BhHy2iMg.js";import"./AreaChart-PqgF2jHX.js";import"./index-Bs2rWvyP.js";import"./calendar-DwaliwOT.js";import"./X-CtmjSXSI.js";import"./shell-layout-BS8kK49C.js";import"./avatar-0hL3yrCP.js";import"./User01-BVO_HkGm.js";import"./Users03-cwI7BUN7.js";import"./SearchLg-H4wZo23j.js";import"./Stars02-Bbgws80K.js";import"./XClose-DqRQWsv_.js";import"./CheckCircle-qoB5WjsF.js";import"./FilterLines-CAURnmrQ.js";import"./required-auth-layout-CZjucmoK.js";import"./use-org-sso-DbQbqd6s.js";import"./index-ZwIDQEc7.js";import"./get-initials-D-f_fDFw.js";import"./SwitchHorizontal01-DuoaUzSR.js";import"./popover-B2rUNmI8.js";import"./use-registry-app-G2lUEiKw.js";import"./use-mcp-tools-DlrqSqti.js";import"./use-connection-CSo41aqn.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-BDzuTWDL.js";import"./mcp-oauth-BirVrg-4.js";import"./extract-connection-data-CHuTICVR.js";import"./metadata-dUsYcpuu.js";import"./use-members-DOMS00Vg.js";import"./use-org-auth-client-Bn-yYVPA.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./AlertCircle-CZ-QDeuV.js";import"./DotsVertical-BNei4o8j.js";import"./use-copy-C2ifJJog.js";import"./Check-Cm-_V5_R.js";import"./LinkExternal01-BjDRa_cY.js";import"./command-DuFMLmtV.js";import"./index-Cj8zKyTA.js";import"./ArrowRight-DXCmKdZa.js";import"./companions-core-A0v28i3B.js";import"./ZapSquare-DoDW54wp.js";import"./Star01-DjJLECJ6.js";import"./Image01-BZNccv_a.js";import"./Upload01-DO6RDELr.js";import"./form-BldCksIf.js";import"./label-Ci7V3Gkt.js";import"./select-DQR9EgBM.js";import"./tabs-up8r57Mg.js";import"./Tool02-CLezvx1y.js";import"./toggle-group-DVxLTEKO.js";import"./use-deco-credits-By5z-af9.js";import"./sidebar-J-j2IvV0.js";import"./LayoutLeft-CV0Fxhgi.js";import"./alert-dialog-Bkn1qxzY.js";import"./toolbar-icon-button-CaNHGM7W.js";import"./skeleton-CLzUXhtl.js";import"./github-repo-picker-C0elR76p.js";import"./use-debounced-value-2DbslpH9.js";import"./use-navigate-to-agent-BZlFQzeW.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./connection-card-DXsdz2sa.js";import"./use-registry-connections-CBy37-t1.js";import"./useInfiniteQuery-N6eM-XHg.js";import"./use-infinite-scroll-wD08Y4k3.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-C1Y2PSik.js";import"./integration-icon-vHbSUBpI.js";import"./textarea-BnZTZtW9.js";import"./connection-form-helpers-B_1XBoiA.js";import"./collection-tabs-DQVw_umI.js";import"./badge-C6prLIIE.js";import"./useSuspenseInfiniteQuery-BfUEzMvx.js";import"./Monitor01-Dli6tPiq.js";import"./connect-desktop-dialog-C2zkS_Sy.js";import"./select-model-dmuMEpkE.js";import"./checkbox-B5jLcRRn.js";import"./Key01-CVVLMWOk.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-D-bXes5G.js";import"./ArrowUpRight-vT3FCoIv.js";import"./Stars01-CzMjKMFi.js";import"./index-Cd8xwYGk.js";import"./Palette-Db-LKztJ.js";import"./file-type-icon-vDHix078.js";import"./toolbar--EPnc3B6.js";import"./Package-CPCNnWEf.js";import"./index-BHPm_dnn.js";import"./XCircle-CzwEjrla.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-_pExVJlU.js";import"./empty-state-DxRSZyKc.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-CS-NB1gC.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-uDmHSw0u.js";import"./Play-C4HMbYn8.js";import"./use-debounced-autosave-BXT-0ys5.js";import"./index-7q4rPo08.js";import"./search-input-CIJgMttt.js";import"./switch-BtGpgb3o.js";import"./Users01-CNhdJX4T.js";import"./use-secrets-BeZlwDXE.js";import"./useQueries-D82btylQ.js";import"./monaco-editor-Dji0kJXe.js";import"./use-file-configs-CHEcSIwu.js";import"./use-automations-B0Nno8_v.js";import"./automation-list-row-BBffEt-G.js";import"./Globe04-D3KfA03M.js";import"./HardDrive-CCwHa0Fy.js";import"./LogOut01-C38fwgKw.js";import"./Sun-B4mc9LiV.js";import"./Shield01-bNu8w9gG.js";import"./table-E-UvA1xv.js";import"./use-clock-tick-CeED7IqB.js";function zo(g){return g.schema?.definitions??g.schema?.$defs??{}}function Ho(g,e){const o=zo(e),d=o[btoa(g)];if(!d)return;let f=typeof d.image=="string"?d.image:void 0;if(!f&&Array.isArray(d.allOf)){const x=d.allOf.find(b=>typeof b.$ref=="string")?.$ref;if(typeof x=="string"){const b=x.replace("#/definitions/",""),m=o[b];f=typeof m?.image=="string"?m.image:void 0}}if(f?.includes("{{{"))return f}function Go(g,e){if(!e)return;const o=Ea(g);if(!o)return;const d=Ho(o.resolveType,e);if(!d)return;const f=ka(d,o.data);if(f)return Ra(f)}const Wo="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Uo="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function Fn(g){return Array.from({length:g},(e,o)=>({id:crypto.randomUUID(),index:o}))}function hs(g){return g.map((e,o)=>({...e,index:o}))}function qo(g,e){if(e===g.length)return g;if(e<g.length)return hs(g.slice(0,e));const o=Array.from({length:e-g.length},(d,f)=>({id:crypto.randomUUID(),index:g.length+f}));return[...g,...o]}function vs(g){const e=He.c(20),{section:o,raw:d,meta:f}=g,x=o.isSavedBlock===!0,b=o.isMultivariate===!0;let m;e[0]!==f||e[1]!==d?(m=d&&f?Go(d,f):void 0,e[0]=f,e[1]=d,e[2]=m):m=e[2];const h=m;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Vo,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=u):u=e[3];let y;e[4]!==h?(y=h&&n.jsx("img",{src:h,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=h,e[5]=y):y=e[5];let k;e[6]!==b||e[7]!==x?(k=x?{color:Da}:b?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=b,e[7]=x,e[8]=k):k=e[8];let D;e[9]!==k?(D=n.jsx(pn,{className:"h-4 w-4 shrink-0",style:k}),e[9]=k,e[10]=D):D=e[10];const E=o.isHidden&&"line-through opacity-50";let r;e[11]!==E?(r=Fe("min-w-0 flex-1 truncate text-sm font-medium",E),e[11]=E,e[12]=r):r=e[12];let p;e[13]!==o.label||e[14]!==r?(p=n.jsx("span",{className:r,children:o.label}),e[13]=o.label,e[14]=r,e[15]=p):p=e[15];let i;return e[16]!==y||e[17]!==D||e[18]!==p?(i=n.jsxs(n.Fragment,{children:[u,y,D,p]}),e[16]=y,e[17]=D,e[18]=p,e[19]=i):i=e[19],i}function Ss(g,e){const o=g.isSavedBlock===!0,d=g.isMultivariate===!0;return Fe("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?Wo:d?"text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Jo(g){const e=He.c(81),{section:o,raw:d,meta:f,sortableId:x,selected:b,onSelect:m,onDelete:h,onDuplicate:u,onMakeReusable:y,onToggleHidden:k,onToggleLazy:D,onAddVariant:E,onDetach:r}=g,p=rt(),i=d?Xn(d.__resolveType??""):!1;let P;e[0]!==o?(P=wa(o),e[0]=o,e[1]=P):P=e[1];const l=P;let R;e[2]!==x?(R={id:x,animateLayoutChanges:ei},e[2]=x,e[3]=R):R=e[3];const{attributes:A,listeners:z,setNodeRef:v,transform:C,isDragging:ie}=Zn(R);let L;e[4]!==C?(L=es.Transform.toString(C?{...C,x:0}:null),e[4]=C,e[5]=L):L=e[5];const ue=ie?0:void 0;let K;e[6]!==L||e[7]!==ue?(K={transform:L,opacity:ue},e[6]=L,e[7]=ue,e[8]=K):K=e[8];const ge=K;let B;e[9]!==o?(B=Va(o),e[9]=o,e[10]=B):B=e[10];const se=B,he="button",fe=0;let F;e[11]!==m?(F=G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),m())},e[11]=m,e[12]=F):F=e[12];const J=ie?"cursor-grabbing":"cursor-pointer";let X;e[13]!==o||e[14]!==b||e[15]!==J?(X=Fe("touch-none transition-colors",J,Ss(o,b)),e[13]=o,e[14]=b,e[15]=J,e[16]=X):X=e[16];let re;e[17]!==f||e[18]!==d||e[19]!==o?(re=n.jsx(vs,{section:o,raw:d,meta:f}),e[17]=f,e[18]=d,e[19]=o,e[20]=re):re=e[20];const O=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":p(i?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Fe("h-7 w-7 shrink-0",i?"":"opacity-0 group-hover:opacity-100"),onClick:G=>{G.stopPropagation(),D()},onPointerDown:Zo,children:n.jsx(To,{className:Fe("h-3.5 w-3.5",i&&"text-yellow-500")})})}),n.jsx(jt,{side:"bottom",children:p(i?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]});let Ke;e[21]!==k||e[22]!==o.isHidden||e[23]!==o.isMultivariate||e[24]!==p?(Ke=!o.isMultivariate&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":o.isHidden?p("sectionsEditor.sectionList.showSection"):p("sectionsEditor.sectionList.hideSection"),className:Fe("h-7 w-7 shrink-0",o.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:G=>{G.stopPropagation(),k()},onPointerDown:Xo,children:o.isHidden?n.jsx(No,{className:"h-3.5 w-3.5"}):n.jsx(Do,{className:"h-3.5 w-3.5"})})}),n.jsx(jt,{side:"bottom",children:o.isHidden?p("sectionsEditor.sectionList.showSection"):p("sectionsEditor.sectionList.hideSection")})]}),e[21]=k,e[22]=o.isHidden,e[23]=o.isMultivariate,e[24]=p,e[25]=Ke):Ke=e[25];let Z;e[26]!==p?(Z=p("sectionsEditor.sectionList.sectionActionsMenu"),e[26]=p,e[27]=Z):Z=e[27];let Le;e[28]===Symbol.for("react.memo_cache_sentinel")?(Le=n.jsx(rs,{className:"h-3.5 w-3.5"}),e[28]=Le):Le=e[28];let ve;e[29]!==Z?(ve=n.jsx(fs,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":Z,className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:Qo,onPointerDown:Yo,children:Le})}),e[29]=Z,e[30]=ve):ve=e[30];let de;e[31]!==u?(de=G=>{G.stopPropagation(),u()},e[31]=u,e[32]=de):de=e[32];let oe;e[33]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(us,{className:"h-4 w-4"}),e[33]=oe):oe=e[33];let ee;e[34]!==p?(ee=p("sectionsEditor.sectionList.duplicateMenuItem"),e[34]=p,e[35]=ee):ee=e[35];let le;e[36]!==de||e[37]!==ee?(le=n.jsxs(vt,{onClick:de,children:[oe,ee]}),e[36]=de,e[37]=ee,e[38]=le):le=e[38];let pe;e[39]!==l||e[40]!==E||e[41]!==p?(pe=l&&n.jsxs(vt,{className:Na,onClick:G=>{G.stopPropagation(),E()},children:[n.jsx(ds,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.addVariantMenuItem")]}),e[39]=l,e[40]=E,e[41]=p,e[42]=pe):pe=e[42];let ke;e[43]!==se||e[44]!==y||e[45]!==p?(ke=se&&n.jsxs(vt,{className:Uo,onClick:G=>{G.stopPropagation(),y()},children:[n.jsx(pn,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[43]=se,e[44]=y,e[45]=p,e[46]=ke):ke=e[46];let Re;e[47]!==r||e[48]!==o.isMultivariate||e[49]!==o.isSavedBlock||e[50]!==p?(Re=o.isSavedBlock===!0&&!o.isMultivariate&&n.jsxs(vt,{onClick:G=>{G.stopPropagation(),r()},children:[n.jsx(pn,{className:"h-4 w-4"}),p("sectionsEditor.sectionList.detachMenuItem")]}),e[47]=r,e[48]=o.isMultivariate,e[49]=o.isSavedBlock,e[50]=p,e[51]=Re):Re=e[51];let Se;e[52]!==h?(Se=G=>{G.stopPropagation(),h()},e[52]=h,e[53]=Se):Se=e[53];let De;e[54]===Symbol.for("react.memo_cache_sentinel")?(De=n.jsx(ms,{className:"h-4 w-4"}),e[54]=De):De=e[54];let _e;e[55]!==p?(_e=p("sectionsEditor.sectionList.deleteMenuItem"),e[55]=p,e[56]=_e):_e=e[56];let I;e[57]!==Se||e[58]!==_e?(I=n.jsxs(vt,{className:"text-destructive focus:text-destructive",onClick:Se,children:[De,_e]}),e[57]=Se,e[58]=_e,e[59]=I):I=e[59];let ce;e[60]!==le||e[61]!==pe||e[62]!==ke||e[63]!==Re||e[64]!==I?(ce=n.jsxs(ps,{align:"end",className:"w-44",children:[le,pe,ke,Re,I]}),e[60]=le,e[61]=pe,e[62]=ke,e[63]=Re,e[64]=I,e[65]=ce):ce=e[65];let je;e[66]!==ve||e[67]!==ce?(je=n.jsxs(gs,{children:[ve,ce]}),e[66]=ve,e[67]=ce,e[68]=je):je=e[68];let Te;return e[69]!==A||e[70]!==z||e[71]!==m||e[72]!==v||e[73]!==ge||e[74]!==X||e[75]!==re||e[76]!==O||e[77]!==Ke||e[78]!==je||e[79]!==F?(Te=n.jsxs("div",{ref:v,style:ge,...A,...z,role:he,tabIndex:fe,onClick:m,onKeyDown:F,className:X,children:[re,O,Ke,je]}),e[69]=A,e[70]=z,e[71]=m,e[72]=v,e[73]=ge,e[74]=X,e[75]=re,e[76]=O,e[77]=Ke,e[78]=je,e[79]=F,e[80]=Te):Te=e[80],Te}function Yo(g){return g.stopPropagation()}function Qo(g){return g.stopPropagation()}function Xo(g){return g.stopPropagation()}function Zo(g){return g.stopPropagation()}function ei(){return!1}function ti(g){const e=He.c(104),{listKey:o,rawSections:d,sections:f,meta:x,selectedIndex:b,onSelect:m,onReorder:h,onDelete:u,onDuplicate:y,onMakeReusable:k,onToggleHidden:D,onToggleLazy:E,onAddVariant:r,onDetach:p,onAddSection:i,canAddSection:P}=g,l=P===void 0?!0:P,R=rt();let A;e[0]!==f.length?(A=()=>Fn(f.length),e[0]=f.length,e[1]=A):A=e[1];const[z,v]=V.useState(A),[C,ie]=V.useState(null),[L,ue]=V.useState(o),[K,ge]=V.useState(f.length),B=V.useRef(!1);L!==o?(ue(o),ge(f.length),v(Fn(f.length))):K!==f.length&&(ge(f.length),v(Ie=>qo(Ie,f.length)));let se;e[2]===Symbol.for("react.memo_cache_sentinel")?(se={activationConstraint:{distance:8}},e[2]=se):se=e[2];let he;e[3]===Symbol.for("react.memo_cache_sentinel")?(he={coordinateGetter:ts},e[3]=he):he=e[3];const fe=Un(Yt(Qn,se),Yt(Yn,he));let F;e[4]!==z?(F=z.map(ni),e[4]=z,e[5]=F):F=e[5];const J=F;let X;e[6]===Symbol.for("react.memo_cache_sentinel")?(X=Ie=>{ie(String(Ie.active.id))},e[6]=X):X=e[6];const re=X;let O;e[7]!==J||e[8]!==h?(O=Ie=>{ie(null);const{active:N,over:ae}=Ie;if(!ae||N.id===ae.id)return;const $=J.indexOf(String(N.id)),Xe=J.indexOf(String(ae.id));$===-1||Xe===-1||(v(et=>hs(At([...et],$,Xe))),B.current=!0,requestAnimationFrame(()=>{B.current=!1}),h?.($,Xe))},e[7]=J,e[8]=h,e[9]=O):O=e[9];const Ke=O;let Z;e[10]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{ie(null)},e[10]=Z):Z=e[10];const Le=Z;let ve,de,oe,ee,le,pe,ke,Re,Se,De,_e,I,ce,je,Te;if(e[11]!==C||e[12]!==l||e[13]!==z||e[14]!==J||e[15]!==Ke||e[16]!==x||e[17]!==i||e[18]!==r||e[19]!==u||e[20]!==p||e[21]!==y||e[22]!==k||e[23]!==m||e[24]!==D||e[25]!==E||e[26]!==d||e[27]!==f||e[28]!==b||e[29]!==fe||e[30]!==R){je=Symbol.for("react.early_return_sentinel");e:{const Ie=N=>{B.current||m(N)};if(e[46]!==C||e[47]!==l||e[48]!==z||e[49]!==i||e[50]!==d||e[51]!==f||e[52]!==R){const N=C?z.find(ae=>ae.id===C):null;if(ee=N!=null?f[N.index]:null,oe=N!=null?d[N.index]:void 0,z.length===0){let ae;e[56]!==R?(ae=R("sectionsEditor.sectionList.noSections"),e[56]=R,e[57]=ae):ae=e[57];let $;e[58]!==ae?($=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:ae}),e[58]=ae,e[59]=$):$=e[59];const Xe=!l;let et;e[60]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(gn,{size:14}),e[60]=et):et=e[60];let lt;e[61]!==R?(lt=R("sectionsEditor.sectionList.addSectionButton"),e[61]=R,e[62]=lt):lt=e[62];let ct;e[63]!==i||e[64]!==Xe||e[65]!==lt?(ct=n.jsxs(Je,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Xe,onClick:i,children:[et,lt]}),e[63]=i,e[64]=Xe,e[65]=lt,e[66]=ct):ct=e[66];let ut;e[67]!==$||e[68]!==ct?(ut=n.jsxs("div",{className:"space-y-2",children:[$,ct]}),e[67]=$,e[68]=ct,e[69]=ut):ut=e[69],je=ut;break e}ce=Fe(N&&"cursor-grabbing"),e[46]=C,e[47]=l,e[48]=z,e[49]=i,e[50]=d,e[51]=f,e[52]=R,e[53]=oe,e[54]=ee,e[55]=ce}else oe=e[53],ee=e[54],ce=e[55];de=ns,Re=fe,Se=ss,De=re,_e=Ke,I=Le,ve=as,pe=J,ke=os,Te="space-y-1",le=z.map(N=>{const ae=f[N.index];return ae?n.jsx(Jo,{sortableId:N.id,section:ae,raw:d[N.index],meta:x,selected:b===N.index,onSelect:()=>Ie(N.index),onDelete:()=>u(N.index),onDuplicate:()=>y(N.index),onMakeReusable:()=>k(N.index),onToggleHidden:()=>D(N.index),onToggleLazy:()=>E(N.index),onAddVariant:()=>r(N.index),onDetach:()=>p(N.index)},N.id):null})}e[11]=C,e[12]=l,e[13]=z,e[14]=J,e[15]=Ke,e[16]=x,e[17]=i,e[18]=r,e[19]=u,e[20]=p,e[21]=y,e[22]=k,e[23]=m,e[24]=D,e[25]=E,e[26]=d,e[27]=f,e[28]=b,e[29]=fe,e[30]=R,e[31]=ve,e[32]=de,e[33]=oe,e[34]=ee,e[35]=le,e[36]=pe,e[37]=ke,e[38]=Re,e[39]=Se,e[40]=De,e[41]=_e,e[42]=I,e[43]=ce,e[44]=je,e[45]=Te}else ve=e[31],de=e[32],oe=e[33],ee=e[34],le=e[35],pe=e[36],ke=e[37],Re=e[38],Se=e[39],De=e[40],_e=e[41],I=e[42],ce=e[43],je=e[44],Te=e[45];if(je!==Symbol.for("react.early_return_sentinel"))return je;let G;e[70]!==le||e[71]!==Te?(G=n.jsx("div",{className:Te,children:le}),e[70]=le,e[71]=Te,e[72]=G):G=e[72];let Ae;e[73]!==ve||e[74]!==pe||e[75]!==ke||e[76]!==G?(Ae=n.jsx(ve,{items:pe,strategy:ke,children:G}),e[73]=ve,e[74]=pe,e[75]=ke,e[76]=G,e[77]=Ae):Ae=e[77];let Oe;e[78]!==oe||e[79]!==ee||e[80]!==x?(Oe=ee?n.jsx("div",{className:Fe("cursor-grabbing shadow-lg ring-1 ring-border/60",Ss(ee,!1)),children:n.jsx(vs,{section:ee,raw:oe,meta:x})}):null,e[78]=oe,e[79]=ee,e[80]=x,e[81]=Oe):Oe=e[81];let ze;e[82]!==Oe?(ze=Gn.createPortal(n.jsx(qn,{dropAnimation:Jn,children:Oe}),document.body),e[82]=Oe,e[83]=ze):ze=e[83];let Be;e[84]!==de||e[85]!==Re||e[86]!==Se||e[87]!==De||e[88]!==_e||e[89]!==I||e[90]!==Ae||e[91]!==ze?(Be=n.jsxs(de,{sensors:Re,collisionDetection:Se,onDragStart:De,onDragEnd:_e,onDragCancel:I,children:[Ae,ze]}),e[84]=de,e[85]=Re,e[86]=Se,e[87]=De,e[88]=_e,e[89]=I,e[90]=Ae,e[91]=ze,e[92]=Be):Be=e[92];const xe=!l;let we;e[93]===Symbol.for("react.memo_cache_sentinel")?(we=n.jsx(gn,{size:14}),e[93]=we):we=e[93];let be;e[94]!==R?(be=R("sectionsEditor.sectionList.addSectionButton"),e[94]=R,e[95]=be):be=e[95];let te;e[96]!==i||e[97]!==xe||e[98]!==be?(te=n.jsxs(Je,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:xe,onClick:i,children:[we,be]}),e[96]=i,e[97]=xe,e[98]=be,e[99]=te):te=e[99];let me;return e[100]!==ce||e[101]!==Be||e[102]!==te?(me=n.jsxs("div",{className:ce,children:[Be,te]}),e[100]=ce,e[101]=Be,e[102]=te,e[103]=me):me=e[103],me}function ni(g){return g.id}function On(g){const e=He.c(57),{open:o,initialName:d,autoLabel:f,isPending:x,onSubmit:b,onOpenChange:m}=g,h=x===void 0?!1:x,u=rt(),[y,k]=V.useState(d),[D,E]=V.useState(o);o!==D&&(E(o),o&&k(d));let r;e[0]!==h||e[1]!==m?(r=re=>{!re&&!h&&m(!1)},e[0]=h,e[1]=m,e[2]=r):r=e[2];const p=r;let i;e[3]!==h||e[4]!==y||e[5]!==b?(i=async re=>{re.preventDefault(),!h&&await b(y.trim())},e[3]=h,e[4]=y,e[5]=b,e[6]=i):i=e[6];const P=i;let l;e[7]!==u?(l=u("sectionsEditor.variantRenameDialog.title"),e[7]=u,e[8]=l):l=e[8];let R;e[9]!==l?(R=n.jsx(yo,{children:l}),e[9]=l,e[10]=R):R=e[10];let A;e[11]!==f||e[12]!==u?(A=u("sectionsEditor.variantRenameDialog.description",{fallback:f||u("sectionsEditor.variantRenameDialog.defaultFallback")}),e[11]=f,e[12]=u,e[13]=A):A=e[13];let z;e[14]!==A?(z=n.jsx(_o,{children:A}),e[14]=A,e[15]=z):z=e[15];let v;e[16]!==R||e[17]!==z?(v=n.jsxs(jo,{children:[R,z]}),e[16]=R,e[17]=z,e[18]=v):v=e[18];let C;e[19]!==u?(C=u("sectionsEditor.variantRenameDialog.nameLabel"),e[19]=u,e[20]=C):C=e[20];let ie;e[21]!==C?(ie=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:C}),e[21]=C,e[22]=ie):ie=e[22];let L;e[23]===Symbol.for("react.memo_cache_sentinel")?(L=re=>k(re.target.value),e[23]=L):L=e[23];let ue;e[24]!==f||e[25]!==h||e[26]!==y?(ue=n.jsx(wo,{id:"variant-rename-name",value:y,onChange:L,placeholder:f,autoFocus:!0,disabled:h}),e[24]=f,e[25]=h,e[26]=y,e[27]=ue):ue=e[27];let K;e[28]!==ie||e[29]!==ue?(K=n.jsxs("div",{className:"space-y-1.5 py-4",children:[ie,ue]}),e[28]=ie,e[29]=ue,e[30]=K):K=e[30];let ge;e[31]!==m?(ge=()=>m(!1),e[31]=m,e[32]=ge):ge=e[32];let B;e[33]!==u?(B=u("sectionsEditor.variantRenameDialog.cancel"),e[33]=u,e[34]=B):B=e[34];let se;e[35]!==h||e[36]!==ge||e[37]!==B?(se=n.jsx(Je,{type:"button",variant:"outline",onClick:ge,disabled:h,children:B}),e[35]=h,e[36]=ge,e[37]=B,e[38]=se):se=e[38];let he;e[39]!==h||e[40]!==u?(he=h?n.jsxs(n.Fragment,{children:[n.jsx(Wn,{size:14,className:"animate-spin"}),u("sectionsEditor.variantRenameDialog.saving")]}):u("sectionsEditor.variantRenameDialog.save"),e[39]=h,e[40]=u,e[41]=he):he=e[41];let fe;e[42]!==h||e[43]!==he?(fe=n.jsx(Je,{type:"submit",disabled:h,children:he}),e[42]=h,e[43]=he,e[44]=fe):fe=e[44];let F;e[45]!==se||e[46]!==fe?(F=n.jsxs(Eo,{children:[se,fe]}),e[45]=se,e[46]=fe,e[47]=F):F=e[47];let J;e[48]!==P||e[49]!==K||e[50]!==F||e[51]!==v?(J=n.jsx(ko,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:P,children:[v,K,F]})}),e[48]=P,e[49]=K,e[50]=F,e[51]=v,e[52]=J):J=e[52];let X;return e[53]!==p||e[54]!==o||e[55]!==J?(X=n.jsx(Ro,{open:o,onOpenChange:p,children:J}),e[53]=p,e[54]=o,e[55]=J,e[56]=X):X=e[56],X}const si="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]",xs="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.2)]";function bs(g){const e=He.c(5),{rule:o,matchers:d}=g,f=o?.__resolveType??"";let x;if(e[0]!==d||e[1]!==f){const u=d.find(y=>y.resolveType===f)?.iconName??Ta(f);x=ho(u),e[0]=d,e[1]=f,e[2]=x}else x=e[2];const b=x;if(!b)return null;let m;return e[3]!==b?(m=n.jsx(b,{size:14,className:"shrink-0"}),e[3]=b,e[4]=m):m=e[4],m}function In(g){return g.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
2
2
  `)}function fn(g){return g.map((e,o)=>({id:crypto.randomUUID(),index:o,variant:e}))}function ai(g){return g.map((e,o)=>({...e,index:o}))}function ys(g){const e=He.c(17),{label:o,effectiveRule:d,matchers:f,canDelete:x,dragging:b,onRename:m,onDuplicate:h,onDelete:u}=g,y=rt();let k;e[0]!==d||e[1]!==f?(k=n.jsx(bs,{rule:d,matchers:f}),e[0]=d,e[1]=f,e[2]=k):k=e[2];let D;e[3]!==o?(D=n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:o}),e[3]=o,e[4]=D):D=e[4];let E;e[5]!==x||e[6]!==b||e[7]!==o||e[8]!==u||e[9]!==h||e[10]!==m||e[11]!==y?(E=!b&&n.jsxs(gs,{children:[n.jsx(fs,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":y("sectionsEditor.pageVariantTabs.actionsAriaLabel",{label:o}),className:"size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",onClick:ii,onPointerDown:oi,children:n.jsx(rs,{size:14})})}),n.jsxs(ps,{align:"end",className:"w-36",children:[n.jsxs(vt,{onClick:p=>{p.stopPropagation(),m?.()},children:[n.jsx(Io,{size:14}),y("sectionsEditor.pageVariantTabs.renameAction")]}),n.jsxs(vt,{onClick:p=>{p.stopPropagation(),h?.()},children:[n.jsx(us,{size:14}),y("sectionsEditor.pageVariantTabs.duplicateAction")]}),n.jsx(Po,{}),n.jsxs(vt,{variant:"destructive",disabled:!x,onClick:p=>{p.stopPropagation(),u?.()},children:[n.jsx(ms,{size:14}),y("sectionsEditor.pageVariantTabs.deleteAction")]})]})]}),e[5]=x,e[6]=b,e[7]=o,e[8]=u,e[9]=h,e[10]=m,e[11]=y,e[12]=E):E=e[12];let r;return e[13]!==k||e[14]!==D||e[15]!==E?(r=n.jsxs(n.Fragment,{children:[k,D,E]}),e[13]=k,e[14]=D,e[15]=E,e[16]=r):r=e[16],r}function oi(g){return g.stopPropagation()}function ii(g){return g.stopPropagation()}function ri(g){const e=He.c(33),{entry:o,sortableId:d,isActive:f,canDelete:x,decofile:b,meta:m,matchers:h,onSelect:u,onRename:y,onDuplicate:k,onDelete:D}=g;let E;e[0]!==d?(E={id:d,animateLayoutChanges:li},e[0]=d,e[1]=E):E=e[1];const{attributes:r,listeners:p,setNodeRef:i,transform:P,isDragging:l}=Zn(E);let R;e[2]!==P?(R=es.Transform.toString(P?{...P,x:0}:null),e[2]=P,e[3]=R):R=e[3];const A=l?0:void 0;let z;e[4]!==R||e[5]!==A?(z={transform:R,opacity:A},e[4]=R,e[5]=A,e[6]=z):z=e[6];const v=z,C=m??void 0;let ie;e[7]!==b||e[8]!==o.variant.rule||e[9]!==C?(ie=Mt(o.variant.rule,b,C),e[7]=b,e[8]=o.variant.rule,e[9]=C,e[10]=ie):ie=e[10];const L=ie;let ue;e[11]!==u?(ue=fe=>{fe.target===fe.currentTarget&&(fe.key==="Enter"||fe.key===" ")&&(fe.preventDefault(),u())},e[11]=u,e[12]=ue):ue=e[12];const K=l?"cursor-grabbing":"cursor-pointer active:cursor-grabbing",ge=f?xs:si;let B;e[13]!==K||e[14]!==ge?(B=Fe("group flex select-none items-center gap-2 rounded-md px-2 py-2.5 transition-colors touch-none",K,ge),e[13]=K,e[14]=ge,e[15]=B):B=e[15];let se;e[16]!==x||e[17]!==L||e[18]!==o.variant.label||e[19]!==h||e[20]!==D||e[21]!==k||e[22]!==y?(se=n.jsx(ys,{label:o.variant.label,effectiveRule:L,matchers:h,canDelete:x,onRename:y,onDuplicate:k,onDelete:D}),e[16]=x,e[17]=L,e[18]=o.variant.label,e[19]=h,e[20]=D,e[21]=k,e[22]=y,e[23]=se):se=e[23];let he;return e[24]!==r||e[25]!==p||e[26]!==u||e[27]!==i||e[28]!==v||e[29]!==B||e[30]!==se||e[31]!==ue?(he=n.jsx("div",{ref:i,style:v,...r,...p,onClick:u,onKeyDown:ue,className:B,children:se}),e[24]=r,e[25]=p,e[26]=u,e[27]=i,e[28]=v,e[29]=B,e[30]=se,e[31]=ue,e[32]=he):he=e[32],he}function li(){return!1}function ci(g){const e=He.c(9),{variant:o,decofile:d,meta:f,matchers:x}=g,b=f??void 0;let m;e[0]!==d||e[1]!==b||e[2]!==o.rule?(m=Mt(o.rule,d,b),e[0]=d,e[1]=b,e[2]=o.rule,e[3]=m):m=e[3];const h=m;let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=Fe("flex items-center gap-2 rounded-md px-2 py-2.5 shadow-lg ring-1 ring-border/60 cursor-grabbing",xs),e[4]=u):u=e[4];let y;return e[5]!==h||e[6]!==x||e[7]!==o.label?(y=n.jsx("div",{className:u,children:n.jsx(ys,{label:o.label,effectiveRule:h,matchers:x,canDelete:!1,dragging:!0})}),e[5]=h,e[6]=x,e[7]=o.label,e[8]=y):y=e[8],y}function ui(g){const e=He.c(91),{listKey:o,variants:d,activeIndex:f,decofile:x,meta:b,matchers:m,onSelect:h,onReorder:u,onRename:y,onDuplicate:k,onDelete:D,onAdd:E}=g,r=rt();let p;e[0]!==d?(p=()=>fn(d),e[0]=d,e[1]=p):p=e[1];const[i,P]=V.useState(p),[l,R]=V.useState(null),[A,z]=V.useState(o),[v,C]=V.useState(d.length);let ie;e[2]!==d?(ie=()=>In(d),e[2]=d,e[3]=ie):ie=e[3];const[L,ue]=V.useState(ie),K=V.useRef(!1),ge=In(d);A!==o?(z(o),C(d.length),ue(ge),P(fn(d))):v!==d.length?(C(d.length),ue(ge),P(fn(d))):L!==ge&&(ue(ge),P(Be=>d.map((xe,we)=>({id:Be[we]?.id??crypto.randomUUID(),index:we,variant:xe}))));let B;e[4]===Symbol.for("react.memo_cache_sentinel")?(B={activationConstraint:{distance:8}},e[4]=B):B=e[4];let se;e[5]===Symbol.for("react.memo_cache_sentinel")?(se={coordinateGetter:ts},e[5]=se):se=e[5];const he=Un(Yt(Qn,B),Yt(Yn,se));let fe;e[6]!==i?(fe=i.map(di),e[6]=i,e[7]=fe):fe=e[7];const F=fe,J=d.length>1;let X;e[8]!==i?(X=Be=>{const xe=String(Be.active.id);R(i.find(we=>we.id===xe)??null)},e[8]=i,e[9]=X):X=e[9];const re=X;let O;e[10]!==F||e[11]!==u?(O=Be=>{R(null);const{active:xe,over:we}=Be;if(!we||xe.id===we.id)return;const be=F.indexOf(String(xe.id)),te=F.indexOf(String(we.id));be===-1||te===-1||(P(me=>ai(At([...me],be,te))),K.current=!0,requestAnimationFrame(()=>{K.current=!1}),u(be,te))},e[10]=F,e[11]=u,e[12]=O):O=e[12];const Ke=O;let Z;e[13]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{R(null)},e[13]=Z):Z=e[13];const Le=Z;let ve,de,oe,ee,le,pe,ke,Re,Se,De,_e,I,ce;if(e[14]!==f||e[15]!==J||e[16]!==x||e[17]!==i||e[18]!==F||e[19]!==Ke||e[20]!==re||e[21]!==m||e[22]!==b||e[23]!==E||e[24]!==D||e[25]!==k||e[26]!==y||e[27]!==h||e[28]!==he||e[29]!==r){const Be=$=>{K.current||h($)};_e="space-y-1 border-b p-2";let xe;e[43]!==r?(xe=r("sectionsEditor.pageVariantTabs.variantsLabel"),e[43]=r,e[44]=xe):xe=e[44];let we;e[45]!==xe?(we=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:xe}),e[45]=xe,e[46]=we):we=e[46];let be;e[47]!==r?(be=r("sectionsEditor.pageVariantTabs.addVariantAriaLabel"),e[47]=r,e[48]=be):be=e[48];let te;e[49]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(gn,{size:14}),e[49]=te):te=e[49];let me;e[50]!==E||e[51]!==be?(me=n.jsx(_t,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":be,className:"size-6",onClick:E,children:te})}),e[50]=E,e[51]=be,e[52]=me):me=e[52];let Ie;e[53]!==r?(Ie=r("sectionsEditor.pageVariantTabs.addVariantTooltip"),e[53]=r,e[54]=Ie):Ie=e[54];let N;e[55]!==Ie?(N=n.jsx(jt,{children:Ie}),e[55]=Ie,e[56]=N):N=e[56];let ae;e[57]!==me||e[58]!==N?(ae=n.jsxs(yt,{children:[me,N]}),e[57]=me,e[58]=N,e[59]=ae):ae=e[59],e[60]!==we||e[61]!==ae?(I=n.jsxs("div",{className:"flex items-center justify-between",children:[we,ae]}),e[60]=we,e[61]=ae,e[62]=I):I=e[62],de=ns,pe=he,ke=ss,Re=re,Se=Ke,De=Le,ve=as,ee=F,le=os,ce="space-y-0.5",oe=i.map($=>n.jsx(ri,{sortableId:$.id,entry:$,isActive:$.index===f,canDelete:J,decofile:x,meta:b,matchers:m,onSelect:()=>Be($.index),onRename:()=>y($.index),onDuplicate:()=>k($.index),onDelete:()=>D($.index)},$.id)),e[14]=f,e[15]=J,e[16]=x,e[17]=i,e[18]=F,e[19]=Ke,e[20]=re,e[21]=m,e[22]=b,e[23]=E,e[24]=D,e[25]=k,e[26]=y,e[27]=h,e[28]=he,e[29]=r,e[30]=ve,e[31]=de,e[32]=oe,e[33]=ee,e[34]=le,e[35]=pe,e[36]=ke,e[37]=Re,e[38]=Se,e[39]=De,e[40]=_e,e[41]=I,e[42]=ce}else ve=e[30],de=e[31],oe=e[32],ee=e[33],le=e[34],pe=e[35],ke=e[36],Re=e[37],Se=e[38],De=e[39],_e=e[40],I=e[41],ce=e[42];let je;e[63]!==oe||e[64]!==ce?(je=n.jsx("div",{className:ce,children:oe}),e[63]=oe,e[64]=ce,e[65]=je):je=e[65];let Te;e[66]!==ve||e[67]!==ee||e[68]!==le||e[69]!==je?(Te=n.jsx(ve,{items:ee,strategy:le,children:je}),e[66]=ve,e[67]=ee,e[68]=le,e[69]=je,e[70]=Te):Te=e[70];let G;e[71]!==l||e[72]!==x||e[73]!==m||e[74]!==b?(G=l?n.jsx(ci,{variant:l.variant,decofile:x,meta:b,matchers:m}):null,e[71]=l,e[72]=x,e[73]=m,e[74]=b,e[75]=G):G=e[75];let Ae;e[76]!==G?(Ae=Gn.createPortal(n.jsx(qn,{dropAnimation:Jn,children:G}),document.body),e[76]=G,e[77]=Ae):Ae=e[77];let Oe;e[78]!==de||e[79]!==pe||e[80]!==ke||e[81]!==Re||e[82]!==Se||e[83]!==De||e[84]!==Te||e[85]!==Ae?(Oe=n.jsxs(de,{sensors:pe,collisionDetection:ke,onDragStart:Re,onDragEnd:Se,onDragCancel:De,children:[Te,Ae]}),e[78]=de,e[79]=pe,e[80]=ke,e[81]=Re,e[82]=Se,e[83]=De,e[84]=Te,e[85]=Ae,e[86]=Oe):Oe=e[86];let ze;return e[87]!==_e||e[88]!==I||e[89]!==Oe?(ze=n.jsxs("div",{className:_e,children:[I,Oe]}),e[87]=_e,e[88]=I,e[89]=Oe,e[90]=ze):ze=e[90],ze}function di(g){return g.id}function mi(g){const e=He.c(16),{schema:o,value:d,onChange:f,meta:x,decofile:b,onSaveReferencedBlock:m,sandbox:h}=g,u=rt();let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0];const[k,D]=V.useState(y);let E;e[1]!==k||e[2]!==u?(E=k.length>0&&n.jsxs("nav",{"aria-label":u("sectionsEditor.sectionsEditorPanels.variantRuleBreadcrumb"),className:"flex min-w-0 items-center gap-1 overflow-hidden text-xs",children:[n.jsx("button",{type:"button",onClick:()=>D([]),className:"flex shrink-0 items-center gap-0.5 rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",title:u("sectionsEditor.sectionsEditorPanels.backToRule"),children:n.jsx(ls,{className:"size-3.5"})}),k.map((i,P)=>{const l=P===k.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[P>0&&n.jsx(cs,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>D(k.slice(0,P+1)),title:i,className:Fe("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",l?"font-medium text-foreground":"text-muted-foreground"),children:i})]},`${i}-${P}`)})]}),e[1]=k,e[2]=u,e[3]=E):E=e[3];let r;e[4]!==k||e[5]!==b||e[6]!==x||e[7]!==f||e[8]!==m||e[9]!==h||e[10]!==o||e[11]!==d?(r=n.jsx(is,{schema:o,value:d,onChange:f,basePath:"",breadcrumbPath:k,onBreadcrumbChange:D,meta:x,decofile:b,onSaveReferencedBlock:m,sandbox:h}),e[4]=k,e[5]=b,e[6]=x,e[7]=f,e[8]=m,e[9]=h,e[10]=o,e[11]=d,e[12]=r):r=e[12];let p;return e[13]!==E||e[14]!==r?(p=n.jsxs("div",{className:"space-y-2",children:[E,r]}),e[13]=E,e[14]=r,e[15]=p):p=e[15],p}function $n(g){const e=He.c(21),{activeSchema:o,formValue:d,formResetKey:f,onFormChange:x,onBreadcrumbChange:b,breadcrumbPath:m,emptyMessage:h,beforeForm:u,seoResolveType:y,siteDefaultSeo:k,meta:D,decofile:E,onSaveReferencedBlock:r,sandbox:p}=g;let i;e[0]!==m?(i=m===void 0?[]:m,e[0]=m,e[1]=i):i=e[1];const P=i;let l;e[2]!==o||e[3]!==P||e[4]!==E||e[5]!==f||e[6]!==d||e[7]!==D||e[8]!==b||e[9]!==x||e[10]!==r||e[11]!==p||e[12]!==y||e[13]!==k?(l=o&&d?y?n.jsx(Co,{schema:o,resolveType:y,value:d,formResetKey:f,onChange:x,onBreadcrumbChange:b,siteDefaultSeo:k}):n.jsx(is,{schema:o,value:d,onChange:x,basePath:"",breadcrumbPath:P,onBreadcrumbChange:b,meta:D,decofile:E,onSaveReferencedBlock:r,sandbox:p},f):null,e[2]=o,e[3]=P,e[4]=E,e[5]=f,e[6]=d,e[7]=D,e[8]=b,e[9]=x,e[10]=r,e[11]=p,e[12]=y,e[13]=k,e[14]=l):l=e[14];const R=l;let A;e[15]!==h||e[16]!==R?(A=R??n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:h}),e[15]=h,e[16]=R,e[17]=A):A=e[17];let z;return e[18]!==u||e[19]!==A?(z=n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsxs("div",{className:"mx-auto max-w-2xl",children:[u,A]})}),e[18]=u,e[19]=A,e[20]=z):z=e[20],z}const fi="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function pi(g,e){return Pa(g,e,it)}function gi(g){const e=He.c(19),{pageKey:o,initialName:d,initialPath:f,onFieldChange:x}=g,b=rt(),[m,h]=V.useState(d),[u,y]=V.useState(f),[k,D]=V.useState(o);k!==o&&(D(o),h(d),y(f));let E;e[0]!==x?(E=A=>{h(A.target.value),x("name",A.target.value)},e[0]=x,e[1]=E):E=e[1];let r;e[2]!==b?(r=b("sectionsEditor.sectionsEditorPanels.pageNamePlaceholder"),e[2]=b,e[3]=r):r=e[3];let p;e[4]!==m||e[5]!==E||e[6]!==r?(p=n.jsx("input",{type:"text",value:m,onChange:E,className:"w-full bg-transparent text-sm font-semibold truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:r}),e[4]=m,e[5]=E,e[6]=r,e[7]=p):p=e[7];let i;e[8]!==x?(i=A=>{y(A.target.value),x("path",A.target.value)},e[8]=x,e[9]=i):i=e[9];let P;e[10]!==b?(P=b("sectionsEditor.sectionsEditorPanels.pathPlaceholder"),e[10]=b,e[11]=P):P=e[11];let l;e[12]!==u||e[13]!==i||e[14]!==P?(l=n.jsx("input",{type:"text",value:u,onChange:i,className:"w-full bg-transparent text-xs text-muted-foreground truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:P}),e[12]=u,e[13]=i,e[14]=P,e[15]=l):l=e[15];let R;return e[16]!==p||e[17]!==l?(R=n.jsxs("div",{className:"space-y-1",children:[p,l]}),e[16]=p,e[17]=l,e[18]=R):R=e[18],R}function zn(g){const e=He.c(13),{onClick:o}=g,d=rt();let f;e[0]!==d?(f=d("sectionsEditor.sectionsEditorPanels.addVariant"),e[0]=d,e[1]=f):f=e[1];let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(ds,{size:14}),e[2]=x):x=e[2];let b;e[3]!==o||e[4]!==f?(b=n.jsx(_t,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":f,className:"size-7 shrink-0 text-[oklch(0.65_0.15_160)]",onClick:o,children:x})}),e[3]=o,e[4]=f,e[5]=b):b=e[5];let m;e[6]!==d?(m=d("sectionsEditor.sectionsEditorPanels.addVariant"),e[6]=d,e[7]=m):m=e[7];let h;e[8]!==m?(h=n.jsx(jt,{side:"bottom",children:m}),e[8]=m,e[9]=h):h=e[9];let u;return e[10]!==b||e[11]!==h?(u=n.jsxs(yt,{children:[b,h]}),e[10]=b,e[11]=h,e[12]=u):u=e[12],u}function Hn(g){const e=He.c(21),{currentRt:o,currentLabel:d,currentGlobalKey:f,matchers:x,globals:b,onSelect:m,onSelectGlobal:h,schema:u,formValue:y,onChange:k,formKey:D,formWrapperClassName:E,meta:r,decofile:p,onSaveReferencedBlock:i,sandbox:P}=g;let l;e[0]!==f||e[1]!==d||e[2]!==o||e[3]!==b||e[4]!==x||e[5]!==m||e[6]!==h?(l=n.jsx(Ca,{currentRt:o,currentLabel:d,currentGlobalKey:f,matchers:x,globals:b,onSelect:m,onSelectGlobal:h}),e[0]=f,e[1]=d,e[2]=o,e[3]=b,e[4]=x,e[5]=m,e[6]=h,e[7]=l):l=e[7];let R;e[8]!==p||e[9]!==D||e[10]!==y||e[11]!==E||e[12]!==r||e[13]!==k||e[14]!==i||e[15]!==P||e[16]!==u?(R=u&&y&&n.jsx("div",{className:E,children:n.jsx(mi,{schema:u,value:y,onChange:k,meta:r,decofile:p,onSaveReferencedBlock:i,sandbox:P},D)}),e[8]=p,e[9]=D,e[10]=y,e[11]=E,e[12]=r,e[13]=k,e[14]=i,e[15]=P,e[16]=u,e[17]=R):R=e[17];let A;return e[18]!==l||e[19]!==R?(A=n.jsxs(n.Fragment,{children:[l,R]}),e[18]=l,e[19]=R,e[20]=A):A=e[20],A}function fc({orgSlug:g,virtualMcpId:e,branch:o,previewReady:d=!0,previewUrl:f,currentPath:x,activePageBlockKey:b=null,activeGlobalBlockKey:m=null,externalSelectedIndex:h,onSaved:u,initialEditSeo:y=!1,onExitSeo:k,onViewJsonFile:D,onVariantPreviewOverride:E}){const r=rt(),p=d?{orgSlug:g,virtualMcpId:e,branch:o,previewUrl:f}:null,{data:i,isLoading:P}=Aa(p),{data:l,isLoading:R}=Ma(p),A=Ka(),z=A?.entity?.id===e?A.entity.metadata?.siteSlug??null:null,[v,C]=V.useState(null),[ie,L]=V.useState(null),[ue,K]=V.useState(null),[ge,B]=V.useState(0),[se,he]=V.useState(void 0),[fe,F]=V.useState(null),[J,X]=V.useState(null),[re,O]=V.useState([]),[Ke,Z]=V.useState(0),[Le,ve]=V.useState(null),[de,oe]=V.useState(null),[ee,le]=V.useState(null),[pe,ke]=V.useState(!0),[Re,Se]=V.useState(!1),[De,_e]=V.useState(!1),[I,ce]=V.useState(y),[je,Te]=V.useState(y);y&&!je&&(Te(!0),ce(!0),C(null),L(null),K(null),O([])),!y&&je&&Te(!1);const[G,Ae]=V.useState(null),[Oe,ze]=V.useState(void 0),[Be,xe]=V.useState([]),[we,be]=V.useState(0),[te,me]=V.useState(0),[Ie,N]=V.useState(null),[ae,$]=V.useState(null),[Xe,et]=V.useState(null),lt=_a(),ct=`${g}/${e}/${o}`,ut=La({orgSlug:g,virtualMcpId:e,branch:o}),[_s,js]=V.useState(x),[Es,ks]=V.useState(b),[Rs,ws]=V.useState(m);(_s!==x||Es!==b||Rs!==m)&&(queueMicrotask(()=>ut.flush()),js(x),ks(b),ws(m),C(null),L(null),K(null),B(0),F(null),X(null),me(0),N(null),$(null),O([]),Z(t=>t+1),ce(!1),Ae(null),ze(void 0),xe([]),be(t=>t+1));const Ve=Ba({orgSlug:g,virtualMcpId:e,branch:o}),Kt=so((t,s)=>{Ve.mutate({blockKey:t,data:s},{onSuccess:()=>u?.(),onError:a=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:a.message}))})}),Qt=Fa({orgSlug:g,virtualMcpId:e,branch:o}),[Nt,Lt]=V.useState(!1),We=V.useRef(null),tt=V.useRef(null),nt=V.useRef(null),Xt=V.useRef({}),Ye=V.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null});if(!d||P||R)return n.jsx("div",{className:"h-full w-full flex items-center justify-center",children:n.jsx(Wn,{size:20,className:"animate-spin text-muted-foreground"})});if(!i||!l)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:r("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Vs=Oa(i),Ne=!!m,Ge=Ne?null:Ia(Vs,x,b),w=Ne?m:Ge?.key??null,Zt=Ne&&m?i[m]:void 0,hn=Ne&&m&&Zt?$a(m,Zt):Ne&&m?m:"",Bt=!Ne&&w&&i[w]?i[w]:null,en=I&&i&&l&&w&&Ge?Bn(i,{kind:"page",pageKey:w,pageName:String(Ge.name??""),path:String(Ge.path??"")},l):null,Ns=I?Bt?.seo:void 0,tn=Oe!==void 0?Oe:Ns,Ds=I?Ao(tn):void 0,Ts=en?.seoTypeOptions??[],Ps=I&&l?Mo(l):"",vn=G??Ds??{},nn=I&&en?Ko(vn,en):null,Cs=I&&nn&&Lo(tn)?Gt(nn,l):null,As=I?Bo(i,l)?.seoData:void 0,$e=Ne?[{label:"Default",sections:[{__resolveType:m}]}]:pi(Bt?.sections,i??{}),Ft=$e.length>1,Ce=Math.min(ge,$e.length-1),dt=$e[Ce],U=dt?.sections??[],Me=Wt(U,i),Sn=!Ne&&za(Bt?.sections);if(Ne&&m&&Xe!==m){et(m);const t=U[0],s=Me[0];if(t&&s){C(0),me(0),O([]);const a=xt(t,s,i);a&&(L(a.data),K(a.resolveType),$(null),N(null))}}!Ne&&Xe!==null&&et(null),Ye.current={rawSections:U,parsedSections:Me,decofile:i??{},activePageKey:w,pageVariants:$e,variantIndex:Ce,sectionVariantIndex:te,selectedSectionIndex:v};const Ms=()=>({multivariate:Sn,index:Ce,variants:$e.map(t=>({rule:t.rule}))}),xn=(t,s)=>{if(!E)return;if(!w||!Sn||t.length<=1){E(null);return}const a=Kn(w,{multivariate:!0,index:s,variants:t},i,l);E(a.length>0?a:null)},Et=(t,s,a)=>{if(!E)return;if(!w){E(null);return}const c=Ms(),S=Kn(w,c,i,l);if(!t||s<0){E(S.length>0?S:null);return}const j=lo({pageKey:w,page:c,sectionIndex:s,sectionLazy:Me[s]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:i,meta:l}),_=[...S,...j];E(_.length>0?_:null)},mt=(t,s,a,c=v??-1,S=!1)=>{const j=Ze(t,s);if(!j){L(null),K(null),$(null),N(null),S&&Et(null,c,a);return}const T=Pn(j,it)[a];if(!T){L(null),K(null),$(null),N(null),S&&Et(null,c,a);return}const ne=Ja(T.value,i);L(ne?.data??null),K(ne?.resolveType??null);const{resolveType:M,formValue:H}=Tt(T.rule,i,l??void 0);$(M),N(H),S&&Et(j,c,a)};if(h!==void 0&&h!==se&&(he(h??null),typeof h=="number")){const t=U[h],s=Me[h];if(t&&s)if(C(h),me(0),O([]),Z(a=>a+1),s.isMultivariate)mt(t,s,0,h);else{const a=xt(t,s,i);a?(L(a.data),K(a.resolveType)):(L(null),K(null)),$(null),N(null)}}const Ot={orgSlug:g,virtualMcpId:e,branch:o,previewUrl:f??void 0,siteSlug:z},sn=ue&&l?Gt(ue,l):null,Ue=(t,s)=>{if(!w)return;We.current&&(clearTimeout(We.current),We.current=null),nt.current&&(clearTimeout(nt.current),nt.current=null),tt.current&&(clearTimeout(tt.current),tt.current=null);const a=Ct(i,w,t,Ce,$e);Ve.mutate({blockKey:w,data:a},{onSuccess:()=>s?.onSuccess?.()??u?.(),onError:c=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))})},kt=()=>{C(null),L(null),K(null),me(0),N(null),$(null),O([]),Z(t=>t+1)},Ks=(t,s)=>{We.current&&clearTimeout(We.current);const a=Ye.current.sectionVariantIndex;We.current=setTimeout(()=>{const{rawSections:c,parsedSections:S,decofile:j,activePageKey:_,pageVariants:T,variantIndex:ne}=Ye.current,M=c[s];if(!M)return;const H=S[s];if(!H)return;if(H.isSavedBlock){const q=H.isLazy?M.section?.__resolveType??M.__resolveType:M.__resolveType;Ve.mutate({blockKey:q,data:t},{onSuccess:()=>u?.(),onError:Y=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:Y.message}))});return}if(!_)return;const W={...j[_]},Ee=[...c];if(H.isMultivariate){const q=Ze(M,H);if(!q||!_)return;const Y=uo(q,a,t);Ee[s]=bt(M,H,Y)}else if(H.isHidden){const q=Xn(M.__resolveType),Y=q?{...M.section}:{...M},Pe=Array.isArray(Y.variants)?[...Y.variants]:[];Pe[0]&&(Pe[0]={...Pe[0],value:t}),Y.variants=Pe,q?Ee[s]={...M,section:Y}:Ee[s]=Y}else H.isLazy?Ee[s]={...M,section:t}:Ee[s]=t;if(T.length>1){const q=W.sections,Y=[...q?.variants??[]];Y[ne]&&(Y[ne]={...Y[ne],value:Ee}),W.sections={...q,variants:Y}}else W.sections=Ee;Ve.mutate({blockKey:_,data:W},{onSuccess:()=>u?.(),onError:q=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:q.message}))})},mn)},Ls=t=>{C(t),me(0),O([]),Z(S=>S+1);const s=U[t],a=Me[t];if(!s||!a)return;if(a.isMultivariate){mt(s,a,0,t);return}const c=xt(s,a,i);if(!c){L(null),K(null),$(null),N(null),Et(null,t,0);return}L(c.data),K(c.resolveType),$(null),N(null),Et(null,t,0)},bn=t=>{const s=t;L(s),v!==null&&Ks(s,v)},an=t=>{if(!w||!i||!l||!Ge)return;const s={kind:"page",pageKey:w,pageName:String(Ge.name??""),path:String(Ge.path??"")},a=Bn(i,s,l);a&&ut.save(w,()=>{const c=lt.getQueryData(ja.decofile(ct))?.[w];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const S={...c,...Xt.current};return Xt.current={},t?.raw!==void 0?{...S,seo:t.raw}:t?.inner!==void 0?Oo(s,a,S,t.inner):S})},Bs=(t,s)=>{w&&(Xt.current[t]=s,an())},Fs=(t,s)=>{if(!w)return;const a=At([...U],t,s);v!==null&&(v===t?C(s):t<v&&s>=v?C(v-1):t>v&&s<=v&&C(v+1)),Ue(a)},Os=t=>{if(!w)return;const s=U.filter((a,c)=>c!==t);v===t?kt():v!==null&&v>t&&C(v-1),Ue(s)},Is=t=>{if(!w)return;const s=U[t];if(!s)return;const a=[...U];a.splice(t+1,0,ro(s)),v!==null&&v>t&&C(v+1),Ue(a)},$s=t=>{if(!w)return;const s=U[t],a=Me[t];if(!s||!a||a.isMultivariate)return;const c=a.isHidden?oo(s):io(s);if(!c)return;const S=[...U];S[t]=c,v===t&&kt(),Ue(S)},zs=t=>{if(!w)return;const s=U[t],a=Me[t];if(!s||!a||a.isMultivariate)return;const c=ao(s);if(!c)return;const S=[...U];S[t]=c,v===t&&kt(),Ue(S)},Hs=t=>{if(!w)return;const s=U[t],a=Me[t];if(!s||!a?.isSavedBlock)return;const c=xt(s,a,i);if(!c?.data)return;const{name:S,...j}=c.data,_=[...U];a.isLazy?_[t]={...s,section:j}:_[t]=j,v===t&&kt(),Ue(_)},Gs=t=>{if(!w)return;const s=[...U,{__resolveType:t.resolveType}],a=s.length-1;Ue(s,{onSuccess:()=>{Se(!1),C(a),me(0),O([]),Z(_=>_+1);const c=s[a],S=Wt(s,i)[a];if(!c||!S)return;if(S.isMultivariate){mt(c,S,0);return}const j=xt(c,S,i);if(!j){L(null),K(null),$(null),N(null);return}L(j.data),K(j.resolveType),$(null),N(null)}})},Ws=t=>{if(v===null)return;const s=U[v],a=Me[v];!s||!a?.isMultivariate||(me(t),O([]),Z(c=>c+1),mt(s,a,t,v,!0))},Us=t=>{if(v===null||!w)return;const s=U[v],a=Me[v];if(!s||!a?.isMultivariate)return;const c=Ze(s,a);if(!c)return;const S=to(c,t);if(!S){Q.error(r("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const j=[...U];j[v]=bt(s,a,S);const _=S.variants;let T=te;t===te?T=Math.min(t,_.length-1):t<te&&(T=te-1),me(T),O([]),Z(ne=>ne+1),mt(j[v],a,T),Ue(j)},qs=t=>{if(v===null||!w)return;const s=U[v],a=Me[v];if(!s||!a?.isMultivariate)return;const c=Ze(s,a);if(!c)return;const S=no(c,t),j=[...U];j[v]=bt(s,a,S);const _=t+1;me(_),O([]),Z(T=>T+1),mt(j[v],a,_),Ue(j)},Js=(t,s)=>{if(v===null||!w||t===s)return;const a=U[v],c=Me[v];if(!a||!c?.isMultivariate)return;const S=Ze(a,c);if(!S)return;const j=Za(S,t,s),_=[...U];_[v]=bt(a,c,j);let T=te;te===t?T=s:t<te&&s>=te?T=te-1:t>te&&s<=te&&(T=te+1),me(T),mt(_[v],c,T),Ue(_)},on=t=>{const s=t??v;if(s===null||!w)return;const a=U[s],c=Me[s];if(!a||!c)return;const S=Ya(a,c);if(!S){Q.error(r("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const j=[...U];j[s]=S.section;const _=Wt(j,i)[s];if(!_?.isMultivariate){Q.error(r("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}C(s),me(S.newVariantIndex),O([]),Z(T=>T+1),mt(S.section,_,S.newVariantIndex,s),Ue(j)},Ys=()=>{if(v===null||!w)return;const t=U[v],s=Me[v];if(!t||!s?.isMultivariate)return;const a=Ze(t,s);if(!a)return;const c=eo(t,s,a);if(!c){Q.error(r("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const S=[...U];S[v]=c;const j=Wt(S,i)[v];if(!j)return;me(0),$(null),N(null),O([]),Z(T=>T+1);const _=xt(c,j,i);_?(L(_.data),K(_.resolveType)):(L(null),K(null)),Et(null,v,0),Ue(S)},Qs=async t=>{if(Le===null||!w)return;const s=dn(t,i);if(s){Q.error(s);return}const a=U[Le],c=Me[Le];if(!a||!c)return;const S=xt(a,c,i);if(!S){Q.error(r("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const j={...S.data,name:t};try{await Ve.mutateAsync({blockKey:t,data:j});const _=[...U];_[Le]={__resolveType:t},await Ve.mutateAsync({blockKey:w,data:Ct(i,w,_,Ce,$e)}),v===Le&&kt(),ve(null),Q.success(r("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),u?.()}catch(_){Q.error(_ instanceof Error?_.message:r("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"))}},yn=dt?.rule;if(Ft&&v===null&&J===null&&yn){const{resolveType:t,formValue:s}=Tt(yn,i??{},l??void 0);X(t),F(s)}const It=l?Ha(l):[],_n=l&&i?Ga(l,i):[],Xs=!Ne&&!!(f&&l&&i),Zs=J&&l?Gt(J,l):null,Rt=()=>{tt.current&&(clearTimeout(tt.current),tt.current=null),nt.current&&(clearTimeout(nt.current),nt.current=null)},Dt=async(t,s)=>{if(!(co(s,t,l)>0))try{await Qt.mutateAsync({blockKey:t})}catch(a){Q.error(a instanceof Error?a.message:r("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"))}},jn=t=>{tt.current&&clearTimeout(tt.current),tt.current=setTimeout(()=>{const{activePageKey:s,decofile:a,variantIndex:c}=Ye.current;if(!s)return;const S={...a[s]},j={...S.sections},_=[...j.variants??[]],T=_[c],ne=T?.rule;if(wt(ne,a,l)){const M=ne?.__resolveType??"",H=a[M],W=typeof H?.name=="string"?H.name:M,{__resolveType:Ee,...q}=t;Ve.mutate({blockKey:M,data:Vt(Ee??"",q,W)},{onSuccess:()=>u?.(),onError:Y=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:Y.message}))});return}T&&(_[c]={...T,rule:t}),S.sections={...j,variants:_},Ve.mutate({blockKey:s,data:S},{onSuccess:()=>u?.(),onError:M=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:M.message}))})},mn)},ea=t=>{X(t);const s=t?{__resolveType:t}:{__resolveType:Ln};F({}),jn(s)},ta=t=>{const s=t;F(s);const a=J?{__resolveType:J,...s}:{...s};jn(a)},na=async t=>{Rt();const{activePageKey:s,decofile:a,variantIndex:c}=Ye.current;if(!s)return;const S=a[s],j=S?.sections;if(!j||typeof j!="object"||Array.isArray(j))return;const _=j;if(!Array.isArray(_.variants))return;const T=[..._.variants],ne=T[c];if(!ne)return;const M=Pt(ne.rule,a,l),H=qt(t);T[c]={...ne,rule:H};const W={...a,[s]:{...S,sections:{..._,variants:T}}},{resolveType:Ee,formValue:q}=Tt(H,W,l??void 0);X(Ee),F(q);try{await Ve.mutateAsync({blockKey:s,data:W[s]}),M&&M!==t&&await Dt(M,W),u?.()}catch(Y){Q.error(Y instanceof Error?Y.message:r("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}},En=t=>{nt.current&&clearTimeout(nt.current);const{selectedSectionIndex:s,sectionVariantIndex:a}=Ye.current;s!==null&&(nt.current=setTimeout(()=>{const{rawSections:c,parsedSections:S,decofile:j,activePageKey:_,pageVariants:T,variantIndex:ne}=Ye.current;if(!_)return;const M=c[s],H=S[s];if(!M||!H?.isMultivariate)return;const W=Ze(M,H);if(!W)return;const q=(W.variants??[])[a]?.rule;if(wt(q,j,l)){const ye=q?.__resolveType??"",qe=j[ye],at=typeof qe?.name=="string"?qe.name:ye,{__resolveType:gt,...ot}=t;Ve.mutate({blockKey:ye,data:Vt(gt??"",ot,at)},{onSuccess:()=>u?.(),onError:ht=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:ht.message}))});return}const Y=Cn(W,a,t),Pe=[...c];Pe[s]=bt(M,H,Y);const Qe=Ct(j,_,Pe,ne,T);Ve.mutate({blockKey:_,data:Qe},{onSuccess:()=>u?.(),onError:ye=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:ye.message}))})},mn))},sa=t=>{$(t),N({}),En(t?{__resolveType:t}:{__resolveType:Ln})},aa=t=>{const s=t;N(s);const a=ae?{__resolveType:ae,...s}:{...s};En(a)},oa=async t=>{Rt();const{selectedSectionIndex:s,sectionVariantIndex:a,rawSections:c,parsedSections:S,decofile:j,activePageKey:_,pageVariants:T,variantIndex:ne}=Ye.current;if(s===null||!_)return;const M=c[s],H=S[s];if(!M||!H?.isMultivariate)return;const W=Ze(M,H);if(!W)return;const Ee=W.variants??[],q=Pt(Ee[a]?.rule,j,l),Y=qt(t),Pe=Cn(W,a,Y),Qe=[...c];Qe[s]=bt(M,H,Pe);const ye=Ct(j,_,Qe,ne,T),qe={...j,[_]:ye},{resolveType:at,formValue:gt}=Tt(Y,qe,l??void 0);$(at),N(gt);try{await Ve.mutateAsync({blockKey:_,data:ye}),q&&q!==t&&await Dt(q,qe),u?.()}catch(ot){Q.error(ot instanceof Error?ot.message:r("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}};if(!Ne&&!Ge)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:r("sectionsEditor.sectionsEditor.noPageFound",{currentPath:x})});if(Ne&&!Zt)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:r("sectionsEditor.sectionsEditor.globalBlockNotFound")});const ft=v!==null?Me[v]??null:null,kn=v!==null?U[v]:null,Rn=kn&&ft?.isMultivariate?Ze(kn,ft):null,St=Rn?Pn(Rn,it):[],rn=Math.min(te,Math.max(St.length-1,0)),$t=St[rn]??null,pt=ft?.isMultivariate===!0,wn=v!==null&&ft!==null,zt=wn&&(pt||!!(sn&&ie)),ia=zt&&!Ne&&ft?.isSavedBlock===!0,st=Ne||ia,ra=Ne?hn:ft?.label??"",la=ae&&l?Gt(ae,l):null,ln=zt&&(!Ne||re.length>0)?Ne?[hn,...re]:[Ge.name,ft.label,...pt&&$t?[$t.label]:[],...re]:[],ca=I&&Ge?[Ge.name,"SEO",...Be]:[],Ht=I?ca:st?ln.length>0?ln:[ra]:ln,ua=!I&&!Ne&&pt&&re.length===0,Vn=()=>{if(!w)return;Rt(),We.current&&(clearTimeout(We.current),We.current=null);const t=i[w],s=Qa(t.sections,U);if(!s)return;const a=Xa(s);Ve.mutate({blockKey:w,data:{...t,sections:s}},{onSuccess:()=>{B(a),C(null),L(null),K(null),O([]),F(null),X(null)},onError:c=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))})},cn=(t,s,a)=>{if(!w)return;Rt(),We.current&&(clearTimeout(We.current),We.current=null);const c=i[w],S=c.sections;if(!S||typeof S!="object"||Array.isArray(S))return;const j=S;if(!Array.isArray(j.variants))return;const _=t([...j.variants]);if(!_)return;const T=mo(j,_),ne={...i,[w]:{...c,sections:T}};Ve.mutate({blockKey:w,data:ne[w]},{onSuccess:()=>{s?.(),a&&Dt(a,ne)},onError:M=>Q.error(r("sectionsEditor.sectionsEditor.saveFailed",{error:M.message}))})},da=t=>{oe(null),B(t),C(null),L(null),K(null),O([]);const s=$e[t]?.rule,{resolveType:a,formValue:c}=Tt(s,i??{},l??void 0);X(a),F(c),xn($e.map(S=>({rule:S.rule})),t)},ma=(t,s)=>{if(t===s)return;let a=Ce;Ce===t?a=s:t<Ce&&s>=Ce?a=Ce-1:t>Ce&&s<=Ce&&(a=Ce+1),B(a);const c=At($e.map(S=>({rule:S.rule})),t,s);xn(c,a),cn(S=>At(S,t,s))},fa=t=>{const s=$e[t]?.rule,a=Pt(s,i??{},l??void 0);cn(c=>c.length<=1?null:(c.splice(t,1),c),()=>{$e.length-1===1?B(0):t<Ce?B(Ce-1):t===Ce&&B(Math.max(0,t-1)),C(null),L(null),K(null),O([]),F(null),X(null)},a)},pa=t=>{cn(s=>fo(s,t),()=>{B(t+1),C(null),L(null),K(null),O([]),F(null),X(null)})},ga=async(t,s)=>{Rt();const a=Ye.current.activePageKey,c=Ye.current.decofile;if(!a)return;const S=c[a],j=S.sections;if(!j||typeof j!="object"||Array.isArray(j))return;const _=j;if(!Array.isArray(_.variants))return;const T=[..._.variants],ne=T[t];if(!ne?.rule||typeof ne.rule!="object"){Q.error(r("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const M=ne.rule,H=s.trim();Lt(!0);try{if(!H){if(!wt(M,c,l)){oe(null);return}const Qe=M.__resolveType??"";T[t]={...ne,rule:An(M,c,l)};const ye={...c,[a]:{...S,sections:{..._,variants:T}}};await Ve.mutateAsync({blockKey:a,data:ye[a]}),await Dt(Qe,ye),oe(null),u?.();return}const W=Mn(M,c,l);if(!W){Q.error(r("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(W.blockKey){await Ve.mutateAsync({blockKey:W.blockKey,data:Vt(W.resolveType,W.data,H)}),oe(null),u?.();return}const Ee=un(H),q=dn(Ee,c);if(q){Q.error(q);return}const Y=Vt(W.resolveType,W.data,H);let Pe=null;try{await Ve.mutateAsync({blockKey:Ee,data:Y}),Pe=Ee,T[t]={...ne,rule:qt(Ee)},await Ve.mutateAsync({blockKey:a,data:{...S,sections:{..._,variants:T}}}),Pe=null}catch(Qe){throw Pe&&await Qt.mutateAsync({blockKey:Pe}).catch(()=>{}),Qe}oe(null),Q.success(r("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:H})),u?.()}catch(W){Q.error(W instanceof Error?W.message:r("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Lt(!1)}},ha=async(t,s)=>{Rt();const{selectedSectionIndex:a,rawSections:c,parsedSections:S,decofile:j,activePageKey:_,pageVariants:T,variantIndex:ne}=Ye.current;if(a===null||!_)return;const M=c[a],H=S[a];if(!M||!H?.isMultivariate)return;const W=Ze(M,H);if(!W)return;const Ee=W.variants??[],q=Ee[t];if(!q?.rule||typeof q.rule!="object"){Q.error(r("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const Y=q.rule,Pe=s.trim();Lt(!0);const Qe=async ye=>{const qe={...W,variants:ye},at=[...c];at[a]=bt(M,H,qe);const gt=Ct(j,_,at,ne,T);return await Ve.mutateAsync({blockKey:_,data:gt}),{...j,[_]:gt}};try{if(!Pe){if(!wt(Y,j,l)){le(null);return}const ht=Y.__resolveType??"",Tn=[...Ee];Tn[t]={...q,rule:An(Y,j,l)};const ya=await Qe(Tn);await Dt(ht,ya),le(null),u?.();return}const ye=Mn(Y,j,l);if(!ye){Q.error(r("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(ye.blockKey){await Ve.mutateAsync({blockKey:ye.blockKey,data:Vt(ye.resolveType,ye.data,Pe)}),le(null),u?.();return}const qe=un(Pe),at=dn(qe,j);if(at){Q.error(at);return}const gt=Vt(ye.resolveType,ye.data,Pe);let ot=null;try{await Ve.mutateAsync({blockKey:qe,data:gt}),ot=qe;const ht=[...Ee];ht[t]={...q,rule:qt(qe)},await Qe(ht),ot=null}catch(ht){throw ot&&await Qt.mutateAsync({blockKey:ot}).catch(()=>{}),ht}le(null),Q.success(r("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:Pe})),u?.()}catch(ye){Q.error(ye instanceof Error?ye.message:r("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Lt(!1)}},Nn=()=>{kt()},va=t=>{Ae(t),an({inner:t})},Sa=t=>{ze(t),an({raw:t})},xa=()=>{Ae(null),xe([])},ba=()=>be(t=>t+1),Dn=t=>{if(I){if(t===0){ut.flush(),ce(!1),Ae(null),ze(void 0),xe([]),be(a=>a+1),k?.();return}if(t===1){xe([]),be(a=>a+1);return}xe(Be.slice(0,t-1)),be(a=>a+1);return}if(Ne){O(re.slice(0,t)),Z(a=>a+1);return}if(t===0){Nn();return}if(t===1){O([]),Z(a=>a+1);return}if(pt&&t===2){O([]),Z(a=>a+1);return}const s=pt?2:1;O(re.slice(0,t-s))};return n.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[n.jsx("div",{className:"shrink-0",children:st||zt||I?n.jsxs("div",{className:Fe("border-b px-3 py-2.5",st&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[Ht.length>1&&n.jsx("button",{type:"button",onClick:()=>Dn(po(Ht.length,{isMultivariateSectionTop:ua})),title:r("sectionsEditor.sectionsEditor.back"),"aria-label":r("sectionsEditor.sectionsEditor.back"),className:Fe("shrink-0 inline-flex size-6 items-center justify-center rounded-md transition-colors",st?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:n.jsx(ls,{className:"size-4"})}),!Ne&&Ft&&dt&&n.jsxs("button",{type:"button",onClick:Nn,title:r("sectionsEditor.sectionsEditor.editingInVariant",{variant:dt.label}),className:Fe("shrink-0 inline-flex items-center gap-1 rounded-md h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",fi),children:[n.jsx(bs,{rule:Mt(dt.rule,i??{},l??void 0),matchers:It}),n.jsx("span",{className:"max-w-[160px] truncate",children:dt.label})]}),n.jsx("nav",{"aria-label":r("sectionsEditor.sectionsEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:Ht.map((t,s)=>{const a=s===Ht.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[s>0&&n.jsx(cs,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>Dn(s),title:t,className:Fe("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",a?st?"font-semibold text-global-section-fg dark:text-global-section-fg-dark":"font-medium text-foreground":st?"text-foreground/80":"text-muted-foreground",st?"hover:bg-global-section/15":"hover:bg-accent hover:text-accent-foreground"),children:t})]},`${t}-${s}`)})}),st&&n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx("span",{className:"shrink-0 cursor-help",children:n.jsx(bo,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),n.jsx(jt,{side:"bottom",className:"max-w-[260px]",children:r("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),wn&&!pt&&!ft?.isHidden&&w&&n.jsx(zn,{onClick:()=>on()})]}),st&&n.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:r("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):n.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(gi,{pageKey:w,initialName:Ge.name,initialPath:Ge.path,onFieldChange:Bs})}),n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":r("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:()=>ce(!0),children:n.jsx(vo,{size:14})})}),n.jsx(jt,{side:"bottom",children:r("sectionsEditor.sectionsEditor.editSeo")})]}),n.jsxs(yt,{children:[n.jsx(_t,{asChild:!0,children:n.jsx(Je,{type:"button",variant:"ghost",size:"icon","aria-label":r("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>D&&w?D(w):_e(!0),children:n.jsx(So,{size:14})})}),n.jsx(jt,{side:"bottom",children:r("sectionsEditor.sectionsEditor.viewJson")})]}),n.jsx(zn,{onClick:Vn})]})}),I?n.jsx(Jt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsx("div",{className:"mx-auto max-w-2xl",children:Bt&&w?n.jsx(Fo,{rawSeo:tn,innerSeo:vn,defaultResolveType:Ps,seoSchema:Cs,activeResolveType:nn,seoTypeOptions:Ts,formResetKey:we,siteDefaultSeo:As,onBreadcrumbChange:xe,onPersistRaw:Sa,onInnerChange:va,onClearForm:xa,onBumpFormKey:ba}):n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:r("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})}):zt?n.jsxs(Jt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[pt&&St.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(Wa,{listKey:`${w??""}:${v??""}`,variants:St.map((t,s)=>({index:s,label:t.label})),selectedIndex:rn,onSelect:Ws,onRename:le,onDuplicate:qs,onDelete:Us,onRemoveAll:Ys,onReorder:Js,onAdd:()=>on()}),pt&&n.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:r("sectionsEditor.sectionsEditor.variantRule")}),n.jsx(Hn,{currentRt:ae??"",currentLabel:Ut($t?.rule,i??{},it,l??void 0),currentGlobalKey:Pt($t?.rule,i??{},l??void 0)??void 0,matchers:It,globals:_n,onSelect:sa,onSelectGlobal:oa,schema:la,formValue:Ie,onChange:aa,formKey:`${v??"none"}:${rn}:${ae??""}`,formWrapperClassName:"pt-1",meta:l??void 0,decofile:i,onSaveReferencedBlock:Kt,sandbox:Ot})]})]}),n.jsx($n,{activeSchema:sn,formValue:ie,formResetKey:Ke,onFormChange:bn,onBreadcrumbChange:O,breadcrumbPath:re,emptyMessage:r("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:l,decofile:i,onSaveReferencedBlock:Kt,sandbox:Ot})]}):Ne?n.jsx(Jt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx($n,{activeSchema:sn,formValue:ie,formResetKey:Ke,onFormChange:bn,onBreadcrumbChange:O,breadcrumbPath:re,emptyMessage:r("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:l,decofile:i,onSaveReferencedBlock:Kt,sandbox:Ot})}):n.jsxs(Jt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Ft&&w&&n.jsx(ui,{listKey:w,variants:$e,activeIndex:Ce,decofile:i??{},meta:l,matchers:It,onSelect:da,onReorder:ma,onRename:oe,onDuplicate:pa,onDelete:fa,onAdd:Vn}),Ft&&J!==null&&n.jsxs("div",{className:Fe("px-3 border-b",pe?"pt-3 pb-5 space-y-3":"py-2"),children:[n.jsxs("button",{type:"button",onClick:()=>ke(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-sm py-0.5 hover:bg-muted/40","aria-expanded":pe,children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:r("sectionsEditor.sectionsEditor.variantRule")}),pe?n.jsx(xo,{className:"size-3.5 shrink-0 text-muted-foreground"}):n.jsx(go,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),pe&&n.jsx("div",{className:Fe("space-y-3",Nt&&"pointer-events-none opacity-50"),children:n.jsx(Hn,{currentRt:J,currentLabel:Ut(dt?.rule,i??{},it,l??void 0),currentGlobalKey:Pt(dt?.rule,i??{},l??void 0)??void 0,matchers:It,globals:_n,onSelect:ea,onSelectGlobal:na,schema:Zs,formValue:fe,onChange:ta,formKey:`${Ce}:${J??""}`,formWrapperClassName:"space-y-3",meta:l??void 0,decofile:i,onSaveReferencedBlock:Kt,sandbox:Ot})})]}),n.jsx("div",{className:"p-2 pt-3",children:n.jsx(ti,{listKey:`${w??""}-${Ce}`,rawSections:U,sections:Me,meta:l,selectedIndex:v,onSelect:Ls,onReorder:Fs,onDelete:Os,onDuplicate:Is,onMakeReusable:ve,onToggleHidden:$s,onToggleLazy:zs,onAddVariant:on,onDetach:Hs,onAddSection:()=>Se(!0),canAddSection:Xs})})]}),n.jsx(Ua,{open:Le!==null,onOpenChange:t=>{t||ve(null)},defaultBlockId:Le!==null?un(Me[Le]?.label??""):"",isPending:Ve.isPending,onSubmit:Qs}),f&&n.jsx($o,{open:Re,onOpenChange:Se,meta:l,decofile:i,previewBaseUrl:f,onSelect:Gs}),De&&w&&i&&n.jsx(qa,{open:De,onOpenChange:_e,pageKey:w,decofile:i}),de!==null&&n.jsx(On,{open:!0,initialName:wt($e[de]?.rule,i??{},l??void 0)?Ut($e[de]?.rule,i??{},it,l??void 0):"",autoLabel:it(Mt($e[de]?.rule,i??{},l??void 0)),isPending:Nt,onSubmit:async t=>{await ga(de,t)},onOpenChange:t=>{!t&&!Nt&&oe(null)}}),ee!==null&&n.jsx(On,{open:!0,initialName:wt(St[ee]?.rule,i??{},l??void 0)?Ut(St[ee]?.rule,i??{},it,l??void 0):"",autoLabel:it(Mt(St[ee]?.rule,i??{},l??void 0)),isPending:Nt,onSubmit:async t=>{await ha(ee,t)},onOpenChange:t=>{!t&&!Nt&&le(null)}})]})}export{fc as SectionsEditor};
@@ -1 +1 @@
1
- import{r as i,aC as nt,aA as Pe,j as d,cO as rt,aE as be,aB as k,cP as st,ax as j,aD as _,bE as $,cQ as lt,af as Ne,cR as Ee,ay as at,bz as ct,bG as it,cX as dt,cY as ut,cZ as pt,c_ as ft,cS as mt,az as ht,c$ as vt,cT as gt,cV as xt,c as ee,m as oe}from"./index-BuUlXZv1.js";import{V as St}from"./tooltip-B8bYd-9r.js";import{i as wt}from"./Check-DIcuBCVN.js";import{t as Re}from"./ChevronDown-B9FSangp.js";import{n as Ct}from"./ChevronUp-C8KS626_.js";function _e(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],Q="Select",[de,ue,bt]=at(Q),[ne]=ht(Q,[bt,Ee]),pe=Ee(),[Tt,G]=ne(Q),[Pt,_t]=ne(Q),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=i.useState(null),[m,x]=i.useState(null),[F,M]=i.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:Q}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:Q}),L=i.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=i.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Je,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=Q;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...c,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:_(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):c})});De.displayName=Oe;var Nt="SelectIcon",ke=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Nt;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var J="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):null}return d.jsx(He,{...r,ref:e})});Be.displayName=J;var A=10,[Ve,Y]=ne(J),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(J,t),[x,F]=i.useState(null),[M,re]=i.useState(null),N=k(e,f=>F(f)),[O,U]=i.useState(null),[q,L]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(J,t),s=Y(J,t),[l,a]=i.useState(null),[u,h]=i.useState(null),g=k(e,N=>h(N)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&v&&C){const N=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,X=N.left-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-N.right-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ce=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,l,u,p,v,C,c.dir,o]);$(()=>x(),[x]);const[F,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(gt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(J,{}),we="SelectViewport",Fe=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=k(e,c.onViewportChange),a=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,g]=i.useState(c??""),[b,w]=i.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=i.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,g]=i.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Je=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=k(o,n),s=ct(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:c,defaultValue:e})});Je.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Fe,Qt=$e,Jt=Ge,eo=qe,to=Xe,oo=Ze;function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",translate:"no",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Jt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Qt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,_e as e};
1
+ import{r as i,aC as nt,aA as Pe,j as d,cO as rt,aE as be,aB as k,cP as st,ax as j,aD as _,bE as $,cQ as lt,af as Ne,cR as Ee,ay as at,bz as ct,bG as it,cX as dt,cY as ut,cZ as pt,c_ as ft,cS as mt,az as ht,c$ as vt,cT as gt,cV as xt,c as ee,m as oe}from"./index-DkgcyEMi.js";import{V as St}from"./tooltip-B2YmIjms.js";import{i as wt}from"./Check-Cm-_V5_R.js";import{t as Re}from"./ChevronDown-CA4KkhqD.js";import{n as Ct}from"./ChevronUp-BV21uDxf.js";function _e(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],Q="Select",[de,ue,bt]=at(Q),[ne]=ht(Q,[bt,Ee]),pe=Ee(),[Tt,G]=ne(Q),[Pt,_t]=ne(Q),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=i.useState(null),[m,x]=i.useState(null),[F,M]=i.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:Q}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:Q}),L=i.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=i.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Je,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=Q;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...c,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:_(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):c})});De.displayName=Oe;var Nt="SelectIcon",ke=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Nt;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var J="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):null}return d.jsx(He,{...r,ref:e})});Be.displayName=J;var A=10,[Ve,Y]=ne(J),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(J,t),[x,F]=i.useState(null),[M,re]=i.useState(null),N=k(e,f=>F(f)),[O,U]=i.useState(null),[q,L]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(J,t),s=Y(J,t),[l,a]=i.useState(null),[u,h]=i.useState(null),g=k(e,N=>h(N)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&v&&C){const N=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,X=N.left-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-N.right-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ce=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,l,u,p,v,C,c.dir,o]);$(()=>x(),[x]);const[F,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(gt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(J,{}),we="SelectViewport",Fe=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=k(e,c.onViewportChange),a=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,g]=i.useState(c??""),[b,w]=i.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=i.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,g]=i.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Je=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=k(o,n),s=ct(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:c,defaultValue:e})});Je.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Fe,Qt=$e,Jt=Ge,eo=qe,to=Xe,oo=Ze;function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",translate:"no",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Jt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Qt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,_e as e};