framer-motion 7.1.1 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3936,6 +3936,14 @@ declare function useViewportScroll(): {
3936
3936
 
3937
3937
  declare function useTime(): MotionValue<number>;
3938
3938
 
3939
+ interface WillChange extends MotionValue {
3940
+ add(name: string): void;
3941
+ remove(name: string): void;
3942
+ get(): void;
3943
+ }
3944
+
3945
+ declare function useWillChange(): WillChange;
3946
+
3939
3947
  /**
3940
3948
  * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.
3941
3949
  *
@@ -4219,4 +4227,4 @@ interface ScaleMotionValues {
4219
4227
  */
4220
4228
  declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMotionValues;
4221
4229
 
4222
- export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycles, AnimationOptions, AnimationPlaybackControls, AnimationProps, AnimationType, Axis, AxisDelta, BoundingBox, Box, CreateVisualElement, CustomDomComponent, CustomValueType, Delta, DeprecatedLayoutGroupContext, DragControls, DragElastic, DragHandlers, DraggableProps, EasingFunction, EventInfo, FeatureBundle, FeatureComponent, FeatureComponents, FeatureDefinition, FeatureDefinitions, FeatureNames, FeatureProps, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, IProjectionNode, Inertia, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, LoadedFeatures, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, Variant, VariantLabels, Variants, VisualElement, VisualElementLifecycles, VisualState, addPointerEvent, addScaleCorrector, animate, animateVisualElement, animationControls, animations, calcLength, checkTargetForNewValues, createBox, createDomMotionComponent, createMotionComponent, domAnimation, domMax, filterProps, isBrowser, isDragActive, isMotionValue, isValidMotionProp, m, makeUseVisualState, motion, motionValue, resolveMotionValue, transform, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useVisualElementContext, visualElement, wrapHandler };
4230
+ export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycles, AnimationOptions, AnimationPlaybackControls, AnimationProps, AnimationType, Axis, AxisDelta, BoundingBox, Box, CreateVisualElement, CustomDomComponent, CustomValueType, Delta, DeprecatedLayoutGroupContext, DragControls, DragElastic, DragHandlers, DraggableProps, EasingFunction, EventInfo, FeatureBundle, FeatureComponent, FeatureComponents, FeatureDefinition, FeatureDefinitions, FeatureNames, FeatureProps, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, IProjectionNode, Inertia, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, LoadedFeatures, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, Variant, VariantLabels, Variants, VisualElement, VisualElementLifecycles, VisualState, addPointerEvent, addScaleCorrector, animate, animateVisualElement, animationControls, animations, calcLength, checkTargetForNewValues, createBox, createDomMotionComponent, createMotionComponent, domAnimation, domMax, filterProps, isBrowser, isDragActive, isMotionValue, isValidMotionProp, m, makeUseVisualState, motion, motionValue, resolveMotionValue, transform, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useVisualElementContext, useWillChange, visualElement, wrapHandler };
@@ -1242,7 +1242,7 @@
1242
1242
  * This will be replaced by the build step with the latest version number.
1243
1243
  * When MotionValues are provided to motion components, warn if versions are mixed.
1244
1244
  */
1245
- this.version = "7.1.1";
1245
+ this.version = "7.1.2";
1246
1246
  /**
1247
1247
  * Duration, in milliseconds, since last updating frame.
1248
1248
  *
@@ -4228,7 +4228,7 @@
4228
4228
  * and warn against mismatches.
4229
4229
  */
4230
4230
  {
4231
- warnOnce(nextValue.version === "7.1.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.1.1 may not work as expected.`);
4231
+ warnOnce(nextValue.version === "7.1.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.1.2 may not work as expected.`);
4232
4232
  }
4233
4233
  }
4234
4234
  else if (isMotionValue(prevValue)) {
@@ -1 +1 @@
1
- import{createContext as t,useContext as e,useId as n,useEffect as r,useRef as o}from"react";function s(t){return"object"==typeof t&&"function"==typeof t.start}const i=t(null);function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}const l=t=>Array.isArray(t);function u(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const c=(t,e,n)=>Math.min(Math.max(n,t),e);function d({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,s,i=1-e;i=c(.05,1,i),t=c(.01,10,t/1e3),i<1?(o=e=>{const r=e*i,o=r*t;return.001-(r-n)/f(e,i)*Math.exp(-o)},s=e=>{const r=e*i*t,s=r*n+n,a=Math.pow(i,2)*Math.pow(e,2)*t,l=Math.exp(-r),u=f(Math.pow(e,2),i);return(.001-o(e)>0?-1:1)*((s-a)*l)/u}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*i*Math.sqrt(r*e),duration:t}}}function f(t,e){return t*Math.sqrt(1-e*e)}const p=["duration","bounce"],m=["stiffness","damping","mass"];function h(t,e){return e.some(e=>void 0!==t[e])}function g(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,s=a(t,["from","to","restSpeed","restDelta"]);const i={done:!1,value:e};let{stiffness:l,damping:u,mass:c,velocity:g,duration:y,isResolvedFromDuration:b}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!h(t,m)&&h(t,p)){const n=d(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(s),w=v,O=v;function A(){const t=g?-g/1e3:0,r=n-e,s=u/(2*Math.sqrt(l*c)),i=Math.sqrt(l/c)/1e3;if(void 0===o&&(o=Math.min(Math.abs(n-e)/100,.4)),s<1){const e=f(i,s);w=o=>{const a=Math.exp(-s*i*o);return n-a*((t+s*i*r)/e*Math.sin(e*o)+r*Math.cos(e*o))},O=n=>{const o=Math.exp(-s*i*n);return s*i*o*(Math.sin(e*n)*(t+s*i*r)/e+r*Math.cos(e*n))-o*(Math.cos(e*n)*(t+s*i*r)-e*r*Math.sin(e*n))}}else if(1===s)w=e=>n-Math.exp(-i*e)*(r+(t+i*r)*e);else{const e=i*Math.sqrt(s*s-1);w=o=>{const a=Math.exp(-s*i*o),l=Math.min(e*o,300);return n-a*((t+s*i*r)*Math.sinh(l)+e*r*Math.cosh(l))/e}}}return A(),{next:t=>{const e=w(t);if(b)i.done=t>=y;else{const s=1e3*O(t),a=Math.abs(s)<=r,l=Math.abs(n-e)<=o;i.done=a&&l}return i.value=i.done?n:e,i},flipTarget:()=>{g=-g,[e,n]=[n,e],A()}}}g.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const v=t=>0,y=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},b=(t,e,n)=>-n*t+n*e+t,w=(t,e)=>n=>Math.max(Math.min(n,e),t),O=t=>t%1?Number(t.toFixed(5)):t,A=/(-)?([\d]*\.?[\d])+/g,V=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,x=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function j(t){return"string"==typeof t}const S={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},M=Object.assign(Object.assign({},S),{transform:w(0,1)}),T=Object.assign(Object.assign({},S),{default:1}),E=t=>({test:e=>j(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),C=E("deg"),P=E("%"),k=E("px"),I=E("vh"),F=E("vw"),R=Object.assign(Object.assign({},P),{parse:t=>P.parse(t)/100,transform:t=>P.transform(100*t)}),D=(t,e)=>n=>Boolean(j(n)&&x.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),B=(t,e,n)=>r=>{if(!j(r))return r;const[o,s,i,a]=r.match(A);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(i),alpha:void 0!==a?parseFloat(a):1}},L={test:D("hsl","hue"),parse:B("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+P.transform(O(e))+", "+P.transform(O(n))+", "+O(M.transform(r))+")"},U=w(0,255),N=Object.assign(Object.assign({},S),{transform:t=>Math.round(U(t))}),$={test:D("rgb","red"),parse:B("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+N.transform(t)+", "+N.transform(e)+", "+N.transform(n)+", "+O(M.transform(r))+")"};const Y={test:D("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:$.transform},z={test:t=>$.test(t)||Y.test(t)||L.test(t),parse:t=>$.test(t)?$.parse(t):L.test(t)?L.parse(t):Y.parse(t),transform:t=>j(t)?t:t.hasOwnProperty("red")?$.transform(t):L.transform(t)};function X(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(V);r&&(n=r.length,t=t.replace(V,"${c}"),e.push(...r.map(z.parse)));const o=t.match(A);return o&&(t=t.replace(A,"${n}"),e.push(...o.map(S.parse))),{values:e,numColors:n,tokenised:t}}function H(t){return X(t).values}function W(t){const{values:e,numColors:n,tokenised:r}=X(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?z.transform(t[r]):O(t[r]));return e}}const Z=t=>"number"==typeof t?0:t;const q={test:function(t){var e,n,r,o;return isNaN(t)&&j(t)&&(null!==(n=null===(e=t.match(A))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(V))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:H,createTransformer:W,getAnimatableNone:function(t){const e=H(t);return W(t)(e.map(Z))}},K=new Set(["brightness","contrast","saturate","opacity"]);function G(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(A)||[];if(!r)return t;const o=n.replace(r,"");let s=K.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+o+")"}const J=/([a-z-]*)\(.*?\)/g,_=Object.assign(Object.assign({},q),{getAnimatableNone:t=>{const e=t.match(J);return e?e.map(G).join(" "):t}});function Q(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function tt({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,s=0,i=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;o=Q(a,r,t+1/3),s=Q(a,r,t),i=Q(a,r,t-1/3)}else o=s=i=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*i),alpha:r}}const et=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},nt=[Y,$,L],rt=t=>nt.find(e=>e.test(t)),ot=(t,e)=>{let n=rt(t),r=rt(e),o=n.parse(t),s=r.parse(e);n===L&&(o=tt(o),n=$),r===L&&(s=tt(s),r=$);const i=Object.assign({},o);return t=>{for(const e in i)"alpha"!==e&&(i[e]=et(o[e],s[e],t));return i.alpha=b(o.alpha,s.alpha,t),n.transform(i)}},st=(t,e)=>n=>e(t(n)),it=(...t)=>t.reduce(st);function at(t,e){return"number"==typeof t?n=>b(t,e,n):z.test(t)?ot(t,e):dt(t,e)}const lt=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>at(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},ut=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=at(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function ct(t){const e=q.parse(t),n=e.length;let r=0,o=0,s=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:void 0!==e[t].hue?s++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:s}}const dt=(t,e)=>{const n=q.createTransformer(e),r=ct(t),o=ct(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?it(lt(r.parsed,o.parsed),n):n=>""+(n>0?e:t)},ft=(t,e)=>n=>b(t,e,n);function pt(t,e,n){const r=[],o=n||("number"==typeof(s=t[0])?ft:"string"==typeof s?z.test(s)?ot:dt:Array.isArray(s)?lt:"object"==typeof s?ut:void 0);var s;const i=t.length-1;for(let n=0;n<i;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=it(t,s)}r.push(s)}return r}function mt(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const s=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const i=pt(e,r,o),a=2===s?function([t,e],[n]){return r=>n(y(t,e,r))}(t,i):function(t,e){const n=t.length,r=n-1;return o=>{let s=0,i=!1;if(o<=t[0]?i=!0:o>=t[r]&&(s=r-1,i=!0),!i){let e=1;for(;e<n&&!(t[e]>o||e===r);e++);s=e-1}const a=y(t[s],t[s+1],o);return e[s](a)}}(t,i);return n?e=>a(c(t[0],t[s-1],e)):a}const ht=t=>e=>1-t(1-e),gt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,vt=t=>e=>e*e*((t+1)*e-t),yt=t=>t,bt=(wt=2,t=>Math.pow(t,wt));var wt;const Ot=ht(bt),At=gt(bt),Vt=t=>1-Math.sin(Math.acos(t)),xt=ht(Vt),jt=gt(xt),St=vt(1.525),Mt=ht(St),Tt=gt(St),Et=(t=>{const e=vt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),Ct=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Pt=ht(Ct);function kt(t,e){return t.map(()=>e||At).splice(0,t.length-1)}function It({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const s={done:!1,value:t},i=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(r&&r.length===i.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(i),o);function l(){return mt(a,i,{ease:Array.isArray(n)?n:kt(i,n)})}let u=l();return{next:t=>(s.value=u(t),s.done=t>=o,s),flipTarget:()=>{i.reverse(),u=l()}}}const Ft={keyframes:It,spring:g,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:s}){const i={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===s?l:s(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/r);return i.done=!(e>o||e<-o),i.value=i.done?u:u+e,i},flipTarget:()=>{}}}};const Rt="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Dt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Rt()),1/60*1e3);let Bt=!0,Lt=!1,Ut=!1;const Nt={delta:0,timestamp:0},$t=["read","update","preRender","render","postRender"],Yt=$t.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const l=a&&o,u=l?e:n;return s&&i.add(t),-1===u.indexOf(t)&&(u.push(t),l&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),i.delete(t)},process:l=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(l),i.has(r)&&(a.schedule(r),t())}o=!1,s&&(s=!1,a.process(l))}}};return a}(()=>Lt=!0),t),{}),zt=$t.reduce((t,e)=>{const n=Yt[e];return t[e]=(t,e=!1,r=!1)=>(Lt||Zt(),n.schedule(t,e,r)),t},{}),Xt=$t.reduce((t,e)=>(t[e]=Yt[e].cancel,t),{});$t.reduce((t,e)=>(t[e]=()=>Yt[e].process(Nt),t),{});const Ht=t=>Yt[t].process(Nt),Wt=t=>{Lt=!1,Nt.delta=Bt?1/60*1e3:Math.max(Math.min(t-Nt.timestamp,40),1),Nt.timestamp=t,Ut=!0,$t.forEach(Ht),Ut=!1,Lt&&(Bt=!1,Dt(Wt))},Zt=()=>{Lt=!0,Bt=!0,Ut||Dt(Wt)},qt=()=>Nt;function Kt(t,e,n=0){return t-e-n}const Gt=t=>{const e=({delta:e})=>t(e);return{start:()=>zt.update(e,!0),stop:()=>Xt.update(e)}};function Jt(t){var e,n,{from:r,autoplay:o=!0,driver:s=Gt,elapsed:i=0,repeat:l=0,repeatType:u="loop",repeatDelay:c=0,onPlay:d,onStop:f,onComplete:p,onRepeat:m,onUpdate:h}=t,v=a(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let y,b,w,{to:O}=v,A=0,V=v.duration,x=!1,j=!0;const S=function(t){if(Array.isArray(t.to))return It;if(Ft[t.type])return Ft[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?It:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?g:It}(v);(null===(n=(e=S).needsInterpolation)||void 0===n?void 0:n.call(e,r,O))&&(w=mt([0,100],[r,O],{clamp:!1}),r=0,O=100);const M=S(Object.assign(Object.assign({},v),{from:r,to:O}));function T(){A++,"reverse"===u?(j=A%2==0,i=function(t,e,n=0,r=!0){return r?Kt(e+-t,e,n):e-(t-e)+n}(i,V,c,j)):(i=Kt(i,V,c),"mirror"===u&&M.flipTarget()),x=!1,m&&m()}function E(t){if(j||(t=-t),i+=t,!x){const t=M.next(Math.max(0,i));b=t.value,w&&(b=w(b)),x=j?t.done:i<=0}null==h||h(b),x&&(0===A&&(null!=V||(V=i)),A<l?function(t,e,n,r){return r?t>=e+n:t<=-n}(i,V,c,j)&&T():(y.stop(),p&&p()))}return o&&(null==d||d(),y=s(E),y.start()),{stop:()=>{null==f||f(),y.stop()}}}function _t(t,e){return e?t*(1e3/e):0}const Qt=(t,e)=>1-3*e+3*t,te=(t,e)=>3*e-6*t,ee=t=>3*t,ne=(t,e,n)=>((Qt(e,n)*t+te(e,n))*t+ee(e))*t,re=(t,e,n)=>3*Qt(e,n)*t*t+2*te(e,n)*t+ee(e);function oe(t,e,n,r){if(t===e&&n===r)return yt;const o=new Float32Array(11);for(let e=0;e<11;++e)o[e]=ne(.1*e,t,n);function s(e){let r=0,s=1;for(;10!==s&&o[s]<=e;++s)r+=.1;--s;const i=r+.1*((e-o[s])/(o[s+1]-o[s])),a=re(i,t,n);return a>=.001?function(t,e,n,r){for(let o=0;o<8;++o){const o=re(e,n,r);if(0===o)return e;e-=(ne(e,n,r)-t)/o}return e}(e,i,t,n):0===a?i:function(t,e,n,r,o){let s,i,a=0;do{i=e+(n-e)/2,s=ne(i,r,o)-t,s>0?n=i:e=i}while(Math.abs(s)>1e-7&&++a<10);return i}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:ne(s(t),e,r)}const se=t=>1e3*t,ie={linear:yt,easeIn:bt,easeInOut:At,easeOut:Ot,circIn:Vt,circInOut:jt,circOut:xt,backIn:St,backInOut:Tt,backOut:Mt,anticipate:Et,bounceIn:Pt,bounceInOut:t=>t<.5?.5*(1-Ct(1-2*t)):.5*Ct(2*t-1)+.5,bounceOut:Ct},ae=t=>{if(Array.isArray(t)){t.length;const[e,n,r,o]=t;return oe(e,n,r,o)}return"string"==typeof t?ie[t]:t},le=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!q.test(e)||e.startsWith("url("))),ue=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),ce=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),de=()=>({type:"keyframes",ease:"linear",duration:.3}),fe=t=>({type:"keyframes",duration:.8,values:t}),pe={x:ue,y:ue,z:ue,rotate:ue,rotateX:ue,rotateY:ue,rotateZ:ue,scaleX:ce,scaleY:ce,scale:ce,opacity:de,backgroundColor:de,color:de,default:ce},me=Object.assign(Object.assign({},S),{transform:Math.round}),he={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,size:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,rotate:C,rotateX:C,rotateY:C,rotateZ:C,scale:T,scaleX:T,scaleY:T,scaleZ:T,skew:C,skewX:C,skewY:C,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:M,originX:R,originY:R,originZ:k,zIndex:me,fillOpacity:M,strokeOpacity:M,numOctaves:me},ge=Object.assign(Object.assign({},he),{color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:_,WebkitFilter:_}),ve=t=>ge[t];function ye(t,e){var n;let r=ve(t);return r!==_&&(r=q),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}const be=!1,we=t=>l(t)?t[t.length-1]||0:t;function Oe(t){var{ease:e,times:n,yoyo:r,flip:o,loop:s}=t,i=a(t,["ease","times","yoyo","flip","loop"]);const l=Object.assign({},i);return n&&(l.offset=n),i.duration&&(l.duration=se(i.duration)),i.repeatDelay&&(l.repeatDelay=se(i.repeatDelay)),e&&(l.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(ae):ae(e)),"tween"===i.type&&(l.type="keyframes"),(r||s||o)&&(r?l.repeatType="reverse":s?l.repeatType="loop":o&&(l.repeatType="mirror"),l.repeat=s||r||o||i.repeat),"spring"!==i.type&&(l.type="keyframes"),l}function Ae(t,e,n){var r;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function(t){var e=a(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Object.assign(Object.assign({},t),((t,e)=>{let n;return n=l(e)?fe:pe[t]||pe.default,Object.assign({to:e},n(e))})(n,e.to))),Object.assign(Object.assign({},e),Oe(t))}function Ve(t,e,n,r,o){var s;const i=Se(r,t);let a=null!==(s=i.from)&&void 0!==s?s:e.get();const l=le(t,n);"none"===a&&l&&"string"==typeof n?a=ye(t,n):xe(a)&&"string"==typeof n?a=je(n):!Array.isArray(n)&&xe(n)&&"string"==typeof a&&(n=je(a));return le(t,a)&&l&&!1!==i.type?function(){const r={from:a,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:t=>e.set(t)};return"inertia"===i.type||"decay"===i.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:s=750,bounceStiffness:i=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:p}){let m;function h(t){return void 0!==n&&t<n||void 0!==r&&t>r}function g(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function v(t){null==m||m.stop(),m=Jt(Object.assign(Object.assign({},t),{driver:c,onUpdate:e=>{var n;null==d||d(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:f,onStop:p}))}function y(t){v(Object.assign({type:"spring",stiffness:i,damping:a,restDelta:l},t))}if(h(t))y({from:t,velocity:e,to:g(t)});else{let r=o*e+t;void 0!==u&&(r=u(r));const i=g(r),a=i===n?-1:1;let c,d;const f=t=>{c=d,d=t,e=_t(t-c,qt().delta),(1===a&&t>i||-1===a&&t<i)&&y({from:t,to:i,velocity:e})};v({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:l,modifyTarget:u,onUpdate:h(r)?f:void 0})}return{stop:()=>null==m?void 0:m.stop()}}(Object.assign(Object.assign({},r),i)):Jt(Object.assign(Object.assign({},Ae(i,r,t)),{onUpdate:t=>{var e;r.onUpdate(t),null===(e=i.onUpdate)||void 0===e||e.call(i,t)},onComplete:()=>{var t;r.onComplete(),null===(t=i.onComplete)||void 0===t||t.call(i)}}))}:function(){var t,r;const s=we(n);return e.set(s),o(),null===(t=null==i?void 0:i.onUpdate)||void 0===t||t.call(i,s),null===(r=null==i?void 0:i.onComplete)||void 0===r||r.call(i),{stop:()=>{}}}}function xe(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function je(t){return"number"==typeof t?0:ye("",t)}function Se(t,e){return t[e]||t.default||t}function Me(t,e,n,r={}){return be&&(r={type:!1}),e.start(o=>{let s,i;const a=Ve(t,e,n,r,o),l=function(t,e){var n,r;return null!==(r=null!==(n=(Se(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),u=()=>i=a();return l?s=window.setTimeout(u,se(l)):u(),()=>{clearTimeout(s),null==i||i.stop()}})}const Te=t=>/^0[^.\s]+$/.test(t);class Ee{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Ce{constructor(t){var e;this.version="7.1.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ee,this.velocityUpdateSubscribers=new Ee,this.renderSubscribers=new Ee,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:r}=qt();this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,zt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>zt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?_t(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Pe(t){return new Ce(t)}const ke=t=>e=>e.test(t),Ie=[S,k,P,C,F,I,{test:t=>"auto"===t,parse:t=>t}],Fe=t=>Ie.find(ke(t)),Re=[...Ie,z,q],De=t=>Re.find(ke(t));function Be(t){return Array.isArray(t)}function Le(t){return"string"==typeof t||Be(t)}function Ue(t,e,n){const r=t.getProps();return function(t,e,n,r={},o={}){var s;return"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),"string"==typeof e&&(e=null===(s=t.variants)||void 0===s?void 0:s[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),e}(r,e,null!=n?n:r.custom,function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.getVelocity()),e}(t))}function Ne(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Le(t.initial)||Le(t.animate)||Le(t.whileHover)||Le(t.whileDrag)||Le(t.whileTap)||Le(t.whileFocus)||Le(t.exit)}function $e(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Pe(n))}function Ye(t,e){if(!e)return;return(e[t]||e.default||e).from}const ze=["","X","Y","Z"],Xe=["transformPerspective","x","y","z"];function He(t,e){return Xe.indexOf(t)-Xe.indexOf(e)}["translate","scale","rotate","skew"].forEach(t=>ze.forEach(e=>Xe.push(t+e)));const We=new Set(Xe);function Ze(t){return We.has(t)}const qe=new Set(["originX","originY","originZ"]);function Ke(t){return qe.has(t)}const Ge=t=>Boolean(null!==t&&"object"==typeof t&&t.getVelocity);function Je(t){return Boolean(Ge(t)&&t.add)}function _e(t,e,n={}){var r;const o=Ue(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Qe(t,o,n):()=>Promise.resolve(),a=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:a}=s;return function(t,e,n=0,r=0,o=1,s){const i=[],a=(t.variantChildren.size-1)*r,l=1===o?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(tn).forEach((t,r)=>{i.push(_e(t,e,Object.assign(Object.assign({},s),{delay:n+l(r)})).then(()=>t.notifyAnimationComplete(e)))}),Promise.all(i)}(t,e,o+r,i,a,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[t,e]="beforeChildren"===l?[i,a]:[a,i];return t().then(e)}return Promise.all([i(),a(n.delay)])}function Qe(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var s;let i=t.makeTargetAnimatable(e),{transition:l=t.getDefaultTransition(),transitionEnd:u}=i,c=a(i,["transition","transitionEnd"]);const d=t.getValue("willChange");r&&(l=r);const f=[],p=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in c){const r=t.getValue(e),o=c[e];if(!r||void 0===o||p&&en(p,e))continue;let s=Object.assign({delay:n},l);t.shouldReduceMotion&&Ze(e)&&(s=Object.assign(Object.assign({},s),{type:!1,delay:0}));let i=Me(e,r,o,s);Je(d)&&(d.add(e),i=i.then(()=>d.remove(e))),f.push(i)}return Promise.all(f).then(()=>{u&&function(t,e){const n=Ue(t,e);let r=n?t.makeTargetAnimatable(n,!1):{},{transitionEnd:o={},transition:s={}}=r,i=a(r,["transitionEnd","transition"]);i=Object.assign(Object.assign({},i),o);for(const e in i){$e(t,e,we(i[e]))}}(t,u)})}function tn(t,e){return t.sortNodePosition(e)}function en({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}var nn;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(nn||(nn={}));const rn=[nn.Animate,nn.InView,nn.Focus,nn.Hover,nn.Tap,nn.Drag,nn.Exit],on=[...rn].reverse(),sn=rn.length;function an(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notifyAnimationStart(e),Array.isArray(e)){const o=e.map(e=>_e(t,e,n));r=Promise.all(o)}else if("string"==typeof e)r=_e(t,e,n);else{const o="function"==typeof e?Ue(t,e,n.custom):e;r=Qe(t,o,n)}return r.then(()=>t.notifyAnimationComplete(e))}(t,e,n)))}function ln(t){let e=an(t);const n={[nn.Animate]:cn(!0),[nn.InView]:cn(),[nn.Hover]:cn(),[nn.Tap]:cn(),[nn.Drag]:cn(),[nn.Focus]:cn(),[nn.Exit]:cn()};let r=!0;const o=(e,n)=>{const r=Ue(t,n);if(r){const{transition:t,transitionEnd:n}=r,o=a(r,["transition","transitionEnd"]);e=Object.assign(Object.assign(Object.assign({},e),o),n)}return e};function i(i,a){var c;const d=t.getProps(),f=t.getVariantContext(!0)||{},p=[],m=new Set;let h={},g=1/0;for(let e=0;e<sn;e++){const v=on[e],y=n[v],b=null!==(c=d[v])&&void 0!==c?c:f[v],w=Le(b),O=v===a?y.isActive:null;!1===O&&(g=e);let A=b===f[v]&&b!==d[v]&&w;if(A&&r&&t.manuallyAnimateOnMount&&(A=!1),y.protectedKeys=Object.assign({},h),!y.isActive&&null===O||!b&&!y.prevProp||s(b)||"boolean"==typeof b)continue;const V=un(y.prevProp,b);let x=V||v===a&&y.isActive&&!A&&w||e>g&&w;const j=Array.isArray(b)?b:[b];let S=j.reduce(o,{});!1===O&&(S={});const{prevResolvedValues:M={}}=y,T=Object.assign(Object.assign({},M),S),E=t=>{x=!0,m.delete(t),y.needsAnimating[t]=!0};for(const t in T){const e=S[t],n=M[t];h.hasOwnProperty(t)||(e!==n?l(e)&&l(n)?!u(e,n)||V?E(t):y.protectedKeys[t]=!0:void 0!==e?E(t):m.add(t):void 0!==e&&m.has(t)?E(t):y.protectedKeys[t]=!0)}y.prevProp=b,y.prevResolvedValues=S,y.isActive&&(h=Object.assign(Object.assign({},h),S)),r&&t.blockInitialAnimation&&(x=!1),x&&!A&&p.push(...j.map(t=>({animation:t,options:Object.assign({type:v},i)})))}if(m.size){const e={};m.forEach(n=>{const r=t.getBaseTarget(n);void 0!==r&&(e[n]=r)}),p.push({animation:e})}let v=Boolean(p.length);return r&&!1===d.initial&&!t.manuallyAnimateOnMount&&(v=!1),r=!1,v?e(p):Promise.resolve()}return{animateChanges:i,setActive:function(e,r,o){var s;if(n[e].isActive===r)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)}),n[e].isActive=r;const a=i(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function un(t,e){return"string"==typeof e?e!==t:!!Be(e)&&!u(e,t)}function cn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const dn=t=>e=>(t(e),null),fn={animation:dn(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=ln(t)),s(e)&&r(()=>e.subscribe(t),[e])}),exit:dn(t=>{const{custom:o,visualElement:s}=t,[a,l]=function(){const t=e(i);if(null===t)return[!0,null];const{isPresent:o,onExitComplete:s,register:a}=t,l=n();return r(()=>a(l),[]),!o&&s?[!1,()=>null==s?void 0:s(l)]:[!0]}(),u=e(i);r(()=>{var t,e;s.isPresent=a;const n=null===(t=s.animationState)||void 0===t?void 0:t.setActive(nn.Exit,!a,{custom:null!==(e=null==u?void 0:u.custom)&&void 0!==e?e:o});!a&&(null==n||n.then(l))},[a])})};function pn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function mn(t,e,n,o){r(()=>{const r=t.current;if(n&&r)return pn(r,e,n,o)},[t,e,n,o])}function hn(t){return!!t.touches}const gn={pageX:0,pageY:0};function vn(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||gn;return{x:n[e+"X"],y:n[e+"Y"]}}function yn(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}const bn=(t,e=!1)=>{const n=e=>t(e,function(t,e="page"){return{point:hn(t)?vn(t,e):yn(t,e)}}(e));return e?(r=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&r(t)}):n;var r},wn="undefined"!=typeof document,On={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},An={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Vn(t){return wn&&null===window.onpointerdown?t:wn&&null===window.ontouchstart?An[t]:wn&&null===window.onmousedown?On[t]:t}function xn(t,e,n,r){return pn(t,Vn(e),bn(n,"pointerdown"===e),r)}function jn(t,e,n,r){return mn(t,Vn(e),n&&bn(n,"pointerdown"===e),r)}function Sn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Mn=Sn("dragHorizontal"),Tn=Sn("dragVertical");function En(){const t=function(t){let e=!1;if("y"===t)e=Tn();else if("x"===t)e=Mn();else{const t=Mn(),n=Tn();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function Cn(t,e,n){return(r,o)=>{var s;(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!En()&&(null===(s=t.animationState)||void 0===s||s.setActive(nn.Hover,e),null==n||n(r,o))}}const Pn=(t,e)=>!!e&&(t===e||Pn(t,e.parentElement));const kn=("undefined"==typeof process||process.env,"production"),In=new Set;const Fn=new WeakMap,Rn=new WeakMap,Dn=t=>{var e;null===(e=Fn.get(t.target))||void 0===e||e(t)},Bn=t=>{t.forEach(Dn)};function Ln(t,e,n){const r=function(t){var{root:e}=t,n=a(t,["root"]);const r=e||document;Rn.has(r)||Rn.set(r,{});const o=Rn.get(r),s=JSON.stringify(n);return o[s]||(o[s]=new IntersectionObserver(Bn,Object.assign({root:e},n))),o[s]}(e);return Fn.set(t,n),r.observe(t),()=>{Fn.delete(t),r.unobserve(t)}}const Un={some:0,all:1};function Nn(t,e,n,{root:o,margin:s,amount:i="some",once:a}){r(()=>{if(!t)return;const r={root:null==o?void 0:o.current,rootMargin:s,threshold:"number"==typeof i?i:Un[i]};return Ln(n.getInstance(),r,t=>{var r;const{isIntersecting:o}=t;if(e.isInView===o)return;if(e.isInView=o,a&&!o&&e.hasEnteredView)return;o&&(e.hasEnteredView=!0),null===(r=n.animationState)||void 0===r||r.setActive(nn.InView,o);const s=n.getProps(),i=o?s.onViewportEnter:s.onViewportLeave;null==i||i(t)})},[t,o,s,i])}function $n(t,e,n,{fallback:o=!0}){r(()=>{var r,s;t&&o&&("production"!==kn&&(r="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||In.has(r)||(console.warn(r),s&&console.warn(s),In.add(r))),requestAnimationFrame(()=>{var t;e.hasEnteredView=!0;const{onViewportEnter:r}=n.getProps();null==r||r(null),null===(t=n.animationState)||void 0===t||t.setActive(nn.InView,!0)}))},[t])}const Yn={inView:dn((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:r,viewport:s={}}){const i=o({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||r);s.once&&i.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?$n:Nn)(a,i.current,t,s)})),tap:dn((function({onTap:t,onTapStart:e,onTapCancel:n,whileTap:s,visualElement:i}){const a=t||e||n||s,l=o(!1),u=o(null),c={passive:!(e||t||n||h)};function d(){var t;null===(t=u.current)||void 0===t||t.call(u),u.current=null}function f(){var t;return d(),l.current=!1,null===(t=i.animationState)||void 0===t||t.setActive(nn.Tap,!1),!En()}function p(e,r){f()&&(Pn(i.getInstance(),e.target)?null==t||t(e,r):null==n||n(e,r))}function m(t,e){f()&&(null==n||n(t,e))}function h(t,n){var r;d(),l.current||(l.current=!0,u.current=it(xn(window,"pointerup",p,c),xn(window,"pointercancel",m,c)),null===(r=i.animationState)||void 0===r||r.setActive(nn.Tap,!0),null==e||e(t,n))}var g;jn(i,"pointerdown",a?h:void 0,c),g=d,r(()=>()=>g(),[])})),focus:dn((function({whileFocus:t,visualElement:e}){mn(e,"focus",t?()=>{var t;null===(t=e.animationState)||void 0===t||t.setActive(nn.Focus,!0)}:void 0),mn(e,"blur",t?()=>{var t;null===(t=e.animationState)||void 0===t||t.setActive(nn.Focus,!1)}:void 0)})),hover:dn((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:r}){jn(r,"pointerenter",t||n?Cn(r,!0,t):void 0,{passive:!t}),jn(r,"pointerleave",e||n?Cn(r,!1,e):void 0,{passive:!e})}))},zn=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];const Xn=({treeType:t="",build:e,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:o,render:s,readValueFromInstance:i,removeValueFromRenderState:l,sortNodePosition:u,scrapeMotionValuesFromProps:c})=>({parent:d,props:f,presenceId:p,blockInitialAnimation:m,visualState:h,shouldReduceMotion:g},v={})=>{let y=!1;const{latestValues:b,renderState:w}=h;let O;const A=function(){const t=zn.map(()=>new Ee),e={},n={clearAllListeners:()=>t.forEach(t=>t.clear()),updatePropListeners:t=>{zn.forEach(r=>{var o;const s="on"+r,i=t[s];null===(o=e[r])||void 0===o||o.call(e),i&&(e[r]=n[s](i))})}};return t.forEach((t,e)=>{n["on"+zn[e]]=e=>t.add(e),n["notify"+zn[e]]=(...e)=>t.notify(...e)}),n}(),V=new Map,x=new Map;let j={};const S=Object.assign({},b);let M;function T(){O&&y&&(E(),s(O,w,f.style,B.projection))}function E(){e(B,w,b,v,f)}function C(){A.notifyUpdate(b)}function P(t,e){const n=e.onChange(e=>{b[t]=e,f.onUpdate&&zt.update(C,!1,!0)}),r=e.onRenderRequest(B.scheduleRender);x.set(t,()=>{n(),r()})}const k=c(f),{willChange:I}=k,F=a(k,["willChange"]);for(const t in F){const e=F[t];void 0!==b[t]&&Ge(e)&&(e.set(b[t],!1),Je(I)&&I.add(t))}const R=Ne(f),D=function(t){return Boolean(Ne(t)||t.variants)}(f),B=Object.assign(Object.assign({treeType:t,current:null,depth:d?d.depth+1:0,parent:d,children:new Set,presenceId:p,shouldReduceMotion:g,variantChildren:D?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==d?void 0:d.isMounted()),blockInitialAnimation:m,isMounted:()=>Boolean(O),mount(t){y=!0,O=B.current=t,B.projection&&B.projection.mount(t),D&&d&&!R&&(M=null==d?void 0:d.addVariantChild(B)),V.forEach((t,e)=>P(e,t)),null==d||d.children.add(B),B.setProps(f)},unmount(){var t;null===(t=B.projection)||void 0===t||t.unmount(),Xt.update(C),Xt.render(T),x.forEach(t=>t()),null==M||M(),null==d||d.children.delete(B),A.clearAllListeners(),O=void 0,y=!1},addVariantChild(t){var e;const n=B.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)},sortNodePosition:e=>u&&t===e.treeType?u(B.getInstance(),e.getInstance()):0,getClosestVariantNode:()=>D?B:null==d?void 0:d.getClosestVariantNode(),getLayoutId:()=>f.layoutId,getInstance:()=>O,getStaticValue:t=>b[t],setStaticValue:(t,e)=>b[t]=e,getLatestValues:()=>b,setVisibility(t){B.isVisible!==t&&(B.isVisible=t,B.scheduleRender())},makeTargetAnimatable:(t,e=!0)=>r(B,t,f,e),measureViewportBox:()=>o(O,f),addValue(t,e){B.hasValue(t)&&B.removeValue(t),V.set(t,e),b[t]=e.get(),P(t,e)},removeValue(t){var e;V.delete(t),null===(e=x.get(t))||void 0===e||e(),x.delete(t),delete b[t],l(t,w)},hasValue:t=>V.has(t),getValue(t,e){let n=V.get(t);return void 0===n&&void 0!==e&&(n=Pe(e),B.addValue(t,n)),n},forEachValue:t=>V.forEach(t),readValue:t=>{var e;return null!==(e=b[t])&&void 0!==e?e:i(O,t,v)},setBaseTarget(t,e){S[t]=e},getBaseTarget(t){if(n){const e=n(f,t);if(void 0!==e&&!Ge(e))return e}return S[t]}},A),{build:()=>(E(),w),scheduleRender(){zt.render(T,!1,!0)},syncRender:T,setProps(t){(t.transformTemplate||f.transformTemplate)&&B.scheduleRender(),f=t,A.updatePropListeners(t),j=function(t,e,n){var r;const{willChange:o}=e;for(const s in e){const i=e[s],a=n[s];if(Ge(i))t.addValue(s,i),Je(o)&&o.add(s);else if(Ge(a))t.addValue(s,Pe(i)),Je(o)&&o.remove(s);else if(a!==i)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(i)}else t.addValue(s,Pe(null!==(r=t.getStaticValue(s))&&void 0!==r?r:i))}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(B,c(f),j)},getProps:()=>f,getVariant:t=>{var e;return null===(e=f.variants)||void 0===e?void 0:e[t]},getDefaultTransition:()=>f.transition,getTransformPagePoint:()=>f.transformPagePoint,getVariantContext(t=!1){if(t)return null==d?void 0:d.getVariantContext();if(!R){const t=(null==d?void 0:d.getVariantContext())||{};return void 0!==f.initial&&(t.initial=f.initial),t}const e={};for(let t=0;t<Wn;t++){const n=Hn[t],r=f[n];(Le(r)||!1===r)&&(e[n]=r)}return e}});return B},Hn=["initial",...rn],Wn=Hn.length,Zn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function qn(t){return t.startsWith("--")}const Kn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Gn(t,e,n,r){var o;const{style:s,vars:i,transform:a,transformKeys:l,transformOrigin:u}=t;l.length=0;let c=!1,d=!1,f=!0;for(const t in e){const n=e[t];if(qn(t)){i[t]=n;continue}const r=he[t],p=Kn(n,r);if(Ze(t)){if(c=!0,a[t]=p,l.push(t),!f)continue;n!==(null!==(o=r.default)&&void 0!==o?o:0)&&(f=!1)}else Ke(t)?(u[t]=p,d=!0):s[t]=p}c?s.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},o,s){let i="";e.sort(He);let a=!1;const l=e.length;for(let n=0;n<l;n++){const r=e[n];i+=`${Zn[r]||r}(${t[r]}) `,"z"===r&&(a=!0)}return!a&&n&&(i+="translateZ(0)"),i=i.trim(),s?i=s(t,o?"":i):r&&o&&(i="none"),i}(t,n,f,r):r?s.transform=r({},""):!e.transform&&s.transform&&(s.transform="none"),d&&(s.transformOrigin=function({originX:t="50%",originY:e="50%",originZ:n=0}){return`${t} ${e} ${n}`}(u))}function Jn(t){return"string"==typeof t&&t.startsWith("var(--")}const _n=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Qn(t,e,n=1){const[r,o]=function(t){const e=_n.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);return s?s.trim():Jn(o)?Qn(o,e,n+1):o}const tr=new Set(["width","height","top","left","right","bottom","x","y"]),er=t=>tr.has(t),nr=(t,e)=>{t.set(e,!1),t.set(e)},rr=t=>t===S||t===k;var or;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(or||(or={}));const sr=(t,e)=>parseFloat(t.split(", ")[e]),ir=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return sr(o[1],e);{const e=r.match(/^matrix\((.+)\)$/);return e?sr(e[1],t):0}},ar=new Set(["x","y","z"]),lr=Xe.filter(t=>!ar.has(t));const ur={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:ir(4,13),y:ir(5,14)},cr=(t,e,n={},r={})=>{e=Object.assign({},e),r=Object.assign({},r);const o=Object.keys(e).filter(er);let s=[],i=!1;const a=[];if(o.forEach(o=>{const u=t.getValue(o);if(!t.hasValue(o))return;let c=n[o],d=Fe(c);const f=e[o];let p;if(l(f)){const t=f.length,e=null===f[0]?1:0;c=f[e],d=Fe(c);for(let n=e;n<t;n++)p?Fe(f[n]):p=Fe(f[n])}else p=Fe(f);if(d!==p)if(rr(d)&&rr(p)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof f?e[o]=parseFloat(f):Array.isArray(f)&&p===k&&(e[o]=f.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==p?void 0:p.transform)&&(0===c||0===f)?0===c?u.set(p.transform(c)):e[o]=d.transform(f):(i||(s=function(t){const e=[];return lr.forEach(n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}(t),i=!0),a.push(o),r[o]=void 0!==r[o]?r[o]:e[o],nr(u,f))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const r=e.measureViewportBox(),o=e.getInstance(),s=getComputedStyle(o),{display:i}=s,a={};"none"===i&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=ur[t](r,s)}),e.syncRender();const l=e.measureViewportBox();return n.forEach(n=>{const r=e.getValue(n);nr(r,a[n]),t[n]=ur[n](l,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.syncRender(),wn&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:e,transitionEnd:r}};function dr(t,e,n,r){return(t=>Object.keys(t).some(er))(e)?cr(t,e,n,r):{target:e,transitionEnd:r}}const fr=(t,e,n,r)=>{const o=function(t,e,n){var r,o=a(e,[]);const s=t.getInstance();if(!(s instanceof Element))return{target:o,transitionEnd:n};n&&(n=Object.assign({},n)),t.forEachValue(t=>{const e=t.get();if(!Jn(e))return;const n=Qn(e,s);n&&t.set(n)});for(const t in o){const e=o[t];if(!Jn(e))continue;const i=Qn(e,s);i&&(o[t]=i,n&&(null!==(r=n[t])&&void 0!==r||(n[t]=e)))}return{target:o,transitionEnd:n}}(t,e,r);return dr(t,e=o.target,n,r=o.transitionEnd)},pr={};function mr(t,{layout:e,layoutId:n}){return Ze(t)||Ke(t)||(e||void 0!==n)&&(!!pr[t]||"opacity"===t)}function hr(t){const{style:e}=t,n={};for(const r in e)(Ge(e[r])||mr(r,t))&&(n[r]=e[r]);return n}function gr(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const e in n)t.style.setProperty(e,n[e])}const vr={treeType:"dom",readValueFromInstance(t,e){if(Ze(e)){const t=ve(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),o=(qn(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof o?o.trim():o}var n},sortNodePosition:(t,e)=>2&t.compareDocumentPosition(e)?1:-1,getBaseTarget(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox(t,{transformPagePoint:e}){return n=e,function({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),n));var n},resetTransform(t,e,n){const{transformTemplate:r}=n;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform(t,e){t.style.transform=e.style.transform},removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]},makeTargetAnimatable(t,e,n,r){var{transition:o,transitionEnd:s}=e,i=a(e,["transition","transitionEnd"]),l=n.transformValues;void 0===r&&(r=!0);let u=function(t,e,n){var r,o;const s={};for(const i in t)s[i]=null!==(r=Ye(i,e))&&void 0!==r?r:null===(o=n.getValue(i))||void 0===o?void 0:o.get();return s}(i,o||{},t);if(l&&(s&&(s=l(s)),i&&(i=l(i)),u&&(u=l(u))),r){!function(t,e,n){var r,o,s,i;const a=Object.keys(e).filter(e=>!t.hasValue(e)),l=a.length;if(l)for(let u=0;u<l;u++){const l=a[u],c=e[l];let d=null;Array.isArray(c)&&(d=c[0]),null===d&&(d=null!==(o=null!==(r=n[l])&&void 0!==r?r:t.readValue(l))&&void 0!==o?o:e[l]),null!=d&&("string"==typeof d&&(/^\-?\d*\.?\d+$/.test(d)||Te(d))?d=parseFloat(d):!De(d)&&q.test(c)&&(d=ye(l,c)),t.addValue(l,Pe(d)),null!==(s=(i=n)[l])&&void 0!==s||(i[l]=d),t.setBaseTarget(l,d))}}(t,i,u);const e=fr(t,i,u,s);s=e.transitionEnd,i=e.target}return Object.assign({transition:o,transitionEnd:s},i)},scrapeMotionValuesFromProps:hr,build(t,e,n,r,o){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Gn(e,n,r,o.transformTemplate)},render:gr},yr=Xn(vr);function br(t,e,n){return"string"==typeof t?t:k.transform(e+n*t)}const wr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Or={offset:"strokeDashoffset",array:"strokeDasharray"};function Ar(t,e,n,r){var{attrX:o,attrY:s,originX:i,originY:l,pathLength:u,pathSpacing:c=1,pathOffset:d=0}=e;Gn(t,a(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),t.attrs=t.style,t.style={};const{attrs:f,style:p,dimensions:m}=t;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(void 0!==i||void 0!==l||p.transform)&&(p.transformOrigin=function(t,e,n){return`${br(e,t.x,t.width)} ${br(n,t.y,t.height)}`}(m,void 0!==i?i:.5,void 0!==l?l:.5)),void 0!==o&&(f.x=o),void 0!==s&&(f.y=s),void 0!==u&&function(t,e,n=1,r=0,o=!0){t.pathLength=1;const s=o?wr:Or;t[s.offset]=k.transform(-r);const i=k.transform(e),a=k.transform(n);t[s.array]=`${i} ${a}`}(f,u,c,d,!1)}const Vr=/([a-z])([A-Z])/g,xr=t=>t.replace(Vr,"$1-$2").toLowerCase(),jr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);const Sr=Xn(Object.assign(Object.assign({},vr),{getBaseTarget:(t,e)=>t[e],readValueFromInstance(t,e){var n;return Ze(e)?(null===(n=ve(e))||void 0===n?void 0:n.default)||0:(e=jr.has(e)?e:xr(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){const e=hr(t);for(const n in t)if(Ge(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build(t,e,n,r,o){Ar(e,n,r,o.transformTemplate)},render:function(t,e,n,r){gr(t,e,void 0,r);for(const n in e.attrs)t.setAttribute(jr.has(n)?n:xr(n),e.attrs[n])}})),Mr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];const Tr=Object.assign(Object.assign({renderer:(t,e)=>function(t){return"string"==typeof t&&!t.includes("-")&&!!(Mr.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Sr(e,{enableHardwareAcceleration:!1}):yr(e,{enableHardwareAcceleration:!0})},fn),Yn);export{Tr as domAnimation};
1
+ import{createContext as t,useContext as e,useId as n,useEffect as r,useRef as o}from"react";function s(t){return"object"==typeof t&&"function"==typeof t.start}const i=t(null);function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}const l=t=>Array.isArray(t);function u(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const c=(t,e,n)=>Math.min(Math.max(n,t),e);function d({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,s,i=1-e;i=c(.05,1,i),t=c(.01,10,t/1e3),i<1?(o=e=>{const r=e*i,o=r*t;return.001-(r-n)/f(e,i)*Math.exp(-o)},s=e=>{const r=e*i*t,s=r*n+n,a=Math.pow(i,2)*Math.pow(e,2)*t,l=Math.exp(-r),u=f(Math.pow(e,2),i);return(.001-o(e)>0?-1:1)*((s-a)*l)/u}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*i*Math.sqrt(r*e),duration:t}}}function f(t,e){return t*Math.sqrt(1-e*e)}const p=["duration","bounce"],m=["stiffness","damping","mass"];function h(t,e){return e.some(e=>void 0!==t[e])}function g(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,s=a(t,["from","to","restSpeed","restDelta"]);const i={done:!1,value:e};let{stiffness:l,damping:u,mass:c,velocity:g,duration:y,isResolvedFromDuration:b}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!h(t,m)&&h(t,p)){const n=d(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(s),w=v,O=v;function A(){const t=g?-g/1e3:0,r=n-e,s=u/(2*Math.sqrt(l*c)),i=Math.sqrt(l/c)/1e3;if(void 0===o&&(o=Math.min(Math.abs(n-e)/100,.4)),s<1){const e=f(i,s);w=o=>{const a=Math.exp(-s*i*o);return n-a*((t+s*i*r)/e*Math.sin(e*o)+r*Math.cos(e*o))},O=n=>{const o=Math.exp(-s*i*n);return s*i*o*(Math.sin(e*n)*(t+s*i*r)/e+r*Math.cos(e*n))-o*(Math.cos(e*n)*(t+s*i*r)-e*r*Math.sin(e*n))}}else if(1===s)w=e=>n-Math.exp(-i*e)*(r+(t+i*r)*e);else{const e=i*Math.sqrt(s*s-1);w=o=>{const a=Math.exp(-s*i*o),l=Math.min(e*o,300);return n-a*((t+s*i*r)*Math.sinh(l)+e*r*Math.cosh(l))/e}}}return A(),{next:t=>{const e=w(t);if(b)i.done=t>=y;else{const s=1e3*O(t),a=Math.abs(s)<=r,l=Math.abs(n-e)<=o;i.done=a&&l}return i.value=i.done?n:e,i},flipTarget:()=>{g=-g,[e,n]=[n,e],A()}}}g.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const v=t=>0,y=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},b=(t,e,n)=>-n*t+n*e+t,w=(t,e)=>n=>Math.max(Math.min(n,e),t),O=t=>t%1?Number(t.toFixed(5)):t,A=/(-)?([\d]*\.?[\d])+/g,V=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,x=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function j(t){return"string"==typeof t}const S={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},M=Object.assign(Object.assign({},S),{transform:w(0,1)}),T=Object.assign(Object.assign({},S),{default:1}),E=t=>({test:e=>j(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),C=E("deg"),P=E("%"),k=E("px"),I=E("vh"),F=E("vw"),R=Object.assign(Object.assign({},P),{parse:t=>P.parse(t)/100,transform:t=>P.transform(100*t)}),D=(t,e)=>n=>Boolean(j(n)&&x.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),B=(t,e,n)=>r=>{if(!j(r))return r;const[o,s,i,a]=r.match(A);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(i),alpha:void 0!==a?parseFloat(a):1}},L={test:D("hsl","hue"),parse:B("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+P.transform(O(e))+", "+P.transform(O(n))+", "+O(M.transform(r))+")"},U=w(0,255),N=Object.assign(Object.assign({},S),{transform:t=>Math.round(U(t))}),$={test:D("rgb","red"),parse:B("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+N.transform(t)+", "+N.transform(e)+", "+N.transform(n)+", "+O(M.transform(r))+")"};const Y={test:D("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:$.transform},z={test:t=>$.test(t)||Y.test(t)||L.test(t),parse:t=>$.test(t)?$.parse(t):L.test(t)?L.parse(t):Y.parse(t),transform:t=>j(t)?t:t.hasOwnProperty("red")?$.transform(t):L.transform(t)};function X(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(V);r&&(n=r.length,t=t.replace(V,"${c}"),e.push(...r.map(z.parse)));const o=t.match(A);return o&&(t=t.replace(A,"${n}"),e.push(...o.map(S.parse))),{values:e,numColors:n,tokenised:t}}function H(t){return X(t).values}function W(t){const{values:e,numColors:n,tokenised:r}=X(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?z.transform(t[r]):O(t[r]));return e}}const Z=t=>"number"==typeof t?0:t;const q={test:function(t){var e,n,r,o;return isNaN(t)&&j(t)&&(null!==(n=null===(e=t.match(A))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(V))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:H,createTransformer:W,getAnimatableNone:function(t){const e=H(t);return W(t)(e.map(Z))}},K=new Set(["brightness","contrast","saturate","opacity"]);function G(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(A)||[];if(!r)return t;const o=n.replace(r,"");let s=K.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+o+")"}const J=/([a-z-]*)\(.*?\)/g,_=Object.assign(Object.assign({},q),{getAnimatableNone:t=>{const e=t.match(J);return e?e.map(G).join(" "):t}});function Q(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function tt({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,s=0,i=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;o=Q(a,r,t+1/3),s=Q(a,r,t),i=Q(a,r,t-1/3)}else o=s=i=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*i),alpha:r}}const et=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},nt=[Y,$,L],rt=t=>nt.find(e=>e.test(t)),ot=(t,e)=>{let n=rt(t),r=rt(e),o=n.parse(t),s=r.parse(e);n===L&&(o=tt(o),n=$),r===L&&(s=tt(s),r=$);const i=Object.assign({},o);return t=>{for(const e in i)"alpha"!==e&&(i[e]=et(o[e],s[e],t));return i.alpha=b(o.alpha,s.alpha,t),n.transform(i)}},st=(t,e)=>n=>e(t(n)),it=(...t)=>t.reduce(st);function at(t,e){return"number"==typeof t?n=>b(t,e,n):z.test(t)?ot(t,e):dt(t,e)}const lt=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>at(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},ut=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=at(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function ct(t){const e=q.parse(t),n=e.length;let r=0,o=0,s=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:void 0!==e[t].hue?s++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:s}}const dt=(t,e)=>{const n=q.createTransformer(e),r=ct(t),o=ct(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?it(lt(r.parsed,o.parsed),n):n=>""+(n>0?e:t)},ft=(t,e)=>n=>b(t,e,n);function pt(t,e,n){const r=[],o=n||("number"==typeof(s=t[0])?ft:"string"==typeof s?z.test(s)?ot:dt:Array.isArray(s)?lt:"object"==typeof s?ut:void 0);var s;const i=t.length-1;for(let n=0;n<i;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=it(t,s)}r.push(s)}return r}function mt(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const s=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const i=pt(e,r,o),a=2===s?function([t,e],[n]){return r=>n(y(t,e,r))}(t,i):function(t,e){const n=t.length,r=n-1;return o=>{let s=0,i=!1;if(o<=t[0]?i=!0:o>=t[r]&&(s=r-1,i=!0),!i){let e=1;for(;e<n&&!(t[e]>o||e===r);e++);s=e-1}const a=y(t[s],t[s+1],o);return e[s](a)}}(t,i);return n?e=>a(c(t[0],t[s-1],e)):a}const ht=t=>e=>1-t(1-e),gt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,vt=t=>e=>e*e*((t+1)*e-t),yt=t=>t,bt=(wt=2,t=>Math.pow(t,wt));var wt;const Ot=ht(bt),At=gt(bt),Vt=t=>1-Math.sin(Math.acos(t)),xt=ht(Vt),jt=gt(xt),St=vt(1.525),Mt=ht(St),Tt=gt(St),Et=(t=>{const e=vt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),Ct=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Pt=ht(Ct);function kt(t,e){return t.map(()=>e||At).splice(0,t.length-1)}function It({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const s={done:!1,value:t},i=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(r&&r.length===i.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(i),o);function l(){return mt(a,i,{ease:Array.isArray(n)?n:kt(i,n)})}let u=l();return{next:t=>(s.value=u(t),s.done=t>=o,s),flipTarget:()=>{i.reverse(),u=l()}}}const Ft={keyframes:It,spring:g,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:s}){const i={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===s?l:s(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/r);return i.done=!(e>o||e<-o),i.value=i.done?u:u+e,i},flipTarget:()=>{}}}};const Rt="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Dt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Rt()),1/60*1e3);let Bt=!0,Lt=!1,Ut=!1;const Nt={delta:0,timestamp:0},$t=["read","update","preRender","render","postRender"],Yt=$t.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const l=a&&o,u=l?e:n;return s&&i.add(t),-1===u.indexOf(t)&&(u.push(t),l&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),i.delete(t)},process:l=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(l),i.has(r)&&(a.schedule(r),t())}o=!1,s&&(s=!1,a.process(l))}}};return a}(()=>Lt=!0),t),{}),zt=$t.reduce((t,e)=>{const n=Yt[e];return t[e]=(t,e=!1,r=!1)=>(Lt||Zt(),n.schedule(t,e,r)),t},{}),Xt=$t.reduce((t,e)=>(t[e]=Yt[e].cancel,t),{});$t.reduce((t,e)=>(t[e]=()=>Yt[e].process(Nt),t),{});const Ht=t=>Yt[t].process(Nt),Wt=t=>{Lt=!1,Nt.delta=Bt?1/60*1e3:Math.max(Math.min(t-Nt.timestamp,40),1),Nt.timestamp=t,Ut=!0,$t.forEach(Ht),Ut=!1,Lt&&(Bt=!1,Dt(Wt))},Zt=()=>{Lt=!0,Bt=!0,Ut||Dt(Wt)},qt=()=>Nt;function Kt(t,e,n=0){return t-e-n}const Gt=t=>{const e=({delta:e})=>t(e);return{start:()=>zt.update(e,!0),stop:()=>Xt.update(e)}};function Jt(t){var e,n,{from:r,autoplay:o=!0,driver:s=Gt,elapsed:i=0,repeat:l=0,repeatType:u="loop",repeatDelay:c=0,onPlay:d,onStop:f,onComplete:p,onRepeat:m,onUpdate:h}=t,v=a(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let y,b,w,{to:O}=v,A=0,V=v.duration,x=!1,j=!0;const S=function(t){if(Array.isArray(t.to))return It;if(Ft[t.type])return Ft[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?It:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?g:It}(v);(null===(n=(e=S).needsInterpolation)||void 0===n?void 0:n.call(e,r,O))&&(w=mt([0,100],[r,O],{clamp:!1}),r=0,O=100);const M=S(Object.assign(Object.assign({},v),{from:r,to:O}));function T(){A++,"reverse"===u?(j=A%2==0,i=function(t,e,n=0,r=!0){return r?Kt(e+-t,e,n):e-(t-e)+n}(i,V,c,j)):(i=Kt(i,V,c),"mirror"===u&&M.flipTarget()),x=!1,m&&m()}function E(t){if(j||(t=-t),i+=t,!x){const t=M.next(Math.max(0,i));b=t.value,w&&(b=w(b)),x=j?t.done:i<=0}null==h||h(b),x&&(0===A&&(null!=V||(V=i)),A<l?function(t,e,n,r){return r?t>=e+n:t<=-n}(i,V,c,j)&&T():(y.stop(),p&&p()))}return o&&(null==d||d(),y=s(E),y.start()),{stop:()=>{null==f||f(),y.stop()}}}function _t(t,e){return e?t*(1e3/e):0}const Qt=(t,e)=>1-3*e+3*t,te=(t,e)=>3*e-6*t,ee=t=>3*t,ne=(t,e,n)=>((Qt(e,n)*t+te(e,n))*t+ee(e))*t,re=(t,e,n)=>3*Qt(e,n)*t*t+2*te(e,n)*t+ee(e);function oe(t,e,n,r){if(t===e&&n===r)return yt;const o=new Float32Array(11);for(let e=0;e<11;++e)o[e]=ne(.1*e,t,n);function s(e){let r=0,s=1;for(;10!==s&&o[s]<=e;++s)r+=.1;--s;const i=r+.1*((e-o[s])/(o[s+1]-o[s])),a=re(i,t,n);return a>=.001?function(t,e,n,r){for(let o=0;o<8;++o){const o=re(e,n,r);if(0===o)return e;e-=(ne(e,n,r)-t)/o}return e}(e,i,t,n):0===a?i:function(t,e,n,r,o){let s,i,a=0;do{i=e+(n-e)/2,s=ne(i,r,o)-t,s>0?n=i:e=i}while(Math.abs(s)>1e-7&&++a<10);return i}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:ne(s(t),e,r)}const se=t=>1e3*t,ie={linear:yt,easeIn:bt,easeInOut:At,easeOut:Ot,circIn:Vt,circInOut:jt,circOut:xt,backIn:St,backInOut:Tt,backOut:Mt,anticipate:Et,bounceIn:Pt,bounceInOut:t=>t<.5?.5*(1-Ct(1-2*t)):.5*Ct(2*t-1)+.5,bounceOut:Ct},ae=t=>{if(Array.isArray(t)){t.length;const[e,n,r,o]=t;return oe(e,n,r,o)}return"string"==typeof t?ie[t]:t},le=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!q.test(e)||e.startsWith("url("))),ue=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),ce=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),de=()=>({type:"keyframes",ease:"linear",duration:.3}),fe=t=>({type:"keyframes",duration:.8,values:t}),pe={x:ue,y:ue,z:ue,rotate:ue,rotateX:ue,rotateY:ue,rotateZ:ue,scaleX:ce,scaleY:ce,scale:ce,opacity:de,backgroundColor:de,color:de,default:ce},me=Object.assign(Object.assign({},S),{transform:Math.round}),he={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,size:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,rotate:C,rotateX:C,rotateY:C,rotateZ:C,scale:T,scaleX:T,scaleY:T,scaleZ:T,skew:C,skewX:C,skewY:C,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:M,originX:R,originY:R,originZ:k,zIndex:me,fillOpacity:M,strokeOpacity:M,numOctaves:me},ge=Object.assign(Object.assign({},he),{color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:_,WebkitFilter:_}),ve=t=>ge[t];function ye(t,e){var n;let r=ve(t);return r!==_&&(r=q),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}const be=!1,we=t=>l(t)?t[t.length-1]||0:t;function Oe(t){var{ease:e,times:n,yoyo:r,flip:o,loop:s}=t,i=a(t,["ease","times","yoyo","flip","loop"]);const l=Object.assign({},i);return n&&(l.offset=n),i.duration&&(l.duration=se(i.duration)),i.repeatDelay&&(l.repeatDelay=se(i.repeatDelay)),e&&(l.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(ae):ae(e)),"tween"===i.type&&(l.type="keyframes"),(r||s||o)&&(r?l.repeatType="reverse":s?l.repeatType="loop":o&&(l.repeatType="mirror"),l.repeat=s||r||o||i.repeat),"spring"!==i.type&&(l.type="keyframes"),l}function Ae(t,e,n){var r;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function(t){var e=a(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Object.assign(Object.assign({},t),((t,e)=>{let n;return n=l(e)?fe:pe[t]||pe.default,Object.assign({to:e},n(e))})(n,e.to))),Object.assign(Object.assign({},e),Oe(t))}function Ve(t,e,n,r,o){var s;const i=Se(r,t);let a=null!==(s=i.from)&&void 0!==s?s:e.get();const l=le(t,n);"none"===a&&l&&"string"==typeof n?a=ye(t,n):xe(a)&&"string"==typeof n?a=je(n):!Array.isArray(n)&&xe(n)&&"string"==typeof a&&(n=je(a));return le(t,a)&&l&&!1!==i.type?function(){const r={from:a,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:t=>e.set(t)};return"inertia"===i.type||"decay"===i.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:s=750,bounceStiffness:i=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:p}){let m;function h(t){return void 0!==n&&t<n||void 0!==r&&t>r}function g(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function v(t){null==m||m.stop(),m=Jt(Object.assign(Object.assign({},t),{driver:c,onUpdate:e=>{var n;null==d||d(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:f,onStop:p}))}function y(t){v(Object.assign({type:"spring",stiffness:i,damping:a,restDelta:l},t))}if(h(t))y({from:t,velocity:e,to:g(t)});else{let r=o*e+t;void 0!==u&&(r=u(r));const i=g(r),a=i===n?-1:1;let c,d;const f=t=>{c=d,d=t,e=_t(t-c,qt().delta),(1===a&&t>i||-1===a&&t<i)&&y({from:t,to:i,velocity:e})};v({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:l,modifyTarget:u,onUpdate:h(r)?f:void 0})}return{stop:()=>null==m?void 0:m.stop()}}(Object.assign(Object.assign({},r),i)):Jt(Object.assign(Object.assign({},Ae(i,r,t)),{onUpdate:t=>{var e;r.onUpdate(t),null===(e=i.onUpdate)||void 0===e||e.call(i,t)},onComplete:()=>{var t;r.onComplete(),null===(t=i.onComplete)||void 0===t||t.call(i)}}))}:function(){var t,r;const s=we(n);return e.set(s),o(),null===(t=null==i?void 0:i.onUpdate)||void 0===t||t.call(i,s),null===(r=null==i?void 0:i.onComplete)||void 0===r||r.call(i),{stop:()=>{}}}}function xe(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function je(t){return"number"==typeof t?0:ye("",t)}function Se(t,e){return t[e]||t.default||t}function Me(t,e,n,r={}){return be&&(r={type:!1}),e.start(o=>{let s,i;const a=Ve(t,e,n,r,o),l=function(t,e){var n,r;return null!==(r=null!==(n=(Se(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),u=()=>i=a();return l?s=window.setTimeout(u,se(l)):u(),()=>{clearTimeout(s),null==i||i.stop()}})}const Te=t=>/^0[^.\s]+$/.test(t);class Ee{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Ce{constructor(t){var e;this.version="7.1.2",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ee,this.velocityUpdateSubscribers=new Ee,this.renderSubscribers=new Ee,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:r}=qt();this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,zt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>zt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?_t(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Pe(t){return new Ce(t)}const ke=t=>e=>e.test(t),Ie=[S,k,P,C,F,I,{test:t=>"auto"===t,parse:t=>t}],Fe=t=>Ie.find(ke(t)),Re=[...Ie,z,q],De=t=>Re.find(ke(t));function Be(t){return Array.isArray(t)}function Le(t){return"string"==typeof t||Be(t)}function Ue(t,e,n){const r=t.getProps();return function(t,e,n,r={},o={}){var s;return"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),"string"==typeof e&&(e=null===(s=t.variants)||void 0===s?void 0:s[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),e}(r,e,null!=n?n:r.custom,function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.getVelocity()),e}(t))}function Ne(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Le(t.initial)||Le(t.animate)||Le(t.whileHover)||Le(t.whileDrag)||Le(t.whileTap)||Le(t.whileFocus)||Le(t.exit)}function $e(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Pe(n))}function Ye(t,e){if(!e)return;return(e[t]||e.default||e).from}const ze=["","X","Y","Z"],Xe=["transformPerspective","x","y","z"];function He(t,e){return Xe.indexOf(t)-Xe.indexOf(e)}["translate","scale","rotate","skew"].forEach(t=>ze.forEach(e=>Xe.push(t+e)));const We=new Set(Xe);function Ze(t){return We.has(t)}const qe=new Set(["originX","originY","originZ"]);function Ke(t){return qe.has(t)}const Ge=t=>Boolean(null!==t&&"object"==typeof t&&t.getVelocity);function Je(t){return Boolean(Ge(t)&&t.add)}function _e(t,e,n={}){var r;const o=Ue(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Qe(t,o,n):()=>Promise.resolve(),a=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:a}=s;return function(t,e,n=0,r=0,o=1,s){const i=[],a=(t.variantChildren.size-1)*r,l=1===o?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(tn).forEach((t,r)=>{i.push(_e(t,e,Object.assign(Object.assign({},s),{delay:n+l(r)})).then(()=>t.notifyAnimationComplete(e)))}),Promise.all(i)}(t,e,o+r,i,a,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[t,e]="beforeChildren"===l?[i,a]:[a,i];return t().then(e)}return Promise.all([i(),a(n.delay)])}function Qe(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var s;let i=t.makeTargetAnimatable(e),{transition:l=t.getDefaultTransition(),transitionEnd:u}=i,c=a(i,["transition","transitionEnd"]);const d=t.getValue("willChange");r&&(l=r);const f=[],p=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in c){const r=t.getValue(e),o=c[e];if(!r||void 0===o||p&&en(p,e))continue;let s=Object.assign({delay:n},l);t.shouldReduceMotion&&Ze(e)&&(s=Object.assign(Object.assign({},s),{type:!1,delay:0}));let i=Me(e,r,o,s);Je(d)&&(d.add(e),i=i.then(()=>d.remove(e))),f.push(i)}return Promise.all(f).then(()=>{u&&function(t,e){const n=Ue(t,e);let r=n?t.makeTargetAnimatable(n,!1):{},{transitionEnd:o={},transition:s={}}=r,i=a(r,["transitionEnd","transition"]);i=Object.assign(Object.assign({},i),o);for(const e in i){$e(t,e,we(i[e]))}}(t,u)})}function tn(t,e){return t.sortNodePosition(e)}function en({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}var nn;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(nn||(nn={}));const rn=[nn.Animate,nn.InView,nn.Focus,nn.Hover,nn.Tap,nn.Drag,nn.Exit],on=[...rn].reverse(),sn=rn.length;function an(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notifyAnimationStart(e),Array.isArray(e)){const o=e.map(e=>_e(t,e,n));r=Promise.all(o)}else if("string"==typeof e)r=_e(t,e,n);else{const o="function"==typeof e?Ue(t,e,n.custom):e;r=Qe(t,o,n)}return r.then(()=>t.notifyAnimationComplete(e))}(t,e,n)))}function ln(t){let e=an(t);const n={[nn.Animate]:cn(!0),[nn.InView]:cn(),[nn.Hover]:cn(),[nn.Tap]:cn(),[nn.Drag]:cn(),[nn.Focus]:cn(),[nn.Exit]:cn()};let r=!0;const o=(e,n)=>{const r=Ue(t,n);if(r){const{transition:t,transitionEnd:n}=r,o=a(r,["transition","transitionEnd"]);e=Object.assign(Object.assign(Object.assign({},e),o),n)}return e};function i(i,a){var c;const d=t.getProps(),f=t.getVariantContext(!0)||{},p=[],m=new Set;let h={},g=1/0;for(let e=0;e<sn;e++){const v=on[e],y=n[v],b=null!==(c=d[v])&&void 0!==c?c:f[v],w=Le(b),O=v===a?y.isActive:null;!1===O&&(g=e);let A=b===f[v]&&b!==d[v]&&w;if(A&&r&&t.manuallyAnimateOnMount&&(A=!1),y.protectedKeys=Object.assign({},h),!y.isActive&&null===O||!b&&!y.prevProp||s(b)||"boolean"==typeof b)continue;const V=un(y.prevProp,b);let x=V||v===a&&y.isActive&&!A&&w||e>g&&w;const j=Array.isArray(b)?b:[b];let S=j.reduce(o,{});!1===O&&(S={});const{prevResolvedValues:M={}}=y,T=Object.assign(Object.assign({},M),S),E=t=>{x=!0,m.delete(t),y.needsAnimating[t]=!0};for(const t in T){const e=S[t],n=M[t];h.hasOwnProperty(t)||(e!==n?l(e)&&l(n)?!u(e,n)||V?E(t):y.protectedKeys[t]=!0:void 0!==e?E(t):m.add(t):void 0!==e&&m.has(t)?E(t):y.protectedKeys[t]=!0)}y.prevProp=b,y.prevResolvedValues=S,y.isActive&&(h=Object.assign(Object.assign({},h),S)),r&&t.blockInitialAnimation&&(x=!1),x&&!A&&p.push(...j.map(t=>({animation:t,options:Object.assign({type:v},i)})))}if(m.size){const e={};m.forEach(n=>{const r=t.getBaseTarget(n);void 0!==r&&(e[n]=r)}),p.push({animation:e})}let v=Boolean(p.length);return r&&!1===d.initial&&!t.manuallyAnimateOnMount&&(v=!1),r=!1,v?e(p):Promise.resolve()}return{animateChanges:i,setActive:function(e,r,o){var s;if(n[e].isActive===r)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)}),n[e].isActive=r;const a=i(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function un(t,e){return"string"==typeof e?e!==t:!!Be(e)&&!u(e,t)}function cn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const dn=t=>e=>(t(e),null),fn={animation:dn(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=ln(t)),s(e)&&r(()=>e.subscribe(t),[e])}),exit:dn(t=>{const{custom:o,visualElement:s}=t,[a,l]=function(){const t=e(i);if(null===t)return[!0,null];const{isPresent:o,onExitComplete:s,register:a}=t,l=n();return r(()=>a(l),[]),!o&&s?[!1,()=>null==s?void 0:s(l)]:[!0]}(),u=e(i);r(()=>{var t,e;s.isPresent=a;const n=null===(t=s.animationState)||void 0===t?void 0:t.setActive(nn.Exit,!a,{custom:null!==(e=null==u?void 0:u.custom)&&void 0!==e?e:o});!a&&(null==n||n.then(l))},[a])})};function pn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function mn(t,e,n,o){r(()=>{const r=t.current;if(n&&r)return pn(r,e,n,o)},[t,e,n,o])}function hn(t){return!!t.touches}const gn={pageX:0,pageY:0};function vn(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||gn;return{x:n[e+"X"],y:n[e+"Y"]}}function yn(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}const bn=(t,e=!1)=>{const n=e=>t(e,function(t,e="page"){return{point:hn(t)?vn(t,e):yn(t,e)}}(e));return e?(r=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&r(t)}):n;var r},wn="undefined"!=typeof document,On={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},An={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Vn(t){return wn&&null===window.onpointerdown?t:wn&&null===window.ontouchstart?An[t]:wn&&null===window.onmousedown?On[t]:t}function xn(t,e,n,r){return pn(t,Vn(e),bn(n,"pointerdown"===e),r)}function jn(t,e,n,r){return mn(t,Vn(e),n&&bn(n,"pointerdown"===e),r)}function Sn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Mn=Sn("dragHorizontal"),Tn=Sn("dragVertical");function En(){const t=function(t){let e=!1;if("y"===t)e=Tn();else if("x"===t)e=Mn();else{const t=Mn(),n=Tn();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function Cn(t,e,n){return(r,o)=>{var s;(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!En()&&(null===(s=t.animationState)||void 0===s||s.setActive(nn.Hover,e),null==n||n(r,o))}}const Pn=(t,e)=>!!e&&(t===e||Pn(t,e.parentElement));const kn=("undefined"==typeof process||process.env,"production"),In=new Set;const Fn=new WeakMap,Rn=new WeakMap,Dn=t=>{var e;null===(e=Fn.get(t.target))||void 0===e||e(t)},Bn=t=>{t.forEach(Dn)};function Ln(t,e,n){const r=function(t){var{root:e}=t,n=a(t,["root"]);const r=e||document;Rn.has(r)||Rn.set(r,{});const o=Rn.get(r),s=JSON.stringify(n);return o[s]||(o[s]=new IntersectionObserver(Bn,Object.assign({root:e},n))),o[s]}(e);return Fn.set(t,n),r.observe(t),()=>{Fn.delete(t),r.unobserve(t)}}const Un={some:0,all:1};function Nn(t,e,n,{root:o,margin:s,amount:i="some",once:a}){r(()=>{if(!t)return;const r={root:null==o?void 0:o.current,rootMargin:s,threshold:"number"==typeof i?i:Un[i]};return Ln(n.getInstance(),r,t=>{var r;const{isIntersecting:o}=t;if(e.isInView===o)return;if(e.isInView=o,a&&!o&&e.hasEnteredView)return;o&&(e.hasEnteredView=!0),null===(r=n.animationState)||void 0===r||r.setActive(nn.InView,o);const s=n.getProps(),i=o?s.onViewportEnter:s.onViewportLeave;null==i||i(t)})},[t,o,s,i])}function $n(t,e,n,{fallback:o=!0}){r(()=>{var r,s;t&&o&&("production"!==kn&&(r="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||In.has(r)||(console.warn(r),s&&console.warn(s),In.add(r))),requestAnimationFrame(()=>{var t;e.hasEnteredView=!0;const{onViewportEnter:r}=n.getProps();null==r||r(null),null===(t=n.animationState)||void 0===t||t.setActive(nn.InView,!0)}))},[t])}const Yn={inView:dn((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:r,viewport:s={}}){const i=o({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||r);s.once&&i.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?$n:Nn)(a,i.current,t,s)})),tap:dn((function({onTap:t,onTapStart:e,onTapCancel:n,whileTap:s,visualElement:i}){const a=t||e||n||s,l=o(!1),u=o(null),c={passive:!(e||t||n||h)};function d(){var t;null===(t=u.current)||void 0===t||t.call(u),u.current=null}function f(){var t;return d(),l.current=!1,null===(t=i.animationState)||void 0===t||t.setActive(nn.Tap,!1),!En()}function p(e,r){f()&&(Pn(i.getInstance(),e.target)?null==t||t(e,r):null==n||n(e,r))}function m(t,e){f()&&(null==n||n(t,e))}function h(t,n){var r;d(),l.current||(l.current=!0,u.current=it(xn(window,"pointerup",p,c),xn(window,"pointercancel",m,c)),null===(r=i.animationState)||void 0===r||r.setActive(nn.Tap,!0),null==e||e(t,n))}var g;jn(i,"pointerdown",a?h:void 0,c),g=d,r(()=>()=>g(),[])})),focus:dn((function({whileFocus:t,visualElement:e}){mn(e,"focus",t?()=>{var t;null===(t=e.animationState)||void 0===t||t.setActive(nn.Focus,!0)}:void 0),mn(e,"blur",t?()=>{var t;null===(t=e.animationState)||void 0===t||t.setActive(nn.Focus,!1)}:void 0)})),hover:dn((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:r}){jn(r,"pointerenter",t||n?Cn(r,!0,t):void 0,{passive:!t}),jn(r,"pointerleave",e||n?Cn(r,!1,e):void 0,{passive:!e})}))},zn=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];const Xn=({treeType:t="",build:e,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:o,render:s,readValueFromInstance:i,removeValueFromRenderState:l,sortNodePosition:u,scrapeMotionValuesFromProps:c})=>({parent:d,props:f,presenceId:p,blockInitialAnimation:m,visualState:h,shouldReduceMotion:g},v={})=>{let y=!1;const{latestValues:b,renderState:w}=h;let O;const A=function(){const t=zn.map(()=>new Ee),e={},n={clearAllListeners:()=>t.forEach(t=>t.clear()),updatePropListeners:t=>{zn.forEach(r=>{var o;const s="on"+r,i=t[s];null===(o=e[r])||void 0===o||o.call(e),i&&(e[r]=n[s](i))})}};return t.forEach((t,e)=>{n["on"+zn[e]]=e=>t.add(e),n["notify"+zn[e]]=(...e)=>t.notify(...e)}),n}(),V=new Map,x=new Map;let j={};const S=Object.assign({},b);let M;function T(){O&&y&&(E(),s(O,w,f.style,B.projection))}function E(){e(B,w,b,v,f)}function C(){A.notifyUpdate(b)}function P(t,e){const n=e.onChange(e=>{b[t]=e,f.onUpdate&&zt.update(C,!1,!0)}),r=e.onRenderRequest(B.scheduleRender);x.set(t,()=>{n(),r()})}const k=c(f),{willChange:I}=k,F=a(k,["willChange"]);for(const t in F){const e=F[t];void 0!==b[t]&&Ge(e)&&(e.set(b[t],!1),Je(I)&&I.add(t))}const R=Ne(f),D=function(t){return Boolean(Ne(t)||t.variants)}(f),B=Object.assign(Object.assign({treeType:t,current:null,depth:d?d.depth+1:0,parent:d,children:new Set,presenceId:p,shouldReduceMotion:g,variantChildren:D?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==d?void 0:d.isMounted()),blockInitialAnimation:m,isMounted:()=>Boolean(O),mount(t){y=!0,O=B.current=t,B.projection&&B.projection.mount(t),D&&d&&!R&&(M=null==d?void 0:d.addVariantChild(B)),V.forEach((t,e)=>P(e,t)),null==d||d.children.add(B),B.setProps(f)},unmount(){var t;null===(t=B.projection)||void 0===t||t.unmount(),Xt.update(C),Xt.render(T),x.forEach(t=>t()),null==M||M(),null==d||d.children.delete(B),A.clearAllListeners(),O=void 0,y=!1},addVariantChild(t){var e;const n=B.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)},sortNodePosition:e=>u&&t===e.treeType?u(B.getInstance(),e.getInstance()):0,getClosestVariantNode:()=>D?B:null==d?void 0:d.getClosestVariantNode(),getLayoutId:()=>f.layoutId,getInstance:()=>O,getStaticValue:t=>b[t],setStaticValue:(t,e)=>b[t]=e,getLatestValues:()=>b,setVisibility(t){B.isVisible!==t&&(B.isVisible=t,B.scheduleRender())},makeTargetAnimatable:(t,e=!0)=>r(B,t,f,e),measureViewportBox:()=>o(O,f),addValue(t,e){B.hasValue(t)&&B.removeValue(t),V.set(t,e),b[t]=e.get(),P(t,e)},removeValue(t){var e;V.delete(t),null===(e=x.get(t))||void 0===e||e(),x.delete(t),delete b[t],l(t,w)},hasValue:t=>V.has(t),getValue(t,e){let n=V.get(t);return void 0===n&&void 0!==e&&(n=Pe(e),B.addValue(t,n)),n},forEachValue:t=>V.forEach(t),readValue:t=>{var e;return null!==(e=b[t])&&void 0!==e?e:i(O,t,v)},setBaseTarget(t,e){S[t]=e},getBaseTarget(t){if(n){const e=n(f,t);if(void 0!==e&&!Ge(e))return e}return S[t]}},A),{build:()=>(E(),w),scheduleRender(){zt.render(T,!1,!0)},syncRender:T,setProps(t){(t.transformTemplate||f.transformTemplate)&&B.scheduleRender(),f=t,A.updatePropListeners(t),j=function(t,e,n){var r;const{willChange:o}=e;for(const s in e){const i=e[s],a=n[s];if(Ge(i))t.addValue(s,i),Je(o)&&o.add(s);else if(Ge(a))t.addValue(s,Pe(i)),Je(o)&&o.remove(s);else if(a!==i)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(i)}else t.addValue(s,Pe(null!==(r=t.getStaticValue(s))&&void 0!==r?r:i))}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(B,c(f),j)},getProps:()=>f,getVariant:t=>{var e;return null===(e=f.variants)||void 0===e?void 0:e[t]},getDefaultTransition:()=>f.transition,getTransformPagePoint:()=>f.transformPagePoint,getVariantContext(t=!1){if(t)return null==d?void 0:d.getVariantContext();if(!R){const t=(null==d?void 0:d.getVariantContext())||{};return void 0!==f.initial&&(t.initial=f.initial),t}const e={};for(let t=0;t<Wn;t++){const n=Hn[t],r=f[n];(Le(r)||!1===r)&&(e[n]=r)}return e}});return B},Hn=["initial",...rn],Wn=Hn.length,Zn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function qn(t){return t.startsWith("--")}const Kn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Gn(t,e,n,r){var o;const{style:s,vars:i,transform:a,transformKeys:l,transformOrigin:u}=t;l.length=0;let c=!1,d=!1,f=!0;for(const t in e){const n=e[t];if(qn(t)){i[t]=n;continue}const r=he[t],p=Kn(n,r);if(Ze(t)){if(c=!0,a[t]=p,l.push(t),!f)continue;n!==(null!==(o=r.default)&&void 0!==o?o:0)&&(f=!1)}else Ke(t)?(u[t]=p,d=!0):s[t]=p}c?s.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},o,s){let i="";e.sort(He);let a=!1;const l=e.length;for(let n=0;n<l;n++){const r=e[n];i+=`${Zn[r]||r}(${t[r]}) `,"z"===r&&(a=!0)}return!a&&n&&(i+="translateZ(0)"),i=i.trim(),s?i=s(t,o?"":i):r&&o&&(i="none"),i}(t,n,f,r):r?s.transform=r({},""):!e.transform&&s.transform&&(s.transform="none"),d&&(s.transformOrigin=function({originX:t="50%",originY:e="50%",originZ:n=0}){return`${t} ${e} ${n}`}(u))}function Jn(t){return"string"==typeof t&&t.startsWith("var(--")}const _n=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Qn(t,e,n=1){const[r,o]=function(t){const e=_n.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);return s?s.trim():Jn(o)?Qn(o,e,n+1):o}const tr=new Set(["width","height","top","left","right","bottom","x","y"]),er=t=>tr.has(t),nr=(t,e)=>{t.set(e,!1),t.set(e)},rr=t=>t===S||t===k;var or;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(or||(or={}));const sr=(t,e)=>parseFloat(t.split(", ")[e]),ir=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return sr(o[1],e);{const e=r.match(/^matrix\((.+)\)$/);return e?sr(e[1],t):0}},ar=new Set(["x","y","z"]),lr=Xe.filter(t=>!ar.has(t));const ur={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:ir(4,13),y:ir(5,14)},cr=(t,e,n={},r={})=>{e=Object.assign({},e),r=Object.assign({},r);const o=Object.keys(e).filter(er);let s=[],i=!1;const a=[];if(o.forEach(o=>{const u=t.getValue(o);if(!t.hasValue(o))return;let c=n[o],d=Fe(c);const f=e[o];let p;if(l(f)){const t=f.length,e=null===f[0]?1:0;c=f[e],d=Fe(c);for(let n=e;n<t;n++)p?Fe(f[n]):p=Fe(f[n])}else p=Fe(f);if(d!==p)if(rr(d)&&rr(p)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof f?e[o]=parseFloat(f):Array.isArray(f)&&p===k&&(e[o]=f.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==p?void 0:p.transform)&&(0===c||0===f)?0===c?u.set(p.transform(c)):e[o]=d.transform(f):(i||(s=function(t){const e=[];return lr.forEach(n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}(t),i=!0),a.push(o),r[o]=void 0!==r[o]?r[o]:e[o],nr(u,f))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const r=e.measureViewportBox(),o=e.getInstance(),s=getComputedStyle(o),{display:i}=s,a={};"none"===i&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=ur[t](r,s)}),e.syncRender();const l=e.measureViewportBox();return n.forEach(n=>{const r=e.getValue(n);nr(r,a[n]),t[n]=ur[n](l,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.syncRender(),wn&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:e,transitionEnd:r}};function dr(t,e,n,r){return(t=>Object.keys(t).some(er))(e)?cr(t,e,n,r):{target:e,transitionEnd:r}}const fr=(t,e,n,r)=>{const o=function(t,e,n){var r,o=a(e,[]);const s=t.getInstance();if(!(s instanceof Element))return{target:o,transitionEnd:n};n&&(n=Object.assign({},n)),t.forEachValue(t=>{const e=t.get();if(!Jn(e))return;const n=Qn(e,s);n&&t.set(n)});for(const t in o){const e=o[t];if(!Jn(e))continue;const i=Qn(e,s);i&&(o[t]=i,n&&(null!==(r=n[t])&&void 0!==r||(n[t]=e)))}return{target:o,transitionEnd:n}}(t,e,r);return dr(t,e=o.target,n,r=o.transitionEnd)},pr={};function mr(t,{layout:e,layoutId:n}){return Ze(t)||Ke(t)||(e||void 0!==n)&&(!!pr[t]||"opacity"===t)}function hr(t){const{style:e}=t,n={};for(const r in e)(Ge(e[r])||mr(r,t))&&(n[r]=e[r]);return n}function gr(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const e in n)t.style.setProperty(e,n[e])}const vr={treeType:"dom",readValueFromInstance(t,e){if(Ze(e)){const t=ve(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),o=(qn(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof o?o.trim():o}var n},sortNodePosition:(t,e)=>2&t.compareDocumentPosition(e)?1:-1,getBaseTarget(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox(t,{transformPagePoint:e}){return n=e,function({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),n));var n},resetTransform(t,e,n){const{transformTemplate:r}=n;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform(t,e){t.style.transform=e.style.transform},removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]},makeTargetAnimatable(t,e,n,r){var{transition:o,transitionEnd:s}=e,i=a(e,["transition","transitionEnd"]),l=n.transformValues;void 0===r&&(r=!0);let u=function(t,e,n){var r,o;const s={};for(const i in t)s[i]=null!==(r=Ye(i,e))&&void 0!==r?r:null===(o=n.getValue(i))||void 0===o?void 0:o.get();return s}(i,o||{},t);if(l&&(s&&(s=l(s)),i&&(i=l(i)),u&&(u=l(u))),r){!function(t,e,n){var r,o,s,i;const a=Object.keys(e).filter(e=>!t.hasValue(e)),l=a.length;if(l)for(let u=0;u<l;u++){const l=a[u],c=e[l];let d=null;Array.isArray(c)&&(d=c[0]),null===d&&(d=null!==(o=null!==(r=n[l])&&void 0!==r?r:t.readValue(l))&&void 0!==o?o:e[l]),null!=d&&("string"==typeof d&&(/^\-?\d*\.?\d+$/.test(d)||Te(d))?d=parseFloat(d):!De(d)&&q.test(c)&&(d=ye(l,c)),t.addValue(l,Pe(d)),null!==(s=(i=n)[l])&&void 0!==s||(i[l]=d),t.setBaseTarget(l,d))}}(t,i,u);const e=fr(t,i,u,s);s=e.transitionEnd,i=e.target}return Object.assign({transition:o,transitionEnd:s},i)},scrapeMotionValuesFromProps:hr,build(t,e,n,r,o){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Gn(e,n,r,o.transformTemplate)},render:gr},yr=Xn(vr);function br(t,e,n){return"string"==typeof t?t:k.transform(e+n*t)}const wr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Or={offset:"strokeDashoffset",array:"strokeDasharray"};function Ar(t,e,n,r){var{attrX:o,attrY:s,originX:i,originY:l,pathLength:u,pathSpacing:c=1,pathOffset:d=0}=e;Gn(t,a(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),t.attrs=t.style,t.style={};const{attrs:f,style:p,dimensions:m}=t;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(void 0!==i||void 0!==l||p.transform)&&(p.transformOrigin=function(t,e,n){return`${br(e,t.x,t.width)} ${br(n,t.y,t.height)}`}(m,void 0!==i?i:.5,void 0!==l?l:.5)),void 0!==o&&(f.x=o),void 0!==s&&(f.y=s),void 0!==u&&function(t,e,n=1,r=0,o=!0){t.pathLength=1;const s=o?wr:Or;t[s.offset]=k.transform(-r);const i=k.transform(e),a=k.transform(n);t[s.array]=`${i} ${a}`}(f,u,c,d,!1)}const Vr=/([a-z])([A-Z])/g,xr=t=>t.replace(Vr,"$1-$2").toLowerCase(),jr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);const Sr=Xn(Object.assign(Object.assign({},vr),{getBaseTarget:(t,e)=>t[e],readValueFromInstance(t,e){var n;return Ze(e)?(null===(n=ve(e))||void 0===n?void 0:n.default)||0:(e=jr.has(e)?e:xr(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){const e=hr(t);for(const n in t)if(Ge(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build(t,e,n,r,o){Ar(e,n,r,o.transformTemplate)},render:function(t,e,n,r){gr(t,e,void 0,r);for(const n in e.attrs)t.setAttribute(jr.has(n)?n:xr(n),e.attrs[n])}})),Mr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];const Tr=Object.assign(Object.assign({renderer:(t,e)=>function(t){return"string"==typeof t&&!t.includes("-")&&!!(Mr.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Sr(e,{enableHardwareAcceleration:!1}):yr(e,{enableHardwareAcceleration:!0})},fn),Yn);export{Tr as domAnimation};