framer-motion 7.6.18 → 7.7.0

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.
@@ -205,7 +205,7 @@
205
205
  * This will be replaced by the build step with the latest version number.
206
206
  * When MotionValues are provided to motion components, warn if versions are mixed.
207
207
  */
208
- this.version = "7.6.18";
208
+ this.version = "7.7.0";
209
209
  /**
210
210
  * Duration, in milliseconds, since last updating frame.
211
211
  *
@@ -1791,11 +1791,10 @@
1791
1791
  function isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, ...transition }) {
1792
1792
  return !!Object.keys(transition).length;
1793
1793
  }
1794
- let legacyRepeatWarning = false;
1795
1794
  /**
1796
1795
  * Convert Framer Motion's Transition type into Popmotion-compatible options.
1797
1796
  */
1798
- function convertTransitionToAnimationOptions({ ease, times, yoyo, flip, loop, ...transition }) {
1797
+ function convertTransitionToAnimationOptions({ ease, times, ...transition }) {
1799
1798
  const options = { ...transition };
1800
1799
  if (times)
1801
1800
  options["offset"] = times;
@@ -1819,23 +1818,6 @@
1819
1818
  */
1820
1819
  if (transition.type === "tween")
1821
1820
  options.type = "keyframes";
1822
- /**
1823
- * TODO: These options are officially removed from the API.
1824
- */
1825
- if (yoyo || loop || flip) {
1826
- warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.");
1827
- legacyRepeatWarning = true;
1828
- if (yoyo) {
1829
- options.repeatType = "reverse";
1830
- }
1831
- else if (loop) {
1832
- options.repeatType = "loop";
1833
- }
1834
- else if (flip) {
1835
- options.repeatType = "mirror";
1836
- }
1837
- options.repeat = loop || yoyo || flip || transition.repeat;
1838
- }
1839
1821
  /**
1840
1822
  * TODO: Popmotion 9 has the ability to automatically detect whether to use
1841
1823
  * a keyframes or spring animation, but does so by detecting velocity and other spring options.
@@ -4837,7 +4819,7 @@
4837
4819
  * and warn against mismatches.
4838
4820
  */
4839
4821
  {
4840
- warnOnce(nextValue.version === "7.6.18", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.6.18 may not work as expected.`);
4822
+ warnOnce(nextValue.version === "7.7.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.0 may not work as expected.`);
4841
4823
  }
4842
4824
  }
4843
4825
  else if (isMotionValue(prevValue)) {
@@ -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=t=>({isEnabled:e=>t.some(t=>!!e[t])}),l={measureLayout:c(["layout","layoutId","drag"]),animation:c(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:c(["exit"]),drag:c(["drag","dragControls"]),focus:c(["whileFocus"]),hover:c(["whileHover","onHoverStart","onHoverEnd"]),tap:c(["whileTap","onTap","onTapStart","onTapCancel"]),pan:c(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:c(["whileInView","onViewportEnter","onViewportLeave"])},d=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","text","tspan","use","view"];function u(t){return"string"==typeof t&&!t.includes("-")&&!!(d.indexOf(t)>-1||/[A-Z]/.test(t))}const p={},m=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],g=new Set(m);function h(t,{layout:e,layoutId:a}){return g.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!p[t]||"opacity"===t)}const y=t=>!!(null==t?void 0:t.getVelocity),w={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},v=(t,e)=>m.indexOf(t)-m.indexOf(e);function b(t){return t.startsWith("--")}const x=(t,e)=>e&&"number"==typeof t?e.transform(t):t,k=(t,e)=>a=>Math.max(Math.min(a,e),t),O=t=>t%1?Number(t.toFixed(5)):t,T=/(-)?([\d]*\.?[\d])+/g,X=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Y=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $(t){return"string"==typeof t}const j={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},L=Object.assign(Object.assign({},j),{transform:k(0,1)}),P=Object.assign(Object.assign({},j),{default:1}),S=t=>({test:e=>$(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),W=S("deg"),Z=S("%"),A=S("px"),R=S("vh"),B=S("vw"),H=Object.assign(Object.assign({},Z),{parse:t=>Z.parse(t)/100,transform:t=>Z.transform(100*t)}),V={...j,transform:Math.round},z={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:P,scaleX:P,scaleY:P,scaleZ:P,skew:W,skewX:W,skewY:W,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:L,originX:H,originY:H,originZ:A,zIndex:V,fillOpacity:L,strokeOpacity:L,numOctaves:V};function C(t,e,a,r){const{style:n,vars:s,transform:o,transformKeys:i,transformOrigin:f}=t;i.length=0;let c=!1,l=!1,d=!0;for(const t in e){const a=e[t];if(b(t)){s[t]=a;continue}const r=z[t],u=x(a,r);if(g.has(t)){if(c=!0,o[t]=u,i.push(t),!d)continue;a!==(r.default||0)&&(d=!1)}else t.startsWith("origin")?(l=!0,f[t]=u):n[t]=u}if(e.transform||(c||r?n.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:a=!0,allowTransformNone:r=!0},n,s){let o="";e.sort(v);for(const a of e)o+=`${w[a]||a}(${t[a]}) `;return a&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,n?"":o):r&&n&&(o="none"),o}(t,a,d,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=f;n.transformOrigin=`${t} ${e} ${a}`}}function F(t,e,a){return"string"==typeof t?t:A.transform(e+a*t)}const I={offset:"stroke-dashoffset",array:"stroke-dasharray"},D={offset:"strokeDashoffset",array:"strokeDasharray"};function E(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l){C(t,f,c,l),t.attrs=t.style,t.style={};const{attrs:d,style:u,dimensions:p}=t;d.transform&&(p&&(u.transform=d.transform),delete d.transform),p&&(void 0!==r||void 0!==n||u.transform)&&(u.transformOrigin=function(t,e,a){return`${F(e,t.x,t.width)} ${F(a,t.y,t.height)}`}(p,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(d.x=e),void 0!==a&&(d.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?I:D;t[s.offset]=A.transform(-r);const o=A.transform(e),i=A.transform(a);t[s.array]=`${o} ${i}`}(d,s,o,i,!1)}const M=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"]);function N(t,e,a,r){K(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(q.has(a)?a:M(a),e.attrs[a])}function U(t){const{style:e}=t,a={};for(const r in e)(y(e[r])||h(r,t))&&(a[r]=e[r]);return a}function G(t){const e=U(t);for(const a in t)if(y(t[a])){e["x"===a||"y"===a?"attr"+a.toUpperCase():a]=t[a]}return e}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 Q=t=>Array.isArray(t),_=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),tt=t=>Q(t)?t[t.length-1]||0:t;export{Q as A,z as B,tt as C,A as D,W as E,B as F,R as G,g as H,m as I,b as J,K,q as L,M,e as P,r as a,i as b,n as c,y as d,h as e,l as f,C as g,E as h,a as i,u as j,_ as k,f as l,s as m,N as n,U as o,$ as p,Y as q,J as r,G as s,T as t,Z as u,O as v,L as w,j as x,k as y,X as z};
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=t=>({isEnabled:e=>t.some(t=>!!e[t])}),l={measureLayout:c(["layout","layoutId","drag"]),animation:c(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:c(["exit"]),drag:c(["drag","dragControls"]),focus:c(["whileFocus"]),hover:c(["whileHover","onHoverStart","onHoverEnd"]),tap:c(["whileTap","onTap","onTapStart","onTapCancel"]),pan:c(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:c(["whileInView","onViewportEnter","onViewportLeave"])},d=["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 u(t){return"string"==typeof t&&!t.includes("-")&&!!(d.indexOf(t)>-1||/[A-Z]/.test(t))}const p={},g=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],m=new Set(g);function h(t,{layout:e,layoutId:a}){return m.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!p[t]||"opacity"===t)}const y=t=>!!(null==t?void 0:t.getVelocity),v={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w=(t,e)=>g.indexOf(t)-g.indexOf(e);function b(t){return t.startsWith("--")}const x=(t,e)=>e&&"number"==typeof t?e.transform(t):t,O=(t,e)=>a=>Math.max(Math.min(a,e),t),k=t=>t%1?Number(t.toFixed(5)):t,L=/(-)?([\d]*\.?[\d])+/g,j=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,T=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function X(t){return"string"==typeof t}const Y={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},$=Object.assign(Object.assign({},Y),{transform:O(0,1)}),B=Object.assign(Object.assign({},Y),{default:1}),A=t=>({test:e=>X(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),P=A("deg"),S=A("%"),W=A("px"),Z=A("vh"),R=A("vw"),C=Object.assign(Object.assign({},S),{parse:t=>S.parse(t)/100,transform:t=>S.transform(100*t)}),H={...Y,transform:Math.round},V={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:P,rotateX:P,rotateY:P,rotateZ:P,scale:B,scaleX:B,scaleY:B,scaleZ:B,skew:P,skewX:P,skewY:P,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:$,originX:C,originY:C,originZ:W,zIndex:H,fillOpacity:$,strokeOpacity:$,numOctaves:H};function z(t,e,a,r){const{style:n,vars:s,transform:o,transformKeys:i,transformOrigin:f}=t;i.length=0;let c=!1,l=!1,d=!0;for(const t in e){const a=e[t];if(b(t)){s[t]=a;continue}const r=V[t],u=x(a,r);if(m.has(t)){if(c=!0,o[t]=u,i.push(t),!d)continue;a!==(r.default||0)&&(d=!1)}else t.startsWith("origin")?(l=!0,f[t]=u):n[t]=u}if(e.transform||(c||r?n.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:a=!0,allowTransformNone:r=!0},n,s){let o="";e.sort(w);for(const a of e)o+=`${v[a]||a}(${t[a]}) `;return a&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,n?"":o):r&&n&&(o="none"),o}(t,a,d,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=f;n.transformOrigin=`${t} ${e} ${a}`}}function F(t,e,a){return"string"==typeof t?t:W.transform(e+a*t)}const I={offset:"stroke-dashoffset",array:"stroke-dasharray"},D={offset:"strokeDashoffset",array:"strokeDasharray"};function E(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(z(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`${F(e,t.x,t.width)} ${F(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?I:D;t[s.offset]=W.transform(-r);const o=W.transform(e),i=W.transform(a);t[s.array]=`${o} ${i}`}(u,s,o,i,!1)}const M=t=>"string"==typeof t&&"svg"===t.toLowerCase(),K=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function N(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 U(t,e,a,r){N(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(q.has(a)?a:K(a),e.attrs[a])}function G(t){const{style:e}=t,a={};for(const r in e)(y(e[r])||h(r,t))&&(a[r]=e[r]);return a}function J(t){const e=G(t);for(const a in t)if(y(t[a])){e["x"===a||"y"===a?"attr"+a.toUpperCase():a]=t[a]}return e}function Q(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 _=t=>Array.isArray(t),tt=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),et=t=>_(t)?t[t.length-1]||0:t;export{j as A,_ as B,V as C,et as D,W as E,P as F,R as G,Z as H,m as I,g as J,b as K,N as L,q as M,K as N,e as P,r as a,i as b,n as c,y as d,h as e,l as f,z as g,E as h,a as i,M as j,u as k,tt as l,f as m,s as n,U as o,G as p,X as q,Q as r,J as s,T as t,L as u,S as v,k as w,$ as x,Y as y,O as z};
@@ -1 +1 @@
1
- import*as t from"react";import n,{createContext as e,useContext as r,useLayoutEffect as o,useEffect as a,useRef as s,useCallback as i,useMemo as u,forwardRef as c,createElement as l}from"react";import{i as d,P as m,M as f,a as p,b as y,c as g,f as v,u as h,g as S,S as E,L as w,d as C,e as V,h as A,j as b,k as M,r as P,l as T,m as j,n as x,s as D,o as L,p as B}from"./size-rollup-dom-max-assets.js";const F=e({});const I=d?o:a,O=e({strict:!1});function k(t,n,e,o){const i=r(F).visualElement,u=r(O),c=r(m),l=r(f).reducedMotion,d=s();o=o||u.renderer,!d.current&&o&&(d.current=o(t,{visualState:n,parent:i,props:e,presenceId:c?c.id:void 0,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:l}));const p=d.current;return I(()=>{p&&p.render()}),a(()=>{p&&p.animationState&&p.animationState.animateChanges()}),I(()=>()=>p&&p.notify("Unmount"),[]),p}function H(t){const{initial:n,animate:e}=function(t,n){if(y(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,r(F));return u(()=>({initial:n,animate:e}),[R(n),R(e)])}function R(t){return Array.isArray(t)?t.join(" "):t}let U=1;class N extends n.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const K=Symbol.for("motionComponentSymbol");function W({preloadedFeatures:n,createVisualElement:e,projectionNodeConstructor:o,useRender:a,useVisualState:s,Component:u}){n&&function(t){for(const n in t)"projectionNodeConstructor"===n?v.projectionNodeConstructor=t[n]:v[n].Component=t[n]}(n);const l=c((function(c,l){const m={...r(f),...c,layoutId:_(c)},{isStatic:y}=m;let g=null;const w=H(c),C=y?void 0:h(()=>{if(S.hasEverUpdated)return U++}),V=s(c,y);if(!y&&d){w.visualElement=k(u,V,m,e);const t=r(O).strict,a=r(E);w.visualElement&&(g=w.visualElement.loadFeatures(m,t,n,C,o||v.projectionNodeConstructor,a))}return t.createElement(N,{visualElement:w.visualElement,props:m},g,t.createElement(F.Provider,{value:w},a(u,c,C,function(t,n,e){return i(r=>{r&&t.mount&&t.mount(r),n&&(r?n.mount(r):n.unmount()),e&&("function"==typeof e?e(r):p(e)&&(e.current=r))},[n])}(V,w.visualElement,l),V,y,w.visualElement)))}));return l[K]=u,l}function _({layoutId:t}){const n=r(w).id;return n&&void 0!==t?n+"-"+t:t}const q=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function z(t,n,e){for(const r in n)C(n[r])||V(r,e)||(t[r]=n[r])}function X(t,n,e){const r={};return z(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n,e){return u(()=>{const r={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return A(r,n,{enableHardwareAcceleration:!e},t),Object.assign({},r.vars,r.style)},[n])}(t,n,e)),t.transformValues?t.transformValues(r):r}function Y(t,n,e){const r={},o=X(t,n,e);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),r.style=o,r}const G=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function J(t){return G.has(t)}let Q=t=>!J(t);try{(Z=require("@emotion/is-prop-valid").default)&&(Q=t=>t.startsWith("on")?!J(t):Z(t))}catch(t){}var Z;const $=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}});function tt(t,n){const e=u(()=>{const e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return b(e,n,{enableHardwareAcceleration:!1},t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const n={};z(n,t.style,t),e.style={...n,...e.style}}return e}function nt(t=!1){return(n,e,r,o,{latestValues:a},s)=>{const i=(M(n)?tt:Y)(e,a,s),u={...function(t,n,e){const r={};for(const o in t)(Q(o)||!0===e&&J(o)||!n&&!J(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}(e,"string"==typeof n,t),...i,ref:o};return r&&(u["data-projection-id"]=r),l(n,u)}}const et=t=>(n,e)=>{const o=r(F),a=r(m),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:n,onMount:e},r,o,a){const s={latestValues:rt(r,o,a,t),renderState:n()};return e&&(s.mount=t=>e(r,t,s)),s}(t,n,o,a);return e?s():h(s)};function rt(t,n,e,r){const o={},a=r(t);for(const t in a)o[t]=P(a[t]);let{initial:s,animate:i}=t;const u=y(t),c=T(t);n&&c&&!u&&!1!==t.inherit&&(void 0===s&&(s=n.initial),void 0===i&&(i=n.animate));let l=!!e&&!1===e.initial;l=l||!1===s;const d=l?i:s;if(d&&"boolean"!=typeof d&&!j(d)){(Array.isArray(d)?d:[d]).forEach(n=>{const e=x(t,n);if(!e)return;const{transitionEnd:r,transition:a,...s}=e;for(const t in s){let n=s[t];if(Array.isArray(n)){n=n[l?n.length-1:0]}null!==n&&(o[t]=n)}for(const t in r)o[t]=r[t]})}return o}const ot={useVisualState:et({scrapeMotionValuesFromProps:D,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}}b(e,r,{enableHardwareAcceleration:!1},t.transformTemplate),L(n,e)}})},at={useVisualState:et({scrapeMotionValuesFromProps:B,createRenderState:q})};const st=function(t){function n(n,e={}){return W(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,o){return{...M(t)?ot:at,preloadedFeatures:e,useRender:nt(n),createVisualElement:r,projectionNodeConstructor:o,Component:t}}));export{st as m};
1
+ import*as t from"react";import n,{createContext as e,useContext as r,useLayoutEffect as o,useEffect as a,useRef as s,useCallback as i,useMemo as u,forwardRef as c,createElement as l}from"react";import{i as m,P as d,M as f,a as p,b as g,c as y,f as v,u as h,g as S,S as E,L as w,d as C,e as V,h as A,j as b,k as M,l as P,r as T,m as j,n as x,o as D,s as L,p as B,q as F}from"./size-rollup-dom-max-assets.js";const I=e({});const O=m?o:a,k=e({strict:!1});function H(t,n,e,o){const i=r(I).visualElement,u=r(k),c=r(d),l=r(f).reducedMotion,m=s();o=o||u.renderer,!m.current&&o&&(m.current=o(t,{visualState:n,parent:i,props:e,presenceId:c?c.id:void 0,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:l}));const p=m.current;return O(()=>{p&&p.render()}),a(()=>{p&&p.animationState&&p.animationState.animateChanges()}),O(()=>()=>p&&p.notify("Unmount"),[]),p}function N(t){const{initial:n,animate:e}=function(t,n){if(g(t)){const{initial:n,animate:e}=t;return{initial:!1===n||y(n)?n:void 0,animate:y(e)?e:void 0}}return!1!==t.inherit?n:{}}(t,r(I));return u(()=>({initial:n,animate:e}),[R(n),R(e)])}function R(t){return Array.isArray(t)?t.join(" "):t}let U=1;class K extends n.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const W=Symbol.for("motionComponentSymbol");function q({preloadedFeatures:n,createVisualElement:e,projectionNodeConstructor:o,useRender:a,useVisualState:s,Component:u}){n&&function(t){for(const n in t)"projectionNodeConstructor"===n?v.projectionNodeConstructor=t[n]:v[n].Component=t[n]}(n);const l=c((function(c,l){const d={...r(f),...c,layoutId:_(c)},{isStatic:g}=d;let y=null;const w=N(c),C=g?void 0:h(()=>{if(S.hasEverUpdated)return U++}),V=s(c,g);if(!g&&m){w.visualElement=H(u,V,d,e);const t=r(k).strict,a=r(E);w.visualElement&&(y=w.visualElement.loadFeatures(d,t,n,C,o||v.projectionNodeConstructor,a))}return t.createElement(K,{visualElement:w.visualElement,props:d},y,t.createElement(I.Provider,{value:w},a(u,c,C,function(t,n,e){return i(r=>{r&&t.mount&&t.mount(r),n&&(r?n.mount(r):n.unmount()),e&&("function"==typeof e?e(r):p(e)&&(e.current=r))},[n])}(V,w.visualElement,l),V,g,w.visualElement)))}));return l[W]=u,l}function _({layoutId:t}){const n=r(w).id;return n&&void 0!==t?n+"-"+t:t}const z=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function X(t,n,e){for(const r in n)C(n[r])||V(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:{},transformKeys:[],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={},o=Y(t,n,e);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),r.style=o,r}const J=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function Q(t){return J.has(t)}let Z=t=>!Q(t);try{($=require("@emotion/is-prop-valid").default)&&(Z=t=>t.startsWith("on")?!Q(t):$(t))}catch(t){}var $;const tt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}});function nt(t,n,e,r){const o=u(()=>{const e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return b(e,n,{enableHardwareAcceleration:!1},M(r),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const n={};X(n,t.style,t),o.style={...n,...o.style}}return o}function et(t=!1){return(n,e,r,o,{latestValues:a},s)=>{const i=(P(n)?nt:G)(e,a,s,n),u={...function(t,n,e){const r={};for(const o in t)(Z(o)||!0===e&&Q(o)||!n&&!Q(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}(e,"string"==typeof n,t),...i,ref:o};return r&&(u["data-projection-id"]=r),l(n,u)}}const rt=t=>(n,e)=>{const o=r(I),a=r(d),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:n,onMount:e},r,o,a){const s={latestValues:ot(r,o,a,t),renderState:n()};return e&&(s.mount=t=>e(r,t,s)),s}(t,n,o,a);return e?s():h(s)};function ot(t,n,e,r){const o={},a=r(t);for(const t in a)o[t]=T(a[t]);let{initial:s,animate:i}=t;const u=g(t),c=j(t);n&&c&&!u&&!1!==t.inherit&&(void 0===s&&(s=n.initial),void 0===i&&(i=n.animate));let l=!!e&&!1===e.initial;l=l||!1===s;const m=l?i:s;if(m&&"boolean"!=typeof m&&!x(m)){(Array.isArray(m)?m:[m]).forEach(n=>{const e=D(t,n);if(!e)return;const{transitionEnd:r,transition:a,...s}=e;for(const t in s){let n=s[t];if(Array.isArray(n)){n=n[l?n.length-1:0]}null!==n&&(o[t]=n)}for(const t in r)o[t]=r[t]})}return o}const at={useVisualState:rt({scrapeMotionValuesFromProps:L,createRenderState:tt,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}}b(e,r,{enableHardwareAcceleration:!1},M(n.tagName),t.transformTemplate),B(n,e)}})},st={useVisualState:rt({scrapeMotionValuesFromProps:F,createRenderState:z})};const it=function(t){function n(n,e={}){return q(t(n,e))}if("undefined"==typeof Proxy)return n;const e=new Map;return new Proxy(n,{get:(t,r)=>(e.has(r)||e.set(r,n(r)),e.get(r))})}((function(t,{forwardMotionProps:n=!1},e,r,o){return{...P(t)?at:st,preloadedFeatures:e,useRender:et(n),createVisualElement:r,projectionNodeConstructor:o,Component:t}}));export{it as m};
@@ -1 +1 @@
1
- import{useContext as t,useId as e,useEffect as n,useRef as r,createElement as o}from"react";import{p as s,q as i,t as a,u,v as l,w as c,x as p,y as d,z as h,P as f,A as m,B as v,C as g,D as y,E as b,F as w,G as V,r as A,d as M,H as S,m as C,c as x,i as E,I as T,f as P,b as F,l as I,a as k,J as O,g as D,o as N,K as R,L as U,M as B,s as j,h as z,n as L,j as q}from"./size-rollup-dom-animation-assets.js";const H=(t,e)=>n=>Boolean(s(n)&&i.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),W=(t,e,n)=>r=>{if(!s(r))return r;const[o,i,u,l]=r.match(a);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(u),alpha:void 0!==l?parseFloat(l):1}},$={test:H("hsl","hue"),parse:W("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+u.transform(l(e))+", "+u.transform(l(n))+", "+l(c.transform(r))+")"},K=d(0,255),Y=Object.assign(Object.assign({},p),{transform:t=>Math.round(K(t))}),X={test:H("rgb","red"),parse:W("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Y.transform(t)+", "+Y.transform(e)+", "+Y.transform(n)+", "+l(c.transform(r))+")"};const Z={test:H("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:X.transform},J={test:t=>X.test(t)||Z.test(t)||$.test(t),parse:t=>X.test(t)?X.parse(t):$.test(t)?$.parse(t):Z.parse(t),transform:t=>s(t)?t:t.hasOwnProperty("red")?X.transform(t):$.transform(t)};function G(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(h);r&&(n=r.length,t=t.replace(h,"${c}"),e.push(...r.map(J.parse)));const o=t.match(a);return o&&(t=t.replace(a,"${n}"),e.push(...o.map(p.parse))),{values:e,numColors:n,tokenised:t}}function _(t){return G(t).values}function Q(t){const{values:e,numColors:n,tokenised:r}=G(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?J.transform(t[r]):l(t[r]));return e}}const tt=t=>"number"==typeof t?0:t;const et={test:function(t){var e,n,r,o;return isNaN(t)&&s(t)&&(null!==(n=null===(e=t.match(a))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(h))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:_,createTransformer:Q,getAnimatableNone:function(t){const e=_(t);return Q(t)(e.map(tt))}},nt=new Set(["brightness","contrast","saturate","opacity"]);function rt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(a)||[];if(!r)return t;const o=n.replace(r,"");let s=nt.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+o+")"}const ot=/([a-z-]*)\(.*?\)/g,st=Object.assign(Object.assign({},et),{getAnimatableNone:t=>{const e=t.match(ot);return e?e.map(rt).join(" "):t}});function it(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const at=t=>1e3*t;const ut=t=>t,lt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ct(t,e,n,r){if(t===e&&n===r)return ut;const o=e=>function(t,e,n,r,o){let s,i,a=0;do{i=e+(n-e)/2,s=lt(i,r,o)-t,s>0?n=i:e=i}while(Math.abs(s)>1e-7&&++a<12);return i}(e,0,1,t,n);return t=>0===t||1===t?t:lt(o(t),e,r)}const pt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,dt=t=>e=>1-t(1-e),ht=t=>t*t,ft=dt(ht),mt=pt(ht),vt=t=>1-Math.sin(Math.acos(t)),gt=dt(vt),yt=pt(gt),bt=(t=1.525)=>e=>e*e*((t+1)*e-t),wt=bt(),Vt=dt(wt),At=pt(wt),Mt=(t=>{const e=bt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(),St={linear:ut,easeIn:ht,easeInOut:mt,easeOut:ft,circIn:vt,circInOut:yt,circOut:gt,backIn:wt,backInOut:At,backOut:Vt,anticipate:Mt},Ct=t=>{if(Array.isArray(t)){t.length;const[e,n,r,o]=t;return ct(e,n,r,o)}return"string"==typeof t?St[t]:t},xt=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!et.test(e)||e.startsWith("url("))),Et=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Tt=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),Pt=()=>({type:"keyframes",ease:"linear",duration:.3}),Ft=t=>({type:"keyframes",duration:.8,values:t}),It={x:Et,y:Et,z:Et,rotate:Et,rotateX:Et,rotateY:Et,rotateZ:Et,scaleX:Tt,scaleY:Tt,scale:Tt,opacity:Pt,backgroundColor:Pt,color:Pt,default:Tt},kt=(t,e)=>{let n;return n=m(e)?Ft:It[t]||It.default,{to:e,...n(e)}},Ot={...v,color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,filter:st,WebkitFilter:st},Dt=t=>Ot[t];function Nt(t,e){var n;let r=Dt(t);return r!==st&&(r=et),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}const Rt=!1,Ut="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Bt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Ut()),1/60*1e3);let jt=!0,zt=!1,Lt=!1;const qt={delta:0,timestamp:0},Ht=["read","update","preRender","render","postRender"],Wt=Ht.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const u=a&&o,l=u?e:n;return s&&i.add(t),-1===l.indexOf(t)&&(l.push(t),u&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),i.delete(t)},process:u=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(u),i.has(r)&&(a.schedule(r),t())}o=!1,s&&(s=!1,a.process(u))}}};return a}(()=>zt=!0),t),{}),$t=Ht.reduce((t,e)=>{const n=Wt[e];return t[e]=(t,e=!1,r=!1)=>(zt||Zt(),n.schedule(t,e,r)),t},{}),Kt=Ht.reduce((t,e)=>(t[e]=Wt[e].cancel,t),{});Ht.reduce((t,e)=>(t[e]=()=>Wt[e].process(qt),t),{});const Yt=t=>Wt[t].process(qt),Xt=t=>{zt=!1,qt.delta=jt?1/60*1e3:Math.max(Math.min(t-qt.timestamp,40),1),qt.timestamp=t,Lt=!0,Ht.forEach(Yt),Lt=!1,zt&&(jt=!1,Bt(Xt))},Zt=()=>{zt=!0,jt=!0,Lt||Bt(Xt)},Jt=()=>qt;const Gt=(t,e,n)=>Math.min(Math.max(n,t),e),_t=(t,e,n)=>-n*t+n*e+t;function Qt(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 te=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},ee=[Z,X,$];function ne(t){const e=(n=t,ee.find(t=>t.test(n)));var n;let r=e.parse(t);return e===$&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,s=0,i=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;o=Qt(a,r,t+1/3),s=Qt(a,r,t),i=Qt(a,r,t-1/3)}else o=s=i=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*i),alpha:r}}(r)),r}const re=(t,e)=>{const n=ne(t),r=ne(e),o={...n};return t=>(o.red=te(n.red,r.red,t),o.green=te(n.green,r.green,t),o.blue=te(n.blue,r.blue,t),o.alpha=_t(n.alpha,r.alpha,t),X.transform(o))},oe=(t,e)=>n=>e(t(n)),se=(...t)=>t.reduce(oe);function ie(t,e){return"number"==typeof t?n=>_t(t,e,n):J.test(t)?re(t,e):ce(t,e)}const ae=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>ie(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},ue=(t,e)=>{const n={...t,...e},r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=ie(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function le(t){const e=et.parse(t),n=e.length;let r=0,o=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:o++;return{parsed:e,numNumbers:r,numColors:o}}const ce=(t,e)=>{const n=et.createTransformer(e),r=le(t),o=le(e);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?se(ae(r.parsed,o.parsed),n):n=>""+(n>0?e:t)},pe=(t,e)=>n=>_t(t,e,n);function de(t,e,n){const r=[],o=n||("number"==typeof(s=t[0])?pe:"string"==typeof s?J.test(s)?re:ce:Array.isArray(s)?ae:"object"==typeof s?ue:pe);var s;const i=t.length-1;for(let n=0;n<i;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=se(t,s)}r.push(s)}return r}function he(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const s=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const i=de(e,r,o),a=i.length,u=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=((t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r})(t[n],t[n+1],e);return i[n](r)};return n?e=>u(Gt(t[0],t[s-1],e)):u}function fe(t,e){return t.map(()=>e||mt).splice(0,t.length-1)}function me({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,s,i=1-e;i=Gt(.05,1,i),t=Gt(.01,10,t/1e3),i<1?(o=e=>{const r=e*i,o=r*t;return.001-(r-n)/ve(e,i)*Math.exp(-o)},s=e=>{const r=e*i*t,s=r*n+n,a=Math.pow(i,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=ve(Math.pow(e,2),i);return(.001-o(e)>0?-1:1)*((s-a)*u)/l}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*i*Math.sqrt(r*e),duration:t}}}function ve(t,e){return t*Math.sqrt(1-e*e)}const ge=["duration","bounce"],ye=["stiffness","damping","mass"];function be(t,e){return e.some(e=>void 0!==t[e])}function we({from:t=0,to:e=1,restSpeed:n=2,restDelta:r=.01,...o}){const s={done:!1,value:t};let{stiffness:i,damping:a,mass:u,velocity:l,duration:c,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!be(t,ye)&&be(t,ge)){const n=me(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(o),d=Ve,h=Ve;function f(){const n=l?-l/1e3:0,o=e-t,s=a/(2*Math.sqrt(i*u)),c=Math.sqrt(i/u)/1e3;if(void 0===r&&(r=Math.min(Math.abs(e-t)/100,.4)),s<1){const t=ve(c,s);d=r=>{const i=Math.exp(-s*c*r);return e-i*((n+s*c*o)/t*Math.sin(t*r)+o*Math.cos(t*r))},h=e=>{const r=Math.exp(-s*c*e);return s*c*r*(Math.sin(t*e)*(n+s*c*o)/t+o*Math.cos(t*e))-r*(Math.cos(t*e)*(n+s*c*o)-t*o*Math.sin(t*e))}}else if(1===s)d=t=>e-Math.exp(-c*t)*(o+(n+c*o)*t);else{const t=c*Math.sqrt(s*s-1);d=r=>{const i=Math.exp(-s*c*r),a=Math.min(t*r,300);return e-i*((n+s*c*o)*Math.sinh(a)+t*o*Math.cosh(a))/t}}}return f(),{next:t=>{const o=d(t);if(p)s.done=t>=c;else{const i=1e3*h(t),a=Math.abs(i)<=n,u=Math.abs(e-o)<=r;s.done=a&&u}return s.value=s.done?e:o,s},flipTarget:()=>{l=-l,[t,e]=[e,t],f()}}}we.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const Ve=t=>0;const Ae={decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:s}){const i={done:!1,value:e};let a=n*t;const u=e+a,l=void 0===s?u:s(u);return l!==u&&(a=l-e),{next:t=>{const e=-a*Math.exp(-t/r);return i.done=!(e>o||e<-o),i.value=i.done?l:l+e,i},flipTarget:()=>{}}},keyframes:function({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const s={done:!1,value:t},i=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(r&&r.length===i.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(i),o);function u(){return he(a,i,{ease:Array.isArray(n)?n:fe(i,n)})}let l=u();return{next:t=>(s.value=l(t),s.done=t>=o,s),flipTarget:()=>{i.reverse(),l=u()}}},spring:we};function Me(t,e,n=0){return t-e-n}const Se=t=>{const e=({delta:e})=>t(e);return{start:()=>$t.update(e,!0),stop:()=>Kt.update(e)}};function Ce({from:t,autoplay:e=!0,driver:n=Se,elapsed:r=0,repeat:o=0,repeatType:s="loop",repeatDelay:i=0,onPlay:a,onStop:u,onComplete:l,onRepeat:c,onUpdate:p,type:d="keyframes",...h}){var f,m;let v,g,y,{to:b}=h,w=0,V=h.duration,A=!1,M=!0;const S=Ae[Array.isArray(b)?"keyframes":d];(null===(m=(f=S).needsInterpolation)||void 0===m?void 0:m.call(f,t,b))&&(y=he([0,100],[t,b],{clamp:!1}),t=0,b=100);const C=S({...h,from:t,to:b});function x(){w++,"reverse"===s?(M=w%2==0,r=function(t,e=0,n=0,r=!0){return r?Me(e+-t,e,n):e-(t-e)+n}(r,V,i,M)):(r=Me(r,V,i),"mirror"===s&&C.flipTarget()),A=!1,c&&c()}function E(t){if(M||(t=-t),r+=t,!A){const t=C.next(Math.max(0,r));g=t.value,y&&(g=y(g)),A=M?t.done:r<=0}null==p||p(g),A&&(0===w&&(null!=V||(V=r)),w<o?function(t,e,n,r){return r?t>=e+n:t<=-n}(r,V,i,M)&&x():(v.stop(),l&&l()))}return e&&(null==a||a(),v=n(E),v.start()),{stop:()=>{null==u||u(),v.stop()}}}function xe(t,e){return e?t*(1e3/e):0}function Ee({ease:t,times:e,yoyo:n,flip:r,loop:o,...s}){const i={...s};return e&&(i.offset=e),s.duration&&(i.duration=at(s.duration)),s.repeatDelay&&(i.repeatDelay=at(s.repeatDelay)),t&&(i.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(Ct):Ct(t)),"tween"===s.type&&(i.type="keyframes"),(n||o||r)&&(n?i.repeatType="reverse":o?i.repeatType="loop":r&&(i.repeatType="mirror"),i.repeat=o||n||r||s.repeat),"spring"!==s.type&&(i.type="keyframes"),i}function Te(t,e,n){return Array.isArray(e.to)&&void 0===t.duration&&(t.duration=.8),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:u,...l}){return!!Object.keys(l).length}(t)||(t={...t,...kt(n,e.to)}),{...e,...Ee(t)}}function Pe(t,e,n,r,o){const s=ke(r,t)||{};let i=void 0!==s.from?s.from:e.get();const a=xt(t,n);"none"===i&&a&&"string"==typeof n?i=Nt(t,n):Fe(i)&&"string"==typeof n?i=Ie(n):!Array.isArray(n)&&Fe(n)&&"string"==typeof i&&(n=Ie(i));return xt(t,i)&&a&&!1!==s.type?function(){const r={from:i,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:t=>e.set(t)};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:s=750,bounceStiffness:i=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:p,onComplete:d,onStop:h}){let f;function m(t){return void 0!==n&&t<n||void 0!==r&&t>r}function v(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function g(t){null==f||f.stop(),f=Ce({...t,driver:c,onUpdate:e=>{var n;null==p||p(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:h})}function y(t){g({type:"spring",stiffness:i,damping:a,restDelta:u,...t})}if(m(t))y({from:t,velocity:e,to:v(t)});else{let r=o*e+t;void 0!==l&&(r=l(r));const i=v(r),a=i===n?-1:1;let c,p;const d=t=>{c=p,p=t,e=xe(t-c,Jt().delta),(1===a&&t>i||-1===a&&t<i)&&y({from:t,to:i,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:u,modifyTarget:l,onUpdate:m(r)?d:void 0})}return{stop:()=>null==f?void 0:f.stop()}}({...r,...s}):Ce({...Te(s,r,t),onUpdate:t=>{r.onUpdate(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{r.onComplete(),s.onComplete&&s.onComplete()}})}:function(){const t=g(n);return e.set(t),o(),s.onUpdate&&s.onUpdate(t),s.onComplete&&s.onComplete(),{stop:()=>{}}}}function Fe(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Ie(t){return"number"==typeof t?0:Nt("",t)}function ke(t,e){return t[e]||t.default||t}function Oe(t,e,n,r={}){return Rt&&(r={type:!1}),e.start(o=>{let s;const i=Pe(t,e,n,r,o),a=function(t,e){var n,r;return null!==(r=null!==(n=(ke(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),u=()=>s=i();let l;return a?l=function(t,e){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=e&&(Kt.read(r),t(s-e))};return $t.read(r,!0),()=>Kt.read(r)}(u,at(a)):u(),()=>{l&&l(),s&&s.stop()}})}const De=t=>/^0[^.\s]+$/.test(t);class Ne{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Re{constructor(t){var e;this.version="7.6.18",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ne,this.velocityUpdateSubscribers=new Ne,this.renderSubscribers=new Ne,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:r}=Jt();this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,$t.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>$t.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?xe(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Ue(t){return new Re(t)}const Be=t=>e=>e.test(t),je=[p,y,u,b,w,V,{test:t=>"auto"===t,parse:t=>t}],ze=t=>je.find(Be(t)),Le=[...je,J,et],qe=t=>Le.find(Be(t));function He(t,e,n){const r=t.getProps();return A(r,e,void 0!==n?n:r.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 We(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ue(n))}function $e(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ke(t){return Boolean(M(t)&&t.add)}function Ye(t,e,n={}){var r;const o=He(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Xe(t,o,n):()=>Promise.resolve(),a=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:a}=s;return function(t,e,n=0,r=0,o=1,s){const i=[],a=(t.variantChildren.size-1)*r,u=1===o?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(Ze).forEach((t,r)=>{i.push(Ye(t,e,{...s,delay:n+u(r)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(i)}(t,e,o+r,i,a,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[t,e]="beforeChildren"===u?[i,a]:[a,i];return t().then(e)}return Promise.all([i(),a(n.delay)])}function Xe(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=t.getDefaultTransition(),transitionEnd:a,...u}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(i=r);const c=[],p=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in u){const r=t.getValue(e),o=u[e];if(!r||void 0===o||p&&Je(p,e))continue;let s={delay:n,...i};t.shouldReduceMotion&&S.has(e)&&(s={...s,type:!1,delay:0});let a=Oe(e,r,o,s);Ke(l)&&(l.add(e),a=a.then(()=>l.remove(e))),c.push(a)}return Promise.all(c).then(()=>{a&&function(t,e){const n=He(t,e);let{transitionEnd:r={},transition:o={},...s}=n?t.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const e in s){We(t,e,g(s[e]))}}(t,a)})}function Ze(t,e){return t.sortNodePosition(e)}function Je({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}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 _e=[Ge.Animate,Ge.InView,Ge.Focus,Ge.Hover,Ge.Tap,Ge.Drag,Ge.Exit],Qe=[..._e].reverse(),tn=_e.length;function en(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Ye(t,e,n));r=Promise.all(o)}else if("string"==typeof e)r=Ye(t,e,n);else{const o="function"==typeof e?He(t,e,n.custom):e;r=Xe(t,o,n)}return r.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function nn(t){let e=en(t);const n={[Ge.Animate]:on(!0),[Ge.InView]:on(),[Ge.Hover]:on(),[Ge.Tap]:on(),[Ge.Drag]:on(),[Ge.Focus]:on(),[Ge.Exit]:on()};let r=!0;const o=(e,n)=>{const r=He(t,n);if(r){const{transition:t,transitionEnd:n,...o}=r;e={...e,...o,...n}}return e};function s(s,i){var a;const u=t.getProps(),l=t.getVariantContext(!0)||{},c=[],p=new Set;let d={},h=1/0;for(let e=0;e<tn;e++){const f=Qe[e],v=n[f],g=null!==(a=u[f])&&void 0!==a?a:l[f],y=x(g),b=f===i?v.isActive:null;!1===b&&(h=e);let w=g===l[f]&&g!==u[f]&&y;if(w&&r&&t.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...d},!v.isActive&&null===b||!g&&!v.prevProp||C(g)||"boolean"==typeof g)continue;const V=rn(v.prevProp,g);let A=V||f===i&&v.isActive&&!w&&y||e>h&&y;const M=Array.isArray(g)?g:[g];let S=M.reduce(o,{});!1===b&&(S={});const{prevResolvedValues:E={}}=v,T={...E,...S},P=t=>{A=!0,p.delete(t),v.needsAnimating[t]=!0};for(const t in T){const e=S[t],n=E[t];d.hasOwnProperty(t)||(e!==n?m(e)&&m(n)?!it(e,n)||V?P(t):v.protectedKeys[t]=!0:void 0!==e?P(t):p.add(t):void 0!==e&&p.has(t)?P(t):v.protectedKeys[t]=!0)}v.prevProp=g,v.prevResolvedValues=S,v.isActive&&(d={...d,...S}),r&&t.blockInitialAnimation&&(A=!1),A&&!w&&c.push(...M.map(t=>({animation:t,options:{type:f,...s}})))}if(p.size){const e={};p.forEach(n=>{const r=t.getBaseTarget(n);void 0!==r&&(e[n]=r)}),c.push({animation:e})}let f=Boolean(c.length);return r&&!1===u.initial&&!t.manuallyAnimateOnMount&&(f=!1),r=!1,f?e(c):Promise.resolve()}return{animateChanges:s,setActive:function(e,r,o){var i;if(n[e].isActive===r)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)}),n[e].isActive=r;const a=s(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function rn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!it(e,t)}function on(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const sn=t=>e=>(t(e),null),an={animation:sn(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=nn(t)),C(e)&&n(()=>e.subscribe(t),[e])}),exit:sn(r=>{const{custom:o,visualElement:s}=r,[i,a]=function(){const r=t(f);if(null===r)return[!0,null];const{isPresent:o,onExitComplete:s,register:i}=r,a=e();return n(()=>i(a),[]),!o&&s?[!1,()=>s&&s(a)]:[!0]}(),u=t(f);n(()=>{s.isPresent=i;const t=s.animationState&&s.animationState.setActive(Ge.Exit,!i,{custom:u&&u.custom||o});t&&!i&&t.then(a)},[i])})};function un(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function ln(t,e,r,o){n(()=>{const n=t.current;if(r&&n)return un(n,e,r,o)},[t,e,r,o])}function cn(t){return!!t.touches}const pn={pageX:0,pageY:0};function dn(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||pn;return{x:n[e+"X"],y:n[e+"Y"]}}function hn(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}const fn=(t,e=!1)=>{const n=e=>t(e,function(t,e="page"){return{point:cn(t)?dn(t,e):hn(t,e)}}(e));return e?(r=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&r(t)}):n;var r},mn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},vn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function gn(t){return E&&null===window.onpointerdown?t:E&&null===window.ontouchstart?vn[t]:E&&null===window.onmousedown?mn[t]:t}function yn(t,e,n,r){return un(t,gn(e),fn(n,"pointerdown"===e),r)}function bn(t,e,n,r){return ln(t,gn(e),n&&fn(n,"pointerdown"===e),r)}function wn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Vn=wn("dragHorizontal"),An=wn("dragVertical");function Mn(){const t=function(t){let e=!1;if("y"===t)e=An();else if("x"===t)e=Vn();else{const t=Vn(),n=An();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function Sn(t,e,n){return(r,o)=>{(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!Mn()&&(t.animationState&&t.animationState.setActive(Ge.Hover,e),n&&n(r,o))}}const Cn=(t,e)=>!!e&&(t===e||Cn(t,e.parentElement));const xn=("undefined"==typeof process||process.env,"production"),En=new Set;const Tn=new WeakMap,Pn=new WeakMap,Fn=t=>{const e=Tn.get(t.target);e&&e(t)},In=t=>{t.forEach(Fn)};function kn(t,e,n){const r=function({root:t,...e}){const n=t||document;Pn.has(n)||Pn.set(n,{});const r=Pn.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(In,{root:t,...e})),r[o]}(e);return Tn.set(t,n),r.observe(t),()=>{Tn.delete(t),r.unobserve(t)}}const On={some:0,all:1};function Dn(t,e,r,{root:o,margin:s,amount:i="some",once:a}){n(()=>{if(!t||!r.current)return;const n={root:null==o?void 0:o.current,rootMargin:s,threshold:"number"==typeof i?i:On[i]};return kn(r.current,n,t=>{const{isIntersecting:n}=t;if(e.isInView===n)return;if(e.isInView=n,a&&!n&&e.hasEnteredView)return;n&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Ge.InView,n);const o=r.getProps(),s=n?o.onViewportEnter:o.onViewportLeave;s&&s(t)})},[t,o,s,i])}function Nn(t,e,r,{fallback:o=!0}){n(()=>{var n,s;t&&o&&("production"!==xn&&(n="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||En.has(n)||(console.warn(n),s&&console.warn(s),En.add(n))),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:t}=r.getProps();t&&t(null),r.animationState&&r.animationState.setActive(Ge.InView,!0)}))},[t])}const Rn={inView:sn((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:o,viewport:s={}}){const i=r({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||o);s.once&&i.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?Nn:Dn)(a,i.current,t,s)})),tap:sn((function({onTap:t,onTapStart:e,onTapCancel:o,whileTap:s,visualElement:i}){const a=t||e||o||s,u=r(!1),l=r(null),c={passive:!(e||t||o||m)};function p(){l.current&&l.current(),l.current=null}function d(){return p(),u.current=!1,i.animationState&&i.animationState.setActive(Ge.Tap,!1),!Mn()}function h(e,n){d()&&(Cn(i.current,e.target)?t&&t(e,n):o&&o(e,n))}function f(t,e){d()&&o&&o(t,e)}function m(t,n){p(),u.current||(u.current=!0,l.current=se(yn(window,"pointerup",h,c),yn(window,"pointercancel",f,c)),i.animationState&&i.animationState.setActive(Ge.Tap,!0),e&&e(t,n))}var v;bn(i,"pointerdown",a?m:void 0,c),v=p,n(()=>()=>v(),[])})),focus:sn((function({whileFocus:t,visualElement:e}){const{animationState:n}=e;ln(e,"focus",t?()=>{n&&n.setActive(Ge.Focus,!0)}:void 0),ln(e,"blur",t?()=>{n&&n.setActive(Ge.Focus,!1)}:void 0)})),hover:sn((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:r}){bn(r,"pointerenter",t||n?Sn(r,!0,t):void 0,{passive:!t}),bn(r,"pointerleave",e||n?Sn(r,!1,e):void 0,{passive:!e})}))};function Un(t){return"string"==typeof t&&t.startsWith("var(--")}const Bn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function jn(t,e,n=1){const[r,o]=function(t){const e=Bn.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);return s?s.trim():Un(o)?jn(o,e,n+1):o}const zn=new Set(["width","height","top","left","right","bottom","x","y"]),Ln=t=>zn.has(t),qn=(t,e)=>{t.set(e,!1),t.set(e)},Hn=t=>t===p||t===y;var Wn;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Wn||(Wn={}));const $n=(t,e)=>parseFloat(t.split(", ")[e]),Kn=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return $n(o[1],e);{const e=r.match(/^matrix\((.+)\)$/);return e?$n(e[1],t):0}},Yn=new Set(["x","y","z"]),Xn=T.filter(t=>!Yn.has(t));const Zn={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:Kn(4,13),y:Kn(5,14)},Jn=(t,e,n={},r={})=>{e={...e},r={...r};const o=Object.keys(e).filter(Ln);let s=[],i=!1;const a=[];if(o.forEach(o=>{const u=t.getValue(o);if(!t.hasValue(o))return;let l=n[o],c=ze(l);const p=e[o];let d;if(m(p)){const t=p.length,e=null===p[0]?1:0;l=p[e],c=ze(l);for(let n=e;n<t;n++)d?ze(p[n]):d=ze(p[n])}else d=ze(p);if(c!==d)if(Hn(c)&&Hn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[o]=parseFloat(p):Array.isArray(p)&&d===y&&(e[o]=p.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===l||0===p)?0===l?u.set(d.transform(l)):e[o]=c.transform(p):(i||(s=function(t){const e=[];return Xn.forEach(n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),i=!0),a.push(o),r[o]=void 0!==r[o]?r[o]:e[o],qn(u,p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const r=e.measureViewportBox(),o=e.current,s=getComputedStyle(o),{display:i}=s,a={};"none"===i&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Zn[t](r,s)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const r=e.getValue(n);qn(r,a[n]),t[n]=Zn[n](u,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),E&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:e,transitionEnd:r}};function Gn(t,e,n,r){return(t=>Object.keys(t).some(Ln))(e)?Jn(t,e,n,r):{target:e,transitionEnd:r}}const _n=(t,e,n,r)=>{const o=function(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!Un(e))return;const n=jn(e,r);n&&t.set(n)});for(const t in e){const o=e[t];if(!Un(o))continue;const s=jn(o,r);s&&(e[t]=s,n&&void 0===n[t]&&(n[t]=o))}return{target:e,transitionEnd:n}}(t,e,r);return Gn(t,e=o.target,n,r=o.transitionEnd)},Qn={current:null},tr={current:!1};const er=Object.keys(P),nr=er.length,rr=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const or=["initial",..._e],sr=or.length;class ir extends class{constructor({parent:t,props:e,reducedMotionConfig:n,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,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=()=>$t.render(this.render,!1,!0);const{latestValues:s,renderState:i}=r;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=i,this.parent=t,this.props=e,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=F(e),this.isVariantNode=I(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:a,...u}=this.scrapeMotionValuesFromProps(e);for(const t in u){const e=u[t];void 0!==s[t]&&M(e)&&(e.set(s[t],!1),Ke(a)&&a.add(t))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var e;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(e=this.parent)||void 0===e?void 0:e.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),tr.current||function(){if(tr.current=!0,E)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qn.current=t.matches;t.addListener(e),e()}else Qn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Qn.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,e,n;null===(t=this.projection)||void 0===t||t.unmount(),Kt.update(this.notifyUpdate),Kt.render(this.render),this.valueSubscriptions.forEach(t=>t()),null===(e=this.removeFromVariantTree)||void 0===e||e.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const t in this.events)this.events[t].clear();this.current=null}bindToMotionValue(t,e){const n=S.has(t),r=e.onChange(e=>{this.latestValues[t]=e,this.props.onUpdate&&$t.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{r(),o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures(t,e,n,r,s,i){const a=[];for(let e=0;e<nr;e++){const n=er[e],{isEnabled:r,Component:s}=P[n];r(t)&&s&&a.push(o(s,{key:n,...t,visualElement:this}))}if(!this.projection&&s){this.projection=new s(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:o,dragConstraints:a,layoutScroll:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(o)||a&&k(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u})}return a}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)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let e=0;e<rr.length;e++){const n=rr[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=t["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(t,e,n){const{willChange:r}=e;for(const o in e){const s=e[o],i=n[o];if(M(s))t.addValue(o,s),Ke(r)&&r.add(o);else if(M(i))t.addValue(o,Ue(s)),Ke(r)&&r.remove(o);else if(i!==s)if(t.hasValue(o)){const e=t.getValue(o);!e.hasAnimated&&e.set(s)}else{const e=t.getStaticValue(o);t.addValue(o,Ue(void 0!==e?e:s))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var e;return null===(e=this.props.variants)||void 0===e?void 0:e[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:null===(t=this.parent)||void 0===t?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var e,n;if(t)return null===(e=this.parent)||void 0===e?void 0:e.getVariantContext();if(!this.isControllingVariants){const t=(null===(n=this.parent)||void 0===n?void 0:n.getVariantContext())||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const r={};for(let t=0;t<sr;t++){const e=or[t],n=this.props[e];(x(n)||!1===n)&&(r[e]=n)}return r}addVariantChild(t){var e;const n=this.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)}addValue(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.latestValues[t]=e.get(),this.bindToMotionValue(t,e)}removeValue(t){var e;this.values.delete(t),null===(e=this.valueSubscriptions.get(t))||void 0===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=Ue(e),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,r="string"==typeof n||"object"==typeof n?null===(e=A(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,t);return void 0===o||M(o)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new Ne),this.events[t].add(e)}notify(t,...e){var n;null===(n=this.events[t])||void 0===n||n.notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:r},o){let s=function(t,e,n){var r;const o={};for(const s in t){const t=$e(s,e);o[s]=void 0!==t?t:null===(r=n.getValue(s))||void 0===r?void 0:r.get()}return o}(n,t||{},this);if(r&&(e&&(e=r(e)),n&&(n=r(n)),s&&(s=r(s))),o){!function(t,e,n){var r,o;const s=Object.keys(e).filter(e=>!t.hasValue(e)),i=s.length;if(i)for(let a=0;a<i;a++){const i=s[a],u=e[i];let l=null;Array.isArray(u)&&(l=u[0]),null===l&&(l=null!==(o=null!==(r=n[i])&&void 0!==r?r:t.readValue(i))&&void 0!==o?o:e[i]),null!=l&&("string"==typeof l&&(/^\-?\d*\.?\d+$/.test(l)||De(l))?l=parseFloat(l):!qe(l)&&et.test(u)&&(l=Nt(i,u)),t.addValue(i,Ue(l)),void 0===n[i]&&(n[i]=l),null!==l&&t.setBaseTarget(i,l))}}(this,n,s);const t=_n(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class ar extends ir{readValueFromInstance(t,e){if(S.has(e)){const t=Dt(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),o=(O(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,r){D(t,e,n,r.transformTemplate)}scrapeMotionValuesFromProps(t){return N(t)}renderInstance(t,e,n,r){R(t,e,n,r)}}class ur extends ir{getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){var n;return S.has(e)?(null===(n=Dt(e))||void 0===n?void 0:n.default)||0:(e=U.has(e)?e:B(e),t.getAttribute(e))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t){return j(t)}build(t,e,n,r){z(t,e,n,r.transformTemplate)}renderInstance(t,e,n,r){L(t,e,n,r)}}const lr={renderer:(t,e)=>q(t)?new ur(e,{enableHardwareAcceleration:!1}):new ar(e,{enableHardwareAcceleration:!0}),...an,...Rn};export{lr as domAnimation};
1
+ import{useContext as t,useId as e,useEffect as n,useRef as r,createElement as o}from"react";import{q as s,t as i,u as a,v as u,w as l,x as c,y as p,z as d,A as h,P as f,B as m,C as v,D as g,E as y,F as b,G as V,H as w,r as A,d as S,I as M,n as C,c as x,i as E,J as T,f as P,b as F,m as I,a as k,K as O,g as N,p as D,L as R,M as U,N as B,s as j,h as z,o as L,j as q,k as H}from"./size-rollup-dom-animation-assets.js";const W=(t,e)=>n=>Boolean(s(n)&&i.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),$=(t,e,n)=>r=>{if(!s(r))return r;const[o,i,u,l]=r.match(a);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(u),alpha:void 0!==l?parseFloat(l):1}},K={test:W("hsl","hue"),parse:$("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+u.transform(l(e))+", "+u.transform(l(n))+", "+l(c.transform(r))+")"},Y=d(0,255),X=Object.assign(Object.assign({},p),{transform:t=>Math.round(Y(t))}),G={test:W("rgb","red"),parse:$("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+X.transform(t)+", "+X.transform(e)+", "+X.transform(n)+", "+l(c.transform(r))+")"};const Z={test:W("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:G.transform},J={test:t=>G.test(t)||Z.test(t)||K.test(t),parse:t=>G.test(t)?G.parse(t):K.test(t)?K.parse(t):Z.parse(t),transform:t=>s(t)?t:t.hasOwnProperty("red")?G.transform(t):K.transform(t)};function _(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(h);r&&(n=r.length,t=t.replace(h,"${c}"),e.push(...r.map(J.parse)));const o=t.match(a);return o&&(t=t.replace(a,"${n}"),e.push(...o.map(p.parse))),{values:e,numColors:n,tokenised:t}}function Q(t){return _(t).values}function tt(t){const{values:e,numColors:n,tokenised:r}=_(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?J.transform(t[r]):l(t[r]));return e}}const et=t=>"number"==typeof t?0:t;const nt={test:function(t){var e,n,r,o;return isNaN(t)&&s(t)&&(null!==(n=null===(e=t.match(a))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(h))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:Q,createTransformer:tt,getAnimatableNone:function(t){const e=Q(t);return tt(t)(e.map(et))}},rt=new Set(["brightness","contrast","saturate","opacity"]);function ot(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(a)||[];if(!r)return t;const o=n.replace(r,"");let s=rt.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+o+")"}const st=/([a-z-]*)\(.*?\)/g,it=Object.assign(Object.assign({},nt),{getAnimatableNone:t=>{const e=t.match(st);return e?e.map(ot).join(" "):t}});function at(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const ut=t=>1e3*t;const lt=t=>t,ct=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function pt(t,e,n,r){if(t===e&&n===r)return lt;const o=e=>function(t,e,n,r,o){let s,i,a=0;do{i=e+(n-e)/2,s=ct(i,r,o)-t,s>0?n=i:e=i}while(Math.abs(s)>1e-7&&++a<12);return i}(e,0,1,t,n);return t=>0===t||1===t?t:ct(o(t),e,r)}const dt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ht=t=>e=>1-t(1-e),ft=t=>t*t,mt=ht(ft),vt=dt(ft),gt=t=>1-Math.sin(Math.acos(t)),yt=ht(gt),bt=dt(yt),Vt=(t=1.525)=>e=>e*e*((t+1)*e-t),wt=Vt(),At=ht(wt),St=dt(wt),Mt=(t=>{const e=Vt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(),Ct={linear:lt,easeIn:ft,easeInOut:vt,easeOut:mt,circIn:gt,circInOut:bt,circOut:yt,backIn:wt,backInOut:St,backOut:At,anticipate:Mt},xt=t=>{if(Array.isArray(t)){t.length;const[e,n,r,o]=t;return pt(e,n,r,o)}return"string"==typeof t?Ct[t]:t},Et=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!nt.test(e)||e.startsWith("url("))),Tt=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Pt=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),Ft=()=>({type:"keyframes",ease:"linear",duration:.3}),It=t=>({type:"keyframes",duration:.8,values:t}),kt={x:Tt,y:Tt,z:Tt,rotate:Tt,rotateX:Tt,rotateY:Tt,rotateZ:Tt,scaleX:Pt,scaleY:Pt,scale:Pt,opacity:Ft,backgroundColor:Ft,color:Ft,default:Pt},Ot=(t,e)=>{let n;return n=m(e)?It:kt[t]||kt.default,{to:e,...n(e)}},Nt={...v,color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,filter:it,WebkitFilter:it},Dt=t=>Nt[t];function Rt(t,e){var n;let r=Dt(t);return r!==it&&(r=nt),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}const Ut=!1,Bt="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),jt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Bt()),1/60*1e3);let zt=!0,Lt=!1,qt=!1;const Ht={delta:0,timestamp:0},Wt=["read","update","preRender","render","postRender"],$t=Wt.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const u=a&&o,l=u?e:n;return s&&i.add(t),-1===l.indexOf(t)&&(l.push(t),u&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),i.delete(t)},process:u=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(u),i.has(r)&&(a.schedule(r),t())}o=!1,s&&(s=!1,a.process(u))}}};return a}(()=>Lt=!0),t),{}),Kt=Wt.reduce((t,e)=>{const n=$t[e];return t[e]=(t,e=!1,r=!1)=>(Lt||Zt(),n.schedule(t,e,r)),t},{}),Yt=Wt.reduce((t,e)=>(t[e]=$t[e].cancel,t),{});Wt.reduce((t,e)=>(t[e]=()=>$t[e].process(Ht),t),{});const Xt=t=>$t[t].process(Ht),Gt=t=>{Lt=!1,Ht.delta=zt?1/60*1e3:Math.max(Math.min(t-Ht.timestamp,40),1),Ht.timestamp=t,qt=!0,Wt.forEach(Xt),qt=!1,Lt&&(zt=!1,jt(Gt))},Zt=()=>{Lt=!0,zt=!0,qt||jt(Gt)},Jt=()=>Ht;const _t=(t,e,n)=>Math.min(Math.max(n,t),e),Qt=(t,e,n)=>-n*t+n*e+t;function te(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 ee=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},ne=[Z,G,K];function re(t){const e=(n=t,ne.find(t=>t.test(n)));var n;let r=e.parse(t);return e===K&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,s=0,i=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;o=te(a,r,t+1/3),s=te(a,r,t),i=te(a,r,t-1/3)}else o=s=i=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*i),alpha:r}}(r)),r}const oe=(t,e)=>{const n=re(t),r=re(e),o={...n};return t=>(o.red=ee(n.red,r.red,t),o.green=ee(n.green,r.green,t),o.blue=ee(n.blue,r.blue,t),o.alpha=Qt(n.alpha,r.alpha,t),G.transform(o))},se=(t,e)=>n=>e(t(n)),ie=(...t)=>t.reduce(se);function ae(t,e){return"number"==typeof t?n=>Qt(t,e,n):J.test(t)?oe(t,e):pe(t,e)}const ue=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>ae(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},le=(t,e)=>{const n={...t,...e},r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=ae(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function ce(t){const e=nt.parse(t),n=e.length;let r=0,o=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:o++;return{parsed:e,numNumbers:r,numColors:o}}const pe=(t,e)=>{const n=nt.createTransformer(e),r=ce(t),o=ce(e);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?ie(ue(r.parsed,o.parsed),n):n=>""+(n>0?e:t)},de=(t,e)=>n=>Qt(t,e,n);function he(t,e,n){const r=[],o=n||("number"==typeof(s=t[0])?de:"string"==typeof s?J.test(s)?oe:pe:Array.isArray(s)?ue:"object"==typeof s?le:de);var s;const i=t.length-1;for(let n=0;n<i;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=ie(t,s)}r.push(s)}return r}function fe(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const s=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const i=he(e,r,o),a=i.length,u=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=((t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r})(t[n],t[n+1],e);return i[n](r)};return n?e=>u(_t(t[0],t[s-1],e)):u}function me(t,e){return t.map(()=>e||vt).splice(0,t.length-1)}function ve({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,s,i=1-e;i=_t(.05,1,i),t=_t(.01,10,t/1e3),i<1?(o=e=>{const r=e*i,o=r*t;return.001-(r-n)/ge(e,i)*Math.exp(-o)},s=e=>{const r=e*i*t,s=r*n+n,a=Math.pow(i,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=ge(Math.pow(e,2),i);return(.001-o(e)>0?-1:1)*((s-a)*u)/l}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*i*Math.sqrt(r*e),duration:t}}}function ge(t,e){return t*Math.sqrt(1-e*e)}const ye=["duration","bounce"],be=["stiffness","damping","mass"];function Ve(t,e){return e.some(e=>void 0!==t[e])}function we({from:t=0,to:e=1,restSpeed:n=2,restDelta:r=.01,...o}){const s={done:!1,value:t};let{stiffness:i,damping:a,mass:u,velocity:l,duration:c,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Ve(t,be)&&Ve(t,ye)){const n=ve(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(o),d=Ae,h=Ae;function f(){const n=l?-l/1e3:0,o=e-t,s=a/(2*Math.sqrt(i*u)),c=Math.sqrt(i/u)/1e3;if(void 0===r&&(r=Math.min(Math.abs(e-t)/100,.4)),s<1){const t=ge(c,s);d=r=>{const i=Math.exp(-s*c*r);return e-i*((n+s*c*o)/t*Math.sin(t*r)+o*Math.cos(t*r))},h=e=>{const r=Math.exp(-s*c*e);return s*c*r*(Math.sin(t*e)*(n+s*c*o)/t+o*Math.cos(t*e))-r*(Math.cos(t*e)*(n+s*c*o)-t*o*Math.sin(t*e))}}else if(1===s)d=t=>e-Math.exp(-c*t)*(o+(n+c*o)*t);else{const t=c*Math.sqrt(s*s-1);d=r=>{const i=Math.exp(-s*c*r),a=Math.min(t*r,300);return e-i*((n+s*c*o)*Math.sinh(a)+t*o*Math.cosh(a))/t}}}return f(),{next:t=>{const o=d(t);if(p)s.done=t>=c;else{const i=1e3*h(t),a=Math.abs(i)<=n,u=Math.abs(e-o)<=r;s.done=a&&u}return s.value=s.done?e:o,s},flipTarget:()=>{l=-l,[t,e]=[e,t],f()}}}we.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const Ae=t=>0;const Se={decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:s}){const i={done:!1,value:e};let a=n*t;const u=e+a,l=void 0===s?u:s(u);return l!==u&&(a=l-e),{next:t=>{const e=-a*Math.exp(-t/r);return i.done=!(e>o||e<-o),i.value=i.done?l:l+e,i},flipTarget:()=>{}}},keyframes:function({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const s={done:!1,value:t},i=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(r&&r.length===i.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(i),o);function u(){return fe(a,i,{ease:Array.isArray(n)?n:me(i,n)})}let l=u();return{next:t=>(s.value=l(t),s.done=t>=o,s),flipTarget:()=>{i.reverse(),l=u()}}},spring:we};function Me(t,e,n=0){return t-e-n}const Ce=t=>{const e=({delta:e})=>t(e);return{start:()=>Kt.update(e,!0),stop:()=>Yt.update(e)}};function xe({from:t,autoplay:e=!0,driver:n=Ce,elapsed:r=0,repeat:o=0,repeatType:s="loop",repeatDelay:i=0,onPlay:a,onStop:u,onComplete:l,onRepeat:c,onUpdate:p,type:d="keyframes",...h}){var f,m;let v,g,y,{to:b}=h,V=0,w=h.duration,A=!1,S=!0;const M=Se[Array.isArray(b)?"keyframes":d];(null===(m=(f=M).needsInterpolation)||void 0===m?void 0:m.call(f,t,b))&&(y=fe([0,100],[t,b],{clamp:!1}),t=0,b=100);const C=M({...h,from:t,to:b});function x(){V++,"reverse"===s?(S=V%2==0,r=function(t,e=0,n=0,r=!0){return r?Me(e+-t,e,n):e-(t-e)+n}(r,w,i,S)):(r=Me(r,w,i),"mirror"===s&&C.flipTarget()),A=!1,c&&c()}function E(t){if(S||(t=-t),r+=t,!A){const t=C.next(Math.max(0,r));g=t.value,y&&(g=y(g)),A=S?t.done:r<=0}null==p||p(g),A&&(0===V&&(null!=w||(w=r)),V<o?function(t,e,n,r){return r?t>=e+n:t<=-n}(r,w,i,S)&&x():(v.stop(),l&&l()))}return e&&(null==a||a(),v=n(E),v.start()),{stop:()=>{null==u||u(),v.stop()}}}function Ee(t,e){return e?t*(1e3/e):0}function Te({ease:t,times:e,...n}){const r={...n};return e&&(r.offset=e),n.duration&&(r.duration=ut(n.duration)),n.repeatDelay&&(r.repeatDelay=ut(n.repeatDelay)),t&&(r.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(xt):xt(t)),"tween"===n.type&&(r.type="keyframes"),"spring"!==n.type&&(r.type="keyframes"),r}function Pe(t,e,n){return Array.isArray(e.to)&&void 0===t.duration&&(t.duration=.8),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:u,...l}){return!!Object.keys(l).length}(t)||(t={...t,...Ot(n,e.to)}),{...e,...Te(t)}}function Fe(t,e,n,r,o){const s=Oe(r,t)||{};let i=void 0!==s.from?s.from:e.get();const a=Et(t,n);"none"===i&&a&&"string"==typeof n?i=Rt(t,n):Ie(i)&&"string"==typeof n?i=ke(n):!Array.isArray(n)&&Ie(n)&&"string"==typeof i&&(n=ke(i));return Et(t,i)&&a&&!1!==s.type?function(){const r={from:i,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:t=>e.set(t)};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:s=750,bounceStiffness:i=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:p,onComplete:d,onStop:h}){let f;function m(t){return void 0!==n&&t<n||void 0!==r&&t>r}function v(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function g(t){null==f||f.stop(),f=xe({...t,driver:c,onUpdate:e=>{var n;null==p||p(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:h})}function y(t){g({type:"spring",stiffness:i,damping:a,restDelta:u,...t})}if(m(t))y({from:t,velocity:e,to:v(t)});else{let r=o*e+t;void 0!==l&&(r=l(r));const i=v(r),a=i===n?-1:1;let c,p;const d=t=>{c=p,p=t,e=Ee(t-c,Jt().delta),(1===a&&t>i||-1===a&&t<i)&&y({from:t,to:i,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:u,modifyTarget:l,onUpdate:m(r)?d:void 0})}return{stop:()=>null==f?void 0:f.stop()}}({...r,...s}):xe({...Pe(s,r,t),onUpdate:t=>{r.onUpdate(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{r.onComplete(),s.onComplete&&s.onComplete()}})}:function(){const t=g(n);return e.set(t),o(),s.onUpdate&&s.onUpdate(t),s.onComplete&&s.onComplete(),{stop:()=>{}}}}function Ie(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function ke(t){return"number"==typeof t?0:Rt("",t)}function Oe(t,e){return t[e]||t.default||t}function Ne(t,e,n,r={}){return Ut&&(r={type:!1}),e.start(o=>{let s;const i=Fe(t,e,n,r,o),a=function(t,e){var n,r;return null!==(r=null!==(n=(Oe(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),u=()=>s=i();let l;return a?l=function(t,e){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=e&&(Yt.read(r),t(s-e))};return Kt.read(r,!0),()=>Yt.read(r)}(u,ut(a)):u(),()=>{l&&l(),s&&s.stop()}})}const De=t=>/^0[^.\s]+$/.test(t);class Re{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Ue{constructor(t){var e;this.version="7.7.0",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Re,this.velocityUpdateSubscribers=new Re,this.renderSubscribers=new Re,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:r}=Jt();this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,Kt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Kt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ee(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Be(t){return new Ue(t)}const je=t=>e=>e.test(t),ze=[p,y,u,b,V,w,{test:t=>"auto"===t,parse:t=>t}],Le=t=>ze.find(je(t)),qe=[...ze,J,nt],He=t=>qe.find(je(t));function We(t,e,n){const r=t.getProps();return A(r,e,void 0!==n?n:r.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 $e(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Be(n))}function Ke(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ye(t){return Boolean(S(t)&&t.add)}function Xe(t,e,n={}){var r;const o=We(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Ge(t,o,n):()=>Promise.resolve(),a=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:a}=s;return function(t,e,n=0,r=0,o=1,s){const i=[],a=(t.variantChildren.size-1)*r,u=1===o?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(Ze).forEach((t,r)=>{i.push(Xe(t,e,{...s,delay:n+u(r)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(i)}(t,e,o+r,i,a,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[t,e]="beforeChildren"===u?[i,a]:[a,i];return t().then(e)}return Promise.all([i(),a(n.delay)])}function Ge(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=t.getDefaultTransition(),transitionEnd:a,...u}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(i=r);const c=[],p=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in u){const r=t.getValue(e),o=u[e];if(!r||void 0===o||p&&Je(p,e))continue;let s={delay:n,...i};t.shouldReduceMotion&&M.has(e)&&(s={...s,type:!1,delay:0});let a=Ne(e,r,o,s);Ye(l)&&(l.add(e),a=a.then(()=>l.remove(e))),c.push(a)}return Promise.all(c).then(()=>{a&&function(t,e){const n=We(t,e);let{transitionEnd:r={},transition:o={},...s}=n?t.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const e in s){$e(t,e,g(s[e]))}}(t,a)})}function Ze(t,e){return t.sortNodePosition(e)}function Je({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}var _e;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(_e||(_e={}));const Qe=[_e.Animate,_e.InView,_e.Focus,_e.Hover,_e.Tap,_e.Drag,_e.Exit],tn=[...Qe].reverse(),en=Qe.length;function nn(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Xe(t,e,n));r=Promise.all(o)}else if("string"==typeof e)r=Xe(t,e,n);else{const o="function"==typeof e?We(t,e,n.custom):e;r=Ge(t,o,n)}return r.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function rn(t){let e=nn(t);const n={[_e.Animate]:sn(!0),[_e.InView]:sn(),[_e.Hover]:sn(),[_e.Tap]:sn(),[_e.Drag]:sn(),[_e.Focus]:sn(),[_e.Exit]:sn()};let r=!0;const o=(e,n)=>{const r=We(t,n);if(r){const{transition:t,transitionEnd:n,...o}=r;e={...e,...o,...n}}return e};function s(s,i){var a;const u=t.getProps(),l=t.getVariantContext(!0)||{},c=[],p=new Set;let d={},h=1/0;for(let e=0;e<en;e++){const f=tn[e],v=n[f],g=null!==(a=u[f])&&void 0!==a?a:l[f],y=x(g),b=f===i?v.isActive:null;!1===b&&(h=e);let V=g===l[f]&&g!==u[f]&&y;if(V&&r&&t.manuallyAnimateOnMount&&(V=!1),v.protectedKeys={...d},!v.isActive&&null===b||!g&&!v.prevProp||C(g)||"boolean"==typeof g)continue;const w=on(v.prevProp,g);let A=w||f===i&&v.isActive&&!V&&y||e>h&&y;const S=Array.isArray(g)?g:[g];let M=S.reduce(o,{});!1===b&&(M={});const{prevResolvedValues:E={}}=v,T={...E,...M},P=t=>{A=!0,p.delete(t),v.needsAnimating[t]=!0};for(const t in T){const e=M[t],n=E[t];d.hasOwnProperty(t)||(e!==n?m(e)&&m(n)?!at(e,n)||w?P(t):v.protectedKeys[t]=!0:void 0!==e?P(t):p.add(t):void 0!==e&&p.has(t)?P(t):v.protectedKeys[t]=!0)}v.prevProp=g,v.prevResolvedValues=M,v.isActive&&(d={...d,...M}),r&&t.blockInitialAnimation&&(A=!1),A&&!V&&c.push(...S.map(t=>({animation:t,options:{type:f,...s}})))}if(p.size){const e={};p.forEach(n=>{const r=t.getBaseTarget(n);void 0!==r&&(e[n]=r)}),c.push({animation:e})}let f=Boolean(c.length);return r&&!1===u.initial&&!t.manuallyAnimateOnMount&&(f=!1),r=!1,f?e(c):Promise.resolve()}return{animateChanges:s,setActive:function(e,r,o){var i;if(n[e].isActive===r)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)}),n[e].isActive=r;const a=s(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function on(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!at(e,t)}function sn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const an=t=>e=>(t(e),null),un={animation:an(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=rn(t)),C(e)&&n(()=>e.subscribe(t),[e])}),exit:an(r=>{const{custom:o,visualElement:s}=r,[i,a]=function(){const r=t(f);if(null===r)return[!0,null];const{isPresent:o,onExitComplete:s,register:i}=r,a=e();return n(()=>i(a),[]),!o&&s?[!1,()=>s&&s(a)]:[!0]}(),u=t(f);n(()=>{s.isPresent=i;const t=s.animationState&&s.animationState.setActive(_e.Exit,!i,{custom:u&&u.custom||o});t&&!i&&t.then(a)},[i])})};function ln(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function cn(t,e,r,o){n(()=>{const n=t.current;if(r&&n)return ln(n,e,r,o)},[t,e,r,o])}function pn(t){return!!t.touches}const dn={pageX:0,pageY:0};function hn(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||dn;return{x:n[e+"X"],y:n[e+"Y"]}}function fn(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}const mn=(t,e=!1)=>{const n=e=>t(e,function(t,e="page"){return{point:pn(t)?hn(t,e):fn(t,e)}}(e));return e?(r=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&r(t)}):n;var r},vn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},gn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function yn(t){return E&&null===window.onpointerdown?t:E&&null===window.ontouchstart?gn[t]:E&&null===window.onmousedown?vn[t]:t}function bn(t,e,n,r){return ln(t,yn(e),mn(n,"pointerdown"===e),r)}function Vn(t,e,n,r){return cn(t,yn(e),n&&mn(n,"pointerdown"===e),r)}function wn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const An=wn("dragHorizontal"),Sn=wn("dragVertical");function Mn(){const t=function(t){let e=!1;if("y"===t)e=Sn();else if("x"===t)e=An();else{const t=An(),n=Sn();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function Cn(t,e,n){return(r,o)=>{(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!Mn()&&(t.animationState&&t.animationState.setActive(_e.Hover,e),n&&n(r,o))}}const xn=(t,e)=>!!e&&(t===e||xn(t,e.parentElement));const En=("undefined"==typeof process||process.env,"production"),Tn=new Set;const Pn=new WeakMap,Fn=new WeakMap,In=t=>{const e=Pn.get(t.target);e&&e(t)},kn=t=>{t.forEach(In)};function On(t,e,n){const r=function({root:t,...e}){const n=t||document;Fn.has(n)||Fn.set(n,{});const r=Fn.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(kn,{root:t,...e})),r[o]}(e);return Pn.set(t,n),r.observe(t),()=>{Pn.delete(t),r.unobserve(t)}}const Nn={some:0,all:1};function Dn(t,e,r,{root:o,margin:s,amount:i="some",once:a}){n(()=>{if(!t||!r.current)return;const n={root:null==o?void 0:o.current,rootMargin:s,threshold:"number"==typeof i?i:Nn[i]};return On(r.current,n,t=>{const{isIntersecting:n}=t;if(e.isInView===n)return;if(e.isInView=n,a&&!n&&e.hasEnteredView)return;n&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(_e.InView,n);const o=r.getProps(),s=n?o.onViewportEnter:o.onViewportLeave;s&&s(t)})},[t,o,s,i])}function Rn(t,e,r,{fallback:o=!0}){n(()=>{var n,s;t&&o&&("production"!==En&&(n="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||Tn.has(n)||(console.warn(n),s&&console.warn(s),Tn.add(n))),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:t}=r.getProps();t&&t(null),r.animationState&&r.animationState.setActive(_e.InView,!0)}))},[t])}const Un={inView:an((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:o,viewport:s={}}){const i=r({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||o);s.once&&i.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?Rn:Dn)(a,i.current,t,s)})),tap:an((function({onTap:t,onTapStart:e,onTapCancel:o,whileTap:s,visualElement:i}){const a=t||e||o||s,u=r(!1),l=r(null),c={passive:!(e||t||o||m)};function p(){l.current&&l.current(),l.current=null}function d(){return p(),u.current=!1,i.animationState&&i.animationState.setActive(_e.Tap,!1),!Mn()}function h(e,n){d()&&(xn(i.current,e.target)?t&&t(e,n):o&&o(e,n))}function f(t,e){d()&&o&&o(t,e)}function m(t,n){p(),u.current||(u.current=!0,l.current=ie(bn(window,"pointerup",h,c),bn(window,"pointercancel",f,c)),i.animationState&&i.animationState.setActive(_e.Tap,!0),e&&e(t,n))}var v;Vn(i,"pointerdown",a?m:void 0,c),v=p,n(()=>()=>v(),[])})),focus:an((function({whileFocus:t,visualElement:e}){const{animationState:n}=e;cn(e,"focus",t?()=>{n&&n.setActive(_e.Focus,!0)}:void 0),cn(e,"blur",t?()=>{n&&n.setActive(_e.Focus,!1)}:void 0)})),hover:an((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:r}){Vn(r,"pointerenter",t||n?Cn(r,!0,t):void 0,{passive:!t}),Vn(r,"pointerleave",e||n?Cn(r,!1,e):void 0,{passive:!e})}))};function Bn(t){return"string"==typeof t&&t.startsWith("var(--")}const jn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function zn(t,e,n=1){const[r,o]=function(t){const e=jn.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);return s?s.trim():Bn(o)?zn(o,e,n+1):o}const Ln=new Set(["width","height","top","left","right","bottom","x","y"]),qn=t=>Ln.has(t),Hn=(t,e)=>{t.set(e,!1),t.set(e)},Wn=t=>t===p||t===y;var $n;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}($n||($n={}));const Kn=(t,e)=>parseFloat(t.split(", ")[e]),Yn=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Kn(o[1],e);{const e=r.match(/^matrix\((.+)\)$/);return e?Kn(e[1],t):0}},Xn=new Set(["x","y","z"]),Gn=T.filter(t=>!Xn.has(t));const Zn={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:Yn(4,13),y:Yn(5,14)},Jn=(t,e,n={},r={})=>{e={...e},r={...r};const o=Object.keys(e).filter(qn);let s=[],i=!1;const a=[];if(o.forEach(o=>{const u=t.getValue(o);if(!t.hasValue(o))return;let l=n[o],c=Le(l);const p=e[o];let d;if(m(p)){const t=p.length,e=null===p[0]?1:0;l=p[e],c=Le(l);for(let n=e;n<t;n++)d?Le(p[n]):d=Le(p[n])}else d=Le(p);if(c!==d)if(Wn(c)&&Wn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[o]=parseFloat(p):Array.isArray(p)&&d===y&&(e[o]=p.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===l||0===p)?0===l?u.set(d.transform(l)):e[o]=c.transform(p):(i||(s=function(t){const e=[];return Gn.forEach(n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),i=!0),a.push(o),r[o]=void 0!==r[o]?r[o]:e[o],Hn(u,p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const r=e.measureViewportBox(),o=e.current,s=getComputedStyle(o),{display:i}=s,a={};"none"===i&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Zn[t](r,s)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const r=e.getValue(n);Hn(r,a[n]),t[n]=Zn[n](u,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),E&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:e,transitionEnd:r}};function _n(t,e,n,r){return(t=>Object.keys(t).some(qn))(e)?Jn(t,e,n,r):{target:e,transitionEnd:r}}const Qn=(t,e,n,r)=>{const o=function(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!Bn(e))return;const n=zn(e,r);n&&t.set(n)});for(const t in e){const o=e[t];if(!Bn(o))continue;const s=zn(o,r);s&&(e[t]=s,n&&void 0===n[t]&&(n[t]=o))}return{target:e,transitionEnd:n}}(t,e,r);return _n(t,e=o.target,n,r=o.transitionEnd)},tr={current:null},er={current:!1};const nr=Object.keys(P),rr=nr.length,or=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const sr=["initial",...Qe],ir=sr.length;class ar extends class{constructor({parent:t,props:e,reducedMotionConfig:n,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,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=()=>Kt.render(this.render,!1,!0);const{latestValues:s,renderState:i}=r;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=i,this.parent=t,this.props=e,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=F(e),this.isVariantNode=I(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:a,...u}=this.scrapeMotionValuesFromProps(e);for(const t in u){const e=u[t];void 0!==s[t]&&S(e)&&(e.set(s[t],!1),Ye(a)&&a.add(t))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var e;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(e=this.parent)||void 0===e?void 0:e.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),er.current||function(){if(er.current=!0,E)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>tr.current=t.matches;t.addListener(e),e()}else tr.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||tr.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,e,n;null===(t=this.projection)||void 0===t||t.unmount(),Yt.update(this.notifyUpdate),Yt.render(this.render),this.valueSubscriptions.forEach(t=>t()),null===(e=this.removeFromVariantTree)||void 0===e||e.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const t in this.events)this.events[t].clear();this.current=null}bindToMotionValue(t,e){const n=M.has(t),r=e.onChange(e=>{this.latestValues[t]=e,this.props.onUpdate&&Kt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{r(),o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures(t,e,n,r,s,i){const a=[];for(let e=0;e<rr;e++){const n=nr[e],{isEnabled:r,Component:s}=P[n];r(t)&&s&&a.push(o(s,{key:n,...t,visualElement:this}))}if(!this.projection&&s){this.projection=new s(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:o,dragConstraints:a,layoutScroll:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(o)||a&&k(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u})}return a}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)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let e=0;e<or.length;e++){const n=or[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=t["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(t,e,n){const{willChange:r}=e;for(const o in e){const s=e[o],i=n[o];if(S(s))t.addValue(o,s),Ye(r)&&r.add(o);else if(S(i))t.addValue(o,Be(s)),Ye(r)&&r.remove(o);else if(i!==s)if(t.hasValue(o)){const e=t.getValue(o);!e.hasAnimated&&e.set(s)}else{const e=t.getStaticValue(o);t.addValue(o,Be(void 0!==e?e:s))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var e;return null===(e=this.props.variants)||void 0===e?void 0:e[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:null===(t=this.parent)||void 0===t?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var e,n;if(t)return null===(e=this.parent)||void 0===e?void 0:e.getVariantContext();if(!this.isControllingVariants){const t=(null===(n=this.parent)||void 0===n?void 0:n.getVariantContext())||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const r={};for(let t=0;t<ir;t++){const e=sr[t],n=this.props[e];(x(n)||!1===n)&&(r[e]=n)}return r}addVariantChild(t){var e;const n=this.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)}addValue(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.latestValues[t]=e.get(),this.bindToMotionValue(t,e)}removeValue(t){var e;this.values.delete(t),null===(e=this.valueSubscriptions.get(t))||void 0===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=Be(e),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,r="string"==typeof n||"object"==typeof n?null===(e=A(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,t);return void 0===o||S(o)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new Re),this.events[t].add(e)}notify(t,...e){var n;null===(n=this.events[t])||void 0===n||n.notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:r},o){let s=function(t,e,n){var r;const o={};for(const s in t){const t=Ke(s,e);o[s]=void 0!==t?t:null===(r=n.getValue(s))||void 0===r?void 0:r.get()}return o}(n,t||{},this);if(r&&(e&&(e=r(e)),n&&(n=r(n)),s&&(s=r(s))),o){!function(t,e,n){var r,o;const s=Object.keys(e).filter(e=>!t.hasValue(e)),i=s.length;if(i)for(let a=0;a<i;a++){const i=s[a],u=e[i];let l=null;Array.isArray(u)&&(l=u[0]),null===l&&(l=null!==(o=null!==(r=n[i])&&void 0!==r?r:t.readValue(i))&&void 0!==o?o:e[i]),null!=l&&("string"==typeof l&&(/^\-?\d*\.?\d+$/.test(l)||De(l))?l=parseFloat(l):!He(l)&&nt.test(u)&&(l=Rt(i,u)),t.addValue(i,Be(l)),void 0===n[i]&&(n[i]=l),null!==l&&t.setBaseTarget(i,l))}}(this,n,s);const t=Qn(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class ur extends ar{readValueFromInstance(t,e){if(M.has(e)){const t=Dt(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),o=(O(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,r){N(t,e,n,r.transformTemplate)}scrapeMotionValuesFromProps(t){return D(t)}renderInstance(t,e,n,r){R(t,e,n,r)}}class lr extends ar{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){var n;return M.has(e)?(null===(n=Dt(e))||void 0===n?void 0:n.default)||0:(e=U.has(e)?e:B(e),t.getAttribute(e))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t){return j(t)}build(t,e,n,r){z(t,e,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,e,n,r){L(t,e,n,r)}mount(t){this.isSVGTag=q(t.tagName),super.mount(t)}}const cr={renderer:(t,e)=>H(t)?new lr(e,{enableHardwareAcceleration:!1}):new ur(e,{enableHardwareAcceleration:!0}),...un,...Un};export{cr as domAnimation};
@@ -1 +1 @@
1
- import{createContext as t,useRef as e}from"react";const a=t({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),n=t(null),r="undefined"!=typeof document;function s(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function o(t){return"string"==typeof t||Array.isArray(t)}function i(t){return"object"==typeof t&&"function"==typeof t.start}const c=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function f(t){return i(t.animate)||c.some(e=>o(t[e]))}function l(t){return Boolean(f(t)||t.variants)}const d=t=>({isEnabled:e=>t.some(t=>!!e[t])}),u={measureLayout:d(["layout","layoutId","drag"]),animation:d(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:d(["exit"]),drag:d(["drag","dragControls"]),focus:d(["whileFocus"]),hover:d(["whileHover","onHoverStart","onHoverEnd"]),tap:d(["whileTap","onTap","onTapStart","onTapCancel"]),pan:d(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:d(["whileInView","onViewportEnter","onViewportLeave"])};function p(t){const a=e(null);return null===a.current&&(a.current=t()),a.current}const m={hasAnimatedSinceResize:!0,hasEverUpdated:!1},g=t({}),h=t({}),y=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","text","tspan","use","view"];function v(t){return"string"==typeof t&&!t.includes("-")&&!!(y.indexOf(t)>-1||/[A-Z]/.test(t))}const w={};function b(t){Object.assign(w,t)}const x=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],O=new Set(x);function k(t,{layout:e,layoutId:a}){return O.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!w[t]||"opacity"===t)}const T=t=>!!(null==t?void 0:t.getVelocity),j={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},S=(t,e)=>x.indexOf(t)-x.indexOf(e);function X(t){return t.startsWith("--")}const Y=(t,e)=>e&&"number"==typeof t?e.transform(t):t,$=(t,e)=>a=>Math.max(Math.min(a,e),t),L=t=>t%1?Number(t.toFixed(5)):t,P=/(-)?([\d]*\.?[\d])+/g,R=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,A=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function W(t){return"string"==typeof t}const Z={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},V=Object.assign(Object.assign({},Z),{transform:$(0,1)}),z=Object.assign(Object.assign({},Z),{default:1}),B=t=>({test:e=>W(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),H=B("deg"),C=B("%"),F=B("px"),E=B("vh"),I=B("vw"),D=Object.assign(Object.assign({},C),{parse:t=>C.parse(t)/100,transform:t=>C.transform(100*t)}),M={...Z,transform:Math.round},U={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,size:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,rotate:H,rotateX:H,rotateY:H,rotateZ:H,scale:z,scaleX:z,scaleY:z,scaleZ:z,skew:H,skewX:H,skewY:H,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:V,originX:D,originY:D,originZ:F,zIndex:M,fillOpacity:V,strokeOpacity:V,numOctaves:M};function K(t,e,a,n){const{style:r,vars:s,transform:o,transformKeys:i,transformOrigin:c}=t;i.length=0;let f=!1,l=!1,d=!0;for(const t in e){const a=e[t];if(X(t)){s[t]=a;continue}const n=U[t],u=Y(a,n);if(O.has(t)){if(f=!0,o[t]=u,i.push(t),!d)continue;a!==(n.default||0)&&(d=!1)}else t.startsWith("origin")?(l=!0,c[t]=u):r[t]=u}if(e.transform||(f||n?r.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:a=!0,allowTransformNone:n=!0},r,s){let o="";e.sort(S);for(const a of e)o+=`${j[a]||a}(${t[a]}) `;return a&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,r?"":o):n&&r&&(o="none"),o}(t,a,d,n):r.transform&&(r.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=c;r.transformOrigin=`${t} ${e} ${a}`}}function N(t,e,a){return"string"==typeof t?t:F.transform(e+a*t)}const q={offset:"stroke-dashoffset",array:"stroke-dasharray"},G={offset:"strokeDashoffset",array:"strokeDasharray"};function J(t,{attrX:e,attrY:a,originX:n,originY:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...c},f,l){K(t,c,f,l),t.attrs=t.style,t.style={};const{attrs:d,style:u,dimensions:p}=t;d.transform&&(p&&(u.transform=d.transform),delete d.transform),p&&(void 0!==n||void 0!==r||u.transform)&&(u.transformOrigin=function(t,e,a){return`${N(e,t.x,t.width)} ${N(a,t.y,t.height)}`}(p,void 0!==n?n:.5,void 0!==r?r:.5)),void 0!==e&&(d.x=e),void 0!==a&&(d.y=a),void 0!==s&&function(t,e,a=1,n=0,r=!0){t.pathLength=1;const s=r?q:G;t[s.offset]=F.transform(-n);const o=F.transform(e),i=F.transform(a);t[s.array]=`${o} ${i}`}(d,s,o,i,!1)}const Q=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function _(t,{style:e,vars:a},n,r){Object.assign(t.style,e,r&&r.getProjectionStyles(n));for(const e in a)t.style.setProperty(e,a[e])}const tt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function et(t,e,a,n){_(t,e,void 0,n);for(const a in e.attrs)t.setAttribute(tt.has(a)?a:Q(a),e.attrs[a])}function at(t){const{style:e}=t,a={};for(const n in e)(T(e[n])||k(n,t))&&(a[n]=e[n]);return a}function nt(t){const e=at(t);for(const a in t)if(T(t[a])){e["x"===a||"y"===a?"attr"+a.toUpperCase():a]=t[a]}return e}function rt(t,e,a,n={},r={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,n,r)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,n,r)),e}const st=t=>Array.isArray(t),ot=t=>st(t)?t[t.length-1]||0:t;function it(t){const e=T(t)?t.get():t;return a=e,Boolean(a&&"object"==typeof a&&a.mix&&a.toValue)?e.toValue():e;var a}export{$ as A,R as B,st as C,U as D,ot as E,F,b as G,w as H,H as I,I as J,E as K,g as L,a as M,x as N,O,n as P,X as Q,_ as R,h as S,tt as T,Q as U,s as a,f as b,o as c,T as d,k as e,u as f,m as g,K as h,r as i,J as j,v as k,l,i as m,rt as n,et as o,at as p,W as q,it as r,nt as s,A as t,p as u,P as v,C as w,L as x,V as y,Z as z};
1
+ import{createContext as t,useRef as e}from"react";const a=t({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),r=t(null),n="undefined"!=typeof document;function s(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function o(t){return"string"==typeof t||Array.isArray(t)}function i(t){return"object"==typeof t&&"function"==typeof t.start}const f=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function c(t){return i(t.animate)||f.some(e=>o(t[e]))}function l(t){return Boolean(c(t)||t.variants)}const d=t=>({isEnabled:e=>t.some(t=>!!e[t])}),u={measureLayout:d(["layout","layoutId","drag"]),animation:d(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:d(["exit"]),drag:d(["drag","dragControls"]),focus:d(["whileFocus"]),hover:d(["whileHover","onHoverStart","onHoverEnd"]),tap:d(["whileTap","onTap","onTapStart","onTapCancel"]),pan:d(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:d(["whileInView","onViewportEnter","onViewportLeave"])};function g(t){const a=e(null);return null===a.current&&(a.current=t()),a.current}const p={hasAnimatedSinceResize:!0,hasEverUpdated:!1},m=t({}),h=t({}),y=["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 v(t){return"string"==typeof t&&!t.includes("-")&&!!(y.indexOf(t)>-1||/[A-Z]/.test(t))}const w={};function b(t){Object.assign(w,t)}const x=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],O=new Set(x);function k(t,{layout:e,layoutId:a}){return O.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!w[t]||"opacity"===t)}const j=t=>!!(null==t?void 0:t.getVelocity),L={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},T=(t,e)=>x.indexOf(t)-x.indexOf(e);function S(t){return t.startsWith("--")}const X=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Y=(t,e)=>a=>Math.max(Math.min(a,e),t),$=t=>t%1?Number(t.toFixed(5)):t,P=/(-)?([\d]*\.?[\d])+/g,A=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function R(t){return"string"==typeof t}const V={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},W=Object.assign(Object.assign({},V),{transform:Y(0,1)}),Z=Object.assign(Object.assign({},V),{default:1}),z=t=>({test:e=>R(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),C=z("deg"),H=z("%"),F=z("px"),E=z("vh"),I=z("vw"),D=Object.assign(Object.assign({},H),{parse:t=>H.parse(t)/100,transform:t=>H.transform(100*t)}),M={...V,transform:Math.round},U={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,size:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,rotate:C,rotateX:C,rotateY:C,rotateZ:C,scale:Z,scaleX:Z,scaleY:Z,scaleZ:Z,skew:C,skewX:C,skewY:C,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:W,originX:D,originY:D,originZ:F,zIndex:M,fillOpacity:W,strokeOpacity:W,numOctaves:M};function K(t,e,a,r){const{style:n,vars:s,transform:o,transformKeys:i,transformOrigin:f}=t;i.length=0;let c=!1,l=!1,d=!0;for(const t in e){const a=e[t];if(S(t)){s[t]=a;continue}const r=U[t],u=X(a,r);if(O.has(t)){if(c=!0,o[t]=u,i.push(t),!d)continue;a!==(r.default||0)&&(d=!1)}else t.startsWith("origin")?(l=!0,f[t]=u):n[t]=u}if(e.transform||(c||r?n.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:a=!0,allowTransformNone:r=!0},n,s){let o="";e.sort(T);for(const a of e)o+=`${L[a]||a}(${t[a]}) `;return a&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,n?"":o):r&&n&&(o="none"),o}(t,a,d,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=f;n.transformOrigin=`${t} ${e} ${a}`}}function N(t,e,a){return"string"==typeof t?t:F.transform(e+a*t)}const q={offset:"stroke-dashoffset",array:"stroke-dasharray"},G={offset:"strokeDashoffset",array:"strokeDasharray"};function J(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(K(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:g,dimensions:p}=t;u.transform&&(p&&(g.transform=u.transform),delete u.transform),p&&(void 0!==r||void 0!==n||g.transform)&&(g.transformOrigin=function(t,e,a){return`${N(e,t.x,t.width)} ${N(a,t.y,t.height)}`}(p,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?q:G;t[s.offset]=F.transform(-r);const o=F.transform(e),i=F.transform(a);t[s.array]=`${o} ${i}`}(u,s,o,i,!1)}const Q=t=>"string"==typeof t&&"svg"===t.toLowerCase(),_=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function tt(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const et=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function at(t,e,a,r){tt(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(et.has(a)?a:_(a),e.attrs[a])}function rt(t){const{style:e}=t,a={};for(const r in e)(j(e[r])||k(r,t))&&(a[r]=e[r]);return a}function nt(t){const e=rt(t);for(const a in t)if(j(t[a])){e["x"===a||"y"===a?"attr"+a.toUpperCase():a]=t[a]}return e}function st(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const ot=t=>Array.isArray(t),it=t=>ot(t)?t[t.length-1]||0:t;function ft(t){const e=j(t)?t.get():t;return a=e,Boolean(a&&"object"==typeof a&&a.mix&&a.toValue)?e.toValue():e;var a}export{V as A,Y as B,A as C,ot as D,U as E,it as F,F as G,b as H,w as I,C as J,I as K,m as L,a as M,E as N,x as O,r as P,O as Q,S as R,h as S,tt as T,et as U,_ as V,s as a,c as b,o as c,j as d,k as e,u as f,p as g,K as h,n as i,J as j,Q as k,v as l,l as m,i as n,st as o,at as p,rt as q,ft as r,nt as s,R as t,g as u,B as v,P as w,H as x,$ as y,W as z};