framer-motion 10.0.0 → 10.0.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/cjs/index.js +22 -13
- package/dist/es/animation/legacy-popmotion/index.mjs +11 -1
- package/dist/es/animation/waapi/create-accelerated-animation.mjs +1 -1
- package/dist/es/animation/waapi/index.mjs +4 -1
- package/dist/es/context/MotionContext/index.mjs +2 -5
- package/dist/es/index.mjs +1 -1
- package/dist/es/motion/features/definitions.mjs +2 -2
- package/dist/es/motion/utils/use-visual-element.mjs +2 -2
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/es/value/use-inverted-scale.mjs +3 -2
- package/dist/framer-motion.dev.js +22 -13
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/projection.dev.js +20 -7
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation-m.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -1
- package/dist/size-webpack-m.js +1 -1
- package/dist/three-entry.d.ts +7 -2
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -883,7 +883,7 @@ declare type FrameData = {
|
|
|
883
883
|
};
|
|
884
884
|
declare type Process = (data: FrameData) => void;
|
|
885
885
|
declare type Schedule = (process: Process, keepAlive?: boolean, immediate?: boolean) => Process;
|
|
886
|
-
declare type StepId = "read" | "update" | "
|
|
886
|
+
declare type StepId = "read" | "update" | "preRender" | "render" | "postRender";
|
|
887
887
|
declare type Sync = {
|
|
888
888
|
[key in StepId]: Schedule;
|
|
889
889
|
};
|
|
@@ -3711,7 +3711,6 @@ interface MotionContextProps<Instance = unknown> {
|
|
|
3711
3711
|
animate?: string | string[];
|
|
3712
3712
|
}
|
|
3713
3713
|
declare const MotionContext: React$1.Context<MotionContextProps<unknown>>;
|
|
3714
|
-
declare function useVisualElementContext(): VisualElement<unknown, unknown, {}> | undefined;
|
|
3715
3714
|
|
|
3716
3715
|
declare function checkTargetForNewValues(visualElement: VisualElement, target: TargetWithKeyframes, origin: ResolvedValues): void;
|
|
3717
3716
|
|
|
@@ -4408,8 +4407,14 @@ declare function animateValue<V = number>({ duration, driver, elapsed, repeat: r
|
|
|
4408
4407
|
* animate() can't yet be sampled for time, instead it
|
|
4409
4408
|
* consumes time. So to sample it we have to run a low
|
|
4410
4409
|
* temporal-resolution version.
|
|
4410
|
+
*
|
|
4411
|
+
* isControlled should be set to true if sample is being run within
|
|
4412
|
+
* a loop. This indicates that we're not arbitrarily sampling
|
|
4413
|
+
* the animation but running it one step after another. Therefore
|
|
4414
|
+
* we don't need to run a low-res version here. This is a stop-gap
|
|
4415
|
+
* until a rewrite can sample for time.
|
|
4411
4416
|
*/
|
|
4412
|
-
sample: (t: number) => {
|
|
4417
|
+
sample: (t: number, isControlled?: boolean) => {
|
|
4413
4418
|
done: boolean;
|
|
4414
4419
|
value: V;
|
|
4415
4420
|
};
|
|
@@ -4558,4 +4563,4 @@ declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMoti
|
|
|
4558
4563
|
|
|
4559
4564
|
declare const AnimateSharedLayout: React$1.FunctionComponent<React$1.PropsWithChildren<unknown>>;
|
|
4560
4565
|
|
|
4561
|
-
export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$2 as AnimationOptions, AnimationPlaybackControls, AnimationPlaybackOptions, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, ControlsAnimationDefinition, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DecayOptions, DelayedFunction, Delta, DevMessage, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, PlaybackControls, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, SpringOptions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, ValueType, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, inertia, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, scroll, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll,
|
|
4566
|
+
export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$2 as AnimationOptions, AnimationPlaybackControls, AnimationPlaybackOptions, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, ControlsAnimationDefinition, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DecayOptions, DelayedFunction, Delta, DevMessage, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, PlaybackControls, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, SpringOptions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, ValueType, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, inertia, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, scroll, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange, warning, wrap };
|
package/dist/projection.dev.js
CHANGED
|
@@ -1224,9 +1224,19 @@
|
|
|
1224
1224
|
* animate() can't yet be sampled for time, instead it
|
|
1225
1225
|
* consumes time. So to sample it we have to run a low
|
|
1226
1226
|
* temporal-resolution version.
|
|
1227
|
+
*
|
|
1228
|
+
* isControlled should be set to true if sample is being run within
|
|
1229
|
+
* a loop. This indicates that we're not arbitrarily sampling
|
|
1230
|
+
* the animation but running it one step after another. Therefore
|
|
1231
|
+
* we don't need to run a low-res version here. This is a stop-gap
|
|
1232
|
+
* until a rewrite can sample for time.
|
|
1227
1233
|
*/
|
|
1228
|
-
sample: (t) => {
|
|
1234
|
+
sample: (t, isControlled = false) => {
|
|
1229
1235
|
elapsed = initialElapsed;
|
|
1236
|
+
if (isControlled) {
|
|
1237
|
+
update(t);
|
|
1238
|
+
return state;
|
|
1239
|
+
}
|
|
1230
1240
|
const sampleResolution = duration && typeof duration === "number"
|
|
1231
1241
|
? Math.max(duration * 0.5, 50)
|
|
1232
1242
|
: 50;
|
|
@@ -1268,7 +1278,10 @@
|
|
|
1268
1278
|
}
|
|
1269
1279
|
|
|
1270
1280
|
function animateStyle(element, valueName, keyframes, { delay = 0, duration, repeat = 0, repeatType = "loop", ease, times, } = {}) {
|
|
1271
|
-
|
|
1281
|
+
const keyframeOptions = { [valueName]: keyframes };
|
|
1282
|
+
if (times)
|
|
1283
|
+
keyframeOptions.offset = times;
|
|
1284
|
+
return element.animate(keyframeOptions, {
|
|
1272
1285
|
delay,
|
|
1273
1286
|
duration,
|
|
1274
1287
|
easing: mapEasingToNativeEasing(ease),
|
|
@@ -1346,7 +1359,7 @@
|
|
|
1346
1359
|
*/
|
|
1347
1360
|
let t = 0;
|
|
1348
1361
|
while (!state.done && t < 20000) {
|
|
1349
|
-
state = sampleAnimation.sample(t);
|
|
1362
|
+
state = sampleAnimation.sample(t, true);
|
|
1350
1363
|
pregeneratedKeyframes.push(state.value);
|
|
1351
1364
|
t += sampleDelta;
|
|
1352
1365
|
}
|
|
@@ -1979,7 +1992,7 @@
|
|
|
1979
1992
|
* This will be replaced by the build step with the latest version number.
|
|
1980
1993
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1981
1994
|
*/
|
|
1982
|
-
this.version = "10.0.
|
|
1995
|
+
this.version = "10.0.2";
|
|
1983
1996
|
/**
|
|
1984
1997
|
* Duration, in milliseconds, since last updating frame.
|
|
1985
1998
|
*
|
|
@@ -5172,7 +5185,7 @@
|
|
|
5172
5185
|
* and warn against mismatches.
|
|
5173
5186
|
*/
|
|
5174
5187
|
{
|
|
5175
|
-
warnOnce(nextValue.version === "10.0.
|
|
5188
|
+
warnOnce(nextValue.version === "10.0.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.0.2 may not work as expected.`);
|
|
5176
5189
|
}
|
|
5177
5190
|
}
|
|
5178
5191
|
else if (isMotionValue(prevValue)) {
|
|
@@ -5213,13 +5226,13 @@
|
|
|
5213
5226
|
const featureProps = {
|
|
5214
5227
|
animation: [
|
|
5215
5228
|
"animate",
|
|
5216
|
-
"exit",
|
|
5217
5229
|
"variants",
|
|
5218
5230
|
"whileHover",
|
|
5219
5231
|
"whileTap",
|
|
5232
|
+
"exit",
|
|
5233
|
+
"whileInView",
|
|
5220
5234
|
"whileFocus",
|
|
5221
5235
|
"whileDrag",
|
|
5222
|
-
"whileInView",
|
|
5223
5236
|
],
|
|
5224
5237
|
exit: ["exit"],
|
|
5225
5238
|
drag: ["drag", "dragControls"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t="undefined"!=typeof document;function e(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function a(t){return"string"==typeof t||Array.isArray(t)}function r(t){return"object"==typeof t&&"function"==typeof t.start}const n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],s=["initial",...n];function o(t){return r(t.animate)||s.some(e=>a(t[e]))}function i(t){return Boolean(o(t)||t.variants)}const f={animation:["animate","
|
|
1
|
+
const t="undefined"!=typeof document;function e(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function a(t){return"string"==typeof t||Array.isArray(t)}function r(t){return"object"==typeof t&&"function"==typeof t.start}const n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],s=["initial",...n];function o(t){return r(t.animate)||s.some(e=>a(t[e]))}function i(t){return Boolean(o(t)||t.variants)}const f={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},l={};for(const t in f)l[t]={isEnabled:e=>f[t].some(t=>!!e[t])};const c=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function d(t){return"string"==typeof t&&!t.includes("-")&&!!(c.indexOf(t)>-1||/[A-Z]/.test(t))}const p={},u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],g=new Set(u);function h(t,{layout:e,layoutId:a}){return g.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!p[t]||"opacity"===t)}const m=t=>Boolean(t&&t.getVelocity),y={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},v=u.length;const w=t=>e=>"string"==typeof e&&e.startsWith(t),b=w("--"),x=w("var(--"),k=(t,e)=>e&&"number"==typeof t?e.transform(t):t,L=(t,e,a)=>Math.min(Math.max(a,t),e),O={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},T={...O,transform:t=>L(0,1,t)},X={...O,default:1},Y=t=>Math.round(1e5*t)/1e5,$=/(-)?([\d]*\.?[\d])+/g,B=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,A=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function P(t){return"string"==typeof t}const S=t=>({test:e=>P(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),W=S("deg"),Z=S("%"),R=S("px"),C=S("vh"),H=S("vw"),V={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(100*t)},j={...O,transform:Math.round},z={borderWidth:R,borderTopWidth:R,borderRightWidth:R,borderBottomWidth:R,borderLeftWidth:R,borderRadius:R,radius:R,borderTopLeftRadius:R,borderTopRightRadius:R,borderBottomRightRadius:R,borderBottomLeftRadius:R,width:R,maxWidth:R,height:R,maxHeight:R,size:R,top:R,right:R,bottom:R,left:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:X,scaleX:X,scaleY:X,scaleZ:X,skew:W,skewX:W,skewY:W,distance:R,translateX:R,translateY:R,translateZ:R,x:R,y:R,z:R,perspective:R,transformPerspective:R,opacity:T,originX:V,originY:V,originZ:R,zIndex:j,fillOpacity:T,strokeOpacity:T,numOctaves:j};function F(t,e,a,r){const{style:n,vars:s,transform:o,transformOrigin:i}=t;let f=!1,l=!1,c=!0;for(const t in e){const a=e[t];if(b(t)){s[t]=a;continue}const r=z[t],d=k(a,r);if(g.has(t)){if(f=!0,o[t]=d,!c)continue;a!==(r.default||0)&&(c=!1)}else t.startsWith("origin")?(l=!0,i[t]=d):n[t]=d}if(e.transform||(f||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:a=!0},r,n){let s="";for(let e=0;e<v;e++){const a=u[e];if(void 0!==t[a]){s+=`${y[a]||a}(${t[a]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):a&&r&&(s="none"),s}(t.transform,a,c,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=i;n.transformOrigin=`${t} ${e} ${a}`}}function I(t,e,a){return"string"==typeof t?t:R.transform(e+a*t)}const D={offset:"stroke-dashoffset",array:"stroke-dasharray"},E={offset:"strokeDashoffset",array:"strokeDasharray"};function M(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},l,c,d){if(F(t,f,l,d),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:u,dimensions:g}=t;p.transform&&(g&&(u.transform=p.transform),delete p.transform),g&&(void 0!==r||void 0!==n||u.transform)&&(u.transformOrigin=function(t,e,a){return`${I(e,t.x,t.width)} ${I(a,t.y,t.height)}`}(g,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(p.x=e),void 0!==a&&(p.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?D:E;t[s.offset]=R.transform(-r);const o=R.transform(e),i=R.transform(a);t[s.array]=`${o} ${i}`}(p,s,o,i,!1)}const q=t=>"string"==typeof t&&"svg"===t.toLowerCase(),N=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function U(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const G=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function J(t,e,a,r){U(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(G.has(a)?a:N(a),e.attrs[a])}function K(t,e){const{style:a}=t,r={};for(const n in a)(m(a[n])||e.style&&m(e.style[n])||h(n,t))&&(r[n]=a[n]);return r}function Q(t,e){const a=K(t,e);for(const r in t)if(m(t[r])||m(e[r])){a["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return a}function _(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const tt=t=>Array.isArray(t),et=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),at=t=>tt(t)?t[t.length-1]||0:t;export{B as A,z as B,R as C,W as D,H as E,C as F,at as G,N as H,g as I,n as J,tt as K,x as L,u as M,s as N,b as O,U as P,G as Q,e as a,o as b,a as c,m as d,h as e,l as f,F as g,M as h,t as i,q as j,d as k,et as l,i as m,r as n,J as o,K as p,P as q,_ as r,Q as s,A as t,$ as u,Y as v,T as w,O as x,L as y,Z as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{createContext as n,
|
|
1
|
+
import*as t from"react";import{createContext as n,useLayoutEffect as e,useEffect as r,useContext as a,useRef as o,useInsertionEffect as i,useCallback as s,useMemo as u,forwardRef as l,createElement as c}from"react";import{i as m,P as f,a as d,b as p,c as g,f as y,g as v,S as h,L as S,d as E,e as b,h as A,j as V,k as w,l as x,r as M,m as C,n as P,o as T,s as W,p as L,q as j}from"./size-rollup-dom-max-assets.js";const D=n({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),F=n({}),B=m?e:r,H=n({strict:!1});function O(t){const{initial:n,animate:e}=function(t,n){if(p(t)){const{initial:n,animate:e}=t;return{initial:!1===n||g(n)?n:void 0,animate:g(e)?e:void 0}}return!1!==t.inherit?n:{}}(t,a(F));return u(()=>({initial:n,animate:e}),[R(n),R(e)])}function R(t){return Array.isArray(t)?t.join(" "):t}function k(t){const n=o(null);return null===n.current&&(n.current=t()),n.current}let I=1;const U=Symbol.for("motionComponentSymbol");function q({preloadedFeatures:n,createVisualElement:e,useRender:u,useVisualState:c,Component:p}){n&&function(t){for(const n in t)y[n]={...y[n],...t[n]}}(n);const g=l((function(l,g){let y;const S={...a(D),...l,layoutId:_(l)},{isStatic:E}=S,b=O(l),A=E?void 0:k(()=>{if(v.hasEverUpdated)return I++}),V=c(l,E);if(!E&&m){b.visualElement=function(t,n,e,s){const{visualElement:u}=a(F),l=a(H),c=a(f),m=a(D).reducedMotion,d=o();s=s||l.renderer,!d.current&&s&&(d.current=s(t,{visualState:n,parent:u,props:e,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:m}));const p=d.current;return i(()=>{p&&p.update(e,c)}),B(()=>{p&&p.render()}),r(()=>{p&&p.updateFeatures()}),(window.HandoffAppearAnimations?B:r)(()=>{p&&p.animationState&&p.animationState.animateChanges()}),p}(p,V,S,e);const t=a(h),s=a(H).strict;b.visualElement&&(y=b.visualElement.loadFeatures(S,s,n,A,t))}return t.createElement(F.Provider,{value:b},y&&b.visualElement?t.createElement(y,{visualElement:b.visualElement,...S}):null,u(p,l,A,function(t,n,e){return s(r=>{r&&t.mount&&t.mount(r),n&&(r?n.mount(r):n.unmount()),e&&("function"==typeof e?e(r):d(e)&&(e.current=r))},[n])}(V,b.visualElement,g),V,E,b.visualElement))}));return g[U]=p,g}function _({layoutId:t}){const n=a(S).id;return n&&void 0!==t?n+"-"+t:t}const z=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function N(t,n,e){for(const r in n)E(n[r])||b(r,e)||(t[r]=n[r])}function X(t,n,e){const r={};return N(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n,e){return u(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{}};return A(r,n,{enableHardwareAcceleration:!e},t),Object.assign({},r.vars,r.style)},[n])}(t,n,e)),t.transformValues?t.transformValues(r):r}function Y(t,n,e){const r={},a=X(t,n,e);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=a,r}const G=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function J(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||G.has(t)}let K=t=>!J(t);try{(Q=require("@emotion/is-prop-valid").default)&&(K=t=>t.startsWith("on")?!J(t):Q(t))}catch(t){}var Q;const Z=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function $(t,n,e,r){const a=u(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return V(e,n,{enableHardwareAcceleration:!1},w(r),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const n={};N(n,t.style,t),a.style={...n,...a.style}}return a}function tt(t=!1){return(n,e,r,a,{latestValues:o},i)=>{const s=(x(n)?$:Y)(e,o,i,n),l={...function(t,n,e){const r={};for(const a in t)"values"===a&&"object"==typeof t.values||(K(a)||!0===e&&J(a)||!n&&!J(a)||t.draggable&&a.startsWith("onDrag"))&&(r[a]=t[a]);return r}(e,"string"==typeof n,t),...s,ref:a},{children:m}=e,f=u(()=>E(m)?m.get():m,[m]);return r&&(l["data-projection-id"]=r),c(n,{...l,children:f})}}const nt=t=>(n,e)=>{const r=a(F),o=a(f),i=()=>function({scrapeMotionValuesFromProps:t,createRenderState:n,onMount:e},r,a,o){const i={latestValues:et(r,a,o,t),renderState:n()};return e&&(i.mount=t=>e(r,t,i)),i}(t,n,r,o);return e?i():k(i)};function et(t,n,e,r){const a={},o=r(t,{});for(const t in o)a[t]=M(o[t]);let{initial:i,animate:s}=t;const u=p(t),l=C(t);n&&l&&!u&&!1!==t.inherit&&(void 0===i&&(i=n.initial),void 0===s&&(s=n.animate));let c=!!e&&!1===e.initial;c=c||!1===i;const m=c?s:i;if(m&&"boolean"!=typeof m&&!P(m)){(Array.isArray(m)?m:[m]).forEach(n=>{const e=T(t,n);if(!e)return;const{transitionEnd:r,transition:o,...i}=e;for(const t in i){let n=i[t];if(Array.isArray(n)){n=n[c?n.length-1:0]}null!==n&&(a[t]=n)}for(const t in r)a[t]=r[t]})}return a}const rt={useVisualState:nt({scrapeMotionValuesFromProps:W,createRenderState:Z,onMount:(t,n,{renderState:e,latestValues:r})=>{try{e.dimensions="function"==typeof n.getBBox?n.getBBox():n.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}V(e,r,{enableHardwareAcceleration:!1},w(n.tagName),t.transformTemplate),L(n,e)}})},at={useVisualState:nt({scrapeMotionValuesFromProps:j,createRenderState:z})};const ot=function(t){function n(n,e={}){return q(t(n,e))}if("undefined"==typeof Proxy)return n;const e=new Map;return new Proxy(n,{get:(t,r)=>(e.has(r)||e.set(r,n(r)),e.get(r))})}((function(t,{forwardMotionProps:n=!1},e,r){return{...x(t)?rt:at,preloadedFeatures:e,useRender:tt(n),createVisualElement:r,Component:t}}));export{ot as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as t,t as e,u as n,v as s,w as r,x as i,y as o,z as a,A as u,B as c,C as l,D as h,E as p,F as d,r as f,G as m,d as g,H as v,I as y,J as b,n as w,K as V,c as A,L as C,M as P,i as x,f as S,b as M,m as T,a as E,N as k,O as F,g as I,p as O,P as N,Q as D,s as L,h as R,o as j,j as B,k as U}from"./size-rollup-dom-animation-assets.js";function z(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const q=t=>/^0[^.\s]+$/.test(t),$={delta:0,timestamp:0},H="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),W="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(H()),1/60*1e3);let K=!0,G=!1,J=!1;const Y=["read","update","preRender","render","postRender"],Z=Y.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const u=a&&r,c=u?e:n;return i&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&r&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:u=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(u),o.has(s)&&(a.schedule(s),t())}r=!1,i&&(i=!1,a.process(u))}}};return a}(()=>G=!0),t),{}),Q=Y.reduce((t,e)=>{const n=Z[e];return t[e]=(t,e=!1,s=!1)=>(G||et(),n.schedule(t,e,s)),t},{}),X=Y.reduce((t,e)=>(t[e]=Z[e].cancel,t),{});Y.reduce((t,e)=>(t[e]=()=>Z[e].process($),t),{});const _=t=>Z[t].process($),tt=t=>{G=!1,$.delta=K?1/60*1e3:Math.max(Math.min(t-$.timestamp,40),1),$.timestamp=t,J=!0,Y.forEach(_),J=!1,G&&(K=!1,W(tt))},et=()=>{G=!0,K=!0,J||W(tt)};class nt{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 s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function st(t,e){return e?t*(1e3/e):0}class rt{constructor(t,e={}){var n;this.version="10.0.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=$;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,Q.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Q.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new nt);const n=this.events[t].add(e);return"change"===t?()=>{n(),Q.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?st(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function it(t,e){return new rt(t,e)}const ot=(n,s)=>r=>Boolean(t(r)&&e.test(r)&&r.startsWith(n)||s&&Object.prototype.hasOwnProperty.call(r,s)),at=(e,s,r)=>i=>{if(!t(i))return i;const[o,a,u,c]=i.match(n);return{[e]:parseFloat(o),[s]:parseFloat(a),[r]:parseFloat(u),alpha:void 0!==c?parseFloat(c):1}},ut={...i,transform:t=>Math.round((t=>o(0,255,t))(t))},ct={test:ot("rgb","red"),parse:at("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ut.transform(t)+", "+ut.transform(e)+", "+ut.transform(n)+", "+s(r.transform(i))+")"};const lt={test:ot("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:ct.transform},ht={test:ot("hsl","hue"),parse:at("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+a.transform(s(e))+", "+a.transform(s(n))+", "+s(r.transform(i))+")"},pt={test:t=>ct.test(t)||lt.test(t)||ht.test(t),parse:t=>ct.test(t)?ct.parse(t):ht.test(t)?ht.parse(t):lt.parse(t),transform:e=>t(e)?e:e.hasOwnProperty("red")?ct.transform(e):ht.transform(e)};function dt(t){"number"==typeof t&&(t=""+t);const e=[];let s=0,r=0;const o=t.match(u);o&&(s=o.length,t=t.replace(u,"${c}"),e.push(...o.map(pt.parse)));const a=t.match(n);return a&&(r=a.length,t=t.replace(n,"${n}"),e.push(...a.map(i.parse))),{values:e,numColors:s,numNumbers:r,tokenised:t}}function ft(t){return dt(t).values}function mt(t){const{values:e,numColors:n,tokenised:r}=dt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?pt.transform(t[r]):s(t[r]));return e}}const gt=t=>"number"==typeof t?0:t;const vt={test:function(e){var s,r;return isNaN(e)&&t(e)&&((null===(s=e.match(n))||void 0===s?void 0:s.length)||0)+((null===(r=e.match(u))||void 0===r?void 0:r.length)||0)>0},parse:ft,createTransformer:mt,getAnimatableNone:function(t){const e=ft(t);return mt(t)(e.map(gt))}},yt=new Set(["brightness","contrast","saturate","opacity"]);function bt(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=s.match(n)||[];if(!r)return t;const i=s.replace(r,"");let o=yt.has(e)?1:0;return r!==s&&(o*=100),e+"("+o+i+")"}const wt=/([a-z-]*)\(.*?\)/g,Vt={...vt,getAnimatableNone:t=>{const e=t.match(wt);return e?e.map(bt).join(" "):t}},At={...c,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:Vt,WebkitFilter:Vt},Ct=t=>At[t];function Pt(t,e){let n=Ct(t);return n!==Vt&&(n=vt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xt=t=>e=>e.test(t),St=[i,l,a,h,p,d,{test:t=>"auto"===t,parse:t=>t}],Mt=t=>St.find(xt(t)),Tt=[...St,pt,vt],Et=t=>Tt.find(xt(t));function kt(t,e,n){const s=t.getProps();return f(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function Ft(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,it(n))}function It(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ot(t){return Boolean(g(t)&&t.add)}const Nt="data-"+v("framerAppearId"),Dt=t=>t;let Lt=Dt,Rt=Dt;const jt=t=>1e3*t,Bt=!1,Ut=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zt=t=>e=>1-t(1-e),qt=t=>t*t,$t=zt(qt),Ht=Ut(qt),Wt=(t,e,n)=>-n*t+n*e+t;function Kt(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}const Gt=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Jt=[lt,ct,ht];function Yt(t){const e=(n=t,Jt.find(t=>t.test(n)));var n;let s=e.parse(t);return e===ht&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Kt(a,s,t+1/3),i=Kt(a,s,t),o=Kt(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const Zt=(t,e)=>{const n=Yt(t),s=Yt(e),r={...n};return t=>(r.red=Gt(n.red,s.red,t),r.green=Gt(n.green,s.green,t),r.blue=Gt(n.blue,s.blue,t),r.alpha=Wt(n.alpha,s.alpha,t),ct.transform(r))},Qt=(t,e)=>n=>e(t(n)),Xt=(...t)=>t.reduce(Qt);function _t(t,e){return"number"==typeof t?n=>Wt(t,e,n):pt.test(t)?Zt(t,e):ne(t,e)}const te=(t,e)=>{const n=[...t],s=n.length,r=t.map((t,n)=>_t(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}},ee=(t,e)=>{const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=_t(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}},ne=(t,e)=>{const n=vt.createTransformer(e),s=dt(t),r=dt(e);return s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?Xt(te(s.values,r.values),n):n=>""+(n>0?e:t)},se=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},re=(t,e)=>n=>Wt(t,e,n);function ie(t,e,n){const s=[],r=n||("number"==typeof(i=t[0])?re:"string"==typeof i?pt.test(i)?Zt:ne:Array.isArray(i)?te:"object"==typeof i?ee:re);var i;const o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Xt(t,i)}s.push(i)}return s}function oe(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;Rt(i===e.length),Rt(!s||!Array.isArray(s)||s.length===i-1),t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ie(e,s,r),u=a.length,c=e=>{let n=0;if(u>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=se(t[n],t[n+1],e);return a[n](s)};return n?e=>c(o(t[0],t[i-1],e)):c}function ae(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=se(0,e,s);t.push(Wt(n,1,r))}}(e,t.length-1),e}const ue=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ce(t,e,n,s){if(t===e&&n===s)return Dt;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ue(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ue(r(t),e,s)}const le=t=>1-Math.sin(Math.acos(t)),he=zt(le),pe=Ut(he),de=ce(.33,1.53,.69,.99),fe=zt(de),me=Ut(fe),ge={linear:Dt,easeIn:qt,easeInOut:Ht,easeOut:$t,circIn:le,circInOut:pe,circOut:he,backIn:fe,backInOut:me,backOut:de,anticipate:t=>(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1)))},ve=t=>{if(Array.isArray(t)){Rt(4===t.length);const[e,n,s,r]=t;return ce(e,n,s,r)}return"string"==typeof t?ge[t]:t};function ye({keyframes:t,ease:e=Ht,times:n,duration:s=300}){t=[...t];const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(ve):ve(e),i={done:!1,value:t[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:ae(t),s);function a(){return oe(o,t,{ease:Array.isArray(r)?r:(e=t,n=r,e.map(()=>n||Ht).splice(0,e.length-1))});var e,n}let u=a();return{next:t=>(i.value=u(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),u=a()}}}function be({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i;Lt(t<=1e4);let a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{const s=e*a,r=s*t;return.001-(s-n)/we(e,a)*Math.exp(-r)},i=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),c=we(Math.pow(e,2),a);return(.001-r(e)>0?-1:1)*((i-o)*u)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}function we(t,e){return t*Math.sqrt(1-e*e)}const Ve=["duration","bounce"],Ae=["stiffness","damping","mass"];function Ce(t,e){return e.some(e=>void 0!==t[e])}function Pe({keyframes:t,restDelta:e,restSpeed:n,...s}){let r=t[0],i=t[t.length-1];const o={done:!1,value:r},{stiffness:a,damping:u,mass:c,velocity:l,duration:h,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Ce(t,Ae)&&Ce(t,Ve)){const n=be(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let d=xe,f=l?-l/1e3:0;const m=u/(2*Math.sqrt(a*c));function g(){const t=i-r,s=Math.sqrt(a/c)/1e3,o=Math.abs(t)<5;if(n||(n=o?.01:2),e||(e=o?.005:.5),m<1){const e=we(s,m);d=n=>{const r=Math.exp(-m*s*n);return i-r*((f+m*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===m)d=e=>i-Math.exp(-s*e)*(t+(f+s*t)*e);else{const e=s*Math.sqrt(m*m-1);d=n=>{const r=Math.exp(-m*s*n),o=Math.min(e*n,300);return i-r*((f+m*s*t)*Math.sinh(o)+e*t*Math.cosh(o))/e}}}return g(),{next:t=>{const s=d(t);if(p)o.done=t>=h;else{let r=f;if(0!==t)if(m<1){const e=Math.max(0,t-5);r=st(s-d(e),t-e)}else r=0;const a=Math.abs(r)<=n,u=Math.abs(i-s)<=e;o.done=a&&u}return o.value=o.done?i:s,o},flipTarget:()=>{f=-f,[r,i]=[i,r],g()}}}Pe.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const xe=t=>0;const Se={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:r=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let u=n*e;const c=o+u,l=void 0===i?c:i(c);return l!==c&&(u=l-o),{next:t=>{const e=-u*Math.exp(-t/s);return a.done=!(e>r||e<-r),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:ye,tween:ye,spring:Pe};function Me(t,e,n=0){return t-e-n}const Te=t=>{const e=({delta:e})=>t(e);return{start:()=>Q.update(e,!0),stop:()=>X.update(e)}};function Ee({duration:t,driver:e=Te,elapsed:n=0,repeat:s=0,repeatType:r="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:u,onStop:c,onComplete:l,onRepeat:h,onUpdate:p,type:d="keyframes",...f}){const m=n;let g,v,y=0,b=t,w=!1,V=!0;const A=Se[o.length>2?"keyframes":d]||ye,C=o[0],P=o[o.length-1];let x={done:!1,value:C};const{needsInterpolation:S}=A;S&&S(C,P)&&(v=oe([0,100],[C,P],{clamp:!1}),o=[0,100]);const M=A({...f,duration:t,keyframes:o});function T(){y++,"reverse"===r?(V=y%2==0,n=function(t,e=0,n=0,s=!0){return s?Me(e+-t,e,n):e-(t-e)+n}(n,b,i,V)):(n=Me(n,b,i),"mirror"===r&&M.flipTarget()),w=!1,h&&h()}function E(t){V||(t=-t),n+=t,w||(x=M.next(Math.max(0,n)),v&&(x.value=v(x.value)),w=V?x.done:n<=0),p&&p(x.value),w&&(0===y&&(b=void 0!==b?b:n),y<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,b,i,V)&&T():(g&&g.stop(),l&&l()))}return a&&(u&&u(),g=e(E),g.start()),{stop:()=>{c&&c(),g&&g.stop()},set currentTime(t){n=m,E(t)},sample:e=>{n=m;const s=t&&"number"==typeof t?Math.max(.5*t,50):50;let r=0;for(E(0);r<=e;){const t=e-r;E(Math.min(t,s)),r+=s}return x}}}const ke=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Fe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ke([0,.65,.55,1]),circOut:ke([.55,0,1,.45]),backIn:ke([.31,.01,.66,-.59]),backOut:ke([.33,1.53,.69,.99])};function Ie(t){if(t)return Array.isArray(t)?ke(t):Fe[t]}const Oe={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Ne={},De={};for(const t in Oe)De[t]=()=>(void 0===Ne[t]&&(Ne[t]=Oe[t]()),Ne[t]);const Le=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Re=(t,e)=>{return"spring"===e.type||"backgroundColor"===t||!(!(n=e.ease)||Array.isArray(n)||"string"==typeof n&&Fe[n]);var n};function je(t,e,{onUpdate:n,onComplete:s,...r}){if(!(De.waapi()&&Le.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping))return!1;let{keyframes:i,duration:o=300,elapsed:a=0,ease:u}=r;if(Re(e,r)){const t=Ee({...r,repeat:0,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;i=n,o=s-10,u="linear"}const c=function(t,e,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:u}={}){return t.animate({[e]:n,offset:u},{delay:s,duration:r,easing:Ie(a),fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,i,{...r,delay:-a,duration:o,ease:u});return c.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,r)),Q.update(()=>c.cancel()),s&&s()},{get currentTime(){return c.currentTime||0},set currentTime(t){c.currentTime=t},stop:()=>{const{currentTime:e}=c;if(e){const n=Ee({...r,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Q.update(()=>c.cancel())}}}function Be(t,e){const n=performance.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(X.read(s),t(i-e))};return Q.read(s,!0),()=>X.read(s)}function Ue({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const r=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:Be(r,-e)}:r()}const ze={type:"spring",stiffness:500,damping:25,restSpeed:10},qe={type:"keyframes",duration:.8},$e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},He=(t,{keyframes:e})=>e.length>2?qe:y.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ze:$e,We=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!vt.test(e)||e.startsWith("url(")));function Ke(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Ge(t){return"number"==typeof t?0:Pt("",t)}const Je=(t,e,n,s={})=>r=>{const i=function(t,e){return t[e]||t.default||t}(s,t)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=jt(o);const u=function(t,e,n,s){const r=We(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&r&&"string"==typeof n?i=Pt(e,n):Ke(i)&&"string"==typeof n?i=Ge(n):!Array.isArray(n)&&Ke(n)&&"string"==typeof i&&(n=Ge(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),c=u[0],l=u[u.length-1],h=We(t,c),p=We(t,l);let d={keyframes:u,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(!h||!p||Bt||!1===i.type)return Ue(d);if("inertia"===i.type)return function({keyframes:t,velocity:e=0,min:n,max:s,power:r=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:h,onComplete:p,onStop:d}){const f=t[0];let m;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function v(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function y(t){m&&m.stop(),m=Ee({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:p,onStop:d})}function b(t){y({type:"spring",stiffness:o,damping:a,restDelta:u,...t})}if(g(f))b({velocity:e,keyframes:[f,v(f)]});else{let t=r*e+f;void 0!==c&&(t=c(t));const s=v(t),o=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=st(t-a,$.delta),(1===o&&t>s||-1===o&&t<s)&&b({keyframes:[t,s],velocity:e})};y({type:"decay",keyframes:[f,0],velocity:e,timeConstant:i,power:r,restDelta:u,modifyTarget:c,onUpdate:g(t)?h:void 0})}return{stop:()=>m&&m.stop()}}(d);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:c,...l}){return!!Object.keys(l).length}(i)||(d={...d,...He(t,d)}),d.duration&&(d.duration=jt(d.duration)),d.repeatDelay&&(d.repeatDelay=jt(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=je(e,t,d);if(n)return n}return Ee(d)};function Ye(t,e,n={}){const s=kt(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>Ze(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,r=1,i){const o=[],a=(t.variantChildren.size-1)*s,u=1===r?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Qe).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(Ye(t,e,{...i,delay:n+u(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[i,o]:[o,i];return t().then(e)}return Promise.all([i(),o(n.delay)])}function Ze(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e),r=a[e];if(!s||void 0===r||l&&Xe(l,e))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[Nt];n&&(o.elapsed=window.HandoffAppearAnimations(n,e,s,Q))}let h=s.start(Je(e,s,r,t.shouldReduceMotion&&y.has(e)?{type:!1}:o));Ot(u)&&(u.add(e),h=h.then(()=>u.remove(e))),c.push(h)}return Promise.all(c).then(()=>{o&&function(t,e){const n=kt(t,e);let{transitionEnd:s={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){Ft(t,e,m(i[e]))}}(t,o)})}function Qe(t,e){return t.sortNodePosition(e)}function Xe({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}const _e=[...b].reverse(),tn=b.length;function en(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>Ye(t,e,n));s=Promise.all(r)}else if("string"==typeof e)s=Ye(t,e,n);else{const r="function"==typeof e?kt(t,e,n.custom):e;s=Ze(t,r,n)}return s.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function nn(t){let e=en(t);const n={animate:rn(!0),whileInView:rn(),whileHover:rn(),whileTap:rn(),whileDrag:rn(),whileFocus:rn(),exit:rn()};let s=!0;const r=(e,n)=>{const s=kt(t,n);if(s){const{transition:t,transitionEnd:n,...r}=s;e={...e,...r,...n}}return e};function i(i,o){const a=t.getProps(),u=t.getVariantContext(!0)||{},c=[],l=new Set;let h={},p=1/0;for(let e=0;e<tn;e++){const d=_e[e],f=n[d],m=void 0!==a[d]?a[d]:u[d],g=A(m),v=d===o?f.isActive:null;!1===v&&(p=e);let y=m===u[d]&&m!==a[d]&&g;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...h},!f.isActive&&null===v||!m&&!f.prevProp||w(m)||"boolean"==typeof m)continue;const b=sn(f.prevProp,m);let C=b||d===o&&f.isActive&&!y&&g||e>p&&g;const P=Array.isArray(m)?m:[m];let x=P.reduce(r,{});!1===v&&(x={});const{prevResolvedValues:S={}}=f,M={...S,...x},T=t=>{C=!0,l.delete(t),f.needsAnimating[t]=!0};for(const t in M){const e=x[t],n=S[t];h.hasOwnProperty(t)||(e!==n?V(e)&&V(n)?!z(e,n)||b?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):l.add(t):void 0!==e&&l.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=m,f.prevResolvedValues=x,f.isActive&&(h={...h,...x}),s&&t.blockInitialAnimation&&(C=!1),C&&!y&&c.push(...P.map(t=>({animation:t,options:{type:d,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let d=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(d=!1),s=!1,d?e(c):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,r){var o;if(n[e].isActive===s)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const a=i(r,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function sn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!z(e,t)}function rn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class on{constructor(t){this.isMounted=!1,this.node=t}update(){}}let an=0;const un={animation:{Feature:class extends on{constructor(t){super(t),t.animationState||(t.animationState=nn(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),w(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends on{constructor(){super(...arguments),this.id=an++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&r.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function cn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ln(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function hn(t,e,n,s){return cn(t,e,(t=>e=>(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(e)&&t(e,ln(e)))(n),s)}function pn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const dn=pn("dragHorizontal"),fn=pn("dragVertical");function mn(){const t=function(t){let e=!1;if("y"===t)e=fn();else if("x"===t)e=dn();else{const t=dn(),n=fn();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function gn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return hn(t.current,n,(n,r)=>{if("touch"===n.type||mn())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",e),i[s]&&i[s](n,r)},{passive:!t.getProps()[s]})}const vn=(t,e)=>!!e&&(t===e||vn(t,e.parentElement));function yn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ln(n))}const bn=new WeakMap,wn=new WeakMap,Vn=t=>{const e=bn.get(t.target);e&&e(t)},An=t=>{t.forEach(Vn)};function Cn(t,e,n){const s=function({root:t,...e}){const n=t||document;wn.has(n)||wn.set(n,{});const s=wn.get(n),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(An,{root:t,...e})),s[r]}(e);return bn.set(t,n),s.observe(t),()=>{bn.delete(t),s.unobserve(t)}}const Pn={some:0,all:1};const xn={inView:{Feature:class extends on{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r}=t,i={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Pn[s]};return Cn(this.node.current,i,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends on{constructor(){super(...arguments),this.removeStartListeners=Dt,this.removeEndListeners=Dt,this.removeAccessibleListeners=Dt,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=hn(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();vn(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),r=hn(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Xt(s,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=cn(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=cn(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&yn("up",this.node.getProps().onTap)}),yn("down",(t,e)=>{this.startPress(t,e)})}),e=cn(this.node.current,"blur",()=>{this.isPressing&&yn("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Xt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!mn()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=hn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=cn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Xt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends on{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xt(cn(this.node.current,"focus",()=>this.onFocus()),cn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends on{mount(){this.unmount=Xt(gn(this.node,!0),gn(this.node,!1))}unmount(){}}}};const Sn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Mn(t,e,n=1){Rt(n<=4);const[s,r]=function(t){const e=Sn.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():C(r)?Mn(r,e,n+1):r}const Tn=new Set(["width","height","top","left","right","bottom","x","y"]),En=t=>Tn.has(t),kn=t=>t===i||t===l,Fn=(t,e)=>parseFloat(t.split(", ")[e]),In=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return Fn(r[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?Fn(e[1],t):0}},On=new Set(["x","y","z"]),Nn=P.filter(t=>!On.has(t));const Dn={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:In(4,13),y:In(5,14)},Ln=(t,e,n={},s={})=>{e={...e},s={...s};const r=Object.keys(e).filter(En);let i=[],o=!1;const a=[];if(r.forEach(r=>{const u=t.getValue(r);if(!t.hasValue(r))return;let c=n[r],h=Mt(c);const p=e[r];let d;if(V(p)){const t=p.length,e=null===p[0]?1:0;c=p[e],h=Mt(c);for(let n=e;n<t;n++)d?Rt(Mt(p[n])===d):(d=Mt(p[n]),Rt(d===h||kn(h)&&kn(d)))}else d=Mt(p);if(h!==d)if(kn(h)&&kn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[r]=parseFloat(p):Array.isArray(p)&&d===l&&(e[r]=p.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==d?void 0:d.transform)&&(0===c||0===p)?0===c?u.set(d.transform(c)):e[r]=h.transform(p):(o||(i=function(t){const e=[];return Nn.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(r),s[r]=void 0!==s[r]?s[r]:e[r],u.jump(p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const s=e.measureViewportBox(),r=e.current,i=getComputedStyle(r),{display:o}=i,a={};"none"===o&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Dn[t](s,i)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=Dn[n](u,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),x&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:s}}return{target:e,transitionEnd:s}};function Rn(t,e,n,s){return(t=>Object.keys(t).some(En))(e)?Ln(t,e,n,s):{target:e,transitionEnd:s}}const jn=(t,e,n,s)=>{const r=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!C(e))return;const n=Mn(e,s);n&&t.set(n)});for(const t in e){const r=e[t];if(!C(r))continue;const i=Mn(r,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,s);return Rn(t,e=r.target,n,s=r.transitionEnd)},Bn={current:null},Un={current:!1};const zn=Object.keys(S),qn=zn.length,$n=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Hn=k.length;class Wn extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Q.render(this.render,!1,!0);const{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.isControllingVariants=M(e),this.isVariantNode=T(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==o[t]&&g(e)&&(e.set(o[t],!1),Ot(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Un.current||function(){if(Un.current=!0,x)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Bn.current=t.matches;t.addListener(e),e()}else Bn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Bn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),X.update(this.notifyUpdate),X.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=y.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Q.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r,i){let o,a;for(let t=0;t<qn;t++){const n=zn[t],{isEnabled:s,Feature:r,ProjectionNode:i,MeasureLayout:u}=S[n];i&&(o=i),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),u&&(a=u))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&E(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<$n.length;e++){const n=$n[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(g(i))t.addValue(r,i),Ot(s)&&s.add(r);else if(g(o))t.addValue(r,it(i,{owner:t})),Ot(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,it(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Hn;t++){const n=k[t],s=this.props[n];(A(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=it(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=f(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||g(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new nt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},r){let i=function(t,e,n){const s={};for(const r in t){const t=It(r,e);if(void 0!==t)s[r]=t;else{const t=n.getValue(r);t&&(s[r]=t.get())}}return s}(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),r){!function(t,e,n){var s,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),o=i.length;if(o)for(let a=0;a<o;a++){const o=i[a],u=e[o];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(r=null!==(s=n[o])&&void 0!==s?s:t.readValue(o))&&void 0!==r?r:e[o]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||q(c))?c=parseFloat(c):!Et(c)&&vt.test(u)&&(c=Pt(o,u)),t.addValue(o,it(c,{owner:t})),void 0===n[o]&&(n[o]=c),null!==c&&t.setBaseTarget(o,c))}}(this,n,i);const t=jn(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Kn extends Wn{readValueFromInstance(t,e){if(y.has(e)){const t=Ct(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(F(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,s){I(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return O(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;g(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){N(t,e,n,s)}}class Gn extends Wn{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(y.has(e)){const t=Ct(e);return t&&t.default||0}return e=D.has(e)?e:v(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return L(t,e)}build(t,e,n,s){R(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){j(t,e,n,s)}mount(t){this.isSVGTag=B(t.tagName),super.mount(t)}}const Jn={renderer:(t,e)=>U(t)?new Gn(e,{enableHardwareAcceleration:!1}):new Kn(e,{enableHardwareAcceleration:!0}),...un,...xn};export{Jn as domAnimation};
|
|
1
|
+
import{q as t,t as e,u as n,v as s,w as r,x as i,y as o,z as a,A as u,B as c,C as l,D as h,E as p,F as d,r as f,G as m,d as g,H as v,I as y,J as b,n as w,K as V,c as A,L as C,M as P,i as x,f as S,b as M,m as T,a as E,N as k,O as F,g as I,p as O,P as N,Q as D,s as L,h as R,o as j,j as B,k as U}from"./size-rollup-dom-animation-assets.js";function z(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const q=t=>/^0[^.\s]+$/.test(t),$={delta:0,timestamp:0},H="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),W="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(H()),1/60*1e3);let K=!0,G=!1,J=!1;const Y=["read","update","preRender","render","postRender"],Z=Y.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const u=a&&r,c=u?e:n;return i&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&r&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:u=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(u),o.has(s)&&(a.schedule(s),t())}r=!1,i&&(i=!1,a.process(u))}}};return a}(()=>G=!0),t),{}),Q=Y.reduce((t,e)=>{const n=Z[e];return t[e]=(t,e=!1,s=!1)=>(G||et(),n.schedule(t,e,s)),t},{}),X=Y.reduce((t,e)=>(t[e]=Z[e].cancel,t),{});Y.reduce((t,e)=>(t[e]=()=>Z[e].process($),t),{});const _=t=>Z[t].process($),tt=t=>{G=!1,$.delta=K?1/60*1e3:Math.max(Math.min(t-$.timestamp,40),1),$.timestamp=t,J=!0,Y.forEach(_),J=!1,G&&(K=!1,W(tt))},et=()=>{G=!0,K=!0,J||W(tt)};class nt{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 s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function st(t,e){return e?t*(1e3/e):0}class rt{constructor(t,e={}){var n;this.version="10.0.2",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=$;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,Q.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Q.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new nt);const n=this.events[t].add(e);return"change"===t?()=>{n(),Q.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?st(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function it(t,e){return new rt(t,e)}const ot=(n,s)=>r=>Boolean(t(r)&&e.test(r)&&r.startsWith(n)||s&&Object.prototype.hasOwnProperty.call(r,s)),at=(e,s,r)=>i=>{if(!t(i))return i;const[o,a,u,c]=i.match(n);return{[e]:parseFloat(o),[s]:parseFloat(a),[r]:parseFloat(u),alpha:void 0!==c?parseFloat(c):1}},ut={...i,transform:t=>Math.round((t=>o(0,255,t))(t))},ct={test:ot("rgb","red"),parse:at("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ut.transform(t)+", "+ut.transform(e)+", "+ut.transform(n)+", "+s(r.transform(i))+")"};const lt={test:ot("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:ct.transform},ht={test:ot("hsl","hue"),parse:at("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+a.transform(s(e))+", "+a.transform(s(n))+", "+s(r.transform(i))+")"},pt={test:t=>ct.test(t)||lt.test(t)||ht.test(t),parse:t=>ct.test(t)?ct.parse(t):ht.test(t)?ht.parse(t):lt.parse(t),transform:e=>t(e)?e:e.hasOwnProperty("red")?ct.transform(e):ht.transform(e)};function dt(t){"number"==typeof t&&(t=""+t);const e=[];let s=0,r=0;const o=t.match(u);o&&(s=o.length,t=t.replace(u,"${c}"),e.push(...o.map(pt.parse)));const a=t.match(n);return a&&(r=a.length,t=t.replace(n,"${n}"),e.push(...a.map(i.parse))),{values:e,numColors:s,numNumbers:r,tokenised:t}}function ft(t){return dt(t).values}function mt(t){const{values:e,numColors:n,tokenised:r}=dt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?pt.transform(t[r]):s(t[r]));return e}}const gt=t=>"number"==typeof t?0:t;const vt={test:function(e){var s,r;return isNaN(e)&&t(e)&&((null===(s=e.match(n))||void 0===s?void 0:s.length)||0)+((null===(r=e.match(u))||void 0===r?void 0:r.length)||0)>0},parse:ft,createTransformer:mt,getAnimatableNone:function(t){const e=ft(t);return mt(t)(e.map(gt))}},yt=new Set(["brightness","contrast","saturate","opacity"]);function bt(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=s.match(n)||[];if(!r)return t;const i=s.replace(r,"");let o=yt.has(e)?1:0;return r!==s&&(o*=100),e+"("+o+i+")"}const wt=/([a-z-]*)\(.*?\)/g,Vt={...vt,getAnimatableNone:t=>{const e=t.match(wt);return e?e.map(bt).join(" "):t}},At={...c,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:Vt,WebkitFilter:Vt},Ct=t=>At[t];function Pt(t,e){let n=Ct(t);return n!==Vt&&(n=vt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xt=t=>e=>e.test(t),St=[i,l,a,h,p,d,{test:t=>"auto"===t,parse:t=>t}],Mt=t=>St.find(xt(t)),Tt=[...St,pt,vt],Et=t=>Tt.find(xt(t));function kt(t,e,n){const s=t.getProps();return f(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function Ft(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,it(n))}function It(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ot(t){return Boolean(g(t)&&t.add)}const Nt="data-"+v("framerAppearId"),Dt=t=>t;let Lt=Dt,Rt=Dt;const jt=t=>1e3*t,Bt=!1,Ut=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zt=t=>e=>1-t(1-e),qt=t=>t*t,$t=zt(qt),Ht=Ut(qt),Wt=(t,e,n)=>-n*t+n*e+t;function Kt(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}const Gt=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Jt=[lt,ct,ht];function Yt(t){const e=(n=t,Jt.find(t=>t.test(n)));var n;let s=e.parse(t);return e===ht&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Kt(a,s,t+1/3),i=Kt(a,s,t),o=Kt(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const Zt=(t,e)=>{const n=Yt(t),s=Yt(e),r={...n};return t=>(r.red=Gt(n.red,s.red,t),r.green=Gt(n.green,s.green,t),r.blue=Gt(n.blue,s.blue,t),r.alpha=Wt(n.alpha,s.alpha,t),ct.transform(r))},Qt=(t,e)=>n=>e(t(n)),Xt=(...t)=>t.reduce(Qt);function _t(t,e){return"number"==typeof t?n=>Wt(t,e,n):pt.test(t)?Zt(t,e):ne(t,e)}const te=(t,e)=>{const n=[...t],s=n.length,r=t.map((t,n)=>_t(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}},ee=(t,e)=>{const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=_t(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}},ne=(t,e)=>{const n=vt.createTransformer(e),s=dt(t),r=dt(e);return s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?Xt(te(s.values,r.values),n):n=>""+(n>0?e:t)},se=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},re=(t,e)=>n=>Wt(t,e,n);function ie(t,e,n){const s=[],r=n||("number"==typeof(i=t[0])?re:"string"==typeof i?pt.test(i)?Zt:ne:Array.isArray(i)?te:"object"==typeof i?ee:re);var i;const o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Xt(t,i)}s.push(i)}return s}function oe(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;Rt(i===e.length),Rt(!s||!Array.isArray(s)||s.length===i-1),t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ie(e,s,r),u=a.length,c=e=>{let n=0;if(u>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=se(t[n],t[n+1],e);return a[n](s)};return n?e=>c(o(t[0],t[i-1],e)):c}function ae(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=se(0,e,s);t.push(Wt(n,1,r))}}(e,t.length-1),e}const ue=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ce(t,e,n,s){if(t===e&&n===s)return Dt;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ue(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ue(r(t),e,s)}const le=t=>1-Math.sin(Math.acos(t)),he=zt(le),pe=Ut(he),de=ce(.33,1.53,.69,.99),fe=zt(de),me=Ut(fe),ge={linear:Dt,easeIn:qt,easeInOut:Ht,easeOut:$t,circIn:le,circInOut:pe,circOut:he,backIn:fe,backInOut:me,backOut:de,anticipate:t=>(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1)))},ve=t=>{if(Array.isArray(t)){Rt(4===t.length);const[e,n,s,r]=t;return ce(e,n,s,r)}return"string"==typeof t?ge[t]:t};function ye({keyframes:t,ease:e=Ht,times:n,duration:s=300}){t=[...t];const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(ve):ve(e),i={done:!1,value:t[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:ae(t),s);function a(){return oe(o,t,{ease:Array.isArray(r)?r:(e=t,n=r,e.map(()=>n||Ht).splice(0,e.length-1))});var e,n}let u=a();return{next:t=>(i.value=u(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),u=a()}}}function be({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i;Lt(t<=1e4);let a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{const s=e*a,r=s*t;return.001-(s-n)/we(e,a)*Math.exp(-r)},i=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),c=we(Math.pow(e,2),a);return(.001-r(e)>0?-1:1)*((i-o)*u)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}function we(t,e){return t*Math.sqrt(1-e*e)}const Ve=["duration","bounce"],Ae=["stiffness","damping","mass"];function Ce(t,e){return e.some(e=>void 0!==t[e])}function Pe({keyframes:t,restDelta:e,restSpeed:n,...s}){let r=t[0],i=t[t.length-1];const o={done:!1,value:r},{stiffness:a,damping:u,mass:c,velocity:l,duration:h,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Ce(t,Ae)&&Ce(t,Ve)){const n=be(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let d=xe,f=l?-l/1e3:0;const m=u/(2*Math.sqrt(a*c));function g(){const t=i-r,s=Math.sqrt(a/c)/1e3,o=Math.abs(t)<5;if(n||(n=o?.01:2),e||(e=o?.005:.5),m<1){const e=we(s,m);d=n=>{const r=Math.exp(-m*s*n);return i-r*((f+m*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===m)d=e=>i-Math.exp(-s*e)*(t+(f+s*t)*e);else{const e=s*Math.sqrt(m*m-1);d=n=>{const r=Math.exp(-m*s*n),o=Math.min(e*n,300);return i-r*((f+m*s*t)*Math.sinh(o)+e*t*Math.cosh(o))/e}}}return g(),{next:t=>{const s=d(t);if(p)o.done=t>=h;else{let r=f;if(0!==t)if(m<1){const e=Math.max(0,t-5);r=st(s-d(e),t-e)}else r=0;const a=Math.abs(r)<=n,u=Math.abs(i-s)<=e;o.done=a&&u}return o.value=o.done?i:s,o},flipTarget:()=>{f=-f,[r,i]=[i,r],g()}}}Pe.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const xe=t=>0;const Se={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:r=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let u=n*e;const c=o+u,l=void 0===i?c:i(c);return l!==c&&(u=l-o),{next:t=>{const e=-u*Math.exp(-t/s);return a.done=!(e>r||e<-r),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:ye,tween:ye,spring:Pe};function Me(t,e,n=0){return t-e-n}const Te=t=>{const e=({delta:e})=>t(e);return{start:()=>Q.update(e,!0),stop:()=>X.update(e)}};function Ee({duration:t,driver:e=Te,elapsed:n=0,repeat:s=0,repeatType:r="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:u,onStop:c,onComplete:l,onRepeat:h,onUpdate:p,type:d="keyframes",...f}){const m=n;let g,v,y=0,b=t,w=!1,V=!0;const A=Se[o.length>2?"keyframes":d]||ye,C=o[0],P=o[o.length-1];let x={done:!1,value:C};const{needsInterpolation:S}=A;S&&S(C,P)&&(v=oe([0,100],[C,P],{clamp:!1}),o=[0,100]);const M=A({...f,duration:t,keyframes:o});function T(){y++,"reverse"===r?(V=y%2==0,n=function(t,e=0,n=0,s=!0){return s?Me(e+-t,e,n):e-(t-e)+n}(n,b,i,V)):(n=Me(n,b,i),"mirror"===r&&M.flipTarget()),w=!1,h&&h()}function E(t){V||(t=-t),n+=t,w||(x=M.next(Math.max(0,n)),v&&(x.value=v(x.value)),w=V?x.done:n<=0),p&&p(x.value),w&&(0===y&&(b=void 0!==b?b:n),y<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,b,i,V)&&T():(g&&g.stop(),l&&l()))}return a&&(u&&u(),g=e(E),g.start()),{stop:()=>{c&&c(),g&&g.stop()},set currentTime(t){n=m,E(t)},sample:(e,s=!1)=>{if(n=m,s)return E(e),x;const r=t&&"number"==typeof t?Math.max(.5*t,50):50;let i=0;for(E(0);i<=e;){const t=e-i;E(Math.min(t,r)),i+=r}return x}}}const ke=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Fe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ke([0,.65,.55,1]),circOut:ke([.55,0,1,.45]),backIn:ke([.31,.01,.66,-.59]),backOut:ke([.33,1.53,.69,.99])};function Ie(t){if(t)return Array.isArray(t)?ke(t):Fe[t]}const Oe={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Ne={},De={};for(const t in Oe)De[t]=()=>(void 0===Ne[t]&&(Ne[t]=Oe[t]()),Ne[t]);const Le=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Re=(t,e)=>{return"spring"===e.type||"backgroundColor"===t||!(!(n=e.ease)||Array.isArray(n)||"string"==typeof n&&Fe[n]);var n};function je(t,e,{onUpdate:n,onComplete:s,...r}){if(!(De.waapi()&&Le.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping))return!1;let{keyframes:i,duration:o=300,elapsed:a=0,ease:u}=r;if(Re(e,r)){const t=Ee({...r,repeat:0,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s,!0),n.push(e.value),s+=10;i=n,o=s-10,u="linear"}const c=function(t,e,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:u}={}){const c={[e]:n};return u&&(c.offset=u),t.animate(c,{delay:s,duration:r,easing:Ie(a),fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,i,{...r,delay:-a,duration:o,ease:u});return c.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,r)),Q.update(()=>c.cancel()),s&&s()},{get currentTime(){return c.currentTime||0},set currentTime(t){c.currentTime=t},stop:()=>{const{currentTime:e}=c;if(e){const n=Ee({...r,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Q.update(()=>c.cancel())}}}function Be(t,e){const n=performance.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(X.read(s),t(i-e))};return Q.read(s,!0),()=>X.read(s)}function Ue({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const r=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:Be(r,-e)}:r()}const ze={type:"spring",stiffness:500,damping:25,restSpeed:10},qe={type:"keyframes",duration:.8},$e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},He=(t,{keyframes:e})=>e.length>2?qe:y.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ze:$e,We=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!vt.test(e)||e.startsWith("url(")));function Ke(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Ge(t){return"number"==typeof t?0:Pt("",t)}const Je=(t,e,n,s={})=>r=>{const i=function(t,e){return t[e]||t.default||t}(s,t)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=jt(o);const u=function(t,e,n,s){const r=We(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&r&&"string"==typeof n?i=Pt(e,n):Ke(i)&&"string"==typeof n?i=Ge(n):!Array.isArray(n)&&Ke(n)&&"string"==typeof i&&(n=Ge(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),c=u[0],l=u[u.length-1],h=We(t,c),p=We(t,l);let d={keyframes:u,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(!h||!p||Bt||!1===i.type)return Ue(d);if("inertia"===i.type)return function({keyframes:t,velocity:e=0,min:n,max:s,power:r=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:h,onComplete:p,onStop:d}){const f=t[0];let m;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function v(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function y(t){m&&m.stop(),m=Ee({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:p,onStop:d})}function b(t){y({type:"spring",stiffness:o,damping:a,restDelta:u,...t})}if(g(f))b({velocity:e,keyframes:[f,v(f)]});else{let t=r*e+f;void 0!==c&&(t=c(t));const s=v(t),o=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=st(t-a,$.delta),(1===o&&t>s||-1===o&&t<s)&&b({keyframes:[t,s],velocity:e})};y({type:"decay",keyframes:[f,0],velocity:e,timeConstant:i,power:r,restDelta:u,modifyTarget:c,onUpdate:g(t)?h:void 0})}return{stop:()=>m&&m.stop()}}(d);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:c,...l}){return!!Object.keys(l).length}(i)||(d={...d,...He(t,d)}),d.duration&&(d.duration=jt(d.duration)),d.repeatDelay&&(d.repeatDelay=jt(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=je(e,t,d);if(n)return n}return Ee(d)};function Ye(t,e,n={}){const s=kt(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>Ze(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,r=1,i){const o=[],a=(t.variantChildren.size-1)*s,u=1===r?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Qe).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(Ye(t,e,{...i,delay:n+u(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[i,o]:[o,i];return t().then(e)}return Promise.all([i(),o(n.delay)])}function Ze(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e),r=a[e];if(!s||void 0===r||l&&Xe(l,e))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[Nt];n&&(o.elapsed=window.HandoffAppearAnimations(n,e,s,Q))}let h=s.start(Je(e,s,r,t.shouldReduceMotion&&y.has(e)?{type:!1}:o));Ot(u)&&(u.add(e),h=h.then(()=>u.remove(e))),c.push(h)}return Promise.all(c).then(()=>{o&&function(t,e){const n=kt(t,e);let{transitionEnd:s={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){Ft(t,e,m(i[e]))}}(t,o)})}function Qe(t,e){return t.sortNodePosition(e)}function Xe({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}const _e=[...b].reverse(),tn=b.length;function en(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>Ye(t,e,n));s=Promise.all(r)}else if("string"==typeof e)s=Ye(t,e,n);else{const r="function"==typeof e?kt(t,e,n.custom):e;s=Ze(t,r,n)}return s.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function nn(t){let e=en(t);const n={animate:rn(!0),whileInView:rn(),whileHover:rn(),whileTap:rn(),whileDrag:rn(),whileFocus:rn(),exit:rn()};let s=!0;const r=(e,n)=>{const s=kt(t,n);if(s){const{transition:t,transitionEnd:n,...r}=s;e={...e,...r,...n}}return e};function i(i,o){const a=t.getProps(),u=t.getVariantContext(!0)||{},c=[],l=new Set;let h={},p=1/0;for(let e=0;e<tn;e++){const d=_e[e],f=n[d],m=void 0!==a[d]?a[d]:u[d],g=A(m),v=d===o?f.isActive:null;!1===v&&(p=e);let y=m===u[d]&&m!==a[d]&&g;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...h},!f.isActive&&null===v||!m&&!f.prevProp||w(m)||"boolean"==typeof m)continue;const b=sn(f.prevProp,m);let C=b||d===o&&f.isActive&&!y&&g||e>p&&g;const P=Array.isArray(m)?m:[m];let x=P.reduce(r,{});!1===v&&(x={});const{prevResolvedValues:S={}}=f,M={...S,...x},T=t=>{C=!0,l.delete(t),f.needsAnimating[t]=!0};for(const t in M){const e=x[t],n=S[t];h.hasOwnProperty(t)||(e!==n?V(e)&&V(n)?!z(e,n)||b?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):l.add(t):void 0!==e&&l.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=m,f.prevResolvedValues=x,f.isActive&&(h={...h,...x}),s&&t.blockInitialAnimation&&(C=!1),C&&!y&&c.push(...P.map(t=>({animation:t,options:{type:d,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let d=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(d=!1),s=!1,d?e(c):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,r){var o;if(n[e].isActive===s)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const a=i(r,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function sn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!z(e,t)}function rn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class on{constructor(t){this.isMounted=!1,this.node=t}update(){}}let an=0;const un={animation:{Feature:class extends on{constructor(t){super(t),t.animationState||(t.animationState=nn(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),w(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends on{constructor(){super(...arguments),this.id=an++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&r.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function cn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ln(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function hn(t,e,n,s){return cn(t,e,(t=>e=>(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(e)&&t(e,ln(e)))(n),s)}function pn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const dn=pn("dragHorizontal"),fn=pn("dragVertical");function mn(){const t=function(t){let e=!1;if("y"===t)e=fn();else if("x"===t)e=dn();else{const t=dn(),n=fn();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function gn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return hn(t.current,n,(n,r)=>{if("touch"===n.type||mn())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",e),i[s]&&i[s](n,r)},{passive:!t.getProps()[s]})}const vn=(t,e)=>!!e&&(t===e||vn(t,e.parentElement));function yn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ln(n))}const bn=new WeakMap,wn=new WeakMap,Vn=t=>{const e=bn.get(t.target);e&&e(t)},An=t=>{t.forEach(Vn)};function Cn(t,e,n){const s=function({root:t,...e}){const n=t||document;wn.has(n)||wn.set(n,{});const s=wn.get(n),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(An,{root:t,...e})),s[r]}(e);return bn.set(t,n),s.observe(t),()=>{bn.delete(t),s.unobserve(t)}}const Pn={some:0,all:1};const xn={inView:{Feature:class extends on{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r}=t,i={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Pn[s]};return Cn(this.node.current,i,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends on{constructor(){super(...arguments),this.removeStartListeners=Dt,this.removeEndListeners=Dt,this.removeAccessibleListeners=Dt,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=hn(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();vn(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),r=hn(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Xt(s,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=cn(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=cn(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&yn("up",this.node.getProps().onTap)}),yn("down",(t,e)=>{this.startPress(t,e)})}),e=cn(this.node.current,"blur",()=>{this.isPressing&&yn("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Xt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!mn()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=hn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=cn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Xt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends on{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xt(cn(this.node.current,"focus",()=>this.onFocus()),cn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends on{mount(){this.unmount=Xt(gn(this.node,!0),gn(this.node,!1))}unmount(){}}}};const Sn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Mn(t,e,n=1){Rt(n<=4);const[s,r]=function(t){const e=Sn.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():C(r)?Mn(r,e,n+1):r}const Tn=new Set(["width","height","top","left","right","bottom","x","y"]),En=t=>Tn.has(t),kn=t=>t===i||t===l,Fn=(t,e)=>parseFloat(t.split(", ")[e]),In=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return Fn(r[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?Fn(e[1],t):0}},On=new Set(["x","y","z"]),Nn=P.filter(t=>!On.has(t));const Dn={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:In(4,13),y:In(5,14)},Ln=(t,e,n={},s={})=>{e={...e},s={...s};const r=Object.keys(e).filter(En);let i=[],o=!1;const a=[];if(r.forEach(r=>{const u=t.getValue(r);if(!t.hasValue(r))return;let c=n[r],h=Mt(c);const p=e[r];let d;if(V(p)){const t=p.length,e=null===p[0]?1:0;c=p[e],h=Mt(c);for(let n=e;n<t;n++)d?Rt(Mt(p[n])===d):(d=Mt(p[n]),Rt(d===h||kn(h)&&kn(d)))}else d=Mt(p);if(h!==d)if(kn(h)&&kn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[r]=parseFloat(p):Array.isArray(p)&&d===l&&(e[r]=p.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==d?void 0:d.transform)&&(0===c||0===p)?0===c?u.set(d.transform(c)):e[r]=h.transform(p):(o||(i=function(t){const e=[];return Nn.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(r),s[r]=void 0!==s[r]?s[r]:e[r],u.jump(p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const s=e.measureViewportBox(),r=e.current,i=getComputedStyle(r),{display:o}=i,a={};"none"===o&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Dn[t](s,i)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=Dn[n](u,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),x&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:s}}return{target:e,transitionEnd:s}};function Rn(t,e,n,s){return(t=>Object.keys(t).some(En))(e)?Ln(t,e,n,s):{target:e,transitionEnd:s}}const jn=(t,e,n,s)=>{const r=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!C(e))return;const n=Mn(e,s);n&&t.set(n)});for(const t in e){const r=e[t];if(!C(r))continue;const i=Mn(r,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,s);return Rn(t,e=r.target,n,s=r.transitionEnd)},Bn={current:null},Un={current:!1};const zn=Object.keys(S),qn=zn.length,$n=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Hn=k.length;class Wn extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Q.render(this.render,!1,!0);const{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.isControllingVariants=M(e),this.isVariantNode=T(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==o[t]&&g(e)&&(e.set(o[t],!1),Ot(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Un.current||function(){if(Un.current=!0,x)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Bn.current=t.matches;t.addListener(e),e()}else Bn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Bn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),X.update(this.notifyUpdate),X.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=y.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Q.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r,i){let o,a;for(let t=0;t<qn;t++){const n=zn[t],{isEnabled:s,Feature:r,ProjectionNode:i,MeasureLayout:u}=S[n];i&&(o=i),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),u&&(a=u))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&E(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<$n.length;e++){const n=$n[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(g(i))t.addValue(r,i),Ot(s)&&s.add(r);else if(g(o))t.addValue(r,it(i,{owner:t})),Ot(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,it(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Hn;t++){const n=k[t],s=this.props[n];(A(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=it(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=f(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||g(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new nt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},r){let i=function(t,e,n){const s={};for(const r in t){const t=It(r,e);if(void 0!==t)s[r]=t;else{const t=n.getValue(r);t&&(s[r]=t.get())}}return s}(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),r){!function(t,e,n){var s,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),o=i.length;if(o)for(let a=0;a<o;a++){const o=i[a],u=e[o];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(r=null!==(s=n[o])&&void 0!==s?s:t.readValue(o))&&void 0!==r?r:e[o]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||q(c))?c=parseFloat(c):!Et(c)&&vt.test(u)&&(c=Pt(o,u)),t.addValue(o,it(c,{owner:t})),void 0===n[o]&&(n[o]=c),null!==c&&t.setBaseTarget(o,c))}}(this,n,i);const t=jn(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Kn extends Wn{readValueFromInstance(t,e){if(y.has(e)){const t=Ct(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(F(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,s){I(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return O(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;g(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){N(t,e,n,s)}}class Gn extends Wn{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(y.has(e)){const t=Ct(e);return t&&t.default||0}return e=D.has(e)?e:v(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return L(t,e)}build(t,e,n,s){R(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){j(t,e,n,s)}mount(t){this.isSVGTag=B(t.tagName),super.mount(t)}}const Jn={renderer:(t,e)=>U(t)?new Gn(e,{enableHardwareAcceleration:!1}):new Kn(e,{enableHardwareAcceleration:!0}),...un,...xn};export{Jn as domAnimation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as t}from"react";const e=t(null),a="undefined"!=typeof document;function r(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function n(t){return"string"==typeof t||Array.isArray(t)}function s(t){return"object"==typeof t&&"function"==typeof t.start}const o=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],i=["initial",...o];function f(t){return s(t.animate)||i.some(e=>n(t[e]))}function c(t){return Boolean(f(t)||t.variants)}const l={animation:["animate","
|
|
1
|
+
import{createContext as t}from"react";const e=t(null),a="undefined"!=typeof document;function r(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function n(t){return"string"==typeof t||Array.isArray(t)}function s(t){return"object"==typeof t&&"function"==typeof t.start}const o=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],i=["initial",...o];function f(t){return s(t.animate)||i.some(e=>n(t[e]))}function c(t){return Boolean(f(t)||t.variants)}const l={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},d={};for(const t in l)d[t]={isEnabled:e=>l[t].some(t=>!!e[t])};const p={hasAnimatedSinceResize:!0,hasEverUpdated:!1},u=t({}),g=t({}),m=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function h(t){return"string"==typeof t&&!t.includes("-")&&!!(m.indexOf(t)>-1||/[A-Z]/.test(t))}const y={};function v(t){Object.assign(y,t)}const w=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],b=new Set(w);function x(t,{layout:e,layoutId:a}){return b.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!y[t]||"opacity"===t)}const k=t=>Boolean(t&&t.getVelocity),O={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},T=w.length;const L=t=>e=>"string"==typeof e&&e.startsWith(t),X=L("--"),Y=L("var(--"),$=(t,e)=>e&&"number"==typeof t?e.transform(t):t,B=(t,e,a)=>Math.min(Math.max(a,t),e),S={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},A={...S,transform:t=>B(0,1,t)},R={...S,default:1},W=t=>Math.round(1e5*t)/1e5,P=/(-)?([\d]*\.?[\d])+/g,V=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Z=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function j(t){return"string"==typeof t}const z=t=>({test:e=>j(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),C=z("deg"),H=z("%"),E=z("px"),F=z("vh"),I=z("vw"),D={...H,parse:t=>H.parse(t)/100,transform:t=>H.transform(100*t)},M={...S,transform:Math.round},U={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,radius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,size:E,top:E,right:E,bottom:E,left:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,rotate:C,rotateX:C,rotateY:C,rotateZ:C,scale:R,scaleX:R,scaleY:R,scaleZ:R,skew:C,skewX:C,skewY:C,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:A,originX:D,originY:D,originZ:E,zIndex:M,fillOpacity:A,strokeOpacity:A,numOctaves:M};function q(t,e,a,r){const{style:n,vars:s,transform:o,transformOrigin:i}=t;let f=!1,c=!1,l=!0;for(const t in e){const a=e[t];if(X(t)){s[t]=a;continue}const r=U[t],d=$(a,r);if(b.has(t)){if(f=!0,o[t]=d,!l)continue;a!==(r.default||0)&&(l=!1)}else t.startsWith("origin")?(c=!0,i[t]=d):n[t]=d}if(e.transform||(f||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:a=!0},r,n){let s="";for(let e=0;e<T;e++){const a=w[e];if(void 0!==t[a]){s+=`${O[a]||a}(${t[a]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):a&&r&&(s="none"),s}(t.transform,a,l,r):n.transform&&(n.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:a=0}=i;n.transformOrigin=`${t} ${e} ${a}`}}function N(t,e,a){return"string"==typeof t?t:E.transform(e+a*t)}const G={offset:"stroke-dashoffset",array:"stroke-dasharray"},J={offset:"strokeDashoffset",array:"strokeDasharray"};function K(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(q(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:u,dimensions:g}=t;p.transform&&(g&&(u.transform=p.transform),delete p.transform),g&&(void 0!==r||void 0!==n||u.transform)&&(u.transformOrigin=function(t,e,a){return`${N(e,t.x,t.width)} ${N(a,t.y,t.height)}`}(g,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(p.x=e),void 0!==a&&(p.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?G:J;t[s.offset]=E.transform(-r);const o=E.transform(e),i=E.transform(a);t[s.array]=`${o} ${i}`}(p,s,o,i,!1)}const Q=t=>"string"==typeof t&&"svg"===t.toLowerCase(),_=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function tt(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const et=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function at(t,e,a,r){tt(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(et.has(a)?a:_(a),e.attrs[a])}function rt(t,e){const{style:a}=t,r={};for(const n in a)(k(a[n])||e.style&&k(e.style[n])||x(n,t))&&(r[n]=a[n]);return r}function nt(t,e){const a=rt(t,e);for(const r in t)if(k(t[r])||k(e[r])){a["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return a}function st(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const ot=t=>Array.isArray(t),it=t=>ot(t)?t[t.length-1]||0:t;function ft(t){const e=k(t)?t.get():t;return a=e,Boolean(a&&"object"==typeof a&&a.mix&&a.toValue)?e.toValue():e;var a}export{H as A,V as B,b as C,U as D,E,y as F,Y as G,C as H,I,F as J,it as K,u as L,w as M,ot as N,i as O,e as P,X as Q,tt as R,g as S,v as T,_ as U,o as V,et as W,r as a,f as b,n as c,k as d,x as e,d as f,p as g,q as h,a as i,K as j,Q as k,h as l,c as m,s as n,st as o,at as p,rt as q,ft as r,nt as s,B as t,j as u,Z as v,P as w,W as x,A as y,S as z};
|