framer-motion 9.0.3 → 9.0.4
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 +16 -17
- package/dist/es/render/html/utils/build-styles.mjs +2 -4
- package/dist/es/render/html/utils/build-transform.mjs +12 -10
- package/dist/es/render/html/utils/create-render-state.mjs +0 -1
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +16 -17
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +1 -6
- package/dist/projection.dev.js +16 -16
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation-m.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -1
- package/dist/size-webpack-m.js +1 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -3018,11 +3018,6 @@ interface HTMLRenderState {
|
|
|
3018
3018
|
* every frame. We use a mutable data structure to reduce GC during animations.
|
|
3019
3019
|
*/
|
|
3020
3020
|
transform: ResolvedValues;
|
|
3021
|
-
/**
|
|
3022
|
-
* A mutable record of transform keys we want to apply to the rendered Element. We order
|
|
3023
|
-
* this to order transforms in the desired order. We use a mutable data structure to reduce GC during animations.
|
|
3024
|
-
*/
|
|
3025
|
-
transformKeys: string[];
|
|
3026
3021
|
/**
|
|
3027
3022
|
* A mutable record of transform origins we want to apply directly to the rendered Element
|
|
3028
3023
|
* every frame. We use a mutable data structure to reduce GC during animations.
|
|
@@ -4311,7 +4306,7 @@ declare function useResetProjection(): () => void;
|
|
|
4311
4306
|
* This outputs with a default order of transforms/scales/rotations, this can be customised by
|
|
4312
4307
|
* providing a transformTemplate function.
|
|
4313
4308
|
*/
|
|
4314
|
-
declare function buildTransform(
|
|
4309
|
+
declare function buildTransform(transform: HTMLRenderState["transform"], { enableHardwareAcceleration, allowTransformNone, }: DOMVisualElementOptions, transformIsDefault: boolean, transformTemplate?: MotionProps["transformTemplate"]): string;
|
|
4315
4310
|
|
|
4316
4311
|
declare const clamp: (min: number, max: number, v: number) => number;
|
|
4317
4312
|
|
package/dist/projection.dev.js
CHANGED
|
@@ -1931,7 +1931,7 @@
|
|
|
1931
1931
|
* This will be replaced by the build step with the latest version number.
|
|
1932
1932
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1933
1933
|
*/
|
|
1934
|
-
this.version = "9.0.
|
|
1934
|
+
this.version = "9.0.4";
|
|
1935
1935
|
/**
|
|
1936
1936
|
* Duration, in milliseconds, since last updating frame.
|
|
1937
1937
|
*
|
|
@@ -4271,24 +4271,26 @@
|
|
|
4271
4271
|
z: "translateZ",
|
|
4272
4272
|
transformPerspective: "perspective",
|
|
4273
4273
|
};
|
|
4274
|
-
|
|
4275
|
-
* A function to use with Array.sort to sort transform keys by their default order.
|
|
4276
|
-
*/
|
|
4277
|
-
const sortTransformProps = (a, b) => transformPropOrder.indexOf(a) - transformPropOrder.indexOf(b);
|
|
4274
|
+
const numTransforms = transformPropOrder.length;
|
|
4278
4275
|
/**
|
|
4279
4276
|
* Build a CSS transform style from individual x/y/scale etc properties.
|
|
4280
4277
|
*
|
|
4281
4278
|
* This outputs with a default order of transforms/scales/rotations, this can be customised by
|
|
4282
4279
|
* providing a transformTemplate function.
|
|
4283
4280
|
*/
|
|
4284
|
-
function buildTransform(
|
|
4281
|
+
function buildTransform(transform, { enableHardwareAcceleration = true, allowTransformNone = true, }, transformIsDefault, transformTemplate) {
|
|
4285
4282
|
// The transform string we're going to build into.
|
|
4286
4283
|
let transformString = "";
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4284
|
+
/**
|
|
4285
|
+
* Loop over all possible transforms in order, adding the ones that
|
|
4286
|
+
* are present to the transform string.
|
|
4287
|
+
*/
|
|
4288
|
+
for (let i = 0; i < numTransforms; i++) {
|
|
4289
|
+
const key = transformPropOrder[i];
|
|
4290
|
+
if (transform[key] !== undefined) {
|
|
4291
|
+
const transformName = translateAlias[key] || key;
|
|
4292
|
+
transformString += `${transformName}(${transform[key]}) `;
|
|
4293
|
+
}
|
|
4292
4294
|
}
|
|
4293
4295
|
if (enableHardwareAcceleration && !transform.z) {
|
|
4294
4296
|
transformString += "translateZ(0)";
|
|
@@ -4496,8 +4498,7 @@
|
|
|
4496
4498
|
};
|
|
4497
4499
|
|
|
4498
4500
|
function buildHTMLStyles(state, latestValues, options, transformTemplate) {
|
|
4499
|
-
const { style, vars, transform,
|
|
4500
|
-
transformKeys.length = 0;
|
|
4501
|
+
const { style, vars, transform, transformOrigin } = state;
|
|
4501
4502
|
// Track whether we encounter any transform or transformOrigin values.
|
|
4502
4503
|
let hasTransform = false;
|
|
4503
4504
|
let hasTransformOrigin = false;
|
|
@@ -4525,7 +4526,6 @@
|
|
|
4525
4526
|
// If this is a transform, flag to enable further transform processing
|
|
4526
4527
|
hasTransform = true;
|
|
4527
4528
|
transform[key] = valueAsType;
|
|
4528
|
-
transformKeys.push(key);
|
|
4529
4529
|
// If we already know we have a non-default transform, early return
|
|
4530
4530
|
if (!transformIsNone)
|
|
4531
4531
|
continue;
|
|
@@ -4544,7 +4544,7 @@
|
|
|
4544
4544
|
}
|
|
4545
4545
|
if (!latestValues.transform) {
|
|
4546
4546
|
if (hasTransform || transformTemplate) {
|
|
4547
|
-
style.transform = buildTransform(state, options, transformIsNone, transformTemplate);
|
|
4547
|
+
style.transform = buildTransform(state.transform, options, transformIsNone, transformTemplate);
|
|
4548
4548
|
}
|
|
4549
4549
|
else if (style.transform) {
|
|
4550
4550
|
/**
|
|
@@ -5100,7 +5100,7 @@
|
|
|
5100
5100
|
* and warn against mismatches.
|
|
5101
5101
|
*/
|
|
5102
5102
|
{
|
|
5103
|
-
warnOnce(nextValue.version === "9.0.
|
|
5103
|
+
warnOnce(nextValue.version === "9.0.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 9.0.4 may not work as expected.`);
|
|
5104
5104
|
}
|
|
5105
5105
|
}
|
|
5106
5106
|
else if (isMotionValue(prevValue)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t="undefined"!=typeof document;function e(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function
|
|
1
|
+
const t="undefined"!=typeof document;function e(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function a(t){return"string"==typeof t||Array.isArray(t)}function r(t){return"object"==typeof t&&"function"==typeof t.start}const n=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function s(t){return r(t.animate)||n.some(e=>a(t[e]))}function o(t){return Boolean(s(t)||t.variants)}const i={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},f={};for(const t in i)f[t]={isEnabled:e=>i[t].some(t=>!!e[t])};const c=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function l(t){return"string"==typeof t&&!t.includes("-")&&!!(c.indexOf(t)>-1||/[A-Z]/.test(t))}const d={},p=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],u=new Set(p);function g(t,{layout:e,layoutId:a}){return u.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!d[t]||"opacity"===t)}const h=t=>Boolean(t&&t.getVelocity),m={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y=p.length;function v(t){return t.startsWith("--")}const w=(t,e)=>e&&"number"==typeof t?e.transform(t):t,b=(t,e,a)=>Math.min(Math.max(a,t),e),x={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},k={...x,transform:t=>b(0,1,t)},L={...x,default:1},T=t=>Math.round(1e5*t)/1e5,X=/(-)?([\d]*\.?[\d])+/g,Y=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,$=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function B(t){return"string"==typeof t}const O=t=>({test:e=>B(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),A=O("deg"),S=O("%"),W=O("px"),Z=O("vh"),P=O("vw"),R={...S,parse:t=>S.parse(t)/100,transform:t=>S.transform(100*t)},C={...x,transform:Math.round},H={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,size:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,rotate:A,rotateX:A,rotateY:A,rotateZ:A,scale:L,scaleX:L,scaleY:L,scaleZ:L,skew:A,skewX:A,skewY:A,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:k,originX:R,originY:R,originZ:W,zIndex:C,fillOpacity:k,strokeOpacity:k,numOctaves:C};function V(t,e,a,r){const{style:n,vars:s,transform:o,transformOrigin:i}=t;let f=!1,c=!1,l=!0;for(const t in e){const a=e[t];if(v(t)){s[t]=a;continue}const r=H[t],d=w(a,r);if(u.has(t)){if(f=!0,o[t]=d,!l)continue;a!==(r.default||0)&&(l=!1)}else t.startsWith("origin")?(c=!0,i[t]=d):n[t]=d}if(e.transform||(f||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:a=!0},r,n){let s="";for(let e=0;e<y;e++){const a=p[e];if(void 0!==t[a]){s+=`${m[a]||a}(${t[a]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):a&&r&&(s="none"),s}(t.transform,a,l,r):n.transform&&(n.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:a=0}=i;n.transformOrigin=`${t} ${e} ${a}`}}function j(t,e,a){return"string"==typeof t?t:W.transform(e+a*t)}const z={offset:"stroke-dashoffset",array:"stroke-dasharray"},F={offset:"strokeDashoffset",array:"strokeDasharray"};function I(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(V(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:u,dimensions:g}=t;p.transform&&(g&&(u.transform=p.transform),delete p.transform),g&&(void 0!==r||void 0!==n||u.transform)&&(u.transformOrigin=function(t,e,a){return`${j(e,t.x,t.width)} ${j(a,t.y,t.height)}`}(g,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(p.x=e),void 0!==a&&(p.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?z:F;t[s.offset]=W.transform(-r);const o=W.transform(e),i=W.transform(a);t[s.array]=`${o} ${i}`}(p,s,o,i,!1)}const D=t=>"string"==typeof t&&"svg"===t.toLowerCase(),E=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function M(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const q=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function N(t,e,a,r){M(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(q.has(a)?a:E(a),e.attrs[a])}function U(t,e){const{style:a}=t,r={};for(const n in a)(h(a[n])||e.style&&h(e.style[n])||g(n,t))&&(r[n]=a[n]);return r}function G(t,e){const a=U(t,e);for(const r in t)if(h(t[r])||h(e[r])){a["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return a}function J(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const K=t=>Array.isArray(t),Q=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),_=t=>K(t)?t[t.length-1]||0:t;export{Y as A,H as B,W as C,A as D,P as E,Z as F,_ as G,E as H,u as I,K as J,p as K,v as L,M,q as N,e as a,s as b,a as c,h as d,g as e,f,V as g,I as h,t as i,D as j,l as k,Q as l,o as m,r as n,N as o,U as p,B as q,J as r,G as s,$ as t,X as u,T as v,k as w,x,b as y,S as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{createContext as n,useContext as e,useLayoutEffect as r,useEffect as a,useRef as o,useInsertionEffect as
|
|
1
|
+
import*as t from"react";import{createContext as n,useContext as e,useLayoutEffect as r,useEffect as a,useRef as o,useInsertionEffect as i,useCallback as s,useMemo as u,forwardRef as l,createElement as c}from"react";import{i as m,P as f,a as d,b as p,c as g,f as y,g as v,S as h,L as S,d as E,e as b,h as A,j as V,k as w,l as x,r as M,m as C,n as P,o as T,s as W,p as L,q as j}from"./size-rollup-dom-max-assets.js";const D=n({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),F=n({});const B=m?r:a,H=n({strict:!1});function O(t,n,r,s){const u=e(F).visualElement,l=e(H),c=e(f),m=e(D).reducedMotion,d=o();s=s||l.renderer,!d.current&&s&&(d.current=s(t,{visualState:n,parent:u,props:r,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:m}));const p=d.current;i(()=>{p&&p.update(r,c)}),B(()=>{p&&p.render()}),a(()=>{p&&p.updateFeatures()});return(window.HandoffAppearAnimations?B:a)(()=>{p&&p.animationState&&p.animationState.animateChanges()}),p}function R(t){const{initial:n,animate:r}=function(t,n){if(p(t)){const{initial:n,animate:e}=t;return{initial:!1===n||g(n)?n:void 0,animate:g(e)?e:void 0}}return!1!==t.inherit?n:{}}(t,e(F));return u(()=>({initial:n,animate:r}),[k(n),k(r)])}function k(t){return Array.isArray(t)?t.join(" "):t}function I(t){const n=o(null);return null===n.current&&(n.current=t()),n.current}let U=1;const q=Symbol.for("motionComponentSymbol");function _({preloadedFeatures:n,createVisualElement:r,useRender:a,useVisualState:o,Component:i}){n&&function(t){for(const n in t)y[n]={...y[n],...t[n]}}(n);const u=l((function(u,l){let c;const f={...e(D),...u,layoutId:z(u)},{isStatic:p}=f,g=R(u),y=p?void 0:I(()=>{if(v.hasEverUpdated)return U++}),S=o(u,p);if(!p&&m){g.visualElement=O(i,S,f,r);const t=e(h),a=e(H).strict;g.visualElement&&(c=g.visualElement.loadFeatures(f,a,n,y,t))}return t.createElement(F.Provider,{value:g},c&&g.visualElement?t.createElement(c,{visualElement:g.visualElement,...f}):null,a(i,u,y,function(t,n,e){return s(r=>{r&&t.mount&&t.mount(r),n&&(r?n.mount(r):n.unmount()),e&&("function"==typeof e?e(r):d(e)&&(e.current=r))},[n])}(S,g.visualElement,l),S,p,g.visualElement))}));return u[q]=i,u}function z({layoutId:t}){const n=e(S).id;return n&&void 0!==t?n+"-"+t:t}const N=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function X(t,n,e){for(const r in n)E(n[r])||b(r,e)||(t[r]=n[r])}function Y(t,n,e){const r={};return X(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n,e){return u(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{}};return A(r,n,{enableHardwareAcceleration:!e},t),Object.assign({},r.vars,r.style)},[n])}(t,n,e)),t.transformValues?t.transformValues(r):r}function G(t,n,e){const r={},a=Y(t,n,e);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=a,r}const J=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function K(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||J.has(t)}let Q=t=>!K(t);try{(Z=require("@emotion/is-prop-valid").default)&&(Q=t=>t.startsWith("on")?!K(t):Z(t))}catch(t){}var Z;const $=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function tt(t,n,e,r){const a=u(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return V(e,n,{enableHardwareAcceleration:!1},w(r),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const n={};X(n,t.style,t),a.style={...n,...a.style}}return a}function nt(t=!1){return(n,e,r,a,{latestValues:o},i)=>{const s=(x(n)?tt:G)(e,o,i,n),l={...function(t,n,e){const r={};for(const a in t)"values"===a&&"object"==typeof t.values||(Q(a)||!0===e&&K(a)||!n&&!K(a)||t.draggable&&a.startsWith("onDrag"))&&(r[a]=t[a]);return r}(e,"string"==typeof n,t),...s,ref:a},{children:m}=e,f=u(()=>E(m)?m.get():m,[m]);return r&&(l["data-projection-id"]=r),c(n,{...l,children:f})}}const et=t=>(n,r)=>{const a=e(F),o=e(f),i=()=>function({scrapeMotionValuesFromProps:t,createRenderState:n,onMount:e},r,a,o){const i={latestValues:rt(r,a,o,t),renderState:n()};return e&&(i.mount=t=>e(r,t,i)),i}(t,n,a,o);return r?i():I(i)};function rt(t,n,e,r){const a={},o=r(t,{});for(const t in o)a[t]=M(o[t]);let{initial:i,animate:s}=t;const u=p(t),l=C(t);n&&l&&!u&&!1!==t.inherit&&(void 0===i&&(i=n.initial),void 0===s&&(s=n.animate));let c=!!e&&!1===e.initial;c=c||!1===i;const m=c?s:i;if(m&&"boolean"!=typeof m&&!P(m)){(Array.isArray(m)?m:[m]).forEach(n=>{const e=T(t,n);if(!e)return;const{transitionEnd:r,transition:o,...i}=e;for(const t in i){let n=i[t];if(Array.isArray(n)){n=n[c?n.length-1:0]}null!==n&&(a[t]=n)}for(const t in r)a[t]=r[t]})}return a}const at={useVisualState:et({scrapeMotionValuesFromProps:W,createRenderState:$,onMount:(t,n,{renderState:e,latestValues:r})=>{try{e.dimensions="function"==typeof n.getBBox?n.getBBox():n.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}V(e,r,{enableHardwareAcceleration:!1},w(n.tagName),t.transformTemplate),L(n,e)}})},ot={useVisualState:et({scrapeMotionValuesFromProps:j,createRenderState:N})};const it=function(t){function n(n,e={}){return _(t(n,e))}if("undefined"==typeof Proxy)return n;const e=new Map;return new Proxy(n,{get:(t,r)=>(e.has(r)||e.set(r,n(r)),e.get(r))})}((function(t,{forwardMotionProps:n=!1},e,r){return{...x(t)?at:ot,preloadedFeatures:e,useRender:nt(n),createVisualElement:r,Component:t}}));export{it as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as t,t as e,u as n,v as s,w as r,x as i,y as o,z as a,A as u,B as c,C as l,D as h,E as p,F as d,r as f,G as m,d as g,H as v,I as y,n as b,J as V,c as w,K as A,i as C,f as P,b as x,m as S,a as M,L as T,g as E,p as F,M as k,N as I,s as O,h as N,o as D,j as L,k as R}from"./size-rollup-dom-animation-assets.js";function j(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const B=t=>/^0[^.\s]+$/.test(t),U={delta:0,timestamp:0},z="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),H="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(z()),1/60*1e3);let q=!0,$=!1,W=!1;const K=["read","update","preRender","render","postRender"],G=K.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const u=a&&r,c=u?e:n;return i&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&r&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:u=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(u),o.has(s)&&(a.schedule(s),t())}r=!1,i&&(i=!1,a.process(u))}}};return a}(()=>$=!0),t),{}),Y=K.reduce((t,e)=>{const n=G[e];return t[e]=(t,e=!1,s=!1)=>($||_(),n.schedule(t,e,s)),t},{}),X=K.reduce((t,e)=>(t[e]=G[e].cancel,t),{});K.reduce((t,e)=>(t[e]=()=>G[e].process(U),t),{});const Z=t=>G[t].process(U),J=t=>{$=!1,U.delta=q?1/60*1e3:Math.max(Math.min(t-U.timestamp,40),1),U.timestamp=t,W=!0,K.forEach(Z),W=!1,$&&(q=!1,H(J))},_=()=>{$=!0,q=!0,W||H(J)};class Q{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tt(t,e){return e?t*(1e3/e):0}class et{constructor(t,e={}){var n;this.version="9.0.3",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=U;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,Y.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Y.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Q);const n=this.events[t].add(e);return"change"===t?()=>{n(),Y.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nt(t,e){return new et(t,e)}const st=(n,s)=>r=>Boolean(t(r)&&e.test(r)&&r.startsWith(n)||s&&Object.prototype.hasOwnProperty.call(r,s)),rt=(e,s,r)=>i=>{if(!t(i))return i;const[o,a,u,c]=i.match(n);return{[e]:parseFloat(o),[s]:parseFloat(a),[r]:parseFloat(u),alpha:void 0!==c?parseFloat(c):1}},it={...i,transform:t=>Math.round((t=>o(0,255,t))(t))},ot={test:st("rgb","red"),parse:rt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+it.transform(t)+", "+it.transform(e)+", "+it.transform(n)+", "+s(r.transform(i))+")"};const at={test:st("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:ot.transform},ut={test:st("hsl","hue"),parse:rt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+a.transform(s(e))+", "+a.transform(s(n))+", "+s(r.transform(i))+")"},ct={test:t=>ot.test(t)||at.test(t)||ut.test(t),parse:t=>ot.test(t)?ot.parse(t):ut.test(t)?ut.parse(t):at.parse(t),transform:e=>t(e)?e:e.hasOwnProperty("red")?ot.transform(e):ut.transform(e)};function lt(t){"number"==typeof t&&(t=""+t);const e=[];let s=0,r=0;const o=t.match(u);o&&(s=o.length,t=t.replace(u,"${c}"),e.push(...o.map(ct.parse)));const a=t.match(n);return a&&(r=a.length,t=t.replace(n,"${n}"),e.push(...a.map(i.parse))),{values:e,numColors:s,numNumbers:r,tokenised:t}}function ht(t){return lt(t).values}function pt(t){const{values:e,numColors:n,tokenised:r}=lt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?ct.transform(t[r]):s(t[r]));return e}}const dt=t=>"number"==typeof t?0:t;const ft={test:function(e){var s,r;return isNaN(e)&&t(e)&&((null===(s=e.match(n))||void 0===s?void 0:s.length)||0)+((null===(r=e.match(u))||void 0===r?void 0:r.length)||0)>0},parse:ht,createTransformer:pt,getAnimatableNone:function(t){const e=ht(t);return pt(t)(e.map(dt))}},mt=new Set(["brightness","contrast","saturate","opacity"]);function gt(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=s.match(n)||[];if(!r)return t;const i=s.replace(r,"");let o=mt.has(e)?1:0;return r!==s&&(o*=100),e+"("+o+i+")"}const vt=/([a-z-]*)\(.*?\)/g,yt={...ft,getAnimatableNone:t=>{const e=t.match(vt);return e?e.map(gt).join(" "):t}},bt={...c,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:yt,WebkitFilter:yt},Vt=t=>bt[t];function wt(t,e){let n=Vt(t);return n!==yt&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const At=t=>e=>e.test(t),Ct=[i,l,a,h,p,d,{test:t=>"auto"===t,parse:t=>t}],Pt=t=>Ct.find(At(t)),xt=[...Ct,ct,ft],St=t=>xt.find(At(t));function Mt(t,e,n){const s=t.getProps();return f(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function Tt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,nt(n))}function Et(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ft(t){return Boolean(g(t)&&t.add)}const kt="data-"+v("framerAppearId");const It=t=>1e3*t,Ot=!1,Nt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Dt=t=>e=>1-t(1-e),Lt=t=>t*t,Rt=Dt(Lt),jt=Nt(Lt),Bt=(t,e,n)=>-n*t+n*e+t;function Ut(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const zt=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Ht=[at,ot,ut];function qt(t){const e=(n=t,Ht.find(t=>t.test(n)));var n;let s=e.parse(t);return e===ut&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Ut(a,s,t+1/3),i=Ut(a,s,t),o=Ut(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const $t=(t,e)=>{const n=qt(t),s=qt(e),r={...n};return t=>(r.red=zt(n.red,s.red,t),r.green=zt(n.green,s.green,t),r.blue=zt(n.blue,s.blue,t),r.alpha=Bt(n.alpha,s.alpha,t),ot.transform(r))},Wt=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(Wt);function Gt(t,e){return"number"==typeof t?n=>Bt(t,e,n):ct.test(t)?$t(t,e):Zt(t,e)}const Yt=(t,e)=>{const n=[...t],s=n.length,r=t.map((t,n)=>Gt(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}},Xt=(t,e)=>{const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Gt(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Zt=(t,e)=>{const n=ft.createTransformer(e),s=lt(t),r=lt(e);return s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?Kt(Yt(s.values,r.values),n):n=>""+(n>0?e:t)},Jt=(t,e)=>n=>Bt(t,e,n);function _t(t,e,n){const s=[],r=n||("number"==typeof(i=t[0])?Jt:"string"==typeof i?ct.test(i)?$t:Zt:Array.isArray(i)?Yt:"object"==typeof i?Xt:Jt);var i;const o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Kt(t,i)}s.push(i)}return s}function Qt(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;e.length,!s||!Array.isArray(s)||s.length,t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=_t(e,s,r),u=a.length,c=e=>{let n=0;if(u>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=((t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s})(t[n],t[n+1],e);return a[n](s)};return n?e=>c(o(t[0],t[i-1],e)):c}const te=t=>t,ee=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ne(t,e,n,s){if(t===e&&n===s)return te;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ee(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ee(r(t),e,s)}const se=t=>1-Math.sin(Math.acos(t)),re=Dt(se),ie=Nt(re),oe=ne(.33,1.53,.69,.99),ae=Dt(oe),ue=Nt(ae),ce={linear:te,easeIn:Lt,easeInOut:jt,easeOut:Rt,circIn:se,circInOut:ie,circOut:re,backIn:ae,backInOut:ue,backOut:oe,anticipate:t=>(t*=2)<1?.5*ae(t):.5*(2-Math.pow(2,-10*(t-1)))},le=t=>{if(Array.isArray(t)){t.length;const[e,n,s,r]=t;return ne(e,n,s,r)}return"string"==typeof t?ce[t]:t};function he({keyframes:t,ease:e=jt,times:n,duration:s=300}){t=[...t];const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(le):le(e),i={done:!1,value:t[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(t),s);function a(){return Qt(o,t,{ease:Array.isArray(r)?r:(e=t,n=r,e.map(()=>n||jt).splice(0,e.length-1))});var e,n}let u=a();return{next:t=>(i.value=u(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),u=a()}}}function pe({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{const s=e*a,r=s*t;return.001-(s-n)/de(e,a)*Math.exp(-r)},i=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),c=de(Math.pow(e,2),a);return(.001-r(e)>0?-1:1)*((i-o)*u)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}function de(t,e){return t*Math.sqrt(1-e*e)}const fe=["duration","bounce"],me=["stiffness","damping","mass"];function ge(t,e){return e.some(e=>void 0!==t[e])}function ve({keyframes:t,restDelta:e,restSpeed:n,...s}){let r=t[0],i=t[t.length-1];const o={done:!1,value:r},{stiffness:a,damping:u,mass:c,velocity:l,duration:h,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ge(t,me)&&ge(t,fe)){const n=pe(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let d=ye,f=l?-l/1e3:0;const m=u/(2*Math.sqrt(a*c));function g(){const t=i-r,s=Math.sqrt(a/c)/1e3,o=Math.abs(t)<5;if(n||(n=o?.01:2),e||(e=o?.005:.5),m<1){const e=de(s,m);d=n=>{const r=Math.exp(-m*s*n);return i-r*((f+m*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===m)d=e=>i-Math.exp(-s*e)*(t+(f+s*t)*e);else{const e=s*Math.sqrt(m*m-1);d=n=>{const r=Math.exp(-m*s*n),o=Math.min(e*n,300);return i-r*((f+m*s*t)*Math.sinh(o)+e*t*Math.cosh(o))/e}}}return g(),{next:t=>{const s=d(t);if(p)o.done=t>=h;else{let r=f;if(0!==t)if(m<1){const e=Math.max(0,t-5);r=tt(s-d(e),t-e)}else r=0;const a=Math.abs(r)<=n,u=Math.abs(i-s)<=e;o.done=a&&u}return o.value=o.done?i:s,o},flipTarget:()=>{f=-f,[r,i]=[i,r],g()}}}ve.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ye=t=>0;const be={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:r=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let u=n*e;const c=o+u,l=void 0===i?c:i(c);return l!==c&&(u=l-o),{next:t=>{const e=-u*Math.exp(-t/s);return a.done=!(e>r||e<-r),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:he,tween:he,spring:ve};function Ve(t,e,n=0){return t-e-n}const we=t=>{const e=({delta:e})=>t(e);return{start:()=>Y.update(e,!0),stop:()=>X.update(e)}};function Ae({duration:t,driver:e=we,elapsed:n=0,repeat:s=0,repeatType:r="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:u,onStop:c,onComplete:l,onRepeat:h,onUpdate:p,type:d="keyframes",...f}){const m=n;let g,v,y=0,b=t,V=!1,w=!0;const A=be[o.length>2?"keyframes":d]||he,C=o[0],P=o[o.length-1];let x={done:!1,value:C};const{needsInterpolation:S}=A;S&&S(C,P)&&(v=Qt([0,100],[C,P],{clamp:!1}),o=[0,100]);const M=A({...f,duration:t,keyframes:o});function T(){y++,"reverse"===r?(w=y%2==0,n=function(t,e=0,n=0,s=!0){return s?Ve(e+-t,e,n):e-(t-e)+n}(n,b,i,w)):(n=Ve(n,b,i),"mirror"===r&&M.flipTarget()),V=!1,h&&h()}function E(t){w||(t=-t),n+=t,V||(x=M.next(Math.max(0,n)),v&&(x.value=v(x.value)),V=w?x.done:n<=0),p&&p(x.value),V&&(0===y&&(b=void 0!==b?b:n),y<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,b,i,w)&&T():(g&&g.stop(),l&&l()))}return a&&(u&&u(),g=e(E),g.start()),{stop:()=>{c&&c(),g&&g.stop()},set currentTime(t){n=m,E(t)},sample:e=>{n=m;const s=t&&"number"==typeof t?Math.max(.5*t,50):50;let r=0;for(E(0);r<=e;){const t=e-r;E(Math.min(t,s)),r+=s}return x}}}const Ce=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Pe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ce([0,.65,.55,1]),circOut:Ce([.55,0,1,.45]),backIn:Ce([.31,.01,.66,-.59]),backOut:Ce([.33,1.53,.69,.99])};function xe(t){if(t)return Array.isArray(t)?Ce(t):Pe[t]}const Se={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Me={},Te={};for(const t in Se)Te[t]=()=>(void 0===Me[t]&&(Me[t]=Se[t]()),Me[t]);const Ee=new Set(["opacity"]);function Fe(t,e,{onUpdate:n,onComplete:s,...r}){if(!(Te.waapi()&&Ee.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping))return!1;let{keyframes:i,duration:o=300,elapsed:a=0,ease:u}=r;if("spring"===r.type||!(!(c=r.ease)||Array.isArray(c)||"string"==typeof c&&Pe[c])){if(r.repeat===1/0)return;const t=Ae({...r,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;i=n,o=s-10,u="linear"}var c;const l=function(t,e,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:u}={}){return t.animate({[e]:n,offset:u},{delay:s,duration:r,easing:xe(a),fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,i,{...r,delay:-a,duration:o,ease:u});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,r)),Y.update(()=>l.cancel()),s&&s()},{get currentTime(){return l.currentTime||0},set currentTime(t){l.currentTime=t},stop:()=>{const{currentTime:e}=l;if(e){const n=Ae({...r,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Y.update(()=>l.cancel())}}}function ke(t,e){const n=performance.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(X.read(s),t(i-e))};return Y.read(s,!0),()=>X.read(s)}function Ie({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const r=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:ke(r,-e)}:r()}const Oe=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ne=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),De=()=>({type:"keyframes",ease:"linear",duration:.3}),Le={type:"keyframes",duration:.8},Re={x:Oe,y:Oe,z:Oe,rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scaleX:Ne,scaleY:Ne,scale:Ne,opacity:De,backgroundColor:De,color:De,default:Ne},je=(t,{keyframes:e})=>{if(e.length>2)return Le;return(Re[t]||Re.default)(e[1])},Be=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ft.test(e)||e.startsWith("url(")));function Ue(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function ze(t){return"number"==typeof t?0:wt("",t)}const He=(t,e,n,s={})=>r=>{const i=function(t,e){return t[e]||t.default||t}(s,t)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=It(o);const u=function(t,e,n,s){const r=Be(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&r&&"string"==typeof n?i=wt(e,n):Ue(i)&&"string"==typeof n?i=ze(n):!Array.isArray(n)&&Ue(n)&&"string"==typeof i&&(n=ze(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),c=u[0],l=u[u.length-1],h=Be(t,c),p=Be(t,l);let d={keyframes:u,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(!h||!p||Ot||!1===i.type)return Ie(d);if("inertia"===i.type)return function({keyframes:t,velocity:e=0,min:n,max:s,power:r=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:h,onComplete:p,onStop:d}){const f=t[0];let m;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function v(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function y(t){m&&m.stop(),m=Ae({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:p,onStop:d})}function b(t){y({type:"spring",stiffness:o,damping:a,restDelta:u,...t})}if(g(f))b({velocity:e,keyframes:[f,v(f)]});else{let t=r*e+f;void 0!==c&&(t=c(t));const s=v(t),o=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=tt(t-a,U.delta),(1===o&&t>s||-1===o&&t<s)&&b({keyframes:[t,s],velocity:e})};y({type:"decay",keyframes:[f,0],velocity:e,timeConstant:i,power:r,restDelta:u,modifyTarget:c,onUpdate:g(t)?h:void 0})}return{stop:()=>m&&m.stop()}}(d);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:c,...l}){return!!Object.keys(l).length}(i)||(d={...d,...je(t,d)}),d.duration&&(d.duration=It(d.duration)),d.repeatDelay&&(d.repeatDelay=It(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Fe(e,t,d);if(n)return n}return Ae(d)};function qe(t,e,n={}){const s=Mt(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>$e(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,r=1,i){const o=[],a=(t.variantChildren.size-1)*s,u=1===r?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(We).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(qe(t,e,{...i,delay:n+u(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[i,o]:[o,i];return t().then(e)}return Promise.all([i(),o(n.delay)])}function $e(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e),r=a[e];if(!s||void 0===r||l&&Ke(l,e))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[kt];n&&(o.elapsed=window.HandoffAppearAnimations(n,e,s,Y))}let h=s.start(He(e,s,r,t.shouldReduceMotion&&y.has(e)?{type:!1}:o));Ft(u)&&(u.add(e),h=h.then(()=>u.remove(e))),c.push(h)}return Promise.all(c).then(()=>{o&&function(t,e){const n=Mt(t,e);let{transitionEnd:s={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){Tt(t,e,m(i[e]))}}(t,o)})}function We(t,e){return t.sortNodePosition(e)}function Ke({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}var Ge;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Ge||(Ge={}));const Ye=[Ge.Animate,Ge.InView,Ge.Focus,Ge.Hover,Ge.Tap,Ge.Drag,Ge.Exit],Xe=[...Ye].reverse(),Ze=Ye.length;function Je(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>qe(t,e,n));s=Promise.all(r)}else if("string"==typeof e)s=qe(t,e,n);else{const r="function"==typeof e?Mt(t,e,n.custom):e;s=$e(t,r,n)}return s.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function _e(t){let e=Je(t);const n={[Ge.Animate]:tn(!0),[Ge.InView]:tn(),[Ge.Hover]:tn(),[Ge.Tap]:tn(),[Ge.Drag]:tn(),[Ge.Focus]:tn(),[Ge.Exit]:tn()};let s=!0;const r=(e,n)=>{const s=Mt(t,n);if(s){const{transition:t,transitionEnd:n,...r}=s;e={...e,...r,...n}}return e};function i(i,o){const a=t.getProps(),u=t.getVariantContext(!0)||{},c=[],l=new Set;let h={},p=1/0;for(let e=0;e<Ze;e++){const d=Xe[e],f=n[d],m=void 0!==a[d]?a[d]:u[d],g=w(m),v=d===o?f.isActive:null;!1===v&&(p=e);let y=m===u[d]&&m!==a[d]&&g;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...h},!f.isActive&&null===v||!m&&!f.prevProp||b(m)||"boolean"==typeof m)continue;const A=Qe(f.prevProp,m);let C=A||d===o&&f.isActive&&!y&&g||e>p&&g;const P=Array.isArray(m)?m:[m];let x=P.reduce(r,{});!1===v&&(x={});const{prevResolvedValues:S={}}=f,M={...S,...x},T=t=>{C=!0,l.delete(t),f.needsAnimating[t]=!0};for(const t in M){const e=x[t],n=S[t];h.hasOwnProperty(t)||(e!==n?V(e)&&V(n)?!j(e,n)||A?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):l.add(t):void 0!==e&&l.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=m,f.prevResolvedValues=x,f.isActive&&(h={...h,...x}),s&&t.blockInitialAnimation&&(C=!1),C&&!y&&c.push(...P.map(t=>({animation:t,options:{type:d,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let d=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(d=!1),s=!1,d?e(c):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,r){if(n[e].isActive===s)return Promise.resolve();t.variantChildren&&t.variantChildren.forEach(t=>{t.animationState&&t.animationState.setActive(e,s)}),n[e].isActive=s;const o=i(r,e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Qe(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!j(e,t)}function tn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class en{constructor(t){this.isMounted=!1,this.node=t}update(){}}let nn=0;const sn={animation:{Feature:class extends en{constructor(t){super(t),t.animationState||(t.animationState=_e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),b(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends en{constructor(){super(...arguments),this.id=nn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive(Ge.Exit,!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&r.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function rn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function on(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function an(t,e,n,s){return rn(t,e,(t=>e=>(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(e)&&t(e,on(e)))(n),s)}function un(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const cn=un("dragHorizontal"),ln=un("dragVertical");function hn(){const t=function(t){let e=!1;if("y"===t)e=ln();else if("x"===t)e=cn();else{const t=cn(),n=ln();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function pn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return an(t.current,n,(n,r)=>{if("touch"===n.type||hn())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive(Ge.Hover,e),i[s]&&i[s](n,r)},{passive:!t.getProps()[s]})}const dn=(t,e)=>!!e&&(t===e||dn(t,e.parentElement));function fn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,on(n))}const mn=new WeakMap,gn=new WeakMap,vn=t=>{const e=mn.get(t.target);e&&e(t)},yn=t=>{t.forEach(vn)};function bn(t,e,n){const s=function({root:t,...e}){const n=t||document;gn.has(n)||gn.set(n,{});const s=gn.get(n),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(yn,{root:t,...e})),s[r]}(e);return mn.set(t,n),s.observe(t),()=>{mn.delete(t),s.unobserve(t)}}const Vn={some:0,all:1};const wn={inView:{Feature:class extends en{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive(Ge.InView,!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r,fallback:i=!0}=t;if("undefined"==typeof IntersectionObserver)return void(i&&this.viewportFallback());const o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Vn[s]};return bn(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(Ge.InView,e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends en{constructor(){super(...arguments),this.removeStartListeners=te,this.removeEndListeners=te,this.removeAccessibleListeners=te,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=an(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();dn(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),r=an(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Kt(s,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=rn(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=rn(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&fn("up",this.node.getProps().onTap)}),fn("down",(t,e)=>{this.startPress(t,e)})}),e=rn(this.node.current,"blur",()=>{this.isPressing&&fn("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Kt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive(Ge.Tap,!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive(Ge.Tap,!1),!hn()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=an(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=rn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Kt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends en{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive(Ge.Focus,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(Ge.Focus,!1),this.isActive=!1)}mount(){this.unmount=Kt(rn(this.node.current,"focus",()=>this.onFocus()),rn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends en{mount(){this.unmount=Kt(pn(this.node,!0),pn(this.node,!1))}unmount(){}}}};function An(t){return"string"==typeof t&&t.startsWith("var(--")}const Cn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pn(t,e,n=1){const[s,r]=function(t){const e=Cn.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():An(r)?Pn(r,e,n+1):r}const xn=new Set(["width","height","top","left","right","bottom","x","y"]),Sn=t=>xn.has(t),Mn=t=>t===i||t===l;var Tn;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Tn||(Tn={}));const En=(t,e)=>parseFloat(t.split(", ")[e]),Fn=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return En(r[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?En(e[1],t):0}},kn=new Set(["x","y","z"]),In=A.filter(t=>!kn.has(t));const On={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:Fn(4,13),y:Fn(5,14)},Nn=(t,e,n={},s={})=>{e={...e},s={...s};const r=Object.keys(e).filter(Sn);let i=[],o=!1;const a=[];if(r.forEach(r=>{const u=t.getValue(r);if(!t.hasValue(r))return;let c=n[r],h=Pt(c);const p=e[r];let d;if(V(p)){const t=p.length,e=null===p[0]?1:0;c=p[e],h=Pt(c);for(let n=e;n<t;n++)d?Pt(p[n]):d=Pt(p[n])}else d=Pt(p);if(h!==d)if(Mn(h)&&Mn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[r]=parseFloat(p):Array.isArray(p)&&d===l&&(e[r]=p.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==d?void 0:d.transform)&&(0===c||0===p)?0===c?u.set(d.transform(c)):e[r]=h.transform(p):(o||(i=function(t){const e=[];return In.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(r),s[r]=void 0!==s[r]?s[r]:e[r],u.jump(p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const s=e.measureViewportBox(),r=e.current,i=getComputedStyle(r),{display:o}=i,a={};"none"===o&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=On[t](s,i)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=On[n](u,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),C&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:s}}return{target:e,transitionEnd:s}};function Dn(t,e,n,s){return(t=>Object.keys(t).some(Sn))(e)?Nn(t,e,n,s):{target:e,transitionEnd:s}}const Ln=(t,e,n,s)=>{const r=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!An(e))return;const n=Pn(e,s);n&&t.set(n)});for(const t in e){const r=e[t];if(!An(r))continue;const i=Pn(r,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,s);return Dn(t,e=r.target,n,s=r.transitionEnd)},Rn={current:null},jn={current:!1};const Bn=Object.keys(P),Un=Bn.length,zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const Hn=["initial",...Ye],qn=Hn.length;class $n extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Y.render(this.render,!1,!0);const{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.isControllingVariants=x(e),this.isVariantNode=S(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==o[t]&&g(e)&&(e.set(o[t],!1),Ft(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),jn.current||function(){if(jn.current=!0,C)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Rn.current=t.matches;t.addListener(e),e()}else Rn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Rn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),X.update(this.notifyUpdate),X.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=y.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Y.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r,i){let o,a;for(let t=0;t<Un;t++){const n=Bn[t],{isEnabled:s,Feature:r,ProjectionNode:i,MeasureLayout:u}=P[n];i&&(o=i),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),u&&(a=u))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&M(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<zn.length;e++){const n=zn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(g(i))t.addValue(r,i),Ft(s)&&s.add(r);else if(g(o))t.addValue(r,nt(i,{owner:t})),Ft(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,nt(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<qn;t++){const n=Hn[t],s=this.props[n];(w(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=nt(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=f(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||g(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new Q),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},r){let i=function(t,e,n){const s={};for(const r in t){const t=Et(r,e);if(void 0!==t)s[r]=t;else{const t=n.getValue(r);t&&(s[r]=t.get())}}return s}(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),r){!function(t,e,n){var s,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),o=i.length;if(o)for(let a=0;a<o;a++){const o=i[a],u=e[o];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(r=null!==(s=n[o])&&void 0!==s?s:t.readValue(o))&&void 0!==r?r:e[o]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||B(c))?c=parseFloat(c):!St(c)&&ft.test(u)&&(c=wt(o,u)),t.addValue(o,nt(c,{owner:t})),void 0===n[o]&&(n[o]=c),null!==c&&t.setBaseTarget(o,c))}}(this,n,i);const t=Ln(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Wn extends $n{readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(T(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,s){E(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return F(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;g(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){k(t,e,n,s)}}class Kn extends $n{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}return e=I.has(e)?e:v(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return O(t,e)}build(t,e,n,s){N(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){D(t,e,n,s)}mount(t){this.isSVGTag=L(t.tagName),super.mount(t)}}const Gn={renderer:(t,e)=>R(t)?new Kn(e,{enableHardwareAcceleration:!1}):new Wn(e,{enableHardwareAcceleration:!0}),...sn,...wn};export{Gn as domAnimation};
|
|
1
|
+
import{q as t,t as e,u as n,v as s,w as r,x as i,y as o,z as a,A as u,B as c,C as l,D as h,E as p,F as d,r as f,G as m,d as g,H as v,I as y,n as b,J as V,c as w,K as A,i as C,f as P,b as x,m as S,a as M,L as T,g as E,p as F,M as k,N as I,s as O,h as N,o as D,j as L,k as R}from"./size-rollup-dom-animation-assets.js";function j(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const B=t=>/^0[^.\s]+$/.test(t),U={delta:0,timestamp:0},z="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),H="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(z()),1/60*1e3);let q=!0,$=!1,W=!1;const K=["read","update","preRender","render","postRender"],G=K.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const u=a&&r,c=u?e:n;return i&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&r&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:u=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(u),o.has(s)&&(a.schedule(s),t())}r=!1,i&&(i=!1,a.process(u))}}};return a}(()=>$=!0),t),{}),Y=K.reduce((t,e)=>{const n=G[e];return t[e]=(t,e=!1,s=!1)=>($||_(),n.schedule(t,e,s)),t},{}),X=K.reduce((t,e)=>(t[e]=G[e].cancel,t),{});K.reduce((t,e)=>(t[e]=()=>G[e].process(U),t),{});const Z=t=>G[t].process(U),J=t=>{$=!1,U.delta=q?1/60*1e3:Math.max(Math.min(t-U.timestamp,40),1),U.timestamp=t,W=!0,K.forEach(Z),W=!1,$&&(q=!1,H(J))},_=()=>{$=!0,q=!0,W||H(J)};class Q{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tt(t,e){return e?t*(1e3/e):0}class et{constructor(t,e={}){var n;this.version="9.0.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=U;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,Y.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Y.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Q);const n=this.events[t].add(e);return"change"===t?()=>{n(),Y.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nt(t,e){return new et(t,e)}const st=(n,s)=>r=>Boolean(t(r)&&e.test(r)&&r.startsWith(n)||s&&Object.prototype.hasOwnProperty.call(r,s)),rt=(e,s,r)=>i=>{if(!t(i))return i;const[o,a,u,c]=i.match(n);return{[e]:parseFloat(o),[s]:parseFloat(a),[r]:parseFloat(u),alpha:void 0!==c?parseFloat(c):1}},it={...i,transform:t=>Math.round((t=>o(0,255,t))(t))},ot={test:st("rgb","red"),parse:rt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+it.transform(t)+", "+it.transform(e)+", "+it.transform(n)+", "+s(r.transform(i))+")"};const at={test:st("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:ot.transform},ut={test:st("hsl","hue"),parse:rt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+a.transform(s(e))+", "+a.transform(s(n))+", "+s(r.transform(i))+")"},ct={test:t=>ot.test(t)||at.test(t)||ut.test(t),parse:t=>ot.test(t)?ot.parse(t):ut.test(t)?ut.parse(t):at.parse(t),transform:e=>t(e)?e:e.hasOwnProperty("red")?ot.transform(e):ut.transform(e)};function lt(t){"number"==typeof t&&(t=""+t);const e=[];let s=0,r=0;const o=t.match(u);o&&(s=o.length,t=t.replace(u,"${c}"),e.push(...o.map(ct.parse)));const a=t.match(n);return a&&(r=a.length,t=t.replace(n,"${n}"),e.push(...a.map(i.parse))),{values:e,numColors:s,numNumbers:r,tokenised:t}}function ht(t){return lt(t).values}function pt(t){const{values:e,numColors:n,tokenised:r}=lt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?ct.transform(t[r]):s(t[r]));return e}}const dt=t=>"number"==typeof t?0:t;const ft={test:function(e){var s,r;return isNaN(e)&&t(e)&&((null===(s=e.match(n))||void 0===s?void 0:s.length)||0)+((null===(r=e.match(u))||void 0===r?void 0:r.length)||0)>0},parse:ht,createTransformer:pt,getAnimatableNone:function(t){const e=ht(t);return pt(t)(e.map(dt))}},mt=new Set(["brightness","contrast","saturate","opacity"]);function gt(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=s.match(n)||[];if(!r)return t;const i=s.replace(r,"");let o=mt.has(e)?1:0;return r!==s&&(o*=100),e+"("+o+i+")"}const vt=/([a-z-]*)\(.*?\)/g,yt={...ft,getAnimatableNone:t=>{const e=t.match(vt);return e?e.map(gt).join(" "):t}},bt={...c,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:yt,WebkitFilter:yt},Vt=t=>bt[t];function wt(t,e){let n=Vt(t);return n!==yt&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const At=t=>e=>e.test(t),Ct=[i,l,a,h,p,d,{test:t=>"auto"===t,parse:t=>t}],Pt=t=>Ct.find(At(t)),xt=[...Ct,ct,ft],St=t=>xt.find(At(t));function Mt(t,e,n){const s=t.getProps();return f(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function Tt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,nt(n))}function Et(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ft(t){return Boolean(g(t)&&t.add)}const kt="data-"+v("framerAppearId");const It=t=>1e3*t,Ot=!1,Nt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Dt=t=>e=>1-t(1-e),Lt=t=>t*t,Rt=Dt(Lt),jt=Nt(Lt),Bt=(t,e,n)=>-n*t+n*e+t;function Ut(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const zt=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Ht=[at,ot,ut];function qt(t){const e=(n=t,Ht.find(t=>t.test(n)));var n;let s=e.parse(t);return e===ut&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Ut(a,s,t+1/3),i=Ut(a,s,t),o=Ut(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const $t=(t,e)=>{const n=qt(t),s=qt(e),r={...n};return t=>(r.red=zt(n.red,s.red,t),r.green=zt(n.green,s.green,t),r.blue=zt(n.blue,s.blue,t),r.alpha=Bt(n.alpha,s.alpha,t),ot.transform(r))},Wt=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(Wt);function Gt(t,e){return"number"==typeof t?n=>Bt(t,e,n):ct.test(t)?$t(t,e):Zt(t,e)}const Yt=(t,e)=>{const n=[...t],s=n.length,r=t.map((t,n)=>Gt(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}},Xt=(t,e)=>{const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Gt(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Zt=(t,e)=>{const n=ft.createTransformer(e),s=lt(t),r=lt(e);return s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?Kt(Yt(s.values,r.values),n):n=>""+(n>0?e:t)},Jt=(t,e)=>n=>Bt(t,e,n);function _t(t,e,n){const s=[],r=n||("number"==typeof(i=t[0])?Jt:"string"==typeof i?ct.test(i)?$t:Zt:Array.isArray(i)?Yt:"object"==typeof i?Xt:Jt);var i;const o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Kt(t,i)}s.push(i)}return s}function Qt(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;e.length,!s||!Array.isArray(s)||s.length,t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=_t(e,s,r),u=a.length,c=e=>{let n=0;if(u>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=((t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s})(t[n],t[n+1],e);return a[n](s)};return n?e=>c(o(t[0],t[i-1],e)):c}const te=t=>t,ee=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ne(t,e,n,s){if(t===e&&n===s)return te;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ee(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ee(r(t),e,s)}const se=t=>1-Math.sin(Math.acos(t)),re=Dt(se),ie=Nt(re),oe=ne(.33,1.53,.69,.99),ae=Dt(oe),ue=Nt(ae),ce={linear:te,easeIn:Lt,easeInOut:jt,easeOut:Rt,circIn:se,circInOut:ie,circOut:re,backIn:ae,backInOut:ue,backOut:oe,anticipate:t=>(t*=2)<1?.5*ae(t):.5*(2-Math.pow(2,-10*(t-1)))},le=t=>{if(Array.isArray(t)){t.length;const[e,n,s,r]=t;return ne(e,n,s,r)}return"string"==typeof t?ce[t]:t};function he({keyframes:t,ease:e=jt,times:n,duration:s=300}){t=[...t];const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(le):le(e),i={done:!1,value:t[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(t),s);function a(){return Qt(o,t,{ease:Array.isArray(r)?r:(e=t,n=r,e.map(()=>n||jt).splice(0,e.length-1))});var e,n}let u=a();return{next:t=>(i.value=u(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),u=a()}}}function pe({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{const s=e*a,r=s*t;return.001-(s-n)/de(e,a)*Math.exp(-r)},i=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),c=de(Math.pow(e,2),a);return(.001-r(e)>0?-1:1)*((i-o)*u)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}function de(t,e){return t*Math.sqrt(1-e*e)}const fe=["duration","bounce"],me=["stiffness","damping","mass"];function ge(t,e){return e.some(e=>void 0!==t[e])}function ve({keyframes:t,restDelta:e,restSpeed:n,...s}){let r=t[0],i=t[t.length-1];const o={done:!1,value:r},{stiffness:a,damping:u,mass:c,velocity:l,duration:h,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ge(t,me)&&ge(t,fe)){const n=pe(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let d=ye,f=l?-l/1e3:0;const m=u/(2*Math.sqrt(a*c));function g(){const t=i-r,s=Math.sqrt(a/c)/1e3,o=Math.abs(t)<5;if(n||(n=o?.01:2),e||(e=o?.005:.5),m<1){const e=de(s,m);d=n=>{const r=Math.exp(-m*s*n);return i-r*((f+m*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===m)d=e=>i-Math.exp(-s*e)*(t+(f+s*t)*e);else{const e=s*Math.sqrt(m*m-1);d=n=>{const r=Math.exp(-m*s*n),o=Math.min(e*n,300);return i-r*((f+m*s*t)*Math.sinh(o)+e*t*Math.cosh(o))/e}}}return g(),{next:t=>{const s=d(t);if(p)o.done=t>=h;else{let r=f;if(0!==t)if(m<1){const e=Math.max(0,t-5);r=tt(s-d(e),t-e)}else r=0;const a=Math.abs(r)<=n,u=Math.abs(i-s)<=e;o.done=a&&u}return o.value=o.done?i:s,o},flipTarget:()=>{f=-f,[r,i]=[i,r],g()}}}ve.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ye=t=>0;const be={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:r=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let u=n*e;const c=o+u,l=void 0===i?c:i(c);return l!==c&&(u=l-o),{next:t=>{const e=-u*Math.exp(-t/s);return a.done=!(e>r||e<-r),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:he,tween:he,spring:ve};function Ve(t,e,n=0){return t-e-n}const we=t=>{const e=({delta:e})=>t(e);return{start:()=>Y.update(e,!0),stop:()=>X.update(e)}};function Ae({duration:t,driver:e=we,elapsed:n=0,repeat:s=0,repeatType:r="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:u,onStop:c,onComplete:l,onRepeat:h,onUpdate:p,type:d="keyframes",...f}){const m=n;let g,v,y=0,b=t,V=!1,w=!0;const A=be[o.length>2?"keyframes":d]||he,C=o[0],P=o[o.length-1];let x={done:!1,value:C};const{needsInterpolation:S}=A;S&&S(C,P)&&(v=Qt([0,100],[C,P],{clamp:!1}),o=[0,100]);const M=A({...f,duration:t,keyframes:o});function T(){y++,"reverse"===r?(w=y%2==0,n=function(t,e=0,n=0,s=!0){return s?Ve(e+-t,e,n):e-(t-e)+n}(n,b,i,w)):(n=Ve(n,b,i),"mirror"===r&&M.flipTarget()),V=!1,h&&h()}function E(t){w||(t=-t),n+=t,V||(x=M.next(Math.max(0,n)),v&&(x.value=v(x.value)),V=w?x.done:n<=0),p&&p(x.value),V&&(0===y&&(b=void 0!==b?b:n),y<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,b,i,w)&&T():(g&&g.stop(),l&&l()))}return a&&(u&&u(),g=e(E),g.start()),{stop:()=>{c&&c(),g&&g.stop()},set currentTime(t){n=m,E(t)},sample:e=>{n=m;const s=t&&"number"==typeof t?Math.max(.5*t,50):50;let r=0;for(E(0);r<=e;){const t=e-r;E(Math.min(t,s)),r+=s}return x}}}const Ce=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Pe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ce([0,.65,.55,1]),circOut:Ce([.55,0,1,.45]),backIn:Ce([.31,.01,.66,-.59]),backOut:Ce([.33,1.53,.69,.99])};function xe(t){if(t)return Array.isArray(t)?Ce(t):Pe[t]}const Se={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Me={},Te={};for(const t in Se)Te[t]=()=>(void 0===Me[t]&&(Me[t]=Se[t]()),Me[t]);const Ee=new Set(["opacity"]);function Fe(t,e,{onUpdate:n,onComplete:s,...r}){if(!(Te.waapi()&&Ee.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping))return!1;let{keyframes:i,duration:o=300,elapsed:a=0,ease:u}=r;if("spring"===r.type||!(!(c=r.ease)||Array.isArray(c)||"string"==typeof c&&Pe[c])){if(r.repeat===1/0)return;const t=Ae({...r,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;i=n,o=s-10,u="linear"}var c;const l=function(t,e,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:u}={}){return t.animate({[e]:n,offset:u},{delay:s,duration:r,easing:xe(a),fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,i,{...r,delay:-a,duration:o,ease:u});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,r)),Y.update(()=>l.cancel()),s&&s()},{get currentTime(){return l.currentTime||0},set currentTime(t){l.currentTime=t},stop:()=>{const{currentTime:e}=l;if(e){const n=Ae({...r,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Y.update(()=>l.cancel())}}}function ke(t,e){const n=performance.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(X.read(s),t(i-e))};return Y.read(s,!0),()=>X.read(s)}function Ie({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const r=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:ke(r,-e)}:r()}const Oe=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ne=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),De=()=>({type:"keyframes",ease:"linear",duration:.3}),Le={type:"keyframes",duration:.8},Re={x:Oe,y:Oe,z:Oe,rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scaleX:Ne,scaleY:Ne,scale:Ne,opacity:De,backgroundColor:De,color:De,default:Ne},je=(t,{keyframes:e})=>{if(e.length>2)return Le;return(Re[t]||Re.default)(e[1])},Be=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ft.test(e)||e.startsWith("url(")));function Ue(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function ze(t){return"number"==typeof t?0:wt("",t)}const He=(t,e,n,s={})=>r=>{const i=function(t,e){return t[e]||t.default||t}(s,t)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=It(o);const u=function(t,e,n,s){const r=Be(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&r&&"string"==typeof n?i=wt(e,n):Ue(i)&&"string"==typeof n?i=ze(n):!Array.isArray(n)&&Ue(n)&&"string"==typeof i&&(n=ze(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),c=u[0],l=u[u.length-1],h=Be(t,c),p=Be(t,l);let d={keyframes:u,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(!h||!p||Ot||!1===i.type)return Ie(d);if("inertia"===i.type)return function({keyframes:t,velocity:e=0,min:n,max:s,power:r=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:h,onComplete:p,onStop:d}){const f=t[0];let m;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function v(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function y(t){m&&m.stop(),m=Ae({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:p,onStop:d})}function b(t){y({type:"spring",stiffness:o,damping:a,restDelta:u,...t})}if(g(f))b({velocity:e,keyframes:[f,v(f)]});else{let t=r*e+f;void 0!==c&&(t=c(t));const s=v(t),o=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=tt(t-a,U.delta),(1===o&&t>s||-1===o&&t<s)&&b({keyframes:[t,s],velocity:e})};y({type:"decay",keyframes:[f,0],velocity:e,timeConstant:i,power:r,restDelta:u,modifyTarget:c,onUpdate:g(t)?h:void 0})}return{stop:()=>m&&m.stop()}}(d);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:c,...l}){return!!Object.keys(l).length}(i)||(d={...d,...je(t,d)}),d.duration&&(d.duration=It(d.duration)),d.repeatDelay&&(d.repeatDelay=It(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Fe(e,t,d);if(n)return n}return Ae(d)};function qe(t,e,n={}){const s=Mt(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>$e(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,r=1,i){const o=[],a=(t.variantChildren.size-1)*s,u=1===r?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(We).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(qe(t,e,{...i,delay:n+u(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[i,o]:[o,i];return t().then(e)}return Promise.all([i(),o(n.delay)])}function $e(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e),r=a[e];if(!s||void 0===r||l&&Ke(l,e))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[kt];n&&(o.elapsed=window.HandoffAppearAnimations(n,e,s,Y))}let h=s.start(He(e,s,r,t.shouldReduceMotion&&y.has(e)?{type:!1}:o));Ft(u)&&(u.add(e),h=h.then(()=>u.remove(e))),c.push(h)}return Promise.all(c).then(()=>{o&&function(t,e){const n=Mt(t,e);let{transitionEnd:s={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){Tt(t,e,m(i[e]))}}(t,o)})}function We(t,e){return t.sortNodePosition(e)}function Ke({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}var Ge;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Ge||(Ge={}));const Ye=[Ge.Animate,Ge.InView,Ge.Focus,Ge.Hover,Ge.Tap,Ge.Drag,Ge.Exit],Xe=[...Ye].reverse(),Ze=Ye.length;function Je(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>qe(t,e,n));s=Promise.all(r)}else if("string"==typeof e)s=qe(t,e,n);else{const r="function"==typeof e?Mt(t,e,n.custom):e;s=$e(t,r,n)}return s.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function _e(t){let e=Je(t);const n={[Ge.Animate]:tn(!0),[Ge.InView]:tn(),[Ge.Hover]:tn(),[Ge.Tap]:tn(),[Ge.Drag]:tn(),[Ge.Focus]:tn(),[Ge.Exit]:tn()};let s=!0;const r=(e,n)=>{const s=Mt(t,n);if(s){const{transition:t,transitionEnd:n,...r}=s;e={...e,...r,...n}}return e};function i(i,o){const a=t.getProps(),u=t.getVariantContext(!0)||{},c=[],l=new Set;let h={},p=1/0;for(let e=0;e<Ze;e++){const d=Xe[e],f=n[d],m=void 0!==a[d]?a[d]:u[d],g=w(m),v=d===o?f.isActive:null;!1===v&&(p=e);let y=m===u[d]&&m!==a[d]&&g;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...h},!f.isActive&&null===v||!m&&!f.prevProp||b(m)||"boolean"==typeof m)continue;const A=Qe(f.prevProp,m);let C=A||d===o&&f.isActive&&!y&&g||e>p&&g;const P=Array.isArray(m)?m:[m];let x=P.reduce(r,{});!1===v&&(x={});const{prevResolvedValues:S={}}=f,M={...S,...x},T=t=>{C=!0,l.delete(t),f.needsAnimating[t]=!0};for(const t in M){const e=x[t],n=S[t];h.hasOwnProperty(t)||(e!==n?V(e)&&V(n)?!j(e,n)||A?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):l.add(t):void 0!==e&&l.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=m,f.prevResolvedValues=x,f.isActive&&(h={...h,...x}),s&&t.blockInitialAnimation&&(C=!1),C&&!y&&c.push(...P.map(t=>({animation:t,options:{type:d,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let d=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(d=!1),s=!1,d?e(c):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,r){if(n[e].isActive===s)return Promise.resolve();t.variantChildren&&t.variantChildren.forEach(t=>{t.animationState&&t.animationState.setActive(e,s)}),n[e].isActive=s;const o=i(r,e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Qe(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!j(e,t)}function tn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class en{constructor(t){this.isMounted=!1,this.node=t}update(){}}let nn=0;const sn={animation:{Feature:class extends en{constructor(t){super(t),t.animationState||(t.animationState=_e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),b(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends en{constructor(){super(...arguments),this.id=nn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive(Ge.Exit,!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&r.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function rn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function on(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function an(t,e,n,s){return rn(t,e,(t=>e=>(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(e)&&t(e,on(e)))(n),s)}function un(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const cn=un("dragHorizontal"),ln=un("dragVertical");function hn(){const t=function(t){let e=!1;if("y"===t)e=ln();else if("x"===t)e=cn();else{const t=cn(),n=ln();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function pn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return an(t.current,n,(n,r)=>{if("touch"===n.type||hn())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive(Ge.Hover,e),i[s]&&i[s](n,r)},{passive:!t.getProps()[s]})}const dn=(t,e)=>!!e&&(t===e||dn(t,e.parentElement));function fn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,on(n))}const mn=new WeakMap,gn=new WeakMap,vn=t=>{const e=mn.get(t.target);e&&e(t)},yn=t=>{t.forEach(vn)};function bn(t,e,n){const s=function({root:t,...e}){const n=t||document;gn.has(n)||gn.set(n,{});const s=gn.get(n),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(yn,{root:t,...e})),s[r]}(e);return mn.set(t,n),s.observe(t),()=>{mn.delete(t),s.unobserve(t)}}const Vn={some:0,all:1};const wn={inView:{Feature:class extends en{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive(Ge.InView,!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r,fallback:i=!0}=t;if("undefined"==typeof IntersectionObserver)return void(i&&this.viewportFallback());const o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Vn[s]};return bn(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(Ge.InView,e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends en{constructor(){super(...arguments),this.removeStartListeners=te,this.removeEndListeners=te,this.removeAccessibleListeners=te,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=an(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();dn(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),r=an(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Kt(s,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=rn(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=rn(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&fn("up",this.node.getProps().onTap)}),fn("down",(t,e)=>{this.startPress(t,e)})}),e=rn(this.node.current,"blur",()=>{this.isPressing&&fn("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Kt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive(Ge.Tap,!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive(Ge.Tap,!1),!hn()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=an(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=rn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Kt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends en{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive(Ge.Focus,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(Ge.Focus,!1),this.isActive=!1)}mount(){this.unmount=Kt(rn(this.node.current,"focus",()=>this.onFocus()),rn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends en{mount(){this.unmount=Kt(pn(this.node,!0),pn(this.node,!1))}unmount(){}}}};function An(t){return"string"==typeof t&&t.startsWith("var(--")}const Cn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pn(t,e,n=1){const[s,r]=function(t){const e=Cn.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():An(r)?Pn(r,e,n+1):r}const xn=new Set(["width","height","top","left","right","bottom","x","y"]),Sn=t=>xn.has(t),Mn=t=>t===i||t===l;var Tn;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Tn||(Tn={}));const En=(t,e)=>parseFloat(t.split(", ")[e]),Fn=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return En(r[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?En(e[1],t):0}},kn=new Set(["x","y","z"]),In=A.filter(t=>!kn.has(t));const On={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:Fn(4,13),y:Fn(5,14)},Nn=(t,e,n={},s={})=>{e={...e},s={...s};const r=Object.keys(e).filter(Sn);let i=[],o=!1;const a=[];if(r.forEach(r=>{const u=t.getValue(r);if(!t.hasValue(r))return;let c=n[r],h=Pt(c);const p=e[r];let d;if(V(p)){const t=p.length,e=null===p[0]?1:0;c=p[e],h=Pt(c);for(let n=e;n<t;n++)d?Pt(p[n]):d=Pt(p[n])}else d=Pt(p);if(h!==d)if(Mn(h)&&Mn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[r]=parseFloat(p):Array.isArray(p)&&d===l&&(e[r]=p.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==d?void 0:d.transform)&&(0===c||0===p)?0===c?u.set(d.transform(c)):e[r]=h.transform(p):(o||(i=function(t){const e=[];return In.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(r),s[r]=void 0!==s[r]?s[r]:e[r],u.jump(p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const s=e.measureViewportBox(),r=e.current,i=getComputedStyle(r),{display:o}=i,a={};"none"===o&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=On[t](s,i)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=On[n](u,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),C&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:s}}return{target:e,transitionEnd:s}};function Dn(t,e,n,s){return(t=>Object.keys(t).some(Sn))(e)?Nn(t,e,n,s):{target:e,transitionEnd:s}}const Ln=(t,e,n,s)=>{const r=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!An(e))return;const n=Pn(e,s);n&&t.set(n)});for(const t in e){const r=e[t];if(!An(r))continue;const i=Pn(r,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,s);return Dn(t,e=r.target,n,s=r.transitionEnd)},Rn={current:null},jn={current:!1};const Bn=Object.keys(P),Un=Bn.length,zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const Hn=["initial",...Ye],qn=Hn.length;class $n extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Y.render(this.render,!1,!0);const{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.isControllingVariants=x(e),this.isVariantNode=S(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==o[t]&&g(e)&&(e.set(o[t],!1),Ft(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),jn.current||function(){if(jn.current=!0,C)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Rn.current=t.matches;t.addListener(e),e()}else Rn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Rn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),X.update(this.notifyUpdate),X.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=y.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Y.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r,i){let o,a;for(let t=0;t<Un;t++){const n=Bn[t],{isEnabled:s,Feature:r,ProjectionNode:i,MeasureLayout:u}=P[n];i&&(o=i),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),u&&(a=u))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&M(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<zn.length;e++){const n=zn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(g(i))t.addValue(r,i),Ft(s)&&s.add(r);else if(g(o))t.addValue(r,nt(i,{owner:t})),Ft(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,nt(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<qn;t++){const n=Hn[t],s=this.props[n];(w(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=nt(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=f(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||g(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new Q),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},r){let i=function(t,e,n){const s={};for(const r in t){const t=Et(r,e);if(void 0!==t)s[r]=t;else{const t=n.getValue(r);t&&(s[r]=t.get())}}return s}(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),r){!function(t,e,n){var s,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),o=i.length;if(o)for(let a=0;a<o;a++){const o=i[a],u=e[o];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(r=null!==(s=n[o])&&void 0!==s?s:t.readValue(o))&&void 0!==r?r:e[o]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||B(c))?c=parseFloat(c):!St(c)&&ft.test(u)&&(c=wt(o,u)),t.addValue(o,nt(c,{owner:t})),void 0===n[o]&&(n[o]=c),null!==c&&t.setBaseTarget(o,c))}}(this,n,i);const t=Ln(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Wn extends $n{readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(T(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,s){E(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return F(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;g(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){k(t,e,n,s)}}class Kn extends $n{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}return e=I.has(e)?e:v(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return O(t,e)}build(t,e,n,s){N(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){D(t,e,n,s)}mount(t){this.isSVGTag=L(t.tagName),super.mount(t)}}const Gn={renderer:(t,e)=>R(t)?new Kn(e,{enableHardwareAcceleration:!1}):new Wn(e,{enableHardwareAcceleration:!0}),...sn,...wn};export{Gn as domAnimation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as t}from"react";const e=t(null),a="undefined"!=typeof document;function r(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function n(t){return"string"==typeof t||Array.isArray(t)}function s(t){return"object"==typeof t&&"function"==typeof t.start}const o=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function i(t){return s(t.animate)||o.some(e=>n(t[e]))}function f(t){return Boolean(i(t)||t.variants)}const c={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},l={};for(const t in c)l[t]={isEnabled:e=>c[t].some(t=>!!e[t])};const d={hasAnimatedSinceResize:!0,hasEverUpdated:!1},u=t({}),p=t({}),
|
|
1
|
+
import{createContext as t}from"react";const e=t(null),a="undefined"!=typeof document;function r(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function n(t){return"string"==typeof t||Array.isArray(t)}function s(t){return"object"==typeof t&&"function"==typeof t.start}const o=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function i(t){return s(t.animate)||o.some(e=>n(t[e]))}function f(t){return Boolean(i(t)||t.variants)}const c={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},l={};for(const t in c)l[t]={isEnabled:e=>c[t].some(t=>!!e[t])};const d={hasAnimatedSinceResize:!0,hasEverUpdated:!1},u=t({}),p=t({}),g=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function m(t){return"string"==typeof t&&!t.includes("-")&&!!(g.indexOf(t)>-1||/[A-Z]/.test(t))}const h={};function y(t){Object.assign(h,t)}const v=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],w=new Set(v);function b(t,{layout:e,layoutId:a}){return w.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!h[t]||"opacity"===t)}const x=t=>Boolean(t&&t.getVelocity),k={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},O=v.length;function T(t){return t.startsWith("--")}const L=(t,e)=>e&&"number"==typeof t?e.transform(t):t,X=(t,e,a)=>Math.min(Math.max(a,t),e),Y={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},$={...Y,transform:t=>X(0,1,t)},B={...Y,default:1},S=t=>Math.round(1e5*t)/1e5,A=/(-)?([\d]*\.?[\d])+/g,R=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,P=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function W(t){return"string"==typeof t}const Z=t=>({test:e=>W(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),V=Z("deg"),j=Z("%"),z=Z("px"),C=Z("vh"),H=Z("vw"),E={...j,parse:t=>j.parse(t)/100,transform:t=>j.transform(100*t)},F={...Y,transform:Math.round},I={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,size:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,rotate:V,rotateX:V,rotateY:V,rotateZ:V,scale:B,scaleX:B,scaleY:B,scaleZ:B,skew:V,skewX:V,skewY:V,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z:z,perspective:z,transformPerspective:z,opacity:$,originX:E,originY:E,originZ:z,zIndex:F,fillOpacity:$,strokeOpacity:$,numOctaves:F};function D(t,e,a,r){const{style:n,vars:s,transform:o,transformOrigin:i}=t;let f=!1,c=!1,l=!0;for(const t in e){const a=e[t];if(T(t)){s[t]=a;continue}const r=I[t],d=L(a,r);if(w.has(t)){if(f=!0,o[t]=d,!l)continue;a!==(r.default||0)&&(l=!1)}else t.startsWith("origin")?(c=!0,i[t]=d):n[t]=d}if(e.transform||(f||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:a=!0},r,n){let s="";for(let e=0;e<O;e++){const a=v[e];if(void 0!==t[a]){s+=`${k[a]||a}(${t[a]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):a&&r&&(s="none"),s}(t.transform,a,l,r):n.transform&&(n.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:a=0}=i;n.transformOrigin=`${t} ${e} ${a}`}}function M(t,e,a){return"string"==typeof t?t:z.transform(e+a*t)}const U={offset:"stroke-dashoffset",array:"stroke-dasharray"},q={offset:"strokeDashoffset",array:"strokeDasharray"};function N(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(D(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:p,dimensions:g}=t;u.transform&&(g&&(p.transform=u.transform),delete u.transform),g&&(void 0!==r||void 0!==n||p.transform)&&(p.transformOrigin=function(t,e,a){return`${M(e,t.x,t.width)} ${M(a,t.y,t.height)}`}(g,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(u.x=e),void 0!==a&&(u.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?U:q;t[s.offset]=z.transform(-r);const o=z.transform(e),i=z.transform(a);t[s.array]=`${o} ${i}`}(u,s,o,i,!1)}const G=t=>"string"==typeof t&&"svg"===t.toLowerCase(),J=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function K(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const Q=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function _(t,e,a,r){K(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(Q.has(a)?a:J(a),e.attrs[a])}function tt(t,e){const{style:a}=t,r={};for(const n in a)(x(a[n])||e.style&&x(e.style[n])||b(n,t))&&(r[n]=a[n]);return r}function et(t,e){const a=tt(t,e);for(const r in t)if(x(t[r])||x(e[r])){a["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return a}function at(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const rt=t=>Array.isArray(t),nt=t=>rt(t)?t[t.length-1]||0:t;function st(t){const e=x(t)?t.get():t;return a=e,Boolean(a&&"object"==typeof a&&a.mix&&a.toValue)?e.toValue():e;var a}export{j as A,R as B,I as C,z as D,h as E,V as F,H as G,C as H,nt as I,v as J,rt as K,u as L,J as M,w as N,T as O,e as P,K as Q,y as R,p as S,Q as T,r as a,i as b,n as c,x as d,b as e,l as f,d as g,D as h,a as i,N as j,G as k,m as l,f as m,s as n,at as o,_ as p,tt as q,st as r,et as s,X as t,W as u,P as v,A as w,S as x,$ as y,Y as z};
|