@v-miniapp/ui-react 1.0.45 → 1.0.59

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 (255) hide show
  1. package/dist/components/app/app.d.ts +17 -0
  2. package/dist/components/app/bottom-tab-bar-layout/hook.d.ts +21 -0
  3. package/dist/components/app/bottom-tab-bar-layout/store.d.ts +13 -0
  4. package/dist/components/app/bottom-tab-bar-layout/type.d.ts +13 -0
  5. package/dist/components/app/data-theme.d.ts +8 -0
  6. package/dist/components/app/index.d.ts +9 -18
  7. package/dist/components/app/navigation-bar-layout/hook.d.ts +17 -0
  8. package/dist/components/app/navigation-bar-layout/store.d.ts +13 -0
  9. package/dist/components/app/navigation-bar-layout/type.d.ts +7 -0
  10. package/dist/components/app/page-layout/hook.d.ts +21 -0
  11. package/dist/components/app/page-layout/store.d.ts +13 -0
  12. package/dist/components/app/page-layout/type.d.ts +8 -0
  13. package/dist/components/app/type.d.ts +27 -0
  14. package/dist/components/calendar/default-render.d.ts +1 -1
  15. package/dist/components/calendar/utils.d.ts +1 -1
  16. package/dist/components/carousel/index.d.ts +1 -0
  17. package/dist/components/input-wrapper/input-wrapper.d.ts +2 -2
  18. package/dist/components/layout/page.d.ts +8 -1
  19. package/dist/external/index.js +11344 -7959
  20. package/dist/external/styles.css +1 -1
  21. package/dist/index.d.ts +4 -1
  22. package/dist/index.js +4194 -4376
  23. package/dist/styles.css +1 -1
  24. package/dist/utils/event-emitter.d.ts +4 -0
  25. package/dist-storybook/assets/App-Dp1UG-xp.js +93 -0
  26. package/dist-storybook/assets/{Color-AVL7NMMY-1_8XTICv.js → Color-AVL7NMMY-XA8cFKdV.js} +1 -1
  27. package/dist-storybook/assets/DEEPLINK-cjgFMuRJ.js +33 -0
  28. package/dist-storybook/assets/{DocsRenderer-PQXLIZUC-BO86igwd.js → DocsRenderer-PQXLIZUC-D10-0Yfb.js} +2 -2
  29. package/dist-storybook/assets/EVENTS-BY66PjI7.js +65 -0
  30. package/dist-storybook/assets/GETTING_STARTED-580o-9Mx.js +64 -0
  31. package/dist-storybook/assets/GETTING_STARTED-BiQMvjvo.js +62 -0
  32. package/dist-storybook/assets/GETTING_STARTED-CIVMqKZW.js +80 -0
  33. package/dist-storybook/assets/{INFINITE_SCROLL-BtM3uoX0.js → INFINITE_SCROLL-BbeR5HeP.js} +1 -1
  34. package/dist-storybook/assets/LocalesProvider-CMlmwAyY.js +53 -0
  35. package/dist-storybook/assets/MIGRATE_DARKMODE_TO_THEME-CBDyZyg2.js +107 -0
  36. package/dist-storybook/assets/{MIGRATION_GUIDE-2LONslE4.js → MIGRATION_GUIDE-FZyRWI-B.js} +3 -3
  37. package/dist-storybook/assets/OVERVIEW-C9_6gX5Q.js +51 -0
  38. package/dist-storybook/assets/Router-B5U8bubH.js +71 -0
  39. package/dist-storybook/assets/{TAILWIND_INTEGRATION-_T-VfvkM.js → TAILWIND_INTEGRATION-BJdy5DAv.js} +1 -1
  40. package/dist-storybook/assets/THEME-CRbvH7KT.js +103 -0
  41. package/dist-storybook/assets/_baseClone-DQVxEhny.js +1 -0
  42. package/dist-storybook/assets/alert-CKwsuaPI.js +1 -0
  43. package/dist-storybook/assets/{alert.stories-B-vuojPh.js → alert.stories-D0X5wUHk.js} +3 -3
  44. package/dist-storybook/assets/app-CTv8lFU3.js +1 -0
  45. package/dist-storybook/assets/avatar-rWcYGe6j.js +1 -0
  46. package/dist-storybook/assets/{avatar.stories-KYFztAc8.js → avatar.stories-8lrbhMma.js} +6 -6
  47. package/dist-storybook/assets/{axe-CmvD4WV5.js → axe-BHGdSCoA.js} +1 -1
  48. package/dist-storybook/assets/badge-VcjGVEum.js +1 -0
  49. package/dist-storybook/assets/{badge.stories-Be2ItCmQ.js → badge.stories-BEFNaUA1.js} +3 -3
  50. package/dist-storybook/assets/{blocks-BuaOUtiH.js → blocks-DKR3P4qW.js} +3 -3
  51. package/dist-storybook/assets/{bottom-tab-bar-CtcTAxuI.js → bottom-tab-bar-B6IAoRwz.js} +1 -1
  52. package/dist-storybook/assets/{bottom-tab-bar.stories-CDmEve6z.js → bottom-tab-bar.stories-DXzLlO5o.js} +3 -3
  53. package/dist-storybook/assets/button-DJH3RlJl.js +1 -0
  54. package/dist-storybook/assets/{button.stories-CaqLWQiY.js → button.stories-DgYDJ6x7.js} +3 -3
  55. package/dist-storybook/assets/calendar-C4Xe_TW2.js +1 -0
  56. package/dist-storybook/assets/{calendar.stories-DLWZldet.js → calendar.stories-IVvRAjWN.js} +3 -3
  57. package/dist-storybook/assets/carousel-DJlgMyS5.js +37 -0
  58. package/dist-storybook/assets/{carousel.stories-B8YbGOOr.js → carousel.stories-3rA3nxdL.js} +3 -3
  59. package/dist-storybook/assets/checkbox-JOxcmyCZ.js +1 -0
  60. package/dist-storybook/assets/{checkbox.stories-CLvfZPiw.js → checkbox.stories-ge3pgfBb.js} +3 -3
  61. package/dist-storybook/assets/chip-Crt60rph.js +1 -0
  62. package/dist-storybook/assets/{chip.stories-BbwJb5eD.js → chip.stories-D7E6fdiV.js} +3 -3
  63. package/dist-storybook/assets/{date-Cg-Uk_pp.js → date-B3PFMb6s.js} +1 -1
  64. package/dist-storybook/assets/date-field-range-B-sv9nbW.js +1 -0
  65. package/dist-storybook/assets/date-field.stories-B9G2heHt.js +129 -0
  66. package/dist-storybook/assets/date-picker-BPzKPdhO.js +1 -0
  67. package/dist-storybook/assets/{date-picker.stories-BuGWvzFL.js → date-picker.stories-CIFgk4q_.js} +3 -3
  68. package/dist-storybook/assets/dialog-BAfGQzk5.js +1 -0
  69. package/dist-storybook/assets/{dialog.stories-DJ0WsSkA.js → dialog.stories-vDMKz9Tw.js} +3 -3
  70. package/dist-storybook/assets/{chip-kG4p82WT.js → dropdown-Dtomaqpw.js} +2 -2
  71. package/dist-storybook/assets/{dropdown.stories-D6JUYP73.js → dropdown.stories-Cj0HM0VI.js} +3 -3
  72. package/dist-storybook/assets/{embla-carousel-react.esm-BYjpaHZ9.js → embla-carousel-react.esm-5D5fs7OQ.js} +1 -1
  73. package/dist-storybook/assets/icon-CdiFzFyf.js +1 -0
  74. package/dist-storybook/assets/{icon.stories-B-ZvRzFf.js → icon.stories-DWwbUUY-.js} +3 -3
  75. package/dist-storybook/assets/iframe-BHaCv4dM.css +1 -0
  76. package/dist-storybook/assets/{iframe-CQAwSt4E.js → iframe-DfPay7Zl.js} +42 -42
  77. package/dist-storybook/assets/image-CMKb-R3x.js +9 -0
  78. package/dist-storybook/assets/{image.stories-C4l8D3ju.js → image.stories-BhZU057W.js} +3 -3
  79. package/dist-storybook/assets/index-BWpuenI4.js +1 -0
  80. package/dist-storybook/assets/{index-CgMRTj-o.js → index-DqZh6B0b.js} +1 -1
  81. package/dist-storybook/assets/{index-BV0AJWP6.js → index-EGt7xBnA.js} +1 -1
  82. package/dist-storybook/assets/{index-DHiZ-gXR.js → index-cMNObl2z.js} +1 -1
  83. package/dist-storybook/assets/input-wrapper-CgaUwbbE.js +1 -0
  84. package/dist-storybook/assets/{label-DV2iCDmN.js → label-D44azUgi.js} +1 -1
  85. package/dist-storybook/assets/{label.stories-BwTIPFXX.js → label.stories-CXJjdYf_.js} +3 -3
  86. package/dist-storybook/assets/{navigation-bar-vI-FPasP.js → navigation-bar-DK3TxcTu.js} +2 -2
  87. package/dist-storybook/assets/{navigation-bar.stories-DYuFaJFD.js → navigation-bar.stories-CB3Kg-sH.js} +3 -3
  88. package/dist-storybook/assets/number-field-Bz7su9S1.js +1 -0
  89. package/dist-storybook/assets/{number-field.stories--fn26TJu.js → number-field.stories-DSxPSzLv.js} +3 -3
  90. package/dist-storybook/assets/omit-BWHsnDSR.js +1 -0
  91. package/dist-storybook/assets/option-item-CpeNcb5w.js +1 -0
  92. package/dist-storybook/assets/{option-item.stories-snjAvgay.js → option-item.stories-BvXoc8WX.js} +3 -3
  93. package/dist-storybook/assets/pagination-Cp-DHO4Q.js +1 -0
  94. package/dist-storybook/assets/{pagination.stories-BoEs0jzS.js → pagination.stories-_5qj2nTS.js} +4 -4
  95. package/dist-storybook/assets/proxy-B4G9nIBd.js +1 -0
  96. package/dist-storybook/assets/radio-D0aV0RIg.js +1 -0
  97. package/dist-storybook/assets/{radio.stories-DuN-Awi_.js → radio.stories-BNR-wwuw.js} +3 -3
  98. package/dist-storybook/assets/rating-D2e8RTGl.js +1 -0
  99. package/dist-storybook/assets/{rating.stories-BCcQjMEx.js → rating.stories-CI0LG0Qq.js} +3 -3
  100. package/dist-storybook/assets/{react-18-CNyWQ7je.js → react-18-C7pDmBBf.js} +1 -1
  101. package/dist-storybook/assets/{react-hufnxGVs.js → react-I9jCW2VV.js} +1 -1
  102. package/dist-storybook/assets/search-field-DINESW8Y.js +1 -0
  103. package/dist-storybook/assets/{search-field.stories-DiCZbhng.js → search-field.stories-CKXC6-Za.js} +3 -3
  104. package/dist-storybook/assets/section-content-D49PabBW.js +1 -0
  105. package/dist-storybook/assets/{section.stories-C2I_kKhu.js → section.stories-9vd48AgB.js} +3 -3
  106. package/dist-storybook/assets/sheet-footer-nEdxsYan.js +1 -0
  107. package/dist-storybook/assets/{sheet.stories-wk1JaKU5.js → sheet.stories-C3gLIQsn.js} +3 -3
  108. package/dist-storybook/assets/skeleton-B12XbNAJ.js +1 -0
  109. package/dist-storybook/assets/{skeleton.stories-BCmX-VNr.js → skeleton.stories-C0y1o1Y_.js} +3 -3
  110. package/dist-storybook/assets/{store-D2RudmNr.js → store-Ce3Ikv5g.js} +5 -5
  111. package/dist-storybook/assets/switch-D0Z9tWin.js +1 -0
  112. package/dist-storybook/assets/{switch.stories-BqPLNKB9.js → switch.stories-BdWFln-M.js} +3 -3
  113. package/dist-storybook/assets/{tab-bar-CSeCmtIZ.js → tab-bar-kExoGg5P.js} +1 -1
  114. package/dist-storybook/assets/{tab-bar.stories-Cb6v8H2w.js → tab-bar.stories-BgDXX0of.js} +3 -3
  115. package/dist-storybook/assets/text-area-GKy5HL12.js +1 -0
  116. package/dist-storybook/assets/{text-area.stories-By8bCfgc.js → text-area.stories-DCt3RB3A.js} +3 -3
  117. package/dist-storybook/assets/text-field-CGWNqitB.js +1 -0
  118. package/dist-storybook/assets/{text-field.stories-CrWBAhvI.js → text-field.stories-Bqv7f948.js} +3 -3
  119. package/dist-storybook/assets/toast-provider-DKSrfhJD.js +9 -0
  120. package/dist-storybook/assets/{toast.stories-iWAToAZA.js → toast.stories-CcFzS6QI.js} +1 -1
  121. package/dist-storybook/assets/tooltip-B9rDI6z9.js +1 -0
  122. package/dist-storybook/assets/{tooltip.stories-RC6SuPPD.js → tooltip.stories-DDdsuU3U.js} +3 -3
  123. package/dist-storybook/assets/typography-CB8hPDyK.js +1 -0
  124. package/dist-storybook/assets/{typography.stories-Bu8qFugR.js → typography.stories-BzCxaZQU.js} +3 -3
  125. package/dist-storybook/assets/{uploader.stories-B2wW9qVy.js → uploader.stories-izVumFqZ.js} +3 -3
  126. package/dist-storybook/assets/use-app-pause-ClsUnndr.js +21 -0
  127. package/dist-storybook/assets/use-app-resume-D_EcIvMd.js +21 -0
  128. package/dist-storybook/assets/use-bottom-tab-bar-BC1cz2uE.js +49 -0
  129. package/dist-storybook/assets/use-custom-icon-event-cUk4Md0Y.js +26 -0
  130. package/dist-storybook/assets/use-did-hide-BmABiaUE.js +30 -0
  131. package/dist-storybook/assets/use-did-show-CQuySkkT.js +30 -0
  132. package/dist-storybook/assets/use-histories-CBm09Lno.js +30 -0
  133. package/dist-storybook/assets/use-history-7yguNz6O.js +33 -0
  134. package/dist-storybook/assets/use-language-DPyWMce2.js +46 -0
  135. package/dist-storybook/assets/use-load-more-KlDJZhj2.js +42 -0
  136. package/dist-storybook/assets/use-location-C7kE1yla.js +39 -0
  137. package/dist-storybook/assets/use-navigate-BpIyvtwc.js +36 -0
  138. package/dist-storybook/assets/use-navigation-bar-guzwhM_u.js +42 -0
  139. package/dist-storybook/assets/use-navigation-type-DOndDqQH.js +27 -0
  140. package/dist-storybook/assets/use-page-layout-dO6ylI1b.js +37 -0
  141. package/dist-storybook/assets/use-page-scroll-CCG2d2Gb.js +42 -0
  142. package/dist-storybook/assets/use-pull-to-refresh-lhumDu1H.js +38 -0
  143. package/dist-storybook/assets/use-settings-changed-Bt58DJ-c.js +30 -0
  144. package/dist-storybook/assets/use-translate-Jhz6jTXo.js +59 -0
  145. package/dist-storybook/assets/{visibility-sensor-CwrzJO06.js → visibility-sensor-Jf-Nmil6.js} +1 -1
  146. package/dist-storybook/iframe.html +2 -2
  147. package/dist-storybook/index.json +1 -1
  148. package/dist-storybook/project.json +1 -1
  149. package/dist-storybook/sb-addons/a11y-2/manager-bundle.js +2 -2
  150. package/dist-storybook/sb-addons/docs-1/manager-bundle.js +2 -2
  151. package/dist-storybook/sb-addons/storybook-build-3/manager-bundle.js +1 -1
  152. package/dist-storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +4 -4
  153. package/dist-storybook/stories-data.json +152 -122
  154. package/package.json +3 -1
  155. package/dist/components/app/components/app.d.ts +0 -13
  156. package/dist/components/app/components/link.d.ts +0 -8
  157. package/dist/components/app/components/navigation-analytic.d.ts +0 -2
  158. package/dist/components/app/components/pages-render.d.ts +0 -2
  159. package/dist/components/app/context/location-key.d.ts +0 -4
  160. package/dist/components/app/hooks/use-app-pause.d.ts +0 -1
  161. package/dist/components/app/hooks/use-app-resume.d.ts +0 -1
  162. package/dist/components/app/hooks/use-app-state.d.ts +0 -7
  163. package/dist/components/app/hooks/use-bottom-tab-bar.d.ts +0 -13
  164. package/dist/components/app/hooks/use-did-hide.d.ts +0 -1
  165. package/dist/components/app/hooks/use-did-show.d.ts +0 -1
  166. package/dist/components/app/hooks/use-history.d.ts +0 -2
  167. package/dist/components/app/hooks/use-location.d.ts +0 -1
  168. package/dist/components/app/hooks/use-navigate.d.ts +0 -1
  169. package/dist/components/app/hooks/use-navigation-bar.d.ts +0 -12
  170. package/dist/components/app/hooks/use-navigation-type.d.ts +0 -1
  171. package/dist/components/app/hooks/use-page-config.d.ts +0 -1
  172. package/dist/components/app/hooks/use-page-layout.d.ts +0 -14
  173. package/dist/components/app/hooks/use-page-scroll.d.ts +0 -5
  174. package/dist/components/app/hooks/use-page-state.d.ts +0 -6
  175. package/dist/components/app/stores/app.d.ts +0 -24
  176. package/dist/components/app/stores/app.selector.d.ts +0 -11
  177. package/dist/components/app/types/app.d.ts +0 -55
  178. package/dist/components/app/types/navigation.d.ts +0 -30
  179. package/dist/components/app/utils/animation.d.ts +0 -2
  180. package/dist/components/app/utils/data-theme.d.ts +0 -5
  181. package/dist/components/app/utils/history.d.ts +0 -7
  182. package/dist/hooks/use-analytic.d.ts +0 -1
  183. package/dist/hooks/use-is-using-app.d.ts +0 -1
  184. package/dist/hooks/use-is-using-locales.d.ts +0 -1
  185. package/dist/locales/defaultResources/en.d.ts +0 -27
  186. package/dist/locales/defaultResources/vi.d.ts +0 -27
  187. package/dist/locales/fns.d.ts +0 -6
  188. package/dist/locales/hooks.d.ts +0 -9
  189. package/dist/locales/index.d.ts +0 -4
  190. package/dist/locales/provider.d.ts +0 -6
  191. package/dist/locales/store.d.ts +0 -13
  192. package/dist/locales/types.d.ts +0 -37
  193. package/dist/locales/utils.d.ts +0 -2
  194. package/dist-storybook/assets/ANIMATION-CUdn1GTK.js +0 -99
  195. package/dist-storybook/assets/APP_FRAMEWORK-ljbIOHYd.js +0 -197
  196. package/dist-storybook/assets/BOTTOM_TAB_BAR-DxCwCfBK.js +0 -175
  197. package/dist-storybook/assets/CUSTOM_ERROR_BOUNDARY-B4wTQNZc.js +0 -250
  198. package/dist-storybook/assets/DARK_MODE-CoHseCDO.js +0 -57
  199. package/dist-storybook/assets/GETTING_STARTED-H_vVi5cv.js +0 -77
  200. package/dist-storybook/assets/KEEP_ALIVE-CL2au0al.js +0 -126
  201. package/dist-storybook/assets/LOCALE-XTCey55y.js +0 -465
  202. package/dist-storybook/assets/MOBILE_BEHAVIOURS-DZ6alKTX.js +0 -177
  203. package/dist-storybook/assets/PAGE_LAYOUT-BuOpN-1Y.js +0 -192
  204. package/dist-storybook/assets/ROUTING_NAVIGATION-BCPHXNto.js +0 -335
  205. package/dist-storybook/assets/_setToString-CbM921C9.js +0 -1
  206. package/dist-storybook/assets/alert-DLW8CoyB.js +0 -1
  207. package/dist-storybook/assets/avatar-GxcYPA1p.js +0 -1
  208. package/dist-storybook/assets/badge-D_LzMVtw.js +0 -1
  209. package/dist-storybook/assets/button-CL7GeC23.js +0 -1
  210. package/dist-storybook/assets/calendar-dOCsjhVU.js +0 -1
  211. package/dist-storybook/assets/carousel-1Kww3hIz.js +0 -37
  212. package/dist-storybook/assets/checkbox-MGytNNRt.js +0 -1
  213. package/dist-storybook/assets/classname-CUR_zgkh.js +0 -1
  214. package/dist-storybook/assets/date-field.stories-Diptwqfv.js +0 -129
  215. package/dist-storybook/assets/date-picker-Dnq_-0Md.js +0 -1
  216. package/dist-storybook/assets/icon-DdQsMyRa.js +0 -1
  217. package/dist-storybook/assets/iframe-yMKl6hJA.css +0 -1
  218. package/dist-storybook/assets/image-C3EsNRhz.js +0 -9
  219. package/dist-storybook/assets/input-wrapper-BKHgnPy6.js +0 -1
  220. package/dist-storybook/assets/number-field-CXKmnfKe.js +0 -1
  221. package/dist-storybook/assets/omit-Bsx5nTI0.js +0 -1
  222. package/dist-storybook/assets/option-item-LRh_OyV4.js +0 -1
  223. package/dist-storybook/assets/pagination-DZHoBs_4.js +0 -1
  224. package/dist-storybook/assets/pick-BhmhLmLe.js +0 -1
  225. package/dist-storybook/assets/radio-B5NJxG_l.js +0 -1
  226. package/dist-storybook/assets/rating-BdXViYBv.js +0 -1
  227. package/dist-storybook/assets/search-field-CQqgFbfg.js +0 -1
  228. package/dist-storybook/assets/section-content-DGNB4eLN.js +0 -1
  229. package/dist-storybook/assets/skeleton-C91JgehG.js +0 -1
  230. package/dist-storybook/assets/store-CPumdfcU.js +0 -1
  231. package/dist-storybook/assets/switch-p-aXI-ev.js +0 -1
  232. package/dist-storybook/assets/text-area-DwSXyqOe.js +0 -1
  233. package/dist-storybook/assets/text-field-jK6rpOo2.js +0 -1
  234. package/dist-storybook/assets/toast-provider-DurnMJhd.js +0 -9
  235. package/dist-storybook/assets/tooltip-QDdel5My.js +0 -1
  236. package/dist-storybook/assets/typography-DEpAJl_i.js +0 -1
  237. package/dist-storybook/assets/use-app-pause-B_tWHKJK.js +0 -29
  238. package/dist-storybook/assets/use-app-resume--900G-dV.js +0 -29
  239. package/dist-storybook/assets/use-custom-icon-event-3VExRzvC.js +0 -29
  240. package/dist-storybook/assets/use-did-hide-BUsL73ab.js +0 -48
  241. package/dist-storybook/assets/use-did-show-C1-VLDxi.js +0 -49
  242. package/dist-storybook/assets/use-histories-E4E2jJEY.js +0 -50
  243. package/dist-storybook/assets/use-history-o1im8IDj.js +0 -67
  244. package/dist-storybook/assets/use-location-CUEaBO4P.js +0 -56
  245. package/dist-storybook/assets/use-navigate-C4CTuFSZ.js +0 -84
  246. package/dist-storybook/assets/use-navigation-type-Dcz4hgKo.js +0 -44
  247. package/dist-storybook/assets/use-page-config-DSJBVQbq.js +0 -48
  248. package/dist-storybook/assets/use-page-scroll-dY-U1Vv4.js +0 -69
  249. package/dist-storybook/assets/use-page-state-CtNpwGPN.js +0 -79
  250. package/dist-storybook/assets/use-settings-changed-BBJwIHTE.js +0 -29
  251. /package/dist/components/app/{components/bottom-tab-bar.d.ts → bottom-tab-bar-layout/index.d.ts} +0 -0
  252. /package/dist/components/app/{components/navigation-bar.d.ts → navigation-bar-layout/index.d.ts} +0 -0
  253. /package/dist/components/app/{components/page-layout.d.ts → page-layout/index.d.ts} +0 -0
  254. /package/dist/{components/app/hooks → hooks}/use-custom-icon-event.d.ts +0 -0
  255. /package/dist/{components/app/hooks → hooks}/use-settings-changed.d.ts +0 -0
@@ -1,9 +0,0 @@
1
- import{r as v,j as C}from"./iframe-CQAwSt4E.js";import{c as Pr,g as Ns}from"./classname-CUR_zgkh.js";import{r as Sn}from"./blocks-BuaOUtiH.js";import{r as Sr,I as bn}from"./icon-DdQsMyRa.js";import{T as br}from"./typography-DEpAJl_i.js";import{c as wr}from"./react-hufnxGVs.js";import{B as Ar}from"./button-CL7GeC23.js";const Ne=v.createContext({});function Ue(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ke=typeof window<"u",Us=Ke?v.useLayoutEffect:v.useEffect,Jt=v.createContext(null);function We(t,e){t.indexOf(e)===-1&&t.push(e)}function $e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const X=(t,e,n)=>n>e?e:n<t?t:n;let _e=()=>{};const Y={},Ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ws(t){return typeof t=="object"&&t!==null}const $s=t=>/^0[^.\s]+$/u.test(t);function Ge(t){let e;return()=>(e===void 0&&(e=t()),e)}const $=t=>t,Vr=(t,e)=>n=>e(t(n)),kt=(...t)=>t.reduce(Vr),Mt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class ze{constructor(){this.subscriptions=[]}add(e){return We(this.subscriptions,e),()=>$e(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const z=t=>t*1e3,W=t=>t/1e3;function _s(t,e){return e?t*(1e3/e):0}const Gs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Cr=1e-7,Mr=12;function Dr(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Gs(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Cr&&++a<Mr);return r}function Ft(t,e,n,s){if(t===e&&n===s)return $;const i=o=>Dr(o,0,1,t,n);return o=>o===0||o===1?o:Gs(i(o),e,s)}const zs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Hs=t=>e=>1-t(1-e),Xs=Ft(.33,1.53,.69,.99),He=Hs(Xs),Ys=zs(He),qs=t=>(t*=2)<1?.5*He(t):.5*(2-Math.pow(2,-10*(t-1))),Xe=t=>1-Math.sin(Math.acos(t)),Zs=Hs(Xe),Js=zs(Xe),Rr=Ft(.42,0,1,1),Er=Ft(0,0,.58,1),Qs=Ft(.42,0,.58,1),Lr=t=>Array.isArray(t)&&typeof t[0]!="number",ti=t=>Array.isArray(t)&&typeof t[0]=="number",kr={linear:$,easeIn:Rr,easeInOut:Qs,easeOut:Er,circIn:Xe,circInOut:Js,circOut:Zs,backIn:He,backInOut:Ys,backOut:Xs,anticipate:qs},Fr=t=>typeof t=="string",wn=t=>{if(ti(t)){_e(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(Fr(t))return kr[t];return t},jt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ir(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&r.add(c),m.has(c)||m.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const Br=40;function ei(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=jt.reduce((y,w)=>(y[w]=Ir(o),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=r,g=()=>{const y=Y.useManualTiming?i.timestamp:performance.now();n=!1,Y.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(y-i.timestamp,Br),1)),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},x=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:jt.reduce((y,w)=>{const P=r[w];return y[w]=(A,V=!1,b=!1)=>(n||x(),P.schedule(A,V,b)),y},{}),cancel:y=>{for(let w=0;w<jt.length;w++)r[jt[w]].cancel(y)},state:i,steps:r}}const{schedule:M,cancel:J,state:I,steps:ne}=ei(typeof requestAnimationFrame<"u"?requestAnimationFrame:$,!0);let Kt;function jr(){Kt=void 0}const N={now:()=>(Kt===void 0&&N.set(I.isProcessing||Y.useManualTiming?I.timestamp:performance.now()),Kt),set:t=>{Kt=t,queueMicrotask(jr)}},ni=t=>e=>typeof e=="string"&&e.startsWith(t),si=ni("--"),Or=ni("var(--"),Ye=t=>Or(t)?Nr.test(t.split("/*")[0].trim()):!1,Nr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Dt={...vt,transform:t=>X(0,1,t)},Ot={...vt,default:1},wt=t=>Math.round(t*1e5)/1e5,qe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ur(t){return t==null}const Kr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ze=(t,e)=>n=>!!(typeof n=="string"&&Kr.test(n)&&n.startsWith(t)||e&&!Ur(n)&&Object.prototype.hasOwnProperty.call(n,e)),ii=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(qe);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Wr=t=>X(0,255,t),se={...vt,transform:t=>Math.round(Wr(t))},it={test:Ze("rgb","red"),parse:ii("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+se.transform(t)+", "+se.transform(e)+", "+se.transform(n)+", "+wt(Dt.transform(s))+")"};function $r(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ye={test:Ze("#"),parse:$r,transform:it.transform},It=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Z=It("deg"),H=It("%"),S=It("px"),_r=It("vh"),Gr=It("vw"),An={...H,parse:t=>H.parse(t)/100,transform:t=>H.transform(t*100)},ct={test:Ze("hsl","hue"),parse:ii("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+H.transform(wt(e))+", "+H.transform(wt(n))+", "+wt(Dt.transform(s))+")"},E={test:t=>it.test(t)||ye.test(t)||ct.test(t),parse:t=>it.test(t)?it.parse(t):ct.test(t)?ct.parse(t):ye.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?it.transform(t):ct.transform(t),getAnimatableNone:t=>{const e=E.parse(t);return e.alpha=0,E.transform(e)}},zr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hr(t){return isNaN(t)&&typeof t=="string"&&(t.match(qe)?.length||0)+(t.match(zr)?.length||0)>0}const ri="number",oi="color",Xr="var",Yr="var(",Vn="${}",qr=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(qr,l=>(E.test(l)?(s.color.push(o),i.push(oi),n.push(E.parse(l))):l.startsWith(Yr)?(s.var.push(o),i.push(Xr),n.push(l)):(s.number.push(o),i.push(ri),n.push(parseFloat(l))),++o,Vn)).split(Vn);return{values:n,split:a,indexes:s,types:i}}function ai(t){return Rt(t).values}function li(t){const{split:e,types:n}=Rt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===ri?o+=wt(i[r]):a===oi?o+=E.transform(i[r]):o+=i[r]}return o}}const Zr=t=>typeof t=="number"?0:E.test(t)?E.getAnimatableNone(t):t;function Jr(t){const e=ai(t);return li(t)(e.map(Zr))}const Q={test:Hr,parse:ai,createTransformer:li,getAnimatableNone:Jr};function ie(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Qr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ie(l,a,t+1/3),o=ie(l,a,t),r=ie(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Gt(t,e){return n=>n>0?e:t}const D=(t,e,n)=>t+(e-t)*n,re=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},to=[ye,it,ct],eo=t=>to.find(e=>e.test(t));function Cn(t){const e=eo(t);if(!e)return!1;let n=e.parse(t);return e===ct&&(n=Qr(n)),n}const Mn=(t,e)=>{const n=Cn(t),s=Cn(e);if(!n||!s)return Gt(t,e);const i={...n};return o=>(i.red=re(n.red,s.red,o),i.green=re(n.green,s.green,o),i.blue=re(n.blue,s.blue,o),i.alpha=D(n.alpha,s.alpha,o),it.transform(i))},ve=new Set(["none","hidden"]);function no(t,e){return ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function so(t,e){return n=>D(t,e,n)}function Je(t){return typeof t=="number"?so:typeof t=="string"?Ye(t)?Gt:E.test(t)?Mn:oo:Array.isArray(t)?ci:typeof t=="object"?E.test(t)?Mn:io:Gt}function ci(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Je(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function io(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Je(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function ro(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const oo=(t,e)=>{const n=Q.createTransformer(e),s=Rt(t),i=Rt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ve.has(t)&&!i.values.length||ve.has(e)&&!s.values.length?no(t,e):kt(ci(ro(s,i),i.values),n):Gt(t,e)};function ui(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?D(t,e,n):Je(t)(t,e)}const ao=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>J(e),now:()=>I.isProcessing?I.timestamp:N.now()}},hi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},zt=2e4;function Qe(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<zt;)e+=n,s=t.next(e);return e>=zt?1/0:e}function lo(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Qe(s),zt);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:W(i)}}const co=5;function fi(t,e,n){const s=Math.max(e-co,0);return _s(n-t(s),e-s)}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},oe=.001;function uo({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,o,r=1-e;r=X(R.minDamping,R.maxDamping,r),t=X(R.minDuration,R.maxDuration,W(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,d=xe(u,r),m=Math.exp(-h);return oe-f/d*m},o=u=>{const h=u*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-h),g=xe(Math.pow(u,2),r);return(-i(u)+oe>0?-1:1)*((f-d)*m)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-oe+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=fo(i,o,a);if(t=z(t),isNaN(l))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const ho=12;function fo(t,e,n){let s=n;for(let i=1;i<ho;i++)s=s-t(s)/e(s);return s}function xe(t,e){return t*Math.sqrt(1-e*e)}const mo=["duration","bounce"],po=["stiffness","damping","mass"];function Dn(t,e){return e.some(n=>t[n]!==void 0)}function go(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Dn(t,po)&&Dn(t,mo))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:o}}else{const n=uo(t);e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function Ht(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=go({...n,velocity:-W(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),x=r-o,p=W(Math.sqrt(l/c)),T=Math.abs(x)<5;s||(s=T?R.restSpeed.granular:R.restSpeed.default),i||(i=T?R.restDelta.granular:R.restDelta.default);let y;if(g<1){const P=xe(p,g);y=A=>{const V=Math.exp(-g*p*A);return r-V*((m+g*p*x)/P*Math.sin(P*A)+x*Math.cos(P*A))}}else if(g===1)y=P=>r-Math.exp(-p*P)*(x+(m+p*x)*P);else{const P=p*Math.sqrt(g*g-1);y=A=>{const V=Math.exp(-g*p*A),b=Math.min(P*A,300);return r-V*((m+g*p*x)*Math.sinh(b)+P*x*Math.cosh(b))/P}}const w={calculatedDuration:d&&h||null,next:P=>{const A=y(P);if(d)a.done=P>=h;else{let V=P===0?m:0;g<1&&(V=P===0?z(m):fi(y,P,A));const b=Math.abs(V)<=s,k=Math.abs(r-A)<=i;a.done=b&&k}return a.value=a.done?r:A,a},toString:()=>{const P=Math.min(Qe(w),zt),A=hi(V=>w.next(P*V).value,P,30);return P+"ms "+A},toTransition:()=>{}};return w}Ht.applyToOptions=t=>{const e=lo(t,100,Ht);return t.ease=e.ease,t.duration=z(e.duration),t.type="keyframes",t};function Te({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,m=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let g=n*e;const x=h+g,p=r===void 0?x:r(x);p!==x&&(g=p-h);const T=b=>-g*Math.exp(-b/s),y=b=>p+T(b),w=b=>{const k=T(b),j=y(b);f.done=Math.abs(k)<=u,f.value=f.done?p:j};let P,A;const V=b=>{d(f.value)&&(P=b,A=Ht({keyframes:[f.value,m(f.value)],velocity:fi(y,b,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:b=>{let k=!1;return!A&&P===void 0&&(k=!0,w(b),V(b)),P!==void 0&&b>=P?A.next(b-P):(!k&&w(b),f)}}}function yo(t,e,n){const s=[],i=n||Y.mix||ui,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||$:e;a=kt(l,a)}s.push(a)}return s}function vo(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(_e(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=yo(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Mt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(X(t[0],t[o-1],c)):u}function xo(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Mt(0,e,s);t.push(D(n,1,i))}}function To(t){const e=[0];return xo(e,t.length-1),e}function Po(t,e){return t.map(n=>n*e)}function So(t,e){return t.map(()=>e||Qs).splice(0,t.length-1)}function At({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Lr(s)?s.map(wn):wn(s),o={done:!1,value:e[0]},r=Po(n&&n.length===e.length?n:To(e),t),a=vo(r,e,{ease:Array.isArray(i)?i:So(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const bo=t=>t!==null;function tn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(bo),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const wo={decay:Te,inertia:Te,tween:At,keyframes:At,spring:Ht};function di(t){typeof t.type=="string"&&(t.type=wo[t.type])}class en{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Ao=t=>t/100;class nn extends en{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;di(e);const{type:n=At,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||At;l!==At&&typeof a[0]!="number"&&(this.mixKeyframes=kt(Ao,ui(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Qe(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,w=s;if(h){const b=Math.min(this.currentTime,i)/a;let k=Math.floor(b),j=b%1;!j&&b>=1&&(j=1),j===1&&k--,k=Math.min(k,h+1),k%2&&(f==="reverse"?(j=1-j,d&&(j-=d/a)):f==="mirror"&&(w=r)),y=X(0,1,j)*a}const P=T?{done:!1,value:c[0]}:w.next(y);o&&(P.value=o(P.value));let{done:A}=P;!T&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return V&&m!==Te&&(P.value=tn(c,this.options,x,this.speed)),g&&g(P.value),V&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return W(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(this.currentTime)}set time(e){e=z(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(N.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=W(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=ao,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Vo(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const rt=t=>t*180/Math.PI,Pe=t=>{const e=rt(Math.atan2(t[1],t[0]));return Se(e)},Co={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Pe,rotateZ:Pe,skewX:t=>rt(Math.atan(t[1])),skewY:t=>rt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Se=t=>(t=t%360,t<0&&(t+=360),t),Rn=Pe,En=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ln=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Mo={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:En,scaleY:Ln,scale:t=>(En(t)+Ln(t))/2,rotateX:t=>Se(rt(Math.atan2(t[6],t[5]))),rotateY:t=>Se(rt(Math.atan2(-t[2],t[0]))),rotateZ:Rn,rotate:Rn,skewX:t=>rt(Math.atan(t[4])),skewY:t=>rt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function be(t){return t.includes("scale")?1:0}function we(t,e){if(!t||t==="none")return be(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Mo,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Co,i=a}if(!i)return be(e);const o=s[e],r=i[1].split(",").map(Ro);return typeof o=="function"?o(r):r[o]}const Do=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return we(n,e)};function Ro(t){return parseFloat(t.trim())}const xt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tt=new Set(xt),kn=t=>t===vt||t===S,Eo=new Set(["x","y","z"]),Lo=xt.filter(t=>!Eo.has(t));function ko(t){const e=[];return Lo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ot={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>we(e,"x"),y:(t,{transform:e})=>we(e,"y")};ot.translateX=ot.x;ot.translateY=ot.y;const at=new Set;let Ae=!1,Ve=!1,Ce=!1;function mi(){if(Ve){const t=Array.from(at).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ko(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ve=!1,Ae=!1,at.forEach(t=>t.complete(Ce)),at.clear()}function pi(){at.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ve=!0)})}function Fo(){Ce=!0,pi(),mi(),Ce=!1}class sn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(at.add(this),Ae||(Ae=!0,M.read(pi),M.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Vo(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),at.delete(this)}cancel(){this.state==="scheduled"&&(at.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Io=t=>t.startsWith("--");function Bo(t,e,n){Io(e)?t.style.setProperty(e,n):t.style[e]=n}const jo=Ge(()=>window.ScrollTimeline!==void 0),Oo={};function No(t,e){const n=Ge(t);return()=>Oo[e]??n()}const gi=No(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),bt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Fn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bt([0,.65,.55,1]),circOut:bt([.55,0,1,.45]),backIn:bt([.31,.01,.66,-.59]),backOut:bt([.33,1.53,.69,.99])};function yi(t,e){if(t)return typeof t=="function"?gi()?hi(t,e):"ease-out":ti(t)?bt(t):Array.isArray(t)?t.map(n=>yi(n,e)||Fn.easeOut):Fn[t]}function Uo(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=yi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function vi(t){return typeof t=="function"&&"applyToOptions"in t}function Ko({type:t,...e}){return vi(t)&&gi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Wo extends en{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,_e(typeof e.type!="string");const u=Ko(e);this.animation=Uo(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=tn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Bo(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return W(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=z(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&jo()?(this.animation.timeline=e,$):n(this)}}const xi={anticipate:qs,backInOut:Ys,circInOut:Js};function $o(t){return t in xi}function _o(t){typeof t.ease=="string"&&$o(t.ease)&&(t.ease=xi[t.ease])}const In=10;class Go extends Wo{constructor(e){_o(e),di(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new nn({...r,autoplay:!1}),l=z(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-In).value,a.sample(l).value,In),a.stop()}}const Bn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Q.test(t)||t==="0")&&!t.startsWith("url("));function zo(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Ho(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Bn(i,e),a=Bn(o,e);return!r||!a?!1:zo(t)||(n==="spring"||vi(n))&&s}function Me(t){t.duration=0,t.type="keyframes"}const Xo=new Set(["opacity","clipPath","filter","transform"]),Yo=Ge(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function qo(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Yo()&&n&&Xo.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Zo=40;class Jo extends en{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=N.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...h},d=c?.KeyframeResolver||sn;this.keyframeResolver=new d(a,(m,g,x)=>this.onKeyframesResolved(m,g,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=N.now(),Ho(e,o,r,a)||((Y.instantAnimations||!l)&&c?.(tn(e,s,n)),e[0]=e[e.length-1],Me(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Zo?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&qo(f)?new Go({...f,element:f.motionValue.owner.current}):new nn(f);d.finished.then(()=>this.notifyFinished()).catch($),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Fo()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Qo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ta(t){const e=Qo.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ti(t,e,n=1){const[s,i]=ta(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ks(r)?parseFloat(r):r}return Ye(i)?Ti(i,e,n+1):i}function rn(t,e){return t?.[e]??t?.default??t}const Pi=new Set(["width","height","top","left","right","bottom",...xt]),ea={test:t=>t==="auto",parse:t=>t},Si=t=>e=>e.test(t),bi=[vt,S,H,Z,Gr,_r,ea],jn=t=>bi.find(Si(t));function na(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||$s(t):!0}const sa=new Set(["brightness","contrast","saturate","opacity"]);function ia(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(qe)||[];if(!s)return t;const i=n.replace(s,"");let o=sa.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ra=/\b([a-z-]*)\(.*?\)/gu,De={...Q,getAnimatableNone:t=>{const e=t.match(ra);return e?e.map(ia).join(" "):t}},On={...vt,transform:Math.round},oa={rotate:Z,rotateX:Z,rotateY:Z,rotateZ:Z,scale:Ot,scaleX:Ot,scaleY:Ot,scaleZ:Ot,skew:Z,skewX:Z,skewY:Z,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:Dt,originX:An,originY:An,originZ:S},on={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,backgroundPositionX:S,backgroundPositionY:S,...oa,zIndex:On,fillOpacity:Dt,strokeOpacity:Dt,numOctaves:On},aa={...on,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:De,WebkitFilter:De},wi=t=>aa[t];function Ai(t,e){let n=wi(t);return n!==De&&(n=Q),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const la=new Set(["auto","none","0"]);function ca(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!la.has(o)&&Rt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ai(n,i)}class ua extends sn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Ye(u))){const c=Ti(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Pi.has(s)||e.length!==2)return;const[i,o]=e,r=jn(i),a=jn(o);if(r!==a)if(kn(r)&&kn(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||na(e[i]))&&s.push(i);s.length&&ca(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=ot[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function ha(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Vi=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ci(t){return Ws(t)&&"offsetHeight"in t}const Nn=30,fa=t=>!isNaN(parseFloat(t));class da{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=N.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=fa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);return _s(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gt(t,e){return new da(t,e)}const{schedule:an}=ei(queueMicrotask,!1),G={x:!1,y:!1};function Mi(){return G.x||G.y}function ma(t){return t==="x"||t==="y"?G[t]?null:(G[t]=!0,()=>{G[t]=!1}):G.x||G.y?null:(G.x=G.y=!0,()=>{G.x=G.y=!1})}function Di(t,e){const n=ha(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Un(t){return!(t.pointerType==="touch"||Mi())}function pa(t,e,n={}){const[s,i,o]=Di(t,n),r=a=>{if(!Un(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{Un(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Ri=(t,e)=>e?t===e?!0:Ri(t,e.parentElement):!1,ln=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ga=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ya(t){return ga.has(t.tagName)||t.tabIndex!==-1}const Wt=new WeakSet;function Kn(t){return e=>{e.key==="Enter"&&t(e)}}function ae(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const va=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Kn(()=>{if(Wt.has(n))return;ae(n,"down");const i=Kn(()=>{ae(n,"up")}),o=()=>ae(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Wn(t){return ln(t)&&!Mi()}function xa(t,e,n={}){const[s,i,o]=Di(t,n),r=a=>{const l=a.currentTarget;if(!Wn(a))return;Wt.add(l);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Wt.has(l)&&Wt.delete(l),Wn(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||Ri(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Ci(a)&&(a.addEventListener("focus",u=>va(u,i)),!ya(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Ei(t){return Ws(t)&&"ownerSVGElement"in t}function Ta(t){return Ei(t)&&t.tagName==="svg"}const B=t=>!!(t&&t.getVelocity),Pa=[...bi,E,Q],Sa=t=>Pa.find(Si(t)),cn=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function $n(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function ba(...t){return e=>{let n=!1;const s=t.map(i=>{const o=$n(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():$n(t[i],null)}}}}function wa(...t){return v.useCallback(ba(...t),t)}class Aa extends v.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Ci(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Va({children:t,isPresent:e,anchorX:n,root:s}){const i=v.useId(),o=v.useRef(null),r=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(cn),l=wa(o,t?.ref);return v.useInsertionEffect(()=>{const{width:u,height:c,top:h,left:f,right:d}=r.current;if(e||!o.current||!u||!c)return;const m=n==="left"?`left: ${f}`:`right: ${d}`;o.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const x=s??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
2
- [data-motion-pop-id="${i}"] {
3
- position: absolute !important;
4
- width: ${u}px !important;
5
- height: ${c}px !important;
6
- ${m}px !important;
7
- top: ${h}px !important;
8
- }
9
- `),()=>{x.contains(g)&&x.removeChild(g)}},[e]),C.jsx(Aa,{isPresent:e,childRef:o,sizeRef:r,children:v.cloneElement(t,{ref:l})})}const Ca=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=Ue(Ma),c=v.useId();let h=!0,f=v.useMemo(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:d=>{u.set(d,!0);for(const m of u.values())if(!m)return;s&&s()},register:d=>(u.set(d,!1),()=>u.delete(d))}),[n,u,s]);return o&&h&&(f={...f}),v.useMemo(()=>{u.forEach((d,m)=>u.set(m,!1))},[n]),v.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=C.jsx(Va,{isPresent:n,anchorX:a,root:l,children:t})),C.jsx(Jt.Provider,{value:f,children:t})};function Ma(){return new Map}function Li(t=!0){const e=v.useContext(Jt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=v.useId();v.useEffect(()=>{if(t)return i(o)},[t]);const r=v.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Nt=t=>t.key||"";function _n(t){const e=[];return v.Children.forEach(t,n=>{v.isValidElement(n)&&e.push(n)}),e}const Da=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=Li(r),h=v.useMemo(()=>_n(t),[t]),f=r&&!u?[]:h.map(Nt),d=v.useRef(!0),m=v.useRef(h),g=Ue(()=>new Map),[x,p]=v.useState(h),[T,y]=v.useState(h);Us(()=>{d.current=!1,m.current=h;for(let A=0;A<T.length;A++){const V=Nt(T[A]);f.includes(V)?g.delete(V):g.get(V)!==!0&&g.set(V,!1)}},[T,f.length,f.join("-")]);const w=[];if(h!==x){let A=[...h];for(let V=0;V<T.length;V++){const b=T[V],k=Nt(b);f.includes(k)||(A.splice(V,0,b),w.push(b))}return o==="wait"&&w.length&&(A=w),y(_n(A)),p(h),null}const{forceRender:P}=v.useContext(Ne);return C.jsx(C.Fragment,{children:T.map(A=>{const V=Nt(A),b=r&&!u?!1:h===T||f.includes(V),k=()=>{if(g.has(V))g.set(V,!0);else return;let j=!0;g.forEach(q=>{q||(j=!1)}),j&&(P?.(),y(m.current),r&&c?.(),s&&s())};return C.jsx(Ca,{isPresent:b,initial:!d.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:b?void 0:k,anchorX:a,children:A},V)})})},ki=v.createContext({strict:!1}),Gn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},yt={};for(const t in Gn)yt[t]={isEnabled:e=>Gn[t].some(n=>!!e[n])};function Ra(t){for(const e in t)yt[e]={...yt[e],...t[e]}}const Ea=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ea.has(t)}let Fi=t=>!Xt(t);function La(t){typeof t=="function"&&(Fi=e=>e.startsWith("on")?!Xt(e):t(e))}try{La(require("@emotion/is-prop-valid").default)}catch{}function ka(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Fi(i)||n===!0&&Xt(i)||!e&&!Xt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Qt=v.createContext({});function te(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Et(t){return typeof t=="string"||Array.isArray(t)}const un=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hn=["initial",...un];function ee(t){return te(t.animate)||hn.some(e=>Et(t[e]))}function Ii(t){return!!(ee(t)||t.variants)}function Fa(t,e){if(ee(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Et(n)?n:void 0,animate:Et(s)?s:void 0}}return t.inherit!==!1?e:{}}function Ia(t){const{initial:e,animate:n}=Fa(t,v.useContext(Qt));return v.useMemo(()=>({initial:e,animate:n}),[zn(e),zn(n)])}function zn(t){return Array.isArray(t)?t.join(" "):t}function Hn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Pt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=Hn(t,e.target.x),s=Hn(t,e.target.y);return`${n}% ${s}%`}},Ba={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Q.parse(t);if(i.length>5)return s;const o=Q.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=D(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}},Re={borderRadius:{...Pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pt,borderTopRightRadius:Pt,borderBottomLeftRadius:Pt,borderBottomRightRadius:Pt,boxShadow:Ba};function Bi(t,{layout:e,layoutId:n}){return Tt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Re[t]||t==="opacity")}const ja={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Oa=xt.length;function Na(t,e,n){let s="",i=!0;for(let o=0;o<Oa;o++){const r=xt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Vi(a,on[r]);if(!l){i=!1;const c=ja[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function fn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Tt.has(l)){r=!0;continue}else if(si(l)){i[l]=u;continue}else{const c=Vi(u,on[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Na(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const dn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ji(t,e,n){for(const s in e)!B(e[s])&&!Bi(s,n)&&(t[s]=e[s])}function Ua({transformTemplate:t},e){return v.useMemo(()=>{const n=dn();return fn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Ka(t,e){const n=t.style||{},s={};return ji(s,n,t),Object.assign(s,Ua(t,e)),s}function Wa(t,e){const n={},s=Ka(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const $a={offset:"stroke-dashoffset",array:"stroke-dasharray"},_a={offset:"strokeDashoffset",array:"strokeDasharray"};function Ga(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?$a:_a;t[o.offset]=S.transform(-s);const r=S.transform(e),a=S.transform(n);t[o.array]=`${r} ${a}`}function Oi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(fn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Ga(h,i,o,r,!1)}const Ni=()=>({...dn(),attrs:{}}),Ui=t=>typeof t=="string"&&t.toLowerCase()==="svg";function za(t,e,n,s){const i=v.useMemo(()=>{const o=Ni();return Oi(o,e,Ui(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ji(o,t.style,t),i.style={...o,...i.style}}return i}const Ha=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mn(t){return typeof t!="string"||t.includes("-")?!1:!!(Ha.indexOf(t)>-1||/[A-Z]/u.test(t))}function Xa(t,e,n,{latestValues:s},i,o=!1){const a=(mn(t)?za:Wa)(e,s,i,t),l=ka(e,typeof t=="string",o),u=t!==v.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=v.useMemo(()=>B(c)?c.get():c,[c]);return v.createElement(t,{...u,children:h})}function Xn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function pn(t,e,n,s){if(typeof e=="function"){const[i,o]=Xn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Xn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function $t(t){return B(t)?t.get():t}function Ya({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:qa(n,s,i,t),renderState:e()}}function qa(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=$t(o[f]);let{initial:r,animate:a}=t;const l=ee(t),u=Ii(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!te(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=pn(t,f[d]);if(m){const{transitionEnd:g,transition:x,...p}=m;for(const T in p){let y=p[T];if(Array.isArray(y)){const w=c?y.length-1:0;y=y[w]}y!==null&&(i[T]=y)}for(const T in g)i[T]=g[T]}}}return i}const Ki=t=>(e,n)=>{const s=v.useContext(Qt),i=v.useContext(Jt),o=()=>Ya(t,e,s,i);return n?o():Ue(o)};function gn(t,e,n){const{style:s}=t,i={};for(const o in s)(B(s[o])||e.style&&B(e.style[o])||Bi(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const Za=Ki({scrapeMotionValuesFromProps:gn,createRenderState:dn});function Wi(t,e,n){const s=gn(t,e,n);for(const i in t)if(B(t[i])||B(e[i])){const o=xt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const Ja=Ki({scrapeMotionValuesFromProps:Wi,createRenderState:Ni}),Qa=Symbol.for("motionComponentSymbol");function ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function tl(t,e,n){return v.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ut(n)&&(n.current=s))},[e])}const yn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),el="framerAppearId",$i="data-"+yn(el),_i=v.createContext({});function nl(t,e,n,s,i){const{visualElement:o}=v.useContext(Qt),r=v.useContext(ki),a=v.useContext(Jt),l=v.useContext(cn).reducedMotion,u=v.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=v.useContext(_i);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&sl(u.current,n,i,h);const f=v.useRef(!1);v.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const d=n[$i],m=v.useRef(!!d&&!window.MotionHandoffIsComplete?.(d)&&window.MotionHasOptimisedAnimation?.(d));return Us(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),v.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(d)}),m.current=!1),c.enteringChildren=void 0)}),c}function sl(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Gi(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&ut(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Gi(t){if(t)return t.options.allowProjection!==!1?t.projection:Gi(t.parent)}function le(t,{forwardMotionProps:e=!1}={},n,s){n&&Ra(n);const i=mn(t)?Ja:Za;function o(a,l){let u;const c={...v.useContext(cn),...a,layoutId:il(a)},{isStatic:h}=c,f=Ia(a),d=i(a,h);if(!h&&Ke){rl();const m=ol(c);u=m.MeasureLayout,f.visualElement=nl(t,d,c,s,m.ProjectionNode)}return C.jsxs(Qt.Provider,{value:f,children:[u&&f.visualElement?C.jsx(u,{visualElement:f.visualElement,...c}):null,Xa(t,a,tl(d,f.visualElement,l),d,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=v.forwardRef(o);return r[Qa]=t,r}function il({layoutId:t}){const e=v.useContext(Ne).id;return e&&t!==void 0?e+"-"+t:t}function rl(t,e){v.useContext(ki).strict}function ol(t){const{drag:e,layout:n}=yt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function al(t,e){if(typeof Proxy>"u")return le;const n=new Map,s=(o,r)=>le(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,le(r,void 0,t,e)),n.get(r))})}function zi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ll({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function cl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ce(t){return t===void 0||t===1}function Ee({scale:t,scaleX:e,scaleY:n}){return!ce(t)||!ce(e)||!ce(n)}function st(t){return Ee(t)||Hi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Hi(t){return Yn(t.x)||Yn(t.y)}function Yn(t){return t&&t!=="0%"}function Yt(t,e,n){const s=t-n,i=e*s;return n+i}function qn(t,e,n,s,i){return i!==void 0&&(t=Yt(t,i,s)),Yt(t,n,s)+e}function Le(t,e=0,n=1,s,i){t.min=qn(t.min,e,n,s,i),t.max=qn(t.max,e,n,s,i)}function Xi(t,{x:e,y:n}){Le(t.x,e.translate,e.scale,e.originPoint),Le(t.y,n.translate,n.scale,n.originPoint)}const Zn=.999999999999,Jn=1.0000000000001;function ul(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ft(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Xi(t,r)),s&&st(o.latestValues)&&ft(t,o.latestValues))}e.x<Jn&&e.x>Zn&&(e.x=1),e.y<Jn&&e.y>Zn&&(e.y=1)}function ht(t,e){t.min=t.min+e,t.max=t.max+e}function Qn(t,e,n,s,i=.5){const o=D(t.min,t.max,i);Le(t,e,n,o,s)}function ft(t,e){Qn(t.x,e.x,e.scaleX,e.scale,e.originX),Qn(t.y,e.y,e.scaleY,e.scale,e.originY)}function Yi(t,e){return zi(cl(t.getBoundingClientRect(),e))}function hl(t,e,n){const s=Yi(t,n),{scroll:i}=e;return i&&(ht(s.x,i.offset.x),ht(s.y,i.offset.y)),s}const ts=()=>({translate:0,scale:1,origin:0,originPoint:0}),dt=()=>({x:ts(),y:ts()}),es=()=>({min:0,max:0}),L=()=>({x:es(),y:es()}),ke={current:null},qi={current:!1};function fl(){if(qi.current=!0,!!Ke)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ke.current=t.matches;t.addEventListener("change",e),e()}else ke.current=!1}const dl=new WeakMap;function ml(t,e,n){for(const s in e){const i=e[s],o=n[s];if(B(i))t.addValue(s,i);else if(B(o))t.addValue(s,gt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,gt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ns=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class pl{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=sn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=N.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,M.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ee(n),this.isVariantNode=Ii(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&B(d)&&d.set(l[f])}}mount(e){this.current=e,dl.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),qi.current||fl(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ke.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),J(this.notifyUpdate),J(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Tt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in yt){const n=yt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ns.length;s++){const i=ns[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=ml(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=gt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ks(s)||$s(s))?s=parseFloat(s):!Sa(s)&&Q.test(n)&&(s=Ai(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=pn(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){an.render(this.render)}}class Zi extends pl{constructor(){super(...arguments),this.KeyframeResolver=ua}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ji(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function gl(t){return window.getComputedStyle(t)}class yl extends Zi{constructor(){super(...arguments),this.type="html",this.renderInstance=Ji}readValueFromInstance(e,n){if(Tt.has(n))return this.projection?.isProjecting?be(n):Do(e,n);{const s=gl(e),i=(si(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Yi(e,n)}build(e,n,s){fn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return gn(e,n,s)}}const Qi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function vl(t,e,n,s){Ji(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Qi.has(i)?i:yn(i),e.attrs[i])}class xl extends Zi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Tt.has(n)){const s=wi(n);return s&&s.default||0}return n=Qi.has(n)?n:yn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Wi(e,n,s)}build(e,n,s){Oi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){vl(e,n,s,i)}mount(e){this.isSVGTag=Ui(e.tagName),super.mount(e)}}const Tl=(t,e)=>mn(t)?new xl(e):new yl(e,{allowProjection:t!==v.Fragment});function mt(t,e,n){const s=t.getProps();return pn(s,e,n!==void 0?n:s.custom,t)}const Fe=t=>Array.isArray(t);function Pl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gt(n))}function Sl(t){return Fe(t)?t[t.length-1]||0:t}function bl(t,e){const n=mt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Sl(o[r]);Pl(t,r,a)}}function wl(t){return!!(B(t)&&t.add)}function Ie(t,e){const n=t.getValue("willChange");if(wl(n))return n.add(e);if(!n&&Y.WillChange){const s=new Y.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function tr(t){return t.props[$i]}const Al=t=>t!==null;function Vl(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Al),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Cl={type:"spring",stiffness:500,damping:25,restSpeed:10},Ml=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Dl={type:"keyframes",duration:.8},Rl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},El=(t,{keyframes:e})=>e.length>2?Dl:Tt.has(t)?t.startsWith("scale")?Ml(e[1]):Cl:Rl;function Ll({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const vn=(t,e,n,s={},i,o)=>r=>{const a=rn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-z(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Ll(a)||Object.assign(c,El(t,c)),c.duration&&(c.duration=z(c.duration)),c.repeatDelay&&(c.repeatDelay=z(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Me(c),c.delay===0&&(h=!0)),(Y.instantAnimations||Y.skipAnimations)&&(h=!0,Me(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=Vl(c.keyframes,a);if(f!==void 0){M.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new nn(c):new Jo(c)};function kl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function er(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&kl(u,c))continue;const d={delay:n,...rn(o||{},c)},m=h.get();if(m!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===m&&!d.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const p=tr(t);if(p){const T=window.MotionHandoffAnimation(p,c,M);T!==null&&(d.startTime=T,g=!0)}}Ie(t,c),h.start(vn(c,h,f,t.shouldReduceMotion&&Pi.has(c)?{type:!1}:d,t,g));const x=h.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{M.update(()=>{r&&bl(t,r)})}),l}function nr(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Be(t,e,n={}){const s=mt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(er(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Fl(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Fl(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Be(l,e,{...r,delay:n+(typeof s=="function"?0:s)+nr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Il(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Be(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Be(t,e,n);else{const i=typeof e=="function"?mt(t,e,n.custom):e;s=Promise.all(er(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function sr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Bl=hn.length;function ir(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ir(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Bl;n++){const s=hn[n],i=t.props[s];(Et(i)||i===!1)&&(e[s]=i)}return e}const jl=[...un].reverse(),Ol=un.length;function Nl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Il(t,n,s)))}function Ul(t){let e=Nl(t),n=ss(),s=!0;const i=l=>(u,c)=>{const h=mt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...m}=h;u={...u,...m,...d}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=ir(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let x=0;x<Ol;x++){const p=jl[x],T=n[p],y=u[p]!==void 0?u[p]:c[p],w=Et(y),P=p===l?T.isActive:null;P===!1&&(m=x);let A=y===c[p]&&y!==u[p]&&w;if(A&&s&&t.manuallyAnimateOnMount&&(A=!1),T.protectedKeys={...d},!T.isActive&&P===null||!y&&!T.prevProp||te(y)||typeof y=="boolean")continue;const V=Kl(T.prevProp,y);let b=V||p===l&&T.isActive&&!A&&w||x>m&&w,k=!1;const j=Array.isArray(y)?y:[y];let q=j.reduce(i(p),{});P===!1&&(q={});const{prevResolvedValues:xn={}}=T,xr={...xn,...q},Tn=F=>{b=!0,f.has(F)&&(k=!0,f.delete(F)),T.needsAnimating[F]=!0;const U=t.getValue(F);U&&(U.liveStyle=!1)};for(const F in xr){const U=q[F],et=xn[F];if(d.hasOwnProperty(F))continue;let lt=!1;Fe(U)&&Fe(et)?lt=!sr(U,et):lt=U!==et,lt?U!=null?Tn(F):f.add(F):U!==void 0&&f.has(F)?Tn(F):T.protectedKeys[F]=!0}T.prevProp=y,T.prevResolvedValues=q,T.isActive&&(d={...d,...q}),s&&t.blockInitialAnimation&&(b=!1);const Pn=A&&V;b&&(!Pn||k)&&h.push(...j.map(F=>{const U={type:p};if(typeof F=="string"&&s&&!Pn&&t.manuallyAnimateOnMount&&t.parent){const{parent:et}=t,lt=mt(et,F);if(et.enteringChildren&&lt){const{delayChildren:Tr}=lt.transition||{};U.delay=nr(et.enteringChildren,t,Tr)}}return{animation:F,options:U}}))}if(f.size){const x={};if(typeof u.initial!="boolean"){const p=mt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(x.transition=p.transition)}f.forEach(p=>{const T=t.getBaseTarget(p),y=t.getValue(p);y&&(y.liveStyle=!0),x[p]=T??null}),h.push({animation:x})}let g=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ss()}}}function Kl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!sr(e,t):!1}function nt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ss(){return{animate:nt(!0),whileInView:nt(),whileHover:nt(),whileTap:nt(),whileDrag:nt(),whileFocus:nt(),exit:nt()}}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Wl extends tt{constructor(e){super(e),e.animationState||(e.animationState=Ul(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();te(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let $l=0;class _l extends tt{constructor(){super(...arguments),this.id=$l++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Gl={animation:{Feature:Wl},exit:{Feature:_l}};function Lt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Bt(t){return{point:{x:t.pageX,y:t.pageY}}}const zl=t=>e=>ln(e)&&t(e,Bt(e));function Vt(t,e,n,s){return Lt(t,e,zl(n),s)}const rr=1e-4,Hl=1-rr,Xl=1+rr,or=.01,Yl=0-or,ql=0+or;function O(t){return t.max-t.min}function Zl(t,e,n){return Math.abs(t-e)<=n}function is(t,e,n,s=.5){t.origin=s,t.originPoint=D(e.min,e.max,t.origin),t.scale=O(n)/O(e),t.translate=D(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Hl&&t.scale<=Xl||isNaN(t.scale))&&(t.scale=1),(t.translate>=Yl&&t.translate<=ql||isNaN(t.translate))&&(t.translate=0)}function Ct(t,e,n,s){is(t.x,e.x,n.x,s?s.originX:void 0),is(t.y,e.y,n.y,s?s.originY:void 0)}function rs(t,e,n){t.min=n.min+e.min,t.max=t.min+O(e)}function Jl(t,e,n){rs(t.x,e.x,n.x),rs(t.y,e.y,n.y)}function os(t,e,n){t.min=e.min-n.min,t.max=t.min+O(e)}function qt(t,e,n){os(t.x,e.x,n.x),os(t.y,e.y,n.y)}function K(t){return[t("x"),t("y")]}const ar=({current:t})=>t?t.ownerDocument.defaultView:null,as=(t,e)=>Math.abs(t-e);function Ql(t,e){const n=as(t.x,e.x),s=as(t.y,e.y);return Math.sqrt(n**2+s**2)}class lr{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=he(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,m=Ql(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!d&&!m)return;const{point:g}=f,{timestamp:x}=I;this.history.push({...g,timestamp:x});const{onStart:p,onMove:T}=this.handlers;d||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ue(d,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=he(f.type==="pointercancel"?this.lastMoveEventInfo:ue(d,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,p),g&&g(f,p)},!ln(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=Bt(e),l=ue(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=I;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,he(l,this.history)),this.removeListeners=kt(Vt(this.contextWindow,"pointermove",this.handlePointerMove),Vt(this.contextWindow,"pointerup",this.handlePointerUp),Vt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),J(this.updatePoint)}}function ue(t,e){return e?{point:e(t.point)}:t}function ls(t,e){return{x:t.x-e.x,y:t.y-e.y}}function he({point:t},e){return{point:t,delta:ls(t,cr(e)),offset:ls(t,tc(e)),velocity:ec(e,.1)}}function tc(t){return t[0]}function cr(t){return t[t.length-1]}function ec(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=cr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>z(e)));)n--;if(!s)return{x:0,y:0};const o=W(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function nc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?D(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?D(n,t,s.max):Math.min(t,n)),t}function cs(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function sc(t,{top:e,left:n,bottom:s,right:i}){return{x:cs(t.x,n,i),y:cs(t.y,e,s)}}function us(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function ic(t,e){return{x:us(t.x,e.x),y:us(t.y,e.y)}}function rc(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=Mt(e.min,e.max-s,t.min):s>i&&(n=Mt(t.min,t.max-i,e.min)),X(0,1,n)}function oc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const je=.35;function ac(t=je){return t===!1?t=0:t===!0&&(t=je),{x:hs(t,"left","right"),y:hs(t,"top","bottom")}}function hs(t,e,n){return{min:fs(t,e),max:fs(t,n)}}function fs(t,e){return typeof t=="number"?t:t[e]||0}const lc=new WeakMap;class cc{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=L(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bt(h).point)},r=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:g}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ma(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),K(p=>{let T=this.getAxisMotionValue(p).get()||0;if(H.test(T)){const{projection:y}=this.visualElement;if(y&&y.layout){const w=y.layout.layoutBox[p];w&&(T=O(w)*(parseFloat(T)/100))}}this.originPoint[p]=T}),g&&M.postRender(()=>g(h,f)),Ie(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:g,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:p}=f;if(m&&this.currentDirection===null){this.currentDirection=uc(p),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),x&&x(h,f)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>K(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new lr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:ar(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ut(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=nc(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&ut(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=sc(s.layoutBox,e):this.constraints=!1,this.elastic=ac(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&K(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=oc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ut(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=hl(s,i.root,this.visualElement.getTransformPagePoint());let r=ic(i.layout.layoutBox,o);if(n){const a=n(ll(r));this.hasMutatedConstraints=!!a,a&&(r=zi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=K(c=>{if(!Ut(c,n,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ie(this.visualElement,e),s.start(vn(e,s,0,n,this.visualElement,!1))}stopAnimation(){K(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){K(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){K(n=>{const{drag:s}=this.getProps();if(!Ut(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-D(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ut(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};K(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=rc({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),K(r=>{if(!Ut(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(D(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;lc.set(this.visualElement,this);const e=this.visualElement.current,n=Vt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();ut(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),M.read(s);const r=Lt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(K(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=je,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ut(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function uc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class hc extends tt{constructor(e){super(e),this.removeGroupControls=$,this.removeListeners=$,this.controls=new cc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$}unmount(){this.removeGroupControls(),this.removeListeners()}}const ds=t=>(e,n)=>{t&&M.postRender(()=>t(e,n))};class fc extends tt{constructor(){super(...arguments),this.removePointerDownListener=$}onPointerDown(e){this.session=new lr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ar(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:ds(e),onStart:ds(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&M.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Vt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const _t={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let fe=!1;class dc extends v.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),fe&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),_t.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,fe=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||M.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),an.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;fe=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ur(t){const[e,n]=Li(),s=v.useContext(Ne);return C.jsx(dc,{...t,layoutGroup:s,switchLayoutGroup:v.useContext(_i),isPresent:e,safeToRemove:n})}function mc(t,e,n){const s=B(t)?t:gt(t);return s.start(vn("",s,e,n)),s.animation}const pc=(t,e)=>t.depth-e.depth;class gc{constructor(){this.children=[],this.isDirty=!1}add(e){We(this.children,e),this.isDirty=!0}remove(e){$e(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(pc),this.isDirty=!1,this.children.forEach(e)}}function yc(t,e){const n=N.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(J(s),t(o-e))};return M.setup(s,!0),()=>J(s)}const hr=["TopLeft","TopRight","BottomLeft","BottomRight"],vc=hr.length,ms=t=>typeof t=="string"?parseFloat(t):t,ps=t=>typeof t=="number"||S.test(t);function xc(t,e,n,s,i,o){i?(t.opacity=D(0,n.opacity??1,Tc(s)),t.opacityExit=D(e.opacity??1,0,Pc(s))):o&&(t.opacity=D(e.opacity??1,n.opacity??1,s));for(let r=0;r<vc;r++){const a=`border${hr[r]}Radius`;let l=gs(e,a),u=gs(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ps(l)===ps(u)?(t[a]=Math.max(D(ms(l),ms(u),s),0),(H.test(u)||H.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=D(e.rotate||0,n.rotate||0,s))}function gs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Tc=fr(0,.5,Zs),Pc=fr(.5,.95,$);function fr(t,e,n){return s=>s<t?0:s>e?1:n(Mt(t,e,s))}function ys(t,e){t.min=e.min,t.max=e.max}function _(t,e){ys(t.x,e.x),ys(t.y,e.y)}function vs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function xs(t,e,n,s,i){return t-=e,t=Yt(t,1/n,s),i!==void 0&&(t=Yt(t,1/i,s)),t}function Sc(t,e=0,n=1,s=.5,i,o=t,r=t){if(H.test(e)&&(e=parseFloat(e),e=D(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=D(o.min,o.max,s);t===o&&(a-=e),t.min=xs(t.min,e,n,a,i),t.max=xs(t.max,e,n,a,i)}function Ts(t,e,[n,s,i],o,r){Sc(t,e[n],e[s],e[i],e.scale,o,r)}const bc=["x","scaleX","originX"],wc=["y","scaleY","originY"];function Ps(t,e,n,s){Ts(t.x,e,bc,n?n.x:void 0,s?s.x:void 0),Ts(t.y,e,wc,n?n.y:void 0,s?s.y:void 0)}function Ss(t){return t.translate===0&&t.scale===1}function dr(t){return Ss(t.x)&&Ss(t.y)}function bs(t,e){return t.min===e.min&&t.max===e.max}function Ac(t,e){return bs(t.x,e.x)&&bs(t.y,e.y)}function ws(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function mr(t,e){return ws(t.x,e.x)&&ws(t.y,e.y)}function As(t){return O(t.x)/O(t.y)}function Vs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Vc{constructor(){this.members=[]}add(e){We(this.members,e),e.scheduleRender()}remove(e){if($e(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Cc(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const de=["","X","Y","Z"],Mc=1e3;let Dc=0;function me(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function pr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=tr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&pr(s)}function gr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Dc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Lc),this.nodes.forEach(Bc),this.nodes.forEach(jc),this.nodes.forEach(kc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new gc)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new ze),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Ei(r)&&!Ta(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=yc(f,250),_t.hasAnimatedSinceResize&&(_t.hasAnimatedSinceResize=!1,this.nodes.forEach(Ds)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Wc,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),p=!this.targetLayout||!mr(this.targetLayout,d),T=!h&&f;if(this.options.layoutRoot||this.resumeFrom||T||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...rn(m,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,T)}else h||Ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),J(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Oc),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Cs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ms);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ic),this.nodes.forEach(Rc),this.nodes.forEach(Ec)):this.nodes.forEach(Ms),this.clearAllSnapshots();const a=N.now();I.delta=X(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,ne.update.process(I),ne.preRender.process(I),ne.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,an.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Fc),this.sharedNodes.forEach(Nc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=L(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!dr(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||st(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),$c(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return L();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(_c))){const{scroll:u}=this.root;u&&(ht(a.x,u.offset.x),ht(a.y,u.offset.y))}return a}removeElementScroll(r){const a=L();if(_(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&_(a,r),ht(a.x,c.offset.x),ht(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=L();_(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ft(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),st(c.latestValues)&&ft(l,c.latestValues)}return st(this.latestValues)&&ft(l,this.latestValues),l}removeTransform(r){const a=L();_(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!st(u.latestValues))continue;Ee(u.latestValues)&&u.updateSnapshot();const c=L(),h=u.measurePageBox();_(c,h),Ps(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return st(this.latestValues)&&Ps(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Jl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):_(this.target,this.layout.layoutBox),Xi(this.target,this.targetDelta)):_(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ee(this.parent.latestValues)||Hi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),qt(this.relativeTargetOrigin,a,l),_(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===I.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;_(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;ul(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=L());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vs(this.prevProjectionDelta.x,this.projectionDelta.x),vs(this.prevProjectionDelta.y,this.projectionDelta.y)),Ct(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Vs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=dt(),this.projectionDelta=dt(),this.projectionDeltaWithTransform=dt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=dt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=L(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,x=this.getStack(),p=!x||x.members.length<=1,T=!!(g&&!p&&this.options.crossfade===!0&&!this.path.some(Kc));this.animationProgress=0;let y;this.mixTargetDelta=w=>{const P=w/1e3;Rs(h.x,r.x,P),Rs(h.y,r.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Uc(this.relativeTarget,this.relativeTargetOrigin,f,P),y&&Ac(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=L()),_(y,this.relativeTarget)),g&&(this.animationValues=c,xc(c,u,this.latestValues,P,T,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(J(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{_t.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gt(0)),this.currentAnimation=mc(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Mc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&yr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||L();const h=O(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}_(a,l),ft(a,c),Ct(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Vc),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&me("z",r,u,this.animationValues);for(let c=0;c<de.length;c++)me(`rotate${de[c]}`,r,u,this.animationValues),me(`skew${de[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=$t(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=$t(a?.pointerEvents)||""),this.hasProjected&&!st(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Cc(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in Re){if(c[m]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:p}=Re[m],T=h==="none"?c[m]:g(c[m],u);if(x){const y=x.length;for(let w=0;w<y;w++)r[x[w]]=T}else p?this.options.visualElement.renderState.vars[m]=T:r[m]=T}this.options.layoutId&&(r.pointerEvents=u===this?$t(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Cs),this.root.sharedNodes.clear()}}}function Rc(t){t.updateLayout()}function Ec(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?K(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=O(h);h.min=n[c].min,h.max=h.min+f}):yr(i,e.layoutBox,n)&&K(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=O(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const r=dt();Ct(r,n,e.layoutBox);const a=dt();o?Ct(a,t.applyTransform(s,!0),e.measuredBox):Ct(a,n,e.layoutBox);const l=!dr(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const d=L();qt(d,e.layoutBox,h.layoutBox);const m=L();qt(m,n,f.layoutBox),mr(d,m)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Lc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function kc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Fc(t){t.clearSnapshot()}function Cs(t){t.clearMeasurements()}function Ms(t){t.isLayoutDirty=!1}function Ic(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ds(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Bc(t){t.resolveTargetDelta()}function jc(t){t.calcProjection()}function Oc(t){t.resetSkewAndRotation()}function Nc(t){t.removeLeadSnapshot()}function Rs(t,e,n){t.translate=D(e.translate,0,n),t.scale=D(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Es(t,e,n,s){t.min=D(e.min,n.min,s),t.max=D(e.max,n.max,s)}function Uc(t,e,n,s){Es(t.x,e.x,n.x,s),Es(t.y,e.y,n.y,s)}function Kc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Wc={duration:.45,ease:[.4,0,.1,1]},Ls=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ks=Ls("applewebkit/")&&!Ls("chrome/")?Math.round:$;function Fs(t){t.min=ks(t.min),t.max=ks(t.max)}function $c(t){Fs(t.x),Fs(t.y)}function yr(t,e,n){return t==="position"||t==="preserve-aspect"&&!Zl(As(e),As(n),.2)}function _c(t){return t!==t.root&&t.scroll?.wasRoot}const Gc=gr({attachResizeListener:(t,e)=>Lt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),pe={current:void 0},vr=gr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!pe.current){const t=new Gc({});t.mount(window),t.setOptions({layoutScroll:!0}),pe.current=t}return pe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),zc={pan:{Feature:fc},drag:{Feature:hc,ProjectionNode:vr,MeasureLayout:ur}};function Is(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&M.postRender(()=>o(e,Bt(e)))}class Hc extends tt{mount(){const{current:e}=this.node;e&&(this.unmount=pa(e,(n,s)=>(Is(this.node,s,"Start"),i=>Is(this.node,i,"End"))))}unmount(){}}class Xc extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=kt(Lt(this.node.current,"focus",()=>this.onFocus()),Lt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Bs(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&M.postRender(()=>o(e,Bt(e)))}class Yc extends tt{mount(){const{current:e}=this.node;e&&(this.unmount=xa(e,(n,s)=>(Bs(this.node,s,"Start"),(i,{success:o})=>Bs(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Oe=new WeakMap,ge=new WeakMap,qc=t=>{const e=Oe.get(t.target);e&&e(t)},Zc=t=>{t.forEach(qc)};function Jc({root:t,...e}){const n=t||document;ge.has(n)||ge.set(n,{});const s=ge.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Zc,{root:t,...e})),s[i]}function Qc(t,e,n){const s=Jc(e);return Oe.set(t,n),s.observe(t),()=>{Oe.delete(t),s.unobserve(t)}}const tu={some:0,all:1};class eu extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:tu[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return Qc(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(nu(e,n))&&this.startObserver()}unmount(){}}function nu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const su={inView:{Feature:eu},tap:{Feature:Yc},focus:{Feature:Xc},hover:{Feature:Hc}},iu={layout:{ProjectionNode:vr,MeasureLayout:ur}},ru={...Gl,...su,...zc,...iu},ou=al(ru,Tl),au=3e3,Zt=wr((t,e)=>{let n=0;const s=()=>++n;return{items:[],add:i=>{const o=s();return t(r=>{const a=i.position||"top",l=r.items.filter(h=>h.config.position==="top"),u=r.items.filter(h=>h.config.position==="bottom");return a==="top"?l.push({config:{...i,position:a},id:o}):u.push({config:{...i,position:a},id:o}),{items:[...l.slice(-3),...u.slice(-3)]}}),setTimeout(()=>{e().remove(o)},i.duration||au),o},remove:i=>{t(o=>(o.items.find(a=>a.id===i)?.config?.onHide?.(),{items:o.items.filter(a=>a.id!==i)}))},clear:()=>{t({items:[]})}}}),St=Ns("toast"),pt=({type:t="informative",message:e,closeAction:n=!0,onCloseActionClick:s,action:i,onActionClick:o,icon:r})=>{const a=v.useMemo(()=>{if(r)return Sr(r);const l={neutral:null,informative:"circle-info",positive:"circle-check",negative:"triangle-warning"}[t];if(l)return C.jsx(bn,{name:l,type:"fill",size:24})},[r,t]);return C.jsxs("div",{className:Pr(St,`${St}--${t}`),children:[!!a&&C.jsx("span",{className:`${St}__icon`,children:a}),C.jsx(br,{component:"div",size:"base",weight:"regular",color:"inherit",className:`${St}__content`,children:e}),i&&C.jsx(Ar,{size:"medium",type:"ghost",theme:t==="informative"||t==="neutral"?"neutral-inverse":"neutral",onClick:o,children:i}),n&&C.jsx("div",{onClick:s,className:`${St}__close-icon`,children:C.jsx(bn,{name:"xmark",size:16})})]})};pt.show=t=>Zt.getState().add(t);pt.hide=t=>t?Zt.getState().remove(t):Zt.getState().clear();pt.__docgenInfo={description:"",methods:[{name:"show",docblock:null,modifiers:["static"],params:[{name:"config",optional:!1,type:null}],returns:null},{name:"hide",docblock:null,modifiers:["static"],params:[{name:"id",optional:!1,type:null}],returns:null}],displayName:"Toast",props:{type:{defaultValue:{value:"'informative'",computed:!1},required:!1},closeAction:{defaultValue:{value:"true",computed:!1},required:!1}}};const js=Ns("toast-provider"),Os=({position:t})=>{const{items:e}=Zt();return C.jsx("div",{className:`${js} ${js}--${t}`,children:C.jsx(Da,{mode:"popLayout",children:e.filter(n=>n.config.position===t).map(n=>C.jsx(ou.div,{style:{display:"flex",flexDirection:"column",justifyContent:t==="bottom"?"flex-start":"flex-end"},initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{opacity:0,y:e.length>1?"0%":t==="top"?"-100%":"100%"},children:C.jsx(pt,{...n.config,onActionClick:()=>{pt.hide(n.id),n.config.onActionClick?.()},onCloseActionClick:()=>{pt.hide(n.id),n.config.onCloseActionClick?.()}})},n.id))})})},lu=()=>C.jsxs(C.Fragment,{children:[Sn.createPortal(C.jsx(Os,{position:"top"}),document.body),Sn.createPortal(C.jsx(Os,{position:"bottom"}),document.body)]});lu.__docgenInfo={description:"",methods:[],displayName:"ToastProvider"};export{pt as T,lu as a};
@@ -1 +0,0 @@
1
- import{j as o}from"./iframe-CQAwSt4E.js";import{c as e,g as n}from"./classname-CUR_zgkh.js";import{I as p}from"./icon-DdQsMyRa.js";const s=n("tooltip"),d=r=>{const{type:a="default",position:t="top",closeable:i,className:c,children:l,...m}=r;return o.jsxs("div",{className:e(s,`${s}--${a}`,c),...m,children:[o.jsx("div",{className:e(`${s}__arrow`,`${s}__arrow--${t}`,`${s}__arrow--${a}`)}),o.jsx("div",{className:`${s}__content`,children:l}),i&&o.jsx("div",{className:`${s}__close`,children:o.jsx(p,{name:"xmark",size:16})})]})};d.__docgenInfo={description:"",methods:[],displayName:"Tooltip"};export{d as T};
@@ -1 +0,0 @@
1
- import{j as l}from"./iframe-CQAwSt4E.js";import{c as m,g as n}from"./classname-CUR_zgkh.js";import{g as f}from"./colors-_6nFGM3e.js";const e=n("typography"),u=({component:s,size:a="inherit",weight:o="inherit",color:r,className:t,...i})=>{const p=s||"div";return l.jsx(p,{className:m(e,`${e}__size--${a}`,`${e}__weight--${o}`,t),...i,style:{color:f(r)}})};u.__docgenInfo={description:"",methods:[],displayName:"Typography",props:{size:{defaultValue:{value:"'inherit'",computed:!1},required:!1},weight:{defaultValue:{value:"'inherit'",computed:!1},required:!1}}};export{u as T};
@@ -1,29 +0,0 @@
1
- import{j as e}from"./iframe-CQAwSt4E.js";import{useMDXComponents as t}from"./index-CgMRTj-o.js";import{b as i,M as p}from"./blocks-BuaOUtiH.js";import{t as o}from"./store-D2RudmNr.js";import"./preload-helper-PPVm8Dsz.js";import"./index-DHiZ-gXR.js";function r(s){const n={code:"code",h1:"h1",h2:"h2",pre:"pre",...t(),...s.components};return e.jsxs(e.Fragment,{children:[`
2
- `,`
3
- `,e.jsx(i,{title:"Hooks/useAppPause"}),`
4
- `,e.jsx(n.h1,{id:"useapppause",children:"useAppPause"}),`
5
- `,e.jsx(p,{children:o("hooks.useAppPause.description")}),`
6
- `,e.jsx(n.h2,{id:"import",children:"Import"}),`
7
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-typescript",children:`import { useAppPause } from '@v-miniapp/ui-react'
8
- `})}),`
9
- `,e.jsx(n.h2,{id:"props",children:"Props"}),`
10
- `,e.jsx(p,{children:`
11
- | Name | Type | Required | Default | Description |
12
- | --------- | ------------ | -------- | ------- | ----------------------------------------------------------------------- |
13
- | onPause | () => void | Yes | - | ${o("hooks.useAppPause.onPauseDescription")} |
14
- `}),`
15
- `,e.jsx(n.h2,{id:"",children:o("hooks.usageExample")}),`
16
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-typescript",children:`import { useAppPause } from '@v-miniapp/ui-react';
17
-
18
- function MyComponent() {
19
- useAppPause(() => {
20
- console.log('App paused!');
21
- });
22
-
23
- return (
24
- <div>
25
- <h1>My Component</h1>
26
- </div>
27
- );
28
- }
29
- `})})]})}function l(s={}){const{wrapper:n}={...t(),...s.components};return n?e.jsx(n,{...s,children:e.jsx(r,{...s})}):r(s)}export{l as default};
@@ -1,29 +0,0 @@
1
- import{j as e}from"./iframe-CQAwSt4E.js";import{useMDXComponents as t}from"./index-CgMRTj-o.js";import{b as i,M as r}from"./blocks-BuaOUtiH.js";import{t as o}from"./store-D2RudmNr.js";import"./preload-helper-PPVm8Dsz.js";import"./index-DHiZ-gXR.js";function p(s){const n={code:"code",h1:"h1",h2:"h2",pre:"pre",...t(),...s.components};return e.jsxs(e.Fragment,{children:[`
2
- `,`
3
- `,e.jsx(i,{title:"Hooks/useAppResume"}),`
4
- `,e.jsx(n.h1,{id:"useappresume",children:"useAppResume"}),`
5
- `,e.jsx(r,{children:o("hooks.useAppResume.description")}),`
6
- `,e.jsx(n.h2,{id:"import",children:"Import"}),`
7
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-typescript",children:`import { useAppResume } from '@v-miniapp/ui-react'
8
- `})}),`
9
- `,e.jsx(n.h2,{id:"props",children:"Props"}),`
10
- `,e.jsx(r,{children:`
11
- | Name | Type | Required | Default | Description |
12
- | --------- | ------------ | -------- | ------- | ----------------------------------------------------------------------- |
13
- | onResume | () => void | Yes | - | ${o("hooks.useAppResume.onResumeDescription")} |
14
- `}),`
15
- `,e.jsx(n.h2,{id:"",children:o("hooks.usageExample")}),`
16
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-typescript",children:`import { useAppResume } from '@v-miniapp/ui-react';
17
-
18
- function MyComponent() {
19
- useAppResume(() => {
20
- console.log('App resumed!');
21
- });
22
-
23
- return (
24
- <div>
25
- <h1>My Component</h1>
26
- </div>
27
- );
28
- }
29
- `})})]})}function l(s={}){const{wrapper:n}={...t(),...s.components};return n?e.jsx(n,{...s,children:e.jsx(p,{...s})}):p(s)}export{l as default};
@@ -1,29 +0,0 @@
1
- import{j as n}from"./iframe-CQAwSt4E.js";import{useMDXComponents as r}from"./index-CgMRTj-o.js";import{b as c,M as s}from"./blocks-BuaOUtiH.js";import{t}from"./store-D2RudmNr.js";import"./preload-helper-PPVm8Dsz.js";import"./index-DHiZ-gXR.js";function i(o){const e={code:"code",h1:"h1",h2:"h2",pre:"pre",...r(),...o.components};return n.jsxs(n.Fragment,{children:[`
2
- `,`
3
- `,n.jsx(c,{title:"Hooks/useCustomIconEvent"}),`
4
- `,n.jsx(e.h1,{id:"usecustomiconevent",children:"useCustomIconEvent"}),`
5
- `,n.jsx(s,{children:t("hooks.useCustomIconEvent.description")}),`
6
- `,n.jsx(e.h2,{id:"import",children:"Import"}),`
7
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useCustomIconEvent } from '@v-miniapp/ui-react'
8
- `})}),`
9
- `,n.jsx(e.h2,{id:"props",children:"Props"}),`
10
- `,n.jsx(s,{children:`
11
- | Name | Type | Required | Default | Description |
12
- | ----------------- | ------------------------ | -------- | ------- | ----------- |
13
- | onCustomIconEvent | (index: number) => void | Yes | - | ${t("hooks.useCustomIconEvent.onCustomIconEventDescription")} |
14
- `}),`
15
- `,n.jsx(e.h2,{id:"",children:t("hooks.usageExample")}),`
16
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useCustomIconEvent } from '@v-miniapp/ui-react';
17
-
18
- function MyComponent() {
19
- useCustomIconEvent((index) => {
20
- console.log(\`Custom icon at index \${index} was clicked\`);
21
- });
22
-
23
- return (
24
- <div>
25
- <h1>My Component</h1>
26
- </div>
27
- );
28
- }
29
- `})})]})}function l(o={}){const{wrapper:e}={...r(),...o.components};return e?n.jsx(e,{...o,children:n.jsx(i,{...o})}):i(o)}export{l as default};
@@ -1,48 +0,0 @@
1
- import{j as e}from"./iframe-CQAwSt4E.js";import{useMDXComponents as s}from"./index-CgMRTj-o.js";import{b as c}from"./blocks-BuaOUtiH.js";import"./preload-helper-PPVm8Dsz.js";import"./index-DHiZ-gXR.js";function d(i){const n={code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...s(),...i.components};return e.jsxs(e.Fragment,{children:[`
2
- `,`
3
- `,e.jsx(c,{title:"Hooks/useDidHide"}),`
4
- `,e.jsx(n.h1,{id:"usedidhide",children:"useDidHide"}),`
5
- `,e.jsx(n.p,{children:"Hook để xử lý khi page bị ẩn (hide)."}),`
6
- `,e.jsx(n.h2,{id:"import",children:"Import"}),`
7
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-typescript",children:`import { useDidHide } from '@v-miniapp/ui-react'
8
- `})}),`
9
- `,e.jsx(n.h2,{id:"parameters",children:"Parameters"}),`
10
- `,e.jsxs(n.ul,{children:[`
11
- `,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"func?: () => void"}),": Callback function được gọi khi page hide"]}),`
12
- `]}),`
13
- `,e.jsx(n.h2,{id:"returns",children:"Returns"}),`
14
- `,e.jsxs(n.ul,{children:[`
15
- `,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"didHide"}),": ",e.jsx(n.code,{children:"boolean"})," - Cho biết page có đang bị ẩn không"]}),`
16
- `]}),`
17
- `,e.jsx(n.h2,{id:"usage",children:"Usage"}),`
18
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import { useDidHide } from '@v-miniapp/ui-react'
19
- import { useEffect } from 'react'
20
-
21
- const MyPage = () => {
22
- const didHide = useDidHide(() => {
23
- console.log('Page is hidden')
24
- // Cleanup, pause timers, etc.
25
- })
26
-
27
- useEffect(() => {
28
- if (didHide) {
29
- // Page is hidden, cleanup
30
- pauseTimers()
31
- }
32
- }, [didHide])
33
-
34
- return <div>Page is {didHide ? 'hidden' : 'visible'}</div>
35
- }
36
- `})}),`
37
- `,e.jsx(n.h2,{id:"lifecycle",children:"Lifecycle"}),`
38
- `,e.jsx(n.p,{children:"Hook này trigger callback khi:"}),`
39
- `,e.jsxs(n.ul,{children:[`
40
- `,e.jsx(n.li,{children:"Page bị navigate đi (navigate đến page khác)"}),`
41
- `,e.jsx(n.li,{children:"Page bị ẩn do keep-alive (page khác được show)"}),`
42
- `]}),`
43
- `,e.jsx(n.h2,{id:"notes",children:"Notes"}),`
44
- `,e.jsxs(n.ul,{children:[`
45
- `,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"didHide"})," sẽ là ",e.jsx(n.code,{children:"true"})," khi page bị ẩn, ",e.jsx(n.code,{children:"false"})," khi được hiển thị"]}),`
46
- `,e.jsxs(n.li,{children:["Sử dụng ",e.jsx(n.code,{children:"navigationEventEmitter"})," với event ",e.jsx(n.code,{children:"beforeLocationChangeP1"})," để detect page hide"]}),`
47
- `,e.jsx(n.li,{children:"Hữu ích cho cleanup, pause timers, hoặc save state"}),`
48
- `]})]})}function a(i={}){const{wrapper:n}={...s(),...i.components};return n?e.jsx(n,{...i,children:e.jsx(d,{...i})}):d(i)}export{a as default};
@@ -1,49 +0,0 @@
1
- import{j as n}from"./iframe-CQAwSt4E.js";import{useMDXComponents as c}from"./index-CgMRTj-o.js";import{b as o}from"./blocks-BuaOUtiH.js";import"./preload-helper-PPVm8Dsz.js";import"./index-DHiZ-gXR.js";function s(i){const e={code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...c(),...i.components};return n.jsxs(n.Fragment,{children:[`
2
- `,`
3
- `,n.jsx(o,{title:"Hooks/useDidShow"}),`
4
- `,n.jsx(e.h1,{id:"usedidshow",children:"useDidShow"}),`
5
- `,n.jsx(e.p,{children:"Hook để xử lý khi page được hiển thị (show)."}),`
6
- `,n.jsx(e.h2,{id:"import",children:"Import"}),`
7
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useDidShow } from '@v-miniapp/ui-react'
8
- `})}),`
9
- `,n.jsx(e.h2,{id:"parameters",children:"Parameters"}),`
10
- `,n.jsxs(e.ul,{children:[`
11
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"func?: () => void"}),": Callback function được gọi khi page show"]}),`
12
- `]}),`
13
- `,n.jsx(e.h2,{id:"returns",children:"Returns"}),`
14
- `,n.jsxs(e.ul,{children:[`
15
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"didShow"}),": ",n.jsx(e.code,{children:"boolean"})," - Cho biết page có đang được hiển thị không"]}),`
16
- `]}),`
17
- `,n.jsx(e.h2,{id:"usage",children:"Usage"}),`
18
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { useDidShow } from '@v-miniapp/ui-react'
19
- import { useEffect } from 'react'
20
-
21
- const MyPage = () => {
22
- const didShow = useDidShow(() => {
23
- console.log('Page is shown')
24
- // Fetch data, track analytics, etc.
25
- })
26
-
27
- useEffect(() => {
28
- if (didShow) {
29
- // Page is visible, do something
30
- fetchData()
31
- }
32
- }, [didShow])
33
-
34
- return <div>Page is {didShow ? 'visible' : 'hidden'}</div>
35
- }
36
- `})}),`
37
- `,n.jsx(e.h2,{id:"lifecycle",children:"Lifecycle"}),`
38
- `,n.jsx(e.p,{children:"Hook này trigger callback khi:"}),`
39
- `,n.jsxs(e.ul,{children:[`
40
- `,n.jsx(e.li,{children:"Page được mount lần đầu"}),`
41
- `,n.jsx(e.li,{children:"Page được navigate đến (từ page khác)"}),`
42
- `,n.jsx(e.li,{children:"Page được show lại sau khi bị ẩn (navigate back)"}),`
43
- `]}),`
44
- `,n.jsx(e.h2,{id:"notes",children:"Notes"}),`
45
- `,n.jsxs(e.ul,{children:[`
46
- `,n.jsx(e.li,{children:"Callback được gọi ngay khi component mount"}),`
47
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"didShow"})," sẽ là ",n.jsx(e.code,{children:"true"})," khi page được hiển thị, ",n.jsx(e.code,{children:"false"})," khi bị ẩn"]}),`
48
- `,n.jsxs(e.li,{children:["Sử dụng ",n.jsx(e.code,{children:"navigationEventEmitter"})," với event ",n.jsx(e.code,{children:"beforeLocationChangeP2"})," để detect page show"]}),`
49
- `]})]})}function a(i={}){const{wrapper:e}={...c(),...i.components};return e?n.jsx(e,{...i,children:n.jsx(s,{...i})}):s(i)}export{a as default};
@@ -1,50 +0,0 @@
1
- import{j as n}from"./iframe-CQAwSt4E.js";import{useMDXComponents as t}from"./index-CgMRTj-o.js";import{b as o}from"./blocks-BuaOUtiH.js";import"./preload-helper-PPVm8Dsz.js";import"./index-DHiZ-gXR.js";function s(e){const i={code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...t(),...e.components};return n.jsxs(n.Fragment,{children:[`
2
- `,`
3
- `,n.jsx(o,{title:"Hooks/useHistories"}),`
4
- `,n.jsx(i.h1,{id:"usehistories",children:"useHistories"}),`
5
- `,n.jsx(i.p,{children:"Hook để lấy toàn bộ history stack."}),`
6
- `,n.jsx(i.h2,{id:"import",children:"Import"}),`
7
- `,n.jsx(i.pre,{children:n.jsx(i.code,{className:"language-typescript",children:`import { useHistories } from '@v-miniapp/ui-react'
8
- `})}),`
9
- `,n.jsx(i.h2,{id:"returns",children:"Returns"}),`
10
- `,n.jsxs(i.ul,{children:[`
11
- `,n.jsxs(i.li,{children:[n.jsx(i.code,{children:"histories"}),": ",n.jsx(i.code,{children:"IHistory[]"})," - Mảng các history entries trong navigation stack"]}),`
12
- `]}),`
13
- `,n.jsx(i.h2,{id:"type-definitions",children:"Type Definitions"}),`
14
- `,n.jsx(i.pre,{children:n.jsx(i.code,{className:"language-typescript",children:`type IHistory = {
15
- action: IHistoryAction
16
- location: ILocation
17
- }
18
-
19
- type IHistory[] = IHistory[]
20
- `})}),`
21
- `,n.jsx(i.h2,{id:"usage",children:"Usage"}),`
22
- `,n.jsx(i.pre,{children:n.jsx(i.code,{className:"language-tsx",children:`import { useHistories } from '@v-miniapp/ui-react'
23
-
24
- const MyPage = () => {
25
- const histories = useHistories()
26
-
27
- console.log(histories.length) // Số lượng pages trong stack
28
- console.log(histories[0]) // First history entry
29
- console.log(histories[histories.length - 1]) // Last history entry (current)
30
-
31
- return (
32
- <div>
33
- <p>History stack length: {histories.length}</p>
34
- <ul>
35
- {histories.map((history, index) => (
36
- <li key={history.location.key}>
37
- {index + 1}. {history.location.pathname} ({history.action})
38
- </li>
39
- ))}
40
- </ul>
41
- </div>
42
- )
43
- }
44
- `})}),`
45
- `,n.jsx(i.h2,{id:"notes",children:"Notes"}),`
46
- `,n.jsxs(i.ul,{children:[`
47
- `,n.jsx(i.li,{children:"History stack được quản lý bởi browser history API"}),`
48
- `,n.jsxs(i.li,{children:["Mỗi history entry có unique ",n.jsx(i.code,{children:"location.key"})]}),`
49
- `,n.jsx(i.li,{children:"Stack được update khi navigate (push/replace/pop)"}),`
50
- `]})]})}function d(e={}){const{wrapper:i}={...t(),...e.components};return i?n.jsx(i,{...e,children:n.jsx(s,{...e})}):s(e)}const p=[];export{p as __namedExportsOrder,d as default};