cognova 0.2.13 → 0.2.15

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 (386) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-mGU8_Hv.js +1 -0
  3. package/.output/public/_nuxt/0GqCtQ9S.js +1 -0
  4. package/.output/public/_nuxt/{DFpmIy6J.js → 1wCoXZ14.js} +1 -1
  5. package/.output/public/_nuxt/2J1KxdHv.js +1 -0
  6. package/.output/public/_nuxt/6VDUZECX.js +1 -0
  7. package/.output/public/_nuxt/{C7m9zGMG.js → 8WMJQbWG.js} +1 -1
  8. package/.output/public/_nuxt/9Rw88G6h.js +1 -0
  9. package/.output/public/_nuxt/{BjsKx597.js → B-yW4SD3.js} +1 -1
  10. package/.output/public/_nuxt/B20jNAhm.js +1 -0
  11. package/.output/public/_nuxt/B3OpTH_e.js +1 -0
  12. package/.output/public/_nuxt/B9Y3_B5G.js +1 -0
  13. package/.output/public/_nuxt/B9_vmatf.js +1 -0
  14. package/.output/public/_nuxt/B9o6sFST.js +1 -0
  15. package/.output/public/_nuxt/{CseYuM6E.js → BAY3_Hrq.js} +1 -1
  16. package/.output/public/_nuxt/{B_9zJTqe.js → BD5rPkc2.js} +3 -3
  17. package/.output/public/_nuxt/BGYoW3kO.js +1 -0
  18. package/.output/public/_nuxt/BHUy5EAj.js +1 -0
  19. package/.output/public/_nuxt/BLdMRpJD.js +1 -0
  20. package/.output/public/_nuxt/{D6tVZcRs.js → BOCn_SGf.js} +12 -12
  21. package/.output/public/_nuxt/BQi8LIrn.js +1 -0
  22. package/.output/public/_nuxt/BS1t375R.js +1 -0
  23. package/.output/public/_nuxt/BTGeP1bA.js +1 -0
  24. package/.output/public/_nuxt/{pdYvpiud.js → BVYYP4eQ.js} +5 -5
  25. package/.output/public/_nuxt/BWQ7zE01.js +1 -0
  26. package/.output/public/_nuxt/BWqJInD3.js +1 -0
  27. package/.output/public/_nuxt/BXdQ9ASJ.js +1 -0
  28. package/.output/public/_nuxt/{DQhm-UPG.js → BXxZokD_.js} +2 -2
  29. package/.output/public/_nuxt/BZ7DAtPi.js +1 -0
  30. package/.output/public/_nuxt/BZm9w7en.js +1 -0
  31. package/.output/public/_nuxt/B_hNqC64.js +1 -0
  32. package/.output/public/_nuxt/Be47YE2L.js +1 -0
  33. package/.output/public/_nuxt/BgIS9_ti.js +39 -0
  34. package/.output/public/_nuxt/BgavRUl_.js +1 -0
  35. package/.output/public/_nuxt/Bh0yGTzr.js +1 -0
  36. package/.output/public/_nuxt/BhhMUror.js +1 -0
  37. package/.output/public/_nuxt/Bj5e7QPz.js +1 -0
  38. package/.output/public/_nuxt/{9kAKMaPC.js → Bnn59-FS.js} +1 -1
  39. package/.output/public/_nuxt/BoCU3mWu.js +1 -0
  40. package/.output/public/_nuxt/Br6epbzY.js +1 -0
  41. package/.output/public/_nuxt/Br81Sr2R.js +1 -0
  42. package/.output/public/_nuxt/BrkEOLHu.js +9 -0
  43. package/.output/public/_nuxt/BtrNCc2S.js +1 -0
  44. package/.output/public/_nuxt/BxsQlbgl.js +1 -0
  45. package/.output/public/_nuxt/BzrhNhdT.js +1 -0
  46. package/.output/public/_nuxt/{B-DMcEU9.js → C-78dDNd.js} +1 -1
  47. package/.output/public/_nuxt/C1oaoi1p.js +1 -0
  48. package/.output/public/_nuxt/C2-_hcwB.js +1 -0
  49. package/.output/public/_nuxt/{TxMdabnL.js → C2Gh3qqr.js} +1 -1
  50. package/.output/public/_nuxt/C2OHaW6l.js +1 -0
  51. package/.output/public/_nuxt/C3szZmvA.js +1 -0
  52. package/.output/public/_nuxt/C3xzleKP.js +1 -0
  53. package/.output/public/_nuxt/C4sG6rdW.js +1 -0
  54. package/.output/public/_nuxt/C5Cu9Fx6.js +1 -0
  55. package/.output/public/_nuxt/{LRO7YHoH.js → C5gfF7J1.js} +1 -1
  56. package/.output/public/_nuxt/C6Eoiclo.js +1 -0
  57. package/.output/public/_nuxt/C7hFztZL.js +1 -0
  58. package/.output/public/_nuxt/CAVUAxNU.js +2 -0
  59. package/.output/public/_nuxt/{CiNxIhaq.js → CCeM5lW2.js} +1 -1
  60. package/.output/public/_nuxt/CDcQ31Eh.js +1 -0
  61. package/.output/public/_nuxt/CHbHVtCy.js +1 -0
  62. package/.output/public/_nuxt/CHnVFnBW.js +1 -0
  63. package/.output/public/_nuxt/CLNcmNQS.js +1 -0
  64. package/.output/public/_nuxt/{D7N3EZ-I.js → CPwCTHun.js} +1 -1
  65. package/.output/public/_nuxt/{CFmvNggn.js → CS8SdmH2.js} +1 -1
  66. package/.output/public/_nuxt/CTGm_mc8.js +1 -0
  67. package/.output/public/_nuxt/{DNcOC5zj.js → CTQFGHjS.js} +1 -1
  68. package/.output/public/_nuxt/{B0nzD8Sk.js → CVVtVzXC.js} +1 -1
  69. package/.output/public/_nuxt/CZNOaqeX.js +1 -0
  70. package/.output/public/_nuxt/C_A_NkeC.js +2 -0
  71. package/.output/public/_nuxt/{CGplHfmR.js → C_doutX-.js} +1 -1
  72. package/.output/public/_nuxt/{BrX-PnSK.js → CbDLhrNA.js} +2 -2
  73. package/.output/public/_nuxt/CePKCqSb.js +1 -0
  74. package/.output/public/_nuxt/Cet4T_yO.js +1 -0
  75. package/.output/public/_nuxt/{C6OSRpRd.js → CjJPkhbc.js} +1 -1
  76. package/.output/public/_nuxt/CkZT4LGq.js +1 -0
  77. package/.output/public/_nuxt/CkrW8sGL.js +1 -0
  78. package/.output/public/_nuxt/Co0UxVsx.js +1 -0
  79. package/.output/public/_nuxt/CqS0zXYQ.js +1 -0
  80. package/.output/public/_nuxt/CskGv_Km.js +1 -0
  81. package/.output/public/_nuxt/{DuzpliIL.js → CuvkTsqs.js} +1 -1
  82. package/.output/public/_nuxt/{B2wI_pYg.js → CxMuZEwX.js} +1 -1
  83. package/.output/public/_nuxt/{9O1MXkck.js → CxSijT71.js} +8 -8
  84. package/.output/public/_nuxt/Cywo6tZI.js +1 -0
  85. package/.output/public/_nuxt/D1reIfpX.js +1 -0
  86. package/.output/public/_nuxt/D1uV2uir.js +1 -0
  87. package/.output/public/_nuxt/{BWuL2CzO.js → D2edadpd.js} +1 -1
  88. package/.output/public/_nuxt/D3cEeQh7.js +1 -0
  89. package/.output/public/_nuxt/D41A2mE2.js +1 -0
  90. package/.output/public/_nuxt/D49P2RhG.js +1 -0
  91. package/.output/public/_nuxt/D867g6Ds.js +1 -0
  92. package/.output/public/_nuxt/DEFWIjWl.js +1 -0
  93. package/.output/public/_nuxt/DFTEBTzZ.js +1 -0
  94. package/.output/public/_nuxt/{-HePz7lp.js → DHRexj9X.js} +2 -2
  95. package/.output/public/_nuxt/DL4EpgqQ.js +1 -0
  96. package/.output/public/_nuxt/DLHnP6tw.js +1 -0
  97. package/.output/public/_nuxt/DM20WaLq.js +1 -0
  98. package/.output/public/_nuxt/{B8DFEjxA.js → DNAMjHbb.js} +1 -1
  99. package/.output/public/_nuxt/{CLkkdThv.js → DP8t9VWs.js} +24 -24
  100. package/.output/public/_nuxt/DTR31rjp.js +1 -0
  101. package/.output/public/_nuxt/{Bc8bTnkd.js → DTlSLSo1.js} +3 -3
  102. package/.output/public/_nuxt/{DowkFZ2V.js → DVdnhfXT.js} +1 -1
  103. package/.output/public/_nuxt/{DvHS7_h2.js → DZikIgHK.js} +1 -1
  104. package/.output/public/_nuxt/D_YGqvw_.js +1 -0
  105. package/.output/public/_nuxt/D_k1YwXm.js +1 -0
  106. package/.output/public/_nuxt/Daf2MbWG.js +7 -0
  107. package/.output/public/_nuxt/DcJ0GstJ.js +1 -0
  108. package/.output/public/_nuxt/DcYKh6QA.js +1 -0
  109. package/.output/public/_nuxt/DhN3_DYH.js +1 -0
  110. package/.output/public/_nuxt/DhSvBSt3.js +1 -0
  111. package/.output/public/_nuxt/DhlIWT8K.js +1 -0
  112. package/.output/public/_nuxt/DjsqyRqt.js +1 -0
  113. package/.output/public/_nuxt/DpSM97eH.js +1 -0
  114. package/.output/public/_nuxt/DqR9SdeU.js +1 -0
  115. package/.output/public/_nuxt/DqmQtg6Y.js +1 -0
  116. package/.output/public/_nuxt/Dsuag_iW.js +1 -0
  117. package/.output/public/_nuxt/Dtr_0IbE.js +1 -0
  118. package/.output/public/_nuxt/DwrmFEZN.js +1 -0
  119. package/.output/public/_nuxt/DxE8r3r4.js +1 -0
  120. package/.output/public/_nuxt/G_CsVlOR.js +1 -0
  121. package/.output/public/_nuxt/Gyw_2f6x.js +1 -0
  122. package/.output/public/_nuxt/HStC1ZyE.js +1 -0
  123. package/.output/public/_nuxt/Hh9mv0Ek.js +1 -0
  124. package/.output/public/_nuxt/LR0kCjbe.js +1 -0
  125. package/.output/public/_nuxt/MYeLvJGV.js +1 -0
  126. package/.output/public/_nuxt/NKs0EGrh.js +1 -0
  127. package/.output/public/_nuxt/PY5EGujn.js +1 -0
  128. package/.output/public/_nuxt/PamJNol9.js +1 -0
  129. package/.output/public/_nuxt/RlvwEbHv.js +1 -0
  130. package/.output/public/_nuxt/{BghuwIGa.js → TNpdJOlc.js} +1 -1
  131. package/.output/public/_nuxt/TSYrPbLR.js +1 -0
  132. package/.output/public/_nuxt/U-eBrbR4.js +1 -0
  133. package/.output/public/_nuxt/UuqXScSw.js +1 -0
  134. package/.output/public/_nuxt/V04-MrLN.js +1 -0
  135. package/.output/public/_nuxt/X0o5GcBb.js +1 -0
  136. package/.output/public/_nuxt/XQNzmQy9.js +1 -0
  137. package/.output/public/_nuxt/Y59XKprr.js +1 -0
  138. package/.output/public/_nuxt/YZQjZgsH.js +1 -0
  139. package/.output/public/_nuxt/_-TGPiLQ.js +1 -0
  140. package/.output/public/_nuxt/builds/latest.json +1 -1
  141. package/.output/public/_nuxt/builds/meta/7c42ae85-1cae-45f0-8cb9-ad3a10165c2c.json +1 -0
  142. package/.output/public/_nuxt/dashboard.ByJQ-Wzh.css +1 -0
  143. package/.output/public/_nuxt/entry.ZJxWCrU6.css +1 -0
  144. package/.output/public/_nuxt/{D12qPplu.js → hCeWb_38.js} +1 -1
  145. package/.output/public/_nuxt/{sBzyvWMJ.js → hrPTRWjM.js} +1 -1
  146. package/.output/public/_nuxt/jC4pIK1p.js +1 -0
  147. package/.output/public/_nuxt/jTT1R-Vz.js +1 -0
  148. package/.output/public/_nuxt/{CRRw0Thu.js → kkAMoB43.js} +1 -1
  149. package/.output/public/_nuxt/{h_bXa-f2.js → mzM4BGtv.js} +1 -1
  150. package/.output/public/_nuxt/o-s8JBm2.js +1 -0
  151. package/.output/public/_nuxt/pwJTkIQ4.js +1 -0
  152. package/.output/public/_nuxt/{BL1mkqgd.js → rIgg2Arf.js} +3 -3
  153. package/.output/public/_nuxt/subdxgSQ.js +1 -0
  154. package/.output/public/_nuxt/t8B72leH.js +1 -0
  155. package/.output/public/_nuxt/vCFAHwdt.js +1 -0
  156. package/.output/public/_nuxt/z-MP0bB7.js +1 -0
  157. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
  158. package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
  159. package/.output/server/chunks/build/{EditorToolbar-DIfb5arC.mjs → EditorToolbar-B9OwSI5e.mjs} +3 -3
  160. package/.output/server/chunks/build/{EditorToolbar-DIfb5arC.mjs.map → EditorToolbar-B9OwSI5e.mjs.map} +1 -1
  161. package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
  162. package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
  163. package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
  164. package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
  165. package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
  166. package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
  167. package/.output/server/chunks/build/Tree-DUhXKd8y.mjs +1 -1
  168. package/.output/server/chunks/build/{_id_-DN00UDdO.mjs → _id_-CwBeklIM.mjs} +296 -430
  169. package/.output/server/chunks/build/_id_-CwBeklIM.mjs.map +1 -0
  170. package/.output/server/chunks/build/{_name_-BnS_KEfX.mjs → _name_-D7MtW4Vu.mjs} +2 -2
  171. package/.output/server/chunks/build/{_name_-BnS_KEfX.mjs.map → _name_-D7MtW4Vu.mjs.map} +1 -1
  172. package/.output/server/chunks/build/{_uuid_-DfJaumTE.mjs → _uuid_-lvG92ein.mjs} +4 -4
  173. package/.output/server/chunks/build/{_uuid_-DfJaumTE.mjs.map → _uuid_-lvG92ein.mjs.map} +1 -1
  174. package/.output/server/chunks/build/account-LDZ4TL6x.mjs +513 -0
  175. package/.output/server/chunks/build/account-LDZ4TL6x.mjs.map +1 -0
  176. package/.output/server/chunks/build/app-CGhRZPNT.mjs +252 -0
  177. package/.output/server/chunks/build/app-CGhRZPNT.mjs.map +1 -0
  178. package/.output/server/chunks/build/{chat-m4-n9vC6.mjs → chat-BphuYhvA.mjs} +18 -27
  179. package/.output/server/chunks/build/chat-BphuYhvA.mjs.map +1 -0
  180. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  181. package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
  182. package/.output/server/chunks/build/{dashboard-CiVTAZuF.mjs → dashboard-nDujDyOg.mjs} +55 -16
  183. package/.output/server/chunks/build/{dashboard-CiVTAZuF.mjs.map → dashboard-nDujDyOg.mjs.map} +1 -1
  184. package/.output/server/chunks/build/{docs-ChGwOPg5.mjs → docs-Bwucwp0r.mjs} +664 -592
  185. package/.output/server/chunks/build/docs-Bwucwp0r.mjs.map +1 -0
  186. package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
  187. package/.output/server/chunks/build/{hooks-D328DcO6.mjs → hooks-D6PmTth8.mjs} +19 -29
  188. package/.output/server/chunks/build/hooks-D6PmTth8.mjs.map +1 -0
  189. package/.output/server/chunks/build/{index-CAnGTRlu.mjs → index-CJkn2jiM.mjs} +2 -2
  190. package/.output/server/chunks/build/{index-CAnGTRlu.mjs.map → index-CJkn2jiM.mjs.map} +1 -1
  191. package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
  192. package/.output/server/chunks/build/index-Cz9Y6NwN.mjs +723 -0
  193. package/.output/server/chunks/build/index-Cz9Y6NwN.mjs.map +1 -0
  194. package/.output/server/chunks/build/index-hwhuKhuZ.mjs +76 -0
  195. package/.output/server/chunks/build/index-hwhuKhuZ.mjs.map +1 -0
  196. package/.output/server/chunks/build/integrations-D5JWURiJ.mjs +1499 -0
  197. package/.output/server/chunks/build/integrations-D5JWURiJ.mjs.map +1 -0
  198. package/.output/server/chunks/build/{library-Aeg7_Lsb.mjs → library-DxRdgP6X.mjs} +2 -2
  199. package/.output/server/chunks/build/{library-Aeg7_Lsb.mjs.map → library-DxRdgP6X.mjs.map} +1 -1
  200. package/.output/server/chunks/build/{login-DnnElTl2.mjs → login-BmER_VoU.mjs} +2 -2
  201. package/.output/server/chunks/build/{login-DnnElTl2.mjs.map → login-BmER_VoU.mjs.map} +1 -1
  202. package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs +669 -0
  203. package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs.map +1 -0
  204. package/.output/server/chunks/build/server.mjs +65 -34
  205. package/.output/server/chunks/build/server.mjs.map +1 -1
  206. package/.output/server/chunks/build/settings-neokAVE5.mjs +154 -0
  207. package/.output/server/chunks/build/settings-neokAVE5.mjs.map +1 -0
  208. package/.output/server/chunks/build/styles.mjs +2 -2
  209. package/.output/server/chunks/build/{tasks-DnAFqbtt.mjs → tasks-CnpIQNpS.mjs} +27 -37
  210. package/.output/server/chunks/build/tasks-CnpIQNpS.mjs.map +1 -0
  211. package/.output/server/chunks/build/{useAgents-DHEXiFSc.mjs → useAgents-nmbkB9-_.mjs} +5 -26
  212. package/.output/server/chunks/build/useAgents-nmbkB9-_.mjs.map +1 -0
  213. package/.output/server/chunks/build/{view-n2sYa4Zh.mjs → view-mb0ISqfM.mjs} +3 -3
  214. package/.output/server/chunks/build/{view-n2sYa4Zh.mjs.map → view-mb0ISqfM.mjs.map} +1 -1
  215. package/.output/server/chunks/nitro/nitro.mjs +1000 -858
  216. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  217. package/.output/server/chunks/routes/api/index.get.mjs +17 -2
  218. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  219. package/.output/server/chunks/routes/api/index.get3.mjs +21 -3
  220. package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
  221. package/.output/server/chunks/routes/api/index.get4.mjs +10 -9
  222. package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
  223. package/.output/server/chunks/routes/api/index.get9.mjs +10 -8
  224. package/.output/server/chunks/routes/api/index.get9.mjs.map +1 -1
  225. package/.output/server/chunks/routes/api/memory/search.get.mjs +10 -5
  226. package/.output/server/chunks/routes/api/memory/search.get.mjs.map +1 -1
  227. package/.output/server/chunks/routes/renderer.mjs +1 -1
  228. package/.output/server/index.mjs +1 -1
  229. package/.output/server/package.json +1 -1
  230. package/app/components/AssistantPanel.client.vue +16 -314
  231. package/app/components/agents/AgentCard.vue +111 -0
  232. package/app/components/agents/AgentInfoCard.vue +54 -0
  233. package/app/components/agents/AgentRunHistory.vue +103 -0
  234. package/app/components/agents/AgentRunModal.vue +1 -24
  235. package/app/components/agents/AgentStatsCards.vue +1 -26
  236. package/app/components/assistant/AssistantChat.vue +156 -0
  237. package/app/components/assistant/AssistantTerminal.client.vue +178 -0
  238. package/app/components/chat/ConversationList.vue +2 -12
  239. package/app/components/files/FileTree.vue +23 -202
  240. package/app/components/files/FileTreeModals.vue +226 -0
  241. package/app/components/hooks/HookStatsCards.vue +1 -6
  242. package/app/components/hooks/ToolBreakdownTable.vue +1 -6
  243. package/app/components/search/DashboardSearch.vue +38 -1
  244. package/app/components/tasks/TaskCard.vue +2 -7
  245. package/app/components/tasks/TaskDetail.vue +4 -9
  246. package/app/composables/useSearch.ts +21 -11
  247. package/app/layouts/dashboard.vue +1 -1
  248. package/app/pages/agents/[id].vue +6 -197
  249. package/app/pages/agents/index.vue +9 -142
  250. package/app/pages/settings/account.vue +243 -0
  251. package/app/pages/settings/app.vue +230 -0
  252. package/app/pages/settings/index.vue +12 -0
  253. package/app/pages/settings/integrations.vue +794 -0
  254. package/app/pages/settings/manage-secrets.vue +295 -0
  255. package/app/pages/settings.vue +20 -1581
  256. package/dist/cli/index.js +676 -212
  257. package/package.json +1 -1
  258. package/server/api/agents/index.get.ts +20 -1
  259. package/server/api/conversations/index.get.ts +23 -5
  260. package/server/api/documents/index.get.ts +11 -9
  261. package/server/api/memory/search.get.ts +11 -6
  262. package/server/api/tasks/index.get.ts +11 -9
  263. package/server/drizzle/migrations/0016_full_text_search.sql +127 -0
  264. package/server/drizzle/migrations/meta/_journal.json +7 -0
  265. package/shared/types/index.ts +7 -1
  266. package/shared/utils/formatting.ts +105 -0
  267. package/.output/public/_nuxt/4ALIM-zZ.js +0 -1
  268. package/.output/public/_nuxt/5sUbkh_6.js +0 -16
  269. package/.output/public/_nuxt/6bB8Ev7a.js +0 -1
  270. package/.output/public/_nuxt/7rT1DCe2.js +0 -1
  271. package/.output/public/_nuxt/B2PqR2Vu.js +0 -1
  272. package/.output/public/_nuxt/B5FuOh7E.js +0 -1
  273. package/.output/public/_nuxt/B6om4MW2.js +0 -1
  274. package/.output/public/_nuxt/B7ikW4eF.js +0 -1
  275. package/.output/public/_nuxt/B9kWNcU7.js +0 -1
  276. package/.output/public/_nuxt/BAZ8sewA.js +0 -1
  277. package/.output/public/_nuxt/BCPwL4ma.js +0 -1
  278. package/.output/public/_nuxt/BCrlmHh_.js +0 -1
  279. package/.output/public/_nuxt/BD-AFJWW.js +0 -1
  280. package/.output/public/_nuxt/BGcQMReV.js +0 -1
  281. package/.output/public/_nuxt/BNJJSRKh.js +0 -1
  282. package/.output/public/_nuxt/BNeeERBt.js +0 -1
  283. package/.output/public/_nuxt/BSJb5amZ.js +0 -1
  284. package/.output/public/_nuxt/BSsaE9Db.js +0 -1
  285. package/.output/public/_nuxt/BVO3XpHT.js +0 -1
  286. package/.output/public/_nuxt/B_Lr1vlV.js +0 -1
  287. package/.output/public/_nuxt/Bl0qBhCG.js +0 -1
  288. package/.output/public/_nuxt/Bl43dkDq.js +0 -1
  289. package/.output/public/_nuxt/BnMTFF5R.js +0 -1
  290. package/.output/public/_nuxt/BtV7oNn3.js +0 -1
  291. package/.output/public/_nuxt/BvFYnRMR.js +0 -1
  292. package/.output/public/_nuxt/BvTUBUNN.js +0 -1
  293. package/.output/public/_nuxt/ByLsRRoQ.js +0 -1
  294. package/.output/public/_nuxt/C1LcEMwB.js +0 -1
  295. package/.output/public/_nuxt/C2IiXp9N.js +0 -2
  296. package/.output/public/_nuxt/C796kFT9.js +0 -1
  297. package/.output/public/_nuxt/C8AtdrMH.js +0 -1
  298. package/.output/public/_nuxt/CAWbHTgy.js +0 -1
  299. package/.output/public/_nuxt/CJPrV25_.js +0 -1
  300. package/.output/public/_nuxt/CKKEWapF.js +0 -1
  301. package/.output/public/_nuxt/CNjv28J2.js +0 -1
  302. package/.output/public/_nuxt/CT8s4rqa.js +0 -1
  303. package/.output/public/_nuxt/CZSOrxUy.js +0 -1
  304. package/.output/public/_nuxt/CaNEL9JC.js +0 -39
  305. package/.output/public/_nuxt/CbTLg9oX.js +0 -1
  306. package/.output/public/_nuxt/CfCXpVn5.js +0 -1
  307. package/.output/public/_nuxt/ChmNlvWR.js +0 -1
  308. package/.output/public/_nuxt/Ck0QYdxe.js +0 -1
  309. package/.output/public/_nuxt/Ckb0pu4-.js +0 -1
  310. package/.output/public/_nuxt/CkwPRs1D.js +0 -1
  311. package/.output/public/_nuxt/CmEJg8C6.js +0 -2
  312. package/.output/public/_nuxt/CmL_vMJD.js +0 -1
  313. package/.output/public/_nuxt/Cq8zPxkT.js +0 -1
  314. package/.output/public/_nuxt/CxRnB4NC.js +0 -1
  315. package/.output/public/_nuxt/D0zMyG8n.js +0 -1
  316. package/.output/public/_nuxt/D1XYB283.js +0 -1
  317. package/.output/public/_nuxt/D2NxqyzW.js +0 -1
  318. package/.output/public/_nuxt/D5xyrvFu.js +0 -1
  319. package/.output/public/_nuxt/D8iBB0Py.js +0 -1
  320. package/.output/public/_nuxt/D8oIH8m1.js +0 -1
  321. package/.output/public/_nuxt/DB2zZev7.js +0 -1
  322. package/.output/public/_nuxt/DBrOAqkm.js +0 -1
  323. package/.output/public/_nuxt/DDXDFweK.js +0 -1
  324. package/.output/public/_nuxt/DFZkCmLQ.js +0 -1
  325. package/.output/public/_nuxt/DKZmgHNU.js +0 -1
  326. package/.output/public/_nuxt/DR8tGJhL.js +0 -1
  327. package/.output/public/_nuxt/DVAEVTjy.js +0 -1
  328. package/.output/public/_nuxt/DVqrPkCJ.js +0 -1
  329. package/.output/public/_nuxt/DWZ9ieYa.js +0 -1
  330. package/.output/public/_nuxt/DWj6VsZv.js +0 -1
  331. package/.output/public/_nuxt/DXJ9PxCv.js +0 -1
  332. package/.output/public/_nuxt/D_ziPROx.js +0 -1
  333. package/.output/public/_nuxt/Da2vwoYG.js +0 -1
  334. package/.output/public/_nuxt/Ddz3HcBB.js +0 -1
  335. package/.output/public/_nuxt/DgYei0bK.js +0 -1
  336. package/.output/public/_nuxt/Di_3GV_R.js +0 -1
  337. package/.output/public/_nuxt/Djog1f_e.js +0 -1
  338. package/.output/public/_nuxt/Dkap2-Pj.js +0 -7
  339. package/.output/public/_nuxt/DlJe_sHk.js +0 -1
  340. package/.output/public/_nuxt/DlPOQpH_.js +0 -1
  341. package/.output/public/_nuxt/DmYWMtVA.js +0 -1
  342. package/.output/public/_nuxt/DmxKU7sH.js +0 -1
  343. package/.output/public/_nuxt/DsodHRrQ.js +0 -1
  344. package/.output/public/_nuxt/DwSY6_2U.js +0 -1
  345. package/.output/public/_nuxt/DypJaSm-.js +0 -1
  346. package/.output/public/_nuxt/DzKaXH6P.js +0 -1
  347. package/.output/public/_nuxt/FK-jSuOT.js +0 -1
  348. package/.output/public/_nuxt/Fc2JsQt4.js +0 -1
  349. package/.output/public/_nuxt/IYCBGuRS.js +0 -1
  350. package/.output/public/_nuxt/NrRzUJNY.js +0 -1
  351. package/.output/public/_nuxt/OeVS0Rsb.js +0 -1
  352. package/.output/public/_nuxt/OlF0QnKF.js +0 -1
  353. package/.output/public/_nuxt/QuAoqY7t.js +0 -1
  354. package/.output/public/_nuxt/RlXHkmOd.js +0 -9
  355. package/.output/public/_nuxt/WZnvL9Dh.js +0 -1
  356. package/.output/public/_nuxt/ZvG7a1W3.js +0 -1
  357. package/.output/public/_nuxt/aPNZBVrG.js +0 -1
  358. package/.output/public/_nuxt/builds/meta/495aca73-bfa5-456e-b96a-f02e009c72d3.json +0 -1
  359. package/.output/public/_nuxt/dashboard.BxCOkJwt.css +0 -1
  360. package/.output/public/_nuxt/entry.C_udkZt9.css +0 -1
  361. package/.output/public/_nuxt/evY81hM3.js +0 -1
  362. package/.output/public/_nuxt/i6QBzaEi.js +0 -1
  363. package/.output/public/_nuxt/iTVKJ1kw.js +0 -1
  364. package/.output/public/_nuxt/j92uR3uR.js +0 -1
  365. package/.output/public/_nuxt/jdUkeAj_.js +0 -1
  366. package/.output/public/_nuxt/jeRvcMHU.js +0 -1
  367. package/.output/public/_nuxt/kuv0zpKq.js +0 -1
  368. package/.output/public/_nuxt/l3lKQs7b.js +0 -1
  369. package/.output/public/_nuxt/qIgZ7OXa.js +0 -1
  370. package/.output/public/_nuxt/qcVwZv8e.js +0 -1
  371. package/.output/public/_nuxt/ru8fqqWs.js +0 -1
  372. package/.output/public/_nuxt/sgmhgpCS.js +0 -1
  373. package/.output/public/_nuxt/y2jv0da-.js +0 -1
  374. package/.output/public/_nuxt/yyS4-kAX.js +0 -1
  375. package/.output/public/_nuxt/zIoBLBHF.js +0 -1
  376. package/.output/public/_nuxt/zpazwPgx.js +0 -1
  377. package/.output/server/chunks/build/_id_-DN00UDdO.mjs.map +0 -1
  378. package/.output/server/chunks/build/chat-m4-n9vC6.mjs.map +0 -1
  379. package/.output/server/chunks/build/docs-ChGwOPg5.mjs.map +0 -1
  380. package/.output/server/chunks/build/hooks-D328DcO6.mjs.map +0 -1
  381. package/.output/server/chunks/build/index-C9PuieXh.mjs +0 -820
  382. package/.output/server/chunks/build/index-C9PuieXh.mjs.map +0 -1
  383. package/.output/server/chunks/build/settings-B2KXoGcz.mjs +0 -3232
  384. package/.output/server/chunks/build/settings-B2KXoGcz.mjs.map +0 -1
  385. package/.output/server/chunks/build/tasks-DnAFqbtt.mjs.map +0 -1
  386. package/.output/server/chunks/build/useAgents-DHEXiFSc.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ import{_ as Q,a as X}from"./CHnVFnBW.js";import{_ as Y}from"./MYeLvJGV.js";import{d as E,aj as I,i as D,e as b,M as N,o as u,Z as n,w as o,ac as d,ao as ee,c as g,_ as K,a as t,af as B,bm as W,ak as T,a0 as L,ab as w,aa as z,C as A,a5 as te,h as Z,ah as le,bl as oe,al as ne,am as ae,ag as se}from"./BOCn_SGf.js";import{_ as ie,a as re}from"./Bnn59-FS.js";import{_ as q}from"./DqR9SdeU.js";import{_ as de}from"./BTGeP1bA.js";import{_ as G}from"./BzrhNhdT.js";import{_ as H}from"./BhhMUror.js";import{_ as ue}from"./6VDUZECX.js";import{a as ce}from"./BXxZokD_.js";import{_ as me}from"./C2Gh3qqr.js";import{_ as fe}from"./C4sG6rdW.js";import"./BZm9w7en.js";import"./hCeWb_38.js";import"./8WMJQbWG.js";import"./_-TGPiLQ.js";import"./YZQjZgsH.js";import"./DTR31rjp.js";import"./Br81Sr2R.js";import"./BWqJInD3.js";import"./DVdnhfXT.js";import"./hrPTRWjM.js";import"./CVVtVzXC.js";import"./DLHnP6tw.js";import"./D41A2mE2.js";import"./jTT1R-Vz.js";import"./DZikIgHK.js";import"./C6Y-ieo6.js";import"./C6Eoiclo.js";import"./CxMuZEwX.js";import"./C1oaoi1p.js";import"./BLdMRpJD.js";import"./V04-MrLN.js";import"./D3cEeQh7.js";import"./B9o6sFST.js";import"./CuvkTsqs.js";import"./Vcq4gwWv.js";const pe={class:"h-full flex flex-col"},_e={key:0,class:"h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"},ve=["onContextmenu"],ye={class:"truncate"},ke={class:"flex items-center gap-2"},xe={class:"flex justify-end gap-2"},he={class:"flex items-center gap-2"},$e={class:"flex justify-end gap-2"},ge={class:"flex items-center gap-2 text-error"},be={key:0,class:"text-sm text-dimmed mt-1"},we={class:"flex justify-end gap-2"},Ce=E({__name:"FileTree",props:{skillName:{},files:{},selectedPath:{}},emits:["select","refresh"],setup(U,{emit:P}){const p=U,$=P,m=I();function l(y,e=""){return y.map(s=>{const S=e?`${e}/${s.path}`:s.path,C={id:S,label:s.name,path:S,type:s.type,defaultExpanded:!0};return s.type==="directory"?C.children=s.children?l(s.children,S):[]:s.name.endsWith(".py")?C.icon="i-lucide-file-code":s.name.endsWith(".md")?C.icon="i-lucide-file-text":s.name.endsWith(".json")?C.icon="i-lucide-file-json":C.icon="i-lucide-file",C})}const k=D(()=>l(p.files)),i=b(null),x=b(!1),_=b(!1),c=b(!1),f=b(""),j=D(()=>[[{label:"New File",icon:"i-lucide-file-plus",onSelect:()=>{f.value="",x.value=!0}},{label:"New Folder",icon:"i-lucide-folder-plus",onSelect:()=>{f.value="",_.value=!0}}],[{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>{i.value&&i.value.label!=="SKILL.md"&&(c.value=!0)}}]]);function h(y,e){e.type==="file"&&$("select",e.path)}async function a(){if(!f.value.trim())return;let y=f.value.trim();y.includes(".")||(y+=".py");const e=i.value?.type==="directory"?i.value.path:"",s=e?`${e}/${y}`:y;try{await $fetch(`/api/skills/${p.skillName}/files/create`,{method:"POST",body:{path:s,type:"file"}}),$("refresh"),$("select",s),m.add({title:`Created ${y}`,color:"success"})}catch{m.add({title:"Failed to create file",color:"error"})}x.value=!1,f.value=""}async function v(){if(!f.value.trim())return;const y=f.value.trim(),e=i.value?.type==="directory"?i.value.path:"",s=e?`${e}/${y}`:y;try{await $fetch(`/api/skills/${p.skillName}/files/create`,{method:"POST",body:{path:s,type:"directory"}}),$("refresh"),m.add({title:`Created ${y}/`,color:"success"})}catch{m.add({title:"Failed to create folder",color:"error"})}_.value=!1,f.value=""}async function V(){if(i.value){try{await $fetch(`/api/skills/${p.skillName}/files/delete`,{method:"POST",body:{path:i.value.path}}),$("refresh"),m.add({title:`Deleted ${i.value.label}`,color:"success"})}catch{m.add({title:"Failed to delete",color:"error"})}c.value=!1}}return(y,e)=>{const s=K,S=ie,C=re,O=q,F=L,M=de,R=G;return u(),N("div",pe,[n(C,{items:t(j)},{default:o(()=>[d("div",{class:"flex-1 h-full overflow-auto p-2",onContextmenu:e[0]||(e[0]=ee(r=>i.value=null,["self"]))},[U.files.length===0?(u(),N("div",_e,[n(s,{name:"i-lucide-folder-open",class:"size-8 mx-auto mb-2 opacity-50"}),e[9]||(e[9]=d("p",null,"No files found",-1)),e[10]||(e[10]=d("p",{class:"text-xs mt-1"}," Right-click to create a file ",-1))])):(u(),g(S,{key:1,items:t(k),"get-key":r=>r.id,color:"primary","expanded-icon":"i-lucide-folder-open","collapsed-icon":"i-lucide-folder",onSelect:h},{item:o(({item:r,expanded:J})=>[d("div",{class:"flex items-center gap-2 w-full",onContextmenu:Ke=>i.value=r},[r.children?.length?(u(),g(s,{key:0,name:J?"i-lucide-folder-open":"i-lucide-folder",class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):r.icon?(u(),g(s,{key:1,name:r.icon,class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):(u(),g(s,{key:2,name:"i-lucide-file",class:"size-4 shrink-0 text-dimmed"})),d("span",ye,B(r.label),1)],40,ve)]),_:1},8,["items","get-key"]))],32)]),_:1},8,["items"]),n(R,{open:t(x),"onUpdate:open":e[3]||(e[3]=r=>T(x)?x.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",ke,[n(s,{name:"i-lucide-file-plus",class:"size-5"}),e[11]||(e[11]=d("span",{class:"font-semibold"},"New File",-1))])]),footer:o(()=>[d("div",xe,[n(F,{color:"neutral",variant:"ghost",onClick:e[2]||(e[2]=r=>x.value=!1)},{default:o(()=>[...e[12]||(e[12]=[w(" Cancel ",-1)])]),_:1}),n(F,{onClick:a},{default:o(()=>[...e[13]||(e[13]=[w(" Create ",-1)])]),_:1})])]),default:o(()=>[n(O,{modelValue:t(f),"onUpdate:modelValue":e[1]||(e[1]=r=>T(f)?f.value=r:null),placeholder:"filename.py",autofocus:"",onKeyup:W(a,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),n(R,{open:t(_),"onUpdate:open":e[6]||(e[6]=r=>T(_)?_.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",he,[n(s,{name:"i-lucide-folder-plus",class:"size-5"}),e[14]||(e[14]=d("span",{class:"font-semibold"},"New Folder",-1))])]),footer:o(()=>[d("div",$e,[n(F,{color:"neutral",variant:"ghost",onClick:e[5]||(e[5]=r=>_.value=!1)},{default:o(()=>[...e[15]||(e[15]=[w(" Cancel ",-1)])]),_:1}),n(F,{onClick:v},{default:o(()=>[...e[16]||(e[16]=[w(" Create ",-1)])]),_:1})])]),default:o(()=>[n(O,{modelValue:t(f),"onUpdate:modelValue":e[4]||(e[4]=r=>T(f)?f.value=r:null),placeholder:"folder-name",autofocus:"",onKeyup:W(v,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),n(R,{open:t(c),"onUpdate:open":e[8]||(e[8]=r=>T(c)?c.value=r:null)},{content:o(()=>[n(M,null,{header:o(()=>[d("div",ge,[n(s,{name:"i-lucide-trash-2",class:"size-5"}),e[17]||(e[17]=d("span",{class:"font-semibold"},"Delete",-1))])]),footer:o(()=>[d("div",we,[n(F,{color:"neutral",variant:"ghost",onClick:e[7]||(e[7]=r=>c.value=!1)},{default:o(()=>[...e[20]||(e[20]=[w(" Cancel ",-1)])]),_:1}),n(F,{color:"error",onClick:V},{default:o(()=>[...e[21]||(e[21]=[w(" Delete ",-1)])]),_:1})])]),default:o(()=>[d("p",null,[e[18]||(e[18]=w(" Are you sure you want to delete ",-1)),d("strong",null,B(t(i)?.label),1),e[19]||(e[19]=w("? ",-1))]),t(i)?.type==="directory"?(u(),N("p",be," This will delete all files and folders inside. ")):z("",!0)]),_:1})]),_:1},8,["open"])])}}}),Ne=Object.assign(Ce,{__name:"SkillsFileTree"}),Ue=ce(me),Se={class:"flex flex-col h-full"},Fe={class:"flex items-center justify-between px-4 py-2 border-b border-default"},ze={class:"flex items-center gap-2 text-sm text-muted"},je={key:0,class:"flex-1 flex items-center justify-center"},Pe=E({__name:"Editor",props:{skillName:{},filePath:{}},emits:["saved"],setup(U,{emit:P}){const p=U,$=P,m=I(),l=b(""),k=b(""),i=b(!0),x=b(!1),_=D(()=>l.value!==k.value),c=D(()=>{switch(p.filePath.split(".").pop()?.toLowerCase()){case"py":return"python";case"md":return"markdown";case"json":return"json";case"ts":return"typescript";case"js":return"javascript";case"yaml":case"yml":return"yaml";case"sh":case"bash":return"bash";default:return"plaintext"}});async function f(){i.value=!0;try{const a=await $fetch(`/api/skills/${p.skillName}/files/read`,{method:"POST",body:{path:p.filePath}});l.value=a.data.content,k.value=a.data.content}catch{m.add({title:"Failed to load file",color:"error"})}finally{i.value=!1}}async function j(){x.value=!0;try{await $fetch(`/api/skills/${p.skillName}/files/write`,{method:"POST",body:{path:p.filePath,content:l.value}}),k.value=l.value,m.add({title:"File saved",color:"success"}),$("saved")}catch{m.add({title:"Failed to save file",color:"error"})}finally{x.value=!1}}function h(a){(a.metaKey||a.ctrlKey)&&a.key==="s"&&(a.preventDefault(),_.value&&j())}return A(()=>{f(),window.addEventListener("keydown",h)}),te(()=>{window.removeEventListener("keydown",h)}),Z(()=>p.filePath,()=>f()),(a,v)=>{const V=K,y=H,e=L,s=Ue;return u(),N("div",Se,[d("div",Fe,[d("div",ze,[n(V,{name:"i-lucide-file-code",class:"size-4"}),d("span",null,B(U.filePath),1),t(_)?(u(),g(y,{key:0,variant:"soft",color:"warning",size:"xs"},{default:o(()=>[...v[1]||(v[1]=[w(" Modified ",-1)])]),_:1})):z("",!0)]),n(e,{size:"xs",loading:t(x),disabled:!t(_),onClick:j},{default:o(()=>[...v[2]||(v[2]=[w(" Save ",-1)])]),_:1},8,["loading","disabled"])]),t(i)?(u(),N("div",je,[n(V,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):(u(),g(s,{key:1,modelValue:t(l),"onUpdate:modelValue":v[0]||(v[0]=S=>T(l)?l.value=S:null),language:t(c),class:"flex-1"},null,8,["modelValue","language"]))])}}}),Te=Object.assign(Pe,{__name:"SkillsEditor"}),Ve={class:"flex justify-end gap-2"},Me=E({__name:"RenameModal",props:{open:{type:Boolean},currentName:{}},emits:["update:open","renamed"],setup(U,{emit:P}){const p=U,$=P,m=I(),l=b(p.currentName),k=b(!1);Z(()=>p.currentName,_=>{l.value=_});function i(){$("update:open",!1)}async function x(){if(!(!l.value.trim()||l.value.trim()===p.currentName)){k.value=!0;try{await $fetch(`/api/skills/${p.currentName}/rename`,{method:"POST",body:{newName:l.value.trim()}}),m.add({title:`Skill renamed to '${l.value.trim()}'`,color:"success"}),$("renamed",l.value.trim()),i()}catch(_){const c=_ instanceof Error?_.message:"Failed to rename skill";m.add({title:c,color:"error"})}finally{k.value=!1}}}return(_,c)=>{const f=q,j=fe,h=L,a=G;return u(),g(a,{open:p.open,"onUpdate:open":c[1]||(c[1]=v=>$("update:open",v))},{header:o(()=>[...c[2]||(c[2]=[d("span",{class:"font-semibold"},"Rename Skill",-1)])]),body:o(()=>[n(j,{label:"New Name"},{default:o(()=>[n(f,{modelValue:t(l),"onUpdate:modelValue":c[0]||(c[0]=v=>T(l)?l.value=v:null),placeholder:"my-skill",disabled:t(k)},null,8,["modelValue","disabled"])]),_:1})]),footer:o(()=>[d("div",Ve,[n(h,{variant:"ghost",color:"neutral",disabled:t(k),onClick:i},{default:o(()=>[...c[3]||(c[3]=[w(" Cancel ",-1)])]),_:1},8,["disabled"]),n(h,{loading:t(k),disabled:!t(l).trim()||t(l).trim()===U.currentName,onClick:x},{default:o(()=>[...c[4]||(c[4]=[w(" Rename ",-1)])]),_:1},8,["loading","disabled"])])]),_:1},8,["open"])}}}),Re=Object.assign(Me,{__name:"SkillsRenameModal"}),De={class:"flex flex-1 min-w-0"},Oe={key:0,class:"p-4 space-y-2"},Be={class:"font-medium"},Ee={key:0,class:"flex-1 flex items-center justify-center h-full"},Ie={key:1,class:"flex-1 flex items-center justify-center h-full text-dimmed"},Le={class:"text-center"},Ut=E({__name:"[name]",setup(U){const P=le(),p=oe(),$=I(),m=D(()=>P.params.name),l=b(null),k=b(!0),i=b(""),x=b(!1);async function _(){k.value=!0;try{const h=await $fetch(`/api/skills/${m.value}`);if(l.value=h.data,!i.value){const a=h.data.files.find(v=>v.name==="SKILL.md");a&&(i.value=a.path)}}catch{$.add({title:"Skill not found",color:"error"}),p.push("/skills")}finally{k.value=!1}}async function c(){if(!(!l.value||l.value.core))try{const h=await $fetch(`/api/skills/${m.value}/toggle`,{method:"POST"});l.value.active=h.data.active,$.add({title:`${m.value} ${h.data.active?"enabled":"disabled"}`,color:"success"})}catch{$.add({title:"Failed to toggle skill",color:"error"})}}function f(h){p.replace(`/skills/${h}`)}function j(){window.open(`/api/skills/${m.value}/export`,"_blank")}return A(()=>_()),(h,a)=>{const v=X,V=Y,y=Ne,e=Q,s=K,S=se,C=H,O=ue,F=L,M=Te,R=Re;return u(),N("div",De,[n(e,{id:"skill-filetree",collapsible:"",resizable:"","min-size":12,"default-size":16,"max-size":24,class:"hidden lg:flex"},{header:o(()=>[n(v,null,{title:o(()=>[...a[3]||(a[3]=[d("span",{class:"text-sm font-medium truncate"},"Files",-1)])]),_:1})]),body:o(()=>[t(k)?(u(),N("div",Oe,[(u(),N(ne,null,ae(4,r=>n(V,{key:r,class:"h-6 w-full"})),64))])):t(l)?(u(),g(y,{key:1,"skill-name":t(m),files:t(l).files,"selected-path":t(i),onSelect:a[0]||(a[0]=r=>i.value=r),onRefresh:_},null,8,["skill-name","files","selected-path"])):z("",!0)]),_:1}),n(e,{id:"skill-editor",grow:"",ui:{body:"!p-0"}},{header:o(()=>[n(v,null,{title:o(()=>[n(S,{to:"/skills",class:"text-muted hover:text-default transition-colors"},{default:o(()=>[n(s,{name:"i-lucide-arrow-left",class:"size-4"})]),_:1}),d("span",Be,B(t(m)),1),t(l)?.core?(u(),g(C,{key:0,variant:"subtle",color:"primary",size:"xs"},{default:o(()=>[...a[4]||(a[4]=[w(" Core ",-1)])]),_:1})):z("",!0),t(l)&&!t(l).active?(u(),g(C,{key:1,variant:"subtle",color:"neutral",size:"xs"},{default:o(()=>[...a[5]||(a[5]=[w(" Disabled ",-1)])]),_:1})):z("",!0)]),right:o(()=>[t(l)&&!t(l).core?(u(),g(O,{key:0,"model-value":t(l).active,size:"sm","onUpdate:modelValue":c},null,8,["model-value"])):z("",!0),t(l)&&!t(l).core?(u(),g(F,{key:1,icon:"i-lucide-pencil",variant:"ghost",color:"neutral",size:"sm",onClick:a[1]||(a[1]=r=>x.value=!0)})):z("",!0),t(l)?(u(),g(F,{key:2,icon:"i-lucide-download",variant:"ghost",color:"neutral",size:"sm",onClick:j})):z("",!0)]),_:1})]),body:o(()=>[t(k)?(u(),N("div",Ee,[n(s,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):t(i)?(u(),g(M,{key:t(i),"skill-name":t(m),"file-path":t(i),onSaved:_},null,8,["skill-name","file-path"])):(u(),N("div",Ie,[d("div",Le,[n(s,{name:"i-lucide-file-code",class:"size-12 mx-auto mb-4 opacity-50"}),a[6]||(a[6]=d("p",null,"Select a file to edit",-1))])]))]),_:1}),t(l)?(u(),g(R,{key:0,open:t(x),"current-name":t(m),"onUpdate:open":a[2]||(a[2]=r=>x.value=r),onRenamed:f},null,8,["open","current-name"])):z("",!0)])}}});export{Ut as default};
@@ -0,0 +1 @@
1
+ import{d as I,c as y,o as s,w as l,ac as t,M as c,aa as v,af as u,Z as a,ab as f,_ as E,a as e,al as j,am as W,aU as St,aV as Bt,a0 as X,ah as Mt,bl as Tt,aj as Ft,i as F,bD as jt,av as It,e as h,h as Et,C as Nt,ak as H}from"./BOCn_SGf.js";import{_ as q}from"./BhhMUror.js";import{_ as Ot}from"./MYeLvJGV.js";import{_ as zt}from"./6VDUZECX.js";import{_ as Lt,a as Vt}from"./CHnVFnBW.js";import{_ as Ht}from"./CxSijT71.js";import{_ as Gt}from"./jC4pIK1p.js";import{_ as Y}from"./BTGeP1bA.js";import{a as qt,b as Pt,g as tt,c as G,d as et}from"./DqmQtg6Y.js";import{u as Zt,_ as Jt,a as Kt,b as Qt}from"./Daf2MbWG.js";import{a as Wt}from"./BXxZokD_.js";import{_ as Xt}from"./t8B72leH.js";import{_ as nt}from"./BzrhNhdT.js";import{u as Yt}from"./C2-_hcwB.js";import{u as te}from"./mzM4BGtv.js";import"./D3cEeQh7.js";import"./B9o6sFST.js";import"./CuvkTsqs.js";import"./BZm9w7en.js";import"./hCeWb_38.js";import"./8WMJQbWG.js";import"./C8ut0f5H.js";import"./CqkleIqs.js";import"./BVYYP4eQ.js";import"./DlAUqK2U.js";import"./DqR9SdeU.js";import"./C4sG6rdW.js";import"./D_k1YwXm.js";import"./BWqJInD3.js";import"./jTT1R-Vz.js";import"./C6Eoiclo.js";import"./CxMuZEwX.js";import"./hrPTRWjM.js";import"./DZikIgHK.js";import"./DTR31rjp.js";import"./DP8t9VWs.js";import"./DxE8r3r4.js";import"./D2edadpd.js";import"./D41A2mE2.js";import"./C6Y-ieo6.js";import"./Br81Sr2R.js";import"./C1oaoi1p.js";import"./DL4EpgqQ.js";import"./Vcq4gwWv.js";import"./BLdMRpJD.js";import"./V04-MrLN.js";import"./Gyw_2f6x.js";import"./CCeM5lW2.js";const ee={class:"space-y-3"},ne={key:0},se={class:"flex flex-wrap gap-6"},oe={class:"flex items-center gap-2"},ae={class:"text-sm text-muted"},ie={key:0},le={class:"flex items-center gap-2"},re={key:1},ue={class:"flex items-center gap-2"},ce=I({__name:"AgentInfoCard",props:{agent:{}},setup(n){return(x,p)=>{const i=E,_=Y;return s(),y(_,null,{default:l(()=>[t("div",ee,[n.agent.description?(s(),c("div",ne,[p[0]||(p[0]=t("p",{class:"text-sm text-muted uppercase mb-1"}," Description ",-1)),t("p",null,u(n.agent.description),1)])):v("",!0),t("div",se,[t("div",null,[p[1]||(p[1]=t("p",{class:"text-sm text-muted uppercase mb-1"}," Schedule ",-1)),t("p",oe,[a(i,{name:"i-lucide-clock"}),f(" "+u(e(qt)(n.agent.schedule))+" ",1),t("span",ae,"("+u(n.agent.schedule)+")",1)])]),n.agent.maxBudgetUsd?(s(),c("div",ie,[p[2]||(p[2]=t("p",{class:"text-sm text-muted uppercase mb-1"}," Budget Limit ",-1)),t("p",le,[a(i,{name:"i-lucide-dollar-sign"}),f(" $"+u(n.agent.maxBudgetUsd)+" per run ",1)])])):v("",!0),n.agent.lastRunAt?(s(),c("div",re,[p[3]||(p[3]=t("p",{class:"text-sm text-muted uppercase mb-1"}," Last Run ",-1)),t("p",ue,[a(i,{name:"i-lucide-activity"}),f(" "+u(e(Pt)(n.agent.lastRunAt)),1)])])):v("",!0)])])]),_:1})}}}),de=Object.assign(ce,{__name:"AgentsAgentInfoCard"}),me={class:"space-y-4"},pe={key:0,class:"flex items-center justify-center h-32"},ge={key:1,class:"flex flex-col items-center justify-center h-32 text-neutral-500"},fe={key:2,class:"space-y-2"},_e={class:"flex items-start justify-between gap-4"},ve={class:"flex-1 min-w-0"},xe={class:"flex items-center gap-2 mb-1"},ye={class:"text-sm text-muted"},he={class:"text-sm text-muted truncate"},$e={class:"text-right text-sm text-muted shrink-0"},be={key:0},ke=I({__name:"AgentRunHistory",props:{runs:{},loading:{type:Boolean}},emits:["select"],setup(n,{emit:x}){const p=x;function i(_,d=100){return _?_.length<=d?_:_.substring(0,d)+"...":"-"}return(_,d)=>{const b=E,k=q,A=Y;return s(),c("div",me,[d[2]||(d[2]=t("h2",{class:"text-lg font-semibold"}," Run History ",-1)),n.loading?(s(),c("div",pe,[a(b,{name:"i-lucide-loader-2",class:"w-6 h-6 animate-spin text-neutral-400"})])):n.runs.length===0?(s(),c("div",ge,[a(b,{name:"i-lucide-history",class:"w-8 h-8 mb-2"}),d[0]||(d[0]=t("p",null,"No runs yet",-1))])):(s(),c("div",fe,[(s(!0),c(j,null,W(n.runs,g=>(s(),y(A,{key:g.id,class:"cursor-pointer transition-all hover:ring-2 hover:ring-primary/50",onClick:P=>p("select",g)},{default:l(()=>[t("div",_e,[t("div",ve,[t("div",xe,[g.status==="running"?(s(),y(k,{key:0,color:"info",variant:"subtle",size:"sm"},{default:l(()=>[a(b,{name:"i-lucide-loader-2",class:"w-3 h-3 animate-spin mr-1"}),d[1]||(d[1]=f(" Running ",-1))]),_:1})):(s(),y(k,{key:1,color:e(tt)(g.status),size:"sm"},{default:l(()=>[f(u(g.status),1)]),_:2},1032,["color"])),t("span",ye,u(e(G)(g.startedAt)),1)]),t("p",he,u(g.error?i(g.error):i(g.output)),1)]),t("div",$e,[t("p",null,u(e(et)(g.durationMs)),1),g.costUsd?(s(),c("p",be," $"+u(g.costUsd.toFixed(4)),1)):v("",!0)])])]),_:2},1032,["onClick"]))),128))]))])}}}),Ae=Object.assign(ke,{__name:"AgentsAgentRunHistory"}),we={key:0,class:"p-4 space-y-4"},Ce={class:"flex flex-wrap items-center gap-4"},Ue={class:"text-sm text-muted"},Re={key:0,class:"text-sm text-muted"},De={class:"grid grid-cols-2 sm:grid-cols-4 gap-4 p-4 rounded-lg bg-muted/5"},Se={class:"font-medium"},Be={class:"font-medium"},Me={class:"font-medium"},Te={class:"font-medium"},Fe={key:0,class:"p-4 rounded-lg bg-error-500/10 border border-error-500/20"},je={class:"text-sm text-error-400 whitespace-pre-wrap font-mono overflow-x-auto"},Ie={key:1},Ee={class:"max-h-96 overflow-auto rounded-lg bg-muted/5 border border-default"},Ne={class:"p-4 text-sm whitespace-pre-wrap font-mono"},Oe={key:2,class:"text-center text-muted py-8"},ze={key:1,class:"p-4 text-center text-muted"},Le={class:"flex justify-end"},Ve=I({__name:"AgentRunModal",props:St({run:{}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(n){const x=Bt(n,"open");return(p,i)=>{const _=q,d=E,b=X,k=nt;return s(),y(k,{open:x.value,"onUpdate:open":i[1]||(i[1]=A=>x.value=A),title:(n.run,"Run Details"),ui:{content:"sm:max-w-3xl"}},{content:l(()=>[n.run?(s(),c("div",we,[t("div",Ce,[a(_,{color:e(tt)(n.run.status),size:"lg"},{default:l(()=>[f(u(n.run.status),1)]),_:1},8,["color"]),t("span",Ue," Started: "+u(e(G)(n.run.startedAt)),1),n.run.completedAt?(s(),c("span",Re," Completed: "+u(e(G)(n.run.completedAt)),1)):v("",!0)]),t("div",De,[t("div",null,[i[2]||(i[2]=t("p",{class:"text-xs text-muted uppercase"}," Duration ",-1)),t("p",Se,u(e(et)(n.run.durationMs)),1)]),t("div",null,[i[3]||(i[3]=t("p",{class:"text-xs text-muted uppercase"}," Cost ",-1)),t("p",Be,u(n.run.costUsd?`$${n.run.costUsd.toFixed(4)}`:"-"),1)]),t("div",null,[i[4]||(i[4]=t("p",{class:"text-xs text-muted uppercase"}," Input Tokens ",-1)),t("p",Me,u(n.run.inputTokens?.toLocaleString()||"-"),1)]),t("div",null,[i[5]||(i[5]=t("p",{class:"text-xs text-muted uppercase"}," Output Tokens ",-1)),t("p",Te,u(n.run.outputTokens?.toLocaleString()||"-"),1)])]),n.run.error?(s(),c("div",Fe,[i[6]||(i[6]=t("p",{class:"text-sm font-medium text-error-500 mb-2"}," Error ",-1)),t("pre",je,u(n.run.error),1)])):v("",!0),n.run.output?(s(),c("div",Ie,[i[7]||(i[7]=t("p",{class:"text-sm font-medium mb-2"}," Output ",-1)),t("div",Ee,[t("pre",Ne,u(n.run.output),1)])])):v("",!0),!n.run.output&&!n.run.error&&n.run.status==="running"?(s(),c("div",Oe,[a(d,{name:"i-lucide-loader-2",class:"size-8 animate-spin mb-2"}),i[8]||(i[8]=t("p",null,"Agent is currently running...",-1))])):v("",!0)])):(s(),c("div",ze," No run selected "))]),footer:l(()=>[t("div",Le,[a(b,{color:"neutral",variant:"ghost",onClick:i[0]||(i[0]=A=>x.value=!1)},{default:l(()=>[...i[9]||(i[9]=[f(" Close ",-1)])]),_:1})])]),_:1},8,["open","title"])}}}),He=Object.assign(Ve,{__name:"AgentsAgentRunModal"}),Ge=Wt(Qt),qe={class:"contents"},Pe={class:"flex items-center gap-3"},Ze={class:"font-semibold text-lg truncate"},Je={key:0,class:"flex items-center justify-center h-64"},Ke={key:1,class:"p-4 space-y-6"},Qe={class:"p-4 space-y-4"},We={class:"flex items-center gap-3"},Xe={class:"p-2 rounded-full bg-error-500/10"},Ye={class:"text-sm text-muted"},tn={class:"flex justify-end gap-2"},Wn=I({__name:"[id]",async setup(n){let x,p;const i=Mt(),_=Tt(),d=Ft(),{fetchAgentStats:b,fetchRuns:k,updateAgent:A,deleteAgent:g,toggleEnabled:P,runAgent:st,cancelAgent:ot}=Zt(),{isAgentRunning:at}=Yt(),S=F(()=>i.params.id),{data:it,status:lt,error:N,refresh:Z}=([x,p]=jt(()=>te(()=>`/api/agents/${S.value}`,{key:`agent-${S.value}`},"$aMAiG7xhIp")),x=await x,p(),x),r=F(()=>it.value?.data??null),rt=F(()=>lt.value==="pending");if(N.value)throw It({statusCode:N.value.statusCode||404,message:N.value.message||"Agent not found"});const R=h(null),O=h([]),z=h(!1),L=h(!1),J=F(()=>r.value?at(r.value.id)?!0:O.value.some(U=>U.status==="running"):!1),w=h("7d"),ut=[{label:"24h",value:"24h"},{label:"7d",value:"7d"},{label:"30d",value:"30d"}],C=h(!1),D=h(!1),K=h(null),B=h(!1);async function M(){z.value=!0;try{R.value=await b(S.value,w.value)}catch{}finally{z.value=!1}}async function T(){L.value=!0;try{O.value=await k(S.value,w.value)}catch{}finally{L.value=!1}}async function ct(){if(r.value)try{await P(r.value.id),await Z()}catch{d.add({title:"Failed to toggle agent",color:"error",icon:"i-lucide-alert-circle"})}}async function dt(){if(r.value)try{await st(r.value.id),setTimeout(T,1e3)}catch{d.add({title:"Failed to run agent",color:"error",icon:"i-lucide-alert-circle"})}}async function mt(){if(r.value)try{await ot(r.value.id),d.add({title:"Agent cancelled",color:"warning",icon:"i-lucide-x-circle"}),setTimeout(()=>{T(),M()},1e3)}catch{d.add({title:"Failed to cancel agent",description:"No running execution found",color:"error",icon:"i-lucide-alert-circle"})}}async function pt(U){if(r.value)try{await A(r.value.id,U),d.add({title:"Agent updated",color:"success",icon:"i-lucide-check"}),C.value=!1,Z(),M()}catch(o){d.add({title:"Failed to update agent",description:o instanceof Error?o.message:"An unexpected error occurred",color:"error",icon:"i-lucide-alert-circle"})}}async function gt(){if(r.value)try{await g(r.value.id),d.add({title:"Agent deleted",color:"success",icon:"i-lucide-check"}),_.push("/agents")}catch{d.add({title:"Failed to delete agent",color:"error",icon:"i-lucide-alert-circle"})}}function ft(U){K.value=U,B.value=!0}return Et(w,()=>{M(),T()}),Nt(()=>{M(),T()}),(U,o)=>{const $=X,V=E,Q=q,_t=Ot,vt=zt,xt=Vt,yt=Ht,ht=Gt,$t=de,bt=Jt,kt=Ge,At=Ae,wt=Lt,Ct=Kt,Ut=Xt,Rt=nt,Dt=He;return s(),c("div",qe,[a(wt,{id:"agent-detail",grow:""},{header:l(()=>[a(xt,null,{left:l(()=>[t("div",Pe,[a($,{icon:"i-lucide-arrow-left",variant:"ghost",size:"sm",onClick:o[0]||(o[0]=m=>e(_).push("/agents"))}),e(r)?(s(),c(j,{key:0},[t("h1",Ze,u(e(r).name),1),e(J)?(s(),y(Q,{key:0,color:"info",variant:"subtle"},{default:l(()=>[a(V,{name:"i-lucide-loader-2",class:"w-3 h-3 animate-spin mr-1"}),o[8]||(o[8]=f(" Running ",-1))]),_:1})):e(r).enabled?v("",!0):(s(),y(Q,{key:1,color:"neutral",variant:"subtle"},{default:l(()=>[...o[9]||(o[9]=[f(" Disabled ",-1)])]),_:1}))],64)):(s(),y(_t,{key:1,class:"h-6 w-32"}))])]),right:l(()=>[e(r)?(s(),c(j,{key:0},[a(vt,{"model-value":e(r).enabled,"onUpdate:modelValue":ct},null,8,["model-value"]),e(J)?(s(),y($,{key:0,icon:"i-lucide-square",variant:"ghost",color:"error",onClick:mt})):(s(),y($,{key:1,icon:"i-lucide-play",variant:"ghost",disabled:!e(r).enabled,onClick:dt},null,8,["disabled"])),a($,{icon:"i-lucide-pencil",variant:"ghost",onClick:o[1]||(o[1]=m=>C.value=!0)}),a($,{icon:"i-lucide-trash-2",variant:"ghost",color:"error",onClick:o[2]||(o[2]=m=>D.value=!0)})],64)):v("",!0)]),_:1}),a(ht,null,{left:l(()=>[a(yt,null,{default:l(()=>[(s(),c(j,null,W(ut,m=>a($,{key:m.value,color:e(w)===m.value?"primary":"neutral",variant:e(w)===m.value?"solid":"ghost",size:"sm",onClick:en=>w.value=m.value},{default:l(()=>[f(u(m.label),1)]),_:2},1032,["color","variant","onClick"])),64))]),_:1})]),_:1})]),body:l(()=>[e(rt)?(s(),c("div",Je,[a(V,{name:"i-lucide-loader-2",class:"w-8 h-8 animate-spin text-neutral-400"})])):e(r)?(s(),c("div",Ke,[a($t,{agent:e(r)},null,8,["agent"]),a(bt,{stats:e(R),loading:e(z),variant:"detail"},null,8,["stats","loading"]),e(R)&&e(R).dailyRuns.length>0?(s(),y(kt,{key:0,data:e(R).dailyRuns,title:"Run Activity"},null,8,["data"])):v("",!0),a(At,{runs:e(O),loading:e(L),onSelect:ft},null,8,["runs","loading"])])):v("",!0)]),_:1}),a(Ut,{open:e(C),"onUpdate:open":o[4]||(o[4]=m=>H(C)?C.value=m:null)},{title:l(()=>[...o[10]||(o[10]=[f(" Edit Agent ",-1)])]),body:l(()=>[a(Ct,{agent:e(r),onSubmit:pt,onCancel:o[3]||(o[3]=m=>C.value=!1)},null,8,["agent"])]),_:1},8,["open"]),a(Rt,{open:e(D),"onUpdate:open":o[6]||(o[6]=m=>H(D)?D.value=m:null)},{content:l(()=>[t("div",Qe,[t("div",We,[t("div",Xe,[a(V,{name:"i-lucide-alert-triangle",class:"w-6 h-6 text-error-500"})]),t("div",null,[o[11]||(o[11]=t("h3",{class:"font-semibold"}," Delete Agent ",-1)),t("p",Ye,' Are you sure you want to delete "'+u(e(r)?.name)+'"? This action cannot be undone. ',1)])])])]),footer:l(()=>[t("div",tn,[a($,{color:"neutral",variant:"ghost",onClick:o[5]||(o[5]=m=>D.value=!1)},{default:l(()=>[...o[12]||(o[12]=[f(" Cancel ",-1)])]),_:1}),a($,{color:"error",onClick:gt},{default:l(()=>[...o[13]||(o[13]=[f(" Delete ",-1)])]),_:1})])]),_:1},8,["open"]),a(Dt,{open:e(B),"onUpdate:open":o[7]||(o[7]=m=>H(B)?B.value=m:null),run:e(K)},null,8,["open","run"])])}}});export{Wn as default};
@@ -0,0 +1 @@
1
+ import{T as w,d as O,aQ as P,aR as q,aS as x,e as v,a4 as B,c as U,o as D,w as S,Z as G,a as d,P as M,r as N}from"./BOCn_SGf.js";import{u as L}from"./BWqJInD3.js";const V="rovingFocusGroup.onEntryFocus",k={bubbles:!1,cancelable:!0},K={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Y(e,o){return o!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Z(e,o,a){const t=Y(e.key,a);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return K[t]}function $(e,o=!1){const a=w();for(const t of e)if(t===a||(t.focus({preventScroll:o}),w()!==a))return}function J(e,o){return e.map((a,t)=>e[(o+t)%e.length])}const[W,j]=P("RovingFocusGroup");var z=O({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:o,emit:a}){const t=e,g=a,{loop:I,orientation:m,dir:T}=q(t),F=L(T),f=x(t,"currentTabStopId",g,{defaultValue:t.defaultCurrentTabStopId,passive:t.currentTabStopId===void 0}),i=v(!1),l=v(!1),p=v(0),{getItems:b,CollectionSlot:A}=B({isProvider:!0});function h(r){const s=!l.value;if(r.currentTarget&&r.target===r.currentTarget&&s&&!i.value){const u=new CustomEvent(V,k);if(r.currentTarget.dispatchEvent(u),g("entryFocus",u),!u.defaultPrevented){const c=b().map(n=>n.ref).filter(n=>n.dataset.disabled!==""),C=c.find(n=>n.getAttribute("data-active")===""),_=c.find(n=>n.getAttribute("data-highlighted")===""),y=c.find(n=>n.id===f.value),R=[C,_,y,...c].filter(Boolean);$(R,t.preventScrollOnEntryFocus)}}l.value=!1}function E(){setTimeout(()=>{l.value=!1},1)}return o({getItems:b}),j({loop:I,dir:F,orientation:m,currentTabStopId:f,onItemFocus:r=>{f.value=r},onItemShiftTab:()=>{i.value=!0},onFocusableItemAdd:()=>{p.value++},onFocusableItemRemove:()=>{p.value--}}),(r,s)=>(D(),U(d(A),null,{default:S(()=>[G(d(M),{tabindex:i.value||p.value===0?-1:0,"data-orientation":d(m),as:r.as,"as-child":r.asChild,dir:d(F),style:{outline:"none"},onMousedown:s[0]||(s[0]=u=>l.value=!0),onMouseup:E,onFocus:h,onBlur:s[1]||(s[1]=u=>i.value=!1)},{default:S(()=>[N(r.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),X=z;export{K as M,X as R,$ as f,Z as g,W as i,J as w};
@@ -0,0 +1,9 @@
1
+ import{as as _o,R as Uo,h as ti,C as ei,x as Tn,i as At,d as ni,a5 as si,c as lt,o as Q,w as H,r as $o,m as qt,aY as be,c7 as No,cb as Wo,e as ii,c9 as Ko,g as Go,ar as zo,b7 as Ho,aX as Xo,cc as Yo,L as oi,bN as qo,K as Zo,W as Jo,M as xn,Z as z,a as j,cd as bn,aa as Sn,$ as wn,al as Qo,ap as An,ce as tr,cf as er,ad as nr,cg as sr,S as ir}from"./BOCn_SGf.js";import{D as or,a as rr,b as ar}from"./BLdMRpJD.js";import{c as Pn,h as lr}from"./hCeWb_38.js";import"./DTR31rjp.js";const Wt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ur(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,d=!1)=>{const p=d&&i?n:s;return h&&o.add(u),p.has(u)||p.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const X={},cr=40;function ri(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Wt.reduce((v,w)=>(v[w]=ur(r),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:f,postRender:p}=o,m=()=>{const v=X.useManualTiming?i.timestamp:performance.now();n=!1,X.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,cr),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:Wt.reduce((v,w)=>{const T=o[w];return v[w]=(A,C=!1,S=!1)=>(n||g(),T.schedule(A,C,S)),v},{}),cancel:v=>{for(let w=0;w<Wt.length;w++)o[Wt[w]].cancel(v)},state:i,steps:o}}const k=t=>t,{schedule:V,cancel:Y,state:B,steps:re}=ri(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0);let Ht;function hr(){Ht=void 0}const F={now:()=>(Ht===void 0&&F.set(B.isProcessing||X.useManualTiming?B.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(hr)}},U=t=>t*1e3,W=t=>t/1e3;function fr(t,e){const n=F.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Y(s),t(r-e))};return V.setup(s,!0),()=>Y(s)}const ai=t=>e=>typeof e=="string"&&e.startsWith(t),Ue=ai("--"),dr=ai("var(--"),$e=t=>dr(t)?pr.test(t.split("/*")[0].trim()):!1,pr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lt={};function li(t){for(const e in t)Lt[e]=t[e],Ue(e)&&(Lt[e].isCSSVariable=!0)}function kt(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,s=Symbol(n);return[o=>{const a=_o(s,o);if(a===void 0)throw new Error(`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(Uo(s,o),o)]}const[mr,gr]=kt("Motion"),[yr]=kt("LayoutGroup");function Vn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}class Z{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(){}beforeUnmount(){}}function Pt(t,e,n){if(Array.isArray(t))return t.reduce((s,i)=>{const r=Pt(i,e,n);return r?{...s,...r}:s},{});if(typeof t=="object")return t;if(t&&e){const s=e[t];return typeof s=="function"?s(n):s}}function vr(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!Tr(t,e):t!==e}function Tr(t,e){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function En(t){return t?.startsWith("--")}const xr=t=>t;function br(t){return typeof t=="number"}const Sr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],wr=new Set(Sr);function ui(t){return wr.has(t)}class Ar{constructor(e){this.features=[];const{features:n=[],lazyMotionContext:s}=e.options,i=n.concat(s.features.value);this.features=i.map(o=>new o(e));const r=this.features;ti(s.features,o=>{o.forEach(a=>{if(!i.includes(a)){i.push(a);const l=new a(e);r.push(l),e.isMounted()&&(l.beforeMount(),l.mount())}})},{flush:"pre"})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>{var n;return(n=e.beforeMount)==null?void 0:n.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var n;return(n=e.update)==null?void 0:n.call(e)})}beforeUpdate(){this.features.forEach(e=>e.beforeUpdate())}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}const ft=new WeakMap;function ae(t){const e=ft.get(t);e&&t.removeEventListener("motioncomplete",e),ft.delete(t)}const[Pr,Vr]=kt("AnimatePresenceContext");function Er(t){const e={initial:t.initial,custom:t.custom};ti(()=>t.custom,n=>{e.custom=n},{flush:"pre"}),Vr(e),ei(()=>{e.initial=void 0})}function Cr(t){return typeof t=="string"||t===!1||Array.isArray(t)}const Vt=new WeakMap;let Mr=0;class Dr{constructor(e,n){var s;this.element=null,this.isSafeToRemove=!1,this.isVShow=!1,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=k,this.id=`motion-state-${Mr++}`,this.options=e,this.parent=n,(s=n?.children)==null||s.add(this);const r=(e.initial===void 0&&e.variants?this.context.initial:e.initial)===!1?["initial","animate"]:["initial"];this.initTarget(r),this.featureManager=new Ar(this),this.type=ui(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(n,s)=>{var i;return Cr(this.options[s])?this.options[s]:(i=this.parent)==null?void 0:i.context[s]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var n;const s=this.options.custom??((n=this.options.animatePresenceContext)==null?void 0:n.custom);this.baseTarget=e.reduce((i,r)=>({...i,...Pt(this.options[r]||this.context[r],this.options.variants,s)}),{}),this.target={}}updateOptions(e){var n;this.options=e,(n=this.visualElement)==null||n.update({...this.options,whileTap:this.options.whilePress},{isPresent:!ft.has(this.element)})}beforeMount(){this.featureManager.beforeMount()}mount(e,n,s=!1){var i,r;this.element=e,this.updateOptions(n),this.options.layoutId&&((i=this.visualElement.projection.getStack())==null?void 0:i.members.length)>0,this.featureManager.mount(),!s&&this.options.animate&&((r=this.startAnimation)==null||r.call(this))}clearAnimation(){var e,n;this.currentProcess&&Y(this.currentProcess),this.currentProcess=null,(n=(e=this.visualElement)==null?void 0:e.variantChildren)==null||n.forEach(s=>{s.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=V.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(e=!1){var n;const s=this.options.layoutId&&((n=this.visualElement.projection)==null?void 0:n.getStack().lead)===this.visualElement.projection&&this.visualElement.projection.isProjecting(),i=()=>{var r,o,a;e&&Array.from(this.children).reverse().forEach(this.unmountChild),(o=(r=this.parent)==null?void 0:r.children)==null||o.delete(this),Vt.delete(this.element),this.featureManager.unmount(),(a=this.visualElement)==null||a.unmount(),this.clearAnimation()};s?Promise.resolve().then(()=>{i()}):i()}unmountChild(e){e.unmount(!0)}beforeUpdate(){this.featureManager.beforeUpdate()}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,n,s=!0){var i;!this.element||this.activeStates[e]===n||(this.activeStates[e]=n,(i=this.visualElement.variantChildren)==null||i.forEach(r=>{r.state.setActive(e,n,!1)}),s&&this.animateUpdates({isExit:e==="exit"&&this.activeStates.exit}))}isMounted(){return!!this.element}willUpdate(e){var n;(this.options.layout||this.options.layoutId)&&((n=this.visualElement.projection)==null||n.willUpdate())}}const at=new WeakMap;function Cn(t,e,n){return new CustomEvent(t,{detail:{target:e,isExit:n}})}const Mn={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>`${t}deg`},Rr={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>`${t}px`},rotate:Mn,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:xr},skew:Mn},Lr=["translate","scale","rotate","skew"],Br=["","X","Y","Z"],Ne=new Map,Zt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];Lr.forEach(t=>{Br.forEach(e=>{Zt.push(t+e),Ne.set(t+e,Rr[t])})});const jr=new Set(Zt),Fr=t=>jr.has(t),Dn={x:"translateX",y:"translateY",z:"translateZ"};function kr([t],[e]){return Zt.indexOf(t)-Zt.indexOf(e)}function Or(t,[e,n]){return`${t} ${e}(${n})`}function Ir(t){return t.sort(kr).reduce(Or,"").trim()}const Rn={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},Ot=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),tt=Ot("deg"),K=Ot("%"),x=Ot("px"),_r=Ot("vh"),Ur=Ot("vw"),Ln={...K,parse:t=>K.parse(t)/100,transform:t=>K.transform(t*100)},L=t=>!!(t&&t.getVelocity),$r={get:(t,e)=>{let n=En(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!=="0"){const s=Ne.get(e);s&&(n=s.initialValue)}return n},set:(t,e,n)=>{En(e)?t.style.setProperty(e,n):t.style[e]=n}};function Nr(t){var e;const n={},s=[];for(let i in t){let r=t[i];r=L(r)?r.get():r,Fr(i)&&i in Dn&&(i=Dn[i]);let o=Array.isArray(r)?r[0]:r;const a=Ne.get(i);a?(o=br(r)?(e=a.toDefaultUnit)==null?void 0:e.call(a,r):r,s.push([i,o])):n[i]=o}return s.length&&(n.transform=Ir(s)),Object.keys(n).length===0?null:n}const Wr={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function Kr(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Gr(t,e,n=1,s=0){t.pathLength=1,delete t["path-length"],t["stroke-dashoffset"]=x.transform(-s);const i=x.transform(e),r=x.transform(n);t["stroke-dasharray"]=`${i} ${r}`}function zr(t){const e={},n={};for(const s in t){const i=Kr(s);if(i in Wr){const r=t[s];e[i]=L(r)?r.get():r}else n[s]=t[s]}return e["path-length"]!==void 0&&Gr(e,e["path-length"],e["path-spacing"],e["path-offset"]),{attrs:e,style:n}}function Hr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Xr(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Yr(t,e){return Hr(Xr(t.getBoundingClientRect(),e))}const Bn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Se={};for(const t in Bn)Se[t]={isEnabled:e=>Bn[t].some(n=>!!e[n])};const jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:jn(),y:jn()}),Fn=()=>({min:0,max:0}),D=()=>({x:Fn(),y:Fn()}),qr=typeof window<"u",Jt={current:null},ci={current:!1};function Zr(){if(ci.current=!0,!!qr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Jt.current=t.matches;t.addEventListener("change",e),e()}else Jt.current=!1}function Jr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Qr(t){return typeof t=="string"||Array.isArray(t)}const ta=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ea=["initial",...ta];function hi(t){return Jr(t.animate)||ea.some(e=>Qr(t[e]))}function na(t){return!!(hi(t)||t.variants)}function We(t,e){t.indexOf(e)===-1&&t.push(e)}function ie(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Ke{constructor(){this.subscriptions=[]}add(e){return We(this.subscriptions,e),()=>ie(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function fi(t,e){return e?t*(1e3/e):0}const kn=30,sa=t=>!isNaN(parseFloat(t));class ia{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var i;const r=F.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=F.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=sa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ke);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=F.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>kn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,kn);return fi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dt(t,e){return new ia(t,e)}function oa(t,e,n){for(const s in e){const i=e[s],r=n[s];if(L(i))t.addValue(s,i);else if(L(r))t.addValue(s,dt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,dt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}function On(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function di(t,e,n,s){if(typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function ra(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const st=t=>t*180/Math.PI,we=t=>{const e=st(Math.atan2(t[1],t[0]));return Ae(e)},aa={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:we,rotateZ:we,skewX:t=>st(Math.atan(t[1])),skewY:t=>st(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ae=t=>(t=t%360,t<0&&(t+=360),t),In=we,_n=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Un=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),la={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_n,scaleY:Un,scale:t=>(_n(t)+Un(t))/2,rotateX:t=>Ae(st(Math.atan2(t[6],t[5]))),rotateY:t=>Ae(st(Math.atan2(-t[2],t[0]))),rotateZ:In,rotate:In,skewX:t=>st(Math.atan(t[4])),skewY:t=>st(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pe(t){return t.includes("scale")?1:0}function Ve(t,e){if(!t||t==="none")return Pe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=la,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=aa,i=a}if(!i)return Pe(e);const r=s[e],o=i[1].split(",").map(ca);return typeof r=="function"?r(o):o[r]}const ua=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ve(n,e)};function ca(t){return parseFloat(t.trim())}const mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gt=new Set(mt),q=(t,e,n)=>n>e?e:n<t?t:n,yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Bt={...yt,transform:t=>q(0,1,t)},Kt={...yt,default:1},$n=t=>t===yt||t===x,ha=new Set(["x","y","z"]),fa=mt.filter(t=>!ha.has(t));function da(t){const e=[];return fa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ot={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ve(e,"x"),y:(t,{transform:e})=>Ve(e,"y")};ot.translateX=ot.x;ot.translateY=ot.y;const rt=new Set;let Ee=!1,Ce=!1,Me=!1;function pi(){if(Ce){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=da(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ce=!1,Ee=!1,rt.forEach(t=>t.complete(Me)),rt.clear()}function mi(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ce=!0)})}function pa(){Me=!0,mi(),pi(),Me=!1}class Ge{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(rt.add(this),Ee||(Ee=!0,V.read(mi),V.resolveKeyframes(pi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}ra(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),rt.delete(this)}cancel(){this.state==="scheduled"&&(rt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const gi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),yi=t=>/^0[^.\s]+$/u.test(t),Et=t=>Math.round(t*1e5)/1e5,ze=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ma(t){return t==null}const ga=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,He=(t,e)=>n=>!!(typeof n=="string"&&ga.test(n)&&n.startsWith(t)||e&&!ma(n)&&Object.prototype.hasOwnProperty.call(n,e)),vi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ze);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ya=t=>q(0,255,t),le={...yt,transform:t=>Math.round(ya(t))},it={test:He("rgb","red"),parse:vi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+le.transform(t)+", "+le.transform(e)+", "+le.transform(n)+", "+Et(Bt.transform(s))+")"};function va(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const De={test:He("#"),parse:va,transform:it.transform},ct={test:He("hsl","hue"),parse:vi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+K.transform(Et(e))+", "+K.transform(Et(n))+", "+Et(Bt.transform(s))+")"},R={test:t=>it.test(t)||De.test(t)||ct.test(t),parse:t=>it.test(t)?it.parse(t):ct.test(t)?ct.parse(t):De.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?it.transform(t):ct.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},Ta=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xa(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ze))==null?void 0:e.length)||0)+(((n=t.match(Ta))==null?void 0:n.length)||0)>0}const Ti="number",xi="color",ba="var",Sa="var(",Nn="${}",wa=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(wa,l=>(R.test(l)?(s.color.push(r),i.push(xi),n.push(R.parse(l))):l.startsWith(Sa)?(s.var.push(r),i.push(ba),n.push(l)):(s.number.push(r),i.push(Ti),n.push(parseFloat(l))),++r,Nn)).split(Nn);return{values:n,split:a,indexes:s,types:i}}function bi(t){return jt(t).values}function Si(t){const{split:e,types:n}=jt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ti?r+=Et(i[o]):a===xi?r+=R.transform(i[o]):r+=i[o]}return r}}const Aa=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function Pa(t){const e=bi(t);return Si(t)(e.map(Aa))}const et={test:xa,parse:bi,createTransformer:Si,getAnimatableNone:Pa},Va={test:t=>t==="auto",parse:t=>t},wi=t=>e=>e.test(t),Ai=[yt,x,K,tt,Ur,_r,Va],Wn=t=>Ai.find(wi(t)),Ea=[...Ai,R,et],Ca=t=>Ea.find(wi(t)),Ma=new Set(["brightness","contrast","saturate","opacity"]);function Da(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ze)||[];if(!s)return t;const i=n.replace(s,"");let r=Ma.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ra=/\b([a-z-]*)\(.*?\)/gu,Re={...et,getAnimatableNone:t=>{const e=t.match(Ra);return e?e.map(Da).join(" "):t}},Kn={...yt,transform:Math.round},La={rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:tt,skewX:tt,skewY:tt,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:Bt,originX:Ln,originY:Ln,originZ:x},Xe={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,backgroundPositionX:x,backgroundPositionY:x,...La,zIndex:Kn,fillOpacity:Bt,strokeOpacity:Bt,numOctaves:Kn},Ba={...Xe,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Re,WebkitFilter:Re},Pi=t=>Ba[t];function Vi(t,e){let n=Pi(t);return n!==Re&&(n=et),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const{schedule:Ei}=ri(queueMicrotask,!0),Gn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ci{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ge,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=F.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,V.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=hi(n),this.isVariantNode=na(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const f=h[d];l[d]!==void 0&&L(f)&&f.set(l[d])}}mount(e){var n;this.current=e,at.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),ci.current||Zr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Jt.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Y(this.notifyUpdate),Y(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=gt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Se){const n=Se[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):D()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Gn.length;s++){const i=Gn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=oa(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=dt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(gi(s)||yi(s))?s=parseFloat(s):!Ca(s)&&et.test(n)&&(s=Vi(e,n)),this.setBaseTarget(e,L(s)?s.get():s)),L(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=di(this.props,s,(n=this.presenceContext)==null?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!L(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ke),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Ei.render(this.render)}}const Mi=new Set(["width","height","top","left","right","bottom",...mt]);let Ye=()=>{};const ja=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fa(t){const e=ja.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Di(t,e,n=1){const[s,i]=Fa(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return gi(o)?parseFloat(o):o}return $e(i)?Di(i,e,n+1):i}function ka(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||yi(t):!0}const Oa=new Set(["auto","none","0"]);function Ia(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Oa.has(r)&&jt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Vi(n,i)}class _a extends Ge{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),$e(c))){const u=Di(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Mi.has(s)||e.length!==2)return;const[i,r]=e,o=Wn(i),a=Wn(r);if(o!==a)if($n(o)&&$n(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||ka(e[i]))&&s.push(i);s.length&&Ia(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ot[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(e=this.removedTransforms)!=null&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class Ri extends Ci{constructor(){super(...arguments),this.KeyframeResolver=_a}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}const Li=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ua={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$a=mt.length;function Na(t,e,n){let s="",i=!0;for(let r=0;r<$a;r++){const o=mt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Li(a,Xe[o]);if(!l){i=!1;const u=Ua[o]||o;s+=`${u}(${c}) `}n&&(e[o]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Bi(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(gt.has(l)){o=!0;continue}else if(Ue(l)){i[l]=c;continue}else{const u=Li(c,Xe[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=Na(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}function ji(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function Wa(t,{layout:e,layoutId:n}){return gt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Lt[t]||t==="opacity")}function Fi(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||Wa(o,t)||((s=n?.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Ka(t){return window.getComputedStyle(t)}class ki extends Ri{constructor(){super(...arguments),this.type="html",this.renderInstance=ji}readValueFromInstance(e,n){var s;if(gt.has(n))return(s=this.projection)!=null&&s.isProjecting?Pe(n):ua(e,n);{const i=Ka(e),r=(Ue(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Yr(e,n)}build(e,n,s){Bi(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Fi(e,n,s)}}const qe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ga={offset:"stroke-dashoffset",array:"stroke-dasharray"},za={offset:"strokeDashoffset",array:"strokeDasharray"};function Ha(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Ga:za;t[r.offset]=x.transform(-s);const o=x.transform(e),a=x.transform(n);t[r.array]=`${o} ${a}`}function Xa(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(Bi(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Ha(h,i,r,o,!1)}const Oi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ya=t=>typeof t=="string"&&t.toLowerCase()==="svg";function qa(t,e,n,s){ji(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Oi.has(i)?i:qe(i),e.attrs[i])}function Za(t,e,n){const s=Fi(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=mt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Ii extends Ri{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=D}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(gt.has(n)){const s=Pi(n);return s&&s.default||0}return n=Oi.has(n)?n:qe(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Za(e,n,s)}build(e,n,s){Xa(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){qa(e,n,s,i)}mount(e){this.isSVGTag=Ya(e.tagName),super.mount(e)}}function Ja(t,e){return ui(t)?new Ii(e):new ki(e)}function Qa(t,e,n,s=0,i=1){const r=Array.from(t),o=r.indexOf(e),a=t.size,l=(a-1)*s,c=typeof n=="function";return o===r.length-1&&(e.parent.enteringChildren=void 0),c?n(o,a):i===1?o*s:l-o*s}function Ze(t){return typeof t=="object"&&!Array.isArray(t)}function Je(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function _i(t,e,n,s){return typeof t=="string"&&Ze(e)?Je(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function tl(t,e,n){return t*(e+1)}function zn(t,e,n,s){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}const E=(t,e,n)=>t+(e-t)*n,el=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Ui=t=>Array.isArray(t)&&typeof t[0]!="number";function $i(t,e){return Ui(t)?t[el(0,t.length,e)]:t}function nl(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(ie(t,i),s--)}}function sl(t,e,n,s,i,r){nl(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:E(i,r,s[o]),easing:$i(n,o)})}function il(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function ol(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const pt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};function Ni(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=pt(0,e,s);t.push(E(n,1,i))}}function Wi(t){const e=[0];return Ni(e,t.length-1),e}const Qt=2e4;function Qe(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Qt;)e+=n,s=t.next(e);return e>=Qt?1/0:e}function Ki(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Qe(s),Qt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:W(i)}}function tn(t){return typeof t=="function"&&"applyToOptions"in t}const rl="easeInOut";function al(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,o=new Map,a=new Map,l={},c=new Map;let u=0,h=0,d=0;for(let f=0;f<t.length;f++){const p=t[f];if(typeof p=="string"){c.set(p,h);continue}else if(!Array.isArray(p)){c.set(p.name,zn(h,p.at,u,c));continue}let[m,g,y={}]=p;y.at!==void 0&&(h=zn(h,y.at,u,c));let b=0;const v=(w,T,A,C=0,S=0)=>{const P=ll(w),{delay:O=0,times:$=Wi(P),type:oe="keyframes",repeat:Ut,repeatType:Mh,repeatDelay:Dh=0,...Io}=T;let{ease:J=e.ease||"easeOut",duration:G}=T;const dn=typeof O=="function"?O(C,S):O,pn=P.length,mn=tn(oe)?oe:i?.[oe||"keyframes"];if(pn<=2&&mn){let vt=100;if(pn===2&&hl(P)){const Tt=P[1]-P[0];vt=Math.abs(Tt)}const $t={...Io};G!==void 0&&($t.duration=U(G));const Nt=Ki($t,vt,mn);J=Nt.ease,G=Nt.duration}G??(G=r);const gn=h+dn;$.length===1&&$[0]===0&&($[1]=1);const yn=$.length-P.length;if(yn>0&&Ni($,yn),P.length===1&&P.unshift(null),Ut){G=tl(G,Ut);const vt=[...P],$t=[...$];J=Array.isArray(J)?[...J]:[J];const Nt=[...J];for(let Tt=0;Tt<Ut;Tt++){P.push(...vt);for(let xt=0;xt<vt.length;xt++)$.push($t[xt]+(Tt+1)),J.push(xt===0?"linear":$i(Nt,xt-1))}il($,Ut)}const vn=gn+G;sl(A,P,J,$,gn,vn),b=Math.max(dn+G,b),d=Math.max(vn,d)};if(L(m)){const w=Hn(m,a);v(g,y,Xn("default",w))}else{const w=_i(m,g,s,l),T=w.length;for(let A=0;A<T;A++){g=g,y=y;const C=w[A],S=Hn(C,a);for(const P in g)v(g[P],ul(y,P),Xn(P,S),A,T)}}u=h,h+=b}return a.forEach((f,p)=>{for(const m in f){const g=f[m];g.sort(ol);const y=[],b=[],v=[];for(let T=0;T<g.length;T++){const{at:A,value:C,easing:S}=g[T];y.push(C),b.push(pt(0,d,A)),v.push(S||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),v.unshift(rl)),b[b.length-1]!==1&&(b.push(1),y.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const w=o.get(p);w.keyframes[m]=y,w.transition[m]={...e,duration:d,ease:v,times:b,...n}}}),o}function Hn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Xn(t,e){return e[t]||(e[t]=[]),e[t]}function ll(t){return Array.isArray(t)?t:[t]}function ul(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const cl=t=>typeof t=="number",hl=t=>t.every(cl),fl=t=>Array.isArray(t);function dl(t,e,n){const s=t.getProps();return di(s,e,s.custom,t)}function pl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,dt(n))}function ml(t){return fl(t)?t[t.length-1]||0:t}function gl(t,e){const n=dl(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ml(r[o]);pl(t,o,a)}}function yl(t){return!!(L(t)&&t.add)}function vl(t,e){const n=t.getValue("willChange");if(yl(n))return n.add(e);if(!n&&X.WillChange){const s=new X.WillChange("auto");t.addValue("willChange",s),s.add(e)}}const Tl="framerAppearId",xl="data-"+qe(Tl);function Gi(t){return t.props[xl]}const bl=t=>t!==null;function Sl(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(bl),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const wl={type:"spring",stiffness:500,damping:25,restSpeed:10},Al=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Pl={type:"keyframes",duration:.8},Vl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},El=(t,{keyframes:e})=>e.length>2?Pl:gt.has(t)?t.startsWith("scale")?Al(e[1]):wl:Vl;function Cl({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function en(t,e){return t?.[e]??t?.default??t}function Le(t){t.duration=0,t.type}function ue(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ml({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ue(l,a,t+1/3),r=ue(l,a,t),o=ue(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function te(t,e){return n=>n>0?e:t}const ce=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Dl=[De,it,ct],Rl=t=>Dl.find(e=>e.test(t));function Yn(t){const e=Rl(t);if(!e)return!1;let n=e.parse(t);return e===ct&&(n=Ml(n)),n}const qn=(t,e)=>{const n=Yn(t),s=Yn(e);if(!n||!s)return te(t,e);const i={...n};return r=>(i.red=ce(n.red,s.red,r),i.green=ce(n.green,s.green,r),i.blue=ce(n.blue,s.blue,r),i.alpha=E(n.alpha,s.alpha,r),it.transform(i))},Be=new Set(["none","hidden"]);function Ll(t,e){return Be.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}const Bl=(t,e)=>n=>e(t(n)),It=(...t)=>t.reduce(Bl);function jl(t,e){return n=>E(t,e,n)}function nn(t){return typeof t=="number"?jl:typeof t=="string"?$e(t)?te:R.test(t)?qn:Ol:Array.isArray(t)?zi:typeof t=="object"?R.test(t)?qn:Fl:te}function zi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>nn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Fl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=nn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function kl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const Ol=(t,e)=>{const n=et.createTransformer(e),s=jt(t),i=jt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Be.has(t)&&!i.values.length||Be.has(e)&&!s.values.length?Ll(t,e):It(zi(kl(s,i),i.values),n):te(t,e)};function Hi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):nn(t)(t,e)}const Il=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>Y(e),now:()=>B.isProcessing?B.timestamp:F.now()}},Xi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},_l=5;function Yi(t,e,n){const s=Math.max(e-_l,0);return fi(n-t(s),e-s)}const M={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},he=.001;function Ul({duration:t=M.duration,bounce:e=M.bounce,velocity:n=M.velocity,mass:s=M.mass}){let i,r,o=1-e;o=q(M.minDamping,M.maxDamping,o),t=q(M.minDuration,M.maxDuration,W(t)),o<1?(i=c=>{const u=c*o,h=u*t,d=u-n,f=je(c,o),p=Math.exp(-h);return he-d/f*p},r=c=>{const h=c*o*t,d=h*n+n,f=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=je(Math.pow(c,2),o);return(-i(c)+he>0?-1:1)*((d-f)*p)/m}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-he+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Nl(i,r,a);if(t=U(t),isNaN(l))return{stiffness:M.stiffness,damping:M.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const $l=12;function Nl(t,e,n){let s=n;for(let i=1;i<$l;i++)s=s-t(s)/e(s);return s}function je(t,e){return t*Math.sqrt(1-e*e)}const Wl=["duration","bounce"],Kl=["stiffness","damping","mass"];function Zn(t,e){return e.some(n=>t[n]!==void 0)}function Gl(t){let e={velocity:M.velocity,stiffness:M.stiffness,damping:M.damping,mass:M.mass,isResolvedFromDuration:!1,...t};if(!Zn(t,Kl)&&Zn(t,Wl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:M.mass,stiffness:i,damping:r}}else{const n=Ul(t);e={...e,...n,mass:M.mass},e.isResolvedFromDuration=!0}return e}function Ft(t=M.visualDuration,e=M.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=Gl({...n,velocity:-W(n.velocity||0)}),p=d||0,m=c/(2*Math.sqrt(l*u)),g=o-r,y=W(Math.sqrt(l/u)),b=Math.abs(g)<5;s||(s=b?M.restSpeed.granular:M.restSpeed.default),i||(i=b?M.restDelta.granular:M.restDelta.default);let v;if(m<1){const T=je(y,m);v=A=>{const C=Math.exp(-m*y*A);return o-C*((p+m*y*g)/T*Math.sin(T*A)+g*Math.cos(T*A))}}else if(m===1)v=T=>o-Math.exp(-y*T)*(g+(p+y*g)*T);else{const T=y*Math.sqrt(m*m-1);v=A=>{const C=Math.exp(-m*y*A),S=Math.min(T*A,300);return o-C*((p+m*y*g)*Math.sinh(S)+T*g*Math.cosh(S))/T}}const w={calculatedDuration:f&&h||null,next:T=>{const A=v(T);if(f)a.done=T>=h;else{let C=T===0?p:0;m<1&&(C=T===0?U(p):Yi(v,T,A));const S=Math.abs(C)<=s,P=Math.abs(o-A)<=i;a.done=S&&P}return a.value=a.done?o:A,a},toString:()=>{const T=Math.min(Qe(w),Qt),A=Xi(C=>w.next(T*C).value,T,30);return T+"ms "+A},toTransition:()=>{}};return w}Ft.applyToOptions=t=>{const e=Ki(t,100,Ft);return t.ease=e.ease,t.duration=U(e.duration),t.type="keyframes",t};function Fe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},f=S=>a!==void 0&&S<a||l!==void 0&&S>l,p=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const b=S=>-m*Math.exp(-S/s),v=S=>y+b(S),w=S=>{const P=b(S),O=v(S);d.done=Math.abs(P)<=c,d.value=d.done?y:O};let T,A;const C=S=>{f(d.value)&&(T=S,A=Ft({keyframes:[d.value,p(d.value)],velocity:Yi(v,S,d.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:S=>{let P=!1;return!A&&T===void 0&&(P=!0,w(S),C(S)),T!==void 0&&S>=T?A.next(S-T):(!P&&w(S),d)}}}function zl(t,e,n){const s=[],i=n||X.mix||Hi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||k:e;a=It(l,a)}s.push(a)}return s}function Hl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Ye(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=zl(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const d=pt(t[h],t[h+1],u);return a[h](d)};return n?u=>c(q(t[0],t[r-1],u)):c}function Xl(t,e){return t.map(n=>n*e)}const qi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Yl=1e-7,ql=12;function Zl(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=qi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Yl&&++a<ql);return o}function _t(t,e,n,s){if(t===e&&n===s)return k;const i=r=>Zl(r,0,1,t,n);return r=>r===0||r===1?r:qi(i(r),e,s)}const Jl=_t(.42,0,1,1),Ql=_t(0,0,.58,1),Zi=_t(.42,0,.58,1),Ji=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Qi=t=>e=>1-t(1-e),to=_t(.33,1.53,.69,.99),sn=Qi(to),eo=Ji(sn),no=t=>(t*=2)<1?.5*sn(t):.5*(2-Math.pow(2,-10*(t-1))),on=t=>1-Math.sin(Math.acos(t)),so=Qi(on),io=Ji(on),oo=t=>Array.isArray(t)&&typeof t[0]=="number",tu={linear:k,easeIn:Jl,easeInOut:Zi,easeOut:Ql,circIn:on,circInOut:io,circOut:so,backIn:sn,backInOut:eo,backOut:to,anticipate:no},eu=t=>typeof t=="string",Jn=t=>{if(oo(t)){Ye(t.length===4);const[e,n,s,i]=t;return _t(e,n,s,i)}else if(eu(t))return tu[t];return t};function nu(t,e){return t.map(()=>e||Zi).splice(0,t.length-1)}function Ct({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ui(s)?s.map(Jn):Jn(s),r={done:!1,value:e[0]},o=Xl(n&&n.length===e.length?n:Wi(e),t),a=Hl(o,e,{ease:Array.isArray(i)?i:nu(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const su=t=>t!==null;function rn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(su),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const iu={decay:Fe,inertia:Fe,tween:Ct,keyframes:Ct,spring:Ft};function ro(t){typeof t.type=="string"&&(t.type=iu[t.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ou=t=>t/100;class ln extends an{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:i}=this.options;i&&i.updatedAt!==F.now()&&this.tick(F.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ro(e);const{type:n=Ct,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Ct;l!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=It(ou,Hi(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Qe(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const S=Math.min(this.currentTime,i)/a;let P=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&P--,P=Math.min(P,h+1),P%2&&(d==="reverse"?(O=1-O,f&&(O-=f/a)):d==="mirror"&&(w=o)),v=q(0,1,O)*a}const T=b?{done:!1,value:u[0]}:w.next(v);r&&(T.value=r(T.value));let{done:A}=T;!b&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&p!==Fe&&(T.value=rn(u,this.options,g,this.speed)),m&&m(T.value),C&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return W(this.calculatedDuration)}get time(){return W(this.currentTime)}set time(e){var n;e=U(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(F.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=W(this.currentTime))}play(){var e,n;if(this.isStopped)return;const{driver:s=Il,startTime:i}=this.options;this.driver||(this.driver=s(o=>this.tick(o))),(n=(e=this.options).onPlay)==null||n.call(e);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=i??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(F.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}const ru=t=>t.startsWith("--");function au(t,e,n){ru(e)?t.style.setProperty(e,n):t.style[e]=n}function un(t){let e;return()=>(e===void 0&&(e=t()),e)}const lu=un(()=>window.ScrollTimeline!==void 0),uu={};function cu(t,e){const n=un(t);return()=>uu[e]??n()}const ao=cu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),St=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:St([0,.65,.55,1]),circOut:St([.55,0,1,.45]),backIn:St([.31,.01,.66,-.59]),backOut:St([.33,1.53,.69,.99])};function lo(t,e){if(t)return typeof t=="function"?ao()?Xi(t,e):"ease-out":oo(t)?St(t):Array.isArray(t)?t.map(n=>lo(n,e)||Qn.easeOut):Qn[t]}function hu(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=lo(a,i);Array.isArray(h)&&(u.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function fu({type:t,...e}){return tn(t)&&ao()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class du extends an{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Ye(typeof e.type!="string");const c=fu(e);this.animation=hu(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=rn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):au(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var e,n;const s=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return W(Number(s))}get time(){return W(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=U(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&lu()?(this.animation.timeline=e,k):n(this)}}const uo={anticipate:no,backInOut:eo,circInOut:io};function pu(t){return t in uo}function mu(t){typeof t.ease=="string"&&pu(t.ease)&&(t.ease=uo[t.ease])}const ts=10;class gu extends du{constructor(e){mu(e),ro(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ln({...o,autoplay:!1}),l=U(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ts).value,a.sample(l).value,ts),a.stop()}}const es=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(et.test(t)||t==="0")&&!t.startsWith("url("));function yu(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function vu(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=es(i,e),a=es(r,e);return!o||!a?!1:yu(t)||(n==="spring"||tn(n))&&s}const Tu=new Set(["opacity","clipPath","filter","transform"]),xu=un(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bu(t){var e;const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(((e=n?.owner)==null?void 0:e.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return xu()&&s&&Tu.has(s)&&(s!=="transform"||!u)&&!c&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}const Su=40;class wu extends an{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var d;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=F.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},p=u?.KeyframeResolver||Ge;this.keyframeResolver=new p(a,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,c,u),(d=this.keyframeResolver)==null||d.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=F.now(),vu(e,r,o,a)||((X.instantAnimations||!l)&&u?.(rn(e,s,n)),e[0]=e[e.length-1],Le(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Su?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!c&&bu(d)?new gu({...d,element:d.motionValue.owner.current}):new ln(d);f.finished.then(()=>this.notifyFinished()).catch(k),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),pa()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const cn=(t,e,n,s={},i,r)=>o=>{const a=en(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-U(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Cl(a)||Object.assign(u,El(t,u)),u.duration&&(u.duration=U(u.duration)),u.repeatDelay&&(u.repeatDelay=U(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Le(u),u.delay===0&&(h=!0)),(X.instantAnimations||X.skipAnimations)&&(h=!0,Le(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=Sl(u.keyframes,a);if(d!==void 0){V.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new ln(u):new wu(u)};function Au({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Pu(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const h=t.getValue(u,t.latestValues[u]??null),d=a[u];if(d===void 0||c&&Au(c,u))continue;const f={delay:n,...en(r||{},u)},p=h.get();if(p!==void 0&&!h.isAnimating&&!Array.isArray(d)&&d===p&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=Gi(t);if(y){const b=window.MotionHandoffAnimation(y,u,V);b!==null&&(f.startTime=b,m=!0)}}vl(t,u),h.start(cn(u,h,d,t.shouldReduceMotion&&Mi.has(u)?{type:!1}:f,t,m));const g=h.animation;g&&l.push(g)}return o&&Promise.all(l).then(()=>{V.update(()=>{o&&gl(t,o)})}),l}function Vu(t,e){return t in e}class Eu extends Ci{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(Vu(n,e)){const s=e[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return D()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function co(t){return typeof t=="object"&&t!==null}function hn(t){return co(t)&&"ownerSVGElement"in t}function ho(t){return hn(t)&&t.tagName==="svg"}function Cu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=hn(t)&&!ho(t)?new Ii(e):new ki(e);n.mount(t),at.set(t,n)}function Mu(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Eu(e);n.mount(t),at.set(t,n)}function fo(t,e,n){const s=L(t)?t:dt(t);return s.start(cn("",s,e,n)),s.animation}function Du(t,e){return L(t)||typeof t=="number"||typeof t=="string"&&!Ze(e)}function po(t,e,n,s){const i=[];if(Du(t,e))i.push(fo(t,Ze(e)&&e.default||e,n&&(n.default||n)));else{const r=_i(t,e,s),o=r.length;for(let a=0;a<o;a++){const l=r[a],c=l instanceof Element?Cu:Mu;at.has(l)||c(l);const u=at.get(l),h={...n};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),i.push(...Pu(u,{...e,transition:h},{}))}}return i}function Ru(t,e,n){const s=[];return al(t,e,n,{spring:Ft}).forEach(({keyframes:r,transition:o},a)=>{s.push(...po(a,r,o))}),s}class Lu{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>s.attachTimeline(e));return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Bu extends Lu{then(e,n){return this.finished.finally(e).then(()=>{})}}function ju(t){return Array.isArray(t)&&t.some(Array.isArray)}function Fu(t){function e(n,s,i){let r=[];return ju(n)?r=Ru(n,s,t):r=po(n,s,i,t),new Bu(r)}return e}const ku=Fu(),Ou=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];class Iu extends Z{constructor(e){var n,s;super(e),this.animateUpdates=({controlActiveState:i,directAnimate:r,directTransition:o,controlDelay:a=0,isExit:l}={})=>{const{reducedMotion:c}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion=c==="always"||c==="user"&&!!Jt.current;const u=this.state.target;this.state.target={...this.state.baseTarget};let h={};h=this.resolveStateAnimation({controlActiveState:i,directAnimate:r,directTransition:o}),this.state.finalTransition=h;const d=this.createAnimationFactories(u,h,a),{getChildAnimations:f}=this.setupChildAnimations(h,this.state.activeStates);return this.executeAnimations({factories:d,getChildAnimations:f,transition:h,controlActiveState:i,isExit:l})},this.state.visualElement=Ja(this.state.options.as,{presenceContext:null,parent:(n=this.state.parent)==null?void 0:n.visualElement,props:{...this.state.options,whileTap:this.state.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.state.baseTarget}},reducedMotionConfig:this.state.options.motionConfig.reducedMotion}),(s=this.state.visualElement.parent)==null||s.addChild(this.state.visualElement),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;Vn(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:n,transition:s,controlActiveState:i,isExit:r=!1}){const o=()=>Promise.all(e.map(h=>h()).filter(Boolean)),a={...this.state.target},l=this.state.element,c=h=>{var d,f;l.dispatchEvent(Cn("motionstart",a)),(f=(d=this.state.options).onAnimationStart)==null||f.call(d,a),h.then(()=>{var p,m;l.dispatchEvent(Cn("motioncomplete",a,r)),(m=(p=this.state.options).onAnimationComplete)==null||m.call(p,a)}).catch(k)},u=()=>{const h=s?.when?(s.when==="beforeChildren"?o():n()).then(()=>s.when==="beforeChildren"?n():o()):Promise.all([o(),n()]);return c(h),h};return i?u:u()}setupChildAnimations(e,n){var s;const i=this.state.visualElement;if(!((s=i.variantChildren)!=null&&s.size)||!n)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:r=0,staggerDirection:o=1,delayChildren:a=0}=e||{},l=i.variantChildren.size,c=(l-1)*r,u=typeof a=="function",h=u?f=>a(f,l):o===1?(f=0)=>f*r:(f=0)=>c-f*r,d=Array.from(i.variantChildren).map((f,p)=>f.state.animateUpdates({controlActiveState:n,controlDelay:(u?0:a)+h(p)}));return{getChildAnimations:()=>Promise.all(d.map(f=>f()))}}createAnimationFactories(e,n,s){const i=[];return Object.keys(this.state.target).forEach(r=>{var o;if(!vr(e[r],this.state.target[r]))return;(o=this.state.baseTarget)[r]??(o[r]=$r.get(this.state.element,r));const a=this.state.target[r]==="none"&&Tn(Rn[r])?Rn[r]:this.state.target[r];i.push(()=>{var l;return ku(this.state.element,{[r]:a},{...n?.[r]||n,delay:(((l=n?.[r])==null?void 0:l.delay)||n?.delay||0)+s})})}),i}resolveStateAnimation({controlActiveState:e,directAnimate:n,directTransition:s}){let i=this.state.options.transition,r={};const{variants:o,custom:a,transition:l,animatePresenceContext:c}=this.state.options,u=a??c?.custom;return this.state.activeStates={...this.state.activeStates,...e},Ou.forEach(h=>{if(!this.state.activeStates[h]||Vn(this.state.options[h]))return;const d=this.state.options[h];let f=Tn(d)?Pt(d,o,u):void 0;if(this.state.visualElement.isVariantNode){const p=Pt(this.state.context[h],o,u);f=Object.assign(p?p||{}:r,f)}f&&(h!=="initial"&&(i=f.transition||this.state.options.transition||{}),r=Object.assign(r,f))}),n&&(r=Pt(n,o,u),i=r.transition||s||l),Object.entries(r).forEach(([h,d])=>{h!=="transition"&&(this.state.target[h]=d)}),i}mount(){var e,n;const{element:s}=this.state;Vt.set(s,this.state),at.get(s)||(this.state.visualElement.mount(s),at.set(s,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription();const i=this.state.visualElement,r=i.parent;if(i.enteringChildren=void 0,(e=this.state.parent)!=null&&e.isMounted()&&!i.isControllingVariants&&((n=r?.enteringChildren)!=null&&n.has(i))){const{delayChildren:o}=this.state.parent.finalTransition||{};this.animateUpdates({controlActiveState:this.state.parent.activeStates,controlDelay:Qa(r.enteringChildren,i,o)})()}}update(){const{animate:e}=this.state.options,{animate:n}=this.state.visualElement.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;(e=this.unmountControls)==null||e.call(this)}}function _u(t){return co(t)&&"offsetHeight"in t}const Uu={y:!1};function $u(){return Uu.y}const mo=(t,e)=>e?t===e?!0:mo(t,e.parentElement):!1,Nu=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function go(t,e){const n=Je(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}const Wu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ku(t){return Wu.has(t.tagName)||t.tabIndex!==-1}const Xt=new WeakSet;function ns(t){return e=>{e.key==="Enter"&&t(e)}}function fe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Gu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ns(()=>{if(Xt.has(n))return;fe(n,"down");const i=ns(()=>{fe(n,"up")}),r=()=>fe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function ss(t){return Nu(t)&&!0}function zu(t,e,n={}){const[s,i,r]=go(t,n),o=a=>{const l=a.currentTarget;if(!ss(a))return;Xt.add(l);const c=e(l,a),u=(f,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),Xt.has(l)&&Xt.delete(l),ss(f)&&typeof c=="function"&&c(f,{success:p})},h=f=>{u(f,l===window||l===document||n.useGlobalTarget||mo(l,f.target))},d=f=>{u(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),_u(a)&&(a.addEventListener("focus",c=>Gu(c,i)),!Ku(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function yo(t){return{point:{x:t.pageX,y:t.pageY}}}function is(t,e,n){const s=t.options;s.whilePress&&t.setActive("whilePress",n==="Start");const i=`onPress${n==="End"?"":n}`,r=s[i];r&&V.postRender(()=>r(e,yo(e)))}class Hu extends Z{isActive(){const{whilePress:e,onPress:n,onPressCancel:s,onPressStart:i}=this.state.options;return!!(e||n||s||i)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:n,onPressCancel:s,onPressStart:i}=this.state.options;e||n||s||i||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=zu(e,(n,s)=>(is(this.state,s,"Start"),(i,{success:r})=>is(this.state,i,r?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}}function os(t){return!(t.pointerType==="touch"||$u())}function Xu(t,e,n={}){const[s,i,r]=go(t,n),o=a=>{if(!os(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{os(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}function rs(t,e,n){const s=t.options;s.whileHover&&t.setActive("whileHover",n==="Start");const i=`onHover${n}`,r=s[i];r&&V.postRender(()=>r(e,yo(e)))}class Yu extends Z{isActive(){const{whileHover:e,onHoverStart:n,onHoverEnd:s}=this.state.options;return!!(e||n||s)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:n,onHoverEnd:s}=this.state.visualElement.prevProps;e||n||s||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=Xu(e,(n,s)=>(rs(this.state,s,"Start"),i=>{rs(this.state,i,"End")})))}}const qu={some:0,all:1};function Zu(t,e,{root:n,margin:s,amount:i="some"}={}){const r=Je(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const d=e(u.target,u);typeof d=="function"?o.set(u.target,d):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:qu[i]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}function as(t,e,n){const s=t.options;s.whileInView&&t.setActive("whileInView",n==="Enter");const i=`onViewport${n}`,r=s[i];r&&V.postRender(()=>r(e))}class Ju extends Z{isActive(){const{whileInView:e,onViewportEnter:n,onViewportLeave:s}=this.state.options;return!!(e||n||s)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const{once:n,...s}=this.state.options.inViewOptions||{};this.unmount=Zu(e,(i,r)=>{if(as(this.state,r,"Enter"),!n)return o=>{as(this.state,r,"Leave")}},s)}mount(){this.startObserver()}update(){const{props:e,prevProps:n}=this.state.visualElement;["amount","margin","root"].some(Qu(e,n))&&this.startObserver()}}function Qu({inViewOptions:t={}},{inViewOptions:e={}}={}){return n=>t[n]!==e[n]}function ee(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}class tc extends Z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(":focus-visible")}catch{e=!0}e&&(this.state.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&(this.state.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=It(ee(this.state.element,"focus",()=>this.onFocus()),ee(this.state.element,"blur",()=>this.onBlur()))}}const ec=(t,e)=>t.depth-e.depth;class nc{constructor(){this.children=[],this.isDirty=!1}add(e){We(this.children,e),this.isDirty=!0}remove(e){ie(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ec),this.isDirty=!1,this.children.forEach(e)}}function de(t){return L(t)?t.get():t}const vo=["TopLeft","TopRight","BottomLeft","BottomRight"],sc=vo.length,ls=t=>typeof t=="string"?parseFloat(t):t,us=t=>typeof t=="number"||x.test(t);function ic(t,e,n,s,i,r){i?(t.opacity=E(0,n.opacity??1,oc(s)),t.opacityExit=E(e.opacity??1,0,rc(s))):r&&(t.opacity=E(e.opacity??1,n.opacity??1,s));for(let o=0;o<sc;o++){const a=`border${vo[o]}Radius`;let l=cs(e,a),c=cs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||us(l)===us(c)?(t[a]=Math.max(E(ls(l),ls(c),s),0),(K.test(c)||K.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function cs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const oc=To(0,.5,so),rc=To(.5,.95,k);function To(t,e,n){return s=>s<t?0:s>e?1:n(pt(t,e,s))}function hs(t,e){t.min=e.min,t.max=e.max}function I(t,e){hs(t.x,e.x),hs(t.y,e.y)}function fs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function pe(t){return t===void 0||t===1}function ke({scale:t,scaleX:e,scaleY:n}){return!pe(t)||!pe(e)||!pe(n)}function nt(t){return ke(t)||xo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function xo(t){return ds(t.x)||ds(t.y)}function ds(t){return t&&t!=="0%"}function ne(t,e,n){const s=t-n,i=e*s;return n+i}function ps(t,e,n,s,i){return i!==void 0&&(t=ne(t,i,s)),ne(t,n,s)+e}function Oe(t,e=0,n=1,s,i){t.min=ps(t.min,e,n,s,i),t.max=ps(t.max,e,n,s,i)}function bo(t,{x:e,y:n}){Oe(t.x,e.translate,e.scale,e.originPoint),Oe(t.y,n.translate,n.scale,n.originPoint)}const ms=.999999999999,gs=1.0000000000001;function ac(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ht(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,bo(t,o)),s&&nt(r.latestValues)&&ht(t,r.latestValues))}e.x<gs&&e.x>ms&&(e.x=1),e.y<gs&&e.y>ms&&(e.y=1)}function Gt(t,e){t.min=t.min+e,t.max=t.max+e}function ys(t,e,n,s,i=.5){const r=E(t.min,t.max,i);Oe(t,e,n,r,s)}function ht(t,e){ys(t.x,e.x,e.scaleX,e.scale,e.originX),ys(t.y,e.y,e.scaleY,e.scale,e.originY)}const So=1e-4,lc=1-So,uc=1+So,wo=.01,cc=0-wo,hc=0+wo;function _(t){return t.max-t.min}function fc(t,e,n){return Math.abs(t-e)<=n}function vs(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=_(n)/_(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=lc&&t.scale<=uc||isNaN(t.scale))&&(t.scale=1),(t.translate>=cc&&t.translate<=hc||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){vs(t.x,e.x,n.x,s?s.originX:void 0),vs(t.y,e.y,n.y,s?s.originY:void 0)}function Ts(t,e,n){t.min=n.min+e.min,t.max=t.min+_(e)}function dc(t,e,n){Ts(t.x,e.x,n.x),Ts(t.y,e.y,n.y)}function xs(t,e,n){t.min=e.min-n.min,t.max=t.min+_(e)}function Dt(t,e,n){xs(t.x,e.x,n.x),xs(t.y,e.y,n.y)}function bs(t,e,n,s,i){return t-=e,t=ne(t,1/n,s),i!==void 0&&(t=ne(t,1/i,s)),t}function pc(t,e=0,n=1,s=.5,i,r=t,o=t){if(K.test(e)&&(e=parseFloat(e),e=E(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=E(r.min,r.max,s);t===r&&(a-=e),t.min=bs(t.min,e,n,a,i),t.max=bs(t.max,e,n,a,i)}function Ss(t,e,[n,s,i],r,o){pc(t,e[n],e[s],e[i],e.scale,r,o)}const mc=["x","scaleX","originX"],gc=["y","scaleY","originY"];function ws(t,e,n,s){Ss(t.x,e,mc,n?n.x:void 0,s?s.x:void 0),Ss(t.y,e,gc,n?n.y:void 0,s?s.y:void 0)}function As(t){return t.translate===0&&t.scale===1}function Ao(t){return As(t.x)&&As(t.y)}function Ps(t,e){return t.min===e.min&&t.max===e.max}function yc(t,e){return Ps(t.x,e.x)&&Ps(t.y,e.y)}function Vs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Po(t,e){return Vs(t.x,e.x)&&Vs(t.y,e.y)}function Es(t){return _(t.x)/_(t.y)}function Cs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vc{constructor(){this.members=[]}add(e){We(this.members,e),e.scheduleRender()}remove(e){if(ie(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Tc(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:d,skewX:f,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}function Ms(t){return[t("x"),t("y")]}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},me=["","X","Y","Z"],xc=1e3;let bc=0;function ge(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Vo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Gi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Vo(s)}function Eo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=bc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ac),this.nodes.forEach(Cc),this.nodes.forEach(Mc),this.nodes.forEach(Pc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new nc)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ke),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=hn(o)&&!ho(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=fr(d,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ls)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||jc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!Po(this.targetLayout,f),b=!h&&d;if(this.options.layoutRoot||this.resumeFrom||b||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...en(p,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,b)}else h||Ls(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Y(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Dc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ds);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Rs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ec),this.nodes.forEach(Sc),this.nodes.forEach(wc)):this.nodes.forEach(Rs),this.clearAllSnapshots();const a=F.now();B.delta=q(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,re.update.process(B),re.preRender.process(B),re.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ei.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vc),this.sharedNodes.forEach(Rc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_(this.snapshot.measuredBox.x)&&!_(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=D(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ao(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||nt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Fc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return D();const l=a.measureViewportBox();if(!(((o=this.scroll)==null?void 0:o.wasRoot)||this.path.some(kc))){const{scroll:u}=this.root;u&&(Gt(l.x,u.offset.x),Gt(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=D();if(I(l,o),(a=this.scroll)!=null&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:d}=u;u!==this.root&&h&&d.layoutScroll&&(h.wasRoot&&I(l,o),Gt(l.x,h.offset.x),Gt(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=D();I(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ht(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&ht(l,u.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(o){const a=D();I(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;ke(c.latestValues)&&c.updateSnapshot();const u=D(),h=c.measurePageBox();I(u,h),ws(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&ws(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(a=this.parent)!=null&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!(!this.layout||!(h||d))){if(this.resolvedRelativeTargetAt=B.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Dt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=D(),this.targetWithTransforms=D()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):I(this.target,this.layout.layoutBox),bo(this.target,this.targetDelta)):I(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Dt(this.relativeTargetOrigin,this.target,f.target),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ke(this.parent.latestValues)||xo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(o=this.parent)!=null&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===B.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;I(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;ac(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=D());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fs(this.prevProjectionDelta.x,this.projectionDelta.x),fs(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Cs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ut(),this.projectionDelta=ut(),this.projectionDeltaWithTransform=ut()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=D(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,g=this.getStack(),y=!g||g.members.length<=1,b=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(Bc));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const T=w/1e3;Bs(h.x,o.x,T),Bs(h.y,o.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lc(this.relativeTarget,this.relativeTargetOrigin,d,T),v&&yc(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=D()),I(v,this.relativeTarget)),m&&(this.animationValues=u,ic(u,c,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Y(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=dt(0)),this.currentAnimation=fo(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Co(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||D();const h=_(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=_(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}I(a,l),ht(a,u),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new vc),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ge("z",o,c,this.animationValues);for(let u=0;u<me.length;u++)ge(`rotate${me[u]}`,o,c,this.animationValues),ge(`skew${me[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=de(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=de(a?.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Tc(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Lt){if(u[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Lt[p],b=h==="none"?u[p]:m(u[p],c);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=b}else y?this.options.visualElement.renderState.vars[p]=b:o[p]=b}this.options.layoutId&&(o.pointerEvents=c===this?de(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ds),this.root.sharedNodes.clear()}}}function Sc(t){t.updateLayout()}function wc(t){var e;const n=((e=t.resumeFrom)==null?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?Ms(h=>{const d=o?n.measuredBox[h]:n.layoutBox[h],f=_(d);d.min=s[h].min,d.max=d.min+f}):Co(r,n.layoutBox,s)&&Ms(h=>{const d=o?n.measuredBox[h]:n.layoutBox[h],f=_(s[h]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const a=ut();Mt(a,s,n.layoutBox);const l=ut();o?Mt(l,t.applyTransform(i,!0),n.measuredBox):Mt(l,s,n.layoutBox);const c=!Ao(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:d,layout:f}=h;if(d&&f){const p=D();Dt(p,n.layoutBox,d.layoutBox);const m=D();Dt(m,s,f.layoutBox),Po(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Ac(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Pc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Vc(t){t.clearSnapshot()}function Ds(t){t.clearMeasurements()}function Rs(t){t.isLayoutDirty=!1}function Ec(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ls(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Cc(t){t.resolveTargetDelta()}function Mc(t){t.calcProjection()}function Dc(t){t.resetSkewAndRotation()}function Rc(t){t.removeLeadSnapshot()}function Bs(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function js(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function Lc(t,e,n,s){js(t.x,e.x,n.x,s),js(t.y,e.y,n.y,s)}function Bc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const jc={duration:.45,ease:[.4,0,.1,1]},Fs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ks=Fs("applewebkit/")&&!Fs("chrome/")?Math.round:k;function Os(t){t.min=ks(t.min),t.max=ks(t.max)}function Fc(t){Os(t.x),Os(t.y)}function Co(t,e,n){return t==="position"||t==="preserve-aspect"&&!fc(Es(e),Es(n),.2)}function kc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}function Oc(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ic=Eo({attachResizeListener:(t,e)=>Oc(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ye={current:void 0},_c=Eo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ye.current){const t=new Ic({});t.mount(window),t.setOptions({layoutScroll:!0}),ye.current=t}return ye.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});function Mo(t){if(t)return t.options.allowProjection!==!1?t.projection:Mo(t.parent)}function Is(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=Is(t,e.target.x),s=Is(t,e.target.y);return`${n}% ${s}%`}},Uc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=et.parse(t);if(i.length>5)return s;const r=et.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=E(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},Do={borderRadius:{...bt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:Uc};function wt(t){return typeof t=="object"&&t!==null&&"nodeType"in t}class $c extends Z{constructor(e){super(e),li(Do)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new _c(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:Mo(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options;this.state.visualElement.projection.setOptions({layout:e.layout,layoutId:e.layoutId,alwaysMeasureLayout:!!e.drag||e.dragConstraints&&wt(e.dragConstraints),visualElement:this.state.visualElement,animationType:typeof e.layout=="string"?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var n;if(!((n=this.state.visualElement.projection)!=null&&n.isPresent)){const s=ft.get(this.state.element);this.state.isSafeToRemove=!0,s&&s({detail:{isExit:!0}},!0)}}})}update(){this.setOptions()}mount(){var e;(e=this.state.visualElement.projection)==null||e.mount(this.state.element)}}function Ro(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function fn(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function Nc(t){return e=>Ro(e)&&t(e,fn(e))}function Rt(t,e,n,s){return ee(t,e,Nc(n),s)}function Lo(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const _s=Lo("dragHorizontal"),Us=Lo("dragVertical");function Wc(t){let e=!1;if(t==="y")e=Us();else if(t==="x")e=_s();else{const n=_s(),s=Us();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Ie(t){return t.max-t.min}function Kc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}const _e=.35;function Gc(t,{top:e,left:n,bottom:s,right:i}){return{x:$s(t.x,n,i),y:$s(t.y,e,s)}}function $s(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function zc(t=_e){return t===!1?t=0:t===!0&&(t=_e),{x:Ns(t,"left","right"),y:Ns(t,"top","bottom")}}function Ns(t,e,n){return{min:Ws(t,e),max:Ws(t,n)}}function Ws(t,e){return typeof t=="number"?t:t[e]||0}function Hc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}function Xc(t,e){return{x:Ks(t.x,e.x),y:Ks(t.y,e.y)}}function Ks(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Yc(t,e){let n=.5;const s=Ie(t),i=Ie(e);return i>s?n=pt(e.min,e.max-s,t.min):s>i&&(n=pt(t.min,t.max-i,e.min)),q(0,1,n)}const Gs=(t,e)=>Math.abs(t-e);function qc(t,e){const n=Gs(t.x,e.x),s=Gs(t.y,e.y);return Math.sqrt(n**2+s**2)}class Bo{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Te(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=qc(h.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:p}=h,{timestamp:m}=B;this.history.push({...p,timestamp:m});const{onStart:g,onMove:y}=this.handlers;d||(g&&g(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ve(d,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Te(h.type==="pointercancel"?this.lastMoveEventInfo:ve(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,g),p&&p(h,g)},!Ro(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=fn(e),a=ve(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=B;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Te(a,this.history)),this.removeListeners=It(Rt(this.contextWindow,"pointermove",this.handlePointerMove),Rt(this.contextWindow,"pointerup",this.handlePointerUp),Rt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Y(this.updatePoint)}}function ve(t,e){return e?{point:e(t.point)}:t}function zs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Te({point:t},e){return{point:t,delta:zs(t,jo(e)),offset:zs(t,Zc(e)),velocity:Jc(e,.1)}}function Zc(t){return t[0]}function jo(t){return t[t.length-1]}function Jc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=jo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>U(e)));)n--;if(!s)return{x:0,y:0};const r=W(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const Hs=()=>({min:0,max:0});function Qc(){return{x:Hs(),y:Hs()}}function N(t){return[t("x"),t("y")]}function th(t){return!!(L(t)&&t.add)}function Xs(t,e){const n=t.getValue("willChange");if(th(n))return n.add(e)}function Fo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function eh(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function nh({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ys(t,e){t.min=t.min+e,t.max=t.max+e}function sh(t,e){return Fo(eh(t.getBoundingClientRect(),e))}function ih(t,e,n){const s=sh(t,n),{scroll:i}=e;return i&&(Ys(s.x,i.offset.x),Ys(s.y,i.offset.y)),s}function qs(t){return!ft.has(t.current)}function ko({current:t}){return t?t.ownerDocument.defaultView:null}const oh=new WeakMap;class rh{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Qc(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){if(!qs(this.visualElement))return;const s=c=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(fn(c,"page").point)},i=(c,u)=>{const{drag:h,dragPropagation:d,onDragStart:f}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Wc(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),N(m=>{let g=this.getAxisMotionValue(m).get()||0;if(K.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const b=y.layout.layoutBox[m];b&&(g=Ie(b)*(parseFloat(g)/100))}}this.originPoint[m]=g}),f&&V.postRender(()=>f(c,u)),Xs(this.visualElement,"transform"),this.visualElement.state.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:f,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:m}=u;if(d&&this.currentDirection===null){this.currentDirection=ah(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),p&&p(c,u)},o=(c,u)=>this.stop(c,u),a=()=>N(c=>{var u;return this.getAnimationState(c)==="paused"&&((u=this.getAxisMotionValue(c).animation)==null?void 0:u.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Bo(e,{onSessionStart:s,onStart:i,onMove:r,onSessionEnd:o,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:ko(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&V.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!zt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Kc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)==null?void 0:e.layout,r=this.constraints;n&&wt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Gc(i.layoutBox,n):this.constraints=!1,this.elastic=zc(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Hc(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!wt(e))return!1;const s=e,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ih(s,i.root,this.visualElement.getTransformPagePoint());let o=Xc(i.layout.layoutBox,r);if(n){const a=n(nh(o));this.hasMutatedConstraints=!!a,a&&(o=Fo(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=N(u=>{if(!zt(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Xs(this.visualElement,e),s.start(cn(e,s,0,n,this.visualElement,!1))}stopAnimation(){qs(this.visualElement)&&N(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){N(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps();return s[n]||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){N(n=>{const{drag:s}=this.getProps();if(!zt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-E(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!wt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};N(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Yc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),N(o=>{if(!zt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(E(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;oh.set(this.visualElement,this);const e=this.visualElement.current,n=Rt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();wt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(s);const o=ee(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(N(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=_e,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function zt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ah(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class lh extends Z{constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new rh(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}unmount(){this.removeGroupControls(),this.removeListeners()}}class uh extends Z{constructor(e){super(e),li(Do)}beforeUpdate(){this.state.willUpdate("beforeUpdate")}update(){this.didUpdate()}didUpdate(){var e,n;(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&((n=(e=this.state.visualElement.projection)==null?void 0:e.root)==null||n.didUpdate())}mount(){var e;const n=this.state.options,s=this.state.options.layoutGroup;if(n.layout||n.layoutId){const i=this.state.visualElement.projection;i&&(i.promote(),(e=s?.group)==null||e.add(i)),Yt.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){const e=this.state.visualElement.projection;e&&(this.state.willUpdate("beforeUnmount"),this.state.options.layoutId?(e.isPresent=!1,e.relegate()):this.state.options.layout&&(this.state.isSafeToRemove=!0))}unmount(){const e=this.state.options.layoutGroup,n=this.state.visualElement.projection;n&&(e?.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(n),this.didUpdate())}}function Zs(t){return(e,n)=>{t&&V.postRender(()=>t(e,n))}}class ch extends Z{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new Bo(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:ko(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:Zs((e,n)=>{const{onPanSessionStart:s}=this.state.options;s&&s(e,n)}),onStart:Zs((e,n)=>{const{onPanStart:s}=this.state.options;s&&s(e,n)}),onMove:(e,n)=>{const{onPan:s}=this.state.options;s&&s(e,n)},onEnd:(e,n)=>{const{onPanEnd:s}=this.state.options;delete this.session,s&&V.postRender(()=>s(e,n))}}}mount(){this.removePointerDownListener=Rt(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const hh=[Iu,Hu,Yu,Ju,tc,$c,ch,lh,uh],fh={reducedMotion:"never",transition:void 0,nonce:void 0},[dh]=kt("MotionConfig");function Oo(){return dh(At(()=>fh))}function ph(t){const e=new WeakMap,n=Oo();function s(r){if(t.mode!=="popLayout")return;const o=r.element,a=o.offsetParent,l=a instanceof HTMLElement&&a.offsetWidth||0,c={height:o.offsetHeight||0,width:o.offsetWidth||0,top:o.offsetTop,left:o.offsetLeft,right:0};c.right=l-c.width-c.left;const u=t.anchorX==="left"?`left: ${c.left}`:`right: ${c.right}`;r.element.dataset.motionPopId=r.id;const h=document.createElement("style");n.value.nonce&&(h.nonce=n.value.nonce),e.set(r,h),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
2
+ [data-motion-pop-id="${r.id}"] {
3
+ position: absolute !important;
4
+ width: ${c.width}px !important;
5
+ height: ${c.height}px !important;
6
+ top: ${c.top}px !important;
7
+ ${u}px !important;
8
+ }
9
+ `)}function i(r){const o=e.get(r);o&&(e.delete(r),V.render(()=>{document.head.removeChild(o)}))}return{addPopStyle:s,removePopStyle:i,styles:e}}function Js(t){return Promise.resolve().then(()=>{t()})}const mh=ni({name:"AnimatePresence",inheritAttrs:!0,__name:"AnimatePresence",props:{mode:{default:"sync"},initial:{type:Boolean,default:!0},as:{},custom:{},onExitComplete:{},anchorX:{default:"left"}},setup(t){const e=t;Er(e);const{addPopStyle:n,removePopStyle:s,styles:i}=ph(e);function r(u){let h=u;for(;h;){if(Vt.get(h))return h;h=h.firstElementChild}return null}function o(u){const h=Vt.get(u);h&&(s(h),h.isVShow=!0,ae(u),Js(()=>{h.setActive("exit",!1)}))}const a=new Map;si(()=>{a.clear()});function l(u,h){var d;const f=r(u),p=Vt.get(f);if(!f||!p){h(),a.size===0&&((d=e.onExitComplete)==null||d.call(e));return}a.set(f,!0),ae(f),n(p);function m(g){var y,b;if((y=g?.detail)!=null&&y.isExit){const v=p.visualElement.projection;if(v?.animationProgress>0&&!p.isSafeToRemove&&!p.isVShow)return;ae(f),a.delete(f),a.size===0&&((b=e.onExitComplete)==null||b.call(e)),i.has(p)?s(p):p.willUpdate("done"),h(),f.isConnected||p.unmount(!0)}}Js(()=>{p.setActive("exit",!0),ft.set(f,m),f.addEventListener("motioncomplete",m)})}const c=At(()=>e.mode!=="wait"?{tag:e.as}:{mode:e.mode==="wait"?"out-in":void 0});return(u,h)=>(Q(),lt(be(u.mode==="wait"?No:Wo),qt({css:!1},c.value,{appear:"",onEnter:o,onLeave:l}),{default:H(()=>[$o(u.$slots,"default")]),_:3},16))}});function se(t){if(t)return t.nodeType===3||t.nodeType===8?se(t.nextSibling):t}const[gh]=kt("LazyMotionContext");function yh(t){const e=mr(null),n=yr({}),s=Oo(),i=Pr({}),r=gh({features:ii([]),strict:!1}),o=Ko();function a(){return n.id&&t.layoutId?`${n.id}-${t.layoutId}`:t.layoutId||void 0}function l(){return{...t,lazyMotionContext:r,layoutId:a(),transition:t.transition??s.value.transition,layoutGroup:n,motionConfig:s.value,inViewOptions:t.inViewOptions??s.value.inViewOptions,animatePresenceContext:i,initial:i.initial===!1?i.initial:t.initial===!0?void 0:t.initial}}function c(){return{...o,...l()}}const u=new Dr(c(),e);gr(u);function h(){var f;const p=u.type==="svg",m={...o};Object.keys(o).forEach(b=>{L(o[b])&&(m[b]=o[b].get())});let g={...t.style,...p?{}:((f=u.visualElement)==null?void 0:f.latestValues)||u.baseTarget};if(p){const{attrs:b,style:v}=zr({...u.isMounted()?u.target:u.baseTarget,...g});(v.transform||b.transformOrigin)&&(v.transformOrigin=b.transformOrigin??"50% 50%",delete b.transformOrigin),v.transform&&(v.transformBox=v.transformBox??"fill-box",delete b.transformBox),Object.assign(m,b),g=v}t.drag&&t.dragListener!==!1&&Object.assign(g,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`});const y=Nr(g);return y&&(m.style=y),m}const d=Go().proxy;return zo(()=>{u.beforeMount()}),ei(()=>{u.mount(se(d.$el),c(),Th(d))}),Ho(()=>u.beforeUnmount()),si(()=>{const f=se(d.$el);f?.isConnected||u.unmount()}),Xo(()=>{u.beforeUpdate()}),Yo(()=>{u.update(c())}),{getProps:l,getAttrs:h,layoutGroup:n,state:u}}const vh={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},hover:{type:[String,Array,Object]},press:{type:[String,Array,Object]},inView:{type:[String,Array,Object]},focus:{type:[String,Array,Object]},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object],default:({hover:t})=>t},whilePress:{type:[String,Array,Object],default:({press:t})=>t},whileInView:{type:[String,Array,Object],default:({inView:t})=>t},whileFocus:{type:[String,Array,Object],default:({focus:t})=>t},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},layoutGroup:{type:Object},motionConfig:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:null},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};function Th(t){var e;const n=((e=se(t.$el))==null?void 0:e.style.display)==="none";return t.$.vnode.transition&&n}const xh=new Map,bh=new Map;function Sh(t){if(!Array.isArray(t))return[t];const e=[];for(const n of t)Array.isArray(n)?e.push(...n):e.push(n);return e}const wh=["area","img","input"];function Ah(t,e,n){var s,i;if(typeof t=="string"&&wh.includes(t))return oi(t,e);if(t==="template"){if(!n.default)return null;const r=Sh(n.default()),o=r.findIndex(u=>u.type!==qo);if(o===-1)return r;const a=r[o];(s=a.props)==null||delete s.ref;const l=a.props?qt(e,a.props):e;e.class&&((i=a.props)!=null&&i.class)&&delete a.props.class;const c=Zo(a,l);for(const u in l)u.startsWith("on")&&(c.props||(c.props={}),c.props[u]=l[u]);return r.length===1?c:(r[o]=c,r)}return null}function Qs(t,e={}){var n;const s=typeof t=="string",i=s?t:t.name||"",r=((n=e.features)==null?void 0:n.length)>0?xh:bh;if(s&&r?.has(t))return r.get(t);const o=ni({inheritAttrs:!1,props:{...vh,features:{type:Object,default:()=>e.features||[]},as:{type:[String,Object],default:t||"div"}},name:i?`motion.${i}`:"Motion",setup(a,{slots:l}){const{getProps:c,getAttrs:u,state:h}=yh(a);function d(){const f=h.element;if((!(typeof a.as=="object")||a.asChild)&&f){const{style:m}=u();if(m)for(const[g,y]of Object.entries(m))f.style[g]=y}}return()=>{const f=c(),p=u(),m=a.asChild?"template":a.as,g={...e.forwardMotionProps||a.forwardMotionProps?f:{},...p,onVnodeUpdated:d},y=Ah(m,g,l);return y!==null?y:oi(m,{...g},l)}}});return s&&r?.set(t,o),o}function Ph(t=[]){return new Proxy({},{get(e,n){return n==="create"?(s,i)=>Qs(s,{...i,features:t}):Qs(n,{features:t})}})}const Vh=Ph(hh),xe=Vh.create("div"),Eh={slots:{base:"rounded-md w-full",overlay:"fixed inset-0 bg-default/75 backdrop-blur-sm will-change-opacity",content:"fixed inset-0 flex items-center justify-center cursor-zoom-out focus:outline-none",zoomedImage:"w-full h-auto max-w-[95vw] max-h-[95vh] object-contain rounded-md"},variants:{zoom:{true:"will-change-transform"},open:{true:""}},compoundVariants:[{zoom:!0,open:!1,class:"cursor-zoom-in"}]},Ch=["onClick"],kh=Object.assign({inheritAttrs:!1},{__name:"ProseImg",props:{src:{type:String,required:!0},alt:{type:String,required:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},class:{type:null,required:!1},zoom:{type:Boolean,required:!1,default:!0},ui:{type:null,required:!1}},setup(t){const e=t,n=Jo(),[s,i]=Pn(),[r,o]=Pn(),a=ii(!1),l=At(()=>An({extend:An(Eh),...n.ui?.prose?.img||{}})({zoom:e.zoom,open:a.value})),c=At(()=>{if(e.src?.startsWith("/")&&!e.src.startsWith("//")){const h=tr(er(nr().app.baseURL));if(h!=="/"&&!e.src.startsWith(h))return sr(h,e.src)}return e.src}),u=At(()=>`${c.value}::${ir()}`);return e.zoom&&lr(window,"scroll",()=>{a.value=!1}),(h,d)=>(Q(),xn(Qo,null,[z(j(s),null,{default:H(()=>[(Q(),lt(be(j(bn)),qt({src:c.value,alt:t.alt,width:t.width,height:t.height},h.$attrs,{class:l.value.base({class:[e.ui?.base,e.class]})}),null,16,["src","alt","width","height","class"]))]),_:1}),z(j(r),null,{default:H(()=>[(Q(),lt(be(j(bn)),qt({src:c.value,alt:t.alt},h.$attrs,{class:l.value.zoomedImage({class:[e.ui?.zoomedImage]})}),null,16,["src","alt","class"]))]),_:1}),t.zoom?(Q(),lt(j(ar),{key:0,open:a.value,"onUpdate:open":d[0]||(d[0]=f=>a.value=f),modal:!1},{default:H(({close:f})=>[z(j(or),{"as-child":""},{default:H(()=>[z(j(xe),{"layout-id":u.value,"as-child":"",transition:{type:"spring",bounce:.15,duration:.5,ease:"easeInOut"}},{default:H(()=>[z(j(i))]),_:1},8,["layout-id"])]),_:1}),z(j(rr),null,{default:H(()=>[z(j(mh),null,{default:H(()=>[a.value?(Q(),lt(j(xe),{key:0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:wn(l.value.overlay({class:[e.ui?.overlay]}))},null,8,["class"])):Sn("",!0),a.value?(Q(),xn("div",{key:1,class:wn(l.value.content({class:[e.ui?.content]})),onClick:f},[z(j(xe),{"as-child":"","layout-id":u.value,transition:{type:"spring",bounce:.15,duration:.5,ease:"easeInOut"}},{default:H(()=>[z(j(o))]),_:1},8,["layout-id"])],10,Ch)):Sn("",!0)]),_:2},1024)]),_:2},1024)]),_:1},8,["open"])):(Q(),lt(j(i),{key:1}))],64))}});export{kh as default};
@@ -0,0 +1 @@
1
+ import{_ as M,a as R}from"./CHnVFnBW.js";import{_ as C}from"./MYeLvJGV.js";import{d as k,M as l,o as n,aa as w,al as b,am as $,ac as t,Z as s,_ as U,af as c,c as h,w as d,ag as S,ab as y,a$ as B,a0 as D,e as N,C as F,a as f}from"./BOCn_SGf.js";import{_ as I}from"./BhhMUror.js";import{_ as z}from"./BTGeP1bA.js";import{f as O}from"./CWePHsZr.js";import{u as V}from"./TNpdJOlc.js";import"./BZm9w7en.js";import"./hCeWb_38.js";import"./8WMJQbWG.js";import"./C8ut0f5H.js";const q={class:"grid gap-4 grid-cols-2 sm:grid-cols-3 lg:grid-cols-5"},A={class:"p-4 rounded-lg bg-elevated border border-default"},L={class:"flex items-center gap-2 text-muted text-sm mb-1"},P={class:"text-2xl font-semibold"},H={class:"p-4 rounded-lg bg-elevated border border-default"},K={class:"flex items-center gap-2 text-muted text-sm mb-1"},W={class:"text-2xl font-semibold"},E={class:"p-4 rounded-lg bg-elevated border border-default"},Z={class:"flex items-center gap-2 text-muted text-sm mb-1"},G={class:"text-2xl font-semibold"},J={class:"p-4 rounded-lg bg-elevated border border-default"},Q={class:"flex items-center gap-2 text-muted text-sm mb-1"},X={class:"text-2xl font-semibold"},Y={class:"p-4 rounded-lg bg-elevated border border-default"},tt={class:"flex items-center gap-2 text-muted text-sm mb-1"},et={class:"text-2xl font-semibold"},st=k({__name:"StatCards",props:{overview:{},loading:{type:Boolean}},setup(a){function x(e){return e<.01&&e>0?"<$0.01":`$${e.toFixed(2)}`}function u(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}return(e,o)=>{const p=C,i=U;return n(),l("div",q,[a.loading?(n(),l(b,{key:0},$(5,g=>t("div",{key:g,class:"p-4 rounded-lg bg-elevated border border-default"},[s(p,{class:"h-4 w-16 mb-2"}),s(p,{class:"h-8 w-12"})])),64)):a.overview?(n(),l(b,{key:1},[t("div",A,[t("div",L,[s(i,{name:"i-lucide-circle-dot",class:"size-4"}),o[0]||(o[0]=t("span",null,"Todo",-1))]),t("p",P,c(a.overview.tasks.todoCount),1)]),t("div",H,[t("div",K,[s(i,{name:"i-lucide-loader",class:"size-4"}),o[1]||(o[1]=t("span",null,"In Progress",-1))]),t("p",W,c(a.overview.tasks.inProgressCount),1)]),t("div",E,[t("div",Z,[s(i,{name:"i-lucide-dollar-sign",class:"size-4"}),o[2]||(o[2]=t("span",null,"7d Cost",-1))]),t("p",G,c(x(a.overview.usage.totalCost7d)),1)]),t("div",J,[t("div",Q,[s(i,{name:"i-lucide-zap",class:"size-4"}),o[3]||(o[3]=t("span",null,"7d API Calls",-1))]),t("p",X,c(a.overview.usage.totalCalls7d),1)]),t("div",Y,[t("div",tt,[s(i,{name:"i-lucide-text-cursor-input",class:"size-4"}),o[4]||(o[4]=t("span",null,"7d Tokens",-1))]),t("p",et,c(u(a.overview.usage.totalInputTokens7d+a.overview.usage.totalOutputTokens7d)),1)])],64)):w("",!0)])}}}),ot=Object.assign(st,{__name:"DashboardStatCards"}),nt={class:"flex items-center justify-between"},at={class:"flex items-center gap-2"},it={key:0,class:"space-y-3"},lt={key:1,class:"text-center py-4 text-muted text-sm"},rt={key:2,class:"space-y-2"},dt={class:"text-sm truncate flex-1"},ct={key:1,class:"text-xs text-muted whitespace-nowrap"},ut=k({__name:"UpcomingTasks",props:{tasks:{},loading:{type:Boolean}},setup(a){const x={1:"Low",2:"Med",3:"High"},u={1:"neutral",2:"warning",3:"error"},e={todo:"neutral",in_progress:"primary",blocked:"error"};function o(p){if(!p)return"";const i=new Date(p),g=new Date,v=i.getTime()-g.getTime(),r=Math.ceil(v/(1e3*60*60*24));return r<0?`${Math.abs(r)}d overdue`:r===0?"Today":r===1?"Tomorrow":`${r}d`}return(p,i)=>{const g=U,v=D,r=C,_=I,T=S,j=z;return n(),h(j,null,{header:d(()=>[t("div",nt,[t("div",at,[s(g,{name:"i-lucide-check-square",class:"size-4 text-primary"}),i[0]||(i[0]=t("span",{class:"text-sm font-medium"},"Upcoming Tasks",-1))]),s(v,{to:"/tasks",variant:"ghost",size:"xs","trailing-icon":"i-lucide-arrow-right"},{default:d(()=>[...i[1]||(i[1]=[y(" View all ",-1)])]),_:1})])]),default:d(()=>[a.loading?(n(),l("div",it,[(n(),l(b,null,$(3,m=>t("div",{key:m,class:"flex items-center gap-3"},[s(r,{class:"h-5 w-5 rounded"}),s(r,{class:"h-4 flex-1"})])),64))])):a.tasks.length===0?(n(),l("div",lt," No upcoming tasks ")):(n(),l("div",rt,[(n(!0),l(b,null,$(a.tasks,m=>(n(),h(T,{key:m.id,to:{path:"/tasks",query:{selected:m.id}},class:"flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"},{default:d(()=>[s(_,{color:e[m.status]||"neutral",variant:"subtle",size:"xs"},{default:d(()=>[y(c(m.status==="in_progress"?"WIP":m.status),1)]),_:2},1032,["color"]),t("span",dt,c(m.title),1),m.projectName?(n(),h(_,{key:0,variant:"subtle",color:"neutral",size:"xs"},{default:d(()=>[t("span",{class:"inline-block size-2 rounded-full mr-1",style:B({background:m.projectColor||"var(--ui-primary)"})},null,4),y(" "+c(m.projectName),1)]),_:2},1024)):w("",!0),s(_,{color:u[m.priority]||"neutral",variant:"soft",size:"xs"},{default:d(()=>[y(c(x[m.priority]||"Med"),1)]),_:2},1032,["color"]),m.dueDate?(n(),l("span",ct,c(o(m.dueDate)),1)):w("",!0)]),_:2},1032,["to"]))),128))]))]),_:1})}}}),mt=Object.assign(ut,{__name:"DashboardUpcomingTasks"}),_t={class:"flex items-center justify-between"},pt={class:"flex items-center gap-2"},gt={key:0,class:"space-y-3"},xt={class:"flex-1"},ft={key:1,class:"text-center py-4 text-muted text-sm"},vt={key:2,class:"space-y-2"},ht={class:"flex items-center justify-center size-8 rounded-full bg-primary/10"},bt={class:"flex-1 min-w-0"},yt={class:"text-sm font-medium truncate"},$t={class:"text-xs text-muted"},kt={class:"text-xs text-muted whitespace-nowrap"},wt=k({__name:"RecentChats",props:{conversations:{},loading:{type:Boolean}},setup(a){function x(u){return O(new Date(u),{addSuffix:!0})}return(u,e)=>{const o=U,p=D,i=C,g=S,v=z;return n(),h(v,null,{header:d(()=>[t("div",_t,[t("div",pt,[s(o,{name:"i-lucide-message-square",class:"size-4 text-primary"}),e[0]||(e[0]=t("span",{class:"text-sm font-medium"},"Recent Chats",-1))]),s(p,{to:"/chat",variant:"ghost",size:"xs","trailing-icon":"i-lucide-arrow-right"},{default:d(()=>[...e[1]||(e[1]=[y(" View all ",-1)])]),_:1})])]),default:d(()=>[a.loading?(n(),l("div",gt,[(n(),l(b,null,$(3,r=>t("div",{key:r,class:"flex items-center gap-3"},[s(i,{class:"size-8 rounded-full"}),t("div",xt,[s(i,{class:"h-4 w-32 mb-1"}),s(i,{class:"h-3 w-20"})])])),64))])):a.conversations.length===0?(n(),l("div",ft," No conversations yet ")):(n(),l("div",vt,[(n(!0),l(b,null,$(a.conversations,r=>(n(),h(g,{key:r.id,to:{path:"/chat",query:{conversation:r.id}},class:"flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"},{default:d(()=>[t("div",ht,[s(o,{name:"i-lucide-message-square",class:"size-4 text-primary"})]),t("div",bt,[t("p",yt,c(r.title||"Untitled Chat"),1),t("p",$t,c(r.messageCount)+" messages ",1)]),t("span",kt,c(x(r.startedAt)),1)]),_:2},1032,["to"]))),128))]))]),_:1})}}}),Ct=Object.assign(wt,{__name:"DashboardRecentChats"}),Ut={class:"flex items-center justify-between"},Dt={class:"flex items-center gap-2"},zt={key:0,class:"space-y-3"},Tt={class:"flex-1"},jt={key:1,class:"text-center py-4 text-muted text-sm"},St={key:2,class:"space-y-2"},Nt={class:"flex items-center justify-center size-8 rounded bg-primary/10"},Bt={class:"flex-1 min-w-0"},It={class:"text-sm font-medium truncate"},Ot={class:"flex items-center gap-2"},Mt={key:0,class:"text-xs text-muted whitespace-nowrap"},Rt=k({__name:"RecentDocs",props:{documents:{},loading:{type:Boolean}},setup(a){function x(u){return u?O(new Date(u),{addSuffix:!0}):""}return(u,e)=>{const o=U,p=D,i=C,g=I,v=S,r=z;return n(),h(r,null,{header:d(()=>[t("div",Ut,[t("div",Dt,[s(o,{name:"i-lucide-file-text",class:"size-4 text-primary"}),e[0]||(e[0]=t("span",{class:"text-sm font-medium"},"Recent Docs",-1))]),s(p,{to:"/docs",variant:"ghost",size:"xs","trailing-icon":"i-lucide-arrow-right"},{default:d(()=>[...e[1]||(e[1]=[y(" View all ",-1)])]),_:1})])]),default:d(()=>[a.loading?(n(),l("div",zt,[(n(),l(b,null,$(3,_=>t("div",{key:_,class:"flex items-center gap-3"},[s(i,{class:"size-8 rounded"}),t("div",Tt,[s(i,{class:"h-4 w-32 mb-1"}),s(i,{class:"h-3 w-20"})])])),64))])):a.documents.length===0?(n(),l("div",jt," No documents yet ")):(n(),l("div",St,[(n(!0),l(b,null,$(a.documents,_=>(n(),h(v,{key:_.id,to:{path:"/docs",query:{path:_.path}},class:"flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"},{default:d(()=>[t("div",Nt,[s(o,{name:"i-lucide-file-text",class:"size-4 text-primary"})]),t("div",Bt,[t("p",It,c(_.title),1),t("div",Ot,[_.projectName?(n(),h(g,{key:0,variant:"subtle",color:"neutral",size:"xs"},{default:d(()=>[t("span",{class:"inline-block size-2 rounded-full mr-1",style:B({background:_.projectColor||"var(--ui-primary)"})},null,4),y(" "+c(_.projectName),1)]),_:2},1024)):w("",!0)])]),_.modifiedAt?(n(),l("span",Mt,c(x(_.modifiedAt)),1)):w("",!0)]),_:2},1032,["to"]))),128))]))]),_:1})}}}),Ft=Object.assign(Rt,{__name:"DashboardRecentDocs"}),Vt={class:"flex items-center justify-between"},qt={class:"flex items-center gap-2"},At={key:0,class:"grid grid-cols-2 gap-4"},Lt={key:1,class:"grid grid-cols-2 gap-4"},Pt={class:"text-lg font-semibold"},Ht={class:"text-lg font-semibold"},Kt={class:"text-lg font-semibold"},Wt={class:"text-lg font-semibold"},Et=k({__name:"UsageSummary",props:{usage:{},loading:{type:Boolean}},setup(a){function x(e){return e<.01&&e>0?"<$0.01":`$${e.toFixed(2)}`}function u(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}return(e,o)=>{const p=U,i=D,g=C,v=z;return n(),h(v,null,{header:d(()=>[t("div",Vt,[t("div",qt,[s(p,{name:"i-lucide-bar-chart-3",class:"size-4 text-primary"}),o[0]||(o[0]=t("span",{class:"text-sm font-medium"},"Token Usage (7d)",-1))]),s(i,{to:"/usage",variant:"ghost",size:"xs","trailing-icon":"i-lucide-arrow-right"},{default:d(()=>[...o[1]||(o[1]=[y(" Details ",-1)])]),_:1})])]),default:d(()=>[a.loading?(n(),l("div",At,[(n(),l(b,null,$(4,r=>t("div",{key:r},[s(g,{class:"h-3 w-12 mb-1"}),s(g,{class:"h-6 w-16"})])),64))])):(n(),l("div",Lt,[t("div",null,[o[2]||(o[2]=t("p",{class:"text-xs text-muted mb-0.5"}," Total Cost ",-1)),t("p",Pt,c(x(a.usage.totalCost7d)),1)]),t("div",null,[o[3]||(o[3]=t("p",{class:"text-xs text-muted mb-0.5"}," API Calls ",-1)),t("p",Ht,c(a.usage.totalCalls7d),1)]),t("div",null,[o[4]||(o[4]=t("p",{class:"text-xs text-muted mb-0.5"}," Input Tokens ",-1)),t("p",Kt,c(u(a.usage.totalInputTokens7d)),1)]),t("div",null,[o[5]||(o[5]=t("p",{class:"text-xs text-muted mb-0.5"}," Output Tokens ",-1)),t("p",Wt,c(u(a.usage.totalOutputTokens7d)),1)])]))]),_:1})}}}),Zt=Object.assign(Et,{__name:"DashboardUsageSummary"}),Gt={class:"contents"},Jt={class:"p-4 space-y-6"},Qt={class:"text-2xl font-bold"},Xt={class:"grid gap-6 lg:grid-cols-2"},Yt={class:"grid gap-6 lg:grid-cols-2"},ue=k({__name:"dashboard",setup(a){const{user:x}=V(),u=N(null),e=N(!0);async function o(){e.value=!0;try{const p=await $fetch("/api/dashboard/overview");u.value=p.data}catch{}finally{e.value=!1}}return F(()=>{o()}),(p,i)=>{const g=R,v=ot,r=mt,_=Ct,T=Ft,j=Zt,m=M;return n(),l("div",Gt,[s(m,{id:"dashboard",grow:""},{header:d(()=>[s(g,{title:"Dashboard"})]),body:d(()=>[t("div",Jt,[t("div",null,[t("h1",Qt," Welcome back"+c(f(x)?.name?`, ${f(x).name}`:""),1),i[0]||(i[0]=t("p",{class:"text-muted mt-1 text-sm"}," Here's what's happening in your workspace. ",-1))]),s(v,{overview:f(u),loading:f(e)},null,8,["overview","loading"]),t("div",Xt,[s(r,{tasks:f(u)?.tasks.upcoming??[],loading:f(e)},null,8,["tasks","loading"]),s(_,{conversations:f(u)?.conversations??[],loading:f(e)},null,8,["conversations","loading"])]),t("div",Yt,[s(T,{documents:f(u)?.documents??[],loading:f(e)},null,8,["documents","loading"]),s(j,{usage:f(u)?.usage??{totalCost7d:0,totalCalls7d:0,totalInputTokens7d:0,totalOutputTokens7d:0},loading:f(e)},null,8,["usage","loading"])])])]),_:1})])}}});export{ue as default};
@@ -0,0 +1 @@
1
+ import{W as l,i as n,M as i,o as c,r as p,$ as u,ap as s,ab as m,af as d}from"./BOCn_SGf.js";const f={base:"*:first:mt-0 *:last:mb-0 *:my-1.5"},y={__name:"ProseTabsItem",props:{label:{type:String,required:!0},description:{type:String,required:!1},class:{type:null,required:!1}},setup(e){const t=e,a=l(),r=n(()=>s({extend:s(f),...a.ui?.prose?.tabsItem||{}}));return(o,b)=>(c(),i("div",{class:u(r.value({class:t.class}))},[p(o.$slots,"default",{},()=>[m(d(e.description),1)])],2))}};export{y as default};
@@ -0,0 +1 @@
1
+ import{ax as I,U as L,W as M,aG as z,aH as F,aI as K,au as w,i as q,ap as $,c as u,o,w as r,Z as y,aa as n,a as t,m as B,aJ as U,r as d,aK as W,ab as g,af as b,M as h,$ as f,ac as G,a0 as J,aL as x,aM as C,al as X}from"./BOCn_SGf.js";import{D as Y,a as Z,b as Q}from"./BLdMRpJD.js";import{D as _,a as P,b as O,c as ee,d as E}from"./V04-MrLN.js";import{c as te}from"./hCeWb_38.js";const ae={slots:{overlay:"fixed inset-0",content:"bg-default divide-y divide-default flex flex-col focus:outline-none",header:"flex items-center gap-1.5 p-4 sm:px-6 min-h-16",wrapper:"",body:"flex-1 p-4 sm:p-6",footer:"flex items-center gap-1.5 p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",close:"absolute top-4 end-4"},variants:{transition:{true:{overlay:"data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]",content:"data-[state=open]:animate-[scale-in_200ms_ease-out] data-[state=closed]:animate-[scale-out_200ms_ease-in]"}},fullscreen:{true:{content:"inset-0"},false:{content:"w-[calc(100vw-2rem)] max-w-lg rounded-lg shadow-lg ring ring-default"}},overlay:{true:{overlay:"bg-elevated/75"}},scrollable:{true:{overlay:"overflow-y-auto",content:"relative"},false:{content:"fixed",body:"overflow-y-auto"}}},compoundVariants:[{scrollable:!0,fullscreen:!1,class:{overlay:"grid place-items-center p-4 sm:py-8"}},{scrollable:!1,fullscreen:!1,class:{content:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] overflow-hidden"}}]},ne={__name:"UModal",props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},scrollable:{type:Boolean,required:!1},transition:{type:Boolean,required:!1,default:!0},fullscreen:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["after:leave","after:enter","close:prevent","update:open"],setup(a,{emit:S}){const e=a,m=S,l=I(),{t:T}=L(),k=M(),V=z(F(e,"open","defaultOpen","modal"),m),R=K(w(()=>e.portal)),H=w(()=>e.content),N=q(()=>e.dismissible?e.scrollable?{pointerDownOutside:s=>{const c=s.detail.originalEvent,p=c.target;(c.offsetX>p.clientWidth||c.offsetY>p.clientHeight)&&s.preventDefault()}}:{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((c,p)=>(c[p]=v=>{v.preventDefault(),m("close:prevent")},c),{})),[j,D]=te(),i=q(()=>$({extend:$(ae),...k.ui?.modal||{}})({transition:e.transition,fullscreen:e.fullscreen,overlay:e.overlay,scrollable:e.scrollable}));return(s,c)=>(o(),u(t(Q),x(C(t(V))),{default:r(({open:p,close:v})=>[y(t(j),null,{default:r(()=>[y(t(_),B({"data-slot":"content",class:i.value.content({class:[!l.default&&e.class,e.ui?.content]})},H.value,{onAfterEnter:c[0]||(c[0]=A=>m("after:enter")),onAfterLeave:c[1]||(c[1]=A=>m("after:leave"))},U(N.value)),{default:r(()=>[l.content&&(a.title||l.title||a.description||l.description)?(o(),u(t(W),{key:0},{default:r(()=>[a.title||l.title?(o(),u(t(P),{key:0},{default:r(()=>[d(s.$slots,"title",{},()=>[g(b(a.title),1)])]),_:3})):n("",!0),a.description||l.description?(o(),u(t(O),{key:1},{default:r(()=>[d(s.$slots,"description",{},()=>[g(b(a.description),1)])]),_:3})):n("",!0)]),_:3})):n("",!0),d(s.$slots,"content",{close:v},()=>[l.header||a.title||l.title||a.description||l.description||e.close||l.close?(o(),h("div",{key:0,"data-slot":"header",class:f(i.value.header({class:e.ui?.header}))},[d(s.$slots,"header",{close:v},()=>[G("div",{"data-slot":"wrapper",class:f(i.value.wrapper({class:e.ui?.wrapper}))},[a.title||l.title?(o(),u(t(P),{key:0,"data-slot":"title",class:f(i.value.title({class:e.ui?.title}))},{default:r(()=>[d(s.$slots,"title",{},()=>[g(b(a.title),1)])]),_:3},8,["class"])):n("",!0),a.description||l.description?(o(),u(t(O),{key:1,"data-slot":"description",class:f(i.value.description({class:e.ui?.description}))},{default:r(()=>[d(s.$slots,"description",{},()=>[g(b(a.description),1)])]),_:3},8,["class"])):n("",!0)],2),d(s.$slots,"actions"),e.close||l.close?(o(),u(t(ee),{key:0,"as-child":""},{default:r(()=>[d(s.$slots,"close",{ui:i.value},()=>[e.close?(o(),u(J,B({key:0,icon:a.closeIcon||t(k).ui.icons.close,color:"neutral",variant:"ghost","aria-label":t(T)("modal.close")},typeof e.close=="object"?e.close:{},{"data-slot":"close",class:i.value.close({class:e.ui?.close})}),null,16,["icon","aria-label","class"])):n("",!0)])]),_:2},1024)):n("",!0)])],2)):n("",!0),l.body?(o(),h("div",{key:1,"data-slot":"body",class:f(i.value.body({class:e.ui?.body}))},[d(s.$slots,"body",{close:v})],2)):n("",!0),l.footer?(o(),h("div",{key:2,"data-slot":"footer",class:f(i.value.footer({class:e.ui?.footer}))},[d(s.$slots,"footer",{close:v})],2)):n("",!0)])]),_:2},1040,["class"])]),_:2},1024),l.default?(o(),u(t(Y),{key:0,"as-child":"",class:f(e.class)},{default:r(()=>[d(s.$slots,"default",{open:p})]),_:2},1032,["class"])):n("",!0),y(t(Z),x(C(t(R))),{default:r(()=>[a.scrollable?(o(),u(t(E),{key:0,"data-slot":"overlay",class:f(i.value.overlay({class:e.ui?.overlay}))},{default:r(()=>[y(t(D))]),_:1},8,["class"])):(o(),h(X,{key:1},[a.overlay?(o(),u(t(E),{key:0,"data-slot":"overlay",class:f(i.value.overlay({class:e.ui?.overlay}))},null,8,["class"])):n("",!0),y(t(D))],64))]),_:1},16)]),_:3},16))}};export{ne as _};
@@ -1 +1 @@
1
- import{u as D}from"./C7m9zGMG.js";import{c as a}from"./D6tVZcRs.js";const O="sb-preferences",v=3600*24*365,k={editorMode:"editor",viewSourceMode:!1,lastDocumentPath:null,sidebarOpen:!0,docsTreeWidth:16,assistantPanelOpen:!1,assistantPanelTab:"chat",assistantLastConversationId:null,taskStatusFilter:"all",taskProjectFilter:null,agentStatsPeriod:"7d",usageStatsPeriod:"7d",usageDisplayMode:"tokens",onboardingDismissed:!1};function T(){const o=D(O,{maxAge:v,default:()=>({})});function e(t){return o.value[t]??k[t]}function s(t,f){o.value={...o.value,[t]:f}}const n=a({get:()=>e("editorMode"),set:t=>s("editorMode",t)}),i=a({get:()=>e("viewSourceMode"),set:t=>s("viewSourceMode",t)}),r=a({get:()=>e("lastDocumentPath"),set:t=>s("lastDocumentPath",t)}),d=a({get:()=>e("sidebarOpen"),set:t=>s("sidebarOpen",t)}),c=a({get:()=>e("docsTreeWidth"),set:t=>s("docsTreeWidth",t)}),l=a({get:()=>e("taskStatusFilter"),set:t=>s("taskStatusFilter",t)}),u=a({get:()=>e("taskProjectFilter"),set:t=>s("taskProjectFilter",t)}),g=a({get:()=>e("agentStatsPeriod"),set:t=>s("agentStatsPeriod",t)}),P=a({get:()=>e("assistantPanelOpen"),set:t=>s("assistantPanelOpen",t)}),p=a({get:()=>e("assistantPanelTab"),set:t=>s("assistantPanelTab",t)}),S=a({get:()=>e("assistantLastConversationId"),set:t=>s("assistantLastConversationId",t)}),m=a({get:()=>e("usageStatsPeriod"),set:t=>s("usageStatsPeriod",t)}),M=a({get:()=>e("usageDisplayMode"),set:t=>s("usageDisplayMode",t)}),b=a({get:()=>e("onboardingDismissed"),set:t=>s("onboardingDismissed",t)});return{get:e,set:s,editorMode:n,viewSourceMode:i,lastDocumentPath:r,sidebarOpen:d,docsTreeWidth:c,assistantPanelOpen:P,assistantPanelTab:p,assistantLastConversationId:S,taskStatusFilter:l,taskProjectFilter:u,agentStatsPeriod:g,usageStatsPeriod:m,usageDisplayMode:M,onboardingDismissed:b}}export{T as u};
1
+ import{u as D}from"./8WMJQbWG.js";import{i as a}from"./BOCn_SGf.js";const O="sb-preferences",v=3600*24*365,k={editorMode:"editor",viewSourceMode:!1,lastDocumentPath:null,sidebarOpen:!0,docsTreeWidth:16,assistantPanelOpen:!1,assistantPanelTab:"chat",assistantLastConversationId:null,taskStatusFilter:"all",taskProjectFilter:null,agentStatsPeriod:"7d",usageStatsPeriod:"7d",usageDisplayMode:"tokens",onboardingDismissed:!1};function T(){const o=D(O,{maxAge:v,default:()=>({})});function e(t){return o.value[t]??k[t]}function s(t,f){o.value={...o.value,[t]:f}}const n=a({get:()=>e("editorMode"),set:t=>s("editorMode",t)}),i=a({get:()=>e("viewSourceMode"),set:t=>s("viewSourceMode",t)}),r=a({get:()=>e("lastDocumentPath"),set:t=>s("lastDocumentPath",t)}),d=a({get:()=>e("sidebarOpen"),set:t=>s("sidebarOpen",t)}),c=a({get:()=>e("docsTreeWidth"),set:t=>s("docsTreeWidth",t)}),l=a({get:()=>e("taskStatusFilter"),set:t=>s("taskStatusFilter",t)}),u=a({get:()=>e("taskProjectFilter"),set:t=>s("taskProjectFilter",t)}),g=a({get:()=>e("agentStatsPeriod"),set:t=>s("agentStatsPeriod",t)}),P=a({get:()=>e("assistantPanelOpen"),set:t=>s("assistantPanelOpen",t)}),p=a({get:()=>e("assistantPanelTab"),set:t=>s("assistantPanelTab",t)}),S=a({get:()=>e("assistantLastConversationId"),set:t=>s("assistantLastConversationId",t)}),m=a({get:()=>e("usageStatsPeriod"),set:t=>s("usageStatsPeriod",t)}),M=a({get:()=>e("usageDisplayMode"),set:t=>s("usageDisplayMode",t)}),b=a({get:()=>e("onboardingDismissed"),set:t=>s("onboardingDismissed",t)});return{get:e,set:s,editorMode:n,viewSourceMode:i,lastDocumentPath:r,sidebarOpen:d,docsTreeWidth:c,assistantPanelOpen:P,assistantPanelTab:p,assistantLastConversationId:S,taskStatusFilter:l,taskProjectFilter:u,agentStatsPeriod:g,usageStatsPeriod:m,usageDisplayMode:M,onboardingDismissed:b}}export{T as u};
@@ -0,0 +1 @@
1
+ import{be as g,i as o,an as u,C as d,W as p,ap as s,c as v,o as f,w as b,r as m,ab as x,af as y,a as i,$ as w,P as h}from"./BOCn_SGf.js";const a={meta:"",ctrl:"",alt:"",win:"⊞",command:"⌘",shift:"⇧",control:"⌃",option:"⌥",enter:"↵",delete:"⌦",backspace:"⌫",escape:"Esc",tab:"⇥",capslock:"⇪",arrowup:"↑",arrowright:"→",arrowdown:"↓",arrowleft:"←",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘"},K=()=>{const e=o(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),r=u({meta:" ",alt:" ",ctrl:" "});d(()=>{r.meta=e.value?a.command:"Ctrl",r.ctrl=e.value?a.control:"Ctrl",r.alt=e.value?a.option:"Alt"});function n(t){if(t)return["meta","alt","ctrl"].includes(t)?r[t]:a[t]||t}return{macOS:e,getKbdKey:n}},k=g(K),C={base:"inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans uppercase",variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{sm:"h-4 min-w-[16px] text-[10px]",md:"h-5 min-w-[20px] text-[11px]",lg:"h-6 min-w-[24px] text-[12px]"}},compoundVariants:[{color:"primary",variant:"solid",class:"text-inverted bg-primary"},{color:"secondary",variant:"solid",class:"text-inverted bg-secondary"},{color:"success",variant:"solid",class:"text-inverted bg-success"},{color:"info",variant:"solid",class:"text-inverted bg-info"},{color:"warning",variant:"solid",class:"text-inverted bg-warning"},{color:"error",variant:"solid",class:"text-inverted bg-error"},{color:"primary",variant:"outline",class:"ring ring-inset ring-primary/50 text-primary"},{color:"secondary",variant:"outline",class:"ring ring-inset ring-secondary/50 text-secondary"},{color:"success",variant:"outline",class:"ring ring-inset ring-success/50 text-success"},{color:"info",variant:"outline",class:"ring ring-inset ring-info/50 text-info"},{color:"warning",variant:"outline",class:"ring ring-inset ring-warning/50 text-warning"},{color:"error",variant:"outline",class:"ring ring-inset ring-error/50 text-error"},{color:"primary",variant:"soft",class:"text-primary bg-primary/10"},{color:"secondary",variant:"soft",class:"text-secondary bg-secondary/10"},{color:"success",variant:"soft",class:"text-success bg-success/10"},{color:"info",variant:"soft",class:"text-info bg-info/10"},{color:"warning",variant:"soft",class:"text-warning bg-warning/10"},{color:"error",variant:"soft",class:"text-error bg-error/10"},{color:"primary",variant:"subtle",class:"text-primary ring ring-inset ring-primary/25 bg-primary/10"},{color:"secondary",variant:"subtle",class:"text-secondary ring ring-inset ring-secondary/25 bg-secondary/10"},{color:"success",variant:"subtle",class:"text-success ring ring-inset ring-success/25 bg-success/10"},{color:"info",variant:"subtle",class:"text-info ring ring-inset ring-info/25 bg-info/10"},{color:"warning",variant:"subtle",class:"text-warning ring ring-inset ring-warning/25 bg-warning/10"},{color:"error",variant:"subtle",class:"text-error ring ring-inset ring-error/25 bg-error/10"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"}],defaultVariants:{variant:"outline",color:"neutral",size:"md"}},S={__name:"UKbd",props:{as:{type:null,required:!1,default:"kbd"},value:{type:null,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},class:{type:null,required:!1}},setup(e){const r=e,{getKbdKey:n}=k(),t=p(),c=o(()=>s({extend:s(C),...t.ui?.kbd||{}}));return(l,q)=>(f(),v(i(h),{as:e.as,class:w(c.value({class:r.class,color:r.color,variant:r.variant,size:r.size}))},{default:b(()=>[m(l.$slots,"default",{},()=>[x(y(i(n)(e.value)),1)])]),_:3},8,["as","class"]))}};export{S as _,k as u};
@@ -0,0 +1 @@
1
+ import{aj as O,f,e as s}from"./BOCn_SGf.js";import{s as W}from"./Gyw_2f6x.js";const m={task:{enabled:!0},reminder:{enabled:!0},agent:{enabled:!0},memory:{enabled:!0},project:{enabled:!0},secret:{enabled:!0},document:{enabled:!1},hook:{enabled:!1},conversation:{enabled:!1},bridge:{enabled:!0}},n=s("disconnected"),a=s(new Set),l=s({...m}),t=s(null),i=s(0),$=5,x=2e3;let c=null,d=!1,p=!1;const R={create:"i-lucide-plus-circle",edit:"i-lucide-pencil",delete:"i-lucide-trash-2",restore:"i-lucide-undo-2",run:"i-lucide-play",cancel:"i-lucide-x-circle",complete:"i-lucide-check-circle",fail:"i-lucide-alert-circle"};function y(){const I=O();function h(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/notifications`}async function v(){if(!p)try{const e=await $fetch("/api/settings");l.value={...m,...e.data.notifications},p=!0}catch{console.warn("[notification-bus] Failed to load preferences, using defaults")}}function w(e){e.resource==="agent"&&e.resourceId&&(e.action==="run"?a.value.add(e.resourceId):(e.action==="complete"||e.action==="fail"||e.action==="cancel")&&a.value.delete(e.resourceId));const o=l.value[e.resource];o?.enabled&&(o.subtypes&&o.subtypes[e.action]===!1||I.add({title:e.title||"Notification",description:e.message,icon:R[e.action]||"i-lucide-bell",color:e.color||"info"}))}function g(){if(t.value?.readyState===WebSocket.OPEN||d&&n.value==="connecting")return;d=!0,n.value="connecting";const e=new WebSocket(h());t.value=e,e.onopen=()=>{n.value="connected",i.value=0,console.log("[notification-bus] Connected"),v(),k()},e.onmessage=o=>{try{const r=JSON.parse(o.data),u=r.type;if(u==="pong"||u==="connected")return;u==="resource_change"&&w(r)}catch(r){console.error("[notification-bus] Failed to parse message:",r)}},e.onclose=()=>{n.value="disconnected",b(),i.value<$&&(i.value++,console.log(`[notification-bus] Reconnecting (attempt ${i.value})...`),setTimeout(g,x*i.value))},e.onerror=()=>{n.value="error"}}function P(){b(),t.value&&(t.value.close(),t.value=null),n.value="disconnected",d=!1}function S(){t.value?.readyState===WebSocket.OPEN&&t.value.send(JSON.stringify({type:"ping"}))}function k(){c&&clearInterval(c),c=W(S,3e4)}function b(){c&&(clearInterval(c),c=null)}function N(e){return a.value.has(e)}function A(e){l.value=e}return{status:f(n),runningAgentIds:f(a),notificationPreferences:f(l),isAgentRunning:N,connect:g,disconnect:P,loadPreferences:v,updatePreferences:A}}export{m as d,y as u};