linkees
Version:
A beautiful Single Page component made with React to display all your important social links for your followers (Alternative to linktr.ee).
2 lines • 481 kB
JavaScript
/*! For license information please see index.esm.js.LICENSE.txt */
import{Component as A,Fragment as e,createContext as t,createElement as n,default as i,forwardRef as s,useCallback as r,useContext as f,useEffect as o,useId as a,useInsertionEffect as v,useLayoutEffect as u,useMemo as c,useRef as P}from"react";var g={698:(A,e)=>{var t=Symbol.for("react.transitional.element");function n(A,e,n){var i=null;if(void 0!==n&&(i=""+n),void 0!==e.key&&(i=""+e.key),"key"in e)for(var s in n={},e)"key"!==s&&(n[s]=e[s]);else n=e;return e=n.ref,{$$typeof:t,type:A,key:i,ref:void 0!==e?e:null,props:n}}Symbol.for("react.fragment"),e.jsx=n,e.jsxs=n},848:(A,e,t)=>{A.exports=t(698)}},d={},h=function A(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return g[e](n,n.exports,A),n.exports}(848),l=function(A){var e=A.color,t=void 0===e?"#000":e,n=A.size,i=void 0===n?24:n,s=A.className,r=void 0===s?"":s;return(0,h.jsxs)("svg",{className:"sun-icon ".concat(r),width:i,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Sun icon",children:[(0,h.jsx)("circle",{cx:"12",cy:"12",r:"5",stroke:t,strokeWidth:"2"}),(0,h.jsx)("path",{d:"M12 1V3M12 21V23M4.22 4.22L5.64 5.64M18.36 18.36L19.78 19.78M1 12H3M21 12H23M4.22 19.78L5.64 18.36M18.36 5.64L19.78 4.22",stroke:t,strokeWidth:"2",strokeLinecap:"round"})]})},z=function(A){var e=A.color,t=void 0===e?"#000":e,n=A.size,i=void 0===n?24:n,s=A.className,r=void 0===s?"":s;return(0,h.jsx)("svg",{className:"moon-icon ".concat(r),width:i,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Moon icon",children:(0,h.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:t})})},C=function(A){var e=A.avatar,t=A.name,n=i.useState("dark"),s=n[0],r=n[1];i.useEffect(function(){var A=localStorage.getItem("linkees-theme")||"dark";r(A),document.body.setAttribute("data-theme",A)},[]),i.useEffect(function(){document.body.setAttribute("data-theme",s),localStorage.setItem("linkees-theme",s)},[s]);var f="dark"===s;return(0,h.jsxs)("div",{className:"Header container",children:[(0,h.jsxs)("div",{className:"ten columns Header__inner",children:[e&&(0,h.jsx)("img",{src:e,alt:"".concat(t,"'s avatar"),loading:"lazy"}),(0,h.jsx)("h2",{children:t})]}),(0,h.jsx)("button",{className:"switch-theme-button",onClick:function(){r(function(A){return"dark"===A?"light":"dark"})},"aria-label":"Switch to ".concat(f?"light":"dark"," theme"),type:"button",children:f?(0,h.jsx)(l,{color:"white",size:20}):(0,h.jsx)(z,{size:20})})]})};const E=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],B=(()=>new Set(E))(),H=A=>180*A/Math.PI,m=A=>{const e=H(Math.atan2(A[1],A[0]));return p(e)},x={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:A=>(Math.abs(A[0])+Math.abs(A[3]))/2,rotate:m,rotateZ:m,skewX:A=>H(Math.atan(A[1])),skewY:A=>H(Math.atan(A[2])),skew:A=>(Math.abs(A[1])+Math.abs(A[2]))/2},p=A=>((A%=360)<0&&(A+=360),A),I=A=>Math.sqrt(A[0]*A[0]+A[1]*A[1]),w=A=>Math.sqrt(A[4]*A[4]+A[5]*A[5]),X={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:I,scaleY:w,scale:A=>(I(A)+w(A))/2,rotateX:A=>p(H(Math.atan2(A[6],A[5]))),rotateY:A=>p(H(Math.atan2(-A[2],A[0]))),rotateZ:m,rotate:m,skewX:A=>H(Math.atan(A[4])),skewY:A=>H(Math.atan(A[1])),skew:A=>(Math.abs(A[1])+Math.abs(A[4]))/2};function Q(A){return A.includes("scale")?1:0}function j(A,e){if(!A||"none"===A)return Q(e);const t=A.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(t)n=X,i=t;else{const e=A.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=x,i=e}if(!i)return Q(e);const s=n[e],r=i[1].split(",").map(y);return"function"==typeof s?s(r):r[s]}function y(A){return parseFloat(A.trim())}const O=A=>e=>"string"==typeof e&&e.startsWith(A),T=O("--"),b=O("var(--"),D=A=>!!b(A)&&M.test(A.split("/*")[0].trim()),M=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function L({top:A,left:e,right:t,bottom:n}){return{x:{min:e,max:t},y:{min:A,max:n}}}const F=(A,e,t)=>A+(e-A)*t;function R(A){return void 0===A||1===A}function N({scale:A,scaleX:e,scaleY:t}){return!R(A)||!R(e)||!R(t)}function V(A){return N(A)||Y(A)||A.z||A.rotate||A.rotateX||A.rotateY||A.skewX||A.skewY}function Y(A){return Z(A.x)||Z(A.y)}function Z(A){return A&&"0%"!==A}function W(A,e,t){return t+e*(A-t)}function q(A,e,t,n,i){return void 0!==i&&(A=W(A,i,n)),W(A,t,n)+e}function J(A,e=0,t=1,n,i){A.min=q(A.min,e,t,n,i),A.max=q(A.max,e,t,n,i)}function U(A,{x:e,y:t}){J(A.x,e.translate,e.scale,e.originPoint),J(A.y,t.translate,t.scale,t.originPoint)}const G=.999999999999,k=1.0000000000001;function K(A,e){A.min=A.min+e,A.max=A.max+e}function S(A,e,t,n,i=.5){J(A,e,t,F(A.min,A.max,i),n)}function $(A,e){S(A.x,e.x,e.scaleX,e.scale,e.originX),S(A.y,e.y,e.scaleY,e.scale,e.originY)}function _(A,e){return L(function(A,e){if(!e)return A;const t=e({x:A.left,y:A.top}),n=e({x:A.right,y:A.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}(A.getBoundingClientRect(),e))}const AA=new Set(["width","height","top","left","right","bottom",...E]),eA=(A,e,t)=>t>e?e:t<A?A:t,tA={test:A=>"number"==typeof A,parse:parseFloat,transform:A=>A},nA={...tA,transform:A=>eA(0,1,A)},iA={...tA,default:1},sA=A=>({test:e=>"string"==typeof e&&e.endsWith(A)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${A}`}),rA=sA("deg"),fA=sA("%"),oA=sA("px"),aA=sA("vh"),vA=sA("vw"),uA=(()=>({...fA,parse:A=>fA.parse(A)/100,transform:A=>fA.transform(100*A)}))(),cA=A=>e=>e.test(A),PA=[tA,oA,fA,rA,vA,aA,{test:A=>"auto"===A,parse:A=>A}],gA=A=>PA.find(cA(A)),dA=A=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(A),hA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lA(A,e,t=1){const[n,i]=function(A){const e=hA.exec(A);if(!e)return[,];const[,t,n,i]=e;return[`--${t??n}`,i]}(A);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);if(s){const A=s.trim();return dA(A)?parseFloat(A):A}return D(i)?lA(i,e,t+1):i}const zA=A=>A===tA||A===oA,CA=new Set(["x","y","z"]),EA=E.filter(A=>!CA.has(A)),BA={width:({x:A},{paddingLeft:e="0",paddingRight:t="0"})=>A.max-A.min-parseFloat(e)-parseFloat(t),height:({y:A},{paddingTop:e="0",paddingBottom:t="0"})=>A.max-A.min-parseFloat(e)-parseFloat(t),top:(A,{top:e})=>parseFloat(e),left:(A,{left:e})=>parseFloat(e),bottom:({y:A},{top:e})=>parseFloat(e)+(A.max-A.min),right:({x:A},{left:e})=>parseFloat(e)+(A.max-A.min),x:(A,{transform:e})=>j(e,"x"),y:(A,{transform:e})=>j(e,"y")};BA.translateX=BA.x,BA.translateY=BA.y;const HA=A=>A,mA={},xA=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],pA={value:null,addProjectionMetrics:null};function IA(A,e){let t=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>t=!0,r=xA.reduce((A,t)=>(A[t]=function(A,e){let t=new Set,n=new Set,i=!1,s=!1;const r=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1},o=0;function a(e){r.has(e)&&(v.schedule(e),A()),o++,e(f)}const v={schedule:(A,e=!1,s=!1)=>{const f=s&&i?t:n;return e&&r.add(A),f.has(A)||f.add(A),A},cancel:A=>{n.delete(A),r.delete(A)},process:A=>{f=A,i?s=!0:(i=!0,[t,n]=[n,t],t.forEach(a),e&&pA.value&&pA.value.frameloop[e].push(o),o=0,t.clear(),i=!1,s&&(s=!1,v.process(A)))}};return v}(s,e?t:void 0),A),{}),{setup:f,read:o,resolveKeyframes:a,preUpdate:v,update:u,preRender:c,render:P,postRender:g}=r,d=()=>{const s=mA.useManualTiming?i.timestamp:performance.now();t=!1,mA.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(s-i.timestamp,40),1)),i.timestamp=s,i.isProcessing=!0,f.process(i),o.process(i),a.process(i),v.process(i),u.process(i),c.process(i),P.process(i),g.process(i),i.isProcessing=!1,t&&e&&(n=!1,A(d))};return{schedule:xA.reduce((e,s)=>{const f=r[s];return e[s]=(e,s=!1,r=!1)=>(t||(t=!0,n=!0,i.isProcessing||A(d)),f.schedule(e,s,r)),e},{}),cancel:A=>{for(let e=0;e<xA.length;e++)r[xA[e]].cancel(A)},state:i,steps:r}}const{schedule:wA,cancel:XA,state:QA,steps:jA}=IA("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:HA,!0),yA=new Set;let OA=!1,TA=!1,bA=!1;function DA(){if(TA){const A=Array.from(yA).filter(A=>A.needsMeasurement),e=new Set(A.map(A=>A.element)),t=new Map;e.forEach(A=>{const e=function(A){const e=[];return EA.forEach(t=>{const n=A.getValue(t);void 0!==n&&(e.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),e}(A);e.length&&(t.set(A,e),A.render())}),A.forEach(A=>A.measureInitialState()),e.forEach(A=>{A.render();const e=t.get(A);e&&e.forEach(([e,t])=>{A.getValue(e)?.set(t)})}),A.forEach(A=>A.measureEndState()),A.forEach(A=>{void 0!==A.suspendedScrollY&&window.scrollTo(0,A.suspendedScrollY)})}TA=!1,OA=!1,yA.forEach(A=>A.complete(bA)),yA.clear()}function MA(){yA.forEach(A=>{A.readKeyframes(),A.needsMeasurement&&(TA=!0)})}class LA{constructor(A,e,t,n,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...A],this.onComplete=e,this.name=t,this.motionValue=n,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(yA.add(this),OA||(OA=!0,wA.read(MA),wA.resolveKeyframes(DA))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:A,name:e,element:t,motionValue:n}=this;if(null===A[0]){const i=n?.get(),s=A[A.length-1];if(void 0!==i)A[0]=i;else if(t&&e){const n=t.readValue(e,s);null!=n&&(A[0]=n)}void 0===A[0]&&(A[0]=s),n&&void 0===i&&n.set(A[0])}!function(A){for(let e=1;e<A.length;e++)A[e]??(A[e]=A[e-1])}(A)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(A=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,A),yA.delete(this)}cancel(){"scheduled"===this.state&&(yA.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const FA=A=>/^0[^.\s]+$/u.test(A);function RA(A){return"number"==typeof A?0===A:null===A||"none"===A||"0"===A||FA(A)}const NA=A=>Math.round(1e5*A)/1e5,VA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,YA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ZA=(A,e)=>t=>Boolean("string"==typeof t&&YA.test(t)&&t.startsWith(A)||e&&!function(A){return null==A}(t)&&Object.prototype.hasOwnProperty.call(t,e)),WA=(A,e,t)=>n=>{if("string"!=typeof n)return n;const[i,s,r,f]=n.match(VA);return{[A]:parseFloat(i),[e]:parseFloat(s),[t]:parseFloat(r),alpha:void 0!==f?parseFloat(f):1}},qA={...tA,transform:A=>Math.round((A=>eA(0,255,A))(A))},JA={test:ZA("rgb","red"),parse:WA("red","green","blue"),transform:({red:A,green:e,blue:t,alpha:n=1})=>"rgba("+qA.transform(A)+", "+qA.transform(e)+", "+qA.transform(t)+", "+NA(nA.transform(n))+")"},UA={test:ZA("#"),parse:function(A){let e="",t="",n="",i="";return A.length>5?(e=A.substring(1,3),t=A.substring(3,5),n=A.substring(5,7),i=A.substring(7,9)):(e=A.substring(1,2),t=A.substring(2,3),n=A.substring(3,4),i=A.substring(4,5),e+=e,t+=t,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:JA.transform},GA={test:ZA("hsl","hue"),parse:WA("hue","saturation","lightness"),transform:({hue:A,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(A)+", "+fA.transform(NA(e))+", "+fA.transform(NA(t))+", "+NA(nA.transform(n))+")"},kA={test:A=>JA.test(A)||UA.test(A)||GA.test(A),parse:A=>JA.test(A)?JA.parse(A):GA.test(A)?GA.parse(A):UA.parse(A),transform:A=>"string"==typeof A?A:A.hasOwnProperty("red")?JA.transform(A):GA.transform(A),getAnimatableNone:A=>{const e=kA.parse(A);return e.alpha=0,kA.transform(e)}},KA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,SA="number",$A="color",_A=/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 Ae(A){const e=A.toString(),t=[],n={color:[],number:[],var:[]},i=[];let s=0;const r=e.replace(_A,A=>(kA.test(A)?(n.color.push(s),i.push($A),t.push(kA.parse(A))):A.startsWith("var(")?(n.var.push(s),i.push("var"),t.push(A)):(n.number.push(s),i.push(SA),t.push(parseFloat(A))),++s,"${}")).split("${}");return{values:t,split:r,indexes:n,types:i}}function ee(A){return Ae(A).values}function te(A){const{split:e,types:t}=Ae(A),n=e.length;return A=>{let i="";for(let s=0;s<n;s++)if(i+=e[s],void 0!==A[s]){const e=t[s];i+=e===SA?NA(A[s]):e===$A?kA.transform(A[s]):A[s]}return i}}const ne=A=>"number"==typeof A?0:kA.test(A)?kA.getAnimatableNone(A):A,ie={test:function(A){return isNaN(A)&&"string"==typeof A&&(A.match(VA)?.length||0)+(A.match(KA)?.length||0)>0},parse:ee,createTransformer:te,getAnimatableNone:function(A){const e=ee(A);return te(A)(e.map(ne))}},se=new Set(["brightness","contrast","saturate","opacity"]);function re(A){const[e,t]=A.slice(0,-1).split("(");if("drop-shadow"===e)return A;const[n]=t.match(VA)||[];if(!n)return A;const i=t.replace(n,"");let s=se.has(e)?1:0;return n!==t&&(s*=100),e+"("+s+i+")"}const fe=/\b([a-z-]*)\(.*?\)/gu,oe={...ie,getAnimatableNone:A=>{const e=A.match(fe);return e?e.map(re).join(" "):A}},ae={...tA,transform:Math.round},ve={borderWidth:oA,borderTopWidth:oA,borderRightWidth:oA,borderBottomWidth:oA,borderLeftWidth:oA,borderRadius:oA,radius:oA,borderTopLeftRadius:oA,borderTopRightRadius:oA,borderBottomRightRadius:oA,borderBottomLeftRadius:oA,width:oA,maxWidth:oA,height:oA,maxHeight:oA,top:oA,right:oA,bottom:oA,left:oA,padding:oA,paddingTop:oA,paddingRight:oA,paddingBottom:oA,paddingLeft:oA,margin:oA,marginTop:oA,marginRight:oA,marginBottom:oA,marginLeft:oA,backgroundPositionX:oA,backgroundPositionY:oA,rotate:rA,rotateX:rA,rotateY:rA,rotateZ:rA,scale:iA,scaleX:iA,scaleY:iA,scaleZ:iA,skew:rA,skewX:rA,skewY:rA,distance:oA,translateX:oA,translateY:oA,translateZ:oA,x:oA,y:oA,z:oA,perspective:oA,transformPerspective:oA,opacity:nA,originX:uA,originY:uA,originZ:oA,zIndex:ae,fillOpacity:nA,strokeOpacity:nA,numOctaves:ae},ue={...ve,color:kA,backgroundColor:kA,outlineColor:kA,fill:kA,stroke:kA,borderColor:kA,borderTopColor:kA,borderRightColor:kA,borderBottomColor:kA,borderLeftColor:kA,filter:oe,WebkitFilter:oe},ce=A=>ue[A];function Pe(A,e){let t=ce(A);return t!==oe&&(t=ie),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const ge=new Set(["auto","none","0"]);class de extends LA{constructor(A,e,t,n,i){super(A,e,t,n,i,!0)}readKeyframes(){const{unresolvedKeyframes:A,element:e,name:t}=this;if(!e||!e.current)return;super.readKeyframes();for(let t=0;t<A.length;t++){let n=A[t];if("string"==typeof n&&(n=n.trim(),D(n))){const i=lA(n,e.current);void 0!==i&&(A[t]=i),t===A.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!AA.has(t)||2!==A.length)return;const[n,i]=A,s=gA(n),r=gA(i);if(s!==r)if(zA(s)&&zA(r))for(let e=0;e<A.length;e++){const t=A[e];"string"==typeof t&&(A[e]=parseFloat(t))}else BA[t]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:A,name:e}=this,t=[];for(let e=0;e<A.length;e++)(null===A[e]||RA(A[e]))&&t.push(e);t.length&&function(A,e,t){let n,i=0;for(;i<A.length&&!n;){const e=A[i];"string"==typeof e&&!ge.has(e)&&Ae(e).values.length&&(n=A[i]),i++}if(n&&t)for(const i of e)A[i]=Pe(t,n)}(A,t,e)}measureInitialState(){const{element:A,unresolvedKeyframes:e,name:t}=this;if(!A||!A.current)return;"height"===t&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=BA[t](A.measureViewportBox(),window.getComputedStyle(A.current)),e[0]=this.measuredOrigin;const n=e[e.length-1];void 0!==n&&A.getValue(t,n).jump(n,!1)}measureEndState(){const{element:A,name:e,unresolvedKeyframes:t}=this;if(!A||!A.current)return;const n=A.getValue(e);n&&n.jump(this.measuredOrigin,!1);const i=t.length-1,s=t[i];t[i]=BA[e](A.measureViewportBox(),window.getComputedStyle(A.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,t])=>{A.getValue(e).set(t)}),this.resolveNoneKeyframes()}}const he=A=>Boolean(A&&A.getVelocity);let le;function ze(){le=void 0}const Ce={now:()=>(void 0===le&&Ce.set(QA.isProcessing||mA.useManualTiming?QA.timestamp:performance.now()),le),set:A=>{le=A,queueMicrotask(ze)}};function Ee(A,e){-1===A.indexOf(e)&&A.push(e)}function Be(A,e){const t=A.indexOf(e);t>-1&&A.splice(t,1)}class He{constructor(){this.subscriptions=[]}add(A){return Ee(this.subscriptions,A),()=>Be(this.subscriptions,A)}notify(A,e,t){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](A,e,t);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(A,e,t)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function me(A,e){return e?A*(1e3/e):0}const xe={current:void 0};class pe{constructor(A,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=A=>{const e=Ce.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(A),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const A of this.dependents)A.dirty()},this.hasAnimated=!1,this.setCurrent(A),this.owner=e.owner}setCurrent(A){var e;this.current=A,this.updatedAt=Ce.now(),null===this.canTrackVelocity&&void 0!==A&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(A=this.current){this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt}onChange(A){return this.on("change",A)}on(A,e){this.events[A]||(this.events[A]=new He);const t=this.events[A].add(e);return"change"===A?()=>{t(),wA.read(()=>{this.events.change.getSize()||this.stop()})}:t}clearListeners(){for(const A in this.events)this.events[A].clear()}attach(A,e){this.passiveEffect=A,this.stopPassiveEffect=e}set(A){this.passiveEffect?this.passiveEffect(A,this.updateAndNotify):this.updateAndNotify(A)}setWithVelocity(A,e,t){this.set(e),this.prev=void 0,this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt-t}jump(A,e=!0){this.updateAndNotify(A),this.prev=A,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(A){this.dependents||(this.dependents=new Set),this.dependents.add(A)}removeDependent(A){this.dependents&&this.dependents.delete(A)}get(){return xe.current&&xe.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const A=Ce.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||A-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return me(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(A){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=A(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ie(A,e){return new pe(A,e)}const we=[...PA,kA,ie],{schedule:Xe,cancel:Qe}=IA(queueMicrotask,!1),je={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"]},ye={};for(const A in je)ye[A]={isEnabled:e=>je[A].some(A=>!!e[A])};const Oe=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Te="undefined"!=typeof window,be={current:null},De={current:!1},Me=new WeakMap;function Le(A){return null!==A&&"object"==typeof A&&"function"==typeof A.start}function Fe(A){return"string"==typeof A||Array.isArray(A)}const Re=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ne=["initial",...Re];function Ve(A){return Le(A.animate)||Ne.some(e=>Fe(A[e]))}function Ye(A){return Boolean(Ve(A)||A.variants)}function Ze(A){const e=[{},{}];return A?.values.forEach((A,t)=>{e[0][t]=A.get(),e[1][t]=A.getVelocity()}),e}function We(A,e,t,n){if("function"==typeof e){const[i,s]=Ze(n);e=e(void 0!==t?t:A.custom,i,s)}if("string"==typeof e&&(e=A.variants&&A.variants[e]),"function"==typeof e){const[i,s]=Ze(n);e=e(void 0!==t?t:A.custom,i,s)}return e}const qe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Je{scrapeMotionValuesFromProps(A,e,t){return{}}constructor({parent:A,props:e,presenceContext:t,reducedMotionConfig:n,blockInitialAnimation:i,visualState:s},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=LA,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 A=Ce.now();this.renderScheduledAt<A&&(this.renderScheduledAt=A,wA.render(this.render,!1,!0))};const{latestValues:f,renderState:o}=s;this.latestValues=f,this.baseTarget={...f},this.initialValues=e.initial?{...f}:{},this.renderState=o,this.parent=A,this.props=e,this.presenceContext=t,this.depth=A?A.depth+1:0,this.reducedMotionConfig=n,this.options=r,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Ve(e),this.isVariantNode=Ye(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(A&&A.current);const{willChange:a,...v}=this.scrapeMotionValuesFromProps(e,{},this);for(const A in v){const e=v[A];void 0!==f[A]&&he(e)&&e.set(f[A])}}mount(A){this.current=A,Me.set(A,this),this.projection&&!this.projection.instance&&this.projection.mount(A),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((A,e)=>this.bindToMotionValue(e,A)),De.current||function(){if(De.current=!0,Te)if(window.matchMedia){const A=window.matchMedia("(prefers-reduced-motion)"),e=()=>be.current=A.matches;A.addEventListener("change",e),e()}else be.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||be.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),XA(this.notifyUpdate),XA(this.render),this.valueSubscriptions.forEach(A=>A()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const A in this.events)this.events[A].clear();for(const A in this.features){const e=this.features[A];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(A){this.children.add(A),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(A)}removeChild(A){this.children.delete(A),this.enteringChildren&&this.enteringChildren.delete(A)}bindToMotionValue(A,e){this.valueSubscriptions.has(A)&&this.valueSubscriptions.get(A)();const t=B.has(A);t&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[A]=e,this.props.onUpdate&&wA.preRender(this.notifyUpdate),t&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,A,e)),this.valueSubscriptions.set(A,()=>{n(),i&&i(),e.owner&&e.stop()})}sortNodePosition(A){return this.current&&this.sortInstanceNodePosition&&this.type===A.type?this.sortInstanceNodePosition(this.current,A.current):0}updateFeatures(){let A="animation";for(A in ye){const e=ye[A];if(!e)continue;const{isEnabled:t,Feature:n}=e;if(!this.features[A]&&n&&t(this.props)&&(this.features[A]=new n(this)),this.features[A]){const e=this.features[A];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(A){return this.latestValues[A]}setStaticValue(A,e){this.latestValues[A]=e}update(A,e){(A.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=A,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<qe.length;e++){const t=qe[e];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const n=A["on"+t];n&&(this.propEventSubscriptions[t]=this.on(t,n))}this.prevMotionValues=function(A,e,t){for(const n in e){const i=e[n],s=t[n];if(he(i))A.addValue(n,i);else if(he(s))A.addValue(n,Ie(i,{owner:A}));else if(s!==i)if(A.hasValue(n)){const e=A.getValue(n);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=A.getStaticValue(n);A.addValue(n,Ie(void 0!==e?e:i,{owner:A}))}}for(const n in t)void 0===e[n]&&A.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(A,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(A){return this.props.variants?this.props.variants[A]: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(A){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(A),()=>e.variantChildren.delete(A)}addValue(A,e){const t=this.values.get(A);e!==t&&(t&&this.removeValue(A),this.bindToMotionValue(A,e),this.values.set(A,e),this.latestValues[A]=e.get())}removeValue(A){this.values.delete(A);const e=this.valueSubscriptions.get(A);e&&(e(),this.valueSubscriptions.delete(A)),delete this.latestValues[A],this.removeValueFromRenderState(A,this.renderState)}hasValue(A){return this.values.has(A)}getValue(A,e){if(this.props.values&&this.props.values[A])return this.props.values[A];let t=this.values.get(A);return void 0===t&&void 0!==e&&(t=Ie(null===e?void 0:e,{owner:this}),this.addValue(A,t)),t}readValue(A,e){let t=void 0===this.latestValues[A]&&this.current?this.getBaseTargetFromProps(this.props,A)??this.readValueFromInstance(this.current,A,this.options):this.latestValues[A];var n;return null!=t&&("string"==typeof t&&(dA(t)||FA(t))?t=parseFloat(t):(n=t,!we.find(cA(n))&&ie.test(e)&&(t=Pe(A,e))),this.setBaseTarget(A,he(t)?t.get():t)),he(t)?t.get():t}setBaseTarget(A,e){this.baseTarget[A]=e}getBaseTarget(A){const{initial:e}=this.props;let t;if("string"==typeof e||"object"==typeof e){const n=We(this.props,e,this.presenceContext?.custom);n&&(t=n[A])}if(e&&void 0!==t)return t;const n=this.getBaseTargetFromProps(this.props,A);return void 0===n||he(n)?void 0!==this.initialValues[A]&&void 0===t?void 0:this.baseTarget[A]:n}on(A,e){return this.events[A]||(this.events[A]=new He),this.events[A].add(e)}notify(A,...e){this.events[A]&&this.events[A].notify(...e)}scheduleRenderMicrotask(){Xe.render(this.render)}}class Ue extends Je{constructor(){super(...arguments),this.KeyframeResolver=de}sortInstanceNodePosition(A,e){return 2&A.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(A,e){return A.style?A.style[e]:void 0}removeValueFromRenderState(A,{vars:e,style:t}){delete e[A],delete t[A]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:A}=this.props;he(A)&&(this.childSubscription=A.on("change",A=>{this.current&&(this.current.textContent=`${A}`)}))}}const Ge=(A,e)=>e&&"number"==typeof A?e.transform(A):A,ke={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ke=E.length;function Se(A,e,t){const{style:n,vars:i,transformOrigin:s}=A;let r=!1,f=!1;for(const A in e){const t=e[A];if(B.has(A))r=!0;else if(T(A))i[A]=t;else{const e=Ge(t,ve[A]);A.startsWith("origin")?(f=!0,s[A]=e):n[A]=e}}if(e.transform||(r||t?n.transform=function(A,e,t){let n="",i=!0;for(let s=0;s<Ke;s++){const r=E[s],f=A[r];if(void 0===f)continue;let o=!0;if(o="number"==typeof f?f===(r.startsWith("scale")?1:0):0===parseFloat(f),!o||t){const A=Ge(f,ve[r]);o||(i=!1,n+=`${ke[r]||r}(${A}) `),t&&(e[r]=A)}}return n=n.trim(),t?n=t(e,i?"":n):i&&(n="none"),n}(e,A.transform,t):n.transform&&(n.transform="none")),f){const{originX:A="50%",originY:e="50%",originZ:t=0}=s;n.transformOrigin=`${A} ${e} ${t}`}}function $e(A,{style:e,vars:t},n,i){const s=A.style;let r;for(r in e)s[r]=e[r];for(r in i?.applyProjectionStyles(s,n),t)s.setProperty(r,t[r])}const _e={};function At(A,{layout:e,layoutId:t}){return B.has(A)||A.startsWith("origin")||(e||void 0!==t)&&(!!_e[A]||"opacity"===A)}function et(A,e,t){const{style:n}=A,i={};for(const s in n)(he(n[s])||e.style&&he(e.style[s])||At(s,A)||void 0!==t?.getValue(s)?.liveStyle)&&(i[s]=n[s]);return i}class tt extends Ue{constructor(){super(...arguments),this.type="html",this.renderInstance=$e}readValueFromInstance(A,e){if(B.has(e))return this.projection?.isProjecting?Q(e):((A,e)=>{const{transform:t="none"}=getComputedStyle(A);return j(t,e)})(A,e);{const n=(t=A,window.getComputedStyle(t)),i=(T(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof i?i.trim():i}var t}measureInstanceViewportBox(A,{transformPagePoint:e}){return _(A,e)}build(A,e,t){Se(A,e,t.transformTemplate)}scrapeMotionValuesFromProps(A,e,t){return et(A,e,t)}}const nt=A=>A.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),it={offset:"stroke-dashoffset",array:"stroke-dasharray"},st={offset:"strokeDashoffset",array:"strokeDasharray"};function rt(A,{attrX:e,attrY:t,attrScale:n,pathLength:i,pathSpacing:s=1,pathOffset:r=0,...f},o,a,v){if(Se(A,f,a),o)return void(A.style.viewBox&&(A.attrs.viewBox=A.style.viewBox));A.attrs=A.style,A.style={};const{attrs:u,style:c}=A;u.transform&&(c.transform=u.transform,delete u.transform),(c.transform||u.transformOrigin)&&(c.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),c.transform&&(c.transformBox=v?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==t&&(u.y=t),void 0!==n&&(u.scale=n),void 0!==i&&function(A,e,t=1,n=0,i=!0){A.pathLength=1;const s=i?it:st;A[s.offset]=oA.transform(-n);const r=oA.transform(e),f=oA.transform(t);A[s.array]=`${r} ${f}`}(u,i,s,r,!1)}const ft=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"]),ot=A=>"string"==typeof A&&"svg"===A.toLowerCase();function at(A,e,t){const n=et(A,e,t);for(const t in A)(he(A[t])||he(e[t]))&&(n[-1!==E.indexOf(t)?"attr"+t.charAt(0).toUpperCase()+t.substring(1):t]=A[t]);return n}class vt extends Ue{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Oe}getBaseTargetFromProps(A,e){return A[e]}readValueFromInstance(A,e){if(B.has(e)){const A=ce(e);return A&&A.default||0}return e=ft.has(e)?e:nt(e),A.getAttribute(e)}scrapeMotionValuesFromProps(A,e,t){return at(A,e,t)}build(A,e,t){rt(A,e,this.isSVGTag,t.transformTemplate,t.style)}renderInstance(A,e,t,n){!function(A,e,t,n){$e(A,e,void 0,n);for(const t in e.attrs)A.setAttribute(ft.has(t)?t:nt(t),e.attrs[t])}(A,e,0,n)}mount(A){this.isSVGTag=ot(A.tagName),super.mount(A)}}const ut=["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 ct(A){return"string"==typeof A&&!A.includes("-")&&!!(ut.indexOf(A)>-1||/[A-Z]/u.test(A))}const Pt=(A,t)=>ct(A)?new vt(t):new tt(t,{allowProjection:A!==e}),gt=t({}),dt=t({strict:!1}),ht=t({transformPagePoint:A=>A,isStatic:!1,reducedMotion:"never"}),lt=t({});function zt(A){return Array.isArray(A)?A.join(" "):A}function Ct(A,e,t){for(const n in e)he(e[n])||At(n,t)||(A[n]=e[n])}function Et(A,e){const t={},n=function(A,e){const t={};return Ct(t,A.style||{},A),Object.assign(t,function({transformTemplate:A},e){return c(()=>{const t={style:{},transform:{},transformOrigin:{},vars:{}};return Se(t,e,A),Object.assign({},t.vars,t.style)},[e])}(A,e)),t}(A,e);return A.drag&&!1!==A.dragListener&&(t.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===A.drag?"none":"pan-"+("x"===A.drag?"y":"x")),void 0===A.tabIndex&&(A.onTap||A.onTapStart||A.whileTap)&&(t.tabIndex=0),t.style=n,t}function Bt(A,e,t,n){const i=c(()=>{const t={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return rt(t,e,ot(n),A.transformTemplate,A.style),{...t.attrs,style:{...t.style}}},[e]);if(A.style){const e={};Ct(e,A.style,A),i.style={...e,...i.style}}return i}const Ht=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 mt(A){return A.startsWith("while")||A.startsWith("drag")&&"draggable"!==A||A.startsWith("layout")||A.startsWith("onTap")||A.startsWith("onPan")||A.startsWith("onLayout")||Ht.has(A)}let xt=A=>!mt(A);try{"function"==typeof(pt=require("@emotion/is-prop-valid").default)&&(xt=A=>A.startsWith("on")?!mt(A):pt(A))}catch{}var pt;function It(A,t,i,{latestValues:s},r,f=!1){const o=(ct(A)?Bt:Et)(t,s,r,A),a=function(A,e,t){const n={};for(const i in A)"values"===i&&"object"==typeof A.values||(xt(i)||!0===t&&mt(i)||!e&&!mt(i)||A.draggable&&i.startsWith("onDrag"))&&(n[i]=A[i]);return n}(t,"string"==typeof A,f),v=A!==e?{...a,...o,ref:i}:{},{children:u}=t,P=c(()=>he(u)?u.get():u,[u]);return n(A,{...v,children:P})}const wt=t(null);function Xt(A){return he(A)?A.get():A}function Qt(A,e,t,n){const i={},s=n(A,{});for(const A in s)i[A]=Xt(s[A]);let{initial:r,animate:f}=A;const o=Ve(A),a=Ye(A);e&&a&&!o&&!1!==A.inherit&&(void 0===r&&(r=e.initial),void 0===f&&(f=e.animate));let v=!!t&&!1===t.initial;v=v||!1===r;const u=v?f:r;if(u&&"boolean"!=typeof u&&!Le(u)){const e=Array.isArray(u)?u:[u];for(let t=0;t<e.length;t++){const n=We(A,e[t]);if(n){const{transitionEnd:A,transition:e,...t}=n;for(const A in t){let e=t[A];Array.isArray(e)&&(e=e[v?e.length-1:0]),null!==e&&(i[A]=e)}for(const e in A)i[e]=A[e]}}}return i}const jt=A=>(e,t)=>{const n=f(lt),i=f(wt),s=()=>function({scrapeMotionValuesFromProps:A,createRenderState:e},t,n,i){return{latestValues:Qt(t,n,i,A),renderState:e()}}(A,e,n,i);return t?s():function(A){const e=P(null);return null===e.current&&(e.current=A()),e.current}(s)},yt=jt({scrapeMotionValuesFromProps:et,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})}),Ot=jt({scrapeMotionValuesFromProps:at,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}})}),Tt=Symbol.for("motionComponentSymbol");function bt(A){return A&&"object"==typeof A&&Object.prototype.hasOwnProperty.call(A,"current")}function Dt(A,e,t){return r(n=>{n&&A.onMount&&A.onMount(n),e&&(n?e.mount(n):e.unmount()),t&&("function"==typeof t?t(n):bt(t)&&(t.current=n))},[e])}const Mt="data-"+nt("framerAppearId"),Lt=t({}),Ft=Te?u:o;function Rt(A,e,t,n,i){const{visualElement:s}=f(lt),r=f(dt),a=f(wt),u=f(ht).reducedMotion,c=P(null);n=n||r.renderer,!c.current&&n&&(c.current=n(A,{visualState:e,parent:s,props:t,presenceContext:a,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:u}));const g=c.current,d=f(Lt);!g||g.projection||!i||"html"!==g.type&&"svg"!==g.type||function(A,e,t,n){const{layoutId:i,layout:s,drag:r,dragConstraints:f,layoutScroll:o,layoutRoot:a,layoutCrossfade:v}=e;A.projection=new t(A.latestValues,e["data-framer-portal-id"]?void 0:Nt(A.parent)),A.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:Boolean(r)||f&&bt(f),visualElement:A,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,crossfade:v,layoutScroll:o,layoutRoot:a})}(c.current,t,i,d);const h=P(!1);v(()=>{g&&h.current&&g.update(t,a)});const l=t[Mt],z=P(Boolean(l)&&!window.MotionHandoffIsComplete?.(l)&&window.MotionHasOptimisedAnimation?.(l));return Ft(()=>{g&&(h.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),z.current&&g.animationState&&g.animationState.animateChanges())}),o(()=>{g&&(!z.current&&g.animationState&&g.animationState.animateChanges(),z.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(l)}),z.current=!1),g.enteringChildren=void 0)}),g}function Nt(A){if(A)return!1!==A.options.allowProjection?A.projection:Nt(A.parent)}function Vt(A,{forwardMotionProps:e=!1}={},t,n){t&&function(A){for(const e in A)ye[e]={...ye[e],...A[e]}}(t);const i=ct(A)?Ot:yt;function r(t,s){let r;const o={...f(ht),...t,layoutId:Yt(t)},{isStatic:a}=o,v=function(A){const{initial:e,animate:t}=function(A,e){if(Ve(A)){const{initial:e,animate:t}=A;return{initial:!1===e||Fe(e)?e:void 0,animate:Fe(t)?t:void 0}}return!1!==A.inherit?e:{}}(A,f(lt));return c(()=>({initial:e,animate:t}),[zt(e),zt(t)])}(t),u=i(t,a);if(!a&&Te){f(dt).strict;const e=function(A){const{drag:e,layout:t}=ye;if(!e&&!t)return{};const n={...e,...t};return{MeasureLayout:e?.isEnabled(A)||t?.isEnabled(A)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(o);r=e.MeasureLayout,v.visualElement=Rt(A,u,o,n,e.ProjectionNode)}return(0,h.jsxs)(lt.Provider,{value:v,children:[r&&v.visualElement?(0,h.jsx)(r,{visualElement:v.visualElement,...o}):null,It(A,t,Dt(u,v.visualElement,s),u,a,e)]})}r.displayName=`motion.${"string"==typeof A?A:`create(${A.displayName??A.name??""})`}`;const o=s(r);return o[Tt]=A,o}function Yt({layoutId:A}){const e=f(gt).id;return e&&void 0!==A?e+"-"+A:A}function Zt(A,e){if("undefined"==typeof Proxy)return Vt;const t=new Map,n=(t,n)=>Vt(t,n,A,e);return new Proxy((A,e)=>n(A,e),{get:(i,s)=>"create"===s?n:(t.has(s)||t.set(s,Vt(s,void 0,A,e)),t.get(s))})}function Wt(A,e,t){const n=A.getProps();return We(n,e,void 0!==t?t:n.custom,A)}function qt(A,e){return A?.[e]??A?.default??A}const Jt=A=>Array.isArray(A);function Ut(A,e,t){A.hasValue(e)?A.getValue(e).set(t):A.addValue(e,Ie(t))}function Gt(A){return Jt(A)?A[A.length-1]||0:A}function kt(A,e){const t=A.getValue("willChange");if(n=t,Boolean(he(n)&&n.add))return t.add(e);if(!t&&mA.WillChange){const t=new mA.WillChange("auto");A.addValue("willChange",t),t.add(e)}var n}function Kt(A){return A.props[Mt]}function St(A){A.duration=0,A.type}const $t=(A,e)=>t=>e(A(t)),_t=(...A)=>A.reduce($t),An=A=>1e3*A,en=A=>A/1e3,tn={layout:0,mainThread:0,waapi:0};function nn(A,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?A+6*(e-A)*t:t<.5?e:t<2/3?A+(e-A)*(2/3-t)*6:A}function sn(A,e){return t=>t>0?e:A}const rn=(A,e,t)=>{const n=A*A,i=t*(e*e-n)+n;return i<0?0:Math.sqrt(i)},fn=[UA,JA,GA];function on(A){const e=(t=A,fn.find(A=>A.test(t)));var t;if(Boolean(e),!Boolean(e))return!1;let n=e.parse(A);return e===GA&&(n=function({hue:A,saturation:e,lightness:t,alpha:n}){A/=360,t/=100;let i=0,s=0,r=0;if(e/=100){const n=t<.5?t*(1+e):t+e-t*e,f=2*t-n;i=nn(f,n,A+1/3),s=nn(f,n,A),r=nn(f,n,A-1/3)}else i=s=r=t;return{red:Math.round(255*i),green:Math.round(255*s),blue:Math.round(255*r),alpha:n}}(n)),n}const an=(A,e)=>{const t=on(A),n=on(e);if(!t||!n)return sn(A,e);const i={...t};return A=>(i.red=rn(t.red,n.red,A),i.green=rn(t.green,n.green,A),i.blue=rn(t.blue,n.blue,A),i.alpha=F(t.alpha,n.alpha,A),JA.transform(i))},vn=new Set(["none","hidden"]);function un(A,e){return t=>F(A,e,t)}function cn(A){return"number"==typeof A?un:"string"==typeof A?D(A)?sn:kA.test(A)?an:dn:Array.isArray(A)?Pn:"object"==typeof A?kA.test(A)?an:gn:sn}function Pn(A,e){const t=[...A],n=t.length,i=A.map((A,t)=>cn(A)(A,e[t]));return A=>{for(let e=0;e<n;e++)t[e]=i[e](A);return t}}function gn(A,e){const t={...A,...e},n={};for(const i in t)void 0!==A[i]&&void 0!==e[i]&&(n[i]=cn(A[i])(A[i],e[i]));return A=>{for(const e in n)t[e]=n[e](A);return t}}const dn=(A,e)=>{const t=ie.createTransformer(e),n=Ae(A),i=Ae(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?vn.has(A)&&!i.values.length||vn.has(e)&&!n.values.length?function(A,e){return vn.has(A)?t=>t<=0?A:e:t=>t>=1?e:A}(A,e):_t(Pn(function(A,e){const t=[],n={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],r=A.indexes[s][n[s]],f=A.values[r]??0;t[i]=f,n[s]++}return t}(n,i),i.values),t):sn(A,e)};function hn(A,e,t){return"number"==typeof A&&"number"==typeof e&&"number"==typeof t?F(A,e,t):cn(A)(A,e)}const ln=A=>{const e=({timestamp:e})=>A(e);return{start:(A=!0)=>wA.update(e,A),stop:()=>XA(e),now:()=>QA.isProcessing?QA.timestamp:Ce.now()}},zn=(A,e,t=10)=>{let n="";const i=Math.max(Math.round(e/t),2);for(let e=0;e<i;e++)n+=Math.round(1e4*A(e/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Cn=2e4;function En(A){let e=0,t=A.next(e);for(;!t.done&&e<Cn;)e+=50,t=A.next(e);return e>=Cn?1/0:e}function Bn(A,e,t){const n=Math.max(e-5,0);return me(t-A(n),e-n)}const Hn=.01,mn=2,xn=.005,pn=.5;const In=12;function wn(A,e){return A*Math.sqrt(1-e*e)}const Xn=["duration","bounce"],Qn=["stiffness","damping","mass"];function jn(A,e){return e.some(e=>void 0!==A[e])}function yn(A=.3,e=.3){const t="object"!=typeof A?{visualDuration:A,keyframes:[0,1],bounce:e}:A;let{restSpeed:n,restDelta:i}=t;const s=t.keyframes[0],r=t.keyframes[t.keyframes.length-1],f={done:!1,value:s},{stiffness:o,damping:a,mass:v,duration:u,velocity:c,isResolvedFromDuration:P}=function(A){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...A};if(!jn(A,Qn)&&jn(A,Xn))if(A.visualDuration){const t=A.visualDuration,n=2*Math.PI/(1.2*t),i=n*n,s=2*eA(.05,1,1-(A.bounce||0))*Math.sqrt(i);e={...e,mass:1,stiffness:i,damping:s}}else{const t=function({duration:A=800,bounce:e=.3,velocity:t=0,mass:n=1}){let i,s;An(10);let r=1-e;r=eA(.05,1,r),A=eA(.01,10,en(A)),r<1?(i=e=>{const n=e*r,i=n*A;return.001-(n-t)/wn(e,r)*Math.exp(-i)},s=e=>{const n=e*r*A,s=n*t+t,f=Math.pow(r,2)*Math.pow(e,2)*A,o=Math.exp(-n),a=wn(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((s-f)*o)/a}):(i=e=>Math.exp(-e*A)*((e-t)*A+1)-.001,s=e=>Math.exp(-e*A)*(A*A*(t-e)));const f=function(A,e,t){let n=t;for(let t=1;t<In;t++)n-=A(n)/e(n);return n}(i,s,5/A);if(A=An(A),isNaN(f))return{stiffness:100,damping:10,duration:A};{const e=Math.pow(f,2)*n;return{stiffness:e,damping:2*r*Math.sqrt(n*e),duration:A}}}(A);e={...e,...t,mass:1},e.isResolvedFromDuration=!0}return e}({...t,velocity:-en(t.velocity||0)}),g=c||0,d=a/(2*Math.sqrt(o*v)),h=r-s,l=en(Math.sqrt(o/v)),z=Math.abs(h)<5;let C;if(n||(n=z?Hn:mn),i||(i=z?xn:pn),d<1){const A=wn(l,d);C=e=>{const t=Math.exp(-d*l*e);return r-t*((g+d*l*h)/A*Math.sin(A*e)+h*Math.cos(A*e))}}else if(1===d)C=A=>r-Math.exp(-l*A)*(h+(g+l*h)*A);else{const A=l*Math.sqrt(d*d-1);C=e=>{const t=Math.exp(-d*l*e),n=Math.min(A*e,300);return r-t*((g+d*l*h)*Math.sinh(n)+A*h*Math.cosh(n))/A}}const E={calculatedDuration:P&&u||null,next:A=>{const e=C(A);if(P)f.done=A>=u;else{let t=0===A?g:0;d<1&&(t=0===A?An(g):Bn(C,A,e));const s=Math.abs(t)<=n,o=Math.abs(r-e)<=i;f.done=s&&o}return f.value=f.done?r:e,f},toString:()=>{const A=Math.min(En(E),Cn),e=zn(e=>E.next(A*e).value,A,30);return A+"ms "+e},toTransition:()=>{}};return E}function On({keyframes:A,velocity:e=0,power:t=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:r,min:f,max:o,restDelta:a=.5,restSpeed:v}){const u=A[0],c={done:!1,value:u},P=A=>void 0===f?o:void 0===o||Math.abs(f-A)<Math.abs(o-A)?f:o;let g=t*e;const d=u+g,h=void 0===r?d:r(d);h!==d&&(g=h-u);const l=A=>-g*Math.exp(-A/n),z=A=>h+l(A),C=A=>{const e=l(A),t=z(A);c.done=Math.abs(e)<=a,c.value=c.done?h:t};let E,B;const H=A=>{var e;e=c.value,(void 0!==f&&e<f||void 0!==o&&e>o)&&(E=A,B=yn({keyframes:[c.value,P(c.value)],velocity:Bn(z,A,c.value),damping:i,stiffness:s,restDelta:a,restSpeed:v}))};return H(0),{calculatedDuration:null,next:A=>{let e=!1;return B||void 0!==E||(e=!0,C(A),H(A)),void 0!==E&&A>=E?B.next(A-E):(!e&&C(A),c)}}}yn.applyToOptions=A=>{const e=function(A,e=100){const t=yn({...A,keyframes:[0,e]}),n=Math.min(En(t),Cn);return{type:"keyframes",ease:A=>t.next(n*A).value/e,duration:en(n)}}(A,100);return A.ease=e.ease,A.duration=An(e.duration),A.type="keyframes",A};const Tn=(A,e,t)=>(((1-3*t+3*e)*A+(3*t-6*e))*A+3*e)*A;function bn(A,e,t,n){if(A===e&&t===n)return HA;return i=>0===i||1===i?i:Tn(function(A,e,t,n,i){let s,r,f=0;do{r=e+(t-e)/2,s=Tn(r,n,i)-A,s>0?t=r:e=r}while(Math.abs(s)>1e-7&&++f<12);return r}(i,0,1,A,t),e,n)}const Dn=bn(.42,0,1,1),Mn=bn(0,0,.58,1),Ln=bn(.42,0,.58,1),Fn=A=>e=>e<=.5?A(2*e)/2:(2-A(2*(1-e)))/2,Rn=A=>e=>1-A(1-e),Nn=bn(.33,1.53,.69,.99),Vn=Rn(Nn),Yn=Fn(Vn),Zn=A=>(A*=2)<1?.5*Vn(A):.5*(2-Math.pow(2,-10*(A-1))),Wn=A=>1-Math.sin(Math.acos(A)),qn=Rn(Wn),Jn=Fn(Wn),Un=A=>Array.isArray(A)&&"number"==typeof A[0],Gn={linear:HA,easeIn:Dn,easeInOut:Ln,easeOut:Mn,circIn:Wn,circInOut:Jn,circOut:qn,backIn:Vn,backInOut:Yn,backOut:Nn,anticipate:Zn},kn=A=>{if(Un(A)){A.length;const[e,t,n,i]=A;return bn(e,t,n,i)}return"string"==typeof A?Gn[A]:A},Kn=(A,e,t)=>{const n=e-A;return 0===n?1:(t-A)/n};function Sn({duration:A=300,keyframes:e,times:t,ease:n="easeInOut"}){const i=(A=>Array.isArray(A)&&"number"!=typeof A[0])(n)?n.map(kn):kn(n),s={done:!1,value:e[0]},r=function(A,e){return A.map(A=>A*e)}(t&&t.length===e.length?t:function(A){const e=[0];return function(A,e){const t=A[A.length-1];for(let n=1;n<=e;n++){const i=Kn(0,e,n);A.push(F(t,1,i))}}(e,A.length-1),e}(e),A),f=function(A,e,{clamp:t=!0,ease:n,mixer:i}={}){const s=A.length;if(e.length,1===s)return()=>e[0];if(2===s&&e[0]===e[1])return()=>e[1];const r=A[0]===A[1];A[0]>A[s-1]&&(A=[...A].reverse(),e=[...e].reverse());const f=function(A,e,t){const n=[],i=t||mA.mix||hn,s=A.length-1;for(let t=0;t<s;t++){let s=i(A[t],A[t+1]);if(e){const A=Array.isArray(e)?e[t]||HA:e;s=_t(A,s)}n.push(s)}return n}(e,n,i),o=f.length,a=t=>{if(r&&t<A[0])return e[0];let n=0;if(o>1)for(;n<A.length-2&&!(t<A[n+1]);n++);const i=Kn(A[n],A[n+1],t);return f[n](i)};return t?e=>a(eA(A[0],A[s-1],e)):a}(r,e,{ease:Array.isArray(i)?i:(o=e,a=i,o.map(()=>a||Ln).splice(0,o.length-1))});var o,a;return{calculatedDuration:A,next:e=>(s.value=f(e),s.done=e>=A,s)}}const $n=A=>null!==A;function _n(A,{repeat:e,repeatType:t="loop"},n,i=1){const s=A.filter($n),r=i<0||e&&"loop"!==t&&e%2==1?0:s.length-1;return r&&void 0!==n?n:s[r]}const Ai={decay:On,inertia:On,tween:Sn,keyframes:Sn,spring:yn};function ei(A){"string"==typeof A.type&&(A.type=Ai[A.type])}class ti{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(A=>{this.resolve=A})}notifyFinished(){this.resolve()}then(A,e){return this.finished.then(A,e)}}const ni=A=>A/100;class ii extends ti{constructor(A){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:A}=this.options;A&&A.updatedAt!==Ce.now()&&this.tick(Ce.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},tn.mainThread++,this.options=A,this.initAnimation(),this.play(),!1===A.autoplay&&this.pause()}initAnimation(){const{options:A}=this;ei(A);const{type:e=Sn,repeat:t=0,repeatDelay:n=0,repeatType:i,velocity:s=0}=A;let{keyframes:r}=A;const f=e||Sn;f!==Sn&&"number"!=typeof r[0]&&(this.mixKeyframes=_t(ni,hn(r[0],r[1])),r=[0,100]);const o=f({...A,keyframes:r});"mirror"===i&&(this.mirroredGenerator=f({...A,keyframes:[...r].reverse(),velocity:-s})),null===o.calculatedDuration&&(o.calculatedDuration=En(o));const{calculatedDuration:a}=o;this.calculatedDuration=a,this.resolvedDuration=a+n,this.totalDuration=this.resolvedDuration*(t+1)-n,this.generator=o}updateTime(A){const e=Math.round(A-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(A,e=!1){const{generator:t,totalDuration:n,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:r,calculatedDuration:f}=this;if(null===this.startTime)return t.next(0);const{delay:o=0,keyframes:a,repeat:v,repeatType:u,repeatDelay:c,type:P,onUpdate:g,finalKeyframe:d}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,A):this.speed<0&&(this.startTime=Math.min(A-n/this.speed,this.startTime)),e?this.currentTime=A:this.updateTime(A);const h=this.currentTime-o*(this.playbackSpeed>=0?1:-1),l=this.playbackSpeed>=0?h<0:h>n;this.currentTime=Math.max(h,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let z=this.currentTime,C=t;if(v){const A=Math.min(this.currentTime,n)/r;let e=Math.floor(A),t=A%1;!t&&A>=1&&(t=1),1===t&&e--,e=Math.min(e,v+1),Boolean(e%2)&&("reverse"===u?(t=1-t,c&&(t-=c/r)):"mirror"===u&&(C=s)),z=eA(0,1,t)*r}const E=l?{done:!1,value:a[0]}:C.next(z);i&&(E.value=i(E.value));let{done:B}=E;l||null===f||(B=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const H=null===this.holdTime&&("finished"===this.state||"running"===this.state&&B);return H&&P!==On&&(E.value=_n(a,this.options,d,this.speed)),g&&g(E.value),H&&this.finish(),E}then(A,e){return this.finished.then(A,e)}get duration(){return en(this.calculatedDuration)}get time(){return en(this.currentTime)}set time(A){A=An(A),this.currentTime=A,null===this.startTime||nul