@qredence/fleet 0.6.1 → 0.6.2

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 (271) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/web/client/assets/agent-disclosure-CMrxF7L-.js +1 -0
  3. package/dist/web/client/assets/analytics-stub-C2vgmGm_.js +1 -0
  4. package/dist/web/client/assets/artifacts-panel-DmQghvw8.js +1 -0
  5. package/dist/web/client/assets/{bot-Bs7QWJ2q.js → bot-DbB9BKL0.js} +1 -1
  6. package/dist/web/client/assets/bundle-mjs-cJTHqqzI.js +1 -0
  7. package/dist/web/client/assets/button-Dl0ce3Y5.js +1 -0
  8. package/dist/web/client/assets/{card-DA3Vnqay.js → card-DCEnYd2G.js} +1 -1
  9. package/dist/web/client/assets/chat-C24kD2SP.js +52 -0
  10. package/dist/web/client/assets/chat-command-palette-BIwjhE6s.js +1 -0
  11. package/dist/web/client/assets/check-B3LlvM65.js +1 -0
  12. package/dist/web/client/assets/{chevron-down-BEVGmnSb.js → chevron-down-DUUprRP5.js} +1 -1
  13. package/dist/web/client/assets/chevron-right-NVqQIoiO.js +1 -0
  14. package/dist/web/client/assets/{chunk-YOKDWASO-BAf618wr.js → chunk-YOKDWASO-Bte3iwlH.js} +6 -6
  15. package/dist/web/client/assets/citations-BUvM92nt.js +1 -0
  16. package/dist/web/client/assets/collapsible-CUxOjhDJ.js +1 -0
  17. package/dist/web/client/assets/command-Dv96gATQ.js +1 -0
  18. package/dist/web/client/assets/createBaseUIEventDetails-B58Jldei.js +1 -0
  19. package/dist/web/client/assets/createLucideIcon-_dfI7Arx.js +1 -0
  20. package/dist/web/client/assets/dialog-BCb4rQh0.js +1 -0
  21. package/dist/web/client/assets/dist-52wg4XPY.js +1 -0
  22. package/dist/web/client/assets/dist-DbHxXSgQ.js +41 -0
  23. package/dist/web/client/assets/ease-CMumuPlX.js +1 -0
  24. package/dist/web/client/assets/{eye-B0DFz5hL.js → eye-CDHqtVoE.js} +1 -1
  25. package/dist/web/client/assets/file-text-TmalmYrb.js +1 -0
  26. package/dist/web/client/assets/{folder-BC5p7qK7.js → folder-vuNT4shY.js} +1 -1
  27. package/dist/web/client/assets/{fork-picker-dialog-B7NNpVmW.js → fork-picker-dialog-CpwEwsxA.js} +1 -1
  28. package/dist/web/client/assets/gauge-BsDqNM1A.js +1 -0
  29. package/dist/web/client/assets/globals-DCtBkCSD.css +2 -0
  30. package/dist/web/client/assets/{hard-drive-CHqgr7VQ.js → hard-drive-BT7UxHQu.js} +1 -1
  31. package/dist/web/client/assets/highlighted-body-KPVGNVTW-CgT7gqvs.js +1 -0
  32. package/dist/web/client/assets/horizontal-resize-VLjLByUV.js +1 -0
  33. package/dist/web/client/assets/index-BGnQeUYE.js +12 -0
  34. package/dist/web/client/assets/input-CxZp56Im.js +1 -0
  35. package/dist/web/client/assets/input-group-D7lAfKHR.js +1 -0
  36. package/dist/web/client/assets/ipython-tool-CkHaO3PW.js +3 -0
  37. package/dist/web/client/assets/is-ref-object-BcRWZ4l7.js +1 -0
  38. package/dist/web/client/assets/{loader-circle-DjfHXUPB.js → loader-circle-B5GIZGxd.js} +1 -1
  39. package/dist/web/client/assets/markdown-BHkByC9K.js +2 -0
  40. package/dist/web/client/assets/{markdown-code-xNyjdZ4g.js → markdown-code-CDTRq-HZ.js} +1 -1
  41. package/dist/web/client/assets/mermaid-HWGCJPDP-CY3N5ECk.js +1 -0
  42. package/dist/web/client/assets/message-queue-Dl8wbCOu.js +1 -0
  43. package/dist/web/client/assets/model-selector-list-CRZCXeBf.js +1 -0
  44. package/dist/web/client/assets/{notify-DxL0VD7Z.js → notify-DjVixft7.js} +1 -1
  45. package/dist/web/client/assets/{openui-renderer-TLNe5e_Q.js → openui-renderer-Bkkx5kmA.js} +37 -37
  46. package/dist/web/client/assets/{package-CdcJFPf2.js → package-BKBPgwMP.js} +1 -1
  47. package/dist/web/client/assets/{pencil-DcUwsKLn.js → pencil-CdO6qfv3.js} +1 -1
  48. package/dist/web/client/assets/{plug-Dt6VN0zF.js → plug-BRROUIw-.js} +1 -1
  49. package/dist/web/client/assets/prompt-input-WaGSKZCU.js +1 -0
  50. package/dist/web/client/assets/prompt-suggestions-BNyTcyWg.js +1 -0
  51. package/dist/web/client/assets/provider-catalog-C0XBIasJ.js +1 -0
  52. package/dist/web/client/assets/provider-label-Cka0ep0S.js +1 -0
  53. package/dist/web/client/assets/react-CwJFpaho.js +1 -0
  54. package/dist/web/client/assets/react-dom-DX3XddaT.js +1 -0
  55. package/dist/web/client/assets/{refresh-cw-IThTJ3j-.js → refresh-cw-l9WPHRkq.js} +1 -1
  56. package/dist/web/client/assets/repl-panel-L9dmPqio.js +1 -0
  57. package/dist/web/client/assets/{resource-helpers-Q2T0YCMO.js → resource-helpers-BuWybA8l.js} +1 -1
  58. package/dist/web/client/assets/resources-panel-mT-aMCvV.js +1 -0
  59. package/dist/web/client/assets/right-panel-context-CS8tJMzE.js +1 -0
  60. package/dist/web/client/assets/right-panel-registry-BCW7fQTG.js +2 -0
  61. package/dist/web/client/assets/{rotate-ccw-WNFNkKQD.js → rotate-ccw-CfGhzOv7.js} +1 -1
  62. package/dist/web/client/assets/routes-BWe5Iz-2.js +16 -0
  63. package/dist/web/client/assets/safe-external-url-BbAom7Bm.js +1 -0
  64. package/dist/web/client/assets/search-BjcXAUrI.js +1 -0
  65. package/dist/web/client/assets/session-insights-panel-B0rl37lo.js +1 -0
  66. package/dist/web/client/assets/session-reasoning-panel-8D2P7iaJ.js +1 -0
  67. package/dist/web/client/assets/session-tool-renderer-3E3cv8D0.js +1395 -0
  68. package/dist/web/client/assets/settings-dialog-B8lHq2tT.js +2 -0
  69. package/dist/web/client/assets/{skeleton-CkR2VmWc.js → skeleton-C3mo31Qu.js} +1 -1
  70. package/dist/web/client/assets/skeleton-loaders-BMa_G4yX.js +1 -0
  71. package/dist/web/client/assets/{shield-check-CkA2viVW.js → sparkles-D8XIY8pN.js} +1 -1
  72. package/dist/web/client/assets/square-DQaQu9bp.js +1 -0
  73. package/dist/web/client/assets/{square-terminal-BYTN_I86.js → square-terminal-BsopiuN7.js} +1 -1
  74. package/dist/web/client/assets/{subagent-chat-panel-oeLDPDAK.js → subagent-chat-panel-C5ukYiUx.js} +1 -1
  75. package/dist/web/client/assets/subagent-transcript-lqNcSVbH.js +1 -0
  76. package/dist/web/client/assets/subagents-panel-SJKhaVTr.js +1 -0
  77. package/dist/web/client/assets/{sun-BWiZFty0.js → sun-D0llhiMU.js} +1 -1
  78. package/dist/web/client/assets/surfaces-CpfsGAIA.js +1 -0
  79. package/dist/web/client/assets/switch-D3FhZU-S.js +1 -0
  80. package/dist/web/client/assets/terminal-BQAKkBY6.js +1 -0
  81. package/dist/web/client/assets/toast-lnCWGgSE.js +1 -0
  82. package/dist/web/client/assets/tokens-Ch5WqXC_.js +1 -0
  83. package/dist/web/client/assets/tool-result-B_yb2JoE.js +4 -0
  84. package/dist/web/client/assets/tool-timeline-VnMRQoLS.js +1 -0
  85. package/dist/web/client/assets/{triangle-alert-CU-gd7ui.js → triangle-alert-GAYh_5d3.js} +1 -1
  86. package/dist/web/client/assets/ui-preferences-aG2U2jjW.js +1 -0
  87. package/dist/web/client/assets/use-presence-7I2qv4qI.js +1 -0
  88. package/dist/web/client/assets/use-reduced-motion-BOcG709U.js +9 -0
  89. package/dist/web/client/assets/useBaseUiId-D9ZGPZ6f.js +1 -0
  90. package/dist/web/client/assets/useControlled-CgAAWIy9.js +1 -0
  91. package/dist/web/client/assets/utils-Brtgag-m.js +1 -0
  92. package/dist/web/client/assets/virtualized-turn-list-BgUgX6tM.js +6 -0
  93. package/dist/web/client/assets/workspace-panel-CKF5JQl2.js +1 -0
  94. package/dist/web/client/assets/workspace-path-nav-DqPbETfJ.js +2 -0
  95. package/dist/web/client/assets/{wrench-BJNNe07k.js → wrench-Myc12BTA.js} +1 -1
  96. package/dist/web/client/assets/x-BGsDD848.js +1 -0
  97. package/dist/web/client/bundle-budget.json +6 -6
  98. package/dist/web/server/_tanstack-start-manifest_v-BDPifIFN-DTSNCHBX.js +91 -0
  99. package/dist/web/server/{artifacts-panel-D3ySO--V-XSL53CXL.js → artifacts-panel-BN3DgqfV-N73J6N5Y.js} +39 -44
  100. package/dist/web/server/{chat-command-palette-kAbXhWVg-TJWXH2WW.js → chat-command-palette-G8awyZRw-2QE7FXGT.js} +18 -18
  101. package/dist/web/server/{chunk-SALXCFVO.js → chunk-33QA7BQJ.js} +19 -1
  102. package/dist/web/server/{chunk-5UCAJBAH.js → chunk-43S5N7SH.js} +80 -47
  103. package/dist/web/server/chunk-4EBSM4JR.js +74 -0
  104. package/dist/web/server/{chunk-ZIFSJ3HQ.js → chunk-4OTHKQMG.js} +185 -109
  105. package/dist/web/server/{chunk-NNKJTKOQ.js → chunk-6SOMNRAX.js} +309 -279
  106. package/dist/web/server/chunk-7E76R7MB.js +2138 -0
  107. package/dist/web/server/{chunk-EBG3XFGQ.js → chunk-7FK6YEMA.js} +49 -44
  108. package/dist/web/server/chunk-7HXCGBUP.js +56 -0
  109. package/dist/web/server/{chunk-P66QQWUM.js → chunk-7NZ3FJDA.js} +14 -1
  110. package/dist/web/server/{chunk-HF7DG7PC.js → chunk-7UTDOTOU.js} +80 -78
  111. package/dist/web/server/{chunk-OZO5ARFA.js → chunk-BQROC4PL.js} +11 -2
  112. package/dist/web/server/{chunk-JTCCQZLN.js → chunk-BUXJSBE3.js} +2 -2
  113. package/dist/web/server/{chunk-NIZBFVJF.js → chunk-CAPTFJOC.js} +9 -7
  114. package/dist/web/server/{chunk-YGYOBX7G.js → chunk-CCYLHNZJ.js} +1767 -52
  115. package/dist/web/server/{chunk-DJMHPJBP.js → chunk-CHEC7TWB.js} +3 -1
  116. package/dist/web/server/{chunk-NJ4QEZHK.js → chunk-CW6KZUKT.js} +7 -5
  117. package/dist/web/server/chunk-DLA5TLKX.js +164 -0
  118. package/dist/web/server/{chunk-MNBGB2SP.js → chunk-E5HALE4M.js} +4 -4
  119. package/dist/web/server/{chunk-D27LRYVT.js → chunk-EDAWH2MT.js} +10 -9
  120. package/dist/web/server/{chunk-NGCQJ33Y.js → chunk-ENGEUJIH.js} +1494 -1644
  121. package/dist/web/server/{chunk-RIP3PBWT.js → chunk-ESM7OCRL.js} +4 -4
  122. package/dist/web/server/{chunk-O3HDELZ2.js → chunk-FT74GAAH.js} +676 -670
  123. package/dist/web/server/{chunk-WNCAL4HN.js → chunk-HQ5TEXHT.js} +132 -152
  124. package/dist/web/server/{chunk-YOM42BKD.js → chunk-IPV4GLJL.js} +16 -16
  125. package/dist/web/server/{chunk-UL2725KQ.js → chunk-IXGLKAPN.js} +54 -46
  126. package/dist/web/server/{chunk-3TIMGWWI.js → chunk-JPDRUSUD.js} +2 -2
  127. package/dist/web/server/{chunk-4WBFCB4O.js → chunk-JVOW2NWC.js} +179 -177
  128. package/dist/web/server/chunk-K6PTNSCW.js +31 -0
  129. package/dist/web/server/{chunk-AR7O7JXD.js → chunk-KBWUBWVJ.js} +24 -1
  130. package/dist/web/server/{chunk-QIULBRTU.js → chunk-MJXXVQNA.js} +79 -84
  131. package/dist/web/server/{chunk-NWDI3OWB.js → chunk-NCK2FJAD.js} +30 -26
  132. package/dist/web/server/{chunk-QFRCJWQQ.js → chunk-NMBH57JT.js} +94 -33
  133. package/dist/web/server/{chunk-EAJTWMK5.js → chunk-NZ6KQT2X.js} +2 -2
  134. package/dist/web/server/{chunk-2DDWXTVG.js → chunk-O2UYZT3Z.js} +11 -11
  135. package/dist/web/server/{chunk-DLUZFOG3.js → chunk-OMEDERPG.js} +21 -25
  136. package/dist/web/server/{chunk-BLSX7WHW.js → chunk-OSMP55KI.js} +23 -2
  137. package/dist/web/server/{chunk-S3PQ6HKH.js → chunk-OVJYUWSQ.js} +2 -2
  138. package/dist/web/server/{chunk-UCUFC553.js → chunk-RXUMFFUV.js} +3 -3
  139. package/dist/web/server/{chunk-DO2O27B2.js → chunk-SDV3P3IW.js} +2 -2
  140. package/dist/web/server/chunk-TLNZNR7C.js +46 -0
  141. package/dist/web/server/{chunk-FYDQK6UX.js → chunk-UDD5W4CR.js} +32 -10
  142. package/dist/web/server/{chunk-MNPHMZU7.js → chunk-UE32PAV2.js} +47 -57
  143. package/dist/web/server/{chunk-KP2PNDGL.js → chunk-WB2LJC3R.js} +29 -32
  144. package/dist/web/server/{chunk-ETTDO4UO.js → chunk-WTYNN6EV.js} +1 -26
  145. package/dist/web/server/{chunk-EJEPDVK6.js → chunk-WU6X3GPJ.js} +48 -5
  146. package/dist/web/server/{chunk-XIB6XNUX.js → chunk-XJ6TGSUB.js} +425 -404
  147. package/dist/web/server/{chunk-PLYZ7P2Y.js → chunk-YMPJMHXZ.js} +41 -4
  148. package/dist/web/server/{chunk-GETSIVNU.js → chunk-YVGCPUAW.js} +7 -7
  149. package/dist/web/server/{chunk-4UBOIY2S.js → chunk-ZNFXBGLK.js} +1 -1
  150. package/dist/web/server/chunk-ZOVXMNJM.js +477 -0
  151. package/dist/web/server/{fork-picker-dialog-Ds6Tgtu3-DIBWN7MV.js → fork-picker-dialog-YKlapaxN-DR5L74ST.js} +9 -8
  152. package/dist/web/server/{markdown-DTnMbD87-FXGGAPJD.js → markdown-BzNejPoZ-6ITTDAV6.js} +2 -3
  153. package/dist/web/server/{markdown-code-BStjFfsy-SSLWUT4S.js → markdown-code-DAwXuW6m-HHVELO6I.js} +3 -4
  154. package/dist/web/server/{fleet-message-queue-D_w8lSeY-T3HB7HVQ.js → message-queue-Demph1x4-RBJUC3AT.js} +14 -10
  155. package/dist/web/server/{model-selector-list-DxeGZoD2-P6S6FSJH.js → model-selector-list-BmzLiCx9-TK6JGGKU.js} +20 -19
  156. package/dist/web/server/{openui-renderer-MKFv6LlH-MDRSVFEY.js → openui-renderer-moJGf0LA-QCU3PI6H.js} +17 -18
  157. package/dist/web/server/{prompt-suggestions-BOItmGnD-YQA7RHLG.js → prompt-suggestions-yPZqX__K-3VGJC4IF.js} +7 -6
  158. package/dist/web/server/{repl-panel-CuyF8wt5-CHDT2Q3N.js → repl-panel-CgUF1qUw-3DFD2V53.js} +10 -11
  159. package/dist/web/server/{resources-panel-CE5pD4vy-V5FXBTYC.js → resources-panel-ChUliWV--JITAGS6Q.js} +6 -7
  160. package/dist/web/server/{router-Dg72SESP-PCWKLFRG.js → router-CPdFlpbe-LAD4MNZB.js} +3111 -235
  161. package/dist/web/server/{routes-BGrVtPYF-SURPAJN6.js → routes-hkom6S6L-DUPPQHPY.js} +5045 -4285
  162. package/dist/web/server/server.js +2 -2
  163. package/dist/web/server/{session-insights-panel-CUhdgvRt-VB2HUCQP.js → session-insights-panel-xgrkX1Rp-FDNURBXZ.js} +9 -9
  164. package/dist/web/server/{fleet-reasoning-panel-DG_vuvv0-NCZWEEIT.js → session-reasoning-panel-m1RgcIph-NUXGXVKE.js} +21 -22
  165. package/dist/web/server/session-tool-renderer-CglQ2ky7-2JVYNZG2.js +45 -0
  166. package/dist/web/server/{settings-dialog-CK0FJlTg-HZRBAXDZ.js → settings-dialog-BCEfmgtP-T3WQEZHB.js} +175 -1373
  167. package/dist/web/server/{subagent-chat-panel-gzamnTgK-PQ2TLLJF.js → subagent-chat-panel-BTwI1kdB-LKBWA4GD.js} +32 -41
  168. package/dist/web/server/{subagents-panel-Berjd7HJ-EI5ZKC6V.js → subagents-panel-8Z9_csoV-HYMEEBHB.js} +37 -45
  169. package/dist/web/server/{fleet-tool-timeline-D6yM4ZMz-ZSFVRRRI.js → tool-timeline-QL9k5dzA-RLU26HXT.js} +6 -6
  170. package/dist/web/server/{workspace-panel-CBBa_3UO-B4PPFPMA.js → workspace-panel-BHEB9nRM-TS62SYBA.js} +24 -31
  171. package/package.json +1 -1
  172. package/dist/web/client/assets/action-swap-roll-COzQ86wm.js +0 -1
  173. package/dist/web/client/assets/agent-activity-svETLf_5.js +0 -1
  174. package/dist/web/client/assets/agent-disclosure-DAMuuGcM.js +0 -1
  175. package/dist/web/client/assets/analytics-stub-B6zGMuSV.js +0 -1
  176. package/dist/web/client/assets/artifacts-panel-HVjqBMyx.js +0 -1
  177. package/dist/web/client/assets/artifacts-utils-N_kUFbz2.js +0 -1
  178. package/dist/web/client/assets/bundle-mjs-DKHVkVWu.js +0 -1
  179. package/dist/web/client/assets/button-C5wFDY5_.js +0 -1
  180. package/dist/web/client/assets/chat-BhYseKd6.js +0 -52
  181. package/dist/web/client/assets/chat-command-palette-LILDO_vG.js +0 -1
  182. package/dist/web/client/assets/check-JjHKAZas.js +0 -1
  183. package/dist/web/client/assets/chevron-right-DrJxToLs.js +0 -1
  184. package/dist/web/client/assets/chevron-up-CnSvySGH.js +0 -1
  185. package/dist/web/client/assets/circle-alert-CONlFReH.js +0 -1
  186. package/dist/web/client/assets/circle-x-CkKCB__4.js +0 -1
  187. package/dist/web/client/assets/citations-BPv8HIpf.js +0 -2
  188. package/dist/web/client/assets/cn-C8c0S2mI.js +0 -1
  189. package/dist/web/client/assets/collapsible-BoXtZZWN.js +0 -1
  190. package/dist/web/client/assets/command-PhicLCoO.js +0 -1
  191. package/dist/web/client/assets/createBaseUIEventDetails-DV0dQrBX.js +0 -1
  192. package/dist/web/client/assets/createLucideIcon-DwxZHm0M.js +0 -1
  193. package/dist/web/client/assets/dialog-pBGUjAQ7.js +0 -1
  194. package/dist/web/client/assets/dist-BPaFisIZ.js +0 -41
  195. package/dist/web/client/assets/earth-DGZXAN5r.js +0 -1
  196. package/dist/web/client/assets/ease-u56MhKYS.js +0 -1
  197. package/dist/web/client/assets/file-text-T-NcAlZs.js +0 -1
  198. package/dist/web/client/assets/fleet-message-queue-fbYYwMj0.js +0 -1
  199. package/dist/web/client/assets/fleet-pi-tool-renderer-BRgNnmaJ.js +0 -1395
  200. package/dist/web/client/assets/fleet-reasoning-panel-CjA2dwUJ.js +0 -1
  201. package/dist/web/client/assets/fleet-subagent-list-iKUtLJKZ.js +0 -1
  202. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +0 -1
  203. package/dist/web/client/assets/gauge-DNpstbBn.js +0 -1
  204. package/dist/web/client/assets/globals-CuIiqOTg.css +0 -2
  205. package/dist/web/client/assets/highlighted-body-KPVGNVTW-sUCZ1fHv.js +0 -1
  206. package/dist/web/client/assets/horizontal-resize-Cp3iHMH7.js +0 -1
  207. package/dist/web/client/assets/image-BbPmlw-n.js +0 -1
  208. package/dist/web/client/assets/index-CSGplyr_.js +0 -12
  209. package/dist/web/client/assets/input-PcdubeKn.js +0 -1
  210. package/dist/web/client/assets/input-group-C2HJEZvl.js +0 -1
  211. package/dist/web/client/assets/ipython-tool-CyuMOxz1.js +0 -3
  212. package/dist/web/client/assets/layout-gyLzPvVv.js +0 -1
  213. package/dist/web/client/assets/markdown-lvexwooo.js +0 -2
  214. package/dist/web/client/assets/mermaid-HWGCJPDP-Bm7CuruA.js +0 -1
  215. package/dist/web/client/assets/message-square-hbDao-A1.js +0 -1
  216. package/dist/web/client/assets/model-selector-list-CoXX358G.js +0 -1
  217. package/dist/web/client/assets/plus-DXN1Bg_z.js +0 -1
  218. package/dist/web/client/assets/prompt-input-fwP8TsgQ.js +0 -1
  219. package/dist/web/client/assets/prompt-suggestions-BlGXmWS7.js +0 -1
  220. package/dist/web/client/assets/provider-catalog-DYMFdbKc.js +0 -1
  221. package/dist/web/client/assets/provider-label-B4q5mI65.js +0 -1
  222. package/dist/web/client/assets/react-dom-Bwxum3ti.js +0 -1
  223. package/dist/web/client/assets/repl-panel-C5om8MGU.js +0 -1
  224. package/dist/web/client/assets/resources-panel-D867-goy.js +0 -1
  225. package/dist/web/client/assets/right-panel-context-DHlNWJsF.js +0 -1
  226. package/dist/web/client/assets/right-panel-registry-BBlxLxnx.js +0 -2
  227. package/dist/web/client/assets/routes-XGsAIqBJ.js +0 -16
  228. package/dist/web/client/assets/safe-external-url-D3PJJIcM.js +0 -1
  229. package/dist/web/client/assets/search-eWVnAJsb.js +0 -1
  230. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +0 -1
  231. package/dist/web/client/assets/settings-dialog-BSBasR3o.js +0 -2
  232. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +0 -1
  233. package/dist/web/client/assets/sparkles-DuclzqlE.js +0 -1
  234. package/dist/web/client/assets/square-Bhn8gjr0.js +0 -1
  235. package/dist/web/client/assets/subagent-transcript-DaVHjNUH.js +0 -1
  236. package/dist/web/client/assets/subagent-utils-DDH5qm9Z.js +0 -1
  237. package/dist/web/client/assets/subagents-panel-D_aVgSCi.js +0 -1
  238. package/dist/web/client/assets/surfaces-BhAXz9So.js +0 -1
  239. package/dist/web/client/assets/switch-WhXeJNNY.js +0 -1
  240. package/dist/web/client/assets/terminal-DOS1s1gm.js +0 -1
  241. package/dist/web/client/assets/toast-D3c9XeGe.js +0 -1
  242. package/dist/web/client/assets/tool-result-Cki8WUNc.js +0 -4
  243. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +0 -1
  244. package/dist/web/client/assets/use-reduced-motion-eORd7fqW.js +0 -9
  245. package/dist/web/client/assets/useBaseUiId-CHqXB2UQ.js +0 -1
  246. package/dist/web/client/assets/useControlled-CJJ9BOQB.js +0 -1
  247. package/dist/web/client/assets/utils-Eg7xtNmV.js +0 -1
  248. package/dist/web/client/assets/virtualized-turn-list-CdMa-ydT.js +0 -6
  249. package/dist/web/client/assets/workspace-panel-77bDbprs.js +0 -1
  250. package/dist/web/client/assets/workspace-path-nav-C0AQNZyy.js +0 -1
  251. package/dist/web/client/assets/x-CsRC_tCI.js +0 -1
  252. package/dist/web/server/_tanstack-start-manifest_v-0L7fqnH4-KMVGUFE4.js +0 -95
  253. package/dist/web/server/agent-activity-BuEE6iVw-CDZLK4D2.js +0 -514
  254. package/dist/web/server/chunk-2JHTYWD5.js +0 -1196
  255. package/dist/web/server/chunk-3JMESBAT.js +0 -35
  256. package/dist/web/server/chunk-42XU6WV7.js +0 -56
  257. package/dist/web/server/chunk-AQ66E5OW.js +0 -33
  258. package/dist/web/server/chunk-BYXBJQAS.js +0 -0
  259. package/dist/web/server/chunk-FAGDMGLK.js +0 -6589
  260. package/dist/web/server/chunk-FJV6EQDW.js +0 -36
  261. package/dist/web/server/chunk-GL6HWDJB.js +0 -19
  262. package/dist/web/server/chunk-L46H6IDX.js +0 -13
  263. package/dist/web/server/chunk-NIDBN7BQ.js +0 -86
  264. package/dist/web/server/chunk-ON33WDZX.js +0 -31
  265. package/dist/web/server/chunk-PVJCTQFK.js +0 -22
  266. package/dist/web/server/chunk-QPNUGF3V.js +0 -35
  267. package/dist/web/server/chunk-S5LFXXDY.js +0 -1265
  268. package/dist/web/server/chunk-VPKX7QRU.js +0 -42
  269. package/dist/web/server/chunk-ZCVWADNW.js +0 -37
  270. package/dist/web/server/fleet-pi-tool-renderer-qwc-qZFq-4U556N5Q.js +0 -51
  271. package/dist/web/server/fleet-subagent-list-BGb0PjhF-2X67FMUV.js +0 -18
@@ -1,10 +1,67 @@
1
1
  import {
2
- LazyContext,
3
- animations,
4
- createDomVisualElement,
5
- gestureAnimations,
6
- loadFeatures
7
- } from "./chunk-FAGDMGLK.js";
2
+ isObject
3
+ } from "./chunk-K6PTNSCW.js";
4
+ import {
5
+ KeyframeResolver,
6
+ MotionConfigContext,
7
+ MotionGlobalConfig,
8
+ NativeAnimation,
9
+ VisualElement,
10
+ WithPromise,
11
+ acceleratedValues,
12
+ analyseComplexValue,
13
+ buildHTMLStyles,
14
+ buildSVGAttrs,
15
+ camelToDash,
16
+ cancelFrame,
17
+ clamp,
18
+ color,
19
+ complex,
20
+ containsCSSVariable,
21
+ createBox,
22
+ cssStyleProperties,
23
+ defaultTransformValue,
24
+ findDimensionValueType,
25
+ flushKeyframeResolvers,
26
+ frame,
27
+ frameData,
28
+ generateLinearEasing,
29
+ getAnimatableNone,
30
+ getDefaultValueType,
31
+ getFinalKeyframe,
32
+ hex,
33
+ hsla,
34
+ invariant,
35
+ isBezierDefinition,
36
+ isCSSVariableName,
37
+ isCSSVariableToken,
38
+ isGenerator,
39
+ isMotionValue,
40
+ isNumOrPxType,
41
+ isNumericalString,
42
+ isSVGTag,
43
+ isZeroValueString,
44
+ memo$1,
45
+ millisecondsToSeconds,
46
+ mixNumber,
47
+ motionValue,
48
+ noop,
49
+ optimizedAppearDataAttribute,
50
+ positionalValues,
51
+ readTransformValue,
52
+ resolveVariantFromProps,
53
+ rgba,
54
+ scrapeMotionValuesFromProps,
55
+ scrapeMotionValuesFromProps$1,
56
+ secondsToMilliseconds,
57
+ setStyle,
58
+ time,
59
+ transformPropOrder,
60
+ transformProps,
61
+ useConstant,
62
+ velocityPerSecond,
63
+ warning
64
+ } from "./chunk-7E76R7MB.js";
8
65
  import {
9
66
  ChatDeliveryModeSchema,
10
67
  ChatThinkingLevelSchema,
@@ -13,42 +70,1669 @@ import {
13
70
  nonEmptyStringSchema,
14
71
  nonNegativeIntSchema,
15
72
  positiveIntSchema
16
- } from "./chunk-PLYZ7P2Y.js";
73
+ } from "./chunk-YMPJMHXZ.js";
17
74
 
18
- // web/app/dist/server/assets/chat-protocol.zod-Dr2Flr42.js
19
- import { useEffect, useRef, useState } from "react";
75
+ // web/app/dist/server/assets/chat-protocol.zod-DV6B0Wk2.js
76
+ import { useContext, useMemo } from "react";
20
77
  import { jsx } from "react/jsx-runtime";
21
- function LazyMotion({ children, features, strict = false }) {
22
- const [, setIsLoaded] = useState(!isLazyBundle(features));
23
- const loadedRenderer = useRef(void 0);
24
- if (!isLazyBundle(features)) {
25
- const { renderer, ...loadedFeatures } = features;
26
- loadedRenderer.current = renderer;
27
- loadFeatures(loadedFeatures);
28
- }
29
- useEffect(() => {
30
- if (isLazyBundle(features)) features().then(({ renderer, ...loadedFeatures }) => {
31
- loadFeatures(loadedFeatures);
32
- loadedRenderer.current = renderer;
33
- setIsLoaded(true);
78
+ var pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));
79
+ var progress = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
80
+ const range = to - from;
81
+ return range ? (value - from) / range : 1;
82
+ };
83
+ var calcBezier = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;
84
+ var subdivisionPrecision = 1e-7;
85
+ var subdivisionMaxIterations = 12;
86
+ function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
87
+ let currentX;
88
+ let currentT;
89
+ let i = 0;
90
+ do {
91
+ currentT = lowerBound + (upperBound - lowerBound) / 2;
92
+ currentX = calcBezier(currentT, mX1, mX2) - x;
93
+ if (currentX > 0) upperBound = currentT;
94
+ else lowerBound = currentT;
95
+ } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
96
+ return currentT;
97
+ }
98
+ // @__NO_SIDE_EFFECTS__
99
+ function cubicBezier(mX1, mY1, mX2, mY2) {
100
+ if (mX1 === mY1 && mX2 === mY2) return noop;
101
+ const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
102
+ return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
103
+ }
104
+ var mirrorEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
105
+ var reverseEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => 1 - easing(1 - p);
106
+ var backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);
107
+ var backIn = /* @__PURE__ */ reverseEasing(backOut);
108
+ var backInOut = /* @__PURE__ */ mirrorEasing(backIn);
109
+ var anticipate = (p) => p >= 1 ? 1 : (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
110
+ var circIn = (p) => 1 - Math.sin(Math.acos(p));
111
+ var circOut = /* @__PURE__ */ reverseEasing(circIn);
112
+ var circInOut = /* @__PURE__ */ mirrorEasing(circIn);
113
+ var easeIn = /* @__PURE__ */ cubicBezier(0.42, 0, 1, 1);
114
+ var easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);
115
+ var easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);
116
+ var isEasingArray = /* @__NO_SIDE_EFFECTS__ */ (ease2) => {
117
+ return Array.isArray(ease2) && typeof ease2[0] !== "number";
118
+ };
119
+ var easingLookup = {
120
+ linear: noop,
121
+ easeIn,
122
+ easeInOut,
123
+ easeOut,
124
+ circIn,
125
+ circInOut,
126
+ circOut,
127
+ backIn,
128
+ backInOut,
129
+ backOut,
130
+ anticipate
131
+ };
132
+ var isValidEasing = (easing) => {
133
+ return typeof easing === "string";
134
+ };
135
+ var easingDefinitionToFunction = (definition) => {
136
+ if (isBezierDefinition(definition)) {
137
+ invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length");
138
+ const [x1, y1, x2, y2] = definition;
139
+ return /* @__PURE__ */ cubicBezier(x1, y1, x2, y2);
140
+ } else if (isValidEasing(definition)) {
141
+ invariant(easingLookup[definition] !== void 0, `Invalid easing type '${definition}'`, "invalid-easing-type");
142
+ return easingLookup[definition];
143
+ }
144
+ return definition;
145
+ };
146
+ function hueToRgb(p, q, t) {
147
+ if (t < 0) t += 1;
148
+ if (t > 1) t -= 1;
149
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
150
+ if (t < 1 / 2) return q;
151
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
152
+ return p;
153
+ }
154
+ function hslaToRgba({ hue, saturation, lightness, alpha }) {
155
+ hue /= 360;
156
+ saturation /= 100;
157
+ lightness /= 100;
158
+ let red = 0;
159
+ let green = 0;
160
+ let blue = 0;
161
+ if (!saturation) red = green = blue = lightness;
162
+ else {
163
+ const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
164
+ const p = 2 * lightness - q;
165
+ red = hueToRgb(p, q, hue + 1 / 3);
166
+ green = hueToRgb(p, q, hue);
167
+ blue = hueToRgb(p, q, hue - 1 / 3);
168
+ }
169
+ return {
170
+ red: Math.round(red * 255),
171
+ green: Math.round(green * 255),
172
+ blue: Math.round(blue * 255),
173
+ alpha
174
+ };
175
+ }
176
+ function mixImmediate(a, b) {
177
+ return (p) => p > 0 ? b : a;
178
+ }
179
+ var mixLinearColor = (from, to, v) => {
180
+ const fromExpo = from * from;
181
+ const expo = v * (to * to - fromExpo) + fromExpo;
182
+ return expo < 0 ? 0 : Math.sqrt(expo);
183
+ };
184
+ var colorTypes = [
185
+ hex,
186
+ rgba,
187
+ hsla
188
+ ];
189
+ var getColorType = (v) => colorTypes.find((type) => type.test(v));
190
+ function asRGBA(color2) {
191
+ const type = getColorType(color2);
192
+ warning(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable");
193
+ if (!Boolean(type)) return false;
194
+ let model = type.parse(color2);
195
+ if (type === hsla) model = hslaToRgba(model);
196
+ return model;
197
+ }
198
+ var mixColor = (from, to) => {
199
+ const fromRGBA = asRGBA(from);
200
+ const toRGBA = asRGBA(to);
201
+ if (!fromRGBA || !toRGBA) return mixImmediate(from, to);
202
+ const blended = { ...fromRGBA };
203
+ return (v) => {
204
+ blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
205
+ blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);
206
+ blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);
207
+ blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);
208
+ return rgba.transform(blended);
209
+ };
210
+ };
211
+ var invisibleValues = /* @__PURE__ */ new Set(["none", "hidden"]);
212
+ function mixVisibility(origin, target) {
213
+ if (invisibleValues.has(origin)) return (p) => p <= 0 ? origin : target;
214
+ else return (p) => p >= 1 ? target : origin;
215
+ }
216
+ function mixNumber2(a, b) {
217
+ return (p) => mixNumber(a, b, p);
218
+ }
219
+ function getMixer(a) {
220
+ if (typeof a === "number") return mixNumber2;
221
+ else if (typeof a === "string") return isCSSVariableToken(a) ? mixImmediate : color.test(a) ? mixColor : mixComplex;
222
+ else if (Array.isArray(a)) return mixArray;
223
+ else if (typeof a === "object") return color.test(a) ? mixColor : mixObject;
224
+ return mixImmediate;
225
+ }
226
+ function mixArray(a, b) {
227
+ const output = [...a];
228
+ const numValues = output.length;
229
+ const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));
230
+ return (p) => {
231
+ for (let i = 0; i < numValues; i++) output[i] = blendValue[i](p);
232
+ return output;
233
+ };
234
+ }
235
+ function mixObject(a, b) {
236
+ const output = {
237
+ ...a,
238
+ ...b
239
+ };
240
+ const blendValue = {};
241
+ for (const key in output) if (a[key] !== void 0 && b[key] !== void 0) blendValue[key] = getMixer(a[key])(a[key], b[key]);
242
+ return (v) => {
243
+ for (const key in blendValue) output[key] = blendValue[key](v);
244
+ return output;
245
+ };
246
+ }
247
+ function matchOrder(origin, target) {
248
+ const orderedOrigin = [];
249
+ const pointers = {
250
+ color: 0,
251
+ var: 0,
252
+ number: 0
253
+ };
254
+ for (let i = 0; i < target.values.length; i++) {
255
+ const type = target.types[i];
256
+ const originIndex = origin.indexes[type][pointers[type]];
257
+ const originValue = origin.values[originIndex] ?? 0;
258
+ orderedOrigin[i] = originValue;
259
+ pointers[type]++;
260
+ }
261
+ return orderedOrigin;
262
+ }
263
+ var mixComplex = (origin, target) => {
264
+ const template = complex.createTransformer(target);
265
+ const originStats = analyseComplexValue(origin);
266
+ const targetStats = analyseComplexValue(target);
267
+ if (originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length) {
268
+ if (invisibleValues.has(origin) && !targetStats.values.length || invisibleValues.has(target) && !originStats.values.length) return mixVisibility(origin, target);
269
+ return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);
270
+ } else {
271
+ warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different");
272
+ return mixImmediate(origin, target);
273
+ }
274
+ };
275
+ function mix(from, to, p) {
276
+ if (typeof from === "number" && typeof to === "number" && typeof p === "number") return mixNumber(from, to, p);
277
+ return getMixer(from)(from, to);
278
+ }
279
+ var frameloopDriver = (update) => {
280
+ const passTimestamp = ({ timestamp }) => update(timestamp);
281
+ return {
282
+ start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),
283
+ stop: () => cancelFrame(passTimestamp),
284
+ /**
285
+ * If we're processing this frame we can use the
286
+ * framelocked timestamp to keep things in sync.
287
+ */
288
+ now: () => frameData.isProcessing ? frameData.timestamp : time.now()
289
+ };
290
+ };
291
+ var maxGeneratorDuration = 2e4;
292
+ function calcGeneratorDuration(generator) {
293
+ let duration = 0;
294
+ const timeStep = 50;
295
+ let state = generator.next(duration);
296
+ while (!state.done && duration < 2e4) {
297
+ duration += timeStep;
298
+ state = generator.next(duration);
299
+ }
300
+ return duration >= 2e4 ? Infinity : duration;
301
+ }
302
+ function createGeneratorEasing(options, scale = 100, createGenerator) {
303
+ const generator = createGenerator({
304
+ ...options,
305
+ keyframes: [0, scale]
306
+ });
307
+ const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
308
+ return {
309
+ type: "keyframes",
310
+ ease: (progress2) => {
311
+ return generator.next(duration * progress2).value / scale;
312
+ },
313
+ duration: millisecondsToSeconds(duration)
314
+ };
315
+ }
316
+ var springDefaults = {
317
+ stiffness: 100,
318
+ damping: 10,
319
+ mass: 1,
320
+ velocity: 0,
321
+ duration: 800,
322
+ bounce: 0.3,
323
+ visualDuration: 0.3,
324
+ restSpeed: {
325
+ granular: 0.01,
326
+ default: 2
327
+ },
328
+ restDelta: {
329
+ granular: 5e-3,
330
+ default: 0.5
331
+ },
332
+ minDuration: 0.01,
333
+ maxDuration: 10,
334
+ minDamping: 0.05,
335
+ maxDamping: 1
336
+ };
337
+ function calcAngularFreq(undampedFreq, dampingRatio) {
338
+ return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
339
+ }
340
+ var rootIterations = 12;
341
+ function approximateRoot(envelope, derivative, initialGuess) {
342
+ let result = initialGuess;
343
+ for (let i = 1; i < rootIterations; i++) result = result - envelope(result) / derivative(result);
344
+ return result;
345
+ }
346
+ var safeMin = 1e-3;
347
+ function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
348
+ let envelope;
349
+ let derivative;
350
+ warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
351
+ let dampingRatio = 1 - bounce;
352
+ dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
353
+ duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
354
+ if (dampingRatio < 1) {
355
+ envelope = (undampedFreq2) => {
356
+ const exponentialDecay = undampedFreq2 * dampingRatio;
357
+ const delta = exponentialDecay * duration;
358
+ const a = exponentialDecay - velocity;
359
+ const b = calcAngularFreq(undampedFreq2, dampingRatio);
360
+ const c = Math.exp(-delta);
361
+ return safeMin - a / b * c;
362
+ };
363
+ derivative = (undampedFreq2) => {
364
+ const delta = undampedFreq2 * dampingRatio * duration;
365
+ const d = delta * velocity + velocity;
366
+ const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq2, 2) * duration;
367
+ const f = Math.exp(-delta);
368
+ const g = calcAngularFreq(Math.pow(undampedFreq2, 2), dampingRatio);
369
+ return (-envelope(undampedFreq2) + safeMin > 0 ? -1 : 1) * ((d - e) * f) / g;
370
+ };
371
+ } else {
372
+ envelope = (undampedFreq2) => {
373
+ return -1e-3 + Math.exp(-undampedFreq2 * duration) * ((undampedFreq2 - velocity) * duration + 1);
374
+ };
375
+ derivative = (undampedFreq2) => {
376
+ return Math.exp(-undampedFreq2 * duration) * ((velocity - undampedFreq2) * (duration * duration));
377
+ };
378
+ }
379
+ const initialGuess = 5 / duration;
380
+ const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
381
+ duration = secondsToMilliseconds(duration);
382
+ if (isNaN(undampedFreq)) return {
383
+ stiffness: springDefaults.stiffness,
384
+ damping: springDefaults.damping,
385
+ duration
386
+ };
387
+ else {
388
+ const stiffness = Math.pow(undampedFreq, 2) * mass;
389
+ return {
390
+ stiffness,
391
+ damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
392
+ duration
393
+ };
394
+ }
395
+ }
396
+ var durationKeys = ["duration", "bounce"];
397
+ var physicsKeys = [
398
+ "stiffness",
399
+ "damping",
400
+ "mass"
401
+ ];
402
+ function isSpringType(options, keys) {
403
+ return keys.some((key) => options[key] !== void 0);
404
+ }
405
+ function getSpringOptions(options) {
406
+ let springOptions = {
407
+ velocity: springDefaults.velocity,
408
+ stiffness: springDefaults.stiffness,
409
+ damping: springDefaults.damping,
410
+ mass: springDefaults.mass,
411
+ isResolvedFromDuration: false,
412
+ ...options
413
+ };
414
+ if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
415
+ springOptions.velocity = 0;
416
+ if (options.visualDuration) {
417
+ const visualDuration = options.visualDuration;
418
+ const root = 2 * Math.PI / (visualDuration * 1.2);
419
+ const stiffness = root * root;
420
+ const damping = 2 * clamp(0.05, 1, 1 - (options.bounce || 0)) * Math.sqrt(stiffness);
421
+ springOptions = {
422
+ ...springOptions,
423
+ mass: springDefaults.mass,
424
+ stiffness,
425
+ damping
426
+ };
427
+ } else {
428
+ const derived = findSpring({
429
+ ...options,
430
+ velocity: 0
431
+ });
432
+ springOptions = {
433
+ ...springOptions,
434
+ ...derived,
435
+ mass: springDefaults.mass
436
+ };
437
+ springOptions.isResolvedFromDuration = true;
438
+ }
439
+ }
440
+ return springOptions;
441
+ }
442
+ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {
443
+ const options = typeof optionsOrVisualDuration !== "object" ? {
444
+ visualDuration: optionsOrVisualDuration,
445
+ keyframes: [0, 1],
446
+ bounce
447
+ } : optionsOrVisualDuration;
448
+ let { restSpeed, restDelta } = options;
449
+ const origin = options.keyframes[0];
450
+ const target = options.keyframes[options.keyframes.length - 1];
451
+ const state = {
452
+ done: false,
453
+ value: origin
454
+ };
455
+ const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
456
+ ...options,
457
+ velocity: -millisecondsToSeconds(options.velocity || 0)
458
+ });
459
+ const initialVelocity = velocity || 0;
460
+ const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
461
+ const initialDelta = target - origin;
462
+ const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
463
+ const isGranularScale = Math.abs(initialDelta) < 5;
464
+ restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
465
+ restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
466
+ let resolveSpring;
467
+ let resolveVelocity;
468
+ let angularFreq;
469
+ let A;
470
+ let sinCoeff;
471
+ let cosCoeff;
472
+ if (dampingRatio < 1) {
473
+ angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
474
+ A = (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq;
475
+ resolveSpring = (t) => {
476
+ const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
477
+ return target - envelope * (A * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
478
+ };
479
+ sinCoeff = dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;
480
+ cosCoeff = dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;
481
+ resolveVelocity = (t) => {
482
+ return Math.exp(-dampingRatio * undampedAngularFreq * t) * (sinCoeff * Math.sin(angularFreq * t) + cosCoeff * Math.cos(angularFreq * t));
483
+ };
484
+ } else if (dampingRatio === 1) {
485
+ resolveSpring = (t) => target - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);
486
+ const C = initialVelocity + undampedAngularFreq * initialDelta;
487
+ resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * (undampedAngularFreq * C * t - initialVelocity);
488
+ } else {
489
+ const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
490
+ resolveSpring = (t) => {
491
+ const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
492
+ const freqForT = Math.min(dampedAngularFreq * t, 300);
493
+ return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
494
+ };
495
+ const P = (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / dampedAngularFreq;
496
+ const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;
497
+ const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;
498
+ resolveVelocity = (t) => {
499
+ const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
500
+ const freqForT = Math.min(dampedAngularFreq * t, 300);
501
+ return envelope * (sinhCoeff * Math.sinh(freqForT) + coshCoeff * Math.cosh(freqForT));
502
+ };
503
+ }
504
+ const generator = {
505
+ calculatedDuration: isResolvedFromDuration ? duration || null : null,
506
+ velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),
507
+ next: (t) => {
508
+ if (!isResolvedFromDuration && dampingRatio < 1) {
509
+ const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
510
+ const sin = Math.sin(angularFreq * t);
511
+ const cos = Math.cos(angularFreq * t);
512
+ const current2 = target - envelope * (A * sin + initialDelta * cos);
513
+ const currentVelocity = secondsToMilliseconds(envelope * (sinCoeff * sin + cosCoeff * cos));
514
+ state.done = Math.abs(currentVelocity) <= restSpeed && Math.abs(target - current2) <= restDelta;
515
+ state.value = state.done ? target : current2;
516
+ return state;
517
+ }
518
+ const current = resolveSpring(t);
519
+ if (!isResolvedFromDuration) {
520
+ const currentVelocity = secondsToMilliseconds(resolveVelocity(t));
521
+ state.done = Math.abs(currentVelocity) <= restSpeed && Math.abs(target - current) <= restDelta;
522
+ } else state.done = t >= duration;
523
+ state.value = state.done ? target : current;
524
+ return state;
525
+ },
526
+ toString: () => {
527
+ const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
528
+ const easing = generateLinearEasing((progress2) => generator.next(calculatedDuration * progress2).value, calculatedDuration, 30);
529
+ return calculatedDuration + "ms " + easing;
530
+ },
531
+ toTransition: () => {
532
+ }
533
+ };
534
+ return generator;
535
+ }
536
+ spring.applyToOptions = (options) => {
537
+ const generatorOptions = createGeneratorEasing(options, 100, spring);
538
+ options.ease = generatorOptions.ease;
539
+ options.duration = secondsToMilliseconds(generatorOptions.duration);
540
+ options.type = "keyframes";
541
+ return options;
542
+ };
543
+ var velocitySampleDuration = 5;
544
+ function getGeneratorVelocity(resolveValue, t, current) {
545
+ const prevT = Math.max(t - velocitySampleDuration, 0);
546
+ return velocityPerSecond(current - resolveValue(prevT), t - prevT);
547
+ }
548
+ function inertia({ keyframes: keyframes2, velocity = 0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed }) {
549
+ const origin = keyframes2[0];
550
+ const state = {
551
+ done: false,
552
+ value: origin
553
+ };
554
+ const isOutOfBounds = (v) => min !== void 0 && v < min || max !== void 0 && v > max;
555
+ const nearestBoundary = (v) => {
556
+ if (min === void 0) return max;
557
+ if (max === void 0) return min;
558
+ return Math.abs(min - v) < Math.abs(max - v) ? min : max;
559
+ };
560
+ let amplitude = power * velocity;
561
+ const ideal = origin + amplitude;
562
+ const target = modifyTarget === void 0 ? ideal : modifyTarget(ideal);
563
+ if (target !== ideal) amplitude = target - origin;
564
+ const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);
565
+ const calcLatest = (t) => target + calcDelta(t);
566
+ const applyFriction = (t) => {
567
+ const delta = calcDelta(t);
568
+ const latest = calcLatest(t);
569
+ state.done = Math.abs(delta) <= restDelta;
570
+ state.value = state.done ? target : latest;
571
+ };
572
+ let timeReachedBoundary;
573
+ let spring$1;
574
+ const checkCatchBoundary = (t) => {
575
+ if (!isOutOfBounds(state.value)) return;
576
+ timeReachedBoundary = t;
577
+ spring$1 = spring({
578
+ keyframes: [state.value, nearestBoundary(state.value)],
579
+ velocity: getGeneratorVelocity(calcLatest, t, state.value),
580
+ damping: bounceDamping,
581
+ stiffness: bounceStiffness,
582
+ restDelta,
583
+ restSpeed
584
+ });
585
+ };
586
+ checkCatchBoundary(0);
587
+ return {
588
+ calculatedDuration: null,
589
+ next: (t) => {
590
+ let hasUpdatedFrame = false;
591
+ if (!spring$1 && timeReachedBoundary === void 0) {
592
+ hasUpdatedFrame = true;
593
+ applyFriction(t);
594
+ checkCatchBoundary(t);
595
+ }
596
+ if (timeReachedBoundary !== void 0 && t >= timeReachedBoundary) return spring$1.next(t - timeReachedBoundary);
597
+ else {
598
+ !hasUpdatedFrame && applyFriction(t);
599
+ return state;
600
+ }
601
+ }
602
+ };
603
+ }
604
+ function createMixers(output, ease2, customMixer) {
605
+ const mixers = [];
606
+ const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;
607
+ const numMixers = output.length - 1;
608
+ for (let i = 0; i < numMixers; i++) {
609
+ let mixer = mixerFactory(output[i], output[i + 1]);
610
+ if (ease2) mixer = pipe(Array.isArray(ease2) ? ease2[i] || noop : ease2, mixer);
611
+ mixers.push(mixer);
612
+ }
613
+ return mixers;
614
+ }
615
+ function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer } = {}) {
616
+ const inputLength = input.length;
617
+ invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length");
618
+ if (inputLength === 1) return () => output[0];
619
+ if (inputLength === 2 && output[0] === output[1]) return () => output[1];
620
+ const isZeroDeltaRange = input[0] === input[1];
621
+ if (input[0] > input[inputLength - 1]) {
622
+ input = [...input].reverse();
623
+ output = [...output].reverse();
624
+ }
625
+ const mixers = createMixers(output, ease2, mixer);
626
+ const numMixers = mixers.length;
627
+ const interpolator = (v) => {
628
+ if (isZeroDeltaRange && v < input[0]) return output[0];
629
+ let i = 0;
630
+ if (numMixers > 1) {
631
+ for (; i < input.length - 2; i++) if (v < input[i + 1]) break;
632
+ }
633
+ const progressInRange = /* @__PURE__ */ progress(input[i], input[i + 1], v);
634
+ return mixers[i](progressInRange);
635
+ };
636
+ return isClamp ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator;
637
+ }
638
+ function fillOffset(offset, remaining) {
639
+ const min = offset[offset.length - 1];
640
+ for (let i = 1; i <= remaining; i++) {
641
+ const offsetProgress = /* @__PURE__ */ progress(0, remaining, i);
642
+ offset.push(mixNumber(min, 1, offsetProgress));
643
+ }
644
+ }
645
+ function defaultOffset(arr) {
646
+ const offset = [0];
647
+ fillOffset(offset, arr.length - 1);
648
+ return offset;
649
+ }
650
+ function convertOffsetToTimes(offset, duration) {
651
+ return offset.map((o) => o * duration);
652
+ }
653
+ function defaultEasing(values, easing) {
654
+ return values.map(() => easing || easeInOut).splice(0, values.length - 1);
655
+ }
656
+ function keyframes({ duration = 300, keyframes: keyframeValues, times, ease: ease2 = "easeInOut" }) {
657
+ const easingFunctions = /* @__PURE__ */ isEasingArray(ease2) ? ease2.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease2);
658
+ const state = {
659
+ done: false,
660
+ value: keyframeValues[0]
661
+ };
662
+ const mapTimeToKeyframe = interpolate(convertOffsetToTimes(times && times.length === keyframeValues.length ? times : defaultOffset(keyframeValues), duration), keyframeValues, { ease: Array.isArray(easingFunctions) ? easingFunctions : defaultEasing(keyframeValues, easingFunctions) });
663
+ return {
664
+ calculatedDuration: duration,
665
+ next: (t) => {
666
+ state.value = mapTimeToKeyframe(t);
667
+ state.done = t >= duration;
668
+ return state;
669
+ }
670
+ };
671
+ }
672
+ var transitionTypeMap = {
673
+ decay: inertia,
674
+ inertia,
675
+ tween: keyframes,
676
+ keyframes,
677
+ spring
678
+ };
679
+ function replaceTransitionType(transition) {
680
+ if (typeof transition.type === "string") transition.type = transitionTypeMap[transition.type];
681
+ }
682
+ var percentToProgress = (percent) => percent / 100;
683
+ var JSAnimation = class extends WithPromise {
684
+ constructor(options) {
685
+ super();
686
+ this.state = "idle";
687
+ this.startTime = null;
688
+ this.isStopped = false;
689
+ this.currentTime = 0;
690
+ this.holdTime = null;
691
+ this.playbackSpeed = 1;
692
+ this.delayState = {
693
+ done: false,
694
+ value: void 0
695
+ };
696
+ this.stop = () => {
697
+ const { motionValue: motionValue2 } = this.options;
698
+ if (motionValue2 && motionValue2.updatedAt !== time.now()) this.tick(time.now());
699
+ this.isStopped = true;
700
+ if (this.state === "idle") return;
701
+ this.teardown();
702
+ this.options.onStop?.();
703
+ };
704
+ this.options = options;
705
+ this.initAnimation();
706
+ this.play();
707
+ if (options.autoplay === false) this.pause();
708
+ }
709
+ initAnimation() {
710
+ const { options } = this;
711
+ replaceTransitionType(options);
712
+ const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = options;
713
+ let { keyframes: keyframes$1 } = options;
714
+ const generatorFactory = type || keyframes;
715
+ if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
716
+ this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
717
+ keyframes$1 = [0, 100];
718
+ }
719
+ const generator = generatorFactory({
720
+ ...options,
721
+ keyframes: keyframes$1
34
722
  });
35
- }, []);
36
- return jsx(LazyContext.Provider, {
37
- value: {
38
- renderer: loadedRenderer.current,
39
- strict
723
+ if (repeatType === "mirror") this.mirroredGenerator = generatorFactory({
724
+ ...options,
725
+ keyframes: [...keyframes$1].reverse(),
726
+ velocity: -velocity
727
+ });
728
+ if (generator.calculatedDuration === null) generator.calculatedDuration = calcGeneratorDuration(generator);
729
+ const { calculatedDuration } = generator;
730
+ this.calculatedDuration = calculatedDuration;
731
+ this.resolvedDuration = calculatedDuration + repeatDelay;
732
+ this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;
733
+ this.generator = generator;
734
+ }
735
+ updateTime(timestamp) {
736
+ const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;
737
+ if (this.holdTime !== null) this.currentTime = this.holdTime;
738
+ else this.currentTime = animationTime;
739
+ }
740
+ tick(timestamp, sample = false) {
741
+ const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration } = this;
742
+ if (this.startTime === null) return generator.next(0);
743
+ const { delay = 0, keyframes: keyframes2, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe } = this.options;
744
+ if (this.speed > 0) this.startTime = Math.min(this.startTime, timestamp);
745
+ else if (this.speed < 0) this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
746
+ if (sample) this.currentTime = timestamp;
747
+ else this.updateTime(timestamp);
748
+ const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);
749
+ const isInDelayPhase = this.playbackSpeed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
750
+ this.currentTime = Math.max(timeWithoutDelay, 0);
751
+ if (this.state === "finished" && this.holdTime === null) this.currentTime = totalDuration;
752
+ let elapsed = this.currentTime;
753
+ let frameGenerator = generator;
754
+ if (repeat) {
755
+ const progress2 = Math.min(this.currentTime, totalDuration) / resolvedDuration;
756
+ let currentIteration = Math.floor(progress2);
757
+ let iterationProgress = progress2 % 1;
758
+ if (!iterationProgress && progress2 >= 1) iterationProgress = 1;
759
+ iterationProgress === 1 && currentIteration--;
760
+ currentIteration = Math.min(currentIteration, repeat + 1);
761
+ if (Boolean(currentIteration % 2)) {
762
+ if (repeatType === "reverse") {
763
+ iterationProgress = 1 - iterationProgress;
764
+ if (repeatDelay) iterationProgress -= repeatDelay / resolvedDuration;
765
+ } else if (repeatType === "mirror") frameGenerator = mirroredGenerator;
766
+ }
767
+ elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
768
+ }
769
+ let state;
770
+ if (isInDelayPhase) {
771
+ this.delayState.value = keyframes2[0];
772
+ state = this.delayState;
773
+ } else state = frameGenerator.next(elapsed);
774
+ if (mixKeyframes && !isInDelayPhase) state.value = mixKeyframes(state.value);
775
+ let { done } = state;
776
+ if (!isInDelayPhase && calculatedDuration !== null) done = this.playbackSpeed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;
777
+ const isAnimationFinished = this.holdTime === null && (this.state === "finished" || this.state === "running" && done);
778
+ if (isAnimationFinished && type !== inertia) state.value = getFinalKeyframe(keyframes2, this.options, finalKeyframe, this.speed);
779
+ if (onUpdate) onUpdate(state.value);
780
+ if (isAnimationFinished) this.finish();
781
+ return state;
782
+ }
783
+ /**
784
+ * Allows the returned animation to be awaited or promise-chained. Currently
785
+ * resolves when the animation finishes at all but in a future update could/should
786
+ * reject if its cancels.
787
+ */
788
+ then(resolve, reject) {
789
+ return this.finished.then(resolve, reject);
790
+ }
791
+ get duration() {
792
+ return millisecondsToSeconds(this.calculatedDuration);
793
+ }
794
+ get iterationDuration() {
795
+ const { delay = 0 } = this.options || {};
796
+ return this.duration + millisecondsToSeconds(delay);
797
+ }
798
+ get time() {
799
+ return millisecondsToSeconds(this.currentTime);
800
+ }
801
+ set time(newTime) {
802
+ newTime = secondsToMilliseconds(newTime);
803
+ this.currentTime = newTime;
804
+ if (this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0) this.holdTime = newTime;
805
+ else if (this.driver) this.startTime = this.driver.now() - newTime / this.playbackSpeed;
806
+ if (this.driver) this.driver.start(false);
807
+ else {
808
+ this.startTime = 0;
809
+ this.state = "paused";
810
+ this.holdTime = newTime;
811
+ this.tick(newTime);
812
+ }
813
+ }
814
+ /**
815
+ * Returns the generator's velocity at the current time in units/second.
816
+ * Uses the analytical derivative when available (springs), avoiding
817
+ * the MotionValue's frame-dependent velocity estimation.
818
+ */
819
+ getGeneratorVelocity() {
820
+ const t = this.currentTime;
821
+ if (t <= 0) return this.options.velocity || 0;
822
+ if (this.generator.velocity) return this.generator.velocity(t);
823
+ const current = this.generator.next(t).value;
824
+ return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);
825
+ }
826
+ get speed() {
827
+ return this.playbackSpeed;
828
+ }
829
+ set speed(newSpeed) {
830
+ const hasChanged = this.playbackSpeed !== newSpeed;
831
+ if (hasChanged && this.driver) this.updateTime(time.now());
832
+ this.playbackSpeed = newSpeed;
833
+ if (hasChanged && this.driver) this.time = millisecondsToSeconds(this.currentTime);
834
+ }
835
+ play() {
836
+ if (this.isStopped) return;
837
+ const { driver = frameloopDriver, startTime } = this.options;
838
+ if (!this.driver) this.driver = driver((timestamp) => this.tick(timestamp));
839
+ this.options.onPlay?.();
840
+ const now = this.driver.now();
841
+ if (this.state === "finished") {
842
+ this.updateFinished();
843
+ this.startTime = now;
844
+ } else if (this.holdTime !== null) this.startTime = now - this.holdTime;
845
+ else if (!this.startTime) this.startTime = startTime ?? now;
846
+ if (this.state === "finished" && this.speed < 0) this.startTime += this.calculatedDuration;
847
+ this.holdTime = null;
848
+ this.state = "running";
849
+ this.driver.start();
850
+ }
851
+ pause() {
852
+ this.state = "paused";
853
+ this.updateTime(time.now());
854
+ this.holdTime = this.currentTime;
855
+ }
856
+ complete() {
857
+ if (this.state !== "running") this.play();
858
+ this.state = "finished";
859
+ this.holdTime = null;
860
+ }
861
+ finish() {
862
+ this.notifyFinished();
863
+ this.teardown();
864
+ this.state = "finished";
865
+ this.options.onComplete?.();
866
+ }
867
+ cancel() {
868
+ this.holdTime = null;
869
+ this.startTime = 0;
870
+ this.tick(0);
871
+ this.teardown();
872
+ this.options.onCancel?.();
873
+ }
874
+ teardown() {
875
+ this.state = "idle";
876
+ this.stopDriver();
877
+ this.startTime = this.holdTime = null;
878
+ }
879
+ stopDriver() {
880
+ if (!this.driver) return;
881
+ this.driver.stop();
882
+ this.driver = void 0;
883
+ }
884
+ sample(sampleTime) {
885
+ this.startTime = 0;
886
+ return this.tick(sampleTime, true);
887
+ }
888
+ attachTimeline(timeline) {
889
+ if (this.options.allowFlatten) {
890
+ this.options.type = "keyframes";
891
+ this.options.ease = "linear";
892
+ this.initAnimation();
893
+ }
894
+ this.driver?.stop();
895
+ return timeline.observe(this);
896
+ }
897
+ };
898
+ var unsupportedEasingFunctions = {
899
+ anticipate,
900
+ backInOut,
901
+ circInOut
902
+ };
903
+ function isUnsupportedEase(key) {
904
+ return key in unsupportedEasingFunctions;
905
+ }
906
+ function replaceStringEasing(transition) {
907
+ if (typeof transition.ease === "string" && isUnsupportedEase(transition.ease)) transition.ease = unsupportedEasingFunctions[transition.ease];
908
+ }
909
+ var sampleDelta = 10;
910
+ var NativeAnimationExtended = class extends NativeAnimation {
911
+ constructor(options) {
912
+ replaceStringEasing(options);
913
+ replaceTransitionType(options);
914
+ super(options);
915
+ if (options.startTime !== void 0 && options.autoplay !== false) this.startTime = options.startTime;
916
+ this.options = options;
917
+ }
918
+ /**
919
+ * WAAPI doesn't natively have any interruption capabilities.
920
+ *
921
+ * Rather than read committed styles back out of the DOM, we can
922
+ * create a renderless JS animation and sample it twice to calculate
923
+ * its current value, "previous" value, and therefore allow
924
+ * Motion to calculate velocity for any subsequent animation.
925
+ */
926
+ updateMotionValue(value) {
927
+ const { motionValue: motionValue2, onUpdate, onComplete, element, ...options } = this.options;
928
+ if (!motionValue2) return;
929
+ if (value !== void 0) {
930
+ motionValue2.set(value);
931
+ return;
932
+ }
933
+ const sampleAnimation = new JSAnimation({
934
+ ...options,
935
+ autoplay: false
936
+ });
937
+ const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
938
+ const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);
939
+ const current = sampleAnimation.sample(sampleTime).value;
940
+ const { name } = this.options;
941
+ if (element && name) setStyle(element, name, current);
942
+ motionValue2.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);
943
+ sampleAnimation.stop();
944
+ }
945
+ };
946
+ var isAnimatable = (value, name) => {
947
+ if (name === "zIndex") return false;
948
+ if (typeof value === "number" || Array.isArray(value)) return true;
949
+ if (typeof value === "string" && (complex.test(value) || value === "0") && !value.startsWith("url(")) return true;
950
+ return false;
951
+ };
952
+ function hasKeyframesChanged(keyframes2) {
953
+ const current = keyframes2[0];
954
+ if (keyframes2.length === 1) return true;
955
+ for (let i = 0; i < keyframes2.length; i++) if (keyframes2[i] !== current) return true;
956
+ }
957
+ function canAnimate(keyframes2, name, type, velocity) {
958
+ const originKeyframe = keyframes2[0];
959
+ if (originKeyframe === null) return false;
960
+ if (name === "display" || name === "visibility") return true;
961
+ const targetKeyframe = keyframes2[keyframes2.length - 1];
962
+ const isOriginAnimatable = isAnimatable(originKeyframe, name);
963
+ const isTargetAnimatable = isAnimatable(targetKeyframe, name);
964
+ warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable");
965
+ if (!isOriginAnimatable || !isTargetAnimatable) return false;
966
+ return hasKeyframesChanged(keyframes2) || (type === "spring" || isGenerator(type)) && velocity;
967
+ }
968
+ function makeAnimationInstant(options) {
969
+ options.duration = 0;
970
+ options.type = "keyframes";
971
+ }
972
+ var browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
973
+ function hasBrowserOnlyColors(keyframes2) {
974
+ for (let i = 0; i < keyframes2.length; i++) if (typeof keyframes2[i] === "string" && browserColorFunctions.test(keyframes2[i])) return true;
975
+ return false;
976
+ }
977
+ var colorProperties = /* @__PURE__ */ new Set([
978
+ "color",
979
+ "backgroundColor",
980
+ "outlineColor",
981
+ "fill",
982
+ "stroke",
983
+ "borderColor",
984
+ "borderTopColor",
985
+ "borderRightColor",
986
+ "borderBottomColor",
987
+ "borderLeftColor"
988
+ ]);
989
+ var supportsWaapi = /* @__PURE__ */ memo$1(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
990
+ function supportsBrowserAnimation(options) {
991
+ const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type, keyframes: keyframes2 } = options;
992
+ const subject = motionValue2?.owner?.current;
993
+ if (!(subject instanceof HTMLElement) && !(subject instanceof SVGElement)) return false;
994
+ const { onUpdate, transformTemplate } = motionValue2.owner.getProps();
995
+ return supportsWaapi() && name && (acceleratedValues.has(name) || colorProperties.has(name) && hasBrowserOnlyColors(keyframes2)) && (name !== "transform" || !transformTemplate) && !onUpdate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
996
+ }
997
+ var MAX_RESOLVE_DELAY = 40;
998
+ var AsyncMotionValueAnimation = class extends WithPromise {
999
+ constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes: keyframes2, name, motionValue: motionValue2, element, ...options }) {
1000
+ super();
1001
+ this.stop = () => {
1002
+ if (this._animation) {
1003
+ this._animation.stop();
1004
+ this.stopTimeline?.();
1005
+ }
1006
+ this.keyframeResolver?.cancel();
1007
+ };
1008
+ this.createdAt = time.now();
1009
+ const optionsWithDefaults = {
1010
+ autoplay,
1011
+ delay,
1012
+ type,
1013
+ repeat,
1014
+ repeatDelay,
1015
+ repeatType,
1016
+ name,
1017
+ motionValue: motionValue2,
1018
+ element,
1019
+ ...options
1020
+ };
1021
+ const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;
1022
+ this.keyframeResolver = new KeyframeResolver$1(keyframes2, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue2, element);
1023
+ this.keyframeResolver?.scheduleResolve();
1024
+ }
1025
+ onKeyframesResolved(keyframes2, finalKeyframe, options, sync) {
1026
+ this.keyframeResolver = void 0;
1027
+ const { name, type, velocity, delay, isHandoff, onUpdate } = options;
1028
+ this.resolvedAt = time.now();
1029
+ let canAnimateValue = true;
1030
+ if (!canAnimate(keyframes2, name, type, velocity)) {
1031
+ canAnimateValue = false;
1032
+ if (MotionGlobalConfig.instantAnimations || !delay) onUpdate?.(getFinalKeyframe(keyframes2, options, finalKeyframe));
1033
+ keyframes2[0] = keyframes2[keyframes2.length - 1];
1034
+ makeAnimationInstant(options);
1035
+ options.repeat = 0;
1036
+ }
1037
+ const resolvedOptions = {
1038
+ startTime: sync ? !this.resolvedAt ? this.createdAt : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt : void 0,
1039
+ finalKeyframe,
1040
+ ...options,
1041
+ keyframes: keyframes2
1042
+ };
1043
+ const useWaapi = canAnimateValue && !isHandoff && supportsBrowserAnimation(resolvedOptions);
1044
+ const element = resolvedOptions.motionValue?.owner?.current;
1045
+ let animation;
1046
+ if (useWaapi) try {
1047
+ animation = new NativeAnimationExtended({
1048
+ ...resolvedOptions,
1049
+ element
1050
+ });
1051
+ } catch {
1052
+ animation = new JSAnimation(resolvedOptions);
1053
+ }
1054
+ else animation = new JSAnimation(resolvedOptions);
1055
+ animation.finished.then(() => {
1056
+ this.notifyFinished();
1057
+ }).catch(noop);
1058
+ if (this.pendingTimeline) {
1059
+ this.stopTimeline = animation.attachTimeline(this.pendingTimeline);
1060
+ this.pendingTimeline = void 0;
1061
+ }
1062
+ this._animation = animation;
1063
+ }
1064
+ get finished() {
1065
+ if (!this._animation) return this._finished;
1066
+ else return this.animation.finished;
1067
+ }
1068
+ then(onResolve, _onReject) {
1069
+ return this.finished.finally(onResolve).then(() => {
1070
+ });
1071
+ }
1072
+ get animation() {
1073
+ if (!this._animation) {
1074
+ this.keyframeResolver?.resume();
1075
+ flushKeyframeResolvers();
1076
+ }
1077
+ return this._animation;
1078
+ }
1079
+ get duration() {
1080
+ return this.animation.duration;
1081
+ }
1082
+ get iterationDuration() {
1083
+ return this.animation.iterationDuration;
1084
+ }
1085
+ get time() {
1086
+ return this.animation.time;
1087
+ }
1088
+ set time(newTime) {
1089
+ this.animation.time = newTime;
1090
+ }
1091
+ get speed() {
1092
+ return this.animation.speed;
1093
+ }
1094
+ get state() {
1095
+ return this.animation.state;
1096
+ }
1097
+ set speed(newSpeed) {
1098
+ this.animation.speed = newSpeed;
1099
+ }
1100
+ get startTime() {
1101
+ return this.animation.startTime;
1102
+ }
1103
+ attachTimeline(timeline) {
1104
+ if (this._animation) this.stopTimeline = this.animation.attachTimeline(timeline);
1105
+ else this.pendingTimeline = timeline;
1106
+ return () => this.stop();
1107
+ }
1108
+ play() {
1109
+ this.animation.play();
1110
+ }
1111
+ pause() {
1112
+ this.animation.pause();
1113
+ }
1114
+ complete() {
1115
+ this.animation.complete();
1116
+ }
1117
+ cancel() {
1118
+ if (this._animation) this.animation.cancel();
1119
+ this.keyframeResolver?.cancel();
1120
+ }
1121
+ };
1122
+ function resolveTransition(transition, parentTransition) {
1123
+ if (transition?.inherit && parentTransition) {
1124
+ const { inherit: _, ...rest } = transition;
1125
+ return {
1126
+ ...parentTransition,
1127
+ ...rest
1128
+ };
1129
+ }
1130
+ return transition;
1131
+ }
1132
+ function getValueTransition(transition, key) {
1133
+ const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
1134
+ if (valueTransition !== transition) return resolveTransition(valueTransition, transition);
1135
+ return valueTransition;
1136
+ }
1137
+ var underDampedSpring = {
1138
+ type: "spring",
1139
+ stiffness: 500,
1140
+ damping: 25,
1141
+ restSpeed: 10
1142
+ };
1143
+ var criticallyDampedSpring = (target) => ({
1144
+ type: "spring",
1145
+ stiffness: 550,
1146
+ damping: target === 0 ? 2 * Math.sqrt(550) : 30,
1147
+ restSpeed: 10
1148
+ });
1149
+ var keyframesTransition = {
1150
+ type: "keyframes",
1151
+ duration: 0.8
1152
+ };
1153
+ var ease = {
1154
+ type: "keyframes",
1155
+ ease: [
1156
+ 0.25,
1157
+ 0.1,
1158
+ 0.35,
1159
+ 1
1160
+ ],
1161
+ duration: 0.3
1162
+ };
1163
+ var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
1164
+ if (keyframes2.length > 2) return keyframesTransition;
1165
+ else if (transformProps.has(valueKey)) return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
1166
+ return ease;
1167
+ };
1168
+ var orchestrationKeys = /* @__PURE__ */ new Set([
1169
+ "when",
1170
+ "delay",
1171
+ "delayChildren",
1172
+ "staggerChildren",
1173
+ "staggerDirection",
1174
+ "repeat",
1175
+ "repeatType",
1176
+ "repeatDelay",
1177
+ "from",
1178
+ "elapsed"
1179
+ ]);
1180
+ function isTransitionDefined(transition) {
1181
+ for (const key in transition) if (!orchestrationKeys.has(key)) return true;
1182
+ return false;
1183
+ }
1184
+ var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
1185
+ const valueTransition = getValueTransition(transition, name) || {};
1186
+ const delay = valueTransition.delay || transition.delay || 0;
1187
+ let { elapsed = 0 } = transition;
1188
+ elapsed = elapsed - secondsToMilliseconds(delay);
1189
+ const options = {
1190
+ keyframes: Array.isArray(target) ? target : [null, target],
1191
+ ease: "easeOut",
1192
+ velocity: value.getVelocity(),
1193
+ ...valueTransition,
1194
+ delay: -elapsed,
1195
+ onUpdate: (v) => {
1196
+ value.set(v);
1197
+ valueTransition.onUpdate && valueTransition.onUpdate(v);
40
1198
  },
41
- children
1199
+ onComplete: () => {
1200
+ onComplete();
1201
+ valueTransition.onComplete && valueTransition.onComplete();
1202
+ },
1203
+ name,
1204
+ motionValue: value,
1205
+ element: isHandoff ? void 0 : element
1206
+ };
1207
+ if (!isTransitionDefined(valueTransition)) Object.assign(options, getDefaultTransition(name, options));
1208
+ options.duration && (options.duration = secondsToMilliseconds(options.duration));
1209
+ options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
1210
+ if (options.from !== void 0) options.keyframes[0] = options.from;
1211
+ let shouldSkip = false;
1212
+ if (options.type === false || options.duration === 0 && !options.repeatDelay) {
1213
+ makeAnimationInstant(options);
1214
+ if (options.delay === 0) shouldSkip = true;
1215
+ }
1216
+ if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations || valueTransition.skipAnimations) {
1217
+ shouldSkip = true;
1218
+ makeAnimationInstant(options);
1219
+ options.delay = 0;
1220
+ }
1221
+ options.allowFlatten = !valueTransition.type && !valueTransition.ease;
1222
+ if (shouldSkip && !isHandoff && value.get() !== void 0) {
1223
+ const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
1224
+ if (finalKeyframe !== void 0) {
1225
+ frame.update(() => {
1226
+ options.onUpdate(finalKeyframe);
1227
+ options.onComplete();
1228
+ });
1229
+ return;
1230
+ }
1231
+ }
1232
+ return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
1233
+ };
1234
+ var splitCSSVariableRegex = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
1235
+ function parseCSSVariable(current) {
1236
+ const match = splitCSSVariableRegex.exec(current);
1237
+ if (!match) return [,];
1238
+ const [, token1, token2, fallback] = match;
1239
+ return [`--${token1 ?? token2}`, fallback];
1240
+ }
1241
+ var maxDepth = 4;
1242
+ function getVariableValue(current, element, depth = 1) {
1243
+ invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1244
+ const [token, fallback] = parseCSSVariable(current);
1245
+ if (!token) return;
1246
+ const resolved = window.getComputedStyle(element).getPropertyValue(token);
1247
+ if (resolved) {
1248
+ const trimmed = resolved.trim();
1249
+ return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
1250
+ }
1251
+ return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
1252
+ }
1253
+ function resolveVariant(visualElement, definition, custom) {
1254
+ const props = visualElement.getProps();
1255
+ return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
1256
+ }
1257
+ var positionalKeys = /* @__PURE__ */ new Set([
1258
+ "width",
1259
+ "height",
1260
+ "top",
1261
+ "left",
1262
+ "right",
1263
+ "bottom",
1264
+ ...transformPropOrder
1265
+ ]);
1266
+ var isKeyframesTarget = (v) => {
1267
+ return Array.isArray(v);
1268
+ };
1269
+ function setMotionValue(visualElement, key, value) {
1270
+ if (visualElement.hasValue(key)) visualElement.getValue(key).set(value);
1271
+ else visualElement.addValue(key, motionValue(value));
1272
+ }
1273
+ function resolveFinalValueInKeyframes(v) {
1274
+ return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
1275
+ }
1276
+ function setTarget(visualElement, definition) {
1277
+ let { transitionEnd = {}, transition = {}, ...target } = resolveVariant(visualElement, definition) || {};
1278
+ target = {
1279
+ ...target,
1280
+ ...transitionEnd
1281
+ };
1282
+ for (const key in target) setMotionValue(visualElement, key, resolveFinalValueInKeyframes(target[key]));
1283
+ }
1284
+ function isWillChangeMotionValue(value) {
1285
+ return Boolean(isMotionValue(value) && value.add);
1286
+ }
1287
+ function addValueToWillChange(visualElement, key) {
1288
+ const willChange = visualElement.getValue("willChange");
1289
+ if (isWillChangeMotionValue(willChange)) return willChange.add(key);
1290
+ else if (!willChange && MotionGlobalConfig.WillChange) {
1291
+ const newWillChange = new MotionGlobalConfig.WillChange("auto");
1292
+ visualElement.addValue("willChange", newWillChange);
1293
+ newWillChange.add(key);
1294
+ }
1295
+ }
1296
+ function getOptimisedAppearId(visualElement) {
1297
+ return visualElement.props[optimizedAppearDataAttribute];
1298
+ }
1299
+ var isBrowser = typeof window !== "undefined";
1300
+ function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
1301
+ const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
1302
+ needsAnimating[key] = false;
1303
+ return shouldBlock;
1304
+ }
1305
+ function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {
1306
+ let { transition, transitionEnd, ...target } = targetAndTransition;
1307
+ const defaultTransition = visualElement.getDefaultTransition();
1308
+ transition = transition ? resolveTransition(transition, defaultTransition) : defaultTransition;
1309
+ const reduceMotion = transition?.reduceMotion;
1310
+ const skipAnimations = transition?.skipAnimations;
1311
+ if (transitionOverride) transition = transitionOverride;
1312
+ const animations = [];
1313
+ const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
1314
+ const path = transition?.path;
1315
+ if (path) path.animateVisualElement(visualElement, target, transition, delay, animations);
1316
+ for (const key in target) {
1317
+ const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);
1318
+ const valueTarget = target[key];
1319
+ if (valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key)) continue;
1320
+ const valueTransition = {
1321
+ delay,
1322
+ ...getValueTransition(transition || {}, key)
1323
+ };
1324
+ if (skipAnimations) valueTransition.skipAnimations = true;
1325
+ const currentValue = value.get();
1326
+ if (currentValue !== void 0 && !value.isAnimating() && !Array.isArray(valueTarget) && valueTarget === currentValue && !valueTransition.velocity) {
1327
+ frame.update(() => value.set(valueTarget));
1328
+ continue;
1329
+ }
1330
+ let isHandoff = false;
1331
+ if (isBrowser && window.MotionHandoffAnimation) {
1332
+ const appearId = getOptimisedAppearId(visualElement);
1333
+ if (appearId) {
1334
+ const startTime = window.MotionHandoffAnimation(appearId, key, frame);
1335
+ if (startTime !== null) {
1336
+ valueTransition.startTime = startTime;
1337
+ isHandoff = true;
1338
+ }
1339
+ }
1340
+ }
1341
+ addValueToWillChange(visualElement, key);
1342
+ const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;
1343
+ value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) ? { type: false } : valueTransition, visualElement, isHandoff));
1344
+ const animation = value.animation;
1345
+ if (animation) animations.push(animation);
1346
+ }
1347
+ if (transitionEnd) {
1348
+ const applyTransitionEnd = () => frame.update(() => {
1349
+ transitionEnd && setTarget(visualElement, transitionEnd);
1350
+ });
1351
+ if (animations.length) Promise.all(animations).then(applyTransitionEnd);
1352
+ else applyTransitionEnd();
1353
+ }
1354
+ return animations;
1355
+ }
1356
+ function isNone(value) {
1357
+ if (typeof value === "number") return value === 0;
1358
+ else if (value !== null) return value === "none" || value === "0" || isZeroValueString(value);
1359
+ else return true;
1360
+ }
1361
+ var invalidTemplates = /* @__PURE__ */ new Set([
1362
+ "auto",
1363
+ "none",
1364
+ "0"
1365
+ ]);
1366
+ function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {
1367
+ let i = 0;
1368
+ let animatableTemplate = void 0;
1369
+ while (i < unresolvedKeyframes.length && !animatableTemplate) {
1370
+ const keyframe = unresolvedKeyframes[i];
1371
+ if (typeof keyframe === "string" && !invalidTemplates.has(keyframe) && analyseComplexValue(keyframe).values.length) animatableTemplate = unresolvedKeyframes[i];
1372
+ i++;
1373
+ }
1374
+ if (animatableTemplate && name) for (const noneIndex of noneKeyframeIndexes) unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);
1375
+ }
1376
+ var DOMKeyframesResolver = class extends KeyframeResolver {
1377
+ constructor(unresolvedKeyframes, onComplete, name, motionValue2, element) {
1378
+ super(unresolvedKeyframes, onComplete, name, motionValue2, element, true);
1379
+ }
1380
+ readKeyframes() {
1381
+ const { unresolvedKeyframes, element, name } = this;
1382
+ if (!element || !element.current) return;
1383
+ super.readKeyframes();
1384
+ for (let i = 0; i < unresolvedKeyframes.length; i++) {
1385
+ let keyframe = unresolvedKeyframes[i];
1386
+ if (typeof keyframe === "string") {
1387
+ keyframe = keyframe.trim();
1388
+ if (isCSSVariableToken(keyframe)) {
1389
+ const resolved = getVariableValue(keyframe, element.current);
1390
+ if (resolved !== void 0) unresolvedKeyframes[i] = resolved;
1391
+ if (i === unresolvedKeyframes.length - 1) this.finalKeyframe = keyframe;
1392
+ }
1393
+ }
1394
+ }
1395
+ this.resolveNoneKeyframes();
1396
+ if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) return;
1397
+ const [origin, target] = unresolvedKeyframes;
1398
+ const originType = findDimensionValueType(origin);
1399
+ const targetType = findDimensionValueType(target);
1400
+ if (containsCSSVariable(origin) !== containsCSSVariable(target) && positionalValues[name]) {
1401
+ this.needsMeasurement = true;
1402
+ return;
1403
+ }
1404
+ if (originType === targetType) return;
1405
+ if (isNumOrPxType(originType) && isNumOrPxType(targetType)) for (let i = 0; i < unresolvedKeyframes.length; i++) {
1406
+ const value = unresolvedKeyframes[i];
1407
+ if (typeof value === "string") unresolvedKeyframes[i] = parseFloat(value);
1408
+ }
1409
+ else if (positionalValues[name])
1410
+ this.needsMeasurement = true;
1411
+ }
1412
+ resolveNoneKeyframes() {
1413
+ const { unresolvedKeyframes, name } = this;
1414
+ const noneKeyframeIndexes = [];
1415
+ for (let i = 0; i < unresolvedKeyframes.length; i++) if (unresolvedKeyframes[i] === null || isNone(unresolvedKeyframes[i])) noneKeyframeIndexes.push(i);
1416
+ if (noneKeyframeIndexes.length) makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);
1417
+ }
1418
+ measureInitialState() {
1419
+ const { element, unresolvedKeyframes, name } = this;
1420
+ if (!element || !element.current) return;
1421
+ if (name === "height") this.suspendedScrollY = window.pageYOffset;
1422
+ this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
1423
+ unresolvedKeyframes[0] = this.measuredOrigin;
1424
+ const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];
1425
+ if (measureKeyframe !== void 0) element.getValue(name, measureKeyframe).jump(measureKeyframe, false);
1426
+ }
1427
+ measureEndState() {
1428
+ const { element, name, unresolvedKeyframes } = this;
1429
+ if (!element || !element.current) return;
1430
+ const value = element.getValue(name);
1431
+ value && value.jump(this.measuredOrigin, false);
1432
+ const finalKeyframeIndex = unresolvedKeyframes.length - 1;
1433
+ const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];
1434
+ unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
1435
+ if (finalKeyframe !== null && this.finalKeyframe === void 0) this.finalKeyframe = finalKeyframe;
1436
+ if (this.removedTransforms?.length) this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {
1437
+ element.getValue(unsetTransformName).set(unsetTransformValue);
1438
+ });
1439
+ this.resolveNoneKeyframes();
1440
+ }
1441
+ };
1442
+ function resolveElements(elementOrSelector, scope, selectorCache) {
1443
+ if (elementOrSelector == null) return [];
1444
+ if (elementOrSelector instanceof EventTarget) return [elementOrSelector];
1445
+ else if (typeof elementOrSelector === "string") {
1446
+ let root = document;
1447
+ if (scope) root = scope.current;
1448
+ const elements = selectorCache?.[elementOrSelector] ?? root.querySelectorAll(elementOrSelector);
1449
+ return elements ? Array.from(elements) : [];
1450
+ }
1451
+ return Array.from(elementOrSelector).filter((element) => element != null);
1452
+ }
1453
+ function isSVGElement(element) {
1454
+ return isObject(element) && "ownerSVGElement" in element;
1455
+ }
1456
+ function isSVGSVGElement(element) {
1457
+ return isSVGElement(element) && element.tagName === "svg";
1458
+ }
1459
+ var DOMVisualElement = class extends VisualElement {
1460
+ constructor() {
1461
+ super(...arguments);
1462
+ this.KeyframeResolver = DOMKeyframesResolver;
1463
+ }
1464
+ sortInstanceNodePosition(a, b) {
1465
+ return a.compareDocumentPosition(b) & 2 ? 1 : -1;
1466
+ }
1467
+ getBaseTargetFromProps(props, key) {
1468
+ const style = props.style;
1469
+ return style ? style[key] : void 0;
1470
+ }
1471
+ removeValueFromRenderState(key, { vars, style }) {
1472
+ delete vars[key];
1473
+ delete style[key];
1474
+ }
1475
+ handleChildMotionValue() {
1476
+ if (this.childSubscription) {
1477
+ this.childSubscription();
1478
+ delete this.childSubscription;
1479
+ }
1480
+ const { children } = this.props;
1481
+ if (isMotionValue(children)) this.childSubscription = children.on("change", (latest) => {
1482
+ if (this.current) this.current.textContent = `${latest}`;
1483
+ });
1484
+ }
1485
+ };
1486
+ function convertBoundingBoxToBox({ top, left, right, bottom }) {
1487
+ return {
1488
+ x: {
1489
+ min: left,
1490
+ max: right
1491
+ },
1492
+ y: {
1493
+ min: top,
1494
+ max: bottom
1495
+ }
1496
+ };
1497
+ }
1498
+ function convertBoxToBoundingBox({ x, y }) {
1499
+ return {
1500
+ top: y.min,
1501
+ right: x.max,
1502
+ bottom: y.max,
1503
+ left: x.min
1504
+ };
1505
+ }
1506
+ function transformBoxPoints(point, transformPoint) {
1507
+ if (!transformPoint) return point;
1508
+ const topLeft = transformPoint({
1509
+ x: point.left,
1510
+ y: point.top
1511
+ });
1512
+ const bottomRight = transformPoint({
1513
+ x: point.right,
1514
+ y: point.bottom
42
1515
  });
1516
+ return {
1517
+ top: topLeft.y,
1518
+ left: topLeft.x,
1519
+ bottom: bottomRight.y,
1520
+ right: bottomRight.x
1521
+ };
1522
+ }
1523
+ function isIdentityScale(scale) {
1524
+ return scale === void 0 || scale === 1;
1525
+ }
1526
+ function hasScale({ scale, scaleX, scaleY }) {
1527
+ return !isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);
1528
+ }
1529
+ function hasTransform(values) {
1530
+ return hasScale(values) || has2DTranslate(values) || values.z || values.rotate || values.rotateX || values.rotateY || values.skewX || values.skewY;
1531
+ }
1532
+ function has2DTranslate(values) {
1533
+ return is2DTranslate(values.x) || is2DTranslate(values.y);
1534
+ }
1535
+ function is2DTranslate(value) {
1536
+ return value && value !== "0%";
43
1537
  }
44
- function isLazyBundle(features) {
45
- return typeof features === "function";
1538
+ function scalePoint(point, scale, originPoint) {
1539
+ return originPoint + scale * (point - originPoint);
46
1540
  }
47
- var domAnimation = {
48
- renderer: createDomVisualElement,
49
- ...animations,
50
- ...gestureAnimations
1541
+ function applyPointDelta(point, translate, scale, originPoint, boxScale) {
1542
+ if (boxScale !== void 0) point = scalePoint(point, boxScale, originPoint);
1543
+ return scalePoint(point, scale, originPoint) + translate;
1544
+ }
1545
+ function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {
1546
+ axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
1547
+ axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
1548
+ }
1549
+ function applyBoxDelta(box, { x, y }) {
1550
+ applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
1551
+ applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
1552
+ }
1553
+ var TREE_SCALE_SNAP_MIN = 0.999999999999;
1554
+ var TREE_SCALE_SNAP_MAX = 1.0000000000001;
1555
+ function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
1556
+ const treeLength = treePath.length;
1557
+ if (!treeLength) return;
1558
+ treeScale.x = treeScale.y = 1;
1559
+ let node;
1560
+ let delta;
1561
+ for (let i = 0; i < treeLength; i++) {
1562
+ node = treePath[i];
1563
+ delta = node.projectionDelta;
1564
+ const { visualElement } = node.options;
1565
+ if (visualElement && visualElement.props.style && visualElement.props.style.display === "contents") continue;
1566
+ if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) {
1567
+ translateAxis(box.x, -node.scroll.offset.x);
1568
+ translateAxis(box.y, -node.scroll.offset.y);
1569
+ }
1570
+ if (delta) {
1571
+ treeScale.x *= delta.x.scale;
1572
+ treeScale.y *= delta.y.scale;
1573
+ applyBoxDelta(box, delta);
1574
+ }
1575
+ if (isSharedTransition && hasTransform(node.latestValues)) transformBox(box, node.latestValues, node.layout?.layoutBox);
1576
+ }
1577
+ if (treeScale.x < TREE_SCALE_SNAP_MAX && treeScale.x > TREE_SCALE_SNAP_MIN) treeScale.x = 1;
1578
+ if (treeScale.y < TREE_SCALE_SNAP_MAX && treeScale.y > TREE_SCALE_SNAP_MIN) treeScale.y = 1;
1579
+ }
1580
+ function translateAxis(axis, distance) {
1581
+ axis.min += distance;
1582
+ axis.max += distance;
1583
+ }
1584
+ function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
1585
+ applyAxisDelta(axis, axisTranslate, axisScale, mixNumber(axis.min, axis.max, axisOrigin), boxScale);
1586
+ }
1587
+ function resolveAxisTranslate(value, axis) {
1588
+ if (typeof value === "string") return parseFloat(value) / 100 * (axis.max - axis.min);
1589
+ return value;
1590
+ }
1591
+ function transformBox(box, transform, sourceBox) {
1592
+ const resolveBox = sourceBox ?? box;
1593
+ transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX);
1594
+ transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY);
1595
+ }
1596
+ function measureViewportBox(instance, transformPoint) {
1597
+ return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
1598
+ }
1599
+ function measurePageBox(element, rootProjectionNode, transformPagePoint) {
1600
+ const viewportBox = measureViewportBox(element, transformPagePoint);
1601
+ const { scroll } = rootProjectionNode;
1602
+ if (scroll) {
1603
+ translateAxis(viewportBox.x, scroll.offset.x);
1604
+ translateAxis(viewportBox.y, scroll.offset.y);
1605
+ }
1606
+ return viewportBox;
1607
+ }
1608
+ function renderHTML(element, { style, vars }, styleProp, projection) {
1609
+ const elementStyle = element.style;
1610
+ let key;
1611
+ for (key in style) elementStyle[key] = style[key];
1612
+ projection?.applyProjectionStyles(elementStyle, styleProp);
1613
+ for (key in vars) elementStyle.setProperty(key, vars[key]);
1614
+ }
1615
+ function getComputedStyle$1(element) {
1616
+ return window.getComputedStyle(element);
1617
+ }
1618
+ var HTMLVisualElement = class extends DOMVisualElement {
1619
+ constructor() {
1620
+ super(...arguments);
1621
+ this.type = "html";
1622
+ this.renderInstance = renderHTML;
1623
+ }
1624
+ mount(instance) {
1625
+ invariant(Boolean(instance.style), "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref");
1626
+ super.mount(instance);
1627
+ }
1628
+ readValueFromInstance(instance, key) {
1629
+ if (transformProps.has(key)) return this.projection?.isProjecting ? defaultTransformValue(key) : readTransformValue(instance, key);
1630
+ else {
1631
+ const computedStyle = getComputedStyle$1(instance);
1632
+ const value = (isCSSVariableName(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
1633
+ return typeof value === "string" ? value.trim() : value;
1634
+ }
1635
+ }
1636
+ measureInstanceViewportBox(instance, { transformPagePoint }) {
1637
+ return measureViewportBox(instance, transformPagePoint);
1638
+ }
1639
+ build(renderState, latestValues, props) {
1640
+ buildHTMLStyles(renderState, latestValues, props.transformTemplate);
1641
+ }
1642
+ scrapeMotionValuesFromProps(props, prevProps, visualElement) {
1643
+ return scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
1644
+ }
1645
+ };
1646
+ var camelCaseAttributes = /* @__PURE__ */ new Set([
1647
+ "baseFrequency",
1648
+ "diffuseConstant",
1649
+ "kernelMatrix",
1650
+ "kernelUnitLength",
1651
+ "keySplines",
1652
+ "keyTimes",
1653
+ "limitingConeAngle",
1654
+ "markerHeight",
1655
+ "markerWidth",
1656
+ "numOctaves",
1657
+ "targetX",
1658
+ "targetY",
1659
+ "surfaceScale",
1660
+ "specularConstant",
1661
+ "specularExponent",
1662
+ "stdDeviation",
1663
+ "tableValues",
1664
+ "viewBox",
1665
+ "gradientTransform",
1666
+ "pathLength",
1667
+ "startOffset",
1668
+ "textLength",
1669
+ "lengthAdjust"
1670
+ ]);
1671
+ function renderSVG(element, renderState, _styleProp, projection) {
1672
+ renderHTML(element, renderState, void 0, projection);
1673
+ for (const key in renderState.attrs) element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
1674
+ }
1675
+ var SVGVisualElement = class extends DOMVisualElement {
1676
+ constructor() {
1677
+ super(...arguments);
1678
+ this.type = "svg";
1679
+ this.isSVGTag = false;
1680
+ this.measureInstanceViewportBox = createBox;
1681
+ }
1682
+ getBaseTargetFromProps(props, key) {
1683
+ return props[key];
1684
+ }
1685
+ readValueFromInstance(instance, key) {
1686
+ if (transformProps.has(key)) {
1687
+ const defaultType = getDefaultValueType(key);
1688
+ return defaultType ? defaultType.default || 0 : 0;
1689
+ }
1690
+ if (cssStyleProperties.includes(key)) {
1691
+ const value = getComputedStyle(instance)[key];
1692
+ if (typeof value === "string" && value) return value.trim();
1693
+ }
1694
+ key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;
1695
+ return instance.getAttribute(key);
1696
+ }
1697
+ scrapeMotionValuesFromProps(props, prevProps, visualElement) {
1698
+ return scrapeMotionValuesFromProps(props, prevProps, visualElement);
1699
+ }
1700
+ build(renderState, latestValues, props) {
1701
+ buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);
1702
+ }
1703
+ renderInstance(instance, renderState, styleProp, projection) {
1704
+ renderSVG(instance, renderState, styleProp, projection);
1705
+ }
1706
+ mount(instance) {
1707
+ this.isSVGTag = isSVGTag(instance.tagName);
1708
+ super.mount(instance);
1709
+ }
51
1710
  };
1711
+ function animateSingleValue(value, keyframes2, options) {
1712
+ const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
1713
+ motionValue$1.start(animateMotionValue("", motionValue$1, keyframes2, options));
1714
+ return motionValue$1.animation;
1715
+ }
1716
+ function MotionConfig({ children, ...config }) {
1717
+ const parentConfig = useContext(MotionConfigContext);
1718
+ config = {
1719
+ ...parentConfig,
1720
+ ...config
1721
+ };
1722
+ config.transition = resolveTransition(config.transition, parentConfig.transition);
1723
+ config.isStatic = useConstant(() => config.isStatic);
1724
+ const context = useMemo(() => config, [
1725
+ JSON.stringify(config.transition),
1726
+ config.transformPagePoint,
1727
+ config.reducedMotion,
1728
+ config.skipAnimations,
1729
+ config.isValidProp
1730
+ ]);
1731
+ return jsx(MotionConfigContext.Provider, {
1732
+ value: context,
1733
+ children
1734
+ });
1735
+ }
52
1736
  function observeWebVitals(onVital) {
53
1737
  if (typeof window === "undefined" || typeof PerformanceObserver === "undefined") return () => {
54
1738
  };
@@ -279,7 +1963,7 @@ var WorkspaceBrowseEntrySchema = external_exports.object({
279
1963
  name: external_exports.string(),
280
1964
  path: external_exports.string()
281
1965
  }).openapi({ description: "Directory entry in the project-folder picker" });
282
- var WorkspaceBrowseResponseSchema = external_exports.object({
1966
+ external_exports.object({
283
1967
  path: external_exports.string(),
284
1968
  parent: external_exports.string().nullable(),
285
1969
  entries: external_exports.array(WorkspaceBrowseEntrySchema)
@@ -592,7 +2276,7 @@ function systemSetTimeoutZero(callback) {
592
2276
 
593
2277
  // node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/utils.js
594
2278
  var isServer = typeof window === "undefined" || "Deno" in globalThis;
595
- function noop() {
2279
+ function noop2() {
596
2280
  }
597
2281
  function functionalUpdate(updater, input) {
598
2282
  return typeof updater === "function" ? updater(input) : updater;
@@ -991,7 +2675,7 @@ function createRetryer(config) {
991
2675
  promiseResolve = resolve2;
992
2676
  promiseReject = reject2;
993
2677
  });
994
- promise.catch(noop);
2678
+ promise.catch(noop2);
995
2679
  const isResolved = () => status !== "pending";
996
2680
  const cancel = (cancelOptions) => {
997
2681
  if (!isResolved()) {
@@ -1427,7 +3111,7 @@ var MutationCache = class extends Subscribable {
1427
3111
  }
1428
3112
  resumePausedMutations() {
1429
3113
  const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
1430
- return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop))));
3114
+ return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop2))));
1431
3115
  }
1432
3116
  };
1433
3117
  function scopeFor(mutation) {
@@ -1583,7 +3267,7 @@ var Query = class extends Removable {
1583
3267
  cancel(options) {
1584
3268
  const promise = this.#retryer?.promise;
1585
3269
  this.#retryer?.cancel(options);
1586
- return promise ? promise.then(noop).catch(noop) : Promise.resolve();
3270
+ return promise ? promise.then(noop2).catch(noop2) : Promise.resolve();
1587
3271
  }
1588
3272
  destroy() {
1589
3273
  super.destroy();
@@ -2116,7 +3800,7 @@ var QueryClient = class {
2116
3800
  ...cancelOptions
2117
3801
  };
2118
3802
  const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));
2119
- return Promise.all(promises).then(noop).catch(noop);
3803
+ return Promise.all(promises).then(noop2).catch(noop2);
2120
3804
  }
2121
3805
  invalidateQueries(filters, options = {}) {
2122
3806
  return notifyManager.batch(() => {
@@ -2137,10 +3821,10 @@ var QueryClient = class {
2137
3821
  };
2138
3822
  const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
2139
3823
  let promise = query.fetch(void 0, fetchOptions);
2140
- if (!fetchOptions.throwOnError) promise = promise.catch(noop);
3824
+ if (!fetchOptions.throwOnError) promise = promise.catch(noop2);
2141
3825
  return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
2142
3826
  }));
2143
- return Promise.all(promises).then(noop);
3827
+ return Promise.all(promises).then(noop2);
2144
3828
  }
2145
3829
  async query(options) {
2146
3830
  const defaultedOptions = this.defaultQueryOptions(options);
@@ -2164,7 +3848,7 @@ var QueryClient = class {
2164
3848
  * @deprecated Use queryClient.query(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
2165
3849
  */
2166
3850
  prefetchQuery(options) {
2167
- return this.fetchQuery(options).then(noop).catch(noop);
3851
+ return this.fetchQuery(options).then(noop2).catch(noop2);
2168
3852
  }
2169
3853
  infiniteQuery(options) {
2170
3854
  options._type = "infinite";
@@ -2181,7 +3865,7 @@ var QueryClient = class {
2181
3865
  * @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
2182
3866
  */
2183
3867
  prefetchInfiniteQuery(options) {
2184
- return this.fetchInfiniteQuery(options).then(noop).catch(noop);
3868
+ return this.fetchInfiniteQuery(options).then(noop2).catch(noop2);
2185
3869
  }
2186
3870
  /**
2187
3871
  * @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.
@@ -2397,7 +4081,7 @@ var QueryObserver = class extends Subscribable {
2397
4081
  #executeFetch(fetchOptions) {
2398
4082
  this.#updateQuery();
2399
4083
  let promise = this.#currentQuery.fetch(this.options, fetchOptions);
2400
- if (!fetchOptions?.throwOnError) promise = promise.catch(noop);
4084
+ if (!fetchOptions?.throwOnError) promise = promise.catch(noop2);
2401
4085
  return promise;
2402
4086
  }
2403
4087
  #shouldScheduleTimer(timeout) {
@@ -2751,9 +4435,9 @@ var getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }
2751
4435
  var ensureSuspenseTimers = (defaultedOptions) => {
2752
4436
  if (defaultedOptions.suspense) {
2753
4437
  const MIN_SUSPENSE_TIME_MS = 1e3;
2754
- const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
4438
+ const clamp2 = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
2755
4439
  const originalStaleTime = defaultedOptions.staleTime;
2756
- defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
4440
+ defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp2(originalStaleTime(...args)) : clamp2(originalStaleTime);
2757
4441
  if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
2758
4442
  }
2759
4443
  };
@@ -2785,7 +4469,7 @@ function useBaseQuery(options, Observer, queryClient) {
2785
4469
  const result = observer.getOptimisticResult(defaultedOptions);
2786
4470
  const shouldSubscribe = !isRestoring && subscribed;
2787
4471
  React5.useSyncExternalStore(React5.useCallback((onStoreChange) => {
2788
- const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
4472
+ const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop2;
2789
4473
  observer.updateResult();
2790
4474
  return unsubscribe;
2791
4475
  }, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
@@ -2818,7 +4502,7 @@ function useMutation(options, queryClient) {
2818
4502
  }, [observer, options]);
2819
4503
  const result = React6.useSyncExternalStore(React6.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
2820
4504
  const mutate = React6.useCallback((...args) => {
2821
- observer.mutate(args[0], args[1]).catch(noop);
4505
+ observer.mutate(args[0], args[1]).catch(noop2);
2822
4506
  }, [observer]);
2823
4507
  if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
2824
4508
  return {
@@ -2829,8 +4513,40 @@ function useMutation(options, queryClient) {
2829
4513
  }
2830
4514
 
2831
4515
  export {
2832
- LazyMotion,
2833
- domAnimation,
4516
+ pipe,
4517
+ progress,
4518
+ reverseEasing,
4519
+ circOut,
4520
+ isEasingArray,
4521
+ createGeneratorEasing,
4522
+ spring,
4523
+ fillOffset,
4524
+ defaultOffset,
4525
+ getValueTransition,
4526
+ animateMotionValue,
4527
+ resolveVariant,
4528
+ isKeyframesTarget,
4529
+ addValueToWillChange,
4530
+ getOptimisedAppearId,
4531
+ animateTarget,
4532
+ resolveElements,
4533
+ isSVGElement,
4534
+ isSVGSVGElement,
4535
+ convertBoundingBoxToBox,
4536
+ convertBoxToBoundingBox,
4537
+ hasScale,
4538
+ hasTransform,
4539
+ has2DTranslate,
4540
+ scalePoint,
4541
+ applyBoxDelta,
4542
+ applyTreeDeltas,
4543
+ translateAxis,
4544
+ transformBox,
4545
+ measurePageBox,
4546
+ HTMLVisualElement,
4547
+ SVGVisualElement,
4548
+ animateSingleValue,
4549
+ MotionConfig,
2834
4550
  initAnalytics,
2835
4551
  NETWORK_DISCONNECTED_MESSAGE,
2836
4552
  FLEET_ADAPTER_CAPABILITIES,
@@ -2840,7 +4556,6 @@ export {
2840
4556
  ChatResourcesResponseSchema,
2841
4557
  WorkspaceTreeResponseSchema,
2842
4558
  WorkspaceFileResponseSchema,
2843
- WorkspaceBrowseResponseSchema,
2844
4559
  ChatProvidersResponseSchema,
2845
4560
  ChatProviderUpdateRequestSchema,
2846
4561
  ChatProviderUpdateResponseSchema,