PageSourceSearch

https://typedora-ui.netlify.app/assets/index-HnO2i3EE.js

js typedora-ui.netlify.app collected 2026-10-03 11:33:20 UTC 149,600 bytes, 33 lines download raw bytes

vendor: 30,258 bytes, line 1
1import{c as G,r as y,j as a,L as Xe,S as Wt,a as Ar,E as Cs,C as Mr,b as he,R as Dr,H as Rr,d as Er}from"./main-CVA1AMAs.js";import{S as kr}from"./search-DsywB_oc.js";const Lr=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Gn=G("arrow-right",Lr);const Ir=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Fr=G("book-open",Ir);const Br=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Hn=G("code-xml",Br);const Or=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Xn=G("copy",Or);const Ur=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],$r=G("gauge",Ur);const Kr=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Wr=G("layers",Kr);const _r=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],zr=G("list",_r);const Gr=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Hr=G("plus",Gr);const Xr=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Yr=G("puzzle",Xr);const qr=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],Zr=G("toggle-right",qr);const Jr=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],rt=G("triangle-alert",Jr);const Qr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vs=G("x",Qr),_t=y.createContext({});function zt(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Gt=typeof window<"u",Yn=Gt?y.useLayoutEffect:y.useEffect,tt=y.createContext(null);function Ht(e,t){e.indexOf(t)===-1&&e.push(t)}function Xt(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const Z=(e,t,s)=>s>t?t:s<e?e:s;let Yt=()=>{};const J={},qn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Zn(e){return typeof e=="object"&&e!==null}const Jn=e=>/^0[^.\s]+$/u.test(e);function qt(e){let t;return()=>(t===void 0&&(t=e()),t)}const z=e=>e,eo=(e,t)=>s=>t(e(s)),Ie=(...e)=>e.reduce(eo),Me=(e,t,s)=>{const n=t-e;return n===0?1:(s-e)/n};class Zt{constructor(){this.subscriptions=[]}add(t){return Ht(this.subscriptions,t),()=>Xt(this.subscriptions,t)}notify(t,s,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,s,n);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(t,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Y=e=>e*1e3,_=e=>e/1e3;function Qn(e,t){return t?e*(1e3/t):0}const ei=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,to=1e-7,so=12;function no(e,t,s,n,i){let o,r,l=0;do r=t+(s-t)/2,o=ei(r,n,i)-e,o>0?s=r:t=r;while(Math.abs(o)>to&&++l<so);return r}function Fe(e,t,s,n){if(e===t&&s===n)return z;const i=o=>no(o,0,1,e,s);return o=>o===0||o===1?o:ei(i(o),t,n)}const ti=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,si=e=>t=>1-e(1-t),ni=Fe(.33,1.53,.69,.99),Jt=si(ni),ii=ti(Jt),ri=e=>(e*=2)<1?.5*Jt(e):.5*(2-Math.pow(2,-10*(e-1))),Qt=e=>1-Math.sin(Math.acos(e)),oi=si(Qt),ai=ti(Qt),io=Fe(.42,0,1,1),ro=Fe(0,0,.58,1),li=Fe(.42,0,.58,1),oo=e=>Array.isArray(e)&&typeof e[0]!="number",ci=e=>Array.isArray(e)&&typeof e[0]=="number",ao={linear:z,easeIn:io,easeInOut:li,easeOut:ro,circIn:Qt,circInOut:ai,circOut:oi,backIn:Jt,backInOut:ii,backOut:ni,anticipate:ri},lo=e=>typeof e=="string",As=e=>{if(ci(e)){Yt(e.length===4);const[t,s,n,i]=e;return Fe(t,s,n,i)}else if(lo(e))return ao[e];return e},Ue=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function co(e,t){let s=new Set,n=new Set,i=!1,o=!1;const r=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(u){r.has(u)&&(d.schedule(u),e()),u(l)}const d={schedule:(u,h=!1,f=!1)=>{const p=f&&i?s:n;return h&&r.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(l=u,i){o=!0;return}i=!0,[s,n]=[n,s],s.forEach(c),s.clear(),i=!1,o&&(o=!1,d.process(u))}};return d}const uo=40;function ui(e,t){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>s=!0,r=Ue.reduce((v,P)=>(v[P]=co(o),v),{}),{setup:l,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:f,render:m,postRender:p}=r,x=()=>{const v=J.useManualTiming?i.timestamp:performance.now();s=!1,J.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(v-i.timestamp,uo),1)),i.timestamp=v,i.isProcessing=!0,l.process(i),c.process(i),d.process(i),u.process(i),h.process(i),f.process(i),m.process(i),p.process(i),i.isProcessing=!1,s&&t&&(n=!1,e(x))},b=()=>{s=!0,n=!0,i.isProcessing||e(x)};return{schedule:Ue.reduce((v,P)=>{const w=r[P];return v[P]=(N,C=!1,S=!1)=>(s||b(),w.schedule(N,C,S)),v},{}),cancel:v=>{for(let P=0;P<Ue.length;P++)r[Ue[P]].cancel(v)},state:i,steps:r}}const{schedule:A,cancel:te,state:I,steps:ot}=ui(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let _e;function ho(){_e=void 0}const $={now:()=>(_e===void 0&&$.set(I.isProcessing||J.useManualTiming?I.timestamp:performance.now()),_e),set:e=>{_e=e,queueMicrotask(ho)}},di=e=>t=>typeof t=="string"&&t.startsWith(e),es=di("--"),fo=di("var(--"),ts=e=>fo(e)?mo.test(e.split("/*")[0].trim()):!1,mo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Te={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},De={...Te,transform:e=>Z(0,1,e)},$e={...Te,default:1},Ne=e=>Math.round(e*1e5)/1e5,ss=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function po(e){return e==null}const go=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ns=(e,t)=>s=>!!(typeof s=="string"&&go.test(s)&&s.startsWith(e)||t&&!po(s)&&Object.prototype.hasOwnProperty.call(s,t)),hi=(e,t,s)=>n=>{if(typeof n!="string")return n;const[i,o,r,l]=n.match(ss);return{[e]:parseFloat(i),[t]:parseFloat(o),[s]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},yo=e=>Z(0,255,e),at={...Te,transform:e=>Math.round(yo(e))},ae={test:ns("rgb","red"),parse:hi("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:n=1})=>"rgba("+at.transform(e)+", "+at.transform(t)+", "+at.transform(s)+", "+Ne(De.transform(n))+")"};function xo(e){let t="",s="",n="",i="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,s+=s,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const wt={test:ns("#"),parse:xo,transform:ae.transform},Be=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ee=Be("deg"),q=Be("%"),j=Be("px"),vo=Be("vh"),bo=Be("vw"),Ms={...q,parse:e=>q.parse(e)/100,transform:e=>q.transform(e*100)},fe={test:ns("hsl","hue"),parse:hi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:n=1})=>"hsla("+Math.round(e)+", "+q.transform(Ne(t))+", "+q.transform(Ne(s))+", "+Ne(De.transform(n))+")"},R={test:e=>ae.test(e)||wt.test(e)||fe.test(e),parse:e=>ae.test(e)?ae.parse(e):fe.test(e)?fe.parse(e):wt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ae.transform(e):fe.transform(e),getAnimatableNone:e=>{const t=R.parse(e);return t.alpha=0,R.transform(t)}},To=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wo(e){return isNaN(e)&&typeof e=="string"&&(e.match(ss)?.length||0)+(e.match(To)?.length||0)>0}const fi="number",mi="color",jo="var",So="var(",Ds="${}",Po=/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 Re(e){const t=e.toString(),s=[],n={color:[],number:[],var:[]},i=[];let o=0;const l=t.replace(Po,c=>(R.test(c)?(n.color.push(o),i.push(mi),s.push(R.parse(c))):c.startsWith(So)?(n.var.push(o),i.push(jo),s.push(c)):(n.number.push(o),i.push(fi),s.push(parseFloat(c))),++o,Ds)).split(Ds);return{values:s,split:l,indexes:n,types:i}}function pi(e){return Re(e).values}function gi(e){const{split:t,types:s}=Re(e),n=t.length;return i=>{let o="";for(let r=0;r<n;r++)if(o+=t[r],i[r]!==void 0){const l=s[r];l===fi?o+=Ne(i[r]):l===mi?o+=R.transform(i[r]):o+=i[r]}return o}}const No=e=>typeof e=="number"?0:R.test(e)?R.getAnimatableNone(e):e;function Co(e){const t=pi(e);return gi(e)(t.map(No))}const se={test:wo,parse:pi,createTransformer:gi,getAnimatableNone:Co};function lt(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function Vo({hue:e,saturation:t,lightness:s,alpha:n}){e/=360,t/=100,s/=100;let i=0,o=0,r=0;if(!t)i=o=r=s;else{const l=s<.5?s*(1+t):s+t-s*t,c=2*s-l;i=lt(c,l,e+1/3),o=lt(c,l,e),r=lt(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:n}}function Ye(e,t){return s=>s>0?t:e}const M=(e,t,s)=>e+(t-e)*s,ct=(e,t,s)=>{const n=e*e,i=s*(t*t-n)+n;return i<0?0:Math.sqrt(i)},Ao=[wt,ae,fe],Mo=e=>Ao.find(t=>t.test(e));function Rs(e){const t=Mo(e);if(!t)return!1;let s=t.parse(e);return t===fe&&(s=Vo(s)),s}const Es=(e,t)=>{const s=Rs(e),n=Rs(t);if(!s||!n)return Ye(e,t);const i={...s};return o=>(i.red=ct(s.red,n.red,o),i.green=ct(s.green,n.green,o),i.blue=ct(s.blue,n.blue,o),i.alpha=M(s.alpha,n.alpha,o),ae.transform(i))},jt=new Set(["none","hidden"]);function Do(e,t){return jt.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function Ro(e,t){return s=>M(e,t,s)}function is(e){return typeof e=="number"?Ro:typeof e=="string"?ts(e)?Ye:R.test(e)?Es:Lo:Array.isArray(e)?yi:typeof e=="object"?R.test(e)?Es:Eo:Ye}function yi(e,t){const s=[...e],n=s.length,i=e.map((o,r)=>is(o)(o,t[r]));return o=>{for(let r=0;r<n;r++)s[r]=i[r](o);return s}}function Eo(e,t){const s={...e,...t},n={};for(const i in s)e[i]!==void 0&&t[i]!==void 0&&(n[i]=is(e[i])(e[i],t[i]));return i=>{for(const o in n)s[o]=n[o](i);return s}}function ko(e,t){const s=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],r=e.indexes[o][n[o]],l=e.values[r]??0;s[i]=l,n[o]++}return s}const Lo=(e,t)=>{const s=se.createTransformer(t),n=Re(e),i=Re(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?jt.has(e)&&!i.values.length||jt.has(t)&&!n.values.length?Do(e,t):Ie(yi(ko(n,i),i.values),s):Ye(e,t)};function xi(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?M(e,t,s):is(e)(e,t)}const Io=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>A.update(t,s),stop:()=>te(t),now:()=>I.isProcessing?I.timestamp:$.now()}},vi=(e,t,s=10)=>{let n="";const i=Math.max(Math.round(t/s),2);for(let o=0;o<i;o++)n+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},qe=2e4;function rs(e){let t=0;const s=50;let n=e.next(t);for(;!n.done&&t<qe;)t+=s,n=e.next(t);return t>=qe?1/0:t}function Fo(e,t=100,s){const n=s({...e,keyframes:[0,t]}),i=Math.min(rs(n),qe);return{type:"keyframes",ease:o=>n.next(i*o).value/t,duration:_(i)}}const Bo=5;function bi(e,t,s){const n=Math.max(t-Bo,0);return Qn(s-e(n),t-n)}const D={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},ut=.001;function Oo({duration:e=D.duration,bounce:t=D.bounce,velocity:s=D.velocity,mass:n=D.mass}){let i,o,r=1-t;r=Z(D.minDamping,D.maxDamping,r),e=Z(D.minDuration,D.maxDuration,_(e)),r<1?(i=d=>{const u=d*r,h=u*e,f=u-s,m=St(d,r),p=Math.exp(-h);return ut-f/m*p},o=d=>{const h=d*r*e,f=h*s+s,m=Math.pow(r,2)*Math.pow(d,2)*e,p=Math.exp(-h),x=St(Math.pow(d,2),r);return(-i(d)+ut>0?-1:1)*((f-m)*p)/x}):(i=d=>{const u=Math.exp(-d*e),h=(d-s)*e+1;return-ut+u*h},o=d=>{const u=Math.exp(-d*e),h=(s-d)*(e*e);return u*h});const l=5/e,c=$o(i,o,l);if(e=Y(e),isNaN(c))return{stiffness:D.stiffness,damping:D.damping,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:r*2*Math.sqrt(n*d),duration:e}}}const Uo=12;function $o(e,t,s){let n=s;for(let i=1;i<Uo;i++)n=n-e(n)/t(n);return n}function St(e,t){return e*Math.sqrt(1-t*t)}const Ko=["duration","bounce"],Wo=["stiffness","damping","mass"];function ks(e,t){return t.some(s=>e[s]!==void 0)}function _o(e){let t={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...e};if(!ks(e,Wo)&&ks(e,Ko))if(e.visualDuration){const s=e.visualDuration,n=2*Math.PI/(s*1.2),i=n*n,o=2*Z(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:D.mass,stiffness:i,damping:o}}else{const s=Oo(e);t={...t,...s,mass:D.mass},t.isResolvedFromDuration=!0}return t}function Ze(e=D.visualDuration,t=D.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=s;const o=s.keyframes[0],r=s.keyframes[s.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:d,mass:u,duration:h,velocity:f,isResolvedFromDuration:m}=_o({...s,velocity:-_(s.velocity||0)}),p=f||0,x=d/(2*Math.sqrt(c*u)),b=r-o,g=_(Math.sqrt(c/u)),T=Math.abs(b)<5;n||(n=T?D.restSpeed.granular:D.restSpeed.default),i||(i=T?D.restDelta.granular:D.restDelta.default);let v;if(x<1){const w=St(g,x);v=N=>{const C=Math.exp(-x*g*N);return r-C*((p+x*g*b)/w*Math.sin(w*N)+b*Math.cos(w*N))}}else if(x===1)v=w=>r-Math.exp(-g*w)*(b+(p+g*b)*w);else{const w=g*Math.sqrt(x*x-1);v=N=>{const C=Math.exp(-x*g*N),S=Math.min(w*N,300);return r-C*((p+x*g*b)*Math.sinh(S)+w*b*Math.cosh(S))/w}}const P={calculatedDuration:m&&h||null,next:w=>{const N=v(w);if(m)l.done=w>=h;else{let C=w===0?p:0;x<1&&(C=w===0?Y(p):bi(v,w,N));const S=Math.abs(C)<=n,k=Math.abs(r-N)<=i;l.done=S&&k}return l.value=l.done?r:N,l},toString:()=>{const w=Math.min(rs(P),qe),N=vi(C=>P.next(w*C).value,w,30);return w+"ms "+N},toTransition:()=>{}};return P}Ze.applyToOptions=e=>{const t=Fo(e,100,Ze);return e.ease=t.ease,e.duration=Y(t.duration),e.type="keyframes",e};function Pt({keyframes:e,velocity:t=0,power:s=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:l,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],f={done:!1,value:h},m=S=>l!==void 0&&S<l||c!==void 0&&S>c,p=S=>l===void 0?c:c===void 0||Math.abs(l-S)<Math.abs(c-S)?l:c;let x=s*t;const b=h+x,g=r===void 0?b:r(b);g!==b&&(x=g-h);const T=S=>-x*Math.exp(-S/n),v=S=>g+T(S),P=S=>{const k=T(S),B=v(S);f.done=Math.abs(k)<=d,f.value=f.done?g:B};let w,N;const C=S=>{m(f.value)&&(w=S,N=Ze({keyframes:[f.value,p(f.value)],velocity:bi(v,S,f.value),damping:i,stiffness:o,restDelta:d,restSpeed:u}))};return C(0),{calculatedDuration:null,next:S=>{let k=!1;return!N&&w===void 0&&(k=!0,P(S),C(S)),w!==void 0&&S>=w?N.next(S-w):(!k&&P(S),f)}}}function zo(e,t,s){const n=[],i=s||J.mix||xi,o=e.length-1;for(let r=0;r<o;r++){let l=i(e[r],e[r+1]);if(t){const c=Array.isArray(t)?t[r]||z:t;l=Ie(c,l)}n.push(l)}return n}function Go(e,t,{clamp:s=!0,ease:n,mixer:i}={}){const o=e.length;if(Yt(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=zo(t,n,i),c=l.length,d=u=>{if(r&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const f=Me(e[h],e[h+1],u);return l[h](f)};return s?u=>d(Z(e[0],e[o-1],u)):d}function Ho(e,t){const s=e[e.length-1];for(let n=1;n<=t;n++){const i=Me(0,t,n);e.push(M(s,1,i))}}function Xo(e){const t=[0];return Ho(t,e.length-1),t}function Yo(e,t){return e.map(s=>s*t)}function qo(e,t){return e.map(()=>t||li).splice(0,e.length-1)}function Ce({duration:e=300,keyframes:t,times:s,ease:n="easeInOut"}){const i=oo(n)?n.map(As):As(n),o={done:!1,value:t[0]},r=Yo(s&&s.length===t.length?s:Xo(t),e),l=Go(r,t,{ease:Array.isArray(i)?i:qo(t,i)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const Zo=e=>e!==null;function os(e,{repeat:t,repeatType:s="loop"},n,i=1){const o=e.filter(Zo),l=i<0||t&&s!=="loop"&&t%2===1?0:o.length-1;return!l||n===void 0?o[l]:n}const Jo={decay:Pt,inertia:Pt,tween:Ce,keyframes:Ce,spring:Ze};function Ti(e){typeof e.type=="string"&&(e.type=Jo[e.type])}class as{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const Qo=e=>e/100;class ls extends as{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==$.now()&&this.tick($.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ti(t);const{type:s=Ce,repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=t;let{keyframes:l}=t;const c=s||Ce;c!==Ce&&typeof l[0]!="number"&&(this.mixKeyframes=Ie(Qo,xi(l[0],l[1])),l=[0,100]);const d=c({...t,keyframes:l});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-r})),d.calculatedDuration===null&&(d.calculatedDuration=rs(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=d}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:n,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:m,type:p,onUpdate:x,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const g=this.currentTime-d*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,P=n;if(h){const S=Math.min(this.currentTime,i)/l;let k=Math.floor(S),B=S%1;!B&&S>=1&&(B=1),B===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(f==="reverse"?(B=1-B,m&&(B-=m/l)):f==="mirror"&&(P=r)),v=Z(0,1,B)*l}const w=T?{done:!1,value:u[0]}:P.next(v);o&&(w.value=o(w.value));let{done:N}=w;!T&&c!==null&&(N=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return C&&p!==Pt&&(w.value=os(u,this.options,b,this.speed)),x&&x(w.value),C&&this.finish(),w}then(t,s){return this.finished.then(t,s)}get duration(){return _(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+_(t)}get time(){return _(this.currentTime)}set time(t){t=Y(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?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime($.now());const s=this.playbackSpeed!==t;this.playbackSpeed=t,s&&(this.time=_(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Io,startTime:s}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),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($.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function ea(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const le=e=>e*180/Math.PI,Nt=e=>{const t=le(Math.atan2(e[1],e[0]));return Ct(t)},ta={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Nt,rotateZ:Nt,skewX:e=>le(Math.atan(e[1])),skewY:e=>le(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ct=e=>(e=e%360,e<0&&(e+=360),e),Ls=Nt,Is=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Fs=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),sa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Is,scaleY:Fs,scale:e=>(Is(e)+Fs(e))/2,rotateX:e=>Ct(le(Math.atan2(e[6],e[5]))),rotateY:e=>Ct(le(Math.atan2(-e[2],e[0]))),rotateZ:Ls,rotate:Ls,skewX:e=>le(Math.atan(e[4])),skewY:e=>le(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vt(e){return e.includes("scale")?1:0}function At(e,t){if(!e||e==="none")return Vt(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=sa,i=s;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ta,i=l}if(!i)return Vt(t);const o=n[t],r=i[1].split(",").map(ia);return typeof o=="function"?o(r):r[o]}const na=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return At(s,t)};function ia(e){return parseFloat(e.trim())}const we=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],je=new Set(we),Bs=e=>e===Te||e===j,ra=new Set(["x","y","z"]),oa=we.filter(e=>!ra.has(e));function aa(e){const t=[];return oa.forEach(s=>{const n=e.getValue(s);n!==void 0&&(t.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),t}const ce={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>At(t,"x"),y:(e,{transform:t})=>At(t,"y")};ce.translateX=ce.x;ce.translateY=ce.y;const ue=new Set;let Mt=!1,Dt=!1,Rt=!1;function wi(){if(Dt){const e=Array.from(ue).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),s=new Map;t.forEach(n=>{const i=aa(n);i.length&&(s.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=s.get(n);i&&i.forEach(([o,r])=>{n.getValue(o)?.set(r)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Dt=!1,Mt=!1,ue.forEach(e=>e.complete(Rt)),ue.clear()}function ji(){ue.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Dt=!0)})}function la(){Rt=!0,ji(),wi(),Rt=!1}class cs{constructor(t,s,n,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=n,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(ue.add(this),Mt||(Mt=!0,A.read(ji),A.resolveKeyframes(wi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:n,motionValue:i}=this;if(t[0]===null){const o=i?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(n&&s){const l=n.readValue(s,r);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=r),i&&o===void 0&&i.set(t[0])}ea(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ue.delete(this)}cancel(){this.state==="scheduled"&&(ue.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ca=e=>e.startsWith("--");function ua(e,t,s){ca(t)?e.style.setProperty(t,s):e.style[t]=s}const da=qt(()=>window.ScrollTimeline!==void 0),ha={};function fa(e,t){const s=qt(e);return()=>ha[t]??s()}const Si=fa(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pe=([e,t,s,n])=>`cubic-bezier(${e}, ${t}, ${s}, ${n})`,Os={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pe([0,.65,.55,1]),circOut:Pe([.55,0,1,.45]),backIn:Pe([.31,.01,.66,-.59]),backOut:Pe([.33,1.53,.69,.99])};function Pi(e,t){if(e)return typeof e=="function"?Si()?vi(e,t):"ease-out":ci(e)?Pe(e):Array.isArray(e)?e.map(s=>Pi(s,t)||Os.easeOut):Os[e]}function ma(e,t,s,{delay:n=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:l="easeOut",times:c}={},d=void 0){const u={[t]:s};c&&(u.offset=c);const h=Pi(l,i);Array.isArray(h)&&(u.easing=h);const f={delay:n,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(u,f)}function Ni(e){return typeof e=="function"&&"applyToOptions"in e}function pa({type:e,...t}){return Ni(e)&&Si()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ga extends as{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:s,name:n,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Yt(typeof t.type!="string");const d=pa(t);this.animation=ma(s,n,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=os(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(u):ua(s,n,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return _(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+_(t)}get time(){return _(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Y(t)}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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&da()?(this.animation.timeline=t,z):s(this)}}const Ci={anticipate:ri,backInOut:ii,circInOut:ai};function ya(e){return e in Ci}function xa(e){typeof e.ease=="string"&&ya(e.ease)&&(e.ease=Ci[e.ease])}const Us=10;class va extends ga{constructor(t){xa(t),Ti(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:n,onComplete:i,element:o,...r}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const l=new ls({...r,autoplay:!1}),c=Y(this.finishedTime??this.time);s.setWithVelocity(l.sample(c-Us).value,l.sample(c).value,Us),l.stop()}}const $s=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(se.test(e)||e==="0")&&!e.startsWith("url("));function ba(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function Ta(e,t,s,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=$s(i,t),l=$s(o,t);return!r||!l?!1:ba(e)||(s==="spring"||Ni(s))&&n}function Et(e){e.duration=0,e.type="keyframes"}const wa=new Set(["opacity","clipPath","filter","transform"]),ja=qt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Sa(e){const{motionValue:t,name:s,repeatDelay:n,repeatType:i,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return ja()&&s&&wa.has(s)&&(s!=="transform"||!d)&&!c&&!n&&i!=="mirror"&&o!==0&&r!=="inertia"}const Pa=40;class Na extends as{constructor({autoplay:t=!0,delay:s=0,type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:l,name:c,motionValue:d,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=$.now();
1const f={autoplay:t,delay:s,type:n,repeat:i,repeatDelay:o,repeatType:r,name:c,motionValue:d,element:u,...h},m=u?.KeyframeResolver||cs;this.keyframeResolver=new m(l,(p,x,b)=>this.onKeyframesResolved(p,x,f,!b),c,d,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,s,n,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:l,delay:c,isHandoff:d,onUpdate:u}=n;this.resolvedAt=$.now(),Ta(t,o,r,l)||((J.instantAnimations||!c)&&u?.(os(t,n,s)),t[0]=t[t.length-1],Et(n),n.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Pa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...n,keyframes:t},m=!d&&Sa(f)?new va({...f,element:f.motionValue.owner.current}):new ls(f);m.finished.then(()=>this.notifyFinished()).catch(z),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),la()),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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ca=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Va(e){const t=Ca.exec(e);if(!t)return[,];const[,s,n,i]=t;return[`--${s??n}`,i]}function Vi(e,t,s=1){const[n,i]=Va(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const r=o.trim();return qn(r)?parseFloat(r):r}return ts(i)?Vi(i,t,s+1):i}function us(e,t){return e?.[t]??e?.default??e}const Ai=new Set(["width","height","top","left","right","bottom",...we]),Aa={test:e=>e==="auto",parse:e=>e},Mi=e=>t=>t.test(e),Di=[Te,j,q,ee,bo,vo,Aa],Ks=e=>Di.find(Mi(e));function Ma(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Jn(e):!0}const Da=new Set(["brightness","contrast","saturate","opacity"]);function Ra(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=s.match(ss)||[];if(!n)return e;const i=s.replace(n,"");let o=Da.has(t)?1:0;return n!==s&&(o*=100),t+"("+o+i+")"}const Ea=/\b([a-z-]*)\(.*?\)/gu,kt={...se,getAnimatableNone:e=>{const t=e.match(Ea);return t?t.map(Ra).join(" "):e}},Ws={...Te,transform:Math.round},ka={rotate:ee,rotateX:ee,rotateY:ee,rotateZ:ee,scale:$e,scaleX:$e,scaleY:$e,scaleZ:$e,skew:ee,skewX:ee,skewY:ee,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:De,originX:Ms,originY:Ms,originZ:j},ds={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,backgroundPositionX:j,backgroundPositionY:j,...ka,zIndex:Ws,fillOpacity:De,strokeOpacity:De,numOctaves:Ws},La={...ds,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:kt,WebkitFilter:kt},Ri=e=>La[e];function Ei(e,t){let s=Ri(e);return s!==kt&&(s=se),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const Ia=new Set(["auto","none","0"]);function Fa(e,t,s){let n=0,i;for(;n<e.length&&!i;){const o=e[n];typeof o=="string"&&!Ia.has(o)&&Re(o).values.length&&(i=e[n]),n++}if(i&&s)for(const o of t)e[o]=Ei(s,i)}class Ba extends cs{constructor(t,s,n,i,o){super(t,s,n,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];
vendor: 13,866 bytes, lines 1-9
1if(typeof d=="string"&&(d=d.trim(),ts(d))){const u=Vi(d,s.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ai.has(n)||t.length!==2)return;const[i,o]=t,r=Ks(i),l=Ks(o);if(r!==l)if(Bs(r)&&Bs(l))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else ce[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||Ma(t[i]))&&n.push(i);n.length&&Fa(t,n,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ce[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const i=s[s.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:s,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(s);i&&i.jump(this.measuredOrigin,!1);const o=n.length-1,r=n[o];n[o]=ce[s](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Oa(e,t,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const i=s?.[e]??n.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const ki=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Li(e){return Zn(e)&&"offsetHeight"in e}const _s=30,Ua=e=>!isNaN(parseFloat(e));class $a{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const i=$.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=$.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ua(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new Zt);const n=this.events[t].add(s);return t==="change"?()=>{n(),A.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=$.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_s)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,_s);return Qn(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ve(e,t){return new $a(e,t)}const{schedule:hs}=ui(queueMicrotask,!1),X={x:!1,y:!1};function Ii(){return X.x||X.y}function Ka(e){return e==="x"||e==="y"?X[e]?null:(X[e]=!0,()=>{X[e]=!1}):X.x||X.y?null:(X.x=X.y=!0,()=>{X.x=X.y=!1})}function Fi(e,t){const s=Oa(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[s,i,()=>n.abort()]}function zs(e){return!(e.pointerType==="touch"||Ii())}function Wa(e,t,s={}){const[n,i,o]=Fi(e,s),r=l=>{if(!zs(l))return;const{target:c}=l,d=t(c,l);if(typeof d!="function"||!c)return;const u=h=>{zs(h)&&(d(h),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return n.forEach(l=>{l.addEventListener("pointerenter",r,i)}),o}const Bi=(e,t)=>t?e===t?!0:Bi(e,t.parentElement):!1,fs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_a=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function za(e){return _a.has(e.tagName)||e.tabIndex!==-1}const ze=new WeakSet;function Gs(e){return t=>{t.key==="Enter"&&e(t)}}function dt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ga=(e,t)=>{const s=e.currentTarget;if(!s)return;const n=Gs(()=>{if(ze.has(s))return;dt(s,"down");const i=Gs(()=>{dt(s,"up")}),o=()=>dt(s,"cancel");s.addEventListener("keyup",i,t),s.addEventListener("blur",o,t)});s.addEventListener("keydown",n,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),t)};function Hs(e){return fs(e)&&!Ii()}function Ha(e,t,s={}){const[n,i,o]=Fi(e,s),r=l=>{const c=l.currentTarget;if(!Hs(l))return;ze.add(c);const d=t(c,l),u=(m,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),ze.has(c)&&ze.delete(c),Hs(m)&&typeof d=="function"&&d(m,{success:p})},h=m=>{u(m,c===window||c===document||s.useGlobalTarget||Bi(c,m.target))},f=m=>{u(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return n.forEach(l=>{(s.useGlobalTarget?window:l).addEventListener("pointerdown",r,i),Li(l)&&(l.addEventListener("focus",d=>Ga(d,i)),!za(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function Oi(e){return Zn(e)&&"ownerSVGElement"in e}function Xa(e){return Oi(e)&&e.tagName==="svg"}const F=e=>!!(e&&e.getVelocity),Ya=[...Di,R,se],qa=e=>Ya.find(Mi(e)),ms=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Xs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Za(...e){return t=>{let s=!1;const n=e.map(i=>{const o=Xs(i,t);return!s&&typeof o=="function"&&(s=!0),o});if(s)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():Xs(e[i],null)}}}}function Ja(...e){return y.useCallback(Za(...e),e)}class Qa extends y.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const n=s.offsetParent,i=Li(n)&&n.offsetWidth||0,o=this.props.sizeRef.current;o.height=s.offsetHeight||0,o.width=s.offsetWidth||0,o.top=s.offsetTop,o.left=s.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function el({children:e,isPresent:t,anchorX:s,root:n}){const i=y.useId(),o=y.useRef(null),r=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=y.useContext(ms),c=Ja(o,e?.ref);return y.useInsertionEffect(()=>{const{width:d,height:u,top:h,left:f,right:m}=r.current;if(t||!o.current||!d||!u)return;const p=s==="left"?`left: ${f}`:`right: ${m}`;o.current.dataset.motionPopId=i;const x=document.createElement("style");l&&(x.nonce=l);const b=n??document.head;return b.appendChild(x),x.sheet&&x.sheet.insertRule(`
2          [data-motion-pop-id="${i}"] {
3            position: absolute !important;
4            width: ${d}px !important;
5            height: ${u}px !important;
6            ${p}px !important;
7            top: ${h}px !important;
8          }
9        `),()=>{b.contains(x)&&b.removeChild(x)}},[t]),a.jsx(Qa,{isPresent:t,childRef:o,sizeRef:r,children:y.cloneElement(e,{ref:c})})}const tl=({children:e,initial:t,isPresent:s,onExitComplete:n,custom:i,presenceAffectsLayout:o,mode:r,anchorX:l,root:c})=>{const d=zt(sl),u=y.useId();let h=!0,f=y.useMemo(()=>(h=!1,{id:u,initial:t,isPresent:s,custom:i,onExitComplete:m=>{d.set(m,!0);for(const p of d.values())if(!p)return;n&&n()},register:m=>(d.set(m,!1),()=>d.delete(m))}),[s,d,n]);return o&&h&&(f={...f}),y.useMemo(()=>{d.forEach((m,p)=>d.set(p,!1))},[s]),y.useEffect(()=>{!s&&!d.size&&n&&n()},[s]),r==="popLayout"&&(e=a.jsx(el,{isPresent:s,anchorX:l,root:c,children:e})),a.jsx(tt.Provider,{value:f,children:e})};function sl(){return new Map}function Ui(e=!0){const t=y.useContext(tt);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:i}=t,o=y.useId();y.useEffect(()=>{if(e)return i(o)},[e]);const r=y.useCallback(()=>e&&n&&n(o),[o,n,e]);return!s&&n?[!1,r]:[!0]}const Ke=e=>e.key||"";function Ys(e){const t=[];return y.Children.forEach(e,s=>{y.isValidElement(s)&&t.push(s)}),t}const ht=({children:e,custom:t,initial:s=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:l="left",root:c})=>{const[d,u]=Ui(r),h=y.useMemo(()=>Ys(e),[e]),f=r&&!d?[]:h.map(Ke),m=y.useRef(!0),p=y.useRef(h),x=zt(()=>new Map),[b,g]=y.useState(h),[T,v]=y.useState(h);Yn(()=>{m.current=!1,p.current=h;for(let N=0;N<T.length;N++){const C=Ke(T[N]);f.includes(C)?x.delete(C):x.get(C)!==!0&&x.set(C,!1)}},[T,f.length,f.join("-")]);const P=[];if(h!==b){let N=[...h];for(let C=0;C<T.length;C++){const S=T[C],k=Ke(S);f.includes(k)||(N.splice(C,0,S),P.push(S))}return o==="wait"&&P.length&&(N=P),v(Ys(N)),g(h),null}const{forceRender:w}=y.useContext(_t);return a.jsx(a.Fragment,{children:T.map(N=>{const C=Ke(N),S=r&&!d?!1:h===T||f.includes(C),k=()=>{if(x.has(C))x.set(C,!0);else return;let B=!0;x.forEach(Q=>{Q||(B=!1)}),B&&(w?.(),v(p.current),r&&u?.(),n&&n())};return a.jsx(tl,{isPresent:S,initial:!m.current||s?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:c,onExitComplete:S?void 0:k,anchorX:l,children:N},C)})})},$i=y.createContext({strict:!1}),qs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},be={};for(const e in qs)be[e]={isEnabled:t=>qs[e].some(s=>!!t[s])};function nl(e){for(const t in e)be[t]={...be[t],...e[t]}}const il=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Je(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||il.has(e)}let Ki=e=>!Je(e);function rl(e){typeof e=="function"&&(Ki=t=>t.startsWith("on")?!Je(t):e(t))}try{rl(require("@emotion/is-prop-valid").default)}catch{}function ol(e,t,s){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(Ki(i)||s===!0&&Je(i)||!t&&!Je(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}const st=y.createContext({});function nt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ee(e){return typeof e=="string"||Array.isArray(e)}const ps=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gs=["initial",...ps];function it(e){return nt(e.animate)||gs.some(t=>Ee(e[t]))}function Wi(e){return!!(it(e)||e.variants)}function al(e,t){if(it(e)){const{initial:s,animate:n}=e;return{initial:s===!1||Ee(s)?s:void 0,animate:Ee(n)?n:void 0}}return e.inherit!==!1?t:{}}function ll(e){const{initial:t,animate:s}=al(e,y.useContext(st));return y.useMemo(()=>({initial:t,animate:s}),[Zs(t),Zs(s)])}function Zs(e){return Array.isArray(e)?e.join(" "):e}const ke={};function cl(e){for(const t in e)ke[t]=e[t],es(t)&&(ke[t].isCSSVariable=!0)}function _i(e,{layout:t,layoutId:s}){return je.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!ke[e]||e==="opacity")}const ul={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dl=we.length;function hl(e,t,s){let n="",i=!0;for(let o=0;o<dl;o++){const r=we[o],l=e[r];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(r.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||s){const d=ki(l,ds[r]);if(!c){i=!1;const u=ul[r]||r;n+=`${u}(${d}) `}s&&(t[r]=d)}}return n=n.trim(),s?n=s(t,i?"":n):i&&(n="none"),n}function ys(e,t,s){const{style:n,vars:i,transformOrigin:o}=e;let r=!1,l=!1;for(const c in t){const d=t[c];if(je.has(c)){r=!0;continue}else if(es(c)){i[c]=d;continue}else{const u=ki(d,ds[c]);c.startsWith("origin")?(l=!0,o[c]=u):n[c]=u}}if(t.transform||(r||s?n.transform=hl(t,e.transform,s):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;n.transformOrigin=`${c} ${d} ${u}`}}const xs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zi(e,t,s){for(const n in t)!F(t[n])&&!_i(n,s)&&(e[n]=t[n])}function fl({transformTemplate:e},t){return y.useMemo(()=>{const s=xs();return ys(s,t,e),Object.assign({},s.vars,s.style)},[t])}function ml(e,t){const s=e.style||{},n={};return zi(n,s,e),Object.assign(n,fl(e,t)),n}function pl(e,t){const s={},n=ml(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}
9`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s}const gl={offset:"stroke-dashoffset",array:"stroke-dasharray"},yl={offset:"strokeDashoffset",array:"strokeDasharray"};function xl(e,t,s=1,n=0,i=!0){e.pathLength=1;const o=i?gl:yl;e[o.offset]=j.transform(-n);const r=j.transform(t),l=j.transform(s);e[o.array]=`${r} ${l}`}function Gi(e,{attrX:t,attrY:s,attrScale:n,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...l},c,d,u){if(ys(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),s!==void 0&&(h.y=s),n!==void 0&&(h.scale=n),i!==void 0&&xl(h,i,o,r,!1)}const Hi=()=>({...xs(),attrs:{}}),Xi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function vl(e,t,s,n){const i=y.useMemo(()=>{const o=Hi();return Gi(o,t,Xi(n),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};zi(o,e.style,e),i.style={...o,...i.style}}return i}const bl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vs(e){return typeof e!="string"||e.includes("-")?!1:!!(bl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tl(e,t,s,{latestValues:n},i,o=!1){const l=(vs(e)?vl:pl)(t,n,i,e),c=ol(t,typeof e=="string",o),d=e!==y.Fragment?{...c,...l,ref:s}:{},{children:u}=t,h=y.useMemo(()=>F(u)?u.get():u,[u]);return y.createElement(e,{...d,children:h})}function Js(e){const t=[{},{}];return e?.values.forEach((s,n)=>{t[0][n]=s.get(),t[1][n]=s.getVelocity()}),t}function bs(e,t,s,n){if(typeof t=="function"){const[i,o]=Js(n);t=t(s!==void 0?s:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Js(n);t=t(s!==void 0?s:e.custom,i,o)}return t}function Ge(e){return F(e)?e.get():e}function wl({scrapeMotionValuesFromProps:e,createRenderState:t},s,n,i){return{latestValues:jl(s,n,i,e),renderState:t()}}function jl(e,t,s,n){const i={},o=n(e,{});for(const f in o)i[f]=Ge(o[f]);let{initial:r,animate:l}=e;const c=it(e),d=Wi(e);t&&d&&!c&&e.inherit!==!1&&(r===void 0&&(r=t.initial),l===void 0&&(l=t.animate));let u=s?s.initial===!1:!1;u=u||r===!1;const h=u?l:r;if(h&&typeof h!="boolean"&&!nt(h)){const f=Array.isArray(h)?h:[h];for(let m=0;m<f.length;m++){const p=bs(e,f[m]);if(p){const{transitionEnd:x,transition:b,...g}=p;for(const T in g){let v=g[T];if(Array.isArray(v)){const P=u?v.length-1:0;v=v[P]}v!==null&&(i[T]=v)}for(const T in x)i[T]=x[T]}}}return i}const Yi=e=>(t,s)=>{const n=y.useContext(st),i=y.useContext(tt),o=()=>wl(e,t,n,i);return s?o():zt(o)};function Ts(e,t,s){const{style:n}=e,i={};for(const o in n)(F(n[o])||t.style&&F(t.style[o])||_i(o,e)||s?.getValue(o)?.liveStyle!==void 0)&&(i[o]=n[o]);return i}const Sl=Yi({scrapeMotionValuesFromProps:Ts,createRenderState:xs});function qi(e,t,s){const n=Ts(e,t,s);for(const i in e)if(F(e[i])||F(t[i])){const o=we.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[o]=e[i]}return n}const Pl=Yi({scrapeMotionValuesFromProps:qi,createRenderState:Hi}),Nl=Symbol.for("motionComponentSymbol");function me(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Cl(e,t,s){return y.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),s&&(typeof s=="function"?s(n):me(s)&&(s.current=n))},[t])}const ws=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vl="framerAppearId",Zi="data-"+ws(Vl),Ji=y.createContext({});function Al(e,t,s,n,i){const{visualElement:o}=y.useContext(st),r=y.useContext($i),l=y.useContext(tt),c=y.useContext(ms).reducedMotion,d=y.useRef(null);n=n||r.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:o,props:s,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}
vendor: 11,033 bytes, line 9
9));const u=d.current,h=y.useContext(Ji);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Ml(d.current,s,i,h);const f=y.useRef(!1);y.useInsertionEffect(()=>{u&&f.current&&u.update(s,l)});const m=s[Zi],p=y.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return Yn(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),y.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),p.current=!1),u.enteringChildren=void 0)}),u}function Ml(e,t,s,n){const{layoutId:i,layout:o,drag:r,dragConstraints:l,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:Qi(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||l&&me(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:c,layoutRoot:d})}function Qi(e){if(e)return e.options.allowProjection!==!1?e.projection:Qi(e.parent)}function ft(e,{forwardMotionProps:t=!1}={},s,n){s&&nl(s);const i=vs(e)?Pl:Sl;function o(l,c){let d;const u={...y.useContext(ms),...l,layoutId:Dl(l)},{isStatic:h}=u,f=ll(l),m=i(l,h);if(!h&&Gt){Rl();const p=El(u);d=p.MeasureLayout,f.visualElement=Al(e,m,u,n,p.ProjectionNode)}return a.jsxs(st.Provider,{value:f,children:[d&&f.visualElement?a.jsx(d,{visualElement:f.visualElement,...u}):null,Tl(e,l,Cl(m,f.visualElement,c),m,h,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=y.forwardRef(o);return r[Nl]=e,r}function Dl({layoutId:e}){const t=y.useContext(_t).id;return t&&e!==void 0?t+"-"+e:e}function Rl(e,t){y.useContext($i).strict}function El(e){const{drag:t,layout:s}=be;if(!t&&!s)return{};const n={...t,...s};return{MeasureLayout:t?.isEnabled(e)||s?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function kl(e,t){if(typeof Proxy>"u")return ft;const s=new Map,n=(o,r)=>ft(o,r,e,t),i=(o,r)=>n(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?n:(s.has(r)||s.set(r,ft(r,void 0,e,t)),s.get(r))})}function er({top:e,left:t,right:s,bottom:n}){return{x:{min:t,max:s},y:{min:e,max:n}}}function Ll({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Il(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function mt(e){return e===void 0||e===1}function Lt({scale:e,scaleX:t,scaleY:s}){return!mt(e)||!mt(t)||!mt(s)}function oe(e){return Lt(e)||tr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tr(e){return Qs(e.x)||Qs(e.y)}function Qs(e){return e&&e!=="0%"}function Qe(e,t,s){const n=e-s,i=t*n;return s+i}function en(e,t,s,n,i){return i!==void 0&&(e=Qe(e,i,n)),Qe(e,s,n)+t}function It(e,t=0,s=1,n,i){e.min=en(e.min,t,s,n,i),e.max=en(e.max,t,s,n,i)}function sr(e,{x:t,y:s}){It(e.x,t.translate,t.scale,t.originPoint),It(e.y,s.translate,s.scale,s.originPoint)}const tn=.999999999999,sn=1.0000000000001;function Fl(e,t,s,n=!1){const i=s.length;if(!i)return;t.x=t.y=1;let o,r;for(let l=0;l<i;l++){o=s[l],r=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ge(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,sr(e,r)),n&&oe(o.latestValues)&&ge(e,o.latestValues))}t.x<sn&&t.x>tn&&(t.x=1),t.y<sn&&t.y>tn&&(t.y=1)}function pe(e,t){e.min=e.min+t,e.max=e.max+t}function nn(e,t,s,n,i=.5){const o=M(e.min,e.max,i);It(e,t,s,o,n)}function ge(e,t){nn(e.x,t.x,t.scaleX,t.scale,t.originX),nn(e.y,t.y,t.scaleY,t.scale,t.originY)}function nr(e,t){return er(Il(e.getBoundingClientRect(),t))}function Bl(e,t,s){const n=nr(e,s),{scroll:i}=t;return i&&(pe(n.x,i.offset.x),pe(n.y,i.offset.y)),n}const rn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ye=()=>({x:rn(),y:rn()}),on=()=>({min:0,max:0}),E=()=>({x:on(),y:on()}),Ft={current:null},ir={current:!1};function Ol(){if(ir.current=!0,!!Gt)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ft.current=e.matches;e.addEventListener("change",t),t()}else Ft.current=!1}const Ul=new WeakMap;function $l(e,t,s){for(const n in t){const i=t[n],o=s[n];if(F(i))e.addValue(n,i);else if(F(o))e.addValue(n,ve(i,{owner:e}));else if(o!==i)if(e.hasValue(n)){const r=e.getValue(n);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(n);e.addValue(n,ve(r!==void 0?r:i,{owner:e}))}}for(const n in s)t[n]===void 0&&e.removeValue(n);return t}const an=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Kl{scrapeMotionValuesFromProps(t,s,n){return{}}constructor({parent:t,props:s,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=cs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=$.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,A.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=r;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=s,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=it(s),this.isVariantNode=Wi(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(s,{},this);for(const f in h){const m=h[f];c[f]!==void 0&&F(m)&&m.set(c[f])}}mount(t){this.current=t,Ul.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),ir.current||Ol(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ft.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),te(this.notifyUpdate),te(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=je.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=s.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&A.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in be){const s=be[t];if(!s)continue;const{isEnabled:n,Feature:i}=s;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):E()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<an.length;n++){const i=an[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=t[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=$l(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const n=this.values.get(t);s!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&s!==void 0&&(n=ve(s===null?void 0:s,{owner:this}),this.addValue(t,n)),n}readValue(t,s){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(qn(n)||Jn(n))?n=parseFloat(n):!qa(n)&&se.test(s)&&(n=Ei(t,s)),this.setBaseTarget(t,F(n)?n.get():n)),F(n)?n.get():n}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const o=bs(this.props,s,this.presenceContext?.custom);o&&(n=o[t])}if(s&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!F(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new Zt),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){hs.render(this.render)}}
9class rr extends Kl{constructor(){super(...arguments),this.KeyframeResolver=Ba}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){return t.style?t.style[s]:void 0}removeValueFromRenderState(t,{vars:s,style:n}){delete s[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;F(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function or(e,{style:t,vars:s},n,i){const o=e.style;let r;for(r in t)o[r]=t[r];i?.applyProjectionStyles(o,n);for(r in s)o.setProperty(r,s[r])}function Wl(e){return window.getComputedStyle(e)}class _l extends rr{constructor(){super(...arguments),this.type="html",this.renderInstance=or}readValueFromInstance(t,s){if(je.has(s))return this.projection?.isProjecting?Vt(s):na(t,s);{const n=Wl(t),i=(es(s)?n.getPropertyValue(s):n[s])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:s}){return nr(t,s)}build(t,s,n){ys(t,s,n.transformTemplate)}scrapeMotionValuesFromProps(t,s,n){return Ts(t,s,n)}}const ar=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function zl(e,t,s,n){or(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(ar.has(i)?i:ws(i),t.attrs[i])}class Gl extends rr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=E}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(je.has(s)){const n=Ri(s);return n&&n.default||0}return s=ar.has(s)?s:ws(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,n){return qi(t,s,n)}
vendor: 17,027 bytes, line 9
9build(t,s,n){Gi(t,s,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,s,n,i){zl(t,s,n,i)}mount(t){this.isSVGTag=Xi(t.tagName),super.mount(t)}}const Hl=(e,t)=>vs(e)?new Gl(t):new _l(t,{allowProjection:e!==y.Fragment});function xe(e,t,s){const n=e.getProps();return bs(n,t,s!==void 0?s:n.custom,e)}const Bt=e=>Array.isArray(e);function Xl(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,ve(s))}function Yl(e){return Bt(e)?e[e.length-1]||0:e}function ql(e,t){const s=xe(e,t);let{transitionEnd:n={},transition:i={},...o}=s||{};o={...o,...n};for(const r in o){const l=Yl(o[r]);Xl(e,r,l)}}function Zl(e){return!!(F(e)&&e.add)}function Ot(e,t){const s=e.getValue("willChange");if(Zl(s))return s.add(t);if(!s&&J.WillChange){const n=new J.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function lr(e){return e.props[Zi]}const Jl=e=>e!==null;function Ql(e,{repeat:t,repeatType:s="loop"},n){const i=e.filter(Jl),o=t&&s!=="loop"&&t%2===1?0:i.length-1;return i[o]}const ec={type:"spring",stiffness:500,damping:25,restSpeed:10},tc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sc={type:"keyframes",duration:.8},nc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ic=(e,{keyframes:t})=>t.length>2?sc:je.has(e)?e.startsWith("scale")?tc(t[1]):ec:nc;function rc({when:e,delay:t,delayChildren:s,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:l,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const js=(e,t,s,n={},i,o)=>r=>{const l=us(n,e)||{},c=l.delay||n.delay||0;let{elapsed:d=0}=n;d=d-Y(c);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{r(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};rc(l)||Object.assign(u,ic(e,u)),u.duration&&(u.duration=Y(u.duration)),u.repeatDelay&&(u.repeatDelay=Y(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Et(u),u.delay===0&&(h=!0)),(J.instantAnimations||J.skipAnimations)&&(h=!0,Et(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,h&&!o&&t.get()!==void 0){const f=Ql(u.keyframes,l);if(f!==void 0){A.update(()=>{u.onUpdate(f),u.onComplete()});return}}return l.isSync?new ls(u):new Na(u)};function oc({protectedKeys:e,needsAnimating:t},s){const n=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,n}function cr(e,t,{delay:s=0,transitionOverride:n,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...l}=t;n&&(o=n);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const u in l){const h=e.getValue(u,e.latestValues[u]??null),f=l[u];if(f===void 0||d&&oc(d,u))continue;const m={delay:s,...us(o||{},u)},p=h.get();if(p!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===p&&!m.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const g=lr(e);if(g){const T=window.MotionHandoffAnimation(g,u,A);T!==null&&(m.startTime=T,x=!0)}}Ot(e,u),h.start(js(u,h,f,e.shouldReduceMotion&&Ai.has(u)?{type:!1}:m,e,x));const b=h.animation;b&&c.push(b)}return r&&Promise.all(c).then(()=>{A.update(()=>{r&&ql(e,r)})}),c}function ur(e,t,s,n=0,i=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),r=e.size,l=(r-1)*n;return typeof s=="function"?s(o,r):i===1?o*n:l-o*n}function Ut(e,t,s={}){const n=xe(e,t,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(i=s.transitionOverride);const o=n?()=>Promise.all(cr(e,n,s)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:h}=i;return ac(e,t,c,d,u,h,s)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,d]=l==="beforeChildren"?[o,r]:[r,o];return c().then(()=>d())}else return Promise.all([o(),r(s.delay)])}function ac(e,t,s=0,n=0,i=0,o=1,r){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(Ut(c,t,{...r,delay:s+(typeof n=="function"?0:n)+ur(e.variantChildren,c,n,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function lc(e,t,s={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(o=>Ut(e,o,s));n=Promise.all(i)}else if(typeof t=="string")n=Ut(e,t,s);else{const i=typeof t=="function"?xe(e,t,s.custom):t;n=Promise.all(cr(e,i,s))}return n.then(()=>{e.notify("AnimationComplete",t)})}function dr(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let n=0;n<s;n++)if(t[n]!==e[n])return!1;return!0}const cc=gs.length;function hr(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?hr(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<cc;s++){const n=gs[s],i=e.props[n];(Ee(i)||i===!1)&&(t[n]=i)}return t}const uc=[...ps].reverse(),dc=ps.length;function hc(e){return t=>Promise.all(t.map(({animation:s,options:n})=>lc(e,s,n)))}function fc(e){let t=hc(e),s=ln(),n=!0;const i=c=>(d,u)=>{const h=xe(e,u,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:m,...p}=h;d={...d,...p,...m}}return d};function o(c){t=c(e)}function r(c){const{props:d}=e,u=hr(e.parent)||{},h=[],f=new Set;let m={},p=1/0;for(let b=0;b<dc;b++){const g=uc[b],T=s[g],v=d[g]!==void 0?d[g]:u[g],P=Ee(v),w=g===c?T.isActive:null;w===!1&&(p=b);let N=v===u[g]&&v!==d[g]&&P;if(N&&n&&e.manuallyAnimateOnMount&&(N=!1),T.protectedKeys={...m},!T.isActive&&w===null||!v&&!T.prevProp||nt(v)||typeof v=="boolean")continue;const C=mc(T.prevProp,v);let S=C||g===c&&T.isActive&&!N&&P||b>p&&P,k=!1;const B=Array.isArray(v)?v:[v];let Q=B.reduce(i(g),{});w===!1&&(Q={});const{prevResolvedValues:Ss={}}=T,Cr={...Ss,...Q},Ps=L=>{S=!0,f.has(L)&&(k=!0,f.delete(L)),T.needsAnimating[L]=!0;const K=e.getValue(L);K&&(K.liveStyle=!1)};for(const L in Cr){const K=Q[L],ie=Ss[L];if(m.hasOwnProperty(L))continue;let de=!1;Bt(K)&&Bt(ie)?de=!dr(K,ie):de=K!==ie,de?K!=null?Ps(L):f.add(L):K!==void 0&&f.has(L)?Ps(L):T.protectedKeys[L]=!0}T.prevProp=v,T.prevResolvedValues=Q,T.isActive&&(m={...m,...Q}),n&&e.blockInitialAnimation&&(S=!1);const Ns=N&&C;S&&(!Ns||k)&&h.push(...B.map(L=>{const K={type:g};if(typeof L=="string"&&n&&!Ns&&e.manuallyAnimateOnMount&&e.parent){const{parent:ie}=e,de=xe(ie,L);if(ie.enteringChildren&&de){const{delayChildren:Vr}=de.transition||{};K.delay=ur(ie.enteringChildren,e,Vr)}}return{animation:L,options:K}}))}if(f.size){const b={};if(typeof d.initial!="boolean"){const g=xe(e,Array.isArray(d.initial)?d.initial[0]:d.initial);g&&g.transition&&(b.transition=g.transition)}f.forEach(g=>{const T=e.getBaseTarget(g),v=e.getValue(g);v&&(v.liveStyle=!0),b[g]=T??null}),h.push({animation:b})}let x=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(x=!1),n=!1,x?t(h):Promise.resolve()}function l(c,d){if(s[c].isActive===d)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,d)),s[c].isActive=d;const u=r(c);for(const h in s)s[h].protectedKeys={};return u}return{animateChanges:r,setActive:l,setAnimateFunction:o,getState:()=>s,reset:()=>{s=ln()}}}function mc(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!dr(t,e):!1}function re(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ln(){return{animate:re(!0),whileInView:re(),whileHover:re(),whileTap:re(),whileDrag:re(),whileFocus:re(),exit:re()}}class ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}class pc extends ne{constructor(t){super(t),t.animationState||(t.animationState=fc(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();nt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let gc=0;class yc extends ne{constructor(){super(...arguments),this.id=gc++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);s&&!t&&i.then(()=>{s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const xc={animation:{Feature:pc},exit:{Feature:yc}};function Le(e,t,s,n={passive:!0}){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s)}function Oe(e){return{point:{x:e.pageX,y:e.pageY}}}const vc=e=>t=>fs(t)&&e(t,Oe(t));function Ve(e,t,s,n){return Le(e,t,vc(s),n)}const fr=1e-4,bc=1-fr,Tc=1+fr,mr=.01,wc=0-mr,jc=0+mr;function O(e){return e.max-e.min}function Sc(e,t,s){return Math.abs(e-t)<=s}function cn(e,t,s,n=.5){e.origin=n,e.originPoint=M(t.min,t.max,e.origin),e.scale=O(s)/O(t),e.translate=M(s.min,s.max,e.origin)-e.originPoint,(e.scale>=bc&&e.scale<=Tc||isNaN(e.scale))&&(e.scale=1),(e.translate>=wc&&e.translate<=jc||isNaN(e.translate))&&(e.translate=0)}function Ae(e,t,s,n){cn(e.x,t.x,s.x,n?n.originX:void 0),cn(e.y,t.y,s.y,n?n.originY:void 0)}function un(e,t,s){e.min=s.min+t.min,e.max=e.min+O(t)}function Pc(e,t,s){un(e.x,t.x,s.x),un(e.y,t.y,s.y)}function dn(e,t,s){e.min=t.min-s.min,e.max=e.min+O(t)}function et(e,t,s){dn(e.x,t.x,s.x),dn(e.y,t.y,s.y)}function W(e){return[e("x"),e("y")]}const pr=({current:e})=>e?e.ownerDocument.defaultView:null,hn=(e,t)=>Math.abs(e-t);function Nc(e,t){const s=hn(e.x,t.x),n=hn(e.y,t.y);return Math.sqrt(s**2+n**2)}class gr{constructor(t,s,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=gt(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=Nc(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:x}=f,{timestamp:b}=I;this.history.push({...x,timestamp:b});const{onStart:g,onMove:T}=this.handlers;m||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=pt(m,this.transformPagePoint),A.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:p,onSessionEnd:x,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=gt(f.type==="pointercancel"?this.lastMoveEventInfo:pt(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,g),x&&x(f,g)},!fs(t))return;this.dragSnapToOrigin=o,this.handlers=s,this.transformPagePoint=n,this.distanceThreshold=r,this.contextWindow=i||window;const l=Oe(t),c=pt(l,this.transformPagePoint),{point:d}=c,{timestamp:u}=I;this.history=[{...d,timestamp:u}];const{onSessionStart:h}=s;h&&h(t,gt(c,this.history)),this.removeListeners=Ie(Ve(this.contextWindow,"pointermove",this.handlePointerMove),Ve(this.contextWindow,"pointerup",this.handlePointerUp),Ve(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),te(this.updatePoint)}}function pt(e,t){return t?{point:t(e.point)}:e}function fn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gt({point:e},t){return{point:e,delta:fn(e,yr(t)),offset:fn(e,Cc(t)),velocity:Vc(t,.1)}}function Cc(e){return e[0]}function yr(e){return e[e.length-1]}function Vc(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,n=null;const i=yr(e);for(;s>=0&&(n=e[s],!(i.timestamp-n.timestamp>Y(t)));)s--;if(!n)return{x:0,y:0};const o=_(i.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ac(e,{min:t,max:s},n){return t!==void 0&&e<t?e=n?M(t,e,n.min):Math.max(e,t):s!==void 0&&e>s&&(e=n?M(s,e,n.max):Math.min(e,s)),e}function mn(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function Mc(e,{top:t,left:s,bottom:n,right:i}){return{x:mn(e.x,s,i),y:mn(e.y,t,n)}}function pn(e,t){let s=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,n]=[n,s]),{min:s,max:n}}function Dc(e,t){return{x:pn(e.x,t.x),y:pn(e.y,t.y)}}function Rc(e,t){let s=.5;const n=O(e),i=O(t);return i>n?s=Me(t.min,t.max-n,e.min):n>i&&(s=Me(e.min,e.max-i,t.min)),Z(0,1,s)}function Ec(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const $t=.35;function kc(e=$t){return e===!1?e=0:e===!0&&(e=$t),{x:gn(e,"left","right"),y:gn(e,"top","bottom")}}function gn(e,t,s){return{min:yn(e,t),max:yn(e,s)}}function yn(e,t){return typeof e=="number"?e:e[t]||0}const Lc=new WeakMap;class Ic{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=E(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(Oe(h).point)},r=(h,f)=>{const{drag:m,dragPropagation:p,onDragStart:x}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ka(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),W(g=>{let T=this.getAxisMotionValue(g).get()||0;if(q.test(T)){const{projection:v}=this.visualElement;if(v&&v.layout){const P=v.layout.layoutBox[g];P&&(T=O(P)*(parseFloat(T)/100))}}this.originPoint[g]=T}),x&&A.postRender(()=>x(h,f)),Ot(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:x,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:g}=f;if(p&&this.currentDirection===null){this.currentDirection=Fc(g),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),b&&b(h,f)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>W(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new gr(t,{onSessionStart:o,onStart:r,onMove:l,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:pr(this.visualElement)})}stop(t,s){const n=t||this.latestPointerEvent,i=s||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!n)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:l}=this.getProps();l&&A.postRender(()=>l(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(t,s,n){const{drag:i}=this.getProps();if(!n||!We(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=Ac(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&me(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Mc(n.layoutBox,t):this.constraints=!1,this.elastic=kc(s),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&W(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Ec(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!me(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Bl(n,i.root,this.visualElement.getTransformPagePoint());let r=Dc(i.layout.layoutBox,o);if(s){const l=s(Ll(r));this.hasMutatedConstraints=!!l,l&&(r=er(l))}return r}startAnimation(t){const{drag:s,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=W(u=>{if(!We(u,s,this.currentDirection))return;
vendor: 4,144 bytes, line 9
9let h=c&&c[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(d).then(l)}startAxisValueAnimation(t,s){const n=this.getAxisMotionValue(t);return Ot(this.visualElement,t),n.start(js(t,n,0,s,this.visualElement,!1))}stopAnimation(){W(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){W(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[s];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){W(s=>{const{drag:n}=this.getProps();if(!We(s,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(s);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[s];o.set(t[s]-M(r,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!me(s)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};W(r=>{const l=this.getAxisMotionValue(r);if(l&&this.constraints!==!1){const c=l.get();i[r]=Rc({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),W(r=>{if(!We(r,t,null))return;const l=this.getAxisMotionValue(r),{min:c,max:d}=this.constraints[r];l.set(M(c,d,i[r]))})}addListeners(){if(!this.visualElement.current)return;Lc.set(this.visualElement,this);const t=this.visualElement.current,s=Ve(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();me(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),A.read(n);const r=Le(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(W(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())}));return()=>{r(),s(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=$t,dragMomentum:l=!0}=t;return{...t,drag:s,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:l}}}function We(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function Fc(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class Bc extends ne{constructor(t){super(t),this.removeGroupControls=z,this.removeListeners=z,this.controls=new Ic(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}unmount(){this.removeGroupControls(),this.removeListeners()}}const xn=e=>(t,s)=>{e&&A.postRender(()=>e(t,s))};class Oc extends ne{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(t){this.session=new gr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:xn(t),onStart:xn(s),onMove:n,onEnd:(o,r)=>{delete this.session,i&&A.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ve(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const He={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function vn(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Se={correct:(e,t)=>
vendor: 5,283 bytes, line 9
9{if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;const s=vn(e,t.target.x),n=vn(e,t.target.y);return`${s}% ${n}%`}},Uc={correct:(e,{treeScale:t,projectionDelta:s})=>{const n=e,i=se.parse(e);if(i.length>5)return n;const o=se.createTransformer(e),r=typeof i[0]!="number"?1:0,l=s.x.scale*t.x,c=s.y.scale*t.y;i[0+r]/=l,i[1+r]/=c;const d=M(l,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=d),typeof i[3+r]=="number"&&(i[3+r]/=d),o(i)}};let yt=!1;class $c extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;cl(Kc),o&&(s.group&&s.group.add(o),n&&n.register&&i&&n.register(o),yt&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),He.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:n,drag:i,isPresent:o}=this.props,{projection:r}=n;return r&&(r.isPresent=o,yt=!0,i||t.layoutDependency!==s||s===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||A.postRender(()=>{const l=r.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),hs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:i}=t;yt=!0,i&&(i.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xr(e){const[t,s]=Ui(),n=y.useContext(_t);return a.jsx($c,{...e,layoutGroup:n,switchLayoutGroup:y.useContext(Ji),isPresent:t,safeToRemove:s})}const Kc={borderRadius:{...Se,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomLeftRadius:Se,borderBottomRightRadius:Se,boxShadow:Uc};function Wc(e,t,s){const n=F(e)?e:ve(e);return n.start(js("",n,t,s)),n.animation}const _c=(e,t)=>e.depth-t.depth;class zc{constructor(){this.children=[],this.isDirty=!1}add(t){Ht(this.children,t),this.isDirty=!0}remove(t){Xt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_c),this.isDirty=!1,this.children.forEach(t)}}function Gc(e,t){const s=$.now(),n=({timestamp:i})=>{const o=i-s;o>=t&&(te(n),e(o-t))};return A.setup(n,!0),()=>te(n)}const vr=["TopLeft","TopRight","BottomLeft","BottomRight"],Hc=vr.length,bn=e=>typeof e=="string"?parseFloat(e):e,Tn=e=>typeof e=="number"||j.test(e);function Xc(e,t,s,n,i,o){i?(e.opacity=M(0,s.opacity??1,Yc(n)),e.opacityExit=M(t.opacity??1,0,qc(n))):o&&(e.opacity=M(t.opacity??1,s.opacity??1,n));for(let r=0;r<Hc;r++){const l=`border${vr[r]}Radius`;let c=wn(t,l),d=wn(s,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Tn(c)===Tn(d)?(e[l]=Math.max(M(bn(c),bn(d),n),0),(q.test(d)||q.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||s.rotate)&&(e.rotate=M(t.rotate||0,s.rotate||0,n))}function wn(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Yc=br(0,.5,oi),qc=br(.5,.95,z);function br(e,t,s){return n=>n<e?0:n>t?1:s(Me(e,t,n))}function jn(e,t){e.min=t.min,e.max=t.max}function H(e,t){jn(e.x,t.x),jn(e.y,t.y)}function Sn(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Pn(e,t,s,n,i){return e-=t,e=Qe(e,1/s,n),i!==void 0&&(e=Qe(e,1/i,n)),e}function Zc(e,t=0,s=1,n=.5,i,o=e,r=e){if(q.test(t)&&(t=parseFloat(t),t=M(r.min,r.max,t/100)-r.min),typeof t!="number")return;let l=M(o.min,o.max,n);e===o&&(l-=t),e.min=Pn(e.min,t,s,l,i),e.max=Pn(e.max,t,s,l,i)}function Nn(e,t,[s,n,i],o,r){Zc(e,t[s],t[n],t[i],t.scale,o,r)}const Jc=["x","scaleX","originX"],Qc=["y","scaleY","originY"];function Cn(e,t,s,n){Nn(e.x,t,Jc,s?s.x:void 0,n?n.x:void 0),Nn(e.y,t,Qc,s?s.y:void 0,n?n.y:void 0)}function Vn(e){return e.translate===0&&e.scale===1}function Tr(e){return Vn(e.x)&&Vn(e.y)}function An(e,t){return e.min===t.min&&e.max===t.max}function eu(e,t){return An(e.x,t.x)&&An(e.y,t.y)}function Mn(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wr(e,t){return Mn(e.x,t.x)&&Mn(e.y,t.y)}function Dn(e){return O(e.x)/O(e.y)}function Rn(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class tu{constructor(){this.members=[]}add(t){Ht(this.members,t),t.scheduleRender()}remove(t){if(Xt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(i=>t===i);if(s===0)return!1;let n;for(let i=s;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(t,s){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,s&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&n.hide()}}
vendor: 24,700 bytes, line 9
9exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:n}=t;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function su(e,t,s){let n="";const i=e.x.translate/t.x,o=e.y.translate/t.y,r=s?.z||0;if((i||o||r)&&(n=`translate3d(${i}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:f,skewX:m,skewY:p}=s;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),f&&(n+=`rotateY(${f}deg) `),m&&(n+=`skewX(${m}deg) `),p&&(n+=`skewY(${p}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const xt=["","X","Y","Z"],nu=1e3;let iu=0;function vt(e,t,s,n){const{latestValues:i}=t;i[e]&&(s[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function jr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=lr(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",A,!(i||o))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&jr(n)}function Sr({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(r={},l=t?.()){this.id=iu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(au),this.nodes.forEach(du),this.nodes.forEach(hu),this.nodes.forEach(lu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new zc)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Zt),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const c=this.eventHandlers.get(r);c&&c.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Oi(r)&&!Xa(r),this.instance=r;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;A.read(()=>{h=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,u&&u(),u=Gc(f,250),He.hasAnimatedSinceResize&&(He.hasAnimatedSinceResize=!1,this.nodes.forEach(Ln)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||d.getDefaultTransition()||yu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=d.getProps(),g=!this.targetLayout||!wr(this.targetLayout,m),T=!h&&f;if(this.options.layoutRoot||this.resumeFrom||T||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...us(p,"layout"),onPlay:x,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,T)}else h||Ln(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),te(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(fu),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(En);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(kn);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(uu),this.nodes.forEach(ru),this.nodes.forEach(ou)):this.nodes.forEach(kn),this.clearAllSnapshots();const l=$.now();I.delta=Z(0,1e3/60,l-I.timestamp),I.timestamp=l,I.isProcessing=!0,ot.update.process(I),ot.preRender.process(I),ot.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cu),this.sharedNodes.forEach(mu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,A.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){A.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=E(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Tr(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;r&&this.instance&&(l||oe(this.latestValues)||u)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return r&&(c=this.removeTransform(c)),xu(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return E();const l=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(vu))){const{scroll:d}=this.root;d&&(pe(l.x,d.offset.x),pe(l.y,d.offset.y))}return l}removeElementScroll(r){const l=E();if(H(l,r),this.scroll?.wasRoot)return l;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:h}=d;d!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&H(l,r),pe(l.x,u.offset.x),pe(l.y,u.offset.y))}return l}applyTransform(r,l=!1){const c=E();H(c,r);for(let d=0;d<this.path.length;d++){const u=this.path[d];!l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ge(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),oe(u.latestValues)&&ge(c,u.latestValues)}return oe(this.latestValues)&&ge(c,this.latestValues),c}removeTransform(r){const l=E();H(l,r);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!oe(d.latestValues))continue;Lt(d.latestValues)&&d.updateSnapshot();const u=E(),h=d.measurePageBox();H(u,h),Cn(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return oe(this.latestValues)&&Cn(l,this.latestValues),l}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=E(),this.targetWithTransforms=E()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Pc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):H(this.target,this.layout.layoutBox),sr(this.target,this.targetDelta)):H(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Lt(this.parent.latestValues)||tr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,l,c){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=E(),this.relativeTargetOrigin=E(),et(this.relativeTargetOrigin,l,c),H(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),l=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===I.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;H(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Fl(this.layoutCorrected,this.treeScale,this.path,l),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=E());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sn(this.prevProjectionDelta.x,this.projectionDelta.x),Sn(this.prevProjectionDelta.y,this.projectionDelta.y)),Ae(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Rn(this.projectionDelta.x,this.prevProjectionDelta.x)||!Rn(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ye(),this.projectionDelta=ye(),this.projectionDeltaWithTransform=ye()}setAnimationOrigin(r,l=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=ye();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=E(),m=c?c.source:void 0,p=this.layout?this.layout.source:void 0,x=m!==p,b=this.getStack(),g=!b||b.members.length<=1,T=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(gu));this.animationProgress=0;let v;this.mixTargetDelta=P=>{const w=P/1e3;In(h.x,r.x,w),In(h.y,r.y,w),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(et(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pu(this.relativeTarget,this.relativeTargetOrigin,f,w),v&&eu(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=E()),H(v,this.relativeTarget)),x&&(this.animationValues=u,Xc(u,d,this.latestValues,w,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(te(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=A.update(()=>{He.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ve(0)),this.currentAnimation=Wc(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),r.onUpdate&&r.onUpdate(l)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:u}=r;if(!(!l||!c||!d)){if(this!==r&&this.layout&&d&&Pr(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||E();const h=O(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+h;const f=O(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+f}H(l,c),ge(l,u),Ae(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new tu),this.sharedNodes.get(r).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&vt("z",r,d,this.animationValues);for(let u=0;u<xt.length;u++)vt(`rotate${xt[u]}`,r,d,this.animationValues),vt(`skew${xt[u]}`,r,d,this.animationValues);r.render();for(const u in d)r.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);r.scheduleRender()}applyProjectionStyles(r,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Ge(l?.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Ge(l?.pointerEvents)||""),this.hasProjected&&!oe(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=su(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),r.transform=h;const{x:f,y:m}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?r.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in ke){if(u[p]===void 0)continue;const{correct:x,applyTo:b,isCSSVariable:g}=ke[p],T=h==="none"?u[p]:x(u[p],d);if(b){const v=b.length;for(let P=0;P<v;P++)r[b[P]]=T}else g?this.options.visualElement.renderState.vars[p]=T:r[p]=T}this.options.layoutId&&(r.pointerEvents=d===this?Ge(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(En),this.root.sharedNodes.clear()}}}function ru(e){e.updateLayout()}function ou(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:n}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?W(u=>{const h=o?t.measuredBox[u]:t.layoutBox[u],f=O(h);h.min=s[u].min,h.max=h.min+f}):Pr(i,t.layoutBox,s)&&W(u=>{const h=o?t.measuredBox[u]:t.layoutBox[u],f=O(s[u]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const r=ye();Ae(r,s,t.layoutBox);const l=ye();o?Ae(l,e.applyTransform(n,!0),t.measuredBox):Ae(l,s,t.layoutBox);const c=!Tr(r);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const m=E();et(m,t.layoutBox,h.layoutBox);const p=E();et(p,s,f.layoutBox),wr(m,p)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:l,layoutDelta:r,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function au(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function lu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cu(e){e.clearSnapshot()}function En(e){e.clearMeasurements()}function kn(e){e.isLayoutDirty=!1}function uu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ln(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function du(e){e.resolveTargetDelta()}function hu(e){e.calcProjection()}function fu(e){e.resetSkewAndRotation()}function mu(e){e.removeLeadSnapshot()}function In(e,t,s){e.translate=M(t.translate,0,s),e.scale=M(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function Fn(e,t,s,n){e.min=M(t.min,s.min,n),e.max=M(t.max,s.max,n)}function pu(e,t,s,n){Fn(e.x,t.x,s.x,n),Fn(e.y,t.y,s.y,n)}function gu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yu={duration:.45,ease:[.4,0,.1,1]},Bn=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),On=Bn("applewebkit/")&&!Bn("chrome/")?Math.round:z;function Un(e){e.min=On(e.min),e.max=On(e.max)}function xu(e){Un(e.x),Un(e.y)}function Pr(e,t,s){return e==="position"||e==="preserve-aspect"&&!Sc(Dn(t),Dn(s),.2)}function vu(e){return e!==e.root&&e.scroll?.wasRoot}const bu=Sr({attachResizeListener:(e,t)=>Le(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bt={current:void 0},Nr=Sr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bt.current){const e=new bu({});e.mount(window),e.setOptions({layoutScroll:!0}),bt.current=e}return bt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Tu={pan:{Feature:Oc},drag:{Feature:Bc,ProjectionNode:Nr,MeasureLayout:xr}};function $n(e,t,s){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",s==="Start");const i="onHover"+s,o=n[i];o&&A.postRender(()=>o(t,Oe(t)))}class wu extends ne{mount(){const{current:t}=this.node;t&&(this.unmount=Wa(t,(s,n)=>($n(this.node,n,"Start"),i=>$n(this.node,i,"End"))))}unmount(){}}class ju extends ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ie(Le(this.node.current,"focus",()=>this.onFocus()),Le(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Kn(e,t,s){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",s==="Start");const i="onTap"+(s==="End"?"":s),o=n[i];o&&A.postRender(()=>o(t,Oe(t)))}class Su extends ne{mount(){const{current:t}=this.node;t&&(this.unmount=Ha(t,(s,n)=>(Kn(this.node,n,"Start"),(i,{success:o})=>Kn(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}
9const Kt=new WeakMap,Tt=new WeakMap,Pu=e=>{const t=Kt.get(e.target);t&&t(e)},Nu=e=>{e.forEach(Pu)};function Cu({root:e,...t}){const s=e||document;Tt.has(s)||Tt.set(s,{});const n=Tt.get(s),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(Nu,{root:e,...t})),n[i]}function Vu(e,t,s){const n=Cu(t);return Kt.set(e,s),n.observe(e),()=>{Kt.delete(e),n.unobserve(e)}}const Au={some:0,all:1};class Mu extends ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:n,amount:i="some",once:o}=t,r={root:s?s.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:Au[i]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=d?u:h;f&&f(c)};return Vu(this.node.current,r,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(Du(t,s))&&this.startObserver()}unmount(){}}function Du({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const Ru={inView:{Feature:Mu},tap:{Feature:Su},focus:{Feature:ju},hover:{Feature:wu}},Eu={layout:{ProjectionNode:Nr,MeasureLayout:xr}},ku={...xc,...Ru,...Tu,...Eu},V=kl(ku,Hl),U=[.22,1,.36,1],Lu=[{name:"TypedSelect",description:"Type-safe select with grouped options and custom rendering.",icon:zr,slug:"components/typed-select",features:["Full inference","Grouped options","Custom render"]},{name:"TypedCombobox",description:"Type-safe combobox with search and custom rendering.",icon:kr,slug:"components/typed-combobox",features:["Search/filter","Grouped options","Custom render"]},{name:"TypedRadioGroup",description:"Headless radio group with render props for complete control.",icon:Zr,slug:"components/typed-radio-group",features:["Render props","Headless design","Accessible"]}],Iu=["TypedCheckboxGroup","TypedTabs","TypedToggleGroup"],Fu={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.12,delayChildren:.1}}},Wn={hidden:{opacity:0,y:24},visible:{opacity:1,y:0,transition:{duration:.6,ease:U}}};function Bu(){return a.jsx("section",{className:"section",children:a.jsxs("div",{className:"container-wide",children:[a.jsxs(V.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.6,ease:U},className:"mb-12 text-center",children:[a.jsx("h2",{className:"text-title mb-4",children:"Available Components"}),a.jsx("p",{className:"text-body-large mx-auto max-w-2xl text-muted-foreground",children:"Production-ready components with complete TypeScript support."})]}),a.jsxs(V.div,{variants:Fu,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:[Lu.map(e=>a.jsx(V.div,{variants:Wn,children:a.jsxs(Xe,{to:"/docs/$",params:{_splat:e.slug},className:"group relative block h-full overflow-hidden rounded-2xl border border-border bg-card p-8 transition-all hover:-translate-y-1 hover:shadow-lg",children:[a.jsx("div",{className:"mb-6 flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10",children:a.jsx(e.icon,{className:"h-7 w-7 text-primary"})}),a.jsx("h3",{className:"mb-2 text-xl font-semibold",children:e.name}),a.jsx("p",{className:"mb-6 text-muted-foreground",children:e.description}),a.jsx("div",{className:"mb-6 flex flex-wrap gap-2",children:e.features.map(t=>a.jsx("span",{className:"rounded-full bg-muted px-3 py-1 text-xs font-medium text-muted-foreground",children:t},t))}),a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-primary",children:["View Documentation",a.jsx(Gn,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})]})},e.name)),a.jsx(V.div,{variants:Wn,children:a.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden rounded-2xl border border-dashed border-border bg-muted/30 p-8",children:[a.jsx("div",{className:"mb-6 flex h-14 w-14 items-center justify-center rounded-2xl border-2 border-dashed border-border bg-background",children:a.jsx(Hr,{className:"h-7 w-7 text-muted-foreground"})}),a.jsx("h3",{className:"mb-2 text-xl font-semibold text-muted-foreground",children:"And More Coming..."}),a.jsx("p",{className:"mb-6 text-muted-foreground",children:"We're building more type-safe components for your projects."}),a.jsx("div",{className:"mb-6 flex flex-wrap gap-2",children:Iu.map(e=>a.jsx("span",{className:"rounded-full border border-border bg-background px-3 py-1 text-xs font-medium text-muted-foreground",children:e},e))}),a.jsx("div",{className:"flex-1"}),a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[a.jsxs("span",{className:"relative flex h-2 w-2",children:[a.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-75"}),a.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-primary"})]}),"In Development"]})]})})]})]})})}const Ou=[{icon:Wt,title:"Full Type Inference",description:"TypeScript automatically infers types from your options array. No manual type annotations needed."},{icon:$r,title:"Zero Runtime Cost",description:"All type checking happens at compile time. No extra bundle size or performance overhead."},{icon:Yr,title:"shadcn/ui Compatible",description:"Drop-in replacements that work seamlessly with your existing shadcn/ui setup."}
9,{icon:Hn,title:"Copy & Own",description:"No dependencies to worry about. Copy the source code and customize it to your needs."}],Uu={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.1}}},$u={hidden:{opacity:0,y:24},visible:{opacity:1,y:0,transition:{duration:.6,ease:U}}};function Ku(){return a.jsx("section",{className:"section border-t border-border bg-muted/30",children:a.jsxs("div",{className:"container-wide",children:[a.jsxs(V.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.6,ease:U},className:"mb-12 text-center",children:[a.jsx("h2",{className:"text-title mb-4",children:"Why Type-Safe Components?"}),a.jsx("p",{className:"text-body-large mx-auto max-w-2xl text-muted-foreground",children:"Stop fighting with TypeScript and let it work for you."})]}),a.jsx(V.div,{variants:Uu,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-4",children:Ou.map(e=>a.jsxs(V.div,{variants:$u,className:"group rounded-2xl border border-border bg-card p-6 transition-all hover:-translate-y-1 hover:shadow-lg",children:[a.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 transition-colors group-hover:bg-primary/20",children:a.jsx(e.icon,{className:"h-6 w-6 text-primary"})}),a.jsx("h3",{className:"mb-2 font-semibold",children:e.title}),a.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:e.description})]},e.title))})]})})}function Wu({className:e}){return a.jsx("svg",{role:"img","aria-label":"GitHub",viewBox:"0 0 24 24",className:e,fill:"
9currentColor",children:a.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}function _u(){return a.jsx(V.footer,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6,ease:U},className:"border-t border-border py-12",children:a.jsxs("div",{className:"container-narrow",children:[a.jsxs("div",{className:"flex flex-col items-center justify-between gap-6 sm:flex-row",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-md bg-primary text-primary-foreground",children:a.jsx(Wt,{className:"h-3.5 w-3.5"})}),a.jsx("span",{className:"font-semibold",children:Ar.name})]}),a.jsxs("div",{className:"flex items-center gap-6 text-sm text-muted-foreground",children:[a.jsx(Xe,{to:"/docs/$",params:{_splat:""},className:"transition-colors hover:text-foreground",children:"Documentation"}),a.jsx("a",{href:Cs.shadcnUi,target:"_blank",rel:"noopener noreferrer",className:"transition-colors hover:text-foreground",children:"shadcn/ui"}),a.jsxs("a",{href:Cs.github,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 transition-colors hover:text-foreground",children:[a.jsx(Wu,{className:"h-4 w-4"}),"GitHub"]})]})]}),a.jsx("div",{className:"mt-8 text-center text-sm text-muted-foreground",children:"Built with care for TypeScript developers."})]})})}function zu(){return a.jsxs("section",{className:"relative flex min-h-[85vh] items-center justify-center overflow-hidden pt-16",children:[a.jsx(V.div,{initial:{opacity:0}
9,animate:{opacity:1},transition:{duration:1.2},className:"pointer-events-none absolute inset-0 bg-gradient-to-b from-primary/10 via-primary/5 to-transparent dark:from-primary/8 dark:via-primary/4"}),a.jsx(V.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:1.5,ease:"easeOut"},className:"pointer-events-none absolute -left-40 -top-40 h-[500px] w-[500px] rounded-full bg-primary/15 blur-[100px] dark:bg-primary/8"}),a.jsx(V.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:1.5,ease:"easeOut",delay:.2},className:"pointer-events-none absolute -right-40 top-20 h-[400px] w-[400px] rounded-full bg-primary/12 blur-[100px] dark:bg-primary/6"}),a.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-32 bg-gradient-to-t from-background to-transparent"}),a.jsxs("div",{className:"container-narrow relative z-10 text-center",children:[a.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:U,delay:0},className:"mb-6 inline-flex items-center gap-2 rounded-full border border-border bg-secondary/50 px-4 py-1.5 text-sm font-medium text-muted-foreground backdrop-blur-sm",children:[a.jsx(Wt,{className:"h-4 w-4 text-primary"}),a.jsx("span",{children:"Type-Safe shadcn/ui Extension"})]}),a.jsxs(V.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:U,delay:.1},className:"text-display mb-6",children:[a.jsx("span",{className:"inline-block bg-gradient-to-r from-orange-400 via-orange-500 to-red-500 bg-clip-text text-transparent",children:"Never guess types"}),a.jsx("br",{}),a.jsx("span",{children:"again."})]}),a.jsx(V.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:U,delay:.2},className:"text-body-large mx-auto mb-8 max-w-2xl text-muted-foreground",children:"Full TypeScript inference for your React components. Drop-in replacements for shadcn/ui with zero runtime cost."}),a.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:U,delay:.3},className:"mb-12 flex flex-col items-center justify-center gap-4 sm:flex-row",children:[a.jsxs(Xe,{to:"/docs/$",params:{_splat:""},className:"group inline-flex h-12 items-center gap-2 rounded-xl bg-primary px-6 font-medium text-primary-foreground transition-all hover:scale-[1.02] hover:opacity-90 active:scale-[0.98]",children:["Get Started",a.jsx(Gn,{className:"h-4 w-4 transition-transform group-hover:translate-x-0.5"})]}),a.jsx(Xe,{to:"/docs/$",params:{_splat:"components/typed-select"},className:"inline-flex h-12 items-center gap-2 rounded-xl border border-border bg-secondary/50 px-6 font-medium transition-all hover:scale-[1.02] hover:bg-secondary active:scale-[0.98]",children:"View Components"})]})]})]})}const _n=[{name:"typed-select",label:"TypedSelect"},{name:"typed-radio-group",label:"TypedRadioGroup"}],Gu=(e,t)=>{const s=`${Dr.baseUrl}/${t}.json`;switch(e){case"npm":return`npx shadcn@latest add ${s}`;case"pnpm":return`pnpm dlx shadcn@latest add ${s}`;case"yarn":return`npx shadcn@latest add ${s}`;case"bun":return`bunx --bun shadcn@latest add ${s}`;default:return`npx shadcn@latest add ${s}`}},Hu=["npm","pnpm","yarn","bun"];function Xu(){const[e,t]=y.useState("npm"),[s,n]=y.useState("typed-select"),[i,o]=y.useState(!1),[r,l]=y.useState(!1),c=Gu(e,s),d=async()=>{await navigator.clipboard.writeText(c),o(!0),setTimeout(()=>o(!1),2e3)},u=_n.find(h=>h.name===s)?.label;return a.jsxs(V.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.6,ease:U},className:"mx-auto max-w-2xl",children:[a.jsxs("div",{className:"mb-3 flex items-center justify-center gap-2",children:[a.jsx("span",{className:"text-sm font-medium text-foreground/70",children:"Install component:"}),a.jsxs("div",{className:"relative",children:[a.jsxs("button",{type:"button",onClick:()=>l(!r),className:"inline-flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-1.5 text-sm font-medium transition-colors hover:bg-muted",children:[u,a.jsx(V.span,{animate:{rotate:r?180:0},transition:{duration:.2},children:a.jsx(Mr,{className:"h-4 w-4 text-muted-foreground"})})]}),a.jsx(ht,{children:r&&a.jsx(V.div,{initial:{opacity:0,y:-8}
9,animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2},className:"absolute left-0 top-full z-10 mt-1 min-w-[160px] overflow-hidden rounded-lg border border-border bg-card shadow-lg",children:_n.map(h=>a.jsx("button",{type:"button",onClick:()=>{n(h.name),l(!1)},className:`block w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted ${s===h.name?"bg-muted font-medium":""}`,children:h.label},h.name))})})]})]}),a.jsxs("div",{className:"overflow-hidden rounded-xl border border-border bg-card shadow-sm",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-border bg-muted/30 px-1 py-1",children:[a.jsx("div",{className:"flex gap-1",children:Hu.map(h=>a.jsxs("button",{type:"button",onClick:()=>t(h),className:`relative rounded-lg px-3 py-1.5 text-sm font-medium transition-colors ${e===h?"text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[e===h&&a.jsx(V.div,{layoutId:"activeTab",className:"absolute inset-0 rounded-lg bg-background shadow-sm",transition:{type:"spring",bounce:.15,duration:.5}}),a.jsx("span",{className:"relative z-10",children:h})]},h))}),a.jsx("button",{type:"button",onClick:d,className:"flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-background hover:text-foreground",children:a.jsx(ht,{mode:"wait",children:i?a.jsxs(V.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"flex items-center gap-1.5 text-green-500",children:[a.jsx(he,{className:"h-4 w-4"}),a.jsx("span",{children:"Copied!"})]},"copied"):a.jsxs(V.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"flex items-center gap-1.5",children:[a.jsx(Xn,{className:"h-4 w-4"}),a.jsx("span",{children:"Copy"})]},"copy")})})]}),a.jsx("div",{className:"overflow-x-auto p-4",children:a.jsxs("code",{className:"whitespace-nowrap font-mono text-sm",children:[a.jsx("span",{className:"text-muted-foreground",children:"$ "}),a.jsx(ht,{mode:"wait",children:a.jsx(V.span,{initial:{opacity:0}
9,animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:c},c)})]})})]})]})}const Yu=[{icon:Wr,title:"Type-Safety First",description:"Every component provides full TypeScript inference"},{icon:Hn,title:"Headless by Design",description:"Use render props for complete control over rendering"},{icon:Fr,title:"shadcn Compatible",description:"Drop-in replacements that work with your existing setup"},{icon:Xn,title:"Zero Lock-in",description:"Copy the source code, own your components"}],qu={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.08,delayChildren:.1}}},Zu={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:U}}};function Ju(){return a.jsx("section",{className:"section border-t border-border bg-muted/30",children:a.jsxs("div",{className:"container-narrow",children:[a.jsxs(V.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.6,ease:U},className:"mb-12 text-center",children:[a.jsx("h2",{className:"text-title mb-4",children:"Our Philosophy"}),a.jsx("p",{className:"text-body-large mx-auto max-w-2xl text-muted-foreground",children:"Built with principles that put developers first."})]}),a.jsx(V.div,{variants:qu,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},className:"grid gap-4 sm:grid-cols-2",children:Yu.map((e,t)=>a.jsxs(V.div,{variants:Zu,className:"flex items-start gap-4 roun
9ded-xl border border-border bg-card p-5",children:[a.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:a.jsx(e.icon,{className:"h-5 w-5 text-primary"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[a.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:String(t+1).padStart(2,"0")}),a.jsx("h3",{className:"font-semibold",children:e.title})]}),a.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]})]},e.title))})]})})}function Qu({children:e,label:t,type:s}){return a.jsxs("span",{className:"twoslash-hover relative inline",children:[a.jsx("span",{className:"twoslash-target",children:e}),a.jsxs("span",{className:"twoslash-popup absolute left-1/2 top-full z-10 mt-3 block w-max -translate-x-1/2 rounded-xl border border-border bg-fd-popover px-4 py-2 font-mono text-sm shadow-xl",children:[a.jsx("span",{className:"twoslash-arrow absolute -top-[6px] left-1/2 h-3 w-3 -translate-x-1/2 rotate-45 border-l border-t border-border bg-fd-popover"}),a.jsx("span",{className:"text-purple-400",children:t}),a.jsx("span",{className:"text-fd-popover-foreground",children:": "}),a.jsx("span",{className:"text-blue-400",children:s})]})]})}const ed={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.15,delayChildren:.1}}},zn={hidden:{opacity:0,y:24},visible:{opacity:1,y:0,transition:{duration:.6,ease:U}}};function td(){const[e,t]=y.useState(null);return a.jsxs("div",{className:"mx-auto max-w-5xl px-4",children:[a.jsxs(V.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.6,ease:U},className:"mb-8 text-center",children:[a.jsx("h2",{className:"text-title mb-3",children:"The Problem with shadcn/ui Select"}),a.jsx("p",{className:"text-muted-foreground",children:"See why type-safe components make a difference"})]}),a.jsxs(V.div,{variants:ed,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},className:"grid gap-6 lg:grid-cols-2",children:[a.jsxs(V.div,{variants:zn,className:"relative flex flex-col overflow-hidden rounded-2xl border-2 border-red-500/30 bg-card",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-border bg-red-500/5 px-5 py-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-red-500/10",children:a.jsx(Vs,{className:"h-3.5 w-3.5 text-red-500"})}),a.jsx("span",{className:"font-medium",children:"shadcn/ui Select"})]}),a.jsx("span",{className:"rounded-full bg-red-500/10 px-2.5 py-0.5 text-xs font-medium text-red-500",children:"Type Unsafe"})]}),a.jsxs("div",{className:"flex flex-1 flex-col space-y-4 p-5",children:[a.jsxs("div",{className:"rounded-xl bg-muted/50 p-4",children:[a.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-medium text-red-500",children:[a.jsx(rt,{className:"h-3.5 w-3.5"}),"SelectItem only accepts string values"]}),a.jsx("pre",{className:"overflow-x-auto font-mono text-xs leading-relaxed",children:a.jsxs("code",{children:[a.jsx("span",{className:"text-muted-foreground",children:`// Your data has number IDs
10`}),a.jsx("span",{className:"text-blue-400",children:"const"}),a.jsx("span",{className:"text-foreground",children:" users"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-yellow-400",children:"Users"}),a.jsx("span",{className:"text-foreground",children:" = ["}),`
11`,a.jsx("span",{className:"text-foreground",children:"  { "}),a.jsx("span",{className:"text-purple-400",children:"id"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-orange-400",children:"1"}),a.jsx("span",{className:"text-foreground",children:", "}),a.jsx("span",{className:"text-purple-400",children:"name"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-green-400",children:'"Alice"'}),a.jsx("span",{className:"text-foreground",children:" },"}),`
12`,a.jsx("span",{className:"text-foreground",children:"  { "}),a.jsx("span",{className:"text-purple-400",children:"id"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-orange-400",children:"2"}),a.jsx("span",{className:"text-foreground",children:", "}),a.jsx("span",{className:"text-purple-400",children:"name"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-green-400",children:'"Bob"'}),a.jsx("span",{className:"text-foreground",children:" },"}),`
13`,a.jsx("span",{className:"text-foreground",children:"];"})]})})]}),a.jsxs("div",{className:"rounded-xl bg-muted/50 p-4",children:[a.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-medium text-red-500",children:[a.jsx(rt,{className:"h-3.5 w-3.5"}),"Must convert everything to string"]}),a.jsx("pre",{className:"overflow-x-auto font-mono text-xs leading-relaxed",children:a.jsxs("code",{children:[a.jsx("span",{className:"text-foreground",children:"<"}),a.jsx("span",{className:"text-blue-400",children:"SelectItem"}),`
14`,a.jsx("span",{className:"text-foreground",children:"  "}),a.jsx("span",{className:"text-purple-400",children:"key"}),a.jsx("span",{className:"text-foreground",children:"="}),a.jsxs("span",{className:"text-foreground",children:["{","user.id","}"]}),`
15`,a.jsx("span",{className:"text-foreground",children:"  "}),a.jsx("span",{className:"text-purple-400",children:"value"}),a.jsx("span",{className:"text-foreground",children:"="}),a.jsxs("span",{className:"text-foreground",children:["{","String(user.id)","}"]}),a.jsx("span",{className:"text-muted-foreground",children:' // "1", "2"'}),`
16`,a.jsx("span",{className:"text-foreground",children:">"}),`
17`,a.jsxs("span",{className:"text-foreground",children:["  ","{","user.name","}"]}),`
18`,a.jsx("span",{className:"text-foreground",children:"</"}),a.jsx("span",{className:"text-blue-400",children:"SelectItem"}),a.jsx("span",{className:"text-foreground",children:">"})]})})]}),a.jsxs("div",{className:"rounded-xl bg-muted/50 p-4",children:[a.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-medium text-red-500",children:[a.jsx(rt,{className:"h-3.5 w-3.5"}),"onValueChange always returns string"]}),a.jsx("pre",{className:"overflow-x-auto font-mono text-xs leading-relaxed",children:a.jsxs("code",{children:[a.jsx("span",{className:"text-purple-400",children:"onValueChange"}),a.jsx("span",{className:"text-foreground",children:"="}),a.jsxs("span",{className:"text-foreground",children:["{","("]}),a.jsx("span",{className:"text-orange-400",children:"value"}),a.jsxs("span",{className:"text-foreground",children:[") =","> {"]}),`
19`,a.jsx("span",{className:"text-muted-foreground",children:`  // value: string - type info lost!
20`}),a.jsx("span",{className:"text-foreground",children:"  "}),a.jsx("span",{className:"text-blue-400",children:"const"}),a.jsx("span",{className:"text-foreground",children:" userId = "}),a.jsx("span",{className:"text-yellow-400",children:"Number"}),a.jsx("span",{className:"text-foreground",children:"(value);"}),`
21`,a.jsx("span",{className:"text-muted-foreground",children:`  // Could be NaN, no type error!
22`}),a.jsx("span",{className:"text-foreground",children:"}}"})]})})]}),a.jsx("div",{className:"flex-1"}),a.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-red-500/20 bg-red-500/5 p-4",children:[a.jsx(Vs,{className:"mt-0.5 h-5 w-5 shrink-0 text-red-500"}),a.jsxs("div",{className:"text-sm",children:[a.jsx("div",{className:"mb-1 font-medium text-red-500",children:"Type information completely lost"}),a.jsx("div",{className:"text-muted-foreground",children:"Manual string conversion, runtime parsing, potential bugs."})]})]})]})]}),a.jsxs(V.div,{variants:zn,className:"relative flex flex-col overflow-hidden rounded-2xl border-2 border-green-500/30 bg-card",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-border bg-green-500/5 px-5 py-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-green-500/10",children:a.jsx(he,{className:"h-3.5 w-3.5 text-green-500"})}),a.jsx("span",{className:"font-medium",children:"TypedSelect"})]}),a.jsx("span",{className:"rounded-full bg-green-500/10 px-2.5 py-0.5 text-xs font-medium text-green-500",children:"Type Safe"})]}),a.jsxs("div",{className:"flex flex-1 flex-col space-y-4 p-5",children:[a.jsxs("div",{className:"rounded-xl bg-muted/50 p-4",children:[a.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-medium text-green-500",children:[a.jsx(he,{className:"h-3.5 w-3.5"}),"Use your data directly with valueKey/labelKey"]}),a.jsx("pre",{className:"overflow-x-auto font-mono text-xs leading-relaxed",children:a.jsxs("code",{children:[a.jsx("span",{className:"text-muted-foreground",children:`// 
22Same data structure
23`}),a.jsx("span",{className:"text-blue-400",children:"const"}),a.jsx("span",{className:"text-foreground",children:" users"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-yellow-400",children:"Users"}),a.jsx("span",{className:"text-foreground",children:" = ["}),`
24`,a.jsx("span",{className:"text-foreground",children:"  { "}),a.jsx("span",{className:"text-purple-400",children:"id"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-orange-400",children:"1"}),a.jsx("span",{className:"text-foreground",children:", "}),a.jsx("span",{className:"text-purple-400",children:"name"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-green-400",children:'"Alice"'}),a.jsx("span",{className:"text-foreground",children:" },"}),`
25`,a.jsx("span",{className:"text-foreground",children:"  { "}),a.jsx("span",{className:"text-purple-400",children:"id"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-orange-400",children:"2"}),a.jsx("span",{className:"text-foreground",children:", "}),a.jsx("span",{className:"text-purple-400",children:"name"}),a.jsx("span",{className:"text-foreground",children:": "}),a.jsx("span",{className:"text-green-400",children:'"Bob"'}),a.jsx("span",{className:"text-foreground",children:" },"}),`
26`,a.jsx("span",{className:"text-foreground",children:"];"})]})})]}),a.jsxs("div",{className:"rounded-xl bg-muted/50 p-4",children:[a.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-medium text-green-500",children:[a.jsx(he,{className:"h-3.5 w-3.5"}),"No string conversion needed"]}),a.jsx("pre",{className:"overflow-x-auto font-mono text-xs leading-relaxed",children:a.jsxs("code",{children:[a.jsx("span",{className:"text-foreground",children:"<"}),a.jsx("span",{className:"text-blue-400",children:"TypedSelect"}),`
27`,a.jsx("span",{className:"text-foreground",children:"  "}),a.jsx("span",{className:"text-purple-400",children:"options"}),a.jsx("span",{className:"text-foreground",children:"="}),a.jsxs("span",{className:"text-foreground",children:["{","users","}"]}),`
28`,a.jsx("span",{className:"text-foreground",children:"  "}),a.jsx("span",{className:"text-purple-400",children:"valueKey"}),a.jsx("span",{className:"text-foreground",children:"="}),a.jsx("span",{className:"text-green-400",children:'"id"'}),`
29`,a.jsx("span",{className:"text-foreground",children:"  "}),a.jsx("span",{className:"text-purple-400",children:"labelKey"}),a.jsx("span",{className:"text-foreground",children:"="}),a.jsx("span",{className:"text-green-400",children:'"name"'}),`
30`,a.jsx("span",{className:"text-foreground",children:"  "}),a.jsx("span",{className:"text-purple-400",children:"onValueChange"}),a.jsx("span",{className:"text-foreground",children:"="}),a.jsxs("span",{className:"text-foreground",children:["{","setUserId","}"]}),`
31`,a.jsx("span",{className:"text-foreground",children:"/>"})]})})]}),a.jsxs("div",{className:"rounded-xl bg-muted/50 p-4 pb-16",children:[a.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-medium text-green-500",children:[a.jsx(he,{className:"h-3.5 w-3.5"}),"onValueChange receives the exact type"]}),a.jsx("pre",{className:"font-mono text-xs leading-relaxed",children:a.jsxs("code",{children:[a.jsx("span",{className:"text-purple-400",children:"onValueChange"}),a.jsx("span",{className:"text-foreground",children:"="}),a.jsxs("span",{className:"text-foreground",children:["{","("]}),a.jsx(Qu,{label:"value",type:"number",children:a.jsx("span",{className:"text-orange-400",children:"value"})}),a.jsxs("span",{className:"text-foreground",children:[") =","> {"]}),`
32`,a.jsxs("span",{className:"text-foreground",children:["  ","..."]}),`
33`,a.jsx("span",{className:"text-foreground",children:"}}"})]})})]}),a.jsx("div",{className:"flex-1"}),a.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-green-500/20 bg-green-500/5 p-4",children:[a.jsx(he,{className:"mt-0.5 h-5 w-5 shrink-0 text-green-500"}),a.jsxs("div",{className:"text-sm",children:[a.jsx("div",{className:"mb-1 font-medium text-green-500",children:"Full type inference preserved"}),a.jsx("div",{className:"text-muted-foreground",children:"Works with number, boolean, string. Errors caught at compile time."})]})]})]})]})]}),a.jsxs(V.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.6,ease:U,delay:.2},className:"mt-8 rounded-2xl border border-border bg-card p-6",children:[a.jsxs("div",{className:"mb-4 text-center",children:[a.jsx("h3",{className:"mb-1 font-semibold",children:"Try the difference"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Select a user ID and see how TypeScript infers the type"})]}),a.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[[1,2,3].map(s=>a.jsxs(V.button,{type:"button",onClick:()=>t(String(s)),whileHover:{scale:1.05},whileTap:{scale:.95},className:`rounded-xl px-4 py-2 text-sm font-medium transition-colors ${e===String(s)?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,children:["User ",s]},s)),e&&a.jsx(V.button,{type:"button",onClick:()=>t(null),whileHover:{scale:1.05},whileTap:{scale:.95},className:"rounded-xl px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground",children:"Clear"})]}),e&&a.jsxs(V.div,{initial:{opacity:0,y:10}
33,animate:{opacity:1,y:0},transition:{duration:.3},className:"mt-4 flex flex-col items-center gap-2 sm:flex-row sm:justify-center sm:gap-6",children:[a.jsxs("code",{className:"rounded-lg bg-red-500/10 px-3 py-1.5 font-mono text-sm text-red-500",children:["shadcn: ",a.jsxs("span",{className:"opacity-70",children:['"',e,'"']})," ",a.jsx("span",{className:"text-xs opacity-50",children:"(string)"})]}),a.jsx("span",{className:"text-muted-foreground",children:"vs"}),a.jsxs("code",{className:"rounded-lg bg-green-500/10 px-3 py-1.5 font-mono text-sm text-green-500",children:["Typedora: ",a.jsx("span",{className:"opacity-90",children:e})," ",a.jsx("span",{className:"text-xs opacity-50",children:"(number literal)"})]})]})]})]})}function od(){return a.jsx(Rr,{...Er(),children:a.jsxs("main",{className:"flex flex-1 flex-col",children:[a.jsx(zu,{}),a.jsx("div",{className:"-mt-8 pb-20 z-1",children:a.jsx(Xu,{})}),a.jsx("section",{className:"section-compact border-t border-border",children:a.jsx(td,{})}),a.jsx(Ku,{}),a.jsx(Bu,{}),a.jsx(Ju,{}),a.jsx(_u,{})]})})}export{od as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.