@jenesei-software/jenesei-kit-react 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{AnimatePresence-19yP-TCg.js → AnimatePresence-BWc2vFe-.js} +2 -2
- package/build/{AnimatePresence-19yP-TCg.js.map → AnimatePresence-BWc2vFe-.js.map} +1 -1
- package/build/{AnimatePresence-BdBJCJuf.cjs → AnimatePresence-DeKd4Eek.cjs} +2 -2
- package/build/{AnimatePresence-BdBJCJuf.cjs.map → AnimatePresence-DeKd4Eek.cjs.map} +1 -1
- package/build/area-outside.cjs.js +1 -1
- package/build/area-outside.es.js +1 -1
- package/build/area-preview.cjs.js +1 -1
- package/build/area-preview.es.js +1 -1
- package/build/area-skeleton.cjs.js +1 -1
- package/build/area-skeleton.es.js +1 -1
- package/build/{button-BbGiFvok.js → button-C1w25-Hk.js} +4 -4
- package/build/{button-BbGiFvok.js.map → button-C1w25-Hk.js.map} +1 -1
- package/build/{button-BuPpgfL_.cjs → button-CHEeSypf.cjs} +2 -2
- package/build/{button-BuPpgfL_.cjs.map → button-CHEeSypf.cjs.map} +1 -1
- package/build/{checkbox-qgc_Ntc3.cjs → checkbox-Bxt8K0ZY.cjs} +2 -2
- package/build/{checkbox-qgc_Ntc3.cjs.map → checkbox-Bxt8K0ZY.cjs.map} +1 -1
- package/build/{checkbox-CXxWDklX.js → checkbox-DPkXe4_5.js} +5 -5
- package/build/{checkbox-CXxWDklX.js.map → checkbox-DPkXe4_5.js.map} +1 -1
- package/build/{component-jsn2T8Hu.cjs → component-CbJ_P8yq.cjs} +2 -2
- package/build/{component-jsn2T8Hu.cjs.map → component-CbJ_P8yq.cjs.map} +1 -1
- package/build/{component-BHyXT2-h.js → component-DGfyD5-u.js} +4 -4
- package/build/{component-BHyXT2-h.js.map → component-DGfyD5-u.js.map} +1 -1
- package/build/component-button.cjs.js +1 -1
- package/build/component-button.es.js +1 -1
- package/build/component-checkbox.cjs.js +1 -1
- package/build/component-checkbox.es.js +1 -1
- package/build/component-date-picker.cjs.js +1 -1
- package/build/component-date-picker.es.js +1 -1
- package/build/component-icon.cjs.js +1 -1
- package/build/component-icon.es.js +1 -1
- package/build/component-input-otp.cjs.js +1 -1
- package/build/component-input-otp.es.js +1 -1
- package/build/component-input.cjs.js +1 -1
- package/build/component-input.es.js +1 -1
- package/build/component-pagination.cjs.js +1 -1
- package/build/component-pagination.es.js +1 -1
- package/build/component-popover.cjs.js +1 -1
- package/build/component-popover.es.js +1 -1
- package/build/component-select.cjs.js +1 -1
- package/build/component-select.es.js +5 -6
- package/build/component-separator.cjs.js +1 -1
- package/build/component-separator.es.js +1 -1
- package/build/component-stack.cjs.js +1 -1
- package/build/component-stack.es.js +1 -1
- package/build/component-textarea.cjs.js +1 -1
- package/build/component-textarea.es.js +1 -1
- package/build/component-toggle.cjs.js +1 -1
- package/build/component-toggle.es.js +1 -1
- package/build/component-tooltip.cjs.js +1 -1
- package/build/component-tooltip.es.js +1 -1
- package/build/component-typography.cjs.js +1 -1
- package/build/component-typography.es.js +1 -1
- package/build/components/select/component.examples.d.ts +1 -2
- package/build/components/select/component.types.d.ts +1 -5
- package/build/components/select/index.d.ts +2 -2
- package/build/components-error.cjs.js +1 -1
- package/build/components-error.es.js +1 -1
- package/build/{context-app-CMK9g6MI.js → context-app-C9XoarPw.js} +6 -6
- package/build/{context-app-CMK9g6MI.js.map → context-app-C9XoarPw.js.map} +1 -1
- package/build/{context-app-HhFcx1wY.cjs → context-app-Dsa1tKlU.cjs} +2 -2
- package/build/{context-app-HhFcx1wY.cjs.map → context-app-Dsa1tKlU.cjs.map} +1 -1
- package/build/context-app.cjs.js +1 -1
- package/build/context-app.es.js +1 -1
- package/build/{context-browser-theme-Cb6siWO0.js → context-browser-theme-CRBCZ_y_.js} +2 -2
- package/build/{context-browser-theme-Cb6siWO0.js.map → context-browser-theme-CRBCZ_y_.js.map} +1 -1
- package/build/{context-browser-theme-Cso_rAT5.cjs → context-browser-theme-xixEbalV.cjs} +2 -2
- package/build/{context-browser-theme-Cso_rAT5.cjs.map → context-browser-theme-xixEbalV.cjs.map} +1 -1
- package/build/context-browser-theme.cjs.js +1 -1
- package/build/context-browser-theme.es.js +1 -1
- package/build/{context-cookie-Btkd2aXy.cjs → context-cookie-DFgWWGA9.cjs} +2 -2
- package/build/{context-cookie-Btkd2aXy.cjs.map → context-cookie-DFgWWGA9.cjs.map} +1 -1
- package/build/{context-cookie-5CBhf-gb.js → context-cookie-Daq2MZo3.js} +2 -2
- package/build/{context-cookie-5CBhf-gb.js.map → context-cookie-Daq2MZo3.js.map} +1 -1
- package/build/context-cookie.cjs.js +1 -1
- package/build/context-cookie.es.js +1 -1
- package/build/context-dialog-DctdSBC8.cjs +3 -0
- package/build/context-dialog-DctdSBC8.cjs.map +1 -0
- package/build/context-dialog-DzwL2ElF.js +191 -0
- package/build/context-dialog-DzwL2ElF.js.map +1 -0
- package/build/context-dialog.cjs.js +1 -1
- package/build/context-dialog.es.js +1 -1
- package/build/{context-geolocation-C7PYGQ2g.js → context-geolocation-B_KYGlfQ.js} +2 -2
- package/build/{context-geolocation-C7PYGQ2g.js.map → context-geolocation-B_KYGlfQ.js.map} +1 -1
- package/build/{context-geolocation-CV4hV0NX.cjs → context-geolocation-bP0_455H.cjs} +2 -2
- package/build/{context-geolocation-CV4hV0NX.cjs.map → context-geolocation-bP0_455H.cjs.map} +1 -1
- package/build/context-geolocation.cjs.js +1 -1
- package/build/context-geolocation.es.js +1 -1
- package/build/{context-local-storage-Bb_vktd8.js → context-local-storage-DA_whw_k.js} +2 -2
- package/build/{context-local-storage-Bb_vktd8.js.map → context-local-storage-DA_whw_k.js.map} +1 -1
- package/build/{context-local-storage-DUKHVPAA.cjs → context-local-storage-D_x8dwxM.cjs} +2 -2
- package/build/{context-local-storage-DUKHVPAA.cjs.map → context-local-storage-D_x8dwxM.cjs.map} +1 -1
- package/build/context-local-storage.cjs.js +1 -1
- package/build/context-local-storage.es.js +1 -1
- package/build/{context-permission-DrcIwK9y.cjs → context-permission-BP9hPUcR.cjs} +2 -2
- package/build/{context-permission-DrcIwK9y.cjs.map → context-permission-BP9hPUcR.cjs.map} +1 -1
- package/build/{context-permission-Co4BKDOu.js → context-permission-Cj70kL4A.js} +2 -2
- package/build/{context-permission-Co4BKDOu.js.map → context-permission-Cj70kL4A.js.map} +1 -1
- package/build/context-permission.cjs.js +1 -1
- package/build/context-permission.es.js +1 -1
- package/build/{context-screen-width-hcRkxzy7.cjs → context-screen-width-Cfe3atNC.cjs} +2 -2
- package/build/{context-screen-width-hcRkxzy7.cjs.map → context-screen-width-Cfe3atNC.cjs.map} +1 -1
- package/build/{context-screen-width-CFexCIzV.js → context-screen-width-Cq_B7IVp.js} +3 -3
- package/build/{context-screen-width-CFexCIzV.js.map → context-screen-width-Cq_B7IVp.js.map} +1 -1
- package/build/context-screen-width.cjs.js +1 -1
- package/build/context-screen-width.es.js +1 -1
- package/build/{context-sonner-4gBa1F7G.cjs → context-sonner-Dqw0jhwT.cjs} +2 -2
- package/build/{context-sonner-4gBa1F7G.cjs.map → context-sonner-Dqw0jhwT.cjs.map} +1 -1
- package/build/{context-sonner-qDPLFpD5.js → context-sonner-MO6uE8y0.js} +12 -12
- package/build/{context-sonner-qDPLFpD5.js.map → context-sonner-MO6uE8y0.js.map} +1 -1
- package/build/context-sonner.cjs.js +1 -1
- package/build/context-sonner.es.js +1 -1
- package/build/contexts/context-app/context.d.ts +2 -2
- package/build/contexts/context-dialog/context.types.d.ts +3 -1
- package/build/contexts/context-dialog/index.d.ts +1 -1
- package/build/cores/consts.d.ts +0 -24
- package/build/cores/types.d.ts +0 -14
- package/build/date-picker-ATktGA1c.cjs +3 -0
- package/build/date-picker-ATktGA1c.cjs.map +1 -0
- package/build/date-picker-D81n3KbO.js +813 -0
- package/build/date-picker-D81n3KbO.js.map +1 -0
- package/build/{dist-DswBAjW1.cjs → dist-SXTf0-_7.cjs} +1 -1
- package/build/{dist-DswBAjW1.cjs.map → dist-SXTf0-_7.cjs.map} +1 -1
- package/build/{dist-BV0C3tLK.js → dist-ck-7oUux.js} +1 -1
- package/build/{dist-BV0C3tLK.js.map → dist-ck-7oUux.js.map} +1 -1
- package/build/{error-L2fvWcNv.js → error-BFb2NCum.js} +7 -7
- package/build/{error-L2fvWcNv.js.map → error-BFb2NCum.js.map} +1 -1
- package/build/{error-DzkkNL2H.cjs → error-BdFba_yV.cjs} +2 -2
- package/build/{error-DzkkNL2H.cjs.map → error-BdFba_yV.cjs.map} +1 -1
- package/build/{functions-Dwo54amB.cjs → functions-CZrZU5U0.cjs} +1 -1
- package/build/{functions-Dwo54amB.cjs.map → functions-CZrZU5U0.cjs.map} +1 -1
- package/build/{functions-CLGf7hqw.js → functions-DzX-pTN8.js} +1 -1
- package/build/{functions-CLGf7hqw.js.map → functions-DzX-pTN8.js.map} +1 -1
- package/build/hooks-use-deep-compare-memoize.cjs.js +1 -1
- package/build/hooks-use-deep-compare-memoize.es.js +1 -1
- package/build/hooks-use-deep-memo.cjs.js +1 -1
- package/build/hooks-use-deep-memo.es.js +1 -1
- package/build/hooks-use-responsive-layout.cjs.js +1 -1
- package/build/hooks-use-responsive-layout.es.js +1 -1
- package/build/hooks-use-typography-styles.cjs.js +1 -1
- package/build/hooks-use-typography-styles.es.js +2 -2
- package/build/icon-D2w7GViT.js +245 -0
- package/build/icon-D2w7GViT.js.map +1 -0
- package/build/icon-Ddkbk3-m.cjs +3 -0
- package/build/icon-Ddkbk3-m.cjs.map +1 -0
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +5 -5
- package/build/index.es.js +97 -98
- package/build/{input-CV02F03L.js → input-B9ceeR9v.js} +4 -4
- package/build/{input-CV02F03L.js.map → input-B9ceeR9v.js.map} +1 -1
- package/build/{input-zXF5f99Z.cjs → input-CmdwwrV2.cjs} +2 -2
- package/build/{input-zXF5f99Z.cjs.map → input-CmdwwrV2.cjs.map} +1 -1
- package/build/{input-otp-BVRCfoRK.cjs → input-otp-CJfZoWd7.cjs} +2 -2
- package/build/{input-otp-BVRCfoRK.cjs.map → input-otp-CJfZoWd7.cjs.map} +1 -1
- package/build/{input-otp-B9cYxJ7X.js → input-otp-CeMGm5Xq.js} +4 -4
- package/build/{input-otp-B9cYxJ7X.js.map → input-otp-CeMGm5Xq.js.map} +1 -1
- package/build/{isEqual-Qb81B2zH.js → isEqual-0jZ23Bb6.js} +1 -1
- package/build/{isEqual-Qb81B2zH.js.map → isEqual-0jZ23Bb6.js.map} +1 -1
- package/build/{isEqual-DeC2HFe5.cjs → isEqual-BA0P9-C8.cjs} +1 -1
- package/build/{isEqual-DeC2HFe5.cjs.map → isEqual-BA0P9-C8.cjs.map} +1 -1
- package/build/{logger-DZFY33QY.cjs → logger-D3Xu5ef3.cjs} +1 -1
- package/build/{logger-DZFY33QY.cjs.map → logger-D3Xu5ef3.cjs.map} +1 -1
- package/build/{logger-BRWLzI5S.js → logger-QC3A33gh.js} +1 -1
- package/build/{logger-BRWLzI5S.js.map → logger-QC3A33gh.js.map} +1 -1
- package/build/{motion-CAPq8wSn.cjs → motion-BWBldnsY.cjs} +2 -2
- package/build/{motion-CAPq8wSn.cjs.map → motion-BWBldnsY.cjs.map} +1 -1
- package/build/{motion-Dt6TyEjN.js → motion-C1XU2d68.js} +3 -3
- package/build/{motion-Dt6TyEjN.js.map → motion-C1XU2d68.js.map} +1 -1
- package/build/{outside-B3nRnDGb.cjs → outside-CXyCk8h1.cjs} +2 -2
- package/build/{outside-B3nRnDGb.cjs.map → outside-CXyCk8h1.cjs.map} +1 -1
- package/build/{outside-DpK1pI8b.js → outside-DopxX0PZ.js} +2 -2
- package/build/{outside-DpK1pI8b.js.map → outside-DopxX0PZ.js.map} +1 -1
- package/build/{pagination-YXSjZsMZ.js → pagination-BluJtJl7.js} +5 -5
- package/build/{pagination-YXSjZsMZ.js.map → pagination-BluJtJl7.js.map} +1 -1
- package/build/pagination-VMAFNidU.cjs +3 -0
- package/build/{pagination-Dbs4Lrpt.cjs.map → pagination-VMAFNidU.cjs.map} +1 -1
- package/build/{popover-1k1MNFwv.js → popover-DHWcQVp1.js} +3 -3
- package/build/{popover-1k1MNFwv.js.map → popover-DHWcQVp1.js.map} +1 -1
- package/build/{popover-CgwGn-55.cjs → popover-DQkn4RWI.cjs} +2 -2
- package/build/{popover-CgwGn-55.cjs.map → popover-DQkn4RWI.cjs.map} +1 -1
- package/build/preview-BLu-NOv2.cjs +3 -0
- package/build/{preview-dT7fmxcc.cjs.map → preview-BLu-NOv2.cjs.map} +1 -1
- package/build/{preview-C_yFxoFH.js → preview-Bc2qdyd4.js} +5 -5
- package/build/{preview-C_yFxoFH.js.map → preview-Bc2qdyd4.js.map} +1 -1
- package/build/{proxy-_gZenxVU.cjs → proxy-BDese6Pb.cjs} +1 -1
- package/build/{proxy-_gZenxVU.cjs.map → proxy-BDese6Pb.cjs.map} +1 -1
- package/build/{proxy-wCWa57J3.js → proxy-BFHkqO7P.js} +1 -1
- package/build/{proxy-wCWa57J3.js.map → proxy-BFHkqO7P.js.map} +1 -1
- package/build/{select-D7EyxR2l.js → select-CCbtkj6f.js} +862 -876
- package/build/{select-D7EyxR2l.js.map → select-CCbtkj6f.js.map} +1 -1
- package/build/{select-B0adRX2_.cjs → select-CGXyVf57.cjs} +5 -5
- package/build/{select-B0adRX2_.cjs.map → select-CGXyVf57.cjs.map} +1 -1
- package/build/{separator-CbeH8Lug.cjs → separator-BGVU_LQb.cjs} +2 -2
- package/build/{separator-CbeH8Lug.cjs.map → separator-BGVU_LQb.cjs.map} +1 -1
- package/build/{separator-hWp-s54-.js → separator-DJEhOPUT.js} +3 -3
- package/build/{separator-hWp-s54-.js.map → separator-DJEhOPUT.js.map} +1 -1
- package/build/{skeleton-DNwTI6w0.js → skeleton-Bh6zA5iB.js} +4 -4
- package/build/{skeleton-DNwTI6w0.js.map → skeleton-Bh6zA5iB.js.map} +1 -1
- package/build/{skeleton-BoVFwt7y.cjs → skeleton-DmaXsm9C.cjs} +2 -2
- package/build/{skeleton-BoVFwt7y.cjs.map → skeleton-DmaXsm9C.cjs.map} +1 -1
- package/build/style-motion.cjs.js +1 -1
- package/build/style-motion.es.js +1 -1
- package/build/style-utils.cjs.js +1 -1
- package/build/style-utils.es.js +1 -1
- package/build/styles/utils/types.d.ts +1 -1
- package/build/{textarea-CbZSeqGR.cjs → textarea-DInJb6Lz.cjs} +2 -2
- package/build/{textarea-CbZSeqGR.cjs.map → textarea-DInJb6Lz.cjs.map} +1 -1
- package/build/{textarea-ChkjV_Ha.js → textarea-jIGZ0JdP.js} +4 -4
- package/build/{textarea-ChkjV_Ha.js.map → textarea-jIGZ0JdP.js.map} +1 -1
- package/build/{toggle-gYw5FUp-.cjs → toggle-BEmUm0of.cjs} +2 -2
- package/build/{toggle-gYw5FUp-.cjs.map → toggle-BEmUm0of.cjs.map} +1 -1
- package/build/{toggle-I6YvEX4w.js → toggle-D1nXs-LD.js} +4 -4
- package/build/{toggle-I6YvEX4w.js.map → toggle-D1nXs-LD.js.map} +1 -1
- package/build/{typography-B2KioMfq.js → typography-07KEDl9_.js} +4 -4
- package/build/{typography-B2KioMfq.js.map → typography-07KEDl9_.js.map} +1 -1
- package/build/{typography-DcxhX_9e.cjs → typography-BKp4OAQI.cjs} +2 -2
- package/build/{typography-DcxhX_9e.cjs.map → typography-BKp4OAQI.cjs.map} +1 -1
- package/build/{utils-Cona48dZ.js → utils-BRgi6734.js} +1 -1
- package/build/{utils-Cona48dZ.js.map → utils-BRgi6734.js.map} +1 -1
- package/build/{utils-DtinAjAU.cjs → utils-DCIq-5FL.cjs} +1 -1
- package/build/{utils-DtinAjAU.cjs.map → utils-DCIq-5FL.cjs.map} +1 -1
- package/package.json +1 -1
- package/build/build-info.txt +0 -3
- package/build/context-dialog-B67-_jMH.cjs +0 -3
- package/build/context-dialog-B67-_jMH.cjs.map +0 -1
- package/build/context-dialog-CxGGmBqC.js +0 -176
- package/build/context-dialog-CxGGmBqC.js.map +0 -1
- package/build/date-picker-CPNNIEa-.cjs +0 -3
- package/build/date-picker-CPNNIEa-.cjs.map +0 -1
- package/build/date-picker-Uuce_InW.js +0 -689
- package/build/date-picker-Uuce_InW.js.map +0 -1
- package/build/icon-CoIQwke4.cjs +0 -3
- package/build/icon-CoIQwke4.cjs.map +0 -1
- package/build/icon-DzAWOQJg.js +0 -277
- package/build/icon-DzAWOQJg.js.map +0 -1
- package/build/pagination-Dbs4Lrpt.cjs +0 -3
- package/build/preview-dT7fmxcc.cjs +0 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const v=require("./chunk-Dd8m0Ver.cjs"),l=require("./utils-DCIq-5FL.cjs"),u=require("./AnimatePresence-DeKd4Eek.cjs"),c=require("./component-CbJ_P8yq.cjs");require("./component-stack.cjs.js");const d=require("./icon-Ddkbk3-m.cjs");let t=require("react/jsx-runtime"),n=require("react");var m=e=>{const[i,o]=(0,n.useState)(e.defaultVisible??!1),r=(0,n.useMemo)(()=>"visible"in e?e.visible:null,[e]),a=(0,n.useMemo)(()=>"time"in e?e.time:null,[e]);return(0,n.useEffect)(()=>{if(r!==null&&a===null)o(r);else if(r!==null&&a!==null)if(r===!1)o(!1);else{const s=setTimeout(()=>{o(!0)},a);return()=>{clearTimeout(s)}}},[r,a]),(0,t.jsxs)(u.AnimatePresence,{children:[i?null:(0,t.jsxs)(c.StackMotion,{sx:e?.sxLoader,className:l.CSS_CLASS.area.preview.root,transition:{duration:.3},exit:{opacity:0},animate:{opacity:1},children:[(0,t.jsx)(c.Stack,{className:l.CSS_CLASS.area.preview.containerIcon,children:(0,t.jsx)(d.Icon,{size:"100%",type:"loading",color:e.colorIcon??"inherit",name:"Line"})}),e.content&&(0,t.jsx)(c.Stack,{className:l.CSS_CLASS.area.preview.containerChildren,children:e.content})]},"loader"),i?(0,t.jsx)(c.StackMotion,{sx:e?.sxChildren,className:l.CSS_CLASS.area.preview.children,transition:{duration:.3},initial:{opacity:0},exit:{opacity:0},animate:{opacity:1},children:e.children},"children"):null]})},S=()=>{(0,n.useEffect)(()=>{const e=document.querySelector(".preview-wrapper"),i=()=>{e&&(e.style.opacity="0",setTimeout(()=>{e.remove()},500))};return document.readyState==="complete"?i():window.addEventListener("load",i),()=>{window.removeEventListener("load",i)}},[])};Object.defineProperty(exports,"Preview",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"useRemovePreviewLoader",{enumerable:!0,get:function(){return S}});
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=preview-BLu-NOv2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-
|
|
1
|
+
{"version":3,"file":"preview-BLu-NOv2.cjs","names":[],"sources":["../src/areas/preview/area.tsx","../src/areas/preview/area.hooks.tsx"],"sourcesContent":["import { Icon } from '@local/components/icon';\nimport { Stack, StackMotion } from '@local/components/stack';\nimport { CSS_CLASS } from '@local/styles/utils';\n\nimport { AnimatePresence } from 'framer-motion';\nimport { FC, useEffect, useMemo, useState } from 'react';\n\nimport { IPreview } from './area.types';\n\nexport const Preview: FC<IPreview> = (props) => {\n const [visible, setVisible] = useState(props.defaultVisible ?? false);\n\n const propsVisible = useMemo(() => ('visible' in props ? props.visible : null), [props]);\n const propsTime = useMemo(() => ('time' in props ? props.time : null), [props]);\n\n useEffect(() => {\n if (propsVisible !== null && propsTime === null) {\n setVisible(propsVisible);\n } else if (propsVisible !== null && propsTime !== null) {\n if (propsVisible === false) {\n setVisible(false);\n } else {\n const timer = setTimeout(() => {\n setVisible(true);\n }, propsTime);\n\n return () => {\n clearTimeout(timer);\n };\n }\n }\n }, [propsVisible, propsTime]);\n\n return (\n <AnimatePresence>\n {!visible ? (\n <StackMotion\n key='loader'\n sx={props?.sxLoader}\n className={CSS_CLASS.area.preview.root}\n transition={{ duration: 0.3 }}\n exit={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n >\n <Stack className={CSS_CLASS.area.preview.containerIcon}>\n <Icon size='100%' type='loading' color={props.colorIcon ?? 'inherit'} name='Line' />\n </Stack>\n {props.content && <Stack className={CSS_CLASS.area.preview.containerChildren}>{props.content}</Stack>}\n </StackMotion>\n ) : null}\n {visible ? (\n <StackMotion\n key='children'\n sx={props?.sxChildren}\n className={CSS_CLASS.area.preview.children}\n transition={{ duration: 0.3 }}\n initial={{ opacity: 0 }}\n exit={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n >\n {props.children}\n </StackMotion>\n ) : null}\n </AnimatePresence>\n );\n};\n","import { useEffect } from 'react';\n\nexport const useRemovePreviewLoader = () => {\n useEffect(() => {\n const loader = document.querySelector('.preview-wrapper') as HTMLElement;\n\n const handleDomReady = () => {\n if (loader) {\n loader.style.opacity = '0';\n setTimeout(() => {\n loader.remove();\n }, 500);\n }\n };\n\n if (document.readyState === 'complete') {\n handleDomReady();\n } else {\n window.addEventListener('load', handleDomReady);\n }\n\n return () => {\n window.removeEventListener('load', handleDomReady);\n };\n }, []);\n};\n"],"mappings":"6RASA,IAAa,EAAyB,GAAU,CAC9C,KAAM,CAAC,EAAS,CAAA,KAAA,EAAA,UAAuB,EAAM,gBAAkB,EAAA,EAEzD,KAAA,EAAA,SAAA,IAA8B,YAAa,EAAQ,EAAM,QAAU,KAAO,CAAC,CAAA,CAAM,EACjF,KAAA,EAAA,SAAA,IAA2B,SAAU,EAAQ,EAAM,KAAO,KAAO,CAAC,CAAA,CAAM,EAE9E,SAAA,EAAA,WAAA,IAAgB,CACd,GAAI,IAAiB,MAAQ,IAAc,KACzC,EAAW,CAAA,UACF,IAAiB,MAAQ,IAAc,KAChD,GAAI,IAAiB,GACnB,EAAW,EAAA,MACN,CACL,MAAM,EAAQ,WAAA,IAAiB,CAC7B,EAAW,EAAA,GACV,CAAA,EAEH,MAAA,IAAa,CACX,aAAa,CAAA,KAIlB,CAAC,EAAc,CAAA,CAAU,KAG1B,EAAA,MAAC,EAAA,gBAAD,CAAA,SAAA,CACI,EAcE,QAbF,EAAA,MAAC,EAAA,YAAD,CAEE,GAAI,GAAO,SACX,UAAW,EAAA,UAAU,KAAK,QAAQ,KAClC,WAAY,CAAE,SAAU,EAAA,EACxB,KAAM,CAAE,QAAS,CAAA,EACjB,QAAS,CAAE,QAAS,CAAA,WANtB,IAQE,EAAA,KAAC,EAAA,MAAD,CAAO,UAAW,EAAA,UAAU,KAAK,QAAQ,0BACvC,EAAA,KAAC,EAAA,KAAD,CAAM,KAAK,OAAO,KAAK,UAAU,MAAO,EAAM,WAAa,UAAW,KAAK,OAAS,EAC9E,EACP,EAAM,YAAW,EAAA,KAAC,EAAA,MAAD,CAAO,UAAW,EAAA,UAAU,KAAK,QAAQ,2BAAoB,EAAM,QAAgB,CAAA,GAVjG,QAAA,EAaP,KACC,EAAA,KAAC,EAAA,YAAD,CAEE,GAAI,GAAO,WACX,UAAW,EAAA,UAAU,KAAK,QAAQ,SAClC,WAAY,CAAE,SAAU,EAAA,EACxB,QAAS,CAAE,QAAS,CAAA,EACpB,KAAM,CAAE,QAAS,CAAA,EACjB,QAAS,CAAE,QAAS,CAAA,WAEnB,EAAM,UARH,UAAA,EAUJ,IAAA,CACY,CAAA,GC7DT,EAAA,IAA+B,IAC1C,EAAA,WAAA,IAAgB,CACd,MAAM,EAAS,SAAS,cAAc,kBAAA,EAEhC,EAAA,IAAuB,CACvB,IACF,EAAO,MAAM,QAAU,IACvB,WAAA,IAAiB,CACf,EAAO,OAAA,GACN,GAAA,IAIP,OAAI,SAAS,aAAe,WAC1B,EAAA,EAEA,OAAO,iBAAiB,OAAQ,CAAA,EAGlC,IAAa,CACX,OAAO,oBAAoB,OAAQ,CAAA,IAEpC,CAAA,CAAE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as o, t as s } from "./component-
|
|
4
|
-
import { r as v } from "./icon-DzAWOQJg.js";
|
|
1
|
+
import { n as a } from "./utils-BRgi6734.js";
|
|
2
|
+
import { t as f } from "./AnimatePresence-BWc2vFe-.js";
|
|
3
|
+
import { n as o, t as s } from "./component-DGfyD5-u.js";
|
|
5
4
|
import "./component-stack.es.js";
|
|
5
|
+
import { r as v } from "./icon-D2w7GViT.js";
|
|
6
6
|
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
7
7
|
import { useEffect as d, useMemo as m, useState as h } from "react";
|
|
8
8
|
var N = (e) => {
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
T as t
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
//# sourceMappingURL=preview-
|
|
65
|
+
//# sourceMappingURL=preview-Bc2qdyd4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-
|
|
1
|
+
{"version":3,"file":"preview-Bc2qdyd4.js","names":[],"sources":["../src/areas/preview/area.tsx","../src/areas/preview/area.hooks.tsx"],"sourcesContent":["import { Icon } from '@local/components/icon';\nimport { Stack, StackMotion } from '@local/components/stack';\nimport { CSS_CLASS } from '@local/styles/utils';\n\nimport { AnimatePresence } from 'framer-motion';\nimport { FC, useEffect, useMemo, useState } from 'react';\n\nimport { IPreview } from './area.types';\n\nexport const Preview: FC<IPreview> = (props) => {\n const [visible, setVisible] = useState(props.defaultVisible ?? false);\n\n const propsVisible = useMemo(() => ('visible' in props ? props.visible : null), [props]);\n const propsTime = useMemo(() => ('time' in props ? props.time : null), [props]);\n\n useEffect(() => {\n if (propsVisible !== null && propsTime === null) {\n setVisible(propsVisible);\n } else if (propsVisible !== null && propsTime !== null) {\n if (propsVisible === false) {\n setVisible(false);\n } else {\n const timer = setTimeout(() => {\n setVisible(true);\n }, propsTime);\n\n return () => {\n clearTimeout(timer);\n };\n }\n }\n }, [propsVisible, propsTime]);\n\n return (\n <AnimatePresence>\n {!visible ? (\n <StackMotion\n key='loader'\n sx={props?.sxLoader}\n className={CSS_CLASS.area.preview.root}\n transition={{ duration: 0.3 }}\n exit={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n >\n <Stack className={CSS_CLASS.area.preview.containerIcon}>\n <Icon size='100%' type='loading' color={props.colorIcon ?? 'inherit'} name='Line' />\n </Stack>\n {props.content && <Stack className={CSS_CLASS.area.preview.containerChildren}>{props.content}</Stack>}\n </StackMotion>\n ) : null}\n {visible ? (\n <StackMotion\n key='children'\n sx={props?.sxChildren}\n className={CSS_CLASS.area.preview.children}\n transition={{ duration: 0.3 }}\n initial={{ opacity: 0 }}\n exit={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n >\n {props.children}\n </StackMotion>\n ) : null}\n </AnimatePresence>\n );\n};\n","import { useEffect } from 'react';\n\nexport const useRemovePreviewLoader = () => {\n useEffect(() => {\n const loader = document.querySelector('.preview-wrapper') as HTMLElement;\n\n const handleDomReady = () => {\n if (loader) {\n loader.style.opacity = '0';\n setTimeout(() => {\n loader.remove();\n }, 500);\n }\n };\n\n if (document.readyState === 'complete') {\n handleDomReady();\n } else {\n window.addEventListener('load', handleDomReady);\n }\n\n return () => {\n window.removeEventListener('load', handleDomReady);\n };\n }, []);\n};\n"],"mappings":";;;;;;;AASA,IAAa,IAAA,CAAyB,MAAU;AAC9C,QAAM,CAAC,GAAS,CAAA,IAAc,EAAS,EAAM,kBAAkB,EAAA,GAEzD,IAAe,EAAA,MAAe,aAAa,IAAQ,EAAM,UAAU,MAAO,CAAC,CAAA,CAAM,GACjF,IAAY,EAAA,MAAe,UAAU,IAAQ,EAAM,OAAO,MAAO,CAAC,CAAA,CAAM;AAE9E,SAAA,EAAA,MAAgB;AACd,QAAI,MAAiB,QAAQ,MAAc,KACzC,CAAA,EAAW,CAAA;AAAA,aACF,MAAiB,QAAQ,MAAc,KAChD,KAAI,MAAiB,GACnB,CAAA,EAAW,EAAA;AAAA,SACN;AACL,YAAM,IAAQ,WAAA,MAAiB;AAC7B,QAAA,EAAW,EAAA;AAAA,SACV,CAAA;AAEH,aAAA,MAAa;AACX,qBAAa,CAAA;AAAA;;KAIlB,CAAC,GAAc,CAAA,CAAU,GAG1B,gBAAA,EAAC,GAAD,EAAA,UAAA,CACI,IAcE,OAbF,gBAAA,EAAC,GAAD;AAAA,IAEE,IAAI,GAAO;AAAA,IACX,WAAW,EAAU,KAAK,QAAQ;AAAA,IAClC,YAAY,EAAE,UAAU,IAAA;AAAA,IACxB,MAAM,EAAE,SAAS,EAAA;AAAA,IACjB,SAAS,EAAE,SAAS,EAAA;AAAA,cANtB,CAQE,gBAAA,EAAC,GAAD;AAAA,MAAO,WAAW,EAAU,KAAK,QAAQ;AAAA,gBACvC,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAK;AAAA,QAAO,MAAK;AAAA,QAAU,OAAO,EAAM,aAAa;AAAA,QAAW,MAAK;AAAA,OAAS;AAAA,KAC9E,GACP,EAAM,WAAW,gBAAA,EAAC,GAAD;AAAA,MAAO,WAAW,EAAU,KAAK,QAAQ;AAAA,gBAAoB,EAAM;AAAA,KAAgB,CAAA;AAAA,KAVjG,QAAA,GAaP,IACC,gBAAA,EAAC,GAAD;AAAA,IAEE,IAAI,GAAO;AAAA,IACX,WAAW,EAAU,KAAK,QAAQ;AAAA,IAClC,YAAY,EAAE,UAAU,IAAA;AAAA,IACxB,SAAS,EAAE,SAAS,EAAA;AAAA,IACpB,MAAM,EAAE,SAAS,EAAA;AAAA,IACjB,SAAS,EAAE,SAAS,EAAA;AAAA,cAEnB,EAAM;AAAA,KARH,UAAA,IAUJ,IAAA,EACY,CAAA;GC7DT,IAAA,MAA+B;AAC1C,EAAA,EAAA,MAAgB;AACd,UAAM,IAAS,SAAS,cAAc,kBAAA,GAEhC,IAAA,MAAuB;AAC3B,MAAI,MACF,EAAO,MAAM,UAAU,KACvB,WAAA,MAAiB;AACf,QAAA,EAAO,OAAA;AAAA,SACN,GAAA;AAAA;AAIP,WAAI,SAAS,eAAe,aAC1B,EAAA,IAEA,OAAO,iBAAiB,QAAQ,CAAA,GAGlC,MAAa;AACX,aAAO,oBAAoB,QAAQ,CAAA;AAAA;KAEpC,CAAA,CAAE"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
const Re=require("./chunk-Dd8m0Ver.cjs");let pe=require("react/jsx-runtime"),P=require("react");var Le=(0,P.createContext)({});function Ln(t){const e=(0,P.useRef)(null);return e.current===null&&(e.current=t()),e.current}var Ht=(0,P.createContext)(null),Fe=(0,P.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Fn(t=!0){const e=(0,P.useContext)(Ht);if(e===null)return[!0,null];const{isPresent:i,onExitComplete:n,register:s}=e,o=(0,P.useId)();(0,P.useEffect)(()=>{t&&s(o)},[t]);const r=(0,P.useCallback)(()=>t&&n&&n(o),[o,n,t]);return!i&&n?[!1,r]:[!0]}var Be=typeof window<"u",Bn=Be?P.useLayoutEffect:P.useEffect,k=t=>t,ft=k,Y=k;process.env.NODE_ENV!=="production"&&(ft=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Y=(t,e)=>{if(!t)throw new Error(e)});function je(t){let e;return()=>(e===void 0&&(e=t()),e)}var ut=(t,e,i)=>{const n=e-t;return n===0?1:(i-t)/n},U=t=>t*1e3,G=t=>t/1e3,ke={skipAnimations:!1,useManualTiming:!1};function hr(t){let e=new Set,i=new Set,n=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(u){o.has(u)&&(l.schedule(u),t()),u(r)}const l={schedule:(u,c=!1,f=!1)=>{const h=f&&n?e:i;return c&&o.add(u),h.has(u)||h.add(u),u},cancel:u=>{i.delete(u),o.delete(u)},process:u=>{if(r=u,n){s=!0;return}n=!0,[e,i]=[i,e],e.forEach(a),e.clear(),n=!1,s&&(s=!1,l.process(u))}};return l}var Bt=["read","resolveKeyframes","update","preRender","render","postRender"],fr=40;function jn(t,e){let i=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>i=!0,r=Bt.reduce((v,g)=>(v[g]=hr(o),v),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:h}=r,d=()=>{const v=ke.useManualTiming?s.timestamp:performance.now();i=!1,s.delta=n?1e3/60:Math.max(Math.min(v-s.timestamp,fr),1),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),f.process(s),h.process(s),s.isProcessing=!1,i&&e&&(n=!1,t(d))},m=()=>{i=!0,n=!0,s.isProcessing||t(d)};return{schedule:Bt.reduce((v,g)=>{const T=r[g];return v[g]=(A,S=!1,w=!1)=>(i||m(),T.schedule(A,S,w)),v},{}),cancel:v=>{for(let g=0;g<Bt.length;g++)r[Bt[g]].cancel(v)},state:s,steps:r}}var{schedule:V,cancel:X,state:L,steps:ie}=jn(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0),kn=(0,P.createContext)({strict:!1}),mi={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"]},ct={};for(const t in mi)ct[t]={isEnabled:e=>mi[t].some(i=>!!e[i])};function dr(t){for(const e in t)ct[e]={...ct[e],...t[e]}}var mr=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 _t(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||mr.has(t)}var pr=Re.__exportAll({default:()=>On}),On,vr=Re.__esmMin((()=>{throw On={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')})),In=t=>!_t(t);function gr(t){t&&(In=e=>e.startsWith("on")?!_t(e):t(e))}try{gr((vr(),Re.__toCommonJS(pr)).default)}catch{}function yr(t,e,i){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(In(s)||i===!0&&_t(s)||!e&&!_t(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}var pi=new Set;function Yt(t,e,i){t||pi.has(e)||(console.warn(e),i&&console.warn(i),pi.add(e))}function xr(t){if(typeof Proxy>"u")return t;const e=new Map,i=(...n)=>(process.env.NODE_ENV!=="production"&&Yt(!1,"motion() is deprecated. Use motion.create() instead."),t(...n));return new Proxy(i,{get:(n,s)=>s==="create"?t:(e.has(s)||e.set(s,t(s)),e.get(s))})}var Xt=(0,P.createContext)({});function At(t){return typeof t=="string"||Array.isArray(t)}function qt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}var Oe=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ie=["initial",...Oe];function Zt(t){return qt(t.animate)||Ie.some(e=>At(t[e]))}function Nn(t){return!!(Zt(t)||t.variants)}function Tr(t,e){if(Zt(t)){const{initial:i,animate:n}=t;return{initial:i===!1||At(i)?i:void 0,animate:At(n)?n:void 0}}return t.inherit!==!1?e:{}}function Pr(t){const{initial:e,animate:i}=Tr(t,(0,P.useContext)(Xt));return(0,P.useMemo)(()=>({initial:e,animate:i}),[vi(e),vi(i)])}function vi(t){return Array.isArray(t)?t.join(" "):t}var br=Symbol.for("motionComponentSymbol");function st(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Sr(t,e,i){return(0,P.useCallback)(n=>{n&&t.onMount&&t.onMount(n),e&&(n?e.mount(n):e.unmount()),i&&(typeof i=="function"?i(n):st(i)&&(i.current=n))},[e])}var Ne=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ar="framerAppearId",_n="data-"+Ne(Ar),{schedule:_e,cancel:ku}=jn(queueMicrotask,!1),Un=(0,P.createContext)({});function wr(t,e,i,n,s){var o,r;const{visualElement:a}=(0,P.useContext)(Xt),l=(0,P.useContext)(kn),u=(0,P.useContext)(Ht),c=(0,P.useContext)(Fe).reducedMotion,f=(0,P.useRef)(null);n=n||l.renderer,!f.current&&n&&(f.current=n(t,{visualState:e,parent:a,props:i,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const h=f.current,d=(0,P.useContext)(Un);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&Vr(f.current,i,s,d);const m=(0,P.useRef)(!1);(0,P.useInsertionEffect)(()=>{h&&m.current&&h.update(i,u)});const p=i[_n],x=(0,P.useRef)(!!p&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,p))&&((r=window.MotionHasOptimisedAnimation)===null||r===void 0?void 0:r.call(window,p)));return Bn(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),_e.render(h.render),x.current&&h.animationState&&h.animationState.animateChanges())}),(0,P.useEffect)(()=>{h&&(!x.current&&h.animationState&&h.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,p)}),x.current=!1))}),h}function Vr(t,e,i,n){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:Kn(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!r||a&&st(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:u})}function Kn(t){if(t)return t.options.allowProjection!==!1?t.projection:Kn(t.parent)}function Dr({preloadedFeatures:t,createVisualElement:e,useRender:i,useVisualState:n,Component:s}){var o,r;t&&dr(t);function a(u,c){let f;const h={...(0,P.useContext)(Fe),...u,layoutId:Cr(u)},{isStatic:d}=h,m=Pr(u),p=n(u,d);if(!d&&Be){Mr(h,t);const x=Er(h);f=x.MeasureLayout,m.visualElement=wr(s,p,h,e,x.ProjectionNode)}return(0,pe.jsxs)(Xt.Provider,{value:m,children:[f&&m.visualElement?(0,pe.jsx)(f,{visualElement:m.visualElement,...h}):null,i(s,u,Sr(p,m.visualElement,c),p,d,m.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(r=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&r!==void 0?r:""})`}`;const l=(0,P.forwardRef)(a);return l[br]=s,l}function Cr({layoutId:t}){const e=(0,P.useContext)(Le).id;return e&&t!==void 0?e+"-"+t:t}function Mr(t,e){const i=(0,P.useContext)(kn).strict;if(process.env.NODE_ENV!=="production"&&e&&i){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?ft(!1,n):Y(!1,n)}}function Er(t){const{drag:e,layout:i}=ct;if(!e&&!i)return{};const n={...e,...i};return{MeasureLayout:e?.isEnabled(t)||i?.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}var Rr=["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 Ue(t){return typeof t!="string"||t.includes("-")?!1:!!(Rr.indexOf(t)>-1||/[A-Z]/u.test(t))}function gi(t){const e=[{},{}];return t?.values.forEach((i,n)=>{e[0][n]=i.get(),e[1][n]=i.getVelocity()}),e}function Ke(t,e,i,n){if(typeof e=="function"){const[s,o]=gi(n);e=e(i!==void 0?i:t.custom,s,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,o]=gi(n);e=e(i!==void 0?i:t.custom,s,o)}return e}var ve=t=>Array.isArray(t),Lr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Fr=t=>ve(t)?t[t.length-1]||0:t,B=t=>!!(t&&t.getVelocity);function Ot(t){const e=B(t)?t.get():t;return Lr(e)?e.toValue():e}function Br({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:i},n,s,o){const r={latestValues:jr(n,s,o,t),renderState:e()};return i&&(r.onMount=a=>i({props:n,current:a,...r}),r.onUpdate=a=>i(a)),r}var $n=t=>(e,i)=>{const n=(0,P.useContext)(Xt),s=(0,P.useContext)(Ht),o=()=>Br(t,e,n,s);return i?o():Ln(o)};function jr(t,e,i,n){const s={},o=n(t,{});for(const h in o)s[h]=Ot(o[h]);let{initial:r,animate:a}=t;const l=Zt(t),u=Nn(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=i?i.initial===!1:!1;c=c||r===!1;const f=c?a:r;if(f&&typeof f!="boolean"&&!qt(f)){const h=Array.isArray(f)?f:[f];for(let d=0;d<h.length;d++){const m=Ke(t,h[d]);if(m){const{transitionEnd:p,transition:x,...v}=m;for(const g in v){let T=v[g];if(Array.isArray(T)){const A=c?T.length-1:0;T=T[A]}T!==null&&(s[g]=T)}for(const g in p)s[g]=p[g]}}}return s}var dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],nt=new Set(dt),Wn=t=>e=>typeof e=="string"&&e.startsWith(t),Gn=Wn("--"),kr=Wn("var(--"),$e=t=>kr(t)?Or.test(t.split("/*")[0].trim()):!1,Or=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,zn=(t,e)=>e&&typeof t=="number"?e.transform(t):t,z=(t,e,i)=>i>e?e:i<t?t:i,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},wt={...mt,transform:t=>z(0,1,t)},jt={...mt,default:1},Mt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),H=Mt("deg"),K=Mt("%"),y=Mt("px"),Ir=Mt("vh"),Nr=Mt("vw"),yi={...K,parse:t=>K.parse(t)/100,transform:t=>K.transform(t*100)},_r={borderWidth:y,borderTopWidth:y,borderRightWidth:y,borderBottomWidth:y,borderLeftWidth:y,borderRadius:y,radius:y,borderTopLeftRadius:y,borderTopRightRadius:y,borderBottomRightRadius:y,borderBottomLeftRadius:y,width:y,maxWidth:y,height:y,maxHeight:y,top:y,right:y,bottom:y,left:y,padding:y,paddingTop:y,paddingRight:y,paddingBottom:y,paddingLeft:y,margin:y,marginTop:y,marginRight:y,marginBottom:y,marginLeft:y,backgroundPositionX:y,backgroundPositionY:y},Ur={rotate:H,rotateX:H,rotateY:H,rotateZ:H,scale:jt,scaleX:jt,scaleY:jt,scaleZ:jt,skew:H,skewX:H,skewY:H,distance:y,translateX:y,translateY:y,translateZ:y,x:y,y,z:y,perspective:y,transformPerspective:y,opacity:wt,originX:yi,originY:yi,originZ:y},xi={...mt,transform:Math.round},We={..._r,...Ur,zIndex:xi,size:y,fillOpacity:wt,strokeOpacity:wt,numOctaves:xi},Kr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$r=dt.length;function Wr(t,e,i){let n="",s=!0;for(let o=0;o<$r;o++){const r=dt[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||i){const u=zn(a,We[r]);if(!l){s=!1;const c=Kr[r]||r;n+=`${c}(${u}) `}i&&(e[r]=u)}}return n=n.trim(),i?n=i(e,s?"":n):s&&(n="none"),n}function Ge(t,e,i){const{style:n,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(nt.has(l)){r=!0;continue}else if(Gn(l)){s[l]=u;continue}else{const c=zn(u,We[l]);l.startsWith("origin")?(a=!0,o[l]=c):n[l]=c}}if(e.transform||(r||i?n.transform=Wr(e,t.transform,i):n.transform&&(n.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;n.transformOrigin=`${l} ${u} ${c}`}}var Gr={offset:"stroke-dashoffset",array:"stroke-dasharray"},zr={offset:"strokeDashoffset",array:"strokeDasharray"};function Hr(t,e,i=1,n=0,s=!0){t.pathLength=1;const o=s?Gr:zr;t[o.offset]=y.transform(-n);const r=y.transform(e),a=y.transform(i);t[o.array]=`${r} ${a}`}function Ti(t,e,i){return typeof t=="string"?t:y.transform(e+i*t)}function Yr(t,e,i){return`${Ti(e,t.x,t.width)} ${Ti(i,t.y,t.height)}`}function ze(t,{attrX:e,attrY:i,attrScale:n,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,f){if(Ge(t,u,f),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d,dimensions:m}=t;h.transform&&(m&&(d.transform=h.transform),delete h.transform),m&&(s!==void 0||o!==void 0||d.transform)&&(d.transformOrigin=Yr(m,s!==void 0?s:.5,o!==void 0?o:.5)),e!==void 0&&(h.x=e),i!==void 0&&(h.y=i),n!==void 0&&(h.scale=n),r!==void 0&&Hr(h,r,a,l,!1)}var He=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Hn=()=>({...He(),attrs:{}}),Ye=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Yn(t,{style:e,vars:i},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const o in i)t.style.setProperty(o,i[o])}var Xn=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 qn(t,e,i,n){Yn(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(Xn.has(s)?s:Ne(s),e.attrs[s])}var Ut={};function Xr(t){Object.assign(Ut,t)}function Zn(t,{layout:e,layoutId:i}){return nt.has(t)||t.startsWith("origin")||(e||i!==void 0)&&(!!Ut[t]||t==="opacity")}function Xe(t,e,i){var n;const{style:s}=t,o={};for(const r in s)(B(s[r])||e.style&&B(e.style[r])||Zn(r,t)||((n=i?.getValue(r))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(o[r]=s[r]);return o}function Jn(t,e,i){const n=Xe(t,e,i);for(const s in t)if(B(t[s])||B(e[s])){const o=dt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[o]=t[s]}return n}function qr(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}var Pi=["x","y","width","height","cx","cy","r"],Zr={useVisualState:$n({scrapeMotionValuesFromProps:Jn,createRenderState:Hn,onUpdate:({props:t,prevProps:e,current:i,renderState:n,latestValues:s})=>{if(!i)return;let o=!!t.drag;if(!o){for(const a in s)if(nt.has(a)){o=!0;break}}if(!o)return;let r=!e;if(e)for(let a=0;a<Pi.length;a++){const l=Pi[a];t[l]!==e[l]&&(r=!0)}r&&V.read(()=>{qr(i,n),V.render(()=>{ze(n,s,Ye(i.tagName),t.transformTemplate),qn(i,n)})})}})},Jr={useVisualState:$n({scrapeMotionValuesFromProps:Xe,createRenderState:He})};function Qn(t,e,i){for(const n in e)!B(e[n])&&!Zn(n,i)&&(t[n]=e[n])}function Qr({transformTemplate:t},e){return(0,P.useMemo)(()=>{const i=He();return Ge(i,e,t),Object.assign({},i.vars,i.style)},[e])}function to(t,e){const i=t.style||{},n={};return Qn(n,i,t),Object.assign(n,Qr(t,e)),n}function eo(t,e){const i={},n=to(t,e);return t.drag&&t.dragListener!==!1&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=n,i}function io(t,e,i,n){const s=(0,P.useMemo)(()=>{const o=Hn();return ze(o,e,Ye(n),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Qn(o,t.style,t),s.style={...o,...s.style}}return s}function no(t=!1){return(i,n,s,{latestValues:o},r)=>{const a=(Ue(i)?io:eo)(n,o,r,i),l=yr(n,typeof i=="string",t),u=i!==P.Fragment?{...l,...a,ref:s}:{},{children:c}=n,f=(0,P.useMemo)(()=>B(c)?c.get():c,[c]);return(0,P.createElement)(i,{...u,children:f})}}function so(t,e){return function(n,{forwardMotionProps:s}={forwardMotionProps:!1}){return Dr({...Ue(n)?Zr:Jr,preloadedFeatures:t,useRender:no(s),createVisualElement:e,Component:n})}}function ts(t,e){if(!Array.isArray(e))return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}function Jt(t,e,i){const n=t.getProps();return Ke(n,e,i!==void 0?i:n.custom,t)}var ro=je(()=>window.ScrollTimeline!==void 0),oo=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=e}attachTimeline(t,e){const i=this.animations.map(n=>{if(ro()&&n.attachTimeline)return n.attachTimeline(t);if(typeof e=="function")return e(n)});return()=>{i.forEach((n,s)=>{n&&n(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}},ao=class extends oo{then(t,e){return Promise.all(this.animations).then(t).catch(e)}};function qe(t,e){return t?t[e]||t.default||t:void 0}var lo=2e4;function es(t){let e=0;const i=50;let n=t.next(e);for(;!n.done&&e<2e4;)e+=i,n=t.next(e);return e>=2e4?1/0:e}function Ze(t){return typeof t=="function"}function bi(t,e){t.timeline=e,t.onfinish=null}var Je=t=>Array.isArray(t)&&typeof t[0]=="number",uo={linearEasing:void 0};function co(t,e){const i=je(t);return()=>{var n;return(n=uo[e])!==null&&n!==void 0?n:i()}}var Kt=co(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),is=(t,e,i=10)=>{let n="";const s=Math.max(Math.round(e/i),2);for(let o=0;o<s;o++)n+=t(ut(0,s-1,o))+", ";return`linear(${n.substring(0,n.length-2)})`};function ns(t){return!!(typeof t=="function"&&Kt()||!t||typeof t=="string"&&(t in ge||Kt())||Je(t)||Array.isArray(t)&&t.every(ns))}var gt=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,ge={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function ss(t,e){if(t)return typeof t=="function"&&Kt()?is(t,e):Je(t)?gt(t):Array.isArray(t)?t.map(i=>ss(i,e)||ge.easeOut):ge[t]}var _={x:!1,y:!1};function rs(){return _.x||_.y}function os(t,e,i){var n;if(t instanceof Element)return[t];if(typeof t=="string"){let s=document;e&&(s=e.current);const o=(n=i?.[t])!==null&&n!==void 0?n:s.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t)}function as(t,e){const i=os(t),n=new AbortController,s={passive:!0,...e,signal:n.signal};return[i,s,()=>n.abort()]}function Si(t){return e=>{e.pointerType==="touch"||rs()||t(e)}}function ho(t,e,i={}){const[n,s,o]=as(t,i),r=Si(a=>{const{target:l}=a,u=e(a);if(typeof u!="function"||!l)return;const c=Si(f=>{u(f),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,s)});return n.forEach(a=>{a.addEventListener("pointerenter",r,s)}),o}var ls=(t,e)=>e?t===e?!0:ls(t,e.parentElement):!1,Qe=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,fo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function mo(t){return fo.has(t.tagName)||t.tabIndex!==-1}var yt=new WeakSet;function Ai(t){return e=>{e.key==="Enter"&&t(e)}}function ne(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}var po=(t,e)=>{const i=t.currentTarget;if(!i)return;const n=Ai(()=>{if(yt.has(i))return;ne(i,"down");const s=Ai(()=>{ne(i,"up")}),o=()=>ne(i,"cancel");i.addEventListener("keyup",s,e),i.addEventListener("blur",o,e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)};function wi(t){return Qe(t)&&!rs()}function vo(t,e,i={}){const[n,s,o]=as(t,i),r=a=>{const l=a.currentTarget;if(!wi(a)||yt.has(l))return;yt.add(l);const u=e(a),c=(d,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!wi(d)||!yt.has(l))&&(yt.delete(l),typeof u=="function"&&u(d,{success:m}))},f=d=>{c(d,i.useGlobalTarget||ls(l,d.target))},h=d=>{c(d,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return n.forEach(a=>{!mo(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(i.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),a.addEventListener("focus",l=>po(l,s),s)}),o}function go(t){return t==="x"||t==="y"?_[t]?null:(_[t]=!0,()=>{_[t]=!1}):_.x||_.y?null:(_.x=_.y=!0,()=>{_.x=_.y=!1})}var us=new Set(["width","height","top","left","right","bottom",...dt]),It;function yo(){It=void 0}var $={now:()=>(It===void 0&&$.set(L.isProcessing||ke.useManualTiming?L.timestamp:performance.now()),It),set:t=>{It=t,queueMicrotask(yo)}};function ti(t,e){t.indexOf(e)===-1&&t.push(e)}function ei(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}var ii=class{constructor(){this.subscriptions=[]}add(t){return ti(this.subscriptions,t),()=>ei(this.subscriptions,t)}notify(t,e,i){const n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,e,i);else for(let s=0;s<n;s++){const o=this.subscriptions[s];o&&o(t,e,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function cs(t,e){return e?t*(1e3/e):0}var Vi=30,xo=t=>!isNaN(parseFloat(t)),Di={current:void 0},To=class{constructor(t,e={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,n=!0)=>{const s=$.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),n&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=$.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xo(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Yt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new ii);const i=this.events[t].add(e);return t==="change"?()=>{i(),V.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Di.current&&Di.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=$.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vi)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Vi);return cs(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Vt(t,e){return new To(t,e)}function Po(t,e,i){t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,Vt(i))}function bo(t,e){let{transitionEnd:i={},transition:n={},...s}=Jt(t,e)||{};s={...s,...i};for(const o in s)Po(t,o,Fr(s[o]))}function So(t){return!!(B(t)&&t.add)}function ye(t,e){const i=t.getValue("willChange");if(So(i))return i.add(e)}function hs(t){return t.props[_n]}var fs={current:!1},ds=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t,Ao=1e-7,wo=12;function Vo(t,e,i,n,s){let o,r,a=0;do r=e+(i-e)/2,o=ds(r,n,s)-t,o>0?i=r:e=r;while(Math.abs(o)>Ao&&++a<wo);return r}function Et(t,e,i,n){if(t===e&&i===n)return k;const s=o=>Vo(o,0,1,t,i);return o=>o===0||o===1?o:ds(s(o),e,n)}var ms=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ps=t=>e=>1-t(1-e),vs=Et(.33,1.53,.69,.99),ni=ps(vs),gs=ms(ni),ys=t=>(t*=2)<1?.5*ni(t):.5*(2-Math.pow(2,-10*(t-1))),si=t=>1-Math.sin(Math.acos(t)),xs=ps(si),Ts=ms(si),Ps=t=>/^0[^.\s]+$/u.test(t);function Do(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ps(t):!0}var Tt=t=>Math.round(t*1e5)/1e5,ri=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Co(t){return t==null}var Mo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,oi=(t,e)=>i=>!!(typeof i=="string"&&Mo.test(i)&&i.startsWith(t)||e&&!Co(i)&&Object.prototype.hasOwnProperty.call(i,e)),bs=(t,e,i)=>n=>{if(typeof n!="string")return n;const[s,o,r,a]=n.match(ri);return{[t]:parseFloat(s),[e]:parseFloat(o),[i]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Eo=t=>z(0,255,t),se={...mt,transform:t=>Math.round(Eo(t))},et={test:oi("rgb","red"),parse:bs("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+se.transform(t)+", "+se.transform(e)+", "+se.transform(i)+", "+Tt(wt.transform(n))+")"};function Ro(t){let e="",i="",n="",s="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,i+=i,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}var xe={test:oi("#"),parse:Ro,transform:et.transform},rt={test:oi("hsl","hue"),parse:bs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+K.transform(Tt(e))+", "+K.transform(Tt(i))+", "+Tt(wt.transform(n))+")"},F={test:t=>et.test(t)||xe.test(t)||rt.test(t),parse:t=>et.test(t)?et.parse(t):rt.test(t)?rt.parse(t):xe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?et.transform(t):rt.transform(t)},Lo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fo(t){var e,i;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ri))===null||e===void 0?void 0:e.length)||0)+(((i=t.match(Lo))===null||i===void 0?void 0:i.length)||0)>0}var Ss="number",As="color",Bo="var",jo="var(",Ci="${}",ko=/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 Dt(t){const e=t.toString(),i=[],n={color:[],number:[],var:[]},s=[];let o=0;return{values:i,split:e.replace(ko,r=>(F.test(r)?(n.color.push(o),s.push(As),i.push(F.parse(r))):r.startsWith(jo)?(n.var.push(o),s.push(Bo),i.push(r)):(n.number.push(o),s.push(Ss),i.push(parseFloat(r))),++o,Ci)).split(Ci),indexes:n,types:s}}function ws(t){return Dt(t).values}function Vs(t){const{split:e,types:i}=Dt(t),n=e.length;return s=>{let o="";for(let r=0;r<n;r++)if(o+=e[r],s[r]!==void 0){const a=i[r];a===Ss?o+=Tt(s[r]):a===As?o+=F.transform(s[r]):o+=s[r]}return o}}var Oo=t=>typeof t=="number"?0:t;function Io(t){const e=ws(t);return Vs(t)(e.map(Oo))}var q={test:Fo,parse:ws,createTransformer:Vs,getAnimatableNone:Io},No=new Set(["brightness","contrast","saturate","opacity"]);function _o(t){const[e,i]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=i.match(ri)||[];if(!n)return t;const s=i.replace(n,"");let o=No.has(e)?1:0;return n!==i&&(o*=100),e+"("+o+s+")"}var Uo=/\b([a-z-]*)\(.*?\)/gu,Te={...q,getAnimatableNone:t=>{const e=t.match(Uo);return e?e.map(_o).join(" "):t}},Ko={...We,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:Te,WebkitFilter:Te},ai=t=>Ko[t];function Ds(t,e){let i=ai(t);return i!==Te&&(i=q),i.getAnimatableNone?i.getAnimatableNone(e):void 0}var $o=new Set(["auto","none","0"]);function Wo(t,e,i){let n=0,s;for(;n<t.length&&!s;){const o=t[n];typeof o=="string"&&!$o.has(o)&&Dt(o).values.length&&(s=t[n]),n++}if(s&&i)for(const o of e)t[o]=Ds(i,s)}var Mi=t=>t===mt||t===y,Ei=(t,e)=>parseFloat(t.split(", ")[e]),Ri=(t,e)=>(i,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/u);if(s)return Ei(s[1],e);{const o=n.match(/^matrix\((.+)\)$/u);return o?Ei(o[1],t):0}},Go=new Set(["x","y","z"]),zo=dt.filter(t=>!Go.has(t));function Ho(t){const e=[];return zo.forEach(i=>{const n=t.getValue(i);n!==void 0&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}var ht={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),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:Ri(4,13),y:Ri(5,14)};ht.translateX=ht.x;ht.translateY=ht.y;var it=new Set,Pe=!1,be=!1;function Cs(){if(be){const t=Array.from(it).filter(n=>n.needsMeasurement),e=new Set(t.map(n=>n.element)),i=new Map;e.forEach(n=>{const s=Ho(n);s.length&&(i.set(n,s),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const s=i.get(n);s&&s.forEach(([o,r])=>{var a;(a=n.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}be=!1,Pe=!1,it.forEach(t=>t.complete()),it.clear()}function Ms(){it.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(be=!0)})}function Yo(){Ms(),Cs()}var li=class{constructor(t,e,i,n,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(it.add(this),Pe||(Pe=!0,V.read(Ms),V.resolveKeyframes(Cs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=n?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&e){const a=i.readValue(e,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),n&&o===void 0&&n.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),it.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,it.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},Es=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Xo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qo(t){const e=Xo.exec(t);if(!e)return[,];const[,i,n,s]=e;return[`--${i??n}`,s]}var Zo=4;function Rs(t,e,i=1){Y(i<=Zo,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[n,s]=qo(t);if(!n)return;const o=window.getComputedStyle(e).getPropertyValue(n);if(o){const r=o.trim();return Es(r)?parseFloat(r):r}return $e(s)?Rs(s,e,i+1):s}var Ls=t=>e=>e.test(t),Jo={test:t=>t==="auto",parse:t=>t},Fs=[mt,y,K,H,Nr,Ir,Jo],Li=t=>Fs.find(Ls(t)),Bs=class extends li{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="string"&&(l=l.trim(),$e(l))){const u=Rs(l,e.current);u!==void 0&&(t[a]=u),a===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!us.has(i)||t.length!==2)return;const[n,s]=t,o=Li(n),r=Li(s);if(o!==r)if(Mi(o)&&Mi(r))for(let a=0;a<t.length;a++){const l=t[a];typeof l=="string"&&(t[a]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,i=[];for(let n=0;n<t.length;n++)Do(t[n])&&i.push(n);i.length&&Wo(t,i,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ht[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const n=e[e.length-1];n!==void 0&&t.getValue(i,n).jump(n,!1)}measureEndState(){var t;const{element:e,name:i,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const s=e.getValue(i);s&&s.jump(this.measuredOrigin,!1);const o=n.length-1,r=n[o];n[o]=ht[i](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}},Fi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(q.test(t)||t==="0")&&!t.startsWith("url("));function Qo(t){const e=t[0];if(t.length===1)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}function ta(t,e,i,n){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Fi(s,e),a=Fi(o,e);return ft(r===a,`You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!r||!a?!1:Qo(t)||(i==="spring"||Ze(i))&&n}var ea=t=>t!==null;function Qt(t,{repeat:e,repeatType:i="loop"},n){const s=t.filter(ea),o=e&&i!=="loop"&&e%2===1?0:s.length-1;return!o||n===void 0?s[o]:n}var ia=40,js=class{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=$.now(),this.options={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>ia?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Yo(),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=$.now(),this.hasAttemptedResolve=!0;const{name:i,type:n,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!ta(t,i,n,s))if(fs.current||!o){a&&a(Qt(t,this.options,e)),r&&r(),this.resolveFinishedPromise();return}else this.options.duration=0;const u=this.initPlayback(t,e);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}},C=(t,e,i)=>t+(e-t)*i;function re(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+(e-t)*6*i:i<1/2?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function na({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,e/=100,i/=100;let s=0,o=0,r=0;if(!e)s=o=r=i;else{const a=i<.5?i*(1+e):i+e-i*e,l=2*i-a;s=re(l,a,t+1/3),o=re(l,a,t),r=re(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:n}}function $t(t,e){return i=>i>0?e:t}var oe=(t,e,i)=>{const n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},sa=[xe,et,rt],ra=t=>sa.find(e=>e.test(t));function Bi(t){const e=ra(t);if(ft(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let i=e.parse(t);return e===rt&&(i=na(i)),i}var ji=(t,e)=>{const i=Bi(t),n=Bi(e);if(!i||!n)return $t(t,e);const s={...i};return o=>(s.red=oe(i.red,n.red,o),s.green=oe(i.green,n.green,o),s.blue=oe(i.blue,n.blue,o),s.alpha=C(i.alpha,n.alpha,o),et.transform(s))},oa=(t,e)=>i=>e(t(i)),Rt=(...t)=>t.reduce(oa),Se=new Set(["none","hidden"]);function aa(t,e){return Se.has(t)?i=>i<=0?t:e:i=>i>=1?e:t}function la(t,e){return i=>C(t,e,i)}function ui(t){return typeof t=="number"?la:typeof t=="string"?$e(t)?$t:F.test(t)?ji:ha:Array.isArray(t)?ks:typeof t=="object"?F.test(t)?ji:ua:$t}function ks(t,e){const i=[...t],n=i.length,s=t.map((o,r)=>ui(o)(o,e[r]));return o=>{for(let r=0;r<n;r++)i[r]=s[r](o);return i}}function ua(t,e){const i={...t,...e},n={};for(const s in i)t[s]!==void 0&&e[s]!==void 0&&(n[s]=ui(t[s])(t[s],e[s]));return s=>{for(const o in n)i[o]=n[o](s);return i}}function ca(t,e){var i;const n=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][s[r]];n[o]=(i=t.values[a])!==null&&i!==void 0?i:0,s[r]++}return n}var ha=(t,e)=>{const i=q.createTransformer(e),n=Dt(t),s=Dt(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?Se.has(t)&&!s.values.length||Se.has(e)&&!n.values.length?aa(t,e):Rt(ks(ca(n,s),s.values),i):(ft(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),$t(t,e))};function Os(t,e,i){return typeof t=="number"&&typeof e=="number"&&typeof i=="number"?C(t,e,i):ui(t)(t,e)}var fa=5;function Is(t,e,i){const n=Math.max(e-fa,0);return cs(i-t(n),e-n)}var D={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},ae=.001;function da({duration:t=D.duration,bounce:e=D.bounce,velocity:i=D.velocity,mass:n=D.mass}){let s,o;ft(t<=U(D.maxDuration),"Spring duration must be 10 seconds or less");let r=1-e;r=z(D.minDamping,D.maxDamping,r),t=z(D.minDuration,D.maxDuration,G(t)),r<1?(s=u=>{const c=u*r,f=c*t,h=c-i,d=Ae(u,r),m=Math.exp(-f);return ae-h/d*m},o=u=>{const c=u*r*t,f=c*i+i,h=Math.pow(r,2)*Math.pow(u,2)*t,d=Math.exp(-c),m=Ae(Math.pow(u,2),r);return(-s(u)+ae>0?-1:1)*((f-h)*d)/m}):(s=u=>{const c=Math.exp(-u*t),f=(u-i)*t+1;return-ae+c*f},o=u=>Math.exp(-u*t)*((i-u)*(t*t)));const a=5/t,l=pa(s,o,a);if(t=U(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:r*2*Math.sqrt(n*u),duration:t}}}var ma=12;function pa(t,e,i){let n=i;for(let s=1;s<ma;s++)n=n-t(n)/e(n);return n}function Ae(t,e){return t*Math.sqrt(1-e*e)}var va=["duration","bounce"],ga=["stiffness","damping","mass"];function ki(t,e){return e.some(i=>t[i]!==void 0)}function ya(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!ki(t,ga)&&ki(t,va))if(t.visualDuration){const i=t.visualDuration,n=2*Math.PI/(i*1.2),s=n*n,o=2*z(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:D.mass,stiffness:s,damping:o}}else{const i=da(t);e={...e,...i,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Ns(t=D.visualDuration,e=D.bounce){const i=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:s}=i;const o=i.keyframes[0],r=i.keyframes[i.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:f,velocity:h,isResolvedFromDuration:d}=ya({...i,velocity:-G(i.velocity||0)}),m=h||0,p=u/(2*Math.sqrt(l*c)),x=r-o,v=G(Math.sqrt(l/c)),g=Math.abs(x)<5;n||(n=g?D.restSpeed.granular:D.restSpeed.default),s||(s=g?D.restDelta.granular:D.restDelta.default);let T;if(p<1){const S=Ae(v,p);T=w=>r-Math.exp(-p*v*w)*((m+p*v*x)/S*Math.sin(S*w)+x*Math.cos(S*w))}else if(p===1)T=S=>r-Math.exp(-v*S)*(x+(m+v*x)*S);else{const S=v*Math.sqrt(p*p-1);T=w=>{const E=Math.exp(-p*v*w),b=Math.min(S*w,300);return r-E*((m+p*v*x)*Math.sinh(b)+S*x*Math.cosh(b))/S}}const A={calculatedDuration:d&&f||null,next:S=>{const w=T(S);if(d)a.done=S>=f;else{let E=0;p<1&&(E=S===0?U(m):Is(T,S,w));const b=Math.abs(E)<=n,R=Math.abs(r-w)<=s;a.done=b&&R}return a.value=a.done?r:w,a},toString:()=>{const S=Math.min(es(A),lo),w=is(E=>A.next(S*E).value,S,30);return S+"ms "+w}};return A}function Oi({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=t[0],h={done:!1,value:f},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 p=i*e;const x=f+p,v=r===void 0?x:r(x);v!==x&&(p=v-f);const g=b=>-p*Math.exp(-b/n),T=b=>v+g(b),A=b=>{const R=g(b),Ft=T(b);h.done=Math.abs(R)<=u,h.value=h.done?v:Ft};let S,w;const E=b=>{d(h.value)&&(S=b,w=Ns({keyframes:[h.value,m(h.value)],velocity:Is(T,b,h.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:b=>{let R=!1;return!w&&S===void 0&&(R=!0,A(b),E(b)),S!==void 0&&b>=S?w.next(b-S):(!R&&A(b),h)}}}var xa=Et(.42,0,1,1),Ta=Et(0,0,.58,1),_s=Et(.42,0,.58,1),Pa=t=>Array.isArray(t)&&typeof t[0]!="number",Ii={linear:k,easeIn:xa,easeInOut:_s,easeOut:Ta,circIn:si,circInOut:Ts,circOut:xs,backIn:ni,backInOut:gs,backOut:vs,anticipate:ys},Ni=t=>{if(Je(t)){Y(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,i,n,s]=t;return Et(e,i,n,s)}else if(typeof t=="string")return Y(Ii[t]!==void 0,`Invalid easing type '${t}'`),Ii[t];return t};function ba(t,e,i){const n=[],s=i||Os,o=t.length-1;for(let r=0;r<o;r++){let a=s(t[r],t[r+1]);e&&(a=Rt(Array.isArray(e)?e[r]||k:e,a)),n.push(a)}return n}function Sa(t,e,{clamp:i=!0,ease:n,mixer:s}={}){const o=t.length;if(Y(o===e.length,"Both input and output ranges must be the same 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=ba(e,n,s),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const h=ut(t[f],t[f+1],c);return a[f](h)};return i?c=>u(z(t[0],t[o-1],c)):u}function Aa(t,e){const i=t[t.length-1];for(let n=1;n<=e;n++){const s=ut(0,e,n);t.push(C(i,1,s))}}function wa(t){const e=[0];return Aa(e,t.length-1),e}function Va(t,e){return t.map(i=>i*e)}function Da(t,e){return t.map(()=>e||_s).splice(0,t.length-1)}function Wt({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){const s=Pa(n)?n.map(Ni):Ni(n),o={done:!1,value:e[0]},r=Sa(Va(i&&i.length===e.length?i:wa(e),t),e,{ease:Array.isArray(s)?s:Da(e,s)});return{calculatedDuration:t,next:a=>(o.value=r(a),o.done=a>=t,o)}}var Ca=t=>{const e=({timestamp:i})=>t(i);return{start:()=>V.update(e,!0),stop:()=>X(e),now:()=>L.isProcessing?L.timestamp:$.now()}},Ma={decay:Oi,inertia:Oi,tween:Wt,keyframes:Wt,spring:Ns},Ea=t=>t/100,ci=class extends js{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:e,motionValue:i,element:n,keyframes:s}=this.options,o=n?.KeyframeResolver||li,r=(a,l)=>this.onKeyframesResolved(a,l);this.resolver=new o(s,r,e,i,n),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:o=0}=this.options,r=Ze(e)?e:Ma[e]||Wt;let a,l;r!==Wt&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Y(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a=Rt(Ea,Os(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});s==="mirror"&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=es(u));const{calculatedDuration:c}=u,f=c+n,h=f*(i+1)-n;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,e=!1){const{resolved:i}=this;if(!i){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:n,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=i;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:d,repeatDelay:m,onUpdate:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const E=Math.min(this.currentTime,u)/c;let b=Math.floor(E),R=E%1;!R&&E>=1&&(R=1),R===1&&b--,b=Math.min(b,h+1),b%2&&(d==="reverse"?(R=1-R,m&&(R-=m/c)):d==="mirror"&&(T=o)),g=z(0,1,R)*c}const A=v?{done:!1,value:a[0]}:T.next(g);r&&(A.value=r(A.value));let{done:S}=A;!v&&l!==null&&(S=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return w&&n!==void 0&&(A.value=Qt(a,this.options,n)),p&&p(A.value),w&&this.finish(),A}get duration(){const{resolved:t}=this;return t?G(t.calculatedDuration):0}get time(){return G(this.currentTime)}set time(t){t=U(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=G(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Ca,onPlay:e,startTime:i}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),e&&e();const n=this.driver.now();this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=n):this.startTime=i??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}},Ra=new Set(["opacity","clipPath","filter","transform"]);function La(t,e,i,{delay:n=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:l}={}){const u={[e]:i};l&&(u.offset=l);const c=ss(a,s);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:n,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}var Fa=je(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gt=10,Ba=2e4;function ja(t){return Ze(t.type)||t.type==="spring"||!ns(t.ease)}function ka(t,e){const i=new ci({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:t[0]};const s=[];let o=0;for(;!n.done&&o<Ba;)n=i.sample(o),s.push(n.value),o+=Gt;return{times:void 0,keyframes:s,duration:o-Gt,ease:"linear"}}var Us={anticipate:ys,backInOut:gs,circInOut:Ts};function Oa(t){return t in Us}var _i=class extends js{constructor(t){super(t);const{name:e,motionValue:i,element:n,keyframes:s}=this.options;this.resolver=new Bs(s,(o,r)=>this.onKeyframesResolved(o,r),e,i,n),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:i=300,times:n,ease:s,type:o,motionValue:r,name:a,startTime:l}=this.options;if(!r.owner||!r.owner.current)return!1;if(typeof s=="string"&&Kt()&&Oa(s)&&(s=Us[s]),ja(this.options)){const{onComplete:c,onUpdate:f,motionValue:h,element:d,...m}=this.options,p=ka(t,m);t=p.keyframes,t.length===1&&(t[1]=t[0]),i=p.duration,n=p.times,s=p.ease,o="keyframes"}const u=La(r.owner.current,a,t,{...this.options,duration:i,times:n,ease:s});return u.startTime=l??this.calcStartTime(),this.pendingTimeline?(bi(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:c}=this.options;r.set(Qt(t,this.options,e)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:n,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return G(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return G(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:i}=e;i.currentTime=U(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:i}=e;i.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:e}=this;if(!e)return k;const{animation:i}=e;bi(i,t)}return k}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.playState==="finished"&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:i,duration:n,type:s,ease:o,times:r}=t;if(e.playState==="idle"||e.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:u,onComplete:c,element:f,...h}=this.options,d=new ci({...h,keyframes:i,duration:n,type:s,ease:o,times:r,isGenerator:!0}),m=U(this.time);l.setWithVelocity(d.sample(m-Gt).value,d.sample(m).value,Gt)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:o,type:r}=t;if(!e||!e.owner||!(e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Fa()&&i&&Ra.has(i)&&!a&&!l&&!n&&s!=="mirror"&&o!==0&&r!=="inertia"}},Ia={type:"spring",stiffness:500,damping:25,restSpeed:10},Na=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),_a={type:"keyframes",duration:.8},Ua={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ka=(t,{keyframes:e})=>e.length>2?_a:nt.has(t)?t.startsWith("scale")?Na(e[1]):Ia:Ua;function $a({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var hi=(t,e,i,n={},s,o)=>r=>{const a=qe(n,t)||{},l=a.delay||n.delay||0;let{elapsed:u=0}=n;u=u-U(l);let c={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};$a(a)||(c={...c,...Ka(t,c)}),c.duration&&(c.duration=U(c.duration)),c.repeatDelay&&(c.repeatDelay=U(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),(fs.current||ke.skipAnimations)&&(f=!0,c.duration=0,c.delay=0),f&&!o&&e.get()!==void 0){const h=Qt(c.keyframes,a);if(h!==void 0)return V.update(()=>{c.onUpdate(h),c.onComplete()}),new ao([])}return!o&&_i.supports(c)?new _i(c):new ci(c)};function Wa({protectedKeys:t,needsAnimating:e},i){const n=t.hasOwnProperty(i)&&e[i]!==!0;return e[i]=!1,n}function Ks(t,e,{delay:i=0,transitionOverride:n,type:s}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;n&&(r=n);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const f in l){const h=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),d=l[f];if(d===void 0||c&&Wa(c,f))continue;const m={delay:i,...qe(r||{},f)};let p=!1;if(window.MotionHandoffAnimation){const v=hs(t);if(v){const g=window.MotionHandoffAnimation(v,f,V);g!==null&&(m.startTime=g,p=!0)}}ye(t,f),h.start(hi(f,h,d,t.shouldReduceMotion&&us.has(f)?{type:!1}:m,t,p));const x=h.animation;x&&u.push(x)}return a&&Promise.all(u).then(()=>{V.update(()=>{a&&bo(t,a)})}),u}function we(t,e,i={}){var n;const s=Jt(t,e,i.type==="exit"?(n=t.presenceContext)===null||n===void 0?void 0:n.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(o=i.transitionOverride);const r=s?()=>Promise.all(Ks(t,s,i)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:h}=o;return Ga(t,e,c+u,f,h,i)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,c]=l==="beforeChildren"?[r,a]:[a,r];return u().then(()=>c())}else return Promise.all([r(),a(i.delay)])}function Ga(t,e,i=0,n=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*n,l=s===1?(u=0)=>u*n:(u=0)=>a-u*n;return Array.from(t.variantChildren).sort(za).forEach((u,c)=>{u.notify("AnimationStart",e),r.push(we(u,e,{...o,delay:i+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function za(t,e){return t.sortNodePosition(e)}function Ha(t,e,i={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(o=>we(t,o,i));n=Promise.all(s)}else if(typeof e=="string")n=we(t,e,i);else{const s=typeof e=="function"?Jt(t,e,i.custom):e;n=Promise.all(Ks(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})}var Ya=Ie.length;function $s(t){if(!t)return;if(!t.isControllingVariants){const i=t.parent?$s(t.parent)||{}:{};return t.props.initial!==void 0&&(i.initial=t.props.initial),i}const e={};for(let i=0;i<Ya;i++){const n=Ie[i],s=t.props[n];(At(s)||s===!1)&&(e[n]=s)}return e}var Xa=[...Oe].reverse(),qa=Oe.length;function Za(t){return e=>Promise.all(e.map(({animation:i,options:n})=>Ha(t,i,n)))}function Ja(t){let e=Za(t),i=Ui(),n=!0;const s=l=>(u,c)=>{var f;const h=Jt(t,c,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:m,...p}=h;u={...u,...p,...m}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=$s(t.parent)||{},f=[],h=new Set;let d={},m=1/0;for(let x=0;x<qa;x++){const v=Xa[x],g=i[v],T=u[v]!==void 0?u[v]:c[v],A=At(T),S=v===l?g.isActive:null;S===!1&&(m=x);let w=T===c[v]&&T!==u[v]&&A;if(w&&n&&t.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...d},!g.isActive&&S===null||!T&&!g.prevProp||qt(T)||typeof T=="boolean")continue;const E=Qa(g.prevProp,T);let b=E||v===l&&g.isActive&&!w&&A||x>m&&A,R=!1;const Ft=Array.isArray(T)?T:[T];let pt=Ft.reduce(s(v),{});S===!1&&(pt={});const{prevResolvedValues:fi={}}=g,cr={...fi,...pt},di=j=>{b=!0,h.has(j)&&(R=!0,h.delete(j)),g.needsAnimating[j]=!0;const W=t.getValue(j);W&&(W.liveStyle=!1)};for(const j in cr){const W=pt[j],te=fi[j];if(d.hasOwnProperty(j))continue;let ee=!1;ve(W)&&ve(te)?ee=!ts(W,te):ee=W!==te,ee?W!=null?di(j):h.add(j):W!==void 0&&h.has(j)?di(j):g.protectedKeys[j]=!0}g.prevProp=T,g.prevResolvedValues=pt,g.isActive&&(d={...d,...pt}),n&&t.blockInitialAnimation&&(b=!1),b&&(!(w&&E)||R)&&f.push(...Ft.map(j=>({animation:j,options:{type:v}})))}if(h.size){const x={};h.forEach(v=>{const g=t.getBaseTarget(v),T=t.getValue(v);T&&(T.liveStyle=!0),x[v]=g??null}),f.push({animation:x})}let p=!!f.length;return n&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(p=!1),n=!1,p?e(f):Promise.resolve()}function a(l,u){var c;if(i[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(h=>{var d;return(d=h.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),i[l].isActive=u;const f=r(l);for(const h in i)i[h].protectedKeys={};return f}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>i,reset:()=>{i=Ui(),n=!0}}}function Qa(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ts(e,t):!1}function J(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ui(){return{animate:J(!0),whileInView:J(),whileHover:J(),whileTap:J(),whileDrag:J(),whileFocus:J(),exit:J()}}var Z=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},tl=class extends Z{constructor(t){super(t),t.animationState||(t.animationState=Ja(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}},el=0,il=class extends Z{constructor(){super(...arguments),this.id=el++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}},nl={animation:{Feature:tl},exit:{Feature:il}};function Ct(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}function Lt(t){return{point:{x:t.pageX,y:t.pageY}}}var sl=t=>e=>Qe(e)&&t(e,Lt(e));function Pt(t,e,i,n){return Ct(t,e,sl(i),n)}var Ki=(t,e)=>Math.abs(t-e);function rl(t,e){const i=Ki(t.x,e.x),n=Ki(t.y,e.y);return Math.sqrt(i**2+n**2)}var Ws=class{constructor(t,e,{transformPagePoint:i,contextWindow:n,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=ue(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,f=rl(u.offset,{x:0,y:0})>=3;if(!c&&!f)return;const{point:h}=u,{timestamp:d}=L;this.history.push({...h,timestamp:d});const{onStart:m,onMove:p}=this.handlers;c||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=le(c,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:d}=this.handlers;if(this.dragSnapToOrigin&&d&&d(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=ue(u.type==="pointercancel"?this.lastMoveEventInfo:le(c,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!Qe(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.contextWindow=n||window;const o=le(Lt(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=L;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,ue(o,this.history)),this.removeListeners=Rt(Pt(this.contextWindow,"pointermove",this.handlePointerMove),Pt(this.contextWindow,"pointerup",this.handlePointerUp),Pt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),X(this.updatePoint)}};function le(t,e){return e?{point:e(t.point)}:t}function $i(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ue({point:t},e){return{point:t,delta:$i(t,Gs(e)),offset:$i(t,ol(e)),velocity:al(e,.1)}}function ol(t){return t[0]}function Gs(t){return t[t.length-1]}function al(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null;const s=Gs(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>U(e)));)i--;if(!n)return{x:0,y:0};const o=G(s.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-n.x)/o,y:(s.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}var zs=1e-4,ll=1-zs,ul=1+zs,Hs=.01,cl=0-Hs,hl=0+Hs;function O(t){return t.max-t.min}function fl(t,e,i){return Math.abs(t-e)<=i}function Wi(t,e,i,n=.5){t.origin=n,t.originPoint=C(e.min,e.max,t.origin),t.scale=O(i)/O(e),t.translate=C(i.min,i.max,t.origin)-t.originPoint,(t.scale>=ll&&t.scale<=ul||isNaN(t.scale))&&(t.scale=1),(t.translate>=cl&&t.translate<=hl||isNaN(t.translate))&&(t.translate=0)}function bt(t,e,i,n){Wi(t.x,e.x,i.x,n?n.originX:void 0),Wi(t.y,e.y,i.y,n?n.originY:void 0)}function Gi(t,e,i){t.min=i.min+e.min,t.max=t.min+O(e)}function dl(t,e,i){Gi(t.x,e.x,i.x),Gi(t.y,e.y,i.y)}function zi(t,e,i){t.min=e.min-i.min,t.max=t.min+O(e)}function St(t,e,i){zi(t.x,e.x,i.x),zi(t.y,e.y,i.y)}function ml(t,{min:e,max:i},n){return e!==void 0&&t<e?t=n?C(e,t,n.min):Math.max(t,e):i!==void 0&&t>i&&(t=n?C(i,t,n.max):Math.min(t,i)),t}function Hi(t,e,i){return{min:e!==void 0?t.min+e:void 0,max:i!==void 0?t.max+i-(t.max-t.min):void 0}}function pl(t,{top:e,left:i,bottom:n,right:s}){return{x:Hi(t.x,i,s),y:Hi(t.y,e,n)}}function Yi(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,n]=[n,i]),{min:i,max:n}}function vl(t,e){return{x:Yi(t.x,e.x),y:Yi(t.y,e.y)}}function gl(t,e){let i=.5;const n=O(t),s=O(e);return s>n?i=ut(e.min,e.max-n,t.min):n>s&&(i=ut(t.min,t.max-s,e.min)),z(0,1,i)}function yl(t,e){const i={};return e.min!==void 0&&(i.min=e.min-t.min),e.max!==void 0&&(i.max=e.max-t.min),i}var Ve=.35;function xl(t=Ve){return t===!1?t=0:t===!0&&(t=Ve),{x:Xi(t,"left","right"),y:Xi(t,"top","bottom")}}function Xi(t,e,i){return{min:qi(t,e),max:qi(t,i)}}function qi(t,e){return typeof t=="number"?t:t[e]||0}var Zi=()=>({translate:0,scale:1,origin:0,originPoint:0}),ot=()=>({x:Zi(),y:Zi()}),Ji=()=>({min:0,max:0}),M=()=>({x:Ji(),y:Ji()});function N(t){return[t("x"),t("y")]}function Ys({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function Tl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Pl(t,e){if(!e)return t;const i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}function ce(t){return t===void 0||t===1}function De({scale:t,scaleX:e,scaleY:i}){return!ce(t)||!ce(e)||!ce(i)}function Q(t){return De(t)||Xs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Xs(t){return Qi(t.x)||Qi(t.y)}function Qi(t){return t&&t!=="0%"}function zt(t,e,i){return i+e*(t-i)}function tn(t,e,i,n,s){return s!==void 0&&(t=zt(t,s,n)),zt(t,i,n)+e}function Ce(t,e=0,i=1,n,s){t.min=tn(t.min,e,i,n,s),t.max=tn(t.max,e,i,n,s)}function qs(t,{x:e,y:i}){Ce(t.x,e.translate,e.scale,e.originPoint),Ce(t.y,i.translate,i.scale,i.originPoint)}var en=.999999999999,nn=1.0000000000001;function bl(t,e,i,n=!1){const s=i.length;if(!s)return;e.x=e.y=1;let o,r;for(let a=0;a<s;a++){o=i[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&<(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,qs(t,r)),n&&Q(o.latestValues)&<(t,o.latestValues))}e.x<nn&&e.x>en&&(e.x=1),e.y<nn&&e.y>en&&(e.y=1)}function at(t,e){t.min=t.min+e,t.max=t.max+e}function sn(t,e,i,n,s=.5){Ce(t,e,i,C(t.min,t.max,s),n)}function lt(t,e){sn(t.x,e.x,e.scaleX,e.scale,e.originX),sn(t.y,e.y,e.scaleY,e.scale,e.originY)}function Zs(t,e){return Ys(Pl(t.getBoundingClientRect(),e))}function Sl(t,e,i){const n=Zs(t,i),{scroll:s}=e;return s&&(at(n.x,s.offset.x),at(n.y,s.offset.y)),n}var Js=({current:t})=>t?t.ownerDocument.defaultView:null,Al=new WeakMap,wl=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=M(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const n=u=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Lt(u).point)},s=(u,c)=>{const{drag:f,dragPropagation:h,onDragStart:d}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=go(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),N(p=>{let x=this.getAxisMotionValue(p).get()||0;if(K.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[p];g&&(x=O(g)*(parseFloat(x)/100))}}this.originPoint[p]=x}),d&&V.postRender(()=>d(u,c)),ye(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(u,c)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:d,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:p}=c;if(h&&this.currentDirection===null){this.currentDirection=Vl(p),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),m&&m(u,c)},r=(u,c)=>this.stop(u,c),a=()=>N(u=>{var c;return this.getAnimationState(u)==="paused"&&((c=this.getAxisMotionValue(u).animation)===null||c===void 0?void 0:c.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Ws(t,{onSessionStart:n,onStart:s,onMove:o,onSessionEnd:r,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:Js(this.visualElement)})}stop(t,e){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:n}=e;this.startAnimation(n);const{onDragEnd:s}=this.getProps();s&&V.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){const{drag:n}=this.getProps();if(!i||!kt(t,n,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=ml(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:i}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;e&&st(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=pl(n.layoutBox,e):this.constraints=!1,this.elastic=xl(i),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=yl(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!st(t))return!1;const i=t.current;Y(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const s=Sl(i,n.root,this.visualElement.getTransformPagePoint());let o=vl(n.layout.layoutBox,s);if(e){const r=e(Tl(o));this.hasMutatedConstraints=!!r,r&&(o=Ys(r))}return o}startAnimation(t){const{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=N(u=>{if(!kt(u,e,this.currentDirection))return;let c=a&&a[u]||{};o&&(c={min:0,max:0});const f=n?200:1e6,h=n?40:1e7,d={type:"inertia",velocity:i?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(u,d)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const i=this.getAxisMotionValue(t);return ye(this.visualElement,t),i.start(hi(t,i,0,e,this.visualElement,!1))}stopAnimation(){N(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){N(t=>{var e;return(e=this.getAxisMotionValue(t).animation)===null||e===void 0?void 0:e.pause()})}getAnimationState(t){var e;return(e=this.getAxisMotionValue(t).animation)===null||e===void 0?void 0:e.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),n=i[e];return n||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){N(e=>{const{drag:i}=this.getProps();if(!kt(e,i,this.currentDirection))return;const{projection:n}=this.visualElement,s=this.getAxisMotionValue(e);if(n&&n.layout){const{min:o,max:r}=n.layout.layoutBox[e];s.set(t[e]-C(o,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!st(e)||!i||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};N(o=>{const r=this.getAxisMotionValue(o);if(r&&this.constraints!==!1){const a=r.get();n[o]=gl({min:a,max:a},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),N(o=>{if(!kt(o,t,null))return;const r=this.getAxisMotionValue(o),{min:a,max:l}=this.constraints[o];r.set(C(a,l,n[o]))})}addListeners(){if(!this.visualElement.current)return;Al.set(this.visualElement,this);const t=this.visualElement.current,e=Pt(t,"pointerdown",a=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(a)}),i=()=>{const{dragConstraints:a}=this.getProps();st(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",i);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),V.read(i);const o=Ct(window,"resize",()=>this.scalePositionWithinConstraints()),r=n.addEventListener("didUpdate",(({delta:a,hasLayoutChanged:l})=>{this.isDragging&&l&&(N(u=>{const c=this.getAxisMotionValue(u);c&&(this.originPoint[u]+=a[u].translate,c.set(c.get()+a[u].translate))}),this.visualElement.render())}));return()=>{o(),e(),s(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:o=Ve,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:o,dragMomentum:r}}};function kt(t,e,i){return(e===!0||e===t)&&(i===null||i===t)}function Vl(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}var Dl=class extends Z{constructor(t){super(t),this.removeGroupControls=k,this.removeListeners=k,this.controls=new wl(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}unmount(){this.removeGroupControls(),this.removeListeners()}},rn=t=>(e,i)=>{t&&V.postRender(()=>t(e,i))},Cl=class extends Z{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(t){this.session=new Ws(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Js(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:rn(t),onStart:rn(e),onMove:i,onEnd:(s,o)=>{delete this.session,n&&V.postRender(()=>n(s,o))}}}mount(){this.removePointerDownListener=Pt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Nt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function on(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var vt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(y.test(t))t=parseFloat(t);else return t;return`${on(t,e.target.x)}% ${on(t,e.target.y)}%`}},Ml={correct:(t,{treeScale:e,projectionDelta:i})=>{const n=t,s=q.parse(t);if(s.length>5)return n;const o=q.createTransformer(t),r=typeof s[0]!="number"?1:0,a=i.x.scale*e.x,l=i.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=C(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=u),typeof s[3+r]=="number"&&(s[3+r]/=u),o(s)}},El=class extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;Xr(Rl),s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Nt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,n||t.layoutDependency!==e||e===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||V.postRender(()=>{const r=o.getStack();(!r||!r.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_e.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Qs(t){const[e,i]=Fn(),n=(0,P.useContext)(Le);return(0,pe.jsx)(El,{...t,layoutGroup:n,switchLayoutGroup:(0,P.useContext)(Un),isPresent:e,safeToRemove:i})}var Rl={borderRadius:{...vt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomLeftRadius:vt,borderBottomRightRadius:vt,boxShadow:Ml};function Ll(t,e,i){const n=B(t)?t:Vt(t);return n.start(hi("",n,e,i)),n.animation}function Fl(t){return t instanceof SVGElement&&t.tagName!=="svg"}var Bl=(t,e)=>t.depth-e.depth,jl=class{constructor(){this.children=[],this.isDirty=!1}add(t){ti(this.children,t),this.isDirty=!0}remove(t){ei(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Bl),this.isDirty=!1,this.children.forEach(t)}};function kl(t,e){const i=$.now(),n=({timestamp:s})=>{const o=s-i;o>=e&&(X(n),t(o-e))};return V.read(n,!0),()=>X(n)}var tr=["TopLeft","TopRight","BottomLeft","BottomRight"],Ol=tr.length,an=t=>typeof t=="string"?parseFloat(t):t,ln=t=>typeof t=="number"||y.test(t);function Il(t,e,i,n,s,o){s?(t.opacity=C(0,i.opacity!==void 0?i.opacity:1,Nl(n)),t.opacityExit=C(e.opacity!==void 0?e.opacity:1,0,_l(n))):o&&(t.opacity=C(e.opacity!==void 0?e.opacity:1,i.opacity!==void 0?i.opacity:1,n));for(let r=0;r<Ol;r++){const a=`border${tr[r]}Radius`;let l=un(e,a),u=un(i,a);l===void 0&&u===void 0||(l||(l=0),u||(u=0),l===0||u===0||ln(l)===ln(u)?(t[a]=Math.max(C(an(l),an(u),n),0),(K.test(u)||K.test(l))&&(t[a]+="%")):t[a]=u)}(e.rotate||i.rotate)&&(t.rotate=C(e.rotate||0,i.rotate||0,n))}function un(t,e){return t[e]!==void 0?t[e]:t.borderRadius}var Nl=er(0,.5,xs),_l=er(.5,.95,k);function er(t,e,i){return n=>n<t?0:n>e?1:i(ut(t,e,n))}function cn(t,e){t.min=e.min,t.max=e.max}function I(t,e){cn(t.x,e.x),cn(t.y,e.y)}function hn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function fn(t,e,i,n,s){return t-=e,t=zt(t,1/i,n),s!==void 0&&(t=zt(t,1/s,n)),t}function Ul(t,e=0,i=1,n=.5,s,o=t,r=t){if(K.test(e)&&(e=parseFloat(e),e=C(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=C(o.min,o.max,n);t===o&&(a-=e),t.min=fn(t.min,e,i,a,s),t.max=fn(t.max,e,i,a,s)}function dn(t,e,[i,n,s],o,r){Ul(t,e[i],e[n],e[s],e.scale,o,r)}var Kl=["x","scaleX","originX"],$l=["y","scaleY","originY"];function mn(t,e,i,n){dn(t.x,e,Kl,i?i.x:void 0,n?n.x:void 0),dn(t.y,e,$l,i?i.y:void 0,n?n.y:void 0)}function pn(t){return t.translate===0&&t.scale===1}function ir(t){return pn(t.x)&&pn(t.y)}function vn(t,e){return t.min===e.min&&t.max===e.max}function Wl(t,e){return vn(t.x,e.x)&&vn(t.y,e.y)}function gn(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function nr(t,e){return gn(t.x,e.x)&&gn(t.y,e.y)}function yn(t){return O(t.x)/O(t.y)}function xn(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}var Gl=class{constructor(){this.members=[]}add(t){ti(this.members,t),t.scheduleRender()}remove(t){if(ei(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(t){const e=this.members.findIndex(n=>t===n);if(e===0)return!1;let i;for(let n=e;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(t,e){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:n}=t.options;n===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function zl(t,e,i){let n="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=i?.z||0;if((s||o||r)&&(n=`translate3d(${s}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),i){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:h,skewX:d,skewY:m}=i;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),f&&(n+=`rotateX(${f}deg) `),h&&(n+=`rotateY(${h}deg) `),d&&(n+=`skewX(${d}deg) `),m&&(n+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}var tt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},xt=typeof window<"u"&&window.MotionDebug!==void 0,he=["","X","Y","Z"],Hl={visibility:"hidden"},Tn=1e3,Yl=0;function fe(t,e,i,n){const{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function sr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const i=hs(e);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:s,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",V,!(s||o))}const{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&sr(n)}function rr({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(r={},a=e?.()){this.id=Yl++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,xt&&(tt.totalNodes=tt.resolvedTargetDeltas=tt.recalculatedProjection=0),this.nodes.forEach(Zl),this.nodes.forEach(iu),this.nodes.forEach(nu),this.nodes.forEach(Jl),xt&&window.MotionDebug.record(tt)},this.resolvedRelativeTargetAt=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 jl)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new ii),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,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Fl(r),this.instance=r;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let f;const h=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=kl(h,250),Nt.hasAnimatedSinceResize&&(Nt.hasAnimatedSinceResize=!1,this.nodes.forEach(bn))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||lu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:v}=c.getProps(),g=!this.targetLayout||!nr(this.targetLayout,m)||d,T=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,T);const A={...qe(p,"layout"),onPlay:x,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else h||bn(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,X(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(su),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&&sr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(Pn);return}this.isUpdating||this.nodes.forEach(tu),this.isUpdating=!1,this.nodes.forEach(eu),this.nodes.forEach(Xl),this.nodes.forEach(ql),this.clearAllSnapshots();const r=$.now();L.delta=z(0,1e3/60,r-L.timestamp),L.timestamp=r,L.isProcessing=!0,ie.update.process(L),ie.preRender.process(L),ie.render.process(L),L.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_e.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ql),this.sharedNodes.forEach(ru)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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.layoutCorrected=M(),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){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ir(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&(a||Q(this.latestValues)||c)&&(s(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)),uu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var r;const{visualElement:a}=this.options;if(!a)return M();const l=a.measureViewportBox();if(!(!((r=this.scroll)===null||r===void 0)&&r.wasRoot||this.path.some(cu))){const{scroll:u}=this.root;u&&(at(l.x,u.offset.x),at(l.y,u.offset.y))}return l}removeElementScroll(r){var a;const l=M();if(I(l,r),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:f,options:h}=c;c!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&I(l,r),at(l.x,f.offset.x),at(l.y,f.offset.y))}return l}applyTransform(r,a=!1){const l=M();I(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&<(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Q(c.latestValues)&<(l,c.latestValues)}return Q(this.latestValues)&<(l,this.latestValues),l}removeTransform(r){const a=M();I(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Q(u.latestValues))continue;De(u.latestValues)&&u.updateSnapshot();const c=M();I(c,u.measurePageBox()),mn(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Q(this.latestValues)&&mn(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!==L.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=L.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=M(),this.relativeTargetOrigin=M(),St(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=M(),this.targetWithTransforms=M()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):I(this.target,this.layout.layoutBox),qs(this.target,this.targetDelta)):I(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=M(),this.relativeTargetOrigin=M(),St(this.relativeTargetOrigin,this.target,h.target),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}xt&&tt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||De(this.parent.latestValues)||Xs(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===L.timestamp&&(u=!1),u)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;I(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;bl(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=M());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hn(this.prevProjectionDelta.x,this.projectionDelta.x),hn(this.prevProjectionDelta.y,this.projectionDelta.y)),bt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!xn(this.projectionDelta.x,this.prevProjectionDelta.x)||!xn(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),xt&&tt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ot(),this.projectionDelta=ot(),this.projectionDeltaWithTransform=ot()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=ot();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=M(),d=(l?l.source:void 0)!==(this.layout?this.layout.source:void 0),m=this.getStack(),p=!m||m.members.length<=1,x=!!(d&&!p&&this.options.crossfade===!0&&!this.path.some(au));this.animationProgress=0;let v;this.mixTargetDelta=g=>{const T=g/1e3;Sn(f.x,r.x,T),Sn(f.y,r.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(St(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ou(this.relativeTarget,this.relativeTargetOrigin,h,T),v&&Wl(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=M()),I(v,this.relativeTarget)),d&&(this.animationValues=c,Il(c,u,this.latestValues,T,x,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(X(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Nt.hasAnimatedSinceResize=!0,this.currentAnimation=Ll(0,Tn,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},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(Tn),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&&or(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||M();const f=O(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const h=O(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}I(a,l),lt(a,c),bt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Gl),this.sharedNodes.get(r).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.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&&fe("z",r,u,this.animationValues);for(let c=0;c<he.length;c++)fe(`rotate${he[c]}`,r,u,this.animationValues),fe(`skew${he[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()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Hl;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Ot(r?.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Ot(r?.pointerEvents)||""),this.hasProjected&&!Q(this.latestValues)&&(p.transform=c?c({},""):"none",this.hasProjected=!1),p}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=zl(this.projectionDeltaWithTransform,this.treeScale,h),c&&(u.transform=c(h,u.transform));const{x:d,y:m}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const p in Ut){if(h[p]===void 0)continue;const{correct:x,applyTo:v}=Ut[p],g=u.transform==="none"?h[p]:x(h[p],f);if(v){const T=v.length;for(let A=0;A<T;A++)u[v[A]]=g}else u[p]=g}return this.options.layoutId&&(u.pointerEvents=f===this?Ot(r?.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Pn),this.root.sharedNodes.clear()}}}function Xl(t){t.updateLayout()}function ql(t){var e;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:o}=t.options,r=i.source!==t.layout.source;o==="size"?N(f=>{const h=r?i.measuredBox[f]:i.layoutBox[f],d=O(h);h.min=n[f].min,h.max=h.min+d}):or(o,i.layoutBox,n)&&N(f=>{const h=r?i.measuredBox[f]:i.layoutBox[f],d=O(n[f]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+d)});const a=ot();bt(a,n,i.layoutBox);const l=ot();r?bt(l,t.applyTransform(s,!0),i.measuredBox):bt(l,n,i.layoutBox);const u=!ir(a);let c=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const m=M();St(m,i.layoutBox,h.layoutBox);const p=M();St(p,n,d.layoutBox),nr(m,p)||(c=!0),f.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:i,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Zl(t){xt&&tt.totalNodes++,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 Jl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ql(t){t.clearSnapshot()}function Pn(t){t.clearMeasurements()}function tu(t){t.isLayoutDirty=!1}function eu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function bn(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function iu(t){t.resolveTargetDelta()}function nu(t){t.calcProjection()}function su(t){t.resetSkewAndRotation()}function ru(t){t.removeLeadSnapshot()}function Sn(t,e,i){t.translate=C(e.translate,0,i),t.scale=C(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function An(t,e,i,n){t.min=C(e.min,i.min,n),t.max=C(e.max,i.max,n)}function ou(t,e,i,n){An(t.x,e.x,i.x,n),An(t.y,e.y,i.y,n)}function au(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var lu={duration:.45,ease:[.4,0,.1,1]},wn=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vn=wn("applewebkit/")&&!wn("chrome/")?Math.round:k;function Dn(t){t.min=Vn(t.min),t.max=Vn(t.max)}function uu(t){Dn(t.x),Dn(t.y)}function or(t,e,i){return t==="position"||t==="preserve-aspect"&&!fl(yn(e),yn(i),.2)}function cu(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}var hu=rr({attachResizeListener:(t,e)=>Ct(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),de={current:void 0},ar=rr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!de.current){const t=new hu({});t.mount(window),t.setOptions({layoutScroll:!0}),de.current=t}return de.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),fu={pan:{Feature:Cl},drag:{Feature:Dl,ProjectionNode:ar,MeasureLayout:Qs}};function Cn(t,e,i){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover",i==="Start");const s=n["onHover"+i];s&&V.postRender(()=>s(e,Lt(e)))}var du=class extends Z{mount(){const{current:t}=this.node;t&&(this.unmount=ho(t,e=>(Cn(this.node,e,"Start"),i=>Cn(this.node,i,"End"))))}unmount(){}},mu=class extends Z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Rt(Ct(this.node.current,"focus",()=>this.onFocus()),Ct(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function Mn(t,e,i){const{props:n}=t;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap",i==="Start");const s=n["onTap"+(i==="End"?"":i)];s&&V.postRender(()=>s(e,Lt(e)))}var pu=class extends Z{mount(){const{current:t}=this.node;t&&(this.unmount=vo(t,e=>(Mn(this.node,e,"Start"),(i,{success:n})=>Mn(this.node,i,n?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},Me=new WeakMap,me=new WeakMap,vu=t=>{const e=Me.get(t.target);e&&e(t)},gu=t=>{t.forEach(vu)};function yu({root:t,...e}){const i=t||document;me.has(i)||me.set(i,{});const n=me.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(gu,{root:t,...e})),n[s]}function xu(t,e,i){const n=yu(e);return Me.set(t,i),n.observe(t),()=>{Me.delete(t),n.unobserve(t)}}var Tu={some:0,all:1},Pu=class extends Z{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:i,threshold:typeof n=="number"?n:Tu[n]},r=a=>{const{isIntersecting:l}=a;if(this.isInView===l||(this.isInView=l,s&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:c}=this.node.getProps(),f=l?u:c;f&&f(a)};return xu(this.node.current,o,r)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(bu(t,e))&&this.startObserver()}unmount(){}};function bu({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}var Su={inView:{Feature:Pu},tap:{Feature:pu},focus:{Feature:mu},hover:{Feature:du}},Au={layout:{ProjectionNode:ar,MeasureLayout:Qs}},Ee={current:null},lr={current:!1};function wu(){if(lr.current=!0,!!Be)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ee.current=t.matches;t.addListener(e),e()}else Ee.current=!1}var Vu=[...Fs,F,q],Du=t=>Vu.find(Ls(t)),En=new WeakMap;function Cu(t,e,i){for(const n in e){const s=e[n],o=i[n];if(B(s))t.addValue(n,s),process.env.NODE_ENV==="development"&&Yt(s.version==="11.18.2",`Attempting to mix Motion versions ${s.version} with 11.18.2 may not work as expected.`);else if(B(o))t.addValue(n,Vt(s,{owner:t}));else if(o!==s)if(t.hasValue(n)){const r=t.getValue(n);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=t.getStaticValue(n);t.addValue(n,Vt(r!==void 0?r:s,{owner:t}))}}for(const n in i)e[n]===void 0&&t.removeValue(n);return e}var Rn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Mu=class{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=li,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 h=$.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,V.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=o;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=r,this.blockInitialAnimation=!!s,this.isControllingVariants=Zt(e),this.isVariantNode=Nn(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(e,{},this);for(const h in f){const d=f[h];a[h]!==void 0&&B(d)&&d.set(a[h],!1)}}mount(t){this.current=t,En.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,i)=>this.bindToMotionValue(i,e)),lr.current||wu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ee.current,process.env.NODE_ENV!=="production"&&Yt(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){En.delete(this.current),this.projection&&this.projection.unmount(),X(this.notifyUpdate),X(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=nt.has(t),n=e.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&V.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),s(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ct){const e=ct[t];if(!e)continue;const{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):M()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let i=0;i<Rn.length;i++){const n=Rn[i];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=Cu(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&e!==void 0&&(i=Vt(e===null?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){var i;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Es(n)||Ps(n))?n=parseFloat(n):!Du(n)&&q.test(e)&&(n=Ds(t,e)),this.setBaseTarget(t,B(n)?n.get():n)),B(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:i}=this.props;let n;if(typeof i=="string"||typeof i=="object"){const o=Ke(this.props,i,(e=this.presenceContext)===null||e===void 0?void 0:e.custom);o&&(n=o[t])}if(i&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!B(s)?s:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new ii),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}},ur=class extends Mu{constructor(){super(...arguments),this.KeyframeResolver=Bs}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;B(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}};function Eu(t){return window.getComputedStyle(t)}var Ru=class extends ur{constructor(){super(...arguments),this.type="html",this.renderInstance=Yn}readValueFromInstance(t,e){if(nt.has(e)){const i=ai(e);return i&&i.default||0}else{const i=Eu(t),n=(Gn(e)?i.getPropertyValue(e):i[e])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return Zs(t,e)}build(t,e,i){Ge(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return Xe(t,e,i)}},Lu=class extends ur{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=M}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(nt.has(e)){const i=ai(e);return i&&i.default||0}return e=Xn.has(e)?e:Ne(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return Jn(t,e,i)}build(t,e,i){ze(t,e,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,i,n){qn(t,e,i,n)}mount(t){this.isSVGTag=Ye(t.tagName),super.mount(t)}},Fu=(t,e)=>Ue(t)?new Lu(e):new Ru(e,{allowProjection:t!==P.Fragment}),Bu=so({...nl,...Su,...fu,...Au},Fu),ju=xr(Bu);Object.defineProperty(exports,"LayoutGroupContext",{enumerable:!0,get:function(){return Le}});Object.defineProperty(exports,"MotionConfigContext",{enumerable:!0,get:function(){return Fe}});Object.defineProperty(exports,"PresenceContext",{enumerable:!0,get:function(){return Ht}});Object.defineProperty(exports,"motion",{enumerable:!0,get:function(){return ju}});Object.defineProperty(exports,"resolveElements",{enumerable:!0,get:function(){return os}});Object.defineProperty(exports,"useConstant",{enumerable:!0,get:function(){return Ln}});Object.defineProperty(exports,"useIsomorphicLayoutEffect",{enumerable:!0,get:function(){return Bn}});Object.defineProperty(exports,"usePresence",{enumerable:!0,get:function(){return Fn}});
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=proxy-
|
|
3
|
+
//# sourceMappingURL=proxy-BDese6Pb.cjs.map
|