@vireo-ai/trellis-ui 0.1.21 → 0.1.23

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 (189) hide show
  1. package/package.json +37 -11
  2. package/packages/client/types/assets/bridge.d.ts +27 -0
  3. package/packages/client/types/assets/full-runtime.generated.d.ts +2 -0
  4. package/packages/client/types/capabilities/calendar.d.ts +3 -0
  5. package/packages/client/types/capabilities/motion.d.ts +5 -0
  6. package/packages/client/types/capabilities/resizable.d.ts +5 -0
  7. package/packages/client/types/capabilities/sortable.d.ts +6 -0
  8. package/packages/client/types/components/accordion/entry.generated.d.ts +5 -0
  9. package/packages/client/types/components/app/contract.d.ts +8 -8
  10. package/packages/client/types/components/badge/contract.d.ts +2 -2
  11. package/packages/client/types/components/box/contract.d.ts +9 -9
  12. package/packages/client/types/components/button/contract.d.ts +3 -3
  13. package/packages/client/types/components/button/entry.generated.d.ts +4 -0
  14. package/packages/client/types/components/card/contract.d.ts +3 -3
  15. package/packages/client/types/components/checkbox/entry.generated.d.ts +5 -0
  16. package/packages/client/types/components/container/contract.d.ts +5 -5
  17. package/packages/client/types/components/date-picker/contract.d.ts +6 -6
  18. package/packages/client/types/components/date-picker/entry.generated.d.ts +5 -0
  19. package/packages/client/types/components/date-picker/index.d.ts +0 -1
  20. package/packages/client/types/components/date-picker/machine.d.ts +40 -40
  21. package/packages/client/types/components/dropdown/contract.d.ts +2 -2
  22. package/packages/client/types/components/dropdown/entry.generated.d.ts +5 -0
  23. package/packages/client/types/components/dropdown/machine.d.ts +8 -8
  24. package/packages/client/types/components/entry.generated.d.ts +28 -0
  25. package/packages/client/types/components/field/entry.generated.d.ts +5 -0
  26. package/packages/client/types/components/file-upload/contract.d.ts +1 -1
  27. package/packages/client/types/components/file-upload/entry.generated.d.ts +5 -0
  28. package/packages/client/types/components/file-upload/machine.d.ts +2 -2
  29. package/packages/client/types/components/flex/contract.d.ts +7 -7
  30. package/packages/client/types/components/frame/contract.d.ts +6 -6
  31. package/packages/client/types/components/grid/contract.d.ts +11 -11
  32. package/packages/client/types/components/image/contract.d.ts +2 -2
  33. package/packages/client/types/components/input/entry.generated.d.ts +5 -0
  34. package/packages/client/types/components/layout.d.ts +6 -6
  35. package/packages/client/types/components/menu/contract.d.ts +3 -3
  36. package/packages/client/types/components/modal/contract.d.ts +3 -3
  37. package/packages/client/types/components/modal/entry.generated.d.ts +5 -0
  38. package/packages/client/types/components/modal/machine.d.ts +12 -12
  39. package/packages/client/types/components/panels/contract.d.ts +1 -1
  40. package/packages/client/types/components/panels/entry.generated.d.ts +5 -0
  41. package/packages/client/types/components/radio/entry.generated.d.ts +5 -0
  42. package/packages/client/types/components/scroll-area/entry.generated.d.ts +5 -0
  43. package/packages/client/types/components/section/contract.d.ts +4 -4
  44. package/packages/client/types/components/select/contract.d.ts +4 -4
  45. package/packages/client/types/components/select/entry.generated.d.ts +5 -0
  46. package/packages/client/types/components/select/machine.d.ts +32 -32
  47. package/packages/client/types/components/sidebar/contract.d.ts +5 -5
  48. package/packages/client/types/components/sidebar/entry.generated.d.ts +5 -0
  49. package/packages/client/types/components/sidebar/index.d.ts +1 -1
  50. package/packages/client/types/components/slider/entry.generated.d.ts +5 -0
  51. package/packages/client/types/components/stack/contract.d.ts +7 -7
  52. package/packages/client/types/components/switch/entry.generated.d.ts +5 -0
  53. package/packages/client/types/components/table/contract.d.ts +9 -9
  54. package/packages/client/types/components/table/entry.generated.d.ts +5 -0
  55. package/packages/client/types/components/tabs/contract.d.ts +1 -1
  56. package/packages/client/types/components/tabs/entry.generated.d.ts +5 -0
  57. package/packages/client/types/components/tabs/machine.d.ts +2 -2
  58. package/packages/client/types/components/toast/contract.d.ts +2 -2
  59. package/packages/client/types/components/toast/entry.generated.d.ts +5 -0
  60. package/packages/client/types/components/toast/machine.d.ts +8 -8
  61. package/packages/client/types/core.d.ts +10 -0
  62. package/packages/client/types/directives/sortable.d.ts +1 -1
  63. package/packages/client/types/index.d.ts +3 -11
  64. package/packages/client/types/motion/animate.d.ts +1 -1
  65. package/packages/client/types/motion/controller.d.ts +1 -1
  66. package/packages/client/types/motion/index.d.ts +1 -1
  67. package/packages/client/types/motion/owned.d.ts +1 -1
  68. package/packages/client/types/motion/plan.d.ts +1 -1
  69. package/packages/client/types/motion/recipe.d.ts +1 -1
  70. package/packages/client/types/motion/reduced-motion.d.ts +1 -1
  71. package/packages/client/types/motion/targets.d.ts +1 -6
  72. package/packages/client/types/motion/view.d.ts +1 -1
  73. package/packages/client/types/runtime/engine/stream.d.ts +9 -3
  74. package/packages/client/types/runtime/layout-participant.d.ts +9 -0
  75. package/packages/client/types/runtime/ui.d.ts +10 -4
  76. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge.js +1 -0
  77. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/build-metadata.json +1268 -0
  78. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/anchored-popover-BXEMsLrA.js +2 -0
  79. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/anchored-popover-BXEMsLrA.js.map +1 -0
  80. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/bridge-B4S_D6hV.js +2 -0
  81. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/bridge-B4S_D6hV.js.map +1 -0
  82. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cally-Z6G-rzr-.js +2 -0
  83. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cally-Z6G-rzr-.js.map +1 -0
  84. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/codecs-Cb1ns_47.js +2 -0
  85. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/codecs-Cb1ns_47.js.map +1 -0
  86. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-CtNDGKcQ.js +2 -0
  87. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-CtNDGKcQ.js.map +1 -0
  88. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-DAxHCzB-.js +2 -0
  89. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-DAxHCzB-.js.map +1 -0
  90. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controlled-open-Hy4-OT-6.js +2 -0
  91. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controlled-open-Hy4-OT-6.js.map +1 -0
  92. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/core-DjoX4J-6.js +2 -0
  93. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/core-DjoX4J-6.js.map +1 -0
  94. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-BROE-Ln2.js +2 -0
  95. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-BROE-Ln2.js.map +1 -0
  96. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dom-qAeVl7dc.js +2 -0
  97. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dom-qAeVl7dc.js.map +1 -0
  98. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/element-adapter-native-data-key-CW8suC9A.js +6 -0
  99. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/element-adapter-native-data-key-CW8suC9A.js.map +1 -0
  100. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-5kNpQFGr.js +2 -0
  101. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-5kNpQFGr.js.map +1 -0
  102. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B85L90Qp.js +2 -0
  103. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B85L90Qp.js.map +1 -0
  104. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BGCM6LAW.js +2 -0
  105. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BGCM6LAW.js.map +1 -0
  106. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Bc-uE56r.js +2 -0
  107. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Bc-uE56r.js.map +1 -0
  108. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C-lyYGbo.js +2 -0
  109. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C-lyYGbo.js.map +1 -0
  110. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C6ldtrmy.js +2 -0
  111. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C6ldtrmy.js.map +1 -0
  112. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CPWoMIwn.js +2 -0
  113. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CPWoMIwn.js.map +1 -0
  114. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Co0bLLZE.js +2 -0
  115. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Co0bLLZE.js.map +1 -0
  116. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CtyXH8zf.js +2 -0
  117. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CtyXH8zf.js.map +1 -0
  118. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DGrOItIx.js +2 -0
  119. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DGrOItIx.js.map +1 -0
  120. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DHMRhcYF.js +2 -0
  121. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DHMRhcYF.js.map +1 -0
  122. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-De12QrT5.js +3 -0
  123. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-De12QrT5.js.map +1 -0
  124. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DgmqZx_W.js +2 -0
  125. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DgmqZx_W.js.map +1 -0
  126. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Dn6MRCe0.js +2 -0
  127. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Dn6MRCe0.js.map +1 -0
  128. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DoOgk6l4.js +2 -0
  129. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DoOgk6l4.js.map +1 -0
  130. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DxUOcPkU.js +2 -0
  131. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DxUOcPkU.js.map +1 -0
  132. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DyIjCOhT.js +2 -0
  133. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DyIjCOhT.js.map +1 -0
  134. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-K6qKowpw.js +2 -0
  135. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-K6qKowpw.js.map +1 -0
  136. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-oAIExc1V.js +2 -0
  137. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-oAIExc1V.js.map +1 -0
  138. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xcXw-cEl.js +2 -0
  139. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xcXw-cEl.js.map +1 -0
  140. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-DtaPVNl5.js +2 -0
  141. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-DtaPVNl5.js.map +1 -0
  142. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/form-control-BkVb2Qed.js +2 -0
  143. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/form-control-BkVb2Qed.js.map +1 -0
  144. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-CX3wFSoV.js +2 -0
  145. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-CX3wFSoV.js.map +1 -0
  146. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/merge-bindings-C8ewA_FD.js +2 -0
  147. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/merge-bindings-C8ewA_FD.js.map +1 -0
  148. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-Bpttk6iZ.js +3 -0
  149. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-Bpttk6iZ.js.map +1 -0
  150. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/number-BCZdoG0B.js +2 -0
  151. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/number-BCZdoG0B.js.map +1 -0
  152. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/props-change-2xfsIAEN.js +2 -0
  153. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/props-change-2xfsIAEN.js.map +1 -0
  154. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resizable-BixtYF9M.js +2 -0
  155. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resizable-BixtYF9M.js.map +1 -0
  156. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/scroll-lock-DOw7dmi1.js +2 -0
  157. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/scroll-lock-DOw7dmi1.js.map +1 -0
  158. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/semantic-observer-9VxzbQBi.js +2 -0
  159. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/semantic-observer-9VxzbQBi.js.map +1 -0
  160. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/styles-TfvwVPGw.js +2 -0
  161. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/styles-TfvwVPGw.js.map +1 -0
  162. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-xTjuF3uC.js +4 -0
  163. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-xTjuF3uC.js.map +1 -0
  164. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion.js +1 -0
  165. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button.js +1 -0
  166. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox.js +1 -0
  167. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker.js +1 -0
  168. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown.js +1 -0
  169. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field.js +1 -0
  170. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload.js +1 -0
  171. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index.js +1 -0
  172. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input.js +1 -0
  173. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal.js +1 -0
  174. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels.js +1 -0
  175. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio.js +1 -0
  176. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area.js +1 -0
  177. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select.js +1 -0
  178. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar.js +1 -0
  179. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider.js +1 -0
  180. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch.js +1 -0
  181. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table.js +1 -0
  182. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs.js +1 -0
  183. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast.js +1 -0
  184. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core.js +1 -0
  185. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +1 -22146
  186. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js.map +1 -1
  187. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/logical-entry-manifest.json +395 -0
  188. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +9 -9
  189. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +9 -9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion-Bpttk6iZ.js","names":["getAnimatableNone","mixNumber","mixNumber","mixNumber","mixNumber","getValueTransition","getValueTransition","getValueTransition","getComputedStyle","getValueTransition","animateView","prefersReducedMotion","prefersReducedMotion","mixNumber","scrapeMotionValuesFromProps","getComputedStyle","scrapeMotionValuesFromProps","mixNumber","getValueTransition","getComputedStyle","#subject","#stages","#defaults","#append","#modifyLast"],"sources":["../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/format-error-message.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/errors.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-numerical-string.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-object.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-zero-value-string.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/memo.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/subscription-manager.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/time-conversion.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/velocity-per-second.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/warn-once.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/back.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/anticipate.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/ease.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/map.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/frameloop/order.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/frameloop/render-step.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/frameloop/batcher.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/frameloop/frame.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/color/utils.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/color/hex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/color/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/complex/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/mix/number.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/mix/color.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/mix/complex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/mix/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/generators/spring.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/interpolate.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/dom/style-set.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/supports/flags.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/supports/memo.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/setters.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/will-change/is.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/auto.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/test.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/dimensions.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/int.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/maps/number.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/waapi/utils/px-values.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/frameloop/microtask.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/dom/style-computed.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/value/types/utils/find.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/utils/assign-names.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/utils/css.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/utils/has-target.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/start.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/queue.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/view/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/projection/geometry/models.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/store.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/VisualElement.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/projection/utils/measure.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/html/utils/render.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@12.42.0/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/sequence/create.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/animate/subject.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/animate/index.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@12.42.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs","../../../../../../../../client/src/motion/animate.ts","../../../../../../../../client/src/motion/reduced-motion.ts","../../../../../../../../client/src/motion/controller.ts","../../../../../../../../client/src/motion/registry.ts","../../../../../../../../client/src/motion/owned.ts","../../../../../../../../client/src/motion/recipe.ts","../../../../../../../../client/src/motion/subject.ts","../../../../../../../../client/src/motion/resize.ts","../../../../../../../../client/src/motion/plan.ts","../../../../../../../../client/src/motion/targets.ts","../../../../../../../../client/src/motion/view.ts","../../../../../../../../client/src/motion/index.ts","../../../../../../../../client/src/motion/stream.ts","../../../../../../../../client/src/capabilities/motion.ts"],"sourcesContent":["function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n//# sourceMappingURL=array.mjs.map\n","const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n//# sourceMappingURL=format-error-message.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n//# sourceMappingURL=errors.mjs.map\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n//# sourceMappingURL=global-config.mjs.map\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\nexport { isNumericalString };\n//# sourceMappingURL=is-numerical-string.mjs.map\n","const isObject = (value) => typeof value === \"object\" && value !== null;\n\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\nexport { isZeroValueString };\n//# sourceMappingURL=is-zero-value-string.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n//# sourceMappingURL=memo.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));\n\nexport { pipe };\n//# sourceMappingURL=pipe.mjs.map\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const range = to - from;\n return range ? (value - from) / range : 1;\n};\n\nexport { progress };\n//# sourceMappingURL=progress.mjs.map\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n//# sourceMappingURL=subscription-manager.mjs.map\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n//# sourceMappingURL=time-conversion.mjs.map\n","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0;\n\nexport { velocityPerSecond };\n//# sourceMappingURL=velocity-per-second.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nconst warned = new Set();\nfunction hasWarned(message) {\n return warned.has(message);\n}\nfunction warnOnce(condition, message, errorCode) {\n if (condition || warned.has(message))\n return;\n console.warn(formatErrorMessage(message, errorCode));\n warned.add(message);\n}\n\nexport { hasWarned, warnOnce };\n//# sourceMappingURL=warn-once.mjs.map\n","const wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nexport { wrap };\n//# sourceMappingURL=wrap.mjs.map\n","import { noop } from '../noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticeably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n//# sourceMappingURL=mirror.mjs.map\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n//# sourceMappingURL=reverse.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ reverseEasing(backOut);\nconst backInOut = /*@__PURE__*/ mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n//# sourceMappingURL=back.mjs.map\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => p >= 1\n ? 1\n : (p *= 2) < 1\n ? 0.5 * backIn(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n//# sourceMappingURL=anticipate.mjs.map\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n//# sourceMappingURL=circ.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);\nconst easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n//# sourceMappingURL=ease.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n//# sourceMappingURL=is-easing-array.mjs.map\n","import { wrap } from '../../wrap.mjs';\nimport { isEasingArray } from './is-easing-array.mjs';\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction getEasingForSegment(easing, i) {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;\n}\n\nexport { getEasingForSegment };\n//# sourceMappingURL=get-easing-for-segment.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n//# sourceMappingURL=is-bezier-definition.mjs.map\n","import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backOut, backInOut, backIn } from '../back.mjs';\nimport { circOut, circInOut, circIn } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeOut, easeInOut, easeIn } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst isValidEasing = (easing) => {\n return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, \"cubic-bezier-length\");\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, \"invalid-easing-type\");\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n//# sourceMappingURL=map.mjs.map\n","const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n//# sourceMappingURL=order.mjs.map\n","function createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n//# sourceMappingURL=render-step.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n//# sourceMappingURL=batcher.mjs.map\n","import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n//# sourceMappingURL=frame.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n//# sourceMappingURL=sync-time.mjs.map\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nfunction containsCSSVariable(value) {\n if (typeof value !== \"string\")\n return false;\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\");\n}\n\nexport { containsCSSVariable, isCSSVariableName, isCSSVariableToken };\n//# sourceMappingURL=is-css-variable.mjs.map\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n//# sourceMappingURL=index.mjs.map\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n//# sourceMappingURL=sanitize.mjs.map\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n//# sourceMappingURL=float-regex.mjs.map\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n//# sourceMappingURL=is-nullish.mjs.map\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n//# sourceMappingURL=single-color-regex.mjs.map\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n//# sourceMappingURL=utils.mjs.map\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n//# sourceMappingURL=rgba.mjs.map\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n//# sourceMappingURL=units.mjs.map\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n//# sourceMappingURL=hsla.mjs.map\n","import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n//# sourceMappingURL=index.mjs.map\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n//# sourceMappingURL=color-regex.mjs.map\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n//# sourceMappingURL=index.mjs.map\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n//# sourceMappingURL=hsla-to-rgba.mjs.map\n","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n//# sourceMappingURL=immediate.mjs.map\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n//# sourceMappingURL=number.mjs.map\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n//# sourceMappingURL=color.mjs.map\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n//# sourceMappingURL=visibility.mjs.map\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n 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\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n//# sourceMappingURL=complex.mjs.map\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n//# sourceMappingURL=index.mjs.map\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n//# sourceMappingURL=frame.mjs.map\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n//# sourceMappingURL=linear.mjs.map\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n//# sourceMappingURL=calc-duration.mjs.map\n","import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n//# sourceMappingURL=create-generator-easing.mjs.map\n","import { millisecondsToSeconds, clamp, secondsToMilliseconds, warning } from 'motion-utils';\nimport { generateLinearEasing } from '../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.mjs';\nimport { createGeneratorEasing } from './utils/create-generator-easing.mjs';\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n};\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\", \"spring-duration-limit\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n // Time-defined springs should ignore inherited velocity.\n // Velocity from interrupted animations can cause findSpring()\n // to compute wildly different spring parameters, leading to\n // massive oscillation on small-range animations.\n springOptions.velocity = 0;\n if (options.visualDuration) {\n const visualDuration = options.visualDuration;\n const root = (2 * Math.PI) / (visualDuration * 1.2);\n const stiffness = root * root;\n const damping = 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness);\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n };\n }\n else {\n const derived = findSpring({ ...options, velocity: 0 });\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n };\n springOptions.isResolvedFromDuration = true;\n }\n }\n return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n const options = typeof optionsOrVisualDuration !== \"object\"\n ? {\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n }\n : optionsOrVisualDuration;\n let { restSpeed, restDelta } = options;\n const origin = options.keyframes[0];\n const target = options.keyframes[options.keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n restDelta || (restDelta = isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n let resolveSpring;\n let resolveVelocity;\n // Underdamped coefficients, hoisted for use in the inlined next() hot path\n let angularFreq;\n let A;\n let sinCoeff;\n let cosCoeff;\n if (dampingRatio < 1) {\n angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n A =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq;\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (A * Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n // Analytical derivative of underdamped spring (px/ms)\n sinCoeff =\n dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;\n cosCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return envelope *\n (sinCoeff * Math.sin(angularFreq * t) +\n cosCoeff * Math.cos(angularFreq * t));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n // Analytical derivative of critically damped spring (px/ms)\n const C = initialVelocity + undampedAngularFreq * initialDelta;\n resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * C * t - initialVelocity);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n // Analytical derivative of overdamped spring (px/ms)\n const P = (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n dampedAngularFreq;\n const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;\n const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return envelope *\n (sinhCoeff * Math.sinh(freqForT) +\n coshCoeff * Math.cosh(freqForT));\n };\n }\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t) => {\n /**\n * For underdamped physics springs we need both position and\n * velocity each tick. Compute shared trig values once to avoid\n * duplicate Math.exp/sin/cos calls on the hot path.\n */\n if (!isResolvedFromDuration && dampingRatio < 1) {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const sin = Math.sin(angularFreq * t);\n const cos = Math.cos(angularFreq * t);\n const current = target -\n envelope *\n (A * sin + initialDelta * cos);\n const currentVelocity = secondsToMilliseconds(envelope *\n (sinCoeff * sin + cosCoeff * cos));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n state.value = state.done ? target : current;\n return state;\n }\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(resolveVelocity(t));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n toString: () => {\n const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);\n return calculatedDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nspring.applyToOptions = (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, spring);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n};\n\nexport { spring };\n//# sourceMappingURL=spring.mjs.map\n","import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction getGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { getGeneratorVelocity };\n//# sourceMappingURL=velocity.mjs.map\n","import { spring } from './spring.mjs';\nimport { getGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n//# sourceMappingURL=inertia.mjs.map\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n//# sourceMappingURL=interpolate.mjs.map\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n//# sourceMappingURL=fill.mjs.map\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n//# sourceMappingURL=default.mjs.map\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n//# sourceMappingURL=time.mjs.map\n","import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n//# sourceMappingURL=keyframes.mjs.map\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n//# sourceMappingURL=get-final.mjs.map\n","import { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { spring } from '../generators/spring.mjs';\n\nconst transitionTypeMap = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\nfunction replaceTransitionType(transition) {\n if (typeof transition.type === \"string\") {\n transition.type = transitionTypeMap[transition.type];\n }\n}\n\nexport { replaceTransitionType };\n//# sourceMappingURL=replace-transition-type.mjs.map\n","class WithPromise {\n constructor() {\n this.updateFinished();\n }\n get finished() {\n return this._finished;\n }\n updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve;\n });\n }\n notifyFinished() {\n this.resolve();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n//# sourceMappingURL=WithPromise.mjs.map\n","import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getGeneratorVelocity } from './generators/utils/velocity.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n this.delayState = {\n done: false,\n value: undefined,\n };\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, \"spring-two-frames\");\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state;\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0];\n state = this.delayState;\n }\n else {\n state = frameGenerator.next(elapsed);\n }\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n if (this.driver) {\n this.driver.start(false);\n }\n else {\n this.startTime = 0;\n this.state = \"paused\";\n this.holdTime = newTime;\n this.tick(newTime);\n }\n }\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity() {\n const t = this.currentTime;\n if (t <= 0)\n return this.options.velocity || 0;\n if (this.generator.velocity) {\n return this.generator.velocity(t);\n }\n // Fallback: finite difference\n const current = this.generator.next(t).value;\n return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n if (hasChanged && this.driver) {\n this.updateTime(time.now());\n }\n this.playbackSpeed = newSpeed;\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n//# sourceMappingURL=JSAnimation.mjs.map\n","function fillWildcards(keyframes) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n }\n}\n\nexport { fillWildcards };\n//# sourceMappingURL=fill-wildcards.mjs.map\n","const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]));\n return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n//# sourceMappingURL=parse-transform.mjs.map\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nconst transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, \"pathRotation\"]))();\n\nexport { transformPropOrder, transformProps };\n//# sourceMappingURL=keys-transform.mjs.map\n","import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\", boxSizing }) => {\n const width = x.max - x.min;\n return boxSizing === \"border-box\"\n ? width\n : width - parseFloat(paddingLeft) - parseFloat(paddingRight);\n },\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\", boxSizing }) => {\n const height = y.max - y.min;\n return boxSizing === \"border-box\"\n ? height\n : height - parseFloat(paddingTop) - parseFloat(paddingBottom);\n },\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { isNumOrPxType, positionalValues, removeNonTranslationalTransform };\n//# sourceMappingURL=unit-conversion.mjs.map\n","import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n//# sourceMappingURL=KeyframesResolver.mjs.map\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n//# sourceMappingURL=is-css-var.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n isCSSVar(name)\n ? element.style.setProperty(name, value)\n : (element.style[name] = value);\n}\n\nexport { setStyle };\n//# sourceMappingURL=style-set.mjs.map\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n//# sourceMappingURL=flags.mjs.map\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n//# sourceMappingURL=memo.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, \"scrollTimeline\");\nconst supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, \"viewTimeline\");\n\nexport { supportsScrollTimeline, supportsViewTimeline };\n//# sourceMappingURL=scroll-timeline.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n//# sourceMappingURL=linear-easing.mjs.map\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n//# sourceMappingURL=supported.mjs.map\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\";\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { mapEasingToNativeEasing };\n//# sourceMappingURL=map-easing.mjs.map\n","import { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n const keyframeOptions = {\n [valueName]: keyframes,\n };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n const options = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n };\n if (pseudoElement)\n options.pseudoElement = pseudoElement;\n return element.animate(keyframeOptions, options);\n}\n\nexport { startWaapiAnimation };\n//# sourceMappingURL=start-waapi-animation.mjs.map\n","function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n//# sourceMappingURL=is-generator.mjs.map\n","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions(options);\n }\n else {\n options.duration ?? (options.duration = 300);\n options.ease ?? (options.ease = \"easeOut\");\n }\n return options;\n}\n\nexport { applyGeneratorOptions };\n//# sourceMappingURL=apply-generator.mjs.map\n","import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n if (rangeStart)\n this.animation.rangeStart = rangeStart;\n if (rangeEnd)\n this.animation.rangeEnd = rangeEnd;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n","import { circInOut, backInOut, anticipate } from 'motion-utils';\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n};\nfunction isUnsupportedEase(key) {\n return key in unsupportedEasingFunctions;\n}\nfunction replaceStringEasing(transition) {\n if (typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)) {\n transition.ease = unsupportedEasingFunctions[transition.ease];\n }\n}\n\nexport { replaceStringEasing };\n//# sourceMappingURL=unsupported-easing.mjs.map\n","import { clamp } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);\n const current = sampleAnimation.sample(sampleTime).value;\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options;\n if (element && name)\n setStyle(element, name, current);\n motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n//# sourceMappingURL=NativeAnimationExtended.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (value, name) => {\n // If the list of keys that might be non-animatable grows, replace with Set\n if (name === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n//# sourceMappingURL=is-animatable.mjs.map\n","import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null) {\n return false;\n }\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${isOriginAnimatable ? targetKeyframe : originKeyframe}\" is not an animatable value.`, \"value-not-animatable\");\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false;\n }\n return (hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n//# sourceMappingURL=can-animate.mjs.map\n","function makeAnimationInstant(options) {\n options.duration = 0;\n options.type = \"keyframes\";\n}\n\nexport { makeAnimationInstant };\n//# sourceMappingURL=make-animation-instant.mjs.map\n","/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n]);\n\nexport { acceleratedValues };\n//# sourceMappingURL=accelerated-values.mjs.map\n","const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\\(/;\nfunction hasBrowserOnlyColors(keyframes) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"string\" &&\n browserColorFunctions.test(keyframes[i])) {\n return true;\n }\n }\n return false;\n}\n\nexport { hasBrowserOnlyColors };\n//# sourceMappingURL=is-browser-color.mjs.map\n","import { memo } from 'motion-utils';\nimport { acceleratedValues } from '../utils/accelerated-values.mjs';\nimport { hasBrowserOnlyColors } from '../utils/is-browser-color.mjs';\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n]);\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\nfunction supportsBrowserAnimation(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options;\n const subject = motionValue?.owner?.current;\n /**\n * We use this check instead of isHTMLElement() because we explicitly\n * **don't** want elements in different timing contexts (i.e. popups)\n * to be accelerated, as it's not possible to sync these animations\n * properly with those driven from the main window frameloop.\n */\n if (!(subject instanceof HTMLElement)) {\n return false;\n }\n const { onUpdate, transformTemplate } = motionValue.owner.getProps();\n return (supportsWaapi() &&\n name &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n}\n\nexport { supportsBrowserAnimation };\n//# sourceMappingURL=waapi.mjs.map\n","import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { makeAnimationInstant } from './utils/make-animation-instant.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n this.keyframeResolver?.cancel();\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n let canAnimateValue = true;\n if (!canAnimate(keyframes, name, type, velocity)) {\n canAnimateValue = false;\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n makeAnimationInstant(options);\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first committed frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n *\n * Also skip WAAPI when keyframes aren't animatable, as the resolved\n * values may not be valid CSS and would trigger browser warnings.\n */\n const useWaapi = canAnimateValue &&\n !isHandoff &&\n supportsBrowserAnimation(resolvedOptions);\n const element = resolvedOptions.motionValue?.owner?.current;\n let animation;\n if (useWaapi) {\n try {\n animation = new NativeAnimationExtended({\n ...resolvedOptions,\n element,\n });\n }\n catch {\n animation = new JSAnimation(resolvedOptions);\n }\n }\n else {\n animation = new JSAnimation(resolvedOptions);\n }\n animation.finished.then(() => {\n this.notifyFinished();\n }).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n this.keyframeResolver?.resume();\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get iterationDuration() {\n return this.animation.iterationDuration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n if (this._animation) {\n this.animation.cancel();\n }\n this.keyframeResolver?.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n//# sourceMappingURL=AsyncMotionValueAnimation.mjs.map\n","class GroupAnimation {\n constructor(animations) {\n // Bound to accomadate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline) {\n const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline));\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time) {\n this.setAll(\"time\", time);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get state() {\n return this.getAll(\"state\");\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n return getMax(this.animations, \"duration\");\n }\n get iterationDuration() {\n return getMax(this.animations, \"iterationDuration\");\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n}\nfunction getMax(animations, propName) {\n let max = 0;\n for (let i = 0; i < animations.length; i++) {\n const value = animations[i][propName];\n if (value !== null && value > max) {\n max = value;\n }\n }\n return max;\n}\n\nexport { GroupAnimation };\n//# sourceMappingURL=GroupAnimation.mjs.map\n","import { GroupAnimation } from './GroupAnimation.mjs';\n\nclass GroupAnimationWithThen extends GroupAnimation {\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n}\n\nexport { GroupAnimationWithThen };\n//# sourceMappingURL=GroupAnimationWithThen.mjs.map\n","import { NativeAnimation } from './NativeAnimation.mjs';\n\nclass NativeAnimationWrapper extends NativeAnimation {\n constructor(animation) {\n super();\n this.animation = animation;\n animation.onfinish = () => {\n this.finishedTime = this.time;\n this.notifyFinished();\n };\n }\n}\n\nexport { NativeAnimationWrapper };\n//# sourceMappingURL=NativeAnimationWrapper.mjs.map\n","const animationMaps = new WeakMap();\nconst animationMapKey = (name, pseudoElement = \"\") => `${name}:${pseudoElement}`;\nfunction getAnimationMap(element) {\n let map = animationMaps.get(element);\n if (!map) {\n map = new Map();\n animationMaps.set(element, map);\n }\n return map;\n}\n\nexport { animationMapKey, getAnimationMap };\n//# sourceMappingURL=active-animations.mjs.map\n","import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current);\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.events.change?.notify(this.current);\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n//# sourceMappingURL=index.mjs.map\n","/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nfunction resolveTransition(transition, parentTransition) {\n if (transition?.inherit && parentTransition) {\n const { inherit: _, ...rest } = transition;\n return { ...parentTransition, ...rest };\n }\n return transition;\n}\n\nexport { resolveTransition };\n//# sourceMappingURL=resolve-transition.mjs.map\n","import { resolveTransition } from './resolve-transition.mjs';\n\nfunction getValueTransition(transition, key) {\n const valueTransition = transition?.[key] ??\n transition?.[\"default\"] ??\n transition;\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition);\n }\n return valueTransition;\n}\n\nexport { getValueTransition };\n//# sourceMappingURL=get-value-transition.mjs.map\n","import { transformProps } from '../../render/utils/keys-transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n//# sourceMappingURL=default-transitions.mjs.map\n","const orchestrationKeys = new Set([\n \"when\",\n \"delay\",\n \"delayChildren\",\n \"staggerChildren\",\n \"staggerDirection\",\n \"repeat\",\n \"repeatType\",\n \"repeatDelay\",\n \"from\",\n \"elapsed\",\n]);\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined(transition) {\n for (const key in transition) {\n if (!orchestrationKeys.has(key))\n return true;\n }\n return false;\n}\n\nexport { isTransitionDefined };\n//# sourceMappingURL=is-transition-defined.mjs.map\n","import { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { AsyncMotionValueAnimation } from '../AsyncMotionValueAnimation.mjs';\nimport { JSAnimation } from '../JSAnimation.mjs';\nimport { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { makeAnimationInstant } from '../utils/make-animation-instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getFinalKeyframe } from '../keyframes/get-final.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options));\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration && (options.duration = secondsToMilliseconds(options.duration));\n options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n makeAnimationInstant(options);\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations) {\n shouldSkip = true;\n makeAnimationInstant(options);\n options.delay = 0;\n }\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n//# sourceMappingURL=motion-value.mjs.map\n","import { invariant, isNumericalString } from 'motion-utils';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = \n// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token1, token2, fallback] = match;\n return [`--${token1 ?? token2}`, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`, \"max-css-var-depth\");\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback;\n}\n\nexport { getVariableValue, parseCSSVariable };\n//# sourceMappingURL=css-variables-conversion.mjs.map\n","function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement?.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n//# sourceMappingURL=resolve-variants.mjs.map\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement);\n}\n\nexport { resolveVariant };\n//# sourceMappingURL=resolve-dynamic-variants.mjs.map\n","import { transformPropOrder } from './keys-transform.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n]);\n\nexport { positionalKeys };\n//# sourceMappingURL=keys-position.mjs.map\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n//# sourceMappingURL=is-keyframes-target.mjs.map\n","import { motionValue } from '../../value/index.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction resolveFinalValueInKeyframes(v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n//# sourceMappingURL=setters.mjs.map\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n//# sourceMappingURL=is-motion-value.mjs.map\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n//# sourceMappingURL=is.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { isWillChangeMotionValue } from './is.mjs';\n\nfunction addValueToWillChange(visualElement, key) {\n const willChange = visualElement.getValue(\"willChange\");\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key);\n }\n else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\");\n visualElement.addValue(\"willChange\", newWillChange);\n newWillChange.add(key);\n }\n}\n\nexport { addValueToWillChange };\n//# sourceMappingURL=add-will-change.mjs.map\n","function camelToDash(str) {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport { camelToDash };\n//# sourceMappingURL=camel-to-dash.mjs.map\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n//# sourceMappingURL=data-id.mjs.map\n","import { optimizedAppearDataAttribute } from './data-id.mjs';\n\nfunction getOptimisedAppearId(visualElement) {\n return visualElement.props[optimizedAppearDataAttribute];\n}\n\nexport { getOptimisedAppearId };\n//# sourceMappingURL=get-appear-id.mjs.map\n","import { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { resolveTransition } from '../utils/resolve-transition.mjs';\nimport { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n let { transition, transitionEnd, ...target } = targetAndTransition;\n const defaultTransition = visualElement.getDefaultTransition();\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition;\n const reduceMotion = transition?.reduceMotion;\n const skipAnimations = transition?.skipAnimations;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n const path = transition?.path;\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateVisualElement(visualElement, target, transition, delay, animations);\n }\n for (const key in target) {\n const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n if (skipAnimations)\n valueTransition.skipAnimations = true;\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get();\n if (currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity) {\n frame.update(() => value.set(valueTarget));\n continue;\n }\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;\n value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n const applyTransitionEnd = () => frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd);\n }\n else {\n applyTransitionEnd();\n }\n }\n return animations;\n}\n\nexport { animateTarget };\n//# sourceMappingURL=visual-element-target.mjs.map\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n//# sourceMappingURL=auto.mjs.map\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n//# sourceMappingURL=test.mjs.map\n","import { auto } from './auto.mjs';\nimport { number } from './numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from './numbers/units.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n//# sourceMappingURL=dimensions.mjs.map\n","import { isZeroValueString } from 'motion-utils';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n else {\n return true;\n }\n}\n\nexport { isNone };\n//# sourceMappingURL=is-none.mjs.map\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n//# sourceMappingURL=filter.mjs.map\n","import { complex } from './index.mjs';\n\nconst mask = {\n ...complex,\n getAnimatableNone: (v) => {\n const parsed = complex.parse(v);\n const transformer = complex.createTransformer(v);\n return transformer(parsed.map((v) => typeof v === \"number\" ? 0 : typeof v === \"object\" ? { ...v, alpha: 1 } : v));\n },\n};\n\nexport { mask };\n//# sourceMappingURL=mask.mjs.map\n","import { number } from './numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n//# sourceMappingURL=int.mjs.map\n","import { alpha, scale } from '../numbers/index.mjs';\nimport { px, progressPercentage, degrees } from '../numbers/units.mjs';\n\nconst transformValueTypes = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n};\n\nexport { transformValueTypes };\n//# sourceMappingURL=transform.mjs.map\n","import { int } from '../int.mjs';\nimport { alpha } from '../numbers/index.mjs';\nimport { px } from '../numbers/units.mjs';\nimport { transformValueTypes } from './transform.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n // Typography\n fontSize: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n ...transformValueTypes,\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n//# sourceMappingURL=number.mjs.map\n","import { color } from '../color/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n mask,\n WebkitMask: mask,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n//# sourceMappingURL=defaults.mjs.map\n","import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask]);\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (!customTypes.has(defaultValueType))\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n//# sourceMappingURL=animatable-none.mjs.map\n","import { analyseComplexValue } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = undefined;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n analyseComplexValue(keyframe).values.length) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n//# sourceMappingURL=make-none-animatable.mjs.map\n","import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken, containsCSSVariable } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n","const pxValues = new Set([\n // Border props\n \"borderWidth\",\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\",\n \"borderRadius\",\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomLeftRadius\",\n // Positioning props\n \"width\",\n \"maxWidth\",\n \"height\",\n \"maxHeight\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n \"inset\",\n \"insetBlock\",\n \"insetBlockStart\",\n \"insetBlockEnd\",\n \"insetInline\",\n \"insetInlineStart\",\n \"insetInlineEnd\",\n // Spacing props\n \"padding\",\n \"paddingTop\",\n \"paddingRight\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingBlock\",\n \"paddingBlockStart\",\n \"paddingBlockEnd\",\n \"paddingInline\",\n \"paddingInlineStart\",\n \"paddingInlineEnd\",\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginBlock\",\n \"marginBlockStart\",\n \"marginBlockEnd\",\n \"marginInline\",\n \"marginInlineStart\",\n \"marginInlineEnd\",\n // Typography\n \"fontSize\",\n // Misc\n \"backgroundPositionX\",\n \"backgroundPositionY\",\n]);\n\nexport { pxValues };\n//# sourceMappingURL=px-values.mjs.map\n","import { pxValues } from '../../waapi/utils/px-values.mjs';\n\nfunction applyPxDefaults(keyframes, name) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"number\" && pxValues.has(name)) {\n keyframes[i] = keyframes[i] + \"px\";\n }\n }\n}\n\nexport { applyPxDefaults };\n//# sourceMappingURL=apply-px-defaults.mjs.map\n","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n//# sourceMappingURL=get-as-type.mjs.map\n","import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = \n/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n//# sourceMappingURL=microtask.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction getComputedStyle(element, name) {\n const computedStyle = window.getComputedStyle(element);\n return isCSSVar(name)\n ? computedStyle.getPropertyValue(name)\n : computedStyle[name];\n}\n\nexport { getComputedStyle };\n//# sourceMappingURL=style-computed.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nfunction isSVGElement(element) {\n return isObject(element) && \"ownerSVGElement\" in element;\n}\n\nexport { isSVGElement };\n//# sourceMappingURL=is-svg-element.mjs.map\n","import { isSVGElement } from './is-svg-element.mjs';\n\n/**\n * Checks if an element is specifically an SVGSVGElement (the root SVG element)\n * in a way that works across iframes\n */\nfunction isSVGSVGElement(element) {\n return isSVGElement(element) && element.tagName === \"svg\";\n}\n\nexport { isSVGSVGElement };\n//# sourceMappingURL=is-svg-svg-element.mjs.map\n","import { color } from '../color/index.mjs';\nimport { complex } from '../complex/index.mjs';\nimport { dimensionValueTypes } from '../dimensions.mjs';\nimport { testValueType } from '../test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n//# sourceMappingURL=find.mjs.map\n","import { resolveElements } from '../../utils/resolve-elements.mjs';\n\nlet nameCount = 0;\n/**\n * Generated names live in their own namespace so we can tell a name we own\n * (and must clean up) from an author-defined one - and so a stale generated\n * name left behind by an interrupted transition is re-owned, not mistaken for\n * the author's and leaked.\n */\nconst generatedName = () => `motion-view-${nameCount++}`;\nconst isGeneratedName = (name) => name.startsWith(\"motion-view-\");\n/**\n * Tag a captured element with a `view-transition-class` so authors can target\n * its generated layer from CSS (e.g. `::view-transition-group(.hero)`) without\n * the opaque generated name. Tracked in `classed` - separate from the generated\n * names in `assigned` - so cleanup removes the class without ever stripping an\n * author's own inline `view-transition-name`.\n */\nfunction tagClass(element, className, classed) {\n if (!className)\n return;\n element.style?.setProperty(\"view-transition-class\", className);\n classed.push(element);\n}\n/**\n * Set the element's `view-transition-group` so its layer reconstructs the DOM\n * hierarchy in the pseudo-tree (`contain`) - or stays flat (`none`). Tracked in\n * `grouped` for cleanup. When the element clips (any non-`visible` overflow) its\n * name is recorded in `clipChildren` so the caller can clip the nested children\n * (`::view-transition-group-children(name)`), mirroring the live clip through\n * the whole transition rather than only at the live-DOM handoff.\n *\n * Ignored by browsers without nested view-transition groups, where it harmlessly\n * degrades to the flat default.\n */\nfunction applyGroup(element, name, group, grouped, clipChildren) {\n if (!group)\n return;\n element.style?.setProperty(\"view-transition-group\", group);\n grouped.push(element);\n if (group !== \"none\" && clipChildren) {\n const style = getComputedStyle(element);\n if (style.overflowX !== \"visible\" || style.overflowY !== \"visible\") {\n clipChildren.add(name);\n }\n }\n}\n/**\n * Resolve a selector/Element to elements and ensure each one carries a\n * `view-transition-name` we can target from script.\n *\n * Author-defined names are reused as-is. Elements that are unnamed (or use\n * the browser's `auto`/`match-element`, whose generated name is not exposed\n * to script) are given a unique generated name, set inline so it's captured,\n * and tracked in `assigned` for later cleanup.\n *\n * `registry` maps each Element to its name so the same element keeps its name\n * across both captures (before and after the update), which is what allows a\n * persistent element to animate as a single `group` layer.\n */\nfunction assignViewTransitionNames(definition, registry, assigned, forcedNames, className, classed = [], group, grouped = [], clipChildren) {\n const elements = resolveElements(definition);\n /**\n * The new end of a paired morph: give each element the matching name from\n * the old end (by index) so the two share one layer and morph. If the new\n * end resolves to *more* elements than the old end named, the extras have no\n * counterpart - give them a fresh name so they animate as newcomers rather\n * than being silently left unnamed. We return the names actually assigned\n * (sized to the resolved elements), not the raw `forcedNames`, so stagger\n * totals and the layer set stay in step with what's on the page.\n */\n if (forcedNames) {\n return elements.map((element, i) => {\n const existing = registry.get(element);\n if (existing)\n return existing;\n const name = forcedNames[i] ?? generatedName();\n element.style?.setProperty(\"view-transition-name\", name);\n assigned.push(element);\n registry.set(element, name);\n tagClass(element, className, classed);\n applyGroup(element, name, group, grouped, clipChildren);\n return name;\n });\n }\n /**\n * Read every current name up front, before assigning any. Interleaving the\n * reads with the inline `setProperty` writes below would dirty styles\n * between reads and force a style recalc per element; batching the reads\n * keeps it to one. Elements already in the registry keep their name and\n * need no read.\n */\n const currentNames = elements.map((element) => registry.has(element)\n ? undefined\n : getComputedStyle(element).getPropertyValue(\"view-transition-name\"));\n return elements.map((element, i) => {\n const existing = registry.get(element);\n if (existing)\n return existing;\n const current = currentNames[i];\n let name;\n if (current &&\n current !== \"none\" &&\n current !== \"auto\" &&\n current !== \"match-element\" &&\n !isGeneratedName(current)) {\n /**\n * The author already named this layer - target it as-is and leave\n * it to them to clean up. `auto`/`match-element` are overridden\n * because their generated name is not exposed to script, and a\n * stale `motion-view-*` (e.g. left by an interrupted transition) is\n * re-owned rather than adopted as an author name and leaked.\n */\n name = current;\n }\n else {\n name = generatedName();\n element.style?.setProperty(\"view-transition-name\", name);\n assigned.push(element);\n }\n registry.set(element, name);\n tagClass(element, className, classed);\n applyGroup(element, name, group, grouped, clipChildren);\n return name;\n });\n}\n/**\n * Remove the `view-transition-name`s we generated and the\n * `view-transition-class`es we applied. Author-defined names are never touched\n * (they're not in `assigned`). Safe to call more than once (e.g. on both a\n * finished and an interrupted transition).\n */\nfunction releaseViewTransitionNames(assigned, classed = [], grouped = []) {\n for (const element of assigned) {\n element.style?.removeProperty(\"view-transition-name\");\n }\n for (const element of classed) {\n element.style?.removeProperty(\"view-transition-class\");\n }\n for (const element of grouped) {\n element.style?.removeProperty(\"view-transition-group\");\n }\n}\n\nexport { assignViewTransitionNames, releaseViewTransitionNames };\n//# sourceMappingURL=assign-names.mjs.map\n","function chooseLayerType(valueName) {\n if (valueName === \"layout\")\n return \"group\";\n if (valueName === \"enter\" || valueName === \"new\")\n return \"new\";\n return \"old\";\n}\n\nexport { chooseLayerType };\n//# sourceMappingURL=choose-layer-type.mjs.map\n","let pendingRules = {};\nlet style = null;\nconst css = {\n set: (selector, values) => {\n pendingRules[selector] = values;\n },\n commit: () => {\n if (!style) {\n style = document.createElement(\"style\");\n style.id = \"motion-view\";\n }\n let cssText = \"\";\n for (const selector in pendingRules) {\n const rule = pendingRules[selector];\n cssText += `${selector} {\\n`;\n for (const [property, value] of Object.entries(rule)) {\n cssText += ` ${property}: ${value};\\n`;\n }\n cssText += \"}\\n\";\n }\n style.textContent = cssText;\n document.head.appendChild(style);\n pendingRules = {};\n },\n remove: () => {\n if (style && style.parentElement) {\n style.parentElement.removeChild(style);\n }\n },\n};\n\nexport { css };\n//# sourceMappingURL=css.mjs.map\n","function getViewAnimationLayerInfo(pseudoElement) {\n const match = pseudoElement.match(\n // `group-children` (nested transitions) before `group` so it wins.\n /::view-transition-(old|new|group-children|group|image-pair)\\((.*?)\\)/);\n if (!match)\n return null;\n return { layer: match[2], type: match[1] };\n}\n\nexport { getViewAnimationLayerInfo };\n//# sourceMappingURL=get-layer-info.mjs.map\n","function getViewAnimations() {\n return document.getAnimations().filter((animation) => {\n const { effect } = animation;\n return (!!effect &&\n effect.target === document.documentElement &&\n effect.pseudoElement?.startsWith(\"::view-transition\"));\n });\n}\n\nexport { getViewAnimations };\n//# sourceMappingURL=get-view-animations.mjs.map\n","function hasTarget(target, targets) {\n return targets.has(target) && Object.keys(targets.get(target)).length > 0;\n}\n\nexport { hasTarget };\n//# sourceMappingURL=has-target.mjs.map\n","import { warnOnce, secondsToMilliseconds } from 'motion-utils';\nimport { GroupAnimation } from '../animation/GroupAnimation.mjs';\nimport { NativeAnimation } from '../animation/NativeAnimation.mjs';\nimport { NativeAnimationWrapper } from '../animation/NativeAnimationWrapper.mjs';\nimport { getValueTransition } from '../animation/utils/get-value-transition.mjs';\nimport { mapEasingToNativeEasing } from '../animation/waapi/easing/map-easing.mjs';\nimport { applyGeneratorOptions } from '../animation/waapi/utils/apply-generator.mjs';\nimport { resolveElements } from '../utils/resolve-elements.mjs';\nimport { assignViewTransitionNames, releaseViewTransitionNames } from './utils/assign-names.mjs';\nimport { chooseLayerType } from './utils/choose-layer-type.mjs';\nimport { css } from './utils/css.mjs';\nimport { getViewAnimationLayerInfo } from './utils/get-layer-info.mjs';\nimport { getViewAnimations } from './utils/get-view-animations.mjs';\nimport { hasTarget } from './utils/has-target.mjs';\n\nconst definitionNames = [\"layout\", \"enter\", \"exit\", \"new\", \"old\"];\n/**\n * The `ViewTransitionTarget` buckets driving each generated layer type, in\n * priority order - the inverse of `chooseLayerType`. The new view is driven by\n * `new`/`enter`, the old by `old`/`exit`. `group-children`/`image-pair` have no\n * bucket; they follow the default layout timing.\n */\nconst typeBuckets = {\n group: [\"layout\"],\n new: [\"new\", \"enter\"],\n old: [\"old\", \"exit\"],\n};\n/**\n * Default \"absent\" origin for a single-value keyframe, by pseudo type, so e.g.\n * `enter({ scale: 1 })` grows in from 0.85 and `exit({ opacity: 0 })` fades\n * from 1. `enter` prefers the matching `exit` value over these (see below).\n */\nconst ORIGIN_DEFAULTS = {\n new: { opacity: 0, scale: 0.85 },\n old: { opacity: 1, scale: 1 },\n};\n/**\n * How much two box aspect ratios must differ before a morph is treated as\n * aspect-changing (and so worth cropping). Matches the projection engine's\n * `preserve-aspect` threshold, so small layout jitter doesn't trigger a crop.\n */\nconst ASPECT_TOLERANCE = 0.2;\nfunction startViewAnimation(builder) {\n const { update, targets, resolveDefs, cropOverride, pairs, classNames, flatGroups, options: defaultOptions, } = builder;\n if (!document.startViewTransition) {\n // An async IIFE (not `new Promise(async …)`) so a throwing/rejecting\n // update rejects this promise rather than leaving it unsettled.\n return (async () => {\n await update();\n return new GroupAnimation([]);\n })();\n }\n /**\n * Resolve any selector/Element targets to layer names, assigning a\n * `view-transition-name` to each element as we go. We run this before the\n * update (so the elements are captured in the old snapshot) and again\n * after it (for the new snapshot). An element present in both keeps the\n * same name and animates as a single `group` layer.\n */\n const nameRegistry = new Map();\n const assigned = [];\n /**\n * Elements we tagged with a `view-transition-class` (via `.class()`),\n * tracked separately from `assigned` so cleanup removes the class without\n * ever stripping an author's own inline `view-transition-name`.\n */\n const classed = [];\n /**\n * Elements we set a `view-transition-group` on (for nesting), tracked for\n * cleanup. `clipChildren` collects the names of nested parents that clip in\n * the live layout, so their `::view-transition-group-children` is clipped\n * through the transition - not just once the live DOM takes back over.\n */\n const grouped = [];\n const clipChildren = new Set();\n const layerTargets = new Map();\n const croppedNames = new Set();\n /**\n * Each layer's explicit `.crop(true | false)` override (by resolved name),\n * so `finalizeCrop` can let an author's choice win over the morph default.\n */\n const cropForName = new Map();\n /**\n * Each layer's stagger position (index + total) within its subject, per\n * snapshot. Resolving against the snapshot the layer belongs to keeps\n * stagger correct when `update()` replaces the matched elements, and lets\n * us skip a layer that's absent from a snapshot (e.g. an exited element\n * has no `new` pseudo-element).\n */\n const layerStagger = new Map();\n /**\n * Names allocated for a paired subject in the old snapshot, replayed onto\n * its new-snapshot target so both ends share a layer and morph.\n */\n const pairNames = new Map();\n /**\n * The old (`from`) elements of each paired subject, so their names can be\n * transferred off before the new (`to`) elements inherit them.\n */\n const pairFrom = new Map();\n const resolveLayers = (phase) => {\n targets.forEach((target, definition) => {\n const className = classNames.get(definition);\n /**\n * Nest each resolved layer under its DOM-ancestor layer by default\n * (`contain`), so an ancestor's clip/transform/opacity reach it\n * through the transition; `.group(false)` opts a subject out (`none`)\n * to stay flat and escape. Skipped for root / pre-named layers, which\n * aren't elements we resolve and style.\n */\n const group = definition === \"root\" || !resolveDefs.has(definition)\n ? undefined\n : flatGroups.has(definition)\n ? \"none\"\n : \"contain\";\n let names;\n if (definition === \"root\" || !resolveDefs.has(definition)) {\n names = [definition];\n }\n else if (pairs.has(definition)) {\n /**\n * Paired morph: name the old target in the old snapshot, then\n * force the same name(s) onto the new target in the new one, so\n * two different elements morph as a single layer.\n */\n if (phase === \"old\") {\n pairFrom.set(definition, resolveElements(definition));\n names = assignViewTransitionNames(definition, nameRegistry, assigned, undefined, className, classed, group, grouped, clipChildren);\n pairNames.set(definition, names);\n }\n else {\n /**\n * Transfer the name(s) off the `from` elements before the\n * `to` elements inherit them. A `from` that survives into\n * the new snapshot (e.g. hidden with `visibility: hidden`\n * rather than removed) would otherwise keep the name and\n * collide - \"duplicate view-transition-name\".\n */\n for (const el of pairFrom.get(definition) ?? []) {\n el.style?.removeProperty(\"view-transition-name\");\n /**\n * Drop the old end from the registry too, so the new\n * end alone supplies this name's `new` crop radii - we\n * neither re-measure nor get ordered by a stale element.\n */\n nameRegistry.delete(el);\n }\n names = assignViewTransitionNames(pairs.get(definition), nameRegistry, assigned, pairNames.get(definition), className, classed, group, grouped, clipChildren);\n }\n }\n else {\n names = assignViewTransitionNames(definition, nameRegistry, assigned, undefined, className, classed, group, grouped, clipChildren);\n }\n // Record any explicit `.crop(true | false)` per resolved name; the\n // crop set itself is computed later by `finalizeCrop` (it needs both\n // snapshots to know which morphs change aspect ratio).\n const override = cropOverride.get(definition);\n names.forEach((name, index) => {\n /**\n * If two subjects resolve to the same element, merge their\n * definitions so neither subject's animations are dropped.\n */\n const existing = layerTargets.get(name);\n layerTargets.set(name, existing && existing !== target\n ? { ...existing, ...target }\n : target);\n if (override !== undefined)\n cropForName.set(name, override);\n const stagger = layerStagger.get(name) ?? {};\n stagger[phase] = [index, names.length];\n layerStagger.set(name, stagger);\n });\n });\n };\n /**\n * The stagger index/total for a layer, resolved against the snapshot it\n * belongs to. Returns index -1 when the layer is absent from that snapshot\n * so the caller can skip a pseudo-element that doesn't exist.\n */\n const staggerPosition = (name, type) => {\n const stagger = layerStagger.get(name);\n const position = type === \"old\"\n ? stagger?.old\n : type === \"new\"\n ? stagger?.new\n : // group / group-children / image-pair persist across both.\n stagger?.new ?? stagger?.old;\n return position ?? [-1, 1];\n };\n /**\n * Merge default + per-layer transition options for a generated layer and\n * resolve any stagger/delay function against this element's position. Used\n * by both the morph-retiming and crop corner-radius passes.\n */\n const resolveLayerTransition = (target, type, transitionName, index, total) => {\n const transition = mergeTransition(getValueTransition(defaultOptions, transitionName), getValueTransition((layerOptions(target, type) ?? {}), transitionName));\n if (typeof transition.delay === \"function\") {\n transition.delay = transition.delay(index, total);\n }\n return transition;\n };\n /**\n * Each layer's box size per snapshot, so `finalizeCrop` can tell whether a\n * morph's aspect ratio changed (the only case worth cropping).\n */\n const cropBox = new Map();\n const measureLayers = (phase) => nameRegistry.forEach((name, element) => {\n const rect = element.getBoundingClientRect?.();\n if (rect && rect.height) {\n const entry = cropBox.get(name) ?? {};\n entry[phase] = { width: rect.width, height: rect.height };\n cropBox.set(name, entry);\n }\n });\n /**\n * With both snapshots measured, settle which layers crop. The default crops\n * only a morph whose aspect ratio *changes* between snapshots - the one case\n * where `object-fit: cover` does real work. A same-aspect morph or a\n * fade-only layer is left uncropped: its corners scale naturally (no flash\n * from squaring, no `overflow: clip` eating its shadow) and a backdrop can't\n * be clipped to nothing. An explicit `.crop(true | false)` overrides either\n * way. Runs after both snapshots are measured, since aspect needs both.\n */\n const finalizeCrop = () => {\n croppedNames.clear();\n for (const name of layerStagger.keys()) {\n if (name === \"root\")\n continue;\n // An explicit `.crop(true | false)` wins; otherwise crop a morph\n // whose aspect ratio changed.\n if (cropForName.get(name) ?? aspectChanged(name)) {\n croppedNames.add(name);\n }\n }\n };\n /**\n * Whether a layer is a morph whose box aspect ratio changed between\n * snapshots (beyond a small tolerance). Fade-only layers (one snapshot) are\n * never \"changed\".\n */\n const aspectChanged = (name) => {\n const box = cropBox.get(name);\n if (!box?.old || !box?.new || !box.old.height || !box.new.height) {\n return false;\n }\n return (Math.abs(box.old.width / box.old.height -\n box.new.width / box.new.height) > ASPECT_TOLERANCE);\n };\n /**\n * Write the persistent view-transition CSS: suppress root capture when the\n * root has no animations of its own; force linear timing (baked into the\n * keyframes, so we can retime later via updateTiming); and clip +\n * object-fit: cover every cropped morph (the UA default overflows on\n * aspect-ratio change).\n *\n * `css.commit` replaces rather than appends, so we re-set the full rule set\n * each call - the crop rules are only known after `finalizeCrop` runs in the\n * update callback, so the second call writes them.\n */\n const commitViewCSS = () => {\n if (!hasTarget(\"root\", targets)) {\n css.set(\":root\", { \"view-transition-name\": \"none\" });\n }\n css.set(\"::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)\", { \"animation-timing-function\": \"linear !important\" });\n croppedNames.forEach((name) => {\n css.set(`::view-transition-group(${name})`, { overflow: \"clip\" });\n css.set(`::view-transition-old(${name}), ::view-transition-new(${name})`, { width: \"100%\", height: \"100%\", \"object-fit\": \"cover\" });\n });\n /**\n * Clip the nested children of any layer that clips in the live layout,\n * so a wrapper crops its child for the whole morph (mirroring the DOM)\n * rather than only at the live-DOM handoff. No-op on browsers without\n * nested view-transition groups.\n */\n clipChildren.forEach((name) => {\n css.set(`::view-transition-group-children(${name})`, {\n overflow: \"clip\",\n });\n });\n css.commit(); // Write\n };\n const cleanup = () => {\n releaseViewTransitionNames(assigned, classed, grouped);\n css.remove(); // Write\n };\n const callback = async () => {\n await update();\n /**\n * Re-resolve so elements created by the update are named for the new\n * snapshot, then measure them. With both snapshots measured we can\n * settle the crop set (aspect-changing morphs + forced).\n */\n resolveLayers(\"new\");\n measureLayers(\"new\");\n finalizeCrop();\n /**\n * Re-commit the crop CSS unconditionally: `finalizeCrop` is computed\n * here (after both snapshots are measured), so the clip rules must be\n * (re)written to match the settled set.\n */\n commitViewCSS();\n };\n let transition;\n try {\n resolveLayers(\"old\");\n /**\n * Measure the old snapshot against the optimistic crop set (the new\n * snapshot doesn't exist yet, so aspect change can't be known here;\n * `finalizeCrop` settles it post-update).\n */\n measureLayers(\"old\");\n commitViewCSS();\n transition = document.startViewTransition(callback);\n }\n catch (error) {\n /**\n * The prelude writes inline names before the transition exists. If it\n * throws (e.g. startViewTransition rejects in a bad UA state), release\n * them so we neither leak DOM state nor stall the queue on a promise\n * that never settles - hand back a rejection it can advance past.\n */\n cleanup();\n return Promise.reject(error);\n }\n transition.finished.finally(cleanup);\n return new Promise((resolve, reject) => {\n transition.ready\n .then(() => {\n const generatedViewAnimations = getViewAnimations();\n const animations = [];\n /**\n * Create animations for each of our explicitly-defined subjects.\n * `opacityAnimated` additionally tracks which `${name}:${type}`\n * we faded, so we can keep the UA `plus-lighter` blend only for a\n * genuine opacity crossfade (both sides fading) and drop it for a\n * slide/transform, where additive compositing would flash bright.\n */\n const explicitlyAnimated = new Set();\n const opacityAnimated = new Set();\n layerTargets.forEach((target, name) => {\n const stagger = layerStagger.get(name);\n /**\n * Presence: `enter` only fires for a pure newcomer (a new\n * view with no old), `exit` only for a pure leaver. A\n * survivor (both) gets neither - it just morphs.\n */\n const enterApplies = !!stagger?.new && !stagger?.old;\n const exitApplies = !!stagger?.old && !stagger?.new;\n for (const key of definitionNames) {\n if (!target[key])\n continue;\n if (key === \"enter\" && !enterApplies)\n continue;\n if (key === \"exit\" && !exitApplies)\n continue;\n const type = chooseLayerType(key);\n const [index, total] = staggerPosition(name, type);\n // Skip a layer absent from its snapshot.\n if (index === -1)\n continue;\n const { keyframes, options } = target[key];\n for (let [valueName, valueKeyframes] of Object.entries(keyframes)) {\n // Skip only missing values - `0` (e.g. opacity: 0)\n // is valid and must reach the from-value inference.\n if (valueKeyframes == null)\n continue;\n /**\n * The view path hands keyframes straight to WAAPI,\n * so Motion's `x`/`y` shorthands (compiled to\n * `transform` only via the value pipeline) have no\n * effect. Warn and skip - use `transform`/`translate`.\n */\n if (valueName === \"x\" || valueName === \"y\") {\n warnOnce(false, `animateView() animates view-transition layers with CSS properties; the \"${valueName}\" shorthand has no effect - use transform, e.g. { transform: \"translateX(40px)\" }.`);\n continue;\n }\n /**\n * enter/exit win over new/old on a shared property -\n * skip it here when the gated bucket also defines it.\n */\n if (key === \"new\" &&\n enterApplies &&\n target.enter?.keyframes[valueName] != null) {\n continue;\n }\n if (key === \"old\" &&\n exitApplies &&\n target.exit?.keyframes[valueName] != null) {\n continue;\n }\n const valueOptions = mergeTransition(getValueTransition(defaultOptions, valueName), getValueTransition(options, valueName));\n /**\n * Infer an origin for a single-value keyframe. An\n * `enter` mirrors the matching `exit` value (a\n * defined exit reverses into the enter for free);\n * otherwise the per-type default (opacity 0/1, scale\n * 0.85). No default -> left as-is (animates from the\n * live value).\n *\n * `new`/`old` fire for survivors too, where only the\n * opacity crossfade default applies - a transform\n * default like scale 0.85 would pop a persisting\n * element, so gate it on the layer actually\n * entering/leaving.\n */\n if (!Array.isArray(valueKeyframes)) {\n const exitValue = key === \"enter\"\n ? target.exit?.keyframes[valueName]\n : undefined;\n const allowDefault = valueName === \"opacity\" ||\n (type === \"new\" ? enterApplies : exitApplies);\n const from = exitValue != null\n ? Array.isArray(exitValue)\n ? exitValue[exitValue.length - 1]\n : exitValue\n : allowDefault\n ? ORIGIN_DEFAULTS[type]?.[valueName]\n : undefined;\n if (from !== undefined) {\n valueKeyframes = [from, valueKeyframes];\n }\n }\n /**\n * Resolve stagger function if provided, per element\n * across this subject's resolved layers.\n */\n if (typeof valueOptions.delay === \"function\") {\n valueOptions.delay = valueOptions.delay(index, total);\n }\n valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration));\n valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay));\n animations.push(new NativeAnimation({\n ...valueOptions,\n element: document.documentElement,\n name: valueName,\n pseudoElement: `::view-transition-${type}(${name})`,\n keyframes: valueKeyframes,\n }));\n explicitlyAnimated.add(`${name}:${type}`);\n if (valueName === \"opacity\") {\n opacityAnimated.add(`${name}:${type}`);\n }\n }\n }\n });\n /**\n * Handle browser generated animations\n */\n for (const animation of generatedViewAnimations) {\n if (animation.playState === \"finished\")\n continue;\n const { effect } = animation;\n if (!effect || !(effect instanceof KeyframeEffect))\n continue;\n const { pseudoElement } = effect;\n if (!pseudoElement)\n continue;\n const name = getViewAnimationLayerInfo(pseudoElement);\n if (!name)\n continue;\n const targetDefinition = layerTargets.get(name.layer);\n /**\n * We built our own animation for this layer, so drop the\n * browser-generated fade we're replacing. The UA\n * `plus-lighter` blend is a *separate* generated animation on\n * the same pseudo (it sets `mix-blend-mode` in its keyframes):\n * keep it *only* for a true opacity crossfade - both sides\n * fading - so a symmetric crossfade composites without\n * darkening, but a slide/transform (where both layers stay\n * opaque and overlap) doesn't flash bright from the addition.\n */\n if (explicitlyAnimated.has(`${name.layer}:${name.type}`)) {\n const isCrossfade = opacityAnimated.has(`${name.layer}:new`) &&\n opacityAnimated.has(`${name.layer}:old`);\n if (isCrossfade &&\n effect\n .getKeyframes()\n .some((keyframe) => keyframe.mixBlendMode)) {\n animations.push(new NativeAnimationWrapper(animation));\n }\n else {\n animation.cancel();\n }\n continue;\n }\n /**\n * Otherwise retime the browser-generated animation to\n * Motion's timing. This auto-enables the layout (group)\n * morph for any resolved/named target, and applies the\n * default timing to old/new layers we haven't explicitly\n * overridden.\n *\n * group + group-children both follow the layout timing so\n * the nesting container stays in sync with the morph.\n */\n /**\n * A survivor's old + new are the two halves of one\n * `plus-lighter` crossfade. They must share identical timing\n * (so their opacities stay mirrored and sum to 1 - else the\n * additive blend flashes bright wherever both are partly\n * visible) and fade linearly (the bounce belongs on the\n * group's geometry, not the opacity). So time them as the\n * group, rather than via their own - potentially staggered,\n * or enter/exit-derived - old/new options.\n */\n const stagger = layerStagger.get(name.layer);\n const isMorphCrossfade = (name.type === \"old\" || name.type === \"new\") &&\n !!stagger?.old &&\n !!stagger?.new;\n const timingType = name.type.startsWith(\"group\") || isMorphCrossfade\n ? \"group\"\n : name.type;\n const [index, total] = staggerPosition(name.layer, timingType);\n const transitionName = timingType === \"group\" ? \"layout\" : \"\";\n let animationTransition = resolveLayerTransition(targetDefinition, timingType, transitionName, index === -1 ? 0 : index, total);\n /**\n * The crossfade should resolve at the spring's *perceptual*\n * (visual) duration - the geometry can keep bouncing, but the\n * opacity shouldn't drag through the settle. So capture\n * `visualDuration` before `applyGeneratorOptions` replaces it\n * with the full overshoot duration, and use it for the fade.\n */\n const visualDuration = animationTransition.visualDuration;\n animationTransition.duration && (animationTransition.duration = secondsToMilliseconds(animationTransition.duration));\n animationTransition =\n applyGeneratorOptions(animationTransition);\n const duration = isMorphCrossfade && visualDuration !== undefined\n ? secondsToMilliseconds(visualDuration)\n : animationTransition.duration;\n const easing = isMorphCrossfade\n ? \"linear\"\n : mapEasingToNativeEasing(animationTransition.ease, animationTransition.duration);\n effect.updateTiming({\n delay: secondsToMilliseconds(animationTransition.delay ?? 0),\n duration,\n easing,\n });\n animations.push(new NativeAnimationWrapper(animation));\n }\n resolve(new GroupAnimation(animations));\n })\n .catch(() => \n /**\n * `ready` rejects when the transition is skipped - no visual\n * change, or superseded by an interrupting transition. The DOM\n * update still applied, so settle with no animations rather than\n * surfacing it as an error to an awaiting caller. A genuine\n * failure in `update()` rejects `updateCallbackDone` (already\n * settled by now), so propagate that instead.\n */\n transition.updateCallbackDone.then(() => resolve(new GroupAnimation([])), reject));\n });\n}\n/**\n * The options that should time a given generated layer type, so a retimed\n * group/old/new picks up any per-target transition the user provided. Checks\n * the type's buckets in priority order (e.g. `new` before `enter`).\n */\nfunction layerOptions(target, type) {\n for (const bucket of typeBuckets[type] ?? []) {\n const options = target?.[bucket]?.options;\n if (options)\n return options;\n }\n}\n/**\n * Merge a base transition (e.g. the default `options`) with a per-layer/value\n * override. An explicit `duration` on the override must win over an inherited\n * generator's own timing: a spring prefers `visualDuration`, and\n * `spring.applyToOptions` overwrites `duration` with the computed settle time -\n * so without this the override is silently discarded. Dropping the inherited\n * `type`/`visualDuration` makes the layer a plain tween of that duration, unless\n * it asked for its own generator `type`/`visualDuration`.\n */\nfunction mergeTransition(base, override) {\n const merged = { ...base, ...override };\n if (override.duration !== undefined) {\n if (override.visualDuration === undefined)\n delete merged.visualDuration;\n if (override.type === undefined)\n delete merged.type;\n }\n return merged;\n}\n\nexport { startViewAnimation };\n//# sourceMappingURL=start.mjs.map\n","import { removeItem } from 'motion-utils';\nimport { microtask } from '../frameloop/microtask.mjs';\nimport { startViewAnimation } from './start.mjs';\n\nlet builders = [];\nlet current = null;\nfunction next() {\n current = null;\n const [nextBuilder] = builders;\n if (nextBuilder)\n start(nextBuilder);\n}\nfunction start(builder) {\n removeItem(builders, builder);\n current = builder;\n startViewAnimation(builder)\n .then((animation) => {\n builder.notifyReady(animation);\n return animation.finished;\n })\n // A genuinely failed transition (a throwing update) rejects the\n // builder; a skipped/interrupted one resolves with no animations (see\n // start.ts). Either way, advance the queue - else later transitions hang.\n .catch((error) => builder.notifyReject(error))\n .finally(next);\n}\nfunction processQueue() {\n /**\n * Iterate backwards over the builders array. We can ignore the\n * \"wait\" animations. If we have an interrupting animation in the\n * queue then we need to batch all preceeding animations into it.\n * Currently this only batches the update functions but will also\n * need to batch the targets.\n */\n for (let i = builders.length - 1; i >= 0; i--) {\n const builder = builders[i];\n const { interrupt } = builder.options;\n if (interrupt === \"immediate\") {\n const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update);\n const remaining = builders.slice(i + 1);\n builder.update = () => {\n batchedUpdates.forEach((update) => update());\n };\n // Put the current builder at the front, followed by any \"wait\" builders\n builders = [builder, ...remaining];\n break;\n }\n }\n if (!current || builders[0]?.options.interrupt === \"immediate\") {\n next();\n }\n}\nfunction addToQueue(builder) {\n builders.push(builder);\n microtask.render(processQueue);\n}\n\nexport { addToQueue };\n//# sourceMappingURL=queue.mjs.map\n","import { noop } from 'motion-utils';\nimport { addToQueue } from './queue.mjs';\n\nclass ViewTransitionBuilder {\n constructor(update, options = {}) {\n this.currentSubject = \"root\";\n this.targets = new Map();\n /**\n * Definitions that must be resolved to elements (and assigned a\n * `view-transition-name`) rather than treated as pre-named layers.\n */\n this.resolveDefs = new Set();\n /**\n * Per-subject crop override: `true` forces the crop (clip + object-fit:\n * cover + animated corner radii) on, `false` forces it off. A subject with\n * no entry uses the default - crop only a genuine morph (a layer present in\n * both snapshots), so a fade-only enter/exit isn't clipped to nothing.\n */\n this.cropOverride = new Map();\n /**\n * Subjects paired with a different new-snapshot target (the second `.add()`\n * argument), so two distinct elements share one name and morph into each\n * other - a shared-element transition.\n */\n this.pairs = new Map();\n /**\n * A `view-transition-class` to apply to each subject's resolved elements,\n * so authors can target the generated layers from CSS by class rather than\n * the opaque generated name.\n */\n this.classNames = new Map();\n /**\n * Subjects opted out of automatic group nesting via `.group(false)`. Their\n * layer stays a flat top-level group (`view-transition-group: none`) instead\n * of nesting under its DOM-ancestor layer - so it animates independently and\n * escapes an ancestor's clip/transform (e.g. an element that lifts out of a\n * card and flies across, which nesting would clip to the card).\n */\n this.flatGroups = new Set();\n this.notifyReady = noop;\n this.notifyReject = noop;\n this.readyPromise = new Promise((resolve, reject) => {\n this.notifyReady = resolve;\n this.notifyReject = reject;\n });\n this.update = update;\n this.options = {\n interrupt: \"wait\",\n ...options,\n };\n // Avoid an unhandled rejection when a failed transition has no\n // `.then(_, reject)` handler attached (e.g. fire-and-forget).\n this.readyPromise.catch(noop);\n addToQueue(this);\n }\n /**\n * Target elements resolved from a selector or Element, each assigned a\n * `view-transition-name` automatically.\n *\n * Passing a second target pairs them: the first is resolved in the old\n * snapshot and the second in the new, sharing one name so two *different*\n * elements morph into each other (e.g. `.add(card, \".modal\")`). Symmetric -\n * pass them the other way round to morph back.\n */\n add(subject, newSubject) {\n this.currentSubject = subject;\n this.resolveDefs.add(subject);\n if (newSubject !== undefined)\n this.pairs.set(subject, newSubject);\n // Register the subject so it participates (and gets an automatic\n // layout/morph animation) even without an explicit enter/exit/layout.\n if (!this.targets.has(subject))\n this.targets.set(subject, {});\n return this;\n }\n /**\n * Control this subject's crop (clip + `object-fit: cover` + animated\n * corners). By default a subject auto-crops only when it actually morphs -\n * present in both snapshots (a survivor, or an `.add(a, b)` pair). A\n * fade-only enter/exit has no second box to crop against, so it's left to\n * the browser default; in particular the `overflow: clip` a crop adds would\n * otherwise clip a mis-sized enter/exit layer to nothing.\n *\n * `.crop(false)` forces the crop off (e.g. a text morph, where\n * `object-fit: cover` clips glyphs as the box grows); `.crop(true)` forces\n * it on for a non-morph the default wouldn't otherwise crop.\n */\n crop(enabled = true) {\n this.cropOverride.set(this.currentSubject, enabled);\n return this;\n }\n /**\n * By default a subject's layer nests under its nearest DOM-ancestor layer\n * (`view-transition-group: contain`), so the ancestor's clip/transform/opacity\n * apply to it through the transition - mirroring how the DOM actually paints,\n * and letting a wrapper crop its child for the whole morph rather than only\n * once the live DOM takes back over. (Needs a browser that supports nested\n * view-transition groups; elsewhere it degrades to the flat default.)\n *\n * Call `.group(false)` to opt out: the layer stays flat and top-level, so it\n * animates independently and escapes an ancestor's clip - e.g. an element\n * that should lift out of a card and fly across, which nesting would clip.\n */\n group(enabled = true) {\n enabled\n ? this.flatGroups.delete(this.currentSubject)\n : this.flatGroups.add(this.currentSubject);\n return this;\n }\n /**\n * Tag this subject's generated layers with a `view-transition-class`, so\n * they can be targeted from CSS - `::view-transition-group(.name)`,\n * `::view-transition-old/new(.name)`, `::view-transition-image-pair(.name)`\n * - without the opaque generated `view-transition-name`. Because `.add()`\n * can match many elements, a shared class targets them all at once (and,\n * for a pair, both ends). The escape hatch for z-index / custom keyframes\n * on a morph layer.\n */\n class(name) {\n this.classNames.set(this.currentSubject, name);\n return this;\n }\n /**\n * Set the transition for this subject's morph. The morph is enabled\n * automatically by `.add()`; this just customises its timing (duration,\n * easing, a `delay`/`stagger`, …). On the implicit `root` subject it also\n * opts the page into the transition (the root crossfade).\n */\n layout(options = {}) {\n this.updateTarget(\"layout\", {}, options);\n return this;\n }\n enter(keyframes, options) {\n this.updateTarget(\"enter\", keyframes, options);\n return this;\n }\n exit(keyframes, options) {\n this.updateTarget(\"exit\", keyframes, options);\n return this;\n }\n /**\n * Animate the new view directly, whether the element is appearing or\n * persisting (unlike `.enter()`, which only fires for a pure newcomer).\n * Pair with `.old()` for a crossfade or slide-through.\n */\n new(keyframes, options) {\n this.updateTarget(\"new\", keyframes, options);\n return this;\n }\n /**\n * Animate the old view directly, whether the element is leaving or\n * persisting (unlike `.exit()`, which only fires for a pure leaver).\n */\n old(keyframes, options) {\n this.updateTarget(\"old\", keyframes, options);\n return this;\n }\n updateTarget(target, keyframes, options = {}) {\n const { currentSubject, targets } = this;\n if (!targets.has(currentSubject)) {\n targets.set(currentSubject, {});\n }\n const targetData = targets.get(currentSubject);\n targetData[target] = { keyframes, options };\n }\n then(resolve, reject) {\n return this.readyPromise.then(resolve, reject);\n }\n}\nfunction animateView(update, options = {}) {\n return new ViewTransitionBuilder(update, options);\n}\n\nexport { ViewTransitionBuilder, animateView };\n//# sourceMappingURL=index.mjs.map\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n//# sourceMappingURL=models.mjs.map\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n//# sourceMappingURL=store.mjs.map\n","function isAnimationControls(v) {\n return (v !== null &&\n typeof v === \"object\" &&\n typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n//# sourceMappingURL=is-animation-controls.mjs.map\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n//# sourceMappingURL=is-variant-label.mjs.map\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n//# sourceMappingURL=variant-props.mjs.map\n","import { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n//# sourceMappingURL=is-controlling-variants.mjs.map\n","import { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\n/**\n * Updates motion values from props changes.\n * Uses `any` type for element to avoid circular dependencies with VisualElement.\n */\nfunction updateMotionValuesFromProps(element, next, prev) {\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue);\n }\n else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue);\n }\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n//# sourceMappingURL=motion-values.mjs.map\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n//# sourceMappingURL=state.mjs.map\n","import { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nconst isBrowser = typeof window !== \"undefined\";\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { hasReducedMotionListener, initPrefersReducedMotion, prefersReducedMotion };\n//# sourceMappingURL=index.mjs.map\n","import { warnOnce, secondsToMilliseconds, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { KeyframeResolver } from '../animation/keyframes/KeyframesResolver.mjs';\nimport { NativeAnimation } from '../animation/NativeAnimation.mjs';\nimport { acceleratedValues } from '../animation/waapi/utils/accelerated-values.mjs';\nimport { microtask } from '../frameloop/microtask.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../value/types/utils/animatable-none.mjs';\nimport { findValueType } from '../value/types/utils/find.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { transformProps } from './utils/keys-transform.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions = {};\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nfunction setFeatureDefinitions(definitions) {\n featureDefinitions = definitions;\n}\n/**\n * Get the current feature definitions\n */\nfunction getFeatureDefinitions() {\n return featureDefinitions;\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n this.shouldSkipAnimations = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n this.hasBeenMounted = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.skipAnimationsConfig = skipAnimations;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key]);\n }\n }\n }\n mount(instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key]);\n this.latestValues[key] = this.initialValues[key];\n }\n }\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false;\n }\n else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true;\n }\n else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = prefersReducedMotion.current;\n }\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;\n this.parent?.addChild(this);\n this.update(this.props, this.presenceContext);\n this.hasBeenMounted = true;\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent?.removeChild(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n addChild(child) {\n this.children.add(child);\n this.enteringChildren ?? (this.enteringChildren = new Set());\n this.enteringChildren.add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren && this.enteringChildren.delete(child);\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n if (value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement) {\n const { factory, keyframes, times, ease, duration } = value.accelerate;\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n });\n const cleanup = factory(animation);\n this.valueSubscriptions.set(key, () => {\n cleanup();\n animation.cancel();\n });\n return;\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n this.scheduleRender();\n });\n let removeSyncCheck;\n if (typeof window !== \"undefined\" &&\n window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n if (removeSyncCheck)\n removeSyncCheck();\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n scheduleRenderMicrotask() {\n microtask.render(this.render);\n }\n}\n\nexport { VisualElement, getFeatureDefinitions, setFeatureDefinitions };\n//# sourceMappingURL=VisualElement.mjs.map\n","import { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n const style = props.style;\n return style ? style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n//# sourceMappingURL=DOMVisualElement.mjs.map\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n//# sourceMappingURL=conversion.mjs.map\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n//# sourceMappingURL=measure.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n const parsed = parseFloat(value);\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform[key] = valueAsType;\n }\n }\n }\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation;\n if (pathRotation) {\n transformIsDefault = false;\n transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n//# sourceMappingURL=build-transform.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformProps } from '../../utils/keys-transform.mjs';\nimport { isCSSVariableName } from '../../../animation/utils/is-css-variable.mjs';\nimport { buildTransform } from './build-transform.mjs';\n\nfunction buildHTMLStyles(state, latestValues, transformTemplate) {\n const { style, vars, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n continue;\n }\n else if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] =\n valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(latestValues, state.transform, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n//# sourceMappingURL=build-styles.mjs.map\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n const elementStyle = element.style;\n let key;\n for (key in style) {\n // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type.\n elementStyle[key] = style[key];\n }\n // Write projection styles directly to element style\n projection?.applyProjectionStyles(elementStyle, styleProp);\n for (key in vars) {\n // Loop over any CSS variables and assign those.\n // They can only be assigned using `setProperty`.\n elementStyle.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n//# sourceMappingURL=render.mjs.map\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n//# sourceMappingURL=scale-border-radius.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n//# sourceMappingURL=scale-box-shadow.mjs.map\n","import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { correctBorderRadius } from './scale-border-radius.mjs';\nimport { correctBoxShadow } from './scale-box-shadow.mjs';\n\nconst scaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\nfunction addScaleCorrector(correctors) {\n for (const key in correctors) {\n scaleCorrectors[key] = correctors[key];\n if (isCSSVariableName(key)) {\n scaleCorrectors[key].isCSSVariable = true;\n }\n }\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n//# sourceMappingURL=scale-correction.mjs.map\n","import { transformProps } from './keys-transform.mjs';\nimport { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nexport { addScaleCorrector } from '../../projection/styles/scale-correction.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue, scaleCorrectors };\n//# sourceMappingURL=is-forced-motion-value.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { isForcedMotionValue } from '../../utils/is-forced-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const style = props.style;\n const prevStyle = prevProps?.style;\n const newValues = {};\n if (!style)\n return newValues;\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevStyle && isMotionValue(prevStyle[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { transformProps } from '../utils/keys-transform.mjs';\nimport { defaultTransformValue, readTransformValue } from '../dom/parse-transform.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.renderInstance = renderHTML;\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key);\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n//# sourceMappingURL=HTMLVisualElement.mjs.map\n","import { createBox } from '../../projection/geometry/models.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nfunction isObjectKey(key, object) {\n return key in object;\n}\nclass ObjectVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.type = \"object\";\n }\n readValueFromInstance(instance, key) {\n if (isObjectKey(key, instance)) {\n const value = instance[key];\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value;\n }\n }\n return undefined;\n }\n getBaseTargetFromProps() {\n return undefined;\n }\n removeValueFromRenderState(key, renderState) {\n delete renderState.output[key];\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n build(renderState, latestValues) {\n Object.assign(renderState.output, latestValues);\n }\n renderInstance(instance, { output }) {\n Object.assign(instance, output);\n }\n sortInstanceNodePosition() {\n return 0;\n }\n}\n\nexport { ObjectVisualElement };\n//# sourceMappingURL=ObjectVisualElement.mjs.map\n","const dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n *\n * Note: We use unitless values for stroke-dasharray and stroke-dashoffset\n * because Safari incorrectly scales px values when the page is zoomed.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset (unitless to avoid Safari zoom bug)\n attrs[keys.offset] = `${-offset}`;\n // Build the dash array (unitless to avoid Safari zoom bug)\n attrs[keys.array] = `${length} ${spacing}`;\n}\n\nexport { buildSVGPath };\n//# sourceMappingURL=path.mjs.map\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n];\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n for (const key of cssMotionPathProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key];\n delete attrs[key];\n }\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n//# sourceMappingURL=build-attrs.mjs.map\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n//# sourceMappingURL=camel-case-attrs.mjs.map\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n//# sourceMappingURL=is-svg-tag.mjs.map\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n//# sourceMappingURL=render.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { transformProps } from '../utils/keys-transform.mjs';\nimport { getDefaultValueType } from '../../value/types/maps/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n//# sourceMappingURL=SVGVisualElement.mjs.map\n","import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n//# sourceMappingURL=single-value.mjs.map\n","function isDOMKeyframes(keyframes) {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes);\n}\n\nexport { isDOMKeyframes };\n//# sourceMappingURL=is-dom-keyframes.mjs.map\n","import { resolveElements } from 'motion-dom';\nimport { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';\n\nfunction resolveSubjects(subject, keyframes, scope, selectorCache) {\n if (subject == null) {\n return [];\n }\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache);\n }\n else if (subject instanceof NodeList) {\n return Array.from(subject);\n }\n else if (Array.isArray(subject)) {\n return subject.filter((s) => s != null);\n }\n else {\n return [subject];\n }\n}\n\nexport { resolveSubjects };\n//# sourceMappingURL=resolve-subjects.mjs.map\n","function calculateRepeatDuration(duration, repeat, repeatDelay) {\n return duration * (repeat + 1) + repeatDelay * repeat;\n}\n\nexport { calculateRepeatDuration };\n//# sourceMappingURL=calc-repeat-duration.mjs.map\n","/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nfunction calcNextTime(current, next, prev, labels) {\n if (typeof next === \"number\") {\n return next;\n }\n else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next));\n }\n else if (next === \"<\") {\n return prev;\n }\n else if (next.startsWith(\"<\")) {\n return Math.max(0, prev + parseFloat(next.slice(1)));\n }\n else {\n return labels.get(next) ?? current;\n }\n}\n\nexport { calcNextTime };\n//# sourceMappingURL=calc-time.mjs.map\n","import { mixNumber } from 'motion-dom';\nimport { getEasingForSegment, removeItem } from 'motion-utils';\n\nfunction eraseKeyframes(sequence, startTime, endTime) {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i];\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe);\n // If we remove this item we have to push the pointer back one\n i--;\n }\n }\n}\nfunction addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime);\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n });\n }\n}\n\nexport { addKeyframes, eraseKeyframes };\n//# sourceMappingURL=edit.mjs.map\n","/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n *\n * `repeatDelayUnits` is the repeatDelay expressed in units of a single\n * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`.\n */\nfunction normalizeTimes(times, repeat, repeatDelayUnits = 0) {\n const totalUnits = repeat + 1 + repeat * repeatDelayUnits;\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / totalUnits;\n }\n}\n\nexport { normalizeTimes };\n//# sourceMappingURL=normalize-times.mjs.map\n","function compareByTime(a, b) {\n if (a.at === b.at) {\n if (a.value === null)\n return 1;\n if (b.value === null)\n return -1;\n return 0;\n }\n else {\n return a.at - b.at;\n }\n}\n\nexport { compareByTime };\n//# sourceMappingURL=sort.mjs.map\n","import { isMotionValue, defaultOffset, isGenerator, createGeneratorEasing, fillOffset } from 'motion-dom';\nimport { progress, secondsToMilliseconds, warning, reverseEasing, getEasingForSegment } from 'motion-utils';\nimport { resolveSubjects } from '../animate/resolve-subjects.mjs';\nimport { calculateRepeatDuration } from './utils/calc-repeat-duration.mjs';\nimport { calcNextTime } from './utils/calc-time.mjs';\nimport { addKeyframes } from './utils/edit.mjs';\nimport { normalizeTimes } from './utils/normalize-times.mjs';\nimport { compareByTime } from './utils/sort.mjs';\n\nconst defaultSegmentEasing = \"easeInOut\";\nconst MAX_REPEAT = 20;\nfunction createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) {\n const defaultDuration = defaultTransition.duration || 0.3;\n const animationDefinitions = new Map();\n const sequences = new Map();\n const elementCache = {};\n const timeLabels = new Map();\n let prevTime = 0;\n let currentTime = 0;\n let totalDuration = 0;\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i];\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime);\n continue;\n }\n else if (!Array.isArray(segment)) {\n timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels));\n continue;\n }\n let [subject, keyframes, transition = {}] = segment;\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels);\n }\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0;\n const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes);\n const { delay = 0, times = defaultOffset(valueKeyframesAsList), type = defaultTransition.type || \"keyframes\", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition;\n let { ease = defaultTransition.ease || \"easeOut\", duration } = valueTransition;\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay = typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay;\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length;\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type || \"keyframes\"];\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100;\n if (numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)) {\n const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0];\n absoluteDelta = Math.abs(delta);\n }\n const springTransition = {\n ...defaultTransition,\n ...remainingTransition,\n };\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration);\n }\n const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);\n ease = springEasing.ease;\n duration = springEasing.duration;\n }\n duration ?? (duration = defaultDuration);\n const startTime = currentTime + calculatedDelay;\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1;\n }\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length;\n remainder > 0 && fillOffset(times, remainder);\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null);\n /**\n * Segments can't express `repeat: Infinity` or very large\n * counts — they'd leave dead time after the segment or\n * explode the keyframe array. Ignore with a warning.\n */\n if (repeat) {\n warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`);\n }\n if (repeat && repeat < MAX_REPEAT) {\n /**\n * Express repeatDelay in units of a single iteration's duration\n * so it can be added to the per-iteration time offsets below\n * before they're normalized to 0-1.\n */\n const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0;\n duration = calculateRepeatDuration(duration, repeat, repeatDelay);\n const originalKeyframes = [...valueKeyframesAsList];\n const originalTimes = [...times];\n ease = Array.isArray(ease) ? [...ease] : [ease];\n const originalEase = [...ease];\n /**\n * For reverse/mirror, alternate iterations play the segment\n * backwards. mirror matches JSAnimation's mirroredGenerator:\n * reversed keyframes, easings unchanged. reverse matches\n * JSAnimation's iterationProgress = 1 - p: reversed\n * keyframes, easing array reversed AND each function easing\n * mapped through reverseEasing (string easings unchanged —\n * they're resolved later by the keyframes engine).\n */\n const isFlipping = repeatType === \"reverse\" || repeatType === \"mirror\";\n let flippedKeyframes = originalKeyframes;\n let flippedEases = originalEase;\n if (isFlipping) {\n flippedKeyframes = [...originalKeyframes].reverse();\n if (repeatType === \"reverse\") {\n flippedEases = [...originalEase]\n .reverse()\n .map((e) => typeof e === \"function\"\n ? reverseEasing(e)\n : e);\n }\n }\n for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) {\n const isFlipped = isFlipping && repeatIndex % 2 === 0;\n const iterKeyframes = isFlipped\n ? flippedKeyframes\n : originalKeyframes;\n const iterEase = isFlipped ? flippedEases : originalEase;\n const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits);\n /**\n * If repeatDelay is set, hold the previous iteration's\n * final value through the delay by inserting a keyframe\n * at the moment the next iteration begins.\n */\n if (repeatDelayUnits > 0) {\n valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]);\n times.push(iterStartOffset);\n ease.push(\"linear\");\n }\n valueKeyframesAsList.push(...iterKeyframes);\n for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) {\n times.push(originalTimes[keyframeIndex] + iterStartOffset);\n ease.push(keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(iterEase, keyframeIndex - 1));\n }\n }\n normalizeTimes(times, repeat, repeatDelayUnits);\n }\n const targetTime = startTime + duration;\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime);\n maxDuration = Math.max(calculatedDelay + duration, maxDuration);\n totalDuration = Math.max(targetTime, totalDuration);\n };\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences);\n resolveValueSequence(keyframes, transition, getValueSequence(\"default\", subjectSequence));\n }\n else {\n const subjects = resolveSubjects(subject, keyframes, scope, elementCache);\n const numSubjects = subjects.length;\n /**\n * For every element in this segment, process the defined values.\n */\n for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes;\n transition = transition;\n const thisSubject = subjects[subjectIndex];\n const subjectSequence = getSubjectSequence(thisSubject, sequences);\n for (const key in keyframes) {\n resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects);\n }\n }\n }\n prevTime = currentTime;\n currentTime += maxDuration;\n }\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key];\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime);\n const keyframes = [];\n const valueOffset = [];\n const valueEasing = [];\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i];\n keyframes.push(value);\n valueOffset.push(progress(0, totalDuration, at));\n valueEasing.push(easing || \"easeOut\");\n }\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0);\n keyframes.unshift(keyframes[0]);\n valueEasing.unshift(defaultSegmentEasing);\n }\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1);\n keyframes.push(null);\n }\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n });\n }\n const definition = animationDefinitions.get(element);\n definition.keyframes[key] = keyframes;\n /**\n * Exclude `type` from defaultTransition since springs have been\n * converted to duration-based easing functions in resolveValueSequence.\n * Including `type: \"spring\"` would cause JSAnimation to error when\n * the merged keyframes array has more than 2 keyframes.\n */\n const { type: _type, ...remainingDefaultTransition } = defaultTransition;\n definition.transition[key] = {\n ...remainingDefaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n };\n }\n });\n return animationDefinitions;\n}\nfunction getSubjectSequence(subject, sequences) {\n !sequences.has(subject) && sequences.set(subject, {});\n return sequences.get(subject);\n}\nfunction getValueSequence(name, sequences) {\n if (!sequences[name])\n sequences[name] = [];\n return sequences[name];\n}\nfunction keyframesAsList(keyframes) {\n return Array.isArray(keyframes) ? keyframes : [keyframes];\n}\nfunction getValueTransition(transition, key) {\n return transition && transition[key]\n ? {\n ...transition,\n ...transition[key],\n }\n : { ...transition };\n}\nconst isNumber = (keyframe) => typeof keyframe === \"number\";\nconst isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber);\n\nexport { createAnimationsFromSequence, getValueTransition };\n//# sourceMappingURL=create.mjs.map\n","import { isSVGElement, isSVGSVGElement, SVGVisualElement, HTMLVisualElement, visualElementStore, ObjectVisualElement } from 'motion-dom';\n\nfunction createDOMVisualElement(element) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n attrs: {},\n },\n latestValues: {},\n },\n };\n const node = isSVGElement(element) && !isSVGSVGElement(element)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options);\n node.mount(element);\n visualElementStore.set(element, node);\n}\nfunction createObjectVisualElement(subject) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n output: {},\n },\n latestValues: {},\n },\n };\n const node = new ObjectVisualElement(options);\n node.mount(subject);\n visualElementStore.set(subject, node);\n}\n\nexport { createDOMVisualElement, createObjectVisualElement };\n//# sourceMappingURL=create-visual-element.mjs.map\n","import { animateSingleValue, visualElementStore, animateTarget, isMotionValue } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { createDOMVisualElement, createObjectVisualElement } from '../utils/create-visual-element.mjs';\nimport { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';\nimport { resolveSubjects } from './resolve-subjects.mjs';\n\nfunction isSingleValue(subject, keyframes) {\n return (isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes)));\n}\n/**\n * Implementation\n */\nfunction animateSubject(subject, keyframes, options, scope) {\n const animations = [];\n if (isSingleValue(subject, keyframes)) {\n animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes)\n ? keyframes.default || keyframes\n : keyframes, options ? options.default || options : options));\n }\n else {\n // Gracefully handle null/undefined subjects (e.g., from querySelector returning null)\n if (subject == null) {\n return animations;\n }\n const subjects = resolveSubjects(subject, keyframes, scope);\n const numSubjects = subjects.length;\n invariant(Boolean(numSubjects), \"No valid elements provided.\", \"no-valid-elements\");\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i];\n const createVisualElement = thisSubject instanceof Element\n ? createDOMVisualElement\n : createObjectVisualElement;\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject);\n }\n const visualElement = visualElementStore.get(thisSubject);\n const transition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (\"delay\" in transition &&\n typeof transition.delay === \"function\") {\n transition.delay = transition.delay(i, numSubjects);\n }\n animations.push(...animateTarget(visualElement, { ...keyframes, transition }, {}));\n }\n }\n return animations;\n}\n\nexport { animateSubject };\n//# sourceMappingURL=subject.mjs.map\n","import { motionValue, spring } from 'motion-dom';\nimport { createAnimationsFromSequence } from '../sequence/create.mjs';\nimport { animateSubject } from './subject.mjs';\n\nfunction animateSequence(sequence, options, scope) {\n const animations = [];\n /**\n * Pre-process: replace function segments with MotionValue segments,\n * subscribe callbacks immediately\n */\n const processedSequence = sequence.map((segment) => {\n if (Array.isArray(segment) && typeof segment[0] === \"function\") {\n const callback = segment[0];\n const mv = motionValue(0);\n mv.on(\"change\", callback);\n if (segment.length === 1) {\n return [mv, [0, 1]];\n }\n else if (segment.length === 2) {\n return [mv, [0, 1], segment[1]];\n }\n else {\n return [mv, segment[1], segment[2]];\n }\n }\n return segment;\n });\n const animationDefinitions = createAnimationsFromSequence(processedSequence, options, scope, { spring });\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {\n animations.push(...animateSubject(subject, keyframes, transition));\n });\n return animations;\n}\n\nexport { animateSequence };\n//# sourceMappingURL=sequence.mjs.map\n","import { GroupAnimationWithThen } from 'motion-dom';\nimport { removeItem } from 'motion-utils';\nimport { animateSequence } from './sequence.mjs';\nimport { animateSubject } from './subject.mjs';\n\nfunction isSequence(value) {\n return Array.isArray(value) && value.some(Array.isArray);\n}\n/**\n * Creates an animation function that is optionally scoped\n * to a specific element.\n */\nfunction createScopedAnimate(options = {}) {\n const { scope, reduceMotion, skipAnimations } = options;\n /**\n * Implementation\n */\n function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {\n let animations = [];\n let animationOnComplete;\n const inherited = {};\n if (reduceMotion !== undefined)\n inherited.reduceMotion = reduceMotion;\n if (skipAnimations !== undefined)\n inherited.skipAnimations = skipAnimations;\n if (isSequence(subjectOrSequence)) {\n const { onComplete, ...sequenceOptions } = optionsOrKeyframes || {};\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete;\n }\n animations = animateSequence(subjectOrSequence, { ...inherited, ...sequenceOptions }, scope);\n }\n else {\n // Extract top-level onComplete so it doesn't get applied per-value\n const { onComplete, ...rest } = options || {};\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete;\n }\n animations = animateSubject(subjectOrSequence, optionsOrKeyframes, { ...inherited, ...rest }, scope);\n }\n const animation = new GroupAnimationWithThen(animations);\n if (animationOnComplete) {\n animation.finished.then(animationOnComplete);\n }\n if (scope) {\n scope.animations.push(animation);\n animation.finished.then(() => {\n removeItem(scope.animations, animation);\n });\n }\n return animation;\n }\n return scopedAnimate;\n}\nconst animate = createScopedAnimate();\n\nexport { animate, createScopedAnimate };\n//# sourceMappingURL=index.mjs.map\n","import { resolveElements, getValueTransition, getAnimationMap, animationMapKey, getComputedStyle, fillWildcards, applyPxDefaults, NativeAnimation } from 'motion-dom';\nimport { invariant, secondsToMilliseconds } from 'motion-utils';\n\nfunction animateElements(elementOrSelector, keyframes, options, scope) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return [];\n }\n const elements = resolveElements(elementOrSelector, scope);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid elements provided.\", \"no-valid-elements\");\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions = [];\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n const elementTransition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements);\n }\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName];\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes];\n }\n const valueOptions = {\n ...getValueTransition(elementTransition, valueName),\n };\n valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration));\n valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay));\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element);\n const key = animationMapKey(valueName, valueOptions.pseudoElement || \"\");\n const currentAnimation = map.get(key);\n currentAnimation && currentAnimation.stop();\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten: !elementTransition.type && !elementTransition.ease,\n },\n });\n }\n }\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];\n const { element, name, pseudoElement } = animationOptions;\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name);\n }\n fillWildcards(unresolvedKeyframes);\n applyPxDefaults(unresolvedKeyframes, name);\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name));\n }\n animationOptions.keyframes = unresolvedKeyframes;\n }\n /**\n * Step 3: Create new animations (write)\n */\n const animations = [];\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i];\n const animation = new NativeAnimation(animationOptions);\n map.set(key, animation);\n animation.finished.finally(() => map.delete(key));\n animations.push(animation);\n }\n return animations;\n}\n\nexport { animateElements };\n//# sourceMappingURL=animate-elements.mjs.map\n","import { GroupAnimationWithThen } from 'motion-dom';\nimport { animateElements } from './animate-elements.mjs';\n\nconst createScopedWaapiAnimate = (scope) => {\n function scopedAnimate(elementOrSelector, keyframes, options) {\n return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope));\n }\n return scopedAnimate;\n};\nconst animateMini = /*@__PURE__*/ createScopedWaapiAnimate();\n\nexport { animateMini, createScopedWaapiAnimate };\n//# sourceMappingURL=animate-style.mjs.map\n","import {\n type AnimationPlaybackControls,\n} from 'motion';\n\ntype MotionHandle = PromiseLike<void> & {\n finished: Promise<void>;\n cancel(): void;\n stop(): void;\n complete(): void;\n};\n\nconst motionHandle = (\n finished: Promise<void>,\n controls: Pick<MotionHandle, 'cancel' | 'stop' | 'complete'>,\n): MotionHandle => ({\n finished,\n then: finished.then.bind(finished),\n ...controls,\n});\n\nconst noopHandle = (run?: () => void | Promise<void>): MotionHandle => {\n const finished = (async () => {\n await run?.();\n })();\n\n return motionHandle(finished, {\n cancel() {},\n stop() {},\n complete() {},\n });\n};\n\nconst toMotionHandle = (\n controls: Pick<AnimationPlaybackControls, 'finished' | 'cancel' | 'stop' | 'complete'>,\n cleanup?: () => void,\n): MotionHandle => {\n let didCleanup = false;\n const clean = (): void => {\n if (didCleanup) return;\n didCleanup = true;\n cleanup?.();\n };\n\n const finished = controls.finished.then(() => {}, () => {}).finally(clean);\n return motionHandle(finished, {\n cancel() {\n controls.cancel();\n clean();\n },\n stop() {\n controls.stop();\n clean();\n },\n complete() {\n controls.complete();\n clean();\n },\n });\n};\n\nconst parallel = (...handles: MotionHandle[]): MotionHandle => motionHandle(\n Promise.allSettled(handles.map((handle) => handle.finished)).then(() => {}),\n {\n cancel() {\n handles.forEach((handle) => handle.cancel());\n },\n stop() {\n handles.forEach((handle) => handle.stop());\n },\n complete() {\n handles.forEach((handle) => handle.complete());\n },\n },\n);\n\nconst sequential = (...steps: Array<() => MotionHandle>): MotionHandle => {\n let cancelled = false;\n let completing = false;\n let current: MotionHandle | null = null;\n\n const finished = (async () => {\n for (const step of steps) {\n if (cancelled) break;\n current = step();\n if (completing) current.complete();\n await current.finished.catch(() => {});\n }\n })();\n\n return motionHandle(finished, {\n cancel() {\n cancelled = true;\n current?.cancel();\n },\n stop() {\n cancelled = true;\n current?.stop();\n },\n complete() {\n completing = true;\n current?.complete();\n },\n });\n};\n\nexport {\n motionHandle,\n noopHandle,\n parallel,\n sequential,\n toMotionHandle,\n};\nexport type {MotionHandle};\n","import type {AnimationOptions, DOMKeyframesDefinition} from 'motion';\n\ntype MotionPreference = 'user' | 'always' | 'never';\n\nconst reducedMotionQuery = '(prefers-reduced-motion: reduce)';\n\nconst prefersReducedMotion = (): boolean => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;\n return window.matchMedia(reducedMotionQuery).matches;\n};\n\nconst shouldReduceMotion = (preference: MotionPreference = 'user'): boolean => {\n if (preference === 'always') return true;\n if (preference === 'never') return false;\n return prefersReducedMotion();\n};\n\nconst withReducedMotion = <T extends AnimationOptions>(\n options: T,\n reducedOptions: Partial<T> = {},\n preference: MotionPreference = 'user',\n): T => {\n if (!shouldReduceMotion(preference)) return options;\n\n return {\n ...options,\n duration: 0,\n ...reducedOptions,\n };\n};\n\nconst reduceKeyframes = (keyframes: DOMKeyframesDefinition): DOMKeyframesDefinition => {\n const reduced: DOMKeyframesDefinition = {};\n if ('opacity' in keyframes) reduced.opacity = keyframes.opacity;\n return reduced;\n};\n\nexport {\n prefersReducedMotion,\n reducedMotionQuery,\n reduceKeyframes,\n shouldReduceMotion,\n withReducedMotion,\n};\nexport type {MotionPreference};\n","import {animate, motionValue, type MotionValue, type ValueAnimationTransition} from 'motion';\nimport {noopHandle, parallel, toMotionHandle, type MotionHandle} from './animate';\nimport {shouldReduceMotion, type MotionPreference} from './reduced-motion';\n\ntype ControllerScalar = string | number;\ntype ControllerValues = Record<string, ControllerScalar>;\ntype ControllerValueDefinition<T extends ControllerScalar> = T | Readonly<{\n initial: T;\n transition?: ValueAnimationTransition<T>;\n}>;\ntype ControllerDefinitions = Record<string, ControllerValueDefinition<ControllerScalar>>;\ntype Widen<T> = T extends number ? number : T extends string ? string : never;\ntype DefinitionValue<T> = T extends {initial: infer Initial} ? Widen<Initial> : Widen<T>;\ntype ControllerState<T extends ControllerDefinitions> = {\n [K in keyof T]: DefinitionValue<T[K]>;\n};\ntype StyleProjection<T extends ControllerValues> = (values: Readonly<T>) => Readonly<Record<string, string | number>>;\ntype ControllerOptions<T extends ControllerDefinitions> = Readonly<{\n values: T;\n style: StyleProjection<ControllerState<T>>;\n reducedMotion?: MotionPreference;\n}>;\ntype Controller<T extends ControllerValues> = {\n mount(element: HTMLElement): () => void;\n set(values: Partial<T>): void;\n animate(values: Partial<T>, transition?: ValueAnimationTransition): MotionHandle;\n current(): Readonly<T>;\n destroy(): void;\n};\n\nconst isDefinition = <T extends ControllerScalar>(\n value: ControllerValueDefinition<T>,\n): value is Extract<ControllerValueDefinition<T>, {initial: T}> => (\n typeof value === 'object' && value !== null && 'initial' in value\n);\n\nconst createController = <T extends ControllerDefinitions>(\n options: ControllerOptions<T>,\n): Controller<ControllerState<T>> => {\n type State = ControllerState<T>;\n const values = {} as {[K in keyof T]: MotionValue<State[K]>};\n const transitions = new Map<keyof T, ValueAnimationTransition>();\n const active = new Map<keyof T, MotionHandle>();\n let unmount: (() => void) | undefined;\n\n (Object.keys(options.values) as Array<keyof T>).forEach((key) => {\n const definition = options.values[key]!;\n const initial = (isDefinition(definition) ? definition.initial : definition) as State[typeof key];\n values[key] = motionValue<State[typeof key]>(initial);\n if (isDefinition(definition) && definition.transition) transitions.set(key, definition.transition);\n });\n\n const current = (): Readonly<State> => Object.fromEntries(\n (Object.keys(values) as Array<keyof T>).map((key) => [key, values[key].get()]),\n ) as unknown as State;\n\n const stop = (key: keyof T): void => {\n active.get(key)?.stop();\n active.delete(key);\n };\n\n const set = (next: Partial<State>): void => {\n (Object.keys(next) as Array<keyof T>).forEach((key) => {\n const value = next[key];\n if (value === undefined || !values[key]) return;\n stop(key);\n values[key].set(value);\n });\n };\n\n const animateTo = (next: Partial<State>, transition?: ValueAnimationTransition): MotionHandle => {\n if (shouldReduceMotion(options.reducedMotion)) {\n set(next);\n return noopHandle();\n }\n\n const handles = (Object.keys(next) as Array<keyof T>).flatMap((key): MotionHandle[] => {\n const destination = next[key];\n if (destination === undefined || !values[key]) return [];\n stop(key);\n const handle = toMotionHandle(animate(\n values[key],\n destination,\n {...transitions.get(key), ...transition},\n ));\n active.set(key, handle);\n void handle.finished.finally(() => {\n if (active.get(key) === handle) active.delete(key);\n });\n return [handle];\n });\n\n return handles.length ? parallel(...handles) : noopHandle();\n };\n\n const mount = (element: HTMLElement): (() => void) => {\n unmount?.();\n const baselines = new Map<string, string>();\n const project = (): void => {\n Object.entries(options.style(current())).forEach(([property, value]) => {\n if (!baselines.has(property)) {\n baselines.set(property, property.startsWith('--')\n ? element.style.getPropertyValue(property)\n : String(element.style[property as never] ?? ''));\n }\n if (property.startsWith('--')) element.style.setProperty(property, String(value));\n else element.style[property as never] = String(value) as never;\n });\n };\n const subscriptions = Object.values(values).map((value) => value.on('change', project));\n project();\n\n let mounted = true;\n const cleanup = (): void => {\n if (!mounted) return;\n mounted = false;\n subscriptions.forEach((unsubscribe) => unsubscribe());\n baselines.forEach((baseline, property) => {\n if (property.startsWith('--')) element.style.setProperty(property, baseline);\n else element.style[property as never] = baseline as never;\n });\n if (unmount === cleanup) unmount = undefined;\n };\n unmount = cleanup;\n return cleanup;\n };\n\n const destroy = (): void => {\n unmount?.();\n active.forEach((handle) => handle.cancel());\n active.clear();\n };\n\n return {mount, set, animate: animateTo, current, destroy};\n};\n\nexport {createController};\nexport type {\n Controller,\n ControllerDefinitions,\n ControllerOptions,\n ControllerScalar,\n ControllerState,\n ControllerValueDefinition,\n ControllerValues,\n StyleProjection,\n};\n","import type {MotionHandle} from './animate';\n\ntype MotionProperty = string;\n\ntype ActiveMotion = Readonly<{\n handle: MotionHandle;\n properties: ReadonlySet<MotionProperty>;\n}>;\n\nconst activeMotions = new WeakMap<Element, ActiveMotion>();\n\nconst activeMotion = (element: Element): ActiveMotion | undefined => activeMotions.get(element);\n\nconst replaceMotion = (element: Element): ActiveMotion | undefined => {\n const previous = activeMotions.get(element);\n previous?.handle.stop();\n return previous;\n};\n\nconst registerMotion = (element: Element, motion: ActiveMotion): void => {\n activeMotions.set(element, motion);\n};\n\nconst releaseMotion = (element: Element, handle: MotionHandle): void => {\n if (activeMotions.get(element)?.handle === handle) activeMotions.delete(element);\n};\n\nexport {activeMotion, registerMotion, releaseMotion, replaceMotion};\nexport type {ActiveMotion, MotionProperty};\n","import type {AnimationPlaybackControls} from 'motion';\nimport {motionHandle, toMotionHandle, type MotionHandle} from './animate';\nimport {\n activeMotion,\n registerMotion,\n releaseMotion,\n replaceMotion,\n type ActiveMotion,\n type MotionProperty,\n} from './registry';\n\nconst ownMotion = (\n element: Element,\n start: (previous?: ActiveMotion) => Pick<AnimationPlaybackControls, 'finished' | 'cancel' | 'stop' | 'complete'>,\n properties: ReadonlySet<MotionProperty>,\n signal?: AbortSignal | null,\n cleanup?: () => void,\n): MotionHandle => {\n const previous = replaceMotion(element);\n const controls = toMotionHandle(start(previous));\n const stopForAbort = (): void => controls.stop();\n signal?.addEventListener('abort', stopForAbort, {once: true});\n\n let handle!: MotionHandle;\n const release = (): void => {\n signal?.removeEventListener('abort', stopForAbort);\n if (activeMotion(element)?.handle === handle) cleanup?.();\n releaseMotion(element, handle);\n };\n handle = motionHandle(controls.finished.finally(release), {\n cancel() {\n controls.cancel();\n release();\n },\n stop() {\n controls.stop();\n release();\n },\n complete() {\n controls.complete();\n },\n });\n registerMotion(element, {handle, properties});\n return handle;\n};\n\nexport {ownMotion};\n","import type {AnimationOptions, DOMKeyframesDefinition} from 'motion';\n\ntype MotionSpeedName = 'fast' | 'moderate' | 'slow';\ntype DurationSpeed = Readonly<{duration: number; bounce?: number}>;\ntype PhysicsSpeed = Readonly<{stiffness: number; damping: number; mass?: number}>;\ntype MotionSpeed = MotionSpeedName | DurationSpeed | PhysicsSpeed;\ntype MotionKeyframes<T> = T | readonly T[];\ntype MotionKeyframePreset = Readonly<DOMKeyframesDefinition>;\ntype MotionTransition = Readonly<AnimationOptions>;\n\nconst speeds = Object.freeze({\n fast: Object.freeze({duration: 0.08, bounce: 0}),\n moderate: Object.freeze({duration: 0.16, bounce: 0}),\n slow: Object.freeze({duration: 0.24, bounce: 0}),\n});\n\nconst easings = {\n out: [0.23, 1, 0.32, 1],\n inOut: [0.77, 0, 0.175, 1],\n} as const;\n\nconst presets = Object.freeze({\n opacity: Object.freeze({\n in: Object.freeze({opacity: Object.freeze([0, 1])}) as MotionKeyframePreset,\n out: Object.freeze({opacity: Object.freeze([1, 0])}) as MotionKeyframePreset,\n }),\n popover: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n scale: Object.freeze([0.97, 1]),\n }) as MotionKeyframePreset,\n out: Object.freeze({\n opacity: Object.freeze([1, 0]),\n scale: Object.freeze([1, 0.97]),\n }) as MotionKeyframePreset,\n }),\n modal: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n y: Object.freeze([8, 0]),\n scale: Object.freeze([0.98, 1]),\n }) as MotionKeyframePreset,\n out: Object.freeze({\n opacity: Object.freeze([1, 0]),\n y: Object.freeze([0, 8]),\n scale: Object.freeze([1, 0.98]),\n }) as MotionKeyframePreset,\n }),\n toast: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n transform: Object.freeze([\n 'translateY(calc(var(--ui-toast-stack-offset, 0px) + var(--ui-toast-outside, -100%))) scale(var(--ui-toast-stack-scale, 1))',\n 'translateY(var(--ui-toast-stack-offset, 0px)) scale(var(--ui-toast-stack-scale, 1))',\n ]),\n }) as MotionKeyframePreset,\n out: Object.freeze({\n opacity: 0,\n transform: 'translateY(calc(var(--ui-toast-stack-offset, 0px) + var(--ui-toast-outside, -100%))) scale(var(--ui-toast-stack-scale, 1))',\n }) as MotionKeyframePreset,\n }),\n});\n\nconst speedOptions = (speed: MotionSpeed = 'moderate'): DurationSpeed | PhysicsSpeed => (\n typeof speed === 'string' ? speeds[speed] : speed\n);\n\nconst finalKeyframe = <T>(keyframes: MotionKeyframes<T>): T => (\n Array.isArray(keyframes)\n ? (keyframes as readonly T[])[keyframes.length - 1] as T\n : keyframes as T\n);\n\nconst mutableKeyframes = <T>(keyframes: MotionKeyframes<T>): T | T[] => (\n Array.isArray(keyframes) ? [...keyframes] as T[] : keyframes as T\n);\n\nexport {easings, finalKeyframe, mutableKeyframes, presets, speedOptions, speeds};\nexport type {\n DurationSpeed,\n MotionKeyframePreset,\n MotionKeyframes,\n MotionSpeed,\n MotionSpeedName,\n MotionTransition,\n PhysicsSpeed,\n};\n","type MotionTransitionSubject = Readonly<{\n el: unknown;\n root: unknown;\n signal: AbortSignal;\n}>;\n\ntype MotionSubject = Element | MotionTransitionSubject;\n\nconst isTransitionSubject = (subject: MotionSubject): subject is MotionTransitionSubject => (\n !(subject instanceof Element)\n && subject !== null\n && typeof subject === 'object'\n && 'signal' in subject\n);\n\nconst subjectElement = (subject: MotionSubject): Element => {\n const element = subject instanceof Element ? subject : subject.el;\n if (!(element instanceof Element)) throw new TypeError('Motion subject requires an Element target.');\n return element;\n};\n\nconst resolveMotionTarget = (subject: MotionSubject, target?: Element | string): Element => {\n const element = subjectElement(subject);\n if (!target) return element;\n if (target instanceof Element) return target;\n\n const root = isTransitionSubject(subject) ? subject.root : element;\n if (!(root instanceof Element)) throw new TypeError('Motion transition subject requires an Element root.');\n const resolved = root.matches(target) ? root : root.querySelector(target);\n if (!resolved) throw new Error(`Motion target not found: ${target}`);\n return resolved;\n};\n\nconst motionSignal = (subject: MotionSubject): AbortSignal | null => (\n isTransitionSubject(subject) ? subject.signal : null\n);\n\nexport {motionSignal, resolveMotionTarget};\nexport type {MotionSubject, MotionTransitionSubject};\n","import {animate} from 'motion/mini';\nimport {spring} from 'motion';\nimport {motionHandle, noopHandle, toMotionHandle, type MotionHandle} from './animate';\nimport {activeMotion, registerMotion, releaseMotion, replaceMotion, type MotionProperty} from './registry';\nimport {shouldReduceMotion} from './reduced-motion';\nimport {\n finalKeyframe,\n easings,\n mutableKeyframes,\n speedOptions,\n speeds,\n type MotionKeyframes,\n type MotionSpeed,\n} from './recipe';\nimport {motionSignal, resolveMotionTarget, type MotionSubject} from './subject';\n\ntype ResizeDestination = 'content' | 'collapsed';\n\ntype ResizeOptions = Readonly<{\n from: ResizeDestination;\n measure?: Element | string;\n opacity?: MotionKeyframes<number>;\n speed?: MotionSpeed;\n target?: Element | string;\n to: ResizeDestination;\n}>;\n\ntype ResizeBaseline = Readonly<{\n height: string;\n opacity: string;\n overflow: string;\n willChange: string;\n}>;\n\nconst baselines = new WeakMap<HTMLElement, ResizeBaseline>();\nconst resize = (subject: MotionSubject, options: ResizeOptions): MotionHandle => {\n const target = resolveMotionTarget(subject, options.target);\n if (!(target instanceof HTMLElement)) throw new TypeError('Motion resize requires an HTMLElement target.');\n const measure = resolveMotionTarget(subject, options.measure ?? target);\n if (measure === target) throw new Error('Motion resize requires a separate measurement element.');\n if (!(measure instanceof HTMLElement)) throw new TypeError('Motion resize measurement requires an HTMLElement.');\n\n const signal = motionSignal(subject);\n if (signal?.aborted) return noopHandle();\n\n const previous = replaceMotion(target);\n if (!baselines.has(target)) {\n baselines.set(target, {\n height: target.style.height,\n opacity: target.style.opacity,\n overflow: target.style.overflow,\n willChange: target.style.willChange,\n });\n }\n\n const contentHeight = Math.max(measure.scrollHeight, measure.getBoundingClientRect().height);\n const from = previous?.properties.has('block-size')\n ? target.getBoundingClientRect().height\n : options.from === 'content' ? contentHeight : 0;\n const to = options.to === 'content' ? contentHeight : 0;\n const reduced = shouldReduceMotion();\n const speed = speedOptions(reduced ? 'fast' : options.speed);\n const keyframes: {height?: number[]; opacity?: number | number[]} = {};\n const properties = new Set<MotionProperty>();\n\n target.style.overflow = 'hidden';\n target.style.willChange = reduced ? 'opacity' : 'height, opacity';\n if (!reduced) {\n keyframes.height = [from, to];\n properties.add('block-size');\n }\n else target.style.height = `${to}px`;\n if (options.opacity !== undefined) {\n keyframes.opacity = previous?.properties.has('opacity')\n ? finalKeyframe(options.opacity)\n : mutableKeyframes(options.opacity);\n properties.add('opacity');\n }\n\n const controls = toMotionHandle(animate(target, keyframes, reduced ? {\n duration: 'duration' in speed ? speed.duration : speeds.fast.duration,\n ease: easings.out,\n } : {\n type: spring,\n ...speed,\n }));\n const stopForAbort = (): void => controls.stop();\n signal?.addEventListener('abort', stopForAbort, {once: true});\n\n let handle!: MotionHandle;\n const cleanup = (): void => {\n signal?.removeEventListener('abort', stopForAbort);\n if (activeMotion(target)?.handle !== handle) return;\n const baseline = baselines.get(target);\n if (baseline) Object.assign(target.style, baseline);\n baselines.delete(target);\n releaseMotion(target, handle);\n };\n handle = motionHandle(controls.finished.finally(cleanup), {\n cancel() {\n controls.cancel();\n cleanup();\n },\n stop() {\n controls.stop();\n },\n complete() {\n controls.complete();\n },\n });\n registerMotion(target, {handle, properties});\n return handle;\n};\n\nexport {resize};\nexport type {ResizeDestination, ResizeOptions};\n","import {animate, spring, type AnimationOptions, type DOMKeyframesDefinition} from 'motion';\nimport {noopHandle, parallel, sequential, type MotionHandle} from './animate';\nimport {ownMotion} from './owned';\nimport {\n finalKeyframe,\n easings,\n speedOptions,\n type MotionSpeed,\n type MotionTransition,\n type PhysicsSpeed,\n} from './recipe';\nimport {resize, type ResizeOptions} from './resize';\nimport {shouldReduceMotion} from './reduced-motion';\nimport {motionSignal, resolveMotionTarget, type MotionSubject} from './subject';\n\ntype MotionTarget = Element | string;\ntype AnimateSegment = Readonly<{\n kind: 'animate';\n target?: MotionTarget;\n keyframes: Readonly<DOMKeyframesDefinition>;\n speed?: MotionSpeed;\n transition?: MotionTransition;\n}>;\ntype ResizeSegment = Readonly<{\n kind: 'resize';\n options: ResizeOptions;\n speed?: MotionSpeed;\n}>;\ntype MotionSegment = AnimateSegment | ResizeSegment;\ntype MotionStage = readonly MotionSegment[];\ntype MotionDefaults = Readonly<{\n speed?: MotionSpeed;\n transition?: MotionTransition;\n}>;\ntype MotionPlanOptions = Readonly<{\n speed?: MotionSpeed;\n transition?: MotionTransition;\n}>;\n\nconst cloneKeyframes = (keyframes: Readonly<DOMKeyframesDefinition>): DOMKeyframesDefinition => Object.fromEntries(\n Object.entries(keyframes).map(([property, value]) => [\n property,\n Array.isArray(value) ? [...value] : value,\n ]),\n) as DOMKeyframesDefinition;\n\nconst retargetKeyframes = (\n keyframes: Readonly<DOMKeyframesDefinition>,\n activeProperties: ReadonlySet<string> = new Set(),\n): DOMKeyframesDefinition => Object.fromEntries(\n Object.entries(cloneKeyframes(keyframes)).map(([property, value]) => [\n property,\n activeProperties.has(property) && Array.isArray(value) ? finalKeyframe(value) : value,\n ]),\n) as DOMKeyframesDefinition;\n\nconst spatialProperties = new Set([\n 'bottom', 'filter', 'height', 'inset', 'insetBlock', 'insetInline', 'left', 'right', 'top', 'transform', 'width',\n 'translate', 'x', 'y', 'z', 'scale', 'scaleX', 'scaleY', 'rotate', 'rotateX', 'rotateY', 'skew', 'skewX', 'skewY',\n]);\n\nconst reducedKeyframes = (keyframes: Readonly<DOMKeyframesDefinition>): DOMKeyframesDefinition => Object.fromEntries(\n Object.entries(cloneKeyframes(keyframes)).flatMap(([property, value]) => {\n if (spatialProperties.has(property)) return [];\n return [[property, value]];\n }),\n) as DOMKeyframesDefinition;\n\nconst reducedDestinations = (keyframes: Readonly<DOMKeyframesDefinition>): DOMKeyframesDefinition => Object.fromEntries(\n Object.entries(cloneKeyframes(keyframes)).flatMap(([property, value]) => {\n if (!spatialProperties.has(property)) return [];\n return [[property, Array.isArray(value) ? finalKeyframe(value) : value]];\n }),\n) as DOMKeyframesDefinition;\n\nconst animationOptions = (\n speed: MotionSpeed | undefined,\n transition: MotionTransition | undefined,\n reduced: boolean,\n): AnimationOptions => {\n const resolved = speedOptions(reduced ? 'fast' : speed);\n const timing: AnimationOptions = 'stiffness' in resolved\n ? {type: spring, ...(resolved as PhysicsSpeed)}\n : {duration: resolved.duration, ease: easings.out};\n return {...timing, ...transition};\n};\n\nconst animateSegment = (\n subject: MotionSubject,\n segment: AnimateSegment,\n defaults: MotionDefaults,\n): MotionHandle => {\n const target = resolveMotionTarget(subject, segment.target);\n const signal = motionSignal(subject);\n if (signal?.aborted) return noopHandle();\n\n const reduced = shouldReduceMotion();\n if (reduced) {\n const destinations = reducedDestinations(segment.keyframes);\n if (Object.keys(destinations).length > 0) animate(target, destinations, {duration: 0}).complete();\n }\n const keyframes = reduced ? reducedKeyframes(segment.keyframes) : cloneKeyframes(segment.keyframes);\n if (Object.keys(keyframes).length === 0) {\n const destination = Object.fromEntries(Object.entries(cloneKeyframes(segment.keyframes)).map(\n ([property, value]) => [property, Array.isArray(value) ? finalKeyframe(value) : value],\n )) as DOMKeyframesDefinition;\n animate(target, destination, {duration: 0}).complete();\n return noopHandle();\n }\n\n return ownMotion(target, (previous) => {\n return animate(\n target,\n retargetKeyframes(keyframes, previous?.properties),\n animationOptions(segment.speed ?? defaults.speed, {\n ...defaults.transition,\n ...segment.transition,\n }, reduced),\n );\n }, new Set(Object.keys(keyframes)), signal);\n};\n\nconst playSegment = (\n subject: MotionSubject,\n segment: MotionSegment,\n defaults: MotionDefaults,\n): MotionHandle => {\n if (segment.kind === 'animate') return animateSegment(subject, segment, defaults);\n const speed = segment.speed ?? defaults.speed ?? segment.options.speed;\n return resize(subject, speed === undefined ? segment.options : {...segment.options, speed});\n};\n\nconst parseAnimation = (\n first: MotionTarget | Readonly<DOMKeyframesDefinition>,\n second?: Readonly<DOMKeyframesDefinition>,\n): Pick<AnimateSegment, 'target' | 'keyframes'> => second === undefined\n ? {keyframes: first as Readonly<DOMKeyframesDefinition>}\n : {target: first as MotionTarget, keyframes: second};\n\nclass MotionPlan {\n readonly #subject: MotionSubject;\n readonly #stages: readonly MotionStage[];\n readonly #defaults: MotionDefaults;\n\n constructor(subject: MotionSubject, stages: readonly MotionStage[] = [], defaults: MotionDefaults = {}) {\n this.#subject = subject;\n this.#stages = stages;\n this.#defaults = defaults;\n }\n\n #append(segment: MotionSegment, parallelWithPrevious: boolean): MotionPlan {\n if (!parallelWithPrevious || this.#stages.length === 0) {\n return new MotionPlan(this.#subject, [...this.#stages, [segment]], this.#defaults);\n }\n const stages = this.#stages.slice(0, -1);\n const current = this.#stages.at(-1) ?? [];\n return new MotionPlan(this.#subject, [...stages, [...current, segment]], this.#defaults);\n }\n\n #modifyLast(update: (segment: MotionSegment) => MotionSegment): MotionPlan {\n const current = this.#stages.at(-1);\n if (!current?.length) throw new Error('Declare a motion segment before configuring it.');\n const stages = this.#stages.slice(0, -1);\n return new MotionPlan(this.#subject, [\n ...stages,\n [...current.slice(0, -1), update(current.at(-1)!)],\n ], this.#defaults);\n }\n\n animate(keyframes: Readonly<DOMKeyframesDefinition>): MotionPlan;\n animate(target: MotionTarget, keyframes: Readonly<DOMKeyframesDefinition>): MotionPlan;\n animate(\n first: MotionTarget | Readonly<DOMKeyframesDefinition>,\n second?: Readonly<DOMKeyframesDefinition>,\n ): MotionPlan {\n return this.#append({kind: 'animate', ...parseAnimation(first, second)}, false);\n }\n\n with(keyframes: Readonly<DOMKeyframesDefinition>): MotionPlan;\n with(target: MotionTarget, keyframes: Readonly<DOMKeyframesDefinition>): MotionPlan;\n with(\n first: MotionTarget | Readonly<DOMKeyframesDefinition>,\n second?: Readonly<DOMKeyframesDefinition>,\n ): MotionPlan {\n return this.#append({kind: 'animate', ...parseAnimation(first, second)}, true);\n }\n\n then(keyframes: Readonly<DOMKeyframesDefinition>): MotionPlan;\n then(target: MotionTarget, keyframes: Readonly<DOMKeyframesDefinition>): MotionPlan;\n then(\n first: MotionTarget | Readonly<DOMKeyframesDefinition>,\n second?: Readonly<DOMKeyframesDefinition>,\n ): MotionPlan {\n return this.animate(first as MotionTarget, second!);\n }\n\n resize(options: ResizeOptions): MotionPlan {\n return this.#append({kind: 'resize', options}, false);\n }\n\n speed(speed: MotionSpeed): MotionPlan {\n return this.#modifyLast((segment) => ({...segment, speed}));\n }\n\n transition(transition: MotionTransition): MotionPlan {\n return this.#modifyLast((segment) => segment.kind === 'animate'\n ? {...segment, transition: {...segment.transition, ...transition}}\n : segment);\n }\n\n defaults(options: MotionPlanOptions): MotionPlan {\n const speed = options.speed ?? this.#defaults.speed;\n const transition = {...this.#defaults.transition, ...options.transition};\n return new MotionPlan(this.#subject, this.#stages, {\n ...(speed === undefined ? {} : {speed}),\n ...(Object.keys(transition).length === 0 ? {} : {transition}),\n });\n }\n\n play(): MotionHandle {\n if (this.#stages.length === 0) return noopHandle();\n return sequential(...this.#stages.map((stage) => () => parallel(\n ...stage.map((segment) => playSegment(this.#subject, segment, this.#defaults)),\n )));\n }\n}\n\nconst createMotionPlan = (subject: MotionSubject): MotionPlan => new MotionPlan(subject);\n\nexport {createMotionPlan, MotionPlan};\nexport type {MotionDefaults, MotionPlanOptions, MotionSegment, MotionStage, MotionTarget};\n","import {\n MOTION_KEY_ATTR,\n MOTION_LAYOUT_ATTR,\n markLayoutParticipant,\n} from '../runtime/layout-participant';\n\ntype MotionTarget =\n | Element\n | string\n | {selector: string}\n | {part: string}\n | {key: string}\n | {from: MotionTarget; to: MotionTarget};\n\ntype ViewScope = Element | Document | string | Iterable<Element>;\ntype ViewTargetDefinition = Element | string;\ntype ResolvedViewTarget = {\n subject: ViewTargetDefinition;\n newSubject?: ViewTargetDefinition;\n};\n\nconst cssEscape = (value: string): string => {\n const css = globalThis.CSS as {escape?: (value: string) => string} | undefined;\n if (typeof css?.escape === 'function') return css.escape(value);\n return value.replaceAll('\\\\', '\\\\\\\\').replaceAll('\"', '\\\\\"');\n};\n\nconst keySelector = (key: string): string => `[${MOTION_KEY_ATTR}=\"${cssEscape(key)}\"]`;\nconst partSelector = (part: string): string => `[data-ui-${cssEscape(part)}]`;\n\nconst selectorForTarget = (target: MotionTarget): string | null => {\n if (target instanceof Element) return null;\n if (typeof target === 'string') return target;\n if ('selector' in target) return target.selector;\n if ('part' in target) return partSelector(target.part);\n if ('key' in target) return keySelector(target.key);\n return null;\n};\n\nconst resolveTargetDefinition = (target: MotionTarget): ViewTargetDefinition[] => {\n if (target instanceof Element) return [target];\n const selector = selectorForTarget(target);\n return selector ? [selector] : [];\n};\n\nconst resolveViewTargets = (\n scope: ViewScope = document,\n targets?: MotionTarget | MotionTarget[] | null,\n): ResolvedViewTarget[] => {\n if (!targets) return [];\n\n const list = Array.isArray(targets) ? targets : [targets];\n return list.flatMap((target): ResolvedViewTarget[] => {\n if (target instanceof Element) return [{subject: target}];\n if (typeof target === 'object' && 'from' in target) {\n const from = resolveTargetDefinition(target.from);\n const to = resolveTargetDefinition(target.to);\n return from.flatMap((subject, index) => {\n const newSubject = to[index] ?? to[0];\n return newSubject ? [{subject, newSubject}] : [];\n });\n }\n\n const selector = selectorForTarget(target);\n return selector ? [{subject: selector}] : [];\n });\n};\n\nexport {\n MOTION_KEY_ATTR,\n MOTION_LAYOUT_ATTR,\n cssEscape,\n keySelector,\n markLayoutParticipant,\n partSelector,\n resolveViewTargets,\n};\nexport type {MotionTarget, ResolvedViewTarget, ViewScope, ViewTargetDefinition};\n","import {\n animateView as motionAnimateView,\n getViewAnimations,\n type AnimationOptions,\n type DOMKeyframesDefinition,\n type ViewTransitionOptions,\n} from 'motion';\nimport {motionHandle, noopHandle, type MotionHandle} from './animate';\nimport {easings, speeds} from './recipe';\nimport {shouldReduceMotion, type MotionPreference} from './reduced-motion';\nimport {MOTION_KEY_ATTR, MOTION_LAYOUT_ATTR, resolveViewTargets, type MotionTarget, type ViewScope} from './targets';\n\ntype ViewPreset = 'layout' | 'stream' | 'none';\n\ntype AnimateViewOptions = {\n scope?: ViewScope;\n reducedMotion?: MotionPreference;\n preset?: ViewPreset;\n transition?: ViewTransitionOptions;\n layout?: boolean | AnimationOptions;\n newView?: DOMKeyframesDefinition;\n oldView?: DOMKeyframesDefinition;\n enter?: DOMKeyframesDefinition;\n exit?: DOMKeyframesDefinition;\n className?: string;\n crop?: boolean;\n group?: boolean;\n};\n\ntype ViewOptions = AnimateViewOptions & {\n targets?: MotionTarget | MotionTarget[] | null;\n};\n\nlet flushDom = async (): Promise<void> => {};\n\nconst configureViewFlush = (flush: () => Promise<unknown>): void => {\n flushDom = async () => {\n await flush();\n };\n};\n\nconst defaultLayoutOptions: AnimationOptions = {\n duration: speeds.moderate.duration,\n ease: easings.inOut,\n};\n\nconst stableSnapshotKeyframes: DOMKeyframesDefinition = {\n transform: ['none', 'none'],\n};\n\nconst defaultLayoutTargets = `[${MOTION_KEY_ATTR}], [${MOTION_LAYOUT_ATTR}]`;\n\nconst animateView = (\n update: () => void | Promise<void>,\n targets?: MotionTarget | MotionTarget[] | null,\n options: AnimateViewOptions = {},\n): MotionHandle => {\n if (typeof document.startViewTransition !== 'function' || shouldReduceMotion(options.reducedMotion)) {\n return noopHandle(update);\n }\n\n const requestedTargets = targets ?? ((options.layout || options.preset === 'layout') ? defaultLayoutTargets : null);\n const viewTargets = resolveViewTargets(options.scope ?? document, requestedTargets);\n const builder = motionAnimateView(update, {\n duration: speeds.moderate.duration,\n ease: easings.inOut,\n interrupt: 'immediate',\n ...options.transition,\n });\n\n viewTargets.forEach(({subject, newSubject}) => {\n builder.add(subject, newSubject);\n if (options.className) builder.class(options.className);\n if (typeof options.crop === 'boolean') builder.crop(options.crop);\n if (typeof options.group === 'boolean') builder.group(options.group);\n\n const shouldLayout = options.layout !== false && options.preset !== 'none';\n if (shouldLayout) {\n builder.layout(typeof options.layout === 'object' ? options.layout : defaultLayoutOptions);\n }\n\n const newView = options.newView ?? (options.preset === 'stream' ? stableSnapshotKeyframes : undefined);\n const oldView = options.oldView ?? (options.preset === 'stream' ? stableSnapshotKeyframes : undefined);\n const enter = options.enter;\n const exit = options.exit;\n if (newView) builder.new(newView, {duration: speeds.fast.duration, ease: easings.out});\n if (oldView) builder.old(oldView, {duration: speeds.fast.duration, ease: easings.out});\n if (enter) builder.enter(enter, {duration: speeds.fast.duration, ease: easings.out});\n if (exit) builder.exit(exit, {duration: speeds.fast.duration, ease: easings.out});\n });\n\n return motionHandle(Promise.resolve(builder.then(() => {}, () => {})), {\n cancel() {\n // Browser View Transitions are document-global, so this handle controls\n // the active document view animations rather than a private timeline.\n getViewAnimations().forEach((animation) => animation.cancel());\n },\n stop() {\n // Browser View Transitions are document-global, so this handle controls\n // the active document view animations rather than a private timeline.\n getViewAnimations().forEach((animation) => animation.pause());\n },\n complete() {\n // Browser View Transitions are document-global, so this handle controls\n // the active document view animations rather than a private timeline.\n getViewAnimations().forEach((animation) => {\n try {\n animation.finish();\n } catch {\n animation.cancel();\n }\n });\n },\n });\n};\n\nconst view = (update: () => void | Promise<void>, options: ViewOptions = {}): MotionHandle => {\n const {targets, ...viewOptions} = options;\n return animateView(async () => {\n await update();\n await flushDom();\n }, targets, {\n preset: 'layout',\n ...viewOptions,\n });\n};\n\nexport {animateView, configureViewFlush, view};\nexport type {AnimateViewOptions, ViewOptions, ViewPreset};\n","import {createController} from './controller';\nimport {createMotionPlan} from './plan';\nimport {easings, presets, speeds} from './recipe';\nimport {view} from './view';\nimport {withReducedMotion} from './reduced-motion';\n\nconst motion = Object.assign(createMotionPlan, {\n presets,\n speeds,\n easings,\n createController,\n withReducedMotion,\n view,\n} as const);\n\nexport {motion};\nexport {type MotionHandle} from './animate';\nexport {\n createController,\n type Controller,\n type ControllerDefinitions,\n type ControllerOptions,\n type ControllerScalar,\n type ControllerState,\n type ControllerValueDefinition,\n type ControllerValues,\n type StyleProjection,\n} from './controller';\nexport {\n prefersReducedMotion,\n reducedMotionQuery,\n shouldReduceMotion,\n withReducedMotion,\n type MotionPreference,\n} from './reduced-motion';\nexport {\n createMotionPlan,\n MotionPlan,\n type MotionDefaults,\n type MotionPlanOptions,\n type MotionSegment,\n type MotionStage,\n} from './plan';\nexport {\n presets,\n easings,\n speeds,\n type DurationSpeed,\n type MotionKeyframePreset,\n type MotionKeyframes,\n type MotionSpeed,\n type MotionSpeedName,\n type MotionTransition,\n type PhysicsSpeed,\n} from './recipe';\nexport {resize, type ResizeDestination, type ResizeOptions} from './resize';\nexport {type MotionSubject, type MotionTransitionSubject} from './subject';\nexport type {MotionTarget, ViewScope} from './targets';\nexport {view, type ViewOptions, type ViewPreset} from './view';\n","import {animateView, type AnimateViewOptions} from './view';\nimport {cssEscape, keySelector, type MotionTarget, type ViewScope} from './targets';\nimport {noopHandle, type MotionHandle} from './animate';\nimport {shouldReduceMotion, type MotionPreference} from './reduced-motion';\n\ntype StreamPatchLike = {\n html?: string | null;\n target?: string | null;\n selector?: string | null;\n};\n\ntype AnimateStreamPatchOptions = Omit<AnimateViewOptions, 'scope' | 'preset'> & {\n scope?: ViewScope | 'target';\n update?: () => void | Promise<void>;\n reducedMotion?: MotionPreference;\n};\n\nconst targetSelectorForPatch = (patch: StreamPatchLike): string | null => {\n if (patch.selector) return patch.selector;\n if (!patch.target) return null;\n return patch.target.startsWith('#') ? patch.target : `#${cssEscape(patch.target)}`;\n};\n\nconst clipsOverflow = (element: Element): boolean => {\n const style = getComputedStyle(element);\n return [style.overflow, style.overflowX, style.overflowY].some((value) => value && value !== 'visible');\n};\n\nconst nearestClippingAncestor = (element: Element): Element | null => {\n let current = element.parentElement;\n while (current && current !== document.body && current !== document.documentElement) {\n if (clipsOverflow(current)) return current;\n current = current.parentElement;\n }\n return null;\n};\n\nconst isZeroRect = (rect: DOMRect): boolean => (\n rect.width === 0 && rect.height === 0 && rect.top === 0 && rect.left === 0\n);\n\nconst isComfortablyInsideClip = (element: Element): boolean => {\n const clip = nearestClippingAncestor(element);\n if (!clip) return true;\n\n const rect = element.getBoundingClientRect();\n const clipRect = clip.getBoundingClientRect();\n if (isZeroRect(rect) && isZeroRect(clipRect)) return true;\n\n const movementGuard = Math.min(rect.height, 160);\n return (\n rect.top >= clipRect.top\n && rect.left < clipRect.right\n && rect.right > clipRect.left\n && rect.bottom + movementGuard <= clipRect.bottom\n );\n};\n\nconst streamTargetsFromPatches = (patches: StreamPatchLike[]): MotionTarget[] => {\n const targets: MotionTarget[] = [];\n\n patches.forEach((patch) => {\n const selector = targetSelectorForPatch(patch);\n const target = selector ? document.querySelector(selector) : null;\n if (!target) return;\n\n const patchTargets: MotionTarget[] = [];\n const rootKey = target.getAttribute('data-ui-motion-key');\n target.querySelectorAll('[data-ui-motion-key]').forEach((element) => {\n const key = element.getAttribute('data-ui-motion-key');\n if (key && isComfortablyInsideClip(element)) {\n const selector = keySelector(key);\n patchTargets.push({from: {selector}, to: {selector}});\n }\n });\n if ((rootKey || target.hasAttribute('data-ui-motion-layout')) && isComfortablyInsideClip(target)) {\n const rootSelector = rootKey ? keySelector(rootKey) : selector as string;\n patchTargets.unshift({from: {selector: rootSelector}, to: {selector: rootSelector}});\n }\n\n targets.push(...patchTargets);\n });\n\n return targets;\n};\n\nconst animateStreamPatch = <AlpineInstance>(\n _Alpine: AlpineInstance,\n patchOrPatches: StreamPatchLike | StreamPatchLike[],\n options: AnimateStreamPatchOptions = {},\n): MotionHandle => {\n const update = options.update;\n if (!update) return noopHandle();\n\n const patches = Array.isArray(patchOrPatches) ? patchOrPatches : [patchOrPatches];\n const targets = streamTargetsFromPatches(patches);\n if (targets.length === 0 || shouldReduceMotion(options.reducedMotion)) {\n return noopHandle(update);\n }\n\n const viewOptions: AnimateViewOptions = {\n ...options,\n preset: 'stream',\n };\n if (options.scope && options.scope !== 'target') viewOptions.scope = options.scope;\n\n return animateView(update, targets, viewOptions);\n};\n\nexport {animateStreamPatch, streamTargetsFromPatches};\nexport type {AnimateStreamPatchOptions, StreamPatchLike};\n","import type {Alpine as AlpineType} from 'alpinejs';\n\nimport {motion} from '../motion';\nimport {animateStreamPatch} from '../motion/stream';\nimport {configureViewFlush} from '../motion/view';\nimport {registerStreamPatchAnimator} from '../runtime/engine/stream';\nimport {registerUiMotion} from '../runtime/ui';\n\nconst registered = new WeakSet<AlpineType>();\n\nconst registerMotionCapability = (AlpineInstance: AlpineType): void => {\n if (registered.has(AlpineInstance)) return;\n registered.add(AlpineInstance);\n configureViewFlush(() => AlpineInstance.nextTick());\n registerUiMotion(motion);\n registerStreamPatchAnimator((Alpine, patches, update) => {\n animateStreamPatch(Alpine, patches, {scope: 'target', update});\n });\n};\n\nexport {motion, registerMotionCapability};\nexport type * from '../motion';\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],"mappings":"0DAAA,SAAS,EAAc,EAAK,EAAM,CAC1B,EAAI,QAAQ,CAAI,IAAM,IACtB,EAAI,KAAK,CAAI,CACrB,CACA,SAAS,EAAW,EAAK,EAAM,CAC3B,IAAM,EAAQ,EAAI,QAAQ,CAAI,EAC1B,EAAQ,IACR,EAAI,OAAO,EAAO,CAAC,CAC3B,CCRA,IAAM,GAAS,EAAK,EAAK,IACjB,EAAI,EACG,EACP,EAAI,EACG,EACJ,ECLX,SAAS,EAAmB,EAAS,EAAW,CAC5C,OAAO,EACD,GAAG,EAAQ,yFAAyF,IACpG,CACV,CCFA,ICFM,EAAqB,CAAC,ECGtB,EAAqB,GAAM,+BAA+B,KAAK,CAAC,ECHhE,EA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