"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[619],{408:(t,e,i)=>{i.d(e,{O:()=>n,r:()=>s});let n={current:null},s={current:!1}},760:(t,e,i)=>{i.d(e,{N:()=>v});var n=i(5155),s=i(2115),r=i(869),o=i(2885),a=i(7494),l=i(845),h=i(7351),u=i(1508);class d extends s.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){let t=e.offsetParent,i=(0,h.s)(t)&&t.offsetWidth||0,n=this.props.sizeRef.current;n.height=e.offsetHeight||0,n.width=e.offsetWidth||0,n.top=e.offsetTop,n.left=e.offsetLeft,n.right=i-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function c(t){let{children:e,isPresent:i,anchorX:r,root:o}=t,a=(0,s.useId)(),l=(0,s.useRef)(null),h=(0,s.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=(0,s.useContext)(u.Q);return(0,s.useInsertionEffect)(()=>{let{width:t,height:e,top:n,left:s,right:u}=h.current;if(i||!l.current||!t||!e)return;l.current.dataset.motionPopId=a;let d=document.createElement("style");c&&(d.nonce=c);let p=null!=o?o:document.head;return p.appendChild(d),d.sheet&&d.sheet.insertRule('\n [data-motion-pop-id="'.concat(a,'"] {\n position: absolute !important;\n width: ').concat(t,"px !important;\n height: ").concat(e,"px !important;\n ").concat("left"===r?"left: ".concat(s):"right: ".concat(u),"px !important;\n top: ").concat(n,"px !important;\n }\n ")),()=>{p.contains(d)&&p.removeChild(d)}},[i]),(0,n.jsx)(d,{isPresent:i,childRef:l,sizeRef:h,children:s.cloneElement(e,{ref:l})})}let p=t=>{let{children:e,initial:i,isPresent:r,onExitComplete:a,custom:h,presenceAffectsLayout:u,mode:d,anchorX:p,root:f}=t,g=(0,o.M)(m),y=(0,s.useId)(),v=!0,x=(0,s.useMemo)(()=>(v=!1,{id:y,initial:i,isPresent:r,custom:h,onExitComplete:t=>{for(let e of(g.set(t,!0),g.values()))if(!e)return;a&&a()},register:t=>(g.set(t,!1),()=>g.delete(t))}),[r,g,a]);return u&&v&&(x={...x}),(0,s.useMemo)(()=>{g.forEach((t,e)=>g.set(e,!1))},[r]),s.useEffect(()=>{r||g.size||!a||a()},[r]),"popLayout"===d&&(e=(0,n.jsx)(c,{isPresent:r,anchorX:p,root:f,children:e})),(0,n.jsx)(l.t.Provider,{value:x,children:e})};function m(){return new Map}var f=i(2082);let g=t=>t.key||"";function y(t){let e=[];return s.Children.forEach(t,t=>{(0,s.isValidElement)(t)&&e.push(t)}),e}let v=t=>{let{children:e,custom:i,initial:l=!0,onExitComplete:h,presenceAffectsLayout:u=!0,mode:d="sync",propagate:c=!1,anchorX:m="left",root:v}=t,[x,w]=(0,f.xQ)(c),b=(0,s.useMemo)(()=>y(e),[e]),T=c&&!x?[]:b.map(g),P=(0,s.useRef)(!0),S=(0,s.useRef)(b),A=(0,o.M)(()=>new Map),[M,E]=(0,s.useState)(b),[V,C]=(0,s.useState)(b);(0,a.E)(()=>{P.current=!1,S.current=b;for(let t=0;t{let e=g(t),s=(!c||!!x)&&(b===V||T.includes(e));return(0,n.jsx)(p,{isPresent:s,initial:(!P.current||!!l)&&void 0,custom:i,presenceAffectsLayout:u,mode:d,root:v,onExitComplete:s?void 0:()=>{if(!A.has(e))return;A.set(e,!0);let t=!0;A.forEach(e=>{e||(t=!1)}),t&&(null==k||k(),C(S.current),c&&(null==w||w()),h&&h())},anchorX:m,children:t},e)})})}},845:(t,e,i)=>{i.d(e,{t:()=>n});let n=(0,i(2115).createContext)(null)},869:(t,e,i)=>{i.d(e,{L:()=>n});let n=(0,i(2115).createContext)({})},1469:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),!function(t,e){for(var i in e)Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}(e,{default:function(){return l},getImageProps:function(){return a}});let n=i(8229),s=i(8883),r=i(3063),o=n._(i(1193));function a(t){let{props:e}=(0,s.getImgProps)(t,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[t,i]of Object.entries(e))void 0===i&&delete e[t];return{props:e}}let l=r.Image},1508:(t,e,i)=>{i.d(e,{Q:()=>n});let n=(0,i(2115).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},2082:(t,e,i)=>{i.d(e,{xQ:()=>r});var n=i(2115),s=i(845);function r(t=!0){let e=(0,n.useContext)(s.t);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:o,register:a}=e,l=(0,n.useId)();(0,n.useEffect)(()=>{if(t)return a(l)},[t]);let h=(0,n.useCallback)(()=>t&&o&&o(l),[l,o,t]);return!i&&o?[!1,h]:[!0]}},2198:(t,e,i)=>{i.d(e,{K:()=>n});function n(t,e,i){if(t instanceof EventTarget)return[t];if("string"==typeof t){let n=document;e&&(n=e.current);let s=i?.[t]??n.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}},2483:(t,e,i)=>{i.d(e,{A:()=>r});var n=i(9827);let s=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function r(t,e,i,r){return t===e&&i===r?n.l:n=>0===n||1===n?n:s(function(t,e,i,n,r){let o,a,l=0;do(o=s(a=e+(i-e)/2,n,r)-t)>0?i=a:e=a;while(Math.abs(o)>1e-7&&++l<12);return a}(n,0,1,t,i),e,r)}},2843:(t,e,i)=>{i.d(e,{U:()=>r});var n=i(8972),s=i(408);function r(){if(s.r.current=!0,n.B)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>s.O.current=t.matches;t.addEventListener("change",e),e()}else s.O.current=!1}},2885:(t,e,i)=>{i.d(e,{M:()=>s});var n=i(2115);function s(t){let e=(0,n.useRef)(null);return null===e.current&&(e.current=t()),e.current}},4436:(t,e,i)=>{i.d(e,{k5:()=>u});var n=i(2115),s={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},r=n.createContext&&n.createContext(s),o=["attr","size","title"];function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;en.createElement(d,a({attr:h({},t.attr)},e),function t(e){return e&&e.map((e,i)=>n.createElement(e.tag,h({key:i},e.attr),t(e.child)))}(t.child))}function d(t){var e=e=>{var i,{attr:s,size:r,title:l}=t,u=function(t,e){if(null==t)return{};var i,n,s=function(t,e){if(null==t)return{};var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;i[n]=t[n]}return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(s[i]=t[i])}return s}(t,o),d=r||e.size||"1em";return e.className&&(i=e.className),t.className&&(i=(i?i+" ":"")+t.className),n.createElement("svg",a({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,s,u,{className:i,style:h(h({color:t.color||e.color},e.style),t.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),l&&n.createElement("title",null,l),t.children)};return void 0!==r?n.createElement(r.Consumer,null,t=>e(t)):e(s)}},4975:(t,e,i)=>{let n;i.d(e,{P:()=>rm});var s=i(2115);let r=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],o=new Set(r),a=t=>180*t/Math.PI,l=t=>u(a(Math.atan2(t[1],t[0]))),h={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:l,rotateZ:l,skewX:t=>a(Math.atan(t[1])),skewY:t=>a(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},u=t=>((t%=360)<0&&(t+=360),t),d=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),c=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),p={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:d,scaleY:c,scale:t=>(d(t)+c(t))/2,rotateX:t=>u(a(Math.atan2(t[6],t[5]))),rotateY:t=>u(a(Math.atan2(-t[2],t[0]))),rotateZ:l,rotate:l,skewX:t=>a(Math.atan(t[4])),skewY:t=>a(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function m(t){return+!!t.includes("scale")}function f(t,e){let i,n;if(!t||"none"===t)return m(e);let s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=p,n=s;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=h,n=e}if(!n)return m(e);let r=i[e],o=n[1].split(",").map(g);return"function"==typeof r?r(o):o[r]}function g(t){return parseFloat(t.trim())}let y=t=>e=>"string"==typeof e&&e.startsWith(t),v=y("--"),x=y("var(--"),w=t=>!!x(t)&&b.test(t.split("/*")[0].trim()),b=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function T({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}let P=(t,e,i)=>t+(e-t)*i;function S(t){return void 0===t||1===t}function A({scale:t,scaleX:e,scaleY:i}){return!S(t)||!S(e)||!S(i)}function M(t){return A(t)||E(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function E(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function V(t,e,i,n,s){return void 0!==s&&(t=n+s*(t-n)),n+i*(t-n)+e}function C(t,e=0,i=1,n,s){t.min=V(t.min,e,i,n,s),t.max=V(t.max,e,i,n,s)}function D(t,{x:e,y:i}){C(t.x,e.translate,e.scale,e.originPoint),C(t.y,i.translate,i.scale,i.originPoint)}function k(t,e){t.min=t.min+e,t.max=t.max+e}function R(t,e,i,n,s=.5){let r=P(t.min,t.max,s);C(t,e,i,r,n)}function j(t,e){R(t.x,e.x,e.scaleX,e.scale,e.originX),R(t.y,e.y,e.scaleY,e.scale,e.originY)}function L(t,e){return T(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}let O=new Set(["width","height","top","left","right","bottom",...r]),F=(t,e,i)=>i>e?e:i"number"==typeof t,parse:parseFloat,transform:t=>t},I={...B,transform:t=>F(0,1,t)},U={...B,default:1},N=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),W=N("deg"),$=N("%"),z=N("px"),Y=N("vh"),X=N("vw"),H={...$,parse:t=>$.parse(t)/100,transform:t=>$.transform(100*t)},K=t=>e=>e.test(t),_=[B,z,$,W,X,Y,{test:t=>"auto"===t,parse:t=>t}],q=t=>_.find(K(t)),G=()=>{},Z=()=>{},Q=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),J=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tt=t=>t===B||t===z,te=new Set(["x","y","z"]),ti=r.filter(t=>!te.has(t)),tn={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>f(e,"x"),y:(t,{transform:e})=>f(e,"y")};tn.translateX=tn.x,tn.translateY=tn.y;var ts=i(9827);let tr={},to=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ta={value:null,addProjectionMetrics:null};function tl(t,e){let i=!1,n=!0,s={delta:0,timestamp:0,isProcessing:!1},r=()=>i=!0,o=to.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,n=new Set,s=!1,r=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function h(e){o.has(e)&&(u.schedule(e),t()),l++,e(a)}let u={schedule:(t,e=!1,r=!1)=>{let a=r&&s?i:n;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(a=t,s){r=!0;return}s=!0,[i,n]=[n,i],i.forEach(h),e&&ta.value&&ta.value.frameloop[e].push(l),l=0,i.clear(),s=!1,r&&(r=!1,u.process(t))}};return u}(r,e?i:void 0),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:d,preRender:c,render:p,postRender:m}=o,f=()=>{let r=tr.useManualTiming?s.timestamp:performance.now();i=!1,tr.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),l.process(s),h.process(s),u.process(s),d.process(s),c.process(s),p.process(s),m.process(s),s.isProcessing=!1,i&&e&&(n=!1,t(f))};return{schedule:to.reduce((e,r)=>{let a=o[r];return e[r]=(e,r=!1,o=!1)=>(!i&&(i=!0,n=!0,s.isProcessing||t(f)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;et.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return ti.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(+!!i.startsWith("scale")))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tf=!1,tm=!1,tp.forEach(t=>t.complete(tg)),tp.clear()}function tv(){tp.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tf=!0)})}class tx{constructor(t,e,i,n,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(tp.add(this),tm||(tm=!0,th.read(tv),th.resolveKeyframes(ty))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let s=n?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(i&&e){let n=i.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===s&&n.set(t[0])}for(let e=1;e/^0[^.\s]+$/u.test(t),tb=t=>Math.round(1e5*t)/1e5,tT=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,tP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tS=(t,e)=>i=>!!("string"==typeof i&&tP.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),tA=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[s,r,o,a]=n.match(tT);return{[t]:parseFloat(s),[e]:parseFloat(r),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},tM={...B,transform:t=>Math.round(F(0,255,t))},tE={test:tS("rgb","red"),parse:tA("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+tM.transform(t)+", "+tM.transform(e)+", "+tM.transform(i)+", "+tb(I.transform(n))+")"},tV={test:tS("#"),parse:function(t){let e="",i="",n="",s="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,i+=i,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}},transform:tE.transform},tC={test:tS("hsl","hue"),parse:tA("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+$.transform(tb(e))+", "+$.transform(tb(i))+", "+tb(I.transform(n))+")"},tD={test:t=>tE.test(t)||tV.test(t)||tC.test(t),parse:t=>tE.test(t)?tE.parse(t):tC.test(t)?tC.parse(t):tV.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?tE.transform(t):tC.transform(t),getAnimatableNone:t=>{let e=tD.parse(t);return e.alpha=0,tD.transform(e)}},tk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,tR="number",tj="color",tL=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function tO(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},s=[],r=0,o=e.replace(tL,t=>(tD.test(t)?(n.color.push(r),s.push(tj),i.push(tD.parse(t))):t.startsWith("var(")?(n.var.push(r),s.push("var"),i.push(t)):(n.number.push(r),s.push(tR),i.push(parseFloat(t))),++r,"${}")).split("${}");return{values:i,split:o,indexes:n,types:s}}function tF(t){return tO(t).values}function tB(t){let{split:e,types:i}=tO(t),n=e.length;return t=>{let s="";for(let r=0;r"number"==typeof t?0:tD.test(t)?tD.getAnimatableNone(t):t,tU={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(tT)?.length||0)+(t.match(tk)?.length||0)>0},parse:tF,createTransformer:tB,getAnimatableNone:function(t){let e=tF(t);return tB(t)(e.map(tI))}},tN=new Set(["brightness","contrast","saturate","opacity"]);function tW(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(tT)||[];if(!n)return t;let s=i.replace(n,""),r=+!!tN.has(e);return n!==i&&(r*=100),e+"("+r+s+")"}let t$=/\b([a-z-]*)\(.*?\)/gu,tz={...tU,getAnimatableNone:t=>{let e=t.match(t$);return e?e.map(tW).join(" "):t}},tY={...B,transform:Math.round},tX={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,backgroundPositionX:z,backgroundPositionY:z,rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:U,scaleX:U,scaleY:U,scaleZ:U,skew:W,skewX:W,skewY:W,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z:z,perspective:z,transformPerspective:z,opacity:I,originX:H,originY:H,originZ:z,zIndex:tY,fillOpacity:I,strokeOpacity:I,numOctaves:tY},tH={...tX,color:tD,backgroundColor:tD,outlineColor:tD,fill:tD,stroke:tD,borderColor:tD,borderTopColor:tD,borderRightColor:tD,borderBottomColor:tD,borderLeftColor:tD,filter:tz,WebkitFilter:tz},tK=t=>tH[t];function t_(t,e){let i=tK(t);return i!==tz&&(i=tU),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let tq=new Set(["auto","none","0"]);class tG extends tx{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let tZ=t=>!!(t&&t.getVelocity);function tQ(){n=void 0}let tJ={now:()=>(void 0===n&&tJ.set(td.isProcessing||tr.useManualTiming?td.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(tQ)}};function t0(t,e){-1===t.indexOf(e)&&t.push(e)}function t1(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class t2{constructor(){this.subscriptions=[]}add(t){return t0(this.subscriptions,t),()=>t1(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,i);else for(let s=0;s{let e=tJ.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=tJ.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new t2);let i=this.events[t].add(e);return"change"===t?()=>{i(),th.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return t5.current&&t5.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=tJ.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function t9(t,e){return new t3(t,e)}let t8=[..._,tD,tU],{schedule:t4}=tl(queueMicrotask,!1),t6={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},t7={};for(let t in t6)t7[t]={isEnabled:e=>t6[t].some(t=>!!e[t])};let et=()=>({translate:0,scale:1,origin:0,originPoint:0}),ee=()=>({x:et(),y:et()}),ei=()=>({min:0,max:0}),en=()=>({x:ei(),y:ei()});var es=i(2843),er=i(408);let eo=new WeakMap;function ea(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function el(t){return"string"==typeof t||Array.isArray(t)}let eh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eu=["initial",...eh];function ed(t){return ea(t.animate)||eu.some(e=>el(t[e]))}function ec(t){return!!(ed(t)||t.variants)}function ep(t){let e=[{},{}];return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function em(t,e,i,n){if("function"==typeof e){let[s,r]=ep(n);e=e(void 0!==i?i:t.custom,s,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[s,r]=ep(n);e=e(void 0!==i?i:t.custom,s,r)}return e}let ef=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class eg{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:s,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=tJ.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),er.r.current||(0,es.U)(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||er.O.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in this.projection&&this.projection.unmount(),tu(this.notifyUpdate),tu(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){let i;this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=o.has(t);n&&this.onBindTransform&&this.onBindTransform();let s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&th.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in t7){let e=t7[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):en()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=t9(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];if(null!=i){if("string"==typeof i&&(Q(i)||tw(i)))i=parseFloat(i);else{let n;n=i,!t8.find(K(n))&&tU.test(e)&&(i=t_(t,e))}this.setBaseTarget(t,tZ(i)?i.get():i)}return tZ(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=em(this.props,i,this.presenceContext?.custom);n&&(e=n[t])}if(i&&void 0!==e)return e;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||tZ(n)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new t2),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){t4.render(this.render)}}class ey extends eg{constructor(){super(...arguments),this.KeyframeResolver=tG}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;tZ(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}let ev=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ex={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ew=r.length;function eb(t,e,i){let{style:n,vars:s,transformOrigin:a}=t,l=!1,h=!1;for(let t in e){let i=e[t];if(o.has(t)){l=!0;continue}if(v(t)){s[t]=i;continue}{let e=ev(i,tX[t]);t.startsWith("origin")?(h=!0,a[t]=e):n[t]=e}}if(!e.transform&&(l||i?n.transform=function(t,e,i){let n="",s=!0;for(let o=0;o{let{transform:i="none"}=getComputedStyle(t);return f(i,e)})(t,e);{let i=window.getComputedStyle(t),n=(v(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return L(t,e)}build(t,e,i){eb(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return eA(t,e,i)}}let eE=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),eV={offset:"stroke-dashoffset",array:"stroke-dasharray"},eC={offset:"strokeDashoffset",array:"strokeDasharray"};function eD(t,{attrX:e,attrY:i,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,h,u){if(eb(t,a,h),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:d,style:c}=t;d.transform&&(c.transform=d.transform,delete d.transform),(c.transform||d.transformOrigin)&&(c.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),c.transform&&(c.transformBox=u?.transformBox??"fill-box",delete d.transformBox),void 0!==e&&(d.x=e),void 0!==i&&(d.y=i),void 0!==n&&(d.scale=n),void 0!==s&&function(t,e,i=1,n=0,s=!0){t.pathLength=1;let r=s?eV:eC;t[r.offset]=z.transform(-n);let o=z.transform(e),a=z.transform(i);t[r.array]=`${o} ${a}`}(d,s,r,o,!1)}let ek=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),eR=t=>"string"==typeof t&&"svg"===t.toLowerCase();function ej(t,e,i){let n=eA(t,e,i);for(let i in t)(tZ(t[i])||tZ(e[i]))&&(n[-1!==r.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}class eL extends ey{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=en}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(o.has(e)){let t=tK(e);return t&&t.default||0}return e=ek.has(e)?e:eE(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return ej(t,e,i)}build(t,e,i){eD(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){for(let i in eT(t,e,void 0,n),e.attrs)t.setAttribute(ek.has(i)?i:eE(i),e.attrs[i])}mount(t){this.isSVGTag=eR(t.tagName),super.mount(t)}}let eO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function eF(t){if("string"!=typeof t||t.includes("-"));else if(eO.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var eB=i(5155),eI=i(869);let eU=(0,s.createContext)({strict:!1});var eN=i(1508);let eW=(0,s.createContext)({});function e$(t){return Array.isArray(t)?t.join(" "):t}let ez=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eY(t,e,i){for(let n in e)tZ(e[n])||eS(n,i)||(t[n]=e[n])}let eX=()=>({...ez(),attrs:{}}),eH=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function eK(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||eH.has(t)}let e_=t=>!eK(t);try{!function(t){"function"==typeof t&&(e_=e=>e.startsWith("on")?!eK(e):t(e))}(require("@emotion/is-prop-valid").default)}catch{}var eq=i(845),eG=i(2885);function eZ(t){return tZ(t)?t.get():t}let eQ=t=>(e,i)=>{let n=(0,s.useContext)(eW),r=(0,s.useContext)(eq.t),o=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e},i,n,s){return{latestValues:function(t,e,i,n){let s={},r=n(t,{});for(let t in r)s[t]=eZ(r[t]);let{initial:o,animate:a}=t,l=ed(t),h=ec(t);e&&h&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let u=!!i&&!1===i.initial,d=(u=u||!1===o)?a:o;if(d&&"boolean"!=typeof d&&!ea(d)){let e=Array.isArray(d)?d:[d];for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;r&&function(t){for(let e in t)t7[e]={...t7[e],...t[e]}}(r);let a=eF(t)?e0:eJ;function l(e,i){var r;let l,h={...(0,s.useContext)(eN.Q),...e,layoutId:function(t){let{layoutId:e}=t,i=(0,s.useContext)(eI.L).id;return i&&void 0!==e?i+"-"+e:e}(e)},{isStatic:u}=h,d=function(t){let{initial:e,animate:i}=function(t,e){if(ed(t)){let{initial:e,animate:i}=t;return{initial:!1===e||el(e)?e:void 0,animate:el(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,s.useContext)(eW));return(0,s.useMemo)(()=>({initial:e,animate:i}),[e$(e),e$(i)])}(e),c=a(e,u);if(!u&&e1.B){(0,s.useContext)(eU).strict;let e=function(t){let{drag:e,layout:i}=t7;if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==i?void 0:i.isEnabled(t))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(h);l=e.MeasureLayout,d.visualElement=function(t,e,i,n,r){let{visualElement:o}=(0,s.useContext)(eW),a=(0,s.useContext)(eU),l=(0,s.useContext)(eq.t),h=(0,s.useContext)(eN.Q).reducedMotion,u=(0,s.useRef)(null);n=n||a.renderer,!u.current&&n&&(u.current=n(t,{visualState:e,parent:o,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:h}));let d=u.current,c=(0,s.useContext)(e9);d&&!d.projection&&r&&("html"===d.type||"svg"===d.type)&&function(t,e,i,n){let{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:h,layoutCrossfade:u}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&e5(a),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:h})}(u.current,i,r,c);let p=(0,s.useRef)(!1);(0,s.useInsertionEffect)(()=>{d&&p.current&&d.update(i,l)});let m=i[e3],f=(0,s.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return(0,e8.E)(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),f.current&&d.animationState&&d.animationState.animateChanges())}),(0,s.useEffect)(()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),f.current=!1),d.enteringChildren=void 0)}),d}(t,c,h,o,e.ProjectionNode)}return(0,eB.jsxs)(eW.Provider,{value:d,children:[l&&d.visualElement?(0,eB.jsx)(l,{visualElement:d.visualElement,...h}):null,function(t,e,i,{latestValues:n},r,o=!1){let a=(eF(t)?function(t,e,i,n){let r=(0,s.useMemo)(()=>{let i=eX();return eD(i,e,eR(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};eY(e,t.style,t),r.style={...e,...r.style}}return r}:function(t,e){let i={},n=function(t,e){let i=t.style||{},n={};return eY(n,i,t),Object.assign(n,function({transformTemplate:t},e){return(0,s.useMemo)(()=>{let i=ez();return eb(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),n}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=n,i})(e,n,r,t),l=function(t,e,i){let n={};for(let s in t)("values"!==s||"object"!=typeof t.values)&&(e_(s)||!0===i&&eK(s)||!e&&!eK(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}(e,"string"==typeof t,o),h=t!==s.Fragment?{...l,...a,ref:i}:{},{children:u}=e,d=(0,s.useMemo)(()=>tZ(u)?u.get():u,[u]);return(0,s.createElement)(t,{...h,children:d})}(t,e,(r=d.visualElement,(0,s.useCallback)(t=>{t&&c.onMount&&c.onMount(t),r&&(t?r.mount(t):r.unmount()),i&&("function"==typeof i?i(t):e5(i)&&(i.current=t))},[r])),c,u,n)]})}l.displayName="motion.".concat("string"==typeof t?t:"create(".concat(null!=(i=null!=(e=t.displayName)?e:t.name)?i:"",")"));let h=(0,s.forwardRef)(l);return h[e2]=t,h}function e6(t,e,i){let n=t.getProps();return em(n,e,void 0!==i?i:n.custom,t)}function e7(t,e){return t?.[e]??t?.default??t}let it=t=>Array.isArray(t);function ie(t,e){let i=t.getValue("willChange");if(tZ(i)&&i.add)return i.add(e);if(!i&&tr.WillChange){let i=new tr.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function ii(t){t.duration=0,t.type}let is=(t,e)=>i=>e(t(i)),ir=(...t)=>t.reduce(is),io=t=>1e3*t,ia={layout:0,mainThread:0,waapi:0};function il(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function ih(t,e){return i=>i>0?e:t}let iu=(t,e,i)=>{let n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},id=[tV,tE,tC];function ic(t){let e=id.find(e=>e.test(t));if(G(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===tC&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,r=0,o=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;s=il(a,n,t+1/3),r=il(a,n,t),o=il(a,n,t-1/3)}else s=r=o=i;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:n}}(i)),i}let ip=(t,e)=>{let i=ic(t),n=ic(e);if(!i||!n)return ih(t,e);let s={...i};return t=>(s.red=iu(i.red,n.red,t),s.green=iu(i.green,n.green,t),s.blue=iu(i.blue,n.blue,t),s.alpha=P(i.alpha,n.alpha,t),tE.transform(s))},im=new Set(["none","hidden"]);function ig(t,e){return i=>P(t,e,i)}function iy(t){return"number"==typeof t?ig:"string"==typeof t?w(t)?ih:tD.test(t)?ip:iw:Array.isArray(t)?iv:"object"==typeof t?tD.test(t)?ip:ix:ih}function iv(t,e){let i=[...t],n=i.length,s=t.map((t,i)=>iy(t)(t,e[i]));return t=>{for(let e=0;e{for(let e in n)i[e]=n[e](t);return i}}let iw=(t,e)=>{let i=tU.createTransformer(e),n=tO(t),s=tO(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?im.has(t)&&!s.values.length||im.has(e)&&!n.values.length?function(t,e){return im.has(t)?i=>i<=0?t:e:i=>i>=1?e:t}(t,e):ir(iv(function(t,e){let i=[],n={color:0,var:0,number:0};for(let s=0;s{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>th.update(e,t),stop:()=>tu(e),now:()=>td.isProcessing?td.timestamp:tJ.now()}},iP=(t,e,i=10)=>{let n="",s=Math.max(Math.round(e/i),2);for(let e=0;e=2e4?1/0:e}function iA(t,e,i){var n,s;let r=Math.max(e-5,0);return n=i-t(r),(s=e-r)?1e3/s*n:0}let iM={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function iE(t,e){return t*Math.sqrt(1-e*e)}let iV=["duration","bounce"],iC=["stiffness","damping","mass"];function iD(t,e){return e.some(e=>void 0!==t[e])}function ik(t=iM.visualDuration,e=iM.bounce){let i,n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:s,restDelta:r}=n,o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:h,damping:u,mass:d,duration:c,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:iM.velocity,stiffness:iM.stiffness,damping:iM.damping,mass:iM.mass,isResolvedFromDuration:!1,...t};if(!iD(t,iC)&&iD(t,iV))if(t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),n=i*i,s=2*F(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:iM.mass,stiffness:n,damping:s}}else{let i=function({duration:t=iM.duration,bounce:e=iM.bounce,velocity:i=iM.velocity,mass:n=iM.mass}){let s,r;G(t<=io(iM.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=F(iM.minDamping,iM.maxDamping,o),t=F(iM.minDuration,iM.maxDuration,t/1e3),o<1?(s=e=>{let n=e*o,s=n*t;return .001-(n-i)/iE(e,o)*Math.exp(-s)},r=e=>{let n=e*o*t,r=Math.pow(o,2)*Math.pow(e,2)*t,a=Math.exp(-n),l=iE(Math.pow(e,2),o);return(n*i+i-r)*a*(-s(e)+.001>0?-1:1)/l}):(s=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),r=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(s,r,5/t);if(t=io(t),isNaN(a))return{stiffness:iM.stiffness,damping:iM.damping,duration:t};{let e=Math.pow(a,2)*n;return{stiffness:e,damping:2*o*Math.sqrt(n*e),duration:t}}}(t);(e={...e,...i,mass:iM.mass}).isResolvedFromDuration=!0}return e}({...n,velocity:-((n.velocity||0)/1e3)}),f=p||0,g=u/(2*Math.sqrt(h*d)),y=a-o,v=Math.sqrt(h/d)/1e3,x=5>Math.abs(y);if(s||(s=x?iM.restSpeed.granular:iM.restSpeed.default),r||(r=x?iM.restDelta.granular:iM.restDelta.default),g<1){let t=iE(v,g);i=e=>a-Math.exp(-g*v*e)*((f+g*v*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}else if(1===g)i=t=>a-Math.exp(-v*t)*(y+(f+v*y)*t);else{let t=v*Math.sqrt(g*g-1);i=e=>{let i=Math.exp(-g*v*e),n=Math.min(t*e,300);return a-i*((f+g*v*y)*Math.sinh(n)+t*y*Math.cosh(n))/t}}let w={calculatedDuration:m&&c||null,next:t=>{let e=i(t);if(m)l.done=t>=c;else{let n=0===t?f:0;g<1&&(n=0===t?io(f):iA(i,t,e));let o=Math.abs(a-e)<=r;l.done=Math.abs(n)<=s&&o}return l.value=l.done?a:e,l},toString:()=>{let t=Math.min(iS(w),2e4),e=iP(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function iR({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:h=.5,restSpeed:u}){let d,c,p=t[0],m={done:!1,value:p},f=i*e,g=p+f,y=void 0===o?g:o(g);y!==g&&(f=y-p);let v=t=>-f*Math.exp(-t/n),x=t=>y+v(t),w=t=>{let e=v(t),i=x(t);m.done=Math.abs(e)<=h,m.value=m.done?y:i},b=t=>{let e;if(e=m.value,void 0!==a&&el){var i;d=t,c=ik({keyframes:[m.value,(i=m.value,void 0===a?l:void 0===l||Math.abs(a-i){let e=!1;return(c||void 0!==d||(e=!0,w(t),b(t)),void 0!==d&&t>=d)?c.next(t-d):(e||w(t),m)}}}ik.applyToOptions=t=>{let e=function(t,e=100,i){let n=i({...t,keyframes:[0,e]}),s=Math.min(iS(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:s/1e3}}(t,100,ik);return t.ease=e.ease,t.duration=io(e.duration),t.type="keyframes",t};var ij=i(2483);let iL=(0,ij.A)(.42,0,1,1),iO=(0,ij.A)(0,0,.58,1),iF=(0,ij.A)(.42,0,.58,1),iB=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,iI=t=>e=>1-t(1-e),iU=(0,ij.A)(.33,1.53,.69,.99),iN=iI(iU),iW=iB(iN),i$=t=>(t*=2)<1?.5*iN(t):.5*(2-Math.pow(2,-10*(t-1))),iz=t=>1-Math.sin(Math.acos(t)),iY=iI(iz),iX=iB(iz),iH=t=>Array.isArray(t)&&"number"==typeof t[0],iK={linear:ts.l,easeIn:iL,easeInOut:iF,easeOut:iO,circIn:iz,circInOut:iX,circOut:iY,backIn:iN,backInOut:iW,backOut:iU,anticipate:i$},i_=t=>{if(iH(t)){Z(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,n,s]=t;return(0,ij.A)(e,i,n,s)}return"string"==typeof t?(Z(void 0!==iK[t],`Invalid easing type '${t}'`,"invalid-easing-type"),iK[t]):t},iq=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n};function iG({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){var s;let r=Array.isArray(n)&&"number"!=typeof n[0]?n.map(i_):i_(n),o={done:!1,value:e[0]},a=function(t,e,{clamp:i=!0,ease:n,mixer:s}={}){let r=t.length;if(Z(r===e.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];let o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=function(t,e,i){let n=[],s=i||tr.mix||ib,r=t.length-1;for(let i=0;i{if(o&&i1)for(;nh(F(t[0],t[r-1],e)):h}((s=i&&i.length===e.length?i:function(t){let e=[0];return!function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let s=iq(0,e,n);t.push(P(i,1,s))}}(e,t.length-1),e}(e),s.map(e=>e*t)),e,{ease:Array.isArray(r)?r:e.map(()=>r||iF).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}let iZ=t=>null!==t;function iQ(t,{repeat:e,repeatType:i="loop"},n,s=1){let r=t.filter(iZ),o=s<0||e&&"loop"!==i&&e%2==1?0:r.length-1;return o&&void 0!==n?n:r[o]}let iJ={decay:iR,inertia:iR,tween:iG,keyframes:iG,spring:ik};function i0(t){"string"==typeof t.type&&(t.type=iJ[t.type])}class i1{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let i2=t=>t/100;class i5 extends i1{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==tJ.now()&&this.tick(tJ.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},ia.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;i0(t);let{type:e=iG,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:r=0}=t,{keyframes:o}=t,a=e||iG;a!==iG&&"number"!=typeof o[0]&&(this.mixKeyframes=ir(i2,ib(o[0],o[1])),o=[0,100]);let l=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=iS(l));let{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let{generator:i,totalDuration:n,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return i.next(0);let{delay:l=0,keyframes:h,repeat:u,repeatType:d,repeatDelay:c,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let v=this.currentTime,x=i;if(u){let t=Math.min(this.currentTime,n)/o,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,u+1))%2&&("reverse"===d?(i=1-i,c&&(i-=c/o)):"mirror"===d&&(x=r)),v=F(0,1,i)*o}let w=y?{done:!1,value:h[0]}:x.next(v);s&&(w.value=s(w.value));let{done:b}=w;y||null===a||(b=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return T&&p!==iR&&(w.value=iQ(h,this.options,f,this.speed)),m&&m(w.value),T&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return this.calculatedDuration/1e3}get time(){return this.currentTime/1e3}set time(t){t=io(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(tJ.now());let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:t=iT,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tJ.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,ia.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function i3(t){let e;return()=>(void 0===e&&(e=t()),e)}let i9=i3(()=>void 0!==window.ScrollTimeline),i8={},i4=function(t,e){let i=i3(t);return()=>i8[e]??i()}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),i6=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,i7={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:i6([0,.65,.55,1]),circOut:i6([.55,0,1,.45]),backIn:i6([.31,.01,.66,-.59]),backOut:i6([.33,1.53,.69,.99])};function nt(t){return"function"==typeof t&&"applyToOptions"in t}class ne extends i1{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:e,name:i,keyframes:n,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,Z("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:t,...e}){return nt(t)&&i4()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},h){let u={[e]:i};l&&(u.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?i4()?iP(e,i):"ease-out":iH(e)?i6(e):Array.isArray(e)?e.map(e=>t(e,i)||i7.easeOut):i7[e]}(a,s);Array.isArray(d)&&(u.easing=d),ta.value&&ia.waapi++;let c={delay:n,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};h&&(c.pseudoElement=h);let p=t.animate(u,c);return ta.value&&p.finished.finally(()=>{ia.waapi--}),p}(e,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let t=iQ(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,i){e.startsWith("--")?t.style.setProperty(e,i):t.style[e]=i}(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(t){this.finishedTime=null,this.animation.currentTime=io(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&i9())?(this.animation.timeline=t,ts.l):e(this)}}let ni={anticipate:i$,backInOut:iW,circInOut:iX};class nn extends ne{constructor(t){!function(t){"string"==typeof t.ease&&t.ease in ni&&(t.ease=ni[t.ease])}(t),i0(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:n,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);let o=new i5({...r,autoplay:!1}),a=io(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}let ns=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(tU.test(t)||"0"===t)&&!t.startsWith("url(")),nr=new Set(["opacity","clipPath","filter","transform"]),no=i3(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class na extends i1{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:h,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tJ.now();let d={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:r,name:a,motionValue:l,element:h,...u},c=h?.KeyframeResolver||tx;this.keyframeResolver=new c(o,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){this.keyframeResolver=void 0;let{name:s,type:r,velocity:o,delay:a,isHandoff:l,onUpdate:h}=i;this.resolvedAt=tJ.now(),!function(t,e,i,n){let s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;let r=t[t.length-1],o=ns(s,e),a=ns(r,e);return G(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},d=!l&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:a,transformTemplate:l}=e.owner.getProps();return no()&&i&&nr.has(i)&&("transform"!==i||!l)&&!a&&!n&&"mirror"!==s&&0!==r&&"inertia"!==o}(u)?new nn({...u,element:u.motionValue.owner.current}):new i5(u);d.finished.then(()=>this.notifyFinished()).catch(ts.l),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tg=!0,tv(),ty(),tg=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let nl=t=>null!==t,nh={type:"spring",stiffness:500,damping:25,restSpeed:10},nu={type:"keyframes",duration:.8},nd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nc=(t,e,i,n={},s,r)=>a=>{let l=e7(n,t)||{},h=l.delay||n.delay||0,{elapsed:u=0}=n;u-=io(h);let d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};!function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:h,...u}){return!!Object.keys(u).length}(l)&&Object.assign(d,((t,{keyframes:e})=>e.length>2?nu:o.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:nh:nd)(t,d)),d.duration&&(d.duration=io(d.duration)),d.repeatDelay&&(d.repeatDelay=io(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let c=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(ii(d),0===d.delay&&(c=!0)),(tr.instantAnimations||tr.skipAnimations)&&(c=!0,ii(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,c&&!r&&void 0!==e.get()){let t=function(t,{repeat:e,repeatType:i="loop"},n){let s=t.filter(nl),r=e&&"loop"!==i&&e%2==1?0:s.length-1;return s[r]}(d.keyframes,l);if(void 0!==t)return void th.update(()=>{d.onUpdate(t),d.onComplete()})}return l.isSync?new i5(d):new na(d)};function np(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;n&&(r=n);let l=[],h=s&&t.animationState&&t.animationState.getState()[s];for(let e in a){let n=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||h&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(h,e))continue;let o={delay:i,...e7(r||{},e)},u=n.get();if(void 0!==u&&!n.isAnimating&&!Array.isArray(s)&&s===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let i=t.props[e3];if(i){let t=window.MotionHandoffAnimation(i,e,th);null!==t&&(o.startTime=t,d=!0)}}ie(t,e),n.start(nc(e,n,s,t.shouldReduceMotion&&O.has(e)?{type:!1}:o,t,d));let c=n.animation;c&&l.push(c)}return o&&Promise.all(l).then(()=>{th.update(()=>{o&&function(t,e){let{transitionEnd:i={},transition:n={},...s}=e6(t,e)||{};for(let e in s={...s,...i}){var r;let i=it(r=s[e])?r[r.length-1]||0:r;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,t9(i))}}(t,o)})}),l}function nm(t,e,i,n=0,s=1){let r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*n;return"function"==typeof i?i(r,o):1===s?r*n:a-r*n}function nf(t,e,i={}){let n=e6(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);let r=n?()=>Promise.all(np(t,n,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,i=0,n=0,s=0,r=1,o){let a=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),a.push(nf(l,e,{...o,delay:i+("function"==typeof n?0:n)+nm(t.variantChildren,l,n,s,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,n,r,o,a,i)}:()=>Promise.resolve(),{when:a}=s;if(!a)return Promise.all([r(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}}function ng(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;nPromise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>nf(t,e,i)));else if("string"==typeof e)n=nf(t,e,i);else{let s="function"==typeof e?e6(t,e,i.custom):e;n=Promise.all(np(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=nb(),n=!0,s=e=>(i,n)=>{let s=e6(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){let{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function r(r){let{props:o}=t,a=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;td&&y,T=!1,P=Array.isArray(g)?g:[g],S=P.reduce(s(m),{});!1===v&&(S={});let{prevResolvedValues:A={}}=f,M={...A,...S},E=e=>{b=!0,h.has(e)&&(T=!0,h.delete(e)),f.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in M){let e=S[t],i=A[t];if(!u.hasOwnProperty(t))(it(e)&&it(i)?ng(e,i):e===i)?void 0!==e&&h.has(t)?E(t):f.protectedKeys[t]=!0:null!=e?E(t):h.add(t)}f.prevProp=g,f.prevResolvedValues=S,f.isActive&&(u={...u,...S}),n&&t.blockInitialAnimation&&(b=!1);let V=x&&w,C=!V||T;b&&C&&l.push(...P.map(e=>{let i={type:m};if("string"==typeof e&&n&&!V&&t.manuallyAnimateOnMount&&t.parent){let{parent:n}=t,s=e6(n,e);if(n.enteringChildren&&s){let{delayChildren:e}=s.transition||{};i.delay=nm(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(h.size){let e={};if("boolean"!=typeof o.initial){let i=e6(t,Array.isArray(o.initial)?o.initial[0]:o.initial);i&&i.transition&&(e.transition=i.transition)}h.forEach(i=>{let n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),l.push({animation:e})}let m=!!l.length;return n&&(!1===o.initial||o.initial===o.animate)&&!t.manuallyAnimateOnMount&&(m=!1),n=!1,m?e(l):Promise.resolve()}return{animateChanges:r,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let s=r(e);for(let t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=nb(),n=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ea(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let nS=0;class nA extends nT{constructor(){super(...arguments),this.id=nS++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}let nM={x:!1,y:!1};function nE(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}let nV=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function nC(t){return{point:{x:t.pageX,y:t.pageY}}}function nD(t,e,i,n){return nE(t,e,t=>nV(t)&&i(t,nC(t)),n)}function nk(t){return t.max-t.min}function nR(t,e,i,n=.5){t.origin=n,t.originPoint=P(e.min,e.max,t.origin),t.scale=nk(i)/nk(e),t.translate=P(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function nj(t,e,i,n){nR(t.x,e.x,i.x,n?n.originX:void 0),nR(t.y,e.y,i.y,n?n.originY:void 0)}function nL(t,e,i){t.min=i.min+e.min,t.max=t.min+nk(e)}function nO(t,e,i){t.min=e.min-i.min,t.max=t.min+nk(e)}function nF(t,e,i){nO(t.x,e.x,i.x),nO(t.y,e.y,i.y)}function nB(t){return[t("x"),t("y")]}let nI=({current:t})=>t?t.ownerDocument.defaultView:null,nU=(t,e)=>Math.abs(t-e);class nN{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:s=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let t=nz(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){return Math.sqrt(nU(t.x,e.x)**2+nU(t.y,e.y)**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!i)return;let{point:n}=t,{timestamp:s}=td;this.history.push({...n,timestamp:s});let{onStart:r,onMove:o}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=nW(e,this.transformPagePoint),th.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=nz("pointercancel"===t.type?this.lastMoveEventInfo:nW(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,r),n&&n(t,r)},!nV(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=n||window;let o=nW(nC(t),this.transformPagePoint),{point:a}=o,{timestamp:l}=td;this.history=[{...a,timestamp:l}];let{onSessionStart:h}=e;h&&h(t,nz(o,this.history)),this.removeListeners=ir(nD(this.contextWindow,"pointermove",this.handlePointerMove),nD(this.contextWindow,"pointerup",this.handlePointerUp),nD(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),tu(this.updatePoint)}}function nW(t,e){return e?{point:e(t.point)}:t}function n$(t,e){return{x:t.x-e.x,y:t.y-e.y}}function nz({point:t},e){return{point:t,delta:n$(t,nY(e)),offset:n$(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,s=nY(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>io(.1)));)i--;if(!n)return{x:0,y:0};let r=(s.timestamp-n.timestamp)/1e3;if(0===r)return{x:0,y:0};let o={x:(s.x-n.x)/r,y:(s.y-n.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function nY(t){return t[t.length-1]}function nX(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function nH(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(nC(t).point)},r=(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){if("x"===t||"y"===t)if(nM[t])return null;else return nM[t]=!0,()=>{nM[t]=!1};return nM.x||nM.y?null:(nM.x=nM.y=!0,()=>{nM.x=nM.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nB(t=>{let e=this.getAxisMotionValue(t).get()||0;if($.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];n&&(e=nk(n)*(parseFloat(e)/100))}}this.originPoint[t]=e}),s&&th.postRender(()=>s(t,e)),ie(this.visualElement,"transform");let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},o=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:r}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&s&&s(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),r&&r(t,e)},a=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>nB(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new nN(t,{onSessionStart:s,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:i,contextWindow:nI(this.visualElement)})}stop(t,e){let i=t||this.latestPointerEvent,n=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!n||!i)return;let{velocity:r}=n;this.startAnimation(r);let{onDragEnd:o}=this.getProps();o&&th.postRender(()=>o(i,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!nZ(t,n,this.currentDirection))return;let s=this.getAxisMotionValue(t),r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:i},n){return void 0!==e&&ti&&(t=n?P(i,t,n.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&e5(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:n,right:s}){return{x:nX(t.x,i,s),y:nX(t.y,e,n)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:nK(t,"left","right"),y:nK(t,"top","bottom")}}(e),n!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&nB(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!e5(e))return!1;let n=e.current;Z(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:s}=this.visualElement;if(!s||!s.layout)return!1;let r=function(t,e,i){let n=L(t,i),{scroll:s}=e;return s&&(k(n.x,s.offset.x),k(n.y,s.offset.y)),n}(n,s.root,this.visualElement.getTransformPagePoint()),o=(t=s.layout.layoutBox,{x:nH(t.x,r.x),y:nH(t.y,r.y)});if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=T(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(nB(o=>{if(!nZ(o,e,this.currentDirection))return;let l=a&&a[o]||{};r&&(l={min:0,max:0});let h={type:"inertia",velocity:i?t[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(o,h)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return ie(this.visualElement,t),i.start(nc(t,i,0,e,this.visualElement,!1))}stopAnimation(){nB(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nB(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){nB(e=>{let{drag:i}=this.getProps();if(!nZ(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,s=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:r}=n.layout.layoutBox[e];s.set(t[e]-P(i,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!e5(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};nB(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();n[t]=function(t,e){let i=.5,n=nk(t),s=nk(e);return s>n?i=iq(e.min,e.max-n,t.min):n>s&&(i=iq(t.min,t.max-s,e.min)),F(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),nB(e=>{if(!nZ(e,t,null))return;let i=this.getAxisMotionValue(e),{min:s,max:r}=this.constraints[e];i.set(P(s,r,n[e]))})}addListeners(){if(!this.visualElement.current)return;nq.set(this.visualElement,this);let t=nD(this.visualElement.current,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{let{dragConstraints:t}=this.getProps();e5(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,n=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),th.read(e);let s=nE(window,"resize",()=>this.scalePositionWithinConstraints()),r=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(nB(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),n(),r&&r()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:r=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:r,dragMomentum:o}}}function nZ(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class nQ extends nT{constructor(t){super(t),this.removeGroupControls=ts.l,this.removeListeners=ts.l,this.controls=new nG(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ts.l}unmount(){this.removeGroupControls(),this.removeListeners()}}let nJ=t=>(e,i)=>{t&&th.postRender(()=>t(e,i))};class n0 extends nT{constructor(){super(...arguments),this.removePointerDownListener=ts.l}onPointerDown(t){this.session=new nN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nI(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:nJ(t),onStart:nJ(e),onMove:i,onEnd:(t,e)=>{delete this.session,n&&th.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=nD(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var n1=i(2082);let n2={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function n5(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let n3={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t)if(!z.test(t))return t;else t=parseFloat(t);let i=n5(t,e.target.x),n=n5(t,e.target.y);return`${i}% ${n}%`}},n9=!1;class n8 extends s.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;for(let t in n6)eP[t]=n6[t],v(t)&&(eP[t].isCSSVariable=!0);s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),n9&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),n2.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,{projection:r}=i;return r&&(r.isPresent=s,n9=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?r.promote():r.relegate()||th.postRender(()=>{let t=r.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),t4.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;n9=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function n4(t){let[e,i]=(0,n1.xQ)(),n=(0,s.useContext)(eI.L);return(0,eB.jsx)(n8,{...t,layoutGroup:n,switchLayoutGroup:(0,s.useContext)(e9),isPresent:e,safeToRemove:i})}let n6={borderRadius:{...n3,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:n3,borderTopRightRadius:n3,borderBottomLeftRadius:n3,borderBottomRightRadius:n3,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=tU.parse(t);if(n.length>5)return t;let s=tU.createTransformer(t),r=+("number"!=typeof n[0]),o=i.x.scale*e.x,a=i.y.scale*e.y;n[0+r]/=o,n[1+r]/=a;let l=P(o,a,.5);return"number"==typeof n[2+r]&&(n[2+r]/=l),"number"==typeof n[3+r]&&(n[3+r]/=l),s(n)}}};var n7=i(6983);function st(t){return(0,n7.G)(t)&&"ownerSVGElement"in t}let se=(t,e)=>t.depth-e.depth;class si{constructor(){this.children=[],this.isDirty=!1}add(t){t0(this.children,t),this.isDirty=!0}remove(t){t1(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(se),this.isDirty=!1,this.children.forEach(t)}}let sn=["TopLeft","TopRight","BottomLeft","BottomRight"],ss=sn.length,sr=t=>"string"==typeof t?parseFloat(t):t,so=t=>"number"==typeof t||z.test(t);function sa(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let sl=su(0,.5,iY),sh=su(.5,.95,ts.l);function su(t,e,i){return n=>ne?1:i(iq(t,e,n))}function sd(t,e){t.min=e.min,t.max=e.max}function sc(t,e){sd(t.x,e.x),sd(t.y,e.y)}function sp(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function sm(t,e,i,n,s){return t-=e,t=n+1/i*(t-n),void 0!==s&&(t=n+1/s*(t-n)),t}function sf(t,e,[i,n,s],r,o){!function(t,e=0,i=1,n=.5,s,r=t,o=t){if($.test(e)&&(e=parseFloat(e),e=P(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=P(r.min,r.max,n);t===r&&(a-=e),t.min=sm(t.min,e,i,a,s),t.max=sm(t.max,e,i,a,s)}(t,e[i],e[n],e[s],e.scale,r,o)}let sg=["x","scaleX","originX"],sy=["y","scaleY","originY"];function sv(t,e,i,n){sf(t.x,e,sg,i?i.x:void 0,n?n.x:void 0),sf(t.y,e,sy,i?i.y:void 0,n?n.y:void 0)}function sx(t){return 0===t.translate&&1===t.scale}function sw(t){return sx(t.x)&&sx(t.y)}function sb(t,e){return t.min===e.min&&t.max===e.max}function sT(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function sP(t,e){return sT(t.x,e.x)&&sT(t.y,e.y)}function sS(t){return nk(t.x)/nk(t.y)}function sA(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class sM{constructor(){this.members=[]}add(t){t0(this.members,t),t.scheduleRender()}remove(t){if(t1(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e,i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;!1===n&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let sE={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},sV=["","X","Y","Z"],sC=0;function sD(t,e,i,n){let{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function sk({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(t={},i=e?.()){this.id=sC++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ta.value&&(sE.nodes=sE.calculatedTargetDeltas=sE.calculatedProjections=0),this.nodes.forEach(sL),this.nodes.forEach(sW),this.nodes.forEach(s$),this.nodes.forEach(sO),ta.addProjectionMetrics&&ta.addProjectionMetrics(sE)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;th.read(()=>{n=window.innerWidth}),t(e,()=>{let t=window.innerWidth;t!==n&&(n=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=tJ.now(),n=({timestamp:e})=>{let s=e-i;s>=250&&(tu(n),t(s-250))};return th.setup(n,!0),()=>tu(n)}(s,250),n2.hasAnimatedSinceResize&&(n2.hasAnimatedSinceResize=!1,this.nodes.forEach(sN)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||s.getDefaultTransition()||s_,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!sP(this.targetLayout,n),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...e7(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h)}else e||sN(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tu(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(sz),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let n=i.props[e3];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",th,!(t||i))}let{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&t(s)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||nk(this.snapshot.measuredBox.x)||nk(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=en());let{target:a}=t;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(sp(this.prevProjectionDelta.x,this.projectionDelta.x),sp(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nj(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&sA(this.projectionDelta.x,this.prevProjectionDelta.x)&&sA(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),ta.value&&sE.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ee(),this.projectionDelta=ee(),this.projectionDeltaWithTransform=ee()}setAnimationOrigin(t,e=!1){let i,n=this.snapshot,s=n?n.latestValues:{},r={...this.latestValues},o=ee();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=en(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,d=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(sK));this.animationProgress=0,this.mixTargetDelta=e=>{let n=e/1e3;if(sX(o.x,t.x,n),sX(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,c,p,m,f,g;nF(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,sH(p.x,m.x,f.x,g),sH(p.y,m.y,f.y,g),i&&(h=this.relativeTarget,c=i,sb(h.x,c.x)&&sb(h.y,c.y))&&(this.isProjectionDirty=!1),i||(i=en()),sc(i,this.relativeTarget)}l&&(this.animationValues=r,function(t,e,i,n,s,r){s?(t.opacity=P(0,i.opacity??1,sl(n)),t.opacityExit=P(e.opacity??1,0,sh(n))):r&&(t.opacity=P(e.opacity??1,i.opacity??1,n));for(let s=0;s{n2.hasAnimatedSinceResize=!0,ia.layout++,this.motionValue||(this.motionValue=t9(0)),this.currentAnimation=function(t,e,i){let n=tZ(t)?t:t9(t);return n.start(nc("",n,e,i)),n.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{ia.layout--},onComplete:()=>{ia.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:s}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&sQ(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||en();let e=nk(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=nk(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}sc(e,i),j(e,s),nj(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new sM),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&sD("z",t,n,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(sB),this.root.sharedNodes.clear()}}}function sR(t){t.updateLayout()}function sj(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;"size"===s?nB(t=>{let n=r?e.measuredBox[t]:e.layoutBox[t],s=nk(n);n.min=i[t].min,n.max=n.min+s}):sQ(s,e.layoutBox,i)&&nB(n=>{let s=r?e.measuredBox[n]:e.layoutBox[n],o=nk(i[n]);s.max=s.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+o)});let o=ee();nj(o,i,e.layoutBox);let a=ee();r?nj(a,t.applyTransform(n,!0),e.measuredBox):nj(a,i,e.layoutBox);let l=!sw(o),h=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:s,layout:r}=n;if(s&&r){let o=en();nF(o,e.layoutBox,s.layoutBox);let a=en();nF(a,i,r.layoutBox),sP(o,a)||(h=!0),n.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function sL(t){ta.value&&sE.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function sO(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function sF(t){t.clearSnapshot()}function sB(t){t.clearMeasurements()}function sI(t){t.isLayoutDirty=!1}function sU(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function sN(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function sW(t){t.resolveTargetDelta()}function s$(t){t.calcProjection()}function sz(t){t.resetSkewAndRotation()}function sY(t){t.removeLeadSnapshot()}function sX(t,e,i){t.translate=P(e.translate,0,i),t.scale=P(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function sH(t,e,i,n){t.min=P(e.min,i.min,n),t.max=P(e.max,i.max,n)}function sK(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let s_={duration:.45,ease:[.4,0,.1,1]},sq=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),sG=sq("applewebkit/")&&!sq("chrome/")?Math.round:ts.l;function sZ(t){t.min=sG(t.min),t.max=sG(t.max)}function sQ(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(sS(e)-sS(i)))}function sJ(t){return t!==t.root&&t.scroll?.wasRoot}let s0=sk({attachResizeListener:(t,e)=>nE(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),s1={current:void 0},s2=sk({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!s1.current){let t=new s0({});t.mount(window),t.setOptions({layoutScroll:!0}),s1.current=t}return s1.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});var s5=i(2198);function s3(t,e){let i=(0,s5.K)(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function s9(t){return!("touch"===t.pointerType||nM.x||nM.y)}function s8(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let s=n["onHover"+i];s&&th.postRender(()=>s(e,nC(e)))}class s4 extends nT{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=s3(t,i),o=t=>{if(!s9(t))return;let{target:i}=t,n=e(i,t);if("function"!=typeof n||!i)return;let r=t=>{s9(t)&&(n(t),i.removeEventListener("pointerleave",r))};i.addEventListener("pointerleave",r,s)};return n.forEach(t=>{t.addEventListener("pointerenter",o,s)}),r}(t,(t,e)=>(s8(this.node,e,"Start"),t=>s8(this.node,t,"End"))))}unmount(){}}class s6 extends nT{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ir(nE(this.node.current,"focus",()=>this.onFocus()),nE(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var s7=i(7351);let rt=(t,e)=>!!e&&(t===e||rt(t,e.parentElement)),re=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),ri=new WeakSet;function rn(t){return e=>{"Enter"===e.key&&t(e)}}function rs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function rr(t){return nV(t)&&!(nM.x||nM.y)}function ro(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let s=n["onTap"+("End"===i?"":i)];s&&th.postRender(()=>s(e,nC(e)))}class ra extends nT{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=s3(t,i),o=t=>{let n=t.currentTarget;if(!rr(t))return;ri.add(n);let r=e(n,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ri.has(n)&&ri.delete(n),rr(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,n===window||n===document||i.useGlobalTarget||rt(n,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return n.forEach(t=>{((i.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),(0,s7.s)(t))&&(t.addEventListener("focus",t=>((t,e)=>{let i=t.currentTarget;if(!i)return;let n=rn(()=>{if(ri.has(i))return;rs(i,"down");let t=rn(()=>{rs(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>rs(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)})(t,s)),re.has(t.tagName)||-1!==t.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}(t,(t,e)=>(ro(this.node,e,"Start"),(t,{success:e})=>ro(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let rl=new WeakMap,rh=new WeakMap,ru=t=>{let e=rl.get(t.target);e&&e(t)},rd=t=>{t.forEach(ru)},rc={some:0,all:1};class rp extends nT{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:rc[n]},o=t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,s&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),r=e?i:n;r&&r(t)};var a=this.node.current;let l=function({root:t,...e}){let i=t||document;rh.has(i)||rh.set(i,{});let n=rh.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(rd,{root:t,...e})),n[s]}(r);return rl.set(a,o),l.observe(a),()=>{rl.delete(a),l.unobserve(a)}}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}let rm=function(t,e){if("undefined"==typeof Proxy)return e4;let i=new Map,n=(i,n)=>e4(i,n,t,e);return new Proxy((t,e)=>n(t,e),{get:(s,r)=>"create"===r?n:(i.has(r)||i.set(r,e4(r,void 0,t,e)),i.get(r))})}({animation:{Feature:nP},exit:{Feature:nA},inView:{Feature:rp},tap:{Feature:ra},focus:{Feature:s6},hover:{Feature:s4},pan:{Feature:n0},drag:{Feature:nQ,ProjectionNode:s2,MeasureLayout:n4},layout:{ProjectionNode:s2,MeasureLayout:n4}},(t,e)=>eF(t)?new eL(e):new eM(e,{allowProjection:t!==s.Fragment}))},6604:(t,e,i)=>{i.d(e,{W:()=>o});var n=i(2115),s=i(2198);let r={some:0,all:1};function o(t,{root:e,margin:i,amount:a,once:l=!1,initial:h=!1}={}){let[u,d]=(0,n.useState)(h);return(0,n.useEffect)(()=>{if(!t.current||l&&u)return;let n={root:e&&e.current||void 0,margin:i,amount:a};return function(t,e,{root:i,margin:n,amount:o="some"}={}){let a=(0,s.K)(t),l=new WeakMap,h=new IntersectionObserver(t=>{t.forEach(t=>{let i=l.get(t.target);if(!!i!==t.isIntersecting)if(t.isIntersecting){let i=e(t.target,t);"function"==typeof i?l.set(t.target,i):h.unobserve(t.target)}else"function"==typeof i&&(i(t),l.delete(t.target))})},{root:i,rootMargin:n,threshold:"number"==typeof o?o:r[o]});return a.forEach(t=>h.observe(t)),()=>h.disconnect()}(t.current,()=>(d(!0),l?void 0:()=>d(!1)),n)},[e,t,i,l,a]),u}},6766:(t,e,i)=>{i.d(e,{default:()=>s.a});var n=i(1469),s=i.n(n)},6983:(t,e,i)=>{i.d(e,{G:()=>n});function n(t){return"object"==typeof t&&null!==t}},7351:(t,e,i)=>{i.d(e,{s:()=>s});var n=i(6983);function s(t){return(0,n.G)(t)&&"offsetHeight"in t}},7494:(t,e,i)=>{i.d(e,{E:()=>s});var n=i(2115);let s=i(8972).B?n.useLayoutEffect:n.useEffect},8972:(t,e,i)=>{i.d(e,{B:()=>n});let n="undefined"!=typeof window},9827:(t,e,i)=>{i.d(e,{l:()=>n});let n=t=>t}}]);