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