@intlayer/design-system 2.0.10 → 2.0.11
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/LICENSE +202 -21
- package/dist/.vite/manifest.json +20 -11
- package/dist/components/Container/index.cjs.js +1 -1
- package/dist/components/Container/index.es.js +5 -5
- package/dist/components/DictionaryEditor/ItemLayout.cjs.js +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.es.js +3 -3
- package/dist/components/Footer/index.cjs.js +1 -1
- package/dist/components/Footer/index.es.js +24 -17
- package/dist/components/Headers/SectionScroller.cjs.js +1 -0
- package/dist/components/Headers/SectionScroller.d.ts +1 -0
- package/dist/components/Headers/SectionScroller.es.js +20 -0
- package/dist/components/Headers/index.cjs.js +1 -1
- package/dist/components/Headers/index.d.ts +6 -4
- package/dist/components/Headers/index.es.js +80 -12
- package/dist/components/IDE/IDE.cjs.js +1 -1
- package/dist/components/IDE/IDE.es.js +27 -24
- package/dist/components/Loader/index.cjs.js +1 -1
- package/dist/components/Loader/index.es.js +12 -10
- package/dist/components/MarkDownRender/index.cjs.js +1 -1
- package/dist/components/MarkDownRender/index.es.js +46 -24
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.es.js +5 -5
- package/dist/components/Navbar/DesktopNavbar.cjs.js +1 -1
- package/dist/components/Navbar/DesktopNavbar.es.js +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs.js +8 -8
- package/dist/components/Navbar/MobileNavbar.es.js +122 -122
- package/dist/components/Popover/index.cjs.js +1 -1
- package/dist/components/Popover/index.es.js +22 -18
- package/dist/components/PressableDiv/PressableDiv.cjs.js +1 -1
- package/dist/components/PressableDiv/PressableDiv.es.js +5 -4
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.js +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.es.js +48 -48
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.es.js +10 -8
- package/dist/motion-minimal-BFpJTMRN.js +788 -0
- package/dist/motion-minimal-CwdK8lup.cjs +1 -0
- package/package.json +3 -3
- package/dist/motion-BuKul-u9.cjs +0 -1
- package/dist/motion-CP5YERk7.js +0 -4517
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const H=require("./jsx-runtime-D6agescH.cjs"),d=require("react"),Z=d.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),M=d.createContext({}),q=d.createContext(null),U=typeof document<"u",pt=U?d.useLayoutEffect:d.useEffect,K=d.createContext({strict:!1}),Q=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),wt="framerAppearId",xt="data-"+Q(wt);class D{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function bt(t){let e=new D,n=new D,o=0,r=!1,s=!1;const c=new WeakSet,l={schedule:(m,g=!1,u=!1)=>{const a=u&&r,f=a?e:n;return g&&c.add(m),f.add(m)&&a&&r&&(o=e.order.length),m},cancel:m=>{n.remove(m),c.delete(m)},process:m=>{if(r){s=!0;return}if(r=!0,[e,n]=[n,e],n.clear(),o=e.order.length,o)for(let g=0;g<o;g++){const u=e.order[g];c.has(u)&&(l.schedule(u),t()),u(m)}r=!1,s&&(s=!1,l.process(m))}};return l}const v=["read","resolveKeyframes","update","preRender","render","postRender"],Ct=40;function J(t,e){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=v.reduce((a,f)=>(a[f]=bt(()=>n=!0),a),{}),c=a=>{s[a].process(r)},l=()=>{const a=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(a-r.timestamp,Ct),1),r.timestamp=a,r.isProcessing=!0,v.forEach(c),r.isProcessing=!1,n&&e&&(o=!1,t(l))},m=()=>{n=!0,o=!0,r.isProcessing||t(l)};return{schedule:v.reduce((a,f)=>{const h=s[f];return a[f]=(y,p=!1,B=!1)=>(n||m(),h.schedule(y,p,B)),a},{}),cancel:a=>v.forEach(f=>s[f].cancel(a)),state:r,steps:s}}const{schedule:vt,cancel:Me}=J(queueMicrotask,!1);function tt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const St=d.createContext({});let I=!1;function Pt(t,e,n,o,r){const{visualElement:s}=d.useContext(M),c=d.useContext(K),l=d.useContext(q),m=d.useContext(Z).reducedMotion,g=d.useRef();o=o||c.renderer,!g.current&&o&&(g.current=o(t,{visualState:e,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:m}));const u=g.current,a=d.useContext(St);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&Mt(g.current,n,r,a),d.useInsertionEffect(()=>{u&&u.update(n,l)});const f=d.useRef(!!(n[xt]&&!window.HandoffComplete));return pt(()=>{u&&(u.updateFeatures(),vt.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),d.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,I||(I=!0,queueMicrotask(Vt))))}),u}function Vt(){window.HandoffComplete=!0}function Mt(t,e,n,o){const{layoutId:r,layout:s,drag:c,dragConstraints:l,layoutScroll:m,layoutRoot:g}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:et(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!c||l&&tt(l),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}function et(t){if(t)return t.options.allowProjection!==!1?t.projection:et(t.parent)}function Tt(t,e,n){return d.useCallback(o=>{o&&t.mount&&t.mount(o),e&&(o?e.mount(o):e.unmount()),n&&(typeof n=="function"?n(o):tt(n)&&(n.current=o))},[e])}function k(t){return typeof t=="string"||Array.isArray(t)}function nt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const At=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lt=["initial",...At];function R(t){return nt(t.animate)||Lt.some(e=>k(t[e]))}function kt(t){return!!(R(t)||t.variants)}function Rt(t,e){if(R(t)){const{initial:n,animate:o}=t;return{initial:n===!1||k(n)?n:void 0,animate:k(o)?o:void 0}}return t.inherit!==!1?e:{}}function Ot(t){const{initial:e,animate:n}=Rt(t,d.useContext(M));return d.useMemo(()=>({initial:e,animate:n}),[$(e),$(n)])}function $(t){return Array.isArray(t)?t.join(" "):t}const N={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"]},P={};for(const t in N)P[t]={isEnabled:e=>N[t].some(n=>!!e[n])};function Et(t){for(const e in t)P[e]={...P[e],...t[e]}}const jt=d.createContext({}),Ft=Symbol.for("motionComponentSymbol"),O=t=>t;var Bt={};let rt=O,ot=O;Bt.NODE_ENV!=="production"&&(rt=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},ot=(t,e)=>{if(!t)throw new Error(e)});var Wt={};function Ht({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:o,Component:r}){t&&Et(t);function s(l,m){let g;const u={...d.useContext(Z),...l,layoutId:Dt(l)},{isStatic:a}=u,f=Ot(l),h=o(l,a);if(!a&&U){It(u,t);const y=$t(u);g=y.MeasureLayout,f.visualElement=Pt(r,h,u,e,y.ProjectionNode)}return H.jsxRuntimeExports.jsxs(M.Provider,{value:f,children:[g&&f.visualElement?H.jsxRuntimeExports.jsx(g,{visualElement:f.visualElement,...u}):null,n(r,l,Tt(h,f.visualElement,m),h,a,f.visualElement)]})}const c=d.forwardRef(s);return c[Ft]=r,c}function Dt({layoutId:t}){const e=d.useContext(jt).id;return e&&t!==void 0?e+"-"+t:t}function It(t,e){const n=d.useContext(K).strict;if(Wt.NODE_ENV!=="production"&&e&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?rt(!1,o):ot(!1,o)}}function $t(t){const{drag:e,layout:n}=P;if(!e&&!n)return{};const o={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Nt(t){function e(o,r={}){return Ht(t(o,r))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(o,r)=>(n.has(r)||n.set(r,e(r)),n.get(r))})}const _t=["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 st(t){return typeof t!="string"||t.includes("-")?!1:!!(_t.indexOf(t)>-1||/[A-Z]/u.test(t))}const Yt={},T=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],at=new Set(T);function it(t,{layout:e,layoutId:n}){return at.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Yt[t]||t==="opacity")}const x=t=>!!(t&&t.getVelocity),zt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gt=T.length;function Xt(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},o,r){let s="";for(let c=0;c<Gt;c++){const l=T[c];if(t[l]!==void 0){const m=zt[l]||l;s+=`${m}(${t[l]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),r?s=r(t,o?"":s):n&&o&&(s="none"),s}const Zt=t=>e=>typeof e=="string"&&e.startsWith(t),qt=Zt("--"),Ut=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Kt=(t,e,n)=>n>e?e:n<t?t:n,E={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},A={...E,transform:t=>Kt(0,1,t)},S={...E,default:1};function Qt(t){return typeof t=="string"}const j=t=>({test:e=>Qt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),w=j("deg"),L=j("%"),i=j("px"),_={...L,parse:t=>L.parse(t)/100,transform:t=>L.transform(t*100)},Y={...E,transform:Math.round},Jt={borderWidth:i,borderTopWidth:i,borderRightWidth:i,borderBottomWidth:i,borderLeftWidth:i,borderRadius:i,radius:i,borderTopLeftRadius:i,borderTopRightRadius:i,borderBottomRightRadius:i,borderBottomLeftRadius:i,width:i,maxWidth:i,height:i,maxHeight:i,size:i,top:i,right:i,bottom:i,left:i,padding:i,paddingTop:i,paddingRight:i,paddingBottom:i,paddingLeft:i,margin:i,marginTop:i,marginRight:i,marginBottom:i,marginLeft:i,rotate:w,rotateX:w,rotateY:w,rotateZ:w,scale:S,scaleX:S,scaleY:S,scaleZ:S,skew:w,skewX:w,skewY:w,distance:i,translateX:i,translateY:i,translateZ:i,x:i,y:i,z:i,perspective:i,transformPerspective:i,opacity:A,originX:_,originY:_,originZ:i,zIndex:Y,backgroundPositionX:i,backgroundPositionY:i,fillOpacity:A,strokeOpacity:A,numOctaves:Y};function ct(t,e,n,o){const{style:r,vars:s,transform:c,transformOrigin:l}=t;let m=!1,g=!1,u=!0;for(const a in e){const f=e[a];if(qt(a)){s[a]=f;continue}const h=Jt[a],y=Ut(f,h);if(at.has(a)){if(m=!0,c[a]=y,!u)continue;f!==(h.default||0)&&(u=!1)}else a.startsWith("origin")?(g=!0,l[a]=y):r[a]=y}if(e.transform||(m||o?r.transform=Xt(t.transform,n,u,o):r.transform&&(r.transform="none")),g){const{originX:a="50%",originY:f="50%",originZ:h=0}=l;r.transformOrigin=`${a} ${f} ${h}`}}const F=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ut(t,e,n){for(const o in e)!x(e[o])&&!it(o,n)&&(t[o]=e[o])}function te({transformTemplate:t},e,n){return d.useMemo(()=>{const o=F();return ct(o,e,{enableHardwareAcceleration:!n},t),Object.assign({},o.vars,o.style)},[e])}function ee(t,e,n){const o=t.style||{},r={};return ut(r,o,t),Object.assign(r,te(t,e,n)),r}function ne(t,e,n){const o={},r=ee(t,e,n);return t.drag&&t.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=r,o}const re=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 V(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||re.has(t)}let lt=t=>!V(t);function oe(t){t&&(lt=e=>e.startsWith("on")?!V(e):t(e))}try{oe(require("@emotion/is-prop-valid").default)}catch{}function se(t,e,n){const o={};for(const r in t)r==="values"&&typeof t.values=="object"||(lt(r)||n===!0&&V(r)||!e&&!V(r)||t.draggable&&r.startsWith("onDrag"))&&(o[r]=t[r]);return o}function z(t,e,n){return typeof t=="string"?t:i.transform(e+n*t)}function ae(t,e,n){const o=z(e,t.x,t.width),r=z(n,t.y,t.height);return`${o} ${r}`}const ie={offset:"stroke-dashoffset",array:"stroke-dasharray"},ce={offset:"strokeDashoffset",array:"strokeDasharray"};function ue(t,e,n=1,o=0,r=!0){t.pathLength=1;const s=r?ie:ce;t[s.offset]=i.transform(-o);const c=i.transform(e),l=i.transform(n);t[s.array]=`${c} ${l}`}function ft(t,{attrX:e,attrY:n,attrScale:o,originX:r,originY:s,pathLength:c,pathSpacing:l=1,pathOffset:m=0,...g},u,a,f){if(ct(t,g,u,f),a){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:y,dimensions:p}=t;h.transform&&(p&&(y.transform=h.transform),delete h.transform),p&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=ae(p,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),c!==void 0&&ue(h,c,l,m,!1)}const dt=()=>({...F(),attrs:{}}),mt=t=>typeof t=="string"&&t.toLowerCase()==="svg";function le(t,e,n,o){const r=d.useMemo(()=>{const s=dt();return ft(s,e,{enableHardwareAcceleration:!1},mt(o),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};ut(s,t.style,t),r.style={...s,...r.style}}return r}function fe(t=!1){return(n,o,r,{latestValues:s},c)=>{const m=(st(n)?le:ne)(o,s,c,n),g=se(o,typeof n=="string",t),u=n!==d.Fragment?{...g,...m,ref:r}:{},{children:a}=o,f=d.useMemo(()=>x(a)?a.get():a,[a]);return d.createElement(n,{...u,children:f})}}function de(t,{style:e,vars:n},o,r){Object.assign(t.style,e,r);for(const s in n)t.style.setProperty(s,n[s])}const me=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 ge(t,e,n,o){de(t,e,void 0,o);for(const r in e.attrs)t.setAttribute(me.has(r)?r:Q(r),e.attrs[r])}function gt(t,e,n){var o;const{style:r}=t,s={};for(const c in r)(x(r[c])||e.style&&x(e.style[c])||it(c,t)||((o=n==null?void 0:n.getValue(c))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[c]=r[c]);return s}function he(t,e,n){const o=gt(t,e,n);for(const r in t)if(x(t[r])||x(e[r])){const s=T.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=t[r]}return o}function G(t){return[{},{}]}function ye(t,e,n,o){if(typeof e=="function"){const[r,s]=G();e=e(t.custom,r,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,s]=G();e=e(t.custom,r,s)}return e}function pe(t){const e=d.useRef(null);return e.current===null&&(e.current=t()),e.current}const we=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue);function xe(t){const e=x(t)?t.get():t;return we(e)?e.toValue():e}function be({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},o,r,s){const c={latestValues:Ce(o,r,s,t),renderState:e()};return n&&(c.mount=l=>n(o,l,c)),c}const ht=t=>(e,n)=>{const o=d.useContext(M),r=d.useContext(q),s=()=>be(t,e,o,r);return n?s():pe(s)};function Ce(t,e,n,o){const r={},s=o(t,{});for(const f in s)r[f]=xe(s[f]);let{initial:c,animate:l}=t;const m=R(t),g=kt(t);e&&g&&!m&&t.inherit!==!1&&(c===void 0&&(c=e.initial),l===void 0&&(l=e.animate));let u=n?n.initial===!1:!1;u=u||c===!1;const a=u?l:c;return a&&typeof a!="boolean"&&!nt(a)&&(Array.isArray(a)?a:[a]).forEach(h=>{const y=ye(t,h);if(!y)return;const{transitionEnd:p,transition:B,...W}=y;for(const C in W){let b=W[C];if(Array.isArray(b)){const yt=u?b.length-1:0;b=b[yt]}b!==null&&(r[C]=b)}for(const C in p)r[C]=p[C]}),r}const{schedule:X,cancel:Te,state:Ae,steps:Le}=J(typeof requestAnimationFrame<"u"?requestAnimationFrame:O,!0),ve={useVisualState:ht({scrapeMotionValuesFromProps:he,createRenderState:dt,onMount:(t,e,{renderState:n,latestValues:o})=>{X.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),X.render(()=>{ft(n,o,{enableHardwareAcceleration:!1},mt(e.tagName),t.transformTemplate),ge(e,n)})}})},Se={useVisualState:ht({scrapeMotionValuesFromProps:gt,createRenderState:F})};function Pe(t,{forwardMotionProps:e=!1},n,o){return{...st(t)?ve:Se,preloadedFeatures:n,useRender:fe(e),createVisualElement:o,Component:t}}const Ve=Nt(Pe);exports.m=Ve;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/design-system",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"react-copy-to-clipboard": "^5.1.0",
|
|
32
32
|
"react-markdown": "^9.0.1",
|
|
33
33
|
"tailwindcss-animate": "^1.0.7",
|
|
34
|
-
"@intlayer/config": "^2.0.
|
|
35
|
-
"@intlayer/core": "^2.0.
|
|
34
|
+
"@intlayer/config": "^2.0.11",
|
|
35
|
+
"@intlayer/core": "^2.0.11"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/react": "^18.3.3",
|
package/dist/motion-BuKul-u9.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const ce=require("./jsx-runtime-D6agescH.cjs"),P=require("react"),ms=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),$t=P.createContext({}),we=P.createContext(null),Ae=typeof document<"u",Ii=Ae?P.useLayoutEffect:P.useEffect,gs=P.createContext({strict:!1}),Ce=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ni="framerAppearId",ys="data-"+Ce(Ni),Ui={skipAnimations:!1,useManualTiming:!1};class nn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function _i(t){let e=new nn,n=new nn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&i,f=h?e:n;return c&&r.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c<s;c++){const u=e.order[c];r.has(u)&&(a.schedule(u),t()),u(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Rt=["read","resolveKeyframes","update","preRender","render","postRender"],Ki=40;function vs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Rt.reduce((h,f)=>(h[f]=_i(()=>n=!0),h),{}),r=h=>{o[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,Ki),1),i.timestamp=h,i.isProcessing=!0,Rt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Rt.reduce((h,f)=>{const d=o[f];return h[f]=(p,m=!1,y=!1)=>(n||l(),d.schedule(p,m,y)),h},{}),cancel:h=>Rt.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:De,cancel:lu}=vs(queueMicrotask,!1);function lt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const xs=P.createContext({});let sn=!1;function $i(t,e,n,s,i){const{visualElement:o}=P.useContext($t),r=P.useContext(gs),a=P.useContext(we),l=P.useContext(ms).reducedMotion,c=P.useRef();s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,h=P.useContext(xs);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Gi(c.current,n,i,h),P.useInsertionEffect(()=>{u&&u.update(n,a)});const f=P.useRef(!!(n[ys]&&!window.HandoffComplete));return Ii(()=>{u&&(u.updateFeatures(),De.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),P.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,sn||(sn=!0,queueMicrotask(Wi))))}),u}function Wi(){window.HandoffComplete=!0}function Gi(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ts(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&<(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:c})}function Ts(t){if(t)return t.options.allowProjection!==!1?t.projection:Ts(t.parent)}function Hi(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function bt(t){return typeof t=="string"||Array.isArray(t)}function Wt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Me=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Re=["initial",...Me];function Gt(t){return Wt(t.animate)||Re.some(e=>bt(t[e]))}function Ps(t){return!!(Gt(t)||t.variants)}function zi(t,e){if(Gt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||bt(n)?n:void 0,animate:bt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Yi(t){const{initial:e,animate:n}=zi(t,P.useContext($t));return P.useMemo(()=>({initial:e,animate:n}),[rn(e),rn(n)])}function rn(t){return Array.isArray(t)?t.join(" "):t}const on={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"]},ft={};for(const t in on)ft[t]={isEnabled:e=>on[t].some(n=>!!e[n])};function Xi(t){for(const e in t)ft[e]={...ft[e],...t[e]}}const bs=P.createContext({}),qi=Symbol.for("motionComponentSymbol"),M=t=>t;var Zi={};let pt=M,Z=M;Zi.NODE_ENV!=="production"&&(pt=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Z=(t,e)=>{if(!t)throw new Error(e)});var Qi={};function Ji({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Xi(t);function o(a,l){let c;const u={...P.useContext(ms),...a,layoutId:tr(a)},{isStatic:h}=u,f=Yi(a),d=s(a,h);if(!h&&Ae){er(u,t);const p=nr(u);c=p.MeasureLayout,f.visualElement=$i(i,d,u,e,p.ProjectionNode)}return ce.jsxRuntimeExports.jsxs($t.Provider,{value:f,children:[c&&f.visualElement?ce.jsxRuntimeExports.jsx(c,{visualElement:f.visualElement,...u}):null,n(i,a,Hi(d,f.visualElement,l),d,h,f.visualElement)]})}const r=P.forwardRef(o);return r[qi]=i,r}function tr({layoutId:t}){const e=P.useContext(bs).id;return e&&t!==void 0?e+"-"+t:t}function er(t,e){const n=P.useContext(gs).strict;if(Qi.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?pt(!1,s):Z(!1,s)}}function nr(t){const{drag:e,layout:n}=ft;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function sr(t){function e(s,i={}){return Ji(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const ir=["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 Ee(t){return typeof t!="string"||t.includes("-")?!1:!!(ir.indexOf(t)>-1||/[A-Z]/u.test(t))}const Ot={};function rr(t){Object.assign(Ot,t)}const At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(At);function Ss(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ot[t]||t==="opacity")}const L=t=>!!(t&&t.getVelocity),or={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ar=At.length;function lr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<ar;r++){const a=At[r];if(t[a]!==void 0){const l=or[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const Vs=t=>e=>typeof e=="string"&&e.startsWith(t),ws=Vs("--"),ur=Vs("var(--"),Le=t=>ur(t)?cr.test(t.split("/*")[0].trim()):!1,cr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,hr=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Q=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},vt={...mt,transform:t=>Q(0,1,t)},Et={...mt,default:1},xt=t=>Math.round(t*1e5)/1e5,Fe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,fr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,dr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ct(t){return typeof t=="string"}const Dt=t=>({test:e=>Ct(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=Dt("deg"),N=Dt("%"),x=Dt("px"),pr=Dt("vh"),mr=Dt("vw"),an={...N,parse:t=>N.parse(t)/100,transform:t=>N.transform(t*100)},ln={...mt,transform:Math.round},As={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,size:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:Y,skewX:Y,skewY:Y,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:vt,originX:an,originY:an,originZ:x,zIndex:ln,backgroundPositionX:x,backgroundPositionY:x,fillOpacity:vt,strokeOpacity:vt,numOctaves:ln};function Be(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const f=e[h];if(ws(h)){o[h]=f;continue}const d=As[h],p=hr(f,d);if(ot.has(h)){if(l=!0,r[h]=p,!u)continue;f!==(d.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=p):i[h]=p}if(e.transform||(l||s?i.transform=lr(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const ke=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cs(t,e,n){for(const s in e)!L(e[s])&&!Ss(s,n)&&(t[s]=e[s])}function gr({transformTemplate:t},e,n){return P.useMemo(()=>{const s=ke();return Be(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function yr(t,e,n){const s=t.style||{},i={};return Cs(i,s,t),Object.assign(i,gr(t,e,n)),i}function vr(t,e,n){const s={},i=yr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const xr=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 jt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||xr.has(t)}let Ds=t=>!jt(t);function Tr(t){t&&(Ds=e=>e.startsWith("on")?!jt(e):t(e))}try{Tr(require("@emotion/is-prop-valid").default)}catch{}function Pr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ds(i)||n===!0&&jt(i)||!e&&!jt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function un(t,e,n){return typeof t=="string"?t:x.transform(e+n*t)}function br(t,e,n){const s=un(e,t.x,t.width),i=un(n,t.y,t.height);return`${s} ${i}`}const Sr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vr={offset:"strokeDashoffset",array:"strokeDasharray"};function wr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Sr:Vr;t[o.offset]=x.transform(-s);const r=x.transform(e),a=x.transform(n);t[o.array]=`${r} ${a}`}function Oe(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,f){if(Be(t,c,u,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=br(m,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&wr(d,r,a,l,!1)}const Ms=()=>({...ke(),attrs:{}}),je=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ar(t,e,n,s){const i=P.useMemo(()=>{const o=Ms();return Oe(o,e,{enableHardwareAcceleration:!1},je(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Cs(o,t.style,t),i.style={...o,...i.style}}return i}function Cr(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(Ee(n)?Ar:vr)(s,o,r,n),c=Pr(s,typeof n=="string",t),u=n!==P.Fragment?{...c,...l,ref:i}:{},{children:h}=s,f=P.useMemo(()=>L(h)?h.get():h,[h]);return P.createElement(n,{...u,children:f})}}function Rs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Es=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 Ls(t,e,n,s){Rs(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Es.has(i)?i:Ce(i),e.attrs[i])}function Ie(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(L(i[r])||e.style&&L(e.style[r])||Ss(r,t)||((s=n==null?void 0:n.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function Fs(t,e,n){const s=Ie(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const o=At.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function cn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ne(t,e,n,s){if(typeof e=="function"){const[i,o]=cn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=cn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Dr(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const he=t=>Array.isArray(t),Mr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Rr=t=>he(t)?t[t.length-1]||0:t;function Ft(t){const e=L(t)?t.get():t;return Mr(e)?e.toValue():e}function Er({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Lr(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Bs=t=>(e,n)=>{const s=P.useContext($t),i=P.useContext(we),o=()=>Er(t,e,s,i);return n?o():Dr(o)};function Lr(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Ft(o[f]);let{initial:r,animate:a}=t;const l=Gt(t),c=Ps(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!Wt(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const p=Ne(t,d);if(!p)return;const{transitionEnd:m,transition:y,...v}=p;for(const T in v){let g=v[T];if(Array.isArray(g)){const b=u?g.length-1:0;g=g[b]}g!==null&&(i[T]=g)}for(const T in m)i[T]=m[T]}),i}const{schedule:w,cancel:H,state:D,steps:Zt}=vs(typeof requestAnimationFrame<"u"?requestAnimationFrame:M,!0),Fr={useVisualState:Bs({scrapeMotionValuesFromProps:Fs,createRenderState:Ms,onMount:(t,e,{renderState:n,latestValues:s})=>{w.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),w.render(()=>{Oe(n,s,{enableHardwareAcceleration:!1},je(e.tagName),t.transformTemplate),Ls(e,n)})}})},Br={useVisualState:Bs({scrapeMotionValuesFromProps:Ie,createRenderState:ke})};function kr(t,{forwardMotionProps:e=!1},n,s){return{...Ee(t)?Fr:Br,preloadedFeatures:n,useRender:Cr(e),createVisualElement:s,Component:t}}function _(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const ks=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ht(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Or=t=>e=>ks(e)&&t(e,Ht(e));function K(t,e,n,s){return _(t,e,Or(n),s)}const jr=(t,e)=>n=>e(t(n)),$=(...t)=>t.reduce(jr);function Os(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const hn=Os("dragHorizontal"),fn=Os("dragVertical");function js(t){let e=!1;if(t==="y")e=fn();else if(t==="x")e=hn();else{const n=hn(),s=fn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Is(){const t=js(!0);return t?(t(),!1):!0}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function dn(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||Is())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&w.postRender(()=>l(o,r))};return K(t.current,n,i,{passive:!t.getProps()[s]})}class Ir extends tt{mount(){this.unmount=$(dn(this.node,!0),dn(this.node,!1))}unmount(){}}class Nr extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$(_(this.node.current,"focus",()=>this.onFocus()),_(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ns=(t,e)=>e?t===e?!0:Ns(t,e.parentElement):!1;function Qt(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ht(n))}class Ur extends tt{constructor(){super(...arguments),this.removeStartListeners=M,this.removeEndListeners=M,this.removeAccessibleListeners=M,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=K(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:h}=this.node.getProps(),f=!h&&!Ns(this.node.current,a.target)?u:c;f&&w.update(()=>f(a,l))},{passive:!(s.onTap||s.onPointerUp)}),r=K(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=$(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Qt("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&w.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=_(this.node.current,"keyup",r),Qt("down",(a,l)=>{this.startPress(a,l)})},n=_(this.node.current,"keydown",e),s=()=>{this.isPressing&&Qt("cancel",(o,r)=>this.cancelPress(o,r))},i=_(this.node.current,"blur",s);this.removeAccessibleListeners=$(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&w.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Is()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&w.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=K(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=_(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=$(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const fe=new WeakMap,Jt=new WeakMap,_r=t=>{const e=fe.get(t.target);e&&e(t)},Kr=t=>{t.forEach(_r)};function $r({root:t,...e}){const n=t||document;Jt.has(n)||Jt.set(n,{});const s=Jt.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Kr,{root:t,...e})),s[i]}function Wr(t,e,n){const s=$r(e);return fe.set(t,n),s.observe(t),()=>{fe.delete(t),s.unobserve(t)}}const Gr={some:0,all:1};class Hr extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Gr[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return Wr(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(zr(e,n))&&this.startObserver()}unmount(){}}function zr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Yr={inView:{Feature:Hr},tap:{Feature:Ur},focus:{Feature:Nr},hover:{Feature:Ir}};function Us(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function zt(t,e,n){const s=t.getProps();return Ne(s,e,n!==void 0?n:s.custom,t)}const W=t=>t*1e3,G=t=>t/1e3,Xr={type:"spring",stiffness:500,damping:25,restSpeed:10},qr=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Zr={type:"keyframes",duration:.8},Qr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jr=(t,{keyframes:e})=>e.length>2?Zr:ot.has(t)?t.startsWith("scale")?qr(e[1]):Xr:Qr;function to({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Ue(t,e){return t[e]||t.default||t}const eo=t=>t!==null;function Yt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(eo),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Bt;function no(){Bt=void 0}const q={now:()=>(Bt===void 0&&q.set(D.isProcessing||Ui.useManualTiming?D.timestamp:performance.now()),Bt),set:t=>{Bt=t,queueMicrotask(no)}},_s=t=>/^0[^.\s]+$/u.test(t);function so(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||_s(t):!0}const Ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),io=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ro(t){const e=io.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const oo=4;function $s(t,e,n=1){Z(n<=oo,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=ro(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ks(r)?parseFloat(r):r}return Le(i)?$s(i,e,n+1):i}const ao=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),pn=t=>t===mt||t===x,mn=(t,e)=>parseFloat(t.split(", ")[e]),gn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return mn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?mn(o[1],t):0}},lo=new Set(["x","y","z"]),uo=At.filter(t=>!lo.has(t));function co(t){const e=[];return uo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const dt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:gn(4,13),y:gn(5,14)};dt.translateX=dt.x;dt.translateY=dt.y;const Ws=t=>e=>e.test(t),ho={test:t=>t==="auto",parse:t=>t},Gs=[mt,x,N,Y,mr,pr,ho],yn=t=>Gs.find(Ws(t)),rt=new Set;let de=!1,pe=!1;function Hs(){if(pe){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=co(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}pe=!1,de=!1,rt.forEach(t=>t.complete()),rt.clear()}function zs(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(pe=!0)})}function fo(){zs(),Hs()}class _e{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rt.add(this),de||(de=!0,w.read(zs),w.resolveKeyframes(Hs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ke=(t,e)=>n=>!!(Ct(n)&&dr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ys=(t,e,n)=>s=>{if(!Ct(s))return s;const[i,o,r,a]=s.match(Fe);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},po=t=>Q(0,255,t),te={...mt,transform:t=>Math.round(po(t))},it={test:Ke("rgb","red"),parse:Ys("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+te.transform(t)+", "+te.transform(e)+", "+te.transform(n)+", "+xt(vt.transform(s))+")"};function mo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const me={test:Ke("#"),parse:mo,transform:it.transform},ut={test:Ke("hsl","hue"),parse:Ys("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+N.transform(xt(e))+", "+N.transform(xt(n))+", "+xt(vt.transform(s))+")"},E={test:t=>it.test(t)||me.test(t)||ut.test(t),parse:t=>it.test(t)?it.parse(t):ut.test(t)?ut.parse(t):me.parse(t),transform:t=>Ct(t)?t:t.hasOwnProperty("red")?it.transform(t):ut.transform(t)};function go(t){var e,n;return isNaN(t)&&Ct(t)&&(((e=t.match(Fe))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(fr))===null||n===void 0?void 0:n.length)||0)>0}const Xs="number",qs="color",yo="var",vo="var(",vn="${}",xo=/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 St(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(xo,l=>(E.test(l)?(s.color.push(o),i.push(qs),n.push(E.parse(l))):l.startsWith(vo)?(s.var.push(o),i.push(yo),n.push(l)):(s.number.push(o),i.push(Xs),n.push(parseFloat(l))),++o,vn)).split(vn);return{values:n,split:a,indexes:s,types:i}}function Zs(t){return St(t).values}function Qs(t){const{split:e,types:n}=St(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Xs?o+=xt(i[r]):a===qs?o+=E.transform(i[r]):o+=i[r]}return o}}const To=t=>typeof t=="number"?0:t;function Po(t){const e=Zs(t);return Qs(t)(e.map(To))}const J={test:go,parse:Zs,createTransformer:Qs,getAnimatableNone:Po},bo=new Set(["brightness","contrast","saturate","opacity"]);function So(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Fe)||[];if(!s)return t;const i=n.replace(s,"");let o=bo.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Vo=/\b([a-z-]*)\(.*?\)/gu,ge={...J,getAnimatableNone:t=>{const e=t.match(Vo);return e?e.map(So).join(" "):t}},wo={...As,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:ge,WebkitFilter:ge},$e=t=>wo[t];function Js(t,e){let n=$e(t);return n!==ge&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ao=new Set(["auto","none","0"]);function Co(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Ao.has(o)&&St(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Js(n,i)}class ti extends _e{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Le(c))){const u=$s(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ao.has(s)||e.length!==2)return;const[i,o]=e,r=yn(i),a=yn(o);if(r!==a)if(pn(r)&&pn(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)so(e[i])&&s.push(i);s.length&&Co(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=dt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function ei(t){let e;return()=>(e===void 0&&(e=t()),e)}const xn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function Do(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Mo(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=xn(i,e),a=xn(o,e);return pt(r===a,`You are trying to animate ${e} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!r||!a?!1:Do(t)||n==="spring"&&s}class ni{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&fo(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Mo(e,s,i,o))if(r)this.options.duration=0;else{l==null||l(Yt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function si(t,e){return e?t*(1e3/e):0}const Ro=5;function ii(t,e,n){const s=Math.max(e-Ro,0);return si(n-t(s),e-s)}const ee=.001,Eo=.01,Tn=10,Lo=.05,Fo=1;function Bo({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;pt(t<=W(Tn),"Spring duration must be 10 seconds or less");let r=1-e;r=Q(Lo,Fo,r),t=Q(Eo,Tn,G(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=ye(c,r),p=Math.exp(-h);return ee-f/d*p},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=ye(Math.pow(c,2),r);return(-i(c)+ee>0?-1:1)*((f-d)*p)/m}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ee+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Oo(i,o,a);if(t=W(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const ko=12;function Oo(t,e,n){let s=n;for(let i=1;i<ko;i++)s=s-t(s)/e(s);return s}function ye(t,e){return t*Math.sqrt(1-e*e)}const jo=["duration","bounce"],Io=["stiffness","damping","mass"];function Pn(t,e){return e.some(n=>t[n]!==void 0)}function No(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Pn(t,Io)&&Pn(t,jo)){const n=Bo(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function ri({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:h,isResolvedFromDuration:f}=No({...s,velocity:-G(s.velocity||0)}),d=h||0,p=l/(2*Math.sqrt(a*c)),m=o-i,y=G(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let T;if(p<1){const g=ye(y,p);T=b=>{const V=Math.exp(-p*y*b);return o-V*((d+p*y*m)/g*Math.sin(g*b)+m*Math.cos(g*b))}}else if(p===1)T=g=>o-Math.exp(-y*g)*(m+(d+y*m)*g);else{const g=y*Math.sqrt(p*p-1);T=b=>{const V=Math.exp(-p*y*b),R=Math.min(g*b,300);return o-V*((d+p*y*m)*Math.sinh(R)+g*m*Math.cosh(R))/g}}return{calculatedDuration:f&&u||null,next:g=>{const b=T(g);if(f)r.done=g>=u;else{let V=d;g!==0&&(p<1?V=ii(T,g,b):V=0);const R=Math.abs(V)<=n,z=Math.abs(o-b)<=e;r.done=R&&z}return r.value=r.done?o:b,r}}}function bn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=S=>a!==void 0&&S<a||l!==void 0&&S>l,p=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let m=n*e;const y=h+m,v=r===void 0?y:r(y);v!==y&&(m=v-h);const T=S=>-m*Math.exp(-S/s),g=S=>v+T(S),b=S=>{const k=T(S),O=g(S);f.done=Math.abs(k)<=c,f.value=f.done?v:O};let V,R;const z=S=>{d(f.value)&&(V=S,R=ri({keyframes:[f.value,p(f.value)],velocity:ii(g,S,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return z(0),{calculatedDuration:null,next:S=>{let k=!1;return!R&&V===void 0&&(k=!0,b(S),z(S)),V!==void 0&&S>=V?R.next(S-V):(!k&&b(S),f)}}}const oi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Uo=1e-7,_o=12;function Ko(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=oi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Uo&&++a<_o);return r}function Mt(t,e,n,s){if(t===e&&n===s)return M;const i=o=>Ko(o,0,1,t,n);return o=>o===0||o===1?o:oi(i(o),e,s)}const $o=Mt(.42,0,1,1),Wo=Mt(0,0,.58,1),ai=Mt(.42,0,.58,1),Go=t=>Array.isArray(t)&&typeof t[0]!="number",li=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ui=t=>e=>1-t(1-e),We=t=>1-Math.sin(Math.acos(t)),ci=ui(We),Ho=li(We),hi=Mt(.33,1.53,.69,.99),Ge=ui(hi),zo=li(Ge),Yo=t=>(t*=2)<1?.5*Ge(t):.5*(2-Math.pow(2,-10*(t-1))),Sn={linear:M,easeIn:$o,easeInOut:ai,easeOut:Wo,circIn:We,circInOut:Ho,circOut:ci,backIn:Ge,backInOut:zo,backOut:hi,anticipate:Yo},Vn=t=>{if(Array.isArray(t)){Z(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return Mt(e,n,s,i)}else if(typeof t=="string")return Z(Sn[t]!==void 0,`Invalid easing type '${t}'`),Sn[t];return t},Vt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},A=(t,e,n)=>t+(e-t)*n;function ne(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Xo({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ne(l,a,t+1/3),o=ne(l,a,t),r=ne(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function It(t,e){return n=>n>0?e:t}const se=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},qo=[me,it,ut],Zo=t=>qo.find(e=>e.test(t));function wn(t){const e=Zo(t);if(pt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===ut&&(n=Xo(n)),n}const An=(t,e)=>{const n=wn(t),s=wn(e);if(!n||!s)return It(t,e);const i={...n};return o=>(i.red=se(n.red,s.red,o),i.green=se(n.green,s.green,o),i.blue=se(n.blue,s.blue,o),i.alpha=A(n.alpha,s.alpha,o),it.transform(i))},ve=new Set(["none","hidden"]);function Qo(t,e){return ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Jo(t,e){return n=>A(t,e,n)}function He(t){return typeof t=="number"?Jo:typeof t=="string"?Le(t)?It:E.test(t)?An:na:Array.isArray(t)?fi:typeof t=="object"?E.test(t)?An:ta:It}function fi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>He(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function ta(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=He(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function ea(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=l,i[r]++}return s}const na=(t,e)=>{const n=J.createTransformer(e),s=St(t),i=St(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ve.has(t)&&!i.values.length||ve.has(e)&&!s.values.length?Qo(t,e):$(fi(ea(s,i),i.values),n):(pt(!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.`),It(t,e))};function di(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?A(t,e,n):He(t)(t,e)}function sa(t,e,n){const s=[],i=n||di,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||M:e;a=$(l,a)}s.push(a)}return s}function ia(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Z(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=sa(e,s,i),a=r.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const h=Vt(t[u],t[u+1],c);return r[u](h)};return n?c=>l(Q(t[0],t[o-1],c)):l}function ra(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Vt(0,e,s);t.push(A(n,1,i))}}function oa(t){const e=[0];return ra(e,t.length-1),e}function aa(t,e){return t.map(n=>n*e)}function la(t,e){return t.map(()=>e||ai).splice(0,t.length-1)}function Nt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Go(s)?s.map(Vn):Vn(s),o={done:!1,value:e[0]},r=aa(n&&n.length===e.length?n:oa(e),t),a=ia(r,e,{ease:Array.isArray(i)?i:la(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Cn=2e4;function ua(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Cn;)e+=n,s=t.next(e);return e>=Cn?1/0:e}const ca=t=>{const e=({timestamp:n})=>t(n);return{start:()=>w.update(e,!0),stop:()=>H(e),now:()=>D.isProcessing?D.timestamp:q.now()}};var ha={};const fa={decay:bn,inertia:bn,tween:Nt,keyframes:Nt,spring:ri},da=t=>t/100;class ze extends ni{constructor({KeyframeResolver:e=_e,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",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:s,motionValue:i,keyframes:o}=this.options,r=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=fa[n]||Nt;let l,c;a!==Nt&&typeof e[0]!="number"&&(ha.NODE_ENV!=="production"&&Z(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=$(da,di(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=ua(u));const{calculatedDuration:h}=u,f=h+i,d=f*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,b=o;if(d){const S=Math.min(this.currentTime,u)/h;let k=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/h)):p==="mirror"&&(b=r)),g=Q(0,1,O)*h}const V=T?{done:!1,value:l[0]}:b.next(g);a&&(V.value=a(V.value));let{done:R}=V;!T&&c!==null&&(R=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return z&&i!==void 0&&(V.value=Yt(l,this.options,i)),y&&y(V.value),z&&this.finish(),V}get duration(){const{resolved:e}=this;return e?G(e.calculatedDuration):0}get time(){return G(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(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:e=ca,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}}const pi=t=>Array.isArray(t)&&typeof t[0]=="number";function mi(t){return!!(!t||typeof t=="string"&&t in Ye||pi(t)||Array.isArray(t)&&t.every(mi))}const yt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ye={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function pa(t){return gi(t)||Ye.easeOut}function gi(t){if(t)return pi(t)?yt(t):Array.isArray(t)?t.map(pa):Ye[t]}function ma(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=gi(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const ga=ei(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ya=new Set(["opacity","clipPath","filter","transform"]),Ut=10,va=2e4;function xa(t){return t.type==="spring"||t.name==="backgroundColor"||!mi(t.ease)}function Ta(t,e){const n=new ze({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<va;)s=n.sample(o),i.push(s.value),o+=Ut;return{times:void 0,keyframes:i,duration:o-Ut,ease:"linear"}}class Dn extends ni{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new ti(i,(o,r)=>this.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:l,name:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(xa(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,...p}=this.options,m=Ta(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),i=m.duration,o=m.times,r=m.ease,a="keyframes"}const u=ma(l.owner.current,c,e,{...this.options,duration:i,times:o,ease:r});return u.startTime=q.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;l.set(Yt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return G(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return G(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=W(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return M;const{animation:s}=n;s.timeline=e,s.onfinish=null}return M}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...h}=this.options,f=new ze({...h,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),d=W(this.time);l.setWithVelocity(f.sample(d-Ut).value,f.sample(d).value,Ut)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return ga()&&s&&ya.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}function Pa(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return w.update(s,!0),()=>H(s)}const ba=ei(()=>window.ScrollTimeline!==void 0);class Sa{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>{if(ba()&&s.attachTimeline)s.attachTimeline(e);else return s.pause(),Pa(i=>{s.time=s.duration*i},e)});return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Xe=(t,e,n,s={},i,o)=>r=>{const a=Ue(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-W(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};to(a)||(u={...u,...Jr(t,u)}),u.duration&&(u.duration=W(u.duration)),u.repeatDelay&&(u.repeatDelay=W(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const f=Yt(u.keyframes,a);if(f!==void 0)return w.update(()=>{u.onUpdate(f),u.onComplete()}),new Sa([])}return!o&&Dn.supports(u)?new Dn(u):new ze(u)};function _t(t){return!!(L(t)&&t.add)}function qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Ze(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Qe{constructor(){this.subscriptions=[]}add(e){return qe(this.subscriptions,e),()=>Ze(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Mn=new Set;function Je(t,e,n){t||Mn.has(e)||(console.warn(e),Mn.add(e))}var Va={};const Rn=30,wa=t=>!isNaN(parseFloat(t));class Aa{constructor(e,n={}){this.version="11.2.12",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=q.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=wa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return Va.NODE_ENV!=="production"&&Je(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Qe);const s=this.events[e].add(n);return e==="change"?()=>{s(),w.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Rn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Rn);return si(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wt(t,e){return new Aa(t,e)}function Ca(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,wt(n))}function Da(t,e){const n=zt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Rr(o[r]);Ca(t,r,a)}}function yi(t){return t.getProps()[ys]}function Ma({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function vi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");s&&(r=s);const u=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in l){const d=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),p=l[f];if(p===void 0||h&&Ma(h,f))continue;const m={delay:n,elapsed:0,...Ue(r||{},f)};let y=!1;if(window.HandoffAppearAnimations){const T=yi(t);if(T){const g=window.HandoffAppearAnimations(T,f,d,w);g!==null&&(m.elapsed=g,y=!0)}}d.start(Xe(f,d,p,t.shouldReduceMotion&&ot.has(f)?{type:!1}:m,t,y));const v=d.animation;v&&(_t(c)&&(c.add(f),v.then(()=>c.remove(f))),u.push(v))}return a&&Promise.all(u).then(()=>{w.update(()=>{a&&Da(t,a)})}),u}function xe(t,e,n={}){var s;const i=zt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(vi(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=o;return Ra(t,e,u+c,h,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[r,a]:[a,r];return c().then(()=>u())}else return Promise.all([r(),a(n.delay)])}function Ra(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(Ea).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(xe(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function Ea(t,e){return t.sortNodePosition(e)}function La(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>xe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=xe(t,e,n);else{const i=typeof e=="function"?zt(t,e,n.custom):e;s=Promise.all(vi(t,i,n))}return s.then(()=>{w.postRender(()=>{t.notify("AnimationComplete",e)})})}const Fa=[...Me].reverse(),Ba=Me.length;function ka(t){return e=>Promise.all(e.map(({animation:n,options:s})=>La(t,n,s)))}function Oa(t){let e=ka(t),n=En(),s=!0;const i=l=>(c,u)=>{var h;const f=zt(t,u,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function o(l){e=l(t)}function r(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<Ba;y++){const v=Fa[y],T=n[v],g=c[v]!==void 0?c[v]:u[v],b=bt(g),V=v===l?T.isActive:null;V===!1&&(p=y);let R=g===u[v]&&g!==c[v]&&b;if(R&&s&&t.manuallyAnimateOnMount&&(R=!1),T.protectedKeys={...d},!T.isActive&&V===null||!g&&!T.prevProp||Wt(g)||typeof g=="boolean")continue;let S=ja(T.prevProp,g)||v===l&&T.isActive&&!R&&b||y>p&&b,k=!1;const O=Array.isArray(g)?g:[g];let at=O.reduce(i(v),{});V===!1&&(at={});const{prevResolvedValues:tn={}}=T,ji={...tn,...at},en=F=>{S=!0,f.has(F)&&(k=!0,f.delete(F)),T.needsAnimating[F]=!0;const U=t.getValue(F);U&&(U.liveStyle=!1)};for(const F in ji){const U=at[F],Xt=tn[F];if(d.hasOwnProperty(F))continue;let qt=!1;he(U)&&he(Xt)?qt=!Us(U,Xt):qt=U!==Xt,qt?U!=null?en(F):f.add(F):U!==void 0&&f.has(F)?en(F):T.protectedKeys[F]=!0}T.prevProp=g,T.prevResolvedValues=at,T.isActive&&(d={...d,...at}),s&&t.blockInitialAnimation&&(S=!1),S&&(!R||k)&&h.push(...O.map(F=>({animation:F,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const T=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=T??null}),h.push({animation:y})}let m=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const h=r(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=En(),s=!0}}}function ja(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Us(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function En(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class Ia extends tt{constructor(e){super(e),e.animationState||(e.animationState=Oa(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Wt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Na=0;class Ua extends tt{constructor(){super(...arguments),this.id=Na++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const _a={animation:{Feature:Ia},exit:{Feature:Ua}},Ln=(t,e)=>Math.abs(t-e);function Ka(t,e){const n=Ln(t.x,e.x),s=Ln(t.y,e.y);return Math.sqrt(n**2+s**2)}class xi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!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 h=re(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Ka(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:m}=D;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ie(f,this.transformPagePoint),w.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=re(h.type==="pointercancel"?this.lastMoveEventInfo:ie(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!ks(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=Ht(e),a=ie(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=D;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,re(a,this.history)),this.removeListeners=$(K(this.contextWindow,"pointermove",this.handlePointerMove),K(this.contextWindow,"pointerup",this.handlePointerUp),K(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),H(this.updatePoint)}}function ie(t,e){return e?{point:e(t.point)}:t}function Fn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function re({point:t},e){return{point:t,delta:Fn(t,Ti(e)),offset:Fn(t,$a(e)),velocity:Wa(e,.1)}}function $a(t){return t[0]}function Ti(t){return t[t.length-1]}function Wa(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ti(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};const o=G(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function B(t){return t.max-t.min}function Te(t,e=0,n=.01){return Math.abs(t-e)<=n}function Bn(t,e,n,s=.5){t.origin=s,t.originPoint=A(e.min,e.max,t.origin),t.scale=B(n)/B(e),(Te(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=A(n.min,n.max,t.origin)-t.originPoint,(Te(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Tt(t,e,n,s){Bn(t.x,e.x,n.x,s?s.originX:void 0),Bn(t.y,e.y,n.y,s?s.originY:void 0)}function kn(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function Ga(t,e,n){kn(t.x,e.x,n.x),kn(t.y,e.y,n.y)}function On(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function Pt(t,e,n){On(t.x,e.x,n.x),On(t.y,e.y,n.y)}function Ha(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?A(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?A(n,t,s.max):Math.min(t,n)),t}function jn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function za(t,{top:e,left:n,bottom:s,right:i}){return{x:jn(t.x,n,i),y:jn(t.y,e,s)}}function In(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Ya(t,e){return{x:In(t.x,e.x),y:In(t.y,e.y)}}function Xa(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=Vt(e.min,e.max-s,t.min):s>i&&(n=Vt(t.min,t.max-i,e.min)),Q(0,1,n)}function qa(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Pe=.35;function Za(t=Pe){return t===!1?t=0:t===!0&&(t=Pe),{x:Nn(t,"left","right"),y:Nn(t,"top","bottom")}}function Nn(t,e,n){return{min:Un(t,e),max:Un(t,n)}}function Un(t,e){return typeof t=="number"?t:t[e]||0}const _n=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:_n(),y:_n()}),Kn=()=>({min:0,max:0}),C=()=>({x:Kn(),y:Kn()});function I(t){return[t("x"),t("y")]}function Pi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Qa({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ja(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function oe(t){return t===void 0||t===1}function be({scale:t,scaleX:e,scaleY:n}){return!oe(t)||!oe(e)||!oe(n)}function nt(t){return be(t)||bi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function bi(t){return $n(t.x)||$n(t.y)}function $n(t){return t&&t!=="0%"}function Kt(t,e,n){const s=t-n,i=e*s;return n+i}function Wn(t,e,n,s,i){return i!==void 0&&(t=Kt(t,i,s)),Kt(t,n,s)+e}function Se(t,e=0,n=1,s,i){t.min=Wn(t.min,e,n,s,i),t.max=Wn(t.max,e,n,s,i)}function Si(t,{x:e,y:n}){Se(t.x,e.translate,e.scale,e.originPoint),Se(t.y,n.translate,n.scale,n.originPoint)}function tl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ht(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Si(t,r)),s&&nt(o.latestValues)&&ht(t,o.latestValues))}e.x=Gn(e.x),e.y=Gn(e.y)}function Gn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function X(t,e){t.min=t.min+e,t.max=t.max+e}function Hn(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=A(t.min,t.max,o);Se(t,e[n],e[s],r,e.scale)}const el=["x","scaleX","originX"],nl=["y","scaleY","originY"];function ht(t,e){Hn(t.x,e,el),Hn(t.y,e,nl)}function Vi(t,e){return Pi(Ja(t.getBoundingClientRect(),e))}function sl(t,e,n){const s=Vi(t,n),{scroll:i}=e;return i&&(X(s.x,i.offset.x),X(s.y,i.offset.y)),s}const wi=({current:t})=>t?t.ownerDocument.defaultView:null,il=new WeakMap;class rl{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ht(u,"page").point)},o=(u,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=js(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let v=this.getAxisMotionValue(y).get()||0;if(N.test(v)){const{projection:T}=this.visualElement;if(T&&T.layout){const g=T.layout.layoutBox[y];g&&(v=B(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&w.postRender(()=>p(u,h));const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=ol(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),m&&m(u,h)},a=(u,h)=>this.stop(u,h),l=()=>I(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new xi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:wi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&w.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Lt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Ha(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&<(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=za(i.layoutBox,n):this.constraints=!1,this.elastic=Za(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=qa(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current;Z(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=sl(s,i.root,this.visualElement.getTransformPagePoint());let r=Ya(i.layout.layoutBox,o);if(n){const a=n(Qa(r));this.hasMutatedConstraints=!!a,a&&(r=Pi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=I(u=>{if(!Lt(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Xe(e,s,0,n,this.visualElement))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){I(n=>{const{drag:s}=this.getProps();if(!Lt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-A(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Xa({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(r=>{if(!Lt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(A(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;il.set(this.visualElement,this);const e=this.visualElement.current,n=K(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),w.read(s);const r=_(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(I(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Pe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Lt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ol(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class al extends tt{constructor(e){super(e),this.removeGroupControls=M,this.removeListeners=M,this.controls=new rl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||M}unmount(){this.removeGroupControls(),this.removeListeners()}}const zn=t=>(e,n)=>{t&&w.postRender(()=>t(e,n))};class ll extends tt{constructor(){super(...arguments),this.removePointerDownListener=M}onPointerDown(e){this.session=new xi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:zn(e),onStart:zn(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&w.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=K(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ul(){const t=P.useContext(we);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=Yn(t,e.target.x),s=Yn(t,e.target.y);return`${n}% ${s}%`}},cl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const o=J.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=A(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class hl extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;rr(fl),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||w.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),De.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ai(t){const[e,n]=ul(),s=P.useContext(bs);return ce.jsxRuntimeExports.jsx(hl,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(xs),isPresent:e,safeToRemove:n})}const fl={borderRadius:{...gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomLeftRadius:gt,borderBottomRightRadius:gt,boxShadow:cl},Ci=["TopLeft","TopRight","BottomLeft","BottomRight"],dl=Ci.length,Xn=t=>typeof t=="string"?parseFloat(t):t,qn=t=>typeof t=="number"||x.test(t);function pl(t,e,n,s,i,o){i?(t.opacity=A(0,n.opacity!==void 0?n.opacity:1,ml(s)),t.opacityExit=A(e.opacity!==void 0?e.opacity:1,0,gl(s))):o&&(t.opacity=A(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<dl;r++){const a=`border${Ci[r]}Radius`;let l=Zn(e,a),c=Zn(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||qn(l)===qn(c)?(t[a]=Math.max(A(Xn(l),Xn(c),s),0),(N.test(c)||N.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=A(e.rotate||0,n.rotate||0,s))}function Zn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const ml=Di(0,.5,ci),gl=Di(.5,.95,M);function Di(t,e,n){return s=>s<t?0:s>e?1:n(Vt(t,e,s))}function Qn(t,e){t.min=e.min,t.max=e.max}function j(t,e){Qn(t.x,e.x),Qn(t.y,e.y)}function Jn(t,e,n,s,i){return t-=e,t=Kt(t,1/n,s),i!==void 0&&(t=Kt(t,1/i,s)),t}function yl(t,e=0,n=1,s=.5,i,o=t,r=t){if(N.test(e)&&(e=parseFloat(e),e=A(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=A(o.min,o.max,s);t===o&&(a-=e),t.min=Jn(t.min,e,n,a,i),t.max=Jn(t.max,e,n,a,i)}function ts(t,e,[n,s,i],o,r){yl(t,e[n],e[s],e[i],e.scale,o,r)}const vl=["x","scaleX","originX"],xl=["y","scaleY","originY"];function es(t,e,n,s){ts(t.x,e,vl,n?n.x:void 0,s?s.x:void 0),ts(t.y,e,xl,n?n.y:void 0,s?s.y:void 0)}function ns(t){return t.translate===0&&t.scale===1}function Mi(t){return ns(t.x)&&ns(t.y)}function Tl(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ri(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function ss(t){return B(t.x)/B(t.y)}class Pl{constructor(){this.members=[]}add(e){qe(this.members,e),e.scheduleRender()}remove(e){if(Ze(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function is(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const bl=(t,e)=>t.depth-e.depth;class Sl{constructor(){this.children=[],this.isDirty=!1}add(e){qe(this.children,e),this.isDirty=!0}remove(e){Ze(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bl),this.isDirty=!1,this.children.forEach(e)}}function Vl(t,e){const n=q.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(H(s),t(o-e))};return w.read(s,!0),()=>H(s)}function wl(t){window.MotionDebug&&window.MotionDebug.record(t)}function Al(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Cl(t,e,n){const s=L(t)?t:wt(t);return s.start(Xe("",s,e,n)),s.animation}const ae=["","X","Y","Z"],Dl={visibility:"hidden"},rs=1e3;let Ml=0;const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function le(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Ei(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?yi(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Ei(t.parent):!1:!1}function Li({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Ml++,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,st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0,this.nodes.forEach(Ll),this.nodes.forEach(jl),this.nodes.forEach(Il),this.nodes.forEach(Fl),wl(st)},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 Sl)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Qe),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=Al(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Vl(f,250),kt.hasAnimatedSinceResize&&(kt.hasAnimatedSinceResize=!1,this.nodes.forEach(as))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||$l,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),T=!this.targetLayout||!Ri(this.targetLayout,p)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const b={...Ue(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||as(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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,H(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(Nl),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.HandoffCancelAllAnimations&&Ei(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(os);return}this.isUpdating||this.nodes.forEach(kl),this.isUpdating=!1,this.nodes.forEach(Ol),this.nodes.forEach(Rl),this.nodes.forEach(El),this.clearAllSnapshots();const a=q.now();D.delta=Q(0,1e3/60,a-D.timestamp),D.timestamp=a,D.isProcessing=!0,Zt.update.process(D),Zt.preRender.process(D),Zt.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,De.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bl),this.sharedNodes.forEach(Ul)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.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=C(),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);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&(a||nt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Wl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return C();const a=r.measureViewportBox(),{scroll:l}=this.root;return l&&(X(a.x,l.offset.x),X(a.y,l.offset.y)),a}removeElementScroll(r){const a=C();j(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;if(c!==this.root&&u&&h.layoutScroll){if(u.isRoot){j(a,r);const{scroll:f}=this.root;f&&(X(a.x,-f.offset.x),X(a.y,-f.offset.y))}X(a.x,u.offset.x),X(a.y,u.offset.y)}}return a}applyTransform(r,a=!1){const l=C();j(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ht(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&ht(l,u.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(r){const a=C();j(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;be(c.latestValues)&&c.updateSnapshot();const u=C(),h=c.measurePageBox();j(u,h),es(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&es(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!==D.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 c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Pt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ga(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):j(this.target,this.layout.layoutBox),Si(this.target,this.targetDelta)):j(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Pt(this.relativeTargetOrigin,this.target,d.target),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||be(this.parent.latestValues)||bi(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 c=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===D.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;j(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;tl(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=C());const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=ct(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct());const m=this.projectionTransform;Tt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=is(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,y=this.getStack(),v=!y||y.members.length<=1,T=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(Kl));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const V=b/1e3;ls(h.x,r.x,V),ls(h.y,r.y,V),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_l(this.relativeTarget,this.relativeTargetOrigin,f,V),g&&Tl(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=C()),j(g,this.relativeTarget)),m&&(this.animationValues=u,pl(u,c,this.latestValues,V,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},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&&(H(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{kt.hasAnimatedSinceResize=!0,this.currentAnimation=Cl(0,rs,{...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(rs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Fi(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||C();const h=B(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=B(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}j(a,l),ht(a,u),Tt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Pl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&le("z",r,c,this.animationValues);for(let u=0;u<ae.length;u++)le(`rotate${ae[u]}`,r,c,this.animationValues),le(`skew${ae[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Dl;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ft(r==null?void 0:r.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Ft(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=is(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Ot){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=Ot[m],T=c.transform==="none"?f[m]:y(f[m],h);if(v){const g=v.length;for(let b=0;b<g;b++)c[v[b]]=T}else c[m]=T}return this.options.layoutId&&(c.pointerEvents=h===this?Ft(r==null?void 0:r.pointerEvents)||"":"none"),c}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(os),this.root.sharedNodes.clear()}}}function Rl(t){t.updateLayout()}function El(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?I(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=B(f);f.min=s[h].min,f.max=f.min+d}):Fi(o,n.layoutBox,s)&&I(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=B(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ct();Tt(a,s,n.layoutBox);const l=ct();r?Tt(l,t.applyTransform(i,!0),n.measuredBox):Tt(l,s,n.layoutBox);const c=!Mi(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=C();Pt(p,n.layoutBox,f.layoutBox);const m=C();Pt(m,s,d.layoutBox),Ri(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Ll(t){st.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 Fl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Bl(t){t.clearSnapshot()}function os(t){t.clearMeasurements()}function kl(t){t.isLayoutDirty=!1}function Ol(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function as(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function jl(t){t.resolveTargetDelta()}function Il(t){t.calcProjection()}function Nl(t){t.resetSkewAndRotation()}function Ul(t){t.removeLeadSnapshot()}function ls(t,e,n){t.translate=A(e.translate,0,n),t.scale=A(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function us(t,e,n,s){t.min=A(e.min,n.min,s),t.max=A(e.max,n.max,s)}function _l(t,e,n,s){us(t.x,e.x,n.x,s),us(t.y,e.y,n.y,s)}function Kl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const $l={duration:.45,ease:[.4,0,.1,1]},cs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),hs=cs("applewebkit/")&&!cs("chrome/")?Math.round:M;function fs(t){t.min=hs(t.min),t.max=hs(t.max)}function Wl(t){fs(t.x),fs(t.y)}function Fi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Te(ss(e),ss(n),.2)}const Gl=Li({attachResizeListener:(t,e)=>_(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ue={current:void 0},Bi=Li({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ue.current){const t=new Gl({});t.mount(window),t.setOptions({layoutScroll:!0}),ue.current=t}return ue.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Hl={pan:{Feature:ll},drag:{Feature:al,ProjectionNode:Bi,MeasureLayout:Ai}},Ve={current:null},ki={current:!1};function zl(){if(ki.current=!0,!!Ae)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ve.current=t.matches;t.addListener(e),e()}else Ve.current=!1}var Yl={};function Xl(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(L(o))t.addValue(i,o),_t(s)&&s.add(i),Yl.NODE_ENV==="development"&&Je(o.version==="11.2.12",`Attempting to mix Framer Motion versions ${o.version} with 11.2.12 may not work as expected.`);else if(L(r))t.addValue(i,wt(o,{owner:t})),_t(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,wt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const ds=new WeakMap,ql=[...Gs,E,J],Zl=t=>ql.find(Ws(t));var Ql={};const ps=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Jl=Re.length;class tu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(f,d,p,m)=>new this.KeyframeResolver(f,d,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=_e,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.scheduleRender=()=>w.render(this.render,!1,!0);const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Gt(n),this.isVariantNode=Ps(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&L(d)&&(d.set(l[f],!1),_t(u)&&u.add(f))}}mount(e){this.current=e,ds.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),ki.current||zl(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ve.current,Ql.NODE_ENV!=="production"&&Je(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(){ds.delete(this.current),this.projection&&this.projection.unmount(),H(this.notifyUpdate),H(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const s=ot.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&w.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ft){const n=ft[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ps.length;s++){const i=ps[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Xl(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<Jl;s++){const i=Re[s],o=this.props[i];(bt(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=wt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Ks(i)||_s(i))?i=parseFloat(i):!Zl(i)&&J.test(n)&&(i=Js(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Ne(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Qe),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Oi extends tu{constructor(){super(...arguments),this.KeyframeResolver=ti}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function eu(t){return window.getComputedStyle(t)}class nu extends Oi{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(ot.has(n)){const s=$e(n);return s&&s.default||0}else{const s=eu(e),i=(ws(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Vi(e,n)}build(e,n,s,i){Be(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ie(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){Rs(e,n,s,i)}}class su extends Oi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=$e(n);return s&&s.default||0}return n=Es.has(n)?n:Ce(n),e.getAttribute(n)}measureInstanceViewportBox(){return C()}scrapeMotionValuesFromProps(e,n,s){return Fs(e,n,s)}build(e,n,s,i){Oe(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ls(e,n,s,i)}mount(e){this.isSVGTag=je(e.tagName),super.mount(e)}}const iu=(t,e)=>Ee(t)?new su(e,{enableHardwareAcceleration:!1}):new nu(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),ru={layout:{ProjectionNode:Bi,MeasureLayout:Ai}},ou={..._a,...Yr,...Hl,...ru},au=sr((t,e)=>kr(t,e,ou,iu));exports.motion=au;
|