UNPKG

@frontify/fondue

Version:
1 lines 598 kB
(function(v,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("react/jsx-runtime"),require("@frontify/fondue-icons"),require("@react-aria/accordion"),require("@react-aria/focus"),require("@react-aria/utils"),require("@react-stately/collections"),require("@react-stately/tree"),require("react"),require("@react-aria/button"),require("@react-aria/menu"),require("@react-aria/overlays"),require("@react-stately/menu"),require("@react-aria/link"),require("react-popper"),require("react-dom"),require("@react-aria/breadcrumbs"),require("@ctrl/tinycolor"),require("@floating-ui/dom"),require("date-fns"),require("react-datepicker"),require("@react-aria/checkbox"),require("@react-stately/toggle"),require("@react-stately/checkbox"),require("react-textarea-autosize"),require("@dnd-kit/core"),require("@dnd-kit/modifiers"),require("@dnd-kit/sortable"),require("immer"),require("lodash-es"),require("react-is"),require("react-fast-compare"),require("@dnd-kit/utilities")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@frontify/fondue-icons","@react-aria/accordion","@react-aria/focus","@react-aria/utils","@react-stately/collections","@react-stately/tree","react","@react-aria/button","@react-aria/menu","@react-aria/overlays","@react-stately/menu","@react-aria/link","react-popper","react-dom","@react-aria/breadcrumbs","@ctrl/tinycolor","@floating-ui/dom","date-fns","react-datepicker","@react-aria/checkbox","@react-stately/toggle","@react-stately/checkbox","react-textarea-autosize","@dnd-kit/core","@dnd-kit/modifiers","@dnd-kit/sortable","immer","lodash-es","react-is","react-fast-compare","@dnd-kit/utilities"],n):(v=typeof globalThis<"u"?globalThis:v||self,n(v.Fondue={},v["react/jsx-runtime"],v.fondueIcons,v.accordion,v.focus,v.utils,v.collections,v.tree,v.React,v.button,v.menu,v.overlays,v.menu$1,v.link,v.reactPopper,v.ReactDOM,v.breadcrumbs,v.tinycolor,v.dom,v.dateFns,v.ReactDatePicker,v.checkbox,v.toggle,v.checkbox$1,v.TextareaAutosize,v.core,v.modifiers,v.sortable,v.immer,v.lodashEs,v.reactIs,v.isEqual,v.utilities))})(this,function(v,n,$,h5,L1,F1,q3,p5,h,c2,L3,J3,bt,xt,t3,Q3,R3,vt,w5,g5,m5,L4,Mt,St,Tt,Y,Zt,N2,y5,d2,Et,kt,Dt){"use strict";var RL;function Pt(L){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(L){for(const e in L)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(L,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>L[e]})}}return t.default=L,Object.freeze(t)}const e3=Pt(h),t4=h.createContext({});function e4(L){const t=h.useRef(null);return t.current===null&&(t.current=L()),t.current}const C5=typeof window<"u"?h.useLayoutEffect:h.useEffect,r3=h.createContext(null);function r4(L,t){L.indexOf(t)===-1&&L.push(t)}function n3(L,t){const e=L.indexOf(t);e>-1&&L.splice(e,1)}const D1=(L,t,e)=>e>t?t:e<L?L:e;function n4(L,t){return t?`${L}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:L}let u2=()=>{},O1=()=>{};typeof process<"u"&&((RL=process.env)==null?void 0:RL.NODE_ENV)!=="production"&&(u2=(L,t,e)=>{!L&&typeof console<"u"&&console.warn(n4(t,e))},O1=(L,t,e)=>{if(!L)throw new Error(n4(t,e))});const j1={},b5=L=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(L);function x5(L){return typeof L=="object"&&L!==null}const v5=L=>/^0[^.\s]+$/u.test(L);function M5(L){let t;return()=>(t===void 0&&(t=L()),t)}const v1=L=>L,At=(L,t)=>e=>t(L(e)),V2=(...L)=>L.reduce(At),I2=(L,t,e)=>{const r=t-L;return r===0?1:(e-L)/r};class o4{constructor(){this.subscriptions=[]}add(t){return r4(this.subscriptions,t),()=>n3(this.subscriptions,t)}notify(t,e,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,e,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,e,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const y1=L=>L*1e3,M1=L=>L/1e3;function S5(L,t){return t?L*(1e3/t):0}const T5=new Set;function s4(L,t,e){L||T5.has(t)||(console.warn(n4(t,e)),T5.add(t))}const Z5=(L,t,e)=>(((1-3*e+3*t)*L+(3*e-6*t))*L+3*t)*L,Nt=1e-7,Vt=12;function It(L,t,e,r,o){let s,i,a=0;do i=t+(e-t)/2,s=Z5(i,r,o)-L,s>0?e=i:t=i;while(Math.abs(s)>Nt&&++a<Vt);return i}function F2(L,t,e,r){if(L===t&&e===r)return v1;const o=s=>It(s,0,1,L,e);return s=>s===0||s===1?s:Z5(o(s),t,r)}const E5=L=>t=>t<=.5?L(2*t)/2:(2-L(2*(1-t)))/2,k5=L=>t=>1-L(1-t),D5=F2(.33,1.53,.69,.99),i4=k5(D5),P5=E5(i4),A5=L=>L>=1?1:(L*=2)<1?.5*i4(L):.5*(2-Math.pow(2,-10*(L-1))),a4=L=>1-Math.sin(Math.acos(L)),N5=k5(a4),V5=E5(a4),Ft=F2(.42,0,1,1),Ot=F2(0,0,.58,1),I5=F2(.42,0,.58,1),Bt=L=>Array.isArray(L)&&typeof L[0]!="number",F5=L=>Array.isArray(L)&&typeof L[0]=="number",O5={linear:v1,easeIn:Ft,easeInOut:I5,easeOut:Ot,circIn:a4,circInOut:V5,circOut:N5,backIn:i4,backInOut:P5,backOut:D5,anticipate:A5},_t=L=>typeof L=="string",B5=L=>{if(F5(L)){O1(L.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,e,r,o]=L;return F2(t,e,r,o)}else if(_t(L))return O1(O5[L]!==void 0,`Invalid easing type '${L}'`,"invalid-easing-type"),O5[L];return L},o3=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Wt(L,t){let e=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(d.schedule(c),L()),c(a)}const d={schedule:(c,u=!1,f=!1)=>{const w=f&&o?e:r;return u&&i.add(c),w.add(c),c},cancel:c=>{r.delete(c),i.delete(c)},process:c=>{if(a=c,o){s=!0;return}o=!0;const u=e;e=r,r=u,e.forEach(l),e.clear(),o=!1,s&&(s=!1,d.process(c))}};return d}const Ht=40;function _5(L,t){let e=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>e=!0,i=o3.reduce((C,M)=>(C[M]=Wt(s),C),{}),{setup:a,read:l,resolveKeyframes:d,preUpdate:c,update:u,preRender:f,render:p,postRender:w}=i,m=()=>{const C=j1.useManualTiming,M=C?o.timestamp:performance.now();e=!1,C||(o.delta=r?1e3/60:Math.max(Math.min(M-o.timestamp,Ht),1)),o.timestamp=M,o.isProcessing=!0,a.process(o),l.process(o),d.process(o),c.process(o),u.process(o),f.process(o),p.process(o),w.process(o),o.isProcessing=!1,e&&t&&(r=!1,L(m))},y=()=>{e=!0,r=!0,o.isProcessing||L(m)};return{schedule:o3.reduce((C,M)=>{const S=i[M];return C[M]=(A,Z=!1,E=!1)=>(e||y(),S.schedule(A,Z,E)),C},{}),cancel:C=>{for(let M=0;M<o3.length;M++)i[o3[M]].cancel(C)},state:o,steps:i}}const{schedule:Q,cancel:z1,state:l1,steps:l4}=_5(typeof requestAnimationFrame<"u"?requestAnimationFrame:v1,!0);let s3;function $t(){s3=void 0}const p1={now:()=>(s3===void 0&&p1.set(l1.isProcessing||j1.useManualTiming?l1.timestamp:performance.now()),s3),set:L=>{s3=L,queueMicrotask($t)}},W5=L=>t=>typeof t=="string"&&t.startsWith(L),H5=W5("--"),jt=W5("var(--"),c4=L=>jt(L)?zt.test(L.split("/*")[0].trim()):!1,zt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $5(L){return typeof L!="string"?!1:L.split("/*")[0].includes("var(--")}const f2={test:L=>typeof L=="number",parse:parseFloat,transform:L=>L},O2={...f2,transform:L=>D1(0,1,L)},i3={...f2,default:1},B2=L=>Math.round(L*1e5)/1e5,d4=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ut(L){return L==null}const Gt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,u4=(L,t)=>e=>!!(typeof e=="string"&&Gt.test(e)&&e.startsWith(L)||t&&!Ut(e)&&Object.prototype.hasOwnProperty.call(e,t)),j5=(L,t,e)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(d4);return{[L]:parseFloat(o),[t]:parseFloat(s),[e]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Kt=L=>D1(0,255,L),f4={...f2,transform:L=>Math.round(Kt(L))},L2={test:u4("rgb","red"),parse:j5("red","green","blue"),transform:({red:L,green:t,blue:e,alpha:r=1})=>"rgba("+f4.transform(L)+", "+f4.transform(t)+", "+f4.transform(e)+", "+B2(O2.transform(r))+")"};function Xt(L){let t="",e="",r="",o="";return L.length>5?(t=L.substring(1,3),e=L.substring(3,5),r=L.substring(5,7),o=L.substring(7,9)):(t=L.substring(1,2),e=L.substring(2,3),r=L.substring(3,4),o=L.substring(4,5),t+=t,e+=e,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const h4={test:u4("#"),parse:Xt,transform:L2.transform},_2=L=>({test:t=>typeof t=="string"&&t.endsWith(L)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${L}`}),U1=_2("deg"),P1=_2("%"),V=_2("px"),Yt=_2("vh"),qt=_2("vw"),z5={...P1,parse:L=>P1.parse(L)/100,transform:L=>P1.transform(L*100)},h2={test:u4("hsl","hue"),parse:j5("hue","saturation","lightness"),transform:({hue:L,saturation:t,lightness:e,alpha:r=1})=>"hsla("+Math.round(L)+", "+P1.transform(B2(t))+", "+P1.transform(B2(e))+", "+B2(O2.transform(r))+")"},s1={test:L=>L2.test(L)||h4.test(L)||h2.test(L),parse:L=>L2.test(L)?L2.parse(L):h2.test(L)?h2.parse(L):h4.parse(L),transform:L=>typeof L=="string"?L:L.hasOwnProperty("red")?L2.transform(L):h2.transform(L),getAnimatableNone:L=>{const t=s1.parse(L);return t.alpha=0,s1.transform(t)}},Jt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qt(L){var t,e;return isNaN(L)&&typeof L=="string"&&(((t=L.match(d4))==null?void 0:t.length)||0)+(((e=L.match(Jt))==null?void 0:e.length)||0)>0}const U5="number",G5="color",Rt="var",L0="var(",K5="${}",t0=/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 p2(L){const t=L.toString(),e=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(t0,l=>(s1.test(l)?(r.color.push(s),o.push(G5),e.push(s1.parse(l))):l.startsWith(L0)?(r.var.push(s),o.push(Rt),e.push(l)):(r.number.push(s),o.push(U5),e.push(parseFloat(l))),++s,K5)).split(K5);return{values:e,split:a,indexes:r,types:o}}function e0(L){return p2(L).values}function X5({split:L,types:t}){const e=L.length;return r=>{let o="";for(let s=0;s<e;s++)if(o+=L[s],r[s]!==void 0){const i=t[s];i===U5?o+=B2(r[s]):i===G5?o+=s1.transform(r[s]):o+=r[s]}return o}}function r0(L){return X5(p2(L))}const n0=L=>typeof L=="number"?0:s1.test(L)?s1.getAnimatableNone(L):L,o0=(L,t)=>typeof L=="number"?t!=null&&t.trim().endsWith("/")?L:0:n0(L);function s0(L){const t=p2(L);return X5(t)(t.values.map((r,o)=>o0(r,t.split[o])))}const Z1={test:Qt,parse:e0,createTransformer:r0,getAnimatableNone:s0};function p4(L,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?L+(t-L)*6*e:e<1/2?t:e<2/3?L+(t-L)*(2/3-e)*6:L}function i0({hue:L,saturation:t,lightness:e,alpha:r}){L/=360,t/=100,e/=100;let o=0,s=0,i=0;if(!t)o=s=i=e;else{const a=e<.5?e*(1+t):e+t-e*t,l=2*e-a;o=p4(l,a,L+1/3),s=p4(l,a,L),i=p4(l,a,L-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function a3(L,t){return e=>e>0?t:L}const t1=(L,t,e)=>L+(t-L)*e,w4=(L,t,e)=>{const r=L*L,o=e*(t*t-r)+r;return o<0?0:Math.sqrt(o)},a0=[h4,L2,h2],l0=L=>a0.find(t=>t.test(L));function Y5(L){const t=l0(L);if(u2(!!t,`'${L}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let e=t.parse(L);return t===h2&&(e=i0(e)),e}const q5=(L,t)=>{const e=Y5(L),r=Y5(t);if(!e||!r)return a3(L,t);const o={...e};return s=>(o.red=w4(e.red,r.red,s),o.green=w4(e.green,r.green,s),o.blue=w4(e.blue,r.blue,s),o.alpha=t1(e.alpha,r.alpha,s),L2.transform(o))},g4=new Set(["none","hidden"]);function c0(L,t){return g4.has(L)?e=>e<=0?L:t:e=>e>=1?t:L}function d0(L,t){return e=>t1(L,t,e)}function m4(L){return typeof L=="number"?d0:typeof L=="string"?c4(L)?a3:s1.test(L)?q5:h0:Array.isArray(L)?J5:typeof L=="object"?s1.test(L)?q5:u0:a3}function J5(L,t){const e=[...L],r=e.length,o=L.map((s,i)=>m4(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)e[i]=o[i](s);return e}}function u0(L,t){const e={...L,...t},r={};for(const o in e)L[o]!==void 0&&t[o]!==void 0&&(r[o]=m4(L[o])(L[o],t[o]));return o=>{for(const s in r)e[s]=r[s](o);return e}}function f0(L,t){const e=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],i=L.indexes[s][r[s]],a=L.values[i]??0;e[o]=a,r[s]++}return e}const h0=(L,t)=>{const e=Z1.createTransformer(t),r=p2(L),o=p2(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?g4.has(L)&&!o.values.length||g4.has(t)&&!r.values.length?c0(L,t):V2(J5(f0(r,o),o.values),e):(u2(!0,`Complex values '${L}' and '${t}' 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"),a3(L,t))};function Q5(L,t,e){return typeof L=="number"&&typeof t=="number"&&typeof e=="number"?t1(L,t,e):m4(L)(L,t)}const p0=L=>{const t=({timestamp:e})=>L(e);return{start:(e=!0)=>Q.update(t,e),stop:()=>z1(t),now:()=>l1.isProcessing?l1.timestamp:p1.now()}},R5=(L,t,e=10)=>{let r="";const o=Math.max(Math.round(t/e),2);for(let s=0;s<o;s++)r+=Math.round(L(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},l3=2e4;function y4(L){let t=0;const e=50;let r=L.next(t);for(;!r.done&&t<l3;)t+=e,r=L.next(t);return t>=l3?1/0:t}function w0(L,t=100,e){const r=e({...L,keyframes:[0,t]}),o=Math.min(y4(r),l3);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:M1(o)}}const n1={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 C4(L,t){return L*Math.sqrt(1-t*t)}const g0=12;function m0(L,t,e){let r=e;for(let o=1;o<g0;o++)r=r-L(r)/t(r);return r}const b4=.001;function y0({duration:L=n1.duration,bounce:t=n1.bounce,velocity:e=n1.velocity,mass:r=n1.mass}){let o,s;u2(L<=y1(n1.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=D1(n1.minDamping,n1.maxDamping,i),L=D1(n1.minDuration,n1.maxDuration,M1(L)),i<1?(o=d=>{const c=d*i,u=c*L,f=c-e,p=C4(d,i),w=Math.exp(-u);return b4-f/p*w},s=d=>{const u=d*i*L,f=u*e+e,p=Math.pow(i,2)*Math.pow(d,2)*L,w=Math.exp(-u),m=C4(Math.pow(d,2),i);return(-o(d)+b4>0?-1:1)*((f-p)*w)/m}):(o=d=>{const c=Math.exp(-d*L),u=(d-e)*L+1;return-b4+c*u},s=d=>{const c=Math.exp(-d*L),u=(e-d)*(L*L);return c*u});const a=5/L,l=m0(o,s,a);if(L=y1(L),isNaN(l))return{stiffness:n1.stiffness,damping:n1.damping,duration:L};{const d=Math.pow(l,2)*r;return{stiffness:d,damping:i*2*Math.sqrt(r*d),duration:L}}}const C0=["duration","bounce"],b0=["stiffness","damping","mass"];function L7(L,t){return t.some(e=>L[e]!==void 0)}function x0(L){let t={velocity:n1.velocity,stiffness:n1.stiffness,damping:n1.damping,mass:n1.mass,isResolvedFromDuration:!1,...L};if(!L7(L,b0)&&L7(L,C0))if(t.velocity=0,L.visualDuration){const e=L.visualDuration,r=2*Math.PI/(e*1.2),o=r*r,s=2*D1(.05,1,1-(L.bounce||0))*Math.sqrt(o);t={...t,mass:n1.mass,stiffness:o,damping:s}}else{const e=y0({...L,velocity:0});t={...t,...e,mass:n1.mass},t.isResolvedFromDuration=!0}return t}function c3(L=n1.visualDuration,t=n1.bounce){const e=typeof L!="object"?{visualDuration:L,keyframes:[0,1],bounce:t}:L;let{restSpeed:r,restDelta:o}=e;const s=e.keyframes[0],i=e.keyframes[e.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:d,mass:c,duration:u,velocity:f,isResolvedFromDuration:p}=x0({...e,velocity:-M1(e.velocity||0)}),w=f||0,m=d/(2*Math.sqrt(l*c)),y=i-s,g=M1(Math.sqrt(l/c)),b=Math.abs(y)<5;r||(r=b?n1.restSpeed.granular:n1.restSpeed.default),o||(o=b?n1.restDelta.granular:n1.restDelta.default);let C,M,S,A,Z,E;if(m<1)S=C4(g,m),A=(w+m*g*y)/S,C=T=>{const D=Math.exp(-m*g*T);return i-D*(A*Math.sin(S*T)+y*Math.cos(S*T))},Z=m*g*A+y*S,E=m*g*y-A*S,M=T=>Math.exp(-m*g*T)*(Z*Math.sin(S*T)+E*Math.cos(S*T));else if(m===1){C=D=>i-Math.exp(-g*D)*(y+(w+g*y)*D);const T=w+g*y;M=D=>Math.exp(-g*D)*(g*T*D-w)}else{const T=g*Math.sqrt(m*m-1);C=U=>{const N=Math.exp(-m*g*U),j=Math.min(T*U,300);return i-N*((w+m*g*y)*Math.sinh(j)+T*y*Math.cosh(j))/T};const D=(w+m*g*y)/T,_=m*g*D-y*T,W=m*g*y-D*T;M=U=>{const N=Math.exp(-m*g*U),j=Math.min(T*U,300);return N*(_*Math.sinh(j)+W*Math.cosh(j))}}const k={calculatedDuration:p&&u||null,velocity:T=>y1(M(T)),next:T=>{if(!p&&m<1){const _=Math.exp(-m*g*T),W=Math.sin(S*T),U=Math.cos(S*T),N=i-_*(A*W+y*U),j=y1(_*(Z*W+E*U));return a.done=Math.abs(j)<=r&&Math.abs(i-N)<=o,a.value=a.done?i:N,a}const D=C(T);if(p)a.done=T>=u;else{const _=y1(M(T));a.done=Math.abs(_)<=r&&Math.abs(i-D)<=o}return a.value=a.done?i:D,a},toString:()=>{const T=Math.min(y4(k),l3),D=R5(_=>k.next(T*_).value,T,30);return T+"ms "+D},toTransition:()=>{}};return k}c3.applyToOptions=L=>{const t=w0(L,100,c3);return L.ease=t.ease,L.duration=y1(t.duration),L.type="keyframes",L};const v0=5;function t7(L,t,e){const r=Math.max(t-v0,0);return S5(e-L(r),t-r)}function x4({keyframes:L,velocity:t=0,power:e=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:d=.5,restSpeed:c}){const u=L[0],f={done:!1,value:u},p=E=>a!==void 0&&E<a||l!==void 0&&E>l,w=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let m=e*t;const y=u+m,g=i===void 0?y:i(y);g!==y&&(m=g-u);const b=E=>-m*Math.exp(-E/r),C=E=>g+b(E),M=E=>{const k=b(E),T=C(E);f.done=Math.abs(k)<=d,f.value=f.done?g:T};let S,A;const Z=E=>{p(f.value)&&(S=E,A=c3({keyframes:[f.value,w(f.value)],velocity:t7(C,E,f.value),damping:o,stiffness:s,restDelta:d,restSpeed:c}))};return Z(0),{calculatedDuration:null,next:E=>{let k=!1;return!A&&S===void 0&&(k=!0,M(E),Z(E)),S!==void 0&&E>=S?A.next(E-S):(!k&&M(E),f)}}}function M0(L,t,e){const r=[],o=e||j1.mix||Q5,s=L.length-1;for(let i=0;i<s;i++){let a=o(L[i],L[i+1]);if(t){const l=Array.isArray(t)?t[i]||v1:t;a=V2(l,a)}r.push(a)}return r}function S0(L,t,{clamp:e=!0,ease:r,mixer:o}={}){const s=L.length;if(O1(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=L[0]===L[1];L[0]>L[s-1]&&(L=[...L].reverse(),t=[...t].reverse());const a=M0(t,r,o),l=a.length,d=c=>{if(i&&c<L[0])return t[0];let u=0;if(l>1)for(;u<L.length-2&&!(c<L[u+1]);u++);const f=I2(L[u],L[u+1],c);return a[u](f)};return e?c=>d(D1(L[0],L[s-1],c)):d}function T0(L,t){const e=L[L.length-1];for(let r=1;r<=t;r++){const o=I2(0,t,r);L.push(t1(e,1,o))}}function Z0(L){const t=[0];return T0(t,L.length-1),t}function E0(L,t){return L.map(e=>e*t)}function k0(L,t){return L.map(()=>t||I5).splice(0,L.length-1)}function w2({duration:L=300,keyframes:t,times:e,ease:r="easeInOut"}){const o=Bt(r)?r.map(B5):B5(r),s={done:!1,value:t[0]},i=E0(e&&e.length===t.length?e:Z0(t),L),a=S0(i,t,{ease:Array.isArray(o)?o:k0(t,o)});return{calculatedDuration:L,next:l=>(s.value=a(l),s.done=l>=L,s)}}const D0=L=>L!==null;function d3(L,{repeat:t,repeatType:e="loop"},r,o=1){const s=L.filter(D0),a=o<0||t&&e!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const P0={decay:x4,inertia:x4,tween:w2,keyframes:w2,spring:c3};function e7(L){typeof L.type=="string"&&(L.type=P0[L.type])}class v4{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const A0=L=>L/100;class u3 extends v4{constructor(t){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,o;const{motionValue:e}=this.options;e&&e.updatedAt!==p1.now()&&this.tick(p1.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;e7(t);const{type:e=w2,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=t;let{keyframes:a}=t;const l=e||w2;process.env.NODE_ENV!=="production"&&l!==w2&&O1(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==w2&&typeof a[0]!="number"&&(this.mixKeyframes=V2(A0,Q5(a[0],a[1])),a=[0,100]);const d=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=y4(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=d}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:c,repeat:u,repeatType:f,repeatDelay:p,type:w,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-d*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?g<0:g>o;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let C=this.currentTime,M=r;if(u){const E=Math.min(this.currentTime,o)/a;let k=Math.floor(E),T=E%1;!T&&E>=1&&(T=1),T===1&&k--,k=Math.min(k,u+1),!!(k%2)&&(f==="reverse"?(T=1-T,p&&(T-=p/a)):f==="mirror"&&(M=i)),C=D1(0,1,T)*a}let S;b?(this.delayState.value=c[0],S=this.delayState):S=M.next(C),s&&!b&&(S.value=s(S.value));let{done:A}=S;!b&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const Z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return Z&&w!==x4&&(S.value=d3(c,this.options,y,this.speed)),m&&m(S.value),Z&&this.finish(),S}then(t,e){return this.finished.then(t,e)}get duration(){return M1(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+M1(t)}get time(){return M1(this.currentTime)}set time(t){t=y1(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const e=this.generator.next(t).value;return t7(r=>this.generator.next(r).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(p1.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=M1(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=p0,startTime:e}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=e??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(p1.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function N0(L){for(let t=1;t<L.length;t++)L[t]??(L[t]=L[t-1])}const t2=L=>L*180/Math.PI,M4=L=>{const t=t2(Math.atan2(L[1],L[0]));return S4(t)},V0={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:L=>(Math.abs(L[0])+Math.abs(L[3]))/2,rotate:M4,rotateZ:M4,skewX:L=>t2(Math.atan(L[1])),skewY:L=>t2(Math.atan(L[2])),skew:L=>(Math.abs(L[1])+Math.abs(L[2]))/2},S4=L=>(L=L%360,L<0&&(L+=360),L),r7=M4,n7=L=>Math.sqrt(L[0]*L[0]+L[1]*L[1]),o7=L=>Math.sqrt(L[4]*L[4]+L[5]*L[5]),I0={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:n7,scaleY:o7,scale:L=>(n7(L)+o7(L))/2,rotateX:L=>S4(t2(Math.atan2(L[6],L[5]))),rotateY:L=>S4(t2(Math.atan2(-L[2],L[0]))),rotateZ:r7,rotate:r7,skewX:L=>t2(Math.atan(L[4])),skewY:L=>t2(Math.atan(L[1])),skew:L=>(Math.abs(L[1])+Math.abs(L[4]))/2};function T4(L){return L.includes("scale")?1:0}function Z4(L,t){if(!L||L==="none")return T4(t);const e=L.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(e)r=I0,o=e;else{const a=L.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=V0,o=a}if(!o)return T4(t);const s=r[t],i=o[1].split(",").map(O0);return typeof s=="function"?s(i):i[s]}const F0=(L,t)=>{const{transform:e="none"}=getComputedStyle(L);return Z4(e,t)};function O0(L){return parseFloat(L.trim())}const g2=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],m2=new Set(g2),s7=L=>L===f2||L===V,B0=new Set(["x","y","z"]),_0=g2.filter(L=>!B0.has(L));function W0(L){const t=[];return _0.forEach(e=>{const r=L.getValue(e);r!==void 0&&(t.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))}),t}const G1={width:({x:L},{paddingLeft:t="0",paddingRight:e="0",boxSizing:r})=>{const o=L.max-L.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(e)},height:({y:L},{paddingTop:t="0",paddingBottom:e="0",boxSizing:r})=>{const o=L.max-L.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(e)},top:(L,{top:t})=>parseFloat(t),left:(L,{left:t})=>parseFloat(t),bottom:({y:L},{top:t})=>parseFloat(t)+(L.max-L.min),right:({x:L},{left:t})=>parseFloat(t)+(L.max-L.min),x:(L,{transform:t})=>Z4(t,"x"),y:(L,{transform:t})=>Z4(t,"y")};G1.translateX=G1.x,G1.translateY=G1.y;const e2=new Set;let E4=!1,k4=!1,D4=!1;function i7(){if(k4){const L=Array.from(e2).filter(r=>r.needsMeasurement),t=new Set(L.map(r=>r.element)),e=new Map;t.forEach(r=>{const o=W0(r);o.length&&(e.set(r,o),r.render())}),L.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=e.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))==null||a.set(i)})}),L.forEach(r=>r.measureEndState()),L.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}k4=!1,E4=!1,e2.forEach(L=>L.complete(D4)),e2.clear()}function a7(){e2.forEach(L=>{L.readKeyframes(),L.needsMeasurement&&(k4=!0)})}function H0(){D4=!0,a7(),i7(),D4=!1}class P4{constructor(t,e,r,o,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(e2.add(this),E4||(E4=!0,Q.read(a7),Q.resolveKeyframes(i7))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&e){const a=r.readValue(e,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}N0(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),e2.delete(this)}cancel(){this.state==="scheduled"&&(e2.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $0=L=>L.startsWith("--");function l7(L,t,e){$0(t)?L.style.setProperty(t,e):L.style[t]=e}const j0={};function c7(L,t){const e=M5(L);return()=>j0[t]??e()}const z0=c7(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),d7=c7(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),W2=([L,t,e,r])=>`cubic-bezier(${L}, ${t}, ${e}, ${r})`,u7={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:W2([0,.65,.55,1]),circOut:W2([.55,0,1,.45]),backIn:W2([.31,.01,.66,-.59]),backOut:W2([.33,1.53,.69,.99])};function f7(L,t){if(L)return typeof L=="function"?d7()?R5(L,t):"ease-out":F5(L)?W2(L):Array.isArray(L)?L.map(e=>f7(e,t)||u7.easeOut):u7[L]}function U0(L,t,e,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeOut",times:l}={},d=void 0){const c={[t]:e};l&&(c.offset=l);const u=f7(a,o);Array.isArray(u)&&(c.easing=u);const f={delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),L.animate(c,f)}function h7(L){return typeof L=="function"&&"applyToOptions"in L}function G0({type:L,...t}){return h7(L)&&d7()?L.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class p7 extends v4{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:r,keyframes:o,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,O1(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=G0(t);this.animation=U0(e,r,o,d,s),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=d3(o,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),l7(e,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 t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,r,o;const t=(e=this.options)==null?void 0:e.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((o=(r=this.animation).commitStyles)==null||o.call(r))}get duration(){var e,r;const t=((r=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:r.call(e).duration)||0;return M1(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+M1(t)}get time(){return M1(Number(this.animation.currentTime)||0)}set time(t){const e=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=y1(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:r,observe:o}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&z0()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),r&&(this.animation.rangeEnd=r),v1):o(this)}}const w7={anticipate:A5,backInOut:P5,circInOut:V5};function K0(L){return L in w7}function X0(L){typeof L.ease=="string"&&K0(L.ease)&&(L.ease=w7[L.ease])}const A4=10;class Y0 extends p7{constructor(t){X0(t),e7(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:r,onComplete:o,element:s,...i}=this.options;if(!e)return;if(t!==void 0){e.set(t);return}const a=new u3({...i,autoplay:!1}),l=Math.max(A4,p1.now()-this.startTime),d=D1(0,A4,l-A4),c=a.sample(l).value,{name:u}=this.options;s&&u&&l7(s,u,c),e.setWithVelocity(a.sample(Math.max(0,l-d)).value,c,d),a.stop()}}const g7=(L,t)=>t==="zIndex"?!1:!!(typeof L=="number"||Array.isArray(L)||typeof L=="string"&&(Z1.test(L)||L==="0")&&!L.startsWith("url("));function q0(L){const t=L[0];if(L.length===1)return!0;for(let e=0;e<L.length;e++)if(L[e]!==t)return!0}function J0(L,t,e,r){const o=L[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=L[L.length-1],i=g7(o,t),a=g7(s,t);return u2(i===a,`You are trying to animate ${t} from "${o}" to "${s}". "${i?s:o}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:q0(L)||(e==="spring"||h7(e))&&r}function N4(L){L.duration=0,L.type="keyframes"}const m7=new Set(["opacity","clipPath","filter","transform"]),Q0=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function R0(L){for(let t=0;t<L.length;t++)if(typeof L[t]=="string"&&Q0.test(L[t]))return!0;return!1}const Le=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),te=M5(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ee(L){var u;const{motionValue:t,name:e,repeatDelay:r,repeatType:o,damping:s,type:i,keyframes:a}=L;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:c}=t.owner.getProps();return te()&&e&&(m7.has(e)||Le.has(e)&&R0(a))&&(e!=="transform"||!c)&&!d&&!r&&o!=="mirror"&&s!==0&&i!=="inertia"}const re=40;class ne extends v4{constructor({autoplay:t=!0,delay:e=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",keyframes:a,name:l,motionValue:d,element:c,...u}){var w;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=p1.now();const f={autoplay:t,delay:e,type:r,repeat:o,repeatDelay:s,repeatType:i,name:l,motionValue:d,element:c,...u},p=(c==null?void 0:c.KeyframeResolver)||P4;this.keyframeResolver=new p(a,(m,y,g)=>this.onKeyframesResolved(m,y,f,!g),l,d,c),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,e,r,o){var g,b;this.keyframeResolver=void 0;const{name:s,type:i,velocity:a,delay:l,isHandoff:d,onUpdate:c}=r;this.resolvedAt=p1.now();let u=!0;J0(t,s,i,a)||(u=!1,(j1.instantAnimations||!l)&&(c==null||c(d3(t,r,e))),t[0]=t[t.length-1],N4(r),r.repeat=0);const p={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>re?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:e,...r,keyframes:t},w=u&&!d&&ee(p),m=(b=(g=p.motionValue)==null?void 0:g.owner)==null?void 0:b.current;let y;if(w)try{y=new Y0({...p,element:m})}catch{y=new u3(p)}else y=new u3(p);y.finished.then(()=>{this.notifyFinished()}).catch(v1),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),H0()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function y7(L,t,e,r=0,o=1){const s=Array.from(L).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),i=L.size,a=(i-1)*r;return typeof e=="function"?e(s,i):o===1?s*r:a-s*r}const oe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function se(L){const t=oe.exec(L);if(!t)return[,];const[,e,r,o]=t;return[`--${e??r}`,o]}const ie=4;function C7(L,t,e=1){O1(e<=ie,`Max CSS variable fallback depth detected in property "${L}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=se(L);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return b5(i)?parseFloat(i):i}return c4(o)?C7(o,t,e+1):o}const ae={type:"spring",stiffness:500,damping:25,restSpeed:10},le=L=>({type:"spring",stiffness:550,damping:L===0?2*Math.sqrt(550):30,restSpeed:10}),ce={type:"keyframes",duration:.8},de={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ue=(L,{keyframes:t})=>t.length>2?ce:m2.has(L)?L.startsWith("scale")?le(t[1]):ae:de;function b7(L,t){if(L!=null&&L.inherit&&t){const{inherit:e,...r}=L;return{...t,...r}}return L}function V4(L,t){const e=(L==null?void 0:L[t])??(L==null?void 0:L.default)??L;return e!==L?b7(e,L):e}const fe=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function he(L){for(const t in L)if(!fe.has(t))return!0;return!1}const I4=(L,t,e,r={},o,s)=>i=>{const a=V4(r,L)||{},l=a.delay||r.delay||0;let{elapsed:d=0}=r;d=d-y1(l);const c={keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:L,motionValue:t,element:s?void 0:o};he(a)||Object.assign(c,ue(L,c)),c.duration&&(c.duration=y1(c.duration)),c.repeatDelay&&(c.repeatDelay=y1(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let u=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(N4(c),c.delay===0&&(u=!0)),(j1.instantAnimations||j1.skipAnimations||o!=null&&o.shouldSkipAnimations)&&(u=!0,N4(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const f=d3(c.keyframes,a);if(f!==void 0){Q.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new u3(c):new ne(c)};function x7(L){const t=[{},{}];return L==null||L.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function F4(L,t,e,r){if(typeof t=="function"){const[o,s]=x7(r);t=t(e!==void 0?e:L.custom,o,s)}if(typeof t=="string"&&(t=L.variants&&L.variants[t]),typeof t=="function"){const[o,s]=x7(r);t=t(e!==void 0?e:L.custom,o,s)}return t}function r2(L,t,e){const r=L.getProps();return F4(r,t,e!==void 0?e:r.custom,L)}const v7=new Set(["width","height","top","left","right","bottom",...g2]),M7=30,pe=L=>!isNaN(parseFloat(L));class we{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=p1.now();if(this.updatedAt!==o&&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(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=p1.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=pe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&s4(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new o4);const r=this.events[t].add(e);return t==="change"?()=>{r(),Q.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,r){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=p1.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>M7)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,M7);return S5(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function y2(L,t){return new we(L,t)}const O4=L=>Array.isArray(L);function ge(L,t,e){L.hasValue(t)?L.getValue(t).set(e):L.addValue(t,y2(e))}function me(L){return O4(L)?L[L.length-1]||0:L}function ye(L,t){const e=r2(L,t);let{transitionEnd:r={},transition:o={},...s}=e||{};s={...s,...r};for(const i in s){const a=me(s[i]);ge(L,i,a)}}const c1=L=>!!(L&&L.getVelocity);function Ce(L){return!!(c1(L)&&L.add)}function B4(L,t){const e=L.getValue("willChange");if(Ce(e))return e.add(t);if(!e&&j1.WillChange){const r=new j1.WillChange("auto");L.addValue("willChange",r),r.add(t)}}function _4(L){return L.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const S7="data-"+_4("framerAppearId");function T7(L){return L.props[S7]}function be({protectedKeys:L,needsAnimating:t},e){const r=L.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,r}function Z7(L,t,{delay:e=0,transitionOverride:r,type:o}={}){let{transition:s,transitionEnd:i,...a}=t;const l=L.getDefaultTransition();s=s?b7(s,l):l;const d=s==null?void 0:s.reduceMotion;r&&(s=r);const c=[],u=o&&L.animationState&&L.animationState.getState()[o];for(const f in a){const p=L.getValue(f,L.latestValues[f]??null),w=a[f];if(w===void 0||u&&be(u,f))continue;const m={delay:e,...V4(s||{},f)},y=p.get();if(y!==void 0&&!p.isAnimating()&&!Array.isArray(w)&&w===y&&!m.velocity){Q.update(()=>p.set(w));continue}let g=!1;if(window.MotionHandoffAnimation){const M=T7(L);if(M){const S=window.MotionHandoffAnimation(M,f,Q);S!==null&&(m.startTime=S,g=!0)}}B4(L,f);const b=d??L.shouldReduceMotion;p.start(I4(f,p,w,b&&v7.has(f)?{type:!1}:m,L,g));const C=p.animation;C&&c.push(C)}if(i){const f=()=>Q.update(()=>{i&&ye(L,i)});c.length?Promise.all(c).then(f):f()}return c}function W4(L,t,e={}){var l;const r=r2(L,t,e.type==="exit"?(l=L.presenceContext)==null?void 0:l.custom:void 0);let{transition:o=L.getDefaultTransition()||{}}=r||{};e.transitionOverride&&(o=e.transitionOverride);const s=r?()=>Promise.all(Z7(L,r,e)):()=>Promise.resolve(),i=L.variantChildren&&L.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=o;return xe(L,t,d,c,u,f,e)}:()=>Promise.resolve(),{when:a}=o;if(a){const[d,c]=a==="beforeChildren"?[s,i]:[i,s];return d().then(()=>c())}else return Promise.all([s(),i(e.delay)])}function xe(L,t,e=0,r=0,o=0,s=1,i){const a=[];for(const l of L.variantChildren)l.notify("AnimationStart",t),a.push(W4(l,t,{...i,delay:e+(typeof r=="function"?0:r)+y7(L.variantChildren,l,r,o,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function ve(L,t,e={}){L.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>W4(L,s,e));r=Promise.all(o)}else if(typeof t=="string")r=W4(L,t,e);else{const o=typeof t=="function"?r2(L,t,e.custom):t;r=Promise.all(Z7(L,o,e))}return r.then(()=>{L.notify("AnimationComplete",t)})}const Me={test:L=>L==="auto",parse:L=>L},E7=L=>t=>t.test(L),k7=[f2,V,P1,U1,qt,Yt,Me],D7=L=>k7.find(E7(L));function Se(L){return typeof L=="number"?L===0:L!==null?L==="none"||L==="0"||v5(L):!0}const Te=new Set(["brightness","contrast","saturate","opacity"]);function Ze(L){const[t,e]=L.slice(0,-1).split("(");if(t==="drop-shadow")return L;const[r]=e.match(d4)||[];if(!r)return L;const o=e.replace(r,"");let s=Te.has(t)?1:0;return r!==e&&(s*=100),t+"("+s+o+")"}const Ee=/\b([a-z-]*)\(.*?\)/gu,H4={...Z1,getAnimatableNone:L=>{const t=L.match(Ee);return t?t.map(Ze).join(" "):L}},$4={...Z1,getAnimatableNone:L=>{const t=Z1.parse(L);return Z1.createTransformer(L)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},P7={...f2,transform:Math.round},j4={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...{rotate:U1,rotateX:U1,rotateY:U1,rotateZ:U1,scale:i3,scaleX:i3,scaleY:i3,scaleZ:i3,skew:U1,skewX:U1,skewY:U1,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:O2,originX:z5,originY:z5,originZ:V},zIndex:P7,fillOpacity:O2,strokeOpacity:O2,numOctaves:P7},ke={...j4,color:s1,backgroundColor:s1,outlineColor:s1,fill:s1,stroke:s1,borderColor:s1,borderTopColor:s1,borderRightColor:s1,borderBottomColor:s1,borderLeftColor:s1,filter:H4,WebkitFilter:H4,mask:$4,WebkitMask:$4},A7=L=>ke[L],De=new Set([H4,$4]);function N7(L,t){let e=A7(L);return De.has(e)||(e=Z1),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const Pe=new Set(["auto","none","0"]);function Ae(L,t,e){let r=0,o;for(;r<L.length&&!o;){const s=L[r];typeof s=="string"&&!Pe.has(s)&&p2(s).values.length&&(o=L[r]),r++}if(o&&e)for(const s of t)L[s]=N7(e,o)}class Ne extends P4{constructor(t,e,r,o,s){super(t,e,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:r}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),c4(u))){const f=C7(u,e.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!v7.has(r)||t.length!==2)return;const[o,s]=t,i=D7(o),a=D7(s),l=$5(o),d=$5(s);if(l!==d&&G1[r]){this.needsMeasurement=!0;return}if(i!==a)if(s7(i)&&s7(a))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else G1[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Se(t[o]))&&r.push(o);r.length&&Ae(t,r,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=G1[r](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const o=e[e.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var a;const{element:t,name:e,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(e);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=G1[e](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,d])=>{t.getValue(l).set(d)}),this.resolveNoneKeyframes()}}function V7(L,t,e){if(L==null)return[];if(L instanceof EventTarget)return[L];if(typeof L=="string"){let r=document;const o=(e==null?void 0:e[L])??r.querySelectorAll(L);return o?Array.from(o):[]}return Array.from(L).filter(r=>r!=null)}const I7=(L,t)=>t&&typeof L=="number"?t.transform(L):L;function f3(L){return x5(L)&&"offsetHeight"in L&&!("ownerSVGElement"in L)}const{schedule:z4}=_5(queueMicrotask,!1),E1={x:!1,y:!1};function F7(){return E1.x||E1.y}function Ve(L){return L==="x"||L==="y"?E1[L]?null:(E1[L]=!0,()=>{E1[L]=!1}):E1.x||E1.y?null:(E1.x=E1.y=!0,()=>{E1.x=E1.y=!1})}function O7(L,t){const e=V7(L),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[e,o,()=>r.abort()]}function Ie(L){return!(L.pointerType==="touch"||F7())}function Fe(L,t,e={}){const[r,o,s]=O7(L,e);return r.forEach(i=>{let a=!1,l=!1,d;const c=()=>{i.removeEventListener("pointerleave",w)},u=y=>{d&&(d(y),d=void 0),c()},f=y=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,u(y))},p=()=>{a=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},w=y=>{if(y.pointerType!=="touch"){if(a){l=!0;return}u(y)}},m=y=>{if(!Ie(y))return;l=!1;const g=t(i,y);typeof g=="function"&&(d=g,i.addEventListener("pointerleave",w,o))};i.addEventListener("pointerenter",m,o),i.addEventListener("pointerdown",p,o)}),s}const B7=(L,t)=>t?L===t?!0:B7(L,t.parentElement):!1,U4=L=>L.pointerType==="mouse"?typeof L.button!="number"||L.button<=0:L.isPrimary!==!1,Oe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Be(L){return Oe.has(L.tagName)||L.isContentEditable===!0}const _e=new Set(["INPUT","SELECT","TEXTAREA"]);function We(L){return _e.has(L.tagName)||L.isContentEditable===!0}const h3=new WeakSet;function _7(L){return t=>{t.key==="Enter"&&L(t)}}function G