framer-motion 7.3.1 → 7.3.2

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