openlearn-next 0.3.22 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/assets/AdminDirectoryView-DY--WM5Z.js +1 -0
- package/dist/assets/{BatchPickerModal-C9FH3J57.js → BatchPickerModal-DCDKZsrS.js} +1 -1
- package/dist/assets/ClassesView-COk1pTlX.js +22 -0
- package/dist/assets/ClassroomCountdownWidget-CHUvYSrT.js +2 -0
- package/dist/assets/CloudDriveModal-DY7BSVJN.js +1 -0
- package/dist/assets/ComputerLabView-1qWDNRQ2.js +1 -0
- package/dist/assets/CourseManagement-DA1m3Div.js +1 -0
- package/dist/assets/CourseWizardModal-yDZpcltW.js +3 -0
- package/dist/assets/CoursewareHubPanel-CaEizhxl.js +1 -0
- package/dist/assets/Dashboard-QTNgTjoi.js +8 -0
- package/dist/assets/{ExportWeightModal-C4d-0uTM.js → ExportWeightModal-Cq3BaikE.js} +1 -1
- package/dist/assets/HelpTour-CMJbbGne.js +1 -0
- package/dist/assets/{HelpView-B9Pny6u9.js → HelpView-DY4CA5VA.js} +4 -4
- package/dist/assets/{ImportLessonsModal-hKRuw9p4.js → ImportLessonsModal-DzeCcQOI.js} +1 -1
- package/dist/assets/{ImportModal-CVXHZ1Ei.js → ImportModal-D7L-KNhZ.js} +1 -1
- package/dist/assets/InteractiveCoursewareViewer-D5py6E0c.js +1 -0
- package/dist/assets/InteractiveWhiteboard-D5YKM1I6.js +77 -0
- package/dist/assets/LazyCourseware-DWCx60AO.js +2 -0
- package/dist/assets/LazyWhiteboard-CFn-1ATp.js +2 -0
- package/dist/assets/LessonEditorView-CfvhQfzG.js +1 -0
- package/dist/assets/LiveClassroomView-CB_0PN1X.js +59 -0
- package/dist/assets/{NotificationDetailModal-1MOkBDr_.js → NotificationDetailModal-DBg7UPZh.js} +1 -1
- package/dist/assets/PluginView-wozVlSXQ.js +66 -0
- package/dist/assets/{ProcessLogsModal-gZ9LILYM.js → ProcessLogsModal-DmFXg9mG.js} +1 -1
- package/dist/assets/QuizGeneratorModal-DnW-ff7D.js +1 -0
- package/dist/assets/StudentAssignmentView-tQiAv5Xn.js +1 -0
- package/dist/assets/StudentLessonView-DRwhbGoU.js +1 -0
- package/dist/assets/StudentPreviewModal-BQ_a7sQY.js +1 -0
- package/dist/assets/StudentView-XBaWzGO3.js +2 -0
- package/dist/assets/{SystemResourceLibraryModal-Ce-Dis6M.js → SystemResourceLibraryModal-Bcak0WSz.js} +1 -1
- package/dist/assets/TeacherView-961tBSMT.js +2 -0
- package/dist/assets/{TimetableView-0VaTfpz3.js → TimetableView-BQG-rEb5.js} +4 -4
- package/dist/assets/index-BQF_s4QO.js +217 -0
- package/dist/assets/index-CvGu7LSj.css +1 -0
- package/dist/assets/{index.es-CkgATcHw.js → index.es-C5eWEO4o.js} +1 -1
- package/dist/assets/{vendor-charts-U9fLlNC_.js → vendor-charts-qLbgF1eL.js} +1 -1
- package/dist/assets/{vendor-icons-30iiuCQb.js → vendor-icons-BRmhY6fg.js} +1 -1
- package/dist/assets/vendor-motion-BFAPOs-b.js +1 -0
- package/dist/assets/{vendor-pdf-Bw0ZQZtM.js → vendor-pdf-D7rGevI1.js} +3 -2
- package/dist/index.html +12 -13
- package/dist/server.cjs +4955 -623
- package/package.json +9 -4
- package/dist/assets/AdminDirectoryView-D-AOtp1o.js +0 -1
- package/dist/assets/ClassesView-DTuyCvYd.js +0 -19
- package/dist/assets/CloudDriveModal-Bi-aMuax.js +0 -1
- package/dist/assets/ComputerLabView-DWMtMSHV.js +0 -1
- package/dist/assets/CourseManagement-CeelAyst.js +0 -1
- package/dist/assets/CourseWizardModal-m7TDgcB2.js +0 -3
- package/dist/assets/CoursewareHubPanel-C4LQjt4v.js +0 -1
- package/dist/assets/Dashboard-CiBtG7Ge.js +0 -8
- package/dist/assets/HelpTour-00eT17Vg.js +0 -1
- package/dist/assets/InteractiveCoursewareViewer-DMMAs2k_.js +0 -1
- package/dist/assets/InteractiveWhiteboard-jpweQ094.js +0 -77
- package/dist/assets/LazyCourseware-DVgyrg3r.js +0 -2
- package/dist/assets/LazyWhiteboard-BSzsAPXC.js +0 -2
- package/dist/assets/LessonEditorView-D4g48fr5.js +0 -1
- package/dist/assets/LiveClassroomView-HQGhVwd_.js +0 -1
- package/dist/assets/PluginView-D8cQ8mLM.js +0 -65
- package/dist/assets/QuizGeneratorModal-BFCJe1cm.js +0 -1
- package/dist/assets/StudentAssignmentView-C34nleZT.js +0 -1
- package/dist/assets/StudentLessonView-DNbu2o04.js +0 -1
- package/dist/assets/StudentPreviewModal-BXbKzQgo.js +0 -1
- package/dist/assets/StudentView-BF2WjF4_.js +0 -2
- package/dist/assets/TeacherView-BySyCiZG.js +0 -2
- package/dist/assets/index-C7jMgry5.js +0 -216
- package/dist/assets/index-huP36ZNf.css +0 -1
- package/dist/assets/vendor-motion-DjY2czvL.js +0 -1
- /package/dist/assets/{vendor-content-CYR4BTuT.js → purify.es-CYR4BTuT.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function De(t,e){t.indexOf(e)===-1&&t.push(e)}function It(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const J=(t,e,s)=>s>e?e:s<t?t:s;let Re=()=>{};const tt={},Gs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),qs=t=>typeof t=="object"&&t!==null,Zs=t=>/^0[^.\s]+$/u.test(t);function Js(t){let e;return()=>(e===void 0&&(e=t()),e)}const et=t=>t,Me=(...t)=>t.reduce((e,s)=>i=>s(e(i))),Ce=(t,e,s)=>{const i=e-t;return i?(s-t)/i:1};class Be{constructor(){this.subscriptions=[]}add(e){return De(this.subscriptions,e),()=>It(this.subscriptions,e)}notify(e,s,i){const n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,s,i);else for(let o=0;o<n;o++){const r=this.subscriptions[o];r&&r(e,s,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=t=>t*1e3,z=t=>t/1e3,Qs=(t,e)=>e?t*(1e3/e):0,An=(t,e,s)=>{const i=e-t;return((s-t)%i+i)%i+t},ti=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Vn=1e-7,Sn=12;function wn(t,e,s,i,n){let o,r,a=0;do r=e+(s-e)/2,o=ti(r,i,n)-t,o>0?s=r:e=r;while(Math.abs(o)>Vn&&++a<Sn);return r}function Pt(t,e,s,i){if(t===e&&s===i)return et;const n=o=>wn(o,0,1,t,s);return o=>o===0||o===1?o:ti(n(o),e,i)}const ei=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,si=t=>e=>1-t(1-e),ii=Pt(.33,1.53,.69,.99),ke=si(ii),ni=ei(ke),ri=t=>t>=1?1:(t*=2)<1?.5*ke(t):.5*(2-Math.pow(2,-10*(t-1))),Ee=t=>1-Math.sin(Math.acos(t)),oi=si(Ee),ai=ei(Ee),Pn=Pt(.42,0,1,1),Dn=Pt(0,0,.58,1),li=Pt(.42,0,.58,1),ui=t=>Array.isArray(t)&&typeof t[0]!="number";function ul(t,e){return ui(t)?t[An(0,t.length,e)]:t}const ci=t=>Array.isArray(t)&&typeof t[0]=="number",Rn={linear:et,easeIn:Pn,easeInOut:li,easeOut:Dn,circIn:Ee,circInOut:ai,circOut:oi,backIn:ke,backInOut:ni,backOut:ii,anticipate:ri},Mn=t=>typeof t=="string",He=t=>{if(ci(t)){Re(t.length===4);const[e,s,i,n]=t;return Pt(e,s,i,n)}else if(Mn(t))return Rn[t];return t},Rt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Cn(t,e){let s=new Set,i=new Set,n=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(l){r.has(l)&&(c.schedule(l),t()),l(a)}const c={schedule:(l,h=!1,f=!1)=>{const p=f&&n?s:i;return h&&r.add(l),p.add(l),l},cancel:l=>{i.delete(l),r.delete(l)},process:l=>{if(a=l,n){o=!0;return}n=!0;const h=s;s=i,i=h,s.forEach(u),s.clear(),n=!1,o&&(o=!1,c.process(l))}};return c}const Bn=40;function hi(t,e){let s=!1,i=!0;const n={delta:0,timestamp:0,isProcessing:!1},o=()=>s=!0,r=Rt.reduce((v,x)=>(v[x]=Cn(o),v),{}),{setup:a,read:u,resolveKeyframes:c,preUpdate:l,update:h,preRender:f,render:d,postRender:p}=r,y=()=>{const v=tt.useManualTiming,x=v?n.timestamp:performance.now();s=!1,v||(n.delta=i?1e3/60:Math.max(Math.min(x-n.timestamp,Bn),1)),n.timestamp=x,n.isProcessing=!0,a.process(n),u.process(n),c.process(n),l.process(n),h.process(n),f.process(n),d.process(n),p.process(n),n.isProcessing=!1,s&&e&&(i=!1,t(y))},g=()=>{s=!0,i=!0,n.isProcessing||t(y)};return{schedule:Rt.reduce((v,x)=>{const S=r[x];return v[x]=(P,w=!1,V=!1)=>(s||g(),S.schedule(P,w,V)),v},{}),cancel:v=>{for(let x=0;x<Rt.length;x++)r[Rt[x]].cancel(v)},state:n,steps:r}}const{schedule:L,cancel:ut,state:F,steps:Xt}=hi(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0);let Ct;function kn(){Ct=void 0}const I={now:()=>(Ct===void 0&&I.set(F.isProcessing||tt.useManualTiming?F.timestamp:performance.now()),Ct),set:t=>{Ct=t,queueMicrotask(kn)}},fi=t=>e=>typeof e=="string"&&e.startsWith(t),di=fi("--"),En=fi("var(--"),Le=t=>En(t)?Ln.test(t.split("/*")[0].trim()):!1,Ln=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ye(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const gt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},wt={...gt,transform:t=>J(0,1,t)},Mt={...gt,default:1},At=t=>Math.round(t*1e5)/1e5,Fe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fn(t){return t==null}const In=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ie=(t,e)=>s=>!!(typeof s=="string"&&In.test(s)&&s.startsWith(t)||e&&!Fn(s)&&Object.prototype.hasOwnProperty.call(s,e)),pi=(t,e,s)=>i=>{if(typeof i!="string")return i;const[n,o,r,a]=i.match(Fe);return{[t]:parseFloat(n),[e]:parseFloat(o),[s]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},On=t=>J(0,255,t),Ht={...gt,transform:t=>Math.round(On(t))},ot={test:Ie("rgb","red"),parse:pi("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:i=1})=>"rgba("+Ht.transform(t)+", "+Ht.transform(e)+", "+Ht.transform(s)+", "+At(wt.transform(i))+")"};function jn(t){let e="",s="",i="",n="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),i=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),i=t.substring(3,4),n=t.substring(4,5),e+=e,s+=s,i+=i,n+=n),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}}const re={test:Ie("#"),parse:jn,transform:ot.transform},Dt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),q=Dt("deg"),Z=Dt("%"),m=Dt("px"),Nn=Dt("vh"),Un=Dt("vw"),Ge={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},ht={test:Ie("hsl","hue"),parse:pi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:i=1})=>"hsla("+Math.round(t)+", "+Z.transform(At(e))+", "+Z.transform(At(s))+", "+At(wt.transform(i))+")"},C={test:t=>ot.test(t)||re.test(t)||ht.test(t),parse:t=>ot.test(t)?ot.parse(t):ht.test(t)?ht.parse(t):re.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ot.transform(t):ht.transform(t),getAnimatableNone:t=>{const e=C.parse(t);return e.alpha=0,C.transform(e)}},Kn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Wn(t){return isNaN(t)&&typeof t=="string"&&(t.match(Fe)?.length||0)+(t.match(Kn)?.length||0)>0}const mi="number",yi="color",zn="var",$n="var(",qe="${}",_n=/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 mt(t){const e=t.toString(),s=[],i={color:[],number:[],var:[]},n=[];let o=0;const a=e.replace(_n,u=>(C.test(u)?(i.color.push(o),n.push(yi),s.push(C.parse(u))):u.startsWith($n)?(i.var.push(o),n.push(zn),s.push(u)):(i.number.push(o),n.push(mi),s.push(parseFloat(u))),++o,qe)).split(qe);return{values:s,split:a,indexes:i,types:n}}function Xn(t){return mt(t).values}function gi({split:t,types:e}){const s=t.length;return i=>{let n="";for(let o=0;o<s;o++)if(n+=t[o],i[o]!==void 0){const r=e[o];r===mi?n+=At(i[o]):r===yi?n+=C.transform(i[o]):n+=i[o]}return n}}function Hn(t){return gi(mt(t))}const Yn=t=>typeof t=="number"?0:C.test(t)?C.getAnimatableNone(t):t,Gn=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Yn(t);function qn(t){const e=mt(t);return gi(e)(e.values.map((i,n)=>Gn(i,e.split[n])))}const _={test:Wn,parse:Xn,createTransformer:Hn,getAnimatableNone:qn};function Yt(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function Zn({hue:t,saturation:e,lightness:s,alpha:i}){t/=360,e/=100,s/=100;let n=0,o=0,r=0;if(!e)n=o=r=s;else{const a=s<.5?s*(1+e):s+e-s*e,u=2*s-a;n=Yt(u,a,t+1/3),o=Yt(u,a,t),r=Yt(u,a,t-1/3)}return{red:Math.round(n*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function Ot(t,e){return s=>s>0?e:t}const D=(t,e,s)=>t+(e-t)*s,Gt=(t,e,s)=>{const i=t*t,n=s*(e*e-i)+i;return n<0?0:Math.sqrt(n)},Jn=[re,ot,ht],Qn=t=>Jn.find(e=>e.test(t));function Ze(t){const e=Qn(t);if(!e)return!1;let s=e.parse(t);return e===ht&&(s=Zn(s)),s}const Je=(t,e)=>{const s=Ze(t),i=Ze(e);if(!s||!i)return Ot(t,e);const n={...s};return o=>(n.red=Gt(s.red,i.red,o),n.green=Gt(s.green,i.green,o),n.blue=Gt(s.blue,i.blue,o),n.alpha=D(s.alpha,i.alpha,o),ot.transform(n))},oe=new Set(["none","hidden"]);function tr(t,e){return oe.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function er(t,e){return s=>D(t,e,s)}function Oe(t){return typeof t=="number"?er:typeof t=="string"?Le(t)?Ot:C.test(t)?Je:nr:Array.isArray(t)?Ti:typeof t=="object"?C.test(t)?Je:sr:Ot}function Ti(t,e){const s=[...t],i=s.length,n=t.map((o,r)=>Oe(o)(o,e[r]));return o=>{for(let r=0;r<i;r++)s[r]=n[r](o);return s}}function sr(t,e){const s={...t,...e},i={};for(const n in s)t[n]!==void 0&&e[n]!==void 0&&(i[n]=Oe(t[n])(t[n],e[n]));return n=>{for(const o in i)s[o]=i[o](n);return s}}function ir(t,e){const s=[],i={color:0,var:0,number:0};for(let n=0;n<e.values.length;n++){const o=e.types[n],r=t.indexes[o][i[o]],a=t.values[r]??0;s[n]=a,i[o]++}return s}const nr=(t,e)=>{const s=_.createTransformer(e),i=mt(t),n=mt(e);return i.indexes.var.length===n.indexes.var.length&&i.indexes.color.length===n.indexes.color.length&&i.indexes.number.length>=n.indexes.number.length?oe.has(t)&&!n.values.length||oe.has(e)&&!i.values.length?tr(t,e):Me(Ti(ir(i,n),n.values),s):Ot(t,e)};function vi(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?D(t,e,s):Oe(t)(t,e)}const rr=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>L.update(e,s),stop:()=>ut(e),now:()=>F.isProcessing?F.timestamp:I.now()}},xi=(t,e,s=10)=>{let i="";const n=Math.max(Math.round(e/s),2);for(let o=0;o<n;o++)i+=Math.round(t(o/(n-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},jt=2e4;function je(t){let e=0;const s=50;let i=t.next(e);for(;!i.done&&e<jt;)e+=s,i=t.next(e);return e>=jt?1/0:e}function or(t,e=100,s){const i=s({...t,keyframes:[0,e]}),n=Math.min(je(i),jt);return{type:"keyframes",ease:o=>i.next(n*o).value/e,duration:z(n)}}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ae(t,e){return t*Math.sqrt(1-e*e)}const ar=12;function lr(t,e,s){let i=s;for(let n=1;n<ar;n++)i=i-t(i)/e(i);return i}const qt=.001;function ur({duration:t=R.duration,bounce:e=R.bounce,velocity:s=R.velocity,mass:i=R.mass}){let n,o,r=1-e;r=J(R.minDamping,R.maxDamping,r),t=J(R.minDuration,R.maxDuration,z(t)),r<1?(n=c=>{const l=c*r,h=l*t,f=l-s,d=ae(c,r),p=Math.exp(-h);return qt-f/d*p},o=c=>{const h=c*r*t,f=h*s+s,d=Math.pow(r,2)*Math.pow(c,2)*t,p=Math.exp(-h),y=ae(Math.pow(c,2),r);return(-n(c)+qt>0?-1:1)*((f-d)*p)/y}):(n=c=>{const l=Math.exp(-c*t),h=(c-s)*t+1;return-qt+l*h},o=c=>{const l=Math.exp(-c*t),h=(s-c)*(t*t);return l*h});const a=5/t,u=lr(n,o,a);if(t=$(t),isNaN(u))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const c=Math.pow(u,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:t}}}const cr=["duration","bounce"],hr=["stiffness","damping","mass"];function Qe(t,e){return e.some(s=>t[s]!==void 0)}function fr(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Qe(t,hr)&&Qe(t,cr))if(e.velocity=0,t.visualDuration){const s=t.visualDuration,i=2*Math.PI/(s*1.2),n=i*i,o=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:R.mass,stiffness:n,damping:o}}else{const s=ur({...t,velocity:0});e={...e,...s,mass:R.mass},e.isResolvedFromDuration=!0}return e}function Nt(t=R.visualDuration,e=R.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:n}=s;const o=s.keyframes[0],r=s.keyframes[s.keyframes.length-1],a={done:!1,value:o},{stiffness:u,damping:c,mass:l,duration:h,velocity:f,isResolvedFromDuration:d}=fr({...s,velocity:-z(s.velocity||0)}),p=f||0,y=c/(2*Math.sqrt(u*l)),g=r-o,T=z(Math.sqrt(u/l)),b=Math.abs(g)<5;i||(i=b?R.restSpeed.granular:R.restSpeed.default),n||(n=b?R.restDelta.granular:R.restDelta.default);let v,x,S,P,w,V;if(y<1)S=ae(T,y),P=(p+y*T*g)/S,v=A=>{const M=Math.exp(-y*T*A);return r-M*(P*Math.sin(S*A)+g*Math.cos(S*A))},w=y*T*P+g*S,V=y*T*g-P*S,x=A=>Math.exp(-y*T*A)*(w*Math.sin(S*A)+V*Math.cos(S*A));else if(y===1){v=M=>r-Math.exp(-T*M)*(g+(p+T*g)*M);const A=p+T*g;x=M=>Math.exp(-T*M)*(T*A*M-p)}else{const A=T*Math.sqrt(y*y-1);v=X=>{const G=Math.exp(-y*T*X),H=Math.min(A*X,300);return r-G*((p+y*T*g)*Math.sinh(H)+A*g*Math.cosh(H))/A};const M=(p+y*T*g)/A,O=y*T*M-g*A,st=y*T*g-M*A;x=X=>{const G=Math.exp(-y*T*X),H=Math.min(A*X,300);return G*(O*Math.sinh(H)+st*Math.cosh(H))}}const k={calculatedDuration:d&&h||null,velocity:A=>$(x(A)),next:A=>{if(!d&&y<1){const O=Math.exp(-y*T*A),st=Math.sin(S*A),X=Math.cos(S*A),G=r-O*(P*st+g*X),H=$(O*(w*st+V*X));return a.done=Math.abs(H)<=i&&Math.abs(r-G)<=n,a.value=a.done?r:G,a}const M=v(A);if(d)a.done=A>=h;else{const O=$(x(A));a.done=Math.abs(O)<=i&&Math.abs(r-M)<=n}return a.value=a.done?r:M,a},toString:()=>{const A=Math.min(je(k),jt),M=xi(O=>k.next(A*O).value,A,30);return A+"ms "+M},toTransition:()=>{}};return k}Nt.applyToOptions=t=>{const e=or(t,100,Nt);return t.ease=e.ease,t.duration=$(e.duration),t.type="keyframes",t};const dr=5;function bi(t,e,s){const i=Math.max(e-dr,0);return Qs(s-t(i),e-i)}function le({keyframes:t,velocity:e=0,power:s=.8,timeConstant:i=325,bounceDamping:n=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:u,restDelta:c=.5,restSpeed:l}){const h=t[0],f={done:!1,value:h},d=V=>a!==void 0&&V<a||u!==void 0&&V>u,p=V=>a===void 0?u:u===void 0||Math.abs(a-V)<Math.abs(u-V)?a:u;let y=s*e;const g=h+y,T=r===void 0?g:r(g);T!==g&&(y=T-h);const b=V=>-y*Math.exp(-V/i),v=V=>T+b(V),x=V=>{const k=b(V),A=v(V);f.done=Math.abs(k)<=c,f.value=f.done?T:A};let S,P;const w=V=>{d(f.value)&&(S=V,P=Nt({keyframes:[f.value,p(f.value)],velocity:bi(v,V,f.value),damping:n,stiffness:o,restDelta:c,restSpeed:l}))};return w(0),{calculatedDuration:null,next:V=>{let k=!1;return!P&&S===void 0&&(k=!0,x(V),w(V)),S!==void 0&&V>=S?P.next(V-S):(!k&&x(V),f)}}}function pr(t,e,s){const i=[],n=s||tt.mix||vi,o=t.length-1;for(let r=0;r<o;r++){let a=n(t[r],t[r+1]);if(e){const u=Array.isArray(e)?e[r]||et:e;a=Me(u,a)}i.push(a)}return i}function mr(t,e,{clamp:s=!0,ease:i,mixer:n}={}){const o=t.length;if(Re(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=pr(e,i,n),u=a.length,c=l=>{if(r&&l<t[0])return e[0];let h=0;if(u>1)for(;h<t.length-2&&!(l<t[h+1]);h++);const f=Ce(t[h],t[h+1],l);return a[h](f)};return s?l=>c(J(t[0],t[o-1],l)):c}function yr(t,e){const s=t[t.length-1];for(let i=1;i<=e;i++){const n=Ce(0,e,i);t.push(D(s,1,n))}}function gr(t){const e=[0];return yr(e,t.length-1),e}function Tr(t,e){return t.map(s=>s*e)}function vr(t,e){return t.map(()=>e||li).splice(0,t.length-1)}function Vt({duration:t=300,keyframes:e,times:s,ease:i="easeInOut"}){const n=ui(i)?i.map(He):He(i),o={done:!1,value:e[0]},r=Tr(s&&s.length===e.length?s:gr(e),t),a=mr(r,e,{ease:Array.isArray(n)?n:vr(e,n)});return{calculatedDuration:t,next:u=>(o.value=a(u),o.done=u>=t,o)}}const xr=t=>t!==null;function _t(t,{repeat:e,repeatType:s="loop"},i,n=1){const o=t.filter(xr),a=n<0||e&&s!=="loop"&&e%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const br={decay:le,inertia:le,tween:Vt,keyframes:Vt,spring:Nt};function Ai(t){typeof t.type=="string"&&(t.type=br[t.type])}class Ne{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,s){return this.finished.then(e,s)}}const Ar=t=>t/100;class Ut extends Ne{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==I.now()&&this.tick(I.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Ai(e);const{type:s=Vt,repeat:i=0,repeatDelay:n=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const u=s||Vt;u!==Vt&&typeof a[0]!="number"&&(this.mixKeyframes=Me(Ar,vi(a[0],a[1])),a=[0,100]);const c=u({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=je(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=c}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:i,totalDuration:n,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:l,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:y,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const T=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?T<0:T>n;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let v=this.currentTime,x=i;if(h){const V=Math.min(this.currentTime,n)/a;let k=Math.floor(V),A=V%1;!A&&V>=1&&(A=1),A===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(f==="reverse"?(A=1-A,d&&(A-=d/a)):f==="mirror"&&(x=r)),v=J(0,1,A)*a}let S;b?(this.delayState.value=l[0],S=this.delayState):S=x.next(v),o&&!b&&(S.value=o(S.value));let{done:P}=S;!b&&u!==null&&(P=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return w&&p!==le&&(S.value=_t(l,this.options,g,this.speed)),y&&y(S.value),w&&this.finish(),S}then(e,s){return this.finished.then(e,s)}get duration(){return z(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+z(e)}get time(){return z(this.currentTime)}set time(e){e=$(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const s=this.generator.next(e).value;return bi(i=>this.generator.next(i).value,e,s)}get speed(){return this.playbackSpeed}set speed(e){const s=this.playbackSpeed!==e;s&&this.driver&&this.updateTime(I.now()),this.playbackSpeed=e,s&&this.driver&&(this.time=z(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=rr,startTime:s}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=s??i),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(I.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(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Vr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const at=t=>t*180/Math.PI,ue=t=>{const e=at(Math.atan2(t[1],t[0]));return ce(e)},Sr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ue,rotateZ:ue,skewX:t=>at(Math.atan(t[1])),skewY:t=>at(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ce=t=>(t=t%360,t<0&&(t+=360),t),ts=ue,es=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ss=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),wr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:es,scaleY:ss,scale:t=>(es(t)+ss(t))/2,rotateX:t=>ce(at(Math.atan2(t[6],t[5]))),rotateY:t=>ce(at(Math.atan2(-t[2],t[0]))),rotateZ:ts,rotate:ts,skewX:t=>at(Math.atan(t[4])),skewY:t=>at(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function he(t){return t.includes("scale")?1:0}function fe(t,e){if(!t||t==="none")return he(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,n;if(s)i=wr,n=s;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Sr,n=a}if(!n)return he(e);const o=i[e],r=n[1].split(",").map(Dr);return typeof o=="function"?o(r):r[o]}const Pr=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return fe(s,e)};function Dr(t){return parseFloat(t.trim())}const Tt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vt=new Set([...Tt,"pathRotation"]),is=t=>t===gt||t===m,Rr=new Set(["x","y","z"]),Mr=Tt.filter(t=>!Rr.has(t));function Cr(t){const e=[];return Mr.forEach(s=>{const i=t.getValue(s);i!==void 0&&(e.push([s,i.get()]),i.set(s.startsWith("scale")?1:0))}),e}const Q={width:({x:t},{paddingLeft:e="0",paddingRight:s="0",boxSizing:i})=>{const n=t.max-t.min;return i==="border-box"?n:n-parseFloat(e)-parseFloat(s)},height:({y:t},{paddingTop:e="0",paddingBottom:s="0",boxSizing:i})=>{const n=t.max-t.min;return i==="border-box"?n:n-parseFloat(e)-parseFloat(s)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>fe(e,"x"),y:(t,{transform:e})=>fe(e,"y")};Q.translateX=Q.x;Q.translateY=Q.y;const lt=new Set;let de=!1,pe=!1,me=!1;function Vi(){if(pe){const t=Array.from(lt).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),s=new Map;e.forEach(i=>{const n=Cr(i);n.length&&(s.set(i,n),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const n=s.get(i);n&&n.forEach(([o,r])=>{i.getValue(o)?.set(r)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}pe=!1,de=!1,lt.forEach(t=>t.complete(me)),lt.clear()}function Si(){lt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(pe=!0)})}function Br(){me=!0,Si(),Vi(),me=!1}class Ue{constructor(e,s,i,n,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=i,this.motionValue=n,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(lt.add(this),de||(de=!0,L.read(Si),L.resolveKeyframes(Vi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:s,element:i,motionValue:n}=this;if(e[0]===null){const o=n?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(i&&s){const a=i.readValue(s,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),n&&o===void 0&&n.set(e[0])}Vr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),lt.delete(this)}cancel(){this.state==="scheduled"&&(lt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kr=t=>t.startsWith("--");function wi(t,e,s){kr(e)?t.style.setProperty(e,s):t.style[e]=s}const Er={};function Pi(t,e){const s=Js(t);return()=>Er[e]??s()}const Lr=Pi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Di=Pi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),bt=([t,e,s,i])=>`cubic-bezier(${t}, ${e}, ${s}, ${i})`,ns={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bt([0,.65,.55,1]),circOut:bt([.55,0,1,.45]),backIn:bt([.31,.01,.66,-.59]),backOut:bt([.33,1.53,.69,.99])};function Ri(t,e){if(t)return typeof t=="function"?Di()?xi(t,e):"ease-out":ci(t)?bt(t):Array.isArray(t)?t.map(s=>Ri(s,e)||ns.easeOut):ns[t]}function Fr(t,e,s,{delay:i=0,duration:n=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:u}={},c=void 0){const l={[e]:s};u&&(l.offset=u);const h=Ri(a,n);Array.isArray(h)&&(l.easing=h);const f={delay:i,duration:n,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(l,f)}function Mi(t){return typeof t=="function"&&"applyToOptions"in t}function Ir({type:t,...e}){return Mi(t)&&Di()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ci extends Ne{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:s,name:i,keyframes:n,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,Re(typeof e.type!="string");const c=Ir(e);this.animation=Fr(s,i,n,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=_t(n,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),wi(s,i,l),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return z(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+z(e)}get time(){return z(Number(this.animation.currentTime)||0)}set time(e){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(e),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:s,rangeEnd:i,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Lr()?(this.animation.timeline=e,s&&(this.animation.rangeStart=s),i&&(this.animation.rangeEnd=i),et):n(this)}}const Bi={anticipate:ri,backInOut:ni,circInOut:ai};function Or(t){return t in Bi}function jr(t){typeof t.ease=="string"&&Or(t.ease)&&(t.ease=Bi[t.ease])}const Zt=10;class Nr extends Ci{constructor(e){jr(e),Ai(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:s,onUpdate:i,onComplete:n,element:o,...r}=this.options;if(!s)return;if(e!==void 0){s.set(e);return}const a=new Ut({...r,autoplay:!1}),u=Math.max(Zt,I.now()-this.startTime),c=J(0,Zt,u-Zt),l=a.sample(u).value,{name:h}=this.options;o&&h&&wi(o,h,l),s.setWithVelocity(a.sample(Math.max(0,u-c)).value,l,c),a.stop()}}const rs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Ur(t){const e=t[0];if(t.length===1)return!0;for(let s=0;s<t.length;s++)if(t[s]!==e)return!0}function Kr(t,e,s,i){const n=t[0];if(n===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=rs(n,e),a=rs(o,e);return!r||!a?!1:Ur(t)||(s==="spring"||Mi(s))&&i}function ye(t){t.duration=0,t.type="keyframes"}const ki=new Set(["opacity","clipPath","filter","transform"]),Wr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function zr(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Wr.test(t[e]))return!0;return!1}const $r=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),_r=Js(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xr(t){const{motionValue:e,name:s,repeatDelay:i,repeatType:n,damping:o,type:r,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return _r()&&s&&(ki.has(s)||$r.has(s)&&zr(a))&&(s!=="transform"||!l)&&!c&&!i&&n!=="mirror"&&o!==0&&r!=="inertia"}const Hr=40;class Yr extends Ne{constructor({autoplay:e=!0,delay:s=0,type:i="keyframes",repeat:n=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:u,motionValue:c,element:l,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=I.now();const f={autoplay:e,delay:s,type:i,repeat:n,repeatDelay:o,repeatType:r,name:u,motionValue:c,element:l,...h},d=l?.KeyframeResolver||Ue;this.keyframeResolver=new d(a,(p,y,g)=>this.onKeyframesResolved(p,y,f,!g),u,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,s,i,n){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:u,isHandoff:c,onUpdate:l}=i;this.resolvedAt=I.now();let h=!0;Kr(e,o,r,a)||(h=!1,(tt.instantAnimations||!u)&&l?.(_t(e,i,s)),e[0]=e[e.length-1],ye(i),i.repeat=0);const d={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>Hr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...i,keyframes:e},p=h&&!c&&Xr(d),y=d.motionValue?.owner?.current;let g;if(p)try{g=new Nr({...d,element:y})}catch{g=new Ut(d)}else g=new Ut(d);g.finished.then(()=>{this.notifyFinished()}).catch(et),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,s){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Br()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Gr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,s){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=s}attachTimeline(e){const s=this.animations.map(i=>i.attachTimeline(e));return()=>{s.forEach((i,n)=>{i&&i(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return os(this.animations,"duration")}get iterationDuration(){return os(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(s=>s[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function os(t,e){let s=0;for(let i=0;i<t.length;i++){const n=t[i][e];n!==null&&n>s&&(s=n)}return s}class cl extends Gr{then(e,s){return this.finished.finally(e).then(()=>{})}}function Ei(t,e,s,i=0,n=1){const o=Array.from(t).sort((c,l)=>c.sortNodePosition(l)).indexOf(e),r=t.size,a=(r-1)*i;return typeof s=="function"?s(o,r):n===1?o*i:a-o*i}const as=30,qr=t=>!isNaN(parseFloat(t));class Zr{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const n=I.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),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(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=qr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new Be);const i=this.events[e].add(s);return e==="change"?()=>{i(),L.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>as)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,as);return Qs(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(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 yt(t,e){return new Zr(t,e)}function Li(t,e){if(t?.inherit&&e){const{inherit:s,...i}=t;return{...e,...i}}return t}function Ke(t,e){const s=t?.[e]??t?.default??t;return s!==t?Li(s,t):s}const Jr={type:"spring",stiffness:500,damping:25,restSpeed:10},Qr=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),to={type:"keyframes",duration:.8},eo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},so=(t,{keyframes:e})=>e.length>2?to:vt.has(t)?t.startsWith("scale")?Qr(e[1]):Jr:eo,io=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function no(t){for(const e in t)if(!io.has(e))return!0;return!1}const Fi=(t,e,s,i={},n,o)=>r=>{const a=Ke(i,t)||{},u=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-$(u);const l={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:n};no(a)||Object.assign(l,so(t,l)),l.duration&&(l.duration=$(l.duration)),l.repeatDelay&&(l.repeatDelay=$(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let h=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(ye(l),l.delay===0&&(h=!0)),(tt.instantAnimations||tt.skipAnimations||n?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,ye(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=_t(l.keyframes,a);if(f!==void 0){L.update(()=>{l.onUpdate(f),l.onComplete()});return}}return a.isSync?new Ut(l):new Yr(l)},ro=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oo(t){const e=ro.exec(t);if(!e)return[,];const[,s,i,n]=e;return[`--${s??i}`,n]}function Ii(t,e,s=1){const[i,n]=oo(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const r=o.trim();return Gs(r)?parseFloat(r):r}return Le(n)?Ii(n,e,s+1):n}function ls(t){const e=[{},{}];return t?.values.forEach((s,i)=>{e[0][i]=s.get(),e[1][i]=s.getVelocity()}),e}function Oi(t,e,s,i){if(typeof e=="function"){const[n,o]=ls(i);e=e(s!==void 0?s:t.custom,n,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[n,o]=ls(i);e=e(s!==void 0?s:t.custom,n,o)}return e}function pt(t,e,s){const i=t.getProps();return Oi(i,e,s!==void 0?s:i.custom,t)}const ji=new Set(["width","height","top","left","right","bottom",...Tt]),ge=t=>Array.isArray(t);function ao(t,e,s){t.hasValue(e)?t.getValue(e).set(s):t.addValue(e,yt(s))}function lo(t){return ge(t)?t[t.length-1]||0:t}function uo(t,e){const s=pt(t,e);let{transitionEnd:i={},transition:n={},...o}=s||{};o={...o,...i};for(const r in o){const a=lo(o[r]);ao(t,r,a)}}const j=t=>!!(t&&t.getVelocity);function co(t){return!!(j(t)&&t.add)}function ho(t,e){const s=t.getValue("willChange");if(co(s))return s.add(e);if(!s&&tt.WillChange){const i=new tt.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function We(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const fo="framerAppearId",po="data-"+We(fo);function Ni(t){return t.props[po]}function mo({protectedKeys:t,needsAnimating:e},s){const i=t.hasOwnProperty(s)&&e[s]!==!0;return e[s]=!1,i}function Ui(t,e,{delay:s=0,transitionOverride:i,type:n}={}){let{transition:o,transitionEnd:r,...a}=e;const u=t.getDefaultTransition();o=o?Li(o,u):u;const c=o?.reduceMotion,l=o?.skipAnimations;i&&(o=i);const h=[],f=n&&t.animationState&&t.animationState.getState()[n],d=o?.path;d&&d.animateVisualElement(t,a,o,s,h);for(const p in a){const y=t.getValue(p,t.latestValues[p]??null),g=a[p];if(g===void 0||f&&mo(f,p))continue;const T={delay:s,...Ke(o||{},p)};l&&(T.skipAnimations=!0);const b=y.get();if(b!==void 0&&!y.isAnimating()&&!Array.isArray(g)&&g===b&&!T.velocity){L.update(()=>y.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const P=Ni(t);if(P){const w=window.MotionHandoffAnimation(P,p,L);w!==null&&(T.startTime=w,v=!0)}}ho(t,p);const x=c??t.shouldReduceMotion;y.start(Fi(p,y,g,x&&ji.has(p)?{type:!1}:T,t,v));const S=y.animation;S&&h.push(S)}if(r){const p=()=>L.update(()=>{r&&uo(t,r)});h.length?Promise.all(h).then(p):p()}return h}function Te(t,e,s={}){const i=pt(t,e,s.type==="exit"?t.presenceContext?.custom:void 0);let{transition:n=t.getDefaultTransition()||{}}=i||{};s.transitionOverride&&(n=s.transitionOverride);const o=i?()=>Promise.all(Ui(t,i,s)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:l,staggerDirection:h}=n;return yo(t,e,u,c,l,h,s)}:()=>Promise.resolve(),{when:a}=n;if(a){const[u,c]=a==="beforeChildren"?[o,r]:[r,o];return u().then(()=>c())}else return Promise.all([o(),r(s.delay)])}function yo(t,e,s=0,i=0,n=0,o=1,r){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(Te(u,e,{...r,delay:s+(typeof i=="function"?0:i)+Ei(t.variantChildren,u,i,n,o)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function go(t,e,s={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const n=e.map(o=>Te(t,o,s));i=Promise.all(n)}else if(typeof e=="string")i=Te(t,e,s);else{const n=typeof e=="function"?pt(t,e,s.custom):e;i=Promise.all(Ui(t,n,s))}return i.then(()=>{t.notify("AnimationComplete",e)})}const To={test:t=>t==="auto",parse:t=>t},Ki=t=>e=>e.test(t),Wi=[gt,m,Z,q,Un,Nn,To],us=t=>Wi.find(Ki(t));function vo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Zs(t):!0}const xo=new Set(["brightness","contrast","saturate","opacity"]);function bo(t){const[e,s]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=s.match(Fe)||[];if(!i)return t;const n=s.replace(i,"");let o=xo.has(e)?1:0;return i!==s&&(o*=100),e+"("+o+n+")"}const Ao=/\b([a-z-]*)\(.*?\)/gu,ve={..._,getAnimatableNone:t=>{const e=t.match(Ao);return e?e.map(bo).join(" "):t}},xe={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},cs={...gt,transform:Math.round},Vo={rotate:q,pathRotation:q,rotateX:q,rotateY:q,rotateZ:q,scale:Mt,scaleX:Mt,scaleY:Mt,scaleZ:Mt,skew:q,skewX:q,skewY:q,distance:m,translateX:m,translateY:m,translateZ:m,x:m,y:m,z:m,perspective:m,transformPerspective:m,opacity:wt,originX:Ge,originY:Ge,originZ:m},Kt={borderWidth:m,borderTopWidth:m,borderRightWidth:m,borderBottomWidth:m,borderLeftWidth:m,borderRadius:m,borderTopLeftRadius:m,borderTopRightRadius:m,borderBottomRightRadius:m,borderBottomLeftRadius:m,width:m,maxWidth:m,height:m,maxHeight:m,top:m,right:m,bottom:m,left:m,inset:m,insetBlock:m,insetBlockStart:m,insetBlockEnd:m,insetInline:m,insetInlineStart:m,insetInlineEnd:m,padding:m,paddingTop:m,paddingRight:m,paddingBottom:m,paddingLeft:m,paddingBlock:m,paddingBlockStart:m,paddingBlockEnd:m,paddingInline:m,paddingInlineStart:m,paddingInlineEnd:m,margin:m,marginTop:m,marginRight:m,marginBottom:m,marginLeft:m,marginBlock:m,marginBlockStart:m,marginBlockEnd:m,marginInline:m,marginInlineStart:m,marginInlineEnd:m,fontSize:m,backgroundPositionX:m,backgroundPositionY:m,...Vo,zIndex:cs,fillOpacity:wt,strokeOpacity:wt,numOctaves:cs},So={...Kt,color:C,backgroundColor:C,outlineColor:C,fill:C,stroke:C,borderColor:C,borderTopColor:C,borderRightColor:C,borderBottomColor:C,borderLeftColor:C,filter:ve,WebkitFilter:ve,mask:xe,WebkitMask:xe},zi=t=>So[t],wo=new Set([ve,xe]);function $i(t,e){let s=zi(t);return wo.has(s)||(s=_),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const Po=new Set(["auto","none","0"]);function Do(t,e,s){let i=0,n;for(;i<t.length&&!n;){const o=t[i];typeof o=="string"&&!Po.has(o)&&mt(o).values.length&&(n=t[i]),i++}if(n&&s)for(const o of e)t[o]=$i(s,n)}class Ro extends Ue{constructor(e,s,i,n,o){super(e,s,i,n,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let h=e[l];if(typeof h=="string"&&(h=h.trim(),Le(h))){const f=Ii(h,s.current);f!==void 0&&(e[l]=f),l===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!ji.has(i)||e.length!==2)return;const[n,o]=e,r=us(n),a=us(o),u=Ye(n),c=Ye(o);if(u!==c&&Q[i]){this.needsMeasurement=!0;return}if(r!==a)if(is(r)&&is(a))for(let l=0;l<e.length;l++){const h=e[l];typeof h=="string"&&(e[l]=parseFloat(h))}else Q[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,i=[];for(let n=0;n<e.length;n++)(e[n]===null||vo(e[n]))&&i.push(n);i.length&&Do(e,i,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Q[i](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const n=s[s.length-1];n!==void 0&&e.getValue(i,n).jump(n,!1)}measureEndState(){const{element:e,name:s,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const n=e.getValue(s);n&&n.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=Q[s](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function _i(t,e,s){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);const n=s?.[t]??i.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(i=>i!=null)}const be=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Mo(t){return qs(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Xi}=hi(queueMicrotask,!1),W={x:!1,y:!1};function Hi(){return W.x||W.y}function hl(t){return t==="x"||t==="y"?W[t]?null:(W[t]=!0,()=>{W[t]=!1}):W.x||W.y?null:(W.x=W.y=!0,()=>{W.x=W.y=!1})}function Yi(t,e){const s=_i(t),i=new AbortController,n={passive:!0,...e,signal:i.signal};return[s,n,()=>i.abort()]}function Co(t){return!(t.pointerType==="touch"||Hi())}function fl(t,e,s={}){const[i,n,o]=Yi(t,s);return i.forEach(r=>{let a=!1,u=!1,c;const l=()=>{r.removeEventListener("pointerleave",p)},h=g=>{c&&(c(g),c=void 0),l()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),u&&(u=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,n),window.addEventListener("pointercancel",f,n)},p=g=>{if(g.pointerType!=="touch"){if(a){u=!0;return}h(g)}},y=g=>{if(!Co(g))return;u=!1;const T=e(r,g);typeof T=="function"&&(c=T,r.addEventListener("pointerleave",p,n))};r.addEventListener("pointerenter",y,n),r.addEventListener("pointerdown",d,n)}),o}const Gi=(t,e)=>e?t===e?!0:Gi(t,e.parentElement):!1,Bo=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ko=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Eo(t){return ko.has(t.tagName)||t.isContentEditable===!0}const Lo=new Set(["INPUT","SELECT","TEXTAREA"]);function dl(t){return Lo.has(t.tagName)||t.isContentEditable===!0}const Bt=new WeakSet;function hs(t){return e=>{e.key==="Enter"&&t(e)}}function Jt(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Fo=(t,e)=>{const s=t.currentTarget;if(!s)return;const i=hs(()=>{if(Bt.has(s))return;Jt(s,"down");const n=hs(()=>{Jt(s,"up")}),o=()=>Jt(s,"cancel");s.addEventListener("keyup",n,e),s.addEventListener("blur",o,e)});s.addEventListener("keydown",i,e),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),e)};function fs(t){return Bo(t)&&!Hi()}const ds=new WeakSet;function pl(t,e,s={}){const[i,n,o]=Yi(t,s),r=a=>{const u=a.currentTarget;if(!fs(a)||ds.has(a))return;Bt.add(u),s.stopPropagation&&ds.add(a);const c=e(u,a),l=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Bt.has(u)&&Bt.delete(u),fs(d)&&typeof c=="function"&&c(d,{success:p})},h=d=>{l(d,u===window||u===document||s.useGlobalTarget||Gi(u,d.target))},f=d=>{l(d,!1)};window.addEventListener("pointerup",h,n),window.addEventListener("pointercancel",f,n)};return i.forEach(a=>{(s.useGlobalTarget?window:a).addEventListener("pointerdown",r,n),Mo(a)&&(a.addEventListener("focus",c=>Fo(c,n)),!Eo(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ze(t){return qs(t)&&"ownerSVGElement"in t}const kt=new WeakMap;let Et;const qi=(t,e,s)=>(i,n)=>n&&n[0]?n[0][t+"Size"]:ze(i)&&"getBBox"in i?i.getBBox()[e]:i[s],Io=qi("inline","width","offsetWidth"),Oo=qi("block","height","offsetHeight");function jo({target:t,borderBoxSize:e}){kt.get(t)?.forEach(s=>{s(t,{get width(){return Io(t,e)},get height(){return Oo(t,e)}})})}function No(t){t.forEach(jo)}function Uo(){typeof ResizeObserver>"u"||(Et=new ResizeObserver(No))}function Ko(t,e){Et||Uo();const s=_i(t);return s.forEach(i=>{let n=kt.get(i);n||(n=new Set,kt.set(i,n)),n.add(e),Et?.observe(i)}),()=>{s.forEach(i=>{const n=kt.get(i);n?.delete(e),n?.size||Et?.unobserve(i)})}}const Lt=new Set;let ft;function Wo(){ft=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Lt.forEach(e=>e(t))},window.addEventListener("resize",ft)}function zo(t){return Lt.add(t),ft||Wo(),()=>{Lt.delete(t),!Lt.size&&typeof ft=="function"&&(window.removeEventListener("resize",ft),ft=void 0)}}function ml(t,e){return typeof t=="function"?zo(t):Ko(t,e)}function $o(t){return ze(t)&&t.tagName==="svg"}const _o=[...Wi,C,_],Xo=t=>_o.find(Ki(t)),ps=()=>({translate:0,scale:1,origin:0,originPoint:0}),dt=()=>({x:ps(),y:ps()}),ms=()=>({min:0,max:0}),B=()=>({x:ms(),y:ms()}),Ho=new WeakMap;function Zi(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function $e(t){return typeof t=="string"||Array.isArray(t)}const _e=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xe=["initial",..._e];function Ji(t){return Zi(t.animate)||Xe.some(e=>$e(t[e]))}function Yo(t){return!!(Ji(t)||t.variants)}function Go(t,e,s){for(const i in e){const n=e[i],o=s[i];if(j(n))t.addValue(i,n);else if(j(o))t.addValue(i,yt(n,{owner:t}));else if(o!==n)if(t.hasValue(i)){const r=t.getValue(i);r.liveStyle===!0?r.jump(n):r.hasAnimated||r.set(n)}else{const r=t.getStaticValue(i);t.addValue(i,yt(r!==void 0?r:n,{owner:t}))}}for(const i in s)e[i]===void 0&&t.removeValue(i);return e}const Ae={current:null},Qi={current:!1},qo=typeof window<"u";function Zo(){if(Qi.current=!0,!!qo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ae.current=t.matches;t.addEventListener("change",e),e()}else Ae.current=!1}const ys=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Wt={};function yl(t){Wt=t}function gl(){return Wt}class tn{scrapeMotionValuesFromProps(e,s,i){return{}}constructor({parent:e,props:s,presenceContext:i,reducedMotionConfig:n,skipAnimations:o,blockInitialAnimation:r,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ue,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 d=I.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=s,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=o,this.options=u,this.blockInitialAnimation=!!r,this.isControllingVariants=Ji(s),this.isVariantNode=Yo(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(s,{},this);for(const d in f){const p=f[d];c[d]!==void 0&&j(p)&&p.set(c[d])}}mount(e){if(this.hasBeenMounted)for(const s in this.initialValues)this.values.get(s)?.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,Ho.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Qi.current||Zo(),this.shouldReduceMotion=Ae.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ut(this.notifyUpdate),ut(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const s=this.features[e];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,s){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),s.accelerate&&ki.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:a,times:u,ease:c,duration:l}=s.accelerate,h=new Ci({element:this.current,name:e,keyframes:a,times:u,ease:c,duration:$(l)}),f=r(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const i=vt.has(e);i&&this.onBindTransform&&this.onBindTransform();const n=s.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&L.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,s)),this.valueSubscriptions.set(e,()=>{n(),o&&o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Wt){const s=Wt[e];if(!s)continue;const{isEnabled:i,Feature:n}=s;if(!this.features[e]&&n&&i(this.props)&&(this.features[e]=new n(this)),this.features[e]){const o=this.features[e];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):B()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,s){this.latestValues[e]=s}update(e,s){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<ys.length;i++){const n=ys[i];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const o="on"+n,r=e[o];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Go(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(e),()=>s.variantChildren.delete(e)}addValue(e,s){const i=this.values.get(e);s!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,s),this.values.set(e,s),this.latestValues[e]=s.get())}removeValue(e){this.values.delete(e);const s=this.valueSubscriptions.get(e);s&&(s(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,s){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&s!==void 0&&(i=yt(s===null?void 0:s,{owner:this}),this.addValue(e,i)),i}readValue(e,s){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Gs(i)||Zs(i))?i=parseFloat(i):!Xo(i)&&_.test(s)&&(i=$i(e,s)),this.setBaseTarget(e,j(i)?i.get():i)),j(i)?i.get():i}setBaseTarget(e,s){this.baseTarget[e]=s}getBaseTarget(e){const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=Oi(this.props,s,this.presenceContext?.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const n=this.getBaseTargetFromProps(this.props,e);return n!==void 0&&!j(n)?n:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,s){return this.events[e]||(this.events[e]=new Be),this.events[e].add(s)}notify(e,...s){this.events[e]&&this.events[e].notify(...s)}scheduleRenderMicrotask(){Xi.render(this.render)}}class en extends tn{constructor(){super(...arguments),this.KeyframeResolver=Ro}sortInstanceNodePosition(e,s){return e.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(e,s){const i=e.style;return i?i[s]:void 0}removeValueFromRenderState(e,{vars:s,style:i}){delete s[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Tl{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Jo({top:t,left:e,right:s,bottom:i}){return{x:{min:e,max:s},y:{min:t,max:i}}}function vl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Qo(t,e){if(!e)return t;const s=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function Qt(t){return t===void 0||t===1}function Ve({scale:t,scaleX:e,scaleY:s}){return!Qt(t)||!Qt(e)||!Qt(s)}function rt(t){return Ve(t)||sn(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function sn(t){return gs(t.x)||gs(t.y)}function gs(t){return t&&t!=="0%"}function zt(t,e,s){const i=t-s,n=e*i;return s+n}function Ts(t,e,s,i,n){return n!==void 0&&(t=zt(t,n,i)),zt(t,s,i)+e}function Se(t,e=0,s=1,i,n){t.min=Ts(t.min,e,s,i,n),t.max=Ts(t.max,e,s,i,n)}function nn(t,{x:e,y:s}){Se(t.x,e.translate,e.scale,e.originPoint),Se(t.y,s.translate,s.scale,s.originPoint)}const vs=.999999999999,xs=1.0000000000001;function ta(t,e,s,i=!1){const n=s.length;if(!n)return;e.x=e.y=1;let o,r;for(let a=0;a<n;a++){o=s[a],r=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Y(t.x,-o.scroll.offset.x),Y(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,nn(t,r)),i&&rt(o.latestValues)&&Ft(t,o.latestValues,o.layout?.layoutBox))}e.x<xs&&e.x>vs&&(e.x=1),e.y<xs&&e.y>vs&&(e.y=1)}function Y(t,e){t.min+=e,t.max+=e}function bs(t,e,s,i,n=.5){const o=D(t.min,t.max,n);Se(t,e,s,o,i)}function As(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Ft(t,e,s){const i=s??t;bs(t.x,As(e.x,i.x),e.scaleX,e.scale,e.originX),bs(t.y,As(e.y,i.y),e.scaleY,e.scale,e.originY)}function rn(t,e){return Jo(Qo(t.getBoundingClientRect(),e))}function xl(t,e,s){const i=rn(t,s),{scroll:n}=e;return n&&(Y(i.x,n.offset.x),Y(i.y,n.offset.y)),i}const ea={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sa=Tt.length;function ia(t,e,s){let i="",n=!0;for(let r=0;r<sa;r++){const a=Tt[r],u=t[a];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(a.startsWith("scale")?1:0);else{const l=parseFloat(u);c=a.startsWith("scale")?l===1:l===0}if(!c||s){const l=be(u,Kt[a]);if(!c){n=!1;const h=ea[a]||a;i+=`${h}(${l}) `}s&&(e[a]=l)}}const o=t.pathRotation;return o&&(n=!1,i+=`rotate(${be(o,Kt.pathRotation)}) `),i=i.trim(),s?i=s(e,n?"":i):n&&(i="none"),i}function on(t,e,s){const{style:i,vars:n,transformOrigin:o}=t;let r=!1,a=!1;for(const u in e){const c=e[u];if(vt.has(u)){r=!0;continue}else if(di(u)){n[u]=c;continue}else{const l=be(c,Kt[u]);u.startsWith("origin")?(a=!0,o[u]=l):i[u]=l}}if(e.transform||(r||s?i.transform=ia(e,t.transform,s):i.transform&&(i.transform="none")),a){const{originX:u="50%",originY:c="50%",originZ:l=0}=o;i.transformOrigin=`${u} ${c} ${l}`}}function an(t,{style:e,vars:s},i,n){const o=t.style;let r;for(r in e)o[r]=e[r];n?.applyProjectionStyles(o,i);for(r in s)o.setProperty(r,s[r])}function Vs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const xt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(m.test(t))t=parseFloat(t);else return t;const s=Vs(t,e.target.x),i=Vs(t,e.target.y);return`${s}% ${i}%`}},na={correct:(t,{treeScale:e,projectionDelta:s})=>{const i=t,n=_.parse(t);if(n.length>5)return i;const o=_.createTransformer(t),r=typeof n[0]!="number"?1:0,a=s.x.scale*e.x,u=s.y.scale*e.y;n[0+r]/=a,n[1+r]/=u;const c=D(a,u,.5);return typeof n[2+r]=="number"&&(n[2+r]/=c),typeof n[3+r]=="number"&&(n[3+r]/=c),o(n)}},we={borderRadius:{...xt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xt,borderTopRightRadius:xt,borderBottomLeftRadius:xt,borderBottomRightRadius:xt,boxShadow:na};function ra(t,{layout:e,layoutId:s}){return vt.has(t)||t.startsWith("origin")||(e||s!==void 0)&&(!!we[t]||t==="opacity")}function ln(t,e,s){const i=t.style,n=e?.style,o={};if(!i)return o;for(const r in i)(j(i[r])||n&&j(n[r])||ra(r,t)||s?.getValue(r)?.liveStyle!==void 0)&&(o[r]=i[r]);return o}function oa(t){return window.getComputedStyle(t)}class bl extends en{constructor(){super(...arguments),this.type="html",this.renderInstance=an}readValueFromInstance(e,s){if(vt.has(s))return this.projection?.isProjecting?he(s):Pr(e,s);{const i=oa(e),n=(di(s)?i.getPropertyValue(s):i[s])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:s}){return rn(e,s)}build(e,s,i){on(e,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,s,i){return ln(e,s,i)}}function aa(t,e){return t in e}class Al extends tn{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,s){if(aa(s,e)){const i=e[s];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,s){delete s.output[e]}measureInstanceViewportBox(){return B()}build(e,s){Object.assign(e.output,s)}renderInstance(e,{output:s}){Object.assign(e,s)}sortInstanceNodePosition(){return 0}}const la={offset:"stroke-dashoffset",array:"stroke-dasharray"},ua={offset:"strokeDashoffset",array:"strokeDasharray"};function ca(t,e,s=1,i=0,n=!0){t.pathLength=1;const o=n?la:ua;t[o.offset]=`${-i}`,t[o.array]=`${e} ${s}`}const ha=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fa(t,{attrX:e,attrY:s,attrScale:i,pathLength:n,pathSpacing:o=1,pathOffset:r=0,...a},u,c,l){if(on(t,a,c),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;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=l?.transformBox??"fill-box",delete h.transformBox);for(const d of ha)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),s!==void 0&&(h.y=s),i!==void 0&&(h.scale=i),n!==void 0&&ca(h,n,o,r,!1)}const un=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"]),da=t=>typeof t=="string"&&t.toLowerCase()==="svg";function pa(t,e,s,i){an(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(un.has(n)?n:We(n),e.attrs[n])}function ma(t,e,s){const i=ln(t,e,s);for(const n in t)if(j(t[n])||j(e[n])){const o=Tt.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;i[o]=t[n]}return i}class Vl extends en{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=B}getBaseTargetFromProps(e,s){return e[s]}readValueFromInstance(e,s){if(vt.has(s)){const i=zi(s);return i&&i.default||0}return s=un.has(s)?s:We(s),e.getAttribute(s)}scrapeMotionValuesFromProps(e,s,i){return ma(e,s,i)}build(e,s,i){fa(e,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,s,i,n){pa(e,s,i,n)}mount(e){this.isSVGTag=da(e.tagName),super.mount(e)}}const ya=Xe.length;function cn(t){if(!t)return;if(!t.isControllingVariants){const s=t.parent?cn(t.parent)||{}:{};return t.props.initial!==void 0&&(s.initial=t.props.initial),s}const e={};for(let s=0;s<ya;s++){const i=Xe[s],n=t.props[i];($e(n)||n===!1)&&(e[i]=n)}return e}function hn(t,e){if(!Array.isArray(e))return!1;const s=e.length;if(s!==t.length)return!1;for(let i=0;i<s;i++)if(e[i]!==t[i])return!1;return!0}const ga=[..._e].reverse(),Ta=_e.length;function va(t){return e=>Promise.all(e.map(({animation:s,options:i})=>go(t,s,i)))}function Sl(t){let e=va(t),s=Ss(),i=!0,n=!1;const o=c=>(l,h)=>{const f=pt(t,h,c==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:p,...y}=f;l={...l,...y,...p}}return l};function r(c){e=c(t)}function a(c){const{props:l}=t,h=cn(t.parent)||{},f=[],d=new Set;let p={},y=1/0;for(let T=0;T<Ta;T++){const b=ga[T],v=s[b],x=l[b]!==void 0?l[b]:h[b],S=$e(x),P=b===c?v.isActive:null;P===!1&&(y=T);let w=x===h[b]&&x!==l[b]&&S;if(w&&(i||n)&&t.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...p},!v.isActive&&P===null||!x&&!v.prevProp||Zi(x)||typeof x=="boolean")continue;if(b==="exit"&&v.isActive&&P!==!0){v.prevResolvedValues&&(p={...p,...v.prevResolvedValues});continue}const V=xa(v.prevProp,x);let k=V||b===c&&v.isActive&&!w&&S||T>y&&S,A=!1;const M=Array.isArray(x)?x:[x];let O=M.reduce(o(b),{});P===!1&&(O={});const{prevResolvedValues:st={}}=v,X={...st,...O},G=E=>{k=!0,d.has(E)&&(A=!0,d.delete(E)),v.needsAnimating[E]=!0;const N=t.getValue(E);N&&(N.liveStyle=!1)};for(const E in X){const N=O[E],it=st[E];if(p.hasOwnProperty(E))continue;let ct=!1;ge(N)&&ge(it)?ct=!hn(N,it)||V:ct=N!==it,ct?N!=null?G(E):d.add(E):N!==void 0&&d.has(E)?G(E):v.protectedKeys[E]=!0}v.prevProp=x,v.prevResolvedValues=O,v.isActive&&(p={...p,...O}),(i||n)&&t.blockInitialAnimation&&(k=!1);const H=w&&V;k&&(!H||A)&&f.push(...M.map(E=>{const N={type:b};if(typeof E=="string"&&(i||n)&&!H&&t.manuallyAnimateOnMount&&t.parent){const{parent:it}=t,ct=pt(it,E);if(it.enteringChildren&&ct){const{delayChildren:bn}=ct.transition||{};N.delay=Ei(it.enteringChildren,t,bn)}}return{animation:E,options:N}}))}if(d.size){const T={};if(typeof l.initial!="boolean"){const b=pt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);b&&b.transition&&(T.transition=b.transition)}d.forEach(b=>{const v=t.getBaseTarget(b),x=t.getValue(b);x&&(x.liveStyle=!0),T[b]=v??null}),f.push({animation:T})}let g=!!f.length;return i&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(g=!1),i=!1,n=!1,g?e(f):Promise.resolve()}function u(c,l){if(s[c].isActive===l)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),s[c].isActive=l;const h=a(c);for(const f in s)s[f].protectedKeys={};return h}return{animateChanges:a,setActive:u,setAnimateFunction:r,getState:()=>s,reset:()=>{s=Ss(),n=!0}}}function xa(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!hn(e,t):!1}function nt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ss(){return{animate:nt(!0),whileInView:nt(),whileHover:nt(),whileTap:nt(),whileDrag:nt(),whileFocus:nt(),exit:nt()}}function Pe(t,e){t.min=e.min,t.max=e.max}function K(t,e){Pe(t.x,e.x),Pe(t.y,e.y)}function ws(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const fn=1e-4,ba=1-fn,Aa=1+fn,dn=.01,Va=0-dn,Sa=0+dn;function U(t){return t.max-t.min}function wa(t,e,s){return Math.abs(t-e)<=s}function Ps(t,e,s,i=.5){t.origin=i,t.originPoint=D(e.min,e.max,t.origin),t.scale=U(s)/U(e),t.translate=D(s.min,s.max,t.origin)-t.originPoint,(t.scale>=ba&&t.scale<=Aa||isNaN(t.scale))&&(t.scale=1),(t.translate>=Va&&t.translate<=Sa||isNaN(t.translate))&&(t.translate=0)}function St(t,e,s,i){Ps(t.x,e.x,s.x,i?i.originX:void 0),Ps(t.y,e.y,s.y,i?i.originY:void 0)}function Ds(t,e,s,i=0){const n=i?D(s.min,s.max,i):s.min;t.min=n+e.min,t.max=t.min+U(e)}function Pa(t,e,s,i){Ds(t.x,e.x,s.x,i?.x),Ds(t.y,e.y,s.y,i?.y)}function Rs(t,e,s,i=0){const n=i?D(s.min,s.max,i):s.min;t.min=e.min-n,t.max=t.min+U(e)}function $t(t,e,s,i){Rs(t.x,e.x,s.x,i?.x),Rs(t.y,e.y,s.y,i?.y)}function Ms(t,e,s,i,n){return t-=e,t=zt(t,1/s,i),n!==void 0&&(t=zt(t,1/n,i)),t}function Da(t,e=0,s=1,i=.5,n,o=t,r=t){if(Z.test(e)&&(e=parseFloat(e),e=D(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=D(o.min,o.max,i);t===o&&(a-=e),t.min=Ms(t.min,e,s,a,n),t.max=Ms(t.max,e,s,a,n)}function Cs(t,e,[s,i,n],o,r){Da(t,e[s],e[i],e[n],e.scale,o,r)}const Ra=["x","scaleX","originX"],Ma=["y","scaleY","originY"];function Bs(t,e,s,i){Cs(t.x,e,Ra,s?s.x:void 0,i?i.x:void 0),Cs(t.y,e,Ma,s?s.y:void 0,i?i.y:void 0)}function ks(t){return t.translate===0&&t.scale===1}function pn(t){return ks(t.x)&&ks(t.y)}function Es(t,e){return t.min===e.min&&t.max===e.max}function Ca(t,e){return Es(t.x,e.x)&&Es(t.y,e.y)}function Ls(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function mn(t,e){return Ls(t.x,e.x)&&Ls(t.y,e.y)}function Fs(t){return U(t.x)/U(t.y)}function Is(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Os(t){return[t("x"),t("y")]}function Ba(t,e,s){let i="";const n=t.x.translate/e.x,o=t.y.translate/e.y,r=s?.z||0;if((n||o||r)&&(i=`translate3d(${n}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),s){const{transformPerspective:c,rotate:l,pathRotation:h,rotateX:f,rotateY:d,skewX:p,skewY:y}=s;c&&(i=`perspective(${c}px) ${i}`),l&&(i+=`rotate(${l}deg) `),h&&(i+=`rotate(${h}deg) `),f&&(i+=`rotateX(${f}deg) `),d&&(i+=`rotateY(${d}deg) `),p&&(i+=`skewX(${p}deg) `),y&&(i+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(i+=`scale(${a}, ${u})`),i||"none"}const yn=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ka=yn.length,js=t=>typeof t=="string"?parseFloat(t):t,Ns=t=>typeof t=="number"||m.test(t);function Ea(t,e,s,i,n,o){n?(t.opacity=D(0,s.opacity??1,La(i)),t.opacityExit=D(e.opacity??1,0,Fa(i))):o&&(t.opacity=D(e.opacity??1,s.opacity??1,i));for(let r=0;r<ka;r++){const a=yn[r];let u=Us(e,a),c=Us(s,a);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||Ns(u)===Ns(c)?(t[a]=Math.max(D(js(u),js(c),i),0),(Z.test(c)||Z.test(u))&&(t[a]+="%")):t[a]=c}(e.rotate||s.rotate)&&(t.rotate=D(e.rotate||0,s.rotate||0,i))}function Us(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const La=gn(0,.5,oi),Fa=gn(.5,.95,et);function gn(t,e,s){return i=>i<t?0:i>e?1:s(Ce(t,e,i))}function Ia(t,e,s){const i=j(t)?t:yt(t);return i.start(Fi("",i,e,s)),i.animation}function Oa(t,e,s,i={passive:!0}){return t.addEventListener(e,s,i),()=>t.removeEventListener(e,s)}const ja=(t,e)=>t.depth-e.depth;class Na{constructor(){this.children=[],this.isDirty=!1}add(e){De(this.children,e),this.isDirty=!0}remove(e){It(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ja),this.isDirty=!1,this.children.forEach(e)}}function Ua(t,e){const s=I.now(),i=({timestamp:n})=>{const o=n-s;o>=e&&(ut(i),t(o-e))};return L.setup(i,!0),()=>ut(i)}function te(t){return j(t)?t.get():t}class Ka{constructor(){this.members=[]}add(e){De(this.members,e);for(let s=this.members.length-1;s>=0;s--){const i=this.members[s];if(i===e||i===this.lead||i===this.prevLead)continue;const n=i.instance;(!n||n.isConnected===!1)&&!i.snapshot&&(It(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(It(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,s){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:n}=i.options,{layoutDependency:o}=e.options;(n===void 0||n!==o)&&(e.resumeFrom=i,s&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const ee={hasAnimatedSinceResize:!0,hasEverUpdated:!1},se=["","X","Y","Z"],Wa=1e3;let za=0;function ie(t,e,s,i){const{latestValues:n}=e;n[t]&&(s[t]=n[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Tn(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=Ni(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:n,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",L,!(n||o))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Tn(i)}function vn({attachResizeListener:t,defaultParent:e,measureScroll:s,checkIsScrollRoot:i,resetTransform:n}){return class{constructor(r={},a=e?.()){this.id=za++,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(Xa),this.nodes.forEach(Ja),this.nodes.forEach(Qa),this.nodes.forEach(Ha)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Na)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Be),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const u=this.eventHandlers.get(r);u&&u.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=ze(r)&&!$o(r),this.instance=r;const{layoutId:a,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let l,h=0;const f=()=>this.root.updateBlockedByResize=!1;L.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,l&&l(),l=Ua(f,250),ee.hasAnimatedSinceResize&&(ee.hasAnimatedSinceResize=!1,this.nodes.forEach(zs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||nl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=c.getProps(),T=!this.targetLayout||!mn(this.targetLayout,d),b=!h&&f;if(this.options.layoutRoot||this.resumeFrom||b||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Ke(p,"layout"),onPlay:y,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(l,b,v.path)}else h||zs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}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(),ut(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(tl),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&&Tn(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const h=this.path[l];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(Ga),this.nodes.forEach(Ks);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ws);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qa),this.nodes.forEach(Za),this.nodes.forEach($a),this.nodes.forEach(_a)):this.nodes.forEach(Ws),this.clearAllSnapshots();const a=I.now();F.delta=J(0,1e3/60,a-F.timestamp),F.timestamp=a,F.isProcessing=!0,Xt.update.process(F),Xt.preRender.process(F),Xt.render.process(F),F.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ya),this.sharedNodes.forEach(el)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=B()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const u=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:u,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!n)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!pn(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,l=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||rt(this.latestValues)||l)&&(n(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return r&&(u=this.removeTransform(u)),rl(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return B();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ol))){const{scroll:c}=this.root;c&&(Y(a.x,c.offset.x),Y(a.y,c.offset.y))}return a}removeElementScroll(r){const a=B();if(K(a,r),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:l,options:h}=c;c!==this.root&&l&&h.layoutScroll&&(l.wasRoot&&K(a,r),Y(a.x,l.offset.x),Y(a.y,l.offset.y))}return a}applyTransform(r,a=!1,u){const c=u||B();K(c,r);for(let l=0;l<this.path.length;l++){const h=this.path[l];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Y(c.x,-h.scroll.offset.x),Y(c.y,-h.scroll.offset.y)),rt(h.latestValues)&&Ft(c,h.latestValues,h.layout?.layoutBox)}return rt(this.latestValues)&&Ft(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(r){const a=B();K(a,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!rt(c.latestValues))continue;let l;c.instance&&(Ve(c.latestValues)&&c.updateSnapshot(),l=B(),K(l,c.measurePageBox())),Bs(a,c.latestValues,c.snapshot?.layoutBox,l)}return rt(this.latestValues)&&Bs(a,this.latestValues),a}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!==F.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:h}=this.options;if(!this.layout||!(l||h))return;this.resolvedRelativeTargetAt=F.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Pa(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):K(this.target,this.layout.layoutBox),nn(this.target,this.targetDelta)):K(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!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||Ve(this.parent.latestValues)||sn(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,a,u){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),$t(this.relativeTargetOrigin,a,u,this.options.layoutAnchor||void 0),K(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===F.timestamp&&(u=!1),u)return;const{layout:c,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||l))return;K(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;ta(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=B());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ws(this.prevProjectionDelta.x,this.projectionDelta.x),ws(this.prevProjectionDelta.y,this.projectionDelta.y)),St(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Is(this.projectionDelta.x,this.prevProjectionDelta.x)||!Is(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=dt(),this.projectionDelta=dt(),this.projectionDeltaWithTransform=dt()}setAnimationOrigin(r,a=!1,u){const c=this.snapshot,l=c?c.latestValues:{},h={...this.latestValues},f=dt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=B(),p=c?c.source:void 0,y=this.layout?this.layout.source:void 0,g=p!==y,T=this.getStack(),b=!T||T.members.length<=1,v=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(il));this.animationProgress=0;let x;const S=u?.interpolateProjection(r);this.mixTargetDelta=P=>{const w=P/1e3,V=S?.(w);V?(f.x.translate=V.x,f.x.scale=D(r.x.scale,1,w),f.x.origin=r.x.origin,f.x.originPoint=r.x.originPoint,f.y.translate=V.y,f.y.scale=D(r.y.scale,1,w),f.y.origin=r.y.origin,f.y.originPoint=r.y.originPoint):($s(f.x,r.x,w),$s(f.y,r.y,w)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($t(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),sl(this.relativeTarget,this.relativeTargetOrigin,d,w),x&&Ca(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=B()),K(x,this.relativeTarget)),g&&(this.animationValues=h,Ea(h,l,this.latestValues,w,v,b)),V&&V.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=V.rotate),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&&(ut(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{ee.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=yt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ia(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},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(Wa),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:u,layout:c,latestValues:l}=r;if(!(!a||!u||!c)){if(this!==r&&this.layout&&c&&xn(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||B();const h=U(this.layout.layoutBox.x);u.x.min=r.target.x.min,u.x.max=u.x.min+h;const f=U(this.layout.layoutBox.y);u.y.min=r.target.y.min,u.y.max=u.y.min+f}K(a,u),Ft(a,l),St(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Ka),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):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:a,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:u}=r;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const c={};u.z&&ie("z",r,c,this.animationValues);for(let l=0;l<se.length;l++)ie(`rotate${se[l]}`,r,c,this.animationValues),ie(`skew${se[l]}`,r,c,this.animationValues);r.render();for(const l in c)r.setStaticValue(l,c[l]),this.animationValues&&(this.animationValues[l]=c[l]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=te(a?.pointerEvents)||"",r.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=te(a?.pointerEvents)||""),this.hasProjected&&!rt(this.latestValues)&&(r.transform=u?u({},""):"none",this.hasProjected=!1);return}r.visibility="";const l=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Ba(this.projectionDeltaWithTransform,this.treeScale,l);u&&(h=u(l,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?r.opacity=c===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:r.opacity=c===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const p in we){if(l[p]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:T}=we[p],b=h==="none"?l[p]:y(l[p],c);if(g){const v=g.length;for(let x=0;x<v;x++)r[g[x]]=b}else T?this.options.visualElement.renderState.vars[p]=b:r[p]=b}this.options.layoutId&&(r.pointerEvents=c===this?te(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Ks),this.root.sharedNodes.clear()}}}function $a(t){t.updateLayout()}function _a(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:n}=t.options,o=e.source!==t.layout.source;if(n==="size")Os(l=>{const h=o?e.measuredBox[l]:e.layoutBox[l],f=U(h);h.min=s[l].min,h.max=h.min+f});else if(n==="x"||n==="y"){const l=n==="x"?"y":"x";Pe(o?e.measuredBox[l]:e.layoutBox[l],s[l])}else xn(n,e.layoutBox,s)&&Os(l=>{const h=o?e.measuredBox[l]:e.layoutBox[l],f=U(s[l]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[l].max=t.relativeTarget[l].min+f)});const r=dt();St(r,s,e.layoutBox);const a=dt();o?St(a,t.applyTransform(i,!0),e.measuredBox):St(a,s,e.layoutBox);const u=!pn(r);let c=!1;if(!t.resumeFrom){const l=t.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:h,layout:f}=l;if(h&&f){const d=t.options.layoutAnchor||void 0,p=B();$t(p,e.layoutBox,h.layoutBox,d);const y=B();$t(y,s,f.layoutBox,d),mn(p,y)||(c=!0),l.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=l)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Xa(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ha(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ya(t){t.clearSnapshot()}function Ks(t){t.clearMeasurements()}function Ga(t){t.isLayoutDirty=!0,t.updateLayout()}function Ws(t){t.isLayoutDirty=!1}function qa(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Za(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ja(t){t.resolveTargetDelta()}function Qa(t){t.calcProjection()}function tl(t){t.resetSkewAndRotation()}function el(t){t.removeLeadSnapshot()}function $s(t,e,s){t.translate=D(e.translate,0,s),t.scale=D(e.scale,1,s),t.origin=e.origin,t.originPoint=e.originPoint}function _s(t,e,s,i){t.min=D(e.min,s.min,i),t.max=D(e.max,s.max,i)}function sl(t,e,s,i){_s(t.x,e.x,s.x,i),_s(t.y,e.y,s.y,i)}function il(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const nl={duration:.45,ease:[.4,0,.1,1]},Xs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Hs=Xs("applewebkit/")&&!Xs("chrome/")?Math.round:et;function Ys(t){t.min=Hs(t.min),t.max=Hs(t.max)}function rl(t){Ys(t.x),Ys(t.y)}function xn(t,e,s){return t==="position"||t==="preserve-aspect"&&!wa(Fs(e),Fs(s),.2)}function ol(t){return t!==t.root&&t.scroll?.wasRoot}const al=vn({attachResizeListener:(t,e)=>Oa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ne={current:void 0},Pl=vn({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ne.current){const t=new al({});t.mount(window),t.setOptions({layoutScroll:!0}),ne.current=t}return ne.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});export{It as $,z as A,D as B,U as C,Ce as D,J as E,Tl as F,B as G,bl as H,Os as I,xl as J,vl as K,Jo as L,ho as M,Fi as N,hl as O,ml as P,Z as Q,dl as R,Vl as S,et as T,Xi as U,ee as V,Pl as W,fl as X,pl as Y,_i as Z,ul as _,j as a,gr as a0,or as a1,yr as a2,si as a3,Mi as a4,ze as a5,$o as a6,Ho as a7,Al as a8,Ia as a9,Ui as aa,yt as ab,Nt as ac,cl as ad,Ji as b,$e as c,ra as d,on as e,fa as f,gl as g,da as h,Mo as i,Yo as j,Zi as k,Oi as l,ln as m,ma as n,po as o,Sl as p,pt as q,te as r,yl as s,Bo as t,Oa as u,F as v,L as w,Me as x,ut as y,$ as z};
|