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.
- package/dist/cjs/index.js +33 -27
- package/dist/es/animation/utils/transitions.mjs +1 -19
- package/dist/es/render/dom/use-render.mjs +1 -1
- package/dist/es/render/svg/SVGVisualElement.mjs +10 -1
- package/dist/es/render/svg/config-motion.mjs +2 -1
- package/dist/es/render/svg/lowercase-elements.mjs +1 -0
- package/dist/es/render/svg/use-props.mjs +3 -2
- package/dist/es/render/svg/utils/build-attrs.mjs +11 -1
- package/dist/es/render/svg/utils/camel-case-attrs.mjs +3 -0
- package/dist/es/render/svg/utils/is-svg-tag.mjs +3 -0
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +33 -27
- package/dist/framer-motion.js +1 -1
- package/dist/projection.dev.js +3 -21
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation-m.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -1
- package/dist/size-webpack-m.js +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import e,{createContext as n,useContext as i,useLayoutEffect as o,useEffect as s,useRef as r,useCallback as a,useMemo as l,forwardRef as u,createElement as c,useId as h}from"react";const d=n({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),p=n({});const m=n(null),f="undefined"!=typeof document,g=f?o:s,v=n({strict:!1});function y(t,e,n,o){const a=i(p).visualElement,l=i(v),u=i(m),c=i(d).reducedMotion,h=r();o=o||l.renderer,!h.current&&o&&(h.current=o(t,{visualState:e,parent:a,props:n,presenceId:u?u.id:void 0,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:c}));const f=h.current;return g(()=>{f&&f.render()}),s(()=>{f&&f.animationState&&f.animationState.animateChanges()}),g(()=>()=>f&&f.notify("Unmount"),[]),f}function x(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function b(t){return"string"==typeof t||Array.isArray(t)}function w(t){return"object"==typeof t&&"function"==typeof t.start}const P=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function V(t){return w(t.animate)||P.some(e=>b(t[e]))}function T(t){return Boolean(V(t)||t.variants)}function S(t){const{initial:e,animate:n}=function(t,e){if(V(t)){const{initial:e,animate:n}=t;return{initial:!1===e||b(e)?e:void 0,animate:b(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,i(p));return l(()=>({initial:e,animate:n}),[E(e),E(n)])}function E(t){return Array.isArray(t)?t.join(" "):t}const A=t=>({isEnabled:e=>t.some(t=>!!e[t])}),C={measureLayout:A(["layout","layoutId","drag"]),animation:A(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:A(["exit"]),drag:A(["drag","dragControls"]),focus:A(["whileFocus"]),hover:A(["whileHover","onHoverStart","onHoverEnd"]),tap:A(["whileTap","onTap","onTapStart","onTapCancel"]),pan:A(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:A(["whileInView","onViewportEnter","onViewportLeave"])};function M(t){const e=r(null);return null===e.current&&(e.current=t()),e.current}const D={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let R=1;const L=n({});class B extends e.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:e}=this.props;return t&&t.setProps(e),null}componentDidUpdate(){}render(){return this.props.children}}const k=n({}),j=Symbol.for("motionComponentSymbol");function F({preloadedFeatures:e,createVisualElement:n,projectionNodeConstructor:o,useRender:s,useVisualState:r,Component:l}){e&&function(t){for(const e in t)"projectionNodeConstructor"===e?C.projectionNodeConstructor=t[e]:C[e].Component=t[e]}(e);const c=u((function(u,c){const h={...i(d),...u,layoutId:O(u)},{isStatic:m}=h;let g=null;const b=S(u),w=m?void 0:M(()=>{if(D.hasEverUpdated)return R++}),P=r(u,m);if(!m&&f){b.visualElement=y(l,P,h,n);const t=i(v).strict,s=i(k);b.visualElement&&(g=b.visualElement.loadFeatures(h,t,e,w,o||C.projectionNodeConstructor,s))}return t.createElement(B,{visualElement:b.visualElement,props:h},g,t.createElement(p.Provider,{value:b},s(l,u,w,function(t,e,n){return a(i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):x(n)&&(n.current=i))},[e])}(P,b.visualElement,c),P,m,b.visualElement)))}));return c[j]=l,c}function O({layoutId:t}){const e=i(L).id;return e&&void 0!==t?e+"-"+t:t}function I(t){function e(e,n={}){return F(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const U=["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 N(t){return"string"==typeof t&&!t.includes("-")&&!!(U.indexOf(t)>-1||/[A-Z]/.test(t))}const $={};const z=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],H=new Set(z);function W(t,{layout:e,layoutId:n}){return H.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!$[t]||"opacity"===t)}const Y=t=>!!(null==t?void 0:t.getVelocity),X={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G=(t,e)=>z.indexOf(t)-z.indexOf(e);function Z(t){return t.startsWith("--")}const q=(t,e)=>e&&"number"==typeof t?e.transform(t):t,K=(t,e)=>n=>Math.max(Math.min(n,e),t),_=t=>t%1?Number(t.toFixed(5)):t,J=/(-)?([\d]*\.?[\d])+/g,Q=/(#[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,tt=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function et(t){return"string"==typeof t}const nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},it=Object.assign(Object.assign({},nt),{transform:K(0,1)}),ot=Object.assign(Object.assign({},nt),{default:1}),st=t=>({test:e=>et(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),rt=st("deg"),at=st("%"),lt=st("px"),ut=st("vh"),ct=st("vw"),ht=Object.assign(Object.assign({},at),{parse:t=>at.parse(t)/100,transform:t=>at.transform(100*t)}),dt=(t,e)=>n=>Boolean(et(n)&&tt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),pt=(t,e,n)=>i=>{if(!et(i))return i;const[o,s,r,a]=i.match(J);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},mt={test:dt("hsl","hue"),parse:pt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+at.transform(_(e))+", "+at.transform(_(n))+", "+_(it.transform(i))+")"},ft=K(0,255),gt=Object.assign(Object.assign({},nt),{transform:t=>Math.round(ft(t))}),vt={test:dt("rgb","red"),parse:pt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+gt.transform(t)+", "+gt.transform(e)+", "+gt.transform(n)+", "+_(it.transform(i))+")"};const yt={test:dt("#"),parse:function(t){let e="",n="",i="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),i=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),i=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,i+=i,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}},transform:vt.transform},xt={test:t=>vt.test(t)||yt.test(t)||mt.test(t),parse:t=>vt.test(t)?vt.parse(t):mt.test(t)?mt.parse(t):yt.parse(t),transform:t=>et(t)?t:t.hasOwnProperty("red")?vt.transform(t):mt.transform(t)};function bt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const i=t.match(Q);i&&(n=i.length,t=t.replace(Q,"${c}"),e.push(...i.map(xt.parse)));const o=t.match(J);return o&&(t=t.replace(J,"${n}"),e.push(...o.map(nt.parse))),{values:e,numColors:n,tokenised:t}}function wt(t){return bt(t).values}function Pt(t){const{values:e,numColors:n,tokenised:i}=bt(t),o=e.length;return t=>{let e=i;for(let i=0;i<o;i++)e=e.replace(i<n?"${c}":"${n}",i<n?xt.transform(t[i]):_(t[i]));return e}}const Vt=t=>"number"==typeof t?0:t;const Tt={test:function(t){var e,n,i,o;return isNaN(t)&&et(t)&&(null!==(n=null===(e=t.match(J))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(i=t.match(Q))||void 0===i?void 0:i.length)&&void 0!==o?o:0)>0},parse:wt,createTransformer:Pt,getAnimatableNone:function(t){const e=wt(t);return Pt(t)(e.map(Vt))}},St=new Set(["brightness","contrast","saturate","opacity"]);function Et(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(J)||[];if(!i)return t;const o=n.replace(i,"");let s=St.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+o+")"}const At=/([a-z-]*)\(.*?\)/g,Ct=Object.assign(Object.assign({},Tt),{getAnimatableNone:t=>{const e=t.match(At);return e?e.map(Et).join(" "):t}}),Mt={...nt,transform:Math.round},Dt={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,radius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,size:lt,top:lt,right:lt,bottom:lt,left:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,rotate:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:rt,skewX:rt,skewY:rt,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:it,originX:ht,originY:ht,originZ:lt,zIndex:Mt,fillOpacity:it,strokeOpacity:it,numOctaves:Mt};function Rt(t,e,n,i){const{style:o,vars:s,transform:r,transformKeys:a,transformOrigin:l}=t;a.length=0;let u=!1,c=!1,h=!0;for(const t in e){const n=e[t];if(Z(t)){s[t]=n;continue}const i=Dt[t],d=q(n,i);if(H.has(t)){if(u=!0,r[t]=d,a.push(t),!h)continue;n!==(i.default||0)&&(h=!1)}else t.startsWith("origin")?(c=!0,l[t]=d):o[t]=d}if(e.transform||(u||i?o.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:i=!0},o,s){let r="";e.sort(G);for(const n of e)r+=`${X[n]||n}(${t[n]}) `;return n&&!t.z&&(r+="translateZ(0)"),r=r.trim(),s?r=s(t,o?"":r):i&&o&&(r="none"),r}(t,n,h,i):o.transform&&(o.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=l;o.transformOrigin=`${t} ${e} ${n}`}}const Lt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Bt(t,e,n){for(const i in e)Y(e[i])||W(i,n)||(t[i]=e[i])}function kt(t,e,n){const i={};return Bt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},e,n){return l(()=>{const i={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return Rt(i,e,{enableHardwareAcceleration:!n},t),Object.assign({},i.vars,i.style)},[e])}(t,e,n)),t.transformValues?t.transformValues(i):i}function jt(t,e,n){const i={},o=kt(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),i.style=o,i}const Ft=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 Ot(t){return Ft.has(t)}let It=t=>!Ot(t);try{(Ut=require("@emotion/is-prop-valid").default)&&(It=t=>t.startsWith("on")?!Ot(t):Ut(t))}catch(t){}var Ut;function Nt(t,e,n){return"string"==typeof t?t:lt.transform(e+n*t)}const $t={offset:"stroke-dashoffset",array:"stroke-dasharray"},zt={offset:"strokeDashoffset",array:"strokeDasharray"};function Ht(t,{attrX:e,attrY:n,originX:i,originY:o,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...l},u,c){Rt(t,l,u,c),t.attrs=t.style,t.style={};const{attrs:h,style:d,dimensions:p}=t;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(void 0!==i||void 0!==o||d.transform)&&(d.transformOrigin=function(t,e,n){return`${Nt(e,t.x,t.width)} ${Nt(n,t.y,t.height)}`}(p,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==s&&function(t,e,n=1,i=0,o=!0){t.pathLength=1;const s=o?$t:zt;t[s.offset]=lt.transform(-i);const r=lt.transform(e),a=lt.transform(n);t[s.array]=`${r} ${a}`}(h,s,r,a,!1)}const Wt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}});function Yt(t,e){const n=l(()=>{const n={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return Ht(n,e,{enableHardwareAcceleration:!1},t.transformTemplate),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};Bt(e,t.style,t),n.style={...e,...n.style}}return n}function Xt(t=!1){return(e,n,i,o,{latestValues:s},r)=>{const a=(N(e)?Yt:jt)(n,s,r),l={...function(t,e,n){const i={};for(const o in t)(It(o)||!0===n&&Ot(o)||!e&&!Ot(o)||t.draggable&&o.startsWith("onDrag"))&&(i[o]=t[o]);return i}(n,"string"==typeof e,t),...a,ref:o};return i&&(l["data-projection-id"]=i),c(e,l)}}const Gt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Zt(t,{style:e,vars:n},i,o){Object.assign(t.style,e,o&&o.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const qt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Kt(t,e,n,i){Zt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(qt.has(n)?n:Gt(n),e.attrs[n])}function _t(t){const{style:e}=t,n={};for(const i in e)(Y(e[i])||W(i,t))&&(n[i]=e[i]);return n}function Jt(t){const e=_t(t);for(const n in t)if(Y(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function Qt(t,e,n,i={},o={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,o)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,o)),e}const te=t=>Array.isArray(t),ee=t=>te(t)?t[t.length-1]||0:t;function ne(t){const e=Y(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const ie=t=>(e,n)=>{const o=i(p),s=i(m),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,o,s){const r={latestValues:oe(i,o,s,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,e,o,s);return n?r():M(r)};function oe(t,e,n,i){const o={},s=i(t);for(const t in s)o[t]=ne(s[t]);let{initial:r,animate:a}=t;const l=V(t),u=T(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!w(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=Qt(t,e);if(!n)return;const{transitionEnd:i,transition:s,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(o[t]=e)}for(const t in i)o[t]=i[t]})}return o}const se={useVisualState:ie({scrapeMotionValuesFromProps:Jt,createRenderState:Wt,onMount:(t,e,{renderState:n,latestValues:i})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}Ht(n,i,{enableHardwareAcceleration:!1},t.transformTemplate),Kt(e,n)}})},re={useVisualState:ie({scrapeMotionValuesFromProps:_t,createRenderState:Lt})};function ae(t,{forwardMotionProps:e=!1},n,i,o){return{...N(t)?se:re,preloadedFeatures:n,useRender:Xt(e),createVisualElement:i,projectionNodeConstructor:o,Component:t}}var le;function ue(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function ce(t,e,n,i){s(()=>{const o=t.current;if(n&&o)return ue(o,e,n,i)},[t,e,n,i])}function he(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function de(t){return!!t.touches}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(le||(le={}));const pe={pageX:0,pageY:0};function me(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||pe;return{x:n[e+"X"],y:n[e+"Y"]}}function fe(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}function ge(t,e="page"){return{point:de(t)?me(t,e):fe(t,e)}}const ve=(t,e=!1)=>{const n=e=>t(e,ge(e));return e?(i=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&i(t)}):n;var i},ye={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},xe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function be(t){return f&&null===window.onpointerdown?t:f&&null===window.ontouchstart?xe[t]:f&&null===window.onmousedown?ye[t]:t}function we(t,e,n,i){return ue(t,be(e),ve(n,"pointerdown"===e),i)}function Pe(t,e,n,i){return ce(t,be(e),n&&ve(n,"pointerdown"===e),i)}function Ve(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Te=Ve("dragHorizontal"),Se=Ve("dragVertical");function Ee(t){let e=!1;if("y"===t)e=Se();else if("x"===t)e=Te();else{const t=Te(),n=Se();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Ae(){const t=Ee(!0);return!t||(t(),!1)}function Ce(t,e,n){return(i,o)=>{he(i)&&!Ae()&&(t.animationState&&t.animationState.setActive(le.Hover,e),n&&n(i,o))}}const Me=(t,e)=>!!e&&(t===e||Me(t,e.parentElement));function De(t){return s(()=>()=>t(),[])}const Re=(t,e)=>n=>e(t(n)),Le=(...t)=>t.reduce(Re);const Be=("undefined"==typeof process||process.env,"production"),ke=new Set;const je=new WeakMap,Fe=new WeakMap,Oe=t=>{const e=je.get(t.target);e&&e(t)},Ie=t=>{t.forEach(Oe)};function Ue(t,e,n){const i=function({root:t,...e}){const n=t||document;Fe.has(n)||Fe.set(n,{});const i=Fe.get(n),o=JSON.stringify(e);return i[o]||(i[o]=new IntersectionObserver(Ie,{root:t,...e})),i[o]}(e);return je.set(t,n),i.observe(t),()=>{je.delete(t),i.unobserve(t)}}const Ne={some:0,all:1};function $e(t,e,n,{root:i,margin:o,amount:r="some",once:a}){s(()=>{if(!t||!n.current)return;const s={root:null==i?void 0:i.current,rootMargin:o,threshold:"number"==typeof r?r:Ne[r]};return Ue(n.current,s,t=>{const{isIntersecting:i}=t;if(e.isInView===i)return;if(e.isInView=i,a&&!i&&e.hasEnteredView)return;i&&(e.hasEnteredView=!0),n.animationState&&n.animationState.setActive(le.InView,i);const o=n.getProps(),s=i?o.onViewportEnter:o.onViewportLeave;s&&s(t)})},[t,i,o,r])}function ze(t,e,n,{fallback:i=!0}){s(()=>{var o,s;t&&i&&("production"!==Be&&(o="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||ke.has(o)||(console.warn(o),s&&console.warn(s),ke.add(o))),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:t}=n.getProps();t&&t(null),n.animationState&&n.animationState.setActive(le.InView,!0)}))},[t])}const He=t=>e=>(t(e),null),We={inView:He((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:i,viewport:o={}}){const s=r({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||i);o.once&&s.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?ze:$e)(a,s.current,t,o)})),tap:He((function({onTap:t,onTapStart:e,onTapCancel:n,whileTap:i,visualElement:o}){const s=t||e||n||i,a=r(!1),l=r(null),u={passive:!(e||t||n||m)};function c(){l.current&&l.current(),l.current=null}function h(){return c(),a.current=!1,o.animationState&&o.animationState.setActive(le.Tap,!1),!Ae()}function d(e,i){h()&&(Me(o.current,e.target)?t&&t(e,i):n&&n(e,i))}function p(t,e){h()&&n&&n(t,e)}function m(t,n){c(),a.current||(a.current=!0,l.current=Le(we(window,"pointerup",d,u),we(window,"pointercancel",p,u)),o.animationState&&o.animationState.setActive(le.Tap,!0),e&&e(t,n))}Pe(o,"pointerdown",s?m:void 0,u),De(c)})),focus:He((function({whileFocus:t,visualElement:e}){const{animationState:n}=e;ce(e,"focus",t?()=>{n&&n.setActive(le.Focus,!0)}:void 0),ce(e,"blur",t?()=>{n&&n.setActive(le.Focus,!1)}:void 0)})),hover:He((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:i}){Pe(i,"pointerenter",t||n?Ce(i,!0,t):void 0,{passive:!t}),Pe(i,"pointerleave",e||n?Ce(i,!1,e):void 0,{passive:!e})}))};function Ye(){const t=i(m);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:o}=t,r=h();s(()=>o(r),[]);return!e&&n?[!1,()=>n&&n(r)]:[!0]}function Xe(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Ge=t=>1e3*t;const Ze=t=>t,qe=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Ke(t,e,n,i){if(t===e&&n===i)return Ze;const o=e=>function(t,e,n,i,o){let s,r,a=0;do{r=e+(n-e)/2,s=qe(r,i,o)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:qe(o(t),e,i)}const _e=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Je=t=>e=>1-t(1-e),Qe=t=>t*t,tn=Je(Qe),en=_e(Qe),nn=t=>1-Math.sin(Math.acos(t)),on=Je(nn),sn=_e(on),rn=(t=1.525)=>e=>e*e*((t+1)*e-t),an=rn(),ln=Je(an),un=_e(an),cn=(t=>{const e=rn(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(),hn={linear:Ze,easeIn:Qe,easeInOut:en,easeOut:tn,circIn:nn,circInOut:sn,circOut:on,backIn:an,backInOut:un,backOut:ln,anticipate:cn},dn=t=>{if(Array.isArray(t)){t.length;const[e,n,i,o]=t;return Ke(e,n,i,o)}return"string"==typeof t?hn[t]:t},pn=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Tt.test(e)||e.startsWith("url("))),mn=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),fn=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),gn=()=>({type:"keyframes",ease:"linear",duration:.3}),vn=t=>({type:"keyframes",duration:.8,values:t}),yn={x:mn,y:mn,z:mn,rotate:mn,rotateX:mn,rotateY:mn,rotateZ:mn,scaleX:fn,scaleY:fn,scale:fn,opacity:gn,backgroundColor:gn,color:gn,default:fn},xn=(t,e)=>{let n;return n=te(e)?vn:yn[t]||yn.default,{to:e,...n(e)}},bn={...Dt,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:Ct,WebkitFilter:Ct},wn=t=>bn[t];function Pn(t,e){var n;let i=wn(t);return i!==Ct&&(i=Tt),null===(n=i.getAnimatableNone)||void 0===n?void 0:n.call(i,e)}const Vn=!1,Tn="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Sn="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Tn()),1/60*1e3);let En=!0,An=!1,Cn=!1;const Mn={delta:0,timestamp:0},Dn=["read","update","preRender","render","postRender"],Rn=Dn.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],i=0,o=!1,s=!1;const r=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const l=a&&o,u=l?e:n;return s&&r.add(t),-1===u.indexOf(t)&&(u.push(t),l&&o&&(i=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:l=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,i=e.length,i)for(let n=0;n<i;n++){const i=e[n];i(l),r.has(i)&&(a.schedule(i),t())}o=!1,s&&(s=!1,a.process(l))}}};return a}(()=>An=!0),t),{}),Ln=Dn.reduce((t,e)=>{const n=Rn[e];return t[e]=(t,e=!1,i=!1)=>(An||On(),n.schedule(t,e,i)),t},{}),Bn=Dn.reduce((t,e)=>(t[e]=Rn[e].cancel,t),{}),kn=Dn.reduce((t,e)=>(t[e]=()=>Rn[e].process(Mn),t),{}),jn=t=>Rn[t].process(Mn),Fn=t=>{An=!1,Mn.delta=En?1/60*1e3:Math.max(Math.min(t-Mn.timestamp,40),1),Mn.timestamp=t,Cn=!0,Dn.forEach(jn),Cn=!1,An&&(En=!1,Sn(Fn))},On=()=>{An=!0,En=!0,Cn||Sn(Fn)},In=()=>Mn;function Un(t,e){const n=performance.now(),i=({timestamp:o})=>{const s=o-n;s>=e&&(Bn.read(i),t(s-e))};return Ln.read(i,!0),()=>Bn.read(i)}const Nn=(t,e,n)=>Math.min(Math.max(n,t),e),$n=(t,e,n)=>-n*t+n*e+t;function zn(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 Hn=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},Wn=[yt,vt,mt];function Yn(t){const e=(n=t,Wn.find(t=>t.test(n)));var n;let i=e.parse(t);return e===mt&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let o=0,s=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;o=zn(a,i,t+1/3),s=zn(a,i,t),r=zn(a,i,t-1/3)}else o=s=r=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*r),alpha:i}}(i)),i}const Xn=(t,e)=>{const n=Yn(t),i=Yn(e),o={...n};return t=>(o.red=Hn(n.red,i.red,t),o.green=Hn(n.green,i.green,t),o.blue=Hn(n.blue,i.blue,t),o.alpha=$n(n.alpha,i.alpha,t),vt.transform(o))};function Gn(t,e){return"number"==typeof t?n=>$n(t,e,n):xt.test(t)?Xn(t,e):_n(t,e)}const Zn=(t,e)=>{const n=[...t],i=n.length,o=t.map((t,n)=>Gn(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=o[e](t);return n}},qn=(t,e)=>{const n={...t,...e},i={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(i[o]=Gn(t[o],e[o]));return t=>{for(const e in i)n[e]=i[e](t);return n}};function Kn(t){const e=Tt.parse(t),n=e.length;let i=0,o=0;for(let t=0;t<n;t++)i||"number"==typeof e[t]?i++:o++;return{parsed:e,numNumbers:i,numColors:o}}const _n=(t,e)=>{const n=Tt.createTransformer(e),i=Kn(t),o=Kn(e);return i.numColors===o.numColors&&i.numNumbers>=o.numNumbers?Le(Zn(i.parsed,o.parsed),n):n=>""+(n>0?e:t)},Jn=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},Qn=(t,e)=>n=>$n(t,e,n);function ti(t,e,n){const i=[],o=n||("number"==typeof(s=t[0])?Qn:"string"==typeof s?xt.test(s)?Xn:_n:Array.isArray(s)?Zn:"object"==typeof s?qn:Qn);var s;const r=t.length-1;for(let n=0;n<r;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=Le(t,s)}i.push(s)}return i}function ei(t,e,{clamp:n=!0,ease:i,mixer:o}={}){const s=t.length;e.length,!i||!Array.isArray(i)||i.length,t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=ti(e,i,o),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Jn(t[n],t[n+1],e);return r[n](i)};return n?e=>l(Nn(t[0],t[s-1],e)):l}function ni(t,e){return t.map(()=>e||en).splice(0,t.length-1)}function ii({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let o,s,r=1-e;r=Nn(.05,1,r),t=Nn(.01,10,t/1e3),r<1?(o=e=>{const i=e*r,o=i*t;return.001-(i-n)/oi(e,r)*Math.exp(-o)},s=e=>{const i=e*r*t,s=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=oi(Math.pow(e,2),r);return(.001-o(e)>0?-1:1)*((s-a)*l)/u}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function oi(t,e){return t*Math.sqrt(1-e*e)}const si=["duration","bounce"],ri=["stiffness","damping","mass"];function ai(t,e){return e.some(e=>void 0!==t[e])}function li({from:t=0,to:e=1,restSpeed:n=2,restDelta:i=.01,...o}){const s={done:!1,value:t};let{stiffness:r,damping:a,mass:l,velocity:u,duration:c,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ai(t,ri)&&ai(t,si)){const n=ii(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(o),d=ui,p=ui;function m(){const n=u?-u/1e3:0,o=e-t,s=a/(2*Math.sqrt(r*l)),c=Math.sqrt(r/l)/1e3;if(void 0===i&&(i=Math.min(Math.abs(e-t)/100,.4)),s<1){const t=oi(c,s);d=i=>{const r=Math.exp(-s*c*i);return e-r*((n+s*c*o)/t*Math.sin(t*i)+o*Math.cos(t*i))},p=e=>{const i=Math.exp(-s*c*e);return s*c*i*(Math.sin(t*e)*(n+s*c*o)/t+o*Math.cos(t*e))-i*(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=i=>{const r=Math.exp(-s*c*i),a=Math.min(t*i,300);return e-r*((n+s*c*o)*Math.sinh(a)+t*o*Math.cosh(a))/t}}}return m(),{next:t=>{const o=d(t);if(h)s.done=t>=c;else{const r=1e3*p(t),a=Math.abs(r)<=n,l=Math.abs(e-o)<=i;s.done=a&&l}return s.value=s.done?e:o,s},flipTarget:()=>{u=-u,[t,e]=[e,t],m()}}}li.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ui=t=>0;const ci={decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:i=350,restDelta:o=.5,modifyTarget:s}){const r={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===s?l:s(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/i);return r.done=!(e>o||e<-o),r.value=r.done?u:u+e,r},flipTarget:()=>{}}},keyframes:function({from:t=0,to:e=1,ease:n,offset:i,duration:o=300}){const s={done:!1,value:t},r=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(i&&i.length===r.length?i:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(r),o);function l(){return ei(a,r,{ease:Array.isArray(n)?n:ni(r,n)})}let u=l();return{next:t=>(s.value=u(t),s.done=t>=o,s),flipTarget:()=>{r.reverse(),u=l()}}},spring:li};function hi(t,e,n=0){return t-e-n}const di=t=>{const e=({delta:e})=>t(e);return{start:()=>Ln.update(e,!0),stop:()=>Bn.update(e)}};function pi({from:t,autoplay:e=!0,driver:n=di,elapsed:i=0,repeat:o=0,repeatType:s="loop",repeatDelay:r=0,onPlay:a,onStop:l,onComplete:u,onRepeat:c,onUpdate:h,type:d="keyframes",...p}){var m,f;let g,v,y,{to:x}=p,b=0,w=p.duration,P=!1,V=!0;const T=ci[Array.isArray(x)?"keyframes":d];(null===(f=(m=T).needsInterpolation)||void 0===f?void 0:f.call(m,t,x))&&(y=ei([0,100],[t,x],{clamp:!1}),t=0,x=100);const S=T({...p,from:t,to:x});function E(){b++,"reverse"===s?(V=b%2==0,i=function(t,e=0,n=0,i=!0){return i?hi(e+-t,e,n):e-(t-e)+n}(i,w,r,V)):(i=hi(i,w,r),"mirror"===s&&S.flipTarget()),P=!1,c&&c()}function A(t){if(V||(t=-t),i+=t,!P){const t=S.next(Math.max(0,i));v=t.value,y&&(v=y(v)),P=V?t.done:i<=0}null==h||h(v),P&&(0===b&&(null!=w||(w=i)),b<o?function(t,e,n,i){return i?t>=e+n:t<=-n}(i,w,r,V)&&E():(g.stop(),u&&u()))}return e&&(null==a||a(),g=n(A),g.start()),{stop:()=>{null==l||l(),g.stop()}}}function mi(t,e){return e?t*(1e3/e):0}function fi({ease:t,times:e,yoyo:n,flip:i,loop:o,...s}){const r={...s};return e&&(r.offset=e),s.duration&&(r.duration=Ge(s.duration)),s.repeatDelay&&(r.repeatDelay=Ge(s.repeatDelay)),t&&(r.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(dn):dn(t)),"tween"===s.type&&(r.type="keyframes"),(n||o||i)&&(n?r.repeatType="reverse":o?r.repeatType="loop":i&&(r.repeatType="mirror"),r.repeat=o||n||i||s.repeat),"spring"!==s.type&&(r.type="keyframes"),r}function gi(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:i,staggerDirection:o,repeat:s,repeatType:r,repeatDelay:a,from:l,...u}){return!!Object.keys(u).length}(t)||(t={...t,...xn(n,e.to)}),{...e,...fi(t)}}function vi(t,e,n,i,o){const s=bi(i,t)||{};let r=void 0!==s.from?s.from:e.get();const a=pn(t,n);"none"===r&&a&&"string"==typeof n?r=Pn(t,n):yi(r)&&"string"==typeof n?r=xi(n):!Array.isArray(n)&&yi(n)&&"string"==typeof r&&(n=xi(r));return pn(t,r)&&a&&!1!==s.type?function(){const i={from:r,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:i,power:o=.8,timeConstant:s=750,bounceStiffness:r=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:h,onComplete:d,onStop:p}){let m;function f(t){return void 0!==n&&t<n||void 0!==i&&t>i}function g(t){return void 0===n?i:void 0===i||Math.abs(n-t)<Math.abs(i-t)?n:i}function v(t){null==m||m.stop(),m=pi({...t,driver:c,onUpdate:e=>{var n;null==h||h(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:p})}function y(t){v({type:"spring",stiffness:r,damping:a,restDelta:l,...t})}if(f(t))y({from:t,velocity:e,to:g(t)});else{let i=o*e+t;void 0!==u&&(i=u(i));const r=g(i),a=r===n?-1:1;let c,h;const d=t=>{c=h,h=t,e=mi(t-c,In().delta),(1===a&&t>r||-1===a&&t<r)&&y({from:t,to:r,velocity:e})};v({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:l,modifyTarget:u,onUpdate:f(i)?d:void 0})}return{stop:()=>null==m?void 0:m.stop()}}({...i,...s}):pi({...gi(s,i,t),onUpdate:t=>{i.onUpdate(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{i.onComplete(),s.onComplete&&s.onComplete()}})}:function(){const t=ee(n);return e.set(t),o(),s.onUpdate&&s.onUpdate(t),s.onComplete&&s.onComplete(),{stop:()=>{}}}}function yi(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function xi(t){return"number"==typeof t?0:Pn("",t)}function bi(t,e){return t[e]||t.default||t}function wi(t,e,n,i={}){return Vn&&(i={type:!1}),e.start(o=>{let s;const r=vi(t,e,n,i,o),a=function(t,e){var n,i;return null!==(i=null!==(n=(bi(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==i?i:0}(i,t),l=()=>s=r();let u;return a?u=Un(l,Ge(a)):l(),()=>{u&&u(),s&&s.stop()}})}const Pi=t=>/^0[^.\s]+$/.test(t);function Vi(t,e){-1===t.indexOf(e)&&t.push(e)}function Ti(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Si{constructor(){this.subscriptions=[]}add(t){return Vi(this.subscriptions,t),()=>Ti(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let o=0;o<i;o++){const i=this.subscriptions[o];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Ei{constructor(t){var e;this.version="7.6.18",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Si,this.velocityUpdateSubscribers=new Si,this.renderSubscribers=new Si,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:i}=In();this.lastUpdated!==i&&(this.timeDelta=n,this.lastUpdated=i,Ln.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=()=>Ln.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?mi(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 Ai(t){return new Ei(t)}const Ci=t=>e=>e.test(t),Mi=[nt,lt,at,rt,ct,ut,{test:t=>"auto"===t,parse:t=>t}],Di=t=>Mi.find(Ci(t)),Ri=[...Mi,xt,Tt],Li=t=>Ri.find(Ci(t));function Bi(t,e,n){const i=t.getProps();return Qt(i,e,void 0!==n?n:i.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 ki(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ai(n))}function ji(t,e){if(!e)return;return(e[t]||e.default||e).from}function Fi(t){return Boolean(Y(t)&&t.add)}function Oi(t,e,n={}){var i;const o=Bi(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const r=o?()=>Ii(t,o,n):()=>Promise.resolve(),a=(null===(i=t.variantChildren)||void 0===i?void 0:i.size)?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,o=1,s){const r=[],a=(t.variantChildren.size-1)*i,l=1===o?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Ui).forEach((t,i)=>{r.push(Oi(t,e,{...s,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(e)}return Promise.all([r(),a(n.delay)])}function Ii(t,e,{delay:n=0,transitionOverride:i,type:o}={}){var s;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");i&&(r=i);const c=[],h=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in l){const i=t.getValue(e),o=l[e];if(!i||void 0===o||h&&Ni(h,e))continue;let s={delay:n,...r};t.shouldReduceMotion&&H.has(e)&&(s={...s,type:!1,delay:0});let a=wi(e,i,o,s);Fi(u)&&(u.add(e),a=a.then(()=>u.remove(e))),c.push(a)}return Promise.all(c).then(()=>{a&&function(t,e){const n=Bi(t,e);let{transitionEnd:i={},transition:o={},...s}=n?t.makeTargetAnimatable(n,!1):{};s={...s,...i};for(const e in s){ki(t,e,ee(s[e]))}}(t,a)})}function Ui(t,e){return t.sortNodePosition(e)}function Ni({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}const $i=[le.Animate,le.InView,le.Focus,le.Hover,le.Tap,le.Drag,le.Exit],zi=[...$i].reverse(),Hi=$i.length;function Wi(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Oi(t,e,n));i=Promise.all(o)}else if("string"==typeof e)i=Oi(t,e,n);else{const o="function"==typeof e?Bi(t,e,n.custom):e;i=Ii(t,o,n)}return i.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function Yi(t){let e=Wi(t);const n={[le.Animate]:Gi(!0),[le.InView]:Gi(),[le.Hover]:Gi(),[le.Tap]:Gi(),[le.Drag]:Gi(),[le.Focus]:Gi(),[le.Exit]:Gi()};let i=!0;const o=(e,n)=>{const i=Bi(t,n);if(i){const{transition:t,transitionEnd:n,...o}=i;e={...e,...o,...n}}return e};function s(s,r){var a;const l=t.getProps(),u=t.getVariantContext(!0)||{},c=[],h=new Set;let d={},p=1/0;for(let e=0;e<Hi;e++){const m=zi[e],f=n[m],g=null!==(a=l[m])&&void 0!==a?a:u[m],v=b(g),y=m===r?f.isActive:null;!1===y&&(p=e);let x=g===u[m]&&g!==l[m]&&v;if(x&&i&&t.manuallyAnimateOnMount&&(x=!1),f.protectedKeys={...d},!f.isActive&&null===y||!g&&!f.prevProp||w(g)||"boolean"==typeof g)continue;const P=Xi(f.prevProp,g);let V=P||m===r&&f.isActive&&!x&&v||e>p&&v;const T=Array.isArray(g)?g:[g];let S=T.reduce(o,{});!1===y&&(S={});const{prevResolvedValues:E={}}=f,A={...E,...S},C=t=>{V=!0,h.delete(t),f.needsAnimating[t]=!0};for(const t in A){const e=S[t],n=E[t];d.hasOwnProperty(t)||(e!==n?te(e)&&te(n)?!Xe(e,n)||P?C(t):f.protectedKeys[t]=!0:void 0!==e?C(t):h.add(t):void 0!==e&&h.has(t)?C(t):f.protectedKeys[t]=!0)}f.prevProp=g,f.prevResolvedValues=S,f.isActive&&(d={...d,...S}),i&&t.blockInitialAnimation&&(V=!1),V&&!x&&c.push(...T.map(t=>({animation:t,options:{type:m,...s}})))}if(h.size){const e={};h.forEach(n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)}),c.push({animation:e})}let m=Boolean(c.length);return i&&!1===l.initial&&!t.manuallyAnimateOnMount&&(m=!1),i=!1,m?e(c):Promise.resolve()}return{animateChanges:s,setActive:function(e,i,o){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const a=s(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Xi(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Xe(e,t)}function Gi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const Zi={animation:He(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=Yi(t)),w(e)&&s(()=>e.subscribe(t),[e])}),exit:He(t=>{const{custom:e,visualElement:n}=t,[o,r]=Ye(),a=i(m);s(()=>{n.isPresent=o;const t=n.animationState&&n.animationState.setActive(le.Exit,!o,{custom:a&&a.custom||e});t&&!o&&t.then(r)},[o])})},qi=(t,e)=>Math.abs(t-e);class Ki{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Qi(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=qi(t.x,e.x),i=qi(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:o}=In();this.history.push({...i,timestamp:o});const{onStart:s,onMove:r}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=_i(e,this.transformPagePoint),he(t)&&0===t.buttons?this.handlePointerUp(t,e):Ln.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i}=this.handlers,o=Qi(_i(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},de(t)&&t.touches.length>1)return;this.handlers=e,this.transformPagePoint=n;const i=_i(ge(t),this.transformPagePoint),{point:o}=i,{timestamp:s}=In();this.history=[{...o,timestamp:s}];const{onSessionStart:r}=e;r&&r(t,Qi(i,this.history)),this.removeListeners=Le(we(window,"pointermove",this.handlePointerMove),we(window,"pointerup",this.handlePointerUp),we(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bn.update(this.updatePoint)}}function _i(t,e){return e?{point:e(t.point)}:t}function Ji(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Qi({point:t},e){return{point:t,delta:Ji(t,eo(e)),offset:Ji(t,to(e)),velocity:no(e,.1)}}function to(t){return t[0]}function eo(t){return t[t.length-1]}function no(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const o=eo(t);for(;n>=0&&(i=t[n],!(o.timestamp-i.timestamp>Ge(e)));)n--;if(!i)return{x:0,y:0};const s=(o.timestamp-i.timestamp)/1e3;if(0===s)return{x:0,y:0};const r={x:(o.x-i.x)/s,y:(o.y-i.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function io(t){return t.max-t.min}function oo(t,e=0,n=.01){return Math.abs(t-e)<=n}function so(t,e,n,i=.5){t.origin=i,t.originPoint=$n(e.min,e.max,t.origin),t.scale=io(n)/io(e),(oo(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=$n(n.min,n.max,t.origin)-t.originPoint,(oo(t.translate)||isNaN(t.translate))&&(t.translate=0)}function ro(t,e,n,i){so(t.x,e.x,n.x,null==i?void 0:i.originX),so(t.y,e.y,n.y,null==i?void 0:i.originY)}function ao(t,e,n){t.min=n.min+e.min,t.max=t.min+io(e)}function lo(t,e,n){t.min=e.min-n.min,t.max=t.min+io(e)}function uo(t,e,n){lo(t.x,e.x,n.x),lo(t.y,e.y,n.y)}function co(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ho(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const po=.35;function mo(t,e,n){return{min:fo(t,e),max:fo(t,n)}}function fo(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}function go(t){return[t("x"),t("y")]}function vo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function yo(t){return void 0===t||1===t}function xo({scale:t,scaleX:e,scaleY:n}){return!yo(t)||!yo(e)||!yo(n)}function bo(t){return xo(t)||wo(t)||t.z||t.rotate||t.rotateX||t.rotateY}function wo(t){return Po(t.x)||Po(t.y)}function Po(t){return t&&"0%"!==t}function Vo(t,e,n){return n+e*(t-n)}function To(t,e,n,i,o){return void 0!==o&&(t=Vo(t,o,i)),Vo(t,n,i)+e}function So(t,e=0,n=1,i,o){t.min=To(t.min,e,n,i,o),t.max=To(t.max,e,n,i,o)}function Eo(t,{x:e,y:n}){So(t.x,e.translate,e.scale,e.originPoint),So(t.y,n.translate,n.scale,n.originPoint)}function Ao(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Co(t,e){t.min=t.min+e,t.max=t.max+e}function Mo(t,e,[n,i,o]){const s=void 0!==e[o]?e[o]:.5,r=$n(t.min,t.max,s);So(t,e[n],e[i],r,e.scale)}const Do=["x","scaleX","originX"],Ro=["y","scaleY","originY"];function Lo(t,e){Mo(t.x,e,Do),Mo(t.y,e,Ro)}function Bo(t,e){return vo(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const ko=new WeakMap;class jo{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new Ki(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(ge(t,"page").point)},onStart:(t,e)=>{var n;const{drag:i,dragPropagation:o,onDragStart:s}=this.getProps();(!i||o||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ee(i),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),go(t=>{var e,n;let i=this.getAxisMotionValue(t).get()||0;if(at.test(i)){const o=null===(n=null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===n?void 0:n.layoutBox[t];if(o){i=io(o)*(parseFloat(i)/100)}}this.originPoint[t]=i}),null==s||s(t,e),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(le.Drag,!0))},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:o,onDrag:s}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&(null==o||o(this.currentDirection)));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),null==s||s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:o}=this.getProps();null==o||o(t,e)}cancel(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(le.Drag,!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Fo(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?$n(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?$n(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;t&&x(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:o}){return{x:co(t.x,n,o),y:co(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=po){return!1===t?t=0:!0===t&&(t=po),{x:mo(t,"left","right"),y:mo(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&go(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!x(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=function(t,e,n){const i=Bo(t,n),{scroll:o}=e;return o&&(Co(i.x,o.offset.x),Co(i.y,o.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let s=function(t,e){return{x:ho(t.x,e.x),y:ho(t.y,e.y)}}(i.layout.layoutBox,o);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(s));this.hasMutatedConstraints=!!t,t&&(s=vo(t))}return s}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=go(r=>{var l;if(!Fo(r,e,this.currentDirection))return;let u=null!==(l=null==a?void 0:a[r])&&void 0!==l?l:{};s&&(u={min:0,max:0});const c=i?200:1e6,h=i?40:1e7,d={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...u};return this.startAxisValueAnimation(r,d)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){return wi(t,this.getAxisMotionValue(t),0,e)}stopAnimation(){go(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var e,n;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,null!==(n=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==n?n:0)}snapToCursor(t){go(e=>{const{drag:n}=this.getProps();if(!Fo(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.layoutBox[e];o.set(t[e]-$n(n,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!x(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};go(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();o[t]=function(t,e){let n=.5;const i=io(t),o=io(e);return o>i?n=Jn(e.min,e.max-i,t.min):i>o&&(n=Jn(t.min,t.max-o,e.min)),Nn(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),go(t=>{if(!Fo(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:s}=this.constraints[t];n.set($n(i,s,o[t]))})}addListeners(){var t;if(!this.visualElement.current)return;ko.set(this.visualElement,this);const e=we(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),n=()=>{const{dragConstraints:t}=this.getProps();x(t)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout()),n();const s=ue(window,"resize",()=>this.scalePositionWithinConstraints()),r=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(go(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),e(),o(),null==r||r()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=po,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:r}}}function Fo(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Oo={pan:He((function({onPan:t,onPanStart:e,onPanEnd:n,onPanSessionStart:o,visualElement:a}){const l=t||e||n||o,u=r(null),{transformPagePoint:c}=i(d),h={onSessionStart:o,onStart:e,onMove:t,onEnd:(t,e)=>{u.current=null,n&&n(t,e)}};s(()=>{null!==u.current&&u.current.updateHandlers(h)}),Pe(a,"pointerdown",l&&function(t){u.current=new Ki(t,h,{transformPagePoint:c})}),De(()=>u.current&&u.current.end())})),drag:He((function(t){const{dragControls:e,visualElement:n}=t,i=M(()=>new jo(n));s(()=>e&&e.subscribe(i),[i,e]),s(()=>i.addListeners(),[i])}))};function Io(t){return"string"==typeof t&&t.startsWith("var(--")}const Uo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function No(t,e,n=1){const[i,o]=function(t){const e=Uo.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():Io(o)?No(o,e,n+1):o}const $o=new Set(["width","height","top","left","right","bottom","x","y"]),zo=t=>$o.has(t),Ho=(t,e)=>{t.set(e,!1),t.set(e)},Wo=t=>t===nt||t===lt;var Yo;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Yo||(Yo={}));const Xo=(t,e)=>parseFloat(t.split(", ")[e]),Go=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const o=i.match(/^matrix3d\((.+)\)$/);if(o)return Xo(o[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?Xo(e[1],t):0}},Zo=new Set(["x","y","z"]),qo=z.filter(t=>!Zo.has(t));const Ko={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:Go(4,13),y:Go(5,14)},_o=(t,e,n={},i={})=>{e={...e},i={...i};const o=Object.keys(e).filter(zo);let s=[],r=!1;const a=[];if(o.forEach(o=>{const l=t.getValue(o);if(!t.hasValue(o))return;let u=n[o],c=Di(u);const h=e[o];let d;if(te(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=Di(u);for(let n=e;n<t;n++)d?Di(h[n]):d=Di(h[n])}else d=Di(h);if(c!==d)if(Wo(c)&&Wo(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[o]=parseFloat(h):Array.isArray(h)&&d===lt&&(e[o]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?l.set(d.transform(u)):e[o]=c.transform(h):(r||(s=function(t){const e=[];return qo.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(o),i[o]=void 0!==i[o]?i[o]:e[o],Ho(l,h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const i=e.measureViewportBox(),o=e.current,s=getComputedStyle(o),{display:r}=s,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Ko[t](i,s)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const i=e.getValue(n);Ho(i,a[n]),t[n]=Ko[n](l,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),f&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:i}}return{target:e,transitionEnd:i}};function Jo(t,e,n,i){return(t=>Object.keys(t).some(zo))(e)?_o(t,e,n,i):{target:e,transitionEnd:i}}const Qo=(t,e,n,i)=>{const o=function(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!Io(e))return;const n=No(e,i);n&&t.set(n)});for(const t in e){const o=e[t];if(!Io(o))continue;const s=No(o,i);s&&(e[t]=s,n&&void 0===n[t]&&(n[t]=o))}return{target:e,transitionEnd:n}}(t,e,i);return Jo(t,e=o.target,n,i=o.transitionEnd)},ts={current:null},es={current:!1};const ns=Object.keys(C),is=ns.length,os=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const ss=["initial",...$i],rs=ss.length;class as extends class{constructor({parent:t,props:e,reducedMotionConfig:n,visualState:i},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=()=>Ln.render(this.render,!1,!0);const{latestValues:s,renderState:r}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=r,this.parent=t,this.props=e,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=V(e),this.isVariantNode=T(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:a,...l}=this.scrapeMotionValuesFromProps(e);for(const t in l){const e=l[t];void 0!==s[t]&&Y(e)&&(e.set(s[t],!1),Fi(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)),es.current||function(){if(es.current=!0,f)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ts.current=t.matches;t.addListener(e),e()}else ts.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ts.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(),Bn.update(this.notifyUpdate),Bn.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=H.has(t),i=e.onChange(e=>{this.latestValues[t]=e,this.props.onUpdate&&Ln.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures(t,e,n,i,o,s){const r=[];for(let e=0;e<is;e++){const n=ns[e],{isEnabled:i,Component:o}=C[n];i(t)&&o&&r.push(c(o,{key:n,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:a,layoutScroll:l}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||a&&x(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:l})}return r}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<os.length;e++){const n=os[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){const{willChange:i}=e;for(const o in e){const s=e[o],r=n[o];if(Y(s))t.addValue(o,s),Fi(i)&&i.add(o);else if(Y(r))t.addValue(o,Ai(s)),Fi(i)&&i.remove(o);else if(r!==s)if(t.hasValue(o)){const e=t.getValue(o);!e.hasAnimated&&e.set(s)}else{const e=t.getStaticValue(o);t.addValue(o,Ai(void 0!==e?e:s))}}for(const i in n)void 0===e[i]&&t.removeValue(i);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 i={};for(let t=0;t<rs;t++){const e=ss[t],n=this.props[e];(b(n)||!1===n)&&(i[e]=n)}return i}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=Ai(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,i="string"==typeof n||"object"==typeof n?null===(e=Qt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const o=this.getBaseTargetFromProps(this.props,t);return void 0===o||Y(o)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new Si),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:i},o){let s=function(t,e,n){var i;const o={};for(const s in t){const t=ji(s,e);o[s]=void 0!==t?t:null===(i=n.getValue(s))||void 0===i?void 0:i.get()}return o}(n,t||{},this);if(i&&(e&&(e=i(e)),n&&(n=i(n)),s&&(s=i(s))),o){!function(t,e,n){var i,o;const s=Object.keys(e).filter(e=>!t.hasValue(e)),r=s.length;if(r)for(let a=0;a<r;a++){const r=s[a],l=e[r];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(o=null!==(i=n[r])&&void 0!==i?i:t.readValue(r))&&void 0!==o?o:e[r]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||Pi(u))?u=parseFloat(u):!Li(u)&&Tt.test(l)&&(u=Pn(r,l)),t.addValue(r,Ai(u)),void 0===n[r]&&(n[r]=u),null!==u&&t.setBaseTarget(r,u))}}(this,n,s);const t=Qo(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class ls extends as{readValueFromInstance(t,e){if(H.has(e)){const t=wn(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),o=(Z(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Bo(t,e)}build(t,e,n,i){Rt(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t){return _t(t)}renderInstance(t,e,n,i){Zt(t,e,n,i)}}class us extends as{getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){var n;return H.has(e)?(null===(n=wn(e))||void 0===n?void 0:n.default)||0:(e=qt.has(e)?e:Gt(e),t.getAttribute(e))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t){return Jt(t)}build(t,e,n,i){Ht(t,e,n,i.transformTemplate)}renderInstance(t,e,n,i){Kt(t,e,0,i)}}const cs=(t,e)=>N(t)?new us(e,{enableHardwareAcceleration:!1}):new ls(e,{enableHardwareAcceleration:!0});function hs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ds={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!lt.test(t))return t;t=parseFloat(t)}return`${hs(t,e.target.x)}% ${hs(t,e.target.y)}%`}},ps={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,o=t.includes("var("),s=[];o&&(t=t.replace(Uo,t=>(s.push(t),"_$css")));const r=Tt.parse(t);if(r.length>5)return i;const a=Tt.createTransformer(t),l="number"!=typeof r[0]?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;r[0+l]/=u,r[1+l]/=c;const h=$n(u,c,.5);"number"==typeof r[2+l]&&(r[2+l]/=h),"number"==typeof r[3+l]&&(r[3+l]/=h);let d=a(r);if(o){let t=0;d=d.replace("_$css",()=>{const e=s[t];return t++,e})}return d}};class ms extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;var s;s=fs,Object.assign($,s),o&&(e.group&&e.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),D.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:o}=this.props,s=n.projection;return s?(s.isPresent=o,i||t.layoutDependency!==e||void 0===e?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Ln.postRender(()=>{var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),(null==e?void 0:e.group)&&e.group.remove(i),(null==n?void 0:n.deregister)&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;null==t||t()}render(){return null}}const fs={borderRadius:{...ds,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ds,borderTopRightRadius:ds,borderBottomLeftRadius:ds,borderBottomRightRadius:ds,boxShadow:ps},gs={measureLayout:function(t){const[n,o]=Ye(),s=i(L);return e.createElement(ms,{...t,layoutGroup:s,switchLayoutGroup:i(k),isPresent:n,safeToRemove:o})}};const vs=["TopLeft","TopRight","BottomLeft","BottomRight"],ys=vs.length,xs=t=>"string"==typeof t?parseFloat(t):t,bs=t=>"number"==typeof t||lt.test(t);function ws(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}const Ps=Ts(0,.5,on),Vs=Ts(.5,.95,Ze);function Ts(t,e,n){return i=>i<t?0:i>e?1:n(Jn(t,e,i))}function Ss(t,e){t.min=e.min,t.max=e.max}function Es(t,e){Ss(t.x,e.x),Ss(t.y,e.y)}function As(t,e,n,i,o){return t=Vo(t-=e,1/n,i),void 0!==o&&(t=Vo(t,1/o,i)),t}function Cs(t,e,[n,i,o],s,r){!function(t,e=0,n=1,i=.5,o,s=t,r=t){if(at.test(e)){e=parseFloat(e);e=$n(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=$n(s.min,s.max,i);t===s&&(a-=e),t.min=As(t.min,e,n,a,o),t.max=As(t.max,e,n,a,o)}(t,e[n],e[i],e[o],e.scale,s,r)}const Ms=["x","scaleX","originX"],Ds=["y","scaleY","originY"];function Rs(t,e,n,i){Cs(t.x,e,Ms,null==n?void 0:n.x,null==i?void 0:i.x),Cs(t.y,e,Ds,null==n?void 0:n.y,null==i?void 0:i.y)}function Ls(t){return 0===t.translate&&1===t.scale}function Bs(t){return Ls(t.x)&&Ls(t.y)}function ks(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function js(t){return io(t.x)/io(t.y)}class Fs{constructor(){this.members=[]}add(t){Vi(this.members,t),t.scheduleRender()}remove(t){if(Ti(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){var n;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;!1===o&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var e,n,i,o,s;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(s=null===(i=t.resumingFrom)||void 0===i?void 0:(o=i.options).onExitComplete)||void 0===s||s.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Os(t,e,n){let i="";const o=t.x.translate/e.x,s=t.y.translate/e.y;if((o||s)&&(i=`translate3d(${o}px, ${s}px, 0) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:o}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),o&&(i+=`rotateY(${o}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+=`scale(${r}, ${a})`),i||"none"}const Is=(t,e)=>t.depth-e.depth;class Us{constructor(){this.children=[],this.isDirty=!1}add(t){Vi(this.children,t),this.isDirty=!0}remove(t){Ti(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Is),this.isDirty=!1,this.children.forEach(t)}}const Ns=["","X","Y","Z"];let $s=0;function zs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(t,n={},i=(null==e?void 0:e())){this.id=$s++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Ys),this.nodes.forEach(Ks),this.nodes.forEach(_s)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=n,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Us)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Si),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);null==n||n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){var i;if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:o,layout:s,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),null===(i=this.parent)||void 0===i||i.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(s||o)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Un(i,250),D.hasAnimatedSinceResize&&(D.hasAnimatedSinceResize=!1,this.nodes.forEach(qs))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&r&&(o||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{var o,s,a,l,u;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const c=null!==(s=null!==(o=this.options.transition)&&void 0!==o?o:r.getDefaultTransition())&&void 0!==s?s:ir,{onLayoutAnimationStart:h,onLayoutAnimationComplete:d}=r.getProps(),p=!this.targetLayout||!ks(this.targetLayout,i)||n,m=!e&&n;if((null===(a=this.resumeFrom)||void 0===a?void 0:a.instance)||m||e&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,m);const e={...bi(c,"layout"),onPlay:h,onComplete:d};r.shouldReduceMotion&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||qs(this),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=i})}unmount(){var t,e;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(t=this.getStack())||void 0===t||t.remove(this),null===(e=this.parent)||void 0===e||e.children.delete(this),this.instance=void 0,Bn.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1}startUpdate(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(Js),this.animationId++)}willUpdate(t=!0){var e,n,i;if(this.root.isUpdateBlocked())return void(null===(n=(e=this.options).onExitComplete)||void 0===n||n.call(e));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot")}const{layoutId:o,layout:s}=this.options;if(void 0===o&&!s)return;const r=null===(i=this.options.visualElement)||void 0===i?void 0:i.getProps().transformTemplate;this.prevTransformTemplateValue=null==r?void 0:r(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Gs);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(or),this.potentialNodes.clear()),this.nodes.forEach(Zs),this.nodes.forEach(Hs),this.nodes.forEach(Ws),this.clearAllSnapshots(),kn.update(),kn.preRender(),kn.render())}clearAllSnapshots(){this.nodes.forEach(Xs),this.sharedNodes.forEach(Qs)}scheduleUpdateProjection(){Ln.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Ln.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){var t;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),null===(t=this.options.visualElement)||void 0===t||t.notify("LayoutMeasure",this.layout.layoutBox,null==e?void 0:e.layoutBox)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){var t;if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!Bs(this.projectionDelta),i=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,s=null==i?void 0:i(this.latestValues,""),r=s!==this.prevTransformTemplateValue;e&&(n||bo(this.latestValues)||r)&&(o(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),sr((i=n).x),sr(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Co(e.x,n.offset.x),Co(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Es(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:o,options:s}=i;if(i!==this.root&&o&&s.layoutScroll){if(o.isRoot){Es(e,t);const{scroll:n}=this.root;n&&(Co(e.x,-n.offset.x),Co(e.y,-n.offset.y))}Co(e.x,o.offset.x),Co(e.y,o.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Es(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Lo(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),bo(i.latestValues)&&Lo(n,i.latestValues)}return bo(this.latestValues)&&Lo(n,this.latestValues),n}removeTransform(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};Es(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!i.instance)continue;if(!bo(i.latestValues))continue;xo(i.latestValues)&&i.updateSnapshot();const o={x:{min:0,max:0},y:{min:0,max:0}};Es(o,i.measurePageBox()),Rs(n,i.latestValues,null===(e=i.snapshot)||void 0===e?void 0:e.layoutBox,o)}return bo(this.latestValues)&&Rs(n,this.latestValues),n}setTargetDelta(t){this.targetDelta=t,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var t;const e=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;const{layout:n,layoutId:i}=this.options;if(this.layout&&(n||i)){if(!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},uo(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Es(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,s,r;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(t=this.relativeParent)||void 0===t?void 0:t.target)?(o=this.target,s=this.relativeTarget,r=this.relativeParent.target,ao(o.x,s.x,r.x),ao(o.y,s.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Es(this.target,this.layout.layoutBox),Eo(this.target,this.targetDelta)):Es(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},uo(this.relativeTargetOrigin,this.target,t.target),Es(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!xo(this.parent.latestValues)&&!wo(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var t;const{isProjectionDirty:e,isTransformDirty:n}=this;this.isProjectionDirty=this.isTransformDirty=!1;const i=this.getLead(),o=Boolean(this.resumingFrom)||this!==i;let s=!0;if(e&&(s=!1),o&&n&&(s=!1),s)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean((null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;Es(this.layoutCorrected,this.layout.layoutBox),function(t,e,n,i=!1){var o,s;const r=n.length;if(!r)return;let a,l;e.x=e.y=1;for(let u=0;u<r;u++)a=n[u],l=a.projectionDelta,"contents"!==(null===(s=null===(o=a.instance)||void 0===o?void 0:o.style)||void 0===s?void 0:s.display)&&(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Lo(t,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(e.x*=l.x.scale,e.y*=l.y.scale,Eo(t,l)),i&&bo(a.latestValues)&&Lo(t,a.latestValues));e.x=Ao(e.x),e.y=Ao(e.y)}(this.layoutCorrected,this.treeScale,this.path,o);const{target:l}=i;if(!l)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const u=this.treeScale.x,c=this.treeScale.y,h=this.projectionTransform;ro(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=Os(this.projectionDelta,this.treeScale),this.projectionTransform===h&&this.treeScale.x===u&&this.treeScale.y===c||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e,n,i;null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(i=this.getStack())||void 0===i||i.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){var n,i;const o=this.snapshot,s=(null==o?void 0:o.latestValues)||{},r={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!e;const l={x:{min:0,max:0},y:{min:0,max:0}},u=(null==o?void 0:o.source)!==(null===(n=this.layout)||void 0===n?void 0:n.source),c=((null===(i=this.getStack())||void 0===i?void 0:i.members.length)||0)<=1,h=Boolean(u&&!c&&!0===this.options.crossfade&&!this.path.some(nr));this.animationProgress=0,this.mixTargetDelta=e=>{var n;const i=e/1e3;var o,d,p,m;tr(a.x,t.x,i),tr(a.y,t.y,i),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(uo(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),o=this.relativeTarget,d=this.relativeTargetOrigin,p=l,m=i,er(o.x,d.x,p.x,m),er(o.y,d.y,p.y,m)),u&&(this.animationValues=r,function(t,e,n,i,o,s){var r,a,l,u;o?(t.opacity=$n(0,null!==(r=n.opacity)&&void 0!==r?r:1,Ps(i)),t.opacityExit=$n(null!==(a=e.opacity)&&void 0!==a?a:1,0,Vs(i))):s&&(t.opacity=$n(null!==(l=e.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,i));for(let o=0;o<ys;o++){const s=`border${vs[o]}Radius`;let r=ws(e,s),a=ws(n,s);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||bs(r)===bs(a)?(t[s]=Math.max($n(xs(r),xs(a),i),0),(at.test(a)||at.test(r))&&(t[s]+="%")):t[s]=a}(e.rotate||n.rotate)&&(t.rotate=$n(e.rotate||0,n.rotate||0,i))}(r,s,this.latestValues,i,h,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(0)}startAnimation(t){var e,n;this.notifyListeners("animationStart"),null===(e=this.currentAnimation)||void 0===e||e.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(Bn.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ln.update(()=>{D.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n={}){const i=Y(t)?t:Ai(t);return wi("",i,e,n),{stop:()=>i.stop(),isAnimating:()=>i.isAnimating()}}(0,1e3,{...t,onUpdate:e=>{var n;this.mixTargetDelta(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:()=>{var e;null===(e=t.onComplete)||void 0===e||e.call(t),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var t;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(t=this.getStack())||void 0===t||t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:o}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&rr(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=io(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=io(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Es(e,n),Lo(e,o),ro(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){var n,i,o;this.sharedNodes.has(t)||this.sharedNodes.set(t,new Fs);this.sharedNodes.get(t).add(e),e.promote({transition:null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(i=e.options.initialPromotionConfig)||void 0===i?void 0:i.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(i,e)})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let e=0;e<Ns.length;e++){const o="rotate"+Ns[e];n[o]&&(i[o]=n[o],t.setStaticValue(o,0))}null==t||t.render();for(const e in i)t.setStaticValue(e,i[e]);t.scheduleRender()}getProjectionStyles(t={}){var e,n,i;const o={};if(!this.instance||this.isSVG)return o;if(!this.isVisible)return{visibility:"hidden"};o.visibility="";const s=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,o.opacity="",o.pointerEvents=ne(t.pointerEvents)||"",o.transform=s?s(this.latestValues,""):"none",o;const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ne(t.pointerEvents)||""),this.hasProjected&&!bo(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const a=r.animationValues||r.latestValues;this.applyTransformsToTarget(),o.transform=Os(this.projectionDeltaWithTransform,this.treeScale,a),s&&(o.transform=s(a,o.transform));const{x:l,y:u}=this.projectionDelta;o.transformOrigin=`${100*l.origin}% ${100*u.origin}% 0`,r.animationValues?o.opacity=r===this?null!==(i=null!==(n=a.opacity)&&void 0!==n?n:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:o.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const t in $){if(void 0===a[t])continue;const{correct:e,applyTo:n}=$[t],i=e(a[t],r);if(n){const t=n.length;for(let e=0;e<t;e++)o[n[e]]=i}else o[t]=i}return this.options.layoutId&&(o.pointerEvents=r===this?ne(t.pointerEvents)||"":"none"),o}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Gs),this.root.sharedNodes.clear()}}}function Hs(t){t.updateLayout()}function Ws(t){var e,n,i;const o=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&o&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:n}=t.layout,{animationType:i}=t.options,s=o.source!==t.layout.source;"size"===i?go(t=>{const n=s?o.measuredBox[t]:o.layoutBox[t],i=io(n);n.min=e[t].min,n.max=n.min+i}):rr(i,o.layoutBox,e)&&go(t=>{const n=s?o.measuredBox[t]:o.layoutBox[t],i=io(e[t]);n.max=n.min+i});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ro(r,e,o.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?ro(a,t.applyTransform(n,!0),o.measuredBox):ro(a,e,o.layoutBox);const l=!Bs(r);let u=!1;if(!t.resumeFrom){const n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:t,layout:i}=n;if(t&&i){const n={x:{min:0,max:0},y:{min:0,max:0}};uo(n,o.layoutBox,t.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};uo(s,e,i.layoutBox),ks(n,s)||(u=!0)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:o,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else t.isLead()&&(null===(i=(n=t.options).onExitComplete)||void 0===i||i.call(n));t.options.transition=void 0}function Ys(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function Xs(t){t.clearSnapshot()}function Gs(t){t.clearMeasurements()}function Zs(t){const{visualElement:e}=t.options;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function qs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Ks(t){t.resolveTargetDelta()}function _s(t){t.calcProjection()}function Js(t){t.resetRotation()}function Qs(t){t.removeLeadSnapshot()}function tr(t,e,n){t.translate=$n(e.translate,0,n),t.scale=$n(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function er(t,e,n,i){t.min=$n(e.min,n.min,i),t.max=$n(e.max,n.max,i)}function nr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ir={duration:.45,ease:[.4,0,.1,1]};function or(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const i=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function sr(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function rr(t,e,n){return"position"===t||"preserve-aspect"===t&&!oo(js(e),js(n),.2)}const ar=zs({attachResizeListener:(t,e)=>ue(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lr={current:void 0},ur=zs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!lr.current){const t=new ar(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),lr.current=t}return lr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),cr={...Zi,...We,...Oo,...gs},hr=I((t,e)=>ae(t,e,cr,cs,ur));function dr(t){return F(ae(t,{forwardMotionProps:!1},cr,cs,ur))}export{dr as createDomMotionComponent,hr as motion};
|
|
1
|
+
import*as t from"react";import e,{createContext as n,useContext as i,useLayoutEffect as o,useEffect as s,useRef as r,useCallback as a,useMemo as l,forwardRef as u,createElement as c,useId as h}from"react";const d=n({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),p=n({});const m=n(null),f="undefined"!=typeof document,g=f?o:s,v=n({strict:!1});function y(t,e,n,o){const a=i(p).visualElement,l=i(v),u=i(m),c=i(d).reducedMotion,h=r();o=o||l.renderer,!h.current&&o&&(h.current=o(t,{visualState:e,parent:a,props:n,presenceId:u?u.id:void 0,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:c}));const f=h.current;return g(()=>{f&&f.render()}),s(()=>{f&&f.animationState&&f.animationState.animateChanges()}),g(()=>()=>f&&f.notify("Unmount"),[]),f}function x(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function b(t){return"string"==typeof t||Array.isArray(t)}function w(t){return"object"==typeof t&&"function"==typeof t.start}const P=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function V(t){return w(t.animate)||P.some(e=>b(t[e]))}function T(t){return Boolean(V(t)||t.variants)}function S(t){const{initial:e,animate:n}=function(t,e){if(V(t)){const{initial:e,animate:n}=t;return{initial:!1===e||b(e)?e:void 0,animate:b(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,i(p));return l(()=>({initial:e,animate:n}),[E(e),E(n)])}function E(t){return Array.isArray(t)?t.join(" "):t}const A=t=>({isEnabled:e=>t.some(t=>!!e[t])}),C={measureLayout:A(["layout","layoutId","drag"]),animation:A(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:A(["exit"]),drag:A(["drag","dragControls"]),focus:A(["whileFocus"]),hover:A(["whileHover","onHoverStart","onHoverEnd"]),tap:A(["whileTap","onTap","onTapStart","onTapCancel"]),pan:A(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:A(["whileInView","onViewportEnter","onViewportLeave"])};function M(t){const e=r(null);return null===e.current&&(e.current=t()),e.current}const D={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let L=1;const R=n({});class B extends e.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:e}=this.props;return t&&t.setProps(e),null}componentDidUpdate(){}render(){return this.props.children}}const k=n({}),j=Symbol.for("motionComponentSymbol");function F({preloadedFeatures:e,createVisualElement:n,projectionNodeConstructor:o,useRender:s,useVisualState:r,Component:l}){e&&function(t){for(const e in t)"projectionNodeConstructor"===e?C.projectionNodeConstructor=t[e]:C[e].Component=t[e]}(e);const c=u((function(u,c){const h={...i(d),...u,layoutId:O(u)},{isStatic:m}=h;let g=null;const b=S(u),w=m?void 0:M(()=>{if(D.hasEverUpdated)return L++}),P=r(u,m);if(!m&&f){b.visualElement=y(l,P,h,n);const t=i(v).strict,s=i(k);b.visualElement&&(g=b.visualElement.loadFeatures(h,t,e,w,o||C.projectionNodeConstructor,s))}return t.createElement(B,{visualElement:b.visualElement,props:h},g,t.createElement(p.Provider,{value:b},s(l,u,w,function(t,e,n){return a(i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):x(n)&&(n.current=i))},[e])}(P,b.visualElement,c),P,m,b.visualElement)))}));return c[j]=l,c}function O({layoutId:t}){const e=i(R).id;return e&&void 0!==t?e+"-"+t:t}function I(t){function e(e,n={}){return F(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const U=["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 N(t){return"string"==typeof t&&!t.includes("-")&&!!(U.indexOf(t)>-1||/[A-Z]/.test(t))}const $={};const z=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],H=new Set(z);function W(t,{layout:e,layoutId:n}){return H.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!$[t]||"opacity"===t)}const Y=t=>!!(null==t?void 0:t.getVelocity),X={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G=(t,e)=>z.indexOf(t)-z.indexOf(e);function Z(t){return t.startsWith("--")}const q=(t,e)=>e&&"number"==typeof t?e.transform(t):t,K=(t,e)=>n=>Math.max(Math.min(n,e),t),_=t=>t%1?Number(t.toFixed(5)):t,J=/(-)?([\d]*\.?[\d])+/g,Q=/(#[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,tt=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function et(t){return"string"==typeof t}const nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},it=Object.assign(Object.assign({},nt),{transform:K(0,1)}),ot=Object.assign(Object.assign({},nt),{default:1}),st=t=>({test:e=>et(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),rt=st("deg"),at=st("%"),lt=st("px"),ut=st("vh"),ct=st("vw"),ht=Object.assign(Object.assign({},at),{parse:t=>at.parse(t)/100,transform:t=>at.transform(100*t)}),dt=(t,e)=>n=>Boolean(et(n)&&tt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),pt=(t,e,n)=>i=>{if(!et(i))return i;const[o,s,r,a]=i.match(J);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},mt={test:dt("hsl","hue"),parse:pt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+at.transform(_(e))+", "+at.transform(_(n))+", "+_(it.transform(i))+")"},ft=K(0,255),gt=Object.assign(Object.assign({},nt),{transform:t=>Math.round(ft(t))}),vt={test:dt("rgb","red"),parse:pt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+gt.transform(t)+", "+gt.transform(e)+", "+gt.transform(n)+", "+_(it.transform(i))+")"};const yt={test:dt("#"),parse:function(t){let e="",n="",i="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),i=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),i=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,i+=i,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}},transform:vt.transform},xt={test:t=>vt.test(t)||yt.test(t)||mt.test(t),parse:t=>vt.test(t)?vt.parse(t):mt.test(t)?mt.parse(t):yt.parse(t),transform:t=>et(t)?t:t.hasOwnProperty("red")?vt.transform(t):mt.transform(t)};function bt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const i=t.match(Q);i&&(n=i.length,t=t.replace(Q,"${c}"),e.push(...i.map(xt.parse)));const o=t.match(J);return o&&(t=t.replace(J,"${n}"),e.push(...o.map(nt.parse))),{values:e,numColors:n,tokenised:t}}function wt(t){return bt(t).values}function Pt(t){const{values:e,numColors:n,tokenised:i}=bt(t),o=e.length;return t=>{let e=i;for(let i=0;i<o;i++)e=e.replace(i<n?"${c}":"${n}",i<n?xt.transform(t[i]):_(t[i]));return e}}const Vt=t=>"number"==typeof t?0:t;const Tt={test:function(t){var e,n,i,o;return isNaN(t)&&et(t)&&(null!==(n=null===(e=t.match(J))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(i=t.match(Q))||void 0===i?void 0:i.length)&&void 0!==o?o:0)>0},parse:wt,createTransformer:Pt,getAnimatableNone:function(t){const e=wt(t);return Pt(t)(e.map(Vt))}},St=new Set(["brightness","contrast","saturate","opacity"]);function Et(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(J)||[];if(!i)return t;const o=n.replace(i,"");let s=St.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+o+")"}const At=/([a-z-]*)\(.*?\)/g,Ct=Object.assign(Object.assign({},Tt),{getAnimatableNone:t=>{const e=t.match(At);return e?e.map(Et).join(" "):t}}),Mt={...nt,transform:Math.round},Dt={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,radius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,size:lt,top:lt,right:lt,bottom:lt,left:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,rotate:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:rt,skewX:rt,skewY:rt,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:it,originX:ht,originY:ht,originZ:lt,zIndex:Mt,fillOpacity:it,strokeOpacity:it,numOctaves:Mt};function Lt(t,e,n,i){const{style:o,vars:s,transform:r,transformKeys:a,transformOrigin:l}=t;a.length=0;let u=!1,c=!1,h=!0;for(const t in e){const n=e[t];if(Z(t)){s[t]=n;continue}const i=Dt[t],d=q(n,i);if(H.has(t)){if(u=!0,r[t]=d,a.push(t),!h)continue;n!==(i.default||0)&&(h=!1)}else t.startsWith("origin")?(c=!0,l[t]=d):o[t]=d}if(e.transform||(u||i?o.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:i=!0},o,s){let r="";e.sort(G);for(const n of e)r+=`${X[n]||n}(${t[n]}) `;return n&&!t.z&&(r+="translateZ(0)"),r=r.trim(),s?r=s(t,o?"":r):i&&o&&(r="none"),r}(t,n,h,i):o.transform&&(o.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=l;o.transformOrigin=`${t} ${e} ${n}`}}const Rt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Bt(t,e,n){for(const i in e)Y(e[i])||W(i,n)||(t[i]=e[i])}function kt(t,e,n){const i={};return Bt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},e,n){return l(()=>{const i={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return Lt(i,e,{enableHardwareAcceleration:!n},t),Object.assign({},i.vars,i.style)},[e])}(t,e,n)),t.transformValues?t.transformValues(i):i}function jt(t,e,n){const i={},o=kt(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),i.style=o,i}const Ft=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 Ot(t){return Ft.has(t)}let It=t=>!Ot(t);try{(Ut=require("@emotion/is-prop-valid").default)&&(It=t=>t.startsWith("on")?!Ot(t):Ut(t))}catch(t){}var Ut;function Nt(t,e,n){return"string"==typeof t?t:lt.transform(e+n*t)}const $t={offset:"stroke-dashoffset",array:"stroke-dasharray"},zt={offset:"strokeDashoffset",array:"strokeDasharray"};function Ht(t,{attrX:e,attrY:n,originX:i,originY:o,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...l},u,c,h){if(Lt(t,l,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Nt(e,t.x,t.width)} ${Nt(n,t.y,t.height)}`}(m,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&function(t,e,n=1,i=0,o=!0){t.pathLength=1;const s=o?$t:zt;t[s.offset]=lt.transform(-i);const r=lt.transform(e),a=lt.transform(n);t[s.array]=`${r} ${a}`}(d,s,r,a,!1)}const Wt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}}),Yt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Xt(t,e,n,i){const o=l(()=>{const n={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return Ht(n,e,{enableHardwareAcceleration:!1},Yt(i),t.transformTemplate),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};Bt(e,t.style,t),o.style={...e,...o.style}}return o}function Gt(t=!1){return(e,n,i,o,{latestValues:s},r)=>{const a=(N(e)?Xt:jt)(n,s,r,e),l={...function(t,e,n){const i={};for(const o in t)(It(o)||!0===n&&Ot(o)||!e&&!Ot(o)||t.draggable&&o.startsWith("onDrag"))&&(i[o]=t[o]);return i}(n,"string"==typeof e,t),...a,ref:o};return i&&(l["data-projection-id"]=i),c(e,l)}}const Zt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function qt(t,{style:e,vars:n},i,o){Object.assign(t.style,e,o&&o.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const Kt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function _t(t,e,n,i){qt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Kt.has(n)?n:Zt(n),e.attrs[n])}function Jt(t){const{style:e}=t,n={};for(const i in e)(Y(e[i])||W(i,t))&&(n[i]=e[i]);return n}function Qt(t){const e=Jt(t);for(const n in t)if(Y(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function te(t,e,n,i={},o={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,o)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,o)),e}const ee=t=>Array.isArray(t),ne=t=>ee(t)?t[t.length-1]||0:t;function ie(t){const e=Y(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const oe=t=>(e,n)=>{const o=i(p),s=i(m),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,o,s){const r={latestValues:se(i,o,s,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,e,o,s);return n?r():M(r)};function se(t,e,n,i){const o={},s=i(t);for(const t in s)o[t]=ie(s[t]);let{initial:r,animate:a}=t;const l=V(t),u=T(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!w(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=te(t,e);if(!n)return;const{transitionEnd:i,transition:s,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(o[t]=e)}for(const t in i)o[t]=i[t]})}return o}const re={useVisualState:oe({scrapeMotionValuesFromProps:Qt,createRenderState:Wt,onMount:(t,e,{renderState:n,latestValues:i})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}Ht(n,i,{enableHardwareAcceleration:!1},Yt(e.tagName),t.transformTemplate),_t(e,n)}})},ae={useVisualState:oe({scrapeMotionValuesFromProps:Jt,createRenderState:Rt})};function le(t,{forwardMotionProps:e=!1},n,i,o){return{...N(t)?re:ae,preloadedFeatures:n,useRender:Gt(e),createVisualElement:i,projectionNodeConstructor:o,Component:t}}var ue;function ce(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function he(t,e,n,i){s(()=>{const o=t.current;if(n&&o)return ce(o,e,n,i)},[t,e,n,i])}function de(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function pe(t){return!!t.touches}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(ue||(ue={}));const me={pageX:0,pageY:0};function fe(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||me;return{x:n[e+"X"],y:n[e+"Y"]}}function ge(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}function ve(t,e="page"){return{point:pe(t)?fe(t,e):ge(t,e)}}const ye=(t,e=!1)=>{const n=e=>t(e,ve(e));return e?(i=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&i(t)}):n;var i},xe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},be={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function we(t){return f&&null===window.onpointerdown?t:f&&null===window.ontouchstart?be[t]:f&&null===window.onmousedown?xe[t]:t}function Pe(t,e,n,i){return ce(t,we(e),ye(n,"pointerdown"===e),i)}function Ve(t,e,n,i){return he(t,we(e),n&&ye(n,"pointerdown"===e),i)}function Te(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Se=Te("dragHorizontal"),Ee=Te("dragVertical");function Ae(t){let e=!1;if("y"===t)e=Ee();else if("x"===t)e=Se();else{const t=Se(),n=Ee();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Ce(){const t=Ae(!0);return!t||(t(),!1)}function Me(t,e,n){return(i,o)=>{de(i)&&!Ce()&&(t.animationState&&t.animationState.setActive(ue.Hover,e),n&&n(i,o))}}const De=(t,e)=>!!e&&(t===e||De(t,e.parentElement));function Le(t){return s(()=>()=>t(),[])}const Re=(t,e)=>n=>e(t(n)),Be=(...t)=>t.reduce(Re);const ke=("undefined"==typeof process||process.env,"production"),je=new Set;const Fe=new WeakMap,Oe=new WeakMap,Ie=t=>{const e=Fe.get(t.target);e&&e(t)},Ue=t=>{t.forEach(Ie)};function Ne(t,e,n){const i=function({root:t,...e}){const n=t||document;Oe.has(n)||Oe.set(n,{});const i=Oe.get(n),o=JSON.stringify(e);return i[o]||(i[o]=new IntersectionObserver(Ue,{root:t,...e})),i[o]}(e);return Fe.set(t,n),i.observe(t),()=>{Fe.delete(t),i.unobserve(t)}}const $e={some:0,all:1};function ze(t,e,n,{root:i,margin:o,amount:r="some",once:a}){s(()=>{if(!t||!n.current)return;const s={root:null==i?void 0:i.current,rootMargin:o,threshold:"number"==typeof r?r:$e[r]};return Ne(n.current,s,t=>{const{isIntersecting:i}=t;if(e.isInView===i)return;if(e.isInView=i,a&&!i&&e.hasEnteredView)return;i&&(e.hasEnteredView=!0),n.animationState&&n.animationState.setActive(ue.InView,i);const o=n.getProps(),s=i?o.onViewportEnter:o.onViewportLeave;s&&s(t)})},[t,i,o,r])}function He(t,e,n,{fallback:i=!0}){s(()=>{var o,s;t&&i&&("production"!==ke&&(o="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||je.has(o)||(console.warn(o),s&&console.warn(s),je.add(o))),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:t}=n.getProps();t&&t(null),n.animationState&&n.animationState.setActive(ue.InView,!0)}))},[t])}const We=t=>e=>(t(e),null),Ye={inView:We((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:i,viewport:o={}}){const s=r({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||i);o.once&&s.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?He:ze)(a,s.current,t,o)})),tap:We((function({onTap:t,onTapStart:e,onTapCancel:n,whileTap:i,visualElement:o}){const s=t||e||n||i,a=r(!1),l=r(null),u={passive:!(e||t||n||m)};function c(){l.current&&l.current(),l.current=null}function h(){return c(),a.current=!1,o.animationState&&o.animationState.setActive(ue.Tap,!1),!Ce()}function d(e,i){h()&&(De(o.current,e.target)?t&&t(e,i):n&&n(e,i))}function p(t,e){h()&&n&&n(t,e)}function m(t,n){c(),a.current||(a.current=!0,l.current=Be(Pe(window,"pointerup",d,u),Pe(window,"pointercancel",p,u)),o.animationState&&o.animationState.setActive(ue.Tap,!0),e&&e(t,n))}Ve(o,"pointerdown",s?m:void 0,u),Le(c)})),focus:We((function({whileFocus:t,visualElement:e}){const{animationState:n}=e;he(e,"focus",t?()=>{n&&n.setActive(ue.Focus,!0)}:void 0),he(e,"blur",t?()=>{n&&n.setActive(ue.Focus,!1)}:void 0)})),hover:We((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:i}){Ve(i,"pointerenter",t||n?Me(i,!0,t):void 0,{passive:!t}),Ve(i,"pointerleave",e||n?Me(i,!1,e):void 0,{passive:!e})}))};function Xe(){const t=i(m);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:o}=t,r=h();s(()=>o(r),[]);return!e&&n?[!1,()=>n&&n(r)]:[!0]}function Ge(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Ze=t=>1e3*t;const qe=t=>t,Ke=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function _e(t,e,n,i){if(t===e&&n===i)return qe;const o=e=>function(t,e,n,i,o){let s,r,a=0;do{r=e+(n-e)/2,s=Ke(r,i,o)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Ke(o(t),e,i)}const Je=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Qe=t=>e=>1-t(1-e),tn=t=>t*t,en=Qe(tn),nn=Je(tn),on=t=>1-Math.sin(Math.acos(t)),sn=Qe(on),rn=Je(sn),an=(t=1.525)=>e=>e*e*((t+1)*e-t),ln=an(),un=Qe(ln),cn=Je(ln),hn=(t=>{const e=an(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(),dn={linear:qe,easeIn:tn,easeInOut:nn,easeOut:en,circIn:on,circInOut:rn,circOut:sn,backIn:ln,backInOut:cn,backOut:un,anticipate:hn},pn=t=>{if(Array.isArray(t)){t.length;const[e,n,i,o]=t;return _e(e,n,i,o)}return"string"==typeof t?dn[t]:t},mn=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Tt.test(e)||e.startsWith("url("))),fn=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),gn=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),vn=()=>({type:"keyframes",ease:"linear",duration:.3}),yn=t=>({type:"keyframes",duration:.8,values:t}),xn={x:fn,y:fn,z:fn,rotate:fn,rotateX:fn,rotateY:fn,rotateZ:fn,scaleX:gn,scaleY:gn,scale:gn,opacity:vn,backgroundColor:vn,color:vn,default:gn},bn=(t,e)=>{let n;return n=ee(e)?yn:xn[t]||xn.default,{to:e,...n(e)}},wn={...Dt,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:Ct,WebkitFilter:Ct},Pn=t=>wn[t];function Vn(t,e){var n;let i=Pn(t);return i!==Ct&&(i=Tt),null===(n=i.getAnimatableNone)||void 0===n?void 0:n.call(i,e)}const Tn=!1,Sn="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),En="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Sn()),1/60*1e3);let An=!0,Cn=!1,Mn=!1;const Dn={delta:0,timestamp:0},Ln=["read","update","preRender","render","postRender"],Rn=Ln.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],i=0,o=!1,s=!1;const r=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const l=a&&o,u=l?e:n;return s&&r.add(t),-1===u.indexOf(t)&&(u.push(t),l&&o&&(i=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:l=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,i=e.length,i)for(let n=0;n<i;n++){const i=e[n];i(l),r.has(i)&&(a.schedule(i),t())}o=!1,s&&(s=!1,a.process(l))}}};return a}(()=>Cn=!0),t),{}),Bn=Ln.reduce((t,e)=>{const n=Rn[e];return t[e]=(t,e=!1,i=!1)=>(Cn||In(),n.schedule(t,e,i)),t},{}),kn=Ln.reduce((t,e)=>(t[e]=Rn[e].cancel,t),{}),jn=Ln.reduce((t,e)=>(t[e]=()=>Rn[e].process(Dn),t),{}),Fn=t=>Rn[t].process(Dn),On=t=>{Cn=!1,Dn.delta=An?1/60*1e3:Math.max(Math.min(t-Dn.timestamp,40),1),Dn.timestamp=t,Mn=!0,Ln.forEach(Fn),Mn=!1,Cn&&(An=!1,En(On))},In=()=>{Cn=!0,An=!0,Mn||En(On)},Un=()=>Dn;function Nn(t,e){const n=performance.now(),i=({timestamp:o})=>{const s=o-n;s>=e&&(kn.read(i),t(s-e))};return Bn.read(i,!0),()=>kn.read(i)}const $n=(t,e,n)=>Math.min(Math.max(n,t),e),zn=(t,e,n)=>-n*t+n*e+t;function Hn(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 Wn=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},Yn=[yt,vt,mt];function Xn(t){const e=(n=t,Yn.find(t=>t.test(n)));var n;let i=e.parse(t);return e===mt&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let o=0,s=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;o=Hn(a,i,t+1/3),s=Hn(a,i,t),r=Hn(a,i,t-1/3)}else o=s=r=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*r),alpha:i}}(i)),i}const Gn=(t,e)=>{const n=Xn(t),i=Xn(e),o={...n};return t=>(o.red=Wn(n.red,i.red,t),o.green=Wn(n.green,i.green,t),o.blue=Wn(n.blue,i.blue,t),o.alpha=zn(n.alpha,i.alpha,t),vt.transform(o))};function Zn(t,e){return"number"==typeof t?n=>zn(t,e,n):xt.test(t)?Gn(t,e):Jn(t,e)}const qn=(t,e)=>{const n=[...t],i=n.length,o=t.map((t,n)=>Zn(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=o[e](t);return n}},Kn=(t,e)=>{const n={...t,...e},i={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(i[o]=Zn(t[o],e[o]));return t=>{for(const e in i)n[e]=i[e](t);return n}};function _n(t){const e=Tt.parse(t),n=e.length;let i=0,o=0;for(let t=0;t<n;t++)i||"number"==typeof e[t]?i++:o++;return{parsed:e,numNumbers:i,numColors:o}}const Jn=(t,e)=>{const n=Tt.createTransformer(e),i=_n(t),o=_n(e);return i.numColors===o.numColors&&i.numNumbers>=o.numNumbers?Be(qn(i.parsed,o.parsed),n):n=>""+(n>0?e:t)},Qn=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},ti=(t,e)=>n=>zn(t,e,n);function ei(t,e,n){const i=[],o=n||("number"==typeof(s=t[0])?ti:"string"==typeof s?xt.test(s)?Gn:Jn:Array.isArray(s)?qn:"object"==typeof s?Kn:ti);var s;const r=t.length-1;for(let n=0;n<r;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=Be(t,s)}i.push(s)}return i}function ni(t,e,{clamp:n=!0,ease:i,mixer:o}={}){const s=t.length;e.length,!i||!Array.isArray(i)||i.length,t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=ei(e,i,o),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Qn(t[n],t[n+1],e);return r[n](i)};return n?e=>l($n(t[0],t[s-1],e)):l}function ii(t,e){return t.map(()=>e||nn).splice(0,t.length-1)}function oi({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let o,s,r=1-e;r=$n(.05,1,r),t=$n(.01,10,t/1e3),r<1?(o=e=>{const i=e*r,o=i*t;return.001-(i-n)/si(e,r)*Math.exp(-o)},s=e=>{const i=e*r*t,s=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=si(Math.pow(e,2),r);return(.001-o(e)>0?-1:1)*((s-a)*l)/u}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function si(t,e){return t*Math.sqrt(1-e*e)}const ri=["duration","bounce"],ai=["stiffness","damping","mass"];function li(t,e){return e.some(e=>void 0!==t[e])}function ui({from:t=0,to:e=1,restSpeed:n=2,restDelta:i=.01,...o}){const s={done:!1,value:t};let{stiffness:r,damping:a,mass:l,velocity:u,duration:c,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!li(t,ai)&&li(t,ri)){const n=oi(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(o),d=ci,p=ci;function m(){const n=u?-u/1e3:0,o=e-t,s=a/(2*Math.sqrt(r*l)),c=Math.sqrt(r/l)/1e3;if(void 0===i&&(i=Math.min(Math.abs(e-t)/100,.4)),s<1){const t=si(c,s);d=i=>{const r=Math.exp(-s*c*i);return e-r*((n+s*c*o)/t*Math.sin(t*i)+o*Math.cos(t*i))},p=e=>{const i=Math.exp(-s*c*e);return s*c*i*(Math.sin(t*e)*(n+s*c*o)/t+o*Math.cos(t*e))-i*(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=i=>{const r=Math.exp(-s*c*i),a=Math.min(t*i,300);return e-r*((n+s*c*o)*Math.sinh(a)+t*o*Math.cosh(a))/t}}}return m(),{next:t=>{const o=d(t);if(h)s.done=t>=c;else{const r=1e3*p(t),a=Math.abs(r)<=n,l=Math.abs(e-o)<=i;s.done=a&&l}return s.value=s.done?e:o,s},flipTarget:()=>{u=-u,[t,e]=[e,t],m()}}}ui.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ci=t=>0;const hi={decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:i=350,restDelta:o=.5,modifyTarget:s}){const r={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===s?l:s(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/i);return r.done=!(e>o||e<-o),r.value=r.done?u:u+e,r},flipTarget:()=>{}}},keyframes:function({from:t=0,to:e=1,ease:n,offset:i,duration:o=300}){const s={done:!1,value:t},r=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(i&&i.length===r.length?i:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(r),o);function l(){return ni(a,r,{ease:Array.isArray(n)?n:ii(r,n)})}let u=l();return{next:t=>(s.value=u(t),s.done=t>=o,s),flipTarget:()=>{r.reverse(),u=l()}}},spring:ui};function di(t,e,n=0){return t-e-n}const pi=t=>{const e=({delta:e})=>t(e);return{start:()=>Bn.update(e,!0),stop:()=>kn.update(e)}};function mi({from:t,autoplay:e=!0,driver:n=pi,elapsed:i=0,repeat:o=0,repeatType:s="loop",repeatDelay:r=0,onPlay:a,onStop:l,onComplete:u,onRepeat:c,onUpdate:h,type:d="keyframes",...p}){var m,f;let g,v,y,{to:x}=p,b=0,w=p.duration,P=!1,V=!0;const T=hi[Array.isArray(x)?"keyframes":d];(null===(f=(m=T).needsInterpolation)||void 0===f?void 0:f.call(m,t,x))&&(y=ni([0,100],[t,x],{clamp:!1}),t=0,x=100);const S=T({...p,from:t,to:x});function E(){b++,"reverse"===s?(V=b%2==0,i=function(t,e=0,n=0,i=!0){return i?di(e+-t,e,n):e-(t-e)+n}(i,w,r,V)):(i=di(i,w,r),"mirror"===s&&S.flipTarget()),P=!1,c&&c()}function A(t){if(V||(t=-t),i+=t,!P){const t=S.next(Math.max(0,i));v=t.value,y&&(v=y(v)),P=V?t.done:i<=0}null==h||h(v),P&&(0===b&&(null!=w||(w=i)),b<o?function(t,e,n,i){return i?t>=e+n:t<=-n}(i,w,r,V)&&E():(g.stop(),u&&u()))}return e&&(null==a||a(),g=n(A),g.start()),{stop:()=>{null==l||l(),g.stop()}}}function fi(t,e){return e?t*(1e3/e):0}function gi({ease:t,times:e,...n}){const i={...n};return e&&(i.offset=e),n.duration&&(i.duration=Ze(n.duration)),n.repeatDelay&&(i.repeatDelay=Ze(n.repeatDelay)),t&&(i.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(pn):pn(t)),"tween"===n.type&&(i.type="keyframes"),"spring"!==n.type&&(i.type="keyframes"),i}function vi(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:i,staggerDirection:o,repeat:s,repeatType:r,repeatDelay:a,from:l,...u}){return!!Object.keys(u).length}(t)||(t={...t,...bn(n,e.to)}),{...e,...gi(t)}}function yi(t,e,n,i,o){const s=wi(i,t)||{};let r=void 0!==s.from?s.from:e.get();const a=mn(t,n);"none"===r&&a&&"string"==typeof n?r=Vn(t,n):xi(r)&&"string"==typeof n?r=bi(n):!Array.isArray(n)&&xi(n)&&"string"==typeof r&&(n=bi(r));return mn(t,r)&&a&&!1!==s.type?function(){const i={from:r,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:i,power:o=.8,timeConstant:s=750,bounceStiffness:r=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:h,onComplete:d,onStop:p}){let m;function f(t){return void 0!==n&&t<n||void 0!==i&&t>i}function g(t){return void 0===n?i:void 0===i||Math.abs(n-t)<Math.abs(i-t)?n:i}function v(t){null==m||m.stop(),m=mi({...t,driver:c,onUpdate:e=>{var n;null==h||h(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:p})}function y(t){v({type:"spring",stiffness:r,damping:a,restDelta:l,...t})}if(f(t))y({from:t,velocity:e,to:g(t)});else{let i=o*e+t;void 0!==u&&(i=u(i));const r=g(i),a=r===n?-1:1;let c,h;const d=t=>{c=h,h=t,e=fi(t-c,Un().delta),(1===a&&t>r||-1===a&&t<r)&&y({from:t,to:r,velocity:e})};v({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:l,modifyTarget:u,onUpdate:f(i)?d:void 0})}return{stop:()=>null==m?void 0:m.stop()}}({...i,...s}):mi({...vi(s,i,t),onUpdate:t=>{i.onUpdate(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{i.onComplete(),s.onComplete&&s.onComplete()}})}:function(){const t=ne(n);return e.set(t),o(),s.onUpdate&&s.onUpdate(t),s.onComplete&&s.onComplete(),{stop:()=>{}}}}function xi(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function bi(t){return"number"==typeof t?0:Vn("",t)}function wi(t,e){return t[e]||t.default||t}function Pi(t,e,n,i={}){return Tn&&(i={type:!1}),e.start(o=>{let s;const r=yi(t,e,n,i,o),a=function(t,e){var n,i;return null!==(i=null!==(n=(wi(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==i?i:0}(i,t),l=()=>s=r();let u;return a?u=Nn(l,Ze(a)):l(),()=>{u&&u(),s&&s.stop()}})}const Vi=t=>/^0[^.\s]+$/.test(t);function Ti(t,e){-1===t.indexOf(e)&&t.push(e)}function Si(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Ei{constructor(){this.subscriptions=[]}add(t){return Ti(this.subscriptions,t),()=>Si(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let o=0;o<i;o++){const i=this.subscriptions[o];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Ai{constructor(t){var e;this.version="7.7.0",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ei,this.velocityUpdateSubscribers=new Ei,this.renderSubscribers=new Ei,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:i}=Un();this.lastUpdated!==i&&(this.timeDelta=n,this.lastUpdated=i,Bn.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=()=>Bn.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?fi(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 Ci(t){return new Ai(t)}const Mi=t=>e=>e.test(t),Di=[nt,lt,at,rt,ct,ut,{test:t=>"auto"===t,parse:t=>t}],Li=t=>Di.find(Mi(t)),Ri=[...Di,xt,Tt],Bi=t=>Ri.find(Mi(t));function ki(t,e,n){const i=t.getProps();return te(i,e,void 0!==n?n:i.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 ji(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ci(n))}function Fi(t,e){if(!e)return;return(e[t]||e.default||e).from}function Oi(t){return Boolean(Y(t)&&t.add)}function Ii(t,e,n={}){var i;const o=ki(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const r=o?()=>Ui(t,o,n):()=>Promise.resolve(),a=(null===(i=t.variantChildren)||void 0===i?void 0:i.size)?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,o=1,s){const r=[],a=(t.variantChildren.size-1)*i,l=1===o?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Ni).forEach((t,i)=>{r.push(Ii(t,e,{...s,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(e)}return Promise.all([r(),a(n.delay)])}function Ui(t,e,{delay:n=0,transitionOverride:i,type:o}={}){var s;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");i&&(r=i);const c=[],h=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in l){const i=t.getValue(e),o=l[e];if(!i||void 0===o||h&&$i(h,e))continue;let s={delay:n,...r};t.shouldReduceMotion&&H.has(e)&&(s={...s,type:!1,delay:0});let a=Pi(e,i,o,s);Oi(u)&&(u.add(e),a=a.then(()=>u.remove(e))),c.push(a)}return Promise.all(c).then(()=>{a&&function(t,e){const n=ki(t,e);let{transitionEnd:i={},transition:o={},...s}=n?t.makeTargetAnimatable(n,!1):{};s={...s,...i};for(const e in s){ji(t,e,ne(s[e]))}}(t,a)})}function Ni(t,e){return t.sortNodePosition(e)}function $i({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}const zi=[ue.Animate,ue.InView,ue.Focus,ue.Hover,ue.Tap,ue.Drag,ue.Exit],Hi=[...zi].reverse(),Wi=zi.length;function Yi(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Ii(t,e,n));i=Promise.all(o)}else if("string"==typeof e)i=Ii(t,e,n);else{const o="function"==typeof e?ki(t,e,n.custom):e;i=Ui(t,o,n)}return i.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function Xi(t){let e=Yi(t);const n={[ue.Animate]:Zi(!0),[ue.InView]:Zi(),[ue.Hover]:Zi(),[ue.Tap]:Zi(),[ue.Drag]:Zi(),[ue.Focus]:Zi(),[ue.Exit]:Zi()};let i=!0;const o=(e,n)=>{const i=ki(t,n);if(i){const{transition:t,transitionEnd:n,...o}=i;e={...e,...o,...n}}return e};function s(s,r){var a;const l=t.getProps(),u=t.getVariantContext(!0)||{},c=[],h=new Set;let d={},p=1/0;for(let e=0;e<Wi;e++){const m=Hi[e],f=n[m],g=null!==(a=l[m])&&void 0!==a?a:u[m],v=b(g),y=m===r?f.isActive:null;!1===y&&(p=e);let x=g===u[m]&&g!==l[m]&&v;if(x&&i&&t.manuallyAnimateOnMount&&(x=!1),f.protectedKeys={...d},!f.isActive&&null===y||!g&&!f.prevProp||w(g)||"boolean"==typeof g)continue;const P=Gi(f.prevProp,g);let V=P||m===r&&f.isActive&&!x&&v||e>p&&v;const T=Array.isArray(g)?g:[g];let S=T.reduce(o,{});!1===y&&(S={});const{prevResolvedValues:E={}}=f,A={...E,...S},C=t=>{V=!0,h.delete(t),f.needsAnimating[t]=!0};for(const t in A){const e=S[t],n=E[t];d.hasOwnProperty(t)||(e!==n?ee(e)&&ee(n)?!Ge(e,n)||P?C(t):f.protectedKeys[t]=!0:void 0!==e?C(t):h.add(t):void 0!==e&&h.has(t)?C(t):f.protectedKeys[t]=!0)}f.prevProp=g,f.prevResolvedValues=S,f.isActive&&(d={...d,...S}),i&&t.blockInitialAnimation&&(V=!1),V&&!x&&c.push(...T.map(t=>({animation:t,options:{type:m,...s}})))}if(h.size){const e={};h.forEach(n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)}),c.push({animation:e})}let m=Boolean(c.length);return i&&!1===l.initial&&!t.manuallyAnimateOnMount&&(m=!1),i=!1,m?e(c):Promise.resolve()}return{animateChanges:s,setActive:function(e,i,o){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const a=s(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Gi(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ge(e,t)}function Zi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const qi={animation:We(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=Xi(t)),w(e)&&s(()=>e.subscribe(t),[e])}),exit:We(t=>{const{custom:e,visualElement:n}=t,[o,r]=Xe(),a=i(m);s(()=>{n.isPresent=o;const t=n.animationState&&n.animationState.setActive(ue.Exit,!o,{custom:a&&a.custom||e});t&&!o&&t.then(r)},[o])})},Ki=(t,e)=>Math.abs(t-e);class _i{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=to(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Ki(t.x,e.x),i=Ki(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:o}=Un();this.history.push({...i,timestamp:o});const{onStart:s,onMove:r}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ji(e,this.transformPagePoint),de(t)&&0===t.buttons?this.handlePointerUp(t,e):Bn.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i}=this.handlers,o=to(Ji(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},pe(t)&&t.touches.length>1)return;this.handlers=e,this.transformPagePoint=n;const i=Ji(ve(t),this.transformPagePoint),{point:o}=i,{timestamp:s}=Un();this.history=[{...o,timestamp:s}];const{onSessionStart:r}=e;r&&r(t,to(i,this.history)),this.removeListeners=Be(Pe(window,"pointermove",this.handlePointerMove),Pe(window,"pointerup",this.handlePointerUp),Pe(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),kn.update(this.updatePoint)}}function Ji(t,e){return e?{point:e(t.point)}:t}function Qi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function to({point:t},e){return{point:t,delta:Qi(t,no(e)),offset:Qi(t,eo(e)),velocity:io(e,.1)}}function eo(t){return t[0]}function no(t){return t[t.length-1]}function io(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const o=no(t);for(;n>=0&&(i=t[n],!(o.timestamp-i.timestamp>Ze(e)));)n--;if(!i)return{x:0,y:0};const s=(o.timestamp-i.timestamp)/1e3;if(0===s)return{x:0,y:0};const r={x:(o.x-i.x)/s,y:(o.y-i.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function oo(t){return t.max-t.min}function so(t,e=0,n=.01){return Math.abs(t-e)<=n}function ro(t,e,n,i=.5){t.origin=i,t.originPoint=zn(e.min,e.max,t.origin),t.scale=oo(n)/oo(e),(so(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=zn(n.min,n.max,t.origin)-t.originPoint,(so(t.translate)||isNaN(t.translate))&&(t.translate=0)}function ao(t,e,n,i){ro(t.x,e.x,n.x,null==i?void 0:i.originX),ro(t.y,e.y,n.y,null==i?void 0:i.originY)}function lo(t,e,n){t.min=n.min+e.min,t.max=t.min+oo(e)}function uo(t,e,n){t.min=e.min-n.min,t.max=t.min+oo(e)}function co(t,e,n){uo(t.x,e.x,n.x),uo(t.y,e.y,n.y)}function ho(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function po(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const mo=.35;function fo(t,e,n){return{min:go(t,e),max:go(t,n)}}function go(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}function vo(t){return[t("x"),t("y")]}function yo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function xo(t){return void 0===t||1===t}function bo({scale:t,scaleX:e,scaleY:n}){return!xo(t)||!xo(e)||!xo(n)}function wo(t){return bo(t)||Po(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Po(t){return Vo(t.x)||Vo(t.y)}function Vo(t){return t&&"0%"!==t}function To(t,e,n){return n+e*(t-n)}function So(t,e,n,i,o){return void 0!==o&&(t=To(t,o,i)),To(t,n,i)+e}function Eo(t,e=0,n=1,i,o){t.min=So(t.min,e,n,i,o),t.max=So(t.max,e,n,i,o)}function Ao(t,{x:e,y:n}){Eo(t.x,e.translate,e.scale,e.originPoint),Eo(t.y,n.translate,n.scale,n.originPoint)}function Co(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Mo(t,e){t.min=t.min+e,t.max=t.max+e}function Do(t,e,[n,i,o]){const s=void 0!==e[o]?e[o]:.5,r=zn(t.min,t.max,s);Eo(t,e[n],e[i],r,e.scale)}const Lo=["x","scaleX","originX"],Ro=["y","scaleY","originY"];function Bo(t,e){Do(t.x,e,Lo),Do(t.y,e,Ro)}function ko(t,e){return yo(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const jo=new WeakMap;class Fo{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new _i(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(ve(t,"page").point)},onStart:(t,e)=>{var n;const{drag:i,dragPropagation:o,onDragStart:s}=this.getProps();(!i||o||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ae(i),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vo(t=>{var e,n;let i=this.getAxisMotionValue(t).get()||0;if(at.test(i)){const o=null===(n=null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===n?void 0:n.layoutBox[t];if(o){i=oo(o)*(parseFloat(i)/100)}}this.originPoint[t]=i}),null==s||s(t,e),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(ue.Drag,!0))},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:o,onDrag:s}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&(null==o||o(this.currentDirection)));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),null==s||s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:o}=this.getProps();null==o||o(t,e)}cancel(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(ue.Drag,!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Oo(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?zn(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?zn(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;t&&x(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:o}){return{x:ho(t.x,n,o),y:ho(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=mo){return!1===t?t=0:!0===t&&(t=mo),{x:fo(t,"left","right"),y:fo(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&vo(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!x(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=function(t,e,n){const i=ko(t,n),{scroll:o}=e;return o&&(Mo(i.x,o.offset.x),Mo(i.y,o.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let s=function(t,e){return{x:po(t.x,e.x),y:po(t.y,e.y)}}(i.layout.layoutBox,o);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(s));this.hasMutatedConstraints=!!t,t&&(s=yo(t))}return s}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=vo(r=>{var l;if(!Oo(r,e,this.currentDirection))return;let u=null!==(l=null==a?void 0:a[r])&&void 0!==l?l:{};s&&(u={min:0,max:0});const c=i?200:1e6,h=i?40:1e7,d={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...u};return this.startAxisValueAnimation(r,d)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){return Pi(t,this.getAxisMotionValue(t),0,e)}stopAnimation(){vo(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var e,n;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,null!==(n=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==n?n:0)}snapToCursor(t){vo(e=>{const{drag:n}=this.getProps();if(!Oo(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.layoutBox[e];o.set(t[e]-zn(n,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!x(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};vo(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();o[t]=function(t,e){let n=.5;const i=oo(t),o=oo(e);return o>i?n=Qn(e.min,e.max-i,t.min):i>o&&(n=Qn(t.min,t.max-o,e.min)),$n(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),vo(t=>{if(!Oo(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:s}=this.constraints[t];n.set(zn(i,s,o[t]))})}addListeners(){var t;if(!this.visualElement.current)return;jo.set(this.visualElement,this);const e=Pe(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),n=()=>{const{dragConstraints:t}=this.getProps();x(t)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout()),n();const s=ce(window,"resize",()=>this.scalePositionWithinConstraints()),r=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(vo(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),e(),o(),null==r||r()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=mo,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:r}}}function Oo(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Io={pan:We((function({onPan:t,onPanStart:e,onPanEnd:n,onPanSessionStart:o,visualElement:a}){const l=t||e||n||o,u=r(null),{transformPagePoint:c}=i(d),h={onSessionStart:o,onStart:e,onMove:t,onEnd:(t,e)=>{u.current=null,n&&n(t,e)}};s(()=>{null!==u.current&&u.current.updateHandlers(h)}),Ve(a,"pointerdown",l&&function(t){u.current=new _i(t,h,{transformPagePoint:c})}),Le(()=>u.current&&u.current.end())})),drag:We((function(t){const{dragControls:e,visualElement:n}=t,i=M(()=>new Fo(n));s(()=>e&&e.subscribe(i),[i,e]),s(()=>i.addListeners(),[i])}))};function Uo(t){return"string"==typeof t&&t.startsWith("var(--")}const No=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function $o(t,e,n=1){const[i,o]=function(t){const e=No.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():Uo(o)?$o(o,e,n+1):o}const zo=new Set(["width","height","top","left","right","bottom","x","y"]),Ho=t=>zo.has(t),Wo=(t,e)=>{t.set(e,!1),t.set(e)},Yo=t=>t===nt||t===lt;var Xo;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Xo||(Xo={}));const Go=(t,e)=>parseFloat(t.split(", ")[e]),Zo=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const o=i.match(/^matrix3d\((.+)\)$/);if(o)return Go(o[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?Go(e[1],t):0}},qo=new Set(["x","y","z"]),Ko=z.filter(t=>!qo.has(t));const _o={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:Zo(4,13),y:Zo(5,14)},Jo=(t,e,n={},i={})=>{e={...e},i={...i};const o=Object.keys(e).filter(Ho);let s=[],r=!1;const a=[];if(o.forEach(o=>{const l=t.getValue(o);if(!t.hasValue(o))return;let u=n[o],c=Li(u);const h=e[o];let d;if(ee(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=Li(u);for(let n=e;n<t;n++)d?Li(h[n]):d=Li(h[n])}else d=Li(h);if(c!==d)if(Yo(c)&&Yo(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[o]=parseFloat(h):Array.isArray(h)&&d===lt&&(e[o]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?l.set(d.transform(u)):e[o]=c.transform(h):(r||(s=function(t){const e=[];return Ko.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(o),i[o]=void 0!==i[o]?i[o]:e[o],Wo(l,h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const i=e.measureViewportBox(),o=e.current,s=getComputedStyle(o),{display:r}=s,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=_o[t](i,s)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const i=e.getValue(n);Wo(i,a[n]),t[n]=_o[n](l,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),f&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:i}}return{target:e,transitionEnd:i}};function Qo(t,e,n,i){return(t=>Object.keys(t).some(Ho))(e)?Jo(t,e,n,i):{target:e,transitionEnd:i}}const ts=(t,e,n,i)=>{const o=function(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!Uo(e))return;const n=$o(e,i);n&&t.set(n)});for(const t in e){const o=e[t];if(!Uo(o))continue;const s=$o(o,i);s&&(e[t]=s,n&&void 0===n[t]&&(n[t]=o))}return{target:e,transitionEnd:n}}(t,e,i);return Qo(t,e=o.target,n,i=o.transitionEnd)},es={current:null},ns={current:!1};const is=Object.keys(C),os=is.length,ss=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const rs=["initial",...zi],as=rs.length;class ls extends class{constructor({parent:t,props:e,reducedMotionConfig:n,visualState:i},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=()=>Bn.render(this.render,!1,!0);const{latestValues:s,renderState:r}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=r,this.parent=t,this.props=e,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=V(e),this.isVariantNode=T(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:a,...l}=this.scrapeMotionValuesFromProps(e);for(const t in l){const e=l[t];void 0!==s[t]&&Y(e)&&(e.set(s[t],!1),Oi(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)),ns.current||function(){if(ns.current=!0,f)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>es.current=t.matches;t.addListener(e),e()}else es.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||es.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(),kn.update(this.notifyUpdate),kn.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=H.has(t),i=e.onChange(e=>{this.latestValues[t]=e,this.props.onUpdate&&Bn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures(t,e,n,i,o,s){const r=[];for(let e=0;e<os;e++){const n=is[e],{isEnabled:i,Component:o}=C[n];i(t)&&o&&r.push(c(o,{key:n,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:a,layoutScroll:l}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||a&&x(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:l})}return r}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<ss.length;e++){const n=ss[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){const{willChange:i}=e;for(const o in e){const s=e[o],r=n[o];if(Y(s))t.addValue(o,s),Oi(i)&&i.add(o);else if(Y(r))t.addValue(o,Ci(s)),Oi(i)&&i.remove(o);else if(r!==s)if(t.hasValue(o)){const e=t.getValue(o);!e.hasAnimated&&e.set(s)}else{const e=t.getStaticValue(o);t.addValue(o,Ci(void 0!==e?e:s))}}for(const i in n)void 0===e[i]&&t.removeValue(i);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 i={};for(let t=0;t<as;t++){const e=rs[t],n=this.props[e];(b(n)||!1===n)&&(i[e]=n)}return i}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=Ci(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,i="string"==typeof n||"object"==typeof n?null===(e=te(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const o=this.getBaseTargetFromProps(this.props,t);return void 0===o||Y(o)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new Ei),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:i},o){let s=function(t,e,n){var i;const o={};for(const s in t){const t=Fi(s,e);o[s]=void 0!==t?t:null===(i=n.getValue(s))||void 0===i?void 0:i.get()}return o}(n,t||{},this);if(i&&(e&&(e=i(e)),n&&(n=i(n)),s&&(s=i(s))),o){!function(t,e,n){var i,o;const s=Object.keys(e).filter(e=>!t.hasValue(e)),r=s.length;if(r)for(let a=0;a<r;a++){const r=s[a],l=e[r];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(o=null!==(i=n[r])&&void 0!==i?i:t.readValue(r))&&void 0!==o?o:e[r]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||Vi(u))?u=parseFloat(u):!Bi(u)&&Tt.test(l)&&(u=Vn(r,l)),t.addValue(r,Ci(u)),void 0===n[r]&&(n[r]=u),null!==u&&t.setBaseTarget(r,u))}}(this,n,s);const t=ts(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class us extends ls{readValueFromInstance(t,e){if(H.has(e)){const t=Pn(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),o=(Z(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ko(t,e)}build(t,e,n,i){Lt(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t){return Jt(t)}renderInstance(t,e,n,i){qt(t,e,n,i)}}class cs extends ls{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){var n;return H.has(e)?(null===(n=Pn(e))||void 0===n?void 0:n.default)||0:(e=Kt.has(e)?e:Zt(e),t.getAttribute(e))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t){return Qt(t)}build(t,e,n,i){Ht(t,e,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,n,i){_t(t,e,0,i)}mount(t){this.isSVGTag=Yt(t.tagName),super.mount(t)}}const hs=(t,e)=>N(t)?new cs(e,{enableHardwareAcceleration:!1}):new us(e,{enableHardwareAcceleration:!0});function ds(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ps={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!lt.test(t))return t;t=parseFloat(t)}return`${ds(t,e.target.x)}% ${ds(t,e.target.y)}%`}},ms={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,o=t.includes("var("),s=[];o&&(t=t.replace(No,t=>(s.push(t),"_$css")));const r=Tt.parse(t);if(r.length>5)return i;const a=Tt.createTransformer(t),l="number"!=typeof r[0]?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;r[0+l]/=u,r[1+l]/=c;const h=zn(u,c,.5);"number"==typeof r[2+l]&&(r[2+l]/=h),"number"==typeof r[3+l]&&(r[3+l]/=h);let d=a(r);if(o){let t=0;d=d.replace("_$css",()=>{const e=s[t];return t++,e})}return d}};class fs extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;var s;s=gs,Object.assign($,s),o&&(e.group&&e.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),D.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:o}=this.props,s=n.projection;return s?(s.isPresent=o,i||t.layoutDependency!==e||void 0===e?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Bn.postRender(()=>{var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),(null==e?void 0:e.group)&&e.group.remove(i),(null==n?void 0:n.deregister)&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;null==t||t()}render(){return null}}const gs={borderRadius:{...ps,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ps,borderTopRightRadius:ps,borderBottomLeftRadius:ps,borderBottomRightRadius:ps,boxShadow:ms},vs={measureLayout:function(t){const[n,o]=Xe(),s=i(R);return e.createElement(fs,{...t,layoutGroup:s,switchLayoutGroup:i(k),isPresent:n,safeToRemove:o})}};const ys=["TopLeft","TopRight","BottomLeft","BottomRight"],xs=ys.length,bs=t=>"string"==typeof t?parseFloat(t):t,ws=t=>"number"==typeof t||lt.test(t);function Ps(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}const Vs=Ss(0,.5,sn),Ts=Ss(.5,.95,qe);function Ss(t,e,n){return i=>i<t?0:i>e?1:n(Qn(t,e,i))}function Es(t,e){t.min=e.min,t.max=e.max}function As(t,e){Es(t.x,e.x),Es(t.y,e.y)}function Cs(t,e,n,i,o){return t=To(t-=e,1/n,i),void 0!==o&&(t=To(t,1/o,i)),t}function Ms(t,e,[n,i,o],s,r){!function(t,e=0,n=1,i=.5,o,s=t,r=t){if(at.test(e)){e=parseFloat(e);e=zn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=zn(s.min,s.max,i);t===s&&(a-=e),t.min=Cs(t.min,e,n,a,o),t.max=Cs(t.max,e,n,a,o)}(t,e[n],e[i],e[o],e.scale,s,r)}const Ds=["x","scaleX","originX"],Ls=["y","scaleY","originY"];function Rs(t,e,n,i){Ms(t.x,e,Ds,null==n?void 0:n.x,null==i?void 0:i.x),Ms(t.y,e,Ls,null==n?void 0:n.y,null==i?void 0:i.y)}function Bs(t){return 0===t.translate&&1===t.scale}function ks(t){return Bs(t.x)&&Bs(t.y)}function js(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Fs(t){return oo(t.x)/oo(t.y)}class Os{constructor(){this.members=[]}add(t){Ti(this.members,t),t.scheduleRender()}remove(t){if(Si(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){var n;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;!1===o&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var e,n,i,o,s;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(s=null===(i=t.resumingFrom)||void 0===i?void 0:(o=i.options).onExitComplete)||void 0===s||s.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Is(t,e,n){let i="";const o=t.x.translate/e.x,s=t.y.translate/e.y;if((o||s)&&(i=`translate3d(${o}px, ${s}px, 0) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:o}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),o&&(i+=`rotateY(${o}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+=`scale(${r}, ${a})`),i||"none"}const Us=(t,e)=>t.depth-e.depth;class Ns{constructor(){this.children=[],this.isDirty=!1}add(t){Ti(this.children,t),this.isDirty=!0}remove(t){Si(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Us),this.isDirty=!1,this.children.forEach(t)}}const $s=["","X","Y","Z"];let zs=0;function Hs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(t,n={},i=(null==e?void 0:e())){this.id=zs++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Xs),this.nodes.forEach(_s),this.nodes.forEach(Js)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=n,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ns)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Ei),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);null==n||n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){var i;if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:o,layout:s,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),null===(i=this.parent)||void 0===i||i.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(s||o)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Nn(i,250),D.hasAnimatedSinceResize&&(D.hasAnimatedSinceResize=!1,this.nodes.forEach(Ks))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&r&&(o||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{var o,s,a,l,u;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const c=null!==(s=null!==(o=this.options.transition)&&void 0!==o?o:r.getDefaultTransition())&&void 0!==s?s:or,{onLayoutAnimationStart:h,onLayoutAnimationComplete:d}=r.getProps(),p=!this.targetLayout||!js(this.targetLayout,i)||n,m=!e&&n;if((null===(a=this.resumeFrom)||void 0===a?void 0:a.instance)||m||e&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,m);const e={...wi(c,"layout"),onPlay:h,onComplete:d};r.shouldReduceMotion&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||Ks(this),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=i})}unmount(){var t,e;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(t=this.getStack())||void 0===t||t.remove(this),null===(e=this.parent)||void 0===e||e.children.delete(this),this.instance=void 0,kn.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1}startUpdate(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(Qs),this.animationId++)}willUpdate(t=!0){var e,n,i;if(this.root.isUpdateBlocked())return void(null===(n=(e=this.options).onExitComplete)||void 0===n||n.call(e));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot")}const{layoutId:o,layout:s}=this.options;if(void 0===o&&!s)return;const r=null===(i=this.options.visualElement)||void 0===i?void 0:i.getProps().transformTemplate;this.prevTransformTemplateValue=null==r?void 0:r(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Zs);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(sr),this.potentialNodes.clear()),this.nodes.forEach(qs),this.nodes.forEach(Ws),this.nodes.forEach(Ys),this.clearAllSnapshots(),jn.update(),jn.preRender(),jn.render())}clearAllSnapshots(){this.nodes.forEach(Gs),this.sharedNodes.forEach(tr)}scheduleUpdateProjection(){Bn.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Bn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){var t;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),null===(t=this.options.visualElement)||void 0===t||t.notify("LayoutMeasure",this.layout.layoutBox,null==e?void 0:e.layoutBox)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){var t;if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!ks(this.projectionDelta),i=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,s=null==i?void 0:i(this.latestValues,""),r=s!==this.prevTransformTemplateValue;e&&(n||wo(this.latestValues)||r)&&(o(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),rr((i=n).x),rr(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Mo(e.x,n.offset.x),Mo(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};As(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:o,options:s}=i;if(i!==this.root&&o&&s.layoutScroll){if(o.isRoot){As(e,t);const{scroll:n}=this.root;n&&(Mo(e.x,-n.offset.x),Mo(e.y,-n.offset.y))}Mo(e.x,o.offset.x),Mo(e.y,o.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};As(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Bo(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),wo(i.latestValues)&&Bo(n,i.latestValues)}return wo(this.latestValues)&&Bo(n,this.latestValues),n}removeTransform(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};As(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!i.instance)continue;if(!wo(i.latestValues))continue;bo(i.latestValues)&&i.updateSnapshot();const o={x:{min:0,max:0},y:{min:0,max:0}};As(o,i.measurePageBox()),Rs(n,i.latestValues,null===(e=i.snapshot)||void 0===e?void 0:e.layoutBox,o)}return wo(this.latestValues)&&Rs(n,this.latestValues),n}setTargetDelta(t){this.targetDelta=t,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var t;const e=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;const{layout:n,layoutId:i}=this.options;if(this.layout&&(n||i)){if(!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},co(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),As(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,s,r;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(t=this.relativeParent)||void 0===t?void 0:t.target)?(o=this.target,s=this.relativeTarget,r=this.relativeParent.target,lo(o.x,s.x,r.x),lo(o.y,s.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):As(this.target,this.layout.layoutBox),Ao(this.target,this.targetDelta)):As(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},co(this.relativeTargetOrigin,this.target,t.target),As(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!bo(this.parent.latestValues)&&!Po(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var t;const{isProjectionDirty:e,isTransformDirty:n}=this;this.isProjectionDirty=this.isTransformDirty=!1;const i=this.getLead(),o=Boolean(this.resumingFrom)||this!==i;let s=!0;if(e&&(s=!1),o&&n&&(s=!1),s)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean((null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;As(this.layoutCorrected,this.layout.layoutBox),function(t,e,n,i=!1){var o,s;const r=n.length;if(!r)return;let a,l;e.x=e.y=1;for(let u=0;u<r;u++)a=n[u],l=a.projectionDelta,"contents"!==(null===(s=null===(o=a.instance)||void 0===o?void 0:o.style)||void 0===s?void 0:s.display)&&(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Bo(t,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(e.x*=l.x.scale,e.y*=l.y.scale,Ao(t,l)),i&&wo(a.latestValues)&&Bo(t,a.latestValues));e.x=Co(e.x),e.y=Co(e.y)}(this.layoutCorrected,this.treeScale,this.path,o);const{target:l}=i;if(!l)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const u=this.treeScale.x,c=this.treeScale.y,h=this.projectionTransform;ao(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=Is(this.projectionDelta,this.treeScale),this.projectionTransform===h&&this.treeScale.x===u&&this.treeScale.y===c||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e,n,i;null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(i=this.getStack())||void 0===i||i.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){var n,i;const o=this.snapshot,s=(null==o?void 0:o.latestValues)||{},r={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!e;const l={x:{min:0,max:0},y:{min:0,max:0}},u=(null==o?void 0:o.source)!==(null===(n=this.layout)||void 0===n?void 0:n.source),c=((null===(i=this.getStack())||void 0===i?void 0:i.members.length)||0)<=1,h=Boolean(u&&!c&&!0===this.options.crossfade&&!this.path.some(ir));this.animationProgress=0,this.mixTargetDelta=e=>{var n;const i=e/1e3;var o,d,p,m;er(a.x,t.x,i),er(a.y,t.y,i),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(co(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),o=this.relativeTarget,d=this.relativeTargetOrigin,p=l,m=i,nr(o.x,d.x,p.x,m),nr(o.y,d.y,p.y,m)),u&&(this.animationValues=r,function(t,e,n,i,o,s){var r,a,l,u;o?(t.opacity=zn(0,null!==(r=n.opacity)&&void 0!==r?r:1,Vs(i)),t.opacityExit=zn(null!==(a=e.opacity)&&void 0!==a?a:1,0,Ts(i))):s&&(t.opacity=zn(null!==(l=e.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,i));for(let o=0;o<xs;o++){const s=`border${ys[o]}Radius`;let r=Ps(e,s),a=Ps(n,s);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||ws(r)===ws(a)?(t[s]=Math.max(zn(bs(r),bs(a),i),0),(at.test(a)||at.test(r))&&(t[s]+="%")):t[s]=a}(e.rotate||n.rotate)&&(t.rotate=zn(e.rotate||0,n.rotate||0,i))}(r,s,this.latestValues,i,h,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(0)}startAnimation(t){var e,n;this.notifyListeners("animationStart"),null===(e=this.currentAnimation)||void 0===e||e.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(kn.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bn.update(()=>{D.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n={}){const i=Y(t)?t:Ci(t);return Pi("",i,e,n),{stop:()=>i.stop(),isAnimating:()=>i.isAnimating()}}(0,1e3,{...t,onUpdate:e=>{var n;this.mixTargetDelta(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:()=>{var e;null===(e=t.onComplete)||void 0===e||e.call(t),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var t;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(t=this.getStack())||void 0===t||t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:o}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&ar(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=oo(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=oo(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}As(e,n),Bo(e,o),ao(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){var n,i,o;this.sharedNodes.has(t)||this.sharedNodes.set(t,new Os);this.sharedNodes.get(t).add(e),e.promote({transition:null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(i=e.options.initialPromotionConfig)||void 0===i?void 0:i.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(i,e)})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let e=0;e<$s.length;e++){const o="rotate"+$s[e];n[o]&&(i[o]=n[o],t.setStaticValue(o,0))}null==t||t.render();for(const e in i)t.setStaticValue(e,i[e]);t.scheduleRender()}getProjectionStyles(t={}){var e,n,i;const o={};if(!this.instance||this.isSVG)return o;if(!this.isVisible)return{visibility:"hidden"};o.visibility="";const s=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,o.opacity="",o.pointerEvents=ie(t.pointerEvents)||"",o.transform=s?s(this.latestValues,""):"none",o;const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ie(t.pointerEvents)||""),this.hasProjected&&!wo(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const a=r.animationValues||r.latestValues;this.applyTransformsToTarget(),o.transform=Is(this.projectionDeltaWithTransform,this.treeScale,a),s&&(o.transform=s(a,o.transform));const{x:l,y:u}=this.projectionDelta;o.transformOrigin=`${100*l.origin}% ${100*u.origin}% 0`,r.animationValues?o.opacity=r===this?null!==(i=null!==(n=a.opacity)&&void 0!==n?n:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:o.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const t in $){if(void 0===a[t])continue;const{correct:e,applyTo:n}=$[t],i=e(a[t],r);if(n){const t=n.length;for(let e=0;e<t;e++)o[n[e]]=i}else o[t]=i}return this.options.layoutId&&(o.pointerEvents=r===this?ie(t.pointerEvents)||"":"none"),o}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Zs),this.root.sharedNodes.clear()}}}function Ws(t){t.updateLayout()}function Ys(t){var e,n,i;const o=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&o&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:n}=t.layout,{animationType:i}=t.options,s=o.source!==t.layout.source;"size"===i?vo(t=>{const n=s?o.measuredBox[t]:o.layoutBox[t],i=oo(n);n.min=e[t].min,n.max=n.min+i}):ar(i,o.layoutBox,e)&&vo(t=>{const n=s?o.measuredBox[t]:o.layoutBox[t],i=oo(e[t]);n.max=n.min+i});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ao(r,e,o.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?ao(a,t.applyTransform(n,!0),o.measuredBox):ao(a,e,o.layoutBox);const l=!ks(r);let u=!1;if(!t.resumeFrom){const n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:t,layout:i}=n;if(t&&i){const n={x:{min:0,max:0},y:{min:0,max:0}};co(n,o.layoutBox,t.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};co(s,e,i.layoutBox),js(n,s)||(u=!0)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:o,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else t.isLead()&&(null===(i=(n=t.options).onExitComplete)||void 0===i||i.call(n));t.options.transition=void 0}function Xs(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function Gs(t){t.clearSnapshot()}function Zs(t){t.clearMeasurements()}function qs(t){const{visualElement:e}=t.options;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ks(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function _s(t){t.resolveTargetDelta()}function Js(t){t.calcProjection()}function Qs(t){t.resetRotation()}function tr(t){t.removeLeadSnapshot()}function er(t,e,n){t.translate=zn(e.translate,0,n),t.scale=zn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function nr(t,e,n,i){t.min=zn(e.min,n.min,i),t.max=zn(e.max,n.max,i)}function ir(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const or={duration:.45,ease:[.4,0,.1,1]};function sr(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const i=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function rr(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function ar(t,e,n){return"position"===t||"preserve-aspect"===t&&!so(Fs(e),Fs(n),.2)}const lr=Hs({attachResizeListener:(t,e)=>ce(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ur={current:void 0},cr=Hs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ur.current){const t=new lr(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),ur.current=t}return ur.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),hr={...qi,...Ye,...Io,...vs},dr=I((t,e)=>le(t,e,hr,hs,cr));function pr(t){return F(le(t,{forwardMotionProps:!1},hr,hs,cr))}export{pr as createDomMotionComponent,dr as motion};
|