@qredence/fleet 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/web/client/assets/DialogTitle-DiAm7YNe.js +1 -0
  3. package/dist/web/client/assets/agent-disclosure-CMrxF7L-.js +1 -0
  4. package/dist/web/client/assets/alert-dialog-CYE37KMM.js +1 -0
  5. package/dist/web/client/assets/analytics-stub-C2vgmGm_.js +1 -0
  6. package/dist/web/client/assets/artifacts-panel-ClDpGWOU.js +1 -0
  7. package/dist/web/client/assets/{bot-Bs7QWJ2q.js → bot-DbB9BKL0.js} +1 -1
  8. package/dist/web/client/assets/bundle-mjs-cJTHqqzI.js +1 -0
  9. package/dist/web/client/assets/button-Dl0ce3Y5.js +1 -0
  10. package/dist/web/client/assets/{card-DA3Vnqay.js → card-DCEnYd2G.js} +1 -1
  11. package/dist/web/client/assets/chat-BVMnC5Qh.js +52 -0
  12. package/dist/web/client/assets/chat-command-palette-YuyaJNbi.js +1 -0
  13. package/dist/web/client/assets/check-B3LlvM65.js +1 -0
  14. package/dist/web/client/assets/{chevron-down-BEVGmnSb.js → chevron-down-DUUprRP5.js} +1 -1
  15. package/dist/web/client/assets/chevron-right-NVqQIoiO.js +1 -0
  16. package/dist/web/client/assets/{chunk-YOKDWASO-BAf618wr.js → chunk-YOKDWASO-Bte3iwlH.js} +6 -6
  17. package/dist/web/client/assets/citations-DXqV2NLy.js +1 -0
  18. package/dist/web/client/assets/collapsible-CUxOjhDJ.js +1 -0
  19. package/dist/web/client/assets/command-Cw4X8Bpk.js +1 -0
  20. package/dist/web/client/assets/createBaseUIEventDetails-B58Jldei.js +1 -0
  21. package/dist/web/client/assets/createLucideIcon-_dfI7Arx.js +1 -0
  22. package/dist/web/client/assets/dialog-BzcIOvFC.js +1 -0
  23. package/dist/web/client/assets/dist-52wg4XPY.js +1 -0
  24. package/dist/web/client/assets/dist-DbHxXSgQ.js +41 -0
  25. package/dist/web/client/assets/ease-CMumuPlX.js +1 -0
  26. package/dist/web/client/assets/{eye-B0DFz5hL.js → eye-CDHqtVoE.js} +1 -1
  27. package/dist/web/client/assets/file-text-TmalmYrb.js +1 -0
  28. package/dist/web/client/assets/{folder-BC5p7qK7.js → folder-vuNT4shY.js} +1 -1
  29. package/dist/web/client/assets/{fork-picker-dialog-B7NNpVmW.js → fork-picker-dialog-BYRr-xTy.js} +1 -1
  30. package/dist/web/client/assets/gauge-BsDqNM1A.js +1 -0
  31. package/dist/web/client/assets/git-branch-CTq9aACS.js +1 -0
  32. package/dist/web/client/assets/globals-BtCXZXL_.css +2 -0
  33. package/dist/web/client/assets/{hard-drive-CHqgr7VQ.js → hard-drive-BT7UxHQu.js} +1 -1
  34. package/dist/web/client/assets/highlighted-body-KPVGNVTW-CgT7gqvs.js +1 -0
  35. package/dist/web/client/assets/horizontal-resize-VLjLByUV.js +1 -0
  36. package/dist/web/client/assets/index-B9aXxpOv.js +12 -0
  37. package/dist/web/client/assets/input-CxZp56Im.js +1 -0
  38. package/dist/web/client/assets/input-group-D7lAfKHR.js +1 -0
  39. package/dist/web/client/assets/ipython-tool-CkHaO3PW.js +3 -0
  40. package/dist/web/client/assets/is-ref-object-BcRWZ4l7.js +1 -0
  41. package/dist/web/client/assets/{loader-circle-DjfHXUPB.js → loader-circle-B5GIZGxd.js} +1 -1
  42. package/dist/web/client/assets/markdown-BHkByC9K.js +2 -0
  43. package/dist/web/client/assets/{markdown-code-xNyjdZ4g.js → markdown-code-CDTRq-HZ.js} +1 -1
  44. package/dist/web/client/assets/mermaid-HWGCJPDP-CY3N5ECk.js +1 -0
  45. package/dist/web/client/assets/message-queue-Dl8wbCOu.js +1 -0
  46. package/dist/web/client/assets/model-selector-list-CHD8lMAl.js +1 -0
  47. package/dist/web/client/assets/{notify-DxL0VD7Z.js → notify-DjVixft7.js} +1 -1
  48. package/dist/web/client/assets/{openui-renderer-TLNe5e_Q.js → openui-renderer-C4e9FOVR.js} +38 -38
  49. package/dist/web/client/assets/{package-CdcJFPf2.js → package-BKBPgwMP.js} +1 -1
  50. package/dist/web/client/assets/{pencil-DcUwsKLn.js → pencil-CdO6qfv3.js} +1 -1
  51. package/dist/web/client/assets/{plug-Dt6VN0zF.js → plug-BRROUIw-.js} +1 -1
  52. package/dist/web/client/assets/prompt-input-WaGSKZCU.js +1 -0
  53. package/dist/web/client/assets/prompt-suggestions-BNyTcyWg.js +1 -0
  54. package/dist/web/client/assets/provider-catalog-ClVvphe0.js +1 -0
  55. package/dist/web/client/assets/provider-label-CwZ-KDxk.js +1 -0
  56. package/dist/web/client/assets/react-CwJFpaho.js +1 -0
  57. package/dist/web/client/assets/react-dom-DX3XddaT.js +1 -0
  58. package/dist/web/client/assets/{refresh-cw-IThTJ3j-.js → refresh-cw-l9WPHRkq.js} +1 -1
  59. package/dist/web/client/assets/repl-panel-L9dmPqio.js +1 -0
  60. package/dist/web/client/assets/{resource-helpers-Q2T0YCMO.js → resource-helpers-BuWybA8l.js} +1 -1
  61. package/dist/web/client/assets/resources-panel-mT-aMCvV.js +1 -0
  62. package/dist/web/client/assets/right-panel-context-CS8tJMzE.js +1 -0
  63. package/dist/web/client/assets/right-panel-registry-BnYCffmM.js +2 -0
  64. package/dist/web/client/assets/{rotate-ccw-WNFNkKQD.js → rotate-ccw-CfGhzOv7.js} +1 -1
  65. package/dist/web/client/assets/routes-DUontXSG.js +16 -0
  66. package/dist/web/client/assets/safe-external-url-BbAom7Bm.js +1 -0
  67. package/dist/web/client/assets/search-BjcXAUrI.js +1 -0
  68. package/dist/web/client/assets/session-insights-panel-B0rl37lo.js +1 -0
  69. package/dist/web/client/assets/session-reasoning-panel-8D2P7iaJ.js +1 -0
  70. package/dist/web/client/assets/session-tool-renderer-Bd3dsE2D.js +1395 -0
  71. package/dist/web/client/assets/session-tree-panel-CM4_wwrM.js +1 -0
  72. package/dist/web/client/assets/settings-dialog-DMTD9m6z.js +2 -0
  73. package/dist/web/client/assets/{skeleton-CkR2VmWc.js → skeleton-C3mo31Qu.js} +1 -1
  74. package/dist/web/client/assets/skeleton-loaders-BMa_G4yX.js +1 -0
  75. package/dist/web/client/assets/sparkles-BY5MFyk6.js +1 -0
  76. package/dist/web/client/assets/square-DQaQu9bp.js +1 -0
  77. package/dist/web/client/assets/{square-terminal-BYTN_I86.js → square-terminal-BsopiuN7.js} +1 -1
  78. package/dist/web/client/assets/{subagent-chat-panel-oeLDPDAK.js → subagent-chat-panel-BESrXxAR.js} +1 -1
  79. package/dist/web/client/assets/subagent-transcript-CAqFJfMj.js +1 -0
  80. package/dist/web/client/assets/subagents-panel-8aKOwWLs.js +1 -0
  81. package/dist/web/client/assets/{sun-BWiZFty0.js → sun-D0llhiMU.js} +1 -1
  82. package/dist/web/client/assets/surfaces-CpfsGAIA.js +1 -0
  83. package/dist/web/client/assets/switch-D3FhZU-S.js +1 -0
  84. package/dist/web/client/assets/terminal-BQAKkBY6.js +1 -0
  85. package/dist/web/client/assets/toast-lnCWGgSE.js +1 -0
  86. package/dist/web/client/assets/tokens-Ch5WqXC_.js +1 -0
  87. package/dist/web/client/assets/tool-result-B_yb2JoE.js +4 -0
  88. package/dist/web/client/assets/tool-timeline-VnMRQoLS.js +1 -0
  89. package/dist/web/client/assets/{triangle-alert-CU-gd7ui.js → triangle-alert-GAYh_5d3.js} +1 -1
  90. package/dist/web/client/assets/ui-preferences-aG2U2jjW.js +1 -0
  91. package/dist/web/client/assets/use-presence-7I2qv4qI.js +1 -0
  92. package/dist/web/client/assets/use-reduced-motion-BOcG709U.js +9 -0
  93. package/dist/web/client/assets/useBaseUiId-D9ZGPZ6f.js +1 -0
  94. package/dist/web/client/assets/useControlled-CgAAWIy9.js +1 -0
  95. package/dist/web/client/assets/utils-Brtgag-m.js +1 -0
  96. package/dist/web/client/assets/virtualized-turn-list-mL3ONUUA.js +6 -0
  97. package/dist/web/client/assets/workspace-panel-CKF5JQl2.js +1 -0
  98. package/dist/web/client/assets/workspace-path-nav-DqPbETfJ.js +2 -0
  99. package/dist/web/client/assets/{wrench-BJNNe07k.js → wrench-Myc12BTA.js} +1 -1
  100. package/dist/web/client/assets/x-BGsDD848.js +1 -0
  101. package/dist/web/client/bundle-budget.json +6 -6
  102. package/dist/web/server/_tanstack-start-manifest_v-Cm8xE-Rb-TMLYN3GY.js +93 -0
  103. package/dist/web/server/{artifacts-panel-D3ySO--V-XSL53CXL.js → artifacts-panel-CwLVBqyi-CDORJY75.js} +37 -41
  104. package/dist/web/server/{chat-command-palette-kAbXhWVg-TJWXH2WW.js → chat-command-palette-DUha04ia-5OV7WVJZ.js} +20 -18
  105. package/dist/web/server/{chunk-SALXCFVO.js → chunk-33QA7BQJ.js} +19 -1
  106. package/dist/web/server/chunk-3Q3QKLHC.js +386 -0
  107. package/dist/web/server/chunk-4EBSM4JR.js +74 -0
  108. package/dist/web/server/{chunk-5UCAJBAH.js → chunk-5RTGRTPD.js} +82 -49
  109. package/dist/web/server/chunk-7E76R7MB.js +2138 -0
  110. package/dist/web/server/{chunk-EBG3XFGQ.js → chunk-7FK6YEMA.js} +49 -44
  111. package/dist/web/server/chunk-7HXCGBUP.js +56 -0
  112. package/dist/web/server/{chunk-P66QQWUM.js → chunk-7NZ3FJDA.js} +14 -1
  113. package/dist/web/server/{chunk-HF7DG7PC.js → chunk-7UTDOTOU.js} +80 -78
  114. package/dist/web/server/{chunk-NNKJTKOQ.js → chunk-ADYZWC5L.js} +311 -281
  115. package/dist/web/server/{chunk-NJ4QEZHK.js → chunk-B2LF64HM.js} +7 -5
  116. package/dist/web/server/{chunk-OZO5ARFA.js → chunk-BQROC4PL.js} +11 -2
  117. package/dist/web/server/{chunk-NIZBFVJF.js → chunk-CAPTFJOC.js} +9 -7
  118. package/dist/web/server/{chunk-DJMHPJBP.js → chunk-CHEC7TWB.js} +3 -1
  119. package/dist/web/server/chunk-DLA5TLKX.js +164 -0
  120. package/dist/web/server/{chunk-PLYZ7P2Y.js → chunk-DP26GVWH.js} +43 -5
  121. package/dist/web/server/{chunk-MNBGB2SP.js → chunk-E5HALE4M.js} +4 -4
  122. package/dist/web/server/chunk-ETCO5KZK.js +113 -0
  123. package/dist/web/server/{chunk-NGCQJ33Y.js → chunk-FMAYMBRS.js} +1492 -1640
  124. package/dist/web/server/{chunk-KP2PNDGL.js → chunk-FTLJ66KU.js} +30 -33
  125. package/dist/web/server/{chunk-BLSX7WHW.js → chunk-H5D5DX3K.js} +23 -21
  126. package/dist/web/server/chunk-HGVJEUV4.js +102 -0
  127. package/dist/web/server/{chunk-WNCAL4HN.js → chunk-HQ5TEXHT.js} +132 -152
  128. package/dist/web/server/{chunk-YOM42BKD.js → chunk-IPV4GLJL.js} +16 -16
  129. package/dist/web/server/chunk-K6PTNSCW.js +31 -0
  130. package/dist/web/server/{chunk-AR7O7JXD.js → chunk-KBWUBWVJ.js} +24 -1
  131. package/dist/web/server/{chunk-O3HDELZ2.js → chunk-KZ35W5M7.js} +667 -661
  132. package/dist/web/server/{chunk-QIULBRTU.js → chunk-MJXXVQNA.js} +79 -84
  133. package/dist/web/server/{chunk-EAJTWMK5.js → chunk-NZ6KQT2X.js} +2 -2
  134. package/dist/web/server/{chunk-YGYOBX7G.js → chunk-O2IC376F.js} +1811 -53
  135. package/dist/web/server/chunk-OMPXUTMX.js +33 -0
  136. package/dist/web/server/{chunk-S3PQ6HKH.js → chunk-OVJYUWSQ.js} +2 -2
  137. package/dist/web/server/{chunk-JTCCQZLN.js → chunk-RJNGEU6C.js} +2 -2
  138. package/dist/web/server/{chunk-UCUFC553.js → chunk-RXUMFFUV.js} +3 -3
  139. package/dist/web/server/{chunk-DLUZFOG3.js → chunk-S2IBIJIG.js} +18 -22
  140. package/dist/web/server/{chunk-DO2O27B2.js → chunk-SDV3P3IW.js} +2 -2
  141. package/dist/web/server/{chunk-2DDWXTVG.js → chunk-T2UTBHJ4.js} +55 -11
  142. package/dist/web/server/chunk-TLNZNR7C.js +46 -0
  143. package/dist/web/server/{chunk-UL2725KQ.js → chunk-TR2GA5OF.js} +57 -49
  144. package/dist/web/server/{chunk-QFRCJWQQ.js → chunk-TU2WNRAL.js} +93 -32
  145. package/dist/web/server/{chunk-FYDQK6UX.js → chunk-UDD5W4CR.js} +32 -10
  146. package/dist/web/server/{chunk-MNPHMZU7.js → chunk-UE32PAV2.js} +47 -57
  147. package/dist/web/server/{chunk-3TIMGWWI.js → chunk-UM3RHJNZ.js} +2 -2
  148. package/dist/web/server/{chunk-ZIFSJ3HQ.js → chunk-V5IFFLZQ.js} +185 -109
  149. package/dist/web/server/{chunk-ETTDO4UO.js → chunk-WTYNN6EV.js} +1 -26
  150. package/dist/web/server/{chunk-EJEPDVK6.js → chunk-WU6X3GPJ.js} +48 -5
  151. package/dist/web/server/{chunk-D27LRYVT.js → chunk-XEG4JTND.js} +10 -9
  152. package/dist/web/server/{chunk-XIB6XNUX.js → chunk-XJ6TGSUB.js} +425 -404
  153. package/dist/web/server/{chunk-NWDI3OWB.js → chunk-XSOUURPF.js} +30 -26
  154. package/dist/web/server/{chunk-RIP3PBWT.js → chunk-YCCF676T.js} +4 -4
  155. package/dist/web/server/{chunk-4WBFCB4O.js → chunk-YDDDSVNB.js} +178 -269
  156. package/dist/web/server/{chunk-GETSIVNU.js → chunk-YVGCPUAW.js} +7 -7
  157. package/dist/web/server/{chunk-4UBOIY2S.js → chunk-ZNFXBGLK.js} +1 -1
  158. package/dist/web/server/{fork-picker-dialog-Ds6Tgtu3-DIBWN7MV.js → fork-picker-dialog-DeMiLZtS-WTRTTP64.js} +10 -8
  159. package/dist/web/server/{markdown-DTnMbD87-FXGGAPJD.js → markdown-BzNejPoZ-6ITTDAV6.js} +2 -3
  160. package/dist/web/server/{markdown-code-BStjFfsy-SSLWUT4S.js → markdown-code-DAwXuW6m-HHVELO6I.js} +3 -4
  161. package/dist/web/server/{fleet-message-queue-D_w8lSeY-T3HB7HVQ.js → message-queue-Demph1x4-GGXJUUKO.js} +14 -10
  162. package/dist/web/server/{model-selector-list-DxeGZoD2-P6S6FSJH.js → model-selector-list-BeGQHwKV-UJYFO4KX.js} +21 -19
  163. package/dist/web/server/{openui-renderer-MKFv6LlH-MDRSVFEY.js → openui-renderer-B4z18Brm-HSMKJ47D.js} +17 -17
  164. package/dist/web/server/{prompt-suggestions-BOItmGnD-YQA7RHLG.js → prompt-suggestions-yPZqX__K-3VGJC4IF.js} +7 -6
  165. package/dist/web/server/{repl-panel-CuyF8wt5-CHDT2Q3N.js → repl-panel-CgUF1qUw-3DFD2V53.js} +10 -11
  166. package/dist/web/server/{resources-panel-CE5pD4vy-V5FXBTYC.js → resources-panel-ChUliWV--JITAGS6Q.js} +6 -7
  167. package/dist/web/server/{router-Dg72SESP-PCWKLFRG.js → router-DfG45nTQ-3VXEUYG5.js} +3336 -238
  168. package/dist/web/server/{routes-BGrVtPYF-SURPAJN6.js → routes-B9F9UfF1-UN2IVBMJ.js} +5156 -4242
  169. package/dist/web/server/server.js +2 -2
  170. package/dist/web/server/{session-insights-panel-CUhdgvRt-VB2HUCQP.js → session-insights-panel-xgrkX1Rp-FDNURBXZ.js} +9 -9
  171. package/dist/web/server/{fleet-reasoning-panel-DG_vuvv0-NCZWEEIT.js → session-reasoning-panel-m1RgcIph-NUXGXVKE.js} +21 -22
  172. package/dist/web/server/session-tool-renderer-CT65wuet-RQBMXHEZ.js +46 -0
  173. package/dist/web/server/session-tree-panel-rS0t1wbf-HNA6AJBY.js +229 -0
  174. package/dist/web/server/{settings-dialog-CK0FJlTg-HZRBAXDZ.js → settings-dialog-CqkrDSnm-LFEKSS7Y.js} +186 -1380
  175. package/dist/web/server/{subagent-chat-panel-gzamnTgK-PQ2TLLJF.js → subagent-chat-panel-Cf7QdDqH-DPPSVLSY.js} +31 -39
  176. package/dist/web/server/{subagents-panel-Berjd7HJ-EI5ZKC6V.js → subagents-panel-_JsUw-6t-MZWM5P45.js} +38 -45
  177. package/dist/web/server/{fleet-tool-timeline-D6yM4ZMz-ZSFVRRRI.js → tool-timeline-QL9k5dzA-RLU26HXT.js} +6 -6
  178. package/dist/web/server/{workspace-panel-CBBa_3UO-B4PPFPMA.js → workspace-panel-BHEB9nRM-Y6KGIVGP.js} +23 -30
  179. package/package.json +1 -1
  180. package/dist/web/client/assets/action-swap-roll-COzQ86wm.js +0 -1
  181. package/dist/web/client/assets/agent-activity-svETLf_5.js +0 -1
  182. package/dist/web/client/assets/agent-disclosure-DAMuuGcM.js +0 -1
  183. package/dist/web/client/assets/analytics-stub-B6zGMuSV.js +0 -1
  184. package/dist/web/client/assets/artifacts-panel-HVjqBMyx.js +0 -1
  185. package/dist/web/client/assets/artifacts-utils-N_kUFbz2.js +0 -1
  186. package/dist/web/client/assets/bundle-mjs-DKHVkVWu.js +0 -1
  187. package/dist/web/client/assets/button-C5wFDY5_.js +0 -1
  188. package/dist/web/client/assets/chat-BhYseKd6.js +0 -52
  189. package/dist/web/client/assets/chat-command-palette-LILDO_vG.js +0 -1
  190. package/dist/web/client/assets/check-JjHKAZas.js +0 -1
  191. package/dist/web/client/assets/chevron-right-DrJxToLs.js +0 -1
  192. package/dist/web/client/assets/chevron-up-CnSvySGH.js +0 -1
  193. package/dist/web/client/assets/circle-alert-CONlFReH.js +0 -1
  194. package/dist/web/client/assets/circle-x-CkKCB__4.js +0 -1
  195. package/dist/web/client/assets/citations-BPv8HIpf.js +0 -2
  196. package/dist/web/client/assets/cn-C8c0S2mI.js +0 -1
  197. package/dist/web/client/assets/collapsible-BoXtZZWN.js +0 -1
  198. package/dist/web/client/assets/command-PhicLCoO.js +0 -1
  199. package/dist/web/client/assets/createBaseUIEventDetails-DV0dQrBX.js +0 -1
  200. package/dist/web/client/assets/createLucideIcon-DwxZHm0M.js +0 -1
  201. package/dist/web/client/assets/dialog-pBGUjAQ7.js +0 -1
  202. package/dist/web/client/assets/dist-BPaFisIZ.js +0 -41
  203. package/dist/web/client/assets/earth-DGZXAN5r.js +0 -1
  204. package/dist/web/client/assets/ease-u56MhKYS.js +0 -1
  205. package/dist/web/client/assets/file-text-T-NcAlZs.js +0 -1
  206. package/dist/web/client/assets/fleet-message-queue-fbYYwMj0.js +0 -1
  207. package/dist/web/client/assets/fleet-pi-tool-renderer-BRgNnmaJ.js +0 -1395
  208. package/dist/web/client/assets/fleet-reasoning-panel-CjA2dwUJ.js +0 -1
  209. package/dist/web/client/assets/fleet-subagent-list-iKUtLJKZ.js +0 -1
  210. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +0 -1
  211. package/dist/web/client/assets/gauge-DNpstbBn.js +0 -1
  212. package/dist/web/client/assets/globals-CuIiqOTg.css +0 -2
  213. package/dist/web/client/assets/highlighted-body-KPVGNVTW-sUCZ1fHv.js +0 -1
  214. package/dist/web/client/assets/horizontal-resize-Cp3iHMH7.js +0 -1
  215. package/dist/web/client/assets/image-BbPmlw-n.js +0 -1
  216. package/dist/web/client/assets/index-CSGplyr_.js +0 -12
  217. package/dist/web/client/assets/input-PcdubeKn.js +0 -1
  218. package/dist/web/client/assets/input-group-C2HJEZvl.js +0 -1
  219. package/dist/web/client/assets/ipython-tool-CyuMOxz1.js +0 -3
  220. package/dist/web/client/assets/layout-gyLzPvVv.js +0 -1
  221. package/dist/web/client/assets/markdown-lvexwooo.js +0 -2
  222. package/dist/web/client/assets/mermaid-HWGCJPDP-Bm7CuruA.js +0 -1
  223. package/dist/web/client/assets/message-square-hbDao-A1.js +0 -1
  224. package/dist/web/client/assets/model-selector-list-CoXX358G.js +0 -1
  225. package/dist/web/client/assets/plus-DXN1Bg_z.js +0 -1
  226. package/dist/web/client/assets/prompt-input-fwP8TsgQ.js +0 -1
  227. package/dist/web/client/assets/prompt-suggestions-BlGXmWS7.js +0 -1
  228. package/dist/web/client/assets/provider-catalog-DYMFdbKc.js +0 -1
  229. package/dist/web/client/assets/provider-label-B4q5mI65.js +0 -1
  230. package/dist/web/client/assets/react-dom-Bwxum3ti.js +0 -1
  231. package/dist/web/client/assets/repl-panel-C5om8MGU.js +0 -1
  232. package/dist/web/client/assets/resources-panel-D867-goy.js +0 -1
  233. package/dist/web/client/assets/right-panel-context-DHlNWJsF.js +0 -1
  234. package/dist/web/client/assets/right-panel-registry-BBlxLxnx.js +0 -2
  235. package/dist/web/client/assets/routes-XGsAIqBJ.js +0 -16
  236. package/dist/web/client/assets/safe-external-url-D3PJJIcM.js +0 -1
  237. package/dist/web/client/assets/search-eWVnAJsb.js +0 -1
  238. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +0 -1
  239. package/dist/web/client/assets/settings-dialog-BSBasR3o.js +0 -2
  240. package/dist/web/client/assets/shield-check-CkA2viVW.js +0 -1
  241. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +0 -1
  242. package/dist/web/client/assets/sparkles-DuclzqlE.js +0 -1
  243. package/dist/web/client/assets/square-Bhn8gjr0.js +0 -1
  244. package/dist/web/client/assets/subagent-transcript-DaVHjNUH.js +0 -1
  245. package/dist/web/client/assets/subagent-utils-DDH5qm9Z.js +0 -1
  246. package/dist/web/client/assets/subagents-panel-D_aVgSCi.js +0 -1
  247. package/dist/web/client/assets/surfaces-BhAXz9So.js +0 -1
  248. package/dist/web/client/assets/switch-WhXeJNNY.js +0 -1
  249. package/dist/web/client/assets/terminal-DOS1s1gm.js +0 -1
  250. package/dist/web/client/assets/toast-D3c9XeGe.js +0 -1
  251. package/dist/web/client/assets/tool-result-Cki8WUNc.js +0 -4
  252. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +0 -1
  253. package/dist/web/client/assets/use-reduced-motion-eORd7fqW.js +0 -9
  254. package/dist/web/client/assets/useBaseUiId-CHqXB2UQ.js +0 -1
  255. package/dist/web/client/assets/useControlled-CJJ9BOQB.js +0 -1
  256. package/dist/web/client/assets/utils-Eg7xtNmV.js +0 -1
  257. package/dist/web/client/assets/virtualized-turn-list-CdMa-ydT.js +0 -6
  258. package/dist/web/client/assets/workspace-panel-77bDbprs.js +0 -1
  259. package/dist/web/client/assets/workspace-path-nav-C0AQNZyy.js +0 -1
  260. package/dist/web/client/assets/x-CsRC_tCI.js +0 -1
  261. package/dist/web/server/_tanstack-start-manifest_v-0L7fqnH4-KMVGUFE4.js +0 -95
  262. package/dist/web/server/agent-activity-BuEE6iVw-CDZLK4D2.js +0 -514
  263. package/dist/web/server/chunk-2JHTYWD5.js +0 -1196
  264. package/dist/web/server/chunk-3JMESBAT.js +0 -35
  265. package/dist/web/server/chunk-42XU6WV7.js +0 -56
  266. package/dist/web/server/chunk-AQ66E5OW.js +0 -33
  267. package/dist/web/server/chunk-BYXBJQAS.js +0 -0
  268. package/dist/web/server/chunk-FAGDMGLK.js +0 -6589
  269. package/dist/web/server/chunk-FJV6EQDW.js +0 -36
  270. package/dist/web/server/chunk-GL6HWDJB.js +0 -19
  271. package/dist/web/server/chunk-L46H6IDX.js +0 -13
  272. package/dist/web/server/chunk-NIDBN7BQ.js +0 -86
  273. package/dist/web/server/chunk-ON33WDZX.js +0 -31
  274. package/dist/web/server/chunk-PVJCTQFK.js +0 -22
  275. package/dist/web/server/chunk-QPNUGF3V.js +0 -35
  276. package/dist/web/server/chunk-S5LFXXDY.js +0 -1265
  277. package/dist/web/server/chunk-VPKX7QRU.js +0 -42
  278. package/dist/web/server/chunk-ZCVWADNW.js +0 -37
  279. package/dist/web/server/fleet-pi-tool-renderer-qwc-qZFq-4U556N5Q.js +0 -51
  280. package/dist/web/server/fleet-subagent-list-BGb0PjhF-2X67FMUV.js +0 -18
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{et as r,z as i}from"./button-C5wFDY5_.js";import{t as a}from"./utils-Eg7xtNmV.js";import{G as o,O as s,ct as c,et as l,f as u,it as d,nt as f,rt as p,st as m,t as h}from"./createBaseUIEventDetails-DV0dQrBX.js";import{t as g}from"./useBaseUiId-CHqXB2UQ.js";import{t as _}from"./useControlled-CJJ9BOQB.js";var v=e(t(),1),y={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},b={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},x={valid(e){return e===null?null:e?{"data-valid":``}:{"data-invalid":``}}},S={invalid:void 0,name:void 0,validityData:{state:y,errors:[],error:``,value:``,initialValue:null},setValidityData:c,disabled:void 0,setTouched:c,setDirty:c,setFilled:c,setFocused:c,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:b,registerFieldControl:c,validation:{getValidationProps:(e,t=m)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:c,getInputControl:()=>null,commit:async()=>{},change:c}},C=v.createContext(S);function w(e=!0){let t=v.useContext(C);if(t.setValidityData===c&&!e)throw Error(f(28));return t}function T(e,t,n,r,i=!0,a){let{registerFieldControl:o}=w(),s=d(()=>Symbol());p(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),p(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var E=v.createContext({controlId:void 0,registerControlId:c,labelId:void 0,setLabelId:c,messageIds:[],setMessageIds:c,getDescriptionProps:e=>e});function D(){return v.useContext(E)}function O(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=D(),s=g(t),u=n?i:void 0,f=d(()=>Symbol()),m=v.useRef(!1),h=v.useRef(t!=null),_=l(()=>{!m.current||a===c||(m.current=!1,a(f.current,void 0))});return p(()=>{if(a===c)return;let e;if(n){let n=r?.current;e=o(n)&&n.closest(`label`)!=null?t??null:u??s}else if(t!=null)h.current=!0,e=t;else if(h.current)e=s;else{_();return}if(e===void 0){_();return}m.current=!0,a(f.current,e)},[t,r,u,a,n,s,f,_]),v.useEffect(()=>_,[_]),i??s}var k=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:c,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function A(){return v.useContext(k)}var j=v.forwardRef(function(e,t){let{render:n,className:a,id:o,name:c,value:d,disabled:f=!1,onValueChange:m,defaultValue:g,autoFocus:y=!1,style:b,...S}=e,{state:C,name:E,disabled:k,setTouched:j,setDirty:M,validityData:N,setFocused:P,setFilled:F,validationMode:I,validation:L}=w(),{clearErrors:R}=A(),z=k||f,B=E??c,V={...C,disabled:z},{labelId:H}=D(),U=O({id:o});p(()=>{let e=d!=null;L.inputRef.current?.value||e&&d!==``?F(!0):e&&d===``&&F(!1)},[L.inputRef,F,d]);let W=v.useRef(null);p(()=>{y&&W.current===i(r(W.current))&&P(!0)},[y,P]);let[G]=_({controlled:d,default:g,name:`FieldControl`,state:`value`}),K=d!==void 0,q=K?G:void 0,J=l(()=>L.inputRef.current?.value);return T(L.inputRef,U,q,J,!z,c),s(`input`,e,{ref:[t,W],state:V,props:[{id:U,disabled:z,name:B,ref:L.inputRef,"aria-labelledby":H,autoFocus:y,...K?{value:q}:{defaultValue:g},onChange(e){let t=e.currentTarget.value;m?.(t,h(u,e.nativeEvent)),M(t!==(N.initialValue??``)),F(t!==``),e.nativeEvent.defaultPrevented||(R(B),L.change(t))},onFocus(){P(!0)},onBlur(e){j(!0),P(!1),I===`onBlur`&&L.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(j(!0),L.commit(e.currentTarget.value))}},S,e=>L.getValidationProps(z,e)],stateAttributesMapping:x})}),M=n(),N=v.forwardRef(function(e,t){return(0,M.jsx)(j,{ref:t,...e})});function P({className:e,type:t,...n}){return(0,M.jsx)(N,{type:t,"data-slot":`input`,className:a(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}export{T as a,D as i,A as n,w as o,O as r,x as s,P as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-NZYk81nU.js";import{n as t,t as n}from"./button-C5wFDY5_.js";import{t as r}from"./utils-Eg7xtNmV.js";import{t as i}from"./input-PcdubeKn.js";var a=e();function o({className:e,...t}){return(0,a.jsx)(`textarea`,{"data-slot":`textarea`,className:r(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function s({className:e,...t}){return(0,a.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:r(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var c=t(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function l({className:e,align:t=`inline-start`,...n}){return(0,a.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:r(c({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input, textarea`)?.focus()},...n})}var u=t(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function d({className:e,type:t=`button`,variant:i=`ghost`,size:o=`xs`,...s}){return(0,a.jsx)(n,{type:t,"data-size":o,variant:i,className:r(u({size:o}),e),...s})}function f({className:e,...t}){return(0,a.jsx)(i,{"data-slot":`input-group-control`,className:r(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}export{o as a,f as i,l as n,d as r,s as t};
@@ -1,3 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Eg7xtNmV.js";import{t as i}from"./createLucideIcon-DwxZHm0M.js";import"./cn-C8c0S2mI.js";var a=i(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),o=e(t(),1);function s(e,t,n){let r=(0,o.useRef)(n);(0,o.useEffect)(()=>{r.current=n},[n]),(0,o.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>r.current(),t);return()=>clearTimeout(n)},[e,t])}var c=n();function l({children:e,as:t=`p`,className:n,duration:i=2,spread:a=100,delay:o=0}){let s={"--an-shimmer-duration":`${i}s`,"--an-shimmer-spread":`${a}px`,animationDelay:o>0?`${o}s`:void 0,animationDuration:`${i}s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`};return(0,c.jsx)(t,{className:r(`an-text-shimmer`,`an-text-shimmer--active`,n),style:s,children:e})}var u=o.memo(l);function d(e){let t=0,n=0;for(let r of e)if(r.lines)for(let e of r.lines)e.startsWith(`+`)?t++:e.startsWith(`-`)&&n++;if(t===0&&n===0)return;let r=[];return t>0&&r.push(`+${t}`),n>0&&r.push(`-${n}`),r.join(` `)}function f(e){let t=[];for(let n of e)if(n.lines)for(let e of n.lines)e.startsWith(`+`)?t.push({type:`add`,content:e.slice(1)}):e.startsWith(`-`)?t.push({type:`remove`,content:e.slice(1)}):e.startsWith(` `)&&t.push({type:`context`,content:e.slice(1)});return t}function p(e){return e===`result`?`complete`:`animating`}function m(e){let t=e.toLowerCase();if(t===`thinking`||t===`reasoning`)return`thinking`;if(t===`websearch`||t===`web_search`||t===`grep`||t===`glob`||t===`webfetch`||t===`web_fetch`)return`search`}function h(e,t){switch(e){case`Bash`:return t?.command?String(t.command).slice(0,80):``;case`Edit`:case`Write`:case`Read`:return t?.file_path?String(t.file_path).split(`/`).pop()??``:``;case`Grep`:return t?.pattern?String(t.pattern):``;case`Glob`:return t?.pattern?String(t.pattern):``;case`WebSearch`:case`web_search`:return t?.query?String(t.query):``;case`WebFetch`:case`web_fetch`:return t?.url?String(t.url).slice(0,60):``;default:return``}}function g(e,t){let{toolName:n,args:r={},result:i}=t,a={id:e,type:`tool-call`,toolName:n===`PlanWrite`?`Plan`:n===`TodoWrite`?`Todo`:n,toolDetail:h(n,r),duration:2**53-1,toolVariant:m(n)};if(n===`Bash`&&(a.bashCommand=r?.command?String(r.command):void 0,t.state===`result`&&i)){if(typeof i==`string`)a.bashOutput=i,a.bashSuccess=!0;else if(typeof i==`object`){let e=typeof i?.stdout==`string`?i.stdout:typeof i?.output==`string`?i.output:``,t=typeof i?.stderr==`string`?i.stderr:``;a.bashOutput=[e,t].filter(Boolean).join(e&&t?`
2
- `:``);let n=i?.exitCode??i?.exit_code;a.bashSuccess=n===void 0||n===0}else a.bashOutput=JSON.stringify(i),a.bashSuccess=!0}if((n===`Edit`||n===`Write`||n===`Read`)&&(a.filePath=r?.file_path?String(r.file_path):void 0),n===`Write`){let e=typeof i?.content==`string`?i.content:typeof r?.content==`string`?r.content:``;if(e){let t=e.split(`
3
- `);a.diffStats=`+${t.length}`,a.diffLines=t.map(e=>({type:`add`,content:e}))}}if(n===`Edit`&&Array.isArray(i?.structuredPatch)&&(a.diffStats=d(i.structuredPatch),a.diffLines=f(i.structuredPatch)),(n===`WebSearch`||n===`web_search`||n===`Grep`||n===`Glob`)&&(a.searchQuery=r?.query??r?.pattern?String(r?.query??r?.pattern):void 0,a.searchSource=n===`WebSearch`||n===`web_search`?`web`:`code`),n.toLowerCase()===`thinking`||n.toLowerCase()===`reasoning`){let e=typeof r?.thought==`string`?r.thought:typeof r?.text==`string`?r.text:void 0,t=typeof i==`string`?i:i&&typeof i==`object`&&typeof i.text==`string`?i.text:typeof i==`object`&&i&&typeof i.thought==`string`?i.thought:void 0;a.thoughtContent=e??t}return a}function _(e){return e===`output-available`?`result`:e===`input-streaming`?`partial-call`:`call`}function v(e,t){let n=_(e.state);return{step:g(e.toolCallId??e.id??t.toLowerCase(),{toolName:t,args:e.input??e.args??{},state:n,result:e.output??e.result}),stepState:p(n)}}var y=(0,o.memo)(function({isPending:e,approveLabel:t,rejectLabel:n,onApprove:r,onReject:i}){let[a,s]=(0,o.useState)(null),l=a===`approved`?`Approved`:t??`Next`,u=a===`rejected`?`Skipped`:n??`Skip`,d=()=>{a||(s(`approved`),r?.())},f=()=>{a||(s(`rejected`),i?.())},p=(0,o.useMemo)(()=>a===`approved`?{label:`Waiting`,dots:!0}:a===`rejected`?{label:`Canceled`,dots:!1}:e?{label:`Starting`,dots:!0}:null,[a,e]);return(0,c.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border bg-an-tool-background py-1 pr-2 pl-3`,children:[p?(0,c.jsxs)(`span`,{className:`text-xs text-an-tool-color-muted`,children:[p.label,p.dots&&(0,c.jsxs)(`span`,{className:`inline-flex`,"aria-hidden":`true`,children:[(0,c.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.2s] text-an-tool-color-muted`,children:`.`}),(0,c.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.4s] text-an-tool-color-muted`,children:`.`}),(0,c.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.6s] text-an-tool-color-muted`,children:`.`})]})]}):(0,c.jsx)(`span`,{"aria-hidden":`true`}),(0,c.jsxs)(`div`,{className:`flex gap-1`,children:[(0,c.jsx)(`button`,{type:`button`,onClick:f,disabled:!!a,className:`h-5 rounded-[4px] px-1.5 text-xs text-muted-foreground transition-[background-color,color,transform] duration-150 hover:bg-muted/50 hover:text-an-tool-color active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-transparent disabled:active:scale-100`,children:u}),(0,c.jsx)(`button`,{type:`button`,onClick:d,disabled:!!a,className:`h-5 rounded-[4px] bg-an-primary-color px-1.5 text-xs font-medium text-an-send-button-color transition-[background-color,transform] duration-150 hover:bg-an-primary-color/90 active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-an-primary-color disabled:active:scale-100`,children:l})]})]})});function b(e){let t=e.input??e.args??{};return typeof t.code==`string`?t.code:``}function x(e){let t=e.output??e.result;if(!(!t||typeof t!=`object`))return t}function S(...e){for(let t of e)if(t&&t.trim())return t;return``}function C({isPending:e,isBashCell:t,hasError:n,kernelRestarted:r}){return(0,c.jsxs)(`div`,{className:`flex h-7 items-center justify-between pr-2 pl-2.5`,children:[(0,c.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden`,children:[(0,c.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.625rem] leading-none text-muted-foreground uppercase`,children:[(0,c.jsx)(a,{className:`h-3 w-3`}),t?`shell`:`python`]}),e?(0,c.jsx)(u,{as:`span`,duration:1.2,className:`m-0 inline-flex h-full items-center truncate text-xs leading-none`,children:`Running cell`}):(0,c.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[n?`Cell failed`:`Ran cell`,r&&` · kernel restarted`]})]}),e&&(0,c.jsx)(`svg`,{className:`h-3 w-3 shrink-0 animate-spin text-muted-foreground`,viewBox:`0 0 16 16`,fill:`none`,children:(0,c.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`28`,strokeDashoffset:`7`,strokeLinecap:`round`})})]})}function w({output:e}){return(0,c.jsxs)(`div`,{className:`mt-1.5 border-t border-dashed border-border/70 pt-1.5 font-mono text-[0.6875rem] leading-[15px]`,children:[(0,c.jsx)(`span`,{className:`text-[0.625rem] font-semibold uppercase tracking-wider text-amber-600/90 dark:text-amber-400/90`,children:`Unattributed background output:`}),(0,c.jsx)(`div`,{className:`mt-0.5 max-h-[140px] overflow-auto whitespace-pre-wrap rounded bg-muted/40 p-1.5 text-muted-foreground`,children:e})]})}function T({step:e,state:t,onComplete:n,approval:r,cellIndex:i,part:a}){s(t===`animating`,e.duration,n);let o=t===`animating`,l=b(a),u=x(a),d=typeof a.backgroundOutput==`string`&&a.backgroundOutput.trim()?a.backgroundOutput:typeof u?.backgroundOutput==`string`&&u.backgroundOutput.trim()?u.backgroundOutput:void 0,f=l.trimStart().startsWith(`%%bash`),p=i===void 0?`IPython`:`In [${i}]`,m=S(u?.result,u?.stdout,u?.stderr,u?.error?.evalue),h=!!u?.error||!!u?.errorEname||u?.status===`error`;return(0,c.jsxs)(`div`,{className:`overflow-hidden rounded-an-tool-border-radius border border-border bg-an-tool-background`,children:[(0,c.jsx)(C,{isPending:o,isBashCell:f,hasError:h,kernelRestarted:u?.kernelRestarted}),(0,c.jsxs)(`div`,{className:`overflow-hidden border-t border-border bg-background px-2.5 py-1.5 font-mono text-[0.75rem] leading-[16px]`,children:[(0,c.jsxs)(`div`,{className:`break-all whitespace-pre-wrap`,children:[(0,c.jsxs)(`span`,{className:`mr-2 text-cyan-600 select-none dark:text-cyan-400`,children:[p,`:`]}),(0,c.jsx)(`span`,{className:`text-foreground`,children:l})]}),!o&&m&&(0,c.jsx)(`div`,{className:`mt-1 max-h-[160px] overflow-hidden whitespace-pre-line ${h?`text-red-600 dark:text-red-400`:`text-muted-foreground`}`,children:m}),d&&(0,c.jsx)(w,{output:d})]}),r&&(0,c.jsx)(y,{isPending:o,...r})]})}var E=new Map,D=0;function O(e){if(!e)return++D;let t=E.get(e);if(t)return t;let n=++D;return E.set(e,n),n}var k=(0,o.memo)(function({part:e}){let t=e.input?.approval??e.args?.approval,{step:n,stepState:r}=v(e,`IPython`),i=O(e.toolCallId);return(0,c.jsx)(T,{step:n,state:r,onComplete:()=>{},approval:t,cellIndex:i,part:e})});export{s as a,u as i,y as n,a as o,v as r,k as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";var r=n(),i=e(t(),1),a=(0,i.createContext)({}),o=(0,i.createContext)(null);function s(e,t){e.indexOf(t)===-1&&e.push(t)}function c(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var l=(e,t,n)=>n>t?t:n<e?e:n,u=()=>{},d=()=>{},f={},p=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),m=e=>typeof e==`object`&&!!e,h=e=>/^0[^.\s]+$/u.test(e);function g(e){let t;return()=>(t===void 0&&(t=e()),t)}var _=e=>e,v=(...e)=>e.reduce((e,t)=>n=>t(e(n))),y=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},b=class{constructor(){this.subscriptions=[]}add(e){return s(this.subscriptions,e),()=>c(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},x=e=>e*1e3,S=e=>e/1e3,C=(e,t)=>t?1e3/t*e:0,w=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ee=1e-7,te=12;function ne(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=w(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ee&&++s<te);return o}function re(e,t,n,r){if(e===t&&n===r)return _;let i=t=>ne(t,0,1,e,n);return e=>e===0||e===1?e:w(i(e),t,r)}var ie=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ae=e=>t=>1-e(1-t),oe=re(.33,1.53,.69,.99),se=ae(oe),ce=ie(se),le=e=>e>=1?1:(e*=2)<1?.5*se(e):.5*(2-2**(-10*(e-1))),ue=e=>1-Math.sin(Math.acos(e)),de=ae(ue),fe=ie(ue),pe=re(.42,0,1,1),me=re(0,0,.58,1),he=re(.42,0,.58,1),ge=e=>Array.isArray(e)&&typeof e[0]!=`number`,_e=e=>Array.isArray(e)&&typeof e[0]==`number`,ve={linear:_,easeIn:pe,easeInOut:he,easeOut:me,circIn:ue,circInOut:fe,circOut:de,backIn:se,backInOut:ce,backOut:oe,anticipate:le},ye=e=>typeof e==`string`,be=e=>{if(_e(e)){e.length;let[t,n,r,i]=e;return re(t,n,r,i)}return ye(e)?(ve[e],`${e}`,ve[e]):e},xe=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Se(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Ce=40;function we(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=xe.reduce((e,t)=>(e[t]=Se(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:p,render:m,postRender:h}=o,g=()=>{let a=f.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ce),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),p.process(i),m.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))},_=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:xe.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||_(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<xe.length;t++)o[xe[t]].cancel(e)},state:i,steps:o}}var{schedule:T,cancel:E,state:D,steps:Te}=we(typeof requestAnimationFrame<`u`?requestAnimationFrame:_,!0),Ee;function De(){Ee=void 0}var O={now:()=>(Ee===void 0&&O.set(D.isProcessing||f.useManualTiming?D.timestamp:performance.now()),Ee),set:e=>{Ee=e,queueMicrotask(De)}},Oe=e=>t=>typeof t==`string`&&t.startsWith(e),ke=Oe(`--`),Ae=Oe(`var(--`),je=e=>Ae(e)?Me.test(e.split(`/*`)[0].trim()):!1,Me=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ne(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Pe={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Fe={...Pe,transform:e=>l(0,1,e)},Ie={...Pe,default:1},Le=e=>Math.round(e*1e5)/1e5,Re=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ze(e){return e==null}var Be=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ve=(e,t)=>n=>!!(typeof n==`string`&&Be.test(n)&&n.startsWith(e)||t&&!ze(n)&&Object.prototype.hasOwnProperty.call(n,t)),He=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Re);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ue=e=>l(0,255,e),We={...Pe,transform:e=>Math.round(Ue(e))},k={test:Ve(`rgb`,`red`),parse:He(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+We.transform(e)+`, `+We.transform(t)+`, `+We.transform(n)+`, `+Le(Fe.transform(r))+`)`};function Ge(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Ke={test:Ve(`#`),parse:Ge,transform:k.transform},qe=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),A=qe(`deg`),j=qe(`%`),M=qe(`px`),Je=qe(`vh`),Ye=qe(`vw`),Xe={...j,parse:e=>j.parse(e)/100,transform:e=>j.transform(e*100)},N={test:Ve(`hsl`,`hue`),parse:He(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+j.transform(Le(t))+`, `+j.transform(Le(n))+`, `+Le(Fe.transform(r))+`)`},P={test:e=>k.test(e)||Ke.test(e)||N.test(e),parse:e=>k.test(e)?k.parse(e):N.test(e)?N.parse(e):Ke.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?k.transform(e):N.transform(e),getAnimatableNone:e=>{let t=P.parse(e);return t.alpha=0,P.transform(t)}},Ze=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qe(e){return isNaN(e)&&typeof e==`string`&&(e.match(Re)?.length||0)+(e.match(Ze)?.length||0)>0}var $e=`number`,et=`color`,tt=`var`,nt=`var(`,rt="${}",it=/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 at(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(it,e=>(P.test(e)?(r.color.push(a),i.push(et),n.push(P.parse(e))):e.startsWith(nt)?(r.var.push(a),i.push(tt),n.push(e)):(r.number.push(a),i.push($e),n.push(parseFloat(e))),++a,rt)).split(rt),indexes:r,types:i}}function ot(e){return at(e).values}function st({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===$e?Le(r[a]):e===et?P.transform(r[a]):r[a]}return i}}function ct(e){return st(at(e))}var lt=e=>typeof e==`number`?0:P.test(e)?P.getAnimatableNone(e):e,ut=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:lt(e);function dt(e){let t=at(e);return st(t)(t.values.map((e,n)=>ut(e,t.split[n])))}var F={test:Qe,parse:ot,createTransformer:ct,getAnimatableNone:dt};function ft(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pt({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ft(s,r,e+1/3),a=ft(s,r,e),o=ft(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function mt(e,t){return n=>n>0?t:e}var I=(e,t,n)=>e+(t-e)*n,ht=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},gt=[Ke,k,N],_t=e=>gt.find(t=>t.test(e));function vt(e){let t=_t(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===N&&(n=pt(n)),n}var yt=(e,t)=>{let n=vt(e),r=vt(t);if(!n||!r)return mt(e,t);let i={...n};return e=>(i.red=ht(n.red,r.red,e),i.green=ht(n.green,r.green,e),i.blue=ht(n.blue,r.blue,e),i.alpha=I(n.alpha,r.alpha,e),k.transform(i))},bt=new Set([`none`,`hidden`]);function xt(e,t){return bt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function St(e,t){return n=>I(e,t,n)}function Ct(e){return typeof e==`number`?St:typeof e==`string`?je(e)?mt:P.test(e)?yt:Dt:Array.isArray(e)?wt:typeof e==`object`?P.test(e)?yt:Tt:mt}function wt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Ct(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Tt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ct(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Et(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Dt=(e,t)=>{let n=F.createTransformer(t),r=at(e),i=at(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?bt.has(e)&&!i.values.length||bt.has(t)&&!r.values.length?xt(e,t):v(wt(Et(r,i),i.values),n):(`${e}${t}`,mt(e,t))};function Ot(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?I(e,t,n):Ct(e)(e,t)}var kt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>T.update(t,e),stop:()=>E(t),now:()=>D.isProcessing?D.timestamp:O.now()}},At=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},jt=2e4;function Mt(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Nt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Mt(r),jt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:S(i)}}var L={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};function Pt(e,t){return e*Math.sqrt(1-t*t)}var Ft=12;function It(e,t,n){let r=n;for(let n=1;n<Ft;n++)r-=e(r)/t(r);return r}var Lt=.001;function Rt({duration:e=L.duration,bounce:t=L.bounce,velocity:n=L.velocity,mass:r=L.mass}){let i,a;L.maxDuration;let o=1-t;o=l(L.minDamping,L.maxDamping,o),e=l(L.minDuration,L.maxDuration,S(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Pt(t,o),c=Math.exp(-i);return Lt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Pt(t**2,o);return(-i(t)+Lt>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=It(i,a,s);if(e=x(e),isNaN(c))return{stiffness:L.stiffness,damping:L.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var zt=[`duration`,`bounce`],Bt=[`stiffness`,`damping`,`mass`];function Vt(e,t){return t.some(t=>e[t]!==void 0)}function Ht(e){let t={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...e};if(!Vt(e,Bt)&&Vt(e,zt)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*l(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:L.mass,stiffness:i,damping:a}}else{let n=Rt({...e,velocity:0});t={...t,...n,mass:L.mass},t.isResolvedFromDuration=!0}}return t}function Ut(e=L.visualDuration,t=L.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Ht({...n,velocity:-S(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=S(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?L.restSpeed.granular:L.restSpeed.default,i||=v?L.restDelta.granular:L.restDelta.default;let y,b,C,w,ee,te;if(h<1)C=Pt(_,h),w=(m+h*_*g)/C,y=e=>{let t=Math.exp(-h*_*e);return o-t*(w*Math.sin(C*e)+g*Math.cos(C*e))},ee=h*_*w+g*C,te=h*_*g-w*C,b=e=>Math.exp(-h*_*e)*(ee*Math.sin(C*e)+te*Math.cos(C*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let ne={calculatedDuration:p&&d||null,velocity:e=>x(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(C*e),a=Math.cos(C*e),c=o-t*(w*n+g*a),l=x(t*(ee*n+te*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=x(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Mt(ne),jt),t=At(t=>ne.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return ne}Ut.applyToOptions=e=>{let t=Nt(e,100,Ut);return e.ease=t.ease,e.duration=x(t.duration),e.type=`keyframes`,e};var Wt=5;function Gt(e,t,n){let r=Math.max(t-Wt,0);return C(n-e(r),t-r)}function Kt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Ut({keyframes:[f.value,m(f.value)],velocity:Gt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function qt(e,t,n){let r=[],i=n||f.mix||Ot,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=v(Array.isArray(t)?t[n]||_:t,a)),r.push(a)}return r}function Jt(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=qt(t,r,i),c=s.length,u=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=y(e[r],e[r+1],n);return s[r](i)};return n?t=>u(l(e[0],e[a-1],t)):u}function Yt(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=y(0,t,r);e.push(I(n,1,i))}}function Xt(e){let t=[0];return Yt(t,e.length-1),t}function Zt(e,t){return e.map(e=>e*t)}function Qt(e,t){return e.map(()=>t||he).splice(0,e.length-1)}function $t({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ge(r)?r.map(be):be(r),a={done:!1,value:t[0]},o=Jt(Zt(n&&n.length===t.length?n:Xt(t),e),t,{ease:Array.isArray(i)?i:Qt(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var en=e=>e!==null;function tn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(en),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var nn={decay:Kt,inertia:Kt,tween:$t,keyframes:$t,spring:Ut};function rn(e){typeof e.type==`string`&&(e.type=nn[e.type])}var an=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},on=e=>e/100,sn=class extends an{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==O.now()&&this.tick(O.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;rn(e);let{type:t=$t,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||$t;s!==$t&&typeof o[0]!=`number`&&(this.mixKeyframes=v(on,Ot(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Mt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:h,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let _=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?_<0:_>r;this.currentTime=Math.max(_,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(d){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,d+1),t%2&&(f===`reverse`?(n=1-n,p&&(n-=p/o)):f===`mirror`&&(b=a)),y=l(0,1,n)*o}let x;v?(this.delayState.value=u[0],x=this.delayState):x=b.next(y),i&&!v&&(x.value=i(x.value));let{done:S}=x;!v&&s!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&m!==Kt&&(x.value=tn(u,this.options,g,this.speed)),h&&h(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return S(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+S(e)}get time(){return S(this.currentTime)}set time(e){e=x(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),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Gt(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(O.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=S(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=kt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(O.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function cn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var R=e=>e*180/Math.PI,ln=e=>dn(R(Math.atan2(e[1],e[0]))),un={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ln,rotateZ:ln,skewX:e=>R(Math.atan(e[1])),skewY:e=>R(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},dn=e=>(e%=360,e<0&&(e+=360),e),fn=ln,pn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),hn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pn,scaleY:mn,scale:e=>(pn(e)+mn(e))/2,rotateX:e=>dn(R(Math.atan2(e[6],e[5]))),rotateY:e=>dn(R(Math.atan2(-e[2],e[0]))),rotateZ:fn,rotate:fn,skewX:e=>R(Math.atan(e[4])),skewY:e=>R(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function gn(e){return+!!e.includes(`scale`)}function _n(e,t){if(!e||e===`none`)return gn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=hn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=un,i=t}if(!i)return gn(t);let a=r[t],o=i[1].split(`,`).map(yn);return typeof a==`function`?a(o):o[a]}var vn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return _n(n,t)};function yn(e){return parseFloat(e.trim())}var bn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],xn=new Set([...bn,`pathRotation`]),Sn=e=>e===Pe||e===M,Cn=new Set([`x`,`y`,`z`]),wn=bn.filter(e=>!Cn.has(e));function Tn(e){let t=[];return wn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var z={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>_n(t,`x`),y:(e,{transform:t})=>_n(t,`y`)};z.translateX=z.x,z.translateY=z.y;var B=new Set,En=!1,Dn=!1,On=!1;function kn(){if(Dn){let e=Array.from(B).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Tn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Dn=!1,En=!1,B.forEach(e=>e.complete(On)),B.clear()}function An(){B.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Dn=!0)})}function jn(){On=!0,An(),kn(),On=!1}var Mn=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(B.add(this),En||(En=!0,T.read(An),T.resolveKeyframes(kn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}cn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),B.delete(this)}cancel(){this.state===`scheduled`&&(B.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Nn=e=>e.startsWith(`--`);function Pn(e,t,n){Nn(t)?e.style.setProperty(t,n):e.style[t]=n}var Fn={};function In(e,t){let n=g(e);return()=>Fn[t]??n()}var Ln=In(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Rn=In(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),zn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:zn([0,.65,.55,1]),circOut:zn([.55,0,1,.45]),backIn:zn([.31,.01,.66,-.59]),backOut:zn([.33,1.53,.69,.99])};function Vn(e,t){if(e)return typeof e==`function`?Rn()?At(e,t):`ease-out`:_e(e)?zn(e):Array.isArray(e)?e.map(e=>Vn(e,t)||Bn.easeOut):Bn[e]}function Hn(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Vn(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Un(e){return typeof e==`function`&&`applyToOptions`in e}function Wn({type:e,...t}){return Un(e)&&Rn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Gn=class extends an{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Wn(e);this.animation=Hn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=tn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Pn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return S(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+S(e)}get time(){return S(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=x(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Ln()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),_):r(this)}},Kn={anticipate:le,backInOut:ce,circInOut:fe};function qn(e){return e in Kn}function Jn(e){typeof e.ease==`string`&&qn(e.ease)&&(e.ease=Kn[e.ease])}var Yn=10,Xn=class extends Gn{constructor(e){Jn(e),rn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new sn({...a,autoplay:!1}),s=Math.max(Yn,O.now()-this.startTime),c=l(0,Yn,s-Yn),u=o.sample(s).value,{name:d}=this.options;i&&d&&Pn(i,d,u),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,u,c),o.stop()}},Zn=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(F.test(e)||e===`0`)&&!e.startsWith(`url(`));function Qn(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function $n(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Zn(i,t),s=Zn(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Qn(e)||(n===`spring`||Un(n))&&r}function er(e){e.duration=0,e.type=`keyframes`}var tr=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),nr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function rr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&nr.test(e[t]))return!0;return!1}var ir=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ar=g(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function or(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return ar()&&n&&(tr.has(n)||ir.has(n)&&rr(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var sr=40,cr=class extends an{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=O.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||Mn;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=O.now();let u=!0;$n(e,i,a,o)||(u=!1,(f.instantAnimations||!s)&&l?.(tn(e,n,t)),e[0]=e[e.length-1],er(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>sr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},p=u&&!c&&or(d),m=d.motionValue?.owner?.current,h;if(p)try{h=new Xn({...d,element:m})}catch{h=new sn(d)}else h=new sn(d);h.finished.then(()=>{this.notifyFinished()}).catch(_),this.pendingTimeline&&=(this.stopTimeline=h.attachTimeline(this.pendingTimeline),void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),jn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function lr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var ur=30,dr=e=>!isNaN(parseFloat(e)),fr={current:void 0},pr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=O.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=O.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=dr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new b);let n=this.events[e].add(t);return e===`change`?()=>{n(),T.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return fr.current&&fr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=O.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ur)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ur);return C(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function V(e,t){return new pr(e,t)}function mr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function hr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:mr(n,e)}var gr={type:`spring`,stiffness:500,damping:25,restSpeed:10},_r=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vr={type:`keyframes`,duration:.8},yr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},br=(e,{keyframes:t})=>t.length>2?vr:xn.has(e)?e.startsWith(`scale`)?_r(t[1]):gr:yr,xr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Sr(e){for(let t in e)if(!xr.has(t))return!0;return!1}var Cr=(e,t,n,r={},i,a)=>o=>{let s=hr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=x(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Sr(s)||Object.assign(u,br(e,u)),u.duration&&=x(u.duration),u.repeatDelay&&=x(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(er(u),u.delay===0&&(d=!0)),(f.instantAnimations||f.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,er(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=tn(u.keyframes,s);if(e!==void 0){T.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new sn(u):new cr(u)},wr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tr(e){let t=wr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Er(e,t,n=1){`${e}`;let[r,i]=Tr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return p(e)?parseFloat(e):e}return je(i)?Er(i,t,n+1):i}function Dr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Or(e,t,n,r){if(typeof t==`function`){let[i,a]=Dr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Dr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function H(e,t,n){let r=e.getProps();return Or(r,t,n===void 0?r.custom:n,e)}var kr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...bn]),Ar=e=>Array.isArray(e);function jr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,V(n))}function Mr(e){return Ar(e)?e[e.length-1]||0:e}function Nr(e,t){let{transitionEnd:n={},transition:r={},...i}=H(e,t)||{};i={...i,...n};for(let t in i)jr(e,t,Mr(i[t]))}var U=e=>!!(e&&e.getVelocity);function Pr(e){return!!(U(e)&&e.add)}function Fr(e,t){let n=e.getValue(`willChange`);if(Pr(n))return n.add(t);if(!n&&f.WillChange){let n=new f.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ir(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Lr=`data-`+Ir(`framerAppearId`);function Rr(e){return e.props[Lr]}var zr=typeof window<`u`;function Br({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Vr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?mr(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Br(f,t))continue;let o={delay:n,...hr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){T.update(()=>r.set(i));continue}let p=!1;if(zr&&window.MotionHandoffAnimation){let n=Rr(e);if(n){let e=window.MotionHandoffAnimation(n,t,T);e!==null&&(o.startTime=e,p=!0)}}Fr(e,t);let m=l??e.shouldReduceMotion;r.start(Cr(t,r,i,m&&kr.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>T.update(()=>{o&&Nr(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Hr(e,t,n={}){let r=H(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Vr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Ur(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function Ur(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Hr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+lr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Wr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Hr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Hr(e,t,n);else{let i=typeof t==`function`?H(e,t,n.custom):t;r=Promise.all(Vr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Gr={test:e=>e===`auto`,parse:e=>e},Kr=e=>t=>t.test(e),qr=[Pe,M,j,A,Ye,Je,Gr],Jr=e=>qr.find(Kr(e));function Yr(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||h(e)}var Xr=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Zr(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Re)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Xr.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Qr=/\b([a-z-]*)\(.*?\)/gu,$r={...F,getAnimatableNone:e=>{let t=e.match(Qr);return t?t.map(Zr).join(` `):e}},ei={...F,getAnimatableNone:e=>{let t=F.parse(e);return F.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},ti={...Pe,transform:Math.round},ni={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,inset:M,insetBlock:M,insetBlockStart:M,insetBlockEnd:M,insetInline:M,insetInlineStart:M,insetInlineEnd:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,paddingBlock:M,paddingBlockStart:M,paddingBlockEnd:M,paddingInline:M,paddingInlineStart:M,paddingInlineEnd:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,marginBlock:M,marginBlockStart:M,marginBlockEnd:M,marginInline:M,marginInlineStart:M,marginInlineEnd:M,fontSize:M,backgroundPositionX:M,backgroundPositionY:M,rotate:A,pathRotation:A,rotateX:A,rotateY:A,rotateZ:A,scale:Ie,scaleX:Ie,scaleY:Ie,scaleZ:Ie,skew:A,skewX:A,skewY:A,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Fe,originX:Xe,originY:Xe,originZ:M,zIndex:ti,fillOpacity:Fe,strokeOpacity:Fe,numOctaves:ti},ri={...ni,color:P,backgroundColor:P,outlineColor:P,fill:P,stroke:P,borderColor:P,borderTopColor:P,borderRightColor:P,borderBottomColor:P,borderLeftColor:P,filter:$r,WebkitFilter:$r,mask:ei,WebkitMask:ei},ii=e=>ri[e],ai=new Set([$r,ei]);function oi(e,t){let n=ii(e);return ai.has(n)||(n=F),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var si=new Set([`auto`,`none`,`0`]);function ci(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!si.has(t)&&at(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=oi(n,i)}var li=class extends Mn{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),je(r))){let i=Er(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!kr.has(n)||e.length!==2)return;let[r,i]=e,a=Jr(r),o=Jr(i);if(Ne(r)!==Ne(i)&&z[n]){this.needsMeasurement=!0;return}if(a!==o){if(Sn(a)&&Sn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else z[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Yr(e[t]))&&n.push(t);n.length&&ci(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=z[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=z[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},ui=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function di(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var fi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function pi(e){return m(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:mi,cancel:hi}=we(queueMicrotask,!1),W={x:!1,y:!1};function gi(){return W.x||W.y}function _i(e){return e===`x`||e===`y`?W[e]?null:(W[e]=!0,()=>{W[e]=!1}):W.x||W.y?null:(W.x=W.y=!0,()=>{W.x=W.y=!1})}function vi(e,t){let n=di(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function yi(e){return!(e.pointerType===`touch`||gi())}function bi(e,t,n={}){let[r,i,a]=vi(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!yi(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var xi=(e,t)=>t?e===t||xi(e,t.parentElement):!1,Si=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Ci=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function wi(e){return Ci.has(e.tagName)||e.isContentEditable===!0}var Ti=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Ei(e){return Ti.has(e.tagName)||e.isContentEditable===!0}var Di=new WeakSet;function Oi(e){return t=>{t.key===`Enter`&&e(t)}}function ki(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ai=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Oi(()=>{if(Di.has(n))return;ki(n,`down`);let e=Oi(()=>{ki(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ki(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function ji(e){return Si(e)&&!gi()}var Mi=new WeakSet;function Ni(e,t,n={}){let[r,i,a]=vi(e,n),o=e=>{let r=e.currentTarget;if(!ji(e)||Mi.has(e))return;Di.add(r),n.stopPropagation&&Mi.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Di.has(r)&&Di.delete(r),ji(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||xi(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),pi(e)&&(e.addEventListener(`focus`,e=>Ai(e,i)),!wi(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Pi(e){return m(e)&&`ownerSVGElement`in e}var Fi=new WeakMap,Ii,Li=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Pi(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ri=Li(`inline`,`width`,`offsetWidth`),zi=Li(`block`,`height`,`offsetHeight`);function Bi({target:e,borderBoxSize:t}){Fi.get(e)?.forEach(n=>{n(e,{get width(){return Ri(e,t)},get height(){return zi(e,t)}})})}function Vi(e){e.forEach(Bi)}function Hi(){typeof ResizeObserver>`u`||(Ii=new ResizeObserver(Vi))}function Ui(e,t){Ii||Hi();let n=di(e);return n.forEach(e=>{let n=Fi.get(e);n||(n=new Set,Fi.set(e,n)),n.add(t),Ii?.observe(e)}),()=>{n.forEach(e=>{let n=Fi.get(e);n?.delete(t),n?.size||Ii?.unobserve(e)})}}var Wi=new Set,Gi;function Ki(){Gi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Wi.forEach(t=>t(e))},window.addEventListener(`resize`,Gi)}function qi(e){return Wi.add(e),Gi||Ki(),()=>{Wi.delete(e),!Wi.size&&typeof Gi==`function`&&(window.removeEventListener(`resize`,Gi),Gi=void 0)}}function Ji(e,t){return typeof e==`function`?qi(e):Ui(e,t)}var Yi={value:null,addProjectionMetrics:null};function Xi(e){return Pi(e)&&e.tagName===`svg`}var Zi=[...qr,P,F],Qi=e=>Zi.find(Kr(e)),$i=()=>({translate:0,scale:1,origin:0,originPoint:0}),ea=()=>({x:$i(),y:$i()}),ta=()=>({min:0,max:0}),G=()=>({x:ta(),y:ta()}),na=new WeakMap;function ra(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ia(e){return typeof e==`string`||Array.isArray(e)}var aa=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],oa=[`initial`,...aa];function sa(e){return ra(e.animate)||oa.some(t=>ia(e[t]))}function ca(e){return!!(sa(e)||e.variants)}function la(e,t,n){for(let r in t){let i=t[r],a=n[r];if(U(i))e.addValue(r,i);else if(U(a))e.addValue(r,V(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,V(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ua={current:null},da={current:!1},fa=typeof window<`u`;function pa(){if(da.current=!0,fa){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ua.current=e.matches;e.addEventListener(`change`,t),t()}else ua.current=!1}}var ma=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ha={};function ga(e){ha=e}function _a(){return ha}var va=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Mn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=()=>{let e=O.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,T.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=sa(t),this.isVariantNode=ca(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&U(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,na.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((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(da.current||pa(),this.shouldReduceMotion=ua.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),E(this.notifyUpdate),E(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&tr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Gn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:x(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=xn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&T.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}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 ha){let t=ha[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ma.length;t++){let n=ma[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=la(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){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=V(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(p(n)||h(n))?n=parseFloat(n):!Qi(n)&&F.test(t)&&(n=oi(e,t)),this.setBaseTarget(e,U(n)?n.get():n)),U(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Or(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!U(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new b),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){mi.render(this.render)}},ya=class extends va{constructor(){super(...arguments),this.KeyframeResolver=li}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;U(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},K=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function ba({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function xa({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Sa(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ca(e){return e===void 0||e===1}function wa({scale:e,scaleX:t,scaleY:n}){return!Ca(e)||!Ca(t)||!Ca(n)}function q(e){return wa(e)||Ta(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ta(e){return Ea(e.x)||Ea(e.y)}function Ea(e){return e&&e!==`0%`}function Da(e,t,n){return n+t*(e-n)}function Oa(e,t,n,r,i){return i!==void 0&&(e=Da(e,i,r)),Da(e,n,r)+t}function ka(e,t=0,n=1,r,i){e.min=Oa(e.min,t,n,r,i),e.max=Oa(e.max,t,n,r,i)}function Aa(e,{x:t,y:n}){ka(e.x,t.translate,t.scale,t.originPoint),ka(e.y,n.translate,n.scale,n.originPoint)}var ja=.999999999999,Ma=1.0000000000001;function Na(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(J(e.x,-a.scroll.offset.x),J(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Aa(e,o)),r&&q(a.latestValues)&&Ia(e,a.latestValues,a.layout?.layoutBox))}t.x<Ma&&t.x>ja&&(t.x=1),t.y<Ma&&t.y>ja&&(t.y=1)}function J(e,t){e.min+=t,e.max+=t}function Pa(e,t,n,r,i=.5){ka(e,t,n,I(e.min,e.max,i),r)}function Fa(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Ia(e,t,n){let r=n??e;Pa(e.x,Fa(t.x,r.x),t.scaleX,t.scale,t.originX),Pa(e.y,Fa(t.y,r.y),t.scaleY,t.scale,t.originY)}function La(e,t){return ba(Sa(e.getBoundingClientRect(),t))}function Ra(e,t,n){let r=La(e,n),{scroll:i}=t;return i&&(J(r.x,i.offset.x),J(r.y,i.offset.y)),r}var za={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ba=bn.length;function Va(e,t,n){let r=``,i=!0;for(let a=0;a<Ba;a++){let o=bn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=fi(s,ni[o]);if(!c){i=!1;let t=za[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${fi(a,ni.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ha(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(xn.has(e)){o=!0;continue}if(ke(e)){i[e]=n;continue}{let t=fi(n,ni[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Va(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Ua(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Wa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ga={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(M.test(e))e=parseFloat(e);else return e}return`${Wa(e,t.target.x)}% ${Wa(e,t.target.y)}%`}},Ka={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=F.parse(e);if(i.length>5)return r;let a=F.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=I(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},qa={borderRadius:{...Ga,applyTo:[...ui]},borderTopLeftRadius:Ga,borderTopRightRadius:Ga,borderBottomLeftRadius:Ga,borderBottomRightRadius:Ga,boxShadow:Ka};function Ja(e,{layout:t,layoutId:n}){return xn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!qa[e]||e===`opacity`)}function Ya(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(U(r[t])||i&&U(i[t])||Ja(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Xa(e){return window.getComputedStyle(e)}var Za=class extends ya{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ua}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(xn.has(t))return this.projection?.isProjecting?gn(t):vn(e,t);{let n=Xa(e),r=(ke(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return La(e,t)}build(e,t,n){Ha(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ya(e,t,n)}},Qa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},$a={offset:`strokeDashoffset`,array:`strokeDasharray`};function eo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Qa:$a;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var to=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function no(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ha(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of to)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&eo(d,i,a,o,!1)}var ro=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`]),io=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function ao(e,t,n,r){Ua(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(ro.has(n)?n:Ir(n),t.attrs[n])}function oo(e,t,n){let r=Ya(e,t,n);for(let n in e)if(U(e[n])||U(t[n])){let t=bn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var so=class extends ya{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(xn.has(t)){let e=ii(t);return e&&e.default||0}if(to.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=ro.has(t)?t:Ir(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return oo(e,t,n)}build(e,t,n){no(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ao(e,t,n,r)}mount(e){this.isSVGTag=io(e.tagName),super.mount(e)}},co=oa.length;function lo(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&lo(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<co;n++){let r=oa[n],i=e.props[r];(ia(i)||i===!1)&&(t[r]=i)}return t}function uo(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var fo=[...aa].reverse(),po=aa.length;function mo(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Wr(e,t,n)))}function ho(e){let t=mo(e),n=_o(),r=!0,i=!1,a=t=>(n,r)=>{let i=H(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=lo(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<po;t++){let p=fo[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ia(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||ra(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=go(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,ee={...w,...C},te=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in ee){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Ar(t)&&Ar(n)?!uo(t,n)||y:t!==n,r?t==null?u.add(e):te(e):t!==void 0&&u.has(e)?te(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let ne=v&&y;b&&(!ne||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!ne&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=H(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=lr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=H(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=_o(),i=!0}}}function go(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!uo(t,e):!1}function Y(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _o(){return{animate:Y(!0),whileInView:Y(),whileHover:Y(),whileTap:Y(),whileDrag:Y(),whileFocus:Y(),exit:Y()}}function vo(e,t){e.min=t.min,e.max=t.max}function X(e,t){vo(e.x,t.x),vo(e.y,t.y)}function yo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var bo=.9999,xo=1.0001,So=-.01,Co=.01;function Z(e){return e.max-e.min}function wo(e,t,n){return Math.abs(e-t)<=n}function To(e,t,n,r=.5){e.origin=r,e.originPoint=I(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=I(n.min,n.max,e.origin)-e.originPoint,(e.scale>=bo&&e.scale<=xo||isNaN(e.scale))&&(e.scale=1),(e.translate>=So&&e.translate<=Co||isNaN(e.translate))&&(e.translate=0)}function Eo(e,t,n,r){To(e.x,t.x,n.x,r?r.originX:void 0),To(e.y,t.y,n.y,r?r.originY:void 0)}function Do(e,t,n,r=0){e.min=(r?I(n.min,n.max,r):n.min)+t.min,e.max=e.min+Z(t)}function Oo(e,t,n,r){Do(e.x,t.x,n.x,r?.x),Do(e.y,t.y,n.y,r?.y)}function ko(e,t,n,r=0){let i=r?I(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Z(t)}function Ao(e,t,n,r){ko(e.x,t.x,n.x,r?.x),ko(e.y,t.y,n.y,r?.y)}function jo(e,t,n,r,i){return e-=t,e=Da(e,1/n,r),i!==void 0&&(e=Da(e,1/i,r)),e}function Mo(e,t=0,n=1,r=.5,i,a=e,o=e){if(j.test(t)&&(t=parseFloat(t),t=I(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=I(a.min,a.max,r);e===a&&(s-=t),e.min=jo(e.min,t,n,s,i),e.max=jo(e.max,t,n,s,i)}function No(e,t,[n,r,i],a,o){Mo(e,t[n],t[r],t[i],t.scale,a,o)}var Po=[`x`,`scaleX`,`originX`],Fo=[`y`,`scaleY`,`originY`];function Io(e,t,n,r){No(e.x,t,Po,n?n.x:void 0,r?r.x:void 0),No(e.y,t,Fo,n?n.y:void 0,r?r.y:void 0)}function Lo(e){return e.translate===0&&e.scale===1}function Ro(e){return Lo(e.x)&&Lo(e.y)}function zo(e,t){return e.min===t.min&&e.max===t.max}function Bo(e,t){return zo(e.x,t.x)&&zo(e.y,t.y)}function Vo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ho(e,t){return Vo(e.x,t.x)&&Vo(e.y,t.y)}function Uo(e){return Z(e.x)/Z(e.y)}function Wo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Q(e){return[e(`x`),e(`y`)]}function Go(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Ko=ui.length,qo=e=>typeof e==`string`?parseFloat(e):e,Jo=e=>typeof e==`number`||M.test(e);function Yo(e,t,n,r,i,a){i?(e.opacity=I(0,n.opacity??1,Zo(r)),e.opacityExit=I(t.opacity??1,0,Qo(r))):a&&(e.opacity=I(t.opacity??1,n.opacity??1,r));for(let i=0;i<Ko;i++){let a=ui[i],o=Xo(t,a),s=Xo(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Jo(o)===Jo(s)?(e[a]=Math.max(I(qo(o),qo(s),r),0),(j.test(s)||j.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=I(t.rotate||0,n.rotate||0,r))}function Xo(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Zo=$o(0,.5,de),Qo=$o(.5,.95,_);function $o(e,t,n){return r=>r<e?0:r>t?1:n(y(e,t,r))}function es(e,t,n){let r=U(e)?e:V(e);return r.start(Cr(``,r,t,n)),r.animation}function ts(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var ns=(e,t)=>e.depth-t.depth,rs=class{constructor(){this.children=[],this.isDirty=!1}add(e){s(this.children,e),this.isDirty=!0}remove(e){c(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ns),this.isDirty=!1,this.children.forEach(e)}};function is(e,t){let n=O.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(E(r),e(a-t))};return T.setup(r,!0),()=>E(r)}function as(e){return U(e)?e.get():e}var os=class{constructor(){this.members=[]}add(e){s(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(c(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(c(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},ss={hasAnimatedSinceResize:!0,hasEverUpdated:!1},$={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},cs=[``,`X`,`Y`,`Z`],ls=1e3,us=0;function ds(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Rr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,T,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fs(r)}function ps({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=us++,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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Yi.value&&($.nodes=$.calculatedTargetDeltas=$.calculatedProjections=0),this.nodes.forEach(gs),this.nodes.forEach(Ts),this.nodes.forEach(Es),this.nodes.forEach(_s),Yi.addProjectionMetrics&&Yi.addProjectionMetrics($)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new rs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new b),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Pi(t)&&!Xi(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;T.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=is(i,250),ss.hasAnimatedSinceResize&&(ss.hasAnimatedSinceResize=!1,this.nodes.forEach(ws)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Ns,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Ho(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...hr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||ws(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),E(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(Ds),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(bs),this.nodes.forEach(ys);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ss),this.nodes.forEach(Cs),this.nodes.forEach(ms),this.nodes.forEach(hs)):this.nodes.forEach(xs),this.clearAllSnapshots();let e=O.now();D.delta=l(0,1e3/60,e-D.timestamp),D.timestamp=e,D.isProcessing=!0,Te.update.process(D),Te.preRender.process(D),Te.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,mi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vs),this.sharedNodes.forEach(Os)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,T.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){T.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=G(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ro(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||q(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Ls(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return G();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(zs))){let{scroll:e}=this.root;e&&(J(t.x,e.offset.x),J(t.y,e.offset.y))}return t}removeElementScroll(e){let t=G();if(X(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&X(t,e),J(t.x,i.offset.x),J(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||G();X(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(J(r.x,-n.scroll.offset.x),J(r.y,-n.scroll.offset.y)),q(n.latestValues)&&Ia(r,n.latestValues,n.layout?.layoutBox)}return q(this.latestValues)&&Ia(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=G();X(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!q(n.latestValues))continue;let r;n.instance&&(wa(n.latestValues)&&n.updateSnapshot(),r=G(),X(r,n.measurePageBox())),Io(t,n.latestValues,n.snapshot?.layoutBox,r)}return q(this.latestValues)&&Io(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}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!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=D.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Oo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):X(this.target,this.layout.layoutBox),Aa(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Yi.value&&$.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||wa(this.parent.latestValues)||Ta(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Ao(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),X(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===D.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;X(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Na(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=G());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yo(this.prevProjectionDelta.x,this.projectionDelta.x),yo(this.prevProjectionDelta.y,this.projectionDelta.y)),Eo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Wo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Yi.value&&$.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ea(),this.projectionDelta=ea(),this.projectionDeltaWithTransform=ea()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=ea();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=G(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(Ms));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=I(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=I(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(ks(o.x,e.x,n),ks(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ao(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),js(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Bo(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=G(),X(f,this.relativeTarget)),c&&(this.animationValues=a,Yo(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(E(this.pendingAnimation),void 0),this.pendingAnimation=T.update(()=>{ss.hasAnimatedSinceResize=!0,this.motionValue||=V(0),this.motionValue.jump(0,!1),this.currentAnimation=es(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ls),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Rs(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||G();let t=Z(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Z(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}X(t,n),Ia(t,i),Eo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new os),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&ds(`z`,e,r,this.animationValues);for(let t=0;t<cs.length;t++)ds(`rotate${cs[t]}`,e,r,this.animationValues),ds(`skew${cs[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=as(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=as(t?.pointerEvents)||``),this.hasProjected&&!q(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Go(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in qa){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=qa[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?as(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ys),this.root.sharedNodes.clear()}}}function ms(e){e.updateLayout()}function hs(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Q(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Z(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;vo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Rs(i,t.layoutBox,n)&&Q(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Z(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ea();Eo(o,n,t.layoutBox);let s=ea();a?Eo(s,e.applyTransform(r,!0),t.measuredBox):Eo(s,n,t.layoutBox);let c=!Ro(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=G();Ao(s,t.layoutBox,i.layoutBox,o);let c=G();Ao(c,n,a.layoutBox,o),Ho(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function gs(e){Yi.value&&$.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function _s(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vs(e){e.clearSnapshot()}function ys(e){e.clearMeasurements()}function bs(e){e.isLayoutDirty=!0,e.updateLayout()}function xs(e){e.isLayoutDirty=!1}function Ss(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Cs(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ws(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ts(e){e.resolveTargetDelta()}function Es(e){e.calcProjection()}function Ds(e){e.resetSkewAndRotation()}function Os(e){e.removeLeadSnapshot()}function ks(e,t,n){e.translate=I(t.translate,0,n),e.scale=I(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function As(e,t,n,r){e.min=I(t.min,n.min,r),e.max=I(t.max,n.max,r)}function js(e,t,n,r){As(e.x,t.x,n.x,r),As(e.y,t.y,n.y,r)}function Ms(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Ns={duration:.45,ease:[.4,0,.1,1]},Ps=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fs=Ps(`applewebkit/`)&&!Ps(`chrome/`)?Math.round:_;function Is(e){e.min=Fs(e.min),e.max=Fs(e.max)}function Ls(e){Is(e.x),Is(e.y)}function Rs(e,t,n){return e===`position`||e===`preserve-aspect`&&!wo(Uo(t),Uo(n),.2)}function zs(e){return e!==e.root&&e.scroll?.wasRoot}var Bs=ps({attachResizeListener:(e,t)=>ts(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Vs={current:void 0},Hs=ps({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vs.current){let e=new Bs({});e.mount(window),e.setOptions({layoutScroll:!0}),Vs.current=e}return Vs.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`});function Us(e=!0){let t=(0,i.useContext)(o);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:a}=t,s=(0,i.useId)();(0,i.useEffect)(()=>{if(e)return a(s)},[e]);let c=(0,i.useCallback)(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,c]:[!0]}var Ws=(0,i.createContext)({strict:!1}),Gs={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`]},Ks=!1;function qs(){if(Ks)return;let e={};for(let t in Gs)e[t]={isEnabled:e=>Gs[t].some(t=>!!e[t])};ga(e),Ks=!0}function Js(){return qs(),_a()}function Ys(e){let t=Js();for(let n in e)t[n]={...t[n],...e[n]};ga(t)}var Xs=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Zs(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Xs.indexOf(e)>-1||/[A-Z]/u.test(e))}var Qs=(0,i.createContext)({});function $s(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}var ec=(e,t)=>t.isSVG??Zs(e)?new so(t):new Za(t,{allowProjection:e!==i.Fragment}),tc=class extends K{constructor(e){super(e),e.animationState||=ho(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();ra(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},nc=0,rc={animation:{Feature:tc},exit:{Feature:class extends K{constructor(){super(...arguments),this.id=nc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=H(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function ic(e){return{point:{x:e.pageX,y:e.pageY}}}var ac=e=>t=>Si(t)&&e(t,ic(t));function oc(e,t,n,r){return ts(e,t,ac(n),r)}var sc=({current:e})=>e?e.ownerDocument.defaultView:null,cc=(e,t)=>Math.abs(e-t);function lc(e,t){let n=cc(e.x,t.x),r=cc(e.y,t.y);return Math.sqrt(n**2+r**2)}var uc=new Set([`auto`,`scroll`]),dc=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=fc(this.lastRawMoveEventInfo,this.transformPagePoint));let e=mc(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=lc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=D;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=fc(t,this.transformPagePoint),T.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=mc(e.type===`pointercancel`?this.lastMoveEventInfo:fc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Si(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=fc(ic(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=D;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,mc(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=v(oc(this.contextWindow,`pointermove`,this.handlePointerMove,d),oc(this.contextWindow,`pointerup`,this.handlePointerUp,d),oc(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(uc.has(e.overflowX)||uc.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),T.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),E(this.updatePoint)}};function fc(e,t){return t?{point:t(e.point)}:e}function pc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mc({point:e},t){return{point:e,delta:pc(e,gc(t)),offset:pc(e,hc(t)),velocity:_c(t,.1)}}function hc(e){return e[0]}function gc(e){return e[e.length-1]}function _c(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=gc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>x(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>x(t)*2&&(r=e[1]);let a=S(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function vc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?I(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?I(n,e,r.max):Math.min(e,n)),e}function yc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function bc(e,{top:t,left:n,bottom:r,right:i}){return{x:yc(e.x,n,i),y:yc(e.y,t,r)}}function xc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Sc(e,t){return{x:xc(e.x,t.x),y:xc(e.y,t.y)}}function Cc(e,t){let n=.5,r=Z(e),i=Z(t);return i>r?n=y(t.min,t.max-r,e.min):r>i&&(n=y(e.min,e.max-i,t.min)),l(0,1,n)}function wc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Tc=.35;function Ec(e=Tc){return e===!1?e=0:e===!0&&(e=Tc),{x:Dc(e,`left`,`right`),y:Dc(e,`top`,`bottom`)}}function Dc(e,t,n){return{min:Oc(e,t),max:Oc(e,n)}}function Oc(e,t){return typeof e==`number`?e:e[t]||0}var kc=new WeakMap,Ac=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=G(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(ic(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_i(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(e=>{let t=this.getAxisMotionValue(e).get()||0;if(j.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Z(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&T.update(()=>i(e,t),!1,!0),Fr(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Pc(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&T.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new dc(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:sc(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&T.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Nc(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=vc(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&$s(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?bc(n.layoutBox,e):!1,this.elastic=Ec(t),r!==this.constraints&&!$s(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Q(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=wc(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!$s(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=Ra(n,r.root,this.visualElement.getTransformPagePoint()),a=Sc(r.layout.layoutBox,i);if(t){let e=t(xa(a));this.hasMutatedConstraints=!!e,e&&(a=ba(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Q(o=>{if(!Nc(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Fr(this.visualElement,e),n.start(Cr(e,n,0,t,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Q(t=>{let{drag:n}=this.getProps();if(!Nc(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-I(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!$s(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Q(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Cc({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Q(t=>{if(!Nc(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(I(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;kc.set(this.visualElement,this);let e=this.visualElement.current,t=oc(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Ei(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();$s(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Mc(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),T.read(r);let o=ts(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Q(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Tc,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function jc(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Mc(e,t,n){let r=Ji(e,jc(n)),i=Ji(t,jc(n));return()=>{r(),i()}}function Nc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Pc(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Fc=class extends K{constructor(e){super(e),this.removeGroupControls=_,this.removeListeners=_,this.controls=new Ac(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ic=e=>(t,n)=>{e&&T.update(()=>e(t,n),!1,!0)},Lc=class extends K{constructor(){super(...arguments),this.removePointerDownListener=_}onPointerDown(e){this.session=new dc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sc(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ic(e),onStart:Ic(t),onMove:Ic(n),onEnd:(e,t)=>{delete this.session,r&&T.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=oc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Rc=!1,zc=class extends i.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Rc&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ss.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Rc=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||T.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),mi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Rc=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Bc(e){let[t,n]=Us(),o=(0,i.useContext)(a);return(0,r.jsx)(zc,{...e,layoutGroup:o,switchLayoutGroup:(0,i.useContext)(Qs),isPresent:t,safeToRemove:n})}var Vc={pan:{Feature:Lc},drag:{Feature:Fc,ProjectionNode:Hs,MeasureLayout:Bc}};function Hc(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&T.postRender(()=>i(t,ic(t)))}var Uc=class extends K{mount(){let{current:e}=this.node;e&&(this.unmount=bi(e,(e,t)=>(Hc(this.node,t,`Start`),e=>Hc(this.node,e,`End`))))}unmount(){}},Wc=class extends K{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=v(ts(this.node.current,`focus`,()=>this.onFocus()),ts(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Gc(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&T.postRender(()=>i(t,ic(t)))}var Kc=class extends K{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ni(e,(e,t)=>(Gc(this.node,t,`Start`),(e,{success:t})=>Gc(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},qc=new WeakMap,Jc=new WeakMap,Yc=e=>{let t=qc.get(e.target);t&&t(e)},Xc=e=>{e.forEach(Yc)};function Zc({root:e,...t}){let n=e||document;Jc.has(n)||Jc.set(n,{});let r=Jc.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Xc,{root:e,...t})),r[i]}function Qc(e,t,n){let r=Zc(t);return qc.set(e,n),r.observe(e),()=>{qc.delete(e),r.unobserve(e)}}var $c={some:0,all:1},el=class extends K{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:$c[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Qc(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(tl(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function tl({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var nl={inView:{Feature:el},tap:{Feature:Kc},focus:{Feature:Wc},hover:{Feature:Uc}},rl={layout:{ProjectionNode:Hs,MeasureLayout:Bc}};export{T as $,ra as A,Or as B,va as C,sa as D,ua as E,pi as F,sn as G,fr as H,di as I,Jt as J,Xt as K,Vr as L,G as M,Xi as N,ca as O,Pi as P,E as Q,Lr as R,Ha as S,da as T,V as U,mr as V,Un as W,Nt as X,Ut as Y,I as Z,io as _,ec as a,u as at,Ya as b,Zs as c,a as ct,Ws as d,ge as et,Us as f,oo as g,so as h,rc as i,d as it,na as j,ia as k,Ys as l,es as m,nl as n,x as nt,$s as o,c as ot,as as p,Yt as q,Vc as r,y as rt,Qs as s,o as st,rl as t,ae as tt,Js as u,no as v,pa as w,Ja as x,Za as y,U as z};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-code-xNyjdZ4g.js","assets/jsx-runtime-NZYk81nU.js","assets/rolldown-runtime-hePW80VL.js","assets/chunk-YOKDWASO-BAf618wr.js","assets/bundle-mjs-DKHVkVWu.js","assets/react-dom-Bwxum3ti.js","assets/preload-helper-Czpn1I53.js","assets/lib-ChrQ49PO.js","assets/dist-CZDnnosQ.js","assets/character-entities-legacy-Wut6vMuj.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n}from"./bundle-mjs-DKHVkVWu.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{t as i}from"./utils-Eg7xtNmV.js";import{t as a}from"./preload-helper-Czpn1I53.js";import{i as o}from"./chunk-YOKDWASO-BAf618wr.js";import"./cn-C8c0S2mI.js";var s=t(n(),1),c=e({Markdown:()=>y,MarkdownFrame:()=>_,fixNumberedListBreaks:()=>d,markdownComponents:()=>g,normalizeCodeFenceLanguages:()=>p}),l=r(),u=(0,s.lazy)(()=>a(async()=>{let{HighlightedMarkdown:e}=await import(`./markdown-code-xNyjdZ4g.js`);return{HighlightedMarkdown:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(({HighlightedMarkdown:e})=>({default:e})));function d(e){return e.replace(/^(\d+)\.\s*\n+\s*\n*/gm,`$1. `)}var f=new Set([`bash`,`diff`,`html`,`js`,`json`,`jsx`,`md`,`markdown`,`sh`,`shell`,`text`,`ts`,`tsx`,`yml`,`yaml`]);function p(e){return e.replace(/```([^\n]*)/g,(e,t)=>{let n=String(t||``).trim().toLowerCase();if(!n)return"```";let r=n.split(/\s+/)[0];return f.has(r)?`\`\`\`${r}`:"```text"})}var m=/^(https?:|mailto:)/i;function h(e,t){if(!(0,s.isValidElement)(e))return!1;let n=e.props;if(typeof n!=`object`||!n)return!1;let r=`node`in n?n.node:void 0,i=typeof r==`object`&&r&&`tagName`in r?r.tagName:void 0;return i===`img`?t:i===`code`&&`data-block`in n||`children`in n&&h(n.children,t)}var g={h1:({children:e,...t})=>(0,l.jsx)(`h1`,{className:`an-md-h1 mt-3 mb-1.5 text-base font-semibold`,...t,children:e}),h2:({children:e,...t})=>(0,l.jsx)(`h2`,{className:`an-md-h2 mt-3 mb-1.5 text-base font-semibold`,...t,children:e}),h3:({children:e,...t})=>(0,l.jsx)(`h3`,{className:`an-md-h3 mt-2 mb-1 text-sm font-semibold`,...t,children:e}),h4:({children:e,...t})=>(0,l.jsx)(`h4`,{className:`an-md-h4 mt-2 mb-1 text-sm font-medium`,...t,children:e}),p:({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);return r.some(e=>h(e,r.length===1))?(0,l.jsx)(s.Fragment,{children:e}):(0,l.jsx)(`p`,{className:`an-md-p text-sm leading-relaxed text-an-foreground/80`,...n,children:e})},ul:({children:e,...t})=>(0,l.jsx)(`ul`,{className:`an-md-ul mb-2 flex list-outside list-disc flex-col gap-0.5 pl-4 text-sm text-an-foreground/80`,...t,children:e}),ol:({children:e,...t})=>(0,l.jsx)(`ol`,{className:`an-md-ol mb-2 flex list-outside list-decimal flex-col gap-0.5 pl-5 text-sm text-an-foreground/80`,...t,children:e}),li:({children:e,...t})=>(0,l.jsx)(`li`,{className:`an-md-li pl-0.5 text-sm text-an-foreground/80`,...t,children:e}),strong:({children:e,...t})=>(0,l.jsx)(`strong`,{className:`font-medium text-an-foreground`,...t,children:e}),a:({href:e,children:t,...n})=>{if(typeof e!=`string`||!m.test(e))return(0,l.jsx)(`span`,{children:t});let r=e.startsWith(`http`);return(0,l.jsx)(`a`,{...n,href:e,target:r?`_blank`:void 0,rel:r?`noopener noreferrer`:void 0,className:`an-md-link text-an-primary-color underline-offset-2 hover:underline`,children:t})},blockquote:({children:e,...t})=>(0,l.jsx)(`blockquote`,{className:`an-md-blockquote mb-2 border-l-2 border-an-border-color pl-3 text-sm text-an-foreground/70 italic`,...t,children:e}),hr:({...e})=>(0,l.jsx)(`hr`,{className:`an-md-hr my-4 border-an-border-color`,...e}),table:({children:e,...t})=>(0,l.jsx)(`div`,{className:`my-3 overflow-x-auto rounded-an-tool-border-radius border border-an-border-color`,children:(0,l.jsx)(`table`,{className:`an-md-table w-full text-sm [&>thead]:bg-an-tool-background [&>thead>tr>th]:bg-an-tool-background`,...t,children:e})}),th:({children:e,...t})=>(0,l.jsx)(`th`,{className:`bg-an-background-secondary px-3 py-2 text-left font-medium`,...t,children:e}),td:({children:e,...t})=>(0,l.jsx)(`td`,{className:`border-t border-an-border-color px-3 py-2 text-an-foreground/80`,...t,children:e})};function _({children:e,className:t}){return(0,l.jsx)(`div`,{className:i(`an-markdown`,`overflow-hidden wrap-break-word`,`[&_li>p]:mb-0 [&_li>p]:inline`,t),children:e})}function v({content:e,className:t,codeControls:n}){let r=(0,s.useMemo)(()=>p(d(e)),[e]);return(0,l.jsx)(_,{className:t,children:(0,l.jsx)(o,{components:g,controls:{code:n},children:r})})}function y(e){return e.content.includes("```")?(0,l.jsx)(s.Suspense,{fallback:(0,l.jsx)(v,{...e}),children:(0,l.jsx)(u,{...e})}):(0,l.jsx)(v,{...e})}export{c as a,g as i,_ as n,p as o,d as r,y as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./chunk-YOKDWASO-BAf618wr.js";export{e as Mermaid};
@@ -1 +0,0 @@
1
- import{t as e}from"./createLucideIcon-DwxZHm0M.js";var t=e(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]);export{t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Eg7xtNmV.js";import{a as i,d as a}from"./ease-u56MhKYS.js";import{t as o}from"./check-JjHKAZas.js";import{t as s}from"./gauge-DNpstbBn.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./command-PhicLCoO.js";var m=e(t(),1),h=n();function g(e,t,n){return Math.min(n,Math.max(t,e))}function _({value:e,onChange:t,min:n=0,max:o=100,step:s=1,label:c,formatValue:l=String,disabled:u=!1,className:d,...f}){let p=(0,m.useId)(),[_,v]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),x=Math.max(n,o),S=Math.max(2**-52,s),C=g(e,n,x),w=x===n?0:(C-n)/(x-n),T=w*100,E=w===0?8:0,D=`calc(${T}% + ${20-20*w-E*2.5}px)`,O=`calc(${T}% + ${11-24*w}px)`,k=20-20*w-E*2.5,A=`linear-gradient(to right, transparent calc(${T}% + ${k}px), black calc(${T}% + ${k+2}px))`,j=(0,m.useMemo)(()=>{let e=Math.floor((x-n)/S),t=Array.from({length:e+1},(e,t)=>n+t*S);return t.at(-1)!==x&&t.push(x),t},[n,x,S]),M=l(C),N=l(x),P=(e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0||x===n)return n;let i=n+g((e-r.left)/r.width,0,1)*(x-n);return g(n+Math.round((i-n)/S)*S,n,x)},F=e=>{let r=!0,i=e.key===`ArrowRight`||e.key===`ArrowUp`?1:e.key===`ArrowLeft`||e.key===`ArrowDown`?-1:0;i===0?e.key===`Home`?(e.preventDefault(),t(n)):e.key===`End`?(e.preventDefault(),t(x)):r=!1:(e.preventDefault(),t(g(C+i*S,n,x))),r&&e.stopPropagation()};return(0,h.jsx)(`div`,{className:r(`relative w-full touch-none`,u&&`opacity-50`,d),...f,children:(0,h.jsxs)(`div`,{className:r(`relative h-8 w-full select-none touch-none overflow-hidden rounded-md border border-border bg-background outline-offset-2 transition-colors duration-150`,y&&!u&&`border-foreground/25`,_&&`border-foreground/40 ring-2 ring-ring/60 ring-offset-1 ring-offset-background`),onPointerEnter:()=>b(!0),onPointerLeave:()=>b(!1),onPointerDown:e=>{u||t(P(e.clientX,e.currentTarget))},children:[(0,h.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 z-[1] flex items-center justify-between px-3 pointer-events-none`,style:{WebkitMaskImage:A,maskImage:A},children:j.map(e=>(0,h.jsx)(a.span,{className:`relative flex size-[5px] items-center justify-center rounded-full`,animate:{backgroundColor:e===C?`var(--foreground)`:`var(--muted-foreground)`,opacity:e===C?1:.3},transition:i},e))}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:`absolute inset-y-0 left-0 z-[3] pointer-events-none bg-foreground/[0.08]`,layout:`size`,style:{width:D},transition:i}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:r(`absolute z-[3] w-0.5 rounded-full pointer-events-none`),layout:!0,style:{left:O,top:y||_?7:8,bottom:y||_?7:8},animate:{backgroundColor:_?`var(--foreground)`:y?`color-mix(in srgb, var(--foreground) 50%, transparent)`:`color-mix(in srgb, var(--foreground) 25%, transparent)`},transition:i}),(0,h.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-[2] flex items-center px-2`,children:[c?(0,h.jsx)(`span`,{className:`px-2 text-[0.8125rem] text-transparent select-none`,"aria-hidden":`true`,children:c}):null,(0,h.jsx)(`span`,{className:`ml-auto px-2 text-[0.8125rem] text-transparent tabular-nums select-none`,style:{minWidth:`${N.length}ch`},"aria-hidden":`true`,children:N})]}),(0,h.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-[4] flex items-center px-2 text-[0.8125rem]`,children:[c?(0,h.jsx)(a.span,{className:`px-2`,animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:c}):null,(0,h.jsx)(a.span,{className:`ml-auto px-2 tabular-nums`,style:{minWidth:`${N.length}ch`,textAlign:`right`},animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:M})]}),(0,h.jsx)(`input`,{id:p,type:`range`,min:n,max:x,step:S,value:C,disabled:u,"aria-label":c??`Slider`,"aria-valuetext":M,onChange:e=>t(Number(e.currentTarget.value)),onFocus:()=>v(!0),onBlur:()=>v(!1),onKeyDown:F,className:`absolute inset-0 z-20 m-0 h-full w-full cursor-ew-resize opacity-0 disabled:cursor-not-allowed`})]})})}function v(e){let t=new Map;for(let n of e){let e=t.get(n.provider)??[];e.push(n),t.set(n.provider,e)}return[...t.entries()]}function y({models:e,selectedModel:t,selectedEffort:n,effortLabel:r,onModelChange:i,onEffortChange:a}){let g=(0,m.useMemo)(()=>v(e),[e]);return(0,h.jsxs)(p,{className:`min-h-0 max-h-[min(55vh,28rem)] bg-transparent`,shouldFilter:!0,children:[(0,h.jsx)(c,{placeholder:`Search models…`,"aria-label":`Search models`}),(0,h.jsxs)(f,{className:`min-h-0 flex-1 p-1.5`,children:[(0,h.jsx)(d,{children:`No matching models`}),g.map(([e,n])=>(0,h.jsx)(l,{heading:n[0]?.providerLabel??e,children:n.map(e=>{let n=[e.id,e.name,e.provider,e.providerLabel,e.modelId,...e.keywords??[]].filter(Boolean).join(` `),r=e.id===t?.id;return(0,h.jsxs)(u,{value:n,disabled:e.disabled,onSelect:()=>{e.disabled||i?.(e.id)},className:`items-start gap-2 rounded-lg px-2.5 py-2`,children:[(0,h.jsx)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground`,children:e.icon??(0,h.jsx)(s,{"aria-hidden":`true`,className:`size-4`})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),e.disabled?(0,h.jsx)(`span`,{className:`shrink-0 text-[0.625rem] uppercase tracking-wide text-muted-foreground`,children:`Unavailable`}):null]}),(0,h.jsxs)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground`,children:[e.modelId??e.id,e.reasoning?` · reasoning`:``]}),e.description?(0,h.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground/80`,children:e.description}):null]}),r?(0,h.jsx)(o,{"aria-hidden":`true`,className:`mt-1 size-4 shrink-0`}):null]},e.id)})},e))]}),t?.reasoning&&t.efforts?.length?(0,h.jsx)(`div`,{className:`shrink-0 border-t border-border/70 p-2`,children:(0,h.jsx)(_,{label:r,value:Math.max(0,t.efforts.findIndex(e=>e.id===n?.id)),onChange:e=>{let n=t.efforts?.[Math.round(e)];n&&!n.disabled&&a?.(n.id)},min:0,max:Math.max(0,t.efforts.length-1),formatValue:e=>t.efforts?.[Math.round(e)]?.name??``})}):null]})}export{y as ModelSelectorList};
@@ -1 +0,0 @@
1
- import{t as e}from"./createLucideIcon-DwxZHm0M.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./react-dom-Bwxum3ti.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{t as i}from"./utils-Eg7xtNmV.js";import{$ as a,G as o,H as s,J as c,Q as l,U as u,z as d}from"./layout-gyLzPvVv.js";import{c as f,d as p,h as m,l as h,m as g,p as _,r as v,s as y,u as b}from"./ease-u56MhKYS.js";import{n as x,t as S}from"./use-reduced-motion-eORd7fqW.js";import{t as C}from"./createLucideIcon-DwxZHm0M.js";import{o as w}from"./citations-BPv8HIpf.js";import{t as T}from"./check-JjHKAZas.js";import{t as E}from"./chevron-down-BEVGmnSb.js";import{t as D}from"./loader-circle-DjfHXUPB.js";import{t as ee}from"./plus-DXN1Bg_z.js";import{t as te}from"./square-Bhn8gjr0.js";import{t as O}from"./x-CsRC_tCI.js";import{i as k}from"./surfaces-BhAXz9So.js";function ne(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=c(i,a,o);return t?s(r):s}function A(e,t,n={}){let r=e.get(),i=null,s=r,c,l=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,u=()=>{i&&=(i.stop(),null),e.animation=void 0},f=()=>{let t=M(e.get()),r=M(s);if(t===r){u();return}let a=i?i.getGeneratorVelocity():e.getVelocity();u(),i=new o({keyframes:[t,r],velocity:a,type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:c})},p=()=>{f(),e.animation=i??void 0,e.events.animationStart?.notify(),i?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{s=e,c=e=>t(j(e,l)),a.postRender(p)},u),d(t)){let r=n.skipInitialAnimation===!0,i=t.on(`change`,t=>{r?(r=!1,e.jump(j(t,l),!1)):e.set(j(t,l))}),a=e.on(`destroy`,i);return()=>{i(),a()}}return u}function j(e,t){return t?e+t:e}function M(e){return typeof e==`number`?e:parseFloat(e)}var N=e(t(),1);function P(e){let t=m(()=>u(e)),{isStatic:n}=(0,N.useContext)(_);if(n){let[,n]=(0,N.useState)(e);(0,N.useEffect)(()=>t.on(`change`,n),[])}return t}function F(e,t){let n=P(t()),r=()=>n.set(t());return r(),g(()=>{let t=()=>a.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),l(r)}}),n}function I(e){s.current=[],e();let t=F(s.current,e);return s.current=void 0,t}function L(e,t,n,r){if(typeof e==`function`)return I(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return z(e,t,n,r);let i=typeof t==`function`?t:ne(t,n,r),a=Array.isArray(e)?R(e,i):R([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function R(e,t){let n=m(()=>[]);return F(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function z(e,t,n,r){let i=m(()=>Object.keys(n)),a=m(()=>({}));for(let o of i)a[o]=L(e,t,n[o],r);return a}function B(e,t={}){let{isStatic:n}=(0,N.useContext)(_),r=()=>d(e)?e.get():e;if(n)return L(r);let i=P(r());return(0,N.useInsertionEffect)(()=>A(i,e,t),[i,JSON.stringify(t)]),i}function V(e,t={}){return B(e,{type:`spring`,...t})}var re=C(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),H=r(),U={duration:0},W={type:`spring`,duration:.4,bounce:.3},G={hidden:{},show:{transition:{staggerChildren:.035,delayChildren:.05}}},ie={hidden:{opacity:0,y:-6,filter:`blur(3px)`},show:{opacity:1,y:0,filter:`blur(0px)`}},K=(0,N.createContext)(null);function q(e){let t=(0,N.useContext)(K);if(!t)throw Error(`${e} must be used within <AnimatedSelect>`);return t}function ae({value:e,defaultValue:t,onValueChange:n,disabled:r=!1,className:a,children:o}){let s=S()??!1,c=(0,N.useId)(),l=(0,N.useRef)(null),[u,d]=(0,N.useState)(!1),[f,p]=(0,N.useState)(t),[m,h]=(0,N.useState)(new Map),[g,_]=(0,N.useState)(`bottom`),v=e!==void 0,y=v?e:f,b=(0,N.useCallback)(e=>{v||p(e),n?.(e),d(!1)},[v,n]),x=(0,N.useCallback)((e,t)=>{h(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),C=(0,N.useCallback)(e=>{h(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]);(0,N.useEffect)(()=>{if(!u)return;let e=e=>e.key===`Escape`&&d(!1),t=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`pointerdown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,t)}},[u]);let w=(0,N.useMemo)(()=>({value:y,open:u,setOpen:d,select:b,register:x,unregister:C,labelFor:e=>e===void 0?void 0:m.get(e),reduce:s,triggerId:`${c}-trigger`,listId:`${c}-list`,disabled:r,placement:g,setPlacement:_}),[y,u,b,x,C,m,s,c,r,g]);return(0,H.jsx)(K.Provider,{value:w,children:(0,H.jsx)(`div`,{ref:l,className:i(`relative`,a),children:o})})}function oe({className:e,children:t}){let n=q(`AnimatedSelectTrigger`),r=n.placement===`top`,a=n.open?[0,0,12]:[12,0,12],o=n.reduce?{duration:0}:n.open?{duration:.6,times:[0,.4,1],ease:v}:{duration:.42,times:[0,.5,1],ease:v};return(0,H.jsxs)(p.button,{type:`button`,id:n.triggerId,disabled:n.disabled,"aria-haspopup":`listbox`,"aria-expanded":n.open,"aria-controls":n.listId,onClick:()=>n.setOpen(!n.open),initial:!1,animate:{borderTopLeftRadius:r?a:12,borderTopRightRadius:r?a:12,borderBottomLeftRadius:r?12:a,borderBottomRightRadius:r?12:a},transition:{borderTopLeftRadius:r?o:U,borderTopRightRadius:r?o:U,borderBottomLeftRadius:r?U:o,borderBottomRightRadius:r?U:o},className:i(`relative z-10 flex w-full items-center justify-between gap-2 rounded-xl border border-border bg-background px-3 py-2 text-sm text-foreground outline-none transition-colors`,`hover:border-(--color-border-strong) focus-visible:ring-2 focus-visible:ring-foreground/20`,`disabled:pointer-events-none disabled:opacity-50`,e),children:[t,(0,H.jsx)(p.span,{"aria-hidden":!0,animate:{rotate:n.open?180:0},transition:n.reduce?{duration:0}:W,className:`text-muted-foreground`,children:(0,H.jsx)(E,{className:`size-4`})})]})}function se({className:e,children:t}){let n=q(`AnimatedSelectContent`),r=(0,N.useRef)(null),[a,o]=(0,N.useState)(0),s=n.open,{setPlacement:c}=n;(0,N.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>o(e.offsetHeight);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}),(0,N.useLayoutEffect)(()=>{if(!s)return;let e=document.getElementById(n.triggerId),t=r.current;if(!e||!t)return;let i=e.getBoundingClientRect(),a=t.offsetHeight,o=window.innerHeight-i.bottom,l=i.top;c(o<a+16&&l>o?`top`:`bottom`)},[s,n.triggerId,c]);let l=n.placement===`top`,u=s?8:0,d=s?12:0,f=s?{type:`spring`,duration:.6,bounce:.5,delay:.12}:{type:`spring`,duration:.3,bounce:.1},m=s?{duration:.3,ease:v,delay:.14}:{duration:.16,ease:v};return(0,H.jsx)(p.div,{id:n.listId,role:`listbox`,"aria-labelledby":n.triggerId,"aria-hidden":!s,inert:!s,initial:!1,animate:n.reduce?{opacity:+!!s,height:s?a:0}:{opacity:+!!s,height:s?a:0,marginTop:l?0:u,marginBottom:l?u:0,borderTopLeftRadius:l?12:d,borderTopRightRadius:l?12:d,borderBottomLeftRadius:l?d:12,borderBottomRightRadius:l?d:12},transition:n.reduce?{duration:.12}:{opacity:s?{duration:.18}:{duration:.16,delay:.12},height:s?{type:`spring`,duration:.42,bounce:.14}:{duration:.26,ease:v,delay:.14},marginTop:l?U:f,marginBottom:l?f:U,borderTopLeftRadius:l?U:m,borderTopRightRadius:l?U:m,borderBottomLeftRadius:l?m:U,borderBottomRightRadius:l?m:U},style:{transformOrigin:l?`bottom`:`top`,overflow:`hidden`,pointerEvents:s?`auto`:`none`},className:i(`absolute left-0 right-0 z-20 rounded-xl border border-border bg-background shadow-lg`,l?`bottom-full`:`top-full`,e),children:(0,H.jsx)(p.div,{ref:r,variants:n.reduce?void 0:G,initial:!1,animate:s?`show`:`hidden`,className:`p-1`,children:t})})}function ce({value:e,disabled:t=!1,className:n,children:r}){let a=q(`AnimatedSelectItem`),o=a.value===e,s=typeof r==`string`?r:e;return(0,N.useLayoutEffect)(()=>(a.register(e,s),()=>a.unregister(e)),[a.register,a.unregister,e,s]),(0,H.jsx)(p.li,{variants:a.reduce?void 0:ie,children:(0,H.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":o,disabled:t,onClick:()=>a.select(e),className:i(`flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm outline-none transition-colors`,o?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:bg-muted`,`disabled:pointer-events-none disabled:opacity-50`,n),children:[r,o?(0,H.jsx)(T,{className:`size-3.5 shrink-0`}):null]})})}var J={primary:`bg-primary text-primary-foreground hover:bg-primary/90`,secondary:`border border-border bg-card text-foreground hover:border-border`,ghost:`text-muted-foreground hover:text-foreground hover:bg-primary/5`,outline:`border border-border bg-transparent text-foreground hover:bg-primary/5`},Y={sm:`h-8 px-3 text-xs gap-1.5 rounded-full`,md:`h-10 px-5 text-sm gap-2 rounded-full`,lg:`h-12 px-6 text-base gap-2 rounded-full`,icon:`h-8 w-8 rounded-lg`},X=(0,N.forwardRef)(function({variant:e=`primary`,size:t=`md`,pressScale:n=.93,ripple:r=!1,className:a,children:o,onPointerDown:s,...c},l){let u=S(),d=w(),[f,m]=(0,N.useState)([]),g=(0,N.useRef)(0),_=(0,N.useCallback)(e=>{if(r&&!u){let t=e.currentTarget.getBoundingClientRect(),n=Math.max(t.width,t.height)*2,r=g.current++;m(i=>[...i,{id:r,x:e.clientX-t.left,y:e.clientY-t.top,size:n}])}s?.(e)},[r,u,s]);return(0,H.jsxs)(p.button,{ref:l,type:`button`,whileTap:u?void 0:{scale:n},whileHover:u||!d?void 0:{scale:1.02},transition:h,onPointerDown:_,className:i(`inline-flex items-center justify-center font-medium select-none`,`transition-colors`,`disabled:pointer-events-none disabled:opacity-50`,r&&`relative overflow-hidden`,J[e],Y[t],a),...c,children:[(0,H.jsx)(`span`,{className:i(`pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]`,!r&&`hidden`),children:(0,H.jsx)(x,{children:r&&!u?f.map(e=>(0,H.jsx)(p.span,{className:`absolute rounded-full bg-current`,style:{left:e.x,top:e.y,width:e.size,height:e.size,x:`-50%`,y:`-50%`},initial:{scale:.05,opacity:.3},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:1.6,ease:v},onAnimationComplete:()=>m(t=>t.filter(t=>t.id!==e.id))},e.id)):null})}),o]})});(0,N.forwardRef)(function({variant:e=`primary`,size:t=`md`,pressScale:n=.93,className:r,children:a,...o},s){let c=S(),l=w();return(0,H.jsx)(p.a,{ref:s,whileTap:c?void 0:{scale:n},whileHover:c||!l?void 0:{scale:1.02},transition:h,className:i(`inline-flex items-center justify-center font-medium select-none`,`transition-colors`,J[e],Y[t],r),...o,children:a})});function le({children:e,strength:t=.35,className:n}){let r=(0,N.useRef)(null),a=S(),o=w(),s=!a&&o,c=P(0),l=P(0),u=V(c,y),d=V(l,y);return(0,H.jsx)(p.div,{ref:r,onMouseMove:e=>{let n=r.current;if(!n||!s)return;let i=n.getBoundingClientRect();c.set((e.clientX-i.left-i.width/2)*t),l.set((e.clientY-i.top-i.height/2)*t)},onMouseLeave:()=>{c.set(0),l.set(0)},style:{x:u,y:d},className:i(`inline-block`,n),children:e})}(0,N.forwardRef)(function({strength:e=.25,magneticClassName:t,children:n,...r},i){return(0,H.jsx)(le,{strength:e,className:t,children:(0,H.jsx)(X,{ref:i,...r,children:n})})});var ue=.025,Z=`blur(6px)`,de={initial:{opacity:0,y:`105%`,filter:Z},animate:(e=0)=>({opacity:1,y:`0%`,filter:`blur(0px)`,transition:{...b,delay:e}}),exit:(e=0)=>({opacity:0,y:`-105%`,filter:Z,transition:{duration:.16,ease:v,delay:e*.5}})},fe={initial:{opacity:0,width:0,scale:.7,filter:Z},animate:{opacity:1,width:`1.5rem`,scale:1,filter:`blur(0px)`,transition:b},exit:{opacity:0,width:0,scale:.7,filter:Z,transition:{duration:.16,ease:v}}};function Q({keyId:e,children:t}){let n=S();return(0,H.jsx)(p.span,{variants:fe,initial:n?{opacity:0}:`initial`,animate:n?{opacity:1}:`animate`,exit:n?{opacity:0}:`exit`,transition:n?{duration:.15}:void 0,className:`inline-grid shrink-0 place-items-center overflow-hidden`,children:t},e)}function pe({value:e,children:t}){let n=S(),r=(0,N.useRef)(null),[i,a]=(0,N.useState)(),o=typeof t==`string`?t:null,s=o!==null&&!n;return(0,N.useLayoutEffect)(()=>{let e=r.current?.offsetWidth;e&&a(t=>t===e?t:e)}),(0,H.jsxs)(p.span,{initial:!1,layout:`size`,style:{width:i},transition:n?{duration:0}:b,className:`relative inline-block overflow-hidden whitespace-nowrap align-bottom`,children:[(0,H.jsx)(`span`,{ref:r,"aria-hidden":!0,className:`invisible inline-block whitespace-nowrap`,children:s?o.split(``).map((e,t)=>(0,H.jsx)(`span`,{className:`inline-block whitespace-pre`,children:e},t)):t}),s?(0,H.jsx)(`span`,{className:`sr-only`,children:o}):null,(0,H.jsx)(x,{initial:!1,children:s?(0,H.jsx)(p.span,{"aria-hidden":!0,initial:`initial`,animate:`animate`,exit:`exit`,className:`absolute left-0 top-0 inline-block whitespace-pre`,children:o.split(``).map((e,t)=>(0,H.jsx)(p.span,{custom:t*ue,variants:de,className:`inline-block whitespace-pre`,children:e},t))},`cascade-${e}`):(0,H.jsx)(p.span,{initial:n?{opacity:0}:{opacity:0,y:14,filter:Z},animate:n?{opacity:1}:{opacity:1,y:0,filter:`blur(0px)`},exit:n?{opacity:0}:{opacity:0,y:-14,filter:Z},transition:n?{duration:.15}:b,className:`absolute left-0 top-0 inline-block`,children:t},`text-${e}`)})]})}(0,N.forwardRef)(function({state:e=`idle`,children:t,loadingText:n=`Loading`,successText:r=`Done`,errorText:i=`Try again`,icon:a,disabled:o,...s},c){let l=e===`loading`,u=e===`loading`?n:e===`success`?r:e===`error`?i:t,d=typeof u==`string`?`${e}-${u}`:e;return(0,H.jsx)(X,{ref:c,disabled:o||l,"aria-busy":l,whileHover:void 0,...s,children:(0,H.jsxs)(`span`,{"aria-live":`polite`,className:`relative inline-flex items-center justify-center overflow-hidden`,children:[(0,H.jsxs)(x,{initial:!1,children:[e===`loading`?(0,H.jsx)(Q,{keyId:`loading-icon`,children:(0,H.jsx)(D,{className:`size-4 animate-spin`})}):null,e===`success`?(0,H.jsx)(Q,{keyId:`success-icon`,children:(0,H.jsx)(T,{className:`size-4`})}):null,e===`error`?(0,H.jsx)(Q,{keyId:`error-icon`,children:(0,H.jsx)(O,{className:`size-4`})}):null]}),(0,H.jsx)(pe,{value:d,children:u}),(0,H.jsx)(x,{initial:!1,children:e===`idle`&&a?(0,H.jsx)(Q,{keyId:`idle-icon`,children:a}):null})]})})});function me(e,t){return e?.trigger.left===t.trigger.left&&e.trigger.top===t.trigger.top&&e.trigger.width===t.trigger.width&&e.trigger.height===t.trigger.height&&e.content.width===t.content.width&&e.content.height===t.content.height}function he(e,t,n){let[r,i]=(0,N.useState)(null),a=(0,N.useCallback)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let a=n.getBoundingClientRect(),o={trigger:{left:a.left,top:a.top,width:a.width,height:a.height},content:{width:r.offsetWidth,height:r.offsetHeight}};i(e=>me(e,o)?e:o)},[t,e]);return(0,N.useLayoutEffect)(()=>{if(a(),!n)return;let r=e.current,i=t.current,o=new ResizeObserver(a);return r&&o.observe(r),i&&o.observe(i),window.addEventListener(`scroll`,a,!0),window.addEventListener(`resize`,a),()=>{o.disconnect(),window.removeEventListener(`scroll`,a,!0),window.removeEventListener(`resize`,a)}},[n,t,e,a]),r}function ge(){return()=>{}}function _e(){return!0}function ve(){return!1}function ye(){return(0,N.useSyncExternalStore)(ge,_e,ve)}var be=e(n(),1),xe=(0,N.createContext)(null);function $(e){let t=(0,N.useContext)(xe);if(!t)throw Error(`${e} must be used within <MorphPopover>`);return t}function Se({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,className:a}){let o=(0,N.useId)(),s=(0,N.useRef)(null),c=(0,N.useRef)(null),l=(0,N.useRef)(null),[u,d]=(0,N.useState)(n),f=t!==void 0,p=f?t:u,m=(0,N.useCallback)(e=>{f||d(e),r?.(e)},[f,r]),h=(0,N.useCallback)(()=>m(!p),[m,p]),g=(0,N.useEffectEvent)(m);(0,N.useEffect)(()=>{if(!p)return;let e=e=>e.key===`Escape`&&g(!1),t=e=>{let t=e.target;s.current&&!s.current.contains(t)&&!l.current?.contains(t)&&g(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`pointerdown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,t)}},[p]);let _=(0,N.useMemo)(()=>({open:p,setOpen:m,toggle:h,triggerId:`${o}-trigger`,contentId:`${o}-content`,triggerRef:c,contentRef:l}),[p,m,h,o]);return(0,H.jsx)(xe.Provider,{value:_,children:(0,H.jsx)(`div`,{ref:s,className:i(`relative inline-flex`,a),children:e})})}function Ce(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n&&typeof n==`object`&&(n.current=t)}}function we({children:e}){let t=$(`MorphPopoverTrigger`);if(!(0,N.isValidElement)(e))return e;let n=e,r=n.props.onClick,i=n.props.ref;return(0,N.cloneElement)(n,{id:t.triggerId,ref:Ce(i,e=>{t.triggerRef.current=e}),onClick:e=>{r?.(e),t.toggle()},"aria-haspopup":`dialog`,"aria-expanded":t.open,"aria-controls":t.open?t.contentId:void 0})}var Te=(e,t)=>`${e===`bottom`?`top`:`bottom`} ${t===`end`?`right`:`left`}`;function Ee(e,t,n){return`inset(${e===`bottom`?`0%`:`92%`} ${t===`end`?`0%`:`92%`} ${e===`bottom`?`92%`:`0%`} ${t===`end`?`92%`:`0%`} round ${n}px)`}var De=e=>`inset(0% 0% 0% 0% round ${e}px)`,Oe={duration:.32,ease:v};function ke({children:e,side:t=`bottom`,align:n=`end`,sideOffset:r=8,radius:a=16,className:o}){let s=$(`MorphPopoverContent`),c=S()??!1,l=ye(),u=he(s.triggerRef,s.contentRef,l&&s.open),d=u?n===`end`?u.trigger.left+u.trigger.width-u.content.width:u.trigger.left:0,m=u?t===`bottom`?u.trigger.top+u.trigger.height+r:u.trigger.top-u.content.height-r:0,h=c?void 0:{hidden:{opacity:0,scale:.96,transition:f},show:{opacity:1,scale:1,transition:f}},g=c?void 0:{hidden:{clipPath:Ee(t,n,a),transition:Oe},show:{clipPath:De(a),transition:Oe}};return l?(0,be.createPortal)((0,H.jsx)(x,{children:s.open?(0,H.jsx)(p.div,{"data-morph-popover-portal":``,variants:h,initial:c?{opacity:0}:`hidden`,animate:c?{opacity:1}:`show`,exit:c?{opacity:0}:`hidden`,transition:c?{duration:.12}:void 0,style:{left:d,top:m,visibility:u?`visible`:`hidden`,transformOrigin:Te(t,n)},className:`fixed z-[9999] [filter:drop-shadow(0_10px_18px_rgba(0,0,0,0.14))]`,children:(0,H.jsx)(p.div,{ref:s.contentRef,id:s.contentId,role:`dialog`,"aria-labelledby":s.triggerId,variants:g,style:{borderRadius:a},className:i(`overflow-hidden`,k,o),children:e})}):null}),document.body):null}function Ae({value:e,defaultValue:t=``,onValueChange:n,models:r=[],model:a,defaultModel:o,onModelChange:s,actions:c=[],onAction:l,onSubmit:u,loading:d=!1,submitWhileLoading:f=!1,onStop:m,minRows:h=2,maxRows:g=8,leadingAction:_,className:v,disabled:y,placeholder:C=`Ask the agent to do something…`,"aria-label":w=`Prompt`,onKeyDown:T,...E}){let D=S()??!1,O=(0,N.useRef)(null),k=(0,N.useRef)(null),[ne,A]=(0,N.useState)(t),[j,M]=(0,N.useState)(o??r[0]?.value),[P,F]=(0,N.useState)(!1),I=e??ne,L=a??j,R=r.find(e=>e.value===L),z=!!I.trim()&&!y&&(!d||f),B=(0,N.useCallback)(()=>{let e=O.current,t=k.current;if(!e||!t||e.value!==I)return;let n=`${Math.min(Math.max(t.scrollHeight,h*24),g*24)}px`;e.style.height!==n&&(e.style.height=n)},[I,g,h]);(0,N.useLayoutEffect)(()=>{B()},[B]);let V=(0,N.useRef)(B);(0,N.useEffect)(()=>{V.current=B}),(0,N.useEffect)(()=>{let e=O.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>V.current());return t.observe(e),()=>t.disconnect()},[]);let U=t=>{e===void 0&&A(t),n?.(t)},W=e=>{a===void 0&&M(e),s?.(e)},G=t=>{t?.preventDefault();let n=I.trim();!n||y||d&&!f||(u?.(n,L),e===void 0&&A(``),O.current?.focus({preventScroll:!0}))},ie=e=>{T?.(e),!(e.defaultPrevented||e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing)&&(e.preventDefault(),G())};return(0,H.jsxs)(`form`,{onSubmit:G,className:i(`relative w-full rounded-[24px] border border-border/70 bg-sidebar p-2 text-[color:var(--foreground)] shadow-sm transition-[border-color,box-shadow] focus-within:border-foreground/25 focus-within:ring-1 focus-within:ring-ring/20`,y&&`opacity-60`,v),children:[(0,H.jsx)(`div`,{ref:k,"aria-hidden":`true`,className:`pointer-events-none invisible absolute inset-x-2 top-0 whitespace-pre-wrap px-2 text-sm leading-6 [overflow-wrap:break-word]`,children:`${I}\u200b`}),(0,H.jsx)(`textarea`,{ref:O,value:I,disabled:y,placeholder:C,"aria-label":w,rows:h,...E,onChange:e=>U(e.target.value),onKeyDown:ie,className:`scrollbar-hide block w-full resize-none overflow-y-auto bg-transparent px-2 pt-1.5 text-sm leading-6 text-foreground outline-none placeholder:text-foreground/55`}),(0,H.jsxs)(`div`,{className:`mt-1 flex min-h-8 items-center gap-1`,children:[c.length?(0,H.jsxs)(Se,{open:P,onOpenChange:F,children:[(0,H.jsx)(we,{children:(0,H.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,disabled:y||d,"aria-label":`Add to prompt`,className:`size-8 rounded-full text-foreground/70 hover:text-foreground`,children:(0,H.jsx)(p.span,{"aria-hidden":`true`,animate:{rotate:P?45:0},transition:D?{duration:0}:b,children:(0,H.jsx)(ee,{className:`size-4`})})})}),(0,H.jsx)(ke,{side:`top`,align:`start`,sideOffset:8,radius:12,className:`w-56 p-1.5`,children:c.map(e=>(0,H.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:()=>{l?.(e.value),F(!1)},className:`flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left outline-none transition-colors hover:bg-muted focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-50`,children:[e.icon?(0,H.jsx)(`span`,{className:`mt-0.5 grid size-5 shrink-0 place-items-center text-foreground/70 [&_svg]:size-4`,children:e.icon}):null,(0,H.jsxs)(`span`,{className:`min-w-0`,children:[(0,H.jsx)(`span`,{className:`block text-sm text-foreground`,children:e.label}),e.description?(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs leading-4 text-foreground/60`,children:e.description}):null]})]},e.value))})]}):null,_,r.length?(0,H.jsxs)(ae,{value:L,onValueChange:W,disabled:y||d,className:`min-w-0`,children:[(0,H.jsx)(oe,{className:`h-8 w-auto max-w-52 rounded-xl border-0 bg-transparent px-2 py-0 text-xs hover:bg-muted focus-visible:ring-2`,children:(0,H.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[R?.icon?(0,H.jsx)(`span`,{className:`grid size-4 shrink-0 place-items-center text-foreground/70 [&_svg]:size-3.5`,children:R.icon}):null,(0,H.jsx)(`span`,{className:`truncate text-foreground/70`,children:R?.label??`Choose model`})]})}),(0,H.jsx)(se,{className:`right-auto w-52 shadow-none`,children:r.map(e=>(0,H.jsx)(ce,{value:e.value,disabled:e.disabled,className:`py-2`,children:(0,H.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[e.icon?(0,H.jsx)(`span`,{className:`grid size-5 shrink-0 place-items-center text-muted-foreground [&_svg]:size-4`,children:e.icon}):null,(0,H.jsx)(`span`,{className:`min-w-0 truncate text-sm text-foreground`,children:e.label})]})},e.value))})]}):null,d&&m?(0,H.jsx)(X,{type:`button`,size:`icon`,"aria-label":`Stop generating`,onClick:m,className:`ml-auto size-8 rounded-full`,children:(0,H.jsx)(te,{className:`size-3 fill-current`})}):null,!d||z?(0,H.jsx)(X,{type:`submit`,size:`icon`,disabled:!z,"aria-label":d?`Steer current run`:`Send prompt`,className:i(`size-8 rounded-full`,!d&&`ml-auto`),children:(0,H.jsx)(x,{initial:!1,mode:`popLayout`,children:(0,H.jsx)(p.span,{initial:D?{opacity:1}:{opacity:0,y:3,scale:.8},animate:{opacity:1,y:0,scale:1},exit:D?{opacity:0}:{opacity:0,y:-3,scale:.8},transition:D?{duration:0}:b,className:`grid place-items-center`,children:(0,H.jsx)(re,{className:`size-4`})},`send`)})}):null]})]})}export{ye as a,re as c,we as i,Se as n,he as o,ke as r,X as s,Ae as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./utils-Eg7xtNmV.js";import{c as n}from"./surfaces-BhAXz9So.js";var r=e();function i({suggestions:e,selectedSuggestion:i,cycle:a,onSuggestion:o,variant:s=`pills`,className:c,...l}){let u=s===`list`;return(0,r.jsx)(`div`,{"data-slot":`suggestions`,className:t(u?`flex w-full max-w-sm flex-col gap-2`:`flex w-full max-w-xl flex-wrap justify-center gap-1`,c),...l,children:e.map((e,a)=>(0,r.jsx)(`button`,{type:`button`,"aria-pressed":i===e,onClick:()=>o(e),className:t(n,`fade-in slide-in-from-bottom-2 animate-in fill-mode-both flex cursor-pointer items-center text-[0.8125rem] text-foreground/80 transition-[color,transform] duration-300 hover:-translate-y-px hover:text-foreground focus-visible:text-foreground active:scale-[0.96] motion-reduce:animate-none`,u?`w-full rounded-2xl px-4 py-2.5 text-start`:`rounded-full px-4 py-2`,i===e&&`!bg-foreground !text-background hover:!text-background focus-visible:!text-background`),style:{animationDelay:`${a*70}ms`},children:e},e))},a)}export{i as PromptSuggestions};