motion-dom 12.24.8 → 12.24.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +31 -8
- package/dist/es/animation/NativeAnimation.mjs +10 -2
- package/dist/es/animation/NativeAnimationExtended.mjs +11 -4
- package/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +11 -3
- package/dist/es/index.mjs +1 -0
- package/dist/index.d.ts +17 -1
- package/dist/motion-dom.dev.js +31 -8
- package/dist/motion-dom.js +1 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -2045,6 +2045,12 @@ class NativeAnimation extends WithPromise {
|
|
|
2045
2045
|
super();
|
|
2046
2046
|
this.finishedTime = null;
|
|
2047
2047
|
this.isStopped = false;
|
|
2048
|
+
/**
|
|
2049
|
+
* Tracks a manually-set start time that takes precedence over WAAPI's
|
|
2050
|
+
* dynamic startTime. This is cleared when play() or time setter is called,
|
|
2051
|
+
* allowing WAAPI to take over timing.
|
|
2052
|
+
*/
|
|
2053
|
+
this.manualStartTime = null;
|
|
2048
2054
|
if (!options)
|
|
2049
2055
|
return;
|
|
2050
2056
|
const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;
|
|
@@ -2080,6 +2086,7 @@ class NativeAnimation extends WithPromise {
|
|
|
2080
2086
|
play() {
|
|
2081
2087
|
if (this.isStopped)
|
|
2082
2088
|
return;
|
|
2089
|
+
this.manualStartTime = null;
|
|
2083
2090
|
this.animation.play();
|
|
2084
2091
|
if (this.state === "finished") {
|
|
2085
2092
|
this.updateFinished();
|
|
@@ -2143,6 +2150,7 @@ class NativeAnimation extends WithPromise {
|
|
|
2143
2150
|
return motionUtils.millisecondsToSeconds(Number(this.animation.currentTime) || 0);
|
|
2144
2151
|
}
|
|
2145
2152
|
set time(newTime) {
|
|
2153
|
+
this.manualStartTime = null;
|
|
2146
2154
|
this.finishedTime = null;
|
|
2147
2155
|
this.animation.currentTime = motionUtils.secondsToMilliseconds(newTime);
|
|
2148
2156
|
}
|
|
@@ -2165,10 +2173,10 @@ class NativeAnimation extends WithPromise {
|
|
|
2165
2173
|
: this.animation.playState;
|
|
2166
2174
|
}
|
|
2167
2175
|
get startTime() {
|
|
2168
|
-
return Number(this.animation.startTime);
|
|
2176
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
2169
2177
|
}
|
|
2170
2178
|
set startTime(newStartTime) {
|
|
2171
|
-
this.animation.startTime = newStartTime;
|
|
2179
|
+
this.manualStartTime = this.animation.startTime = newStartTime;
|
|
2172
2180
|
}
|
|
2173
2181
|
/**
|
|
2174
2182
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
@@ -2230,7 +2238,7 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
2230
2238
|
*/
|
|
2231
2239
|
replaceTransitionType(options);
|
|
2232
2240
|
super(options);
|
|
2233
|
-
if (options.startTime) {
|
|
2241
|
+
if (options.startTime !== undefined) {
|
|
2234
2242
|
this.startTime = options.startTime;
|
|
2235
2243
|
}
|
|
2236
2244
|
this.options = options;
|
|
@@ -2255,8 +2263,14 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
2255
2263
|
...options,
|
|
2256
2264
|
autoplay: false,
|
|
2257
2265
|
});
|
|
2258
|
-
|
|
2259
|
-
|
|
2266
|
+
/**
|
|
2267
|
+
* Use wall-clock elapsed time for sampling.
|
|
2268
|
+
* Under CPU load, WAAPI's currentTime may not reflect actual
|
|
2269
|
+
* elapsed time, causing incorrect sampling and visual jumps.
|
|
2270
|
+
*/
|
|
2271
|
+
const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
|
|
2272
|
+
const delta = motionUtils.clamp(0, sampleDelta, sampleTime - sampleDelta);
|
|
2273
|
+
motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, sampleAnimation.sample(sampleTime).value, delta);
|
|
2260
2274
|
sampleAnimation.stop();
|
|
2261
2275
|
}
|
|
2262
2276
|
}
|
|
@@ -3837,16 +3851,24 @@ const isPrimaryPointer = (event) => {
|
|
|
3837
3851
|
}
|
|
3838
3852
|
};
|
|
3839
3853
|
|
|
3840
|
-
const
|
|
3854
|
+
const interactiveElements = new Set([
|
|
3841
3855
|
"BUTTON",
|
|
3842
3856
|
"INPUT",
|
|
3843
3857
|
"SELECT",
|
|
3844
3858
|
"TEXTAREA",
|
|
3845
3859
|
"A",
|
|
3846
3860
|
]);
|
|
3861
|
+
/**
|
|
3862
|
+
* Checks if an element is an interactive form element that should prevent
|
|
3863
|
+
* drag gestures from starting when clicked.
|
|
3864
|
+
*
|
|
3865
|
+
* This specifically targets form controls, buttons, and links - not just any
|
|
3866
|
+
* element with tabIndex, since motion elements with tap handlers automatically
|
|
3867
|
+
* get tabIndex=0 for keyboard accessibility.
|
|
3868
|
+
*/
|
|
3847
3869
|
function isElementKeyboardAccessible(element) {
|
|
3848
|
-
return (
|
|
3849
|
-
element.
|
|
3870
|
+
return (interactiveElements.has(element.tagName) ||
|
|
3871
|
+
element.isContentEditable === true);
|
|
3850
3872
|
}
|
|
3851
3873
|
|
|
3852
3874
|
const isPressing = new WeakSet();
|
|
@@ -4804,6 +4826,7 @@ exports.isCSSVariableName = isCSSVariableName;
|
|
|
4804
4826
|
exports.isCSSVariableToken = isCSSVariableToken;
|
|
4805
4827
|
exports.isDragActive = isDragActive;
|
|
4806
4828
|
exports.isDragging = isDragging;
|
|
4829
|
+
exports.isElementKeyboardAccessible = isElementKeyboardAccessible;
|
|
4807
4830
|
exports.isGenerator = isGenerator;
|
|
4808
4831
|
exports.isHTMLElement = isHTMLElement;
|
|
4809
4832
|
exports.isMotionValue = isMotionValue;
|
|
@@ -14,6 +14,12 @@ class NativeAnimation extends WithPromise {
|
|
|
14
14
|
super();
|
|
15
15
|
this.finishedTime = null;
|
|
16
16
|
this.isStopped = false;
|
|
17
|
+
/**
|
|
18
|
+
* Tracks a manually-set start time that takes precedence over WAAPI's
|
|
19
|
+
* dynamic startTime. This is cleared when play() or time setter is called,
|
|
20
|
+
* allowing WAAPI to take over timing.
|
|
21
|
+
*/
|
|
22
|
+
this.manualStartTime = null;
|
|
17
23
|
if (!options)
|
|
18
24
|
return;
|
|
19
25
|
const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;
|
|
@@ -49,6 +55,7 @@ class NativeAnimation extends WithPromise {
|
|
|
49
55
|
play() {
|
|
50
56
|
if (this.isStopped)
|
|
51
57
|
return;
|
|
58
|
+
this.manualStartTime = null;
|
|
52
59
|
this.animation.play();
|
|
53
60
|
if (this.state === "finished") {
|
|
54
61
|
this.updateFinished();
|
|
@@ -112,6 +119,7 @@ class NativeAnimation extends WithPromise {
|
|
|
112
119
|
return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
|
|
113
120
|
}
|
|
114
121
|
set time(newTime) {
|
|
122
|
+
this.manualStartTime = null;
|
|
115
123
|
this.finishedTime = null;
|
|
116
124
|
this.animation.currentTime = secondsToMilliseconds(newTime);
|
|
117
125
|
}
|
|
@@ -134,10 +142,10 @@ class NativeAnimation extends WithPromise {
|
|
|
134
142
|
: this.animation.playState;
|
|
135
143
|
}
|
|
136
144
|
get startTime() {
|
|
137
|
-
return Number(this.animation.startTime);
|
|
145
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
138
146
|
}
|
|
139
147
|
set startTime(newStartTime) {
|
|
140
|
-
this.animation.startTime = newStartTime;
|
|
148
|
+
this.manualStartTime = this.animation.startTime = newStartTime;
|
|
141
149
|
}
|
|
142
150
|
/**
|
|
143
151
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { clamp } from 'motion-utils';
|
|
2
|
+
import { time } from '../frameloop/sync-time.mjs';
|
|
2
3
|
import { JSAnimation } from './JSAnimation.mjs';
|
|
3
4
|
import { NativeAnimation } from './NativeAnimation.mjs';
|
|
4
5
|
import { replaceTransitionType } from './utils/replace-transition-type.mjs';
|
|
@@ -31,7 +32,7 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
31
32
|
*/
|
|
32
33
|
replaceTransitionType(options);
|
|
33
34
|
super(options);
|
|
34
|
-
if (options.startTime) {
|
|
35
|
+
if (options.startTime !== undefined) {
|
|
35
36
|
this.startTime = options.startTime;
|
|
36
37
|
}
|
|
37
38
|
this.options = options;
|
|
@@ -56,8 +57,14 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
56
57
|
...options,
|
|
57
58
|
autoplay: false,
|
|
58
59
|
});
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Use wall-clock elapsed time for sampling.
|
|
62
|
+
* Under CPU load, WAAPI's currentTime may not reflect actual
|
|
63
|
+
* elapsed time, causing incorrect sampling and visual jumps.
|
|
64
|
+
*/
|
|
65
|
+
const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
|
|
66
|
+
const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);
|
|
67
|
+
motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, sampleAnimation.sample(sampleTime).value, delta);
|
|
61
68
|
sampleAnimation.stop();
|
|
62
69
|
}
|
|
63
70
|
}
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
const
|
|
1
|
+
const interactiveElements = new Set([
|
|
2
2
|
"BUTTON",
|
|
3
3
|
"INPUT",
|
|
4
4
|
"SELECT",
|
|
5
5
|
"TEXTAREA",
|
|
6
6
|
"A",
|
|
7
7
|
]);
|
|
8
|
+
/**
|
|
9
|
+
* Checks if an element is an interactive form element that should prevent
|
|
10
|
+
* drag gestures from starting when clicked.
|
|
11
|
+
*
|
|
12
|
+
* This specifically targets form controls, buttons, and links - not just any
|
|
13
|
+
* element with tabIndex, since motion elements with tap handlers automatically
|
|
14
|
+
* get tabIndex=0 for keyboard accessibility.
|
|
15
|
+
*/
|
|
8
16
|
function isElementKeyboardAccessible(element) {
|
|
9
|
-
return (
|
|
10
|
-
element.
|
|
17
|
+
return (interactiveElements.has(element.tagName) ||
|
|
18
|
+
element.isContentEditable === true);
|
|
11
19
|
}
|
|
12
20
|
|
|
13
21
|
export { isElementKeyboardAccessible };
|
package/dist/es/index.mjs
CHANGED
|
@@ -44,6 +44,7 @@ export { isDragActive, isDragging } from './gestures/drag/state/is-active.mjs';
|
|
|
44
44
|
export { setDragLock } from './gestures/drag/state/set-active.mjs';
|
|
45
45
|
export { hover } from './gestures/hover.mjs';
|
|
46
46
|
export { press } from './gestures/press/index.mjs';
|
|
47
|
+
export { isElementKeyboardAccessible } from './gestures/press/utils/is-keyboard-accessible.mjs';
|
|
47
48
|
export { isNodeOrChild } from './gestures/utils/is-node-or-child.mjs';
|
|
48
49
|
export { isPrimaryPointer } from './gestures/utils/is-primary-pointer.mjs';
|
|
49
50
|
export { defaultTransformValue, parseValueFromTransform, readTransformValue } from './render/dom/parse-transform.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1174,6 +1174,12 @@ declare class NativeAnimation<T extends AnyResolvedKeyframe> extends WithPromise
|
|
|
1174
1174
|
private allowFlatten;
|
|
1175
1175
|
private isStopped;
|
|
1176
1176
|
private isPseudoElement;
|
|
1177
|
+
/**
|
|
1178
|
+
* Tracks a manually-set start time that takes precedence over WAAPI's
|
|
1179
|
+
* dynamic startTime. This is cleared when play() or time setter is called,
|
|
1180
|
+
* allowing WAAPI to take over timing.
|
|
1181
|
+
*/
|
|
1182
|
+
protected manualStartTime: number | null;
|
|
1177
1183
|
constructor(options?: NativeAnimationOptions);
|
|
1178
1184
|
updateMotionValue?(value?: T): void;
|
|
1179
1185
|
play(): void;
|
|
@@ -1593,6 +1599,16 @@ interface PointerEventOptions extends EventOptions {
|
|
|
1593
1599
|
*/
|
|
1594
1600
|
declare function press(targetOrSelector: ElementOrSelector, onPressStart: OnPressStartEvent, options?: PointerEventOptions): VoidFunction;
|
|
1595
1601
|
|
|
1602
|
+
/**
|
|
1603
|
+
* Checks if an element is an interactive form element that should prevent
|
|
1604
|
+
* drag gestures from starting when clicked.
|
|
1605
|
+
*
|
|
1606
|
+
* This specifically targets form controls, buttons, and links - not just any
|
|
1607
|
+
* element with tabIndex, since motion elements with tap handlers automatically
|
|
1608
|
+
* get tabIndex=0 for keyboard accessibility.
|
|
1609
|
+
*/
|
|
1610
|
+
declare function isElementKeyboardAccessible(element: Element): boolean;
|
|
1611
|
+
|
|
1596
1612
|
/**
|
|
1597
1613
|
* Recursively traverse up the tree to check whether the provided child node
|
|
1598
1614
|
* is the parent or a descendant of it.
|
|
@@ -3161,4 +3177,4 @@ declare const sync: Batcher;
|
|
|
3161
3177
|
*/
|
|
3162
3178
|
declare const cancelSync: Record<string, (process: Process) => void>;
|
|
3163
3179
|
|
|
3164
|
-
export { type AcceptedAnimations, type ActiveStatsBuffer, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState, type AnyResolvedKeyframe, AsyncMotionValueAnimation, type Batcher, type CSSStyleDeclarationWithTransform, type CSSVariableName, type CSSVariableToken, type CancelProcess, type Color, type ComplexValueInfo, type ComplexValues, type DOMKeyframesDefinition, DOMKeyframesResolver, type DOMValueAnimationOptions, type DecayOptions, type DragElastic, type DragHandler, type DraggableProps, type DurationSpringOptions, type DynamicOption, type ElementOrSelector, type EventInfo, type EventOptions, type FrameData, type FrameStats, type GeneratorFactory, type GeneratorFactoryFunction, GroupAnimation, GroupAnimationWithThen, type GroupedAnimations, type HSLA, type InactiveStatsBuffer, type InertiaOptions, type InterpolateOptions, JSAnimation, type KeyframeGenerator, type KeyframeOptions, KeyframeResolver, type LegacyAnimationControls, type MapInputRange, type Mixer, type MixerFactory, type MotionNodeAdvancedOptions, type MotionNodeAnimationOptions, type MotionNodeDragHandlers, type MotionNodeDraggableOptions, type MotionNodeEventOptions, type MotionNodeFocusHandlers, type MotionNodeHoverHandlers, type MotionNodeLayoutOptions, type MotionNodeOptions, type MotionNodePanHandlers, type MotionNodeTapHandlers, type MotionNodeViewportOptions, MotionValue, type MotionValueEventCallbacks, type MotionValueOptions, type MultiTransformer, NativeAnimation, NativeAnimationExtended, type NativeAnimationOptions, type NativeAnimationOptionsExtended, NativeAnimationWrapper, type NumberMap, type OnHoverEndEvent, type OnHoverStartEvent, type OnKeyframesResolved, type OnPressEndEvent, type OnPressStartEvent, type Owner, type PanHandler, type PanInfo, type PassiveEffect, type PointerEventOptions, type PressGestureInfo, type Process, type ProgressTimeline, type RGBA, type RepeatType, type ResolvedConstraints, type ResolvedElastic, type ResolvedKeyframes, type ResolvedValueKeyframe, type ResolvedValues, type SVGAttributes, type SVGForcedAttrKeyframesDefinition, type SVGForcedAttrProperties, type SVGForcedAttrTransitions, type SVGKeyframesDefinition, type SVGPathKeyframesDefinition, type SVGPathProperties, type SVGPathTransitions, type SVGTransitions, type Schedule, type SelectorCache, type SingleTransformer, type Spring, type SpringOptions, type StaggerOptions, type StaggerOrigin, type StartAnimation, type Stats, type StatsBuffer, type StatsRecording, type StatsSummary, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleTransitions, type Subscriber, type Summary, type TapHandlers, type TapInfo, type Target, type TargetAndTransition, type TargetResolver, type TimelineWithFallback, type TransformInputRange, type TransformOptions, type TransformProperties, type TransformTemplate, type Transformer, type Transition, type TransitionWithValueOverrides, type Tween, type UnresolvedKeyframes, type UnresolvedValueKeyframe, type ValueAnimationOptions, type ValueAnimationOptionsWithRenderContext, type ValueAnimationTransition, type ValueAnimationWithDynamicDelay, type ValueIndexes, type ValueKeyframe, type ValueKeyframesDefinition, type ValueTransformer, type ValueTransition, type ValueType, type ValueTypeMap, type VariableKeyframesDefinition, type VariableTransitions, type Variant, type VariantLabels, type Variants, type VelocityOptions, type ViewTransitionAnimationDefinition, ViewTransitionBuilder, type ViewTransitionOptions, type ViewTransitionTarget, type ViewTransitionTargetDefinition, type ViewportEventHandler, type ViewportOptions, type WithQuerySelectorAll, acceleratedValues, activeAnimations, addAttrValue, addStyleValue, alpha, analyseComplexValue, animateValue, animateView, animationMapKey, applyGeneratorOptions, applyPxDefaults, attachSpring, attrEffect, calcGeneratorDuration, cancelFrame, cancelMicrotask, cancelSync, collectMotionValues, color, complex, containsCSSVariable, convertOffsetToTimes, createGeneratorEasing, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, dimensionValueTypes, fillOffset, fillWildcards, findDimensionValueType, findValueType, flushKeyframeResolvers, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultValueType, getMixer, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getViewAnimationLayerInfo, getViewAnimations, hex, hover, hsla, hslaToRgba, inertia, interpolate, invisibleValues, isCSSVariableName, isCSSVariableToken, isDragActive, isDragging, isGenerator, isHTMLElement, isMotionValue, isNodeOrChild, isPrimaryPointer, isSVGElement, isSVGSVGElement, isWaapiSupportedEasing, keyframes, makeAnimationInstant, mapEasingToNativeEasing, mapValue, maxGeneratorDuration, microtask, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixVisibility, motionValue, number, numberValueTypes, observeTimeline, parseCSSVariable, parseValueFromTransform, percent, positionalKeys, press, progressPercentage, propEffect, px, readTransformValue, recordStats, resize, resolveElements, rgbUnit, rgba, scale, setDragLock, setStyle, spring, springValue, stagger, startWaapiAnimation, statsBuffer, styleEffect, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, svgEffect, sync, testValueType, time, transform, transformPropOrder, transformProps, transformValue, transformValueTypes, vh, vw };
|
|
3180
|
+
export { type AcceptedAnimations, type ActiveStatsBuffer, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState, type AnyResolvedKeyframe, AsyncMotionValueAnimation, type Batcher, type CSSStyleDeclarationWithTransform, type CSSVariableName, type CSSVariableToken, type CancelProcess, type Color, type ComplexValueInfo, type ComplexValues, type DOMKeyframesDefinition, DOMKeyframesResolver, type DOMValueAnimationOptions, type DecayOptions, type DragElastic, type DragHandler, type DraggableProps, type DurationSpringOptions, type DynamicOption, type ElementOrSelector, type EventInfo, type EventOptions, type FrameData, type FrameStats, type GeneratorFactory, type GeneratorFactoryFunction, GroupAnimation, GroupAnimationWithThen, type GroupedAnimations, type HSLA, type InactiveStatsBuffer, type InertiaOptions, type InterpolateOptions, JSAnimation, type KeyframeGenerator, type KeyframeOptions, KeyframeResolver, type LegacyAnimationControls, type MapInputRange, type Mixer, type MixerFactory, type MotionNodeAdvancedOptions, type MotionNodeAnimationOptions, type MotionNodeDragHandlers, type MotionNodeDraggableOptions, type MotionNodeEventOptions, type MotionNodeFocusHandlers, type MotionNodeHoverHandlers, type MotionNodeLayoutOptions, type MotionNodeOptions, type MotionNodePanHandlers, type MotionNodeTapHandlers, type MotionNodeViewportOptions, MotionValue, type MotionValueEventCallbacks, type MotionValueOptions, type MultiTransformer, NativeAnimation, NativeAnimationExtended, type NativeAnimationOptions, type NativeAnimationOptionsExtended, NativeAnimationWrapper, type NumberMap, type OnHoverEndEvent, type OnHoverStartEvent, type OnKeyframesResolved, type OnPressEndEvent, type OnPressStartEvent, type Owner, type PanHandler, type PanInfo, type PassiveEffect, type PointerEventOptions, type PressGestureInfo, type Process, type ProgressTimeline, type RGBA, type RepeatType, type ResolvedConstraints, type ResolvedElastic, type ResolvedKeyframes, type ResolvedValueKeyframe, type ResolvedValues, type SVGAttributes, type SVGForcedAttrKeyframesDefinition, type SVGForcedAttrProperties, type SVGForcedAttrTransitions, type SVGKeyframesDefinition, type SVGPathKeyframesDefinition, type SVGPathProperties, type SVGPathTransitions, type SVGTransitions, type Schedule, type SelectorCache, type SingleTransformer, type Spring, type SpringOptions, type StaggerOptions, type StaggerOrigin, type StartAnimation, type Stats, type StatsBuffer, type StatsRecording, type StatsSummary, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleTransitions, type Subscriber, type Summary, type TapHandlers, type TapInfo, type Target, type TargetAndTransition, type TargetResolver, type TimelineWithFallback, type TransformInputRange, type TransformOptions, type TransformProperties, type TransformTemplate, type Transformer, type Transition, type TransitionWithValueOverrides, type Tween, type UnresolvedKeyframes, type UnresolvedValueKeyframe, type ValueAnimationOptions, type ValueAnimationOptionsWithRenderContext, type ValueAnimationTransition, type ValueAnimationWithDynamicDelay, type ValueIndexes, type ValueKeyframe, type ValueKeyframesDefinition, type ValueTransformer, type ValueTransition, type ValueType, type ValueTypeMap, type VariableKeyframesDefinition, type VariableTransitions, type Variant, type VariantLabels, type Variants, type VelocityOptions, type ViewTransitionAnimationDefinition, ViewTransitionBuilder, type ViewTransitionOptions, type ViewTransitionTarget, type ViewTransitionTargetDefinition, type ViewportEventHandler, type ViewportOptions, type WithQuerySelectorAll, acceleratedValues, activeAnimations, addAttrValue, addStyleValue, alpha, analyseComplexValue, animateValue, animateView, animationMapKey, applyGeneratorOptions, applyPxDefaults, attachSpring, attrEffect, calcGeneratorDuration, cancelFrame, cancelMicrotask, cancelSync, collectMotionValues, color, complex, containsCSSVariable, convertOffsetToTimes, createGeneratorEasing, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, dimensionValueTypes, fillOffset, fillWildcards, findDimensionValueType, findValueType, flushKeyframeResolvers, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultValueType, getMixer, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getViewAnimationLayerInfo, getViewAnimations, hex, hover, hsla, hslaToRgba, inertia, interpolate, invisibleValues, isCSSVariableName, isCSSVariableToken, isDragActive, isDragging, isElementKeyboardAccessible, isGenerator, isHTMLElement, isMotionValue, isNodeOrChild, isPrimaryPointer, isSVGElement, isSVGSVGElement, isWaapiSupportedEasing, keyframes, makeAnimationInstant, mapEasingToNativeEasing, mapValue, maxGeneratorDuration, microtask, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixVisibility, motionValue, number, numberValueTypes, observeTimeline, parseCSSVariable, parseValueFromTransform, percent, positionalKeys, press, progressPercentage, propEffect, px, readTransformValue, recordStats, resize, resolveElements, rgbUnit, rgba, scale, setDragLock, setStyle, spring, springValue, stagger, startWaapiAnimation, statsBuffer, styleEffect, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, svgEffect, sync, testValueType, time, transform, transformPropOrder, transformProps, transformValue, transformValueTypes, vh, vw };
|
package/dist/motion-dom.dev.js
CHANGED
|
@@ -2044,6 +2044,12 @@
|
|
|
2044
2044
|
super();
|
|
2045
2045
|
this.finishedTime = null;
|
|
2046
2046
|
this.isStopped = false;
|
|
2047
|
+
/**
|
|
2048
|
+
* Tracks a manually-set start time that takes precedence over WAAPI's
|
|
2049
|
+
* dynamic startTime. This is cleared when play() or time setter is called,
|
|
2050
|
+
* allowing WAAPI to take over timing.
|
|
2051
|
+
*/
|
|
2052
|
+
this.manualStartTime = null;
|
|
2047
2053
|
if (!options)
|
|
2048
2054
|
return;
|
|
2049
2055
|
const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;
|
|
@@ -2079,6 +2085,7 @@
|
|
|
2079
2085
|
play() {
|
|
2080
2086
|
if (this.isStopped)
|
|
2081
2087
|
return;
|
|
2088
|
+
this.manualStartTime = null;
|
|
2082
2089
|
this.animation.play();
|
|
2083
2090
|
if (this.state === "finished") {
|
|
2084
2091
|
this.updateFinished();
|
|
@@ -2142,6 +2149,7 @@
|
|
|
2142
2149
|
return motionUtils.millisecondsToSeconds(Number(this.animation.currentTime) || 0);
|
|
2143
2150
|
}
|
|
2144
2151
|
set time(newTime) {
|
|
2152
|
+
this.manualStartTime = null;
|
|
2145
2153
|
this.finishedTime = null;
|
|
2146
2154
|
this.animation.currentTime = motionUtils.secondsToMilliseconds(newTime);
|
|
2147
2155
|
}
|
|
@@ -2164,10 +2172,10 @@
|
|
|
2164
2172
|
: this.animation.playState;
|
|
2165
2173
|
}
|
|
2166
2174
|
get startTime() {
|
|
2167
|
-
return Number(this.animation.startTime);
|
|
2175
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
2168
2176
|
}
|
|
2169
2177
|
set startTime(newStartTime) {
|
|
2170
|
-
this.animation.startTime = newStartTime;
|
|
2178
|
+
this.manualStartTime = this.animation.startTime = newStartTime;
|
|
2171
2179
|
}
|
|
2172
2180
|
/**
|
|
2173
2181
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
@@ -2229,7 +2237,7 @@
|
|
|
2229
2237
|
*/
|
|
2230
2238
|
replaceTransitionType(options);
|
|
2231
2239
|
super(options);
|
|
2232
|
-
if (options.startTime) {
|
|
2240
|
+
if (options.startTime !== undefined) {
|
|
2233
2241
|
this.startTime = options.startTime;
|
|
2234
2242
|
}
|
|
2235
2243
|
this.options = options;
|
|
@@ -2254,8 +2262,14 @@
|
|
|
2254
2262
|
...options,
|
|
2255
2263
|
autoplay: false,
|
|
2256
2264
|
});
|
|
2257
|
-
|
|
2258
|
-
|
|
2265
|
+
/**
|
|
2266
|
+
* Use wall-clock elapsed time for sampling.
|
|
2267
|
+
* Under CPU load, WAAPI's currentTime may not reflect actual
|
|
2268
|
+
* elapsed time, causing incorrect sampling and visual jumps.
|
|
2269
|
+
*/
|
|
2270
|
+
const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
|
|
2271
|
+
const delta = motionUtils.clamp(0, sampleDelta, sampleTime - sampleDelta);
|
|
2272
|
+
motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, sampleAnimation.sample(sampleTime).value, delta);
|
|
2259
2273
|
sampleAnimation.stop();
|
|
2260
2274
|
}
|
|
2261
2275
|
}
|
|
@@ -3836,16 +3850,24 @@
|
|
|
3836
3850
|
}
|
|
3837
3851
|
};
|
|
3838
3852
|
|
|
3839
|
-
const
|
|
3853
|
+
const interactiveElements = new Set([
|
|
3840
3854
|
"BUTTON",
|
|
3841
3855
|
"INPUT",
|
|
3842
3856
|
"SELECT",
|
|
3843
3857
|
"TEXTAREA",
|
|
3844
3858
|
"A",
|
|
3845
3859
|
]);
|
|
3860
|
+
/**
|
|
3861
|
+
* Checks if an element is an interactive form element that should prevent
|
|
3862
|
+
* drag gestures from starting when clicked.
|
|
3863
|
+
*
|
|
3864
|
+
* This specifically targets form controls, buttons, and links - not just any
|
|
3865
|
+
* element with tabIndex, since motion elements with tap handlers automatically
|
|
3866
|
+
* get tabIndex=0 for keyboard accessibility.
|
|
3867
|
+
*/
|
|
3846
3868
|
function isElementKeyboardAccessible(element) {
|
|
3847
|
-
return (
|
|
3848
|
-
element.
|
|
3869
|
+
return (interactiveElements.has(element.tagName) ||
|
|
3870
|
+
element.isContentEditable === true);
|
|
3849
3871
|
}
|
|
3850
3872
|
|
|
3851
3873
|
const isPressing = new WeakSet();
|
|
@@ -4803,6 +4825,7 @@
|
|
|
4803
4825
|
exports.isCSSVariableToken = isCSSVariableToken;
|
|
4804
4826
|
exports.isDragActive = isDragActive;
|
|
4805
4827
|
exports.isDragging = isDragging;
|
|
4828
|
+
exports.isElementKeyboardAccessible = isElementKeyboardAccessible;
|
|
4806
4829
|
exports.isGenerator = isGenerator;
|
|
4807
4830
|
exports.isHTMLElement = isHTMLElement;
|
|
4808
4831
|
exports.isMotionValue = isMotionValue;
|
package/dist/motion-dom.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],i={value:null,addProjectionMetrics:null};function s(t,s){let r=!1,a=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,u=n.reduce((t,e)=>(t[e]=function(t,e){let n=new Set,s=new Set,r=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},u=0;function c(e){o.has(e)&&(d.schedule(e),t()),u++,e(l)}const d={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{l=t,r?a=!0:(r=!0,[n,s]=[s,n],n.forEach(c),e&&i.value&&i.value.frameloop[e].push(u),u=0,n.clear(),r=!1,a&&(a=!1,d.process(t)))}};return d}(l,s?e:void 0),t),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:m,update:p,preRender:f,render:g,postRender:y}=u,v=()=>{const n=e.MotionGlobalConfig.useManualTiming?o.timestamp:performance.now();r=!1,e.MotionGlobalConfig.useManualTiming||(o.delta=a?1e3/60:Math.max(Math.min(n-o.timestamp,40),1)),o.timestamp=n,o.isProcessing=!0,c.process(o),d.process(o),h.process(o),m.process(o),p.process(o),f.process(o),g.process(o),y.process(o),o.isProcessing=!1,r&&s&&(a=!1,t(v))};return{schedule:n.reduce((e,n)=>{const i=u[n];return e[n]=(e,n=!1,s=!1)=>(r||(r=!0,a=!0,o.isProcessing||t(v)),i.schedule(e,n,s)),e},{}),cancel:t=>{for(let e=0;e<n.length;e++)u[n[e]].cancel(t)},state:o,steps:u}}const{schedule:r,cancel:a,state:o,steps:l}=s("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e.noop,!0);let u;function c(){u=void 0}const d={now:()=>(void 0===u&&d.set(o.isProcessing||e.MotionGlobalConfig.useManualTiming?o.timestamp:performance.now()),u),set:t=>{u=t,queueMicrotask(c)}},h={layout:0,mainThread:0,waapi:0},m=t=>e=>"string"==typeof e&&e.startsWith(t),p=m("--"),f=m("var(--"),g=t=>!!f(t)&&y.test(t.split("/*")[0].trim()),y=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const T={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},b={...T,transform:t=>e.clamp(0,1,t)},w={...T,default:1},S=t=>Math.round(1e5*t)/1e5,M=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const x=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,k=(t,e)=>n=>Boolean("string"==typeof n&&x.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),A=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,r,a,o]=i.match(M);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},E={...T,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},V={test:k("rgb","red"),parse:A("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+E.transform(t)+", "+E.transform(e)+", "+E.transform(n)+", "+S(b.transform(i))+")"};const P={test:k("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:V.transform},D=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),R=D("deg"),B=D("%"),F=D("px"),O=D("vh"),C=D("vw"),I=(()=>({...B,parse:t=>B.parse(t)/100,transform:t=>B.transform(100*t)}))(),K={test:k("hsl","hue"),parse:A("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+B.transform(S(e))+", "+B.transform(S(n))+", "+S(b.transform(i))+")"},L={test:t=>V.test(t)||P.test(t)||K.test(t),parse:t=>V.test(t)?V.parse(t):K.test(t)?K.parse(t):P.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?V.transform(t):K.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},W=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const $="number",N="color",j=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Y(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(j,t=>(L.test(t)?(i.color.push(r),s.push(N),n.push(L.parse(t))):t.startsWith("var(")?(i.var.push(r),s.push("var"),n.push(t)):(i.number.push(r),s.push($),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:a,indexes:i,types:s}}function z(t){return Y(t).values}function X(t){const{split:e,types:n}=Y(t),i=e.length;return t=>{let s="";for(let r=0;r<i;r++)if(s+=e[r],void 0!==t[r]){const e=n[r];s+=e===$?S(t[r]):e===N?L.transform(t[r]):t[r]}return s}}const G=t=>"number"==typeof t?0:L.test(t)?L.getAnimatableNone(t):t;const U={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(M)?.length||0)+(t.match(W)?.length||0)>0},parse:z,createTransformer:X,getAnimatableNone:function(t){const e=z(t);return X(t)(e.map(G))}};function q(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Z({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,a=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,o=2*n-i;s=q(o,i,t+1/3),r=q(o,i,t),a=q(o,i,t-1/3)}else s=r=a=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*a),alpha:i}}function _(t,e){return n=>n>0?e:t}const H=(t,e,n)=>t+(e-t)*n,J=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Q=[P,V,K];function tt(t){const n=(i=t,Q.find(t=>t.test(i)));var i;if(e.warning(Boolean(n),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(t);return n===K&&(s=Z(s)),s}const et=(t,e)=>{const n=tt(t),i=tt(e);if(!n||!i)return _(t,e);const s={...n};return t=>(s.red=J(n.red,i.red,t),s.green=J(n.green,i.green,t),s.blue=J(n.blue,i.blue,t),s.alpha=H(n.alpha,i.alpha,t),V.transform(s))},nt=new Set(["none","hidden"]);function it(t,e){return nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function st(t,e){return n=>H(t,e,n)}function rt(t){return"number"==typeof t?st:"string"==typeof t?g(t)?_:L.test(t)?et:lt:Array.isArray(t)?at:"object"==typeof t?L.test(t)?et:ot:_}function at(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>rt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function ot(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=rt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const lt=(t,n)=>{const i=U.createTransformer(n),s=Y(t),r=Y(n);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?nt.has(t)&&!r.values.length||nt.has(n)&&!s.values.length?it(t,n):e.pipe(at(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],a=t.indexes[r][i[r]],o=t.values[a]??0;n[s]=o,i[r]++}return n}(s,r),r.values),i):(e.warning(!0,`Complex values '${t}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),_(t,n))};function ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return H(t,e,n);return rt(t)(t,e)}const ct=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>r.update(e,t),stop:()=>a(e),now:()=>o.isProcessing?o.timestamp:d.now()}},dt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ht=2e4;function mt(t){let e=0;let n=t.next(e);for(;!n.done&&e<ht;)e+=50,n=t.next(e);return e>=ht?1/0:e}function pt(t,n=100,i){const s=i({...t,keyframes:[0,n]}),r=Math.min(mt(s),ht);return{type:"keyframes",ease:t=>s.next(r*t).value/n,duration:e.millisecondsToSeconds(r)}}function ft(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}const gt=100,yt=10,vt=1,Tt=0,bt=800,wt=.3,St=.3,Mt={granular:.01,default:2},xt={granular:.005,default:.5},kt=.01,At=10,Et=.05,Vt=1,Pt=.001;function Dt({duration:t=bt,bounce:n=wt,velocity:i=Tt,mass:s=vt}){let r,a;e.warning(t<=e.secondsToMilliseconds(At),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-n;o=e.clamp(Et,Vt,o),t=e.clamp(kt,At,e.millisecondsToSeconds(t)),o<1?(r=e=>{const n=e*o,s=n*t,r=n-i,a=Bt(e,o),l=Math.exp(-s);return Pt-r/a*l},a=e=>{const n=e*o*t,s=n*i+i,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-n),u=Bt(Math.pow(e,2),o);return(-r(e)+Pt>0?-1:1)*((s-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,a=e=>Math.exp(-e*t)*(t*t*(i-e)));const l=function(t,e,n){let i=n;for(let n=1;n<Rt;n++)i-=t(i)/e(i);return i}(r,a,5/t);if(t=e.secondsToMilliseconds(t),isNaN(l))return{stiffness:gt,damping:yt,duration:t};{const e=Math.pow(l,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}const Rt=12;function Bt(t,e){return t*Math.sqrt(1-e*e)}const Ft=["duration","bounce"],Ot=["stiffness","damping","mass"];function Ct(t,e){return e.some(e=>void 0!==t[e])}function It(t=St,n=wt){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t;let{restSpeed:s,restDelta:r}=i;const a=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:c,mass:d,duration:h,velocity:m,isResolvedFromDuration:p}=function(t){let n={velocity:Tt,stiffness:gt,damping:yt,mass:vt,isResolvedFromDuration:!1,...t};if(!Ct(t,Ot)&&Ct(t,Ft))if(t.visualDuration){const i=t.visualDuration,s=2*Math.PI/(1.2*i),r=s*s,a=2*e.clamp(.05,1,1-(t.bounce||0))*Math.sqrt(r);n={...n,mass:vt,stiffness:r,damping:a}}else{const e=Dt(t);n={...n,...e,mass:vt},n.isResolvedFromDuration=!0}return n}({...i,velocity:-e.millisecondsToSeconds(i.velocity||0)}),f=m||0,g=c/(2*Math.sqrt(u*d)),y=o-a,v=e.millisecondsToSeconds(Math.sqrt(u/d)),T=Math.abs(y)<5;let b;if(s||(s=T?Mt.granular:Mt.default),r||(r=T?xt.granular:xt.default),g<1){const t=Bt(v,g);b=e=>{const n=Math.exp(-g*v*e);return o-n*((f+g*v*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}}else if(1===g)b=t=>o-Math.exp(-v*t)*(y+(f+v*y)*t);else{const t=v*Math.sqrt(g*g-1);b=e=>{const n=Math.exp(-g*v*e),i=Math.min(t*e,300);return o-n*((f+g*v*y)*Math.sinh(i)+t*y*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const n=b(t);if(p)l.done=t>=h;else{let i=0===t?f:0;g<1&&(i=0===t?e.secondsToMilliseconds(f):ft(b,t,n));const a=Math.abs(i)<=s,u=Math.abs(o-n)<=r;l.done=a&&u}return l.value=l.done?o:n,l},toString:()=>{const t=Math.min(mt(w),ht),e=dt(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function Kt({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],h={done:!1,value:d},m=t=>void 0===o?l:void 0===l||Math.abs(o-t)<Math.abs(l-t)?o:l;let p=n*e;const f=d+p,g=void 0===a?f:a(f);g!==f&&(p=g-d);const y=t=>-p*Math.exp(-t/i),v=t=>g+y(t),T=t=>{const e=y(t),n=v(t);h.done=Math.abs(e)<=u,h.value=h.done?g:n};let b,w;const S=t=>{var e;(e=h.value,void 0!==o&&e<o||void 0!==l&&e>l)&&(b=t,w=It({keyframes:[h.value,m(h.value)],velocity:ft(v,t,h.value),damping:s,stiffness:r,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,T(t),S(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&T(t),h)}}}function Lt(t,n,{clamp:i=!0,ease:s,mixer:r}={}){const a=t.length;if(e.invariant(a===n.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>n[0];if(2===a&&n[0]===n[1])return()=>n[1];const o=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],r=i||e.MotionGlobalConfig.mix||ut,a=t.length-1;for(let i=0;i<a;i++){let a=r(t[i],t[i+1]);if(n){const t=Array.isArray(n)?n[i]||e.noop:n;a=e.pipe(t,a)}s.push(a)}return s}(n,s,r),u=l.length,c=i=>{if(o&&i<t[0])return n[0];let s=0;if(u>1)for(;s<t.length-2&&!(i<t[s+1]);s++);const r=e.progress(t[s],t[s+1],i);return l[s](r)};return i?n=>c(e.clamp(t[0],t[a-1],n)):c}function Wt(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const r=e.progress(0,n,s);t.push(H(i,1,r))}}function $t(t){const e=[0];return Wt(e,t.length-1),e}function Nt(t,e){return t.map(t=>t*e)}function jt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function Yt({duration:t=300,keyframes:n,times:i,ease:s="easeInOut"}){const r=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s),a={done:!1,value:n[0]},o=Lt(Nt(i&&i.length===n.length?i:$t(n),t),n,{ease:Array.isArray(r)?r:jt(n,r)});return{calculatedDuration:t,next:e=>(a.value=o(e),a.done=e>=t,a)}}It.applyToOptions=t=>{const n=pt(t,100,It);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t};const zt=t=>null!==t;function Xt(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(zt),a=s<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return a&&void 0!==i?i:r[a]}const Gt={decay:Kt,inertia:Kt,tween:Yt,keyframes:Yt,spring:It};function Ut(t){"string"==typeof t.type&&(t.type=Gt[t.type])}class qt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Zt=t=>t/100;class _t extends qt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==d.now()&&this.tick(d.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},h.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Ut(t);const{type:n=Yt,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=t;let{keyframes:o}=t;const l=n||Yt;l!==Yt&&"number"!=typeof o[0]&&(this.mixKeyframes=e.pipe(Zt,ut(o[0],o[1])),o=[0,100]);const u=l({...t,keyframes:o});"mirror"===r&&(this.mirroredGenerator=l({...t,keyframes:[...o].reverse(),velocity:-a})),null===u.calculatedDuration&&(u.calculatedDuration=mt(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:m,type:p,onUpdate:f,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let T=this.currentTime,b=i;if(d){const t=Math.min(this.currentTime,s)/o;let n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&n--,n=Math.min(n,d+1);Boolean(n%2)&&("reverse"===h?(i=1-i,m&&(i-=m/o)):"mirror"===h&&(b=a)),T=e.clamp(0,1,i)*o}const w=v?{done:!1,value:c[0]}:b.next(T);r&&(w.value=r(w.value));let{done:S}=w;v||null===l||(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const M=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return M&&p!==Kt&&(w.value=Xt(c,this.options,g,this.speed)),f&&f(w.value),M&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(d.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ct,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(d.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,h.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Ht(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Jt=t=>180*t/Math.PI,Qt=t=>{const e=Jt(Math.atan2(t[1],t[0]));return ee(e)},te={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qt,rotateZ:Qt,skewX:t=>Jt(Math.atan(t[1])),skewY:t=>Jt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ee=t=>((t%=360)<0&&(t+=360),t),ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ie=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),se={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ne,scaleY:ie,scale:t=>(ne(t)+ie(t))/2,rotateX:t=>ee(Jt(Math.atan2(t[6],t[5]))),rotateY:t=>ee(Jt(Math.atan2(-t[2],t[0]))),rotateZ:Qt,rotate:Qt,skewX:t=>Jt(Math.atan(t[4])),skewY:t=>Jt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function re(t){return t.includes("scale")?1:0}function ae(t,e){if(!t||"none"===t)return re(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=se,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=te,s=e}if(!s)return re(e);const r=i[e],a=s[1].split(",").map(oe);return"function"==typeof r?r(a):a[r]}function oe(t){return parseFloat(t.trim())}const le=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ue=(()=>new Set(le))(),ce=t=>t===T||t===F,de=new Set(["x","y","z"]),he=le.filter(t=>!de.has(t));const me={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ae(e,"x"),y:(t,{transform:e})=>ae(e,"y")};me.translateX=me.x,me.translateY=me.y;const pe=new Set;let fe=!1,ge=!1,ye=!1;function ve(){if(ge){const t=Array.from(pe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return he.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}ge=!1,fe=!1,pe.forEach(t=>t.complete(ye)),pe.clear()}function Te(){pe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ge=!0)})}function be(){ye=!0,Te(),ve(),ye=!1}class we{constructor(t,e,n,i,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(pe.add(this),fe||(fe=!0,r.read(Te),r.resolveKeyframes(ve))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,r);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),i&&void 0===s&&i.set(t[0])}Ht(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pe.delete(this)}cancel(){"scheduled"===this.state&&(pe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Se=t=>t.startsWith("--");function Me(t,e,n){Se(e)?t.style.setProperty(e,n):t.style[e]=n}const xe=e.memo(()=>void 0!==window.ScrollTimeline),ke={};function Ae(t,n){const i=e.memo(t);return()=>ke[n]??i()}const Ee=Ae(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ve=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Pe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ve([0,.65,.55,1]),circOut:Ve([.55,0,1,.45]),backIn:Ve([.31,.01,.66,-.59]),backOut:Ve([.33,1.53,.69,.99])};function De(t,n){return t?"function"==typeof t?Ee()?dt(t,n):"ease-out":e.isBezierDefinition(t)?Ve(t):Array.isArray(t)?t.map(t=>De(t,n)||Pe.easeOut):Pe[t]:void 0}function Re(t,e,n,{delay:s=0,duration:r=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:u}={},c=void 0){const d={[e]:n};u&&(d.offset=u);const m=De(l,r);Array.isArray(m)&&(d.easing=m),i.value&&h.waapi++;const p={delay:s,duration:r,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};c&&(p.pseudoElement=c);const f=t.animate(d,p);return i.value&&f.finished.finally(()=>{h.waapi--}),f}function Be(t){return"function"==typeof t&&"applyToOptions"in t}function Fe({type:t,...e}){return Be(t)&&Ee()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Oe extends qt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=a,this.options=t,e.invariant("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=Fe(t);this.animation=Re(n,i,s,u,r),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=Xt(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):Me(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&xe()?(this.animation.timeline=t,e.noop):n(this)}}const Ce={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function Ie(t){"string"==typeof t.ease&&t.ease in Ce&&(t.ease=Ce[t.ease])}class Ke extends Oe{constructor(t){Ie(t),Ut(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...a}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const o=new _t({...a,autoplay:!1}),l=e.secondsToMilliseconds(this.finishedTime??this.time);n.setWithVelocity(o.sample(l-10).value,o.sample(l).value,10),o.stop()}}const Le=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!U.test(t)&&"0"!==t||t.startsWith("url(")));function We(t){t.duration=0,t.type="keyframes"}const $e=new Set(["opacity","clipPath","filter","transform"]),Ne=e.memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function je(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:a}=t,o=e?.owner?.current;if(!(o instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Ne()&&n&&$e.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==s&&0!==r&&"inertia"!==a}class Ye{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return ze(this.animations,"duration")}get iterationDuration(){return ze(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ze(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Xe extends Oe{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Ge=new WeakMap;const Ue=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qe(t){const e=Ue.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Ze(t,n,i=1){e.invariant(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=qe(t);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return e.isNumericalString(t)?parseFloat(t):t}return g(r)?Ze(r,n,i+1):r}function _e(t,e){return t?.[e]??t?.default??t}const He=new Set(["width","height","top","left","right","bottom",...le]),Je=t=>e=>e.test(t),Qe=[T,F,B,R,C,O,{test:t=>"auto"===t,parse:t=>t}],tn=t=>Qe.find(Je(t));function en(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const nn=new Set(["brightness","contrast","saturate","opacity"]);function sn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(M)||[];if(!i)return t;const s=n.replace(i,"");let r=nn.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const rn=/\b([a-z-]*)\(.*?\)/gu,an={...U,getAnimatableNone:t=>{const e=t.match(rn);return e?e.map(sn).join(" "):t}},on={...T,transform:Math.round},ln={rotate:R,rotateX:R,rotateY:R,rotateZ:R,scale:w,scaleX:w,scaleY:w,scaleZ:w,skew:R,skewX:R,skewY:R,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:b,originX:I,originY:I,originZ:F},un={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,backgroundPositionX:F,backgroundPositionY:F,...ln,zIndex:on,fillOpacity:b,strokeOpacity:b,numOctaves:on},cn={...un,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:an,WebkitFilter:an},dn=t=>cn[t];function hn(t,e){let n=dn(t);return n!==an&&(n=U),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const mn=new Set(["auto","none","0"]);const pn=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","backgroundPositionX","backgroundPositionY"]);const fn=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),gn=new Set(["opacity","clipPath","filter","transform"]);function yn(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function vn(t){return(e,n)=>{const i=yn(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Tn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class bn{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const l=()=>{const i=e.get();this.latest[t]=s?Tn(i,un[t]):i,n&&r.render(n)};l();const u=e.on("change",l);i&&e.addDependent(i);const c=()=>{u(),n&&a(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:c}),c}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function wn(t){const e=new WeakMap,n=[];return(i,s)=>{const r=e.get(i)??new bn;e.set(i,r);for(const e in s){const a=s[e],o=t(i,r,e,a);n.push(o)}return()=>{for(const t of n)t()}}}const Sn=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),r=s?n:n.startsWith("data")||n.startsWith("aria")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const a=s?()=>{t[r]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(r):t.setAttribute(r,String(i))};return e.set(n,i,a)},Mn=vn(wn(Sn)),xn=wn((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function kn(t){return e.isObject(t)&&"offsetHeight"in t}const An={current:void 0};class En{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=d.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=d.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new e.SubscriptionManager);const i=this.events[t].add(n);return"change"===t?()=>{i(),r.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return An.current&&An.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=d.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vn(t,e){return new En(t,e)}const Pn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Dn=new Set(["originX","originY","originZ"]),Rn=(t,e,n,i)=>{let s,r;return ue.has(n)?(e.get("transform")||(kn(t)||e.get("transformBox")||Rn(t,e,"transformBox",new En("fill-box")),e.set("transform",new En("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<le.length;i++){const s=le[i],r=t.latest[s];if(void 0===r)continue;let a=!0;a="number"==typeof r?r===(s.startsWith("scale")?1:0):0===parseFloat(r),a||(n=!1,e+=`${Pn[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),r=e.get("transform")):Dn.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new En(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),r=e.get("transformOrigin")):s=Se(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,r)},Bn=vn(wn(Rn)),Fn=F.transform;const On=vn(wn((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return r.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",Fn(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new En("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${Fn(n)} ${Fn(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Sn(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Rn:Sn)(t,e,n,i)}));const{schedule:Cn,cancel:In}=s(queueMicrotask,!1),Kn={x:!1,y:!1};function Ln(){return Kn.x||Kn.y}function Wn(t,e){const n=yn(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function $n(t){return!("touch"===t.pointerType||Ln())}const Nn=(t,e)=>!!e&&(t===e||Nn(t,e.parentElement)),jn=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Yn=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const zn=new WeakSet;function Xn(t){return e=>{"Enter"===e.key&&t(e)}}function Gn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Un(t){return jn(t)&&!Ln()}function qn(t){return e.isObject(t)&&"ownerSVGElement"in t}const Zn=new WeakMap;let _n;const Hn=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:qn(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Jn=Hn("inline","width","offsetWidth"),Qn=Hn("block","height","offsetHeight");function ti({target:t,borderBoxSize:e}){Zn.get(t)?.forEach(n=>{n(t,{get width(){return Jn(t,e)},get height(){return Qn(t,e)}})})}function ei(t){t.forEach(ti)}function ni(t,e){_n||"undefined"!=typeof ResizeObserver&&(_n=new ResizeObserver(ei));const n=yn(t);return n.forEach(t=>{let n=Zn.get(t);n||(n=new Set,Zn.set(t,n)),n.add(e),_n?.observe(t)}),()=>{n.forEach(t=>{const n=Zn.get(t);n?.delete(e),n?.size||_n?.unobserve(t)})}}const ii=new Set;let si;function ri(t){return ii.add(t),si||(si=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ii.forEach(e=>e(t))},window.addEventListener("resize",si)),()=>{ii.delete(t),ii.size||"function"!=typeof si||(window.removeEventListener("resize",si),si=void 0)}}function ai(){const{value:t}=i;null!==t?(t.frameloop.rate.push(o.delta),t.animations.mainThread.push(h.mainThread),t.animations.waapi.push(h.waapi),t.animations.layout.push(h.layout)):a(ai)}function oi(t){return t.reduce((t,e)=>t+e,0)/t.length}function li(t,e=oi){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ui=t=>Math.round(1e3/t);function ci(){i.value=null,i.addProjectionMetrics=null}function di(){const{value:t}=i;if(!t)throw new Error("Stats are not being measured");ci(),a(ai);const e={frameloop:{setup:li(t.frameloop.setup),rate:li(t.frameloop.rate),read:li(t.frameloop.read),resolveKeyframes:li(t.frameloop.resolveKeyframes),preUpdate:li(t.frameloop.preUpdate),update:li(t.frameloop.update),preRender:li(t.frameloop.preRender),render:li(t.frameloop.render),postRender:li(t.frameloop.postRender)},animations:{mainThread:li(t.animations.mainThread),waapi:li(t.animations.waapi),layout:li(t.animations.layout)},layoutProjection:{nodes:li(t.layoutProjection.nodes),calculatedTargetDeltas:li(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:li(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ui(n.min),n.max=ui(n.max),n.avg=ui(n.avg),[n.min,n.max]=[n.max,n.min],e}function hi(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function mi(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=Lt(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function pi(t){const e=[];An.current=e;const n=t();An.current=void 0;const i=Vn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>r.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),a(i)})}(e,i,t),i}const fi=t=>Boolean(t&&t.getVelocity);function gi(t,e,n){const i=t.get();let s,a=null,o=i;const l="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,u=()=>{a&&(a.stop(),a=null)};if(t.attach((e,i)=>{o=e,s=t=>i(yi(t,l)),r.postRender(()=>{u(),a=new _t({keyframes:[vi(t.get()),vi(o)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),a?.then(()=>{t.events.animationComplete?.notify()})})},u),fi(e)){const n=e.on("change",e=>t.set(yi(e,l))),i=t.on("destroy",n);return()=>{n(),i()}}return u}function yi(t,e){return e?t+e:t}function vi(t){return"number"==typeof t?t:parseFloat(t)}const Ti=[...Qe,L,U];function bi(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let wi={},Si=null;const Mi=(t,e)=>{wi[t]=e},xi=()=>{Si||(Si=document.createElement("style"),Si.id="motion-view");let t="";for(const e in wi){const n=wi[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Si.textContent=t,document.head.appendChild(Si),wi={}},ki=()=>{Si&&Si.parentElement&&Si.parentElement.removeChild(Si)};function Ai(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Ei(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Vi(){return document.getAnimations().filter(Ei)}const Pi=["layout","enter","exit","new","old"];function Di(t){const{update:n,targets:i,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await n(),t(new Ye([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||Mi(":root",{"view-transition-name":"none"}),Mi("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),xi();const r=document.startViewTransition(async()=>{await n()});return r.finished.finally(()=>{ki()}),new Promise(t=>{r.ready.then(()=>{const n=Vi(),r=[];i.forEach((t,n)=>{for(const i of Pi){if(!t[i])continue;const{keyframes:a,options:o}=t[i];for(let[t,l]of Object.entries(a)){if(!l)continue;const a={..._e(s,t),..._e(o,t)},u=bi(i);if("opacity"===t&&!Array.isArray(l)){l=["new"===u?0:1,l]}"function"==typeof a.delay&&(a.delay=a.delay(0,1)),a.duration&&(a.duration=e.secondsToMilliseconds(a.duration)),a.delay&&(a.delay=e.secondsToMilliseconds(a.delay));const c=new Oe({...a,element:document.documentElement,name:t,pseudoElement:`::view-transition-${u}(${n})`,keyframes:l});r.push(c)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:a}=n;if(!a)continue;const o=Ai(a);if(!o)continue;const l=i.get(o.layer);if(l)Ri(l,"enter")&&Ri(l,"exit")&&n.getKeyframes().some(t=>t.mixBlendMode)?r.push(new Xe(t)):t.cancel();else{const i="group"===o.type?"layout":"";let a={..._e(s,i)};a.duration&&(a.duration=e.secondsToMilliseconds(a.duration)),a=Fe(a);const l=De(a.ease,a.duration);n.updateTiming({delay:e.secondsToMilliseconds(a.delay??0),duration:a.duration,easing:l}),r.push(new Xe(t))}}t(new Ye(r))})})}function Ri(t,e){return t?.[e]?.keyframes.opacity}let Bi=[],Fi=null;function Oi(){Fi=null;const[t]=Bi;var n;t&&(n=t,e.removeItem(Bi,n),Fi=n,Di(n).then(t=>{n.notifyReady(t),t.finished.finally(Oi)}))}function Ci(){for(let t=Bi.length-1;t>=0;t--){const e=Bi[t],{interrupt:n}=e.options;if("immediate"===n){const n=Bi.slice(0,t+1).map(t=>t.update),i=Bi.slice(t+1);e.update=()=>{n.forEach(t=>t())},Bi=[e,...i];break}}Fi&&"immediate"!==Bi[0]?.options.interrupt||Oi()}class Ii{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.notifyReady=e.noop,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...n},i=this,Bi.push(i),Cn.render(Ci)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Ki=r,Li=n.reduce((t,e)=>(t[e]=t=>a(t),t),{});t.AsyncMotionValueAnimation=class extends qt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:o,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=d.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:o,motionValue:l,element:u,...c},m=u?.KeyframeResolver||we;this.keyframeResolver=new m(a,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:o,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=d.now(),function(t,n,i,s){const r=t[0];if(null===r)return!1;if("display"===n||"visibility"===n)return!0;const a=t[t.length-1],o=Le(r,n),l=Le(a,n);return e.warning(o===l,`You are trying to animate ${n} from "${r}" to "${a}". "${o?a:r}" is not an animatable value.`,"value-not-animatable"),!(!o||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===i||Be(i))&&s)}(t,r,a,o)||(!e.MotionGlobalConfig.instantAnimations&&l||c?.(Xt(t,i,n)),t[0]=t[t.length-1],We(i),i.repeat=0);const h={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},m=!u&&je(h)?new Ke({...h,element:h.motionValue.owner.current}):new _t(h);m.finished.then(()=>this.notifyFinished()).catch(e.noop),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),be()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},t.DOMKeyframesResolver=class extends we{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),g(i))){const s=Ze(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!He.has(n)||2!==t.length)return;const[i,s]=t,r=tn(i),a=tn(s);if(v(i)!==v(s)&&me[n])this.needsMeasurement=!0;else if(r!==a)if(ce(r)&&ce(a))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else me[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||en(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!mn.has(e)&&Y(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=hn(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,r=n[s];n[s]=me[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}},t.GroupAnimation=Ye,t.GroupAnimationWithThen=class extends Ye{then(t,e){return this.finished.finally(t).then(()=>{})}},t.JSAnimation=_t,t.KeyframeResolver=we,t.MotionValue=En,t.NativeAnimation=Oe,t.NativeAnimationExtended=Ke,t.NativeAnimationWrapper=Xe,t.ViewTransitionBuilder=Ii,t.acceleratedValues=gn,t.activeAnimations=h,t.addAttrValue=Sn,t.addStyleValue=Rn,t.alpha=b,t.analyseComplexValue=Y,t.animateValue=function(t){return new _t(t)},t.animateView=function(t,e={}){return new Ii(t,e)},t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyGeneratorOptions=Fe,t.applyPxDefaults=function(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&pn.has(e)&&(t[n]=t[n]+"px")},t.attachSpring=gi,t.attrEffect=Mn,t.calcGeneratorDuration=mt,t.cancelFrame=a,t.cancelMicrotask=In,t.cancelSync=Li,t.collectMotionValues=An,t.color=L,t.complex=U,t.containsCSSVariable=v,t.convertOffsetToTimes=Nt,t.createGeneratorEasing=pt,t.createRenderBatcher=s,t.cubicBezierAsString=Ve,t.defaultEasing=jt,t.defaultOffset=$t,t.defaultTransformValue=re,t.defaultValueTypes=cn,t.degrees=R,t.dimensionValueTypes=Qe,t.fillOffset=Wt,t.fillWildcards=Ht,t.findDimensionValueType=tn,t.findValueType=t=>Ti.find(Je(t)),t.flushKeyframeResolvers=be,t.frame=r,t.frameData=o,t.frameSteps=l,t.generateLinearEasing=dt,t.getAnimatableNone=hn,t.getAnimationMap=function(t){const e=Ge.get(t)||new Map;return Ge.set(t,e),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return Se(e)?n.getPropertyValue(e):n[e]},t.getDefaultValueType=dn,t.getMixer=rt,t.getOriginIndex=hi,t.getValueAsType=Tn,t.getValueTransition=_e,t.getVariableValue=Ze,t.getViewAnimationLayerInfo=Ai,t.getViewAnimations=Vi,t.hex=P,t.hover=function(t,e,n={}){const[i,s,r]=Wn(t,n),a=t=>{if(!$n(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const r=t=>{$n(t)&&(i(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,s)};return i.forEach(t=>{t.addEventListener("pointerenter",a,s)}),r},t.hsla=K,t.hslaToRgba=Z,t.inertia=Kt,t.interpolate=Lt,t.invisibleValues=nt,t.isCSSVariableName=p,t.isCSSVariableToken=g,t.isDragActive=Ln,t.isDragging=Kn,t.isGenerator=Be,t.isHTMLElement=kn,t.isMotionValue=fi,t.isNodeOrChild=Nn,t.isPrimaryPointer=jn,t.isSVGElement=qn,t.isSVGSVGElement=function(t){return qn(t)&&"svg"===t.tagName},t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Ee()||!n||"string"==typeof n&&(n in Pe||Ee())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.keyframes=Yt,t.makeAnimationInstant=We,t.mapEasingToNativeEasing=De,t.mapValue=function(t,e,n,i){const s=mi(e,n,i);return pi(()=>s(t.get()))},t.maxGeneratorDuration=ht,t.microtask=Cn,t.mix=ut,t.mixArray=at,t.mixColor=et,t.mixComplex=lt,t.mixImmediate=_,t.mixLinearColor=J,t.mixNumber=H,t.mixObject=ot,t.mixVisibility=it,t.motionValue=Vn,t.number=T,t.numberValueTypes=un,t.observeTimeline=function(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return r.preUpdate(i,!0),()=>a(i)},t.parseCSSVariable=qe,t.parseValueFromTransform=ae,t.percent=B,t.positionalKeys=He,t.press=function(t,e,n={}){const[i,s,r]=Wn(t,n),a=t=>{const i=t.currentTarget;if(!Un(t))return;zn.add(i);const r=e(i,t),a=(t,e)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),zn.has(i)&&zn.delete(i),Un(t)&&"function"==typeof r&&r(t,{success:e})},o=t=>{a(t,i===window||i===document||n.useGlobalTarget||Nn(i,t.target))},l=t=>{a(t,!1)};window.addEventListener("pointerup",o,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",a,s),kn(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Xn(()=>{if(zn.has(n))return;Gn(n,"down");const t=Xn(()=>{Gn(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Gn(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,Yn.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r},t.progressPercentage=I,t.propEffect=xn,t.px=F,t.readTransformValue=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ae(n,e)},t.recordStats=function(){if(i.value)throw ci(),new Error("Stats are already being measured");const t=i;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},r.postRender(ai,!0),di},t.resize=function(t,e){return"function"==typeof t?ri(t):ni(t,e)},t.resolveElements=yn,t.rgbUnit=E,t.rgba=V,t.scale=w,t.setDragLock=function(t){return"x"===t||"y"===t?Kn[t]?null:(Kn[t]=!0,()=>{Kn[t]=!1}):Kn.x||Kn.y?null:(Kn.x=Kn.y=!0,()=>{Kn.x=Kn.y=!1})},t.setStyle=Me,t.spring=It,t.springValue=function(t,e){const n=Vn(fi(t)?t.get():t);return gi(n,t,e),n},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s}={}){return(r,a)=>{const o="number"==typeof i?i:hi(i,a),l=Math.abs(o-r);let u=t*l;if(s){const n=a*t;u=e.easingDefinitionToFunction(s)(u/n)*n}return n+u}},t.startWaapiAnimation=Re,t.statsBuffer=i,t.styleEffect=Bn,t.supportedWaapiEasing=Pe,t.supportsBrowserAnimation=je,t.supportsFlags=ke,t.supportsLinearEasing=Ee,t.supportsPartialKeyframes=fn,t.supportsScrollTimeline=xe,t.svgEffect=On,t.sync=Ki,t.testValueType=Je,t.time=d,t.transform=mi,t.transformPropOrder=le,t.transformProps=ue,t.transformValue=pi,t.transformValueTypes=ln,t.vh=O,t.vw=C});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],i={value:null,addProjectionMetrics:null};function s(t,s){let r=!1,a=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,u=n.reduce((t,e)=>(t[e]=function(t,e){let n=new Set,s=new Set,r=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},u=0;function c(e){o.has(e)&&(d.schedule(e),t()),u++,e(l)}const d={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{l=t,r?a=!0:(r=!0,[n,s]=[s,n],n.forEach(c),e&&i.value&&i.value.frameloop[e].push(u),u=0,n.clear(),r=!1,a&&(a=!1,d.process(t)))}};return d}(l,s?e:void 0),t),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:m,update:p,preRender:f,render:g,postRender:y}=u,v=()=>{const n=e.MotionGlobalConfig.useManualTiming?o.timestamp:performance.now();r=!1,e.MotionGlobalConfig.useManualTiming||(o.delta=a?1e3/60:Math.max(Math.min(n-o.timestamp,40),1)),o.timestamp=n,o.isProcessing=!0,c.process(o),d.process(o),h.process(o),m.process(o),p.process(o),f.process(o),g.process(o),y.process(o),o.isProcessing=!1,r&&s&&(a=!1,t(v))};return{schedule:n.reduce((e,n)=>{const i=u[n];return e[n]=(e,n=!1,s=!1)=>(r||(r=!0,a=!0,o.isProcessing||t(v)),i.schedule(e,n,s)),e},{}),cancel:t=>{for(let e=0;e<n.length;e++)u[n[e]].cancel(t)},state:o,steps:u}}const{schedule:r,cancel:a,state:o,steps:l}=s("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e.noop,!0);let u;function c(){u=void 0}const d={now:()=>(void 0===u&&d.set(o.isProcessing||e.MotionGlobalConfig.useManualTiming?o.timestamp:performance.now()),u),set:t=>{u=t,queueMicrotask(c)}},h={layout:0,mainThread:0,waapi:0},m=t=>e=>"string"==typeof e&&e.startsWith(t),p=m("--"),f=m("var(--"),g=t=>!!f(t)&&y.test(t.split("/*")[0].trim()),y=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const T={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},b={...T,transform:t=>e.clamp(0,1,t)},w={...T,default:1},S=t=>Math.round(1e5*t)/1e5,M=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const x=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,k=(t,e)=>n=>Boolean("string"==typeof n&&x.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),A=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,r,a,o]=i.match(M);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},E={...T,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},V={test:k("rgb","red"),parse:A("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+E.transform(t)+", "+E.transform(e)+", "+E.transform(n)+", "+S(b.transform(i))+")"};const P={test:k("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:V.transform},D=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),R=D("deg"),B=D("%"),F=D("px"),O=D("vh"),C=D("vw"),I=(()=>({...B,parse:t=>B.parse(t)/100,transform:t=>B.transform(100*t)}))(),K={test:k("hsl","hue"),parse:A("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+B.transform(S(e))+", "+B.transform(S(n))+", "+S(b.transform(i))+")"},L={test:t=>V.test(t)||P.test(t)||K.test(t),parse:t=>V.test(t)?V.parse(t):K.test(t)?K.parse(t):P.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?V.transform(t):K.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},W=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const $="number",N="color",j=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Y(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(j,t=>(L.test(t)?(i.color.push(r),s.push(N),n.push(L.parse(t))):t.startsWith("var(")?(i.var.push(r),s.push("var"),n.push(t)):(i.number.push(r),s.push($),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:a,indexes:i,types:s}}function z(t){return Y(t).values}function X(t){const{split:e,types:n}=Y(t),i=e.length;return t=>{let s="";for(let r=0;r<i;r++)if(s+=e[r],void 0!==t[r]){const e=n[r];s+=e===$?S(t[r]):e===N?L.transform(t[r]):t[r]}return s}}const G=t=>"number"==typeof t?0:L.test(t)?L.getAnimatableNone(t):t;const U={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(M)?.length||0)+(t.match(W)?.length||0)>0},parse:z,createTransformer:X,getAnimatableNone:function(t){const e=z(t);return X(t)(e.map(G))}};function q(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Z({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,a=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,o=2*n-i;s=q(o,i,t+1/3),r=q(o,i,t),a=q(o,i,t-1/3)}else s=r=a=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*a),alpha:i}}function _(t,e){return n=>n>0?e:t}const H=(t,e,n)=>t+(e-t)*n,J=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Q=[P,V,K];function tt(t){const n=(i=t,Q.find(t=>t.test(i)));var i;if(e.warning(Boolean(n),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(t);return n===K&&(s=Z(s)),s}const et=(t,e)=>{const n=tt(t),i=tt(e);if(!n||!i)return _(t,e);const s={...n};return t=>(s.red=J(n.red,i.red,t),s.green=J(n.green,i.green,t),s.blue=J(n.blue,i.blue,t),s.alpha=H(n.alpha,i.alpha,t),V.transform(s))},nt=new Set(["none","hidden"]);function it(t,e){return nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function st(t,e){return n=>H(t,e,n)}function rt(t){return"number"==typeof t?st:"string"==typeof t?g(t)?_:L.test(t)?et:lt:Array.isArray(t)?at:"object"==typeof t?L.test(t)?et:ot:_}function at(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>rt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function ot(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=rt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const lt=(t,n)=>{const i=U.createTransformer(n),s=Y(t),r=Y(n);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?nt.has(t)&&!r.values.length||nt.has(n)&&!s.values.length?it(t,n):e.pipe(at(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],a=t.indexes[r][i[r]],o=t.values[a]??0;n[s]=o,i[r]++}return n}(s,r),r.values),i):(e.warning(!0,`Complex values '${t}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),_(t,n))};function ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return H(t,e,n);return rt(t)(t,e)}const ct=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>r.update(e,t),stop:()=>a(e),now:()=>o.isProcessing?o.timestamp:d.now()}},dt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ht=2e4;function mt(t){let e=0;let n=t.next(e);for(;!n.done&&e<ht;)e+=50,n=t.next(e);return e>=ht?1/0:e}function pt(t,n=100,i){const s=i({...t,keyframes:[0,n]}),r=Math.min(mt(s),ht);return{type:"keyframes",ease:t=>s.next(r*t).value/n,duration:e.millisecondsToSeconds(r)}}function ft(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}const gt=100,yt=10,vt=1,Tt=0,bt=800,wt=.3,St=.3,Mt={granular:.01,default:2},xt={granular:.005,default:.5},kt=.01,At=10,Et=.05,Vt=1,Pt=.001;function Dt({duration:t=bt,bounce:n=wt,velocity:i=Tt,mass:s=vt}){let r,a;e.warning(t<=e.secondsToMilliseconds(At),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-n;o=e.clamp(Et,Vt,o),t=e.clamp(kt,At,e.millisecondsToSeconds(t)),o<1?(r=e=>{const n=e*o,s=n*t,r=n-i,a=Bt(e,o),l=Math.exp(-s);return Pt-r/a*l},a=e=>{const n=e*o*t,s=n*i+i,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-n),u=Bt(Math.pow(e,2),o);return(-r(e)+Pt>0?-1:1)*((s-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,a=e=>Math.exp(-e*t)*(t*t*(i-e)));const l=function(t,e,n){let i=n;for(let n=1;n<Rt;n++)i-=t(i)/e(i);return i}(r,a,5/t);if(t=e.secondsToMilliseconds(t),isNaN(l))return{stiffness:gt,damping:yt,duration:t};{const e=Math.pow(l,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}const Rt=12;function Bt(t,e){return t*Math.sqrt(1-e*e)}const Ft=["duration","bounce"],Ot=["stiffness","damping","mass"];function Ct(t,e){return e.some(e=>void 0!==t[e])}function It(t=St,n=wt){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t;let{restSpeed:s,restDelta:r}=i;const a=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:c,mass:d,duration:h,velocity:m,isResolvedFromDuration:p}=function(t){let n={velocity:Tt,stiffness:gt,damping:yt,mass:vt,isResolvedFromDuration:!1,...t};if(!Ct(t,Ot)&&Ct(t,Ft))if(t.visualDuration){const i=t.visualDuration,s=2*Math.PI/(1.2*i),r=s*s,a=2*e.clamp(.05,1,1-(t.bounce||0))*Math.sqrt(r);n={...n,mass:vt,stiffness:r,damping:a}}else{const e=Dt(t);n={...n,...e,mass:vt},n.isResolvedFromDuration=!0}return n}({...i,velocity:-e.millisecondsToSeconds(i.velocity||0)}),f=m||0,g=c/(2*Math.sqrt(u*d)),y=o-a,v=e.millisecondsToSeconds(Math.sqrt(u/d)),T=Math.abs(y)<5;let b;if(s||(s=T?Mt.granular:Mt.default),r||(r=T?xt.granular:xt.default),g<1){const t=Bt(v,g);b=e=>{const n=Math.exp(-g*v*e);return o-n*((f+g*v*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}}else if(1===g)b=t=>o-Math.exp(-v*t)*(y+(f+v*y)*t);else{const t=v*Math.sqrt(g*g-1);b=e=>{const n=Math.exp(-g*v*e),i=Math.min(t*e,300);return o-n*((f+g*v*y)*Math.sinh(i)+t*y*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const n=b(t);if(p)l.done=t>=h;else{let i=0===t?f:0;g<1&&(i=0===t?e.secondsToMilliseconds(f):ft(b,t,n));const a=Math.abs(i)<=s,u=Math.abs(o-n)<=r;l.done=a&&u}return l.value=l.done?o:n,l},toString:()=>{const t=Math.min(mt(w),ht),e=dt(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function Kt({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],h={done:!1,value:d},m=t=>void 0===o?l:void 0===l||Math.abs(o-t)<Math.abs(l-t)?o:l;let p=n*e;const f=d+p,g=void 0===a?f:a(f);g!==f&&(p=g-d);const y=t=>-p*Math.exp(-t/i),v=t=>g+y(t),T=t=>{const e=y(t),n=v(t);h.done=Math.abs(e)<=u,h.value=h.done?g:n};let b,w;const S=t=>{var e;(e=h.value,void 0!==o&&e<o||void 0!==l&&e>l)&&(b=t,w=It({keyframes:[h.value,m(h.value)],velocity:ft(v,t,h.value),damping:s,stiffness:r,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,T(t),S(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&T(t),h)}}}function Lt(t,n,{clamp:i=!0,ease:s,mixer:r}={}){const a=t.length;if(e.invariant(a===n.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>n[0];if(2===a&&n[0]===n[1])return()=>n[1];const o=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],r=i||e.MotionGlobalConfig.mix||ut,a=t.length-1;for(let i=0;i<a;i++){let a=r(t[i],t[i+1]);if(n){const t=Array.isArray(n)?n[i]||e.noop:n;a=e.pipe(t,a)}s.push(a)}return s}(n,s,r),u=l.length,c=i=>{if(o&&i<t[0])return n[0];let s=0;if(u>1)for(;s<t.length-2&&!(i<t[s+1]);s++);const r=e.progress(t[s],t[s+1],i);return l[s](r)};return i?n=>c(e.clamp(t[0],t[a-1],n)):c}function Wt(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const r=e.progress(0,n,s);t.push(H(i,1,r))}}function $t(t){const e=[0];return Wt(e,t.length-1),e}function Nt(t,e){return t.map(t=>t*e)}function jt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function Yt({duration:t=300,keyframes:n,times:i,ease:s="easeInOut"}){const r=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s),a={done:!1,value:n[0]},o=Lt(Nt(i&&i.length===n.length?i:$t(n),t),n,{ease:Array.isArray(r)?r:jt(n,r)});return{calculatedDuration:t,next:e=>(a.value=o(e),a.done=e>=t,a)}}It.applyToOptions=t=>{const n=pt(t,100,It);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t};const zt=t=>null!==t;function Xt(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(zt),a=s<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return a&&void 0!==i?i:r[a]}const Gt={decay:Kt,inertia:Kt,tween:Yt,keyframes:Yt,spring:It};function Ut(t){"string"==typeof t.type&&(t.type=Gt[t.type])}class qt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Zt=t=>t/100;class _t extends qt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==d.now()&&this.tick(d.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},h.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Ut(t);const{type:n=Yt,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=t;let{keyframes:o}=t;const l=n||Yt;l!==Yt&&"number"!=typeof o[0]&&(this.mixKeyframes=e.pipe(Zt,ut(o[0],o[1])),o=[0,100]);const u=l({...t,keyframes:o});"mirror"===r&&(this.mirroredGenerator=l({...t,keyframes:[...o].reverse(),velocity:-a})),null===u.calculatedDuration&&(u.calculatedDuration=mt(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:m,type:p,onUpdate:f,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let T=this.currentTime,b=i;if(d){const t=Math.min(this.currentTime,s)/o;let n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&n--,n=Math.min(n,d+1);Boolean(n%2)&&("reverse"===h?(i=1-i,m&&(i-=m/o)):"mirror"===h&&(b=a)),T=e.clamp(0,1,i)*o}const w=v?{done:!1,value:c[0]}:b.next(T);r&&(w.value=r(w.value));let{done:S}=w;v||null===l||(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const M=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return M&&p!==Kt&&(w.value=Xt(c,this.options,g,this.speed)),f&&f(w.value),M&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(d.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ct,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(d.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,h.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Ht(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Jt=t=>180*t/Math.PI,Qt=t=>{const e=Jt(Math.atan2(t[1],t[0]));return ee(e)},te={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qt,rotateZ:Qt,skewX:t=>Jt(Math.atan(t[1])),skewY:t=>Jt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ee=t=>((t%=360)<0&&(t+=360),t),ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ie=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),se={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ne,scaleY:ie,scale:t=>(ne(t)+ie(t))/2,rotateX:t=>ee(Jt(Math.atan2(t[6],t[5]))),rotateY:t=>ee(Jt(Math.atan2(-t[2],t[0]))),rotateZ:Qt,rotate:Qt,skewX:t=>Jt(Math.atan(t[4])),skewY:t=>Jt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function re(t){return t.includes("scale")?1:0}function ae(t,e){if(!t||"none"===t)return re(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=se,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=te,s=e}if(!s)return re(e);const r=i[e],a=s[1].split(",").map(oe);return"function"==typeof r?r(a):a[r]}function oe(t){return parseFloat(t.trim())}const le=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ue=(()=>new Set(le))(),ce=t=>t===T||t===F,de=new Set(["x","y","z"]),he=le.filter(t=>!de.has(t));const me={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ae(e,"x"),y:(t,{transform:e})=>ae(e,"y")};me.translateX=me.x,me.translateY=me.y;const pe=new Set;let fe=!1,ge=!1,ye=!1;function ve(){if(ge){const t=Array.from(pe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return he.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}ge=!1,fe=!1,pe.forEach(t=>t.complete(ye)),pe.clear()}function Te(){pe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ge=!0)})}function be(){ye=!0,Te(),ve(),ye=!1}class we{constructor(t,e,n,i,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(pe.add(this),fe||(fe=!0,r.read(Te),r.resolveKeyframes(ve))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,r);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),i&&void 0===s&&i.set(t[0])}Ht(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pe.delete(this)}cancel(){"scheduled"===this.state&&(pe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Se=t=>t.startsWith("--");function Me(t,e,n){Se(e)?t.style.setProperty(e,n):t.style[e]=n}const xe=e.memo(()=>void 0!==window.ScrollTimeline),ke={};function Ae(t,n){const i=e.memo(t);return()=>ke[n]??i()}const Ee=Ae(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ve=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Pe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ve([0,.65,.55,1]),circOut:Ve([.55,0,1,.45]),backIn:Ve([.31,.01,.66,-.59]),backOut:Ve([.33,1.53,.69,.99])};function De(t,n){return t?"function"==typeof t?Ee()?dt(t,n):"ease-out":e.isBezierDefinition(t)?Ve(t):Array.isArray(t)?t.map(t=>De(t,n)||Pe.easeOut):Pe[t]:void 0}function Re(t,e,n,{delay:s=0,duration:r=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:u}={},c=void 0){const d={[e]:n};u&&(d.offset=u);const m=De(l,r);Array.isArray(m)&&(d.easing=m),i.value&&h.waapi++;const p={delay:s,duration:r,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};c&&(p.pseudoElement=c);const f=t.animate(d,p);return i.value&&f.finished.finally(()=>{h.waapi--}),f}function Be(t){return"function"==typeof t&&"applyToOptions"in t}function Fe({type:t,...e}){return Be(t)&&Ee()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Oe extends qt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=a,this.options=t,e.invariant("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=Fe(t);this.animation=Re(n,i,s,u,r),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=Xt(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):Me(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&xe()?(this.animation.timeline=t,e.noop):n(this)}}const Ce={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function Ie(t){"string"==typeof t.ease&&t.ease in Ce&&(t.ease=Ce[t.ease])}class Ke extends Oe{constructor(t){Ie(t),Ut(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...a}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const o=new _t({...a,autoplay:!1}),l=Math.max(10,d.now()-this.startTime),u=e.clamp(0,10,l-10);n.setWithVelocity(o.sample(Math.max(0,l-u)).value,o.sample(l).value,u),o.stop()}}const Le=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!U.test(t)&&"0"!==t||t.startsWith("url(")));function We(t){t.duration=0,t.type="keyframes"}const $e=new Set(["opacity","clipPath","filter","transform"]),Ne=e.memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function je(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:a}=t,o=e?.owner?.current;if(!(o instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Ne()&&n&&$e.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==s&&0!==r&&"inertia"!==a}class Ye{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return ze(this.animations,"duration")}get iterationDuration(){return ze(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ze(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Xe extends Oe{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Ge=new WeakMap;const Ue=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qe(t){const e=Ue.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Ze(t,n,i=1){e.invariant(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=qe(t);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return e.isNumericalString(t)?parseFloat(t):t}return g(r)?Ze(r,n,i+1):r}function _e(t,e){return t?.[e]??t?.default??t}const He=new Set(["width","height","top","left","right","bottom",...le]),Je=t=>e=>e.test(t),Qe=[T,F,B,R,C,O,{test:t=>"auto"===t,parse:t=>t}],tn=t=>Qe.find(Je(t));function en(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const nn=new Set(["brightness","contrast","saturate","opacity"]);function sn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(M)||[];if(!i)return t;const s=n.replace(i,"");let r=nn.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const rn=/\b([a-z-]*)\(.*?\)/gu,an={...U,getAnimatableNone:t=>{const e=t.match(rn);return e?e.map(sn).join(" "):t}},on={...T,transform:Math.round},ln={rotate:R,rotateX:R,rotateY:R,rotateZ:R,scale:w,scaleX:w,scaleY:w,scaleZ:w,skew:R,skewX:R,skewY:R,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:b,originX:I,originY:I,originZ:F},un={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,backgroundPositionX:F,backgroundPositionY:F,...ln,zIndex:on,fillOpacity:b,strokeOpacity:b,numOctaves:on},cn={...un,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:an,WebkitFilter:an},dn=t=>cn[t];function hn(t,e){let n=dn(t);return n!==an&&(n=U),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const mn=new Set(["auto","none","0"]);const pn=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","backgroundPositionX","backgroundPositionY"]);const fn=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),gn=new Set(["opacity","clipPath","filter","transform"]);function yn(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function vn(t){return(e,n)=>{const i=yn(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Tn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class bn{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const l=()=>{const i=e.get();this.latest[t]=s?Tn(i,un[t]):i,n&&r.render(n)};l();const u=e.on("change",l);i&&e.addDependent(i);const c=()=>{u(),n&&a(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:c}),c}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function wn(t){const e=new WeakMap,n=[];return(i,s)=>{const r=e.get(i)??new bn;e.set(i,r);for(const e in s){const a=s[e],o=t(i,r,e,a);n.push(o)}return()=>{for(const t of n)t()}}}const Sn=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),r=s?n:n.startsWith("data")||n.startsWith("aria")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const a=s?()=>{t[r]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(r):t.setAttribute(r,String(i))};return e.set(n,i,a)},Mn=vn(wn(Sn)),xn=wn((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function kn(t){return e.isObject(t)&&"offsetHeight"in t}const An={current:void 0};class En{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=d.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=d.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new e.SubscriptionManager);const i=this.events[t].add(n);return"change"===t?()=>{i(),r.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return An.current&&An.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=d.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vn(t,e){return new En(t,e)}const Pn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Dn=new Set(["originX","originY","originZ"]),Rn=(t,e,n,i)=>{let s,r;return ue.has(n)?(e.get("transform")||(kn(t)||e.get("transformBox")||Rn(t,e,"transformBox",new En("fill-box")),e.set("transform",new En("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<le.length;i++){const s=le[i],r=t.latest[s];if(void 0===r)continue;let a=!0;a="number"==typeof r?r===(s.startsWith("scale")?1:0):0===parseFloat(r),a||(n=!1,e+=`${Pn[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),r=e.get("transform")):Dn.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new En(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),r=e.get("transformOrigin")):s=Se(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,r)},Bn=vn(wn(Rn)),Fn=F.transform;const On=vn(wn((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return r.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",Fn(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new En("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${Fn(n)} ${Fn(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Sn(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Rn:Sn)(t,e,n,i)}));const{schedule:Cn,cancel:In}=s(queueMicrotask,!1),Kn={x:!1,y:!1};function Ln(){return Kn.x||Kn.y}function Wn(t,e){const n=yn(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function $n(t){return!("touch"===t.pointerType||Ln())}const Nn=(t,e)=>!!e&&(t===e||Nn(t,e.parentElement)),jn=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Yn=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zn(t){return Yn.has(t.tagName)||!0===t.isContentEditable}const Xn=new WeakSet;function Gn(t){return e=>{"Enter"===e.key&&t(e)}}function Un(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function qn(t){return jn(t)&&!Ln()}function Zn(t){return e.isObject(t)&&"ownerSVGElement"in t}const _n=new WeakMap;let Hn;const Jn=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Zn(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Qn=Jn("inline","width","offsetWidth"),ti=Jn("block","height","offsetHeight");function ei({target:t,borderBoxSize:e}){_n.get(t)?.forEach(n=>{n(t,{get width(){return Qn(t,e)},get height(){return ti(t,e)}})})}function ni(t){t.forEach(ei)}function ii(t,e){Hn||"undefined"!=typeof ResizeObserver&&(Hn=new ResizeObserver(ni));const n=yn(t);return n.forEach(t=>{let n=_n.get(t);n||(n=new Set,_n.set(t,n)),n.add(e),Hn?.observe(t)}),()=>{n.forEach(t=>{const n=_n.get(t);n?.delete(e),n?.size||Hn?.unobserve(t)})}}const si=new Set;let ri;function ai(t){return si.add(t),ri||(ri=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};si.forEach(e=>e(t))},window.addEventListener("resize",ri)),()=>{si.delete(t),si.size||"function"!=typeof ri||(window.removeEventListener("resize",ri),ri=void 0)}}function oi(){const{value:t}=i;null!==t?(t.frameloop.rate.push(o.delta),t.animations.mainThread.push(h.mainThread),t.animations.waapi.push(h.waapi),t.animations.layout.push(h.layout)):a(oi)}function li(t){return t.reduce((t,e)=>t+e,0)/t.length}function ui(t,e=li){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ci=t=>Math.round(1e3/t);function di(){i.value=null,i.addProjectionMetrics=null}function hi(){const{value:t}=i;if(!t)throw new Error("Stats are not being measured");di(),a(oi);const e={frameloop:{setup:ui(t.frameloop.setup),rate:ui(t.frameloop.rate),read:ui(t.frameloop.read),resolveKeyframes:ui(t.frameloop.resolveKeyframes),preUpdate:ui(t.frameloop.preUpdate),update:ui(t.frameloop.update),preRender:ui(t.frameloop.preRender),render:ui(t.frameloop.render),postRender:ui(t.frameloop.postRender)},animations:{mainThread:ui(t.animations.mainThread),waapi:ui(t.animations.waapi),layout:ui(t.animations.layout)},layoutProjection:{nodes:ui(t.layoutProjection.nodes),calculatedTargetDeltas:ui(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:ui(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ci(n.min),n.max=ci(n.max),n.avg=ci(n.avg),[n.min,n.max]=[n.max,n.min],e}function mi(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function pi(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=Lt(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function fi(t){const e=[];An.current=e;const n=t();An.current=void 0;const i=Vn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>r.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),a(i)})}(e,i,t),i}const gi=t=>Boolean(t&&t.getVelocity);function yi(t,e,n){const i=t.get();let s,a=null,o=i;const l="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,u=()=>{a&&(a.stop(),a=null)};if(t.attach((e,i)=>{o=e,s=t=>i(vi(t,l)),r.postRender(()=>{u(),a=new _t({keyframes:[Ti(t.get()),Ti(o)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),a?.then(()=>{t.events.animationComplete?.notify()})})},u),gi(e)){const n=e.on("change",e=>t.set(vi(e,l))),i=t.on("destroy",n);return()=>{n(),i()}}return u}function vi(t,e){return e?t+e:t}function Ti(t){return"number"==typeof t?t:parseFloat(t)}const bi=[...Qe,L,U];function wi(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Si={},Mi=null;const xi=(t,e)=>{Si[t]=e},ki=()=>{Mi||(Mi=document.createElement("style"),Mi.id="motion-view");let t="";for(const e in Si){const n=Si[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Mi.textContent=t,document.head.appendChild(Mi),Si={}},Ai=()=>{Mi&&Mi.parentElement&&Mi.parentElement.removeChild(Mi)};function Ei(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Vi(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Pi(){return document.getAnimations().filter(Vi)}const Di=["layout","enter","exit","new","old"];function Ri(t){const{update:n,targets:i,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await n(),t(new Ye([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||xi(":root",{"view-transition-name":"none"}),xi("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),ki();const r=document.startViewTransition(async()=>{await n()});return r.finished.finally(()=>{Ai()}),new Promise(t=>{r.ready.then(()=>{const n=Pi(),r=[];i.forEach((t,n)=>{for(const i of Di){if(!t[i])continue;const{keyframes:a,options:o}=t[i];for(let[t,l]of Object.entries(a)){if(!l)continue;const a={..._e(s,t),..._e(o,t)},u=wi(i);if("opacity"===t&&!Array.isArray(l)){l=["new"===u?0:1,l]}"function"==typeof a.delay&&(a.delay=a.delay(0,1)),a.duration&&(a.duration=e.secondsToMilliseconds(a.duration)),a.delay&&(a.delay=e.secondsToMilliseconds(a.delay));const c=new Oe({...a,element:document.documentElement,name:t,pseudoElement:`::view-transition-${u}(${n})`,keyframes:l});r.push(c)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:a}=n;if(!a)continue;const o=Ei(a);if(!o)continue;const l=i.get(o.layer);if(l)Bi(l,"enter")&&Bi(l,"exit")&&n.getKeyframes().some(t=>t.mixBlendMode)?r.push(new Xe(t)):t.cancel();else{const i="group"===o.type?"layout":"";let a={..._e(s,i)};a.duration&&(a.duration=e.secondsToMilliseconds(a.duration)),a=Fe(a);const l=De(a.ease,a.duration);n.updateTiming({delay:e.secondsToMilliseconds(a.delay??0),duration:a.duration,easing:l}),r.push(new Xe(t))}}t(new Ye(r))})})}function Bi(t,e){return t?.[e]?.keyframes.opacity}let Fi=[],Oi=null;function Ci(){Oi=null;const[t]=Fi;var n;t&&(n=t,e.removeItem(Fi,n),Oi=n,Ri(n).then(t=>{n.notifyReady(t),t.finished.finally(Ci)}))}function Ii(){for(let t=Fi.length-1;t>=0;t--){const e=Fi[t],{interrupt:n}=e.options;if("immediate"===n){const n=Fi.slice(0,t+1).map(t=>t.update),i=Fi.slice(t+1);e.update=()=>{n.forEach(t=>t())},Fi=[e,...i];break}}Oi&&"immediate"!==Fi[0]?.options.interrupt||Ci()}class Ki{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.notifyReady=e.noop,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...n},i=this,Fi.push(i),Cn.render(Ii)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Li=r,Wi=n.reduce((t,e)=>(t[e]=t=>a(t),t),{});t.AsyncMotionValueAnimation=class extends qt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:o,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=d.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:o,motionValue:l,element:u,...c},m=u?.KeyframeResolver||we;this.keyframeResolver=new m(a,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:o,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=d.now(),function(t,n,i,s){const r=t[0];if(null===r)return!1;if("display"===n||"visibility"===n)return!0;const a=t[t.length-1],o=Le(r,n),l=Le(a,n);return e.warning(o===l,`You are trying to animate ${n} from "${r}" to "${a}". "${o?a:r}" is not an animatable value.`,"value-not-animatable"),!(!o||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===i||Be(i))&&s)}(t,r,a,o)||(!e.MotionGlobalConfig.instantAnimations&&l||c?.(Xt(t,i,n)),t[0]=t[t.length-1],We(i),i.repeat=0);const h={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},m=!u&&je(h)?new Ke({...h,element:h.motionValue.owner.current}):new _t(h);m.finished.then(()=>this.notifyFinished()).catch(e.noop),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),be()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},t.DOMKeyframesResolver=class extends we{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),g(i))){const s=Ze(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!He.has(n)||2!==t.length)return;const[i,s]=t,r=tn(i),a=tn(s);if(v(i)!==v(s)&&me[n])this.needsMeasurement=!0;else if(r!==a)if(ce(r)&&ce(a))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else me[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||en(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!mn.has(e)&&Y(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=hn(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,r=n[s];n[s]=me[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}},t.GroupAnimation=Ye,t.GroupAnimationWithThen=class extends Ye{then(t,e){return this.finished.finally(t).then(()=>{})}},t.JSAnimation=_t,t.KeyframeResolver=we,t.MotionValue=En,t.NativeAnimation=Oe,t.NativeAnimationExtended=Ke,t.NativeAnimationWrapper=Xe,t.ViewTransitionBuilder=Ki,t.acceleratedValues=gn,t.activeAnimations=h,t.addAttrValue=Sn,t.addStyleValue=Rn,t.alpha=b,t.analyseComplexValue=Y,t.animateValue=function(t){return new _t(t)},t.animateView=function(t,e={}){return new Ki(t,e)},t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyGeneratorOptions=Fe,t.applyPxDefaults=function(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&pn.has(e)&&(t[n]=t[n]+"px")},t.attachSpring=yi,t.attrEffect=Mn,t.calcGeneratorDuration=mt,t.cancelFrame=a,t.cancelMicrotask=In,t.cancelSync=Wi,t.collectMotionValues=An,t.color=L,t.complex=U,t.containsCSSVariable=v,t.convertOffsetToTimes=Nt,t.createGeneratorEasing=pt,t.createRenderBatcher=s,t.cubicBezierAsString=Ve,t.defaultEasing=jt,t.defaultOffset=$t,t.defaultTransformValue=re,t.defaultValueTypes=cn,t.degrees=R,t.dimensionValueTypes=Qe,t.fillOffset=Wt,t.fillWildcards=Ht,t.findDimensionValueType=tn,t.findValueType=t=>bi.find(Je(t)),t.flushKeyframeResolvers=be,t.frame=r,t.frameData=o,t.frameSteps=l,t.generateLinearEasing=dt,t.getAnimatableNone=hn,t.getAnimationMap=function(t){const e=Ge.get(t)||new Map;return Ge.set(t,e),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return Se(e)?n.getPropertyValue(e):n[e]},t.getDefaultValueType=dn,t.getMixer=rt,t.getOriginIndex=mi,t.getValueAsType=Tn,t.getValueTransition=_e,t.getVariableValue=Ze,t.getViewAnimationLayerInfo=Ei,t.getViewAnimations=Pi,t.hex=P,t.hover=function(t,e,n={}){const[i,s,r]=Wn(t,n),a=t=>{if(!$n(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const r=t=>{$n(t)&&(i(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,s)};return i.forEach(t=>{t.addEventListener("pointerenter",a,s)}),r},t.hsla=K,t.hslaToRgba=Z,t.inertia=Kt,t.interpolate=Lt,t.invisibleValues=nt,t.isCSSVariableName=p,t.isCSSVariableToken=g,t.isDragActive=Ln,t.isDragging=Kn,t.isElementKeyboardAccessible=zn,t.isGenerator=Be,t.isHTMLElement=kn,t.isMotionValue=gi,t.isNodeOrChild=Nn,t.isPrimaryPointer=jn,t.isSVGElement=Zn,t.isSVGSVGElement=function(t){return Zn(t)&&"svg"===t.tagName},t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Ee()||!n||"string"==typeof n&&(n in Pe||Ee())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.keyframes=Yt,t.makeAnimationInstant=We,t.mapEasingToNativeEasing=De,t.mapValue=function(t,e,n,i){const s=pi(e,n,i);return fi(()=>s(t.get()))},t.maxGeneratorDuration=ht,t.microtask=Cn,t.mix=ut,t.mixArray=at,t.mixColor=et,t.mixComplex=lt,t.mixImmediate=_,t.mixLinearColor=J,t.mixNumber=H,t.mixObject=ot,t.mixVisibility=it,t.motionValue=Vn,t.number=T,t.numberValueTypes=un,t.observeTimeline=function(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return r.preUpdate(i,!0),()=>a(i)},t.parseCSSVariable=qe,t.parseValueFromTransform=ae,t.percent=B,t.positionalKeys=He,t.press=function(t,e,n={}){const[i,s,r]=Wn(t,n),a=t=>{const i=t.currentTarget;if(!qn(t))return;Xn.add(i);const r=e(i,t),a=(t,e)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),Xn.has(i)&&Xn.delete(i),qn(t)&&"function"==typeof r&&r(t,{success:e})},o=t=>{a(t,i===window||i===document||n.useGlobalTarget||Nn(i,t.target))},l=t=>{a(t,!1)};window.addEventListener("pointerup",o,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",a,s),kn(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Gn(()=>{if(Xn.has(n))return;Un(n,"down");const t=Gn(()=>{Un(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Un(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),zn(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r},t.progressPercentage=I,t.propEffect=xn,t.px=F,t.readTransformValue=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ae(n,e)},t.recordStats=function(){if(i.value)throw di(),new Error("Stats are already being measured");const t=i;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},r.postRender(oi,!0),hi},t.resize=function(t,e){return"function"==typeof t?ai(t):ii(t,e)},t.resolveElements=yn,t.rgbUnit=E,t.rgba=V,t.scale=w,t.setDragLock=function(t){return"x"===t||"y"===t?Kn[t]?null:(Kn[t]=!0,()=>{Kn[t]=!1}):Kn.x||Kn.y?null:(Kn.x=Kn.y=!0,()=>{Kn.x=Kn.y=!1})},t.setStyle=Me,t.spring=It,t.springValue=function(t,e){const n=Vn(gi(t)?t.get():t);return yi(n,t,e),n},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s}={}){return(r,a)=>{const o="number"==typeof i?i:mi(i,a),l=Math.abs(o-r);let u=t*l;if(s){const n=a*t;u=e.easingDefinitionToFunction(s)(u/n)*n}return n+u}},t.startWaapiAnimation=Re,t.statsBuffer=i,t.styleEffect=Bn,t.supportedWaapiEasing=Pe,t.supportsBrowserAnimation=je,t.supportsFlags=ke,t.supportsLinearEasing=Ee,t.supportsPartialKeyframes=fn,t.supportsScrollTimeline=xe,t.svgEffect=On,t.sync=Li,t.testValueType=Je,t.time=d,t.transform=pi,t.transformPropOrder=le,t.transformProps=ue,t.transformValue=fi,t.transformValueTypes=ln,t.vh=O,t.vw=C});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion-dom",
|
|
3
|
-
"version": "12.24.
|
|
3
|
+
"version": "12.24.11",
|
|
4
4
|
"author": "Matt Perry",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/motiondivision/motion",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"motion-utils": "^12.
|
|
20
|
+
"motion-utils": "^12.24.10"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"clean": "rm -rf types dist lib",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"maxSize": "1.8 kB"
|
|
37
37
|
}
|
|
38
38
|
],
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "1b1dc8d0fa514ba3f289bd5aaa43c3db99b2cb5c"
|
|
40
40
|
}
|