HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/propbase/propbase_website/node_modules/framer-motion/dist/framer-motion.js
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e);function s(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>t(...e),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function o(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const r=t=>Array.isArray(t);function a(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function l(t){return"string"==typeof t||Array.isArray(t)}function u(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function c(t,e,n,i){if("function"==typeof e){const[s,o]=u(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=u(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function h(t,e,n){const i=t.getProps();return c(i,e,void 0!==n?n:i.custom,t)}const d=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],p=["initial",...d],m=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],f=new Set(m),g=t=>1e3*t,y=t=>t/1e3,v={type:"spring",stiffness:500,damping:25,restSpeed:10},x={type:"keyframes",duration:.8},w={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},P=(t,{keyframes:e})=>e.length>2?x:f.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:v:w;function T(t,e){return t?t[e]||t.default||t:void 0}const S={skipAnimations:!1,useManualTiming:!1},b={current:!1},A=t=>null!==t;function E(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(A),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}const C=t=>t;const M=["read","resolveKeyframes","update","preRender","render","postRender"];function V(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=M.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{r=t,i?s=!0:(i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,s&&(s=!1,l.process(t)))}};return l}(o),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=r,p=()=>{const o=S.useManualTiming?s.timestamp:performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:M.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<M.length;e++)r[M[e]].cancel(t)},state:s,steps:r}}const{schedule:R,cancel:k,state:D,steps:L}=V("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:C,!0),B=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function F(t,e,n,i){if(t===e&&n===i)return C;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=B(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:B(s(t),e,i)}const j=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,O=t=>e=>1-t(1-e),I=F(.33,1.53,.69,.99),U=O(I),W=j(U),N=t=>(t*=2)<1?.5*U(t):.5*(2-Math.pow(2,-10*(t-1))),z=t=>1-Math.sin(Math.acos(t)),$=O(z),H=j(z),Y=t=>/^0[^.\s]+$/u.test(t);let X=C,G=C;const K=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),_=t=>e=>"string"==typeof e&&e.startsWith(t),q=_("--"),Z=_("var(--"),J=t=>!!Z(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tt=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function et(t,e,n=1){const[i,s]=function(t){const e=tt.exec(t);if(!e)return[,];const[,n,i,s]=e;return["--"+(null!=n?n:i),s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return K(t)?parseFloat(t):t}return J(s)?et(s,e,n+1):s}const nt=(t,e,n)=>n>e?e:n<t?t:n,it={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},st={...it,transform:t=>nt(0,1,t)},ot={...it,default:1},rt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),at=rt("deg"),lt=rt("%"),ut=rt("px"),ct=rt("vh"),ht=rt("vw"),dt={...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)},pt=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),mt=t=>t===it||t===ut,ft=(t,e)=>parseFloat(t.split(", ")[e]),gt=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/u);if(s)return ft(s[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?ft(e[1],t):0}},yt=new Set(["x","y","z"]),vt=m.filter(t=>!yt.has(t));const xt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:gt(4,13),y:gt(5,14)};xt.translateX=xt.x,xt.translateY=xt.y;const wt=t=>e=>e.test(t),Pt=[it,ut,lt,at,ht,ct,{test:t=>"auto"===t,parse:t=>t}],Tt=t=>Pt.find(wt(t)),St=new Set;let bt=!1,At=!1;function Et(){if(At){const t=Array.from(St).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return vt.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}At=!1,bt=!1,St.forEach(t=>t.complete()),St.clear()}function Ct(){St.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(At=!0)})}class Mt{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(St.add(this),bt||(bt=!0,R.read(Ct),R.resolveKeyframes(Et))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),St.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,St.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vt=t=>Math.round(1e5*t)/1e5,Rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const kt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dt=(t,e)=>n=>Boolean("string"==typeof n&&kt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Lt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Rt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Bt={...it,transform:t=>Math.round((t=>nt(0,255,t))(t))},Ft={test:Dt("rgb","red"),parse:Lt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Bt.transform(t)+", "+Bt.transform(e)+", "+Bt.transform(n)+", "+Vt(st.transform(i))+")"};const jt={test:Dt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Ft.transform},Ot={test:Dt("hsl","hue"),parse:Lt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+lt.transform(Vt(e))+", "+lt.transform(Vt(n))+", "+Vt(st.transform(i))+")"},It={test:t=>Ft.test(t)||jt.test(t)||Ot.test(t),parse:t=>Ft.test(t)?Ft.parse(t):Ot.test(t)?Ot.parse(t):jt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Ft.transform(t):Ot.transform(t)},Ut=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Wt=/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 Nt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Wt,t=>(It.test(t)?(i.color.push(o),s.push("color"),n.push(It.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function zt(t){return Nt(t).values}function $t(t){const{split:e,types:n}=Nt(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+="number"===e?Vt(t[o]):"color"===e?It.transform(t[o]):t[o]}return s}}const Ht=t=>"number"==typeof t?0:t;const Yt={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(Rt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Ut))||void 0===n?void 0:n.length)||0)>0},parse:zt,createTransformer:$t,getAnimatableNone:function(t){const e=zt(t);return $t(t)(e.map(Ht))}},Xt=new Set(["brightness","contrast","saturate","opacity"]);function Gt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Rt)||[];if(!i)return t;const s=n.replace(i,"");let o=Xt.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Kt=/\b([a-z-]*)\(.*?\)/gu,_t={...Yt,getAnimatableNone:t=>{const e=t.match(Kt);return e?e.map(Gt).join(" "):t}},qt={borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,backgroundPositionX:ut,backgroundPositionY:ut},Zt={rotate:at,rotateX:at,rotateY:at,rotateZ:at,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:at,skewX:at,skewY:at,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:st,originX:dt,originY:dt,originZ:ut},Jt={...it,transform:Math.round},Qt={...qt,...Zt,zIndex:Jt,size:ut,fillOpacity:st,strokeOpacity:st,numOctaves:Jt},te={...Qt,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:_t,WebkitFilter:_t},ee=t=>te[t];function ne(t,e){let n=ee(t);return n!==_t&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ie=new Set(["auto","none","0"]);class se extends Mt{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),J(i))){const s=et(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!pt.has(n)||2!==t.length)return;const[i,s]=t,o=Tt(i),r=Tt(s);if(o!==r)if(mt(o)&&mt(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(i=t[e])?0===i:null===i||"none"===i||"0"===i||Y(i))&&n.push(e);var i;n.length&&function(t,e,n){let i=0,s=void 0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!ie.has(e)&&Nt(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=ne(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=xt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function oe(t){return"function"==typeof t}let re;function ae(){re=void 0}const le={now:()=>(void 0===re&&le.set(D.isProcessing||S.useManualTiming?D.timestamp:performance.now()),re),set:t=>{re=t,queueMicrotask(ae)}},ue=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Yt.test(t)&&"0"!==t||t.startsWith("url(")));function ce(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=ue(s,e),a=ue(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||oe(n))&&i)}class he{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=le.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Ct(),Et()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=le.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!ce(t,n,i,s)){if(b.current||!o)return null==a||a(E(t,this.options,e)),null==r||r(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function de(t,e){return e?t*(1e3/e):0}function pe(t,e,n){const i=Math.max(e-5,0);return de(n-t(i),e-i)}function me({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o,r=1-e;r=nt(.05,1,r),t=nt(.01,10,y(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/fe(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=fe(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=g(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function fe(t,e){return t*Math.sqrt(1-e*e)}const ge=["duration","bounce"],ye=["stiffness","damping","mass"];function ve(t,e){return e.some(e=>void 0!==t[e])}function xe({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ve(t,ye)&&ve(t,ge)){const n=me(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-y(i.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-s,v=y(Math.sqrt(a/u)),x=Math.abs(f)<5;let w;if(n||(n=x?.01:2),e||(e=x?.005:.5),m<1){const t=fe(v,m);w=e=>{const n=Math.exp(-m*v*e);return o-n*((p+m*v*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)w=t=>o-Math.exp(-v*t)*(f+(p+v*f)*t);else{const t=v*Math.sqrt(m*m-1);w=e=>{const n=Math.exp(-m*v*e),i=Math.min(t*e,300);return o-n*((p+m*v*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&c||null,next:t=>{const i=w(t);if(d)r.done=t>=c;else{let s=0;m<1&&(s=0===t?g(p):pe(w,t,i));const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function we({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let w,P;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,P=xe({keyframes:[d.value,p(d.value)],velocity:pe(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==w||(e=!0,x(t),T(t)),void 0!==w&&t>=w?P.next(t-w):(!e&&x(t),d)}}}const Pe=F(.42,0,1,1),Te=F(0,0,.58,1),Se=F(.42,0,.58,1),be=t=>Array.isArray(t)&&"number"!=typeof t[0],Ae=t=>Array.isArray(t)&&"number"==typeof t[0],Ee={linear:C,easeIn:Pe,easeInOut:Se,easeOut:Te,circIn:z,circInOut:H,circOut:$,backIn:U,backInOut:W,backOut:I,anticipate:N},Ce=t=>{if(Ae(t)){G(4===t.length);const[e,n,i,s]=t;return F(e,n,i,s)}return"string"==typeof t?Ee[t]:t},Me=(t,e)=>n=>e(t(n)),Ve=(...t)=>t.reduce(Me),Re=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},ke=(t,e,n)=>t+(e-t)*n;function De(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Le(t,e){return n=>n>0?e:t}const Be=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Fe=[jt,Ft,Ot];function je(t){const e=(n=t,Fe.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===Ot&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=De(a,i,t+1/3),o=De(a,i,t),r=De(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Oe=(t,e)=>{const n=je(t),i=je(e);if(!n||!i)return Le(t,e);const s={...n};return t=>(s.red=Be(n.red,i.red,t),s.green=Be(n.green,i.green,t),s.blue=Be(n.blue,i.blue,t),s.alpha=ke(n.alpha,i.alpha,t),Ft.transform(s))},Ie=new Set(["none","hidden"]);function Ue(t,e){return n=>ke(t,e,n)}function We(t){return"number"==typeof t?Ue:"string"==typeof t?J(t)?Le:It.test(t)?Oe:$e:Array.isArray(t)?Ne:"object"==typeof t?It.test(t)?Oe:ze:Le}function Ne(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>We(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function ze(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=We(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const $e=(t,e)=>{const n=Yt.createTransformer(e),i=Nt(t),s=Nt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ie.has(t)&&!s.values.length||Ie.has(e)&&!i.values.length?function(t,e){return Ie.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Ve(Ne(function(t,e){var n;const i=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][s[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,s[r]++}return i}(i,s),s.values),n):Le(t,e)};function He(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return ke(t,e,n);return We(t)(t,e)}function Ye(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(G(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=function(t,e,n){const i=[],s=n||He,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||C:e;o=Ve(t,o)}i.push(o)}return i}(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Re(t[n],t[n+1],e);return r[n](i)};return n?e=>l(nt(t[0],t[o-1],e)):l}function Xe(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Re(0,e,i);t.push(ke(n,1,s))}}function Ge(t){const e=[0];return Xe(e,t.length-1),e}function Ke({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=be(i)?i.map(Ce):Ce(i),o={done:!1,value:e[0]},r=Ye(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ge(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||Se).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function _e(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const qe=t=>{const e=({timestamp:e})=>t(e);return{start:()=>R.update(e,!0),stop:()=>k(e),now:()=>D.isProcessing?D.timestamp:le.now()}},Ze={decay:we,inertia:we,tween:Ke,keyframes:Ke,spring:xe},Je=t=>t/100;class Qe extends he{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:s}=this.options,o=(null==i?void 0:i.KeyframeResolver)||Mt;this.resolver=new o(s,(t,e)=>this.onKeyframesResolved(t,e),e,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=oe(e)?e:Ze[e]||Ke;let a,l;r!==Ke&&"number"!=typeof t[0]&&(a=Ve(Je,He(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===s&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=_e(u));const{calculatedDuration:c}=u,h=c+i;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,x=s;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(x=o)),v=nt(0,1,n)*c}const w=y?{done:!1,value:a[0]}:x.next(v);r&&(w.value=r(w.value));let{done:P}=w;y||null===l||(P=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return T&&void 0!==i&&(w.value=E(a,this.options,i)),f&&f(w.value),T&&this.finish(),w}get duration(){const{resolved:t}=this;return t?y(t.calculatedDuration):0}get time(){return y(this.currentTime)}set time(t){t=g(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=y(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=qe,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function tn(t){return new Qe(t)}const en=new Set(["opacity","clipPath","filter","transform"]);function nn(t){let e;return()=>(void 0===e&&(e=t()),e)}const sn={linearEasing:void 0};function on(t,e){const n=nn(t);return()=>{var t;return null!==(t=sn[e])&&void 0!==t?t:n()}}const rn=on(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");function an(t){return Boolean("function"==typeof t&&rn()||!t||"string"==typeof t&&(t in un||rn())||Ae(t)||Array.isArray(t)&&t.every(an))}const ln=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,un={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ln([0,.65,.55,1]),circOut:ln([.55,0,1,.45]),backIn:ln([.31,.01,.66,-.59]),backOut:ln([.33,1.53,.69,.99])};function cn(t,e){return t?"function"==typeof t&&rn()?((t,e)=>{let n="";const i=Math.max(Math.round(e/10),2);for(let e=0;e<i;e++)n+=t(Re(0,i-1,e))+", ";return`linear(${n.substring(0,n.length-2)})`})(t,e):Ae(t)?ln(t):Array.isArray(t)?t.map(t=>cn(t,e)||un.easeOut):un[t]:void 0}function hn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=cn(a,s);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}function dn(t,e){t.timeline=e,t.onfinish=null}const pn=nn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const mn={anticipate:N,backInOut:W,circInOut:H};class fn extends he{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:s}=this.options;this.resolver=new se(s,(t,e)=>this.onKeyframesResolved(t,e),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:s,ease:o,type:r,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var c;if("string"==typeof o&&rn()&&o in mn&&(o=mn[o]),oe((c=this.options).type)||"spring"===c.type||!an(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new Qe({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),i=c.duration,s=c.times,o=c.ease,r="keyframes"}const h=hn(a.owner.current,l,t,{...this.options,duration:i,times:s,ease:o});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(dn(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;a.set(E(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:i,times:s,type:r,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return y(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return y(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=g(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return C;const{animation:n}=e;dn(n,t)}else this.pendingTimeline=t;return C}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new Qe({...u,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),h=g(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;return pn()&&n&&en.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}const gn=nn(()=>void 0!==window.ScrollTimeline);class yn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>gn()&&n.attachTimeline?n.attachTimeline(t):e(n));return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const vn=(t,e,n,i={},s,o)=>r=>{const a=T(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=g(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(c={...c,...P(t,c)}),c.duration&&(c.duration=g(c.duration)),c.repeatDelay&&(c.repeatDelay=g(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(c.duration=0,0===c.delay&&(h=!0)),(b.current||S.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),h&&!o&&void 0!==e.get()){const t=E(c.keyframes,a);if(void 0!==t)return R.update(()=>{c.onUpdate(t),c.onComplete()}),new yn([])}return!o&&fn.supports(c)?new fn(c):new Qe(c)};function xn(t,e){-1===t.indexOf(e)&&t.push(e)}function wn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Pn{constructor(){this.subscriptions=[]}add(t){return xn(this.subscriptions,t),()=>wn(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Tn={current:void 0};class Sn{constructor(t,e={}){this.version="11.11.17",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=le.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=le.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}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 Pn);const n=this.events[t].add(e);return"change"===t?()=>{n(),R.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Tn.current&&Tn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=le.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return de(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bn(t,e){return new Sn(t,e)}function An(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,bn(n))}function En(t,e){const n=h(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){An(t,e,(a=o[e],r(a)?a[a.length-1]||0:a))}var a}const Cn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Mn="data-"+Cn("framerAppearId");function Vn(t){return t.props[Mn]}const Rn=t=>Boolean(t&&t.getVelocity);function kn(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Rn(i)&&i.add))return n.add(e);var i}function Dn({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Ln(t,e,{delay:n=0,transitionOverride:i,type:s}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),s=l[e];if(void 0===s||c&&Dn(c,e))continue;const a={delay:n,...T(r||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=Vn(t);if(n){const t=window.MotionHandoffAnimation(n,e,R);null!==t&&(a.startTime=t,h=!0)}}kn(t,e),i.start(vn(e,i,s,t.shouldReduceMotion&&f.has(e)?{type:!1}:a,t,h));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{R.update(()=>{a&&En(t,a)})}),u}function Bn(t,e,n={}){var i;const s=h(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const r=s?()=>Promise.all(Ln(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Fn).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(Bn(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,s+i,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function Fn(t,e){return t.sortNodePosition(e)}function jn(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Bn(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Bn(t,e,n);else{const s="function"==typeof e?h(t,e,n.custom):e;i=Promise.all(Ln(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const On=p.length;const In=[...d].reverse(),Un=d.length;function Wn(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>jn(t,e,n)))}(t),n=$n(),i=!0;const s=e=>(n,i)=>{var s;const o=h(t,i,"exit"===e?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function u(u){const{props:c}=t,h=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<On;t++){const i=p[t],s=e.props[i];(l(s)||!1===s)&&(n[i]=s)}return n}(t.parent)||{},d=[],m=new Set;let f={},g=1/0;for(let e=0;e<Un;e++){const p=In[e],y=n[p],v=void 0!==c[p]?c[p]:h[p],x=l(v),w=p===u?y.isActive:null;!1===w&&(g=e);let P=v===h[p]&&v!==c[p]&&x;if(P&&i&&t.manuallyAnimateOnMount&&(P=!1),y.protectedKeys={...f},!y.isActive&&null===w||!v&&!y.prevProp||o(v)||"boolean"==typeof v)continue;const T=Nn(y.prevProp,v);let S=T||p===u&&y.isActive&&!P&&x||e>g&&x,b=!1;const A=Array.isArray(v)?v:[v];let E=A.reduce(s(p),{});!1===w&&(E={});const{prevResolvedValues:C={}}=y,M={...C,...E},V=e=>{S=!0,m.has(e)&&(b=!0,m.delete(e)),y.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in M){const e=E[t],n=C[t];if(f.hasOwnProperty(t))continue;let i=!1;i=r(e)&&r(n)?!a(e,n):e!==n,i?null!=e?V(t):m.add(t):void 0!==e&&m.has(t)?V(t):y.protectedKeys[t]=!0}y.prevProp=v,y.prevResolvedValues=E,y.isActive&&(f={...f,...E}),i&&t.blockInitialAnimation&&(S=!1);const R=!(P&&T)||b;S&&R&&d.push(...A.map(t=>({animation:t,options:{type:p}})))}if(m.size){const e={};m.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=null!=i?i:null}),d.push({animation:e})}let y=Boolean(d.length);return!i||!1!==c.initial&&c.initial!==c.animate||t.manuallyAnimateOnMount||(y=!1),i=!1,y?e(d):Promise.resolve()}return{animateChanges:u,setActive:function(e,i){var s;if(n[e].isActive===i)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const o=u(e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=$n(),i=!0}}}function Nn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!a(e,t)}function zn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $n(){return{animate:zn(!0),whileInView:zn(),whileHover:zn(),whileTap:zn(),whileDrag:zn(),whileFocus:zn(),exit:zn()}}class Hn{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Yn=0;const Xn={animation:{Feature:class extends Hn{constructor(t){super(t),t.animationState||(t.animationState=Wn(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();o(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends Hn{constructor(){super(...arguments),this.id=Yn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Gn=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Kn(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const _n=t=>e=>Gn(e)&&t(e,Kn(e));function qn(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Zn(t,e,n,i){return qn(t,e,_n(n),i)}const Jn=(t,e)=>Math.abs(t-e);function Qn(t,e){const n=Jn(t.x,e.x),i=Jn(t.y,e.y);return Math.sqrt(n**2+i**2)}class ti{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=ii(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Qn(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=D;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=ei(e,this.transformPagePoint),R.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ii("pointercancel"===t.type?this.lastMoveEventInfo:ei(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Gn(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=ei(Kn(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=D;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,ii(o,this.history)),this.removeListeners=Ve(Zn(this.contextWindow,"pointermove",this.handlePointerMove),Zn(this.contextWindow,"pointerup",this.handlePointerUp),Zn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),k(this.updatePoint)}}function ei(t,e){return e?{point:e(t.point)}:t}function ni(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ii({point:t},e){return{point:t,delta:ni(t,oi(e)),offset:ni(t,si(e)),velocity:ri(e,.1)}}function si(t){return t[0]}function oi(t){return t[t.length-1]}function ri(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=oi(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>g(e)));)n--;if(!i)return{x:0,y:0};const o=y(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ai(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const li=ai("dragHorizontal"),ui=ai("dragVertical");function ci(t){let e=!1;if("y"===t)e=ui();else if("x"===t)e=li();else{const t=li(),n=ui();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function hi(){const t=ci(!0);return!t||(t(),!1)}function di(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function pi(t){return t.max-t.min}function mi(t,e,n,i=.5){t.origin=i,t.originPoint=ke(e.min,e.max,t.origin),t.scale=pi(n)/pi(e),t.translate=ke(n.min,n.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 fi(t,e,n,i){mi(t.x,e.x,n.x,i?i.originX:void 0),mi(t.y,e.y,n.y,i?i.originY:void 0)}function gi(t,e,n){t.min=n.min+e.min,t.max=t.min+pi(e)}function yi(t,e,n){t.min=e.min-n.min,t.max=t.min+pi(e)}function vi(t,e,n){yi(t.x,e.x,n.x),yi(t.y,e.y,n.y)}function xi(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function wi(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Pi=.35;function Ti(t,e,n){return{min:Si(t,e),max:Si(t,n)}}function Si(t,e){return"number"==typeof t?t:t[e]||0}const bi=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Ai(t){return[t("x"),t("y")]}function Ei({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ci(t){return void 0===t||1===t}function Mi({scale:t,scaleX:e,scaleY:n}){return!Ci(t)||!Ci(e)||!Ci(n)}function Vi(t){return Mi(t)||Ri(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ri(t){return ki(t.x)||ki(t.y)}function ki(t){return t&&"0%"!==t}function Di(t,e,n){return n+e*(t-n)}function Li(t,e,n,i,s){return void 0!==s&&(t=Di(t,s,i)),Di(t,n,i)+e}function Bi(t,e=0,n=1,i,s){t.min=Li(t.min,e,n,i,s),t.max=Li(t.max,e,n,i,s)}function Fi(t,{x:e,y:n}){Bi(t.x,e.translate,e.scale,e.originPoint),Bi(t.y,n.translate,n.scale,n.originPoint)}function ji(t,e){t.min=t.min+e,t.max=t.max+e}function Oi(t,e,n,i,s=.5){Bi(t,e,n,ke(t.min,t.max,s),i)}function Ii(t,e){Oi(t.x,e.x,e.scaleX,e.scale,e.originX),Oi(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ui(t,e){return Ei(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Wi=({current:t})=>t?t.ownerDocument.defaultView:null,Ni=new WeakMap;class zi{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new ti(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Kn(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ci(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ai(t=>{let e=this.getAxisMotionValue(t).get()||0;if(lt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=pi(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&R.postRender(()=>s(t,e)),kn(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Ai(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:Wi(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&R.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!$i(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?ke(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?ke(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&di(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:xi(t.x,n,s),y:xi(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Pi){return!1===t?t=0:!0===t&&(t=Pi),{x:Ti(t,"left","right"),y:Ti(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ai(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!di(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=Ui(t,n),{scroll:s}=e;return s&&(ji(i.x,s.offset.x),ji(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:wi(t.x,e.x),y:wi(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Ei(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Ai(r=>{if(!$i(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return kn(this.visualElement,t),n.start(vn(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ai(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ai(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Ai(e=>{const{drag:n}=this.getProps();if(!$i(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-ke(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!di(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ai(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=pi(t),s=pi(e);return s>i?n=Re(e.min,e.max-i,t.min):i>s&&(n=Re(t.min,t.max-s,e.min)),nt(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Ai(e=>{if(!$i(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(ke(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Ni.set(this.visualElement,this);const t=Zn(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();di(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),R.read(e);const s=qn(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ai(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Pi,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function $i(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Hi=t=>(e,n)=>{t&&R.postRender(()=>t(e,n))};const Yi=["TopLeft","TopRight","BottomLeft","BottomRight"],Xi=Yi.length,Gi=t=>"string"==typeof t?parseFloat(t):t,Ki=t=>"number"==typeof t||ut.test(t);function _i(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const qi=Ji(0,.5,$),Zi=Ji(.5,.95,C);function Ji(t,e,n){return i=>i<t?0:i>e?1:n(Re(t,e,i))}function Qi(t,e){t.min=e.min,t.max=e.max}function ts(t,e){Qi(t.x,e.x),Qi(t.y,e.y)}function es(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ns(t,e,n,i,s){return t=Di(t-=e,1/n,i),void 0!==s&&(t=Di(t,1/s,i)),t}function is(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(lt.test(e)){e=parseFloat(e);e=ke(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=ke(o.min,o.max,i);t===o&&(a-=e),t.min=ns(t.min,e,n,a,s),t.max=ns(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const ss=["x","scaleX","originX"],os=["y","scaleY","originY"];function rs(t,e,n,i){is(t.x,e,ss,n?n.x:void 0,i?i.x:void 0),is(t.y,e,os,n?n.y:void 0,i?i.y:void 0)}function as(t){return 0===t.translate&&1===t.scale}function ls(t){return as(t.x)&&as(t.y)}function us(t,e){return t.min===e.min&&t.max===e.max}function cs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function hs(t,e){return cs(t.x,e.x)&&cs(t.y,e.y)}function ds(t){return pi(t.x)/pi(t.y)}function ps(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class ms{constructor(){this.members=[]}add(t){xn(this.members,t),t.scheduleRender()}remove(t){if(wn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const fs={};function gs(t){Object.assign(fs,t)}const ys=(t,e)=>t.depth-e.depth;class vs{constructor(){this.children=[],this.isDirty=!1}add(t){xn(this.children,t),this.isDirty=!0}remove(t){wn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ys),this.isDirty=!1,this.children.forEach(t)}}function xs(t){const e=Rn(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ps(t,e){const n=le.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(k(i),t(o-e))};return R.read(i,!0),()=>k(i)}function Ts(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(_e(i),2e4);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:y(s)}}function Ss(t,e,n){var i;if("string"==typeof t){let s=document;e&&(G(Boolean(e.current)),s=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=s.querySelectorAll(t)),t=n[t]):t=s.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}function bs(t){return"object"==typeof t&&!Array.isArray(t)}function As(t,e,n,i){return"string"==typeof t&&bs(e)?Ss(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Es(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}const Cs=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function Ms(t,e){return be(t)?t[Cs(0,t.length,e)]:t}function Vs(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(wn(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:ke(s,o,i[r]),easing:Ms(n,r)})}function Rs(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function ks(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ds(t,e){return e[t]||(e[t]=[]),e[t]}function Ls(t){return Array.isArray(t)?t:[t]}function Bs(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Fs=t=>"number"==typeof t,js=t=>t.every(Fs),Os=new WeakMap;function Is(t){return t instanceof SVGElement&&"svg"!==t.tagName}function Us(t,{layout:e,layoutId:n}){return f.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!fs[t]||"opacity"===t)}function Ws(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(Rn(s[r])||e.style&&Rn(e.style[r])||Us(r,t)||void 0!==(null===(i=null==n?void 0:n.getValue(r))||void 0===i?void 0:i.liveStyle))&&(o[r]=s[r]);return o}function Ns(t,e,n){const i=Ws(t,e,n);for(const n in t)if(Rn(t[n])||Rn(e[n])){i[-1!==m.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const zs="undefined"!=typeof window,$s={current:null},Hs={current:!1};function Ys(){if(Hs.current=!0,zs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$s.current=t.matches;t.addListener(e),e()}else $s.current=!1}function Xs(t){return o(t.animate)||p.some(e=>l(t[e]))}function Gs(t){return Boolean(Xs(t)||t.variants)}const Ks={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"]},_s={};for(const t in Ks)_s[t]={isEnabled:e=>Ks[t].some(t=>!!e[t])};const qs=[...Pt,It,Yt],Zs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Js{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Mt,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=()=>{const t=le.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,R.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Xs(e),this.isVariantNode=Gs(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&Rn(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Os.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Hs.current||Ys(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||$s.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Os.delete(this.current),this.projection&&this.projection.unmount(),k(this.notifyUpdate),k(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=f.has(t),i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&R.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),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 _s){const e=_s[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const 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):{x:{min:0,max:0},y:{min:0,max:0}}}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;e<Zs.length;e++){const n=Zs[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Rn(s))t.addValue(i,s);else if(Rn(o))t.addValue(i,bn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,bn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const 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 n=this.values.get(t);return void 0===n&&void 0!==e&&(n=bn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=i&&("string"==typeof i&&(K(i)||Y(i))?i=parseFloat(i):(s=i,!qs.find(wt(s))&&Yt.test(e)&&(i=ne(t,e))),this.setBaseTarget(t,Rn(i)?i.get():i)),Rn(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const s=c(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);s&&(i=s[t])}if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Rn(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new Pn),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Qs extends Js{constructor(){super(...arguments),this.KeyframeResolver=se}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:n}){delete e[t],delete n[t]}}const to=(t,e)=>e&&"number"==typeof t?e.transform(t):t,eo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},no=m.length;function io(t,e,n){let i="",s=!0;for(let o=0;o<no;o++){const r=m[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=to(a,Qt[r]);if(!l){s=!1;i+=`${eo[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function so(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(f.has(t))r=!0;else if(q(t))s[t]=n;else{const e=to(n,Qt[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=io(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function oo(t,e,n){return"string"==typeof t?t:ut.transform(e+n*t)}const ro={offset:"stroke-dashoffset",array:"stroke-dasharray"},ao={offset:"strokeDashoffset",array:"strokeDasharray"};function lo(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(so(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${oo(e,t.x,t.width)} ${oo(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ro:ao;t[o.offset]=ut.transform(-i);const r=ut.transform(e),a=ut.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const uo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function co(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}function ho(t,e,n,i){co(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(uo.has(n)?n:Cn(n),e.attrs[n])}const po=t=>"string"==typeof t&&"svg"===t.toLowerCase();class mo extends Qs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bi}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(f.has(e)){const t=ee(e);return t&&t.default||0}return e=uo.has(e)?e:Cn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Ns(t,e,n)}build(t,e,n){lo(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){ho(t,e,0,i)}mount(t){this.isSVGTag=po(t.tagName),super.mount(t)}}class fo extends Qs{constructor(){super(...arguments),this.type="html",this.renderInstance=co}readValueFromInstance(t,e){if(f.has(e)){const t=ee(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(q(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ui(t,e)}build(t,e,n){so(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ws(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Rn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}class go extends Js{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function yo(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Is(t)?new mo(e):new fo(e);n.mount(t),Os.set(t,n)}function vo(t){const e=new go({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Os.set(t,e)}function xo(t,e,n){const i=Rn(t)?t:bn(t);return i.start(vn("",i,e,n)),i.animation}function wo(t,e,n,i){const s=[];if(function(t,e){return Rn(t)||"number"==typeof t||"string"==typeof t&&!bs(e)}(t,e))s.push(xo(t,bs(e)&&e.default||e,n&&n.default||n));else{const o=As(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a=i instanceof Element?yo:vo;Os.has(i)||a(i);const l=Os.get(i),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,r)),s.push(...Ln(l,{...e,transition:u},{}))}}return s}function Po(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i,s){const o=e.duration||.3,r=new Map,a=new Map,l={},u=new Map;let c=0,h=0,d=0;for(let n=0;n<t.length;n++){const r=t[n];if("string"==typeof r){u.set(r,h);continue}if(!Array.isArray(r)){u.set(r.name,Es(h,r.at,c,u));continue}let[p,m,f={}]=r;void 0!==f.at&&(h=Es(h,f.at,c,u));let y=0;const v=(t,n,i,r=0,a=0)=>{const l=Ls(t),{delay:u=0,times:c=Ge(l),type:p="keyframes",...m}=n;let{ease:f=e.ease||"easeOut",duration:v}=n;const x="function"==typeof u?u(r,a):u,w=l.length,P=oe(p)?p:null==s?void 0:s[p];if(w<=2&&P){let t=100;if(2===w&&js(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...m};void 0!==v&&(e.duration=g(v));const n=Ts(e,t,P);f=n.ease,v=n.duration}null!=v||(v=o);const T=h+x,S=T+v;1===c.length&&0===c[0]&&(c[1]=1);const b=c.length-l.length;b>0&&Xe(c,b),1===l.length&&l.unshift(null),Vs(i,l,f,c,T,S),y=Math.max(x+v,y),d=Math.max(S,d)};if(Rn(p)){v(m,f,Ds("default",ks(p,a)))}else{const t=As(p,m,i,l),e=t.length;for(let n=0;n<e;n++){m=m,f=f;const i=ks(t[n],a);for(const t in m)v(m[t],Bs(f,t),Ds(t,i),n,e)}}c=h,h+=y}return a.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(Rs);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];a.push(n),l.push(Re(0,d,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),r.has(i)||r.set(i,{keyframes:{},transition:{}});const c=r.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:d,ease:u,times:l,...n}}}),r}(t,e,n,{spring:xe}).forEach(({keyframes:t,transition:e},n)=>{i.push(...wo(n,t,e))}),i}function To(t){return function(e,n,i){let s=[];var o;o=e,s=Array.isArray(o)&&Array.isArray(o[0])?Po(e,n,t):wo(e,n,i,t);const r=new yn(s);return t&&t.animations.push(r),r}}const So=To();function bo(t,e,n){t.style.setProperty("--"+e,n)}function Ao(t,e,n){t.style[e]=n}const Eo=nn(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Co=new WeakMap;function Mo(t){const e=Co.get(t)||new Map;return Co.set(t,e),Co.get(t)}class Vo{constructor(t,e,n,i){const s=e.startsWith("--");this.setValue=s?bo:Ao,this.options=i,this.updateFinishedPromise(),G("string"!=typeof i.type);const o=Mo(t).get(e);o&&o.stop();if(Array.isArray(n)||(n=[n]),function(t,e,n){for(let i=0;i<e.length;i++)null===e[i]&&(e[i]=0===i?n():e[i-1]),"number"==typeof e[i]&&qt[t]&&(e[i]=qt[t].transform(e[i]));!Eo()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),oe(i.type)){const t=Ts(i,100,i.type);i.ease=rn()?t.ease:"easeOut",i.duration=g(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";this.removeAnimation=()=>{var n;return null===(n=Co.get(t))||void 0===n?void 0:n.delete(e)};const r=()=>{this.setValue(t,e,E(n,this.options)),this.cancel(),this.resolveFinishedPromise()};pn()?(this.animation=hn(t,e,n,i),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=r,this.pendingTimeline&&dn(this.animation,this.pendingTimeline),Mo(t).set(e,this)):r()}get duration(){return y(this.options.duration||300)}get time(){var t;return this.animation?y((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=g(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}flatten(){var t;this.animation&&(null===(t=this.animation.effect)||void 0===t||t.updateTiming({easing:"linear"}))}play(){"finished"===this.state&&this.updateFinishedPromise(),this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}complete(){this.animation&&this.animation.finish()}cancel(){this.removeAnimation();try{this.animation&&this.animation.cancel()}catch(t){}}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}attachTimeline(t){return this.animation?dn(this.animation,t):this.pendingTimeline=t,C}}const Ro=t=>function(e,n,i){return new yn(function(t,e,n,i){const s=Ss(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){const n=e[t],s={...T(a,t)};s.duration=s.duration?g(s.duration):s.duration,s.delay=g(s.delay||0),r.push(new Vo(i,t,n,s))}}return r}(e,n,i,t))},ko=Ro(),Do=new WeakMap;let Lo;function Bo({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Do.get(t))||void 0===i||i.forEach(i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Fo(t){t.forEach(Bo)}function jo(t,e){Lo||"undefined"!=typeof ResizeObserver&&(Lo=new ResizeObserver(Fo));const n=Ss(t);return n.forEach(t=>{let n=Do.get(t);n||(n=new Set,Do.set(t,n)),n.add(e),null==Lo||Lo.observe(t)}),()=>{n.forEach(t=>{const n=Do.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Lo||Lo.unobserve(t)})}}const Oo=new Set;let Io;function Uo(t){return Oo.add(t),Io||(Io=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Oo.forEach(t=>t(e))},window.addEventListener("resize",Io)),()=>{Oo.delete(t),!Oo.size&&Io&&(Io=void 0)}}const Wo={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function No(t,e,n,i){const s=n[e],{length:o,position:r}=Wo[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Re(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:de(s.current-a,u)}const zo={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},$o={start:0,center:.5,end:1};function Ho(t,e,n=0){let i=0;if(t in $o&&(t=$o[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Yo=[0,0];function Xo(t,e,n,i){let s=Array.isArray(t)?t:Yo,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,$o[t]?t:"0"]),o=Ho(s[0],n,i),r=Ho(s[1],e),o-r}const Go={x:0,y:0};function Ko(t,e,n){const{offset:i=zo.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):Go,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=Xo(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Ye(e[o].offset,Ge(i)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function _o(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){No(t,"x",e,n),No(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Ko(t,n,i)},notify:()=>e(n)}}const qo=new WeakMap,Zo=new WeakMap,Jo=new WeakMap,Qo=t=>t===document.documentElement?window:t;function tr(t,{container:e=document.documentElement,...n}={}){let i=Jo.get(e);i||(i=new Set,Jo.set(e,i));const s=_o(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!qo.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(D.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{R.read(t,!1,!0),R.read(n,!1,!0),R.update(s,!1,!0)};qo.set(e,a);const l=Qo(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Zo.set(e,(r=a,"function"==typeof(o=e)?Uo(o):jo(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=qo.get(e);return R.read(a,!1,!0),()=>{var t;k(a);const n=Jo.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=qo.get(e);qo.delete(e),i&&(Qo(e).removeEventListener("scroll",i),null===(t=Zo.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}function er(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return R.update(i,!0),()=>k(i)}const nr=new Map;function ir({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),nr.has(e)||nr.set(e,{});const i=nr.get(e);return i[n]||(i[n]=gn()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const i={value:0},s=tr(t=>{i.value=100*t[n].progress},{container:e,axis:n});return{currentTime:i,cancel:s}}({source:e,axis:n})),i[n]}function sr(t){return t&&(t.target||t.offset)}function or(t,{axis:e="y",...n}={}){const i={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||sr(e)?tr(n=>{t(n[e.axis].progress,n)},e):er(t,ir(e))}(t,i):function(t,e){if(t.flatten(),sr(e))return t.pause(),tr(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=ir(e);return t.attachTimeline?t.attachTimeline(n,t=>(t.pause(),er(e=>{t.time=t.duration*e},n))):C}}(t,i)}const rr={some:0,all:1};function ar(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ss(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:rr[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function lr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Ye(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}const ur=R,cr=M.reduce((t,e)=>(t[e]=t=>k(t),t),{}),{schedule:hr,cancel:dr}=V(queueMicrotask,!1),pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},mr="undefined"!=typeof window&&void 0!==window.MotionDebug,fr=["","X","Y","Z"],gr={visibility:"hidden"};let yr=0;function vr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function xr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=yr++,this.animationId=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,mr&&(pr.totalNodes=pr.resolvedTargetDeltas=pr.recalculatedProjection=0),this.nodes.forEach(Tr),this.nodes.forEach(Vr),this.nodes.forEach(Rr),this.nodes.forEach(Sr),mr&&window.MotionDebug.record(pr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new vs)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Pn),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Is(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Ps(i,250),ws.hasAnimatedSinceResize&&(ws.hasAnimatedSinceResize=!1,this.nodes.forEach(Mr))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||jr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!hs(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...T(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Mr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,k(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(kr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:n}=e.options;if(!n)return;const i=Vn(n);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",R,!(t||n))}const{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.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ar);this.isUpdating||this.nodes.forEach(Er),this.isUpdating=!1,this.nodes.forEach(Cr),this.nodes.forEach(wr),this.nodes.forEach(Pr),this.clearAllSnapshots();const t=le.now();D.delta=nt(0,1e3/60,t-D.timestamp),D.timestamp=t,D.isProcessing=!0,L.update.process(D),L.preRender.process(D),L.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(br),this.sharedNodes.forEach(Dr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,R.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){R.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!ls(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||Vi(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Ur((i=n).x),Ur(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Nr))){const{scroll:t}=this.root;t&&(ji(n.x,t.offset.x),ji(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};if(ts(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let e=0;e<this.path.length;e++){const i=this.path[e],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&ts(n,t),ji(n.x,s.offset.x),ji(n.y,s.offset.y))}return n}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ts(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ii(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Vi(i.latestValues)&&Ii(n,i.latestValues)}return Vi(this.latestValues)&&Ii(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ts(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Vi(n.latestValues))continue;Mi(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};ts(i,n.measurePageBox()),rs(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Vi(this.latestValues)&&rs(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},vi(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),ts(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,gi(r.x,a.x,l.x),gi(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ts(this.target,this.layout.layoutBox),Fi(this.target,this.targetDelta)):ts(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},vi(this.relativeTargetOrigin,this.target,t.target),ts(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}mr&&pr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Mi(this.parent.latestValues)&&!Ri(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===D.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;ts(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ii(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Fi(t,r)),i&&Vi(o.latestValues)&&Ii(t,o.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(es(this.prevProjectionDelta.x,this.projectionDelta.x),es(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),fi(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&ps(this.projectionDelta.x,this.prevProjectionDelta.x)&&ps(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),mr&&pr.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Fr));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;Lr(o.x,t.x,n),Lr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vi(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Br(t.x,e.x,n.x,i),Br(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,us(l.x,d.x)&&us(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ts(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=ke(0,void 0!==n.opacity?n.opacity:1,qi(i)),t.opacityExit=ke(void 0!==e.opacity?e.opacity:1,0,Zi(i))):o&&(t.opacity=ke(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Xi;s++){const o=`border${Yi[s]}Radius`;let r=_i(e,o),a=_i(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ki(r)===Ki(a)?(t[o]=Math.max(ke(Gi(r),Gi(a),i),0),(lt.test(a)||lt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=ke(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(k(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=R.update(()=>{ws.hasAnimatedSinceResize=!0,this.currentAnimation=xo(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{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);const 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(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Wr(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=pi(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=pi(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ts(e,n),Ii(e,s),fi(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ms);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&vr("z",t,i,this.animationValues);for(let e=0;e<fr.length;e++)vr("rotate"+fr[e],t,i,this.animationValues),vr("skew"+fr[e],t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return gr;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=xs(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=xs(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!Vi(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=(null==n?void 0:n.z)||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in fs){if(void 0===r[t])continue;const{correct:e,applyTo:n}=fs[t],s="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?xs(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Ar),this.root.sharedNodes.clear()}}}function wr(t){t.updateLayout()}function Pr(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?Ai(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=pi(i);i.min=e[t].min,i.max=i.min+s}):Wr(s,n.layoutBox,e)&&Ai(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=pi(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};fi(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?fi(a,t.applyTransform(i,!0),n.measuredBox):fi(a,e,n.layoutBox);const l=!ls(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};vi(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};vi(a,e,o.layoutBox),hs(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Tr(t){mr&&pr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Sr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function br(t){t.clearSnapshot()}function Ar(t){t.clearMeasurements()}function Er(t){t.isLayoutDirty=!1}function Cr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Mr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Vr(t){t.resolveTargetDelta()}function Rr(t){t.calcProjection()}function kr(t){t.resetSkewAndRotation()}function Dr(t){t.removeLeadSnapshot()}function Lr(t,e,n){t.translate=ke(e.translate,0,n),t.scale=ke(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Br(t,e,n,i){t.min=ke(e.min,n.min,i),t.max=ke(e.max,n.max,i)}function Fr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const jr={duration:.45,ease:[.4,0,.1,1]},Or=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ir=Or("applewebkit/")&&!Or("chrome/")?Math.round:C;function Ur(t){t.min=Ir(t.min),t.max=Ir(t.max)}function Wr(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=ds(e),s=ds(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Nr(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const zr=xr({attachResizeListener:(t,e)=>qn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$r={current:void 0},Hr=xr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!$r.current){const t=new zr({});t.mount(window),t.setOptions({layoutScroll:!0}),$r.current=t}return $r.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Yr=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Xr(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Yr);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}function Gr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Kr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ut.test(t))return t;t=parseFloat(t)}return`${Gr(t,e.target.x)}% ${Gr(t,e.target.y)}%`}},_r={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Yt.parse(t);if(s.length>5)return i;const o=Yt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=ke(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};var qr=React,Zr=Symbol.for("react.element"),Jr=Symbol.for("react.fragment"),Qr=Object.prototype.hasOwnProperty,ta=qr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ea={key:!0,ref:!0,__self:!0,__source:!0};function na(t,e,n){var i,s={},o=null,r=null;for(i in void 0!==n&&(o=""+n),void 0!==e.key&&(o=""+e.key),void 0!==e.ref&&(r=e.ref),e)Qr.call(e,i)&&!ea.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:Zr,type:t,key:o,ref:r,props:s,_owner:ta.current}}const ia=Jr,sa=na,oa=na,ra=e.createContext(null);function aa(){const t=e.useContext(ra);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=e.useId();e.useEffect(()=>s(o),[]);const r=e.useCallback(()=>i&&i(o),[o,i]);return!n&&i?[!1,r]:[!0]}const la=e.createContext({}),ua=e.createContext({});class ca extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;gs(da),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||R.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),hr.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ha(t){const[n,i]=aa(),s=e.useContext(la);return sa(ca,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(ua),isPresent:n,safeToRemove:i})}const da={borderRadius:{...Kr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kr,borderTopRightRadius:Kr,borderBottomLeftRadius:Kr,borderBottomRightRadius:Kr,boxShadow:_r},pa={pan:{Feature:class extends Hn{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(t){this.session=new ti(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wi(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hi(t),onStart:Hi(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&R.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Zn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Hn{constructor(t){super(t),this.removeGroupControls=C,this.removeListeners=C,this.controls=new zi(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Hr,MeasureLayout:ha}};function ma(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return Zn(t.current,n,(n,s)=>{if("touch"===n.pointerType||hi())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const r=o[i];r&&R.postRender(()=>r(n,s))},{passive:!t.getProps()[i]})}const fa=(t,e)=>!!e&&(t===e||fa(t,e.parentElement));function ga(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Kn(n))}const ya=new WeakMap,va=new WeakMap,xa=t=>{const e=ya.get(t.target);e&&e(t)},wa=t=>{t.forEach(xa)};function Pa(t,e,n){const i=function({root:t,...e}){const n=t||document;va.has(n)||va.set(n,{});const i=va.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(wa,{root:t,...e})),i[s]}(e);return ya.set(t,n),i.observe(t),()=>{ya.delete(t),i.unobserve(t)}}const Ta={some:0,all:1};const Sa={inView:{Feature:class extends Hn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ta[i]};return Pa(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Hn{constructor(){super(...arguments),this.removeStartListeners=C,this.removeEndListeners=C,this.removeAccessibleListeners=C,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Zn(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps(),o=s||fa(this.node.current,t.target)?n:i;o&&R.update(()=>o(t,e))},{passive:!(n.onTap||n.onPointerUp)}),s=Zn(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Ve(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=qn(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=qn(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&ga("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&R.postRender(()=>n(t,e))})}),ga("down",(t,e)=>{this.startPress(t,e)})}),e=qn(this.node.current,"blur",()=>{this.isPressing&&ga("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Ve(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&R.postRender(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!hi()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&R.postRender(()=>n(t,e))}mount(){const t=this.node.getProps(),e=Zn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=qn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ve(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Hn{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=Ve(qn(this.node.current,"focus",()=>this.onFocus()),qn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Hn{mount(){this.unmount=Ve(ma(this.node,!0),ma(this.node,!1))}unmount(){}}}},ba={layout:{ProjectionNode:Hr,MeasureLayout:ha}},Aa=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ea=e.createContext({}),Ca=zs?e.useLayoutEffect:e.useEffect,Ma=e.createContext({strict:!1});function Va(t,n,i,s,o){var r,a;const{visualElement:l}=e.useContext(Ea),u=e.useContext(Ma),c=e.useContext(ra),h=e.useContext(Aa).reducedMotion,d=e.useRef();s=s||u.renderer,!d.current&&s&&(d.current=s(t,{visualState:n,parent:l,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h}));const p=d.current,m=e.useContext(ua);!p||p.projection||!o||"html"!==p.type&&"svg"!==p.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){return e?!1!==e.options.allowProjection?e.projection:t(e.parent):void 0}(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&di(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}(d.current,i,o,m);const f=e.useRef(!1);e.useInsertionEffect(()=>{p&&f.current&&p.update(i,c)});const g=i[Mn],y=e.useRef(Boolean(g)&&!(null===(r=window.MotionHandoffIsComplete)||void 0===r?void 0:r.call(window,g))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,g)));return Ca(()=>{p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),hr.render(p.render),y.current&&p.animationState&&p.animationState.animateChanges())}),e.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,g)}),y.current=!1))}),p}function Ra(t,n,i){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):di(i)&&(i.current=e))},[n])}function ka(t){const{initial:n,animate:i}=function(t,e){if(Xs(t)){const{initial:e,animate:n}=t;return{initial:!1===e||l(e)?e:void 0,animate:l(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(Ea));return e.useMemo(()=>({initial:n,animate:i}),[Da(n),Da(i)])}function Da(t){return Array.isArray(t)?t.join(" "):t}function La(t){for(const e in t)_s[e]={..._s[e],...t[e]}}const Ba=Symbol.for("motionComponentSymbol");function Fa({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){t&&La(t);const r=e.forwardRef((function(t,r){let a;const l={...e.useContext(Aa),...t,layoutId:ja(t)},{isStatic:u}=l,c=ka(t),h=s(t,u);if(!u&&zs){e.useContext(Ma).strict;const t=function(t){const{drag:e,layout:n}=_s;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);a=t.MeasureLayout,c.visualElement=Va(o,h,l,n,t.ProjectionNode)}return oa(Ea.Provider,{value:c,children:[a&&c.visualElement?sa(a,{visualElement:c.visualElement,...l}):null,i(o,t,Ra(h,c.visualElement,r),h,u,c.visualElement)]})}));return r[Ba]=o,r}function ja({layoutId:t}){const n=e.useContext(la).id;return n&&void 0!==t?n+"-"+t:t}const Oa=["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 Ia(t){return"string"==typeof t&&!t.includes("-")&&!!(Oa.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ua(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const Wa=t=>(n,i)=>{const s=e.useContext(Ea),o=e.useContext(ra),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:Na(i,s,o,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,n,s,o);return i?r():Ua(r)};function Na(t,e,n,i){const s={},r=i(t,{});for(const t in r)s[t]=xs(r[t]);let{initial:a,animate:l}=t;const u=Xs(t),h=Gs(t);e&&h&&!u&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===l&&(l=e.animate));let d=!!n&&!1===n.initial;d=d||!1===a;const p=d?l:a;if(p&&"boolean"!=typeof p&&!o(p)){const e=Array.isArray(p)?p:[p];for(let n=0;n<e.length;n++){const i=c(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const za=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),$a=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Ha={useVisualState:Wa({scrapeMotionValuesFromProps:Ns,createRenderState:$a,onMount:(t,e,{renderState:n,latestValues:i})=>{R.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),R.render(()=>{lo(n,i,po(e.tagName),t.transformTemplate),ho(e,n)})}})},Ya={useVisualState:Wa({scrapeMotionValuesFromProps:Ws,createRenderState:za})};function Xa(t,e,n){for(const i in e)Rn(e[i])||Us(i,n)||(t[i]=e[i])}function Ga(t,n){const i={};return Xa(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return so(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function Ka(t,e){const n={},i=Ga(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const _a=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 qa(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||_a.has(t)}let Za=t=>!qa(t);function Ja(t){t&&(Za=e=>e.startsWith("on")?!qa(e):t(e))}try{Ja(require("@emotion/is-prop-valid").default)}catch(t){}function Qa(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Za(s)||!0===n&&qa(s)||!e&&!qa(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function tl(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return lo(e,n,po(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Xa(e,t.style,t),o.style={...e,...o.style}}return o}function el(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(Ia(n)?tl:Ka)(i,o,r,n),l=Qa(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>Rn(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}function nl(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Fa({...Ia(n)?Ha:Ya,preloadedFeatures:t,useRender:el(i),createVisualElement:e,Component:n})}}const il=(t,n)=>Ia(t)?new mo(n):new fo(n,{allowProjection:t!==e.Fragment}),sl=s(nl({...Xn,...Sa,...pa,...ba},il)),ol=s(nl());class rl extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function al({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=e.useContext(Aa);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:l}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const u=document.createElement("style");return a&&(u.nonce=a),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n          [data-motion-pop-id="${s}"] {\n            position: absolute !important;\n            width: ${t}px !important;\n            height: ${e}px !important;\n            top: ${i}px !important;\n            left: ${l}px !important;\n          }\n        `),()=>{document.head.removeChild(u)}},[n]),sa(rl,{isPresent:n,childRef:o,sizeRef:r,children:i.cloneElement(t,{ref:o})})}const ll=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l})=>{const u=Ua(ul),c=e.useId(),h=e.useCallback(t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},[u,o]),d=e.useMemo(()=>({id:c,initial:n,isPresent:s,custom:r,onExitComplete:h,register:t=>(u.set(t,!1),()=>u.delete(t))}),a?[Math.random(),h]:[s,h]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===l&&(t=sa(al,{isPresent:s,children:t})),sa(ra.Provider,{value:d,children:t})};function ul(){return new Map}function cl(t){return e.useEffect(()=>()=>t(),[])}function hl(){const t=function(){const t=e.useRef(!1);return Ca(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>R.postRender(s),[s]),n]}const dl=t=>t.key||"";function pl(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}function ml(t){return"function"==typeof t}const fl=e.createContext(null),gl=t=>!0===t,yl=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(la),o=e.useContext(fl),[r,a]=hl(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>gl(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:gl(i)&&s.group||Xr()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return sa(la.Provider,{value:c,children:t})},vl=e.createContext(null);function xl({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=Ua(()=>sl[n]),u=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[i]:u.push({value:t,layout:e[i]}),u.sort(Tl)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=ke(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(u,t,e,n);u!==i&&(c.current=!0,s(i.map(Pl).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),sa(l,{...r,ref:a,ignoreStrict:!0,children:sa(vl.Provider,{value:h,children:t})})}const wl=e.forwardRef(xl);function Pl(t){return t.value}function Tl(t,e){return t.layout.min-e.layout.min}function Sl(t){const n=Ua(()=>bn(t)),{isStatic:i}=e.useContext(Aa);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function bl(t,e){const n=Sl(e()),i=()=>n.set(e());return i(),Ca(()=>{const e=()=>R.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),k(i)}}),n}function Al(t,e,n,i){if("function"==typeof t)return function(t){Tn.current=[],t();const e=bl(Tn.current,t);return Tn.current=void 0,e}(t);const s="function"==typeof e?e:lr(e,n,i);return Array.isArray(t)?El(t,s):El([t],([t])=>s(t))}function El(t,e){const n=Ua(()=>[]);return bl(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function Cl(t,e=0){return Rn(t)?t:Sl(e)}function Ml({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=Ua(()=>sl[s]),c=e.useContext(vl),h={x:Cl(n.x),y:Cl(n.y)},d=Al([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:p,registerItem:m,updateOrder:f}=c;return sa(u,{drag:p,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:d},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[p]&&f(i,h[p].get(),n[p]),o&&o(t,e)},onLayoutMeasure:t=>m(i,t),ref:l,ignoreStrict:!0,children:t})}const Vl=e.forwardRef(Ml);var Rl=Object.freeze({__proto__:null,Group:wl,Item:Vl});const kl={renderer:il,...Xn},Dl={renderer:il,...Xn,...Sa},Ll={...Dl,...pa,...ba};function Bl(t){return"number"==typeof t?t:parseFloat(t)}function Fl(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function jl(t,e){X(Boolean(!e||e.current))}const Ol=()=>({scrollX:bn(0),scrollY:bn(0),scrollXProgress:bn(0),scrollYProgress:bn(0)});function Il({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=Ua(Ol);return(i?Ca:e.useEffect)(()=>(jl(0,n),jl(0,t),or((t,{x:e,y:n})=>{o.scrollX.set(e.current),o.scrollXProgress.set(e.progress),o.scrollY.set(n.current),o.scrollYProgress.set(n.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function Ul(t){const n=e.useRef(0),{isStatic:i}=e.useContext(Aa);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return R.update(e,!0),()=>k(e)},[t])}class Wl extends Sn{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return f.has(t)?"transform":en.has(t)?Cn(t):void 0}(t);e&&(xn(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}function Nl(){!Hs.current&&Ys();const[t]=e.useState($s.current);return t}function zl(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&En(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{zl(t,e)})})}function $l(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(jn(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?zl(t,e):"string"==typeof e?zl(t,[e]):En(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function Hl(){const t=Ua($l);return Ca(t.mount,[]),t}const Yl=Hl;class Xl{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Gl=()=>new Xl;function Kl(t){return null!==t&&"object"==typeof t&&Ba in t}function _l(){return ql}function ql(t){$r.current&&($r.current.isUpdating=!1,$r.current.blockUpdate(),t&&t())}const Zl=(t,e)=>`${t}: ${f.has(e)?"transform":e}`,Jl=new Map,Ql=new Map;function tu(t,e,n){var i;const s=Zl(t,e),o=Jl.get(s);if(!o)return null;const{animation:r,startTime:a}=o;function l(){var i;null===(i=window.MotionCancelOptimisedAnimation)||void 0===i||i.call(window,t,e,n)}return r.onfinish=l,null===a||(null===(i=window.MotionHandoffIsComplete)||void 0===i?void 0:i.call(window,t))?(l(),null):a}let eu,nu;const iu=new Set;function su(){iu.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),iu.clear()}const ou=()=>({});class ru extends Js{constructor(){super(...arguments),this.measureInstanceViewportBox=bi}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const au=Wa({scrapeMotionValuesFromProps:ou,createRenderState:ou});const lu=t=>t>.001?1/t:1e5;let uu=0;t.AcceleratedAnimation=fn,t.AnimatePresence=({children:t,exitBeforeEnter:n,custom:i,initial:s=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:a="sync"})=>{const l=e.useMemo(()=>pl(t),[t]),u=l.map(dl),c=e.useRef(!0),h=e.useRef(l),d=Ua(()=>new Map),[p,m]=e.useState(l),[f,g]=e.useState(l);Ca(()=>{c.current=!1,h.current=l;for(let t=0;t<f.length;t++){const e=dl(f[t]);u.includes(e)?d.delete(e):!0!==d.get(e)&&d.set(e,!1)}},[f,u.length,u.join("-")]);const y=[];if(l!==p){let t=[...l];for(let e=0;e<f.length;e++){const n=f[e],i=dl(n);u.includes(i)||(t.splice(e,0,n),y.push(n))}return"wait"===a&&y.length&&(t=y),g(pl(t)),void m(l)}const{forceRender:v}=e.useContext(la);return sa(ia,{children:f.map(t=>{const e=dl(t),n=l===f||u.includes(e);return sa(ll,{isPresent:n,initial:!(c.current&&!s)&&void 0,custom:n?void 0:i,presenceAffectsLayout:r,mode:a,onExitComplete:n?void 0:()=>{if(!d.has(e))return;d.set(e,!0);let t=!0;d.forEach(e=>{e||(t=!1)}),t&&(null==v||v(),g(h.current),o&&o())},children:t},e)})})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),sa(yl,{id:Ua(()=>"asl-"+uu++),children:t})),t.DeprecatedLayoutGroupContext=fl,t.DragControls=Xl,t.FlatTree=vs,t.LayoutGroup=yl,t.LayoutGroupContext=la,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!ml(n)),o=e.useRef(void 0);if(!ml(n)){const{renderer:t,...e}=n;o.current=t,La(e)}return e.useEffect(()=>{ml(n)&&n().then(({renderer:t,...e})=>{La(e),o.current=t,s(!0)})},[]),sa(Ma.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&Ja(n),(i={...e.useContext(Aa),...i}).isStatic=Ua(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return sa(Aa.Provider,{value:s,children:t})},t.MotionConfigContext=Aa,t.MotionContext=Ea,t.MotionGlobalConfig=S,t.MotionValue=Sn,t.PresenceContext=ra,t.Reorder=Rl,t.SwitchLayoutGroupContext=ua,t.VisualElement=Js,t.addPointerEvent=Zn,t.addPointerInfo=_n,t.addScaleCorrector=gs,t.animate=So,t.animateMini=ko,t.animateValue=tn,t.animateVisualElement=jn,t.animationControls=$l,t.animations=Xn,t.anticipate=N,t.backIn=U,t.backInOut=W,t.backOut=I,t.buildTransform=io,t.calcLength=pi,t.cancelFrame=k,t.cancelSync=cr,t.circIn=z,t.circInOut=H,t.circOut=$,t.clamp=nt,t.color=It,t.complex=Yt,t.createBox=bi,t.createRendererMotionComponent=Fa,t.createScopedAnimate=To,t.cubicBezier=F,t.delay=Ps,t.disableInstantTransitions=function(){b.current=!1},t.distance=Jn,t.distance2D=Qn,t.domAnimation=Dl,t.domMax=Ll,t.domMin=kl,t.easeIn=Pe,t.easeInOut=Se,t.easeOut=Te,t.filterProps=Qa,t.findSpring=me,t.frame=R,t.frameData=D,t.frameSteps=L,t.inView=ar,t.inertia=we,t.interpolate=Ye,t.invariant=G,t.isBrowser=zs,t.isDragActive=hi,t.isMotionComponent=Kl,t.isMotionValue=Rn,t.isValidMotionProp=qa,t.keyframes=Ke,t.m=ol,t.makeUseVisualState=Wa,t.mirrorEasing=j,t.mix=He,t.motion=sl,t.motionValue=bn,t.optimizedAppearDataAttribute=Mn,t.pipe=Ve,t.progress=Re,t.px=ut,t.resolveMotionValue=xs,t.reverseEasing=O,t.scroll=or,t.scrollInfo=tr,t.spring=xe,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=Ce(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.MotionIsMounted)return;const o=t.dataset.framerAppearId;if(!o)return;window.MotionHandoffAnimation=tu;const r=Zl(o,e);nu||(nu=hn(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Jl.set(r,{animation:nu,startTime:null}),window.MotionHandoffAnimation=tu,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return Ql.has(t);const n=Zl(t,e);return Boolean(Jl.get(n))},window.MotionHandoffMarkAsComplete=t=>{Ql.has(t)&&Ql.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===Ql.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=Zl(t,e),o=Jl.get(s);o&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{o.animation.cancel()})}):o.animation.cancel(),n&&i?(iu.add(o),n.render(su)):(Jl.delete(s),Jl.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{var i,s;const o=Vn(t);if(!o)return;const r=null===(i=window.MotionHasOptimisedAnimation)||void 0===i?void 0:i.call(window,o,e),a=null===(s=t.props.values)||void 0===s?void 0:s[e];if(!r||!a)return;const l=n.on("change",t=>{var n;a.get()!==t&&(null===(n=window.MotionCancelOptimisedAnimation)||void 0===n||n.call(window,o,e),l())});return l});const a=()=>{nu.cancel();const o=hn(t,e,n,i);void 0===eu&&(eu=performance.now()),o.startTime=eu,Jl.set(r,{animation:o,startTime:eu}),s&&s(o)};Ql.set(o,!1),nu.ready?nu.ready.then(a).catch(C):a()},t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,s="end"===e?Math.floor(i):Math.ceil(i);return nt(0,1,s/t)}},t.sync=ur,t.transform=lr,t.unwrapMotionComponent=function(t){if(Kl(t))return t[Ba]},t.useAnimate=function(){const t=Ua(()=>({current:null,animations:[]})),e=Ua(()=>To(t));return cl(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimateMini=function(){const t=Ua(()=>({current:null,animations:[]})),e=Ua(()=>Ro(t));return cl(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Yl,t.useAnimationControls=Hl,t.useAnimationFrame=Ul,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?Cs(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=au({},!1),o=Ua(()=>new ru({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(o.mount({}),()=>o.unmount()),[o]),[n,Ua(()=>t=>jn(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=Sl(1),i=Sl(1);const{visualElement:s}=e.useContext(Ea);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:Al(n,lu),scaleY:Al(i,lu)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return qn(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return Ua(Gl)},t.useElementScroll=function(t){return Il({container:t})},t.useForceUpdate=hl,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return ar(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,i,o,s]),r},t.useInstantLayoutTransition=_l,t.useInstantTransition=function(){const[t,n]=hl(),i=_l(),s=e.useRef();return e.useEffect(()=>{R.postRender(()=>R.postRender(()=>{n===s.current&&(b.current=!1)}))},[n]),e=>{i(()=>{b.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(ra))||t.isPresent;var t},t.useIsomorphicLayoutEffect=Ca,t.useMotionTemplate=function(t,...e){const n=t.length;return bl(e.filter(Rn),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Rn(n)?n.get():n)}return i}))},t.useMotionValue=Sl,t.useMotionValueEvent=Fl,t.usePresence=aa,t.useReducedMotion=Nl,t.useReducedMotionConfig=function(){const t=Nl(),{reducedMotion:n}=e.useContext(Aa);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=$r.current;t&&t.resetTree()},[])},t.useScroll=Il,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(Aa),s=e.useRef(null),o=Sl(Rn(t)?Bl(t.get()):t),r=e.useRef(o.get()),a=e.useRef(()=>{}),l=()=>{const t=s.current;t&&0===t.time&&t.sample(D.delta),u(),s.current=tn({keyframes:[o.get(),r.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:a.current})},u=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>i?e(t):(r.current=t,a.current=e,R.update(l),o.get()),u),[JSON.stringify(n)]),Ca(()=>{if(Rn(t))return t.on("change",t=>o.set(Bl(t)))},[o]),o},t.useTime=function(){const t=Sl(0);return Ul(e=>t.set(e)),t},t.useTransform=Al,t.useUnmountEffect=cl,t.useVelocity=function(t){const e=Sl(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&R.update(n)};return Fl(t,"change",()=>{R.update(n,!1,!0)}),e},t.useViewportScroll=function(){return Il()},t.useWillChange=function(){return Ua(()=>new Wl("auto"))},t.visualElementStore=Os,t.warning=X,t.wrap=Cs}));