react-toast-msg
Version:
Fast, flexible, developer-friendly React toast notifications with a clean black & white design.
2 lines • 137 kB
JavaScript
"use client";
var yn=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,o)=>(typeof require!="undefined"?require:e)[o]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});import{twMerge as Ul}from"tailwind-merge";import Wl from"clsx";function ft(...t){return Ul(Wl(t))}import{jsx as $,jsxs as zl}from"react/jsx-runtime";var vn=({className:t})=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ft("size-5.5 shrink-0",t),height:24,width:24,children:$("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"})}),Tn=({className:t})=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ft("size-5.5 shrink-0",t),height:24,width:24,children:$("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),Sn=({className:t})=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ft("size-5.5 shrink-0",t),height:24,width:24,children:$("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),Vn=({className:t})=>zl("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:ft("size-5.5 shrink-0 animate-spin",t),children:[$("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),$("path",{d:"M12 6l0 -3"}),$("path",{d:"M16.25 7.75l2.15 -2.15"}),$("path",{d:"M18 12l3 0"}),$("path",{d:"M16.25 16.25l2.15 2.15"}),$("path",{d:"M12 18l0 3"}),$("path",{d:"M7.75 16.25l-2.15 2.15"}),$("path",{d:"M6 12l-3 0"}),$("path",{d:"M7.75 7.75l-2.15 -2.15"})]}),bn=({className:t})=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:ft("size-3",t),children:$("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})});import{useEffect as Kl,useRef as Xr}from"react";function wn({autoCloseDuration:t,onClose:e}){let o=Xr(null),r=Xr(0),i=Xr(0),s=()=>{o.current&&(clearTimeout(o.current),o.current=null)},n=u=>{s(),r.current=u,i.current=Date.now(),o.current=setTimeout(e,u)};return Kl(()=>{if(t===!1||t===void 0){s(),r.current=0;return}return n(t),()=>{s()}},[t,e]),{pause:()=>{if(!o.current)return;let u=Date.now()-i.current;r.current=Math.max(r.current-u,0),s()},resume:()=>{t===!1||t===void 0||o.current||r.current<=0||n(r.current)}}}function Pn(t,e){return t.filter(o=>o.id!==e)}import{jsx as Ga,Fragment as Sm}from"react/jsx-runtime";import{useMemo as Vm,useRef as sn,useState as Ua,useContext as bm}from"react";import{createContext as Hl}from"react";var ue=Hl({});import{useRef as $l}from"react";function me(t){let e=$l(null);return e.current===null&&(e.current=t()),e.current}import{useLayoutEffect as _l,useEffect as Yl}from"react";var An=typeof window!="undefined";var wo=An?_l:Yl;import{jsx as Fa}from"react/jsx-runtime";import*as Na from"react";import{useId as pm,useMemo as Oa}from"react";import{createContext as Xl}from"react";var Dt=Xl(null);import{jsx as cm}from"react/jsx-runtime";function $t(t,e){t.indexOf(e)===-1&&t.push(e)}function Et(t,e){let o=t.indexOf(e);o>-1&&t.splice(o,1)}var G=(t,e,o)=>o>e?e:o<t?t:o;function ke(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}var ot=()=>{},_=()=>{},Cn;typeof process!="undefined"&&((Cn=process.env)==null?void 0:Cn.NODE_ENV)!=="production"&&(ot=(t,e,o)=>{!t&&typeof console!="undefined"&&console.warn(ke(e,o))},_=(t,e,o)=>{if(!t)throw new Error(ke(e,o))});var X={};var Be=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Fe(t){return typeof t=="object"&&t!==null}var Oe=t=>/^0[^.\s]+$/u.test(t);function Ne(t){let e;return()=>(e===void 0&&(e=t()),e)}var k=t=>t;var ql=(t,e)=>o=>e(t(o)),at=(...t)=>t.reduce(ql);var pt=(t,e,o)=>{let r=e-t;return r===0?1:(o-t)/r};var Vt=class{constructor(){this.subscriptions=[]}add(e){return $t(this.subscriptions,e),()=>Et(this.subscriptions,e)}notify(e,o,r){let i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,o,r);else for(let s=0;s<i;s++){let n=this.subscriptions[s];n&&n(e,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var N=t=>t*1e3,z=t=>t/1e3;function je(t,e){return e?t*(1e3/e):0}var Mn=new Set;function _t(t,e,o){t||Mn.has(e)||(console.warn(ke(e,o)),Mn.add(e))}var Dn=(t,e,o)=>(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,Zl=1e-7,Jl=12;function Ql(t,e,o,r,i){let s,n,a=0;do n=e+(o-e)/2,s=Dn(n,r,i)-t,s>0?o=n:e=n;while(Math.abs(s)>Zl&&++a<Jl);return n}function Rt(t,e,o,r){if(t===e&&o===r)return k;let i=s=>Ql(s,0,1,t,o);return s=>s===0||s===1?s:Dn(i(s),e,r)}var Po=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2;var Ao=t=>e=>1-t(1-e);var Co=Rt(.33,1.53,.69,.99),fe=Ao(Co),Ge=Po(fe);var Ue=t=>t>=1?1:(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1)));var We=t=>1-Math.sin(Math.acos(t)),ze=Ao(We),Ke=Po(We);var qr=Rt(.42,0,1,1),Zr=Rt(0,0,.58,1),He=Rt(.42,0,.58,1);var Jr=t=>Array.isArray(t)&&typeof t[0]!="number";var $e=t=>Array.isArray(t)&&typeof t[0]=="number";var En={linear:k,easeIn:qr,easeInOut:He,easeOut:Zr,circIn:We,circInOut:Ke,circOut:ze,backIn:fe,backInOut:Ge,backOut:Co,anticipate:Ue},tc=t=>typeof t=="string",Mo=t=>{if($e(t)){_(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,o,r,i]=t;return Rt(e,o,r,i)}else if(tc(t))return _(En[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),En[t];return t};var _e=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Z={value:null,addProjectionMetrics:null};function Rn(t,e){let o=new Set,r=new Set,i=!1,s=!1,n=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(m){n.has(m)&&(c.schedule(m),t()),l++,m(a)}let c={schedule:(m,f=!1,p=!1)=>{let d=p&&i?o:r;return f&&n.add(m),d.add(m),m},cancel:m=>{r.delete(m),n.delete(m)},process:m=>{if(a=m,i){s=!0;return}i=!0;let f=o;o=r,r=f,o.forEach(u),e&&Z.value&&Z.value.frameloop[e].push(l),l=0,o.clear(),i=!1,s&&(s=!1,c.process(m))}};return c}var ec=40;function Do(t,e){let o=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},s=()=>o=!0,n=_e.reduce((v,T)=>(v[T]=Rn(s,e?T:void 0),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:m,preRender:f,render:p,postRender:h}=n,d=()=>{let v=X.useManualTiming,T=v?i.timestamp:performance.now();o=!1,v||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,ec),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),m.process(i),f.process(i),p.process(i),h.process(i),i.isProcessing=!1,o&&e&&(r=!1,t(d))},g=()=>{o=!0,r=!0,i.isProcessing||t(d)};return{schedule:_e.reduce((v,T)=>{let V=n[T];return v[T]=(C,E=!1,w=!1)=>(o||g(),V.schedule(C,E,w)),v},{}),cancel:v=>{for(let T=0;T<_e.length;T++)n[_e[T]].cancel(v)},state:i,steps:n}}var{schedule:P,cancel:q,state:O,steps:Ye}=Do(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:k,!0);var Eo;function oc(){Eo=void 0}var B={now:()=>(Eo===void 0&&B.set(O.isProcessing||X.useManualTiming?O.timestamp:performance.now()),Eo),set:t=>{Eo=t,queueMicrotask(oc)}};var ht={layout:0,mainThread:0,waapi:0};var Ln=t=>e=>typeof e=="string"&&e.startsWith(t),Ro=Ln("--"),rc=Ln("var(--"),pe=t=>rc(t)?ic.test(t.split("/*")[0].trim()):!1,ic=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Qr(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}var dt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},bt={...dt,transform:t=>G(0,1,t)},Xe={...dt,default:1};var Lt=t=>Math.round(t*1e5)/1e5;var he=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function In(t){return t==null}var kn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var de=(t,e)=>o=>!!(typeof o=="string"&&kn.test(o)&&o.startsWith(t)||e&&!In(o)&&Object.prototype.hasOwnProperty.call(o,e)),Lo=(t,e,o)=>r=>{if(typeof r!="string")return r;let[i,s,n,a]=r.match(he);return{[t]:parseFloat(i),[e]:parseFloat(s),[o]:parseFloat(n),alpha:a!==void 0?parseFloat(a):1}};var nc=t=>G(0,255,t),ti={...dt,transform:t=>Math.round(nc(t))},gt={test:de("rgb","red"),parse:Lo("red","green","blue"),transform:({red:t,green:e,blue:o,alpha:r=1})=>"rgba("+ti.transform(t)+", "+ti.transform(e)+", "+ti.transform(o)+", "+Lt(bt.transform(r))+")"};function sc(t){let e="",o="",r="",i="";return t.length>5?(e=t.substring(1,3),o=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),o=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,o+=o,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var qe={test:de("#"),parse:sc,transform:gt.transform};var Ze=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),lt=Ze("deg"),Y=Ze("%"),S=Ze("px"),ei=Ze("vh"),oi=Ze("vw"),Io={...Y,parse:t=>Y.parse(t)/100,transform:t=>Y.transform(t*100)};var It={test:de("hsl","hue"),parse:Lo("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:o,alpha:r=1})=>"hsla("+Math.round(t)+", "+Y.transform(Lt(e))+", "+Y.transform(Lt(o))+", "+Lt(bt.transform(r))+")"};var L={test:t=>gt.test(t)||qe.test(t)||It.test(t),parse:t=>gt.test(t)?gt.parse(t):It.test(t)?It.parse(t):qe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?gt.transform(t):It.transform(t),getAnimatableNone:t=>{let e=L.parse(t);return e.alpha=0,L.transform(e)}};var Bn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ac(t){var e,o;return isNaN(t)&&typeof t=="string"&&(((e=t.match(he))==null?void 0:e.length)||0)+(((o=t.match(Bn))==null?void 0:o.length)||0)>0}var On="number",Nn="color",lc="var",cc="var(",Fn="${}",uc=/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 kt(t){let e=t.toString(),o=[],r={color:[],number:[],var:[]},i=[],s=0,a=e.replace(uc,l=>(L.test(l)?(r.color.push(s),i.push(Nn),o.push(L.parse(l))):l.startsWith(cc)?(r.var.push(s),i.push(lc),o.push(l)):(r.number.push(s),i.push(On),o.push(parseFloat(l))),++s,Fn)).split(Fn);return{values:o,split:a,indexes:r,types:i}}function mc(t){return kt(t).values}function jn({split:t,types:e}){let o=t.length;return r=>{let i="";for(let s=0;s<o;s++)if(i+=t[s],r[s]!==void 0){let n=e[s];n===On?i+=Lt(r[s]):n===Nn?i+=L.transform(r[s]):i+=r[s]}return i}}function fc(t){return jn(kt(t))}var pc=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,hc=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:pc(t);function dc(t){let e=kt(t);return jn(e)(e.values.map((r,i)=>hc(r,e.split[i])))}var U={test:ac,parse:mc,createTransformer:fc,getAnimatableNone:dc};function ri(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(e-t)*6*o:o<1/2?e:o<2/3?t+(e-t)*(2/3-o)*6:t}function Gn({hue:t,saturation:e,lightness:o,alpha:r}){t/=360,e/=100,o/=100;let i=0,s=0,n=0;if(!e)i=s=n=o;else{let a=o<.5?o*(1+e):o+e-o*e,l=2*o-a;i=ri(l,a,t+1/3),s=ri(l,a,t),n=ri(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(n*255),alpha:r}}function ge(t,e){return o=>o>0?e:t}var A=(t,e,o)=>t+(e-t)*o;var ii=(t,e,o)=>{let r=t*t,i=o*(e*e-r)+r;return i<0?0:Math.sqrt(i)},gc=[qe,gt,It],xc=t=>gc.find(e=>e.test(t));function Un(t){let e=xc(t);if(ot(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let o=e.parse(t);return e===It&&(o=Gn(o)),o}var ni=(t,e)=>{let o=Un(t),r=Un(e);if(!o||!r)return ge(t,e);let i={...o};return s=>(i.red=ii(o.red,r.red,s),i.green=ii(o.green,r.green,s),i.blue=ii(o.blue,r.blue,s),i.alpha=A(o.alpha,r.alpha,s),gt.transform(i))};var ko=new Set(["none","hidden"]);function Wn(t,e){return ko.has(t)?o=>o<=0?t:e:o=>o>=1?e:t}function yc(t,e){return o=>A(t,e,o)}function Bo(t){return typeof t=="number"?yc:typeof t=="string"?pe(t)?ge:L.test(t)?ni:Sc:Array.isArray(t)?zn:typeof t=="object"?L.test(t)?ni:vc:ge}function zn(t,e){let o=[...t],r=o.length,i=t.map((s,n)=>Bo(s)(s,e[n]));return s=>{for(let n=0;n<r;n++)o[n]=i[n](s);return o}}function vc(t,e){let o={...t,...e},r={};for(let i in o)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Bo(t[i])(t[i],e[i]));return i=>{for(let s in r)o[s]=r[s](i);return o}}function Tc(t,e){var i;let o=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){let n=e.types[s],a=t.indexes[n][r[n]],l=(i=t.values[a])!=null?i:0;o[s]=l,r[n]++}return o}var Sc=(t,e)=>{let o=U.createTransformer(e),r=kt(t),i=kt(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?ko.has(t)&&!i.values.length||ko.has(e)&&!r.values.length?Wn(t,e):at(zn(Tc(r,i),i.values),o):(ot(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ge(t,e))};function Fo(t,e,o){return typeof t=="number"&&typeof e=="number"&&typeof o=="number"?A(t,e,o):Bo(t)(t,e)}var Kn=t=>{let e=({timestamp:o})=>t(o);return{start:(o=!0)=>P.update(e,o),stop:()=>q(e),now:()=>O.isProcessing?O.timestamp:B.now()}};var Oo=(t,e,o=10)=>{let r="",i=Math.max(Math.round(e/o),2);for(let s=0;s<i;s++)r+=Math.round(t(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function xe(t){let e=0,o=50,r=t.next(e);for(;!r.done&&e<2e4;)e+=o,r=t.next(e);return e>=2e4?1/0:e}function Hn(t,e=100,o){let r=o({...t,keyframes:[0,e]}),i=Math.min(xe(r),2e4);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:z(i)}}var F={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function li(t,e){return t*Math.sqrt(1-e*e)}var Vc=12;function bc(t,e,o){let r=o;for(let i=1;i<Vc;i++)r=r-t(r)/e(r);return r}var ai=.001;function wc({duration:t=F.duration,bounce:e=F.bounce,velocity:o=F.velocity,mass:r=F.mass}){let i,s;ot(t<=N(F.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let n=1-e;n=G(F.minDamping,F.maxDamping,n),t=G(F.minDuration,F.maxDuration,z(t)),n<1?(i=u=>{let c=u*n,m=c*t,f=c-o,p=li(u,n),h=Math.exp(-m);return ai-f/p*h},s=u=>{let m=u*n*t,f=m*o+o,p=Math.pow(n,2)*Math.pow(u,2)*t,h=Math.exp(-m),d=li(Math.pow(u,2),n);return(-i(u)+ai>0?-1:1)*((f-p)*h)/d}):(i=u=>{let c=Math.exp(-u*t),m=(u-o)*t+1;return-ai+c*m},s=u=>{let c=Math.exp(-u*t),m=(o-u)*(t*t);return c*m});let a=5/t,l=bc(i,s,a);if(t=N(t),isNaN(l))return{stiffness:F.stiffness,damping:F.damping,duration:t};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:n*2*Math.sqrt(r*u),duration:t}}}var Pc=["duration","bounce"],Ac=["stiffness","damping","mass"];function $n(t,e){return e.some(o=>t[o]!==void 0)}function Cc(t){let e={velocity:F.velocity,stiffness:F.stiffness,damping:F.damping,mass:F.mass,isResolvedFromDuration:!1,...t};if(!$n(t,Ac)&&$n(t,Pc))if(e.velocity=0,t.visualDuration){let o=t.visualDuration,r=2*Math.PI/(o*1.2),i=r*r,s=2*G(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:F.mass,stiffness:i,damping:s}}else{let o=wc({...t,velocity:0});e={...e,...o,mass:F.mass},e.isResolvedFromDuration=!0}return e}function ye(t=F.visualDuration,e=F.bounce){let o=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:r,restDelta:i}=o,s=o.keyframes[0],n=o.keyframes[o.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:m,velocity:f,isResolvedFromDuration:p}=Cc({...o,velocity:-z(o.velocity||0)}),h=f||0,d=u/(2*Math.sqrt(l*c)),g=n-s,x=z(Math.sqrt(l/c)),y=Math.abs(g)<5;r||(r=y?F.restSpeed.granular:F.restSpeed.default),i||(i=y?F.restDelta.granular:F.restDelta.default);let v,T,V,C,E,w;if(d<1)V=li(x,d),C=(h+d*x*g)/V,v=b=>{let R=Math.exp(-d*x*b);return n-R*(C*Math.sin(V*b)+g*Math.cos(V*b))},E=d*x*C+g*V,w=d*x*g-C*V,T=b=>Math.exp(-d*x*b)*(E*Math.sin(V*b)+w*Math.cos(V*b));else if(d===1){v=R=>n-Math.exp(-x*R)*(g+(h+x*g)*R);let b=h+x*g;T=R=>Math.exp(-x*R)*(x*b*R-h)}else{let b=x*Math.sqrt(d*d-1);v=ut=>{let St=Math.exp(-d*x*ut),mt=Math.min(b*ut,300);return n-St*((h+d*x*g)*Math.sinh(mt)+b*g*Math.cosh(mt))/b};let R=(h+d*x*g)/b,K=d*x*R-g*b,Tt=d*x*g-R*b;T=ut=>{let St=Math.exp(-d*x*ut),mt=Math.min(b*ut,300);return St*(K*Math.sinh(mt)+Tt*Math.cosh(mt))}}let M={calculatedDuration:p&&m||null,velocity:b=>N(T(b)),next:b=>{if(!p&&d<1){let K=Math.exp(-d*x*b),Tt=Math.sin(V*b),ut=Math.cos(V*b),St=n-K*(C*Tt+g*ut),mt=N(K*(E*Tt+w*ut));return a.done=Math.abs(mt)<=r&&Math.abs(n-St)<=i,a.value=a.done?n:St,a}let R=v(b);if(p)a.done=b>=m;else{let K=N(T(b));a.done=Math.abs(K)<=r&&Math.abs(n-R)<=i}return a.value=a.done?n:R,a},toString:()=>{let b=Math.min(xe(M),2e4),R=Oo(K=>M.next(b*K).value,b,30);return b+"ms "+R},toTransition:()=>{}};return M}ye.applyToOptions=t=>{let e=Hn(t,100,ye);return t.ease=e.ease,t.duration=N(e.duration),t.type="keyframes",t};var Mc=5;function No(t,e,o){let r=Math.max(e-Mc,0);return je(o-t(r),e-r)}function Je({keyframes:t,velocity:e=0,power:o=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:n,min:a,max:l,restDelta:u=.5,restSpeed:c}){let m=t[0],f={done:!1,value:m},p=w=>a!==void 0&&w<a||l!==void 0&&w>l,h=w=>a===void 0?l:l===void 0||Math.abs(a-w)<Math.abs(l-w)?a:l,d=o*e,g=m+d,x=n===void 0?g:n(g);x!==g&&(d=x-m);let y=w=>-d*Math.exp(-w/r),v=w=>x+y(w),T=w=>{let M=y(w),b=v(w);f.done=Math.abs(M)<=u,f.value=f.done?x:b},V,C,E=w=>{p(f.value)&&(V=w,C=ye({keyframes:[f.value,h(f.value)],velocity:No(v,w,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:w=>{let M=!1;return!C&&V===void 0&&(M=!0,T(w),E(w)),V!==void 0&&w>=V?C.next(w-V):(!M&&T(w),f)}}}function Dc(t,e,o){let r=[],i=o||X.mix||Fo,s=t.length-1;for(let n=0;n<s;n++){let a=i(t[n],t[n+1]);if(e){let l=Array.isArray(e)?e[n]||k:e;a=at(l,a)}r.push(a)}return r}function _n(t,e,{clamp:o=!0,ease:r,mixer:i}={}){let s=t.length;if(_(s===e.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];let n=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=Dc(e,r,i),l=a.length,u=c=>{if(n&&c<t[0])return e[0];let m=0;if(l>1)for(;m<t.length-2&&!(c<t[m+1]);m++);let f=pt(t[m],t[m+1],c);return a[m](f)};return o?c=>u(G(t[0],t[s-1],c)):u}function Yn(t,e){let o=t[t.length-1];for(let r=1;r<=e;r++){let i=pt(0,e,r);t.push(A(o,1,i))}}function Xn(t){let e=[0];return Yn(e,t.length-1),e}function qn(t,e){return t.map(o=>o*e)}function Ec(t,e){return t.map(()=>e||He).splice(0,t.length-1)}function Bt({duration:t=300,keyframes:e,times:o,ease:r="easeInOut"}){let i=Jr(r)?r.map(Mo):Mo(r),s={done:!1,value:e[0]},n=qn(o&&o.length===e.length?o:Xn(e),t),a=_n(n,e,{ease:Array.isArray(i)?i:Ec(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}var Rc=t=>t!==null;function Ft(t,{repeat:e,repeatType:o="loop"},r,i=1){let s=t.filter(Rc),a=i<0||e&&o!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}var Lc={decay:Je,inertia:Je,tween:Bt,keyframes:Bt,spring:ye};function jo(t){typeof t.type=="string"&&(t.type=Lc[t.type])}var Ot=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,o){return this.finished.then(e,o)}};var Ic=t=>t/100,wt=class extends Ot{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;let{motionValue:o}=this.options;o&&o.updatedAt!==B.now()&&this.tick(B.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},ht.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;jo(e);let{type:o=Bt,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:n=0}=e,{keyframes:a}=e,l=o||Bt;process.env.NODE_ENV!=="production"&&l!==Bt&&_(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Bt&&typeof a[0]!="number"&&(this.mixKeyframes=at(Ic,Fo(a[0],a[1])),a=[0,100]);let u=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-n})),u.calculatedDuration===null&&(u.calculatedDuration=xe(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(e){let o=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(e,o=!1){let{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:n,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);let{delay:u=0,keyframes:c,repeat:m,repeatType:f,repeatDelay:p,type:h,onUpdate:d,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),o?this.currentTime=e:this.updateTime(e);let x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,T=r;if(m){let w=Math.min(this.currentTime,i)/a,M=Math.floor(w),b=w%1;!b&&w>=1&&(b=1),b===1&&M--,M=Math.min(M,m+1),M%2&&(f==="reverse"?(b=1-b,p&&(b-=p/a)):f==="mirror"&&(T=n)),v=G(0,1,b)*a}let V;y?(this.delayState.value=c[0],V=this.delayState):V=T.next(v),s&&!y&&(V.value=s(V.value));let{done:C}=V;!y&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&h!==Je&&(V.value=Ft(c,this.options,g,this.speed)),d&&d(V.value),E&&this.finish(),V}then(e,o){return this.finished.then(e,o)}get duration(){return z(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+z(e)}get time(){return z(this.currentTime)}set time(e){e=N(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let o=this.generator.next(e).value;return No(r=>this.generator.next(r).value,e,o)}get speed(){return this.playbackSpeed}set speed(e){let o=this.playbackSpeed!==e;o&&this.driver&&this.updateTime(B.now()),this.playbackSpeed=e,o&&this.driver&&(this.time=z(this.currentTime))}play(){var i,s;if(this.isStopped)return;let{driver:e=Kn,startTime:o}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),(s=(i=this.options).onPlay)==null||s.call(i);let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o!=null?o:r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(B.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,o;this.notifyFinished(),this.teardown(),this.state="finished",(o=(e=this.options).onComplete)==null||o.call(e)}cancel(){var e,o;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(o=(e=this.options).onCancel)==null||o.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,ht.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var o;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(o=this.driver)==null||o.stop(),e.observe(this)}};function Zn(t){var e;for(let o=1;o<t.length;o++)(e=t[o])!=null||(t[o]=t[o-1])}var Yt=t=>t*180/Math.PI,ci=t=>{let e=Yt(Math.atan2(t[1],t[0]));return ui(e)},kc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ci,rotateZ:ci,skewX:t=>Yt(Math.atan(t[1])),skewY:t=>Yt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ui=t=>(t=t%360,t<0&&(t+=360),t),Jn=ci,Qn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ts=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Bc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Qn,scaleY:ts,scale:t=>(Qn(t)+ts(t))/2,rotateX:t=>ui(Yt(Math.atan2(t[6],t[5]))),rotateY:t=>ui(Yt(Math.atan2(-t[2],t[0]))),rotateZ:Jn,rotate:Jn,skewX:t=>Yt(Math.atan(t[4])),skewY:t=>Yt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Go(t){return t.includes("scale")?1:0}function Uo(t,e){if(!t||t==="none")return Go(e);let o=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(o)r=Bc,i=o;else{let a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=kc,i=a}if(!i)return Go(e);let s=r[e],n=i[1].split(",").map(Fc);return typeof s=="function"?s(n):n[s]}var es=(t,e)=>{let{transform:o="none"}=getComputedStyle(t);return Uo(o,e)};function Fc(t){return parseFloat(t.trim())}var xt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rt=new Set(xt);var mi=t=>t===dt||t===S,Oc=new Set(["x","y","z"]),Nc=xt.filter(t=>!Oc.has(t));function os(t){let e=[];return Nc.forEach(o=>{let r=t.getValue(o);r!==void 0&&(e.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),e}var Pt={width:({x:t},{paddingLeft:e="0",paddingRight:o="0",boxSizing:r})=>{let i=t.max-t.min;return r==="border-box"?i:i-parseFloat(e)-parseFloat(o)},height:({y:t},{paddingTop:e="0",paddingBottom:o="0",boxSizing:r})=>{let i=t.max-t.min;return r==="border-box"?i:i-parseFloat(e)-parseFloat(o)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Uo(e,"x"),y:(t,{transform:e})=>Uo(e,"y")};Pt.translateX=Pt.x;Pt.translateY=Pt.y;var Xt=new Set,fi=!1,pi=!1,hi=!1;function rs(){if(pi){let t=Array.from(Xt).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),o=new Map;e.forEach(r=>{let i=os(r);i.length&&(o.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();let i=o.get(r);i&&i.forEach(([s,n])=>{var a;(a=r.getValue(s))==null||a.set(n)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}pi=!1,fi=!1,Xt.forEach(t=>t.complete(hi)),Xt.clear()}function is(){Xt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(pi=!0)})}function ns(){hi=!0,is(),rs(),hi=!1}var Nt=class{constructor(e,o,r,i,s,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=o,this.name=r,this.motionValue=i,this.element=s,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(Xt.add(this),fi||(fi=!0,P.read(is),P.resolveKeyframes(rs))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:o,element:r,motionValue:i}=this;if(e[0]===null){let s=i==null?void 0:i.get(),n=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&o){let a=r.readValue(o,n);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=n),i&&s===void 0&&i.set(e[0])}Zn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Xt.delete(this)}cancel(){this.state==="scheduled"&&(Xt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var ss=t=>t.startsWith("--");function Wo(t,e,o){ss(e)?t.style.setProperty(e,o):t.style[e]=o}var as={};function zo(t,e){let o=Ne(t);return()=>{var r;return(r=as[e])!=null?r:o()}}var ls=zo(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var Ko=zo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");var qt=([t,e,o,r])=>`cubic-bezier(${t}, ${e}, ${o}, ${r})`;var di={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:qt([0,.65,.55,1]),circOut:qt([.55,0,1,.45]),backIn:qt([.31,.01,.66,-.59]),backOut:qt([.33,1.53,.69,.99])};function gi(t,e){if(t)return typeof t=="function"?Ko()?Oo(t,e):"ease-out":$e(t)?qt(t):Array.isArray(t)?t.map(o=>gi(o,e)||di.easeOut):di[t]}function cs(t,e,o,{delay:r=0,duration:i=300,repeat:s=0,repeatType:n="loop",ease:a="easeOut",times:l}={},u=void 0){let c={[e]:o};l&&(c.offset=l);let m=gi(a,i);Array.isArray(m)&&(c.easing=m),Z.value&&ht.waapi++;let f={delay:r,duration:i,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:s+1,direction:n==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=t.animate(c,f);return Z.value&&p.finished.finally(()=>{ht.waapi--}),p}function Ho(t){return typeof t=="function"&&"applyToOptions"in t}function us({type:t,...e}){var o,r;return Ho(t)&&Ko()?t.applyToOptions(e):((o=e.duration)!=null||(e.duration=300),(r=e.ease)!=null||(e.ease="easeOut"),e)}var ve=class extends Ot{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:o,name:r,keyframes:i,pseudoElement:s,allowFlatten:n=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=n,this.options=e,_(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=us(e);this.animation=cs(o,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let c=Ft(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),Wo(o,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,o;(o=(e=this.animation).finish)==null||o.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var o,r,i;let e=(o=this.options)==null?void 0:o.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var o,r;let e=((r=(o=this.animation.effect)==null?void 0:o.getComputedTiming)==null?void 0:r.call(o).duration)||0;return z(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+z(e)}get time(){return z(Number(this.animation.currentTime)||0)}set time(e){let o=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=N(e),o&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){var e;return(e=this.manualStartTime)!=null?e:Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:o,rangeEnd:r,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&ls()?(this.animation.timeline=e,o&&(this.animation.rangeStart=o),r&&(this.animation.rangeEnd=r),k):i(this)}};var ms={anticipate:Ue,backInOut:Ge,circInOut:Ke};function jc(t){return t in ms}function fs(t){typeof t.ease=="string"&&jc(t.ease)&&(t.ease=ms[t.ease])}var xi=10,$o=class extends ve{constructor(e){fs(e),jo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:o,onUpdate:r,onComplete:i,element:s,...n}=this.options;if(!o)return;if(e!==void 0){o.set(e);return}let a=new wt({...n,autoplay:!1}),l=Math.max(xi,B.now()-this.startTime),u=G(0,xi,l-xi),c=a.sample(l).value,{name:m}=this.options;s&&m&&Wo(s,m,c),o.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}};var yi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(U.test(t)||t==="0")&&!t.startsWith("url("));function Gc(t){let e=t[0];if(t.length===1)return!0;for(let o=0;o<t.length;o++)if(t[o]!==e)return!0}function ps(t,e,o,r){let i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;let s=t[t.length-1],n=yi(i,e),a=yi(s,e);return ot(n===a,`You are trying to animate ${e} from "${i}" to "${s}". "${n?s:i}" is not an animatable value.`,"value-not-animatable"),!n||!a?!1:Gc(t)||(o==="spring"||Ho(o))&&r}function Qe(t){t.duration=0,t.type="keyframes"}var _o=new Set(["opacity","clipPath","filter","transform"]);var Uc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function hs(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Uc.test(t[e]))return!0;return!1}var Wc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),zc=Ne(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ds(t){var m;let{motionValue:e,name:o,repeatDelay:r,repeatType:i,damping:s,type:n,keyframes:a}=t;if(!(((m=e==null?void 0:e.owner)==null?void 0:m.current)instanceof HTMLElement))return!1;let{onUpdate:u,transformTemplate:c}=e.owner.getProps();return zc()&&o&&(_o.has(o)||Wc.has(o)&&hs(a))&&(o!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&n!=="inertia"}var Kc=40,Yo=class extends Ot{constructor({autoplay:e=!0,delay:o=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:n="loop",keyframes:a,name:l,motionValue:u,element:c,...m}){var h;super(),this.stop=()=>{var d,g;this._animation&&(this._animation.stop(),(d=this.stopTimeline)==null||d.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=B.now();let f={autoplay:e,delay:o,type:r,repeat:i,repeatDelay:s,repeatType:n,name:l,motionValue:u,element:c,...m},p=(c==null?void 0:c.KeyframeResolver)||Nt;this.keyframeResolver=new p(a,(d,g,x)=>this.onKeyframesResolved(d,g,f,!x),l,u,c),(h=this.keyframeResolver)==null||h.scheduleResolve()}onKeyframesResolved(e,o,r,i){var x,y;this.keyframeResolver=void 0;let{name:s,type:n,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=B.now();let m=!0;ps(e,s,n,a)||(m=!1,(X.instantAnimations||!l)&&(c==null||c(Ft(e,r,o))),e[0]=e[e.length-1],Qe(r),r.repeat=0);let p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Kc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:e},h=m&&!u&&ds(p),d=(y=(x=p.motionValue)==null?void 0:x.owner)==null?void 0:y.current,g;if(h)try{g=new $o({...p,element:d})}catch(v){g=new wt(p)}else g=new wt(p);g.finished.then(()=>{this.notifyFinished()}).catch(k),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,o){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),ns()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}};function Xo(t,e,o,r=0,i=1){let s=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),n=t.size,a=(n-1)*r;return typeof o=="function"?o(s,n):i===1?s*r:a-s*r}var Hc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $c(t){let e=Hc.exec(t);if(!e)return[,];let[,o,r,i]=e;return[`--${o!=null?o:r}`,i]}var _c=4;function vi(t,e,o=1){_(o<=_c,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,i]=$c(t);if(!r)return;let s=window.getComputedStyle(e).getPropertyValue(r);if(s){let n=s.trim();return Be(n)?parseFloat(n):n}return pe(i)?vi(i,e,o+1):i}var Yc={type:"spring",stiffness:500,damping:25,restSpeed:10},Xc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),qc={type:"keyframes",duration:.8},Zc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},gs=(t,{keyframes:e})=>e.length>2?qc:rt.has(t)?t.startsWith("scale")?Xc(e[1]):Yc:Zc;function qo(t,e){if(t!=null&&t.inherit&&e){let{inherit:o,...r}=t;return{...e,...r}}return t}function Te(t,e){var r,i;let o=(i=(r=t==null?void 0:t[e])!=null?r:t==null?void 0:t.default)!=null?i:t;return o!==t?qo(o,t):o}var Jc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function xs(t){for(let e in t)if(!Jc.has(e))return!0;return!1}var Zt=(t,e,o,r={},i,s)=>n=>{let a=Te(r,t)||{},l=a.delay||r.delay||0,{elapsed:u=0}=r;u=u-N(l);let c={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{n(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:i};xs(a)||Object.assign(c,gs(t,c)),c.duration&&(c.duration=N(c.duration)),c.repeatDelay&&(c.repeatDelay=N(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let m=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Qe(c),c.delay===0&&(m=!0)),(X.instantAnimations||X.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(m=!0,Qe(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,m&&!s&&e.get()!==void 0){let f=Ft(c.keyframes,a);if(f!==void 0){P.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new wt(c):new Yo(c)};function ys(t){let e=[{},{}];return t==null||t.values.forEach((o,r)=>{e[0][r]=o.get(),e[1][r]=o.getVelocity()}),e}function Jt(t,e,o,r){if(typeof e=="function"){let[i,s]=ys(r);e=e(o!==void 0?o:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){let[i,s]=ys(r);e=e(o!==void 0?o:t.custom,i,s)}return e}function J(t,e,o){let r=t.getProps();return Jt(r,e,o!==void 0?o:r.custom,t)}var Zo=new Set(["width","height","top","left","right","bottom",...xt]);var vs=30,Qc=t=>!isNaN(parseFloat(t)),Ts={current:void 0},Ti=class{constructor(e,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;let i=B.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(let n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=o.owner}setCurrent(e){this.current=e,this.updatedAt=B.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Qc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&_t(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,o){this.events[e]||(this.events[e]=new Vt);let r=this.events[e].add(o);return e==="change"?()=>{r(),P.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,o){this.passiveEffect=e,this.stopPassiveEffect=o}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,o=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Ts.current&&Ts.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=B.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>vs)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,vs);return je(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(e){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=e(o),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(){var e,o;(e=this.dependents)==null||e.clear(),(o=this.events.destroy)==null||o.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function ct(t,e){return new Ti(t,e)}var to=t=>Array.isArray(t);function tu(t,e,o){t.hasValue(e)?t.getValue(e).set(o):t.addValue(e,ct(o))}function eu(t){return to(t)?t[t.length-1]||0:t}function Ss(t,e){let o=J(t,e),{transitionEnd:r={},transition:i={},...s}=o||{};s={...s,...r};for(let n in s){let a=eu(s[n]);tu(t,n,a)}}var D=t=>!!(t&&t.getVelocity);function Vs(t){return!!(D(t)&&t.add)}function Se(t,e){let o=t.getValue("willChange");if(Vs(o))return o.add(e);if(!o&&X.WillChange){let r=new X.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Ve(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var bs="framerAppearId",eo="data-"+Ve(bs);function Jo(t){return t.props[eo]}function ou({protectedKeys:t,needsAnimating:e},o){let r=t.hasOwnProperty(o)&&e[o]!==!0;return e[o]=!1,r}function Qo(t,e,{delay:o=0,transitionOverride:r,type:i}={}){var f;let{transition:s,transitionEnd:n,...a}=e,l=t.getDefaultTransition();s=s?qo(s,l):l;let u=s==null?void 0:s.reduceMotion;r&&(s=r);let c=[],m=i&&t.animationState&&t.animationState.getState()[i];for(let p in a){let h=t.getValue(p,(f=t.latestValues[p])!=null?f:null),d=a[p];if(d===void 0||m&&ou(m,p))continue;let g={delay:o,...Te(s||{},p)},x=h.get();if(x!==void 0&&!h.isAnimating()&&!Array.isArray(d)&&d===x&&!g.velocity){P.update(()=>h.set(d));continue}let y=!1;if(window.MotionHandoffAnimation){let V=Jo(t);if(V){let C=window.MotionHandoffAnimation(V,p,P);C!==null&&(g.startTime=C,y=!0)}}Se(t,p);let v=u!=null?u:t.shouldReduceMotion;h.start(Zt(p,h,d,v&&Zo.has(p)?{type:!1}:g,t,y));let T=h.animation;T&&c.push(T)}if(n){let p=()=>P.update(()=>{n&&Ss(t,n)});c.length?Promise.all(c).then(p):p()}return c}function tr(t,e,o={}){var l;let r=J(t,e,o.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0),{transition:i=t.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(i=o.transitionOverride);let s=r?()=>Promise.all(Qo(t,r,o)):()=>Promise.resolve(),n=t.variantChildren&&t.variantChildren.size?(u=0)=>{let{delayChildren:c=0,staggerChildren:m,staggerDirection:f}=i;return ru(t,e,u,c,m,f,o)}:()=>Promise.resolve(),{when:a}=i;if(a){let[u,c]=a==="beforeChildren"?[s,n]:[n,s];return u().then(()=>c())}else return Promise.all([s(),n(o.delay)])}function ru(t,e,o=0,r=0,i=0,s=1,n){let a=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),a.push(tr(l,e,{...n,delay:o+(typeof r=="function"?0:r)+Xo(t.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ws(t,e,o={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){let i=e.map(s=>tr(t,s,o));r=Promise.all(i)}else if(typeof e=="string")r=tr(t,e,o);else{let i=typeof e=="function"?J(t,e,o.custom):e;r=Promise.all(Qo(t,i,o))}return r.then(()=>{t.notify("AnimationComplete",e)})}var Ps={test:t=>t==="auto",parse:t=>t};var er=t=>e=>e.test(t);var Si=[dt,S,Y,lt,oi,ei,Ps],Vi=t=>Si.find(er(t));function As(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Oe(t):!0}var iu=new Set(["brightness","contrast","saturate","opacity"]);function nu(t){let[e,o]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[r]=o.match(he)||[];if(!r)return t;let i=o.replace(r,""),s=iu.has(e)?1:0;return r!==o&&(s*=100),e+"("+s+i+")"}var su=/\b([a-z-]*)\(.*?\)/gu,oo={...U,getAnimatableNone:t=>{let e=t.match(su);return e?e.map(nu).join(" "):t}};var ro={...U,getAnimatableNone:t=>{let e=U.parse(t);return U.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}};var bi={...dt,transform:Math.round};var Cs={rotate:lt,rotateX:lt,rotateY:lt,rotateZ:lt,scale:Xe,scaleX:Xe,scaleY:Xe,scaleZ:Xe,skew:lt,skewX:lt,skewY:lt,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:bt,originX:Io,originY:Io,originZ:S};var be={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,fontSize:S,backgroundPositionX:S,backgroundPositionY:S,...Cs,zIndex:bi,fillOpacity:bt,strokeOpacity:bt,numOctaves:bi};var au={...be,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:oo,WebkitFilter:oo,mask:ro,WebkitMask:ro},or=t=>au[t];var lu=new Set([oo,ro]);function rr(t,e){let o=or(t);return lu.has(o)||(o=U),o.getAnimatableNone?o.getAnimatableNone(e):void 0}var cu=new Set(["auto","none","0"]);function Ms(t,e,o){let r=0,i;for(;r<t.length&&!i;){let s=t[r];typeof s=="string"&&!cu.has(s)&&kt(s).values.length&&(i=t[r]),r++}if(i&&o)for(let s of e)t[s]=rr(o,i)}var ir=class extends Nt{constructor(e,o,r,i,s){super(e,o,r,i,s,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let m=e[c];if(typeof m=="string"&&(m=m.trim(),pe(m))){let f=vi(m,o.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!Zo.has(r)||e.length!==2)return;let[i,s]=e,n=Vi(i),a=Vi(s),l=Qr(i),u=Qr(s);if(l!==u&&Pt[r]){this.needsMeasurement=!0;return}if(n!==a)if(mi(n)&&mi(a))for(let c=0;c<e.length;c++){let m=e[c];typeof m=="string"&&(e[c]=parseFloat(m))}else Pt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:o}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||As(e[i]))&&r.push(i);r.length&&Ms(e,r,o)}measureInitialState(){let{element:e,unresolvedKeyframes:o,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pt[r](e.measureViewportBox(),window.getComputedStyle(e.current)),o[0]=this.measuredOrigin;let i=o[o.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;let{element:e,name:o,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let i=e.getValue(o);i&&i.jump(this.measuredOrigin,!1);let s=r.length-1,n=r[s];r[s]=Pt[o](e.measureViewportBox(),window.getComputedStyle(e.current)),n!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=n),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}};function nr(t,e,o){var r;if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);let s=(r=o==null?void 0:o[t])!=null?r:i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}var sr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Qt(t){return Fe(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}var{schedule:te,cancel:uu}=Do(queueMicrotask,!1);var it={x:!1,y:!1};function ar(){return it.x||it.y}function wi(t){return t==="x"||t==="y"?it[t]?null:(it[t]=!0,()=>{it[t]=!1}):it.x||it.y?null:(it.x=it.y=!0,()=>{it.x=it.y=!1})}func