1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31713,t=>{"use strict";let e,i,s,r,n,a;var o,h=t.i(43476),l=t.i(71645);let u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],d=new Set(u),c=t=>180*t/Math.PI,p=t=>f(c(Math.atan2(t[1],t[0]))),m={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:p,rotateZ:p,skewX:t=>c(Math.atan(t[1])),skewY:t=>c(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},f=t=>((t%=360)<0&&(t+=360),t),g=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),y=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),v={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:g,scaleY:y,scale:t=>(g(t)+y(t))/2,rotateX:t=>f(c(Math.atan2(t[6],t[5]))),rotateY:t=>f(c(Math.atan2(-t[2],t[0]))),rotateZ:p,rotate:p,skewX:t=>c(Math.atan(t[4])),skewY:t=>c(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function x(t){return+!!t.includes("scale")}function b(t,e){let i,s;if(!t||"none"===t)return x(e);let r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(r)i=v,s=r;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=m,s=e}if(!s)return x(e);let n=i[e],a=s[1].split(",").map(w);return"function"==typeof n?n(a):a[n]}function w(t){return parseFloat(t.trim())}let A=t=>e=>"string"==typeof e&&e.startsWith(t),M=A("--"),T=A("var(--"),S=t=>!!T(t)&&E.test(t.split("/*")[0].trim()),E=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function P({top:t,left:e,right:i,bottom:s}){return{x:{min:e,max:i},y:{min:t,max:s}}}let C=(t,e,i)=>t+(e-t)*i;function F(t){return void 0===t||1===t}function k({scale:t,scaleX:e,scaleY:i}){return!F(t)||!F(e)||!F(i)}function R(t){return k(t)||V(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function V(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function j(t,e,i,s,r){return void 0!==r&&(t=s+r*(t-s)),s+i*(t-s)+e}function D(t,e=0,i=1,s,r){t.min=j(t.min,e,i,s,r),t.max=j(t.max,e,i,s,r)}function L(t,{x:e,y:i}){D(t.x,e.translate,e.scale,e.originPoint),D(t.y,i.translate,i.scale,i.originPoint)}function _(t,e){t.min=t.min+e,t.max=t.max+e}function O(t,e,i,s,r=.5){let n=C(t.min,t.max,r);D(t,e,i,n,s)}function B(t,e){O(t.x,e.x,e.scaleX,e.scale,e.originX),O(t.y,e.y,e.scaleY,e.scale,e.originY)}function N(t,e){return P(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}let I=new Set(["width","height","top","left","right","bottom",...u]),U=(t,e,i)=>i>e?e:i<t?t:i,z={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},W={...z,transform:t=>U(0,1,t)},$={...z,default:1},q=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),X=q("deg"),Y=q("%"),H=q("px"),G=q("vh"),K=q("vw"),Z={...Y,parse:t=>Y.parse(t)/100,transform:t=>Y.transform(100*t)},Q=t=>e=>e.test(t),J=[z,H,Y,X,K,G,{test:t=>"auto"===t,parse:t=>t}],tt=t=>J.find(Q(t));t.i(47167);let te=()=>{},ti=()=>{},ts=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tr=t=>t===z||t===H,tn=new Set(["x","y","z"]),ta=u.filter(t=>!tn.has(t)),to={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),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})=>b(e,"x"),y:(t,{transform:e})=>b(e,"y")};to.translateX=to.x,to.translateY=to.y;let th=t=>t,tl={},tu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function td(t,e){let i=!1,s=!0,r={delta:0,timestamp:0,isProcessing:!1},n=()=>i=!0,a=tu.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,s=new Set,r=!1,n=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},h=0;function l(e){a.has(e)&&(u.schedule(e),t()),h++,e(o)}let u={schedule:(t,e=!1,n=!1)=>{let o=n&&r?i:s;return e&&a.add(t),o.has(t)||o.add(t),t},cancel:t=>{s.delete(t),a.delete(t)},process:t=>{if(o=t,r){n=!0;return}
1r=!0,[i,s]=[s,i],i.forEach(l),e,h=0,i.clear(),r=!1,n&&(n=!1,u.process(t))}};return u}(n,e?i:void 0),t),{}),{setup:o,read:h,resolveKeyframes:l,preUpdate:u,update:d,preRender:c,render:p,postRender:m}=a,f=()=>{let n=tl.useManualTiming?r.timestamp:performance.now();i=!1,tl.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(n-r.timestamp,40),1)),r.timestamp=n,r.isProcessing=!0,o.process(r),h.process(r),l.process(r),u.process(r),d.process(r),c.process(r),p.process(r),m.process(r),r.isProcessing=!1,i&&e&&(s=!1,t(f))};return{schedule:tu.reduce((e,n)=>{let o=a[n];return e[n]=(e,n=!1,a=!1)=>(!i&&(i=!0,s=!0,r.isProcessing||t(f)),o.schedule(e,n,a)),e},{}),cancel:t=>{for(let e=0;e<tu.length;e++)a[tu[e]].cancel(t)},state:r,steps:a}}let{schedule:tc,cancel:tp,state:tm,steps:tf}=td("u">typeof requestAnimationFrame?requestAnimationFrame:th,!0),tg=new Set,ty=!1,tv=!1,tx=!1;function tb(){if(tv){let t=Array.from(tg).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e,s=(e=[],ta.forEach(i=>{let s=t.getValue(i);void 0!==s&&(e.push([i,s.get()]),s.set(+!!i.startsWith("scale")))}),e);s.length&&(i.set(t,s),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tv=!1,ty=!1,tg.forEach(t=>t.complete(tx)),tg.clear()}function tw(){tg.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tv=!0)})}class tA{constructor(t,e,i,s,r,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=s,this.element=r,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(tg.add(this),ty||(ty=!0,tc.read(tw),tc.resolveKeyframes(tb))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:s}=this;if(null===t[0]){let r=s?.get(),n=t[t.length-1];if(void 0!==r)t[0]=r;else if(i&&e){let s=i.readValue(e,n);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=n),s&&void 0===r&&s.set(t[0])}for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),tg.delete(this)}cancel(){"scheduled"===this.state&&(tg.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let tM=t=>Math.round(1e5*t)/1e5,tT=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,tS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tE=(t,e)=>i=>!!("string"==typeof i&&tS.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),tP=(t,e,i)=>s=>{if("string"!=typeof s)return s;let[r,n,a,o]=s.match(tT);return{[t]:parseFloat(r),[e]:parseFloat(n),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},tC={...z,transform:t=>Math.round(U(0,255,t))},tF={test:tE("rgb","red"),parse:tP("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:s=1})=>"rgba("+tC.transform(t)+", "+tC.transform(e)+", "+tC.transform(i)+", "+tM(W.transform(s))+")"},tk={test:tE("#"),parse:function(t){let e="",i="",s="",r="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,i+=i,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:tF.transform},tR={test:tE("hsl","hue"),parse:tP("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:s=1})=>"hsla("+Math.round(t)+", "+Y.transform(tM(e))+", "+Y.transform(tM(i))+", "+tM(W.transform(s))+")"},tV={test:t=>tF.test(t)||tk.test(t)||tR.test(t),parse:t=>tF.test(t)?tF.parse(t):tR.test(t)?tR.parse(t):tk.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?tF.transform(t):tR.transform(t),getAnimatableNone:t=>{let e=tV.parse(t);return e.alpha=0,tV.transform(e)}},tj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,tD="number",tL="color",t_=/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 tO(t){let e=t.toString(),i=[],s={color:[],number:[],var:[]},r=[],n=0,a=e.replace(t_,t=>(tV.test(t)?(s.color.push(n),r.push(tL),i.push(tV.parse(t))):t.startsWith("var(")?(s.var.push(n),r.push("var"),i.push(t)):(s.number.push(n),r.push(tD),i.push(parseFloat(t))),++n,"${}")).split("${}");return{values:i,split:a,indexes:s,types:r}}function tB(t){return tO(t).values}function tN(t){let{split:e,types:i}=tO(t),s=e.length;return t=>{let r="";for(let n=0;n<s;n++)if(r+=e[n],void 0!==t[n]){let e=i[n];e===tD?r+=tM(t[n]):e===tL?r+=tV.transform(t[n]):r+=t[n]}return r}}let tI=t=>"number"==typeof t?0:tV.test(t)?tV.getAnimatableNone(t):t,tU={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(tT)?.length||0)+(t.match(tj)?.length||0)>0},parse:tB,createTransformer:tN,getAnimatableNone:function(t){let e=tB(t);return tN(t)(e.map(tI))}},tz=new Set(["brightness","contrast","saturate","opacity"]);function tW(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[s]=i.match(tT)||[];if(!s)return t;let r=i.replace(s,""),n=+!!tz.has(e);return s!==i&&(n*=100),e+"("+n+r+")"}let t$=/\b([a-z-]*)\(.*?\)/gu,tq={...tU,getAnimatableNone:t=>{let e=t.match(t$);return e?e.map(tW).join(" "):t}},tX={...z,transform:Math.round},tY={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,top:H,right:H,bottom:H,left:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,backgroundPositionX:H,backgroundPositionY:H,rotate:X,rotateX:X,rotateY:X,rotateZ:X,scale:$,scaleX:$,scaleY:$,scaleZ:$,skew:X,skewX:X,skewY:X,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:W,originX:Z,originY:Z,originZ:H,zIndex:tX,fillOpacity:W,strokeOpacity:W,numOctaves:tX},tH={...tY,color:tV,backgroundColor:tV,outlineColor:tV,fill:tV,stroke:tV,borderColor:tV,borderTopColor:tV,borderRightColor:tV,borderBottomColor:tV,borderLeftColor:tV,filter:tq,WebkitFilter:tq},tG=t=>tH[t];function tK(t,e){let i=tG(t);return i!==tq&&(i=tU),i.getAnimatableNone?i.getAnimatableNone(e):void 0}
1let tZ=new Set(["auto","none","0"]);class tQ extends tA{constructor(t,e,i,s,r){super(t,e,i,s,r,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let s=t[i];if("string"==typeof s&&S(s=s.trim())){let r=function t(e,i,s=1){ti(s<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,n]=function(t){let e=ts.exec(t);if(!e)return[,];let[,i,s,r]=e;return[`--${i??s}`,r]}(e);if(!r)return;let a=window.getComputedStyle(i).getPropertyValue(r);if(a){let t=a.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t)?parseFloat(t):t}return S(n)?t(n,i,s+1):n}(s,e.current);void 0!==r&&(t[i]=r),i===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!I.has(i)||2!==t.length)return;let[s,r]=t,n=tt(s),a=tt(r);if(n!==a)if(tr(n)&&tr(a))for(let e=0;e<t.length;e++){let i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else to[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++)(null===t[e]||function(t){if("number"==typeof t)return 0===t;if(null===t)return!0;return"none"===t||"0"===t||/^0[^.\s]+$/u.test(t)}(t[e]))&&i.push(e);i.length&&function(t,e,i){let s,r=0;for(;r<t.length&&!s;){let e=t[r];"string"==typeof e&&!tZ.has(e)&&tO(e).values.length&&(s=t[r]),r++}if(s&&i)for(let r of e)t[r]=tK(i,s)}(t,i,e)}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=to[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;let s=e[e.length-1];void 0!==s&&t.getValue(i,s).jump(s,!1)}measureEndState(){let{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;let s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);let r=i.length-1,n=i[r];i[r]=to[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let tJ=t=>!!(t&&t.getVelocity);function t0(){e=void 0}let t1={now:()=>(void 0===e&&t1.set(tm.isProcessing||tl.useManualTiming?tm.timestamp:performance.now()),e),set:t=>{e=t,queueMicrotask(t0)}};function t2(t,e){-1===t.indexOf(e)&&t.push(e)}function t3(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class t5{constructor(){this.subscriptions=[]}add(t){return t2(this.subscriptions,t),()=>t3(this.subscriptions,t)}notify(t,e,i){let s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,i);else for(let r=0;r<s;r++){let s=this.subscriptions[r];s&&s(t,e,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class t4{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=t1.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=t1.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new t5);let i=this.events[t].add(e);return"change"===t?()=>{i(),tc.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return a&&a.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=t1.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function t6(t,e){return new t4(t,e)}let t9=[...J,tV,tU],{schedule:t8}=td(queueMicrotask,!1),t7={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},et={};for(let t in t7)et[t]={isEnabled:e=>t7[t].some(t=>!!e[t])};let ee=()=>({translate:0,scale:1,origin:0,originPoint:0}),ei=()=>({x:ee(),y:ee()}),es=()=>({min:0,max:0}),er=()=>({x:es(),y:es()}),en="u">typeof window,ea={current:null},eo={current:!1},eh=new WeakMap;function el(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function eu(t){return"string"==typeof t||Array.isArray(t)}let ed=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ec=["initial",...ed];function ep(t){return el(t.animate)||ec.some(e=>eu(t[e]))}function em(t){return!!(ep(t)||t.variants)}function ef(t){let e=[{},{}];
1return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function eg(t,e,i,s){if("function"==typeof e){let[r,n]=ef(s);e=e(void 0!==i?i:t.custom,r,n)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[r,n]=ef(s);e=e(void 0!==i?i:t.custom,r,n)}return e}let ey=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ev{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:r,visualState:n},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=t1.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,tc.render(this.render,!1,!0))};const{latestValues:o,renderState:h}=n;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=h,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=ep(e),this.isVariantNode=em(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==o[t]&&tJ(e)&&e.set(o[t])}}mount(t){this.current=t,eh.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),eo.current||function(){if(eo.current=!0,en)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ea.current=t.matches;t.addEventListener("change",e),e()}else ea.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ea.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in this.projection&&this.projection.unmount(),tp(this.notifyUpdate),tp(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){let i;this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let s=d.has(t);s&&this.onBindTransform&&this.onBindTransform();let r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tc.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in et){let e=et[t];if(!e)continue;let{isEnabled:i,Feature:s}=e;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):er()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<ey.length;e++){let i=ey[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s=t["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}
1this.prevMotionValues=function(t,e,i){for(let s in e){let r=e[s],n=i[s];if(tJ(r))t.addValue(s,r);else if(tJ(n))t.addValue(s,t6(r,{owner:t}));else if(n!==r)if(t.hasValue(s)){let e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{let e=t.getStaticValue(s);t.addValue(s,t6(void 0!==e?e:r,{owner:t}))}}for(let s in i)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=t6(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];if(null!=i){let s,r;if("string"==typeof i&&(s=i,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(s)||(r=i,/^0[^.\s]+$/u.test(r))))i=parseFloat(i);else{let s;s=i,!t9.find(Q(s))&&tU.test(e)&&(i=tK(t,e))}this.setBaseTarget(t,tJ(i)?i.get():i)}return tJ(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let s=eg(this.props,i,this.presenceContext?.custom);s&&(e=s[t])}if(i&&void 0!==e)return e;let s=this.getBaseTargetFromProps(this.props,t);return void 0===s||tJ(s)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new t5),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){t8.render(this.render)}}class ex extends ev{constructor(){super(...arguments),this.KeyframeResolver=tQ}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;tJ(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}let eb=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ew={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eA=u.length;function eM(t,e,i){let{style:s,vars:r,transformOrigin:n}=t,a=!1,o=!1;for(let t in e){let i=e[t];if(d.has(t)){a=!0;continue}if(M(t)){r[t]=i;continue}{let e=eb(i,tY[t]);t.startsWith("origin")?(o=!0,n[t]=e):s[t]=e}}if(!e.transform&&(a||i?s.transform=function(t,e,i){let s="",r=!0;for(let n=0;n<eA;n++){let a=u[n],o=t[a];if(void 0===o)continue;let h=!0;if(!(h="number"==typeof o?o===+!!a.startsWith("scale"):0===parseFloat(o))||i){let t=eb(o,tY[a]);if(!h){r=!1;let e=ew[a]||a;s+=`${e}(${t}) `}i&&(e[a]=t)}}return s=s.trim(),i?s=i(e,r?"":s):r&&(s="none"),s}(e,t.transform,i):s.transform&&(s.transform="none")),o){let{originX:t="50%",originY:e="50%",originZ:i=0}=n;s.transformOrigin=`${t} ${e} ${i}`}}function eT(t,{style:e,vars:i},s,r){let n,a=t.style;for(n in e)a[n]=e[n];for(n in r?.applyProjectionStyles(a,s),i)a.setProperty(n,i[n])}let eS={};function eE(t,{layout:e,layoutId:i}){return d.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!eS[t]||"opacity"===t)}function eP(t,e,i){let{style:s}=t,r={};for(let n in s)(tJ(s[n])||e.style&&tJ(e.style[n])||eE(n,t)||i?.getValue(n)?.liveStyle!==void 0)&&(r[n]=s[n]);return r}class eC extends ex{constructor(){super(...arguments),this.type="html",this.renderInstance=eT}readValueFromInstance(t,e){if(d.has(e))return this.projection?.isProjecting?x(e):((t,e)=>{let{transform:i="none"}=getComputedStyle(t);return b(i,e)})(t,e);{let i=window.getComputedStyle(t),s=(M(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:e}){return N(t,e)}build(t,e,i){eM(t,e,i.transformTemplate)}
1scrapeMotionValuesFromProps(t,e,i){return eP(t,e,i)}}let eF=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ek={offset:"stroke-dashoffset",array:"stroke-dasharray"},eR={offset:"strokeDashoffset",array:"strokeDasharray"};function eV(t,{attrX:e,attrY:i,attrScale:s,pathLength:r,pathSpacing:n=1,pathOffset:a=0,...o},h,l,u){if(eM(t,o,l),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:d,style:c}=t;d.transform&&(c.transform=d.transform,delete d.transform),(c.transform||d.transformOrigin)&&(c.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),c.transform&&(c.transformBox=u?.transformBox??"fill-box",delete d.transformBox),void 0!==e&&(d.x=e),void 0!==i&&(d.y=i),void 0!==s&&(d.scale=s),void 0!==r&&function(t,e,i=1,s=0,r=!0){t.pathLength=1;let n=r?ek:eR;t[n.offset]=H.transform(-s);let a=H.transform(e),o=H.transform(i);t[n.array]=`${a} ${o}`}(d,r,n,a,!1)}let ej=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"]),eD=t=>"string"==typeof t&&"svg"===t.toLowerCase();function eL(t,e,i){let s=eP(t,e,i);for(let i in t)(tJ(t[i])||tJ(e[i]))&&(s[-1!==u.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return s}class e_ extends ex{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=er}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(d.has(e)){let t=tG(e);return t&&t.default||0}return e=ej.has(e)?e:eF(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return eL(t,e,i)}build(t,e,i){eV(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,s){for(let i in eT(t,e,void 0,s),e.attrs)t.setAttribute(ej.has(i)?i:eF(i),e.attrs[i])}mount(t){this.isSVGTag=eD(t.tagName),super.mount(t)}}let eO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function eB(t){if("string"!=typeof t||t.includes("-"));else if(eO.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}let eN=(0,l.createContext)({}),eI=(0,l.createContext)({strict:!1}),eU=(0,l.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ez=(0,l.createContext)({});function eW(t){return Array.isArray(t)?t.join(" "):t}let e$=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eq(t,e,i){for(let s in e)tJ(e[s])||eE(s,i)||(t[s]=e[s])}let eX=()=>({...e$(),attrs:{}}),eY=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function eH(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||eY.has(t)}let eG=t=>!eH(t);try{o=(()=>{let t=Error("Cannot find module '@emotion/is-prop-valid'");throw t.code="MODULE_NOT_FOUND",t})().default,"function"==typeof o&&(eG=t=>t.startsWith("on")?!eH(t):o(t))}catch{}let eK=(0,l.createContext)(null);function eZ(t){return tJ(t)?t.get():t}let eQ=t=>(e,i)=>{let s,r=(0,l.useContext)(ez),n=(0,l.useContext)(eK),a=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e},i,s,r){return{latestValues:function(t,e,i,s){let r={},n=s(t,{});for(let t in n)r[t]=eZ(n[t]);let{initial:a,animate:o}=t,h=ep(t),l=em(t);e&&l&&!h&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===o&&(o=e.animate));let u=!!i&&!1===i.initial,d=(u=u||!1===a)?o:a;if(d&&"boolean"!=typeof d&&!el(d)){let e=Array.isArray(d)?d:[d];for(let i=0;i<e.length;i++){let s=eg(t,e[i]);if(s){let{transitionEnd:t,transition:e,...i}=s;for(let t in i){let e=i[t];if(Array.isArray(e)){let t=u?e.length-1:0;e=e[t]}null!==e&&(r[t]=e)}for(let e in t)r[e]=t[e]}}}return r}(i,s,r,t),renderState:e()}})(t,e,r,n);return i?a():(null===(s=(0,l.useRef)(null)).current&&(s.current=a()),s.current)},eJ=eQ({scrapeMotionValuesFromProps:eP,createRenderState:e$}),e0=eQ({scrapeMotionValuesFromProps:eL,createRenderState:eX}),e1=Symbol.for("motionComponentSymbol");function e2(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}let e3="data-"+eF("framerAppearId"),e5=(0,l.createContext)({}),e4=en?l.useLayoutEffect:l.useEffect;function e6(t,{forwardMotionProps:e=!1}={},i,s){i&&function(t){for(let e in t)et[e]={...et[e],...t[e]}}(i);let r=eB(t)?e0:eJ;function n(i,n){var a;let o,u={...(0,l.useContext)(eU),...i,layoutId:function({layoutId:t}){let e=(0,l.useContext)(eN).id;return e&&void 0!==t?e+"-"+t:t}(i)},{isStatic:d}=u,c=function(t){let{initial:e,animate:i}=function(t,e){if(ep(t)){let{initial:e,animate:i}=t;return{initial:!1===e||eu(e)?e:void 0,animate:eu(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,l.useContext)(ez));return(0,l.useMemo)(()=>({initial:e,animate:i}),[eW(e),eW(i)])}(i),p=r(i,d);if(!d&&en){(0,l.useContext)(eI).strict;let e=function(t){let{drag:e,layout:i}=et;if(!e&&!i)return{};let s={...e,...i};return{MeasureLayout:e?.isEnabled(t)||i?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}
1(u);o=e.MeasureLayout,c.visualElement=function(t,e,i,s,r){let{visualElement:n}=(0,l.useContext)(ez),a=(0,l.useContext)(eI),o=(0,l.useContext)(eK),h=(0,l.useContext)(eU).reducedMotion,u=(0,l.useRef)(null);s=s||a.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:n,props:i,presenceContext:o,blockInitialAnimation:!!o&&!1===o.initial,reducedMotionConfig:h}));let d=u.current,c=(0,l.useContext)(e5);d&&!d.projection&&r&&("html"===d.type||"svg"===d.type)&&function(t,e,i,s){let{layoutId:r,layout:n,drag:a,dragConstraints:o,layoutScroll:h,layoutRoot:l,layoutCrossfade:u}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:r,layout:n,alwaysMeasureLayout:!!a||o&&e2(o),visualElement:t,animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:h,layoutRoot:l})}(u.current,i,r,c);let p=(0,l.useRef)(!1);(0,l.useInsertionEffect)(()=>{d&&p.current&&d.update(i,o)});let m=i[e3],f=(0,l.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return e4(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),f.current&&d.animationState&&d.animationState.animateChanges())}),(0,l.useEffect)(()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),f.current=!1),d.enteringChildren=void 0)}),d}(t,p,u,s,e.ProjectionNode)}return(0,h.jsxs)(ez.Provider,{value:c,children:[o&&c.visualElement?(0,h.jsx)(o,{visualElement:c.visualElement,...u}):null,function(t,e,i,{latestValues:s},r,n=!1){let a=(eB(t)?function(t,e,i,s){let r=(0,l.useMemo)(()=>{let i=eX();return eV(i,e,eD(s),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};eq(e,t.style,t),r.style={...e,...r.style}}return r}:function(t,e){let i,s,r={},n=(i=t.style||{},eq(s={},i,t),Object.assign(s,function({transformTemplate:t},e){return(0,l.useMemo)(()=>{let i=e$();return eM(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),s);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=n,r})(e,s,r,t),o=function(t,e,i){let s={};for(let r in t)("values"!==r||"object"!=typeof t.values)&&(eG(r)||!0===i&&eH(r)||!e&&!eH(r)||t.draggable&&r.startsWith("onDrag"))&&(s[r]=t[r]);return s}(e,"string"==typeof t,n),h=t!==l.Fragment?{...o,...a,ref:i}:{},{children:u}=e,d=(0,l.useMemo)(()=>tJ(u)?u.get():u,[u]);return(0,l.createElement)(t,{...h,children:d})}(t,i,(a=c.visualElement,(0,l.useCallback)(t=>{t&&p.onMount&&p.onMount(t),a&&(t?a.mount(t):a.unmount()),n&&("function"==typeof n?n(t):e2(n)&&(n.current=t))},[a])),p,d,e)]})}n.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;let a=(0,l.forwardRef)(n);return a[e1]=t,a}function e9(t,e,i){let s=t.getProps();return eg(s,e,void 0!==i?i:s.custom,t)}function e8(t,e){return t?.[e]??t?.default??t}let e7=t=>Array.isArray(t);function it(t,e){let i=t.getValue("willChange");if(tJ(i)&&i.add)return i.add(e);if(!i&&tl.WillChange){let i=new tl.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function ie(t){t.duration=0,t.type}let ii=(t,e)=>i=>e(t(i)),is=(...t)=>t.reduce(ii),ir=t=>1e3*t,ia={layout:0,mainThread:0,waapi:0};function io(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function ih(t,e){return i=>i>0?e:t}let il=(t,e,i)=>{let s=t*t,r=i*(e*e-s)+s;return r<0?0:Math.sqrt(r)},iu=[tk,tF,tR];function id(t){let e=iu.find(e=>e.test(t));if(te(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===tR&&(i=function({hue:t,saturation:e,lightness:i,alpha:s}){t/=360,i/=100;let r=0,n=0,a=0;if(e/=100){let s=i<.5?i*(1+e):i+e-i*e,o=2*i-s;r=io(o,s,t+1/3),n=io(o,s,t),a=io(o,s,t-1/3)}else r=n=a=i;return{red:Math.round(255*r),green:Math.round(255*n),blue:Math.round(255*a),alpha:s}}(i)),i}let ic=(t,e)=>{let i=id(t),s=id(e);if(!i||!s)return ih(t,e);let r={...i};return t=>(r.red=il(i.red,s.red,t),r.green=il(i.green,s.green,t),r.blue=il(i.blue,s.blue,t),r.alpha=C(i.alpha,s.alpha,t),tF.transform(r))},ip=new Set(["none","hidden"]);function im(t,e){return i=>C(t,e,i)}function ig(t){return"number"==typeof t?im:"string"==typeof t?S(t)?ih:tV.test(t)?ic:ix:Array.isArray(t)?iy:"object"==typeof t?tV.test(t)?ic:iv:ih}function iy(t,e){let i=[...t],s=i.length,r=t.map((t,i)=>ig(t)(t,e[i]));return t=>{for(let e=0;e<s;e++)i[e]=r[e](t);return i}}function iv(t,e){let i={...t,...e},s={};for(let r in i)void 0!==t[r]&&void 0!==e[r]&&(s[r]=ig(t[r])(t[r],e[r]));return t=>{for(let e in s)i[e]=s[e](t);return i}}let ix=(t,e)=>{let i=tU.createTransformer(e),s=tO(t),r=tO(e);if(!(s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length))return te(!0,`Complex values '${t}' and '${e}
1' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ih(t,e);if(ip.has(t)&&!r.values.length||ip.has(e)&&!s.values.length)return ip.has(t)?i=>i<=0?t:e:i=>i>=1?e:t;return is(iy(function(t,e){let i=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){let n=e.types[r],a=t.indexes[n][s[n]],o=t.values[a]??0;i[r]=o,s[n]++}return i}(s,r),r.values),i)};function ib(t,e,i){return"number"==typeof t&&"number"==typeof e&&"number"==typeof i?C(t,e,i):ig(t)(t,e)}let iw=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tc.update(e,t),stop:()=>tp(e),now:()=>tm.isProcessing?tm.timestamp:t1.now()}},iA=(t,e,i=10)=>{let s="",r=Math.max(Math.round(e/i),2);for(let e=0;e<r;e++)s+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${s.substring(0,s.length-2)})`};function iM(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}function iT(t,e,i){var s,r;let n=Math.max(e-5,0);return s=i-t(n),(r=e-n)?1e3/r*s:0}let iS=.01,iE=2,iP=.005,iC=.5;function iF(t,e){return t*Math.sqrt(1-e*e)}let ik=["duration","bounce"],iR=["stiffness","damping","mass"];function iV(t,e){return e.some(e=>void 0!==t[e])}function ij(t=.3,e=.3){let i,s="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:r,restDelta:n}=s,a=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],h={done:!1,value:a},{stiffness:l,damping:u,mass:d,duration:c,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!iV(t,iR)&&iV(t,ik))if(t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),s=i*i,r=2*U(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:1,stiffness:s,damping:r}}else{let i=function({duration:t=800,bounce:e=.3,velocity:i=0,mass:s=1}){let r,n;te(t<=ir(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-e;a=U(.05,1,a),t=U(.01,10,t/1e3),a<1?(r=e=>{let s=e*a,r=s*t;return .001-(s-i)/iF(e,a)*Math.exp(-r)},n=e=>{let s=e*a*t,n=Math.pow(a,2)*Math.pow(e,2)*t,o=Math.exp(-s),h=iF(Math.pow(e,2),a);return(s*i+i-n)*o*(-r(e)+.001>0?-1:1)/h}):(r=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),n=e=>t*t*(i-e)*Math.exp(-e*t));let o=function(t,e,i){let s=i;for(let i=1;i<12;i++)s-=t(s)/e(s);return s}(r,n,5/t);if(t=ir(t),isNaN(o))return{stiffness:100,damping:10,duration:t};{let e=Math.pow(o,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}(t);(e={...e,...i,mass:1}).isResolvedFromDuration=!0}return e}({...s,velocity:-((s.velocity||0)/1e3)}),f=p||0,g=u/(2*Math.sqrt(l*d)),y=o-a,v=Math.sqrt(l/d)/1e3,x=5>Math.abs(y);if(r||(r=x?iS:iE),n||(n=x?iP:iC),g<1){let t=iF(v,g);i=e=>o-Math.exp(-g*v*e)*((f+g*v*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}else if(1===g)i=t=>o-Math.exp(-v*t)*(y+(f+v*y)*t);else{let t=v*Math.sqrt(g*g-1);i=e=>{let i=Math.exp(-g*v*e),s=Math.min(t*e,300);return o-i*((f+g*v*y)*Math.sinh(s)+t*y*Math.cosh(s))/t}}let b={calculatedDuration:m&&c||null,next:t=>{let e=i(t);if(m)h.done=t>=c;else{let s=0===t?f:0;g<1&&(s=0===t?ir(f):iT(i,t,e));let a=Math.abs(o-e)<=n;h.done=Math.abs(s)<=r&&a}return h.value=h.done?o:e,h},toString:()=>{let t=Math.min(iM(b),2e4),e=iA(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function iD({keyframes:t,velocity:e=0,power:i=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:n=500,modifyTarget:a,min:o,max:h,restDelta:l=.5,restSpeed:u}){let d,c,p=t[0],m={done:!1,value:p},f=i*e,g=p+f,y=void 0===a?g:a(g);y!==g&&(f=y-p);let v=t=>-f*Math.exp(-t/s),x=t=>y+v(t),b=t=>{let e=v(t),i=x(t);m.done=Math.abs(e)<=l,m.value=m.done?y:i},w=t=>{let e;if(e=m.value,void 0!==o&&e<o||void 0!==h&&e>h){var i;d=t,c=ij({keyframes:[m.value,(i=m.value,void 0===o?h:void 0===h||Math.abs(o-i)<Math.abs(h-i)?o:h)],velocity:iT(x,t,m.value),damping:r,stiffness:n,restDelta:l,restSpeed:u})}};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return(c||void 0!==d||(e=!0,b(t),w(t)),void 0!==d&&t>=d)?c.next(t-d):(e||b(t),m)}}}ij.applyToOptions=t=>{let e=function(t,e=100,i){let s=i({...t,keyframes:[0,e]}),r=Math.min(iM(s),2e4);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:r/1e3}}(t,100,ij);return t.ease=e.ease,t.duration=ir(e.duration),t.type="keyframes",t};let iL=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function i_(t,e,i,s){return t===e&&i===s?th:r=>
10===r||1===r?r:iL(function(t,e,i,s,r){let n,a,o=0;do(n=iL(a=e+(i-e)/2,s,r)-t)>0?i=a:e=a;while(Math.abs(n)>1e-7&&++o<12)return a}(r,0,1,t,i),e,s)}let iO=i_(.42,0,1,1),iB=i_(0,0,.58,1),iN=i_(.42,0,.58,1),iI=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,iU=t=>e=>1-t(1-e),iz=i_(.33,1.53,.69,.99),iW=iU(iz),i$=iI(iW),iq=t=>(t*=2)<1?.5*iW(t):.5*(2-Math.pow(2,-10*(t-1))),iX=t=>1-Math.sin(Math.acos(t)),iY=iU(iX),iH=iI(iX),iG=t=>Array.isArray(t)&&"number"==typeof t[0],iK={linear:th,easeIn:iO,easeInOut:iN,easeOut:iB,circIn:iX,circInOut:iH,circOut:iY,backIn:iW,backInOut:i$,backOut:iz,anticipate:iq},iZ=t=>{if(iG(t)){ti(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,s,r]=t;return i_(e,i,s,r)}return"string"==typeof t?(ti(void 0!==iK[t],`Invalid easing type '${t}'`,"invalid-easing-type"),iK[t]):t},iQ=(t,e,i)=>{let s=e-t;return 0===s?1:(i-t)/s};function iJ({duration:t=300,keyframes:e,times:i,ease:s="easeInOut"}){var r;let n,a=Array.isArray(s)&&"number"!=typeof s[0]?s.map(iZ):iZ(s),o={done:!1,value:e[0]},h=function(t,e,{clamp:i=!0,ease:s,mixer:r}={}){let n=t.length;if(ti(n===e.length,"Both input and output ranges must be the same length","range-length"),1===n)return()=>e[0];if(2===n&&e[0]===e[1])return()=>e[1];let a=t[0]===t[1];t[0]>t[n-1]&&(t=[...t].reverse(),e=[...e].reverse());let o=function(t,e,i){let s=[],r=i||tl.mix||ib,n=t.length-1;for(let i=0;i<n;i++){let n=r(t[i],t[i+1]);e&&(n=is(Array.isArray(e)?e[i]||th:e,n)),s.push(n)}return s}(e,s,r),h=o.length,l=i=>{if(a&&i<t[0])return e[0];let s=0;if(h>1)for(;s<t.length-2&&!(i<t[s+1]);s++);let r=iQ(t[s],t[s+1],i);return o[s](r)};return i?e=>l(U(t[0],t[n-1],e)):l}((r=i&&i.length===e.length?i:(!function(t,e){let i=t[t.length-1];for(let s=1;s<=e;s++){let r=iQ(0,e,s);t.push(C(i,1,r))}}(n=[0],e.length-1),n),r.map(e=>e*t)),e,{ease:Array.isArray(a)?a:e.map(()=>a||iN).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(o.value=h(e),o.done=e>=t,o)}}let i0=t=>null!==t;function i1(t,{repeat:e,repeatType:i="loop"},s,r=1){let n=t.filter(i0),a=r<0||e&&"loop"!==i&&e%2==1?0:n.length-1;return a&&void 0!==s?s:n[a]}let i2={decay:iD,inertia:iD,tween:iJ,keyframes:iJ,spring:ij};function i3(t){"string"==typeof t.type&&(t.type=i2[t.type])}class i5{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let i4=t=>t/100;class i6 extends i5{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==t1.now()&&this.tick(t1.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},ia.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;i3(t);let{type:e=iJ,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:n=0}=t,{keyframes:a}=t,o=e||iJ;o!==iJ&&"number"!=typeof a[0]&&(this.mixKeyframes=is(i4,ib(a[0],a[1])),a=[0,100]);let h=o({...t,keyframes:a});"mirror"===r&&(this.mirroredGenerator=o({...t,keyframes:[...a].reverse(),velocity:-n})),null===h.calculatedDuration&&(h.calculatedDuration=iM(h));let{calculatedDuration:l}=h;this.calculatedDuration=l,this.resolvedDuration=l+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=h}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:n,resolvedDuration:a,calculatedDuration:o}=this;if(null===this.startTime)return i.next(0);let{delay:h=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:c,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let g=this.currentTime-h*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let v=this.currentTime,x=i;if(u){let t=Math.min(this.currentTime,s)/a,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,u+1))%2&&("reverse"===d?(i=1-i,c&&(i-=c/a)):"mirror"===d&&(x=n)),v=U(0,1,i)*a}let b=y?{done:!1,value:l[0]}:x.next(v);r&&(b.value=r(b.value));let{done:w}=b;y||null===o||(w=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);let A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return A&&p!==iD&&(b.value=i1(l,this.options,f,this.speed)),m&&m(b.value),A&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return this.calculatedDuration/1e3}get time(){return this.currentTime/1e3}set time(t){t=ir(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(t1.now());let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:t=iw,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(t1.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,ia.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function i9(t){let e;return()=>(void 0===e&&(e=t()),e)}let i8=i9(()=>void 0!==window.ScrollTimeline),i7={},st=(i=i9(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),()=>i7.linearEasing??i()),se=([t,e,i,s])=>`cubic-bezier(${t}, ${e}, ${i}, ${s})`,si={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:se([0,.65,.55,1]),circOut:se([.55,0,1,.45]),backIn:se([.31,.01,.66,-.59]),backOut:se([.33,1.53,.69,.99])};function ss(t){return"function"==typeof t&&"applyToOptions"in t}class sr extends i5{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:i,keyframes:s,pseudoElement:r,allowFlatten:n=!1,finalKeyframe:a,onComplete:o}=t;this.isPseudoElement=!!r,this.allowFlatten=n,this.options=t,ti("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const h=function({type:t,...e}){return ss(t)&&st()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:s=0,duration:r=300,repeat:n=0,repeatType:a="loop",ease:o="easeOut",times:h}={},l){let u={[e]:i};h&&(u.offset=h);let d=function t(e,i){if(e)return"function"==typeof e?st()?iA(e,i):"ease-out":iG(e)?se(e):Array.isArray(e)?e.map(e=>t(e,i)||si.easeOut):si[e]}(o,r);Array.isArray(d)&&(u.easing=d);let c={delay:s,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:n+1,direction:"reverse"===a?"alternate":"normal"};l&&(c.pseudoElement=l);let p=t.animate(u,c);return p}(e,i,s,h,r),!1===h.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let t=i1(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):i.startsWith("--")?e.style.setProperty(i,t):e.style[i]=t,this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(t){this.finishedTime=null,this.animation.currentTime=ir(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&i8())?(this.animation.timeline=t,th):e(this)}}let sn={anticipate:iq,backInOut:i$,circInOut:iH};class sa extends sr{constructor(t){!function(t){"string"==typeof t.ease&&t.ease in sn&&(t.ease=sn[t.ease])}(t),i3(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:s,element:r,...n}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);let a=new i6({...n,autoplay:!1}),o=ir(this.finishedTime??this.time);e.setWithVelocity(a.sample(o-10).value,a.sample(o).value,10),a.stop()}}let so=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(tU.test(t)||"0"===t)&&!t.startsWith("url(")),sh=new Set(["opacity","clipPath","filter","transform"]),sl=i9(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class su extends i5{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:n="loop",keyframes:a,name:o,motionValue:h,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=t1.now();const d={autoplay:t,delay:e,type:i,repeat:s,repeatDelay:r,repeatType:n,name:o,motionValue:h,element:l,...u},c=l?.KeyframeResolver||tA;this.keyframeResolver=new c(a,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),o,h,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,s){this.keyframeResolver=void 0;let{name:r,type:n,velocity:a,delay:o,isHandoff:h,onUpdate:l}=i;
1this.resolvedAt=t1.now(),!function(t,e,i,s){let r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;let n=t[t.length-1],a=so(r,e),o=so(n,e);return te(a===o,`You are trying to animate ${e} from "${r}" to "${n}". "${a?n:r}" is not an animatable value.`,"value-not-animatable"),!!a&&!!o&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||ss(i))&&s)}(t,r,n,a)&&((tl.instantAnimations||!o)&&l?.(i1(t,i,e)),t[0]=t[t.length-1],ie(i),i.repeat=0);let u={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},d=!h&&function(t){let{motionValue:e,name:i,repeatDelay:s,repeatType:r,damping:n,type:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:o,transformTemplate:h}=e.owner.getProps();return sl()&&i&&sh.has(i)&&("transform"!==i||!h)&&!o&&!s&&"mirror"!==r&&0!==n&&"inertia"!==a}(u)?new sa({...u,element:u.motionValue.owner.current}):new i6(u);d.finished.then(()=>this.notifyFinished()).catch(th),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tx=!0,tw(),tb(),tx=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let sd=t=>null!==t,sc={type:"spring",stiffness:500,damping:25,restSpeed:10},sp={type:"keyframes",duration:.8},sm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sf=(t,e,i,s={},r,n)=>a=>{let o=e8(s,t)||{},h=o.delay||s.delay||0,{elapsed:l=0}=s;l-=ir(h);let u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-l,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:t,motionValue:e,element:n?void 0:r};!function({when:t,delay:e,delayChildren:i,staggerChildren:s,staggerDirection:r,repeat:n,repeatType:a,repeatDelay:o,from:h,elapsed:l,...u}){return!!Object.keys(u).length}(o)&&Object.assign(u,((t,{keyframes:e})=>e.length>2?sp:d.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:sc:sm)(t,u)),u.duration&&(u.duration=ir(u.duration)),u.repeatDelay&&(u.repeatDelay=ir(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(ie(u),0===u.delay&&(c=!0)),(tl.instantAnimations||tl.skipAnimations)&&(c=!0,ie(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,c&&!n&&void 0!==e.get()){let t=function(t,{repeat:e,repeatType:i="loop"},s){let r=t.filter(sd),n=e&&"loop"!==i&&e%2==1?0:r.length-1;return r[n]}(u.keyframes,o);if(void 0!==t)return void tc.update(()=>{u.onUpdate(t),u.onComplete()})}return o.isSync?new i6(u):new su(u)};function sg(t,e,{delay:i=0,transitionOverride:s,type:r}={}){let{transition:n=t.getDefaultTransition(),transitionEnd:a,...o}=e;s&&(n=s);let h=[],l=r&&t.animationState&&t.animationState.getState()[r];for(let e in o){let s=t.getValue(e,t.latestValues[e]??null),r=o[e];if(void 0===r||l&&function({protectedKeys:t,needsAnimating:e},i){let s=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,s}(l,e))continue;let a={delay:i,...e8(n||{},e)},u=s.get();if(void 0!==u&&!s.isAnimating&&!Array.isArray(r)&&r===u&&!a.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let i=t.props[e3];if(i){let t=window.MotionHandoffAnimation(i,e,tc);null!==t&&(a.startTime=t,d=!0)}}it(t,e),s.start(sf(e,s,r,t.shouldReduceMotion&&I.has(e)?{type:!1}:a,t,d));let c=s.animation;c&&h.push(c)}return a&&Promise.all(h).then(()=>{tc.update(()=>{a&&function(t,e){let{transitionEnd:i={},transition:s={},...r}=e9(t,e)||{};for(let e in r={...r,...i}){var n;let i=e7(n=r[e])?n[n.length-1]||0:n;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,t6(i))}}(t,a)})}),h}function sy(t,e,i,s=0,r=1){let n=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),a=t.size,o=(a-1)*s;return"function"==typeof i?i(n,a):1===r?n*s:o-n*s}function sv(t,e,i={}){let s=e9(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:r=t.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(r=i.transitionOverride);let n=s?()=>Promise.all(sg(t,s,i)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(s=0)=>{let{delayChildren:n=0,staggerChildren:a,staggerDirection:o}=r;
1return function(t,e,i=0,s=0,r=0,n=1,a){let o=[];for(let h of t.variantChildren)h.notify("AnimationStart",e),o.push(sv(h,e,{...a,delay:i+("function"==typeof s?0:s)+sy(t.variantChildren,h,s,r,n)}).then(()=>h.notify("AnimationComplete",e)));return Promise.all(o)}(t,e,s,n,a,o,i)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([n(),a(i.delay)]);{let[t,e]="beforeChildren"===o?[n,a]:[a,n];return t().then(()=>e())}}function sx(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s])return!1;return!0}let sb=ec.length,sw=[...ed].reverse(),sA=ed.length;function sM(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sT(){return{animate:sM(!0),whileInView:sM(),whileHover:sM(),whileTap:sM(),whileDrag:sM(),whileFocus:sM(),exit:sM()}}class sS{constructor(t){this.isMounted=!1,this.node=t}update(){}}let sE=0,sP={x:!1,y:!1};function sC(t,e,i,s={passive:!0}){return t.addEventListener(e,i,s),()=>t.removeEventListener(e,i)}let sF=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function sk(t){return{point:{x:t.pageX,y:t.pageY}}}function sR(t,e,i,s){return sC(t,e,t=>sF(t)&&i(t,sk(t)),s)}function sV(t){return t.max-t.min}function sj(t,e,i,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=sV(i)/sV(e),t.translate=C(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function sD(t,e,i,s){sj(t.x,e.x,i.x,s?s.originX:void 0),sj(t.y,e.y,i.y,s?s.originY:void 0)}
1function sL(t,e,i){t.min=i.min+e.min,t.max=t.min+sV(e)}function s_(t,e,i){t.min=e.min-i.min,t.max=t.min+sV(e)}function sO(t,e,i){s_(t.x,e.x,i.x),s_(t.y,e.y,i.y)}function sB(t){return[t("x"),t("y")]}let sN=({current:t})=>t?t.ownerDocument.defaultView:null,sI=(t,e)=>Math.abs(t-e);class sU{constructor(t,e,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:n=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let i=s$(this.lastMoveEventInfo,this.history),s=null!==this.startEvent,r=(t=i.offset,e={x:0,y:0},Math.sqrt(sI(t.x,e.x)**2+sI(t.y,e.y)**2)>=this.distanceThreshold);if(!s&&!r)return;let{point:n}=i,{timestamp:a}=tm;this.history.push({...n,timestamp:a});let{onStart:o,onMove:h}=this.handlers;s||(o&&o(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=sz(e,this.transformPagePoint),tc.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:s,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=s$("pointercancel"===t.type?this.lastMoveEventInfo:sz(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,n),s&&s(t,n)},!sF(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=n,this.contextWindow=s||window;const a=sz(sk(t),this.transformPagePoint),{point:o}=a,{timestamp:h}=tm;this.history=[{...o,timestamp:h}];const{onSessionStart:l}=e;l&&l(t,s$(a,this.history)),this.removeListeners=is(sR(this.contextWindow,"pointermove",this.handlePointerMove),sR(this.contextWindow,"pointerup",this.handlePointerUp),sR(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),tp(this.updatePoint)}}function sz(t,e){return e?{point:e(t.point)}:t}function sW(t,e){return{x:t.x-e.x,y:t.y-e.y}}function s$({point:t},e){return{point:t,delta:sW(t,sq(e)),offset:sW(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null,r=sq(t);for(;i>=0&&(s=t[i],!(r.timestamp-s.timestamp>ir(.1)));)i--;if(!s)return{x:0,y:0};let n=(r.timestamp-s.timestamp)/1e3;if(0===n)return{x:0,y:0};let a={x:(r.x-s.x)/n,y:(r.y-s.y)/n};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(e,.1)}}function sq(t){return t[t.length-1]}function sX(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function sY(t,e){let i=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,s]=[s,i]),{min:i,max:s}}function sH(t,e,i){return{min:sG(t,e),max:sG(t,i)}}function sG(t,e){return"number"==typeof t?t:t[e]||0}let sK=new WeakMap;class sZ{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=er(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){let{presenceContext:s}=this.visualElement;if(s&&!1===s.isPresent)return;let r=t=>{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(sk(t).point)},n=(t,e)=>{let{drag:i,dragPropagation:s,onDragStart:r}=this.getProps();if(i&&!s&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){if("x"===t||"y"===t)if(sP[t])return null;else return sP[t]=!0,()=>{sP[t]=!1};return sP.x||sP.y?null:(sP.x=sP.y=!0,()=>{sP.x=sP.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sB(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Y.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let s=i.layout.layoutBox[t];s&&(e=sV(s)*(parseFloat(e)/100))}}this.originPoint[t]=e}),r&&tc.postRender(()=>r(t,e)),it(this.visualElement,"transform");let{animationState:n}=this.visualElement;n&&n.setActive("whileDrag",!0)},a=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:s,onDirectionLock:r,onDrag:n}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=e;if(s&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(a),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",e.point,a),this.updateAxis("y",e.point,a),this.visualElement.render(),n&&n(t,e)},o=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>sB(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new sU(t,{onSessionStart:r,onStart:n,onMove:a,onSessionEnd:o,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:i,contextWindow:sN(this.visualElement)})}stop(t,e){let i=t||this.latestPointerEvent,s=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;let{velocity:n}=s;this.startAnimation(n);let{onDragEnd:a}=this.getProps();a&&tc.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){let{drag:s}=this.getProps();if(!i||!sQ(t,s,this.currentDirection))return;let r=this.getAxisMotionValue(t),n=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(n=function(t,{min:e,max:i},s){return void 0!==e&&t<e?t=s?C(e,t,s.min):Math.max(t,e):void 0!==i&&t>i&&(t=s?C(i,t,s.max):Math.min(t,i)),t}(n,this.constraints[t],this.elastic[t])),r.set(n)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&e2(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:s,right:r}){return{x:sX(t.x,i,r),y:sX(t.y,e,s)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:sH(t,"left","right"),y:sH(t,"top","bottom")}}(e),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&sB(t=>{var e,s;let r;!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=(e=i.layoutBox[t],s=this.constraints[t],r={},void 0!==s.min&&(r.min=s.min-e.min),void 0!==s.max&&(r.max=s.max-e.min),r))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!e2(e))return!1;let s=e.current;ti(null!==s,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;
1let n=function(t,e,i){let s=N(t,i),{scroll:r}=e;return r&&(_(s.x,r.offset.x),_(s.y,r.offset.y)),s}(s,r.root,this.visualElement.getTransformPagePoint()),a=(t=r.layout.layoutBox,{x:sY(t.x,n.x),y:sY(t.y,n.y)});if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(a));this.hasMutatedConstraints=!!t,t&&(a=P(t))}return a}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{};return Promise.all(sB(a=>{if(!sQ(a,e,this.currentDirection))return;let h=o&&o[a]||{};n&&(h={min:0,max:0});let l={type:"inertia",velocity:i?t[a]:0,bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(a,l)})).then(a)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return it(this.visualElement,t),i.start(sf(t,i,0,e,this.visualElement,!1))}stopAnimation(){sB(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sB(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){sB(e=>{let{drag:i}=this.getProps();if(!sQ(e,i,this.currentDirection))return;let{projection:s}=this.visualElement,r=this.getAxisMotionValue(e);if(s&&s.layout){let{min:i,max:n}=s.layout.layoutBox[e];r.set(t[e]-C(i,n,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!e2(e)||!i||!this.constraints)return;this.stopAnimation();let s={x:0,y:0};sB(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){var i,r;let n,a,o,h=e.get();s[t]=(i={min:h,max:h},r=this.constraints[t],n=.5,a=sV(i),(o=sV(r))>a?n=iQ(r.min,r.max-a,i.min):a>o&&(n=iQ(i.min,i.max-o,r.min)),U(0,1,n))}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),sB(e=>{if(!sQ(e,t,null))return;let i=this.getAxisMotionValue(e),{min:r,max:n}=this.constraints[e];i.set(C(r,n,s[e]))})}addListeners(){if(!this.visualElement.current)return;sK.set(this.visualElement,this);let t=sR(this.visualElement.current,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{let{dragConstraints:t}=this.getProps();e2(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),tc.read(e);let r=sC(window,"resize",()=>this.scalePositionWithinConstraints()),n=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(sB(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),s(),n&&n()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:n=.35,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:n,dragMomentum:a}}}function sQ(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}let sJ=t=>(e,i)=>{t&&tc.postRender(()=>t(e,i))};var s0=l;let s1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function s2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let s3={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t)if(!H.test(t))return t;else t=parseFloat(t);let i=s2(t,e.target.x),s=s2(t,e.target.y);return`${i}% ${s}%`}},s5=!1;class s4 extends s0.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=t;for(let t in s9)eS[t]=s9[t],M(t)&&(eS[t].isCSSVariable=!0);r&&(e.group&&e.group.add(r),i&&i.register&&s&&i.register(r),s5&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),s1.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:s,isPresent:r}=this.props,{projection:n}=i;return n&&(n.isPresent=r,s5=!0,s||t.layoutDependency!==e||void 0===e||t.isPresent!==r?n.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?n.promote():n.relegate()||tc.postRender(()=>{let t=n.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),t8.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:s}=t;s5=!0,s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function s6(t){let[e,i]=function(t=!0){let e=(0,l.useContext)(eK);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:s,register:r}=e,n=(0,l.useId)();(0,l.useEffect)(()=>
1{if(t)return r(n)},[t]);let a=(0,l.useCallback)(()=>t&&s&&s(n),[n,s,t]);return!i&&s?[!1,a]:[!0]}(),s=(0,s0.useContext)(eN);return(0,h.jsx)(s4,{...t,layoutGroup:s,switchLayoutGroup:(0,s0.useContext)(e5),isPresent:e,safeToRemove:i})}let s9={borderRadius:{...s3,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:s3,borderTopRightRadius:s3,borderBottomLeftRadius:s3,borderBottomRightRadius:s3,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let s=tU.parse(t);if(s.length>5)return t;let r=tU.createTransformer(t),n=+("number"!=typeof s[0]),a=i.x.scale*e.x,o=i.y.scale*e.y;s[0+n]/=a,s[1+n]/=o;let h=C(a,o,.5);return"number"==typeof s[2+n]&&(s[2+n]/=h),"number"==typeof s[3+n]&&(s[3+n]/=h),r(s)}}};function s8(t){return"object"==typeof t&&null!==t}function s7(t){return s8(t)&&"ownerSVGElement"in t}let rt=(t,e)=>t.depth-e.depth;class re{constructor(){this.children=[],this.isDirty=!1}add(t){t2(this.children,t),this.isDirty=!0}remove(t){t3(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rt),this.isDirty=!1,this.children.forEach(t)}}let ri=["TopLeft","TopRight","BottomLeft","BottomRight"],rs=ri.length,rr=t=>"string"==typeof t?parseFloat(t):t,rn=t=>"number"==typeof t||H.test(t);function ra(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let ro=rl(0,.5,iY),rh=rl(.5,.95,th);function rl(t,e,i){return s=>s<t?0:s>e?1:i(iQ(t,e,s))}function ru(t,e){t.min=e.min,t.max=e.max}function rd(t,e){ru(t.x,e.x),ru(t.y,e.y)}function rc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function rp(t,e,i,s,r){return t-=e,t=s+1/i*(t-s),void 0!==r&&(t=s+1/r*(t-s)),t}function rm(t,e,[i,s,r],n,a){!function(t,e=0,i=1,s=.5,r,n=t,a=t){if(Y.test(e)&&(e=parseFloat(e),e=C(a.min,a.max,e/100)-a.min),"number"!=typeof e)return;let o=C(n.min,n.max,s);t===n&&(o-=e),t.min=rp(t.min,e,i,o,r),t.max=rp(t.max,e,i,o,r)}(t,e[i],e[s],e[r],e.scale,n,a)}let rf=["x","scaleX","originX"],rg=["y","scaleY","originY"];function ry(t,e,i,s){rm(t.x,e,rf,i?i.x:void 0,s?s.x:void 0),rm(t.y,e,rg,i?i.y:void 0,s?s.y:void 0)}function rv(t){return 0===t.translate&&1===t.scale}function rx(t){return rv(t.x)&&rv(t.y)}function rb(t,e){return t.min===e.min&&t.max===e.max}function rw(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function rA(t,e){return rw(t.x,e.x)&&rw(t.y,e.y)}function rM(t){return sV(t.x)/sV(t.y)}function rT(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class rS{constructor(){this.members=[]}add(t){t2(this.members,t),t.scheduleRender()}remove(t){if(t3(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e,i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:s}=t.options;!1===s&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let rE=["","X","Y","Z"],rP=0;function rC(t,e,i,s){let{latestValues:r}=e;r[t]&&(i[t]=r[t],e.setStaticValue(t,0),s&&(s[t]=0))}function rF({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(t={},i=e?.()){this.id=rP++,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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
1{this.projectionUpdateScheduled=!1,this.nodes.forEach(rV),this.nodes.forEach(rN),this.nodes.forEach(rI),this.nodes.forEach(rj)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new re)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new t5),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){let i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=s7(e)&&!(s7(e)&&"svg"===e.tagName),this.instance=e;let{layoutId:i,layout:s,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let i,s=0,r=()=>this.root.updateBlockedByResize=!1;tc.read(()=>{s=window.innerWidth}),t(e,()=>{let t=window.innerWidth;if(t!==s){let e,n;s=t,this.root.updateBlockedByResize=!0,i&&i(),e=t1.now(),n=({timestamp:t})=>{let i=t-e;i>=250&&(tp(n),r(i-250))},tc.setup(n,!0),i=()=>tp(n),s1.hasAnimatedSinceResize&&(s1.hasAnimatedSinceResize=!1,this.nodes.forEach(rB))}})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||r.getDefaultTransition()||rX,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=r.getProps(),h=!this.targetLayout||!rA(this.targetLayout,s),l=!e&&i;if(this.options.layoutRoot||this.resumeFrom||l||e&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...e8(n,"layout"),onPlay:a,onComplete:o};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,l)}else e||rB(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tp(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(rU),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let s=i.props[e3];if(window.MotionHasOptimisedAnimation(s,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",tc,!(t||i))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){let e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}let{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;let s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEac
1h(rL);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(r_);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(rO),this.nodes.forEach(rk),this.nodes.forEach(rR)):this.nodes.forEach(r_),this.clearAllSnapshots();let t=t1.now();tm.delta=U(0,1e3/60,t-tm.timestamp),tm.timestamp=t,tm.isProcessing=!0,tf.update.process(tm),tf.preRender.process(tm),tf.render.process(tm),tm.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,t8.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rD),this.sharedNodes.forEach(rz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tc.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tc.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||sV(this.snapshot.measuredBox.x)||sV(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 t=0;t<this.path.length;t++)this.path[t].updateScroll();let t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=er(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){let e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;let t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!rx(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,n=s!==this.prevTransformTemplateValue;t&&this.instance&&(e||R(this.latestValues)||n)&&(r(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){var e;let i=this.measurePageBox(),s=this.removeElementScroll(i);return t&&(s=this.removeTransform(s)),rG((e=s).x),rG(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:s,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:t}=this.options;if(!t)return er();let e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(rZ))){let{scroll:t}=this.root;t&&(_(e.x,t.offset.x),_(e.y,t.offset.y))}return e}removeElementScroll(t){let e=er();if(rd(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){let s=this.path[i],{scroll:r,options:n}=s;s!==this.root&&r&&n.layoutScroll&&(r.wasRoot&&rd(e,t),_(e.x,r.offset.x),_(e.y,r.offset.y))}return e}applyTransform(t,e=!1){let i=er();rd(i,t);for(let t=0;t<this.path.length;t++){let s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&B(i,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),R(s.latestValues)&&B(i,s.latestValues)}return R(this.latestValues)&&B(i,this.latestValues),i}removeTransform(t){let e=er();rd(e,t);for(let t=0;t<this.path.length;t++){let i=this.path[t];if(!i.instance||!R(i.latestValues))continue;k(i.latestValues)&&i.updateSnapshot();let s=er();rd(s,i.measurePageBox()),ry(e,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,s)}return R(this.latestValues)&&ry(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==tm.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){let e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:s,layoutId:r}=this.options;if(this.layout&&(s||r)){if(this.resolvedRelativeTargetAt=tm.timestamp,!this.targetDelta&&!this.relativeTarget){let t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=er(),this.relativeTargetOrigin=er(),sO(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),rd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target=er(),this.targetWithTransforms=er()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var n,a,o;this.forceRelativeParentToResolveTarget(),n=this.target,a=this.relativeTarget,o=this.relativeParent.target,sL(n.x,a.x,o.x),sL(n.y,a.y,o.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rd(this.target,this.layout.layoutBox),L(this.target,this.targetDelta)):rd(this.target,this.layout.layoutBox);if(this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let t=this.getClosestProjectingParent();t&&!!t.resumingFrom==!!this.resumingFrom&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=er(),this.relativeTargetOrigin=er(),sO(this.relativeTargetOrigin,this.target,t.target),rd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}}getClosestProjectingParent(){if(!(!this.parent||k(this.parent.latestValues)||V(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let t=this.getLead(),e=!!this.resumingFrom||this!==t,i=!0;
1if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===tm.timestamp&&(i=!1),i)return;let{layout:s,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||r))return;rd(this.layoutCorrected,this.layout.layoutBox);let n=this.treeScale.x,a=this.treeScale.y;!function(t,e,i,s=!1){let r,n,a=i.length;if(a){e.x=e.y=1;for(let o=0;o<a;o++){n=(r=i[o]).projectionDelta;let{visualElement:a}=r.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&B(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),n&&(e.x*=n.x.scale,e.y*=n.y.scale,L(t,n)),s&&R(r.latestValues)&&B(t,r.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=er());let{target:o}=t;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(rc(this.prevProjectionDelta.x,this.projectionDelta.x),rc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),sD(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===n&&this.treeScale.y===a&&rT(this.projectionDelta.x,this.prevProjectionDelta.x)&&rT(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ei(),this.projectionDelta=ei(),this.projectionDeltaWithTransform=ei()}setAnimationOrigin(t,e=!1){let i,s=this.snapshot,r=s?s.latestValues:{},n={...this.latestValues},a=ei();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let o=er(),h=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(h&&!u&&!0===this.options.crossfade&&!this.path.some(rq));this.animationProgress=0,this.mixTargetDelta=e=>{let s=e/1e3;if(rW(a.x,t.x,s),rW(a.y,t.y,s),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var l,c,p,m,f,g;sO(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=o,g=s,r$(p.x,m.x,f.x,g),r$(p.y,m.y,f.y,g),i&&(l=this.relativeTarget,c=i,rb(l.x,c.x)&&rb(l.y,c.y))&&(this.isProjectionDirty=!1),i||(i=er()),rd(i,this.relativeTarget)}h&&(this.animationValues=n,function(t,e,i,s,r,n){r?(t.opacity=C(0,i.opacity??1,ro(s)),t.opacityExit=C(e.opacity??1,0,rh(s))):n&&(t.opacity=C(e.opacity??1,i.opacity??1,s));for(let r=0;r<rs;r++){let n=`border${ri[r]}Radius`,a=ra(e,n),o=ra(i,n);(void 0!==a||void 0!==o)&&(a||(a=0),o||(o=0),0===a||0===o||rn(a)===rn(o)?(t[n]=Math.max(C(rr(a),rr(o),s),0),(Y.test(o)||Y.test(a))&&(t[n]+="%")):t[n]=o)}(e.rotate||i.rotate)&&(t.rotate=C(e.rotate||0,i.rotate||0,s))}(n,r,this.latestValues,s,d,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=s},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(tp(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tc.update(()=>{var e,i,s;let r;s1.hasAnimatedSinceResize=!0,ia.layout++,this.motionValue||(this.motionValue=t6(0)),this.currentAnimation=(e=this.motionValue,i=[0,1e3],s={...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{ia.layout--},onComplete:()=>{ia.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}},(r=tJ(e)?e:t6(e)).start(sf("",r,i,s)),r.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:s,latestValues:r}=t;if(e&&i&&s){if(this!==t&&this.layout&&s&&rK(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||er();let e=sV(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let s=sV(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+s}rd(e,i),B(e,r),sD(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new rS),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;
1return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let s=this.getStack();s&&s.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let s={};i.z&&rC("z",t,s,this.animationValues);for(let e=0;e<rE.length;e++)rC(`rotate${rE[e]}`,t,s,this.animationValues),rC(`skew${rE[e]}`,t,s,this.animationValues);for(let e in t.render(),s)t.setStaticValue(e,s[e]),this.animationValues&&(this.animationValues[e]=s[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible){t.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=eZ(e?.pointerEvents)||"",t.transform=i?i(this.latestValues,""):"none";return}let s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=eZ(e?.pointerEvents)||""),this.hasProjected&&!R(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1);return}t.visibility="";let r=s.animationValues||s.latestValues;this.applyTransformsToTarget();let n=function(t,e,i){let s="",r=t.x.translate/e.x,n=t.y.translate/e.y,a=i?.z||0;if((r||n||a)&&(s=`translate3d(${r}px, ${n}px, ${a}px) `),(1!==e.x||1!==e.y)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),i){let{transformPerspective:t,rotate:e,rotateX:r,rotateY:n,skewX:a,skewY:o}=i;t&&(s=`perspective(${t}px) ${s}`),e&&(s+=`rotate(${e}deg) `),r&&(s+=`rotateX(${r}deg) `),n&&(s+=`rotateY(${n}deg) `),a&&(s+=`skewX(${a}deg) `),o&&(s+=`skewY(${o}deg) `)}let o=t.x.scale*e.x,h=t.y.scale*e.y;
1return(1!==o||1!==h)&&(s+=`scale(${o}, ${h})`),s||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);i&&(n=i(r,n)),t.transform=n;let{x:a,y:o}=this.projectionDelta;for(let e in t.transformOrigin=`${100*a.origin}% ${100*o.origin}% 0`,s.animationValues?t.opacity=s===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:t.opacity=s===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0,eS){if(void 0===r[e])continue;let{correct:i,applyTo:a,isCSSVariable:o}=eS[e],h="none"===n?r[e]:i(r[e],s);if(a){let e=a.length;for(let i=0;i<e;i++)t[a[i]]=h}else o?this.options.visualElement.renderState.vars[e]=h:t[e]=h}this.options.layoutId&&(t.pointerEvents=s===this?eZ(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(rL),this.root.sharedNodes.clear()}}}function rk(t){t.updateLayout()}function rR(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:s}=t.layout,{animationType:r}=t.options,n=e.source!==t.layout.source;"size"===r?sB(t=>{let s=n?e.measuredBox[t]:e.layoutBox[t],r=sV(s);s.min=i[t].min,s.max=s.min+r}):rK(r,e.layoutBox,i)&&sB(s=>{let r=n?e.measuredBox[s]:e.layoutBox[s],a=sV(i[s]);r.max=r.min+a,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+a)});let a=ei();sD(a,i,e.layoutBox);let o=ei();n?sD(o,t.applyTransform(s,!0),e.measuredBox):sD(o,i,e.layoutBox);let h=!rx(a),l=!1;if(!t.resumeFrom){let s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){let{snapshot:r,layout:n}=s;if(r&&n){let a=er();sO(a,e.layoutBox,r.layoutBox);let o=er();sO(o,i,n.layoutBox),rA(a,o)||(l=!0),s.options.layoutRoot&&(t.relativeTarget=o,t.relativeTargetOrigin=a,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:o,layoutDelta:a,hasLayoutChanged:h,hasRelativeLayoutChanged:l})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function rV(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 rj(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rD(t){t.clearSnapshot()}function rL(t){t.clearMeasurements()}function r_(t){t.isLayoutDirty=!1}function rO(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rB(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rN(t){t.resolveTargetDelta()}function rI(t){t.calcProjection()}function rU(t){t.resetSkewAndRotation()}function rz(t){t.removeLeadSnapshot()}function rW(t,e,i){t.translate=C(e.translate,0,i),t.scale=C(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function r$(t,e,i,s){t.min=C(e.min,i.min,s),t.max=C(e.max,i.max,s)}function rq(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let rX={duration:.45,ease:[.4,0,.1,1]},rY=t=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),rH=rY("applewebkit/")&&!rY("chrome/")?Math.round:th;function rG(t){t.min=rH(t.min),t.max=rH(t.max)}function rK(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(rM(e)-rM(i)))}function rZ(t){return t!==t.root&&t.scroll?.wasRoot}let rQ=rF({attachResizeListener:(t,e)=>sC(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rJ={current:void 0},r0=rF({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rJ.current){let t=new rQ({});t.mount(window),t.setOptions({layoutScroll:!0}),rJ.current=t}return rJ.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});
1function r1(t,e){let i=function(t,e,i){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document,i=(void 0)??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t),s=new AbortController;return[i,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function r2(t){return!("touch"===t.pointerType||sP.x||sP.y)}function r3(t,e,i){let{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover","Start"===i);let r=s["onHover"+i];r&&tc.postRender(()=>r(e,sk(e)))}let r5=(t,e)=>!!e&&(t===e||r5(t,e.parentElement)),r4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),r6=new WeakSet;function r9(t){return e=>{"Enter"===e.key&&t(e)}}function r8(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function r7(t){return sF(t)&&!(sP.x||sP.y)}function nt(t,e,i){let{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap","Start"===i);let r=s["onTap"+("End"===i?"":i)];r&&tc.postRender(()=>r(e,sk(e)))}let ne=new WeakMap,ni=new WeakMap,ns=t=>{let e=ne.get(t.target);e&&e(t)},nr=t=>{t.forEach(ns)},nn={some:0,all:1},na=function(t,e){if("u"<typeof Proxy)return e6;let i=new Map,s=(i,s)=>e6(i,s,t,e);return new Proxy((t,e)=>s(t,e),{get:(r,n)=>"create"===n?s:(i.has(n)||i.set(n,e6(n,void 0,t,e)),i.get(n))})}({animation:{Feature:class extends sS{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e))s=Promise.all(e.map(e=>sv(t,e,i)));else if("string"==typeof e)s=sv(t,e,i);else{let r="function"==typeof e?e9(t,e,i.custom):e;s=Promise.all(sg(t,r,i))}return s.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=sT(),s=!0,r=e=>(i,s)=>{let r=e9(t,s,"exit"===e?t.presenceContext?.custom:void 0);if(r){let{transition:t,transitionEnd:e,...s}=r;i={...i,...s,...e}}return i};function n(n){let{props:a}=t,o=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;t<sb;t++){let s=ec[t],r=e.props[s];(eu(r)||!1===r)&&(i[s]=r)}return i}(t.parent)||{},h=[],l=new Set,u={},d=1/0;for(let e=0;e<sA;e++){var c,p;let m=sw[e],f=i[m],g=void 0!==a[m]?a[m]:o[m],y=eu(g),v=m===n?f.isActive:null;!1===v&&(d=e);let x=g===o[m]&&g!==a[m]&&y;if(x&&s&&t.manuallyAnimateOnMount&&(x=!1),f.protectedKeys={...u},!f.isActive&&null===v||!g&&!f.prevProp||el(g)||"boolean"==typeof g)continue;let b=(c=f.prevProp,"string"==typeof(p=g)?p!==c:!!Array.isArray(p)&&!sx(p,c)),w=b||m===n&&f.isActive&&!x&&y||e>d&&y,A=!1,M=Array.isArray(g)?g:[g],T=M.reduce(r(m),{});!1===v&&(T={});let{prevResolvedValues:S={}}=f,E={...S,...T},P=e=>{w=!0,l.has(e)&&(A=!0,l.delete(e)),f.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in E){let e=T[t],i=S[t];if(!u.hasOwnProperty(t))(e7(e)&&e7(i)?sx(e,i):e===i)?void 0!==e&&l.has(t)?P(t):f.protectedKeys[t]=!0:null!=e?P(t):l.add(t)}f.prevProp=g,f.prevResolvedValues=T,f.isActive&&(u={...u,...T}),s&&t.blockInitialAnimation&&(w=!1);let C=x&&b,F=!C||A;w&&F&&h.push(...M.map(e=>{let i={type:m};if("string"==typeof e&&s&&!C&&t.manuallyAnimateOnMount&&t.parent){let{parent:s}=t,r=e9(s,e);if(s.enteringChildren&&r){let{delayChildren:e}=r.transition||{};i.delay=sy(s.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(l.size){let e={};if("boolean"!=typeof a.initial){let i=e9(t,Array.isArray(a.initial)?a.initial[0]:a.initial);i&&i.transition&&(e.transition=i.transition)}l.forEach(i=>{let s=t.getBaseTarget(i),r=t.getValue(i);r&&(r.liveStyle=!0),e[i]=s??null}),h.push({animation:e})}let m=!!h.length;return s&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}return{animateChanges:n,setActive:function(e,s){if(i[e].isActive===s)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,s)),i[e].isActive=s;let r=n(e);for(let t in i)i[t].protectedKeys={};return r},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=sT(),s=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();el(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends sS{constructor(){super(...arguments),this.id=sE++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let s=this.node.animationState.setActive("exit",!t);e&&!t&&s.then(()=>
1{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}},inView:{Feature:class extends sS{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var t;let e;this.unmount();let{viewport:i={}}=this.node.getProps(),{root:s,margin:r,amount:n="some",once:a}=i,o={root:s?s.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:nn[n]},h=t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,a&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:s}=this.node.getProps(),r=e?i:s;r&&r(t)};return t=this.node.current,e=function({root:t,...e}){let i=t||document;ni.has(i)||ni.set(i,{});let s=ni.get(i),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(nr,{root:t,...e})),s[r]}(o),ne.set(t,h),e.observe(t),()=>{ne.delete(t),e.unobserve(t)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends sS{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[s,r,n]=r1(t,i),a=t=>{let s=t.currentTarget;if(!r7(t))return;r6.add(s);let n=e(s,t),a=(t,e)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",h),r6.has(s)&&r6.delete(s),r7(t)&&"function"==typeof n&&n(t,{success:e})},o=t=>{a(t,s===window||s===document||i.useGlobalTarget||r5(s,t.target))},h=t=>{a(t,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",h,r)};return s.forEach(t=>{(i.useGlobalTarget?window:t).addEventListener("pointerdown",a,r),s8(t)&&"offsetHeight"in t&&(t.addEventListener("focus",t=>((t,e)=>{let i=t.currentTarget;if(!i)return;let s=r9(()=>{if(r6.has(i))return;r8(i,"down");let t=r9(()=>{r8(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>r8(i,"cancel"),e)});i.addEventListener("keydown",s,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),e)})(t,r)),r4.has(t.tagName)||-1!==t.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),n}(t,(t,e)=>(nt(this.node,e,"Start"),(t,{success:e})=>nt(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends sS{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=is(sC(this.node.current,"focus",()=>this.onFocus()),sC(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends sS{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[s,r,n]=r1(t,i),a=t=>{if(!r2(t))return;let{target:i}=t,s=e(i,t);if("function"!=typeof s||!i)return;let n=t=>{r2(t)&&(s(t),i.removeEventListener("pointerleave",n))};i.addEventListener("pointerleave",n,r)};return s.forEach(t=>{t.addEventListener("pointerenter",a,r)}),n}(t,(t,e)=>(r3(this.node,e,"Start"),t=>r3(this.node,t,"End"))))}unmount(){}}},pan:{Feature:class extends sS{constructor(){super(...arguments),this.removePointerDownListener=th}onPointerDown(t){this.session=new sU(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sN(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:sJ(t),onStart:sJ(e),onMove:i,onEnd:(t,e)=>{delete this.session,s&&tc.postRender(()=>s(t,e))}}}mount(){this.removePointerDownListener=sR(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends sS{constructor(t){super(t),this.removeGroupControls=th,this.removeListeners=th,this.controls=new sZ(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||th}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:r0,MeasureLayout:s6},layout:{ProjectionNode:r0,MeasureLayout:s6}},(t,e)=>eB(t)?new e_(e):new eC(e,{allowProjection:t!==l.Fragment}));var no=t.i(22016);function nh(t){let e=t[0],i=t[1],s=t[2];return Math.sqrt(e*e+i*i+s*s)}function nl(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function nu(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}
1function nd(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function nc(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function np(t){let e=t[0],i=t[1],s=t[2];return e*e+i*i+s*s}function nm(t,e){let i=e[0],s=e[1],r=e[2],n=i*i+s*s+r*r;return n>0&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function nf(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ng(t,e,i){let s=e[0],r=e[1],n=e[2],a=i[0],o=i[1],h=i[2];return t[0]=r*h-n*o,t[1]=n*a-s*h,t[2]=s*o-r*a,t}let ny=(s=[0,0,0],r=[0,0,0],function(t,e){nl(s,t),nl(r,e),nm(s,s),nm(r,r);let i=nf(s,r);return i>1?0:i<-1?Math.PI:Math.acos(i)});class nv extends Array{constructor(t=0,e=t,i=t){return super(t,e,i),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,e=t,i=t){return t.length?this.copy(t):(this[0]=t,this[1]=e,this[2]=i,this)}copy(t){return nl(this,t),this}add(t,e){return e?nu(this,t,e):nu(this,this,t),this}sub(t,e){return e?nd(this,t,e):nd(this,this,t),this}multiply(t){if(t.length)this[0]=this[0]*t[0],this[1]=this[1]*t[1],this[2]=this[2]*t[2];else nc(this,this,t);return this}divide(t){if(t.length)this[0]=this[0]/t[0],this[1]=this[1]/t[1],this[2]=this[2]/t[2];else nc(this,this,1/t);return this}inverse(t=this){return this[0]=1/t[0],this[1]=1/t[1],this[2]=1/t[2],this}len(){return nh(this)}distance(t){let e,i,s;if(!t)return nh(this);return e=t[0]-this[0],Math.sqrt(e*e+(i=t[1]-this[1])*i+(s=t[2]-this[2])*s)}squaredLen(){return np(this)}squaredDistance(t){let e,i,s;if(!t)return np(this);return e=t[0]-this[0],e*e+(i=t[1]-this[1])*i+(s=t[2]-this[2])*s}negate(t=this){return this[0]=-t[0],this[1]=-t[1],this[2]=-t[2],this}cross(t,e){return e?ng(this,t,e):ng(this,this,t),this}scale(t){return nc(this,this,t),this}normalize(){return nm(this,this),this}dot(t){return nf(this,t)}equals(t){return this[0]===t[0]&&this[1]===t[1]&&this[2]===t[2]}applyMatrix3(t){let e,i,s;return e=this[0],i=this[1],s=this[2],this[0]=e*t[0]+i*t[3]+s*t[6],this[1]=e*t[1]+i*t[4]+s*t[7],this[2]=e*t[2]+i*t[5]+s*t[8],this}applyMatrix4(t){let e,i,s,r;return e=this[0],i=this[1],s=this[2],r=(r=t[3]*e+t[7]*i+t[11]*s+t[15])||1,this[0]=(t[0]*e+t[4]*i+t[8]*s+t[12])/r,this[1]=(t[1]*e+t[5]*i+t[9]*s+t[13])/r,this[2]=(t[2]*e+t[6]*i+t[10]*s+t[14])/r,this}scaleRotateMatrix4(t){let e,i,s,r;return e=this[0],i=this[1],s=this[2],r=(r=t[3]*e+t[7]*i+t[11]*s+t[15])||1,this[0]=(t[0]*e+t[4]*i+t[8]*s)/r,this[1]=(t[1]*e+t[5]*i+t[9]*s)/r,this[2]=(t[2]*e+t[6]*i+t[10]*s)/r,this}applyQuaternion(t){let e,i,s,r,n,a,o,h,l,u,d,c,p,m;return e=this[0],i=this[1],s=this[2],r=t[0],n=t[1],a=t[2],o=t[3],h=n*s-a*i,l=a*e-r*s,u=r*i-n*e,d=n*u-a*l,c=a*h-r*u,p=r*l-n*h,h*=m=2*o,l*=m,u*=m,d*=2,c*=2,p*=2,this[0]=e+h+d,this[1]=i+l+c,this[2]=s+u+p,this}angle(t){return ny(this,t)}lerp(t,e){let i,s,r;return i=this[0],s=this[1],r=this[2],this[0]=i+e*(t[0]-i),this[1]=s+e*(t[1]-s),this[2]=r+e*(t[2]-r),this}smoothLerp(t,e,i){let s,r,n,a;return s=Math.exp(-e*i),r=this[0],n=this[1],a=this[2],this[0]=t[0]+(r-t[0])*s,this[1]=t[1]+(n-t[1])*s,this[2]=t[2]+(a-t[2])*s,this}clone(){return new nv(this[0],this[1],this[2])}fromArray(t,e=0){return this[0]=t[e],this[1]=t[e+1],this[2]=t[e+2],this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}transformDirection(t){let e=this[0],i=this[1],s=this[2];return this[0]=t[0]*e+t[4]*i+t[8]*s,this[1]=t[1]*e+t[5]*i+t[9]*s,this[2]=t[2]*e+t[6]*i+t[10]*s,this.normalize()}}let nx=new nv,nb=1;class nw{constructor({canvas:t=document.createElement("canvas"),width:e=300,height:i=150,dpr:s=1,alpha:r=!1,depth:n=!0,stencil:a=!1,antialias:o=!1,premultipliedAlpha:h=!1,preserveDrawingBuffer:l=!1,powerPreference:u="default",autoClear:d=!0,webgl:c=2}={}){const p={alpha:r,depth:n,stencil:a,antialias:o,premultipliedAlpha:h,preserveDrawingBuffer:l,powerPreference:u};this.dpr=s,this.alpha=r,this.color=!0,this.depth=n,this.stencil=a,this.premultipliedAlpha=h,this.autoClear=d,this.id=nb++,2===c&&(this.gl=t.getContext("webgl2",p)),this.isWebgl2=!!this.gl,this.gl||(this.gl=t.getContext("webgl",p)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(e,i),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(t,e){this.width=t,this.height=e,this.gl.canvas.width=t*this.dpr,this.gl.canvas.height=e*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:t+"px",height:e+"px"})}setViewport(t,e,i=0,s=0){(this.state.viewport.width!==t||this.state.viewport.height!==e)&&(this.state.viewport.width=t,this.state.viewport.height=e,this.state.viewport.x=i,this.state.viewport.y=s,this.gl.viewport(i,s,t,e))}setScissor(t,e,i=0,s=0){this.gl.scissor(i,s,t,e)}enable(t){!0!==this.state[t]&&(this.gl.enable(t),this.state[t]=!0)}disable(t){!1!==this.state[t]&&(this.gl.disable(t),this.state[t]=!1)}setBlendFunc(t,e,i,s){(this.state.blendFunc.src!==t||this.state.blendFunc.dst!==e||this.state.blendFunc.srcAlpha!==i||this.state.blendFunc.dstAlpha!==s)&&(this.state.blendFunc.src=t,this.state.blendFunc.dst=e,this.state.blendFunc.srcAlpha=i,this.state.blendFunc.dstAlpha=s,void 0!==i?this.gl.blendFuncSeparate(t,e,i,s):this.gl.blendFunc(t,e))}setBlendEquation(t,e){t=t||this.gl.FUNC_ADD,(this.state.blendEquation.modeRGB!==t||this.state.blendEquation.modeAlpha!==e)&&(this.state.blendEquation.modeRGB=t,this.state.blendEquation.modeAlpha=e,void 0!==e?this.gl.blendEquationSeparate(t,e):this.gl.blendEquation(t))}setCullFace(t){this.state.cullFace!==t&&(this.state.cullFace=t,this.gl.cullFace(t))}setFrontFace(t){this.state.frontFace!==t&&(this.state.frontFace=t,this.gl.frontFace(t))}setDepthMask(t){this.state.depthMask!==t&&(this.state.depthMask=t,this.gl.depthMask(t))}setDepthFunc(t){this.state.depthFunc!==t&&(this.state.depthFunc=t,this.gl.depthFunc(t))}setStencilMask(t){this.state.stencilMask!==t&&(this.state.stencilMask=t,this.gl.stencilMask(t))}setStencilFunc(t,e,i){(this.state.stencilFunc!==t||this.state.stencilRef!==e||this.state.stencilFuncMask!==i)&&(this.state.stencilFunc=t||this.gl.ALWAYS,this.state.stencilRef=e||0,this.state.stencilFuncMask=i||0,this.gl.stencilFunc(t||this.gl.ALWAYS,e||0,i||0))}setStencilOp(t,e,i){(this.state.stencilFail!==t||this.state.stencilDepthFail!==e||this.state.stencilDepthPass!==i)&&(this.state.stencilFail=t,this.state.stencilDepthFail=e,this.state.stencilDepthPass=i,this.gl.stencilOp(t,e,i))}activeTexture(t){this.state.activeTextureUnit!==t&&(this.state.activeTextureUnit=t,this.gl.activeTexture(this.gl.TEXTURE0+t))}bindFramebuffer({target:t=this.gl.FRAMEBUFFER,buffer:e=null}={}){this.state.framebuffer!==e&&(this.state.framebuffer=e,this.gl.bindFramebuffer(t,e))}getExtension(t,e,i){return e&&this.gl[e]?this.gl[e].bind(this.gl):(this.extensions[t]||(this.extensions[t]=this.gl.getExtension(t)),e)?this.extensions[t]?this.extensions[t][i].bind(this.extensions[t]):null:this.extensions[t]}sortOpaque(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program.id!==e.program.id?t.program.id-e.program.id:t.zDepth!==e.zDepth?t.zDepth-e.zDepth:e.id-t.id}
1sortTransparent(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.zDepth!==e.zDepth?e.zDepth-t.zDepth:e.id-t.id}sortUI(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program.id!==e.program.id?t.program.id-e.program.id:e.id-t.id}getRenderList({scene:t,camera:e,frustumCull:i,sort:s}){let r=[];if(e&&i&&e.updateFrustum(),t.traverse(t=>!t.visible||(t.draw?void((!i||!t.frustumCulled||!e||e.frustumIntersectsMesh(t))&&r.push(t)):void 0)),s){let t=[],i=[],s=[];r.forEach(r=>{r.program.transparent?r.program.depthTest?i.push(r):s.push(r):t.push(r),r.zDepth=0,0===r.renderOrder&&r.program.depthTest&&e&&(r.worldMatrix.getTranslation(nx),nx.applyMatrix4(e.projectionViewMatrix),r.zDepth=nx.z)}),t.sort(this.sortOpaque),i.sort(this.sortTransparent),s.sort(this.sortUI),r=t.concat(i,s)}return r}render({scene:t,camera:e,target:i=null,update:s=!0,sort:r=!0,frustumCull:n=!0,clear:a}){null===i?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(i),this.setViewport(i.width,i.height)),(a||this.autoClear&&!1!==a)&&(this.depth&&(!i||i.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!i||i.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),s&&t.updateMatrixWorld(),e&&e.updateMatrixWorld(),this.getRenderList({scene:t,camera:e,frustumCull:n,sort:r}).forEach(t=>{t.draw({camera:e})})}}let nA=1,nM={};class nT{constructor(t,{vertex:e,fragment:i,uniforms:s={},transparent:r=!1,cullFace:n=t.BACK,frontFace:a=t.CCW,depthTest:o=!0,depthWrite:h=!0,depthFunc:l=t.LEQUAL}={}){t.canvas||console.error("gl not passed as first argument to Program"),this.gl=t,this.uniforms=s,this.id=nA++,e||console.warn("vertex shader not supplied"),i||console.warn("fragment shader not supplied"),this.transparent=r,this.cullFace=n,this.frontFace=a,this.depthTest=o,this.depthWrite=h,this.depthFunc=l,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=t.createShader(t.VERTEX_SHADER),this.fragmentShader=t.createShader(t.FRAGMENT_SHADER),this.program=t.createProgram(),t.attachShader(this.program,this.vertexShader),t.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:e,fragment:i})}setShaders({vertex:t,fragment:e}){if(t&&(this.gl.shaderSource(this.vertexShader,t),this.gl.compileShader(this.vertexShader),""!==this.gl.getShaderInfoLog(this.vertexShader)&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)} 2Vertex Shader 3${nE(t)}`)),e&&(this.gl.shaderSource(this.fragmentShader,e),this.gl.compileShader(this.fragmentShader),""!==this.gl.getShaderInfoLog(this.fragmentShader)&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)} 4Fragment Shader 5${nE(e)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let i=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let t=0;t<i;t++){let e=this.gl.getActiveUniform(this.program,t);this.uniformLocations.set(e,this.gl.getUniformLocation(this.program,e.name));let i=e.name.match(/(\w+)/g);e.uniformName=i[0],e.nameComponents=i.slice(1)}this.attributeLocations=new Map;let s=[],r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let t=0;t<r;t++){let e=this.gl.getActiveAttrib(this.program,t),i=this.gl.getAttribLocation(this.program,e.name);-1!==i&&(s[i]=e.name,this.attributeLocations.set(e,i))}this.attributeOrder=s.join("")}setBlendFunc(t,e,i,s){this.blendFunc.src=t,this.blendFunc.dst=e,this.blendFunc.srcAlpha=i,this.blendFunc.dstAlpha=s,t&&(this.transparent=!0)}setBlendEquation(t,e){this.blendEquation.modeRGB=t,this.blendEquation.modeAlpha=e}setStencilFunc(t,e,i){this.stencilRef=e,this.stencilFunc.func=t,this.stencilFunc.ref=e,this.stencilFunc.mask=i}setStencilOp(t,e,i){this.stencilOp.stencilFail=t,this.stencilOp.depthFail=e,this.stencilOp.depthPass=i}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:t=!1}={}){let e=-1;this.gl.renderer.state.currentProgram!==this.id&&(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id
5),this.uniformLocations.forEach((t,i)=>{let s=this.uniforms[i.uniformName];for(let t of i.nameComponents){if(!s)break;if(t in s)s=s[t];else if(Array.isArray(s.value))break;else{s=void 0;break}}if(!s)return nC(`Active uniform ${i.name} has not been supplied`);if(s&&void 0===s.value)return nC(`${i.name} uniform is missing a value parameter`);if(s.value.texture)return e+=1,s.value.update(e),nS(this.gl,i.type,t,e);if(s.value.length&&s.value[0].texture){let r=[];return s.value.forEach(t=>{e+=1,t.update(e),r.push(e)}),nS(this.gl,i.type,t,r)}nS(this.gl,i.type,t,s.value)}),this.applyState(),t&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function nS(t,e,i,s){s=s.length?function(t){let e=t.length,i=t[0].length;if(void 0===i)return t;let s=e*i,r=nM[s];r||(nM[s]=r=new Float32Array(s));for(let s=0;s<e;s++)r.set(t[s],s*i);return r}(s):s;let r=t.renderer.state.uniformLocations.get(i);if(s.length)if(void 0===r||r.length!==s.length)t.renderer.state.uniformLocations.set(i,s.slice(0));else{if(function(t,e){if(t.length!==e.length)return!1;for(let i=0,s=t.length;i<s;i++)if(t[i]!==e[i])return!1;return!0}(r,s))return;r.set?r.set(s):function(t,e){for(let i=0,s=t.length;i<s;i++)t[i]=e[i]}(r,s),t.renderer.state.uniformLocations.set(i,r)}else{if(r===s)return;t.renderer.state.uniformLocations.set(i,s)}switch(e){case 5126:return s.length?t.uniform1fv(i,s):t.uniform1f(i,s);case 35664:return t.uniform2fv(i,s);case 35665:return t.uniform3fv(i,s);case 35666:return t.uniform4fv(i,s);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return s.length?t.uniform1iv(i,s):t.uniform1i(i,s);case 35671:case 35667:return t.uniform2iv(i,s);case 35672:case 35668:return t.uniform3iv(i,s);case 35673:case 35669:return t.uniform4iv(i,s);case 35674:return t.uniformMatrix2fv(i,!1,s);case 35675:return t.uniformMatrix3fv(i,!1,s);case 35676:return t.uniformMatrix4fv(i,!1,s)}}function nE(t){let e=t.split("\n");for(let t=0;t<e.length;t++)e[t]=t+1+": "+e[t];return e.join("\n")}let nP=0;function nC(t){!(nP>100)&&(console.warn(t),++nP>100&&console.warn("More than 100 program warnings - stopping logs."))}function nF(t,e,i){let s=e[0],r=e[1],n=e[2],a=e[3],o=i[0],h=i[1],l=i[2],u=i[3];return t[0]=s*u+a*o+r*l-n*h,t[1]=r*u+a*h+n*o-s*l,t[2]=n*u+a*l+s*h-r*o,t[3]=a*u-s*o-r*h-n*l,t}let nk=function(t,e){let i=e[0],s=e[1],r=e[2],n=e[3],a=i*i+s*s+r*r+n*n;return a>0&&(a=1/Math.sqrt(a)),t[0]=i*a,t[1]=s*a,t[2]=r*a,t[3]=n*a,t};class nR extends Array{constructor(t=0,e=0,i=0,s=1){super(t,e,i,s),this.onChange=()=>{},this._target=this;const r=["0","1","2","3"];return new Proxy(this,{set(t,e){let i=Reflect.set(...arguments);return i&&r.includes(e)&&t.onChange(),i}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set w(t){this._target[3]=t,this.onChange()}identity(){var t;return(t=this._target)[0]=0,t[1]=0,t[2]=0,t[3]=1,this.onChange(),this}set(t,e,i,s){var r;return t.length?this.copy(t):(r=this._target,r[0]=t,r[1]=e,r[2]=i,r[3]=s,this.onChange(),this)}rotateX(t){var e,i,s;let r,n,a,o,h,l;return e=this._target,i=this._target,s=.5*t,r=i[0],n=i[1],a=i[2],o=i[3],h=Math.sin(s),l=Math.cos(s),e[0]=r*l+o*h,e[1]=n*l+a*h,e[2]=a*l-n*h,e[3]=o*l-r*h,this.onChange(),this}rotateY(t){var e,i,s;let r,n,a,o,h,l;return e=this._target,i=this._target,s=.5*t,r=i[0],n=i[1],a=i[2],o=i[3],h=Math.sin(s),l=Math.cos(s),e[0]=r*l-a*h,e[1]=n*l+o*h,e[2]=a*l+r*h,e[3]=o*l-n*h,this.onChange(),this}rotateZ(t){var e,i,s;let r,n,a,o,h,l;return e=this._target,i=this._target,s=.5*t,r=i[0],n=i[1],a=i[2],o=i[3],h=Math.sin(s),l=Math.cos(s),e[0]=r*l+n*h,e[1]=n*l-r*h,e[2]=a*l+o*h,e[3]=o*l-a*h,this.onChange(),this}inverse(t=this._target){var e;let i,s,r,n,a,o;return e=this._target,i=t[0],s=t[1],o=(a=i*i+s*s+(r=t[2])*r+(n=t[3])*n)?1/a:0,e[0]=-i*o,e[1]=-s*o,e[2]=-r*o,e[3]=n*o,this.onChange(),this}conjugate(t=this._target){var e;return e=this._target,e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],this.onChange(),this}copy(t){var e;return e=this._target,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.onChange(),this}normalize(t=this._target){return nk(this._target,t),this.onChange(),this}multiply(t,e){return e?nF(this._target,t,e):nF(this._target,this._target,t),this.onChange(),this}dot(t){var e;return e=this._target,e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}fromMatrix3(t){return!function(t,e){let i,s=e[0]+e[4]+e[8];if(s>0)i=Math.sqrt(s+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{let s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);let r=(s+1)%3,n=(s+2)%3;i=Math.sqrt(e[3*s+s]-e[3*r+r]-e[3*n+n]+1),t[s]=.5*i,i=.5/i,t[3]=(e[3*r+n]-e[3*n+r])*i,t[r]=(e[3*r+s]+e[3*s+r])*i,t[n]=(e[3*n+s]+e[3*s+n])*i}}(this._target,t),this.onChange(),this}
5fromEuler(t,e){return!function(t,e,i="YXZ"){let s=Math.sin(.5*e[0]),r=Math.cos(.5*e[0]),n=Math.sin(.5*e[1]),a=Math.cos(.5*e[1]),o=Math.sin(.5*e[2]),h=Math.cos(.5*e[2]);"XYZ"===i?(t[0]=s*a*h+r*n*o,t[1]=r*n*h-s*a*o,t[2]=r*a*o+s*n*h,t[3]=r*a*h-s*n*o):"YXZ"===i?(t[0]=s*a*h+r*n*o,t[1]=r*n*h-s*a*o,t[2]=r*a*o-s*n*h,t[3]=r*a*h+s*n*o):"ZXY"===i?(t[0]=s*a*h-r*n*o,t[1]=r*n*h+s*a*o,t[2]=r*a*o+s*n*h,t[3]=r*a*h-s*n*o):"ZYX"===i?(t[0]=s*a*h-r*n*o,t[1]=r*n*h+s*a*o,t[2]=r*a*o-s*n*h,t[3]=r*a*h+s*n*o):"YZX"===i?(t[0]=s*a*h+r*n*o,t[1]=r*n*h+s*a*o,t[2]=r*a*o-s*n*h,t[3]=r*a*h-s*n*o):"XZY"===i&&(t[0]=s*a*h-r*n*o,t[1]=r*n*h-s*a*o,t[2]=r*a*o+s*n*h,t[3]=r*a*h+s*n*o)}(this._target,t,t.order),e||this.onChange(),this}fromAxisAngle(t,e){var i,s;let r;return i=this._target,r=Math.sin(s=.5*e),i[0]=r*t[0],i[1]=r*t[1],i[2]=r*t[2],i[3]=Math.cos(s),this.onChange(),this}slerp(t,e){var i,s;let r,n,a,o,h,l,u,d,c,p,m,f,g;return i=this._target,s=this._target,l=s[0],u=s[1],d=s[2],c=s[3],p=t[0],m=t[1],(n=l*p+u*m+d*(f=t[2])+c*(g=t[3]))<0&&(n=-n,p=-p,m=-m,f=-f,g=-g),1-n>1e-6?(a=Math.sin(r=Math.acos(n)),o=Math.sin((1-e)*r)/a,h=Math.sin(e*r)/a):(o=1-e,h=e),i[0]=o*l+h*p,i[1]=o*u+h*m,i[2]=o*d+h*f,i[3]=o*c+h*g,this.onChange(),this}fromArray(t,e=0){return this._target[0]=t[e],this._target[1]=t[e+1],this._target[2]=t[e+2],this._target[3]=t[e+3],this.onChange(),this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}}function nV(t){let e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],d=t[10],c=t[11],p=t[12],m=t[13],f=t[14],g=t[15];return(e*a-i*n)*(d*g-c*f)-(e*o-s*n)*(u*g-c*m)+(e*h-r*n)*(u*f-d*m)+(i*o-s*a)*(l*g-c*p)-(i*h-r*a)*(l*f-d*p)+(s*h-r*o)*(l*m-u*p)}function nj(t,e,i){let s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],d=e[8],c=e[9],p=e[10],m=e[11],f=e[12],g=e[13],y=e[14],v=e[15],x=i[0],b=i[1],w=i[2],A=i[3];return t[0]=x*s+b*o+w*d+A*f,t[1]=x*r+b*h+w*c+A*g,t[2]=x*n+b*l+w*p+A*y,t[3]=x*a+b*u+w*m+A*v,x=i[4],b=i[5],w=i[6],A=i[7],t[4]=x*s+b*o+w*d+A*f,t[5]=x*r+b*h+w*c+A*g,t[6]=x*n+b*l+w*p+A*y,t[7]=x*a+b*u+w*m+A*v,x=i[8],b=i[9],w=i[10],A=i[11],t[8]=x*s+b*o+w*d+A*f,t[9]=x*r+b*h+w*c+A*g,t[10]=x*n+b*l+w*p+A*y,t[11]=x*a+b*u+w*m+A*v,x=i[12],b=i[13],w=i[14],A=i[15],t[12]=x*s+b*o+w*d+A*f,t[13]=x*r+b*h+w*c+A*g,t[14]=x*n+b*l+w*p+A*y,t[15]=x*a+b*u+w*m+A*v,t}function nD(t,e){let i=e[0],s=e[1],r=e[2],n=e[4],a=e[5],o=e[6],h=e[8],l=e[9],u=e[10];return t[0]=Math.hypot(i,s,r),t[1]=Math.hypot(n,a,o),t[2]=Math.hypot(h,l,u),t}let nL=(n=[1,1,1],function(t,e){nD(n,e);let i=1/n[0],s=1/n[1],r=1/n[2],a=e[0]*i,o=e[1]*s,h=e[2]*r,l=e[4]*i,u=e[5]*s,d=e[6]*r,c=e[8]*i,p=e[9]*s,m=e[10]*r,f=a+u+m,g=0;return f>0?(g=2*Math.sqrt(f+1),t[3]=.25*g,t[0]=(d-p)/g,t[1]=(c-h)/g,t[2]=(o-l)/g):a>u&&a>m?(g=2*Math.sqrt(1+a-u-m),t[3]=(d-p)/g,t[0]=.25*g,t[1]=(o+l)/g,t[2]=(c+h)/g):u>m?(g=2*Math.sqrt(1+u-a-m),t[3]=(c-h)/g,t[0]=(o+l)/g,t[1]=.25*g,t[2]=(d+p)/g):(g=2*Math.sqrt(1+m-a-u),t[3]=(o-l)/g,t[0]=(c+h)/g,t[1]=(d+p)/g,t[2]=.25*g),t});function n_(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t[3]=e[3]+i[3],t[4]=e[4]+i[4],t[5]=e[5]+i[5],t[6]=e[6]+i[6],t[7]=e[7]+i[7],t[8]=e[8]+i[8],t[9]=e[9]+i[9],t[10]=e[10]+i[10],t[11]=e[11]+i[11],t[12]=e[12]+i[12],t[13]=e[13]+i[13],t[14]=e[14]+i[14],t[15]=e[15]+i[15],t}function nO(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t[3]=e[3]-i[3],t[4]=e[4]-i[4],t[5]=e[5]-i[5],t[6]=e[6]-i[6],t[7]=e[7]-i[7],t[8]=e[8]-i[8],t[9]=e[9]-i[9],t[10]=e[10]-i[10],t[11]=e[11]-i[11],t[12]=e[12]-i[12],t[13]=e[13]-i[13],t[14]=e[14]-i[14],t[15]=e[15]-i[15],t}class nB extends Array{constructor(t=1,e=0,i=0,s=0,r=0,n=1,a=0,o=0,h=0,l=0,u=1,d=0,c=0,p=0,m=0,f=1){return super(t,e,i,s,r,n,a,o,h,l,u,d,c,p,m,f),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}set(t,e,i,s,r,n,a,o,h,l,u,d,c,p,m,f){return t.length?this.copy(t):(this[0]=t,this[1]=e,this[2]=i,this[3]=s,this[4]=r,this[5]=n,this[6]=a,this[7]=o,this[8]=h,this[9]=l,this[10]=u,this[11]=d,this[12]=c,this[13]=p,this[14]=m,this[15]=f,this)}translate(t,e=this){let i,s,r,n,a,o,h,l,u,d,c,p,m,f,g;return m=t[0],f=t[1],g=t[2],e===this?(this[12]=e[0]*m+e[4]*f+e[8]*g+e[12],this[13]=e[1]*m+e[5]*f+e[9]*g+e[13],this[14]=e[2]*m+e[6]*f+e[10]*g+e[14],this[15]=e[3]*m+e[7]*f+e[11]*g+e[15]):(i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],d=e[9],c=e[10],p=e[11],this[0]=i,this[1]=s,this[2]=r,this[3]=n,this[4]=a,this[5]=o,this[6]=h,this[7]=l,this[8]=u,this[9]=d,this[10]=c,this[11]=p,this[12]=i*m+a*f+u*g+e[12],this[13]=s*m+o*f+d*g+e[13],this[14]=r*m+h*f+c*g+e[14],this[15]=n*m+l*f+p*g+e[15]),this}rotate(t,e,i=this){let s,r,n,a,o,h,l,u,d,c,p,m,f,g,y,v,x,b,w,A,M,T,S,E,P,C,F,k;return P=e[0],1e-6>
5Math.abs(k=Math.hypot(P,C=e[1],F=e[2]))||(P*=k=1/k,C*=k,F*=k,s=Math.sin(t),n=1-(r=Math.cos(t)),a=i[0],o=i[1],h=i[2],l=i[3],u=i[4],d=i[5],c=i[6],p=i[7],m=i[8],f=i[9],g=i[10],y=i[11],v=P*P*n+r,x=C*P*n+F*s,b=F*P*n-C*s,w=P*C*n-F*s,A=C*C*n+r,M=F*C*n+P*s,T=P*F*n+C*s,S=C*F*n-P*s,E=F*F*n+r,this[0]=a*v+u*x+m*b,this[1]=o*v+d*x+f*b,this[2]=h*v+c*x+g*b,this[3]=l*v+p*x+y*b,this[4]=a*w+u*A+m*M,this[5]=o*w+d*A+f*M,this[6]=h*w+c*A+g*M,this[7]=l*w+p*A+y*M,this[8]=a*T+u*S+m*E,this[9]=o*T+d*S+f*E,this[10]=h*T+c*S+g*E,this[11]=l*T+p*S+y*E,i!==this&&(this[12]=i[12],this[13]=i[13],this[14]=i[14],this[15]=i[15])),this}scale(t,e=this){var i;let s,r,n;return s=(i="number"==typeof t?[t,t,t]:t)[0],r=i[1],n=i[2],this[0]=e[0]*s,this[1]=e[1]*s,this[2]=e[2]*s,this[3]=e[3]*s,this[4]=e[4]*r,this[5]=e[5]*r,this[6]=e[6]*r,this[7]=e[7]*r,this[8]=e[8]*n,this[9]=e[9]*n,this[10]=e[10]*n,this[11]=e[11]*n,this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this}add(t,e){return e?n_(this,t,e):n_(this,this,t),this}sub(t,e){return e?nO(this,t,e):nO(this,this,t),this}multiply(t,e){if(t.length)e?nj(this,t,e):nj(this,this,t);else this[0]=this[0]*t,this[1]=this[1]*t,this[2]=this[2]*t,this[3]=this[3]*t,this[4]=this[4]*t,this[5]=this[5]*t,this[6]=this[6]*t,this[7]=this[7]*t,this[8]=this[8]*t,this[9]=this[9]*t,this[10]=this[10]*t,this[11]=this[11]*t,this[12]=this[12]*t,this[13]=this[13]*t,this[14]=this[14]*t,this[15]=this[15]*t;return this}identity(){return this[0]=1,this[1]=0,this[2]=0,this[3]=0,this[4]=0,this[5]=1,this[6]=0,this[7]=0,this[8]=0,this[9]=0,this[10]=1,this[11]=0,this[12]=0,this[13]=0,this[14]=0,this[15]=1,this}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this}fromPerspective({fov:t,aspect:e,near:i,far:s}={}){let r,n;return r=1/Math.tan(t/2),n=1/(i-s),this[0]=r/e,this[1]=0,this[2]=0,this[3]=0,this[4]=0,this[5]=r,this[6]=0,this[7]=0,this[8]=0,this[9]=0,this[10]=(s+i)*n,this[11]=-1,this[12]=0,this[13]=0,this[14]=2*s*i*n,this[15]=0,this}fromOrthogonal({left:t,right:e,bottom:i,top:s,near:r,far:n}){let a,o,h;return a=1/(t-e),o=1/(i-s),h=1/(r-n),this[0]=-2*a,this[1]=0,this[2]=0,this[3]=0,this[4]=0,this[5]=-2*o,this[6]=0,this[7]=0,this[8]=0,this[9]=0,this[10]=2*h,this[11]=0,this[12]=(t+e)*a,this[13]=(s+i)*o,this[14]=(n+r)*h,this[15]=1,this}fromQuaternion(t){let e,i,s,r,n,a,o,h,l,u,d,c,p,m,f,g;return e=t[0],i=t[1],s=t[2],r=t[3],n=e+e,a=i+i,o=s+s,h=e*n,l=i*n,u=i*a,d=s*n,c=s*a,p=s*o,m=r*n,f=r*a,g=r*o,this[0]=1-u-p,this[1]=l+g,this[2]=d-f,this[3]=0,this[4]=l-g,this[5]=1-h-p,this[6]=c+m,this[7]=0,this[8]=d+f,this[9]=c-m,this[10]=1-h-u,this[11]=0,this[12]=0,this[13]=0,this[14]=0,this[15]=1,this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){let e,i,s,r,n,a,o,h,l,u,d,c,p,m,f,g,y,v,x,b,w,A,M,T,S,E,P,C,F;return e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],d=t[10],c=t[11],p=t[12],m=t[13],f=t[14],g=t[15],y=e*a-i*n,v=e*o-s*n,x=e*h-r*n,b=i*o-s*a,w=i*h-r*a,A=s*h-r*o,M=l*m-u*p,T=l*f-d*p,S=l*g-c*p,E=u*f-d*m,P=u*g-c*m,(F=y*(C=d*g-c*f)-v*P+x*E+b*S-w*T+A*M)&&(F=1/F,this[0]=(a*C-o*P+h*E)*F,this[1]=(s*P-i*C-r*E)*F,this[2]=(m*A-f*w+g*b)*F,this[3]=(d*w-u*A-c*b)*F,this[4]=(o*S-n*C-h*T)*F,this[5]=(e*C-s*S+r*T)*F,this[6]=(f*x-p*A-g*v)*F,this[7]=(l*A-d*x+c*v)*F,this[8]=(n*P-a*S+h*M)*F,this[9]=(i*S-e*P-r*M)*F,this[10]=(p*w-m*x+g*y)*F,this[11]=(u*x-l*w-c*y)*F,this[12]=(a*T-n*E-o*M)*F,this[13]=(e*E-i*T+s*M)*F,this[14]=(m*v-p*b-f*y)*F,this[15]=(l*b-u*v+d*y)*F),this}compose(t,e,i){let s,r,n,a,o,h,l,u,d,c,p,m,f,g,y,v,x,b,w;return s=t[0],r=t[1],n=t[2],a=t[3],o=s+s,h=r+r,l=n+n,u=s*o,d=s*h,c=s*l,p=r*h,m=r*l,f=n*l,g=a*o,y=a*h,v=a*l,x=i[0],b=i[1],w=i[2],this[0]=(1-(p+f))*x,this[1]=(d+v)*x,this[2]=(c-y)*x,this[3]=0,this[4]=(d-v)*b,this[5]=(1-(u+f))*b,this[6]=(m+g)*b,this[7]=0,this[8]=(c+y)*w,this[9]=(m-g)*w,this[10]=(1-(u+p))*w,this[11]=0,this[12]=e[0],this[13]=e[1],this[14]=e[2],this[15]=1,this}decompose(t,e,i){let s,r,n,a,o,h,l;
5return s=nh([this[0],this[1],this[2]]),r=nh([this[4],this[5],this[6]]),n=nh([this[8],this[9],this[10]]),0>nV(this)&&(s=-s),e[0]=this[12],e[1]=this[13],e[2]=this[14],a=this.slice(),o=1/s,h=1/r,l=1/n,a[0]*=o,a[1]*=o,a[2]*=o,a[4]*=h,a[5]*=h,a[6]*=h,a[8]*=l,a[9]*=l,a[10]*=l,nL(t,a),i[0]=s,i[1]=r,i[2]=n,this}getRotation(t){return nL(t,this),this}getTranslation(t){return t[0]=this[12],t[1]=this[13],t[2]=this[14],this}getScaling(t){return nD(t,this),this}getMaxScaleOnAxis(){let t,e,i,s,r,n,a,o,h;return t=this[0],e=this[1],i=this[2],s=this[4],r=this[5],n=this[6],a=this[8],Math.sqrt(Math.max(t*t+e*e+i*i,s*s+r*r+n*n,a*a+(o=this[9])*o+(h=this[10])*h))}lookAt(t,e,i){let s,r,n,a,o,h,l,u,d,c,p,m,f;return s=t[0],r=t[1],n=t[2],a=i[0],o=i[1],h=i[2],l=s-e[0],0==(c=l*l+(u=r-e[1])*u+(d=n-e[2])*d)?d=1:(l*=c=1/Math.sqrt(c),u*=c,d*=c),0==(c=(p=o*d-h*u)*p+(m=h*l-a*d)*m+(f=a*u-o*l)*f)&&(h?a+=1e-6:o?h+=1e-6:o+=1e-6,c=(p=o*d-h*u)*p+(m=h*l-a*d)*m+(f=a*u-o*l)*f),p*=c=1/Math.sqrt(c),m*=c,f*=c,this[0]=p,this[1]=m,this[2]=f,this[3]=0,this[4]=u*f-d*m,this[5]=d*p-l*f,this[6]=l*m-u*p,this[7]=0,this[8]=l,this[9]=u,this[10]=d,this[11]=0,this[12]=s,this[13]=r,this[14]=n,this[15]=1,this}determinant(){return nV(this)}fromArray(t,e=0){return this[0]=t[e],this[1]=t[e+1],this[2]=t[e+2],this[3]=t[e+3],this[4]=t[e+4],this[5
5]=t[e+5],this[6]=t[e+6],this[7]=t[e+7],this[8]=t[e+8],this[9]=t[e+9],this[10]=t[e+10],this[11]=t[e+11],this[12]=t[e+12],this[13]=t[e+13],this[14]=t[e+14],this[15]=t[e+15],this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t[e+4]=this[4],t[e+5]=this[5],t[e+6]=this[6],t[e+7]=this[7],t[e+8]=this[8],t[e+9]=this[9],t[e+10]=this[10],t[e+11]=this[11],t[e+12]=this[12],t[e+13]=this[13],t[e+14]=this[14],t[e+15]=this[15],t}}let nN=new nB;class nI extends Array{constructor(t=0,e=t,i=t,s="YXZ"){super(t,e,i),this.order=s,this.onChange=()=>{},this._target=this;const r=["0","1","2"];return new Proxy(this,{set(t,e){let i=Reflect.set(...arguments);return i&&r.includes(e)&&t.onChange(),i}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set(t,e=t,i=t){return t.length?this.copy(t):(this._target[0]=t,this._target[1]=e,this._target[2]=i,this.onChange(),this)}copy(t){return this._target[0]=t[0],this._target[1]=t[1],this._target[2]=t[2],this.onChange(),this}reorder(t){return this._target.order=t,this.onChange(),this}fromRotationMatrix(t,e=this.order){return!function(t,e,i="YXZ"){"XYZ"===i?(t[1]=Math.asin(Math.min(Math.max(e[8],-1),1)),.99999>Math.abs(e[8])?(t[0]=Math.atan2(-e[9],e[10]),t[2]=Math.atan2(-e[4],e[0])):(t[0]=Math.atan2(e[6],e[5]),t[2]=0)):"YXZ"===i?(t[0]=Math.asin(-Math.min(Math.max(e[9],-1),1)),.99999>Math.abs(e[9])?(t[1]=Math.atan2(e[8],e[10]),t[2]=Math.atan2(e[1],e[5])):(t[1]=Math.atan2(-e[2],e[0]),t[2]=0)):"ZXY"===i?(t[0]=Math.asin(Math.min(Math.max(e[6],-1),1)),.99999>Math.abs(e[6])?(t[1]=Math.atan2(-e[2],e[10]),t[2]=Math.atan2(-e[4],e[5])):(t[1]=0,t[2]=Math.atan2(e[1],e[0]))):"ZYX"===i?(t[1]=Math.asin(-Math.min(Math.max(e[2],-1),1)),.99999>Math.abs(e[2])?(t[0]=Math.atan2(e[6],e[10]),t[2]=Math.atan2(e[1],e[0])):(t[0]=0,t[2]=Math.atan2(-e[4],e[5]))):"YZX"===i?(t[2]=Math.asin(Math.min(Math.max(e[1],-1),1)),.99999>Math.abs(e[1])?(t[0]=Math.atan2(-e[9],e[5]),t[1]=Math.atan2(-e[2],e[0])):(t[0]=0,t[1]=Math.atan2(e[8],e[10]))):"XZY"===i&&(t[2]=Math.asin(-Math.min(Math.max(e[4],-1),1)),.99999>Math.abs(e[4])?(t[0]=Math.atan2(e[6],e[5]),t[1]=Math.atan2(e[8],e[0])):(t[0]=Math.atan2(-e[9],e[10]),t[1]=0))}(this._target,t,e),this.onChange(),this}fromQuaternion(t,e=this.order,i){return nN.fromQuaternion(t),this._target.fromRotationMatrix(nN,e),i||this.onChange(),this}fromArray(t,e=0){return this._target[0]=t[e],this._target[1]=t[e+1],this._target[2]=t[e+2],this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}}class nU{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new nB,this.worldMatrix=new nB,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new nv,this.quaternion=new nR,this.scale=new nv(1),this.rotation=new nI,this.up=new nv(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(t,e=!0){this.parent&&t!==this.parent&&this.parent.removeChild(this,!1),this.parent=t,e&&t&&t.addChild(this,!1)}addChild(t,e=!0){~this.children.indexOf(t)||this.children.push(t),e&&t.setParent(this,!1)}removeChild(t,e=!0){~this.children.indexOf(t)&&this.children.splice(this.children.indexOf(t),1),e&&t.setParent(null,!1)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||t)&&(null===this.parent?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(let e=0,i=this.children.length;e<i;e++)this.children[e].updateMatrixWorld(t)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(t){if(!t(this))for(let e=0,i=this.children.length;e<i;e++)this.children[e].traverse(t)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(t,e=!1){e?this.matrix.lookAt(this.position,t,this.up):this.matrix.lookAt(t,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function nz(t,e,i){let s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],d=e[8],c=i[0],p=i[1],m=i[2],f=i[3],g=i[4],y=i[5],v=i[6],x=i[7],b=i[8];return t[0]=c*s+p*a+m*l,t[1]=c*r+p*o+m*u,t[2]=c*n+p*h+m*d,t[3]=f*s+g*a+y*l,t[4]=f*r+g*o+y*u,t[5]=f*n+g*h+y*d,t[6]=v*s+x*a+b*l,t[7]=v*r+x*o+b*u,t[8]=v*n+x*h+b*d,t}class nW extends Array{constructor(t=1,e=0,i=0,s=0,r=1,n=0,a=0,o=0,h=1){return super(t,e,i,s,r,n,a,o,h),this}set(t,e,i,s,r,n,a,o,h){return t.length?this.copy(t):(this[0]=t,this[1]=e,this[2]=i,this[3]=s,this[4]=r,this[5]=n,this[6]=a,this[7]=o,this[8]=h,this)}translate(t,e=this){let i,s,r,n,a,o,h,l,u,d,c;return i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],d=t[0],c=t[1],this[0]=i,this[1]=s,this[2]=r,this[3]=n,this[4]=a,this[5]=o,this[6]=d*i+c*n+h,this[7]=d*s+c*a+l,this[8]=d*r+c*o+u,this}rotate(t,e=this){let i,s,r,n,a,o,h,l,u,d,c;return i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],d=Math.sin(t),c=Math.cos(t),this[0]=c*i+d*n,this[1]=c*s+d*a,this[2]=c*r+d*o,this[3]=c*n-d*i,this[4]=c*a-d*s,this[5
5]=c*o-d*r,this[6]=h,this[7]=l,this[8]=u,this}scale(t,e=this){let i,s;return i=t[0],s=t[1],this[0]=i*e[0],this[1]=i*e[1],this[2]=i*e[2],this[3]=s*e[3],this[4]=s*e[4],this[5]=s*e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this}multiply(t,e){return e?nz(this,t,e):nz(this,this,t),this}identity(){return this[0]=1,this[1]=0,this[2]=0,this[3]=0,this[4]=1,this[5]=0,this[6]=0,this[7]=0,this[8]=1,this}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this}fromMatrix4(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[4],this[4]=t[5],this[5]=t[6],this[6]=t[8],this[7]=t[9],this[8]=t[10],this}fromQuaternion(t){let e,i,s,r,n,a,o,h,l,u,d,c,p,m,f,g;return e=t[0],i=t[1],s=t[2],r=t[3],n=e+e,a=i+i,o=s+s,h=e*n,l=i*n,u=i*a,d=s*n,c=s*a,p=s*o,m=r*n,f=r*a,g=r*o,this[0]=1-u-p,this[3]=l-g,this[6]=d+f,this[1]=l+g,this[4]=1-h-p,this[7]=c-m,this[2]=d-f,this[5]=c+m,this[8]=1-h-u,this}fromBasis(t,e,i){return this.set(t[0],t[1],t[2],e[0],e[1],e[2],i[0],i[1],i[2]),this}inverse(t=this){let e,i,s,r,n,a,o,h,l,u,d,c,p;return e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],(p=e*(u=(l=t[8])*n-a*h)+i*(d=-l*r+a*o)+s*(c=h*r-n*o))&&(p=1/p,this[0]=u*p,this[1]=(-l*i+s*h)*p,this[2]=(a*i-s*n)*p,this[3]=d*p,this[4]=(l*e-s*o)*p,this[5]=(-a*e+s*r)*p,this[6]=c*p,this[7]=(-h*e+i*o)*p,this[8]=(n*e-i*r)*p),this}getNormalMatrix(t){let e,i,s,r,n,a,o,h,l,u,d,c,p,m,f,g,y,v,x,b,w,A,M,T,S,E,P,C,F;return e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],d=t[10],c=t[11],p=t[12],m=t[13],f=t[14],g=t[15],y=e*a-i*n,v=e*o-s*n,x=e*h-r*n,b=i*o-s*a,w=i*h-r*a,A=s*h-r*o,M=l*m-u*p,T=l*f-d*p,S=l*g-c*p,E=u*f-d*m,P=u*g-c*m,(F=y*(C=d*g-c*f)-v*P+x*E+b*S-w*T+A*M)&&(F=1/F,this[0]=(a*C-o*P+h*E)*F,this[1]=(o*S-n*C-h*T)*F,this[2]=(n*P-a*S+h*M)*F,this[3]=(s*P-i*C-r*E)*F,this[4]=(e*C-s*S+r*T)*F,this[5]=(i*S-e*P-r*M)*F,this[6]=(m*A-f*w+g*b)*F,this[7]=(f*x-p*A-g*v)*F,this[8]=(p*w-m*x+g*y)*F),this}}let n$=0;class nq extends nU{constructor(t,{geometry:e,program:i,mode:s=t.TRIANGLES,frustumCulled:r=!0,renderOrder:n=0}={}){super(),t.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=t,this.id=n$++,this.geometry=e,this.program=i,this.mode=s,this.frustumCulled=r,this.renderOrder=n,this.modelViewMatrix=new nB,this.normalMatrix=new nW,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(t){return this.beforeRenderCallbacks.push(t),this}onAfterRender(t){return this.afterRenderCallbacks.push(t),this}draw({camera:t}={}){t&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=t.projectionMatrix,this.program.uniforms.cameraPosition.value=t.worldPosition,this.program.uniforms.viewMatrix.value=t.viewMatrix,this.modelViewMatrix.multiply(t.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(e=>e&&e({mesh:this,camera:t}));let e=this.program.cullFace&&0>this.worldMatrix.determinant();this.program.use({flipFaces:e}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(e=>e&&e({mesh:this,camera:t}))}}let nX={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff",fuchsia:"#ff00ff",cyan:"#00ffff",yellow:"#ffff00",orange:"#ff8000"};function nY(t){4===t.length&&(t=t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e||console.warn(`Unable to convert hex string ${t} to rgb values`),[parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255]}function nH(t){if(void 0===t)return[0,0,0];if(3==arguments.length)return arguments;if(!isNaN(t)){var e;return[((e=parseInt(e=t))>>16&255)/255,(e>>8&255)/255,(255&e)/255]}return"#"===t[0]?nY(t):nX[t.toLowerCase()]?nY(nX[t.toLowerCase()]):(console.warn("Color format not recognised"),[0,0,0])}class nG extends Array{constructor(t){if(Array.isArray(t))return super(...t);return super(...nH(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(t){this[0]=t}set g(t){this[1]=t}set b(t){this[2]=t}set(t){return Array.isArray(t)?this.copy(t):this.copy(nH(...arguments))}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this}}let nK=new nv,nZ=1,nQ=1,nJ=!1;class n0{constructor(t,e={}){for(let i in t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=e,this.id=nZ++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state,e)this.addAttribute(i,e[i])}addAttribute(t,e){if(this.attributes[t]=e,e.id=nQ++,e.size=e.size||1,e.type=e.type||(e.data.constructor===Float32Array?this.gl.FLOAT:e.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),e.target="index"===t?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,e.normalized=e.normalized||!1,e.stride=e.stride||0,e.offset=e.offset||0,e.count=e.count||(e.stride?e.data.byteLength/e.stride:e.data.length/e.size),e.divisor=e.instanced||0,e.needsUpdate=!1,e.usage=e.usage||this.gl.STATIC_DRAW,e.buffer||this.updateAttribute(e),e.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==e.count*e.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,e.count*e.divisor);this.instancedCount=e.count*e.divisor}else"index"===t?this.drawRange.count=e.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,e.count))}updateAttribute(t){let e=!t.buffer;e&&(t.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==t.buffer&&(this.gl.bindBuffer(t.target,t.buffer),this.glState.boundBuffer=t.buffer),e?this.gl.bufferData(t.target,t.data,t.usage):this.gl.bufferSubData(t.target,0,t.data),t.needsUpdate=!1}setIndex(t){this.addAttribute("index",t)}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}setInstancedCount(t){this.instancedCount=t}createVAO(t){this.VAOs[t.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.bindAttributes(t)}bindAttributes(t){t.attributeLocations.forEach((t,{name:e,type:i})=>{if(!this.attributes[e])return void console.warn(`active attribute ${e} not being supplied`);let s=this.attributes[e];this.gl.bindBuffer(s.target,s.buffer),this.glState.boundBuffer=s.buffer;let r=1;35674===i&&(r=2),35675===i&&(r=3),35676===i&&(r=4);let n=s.size/r,a=1===r?0:r*r*4,o=1===r?0:4*r;for(let e=0;e<r;e++)this.gl.vertexAttribPointer(t+e,n,s.type,s.normalized,s.stride+a,s.offset+e*o),this.gl.enableVertexAttribArray(t
5+e),this.gl.renderer.vertexAttribDivisor(t+e,s.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:t,mode:e=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${t.attributeOrder}`&&(this.VAOs[t.attributeOrder]||this.createVAO(t),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${t.attributeOrder}`),t.attributeLocations.forEach((t,{name:e})=>{let i=this.attributes[e];i.needsUpdate&&this.updateAttribute(i)});let i=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(i=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(e,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*i,this.instancedCount):this.gl.renderer.drawArraysInstanced(e,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(e,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*i):this.gl.drawArrays(e,this.drawRange.start,this.drawRange.count)}getPosition(){let t=this.attributes.position;return t.data?t:nJ?void 0:(console.warn("No position buffer data found to compute bounds"),nJ=!0)}computeBoundingBox(t){t||(t=this.getPosition());let e=t.data,i=t.size;this.bounds||(this.bounds={min:new nv,max:new nv,center:new nv,scale:new nv,radius:1/0});let s=this.bounds.min,r=this.bounds.max,n=this.bounds.center,a=this.bounds.scale;s.set(Infinity),r.set(-1/0);for(let t=0,n=e.length;t<n;t+=i){let i=e[t],n=e[t+1],a=e[t+2];s.x=Math.min(i,s.x),s.y=Math.min(n,s.y),s.z=Math.min(a,s.z),r.x=Math.max(i,r.x),r.y=Math.max(n,r.y),r.z=Math.max(a,r.z)}a.sub(r,s),n.add(s,r).divide(2)}computeBoundingSphere(t){t||(t=this.getPosition());let e=t.data,i=t.size;this.bounds||this.computeBoundingBox(t);let s=0;for(let t=0,r=e.length;t<r;t+=i)nK.fromArray(e,t),s=Math.max(s,this.bounds.center.squaredDistance(nK));this.bounds.radius=Math.sqrt(s)}remove(){for(let t in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[t]),delete this.VAOs[t];for(let t in this.attributes)this.gl.deleteBuffer(this.attributes[t].buffer),delete this.attributes[t]}}class n1 extends n0{constructor(t,{attributes:e={}}={}){Object.assign(e,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(t,e)}}let n2=`#version 300 es 6in vec2 position; 7void main() { 8 gl_Position = vec4(position, 0.0, 1.0); 9} 10`,n3=`#version 300 es 11precision highp float; 12 13uniform float uTime; 14uniform float uAmplitude; 15uniform vec3 uColorStops[3]; 16uniform vec2 uResolution; 17uniform float uBlend; 18 19out vec4 fragColor; 20 21vec3 permute(vec3 x) { 22 return mod(((x * 34.0) + 1.0) * x, 289.0); 23} 24 25float snoise(vec2 v){ 26 const vec4 C = vec4( 27 0.211324865405187, 0.366025403784439, 28 -0.577350269189626, 0.024390243902439 29 ); 30 vec2 i = floor(v + dot(v, C.yy)); 31 vec2 x0 = v - i + dot(i, C.xx); 32 vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); 33 vec4 x12 = x0.xyxy + C.xxzz; 34 x12.xy -= i1; 35 i = mod(i, 289.0); 36 37 vec3 p = permute( 38 permute(i.y + vec3(0.0, i1.y, 1.0)) 39 + i.x + vec3(0.0, i1.x, 1.0) 40 ); 41 42 vec3 m = max( 43 0.5 - vec3( 44 dot(x0, x0), 45 dot(x12.xy, x12.xy), 46 dot(x12.zw, x12.zw) 47 ), 48 0.0 49 ); 50 m = m * m; 51 m = m * m; 52 53 vec3 x = 2.0 * fract(p * C.www) - 1.0; 54 vec3 h = abs(x) - 0.5; 55 vec3 ox = floor(x + 0.5); 56 vec3 a0 = x - ox; 57 m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h); 58 59 vec3 g; 60 g.x = a0.x * x0.x + h.x * x0.y; 61 g.yz = a0.yz * x12.xz + h.yz * x12.yw; 62 return 130.0 * dot(m, g); 63} 64 65struct ColorStop { 66 vec3 color; 67 float position; 68}; 69 70#define COLOR_RAMP(colors, factor, finalColor) { \ 71 int index = 0; \ 72 for (int i = 0; i < 2; i++) { \ 73 ColorStop currentColor = colors[i]; \ 74 bool isInBetween = currentColor.position <= factor; \ 75 index = int(mix(float(index), float(i), float(isInBetween))); \ 76 } \ 77 ColorStop currentColor = colors[index]; \ 78 ColorStop nextColor = colors[index + 1]; \ 79 float range = nextColor.position - currentColor.position; \ 80 float lerpFactor = (factor - currentColor.position) / range; \ 81 finalColor = mix(currentColor.color, nextColor.color, lerpFactor); \ 82} 83 84void main() { 85 vec2 uv = gl_FragCoord.xy / uResolution; 86 87 ColorStop colors[3]; 88 colors[0] = ColorStop(uColorStops[0], 0.0); 89 colors[1] = ColorStop(uColorStops[1], 0.5); 90 colors[2] = ColorStop(uColorStops[2], 1.0); 91 92 vec3 rampColor; 93 COLOR_RAMP(colors, uv.x, rampColor); 94 95 float height = snoise(vec2(uv.x * 2.0 + uTime * 0.1, uTime * 0.25)) * 0.5 * uAmplitude; 96 height = exp(height); 97 height = (uv.y * 2.0 - height + 0.2); 98 float intensity = 0.6 * height; 99 100 float midPoint = 0.20; 101 float auroraAlpha = smoothstep(midPoint - uBlend * 0.5, midPoint + uBlend * 0.5, intensity); 102 103 vec3 auroraColor = intensity * rampColor; 104 105 fragColor = vec4(auroraColor * auroraAlpha, auroraAlpha); 106} 107`;function n5(t){let{colorStops:e=["#5227FF","#7cff67","#5227FF"],amplitude:i=1,blend:s=.5}=t,r=(0,l.useRef)(t);r.current=t;let n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let t,a=n.current;if(!a)return;let o=new nw({alpha:!0,premultipliedAlpha:!0,antialias:!0}),h=o.gl;function l(){if(!a)return;let e=a.offsetWidth,i=a.offsetHeight;o.setSize(e,i),t&&(t.uniforms.uResolution.value=[e,i])}h.clearColor(0,0,0,0),h.enable(h.BLEND),h.blendFunc(h.ONE,h.ONE_MINUS_SRC_ALPHA),h.canvas.style.backgroundColor="transparent",window.addEventListener("resize",l);let u=new n1(h);u.attributes.uv&&delete u.attributes.uv,t=new nT(h,{vertex:n2,fragment:n3,uniforms:{uTime:{value:0},uAmplitude:{value:i},uColorStops:{value:e.map(t=>{let e=new nG(t);return[e.r,e.g,e.b]})},uResolution:{value:[a.offsetWidth,a.offsetHeight]},uBlend:{value:s}}});let d=new nq(h,{geometry:u,program:t});a.appendChild(h.canvas);let c=0,p=i=>{c=requestAnimationFrame(p);let{time:n=.01*i,speed:a=1}=r.current;if(t){t.uniforms.uTime.value=n*a*.1,t.uniforms.uAmplitude.value=r.current.amplitude??1,t.uniforms.uBlend.value=r.current.blend??s;let i=r.current.colorStops??e;t.uniforms.uColorStops.value=i.map(t=>{let e=new nG(t);return[e.r,e.g,e.b]}),o.render({scene:d})}};
107return c=requestAnimationFrame(p),l(),()=>{cancelAnimationFrame(c),window.removeEventListener("resize",l),a&&h.canvas.parentNode===a&&a.removeChild(h.canvas),h.getExtension("WEBGL_lose_context")?.loseContext()}},[i]),(0,h.jsx)("div",{ref:n,className:"w-full h-full"})}let n4="https://play.google.com/store/apps/details?id=com.qateam.cashino",n6=[{name:"TubePay",desc:"Earn rewards by watching videos, completing offers, and referring friends. Start your earnings journey today!",android:"https://play.google.com/store/apps/details?id=com.earn.tubepay.tubepay",ios:null,screenshots:["/apps/t1.webp","/apps/t2.webp","/apps/t3.webp"],stars:4.5,stats:[{label:"Downloads",value:"1M+"},{label:"Users Rewarded",value:"50k$+"},{label:"Happy Customers",value:"500k+"}]},{name:"CashPlay",desc:"Play games, complete tasks, and redeem instant rewards with CashPlay.",android:"https://play.google.com/store/apps/details?id=com.qateam.cashplay&hl=en_IN",ios:null,screenshots:["/apps/c1.jpg","/apps/c2.jpg","/apps/c3.jpg"],stars:4.9,stats:[{label:"Downloads",value:"250k+"},{label:"Users Rewarded",value:"8k$+"},{label:"Happy Customers",value:"50k+"}]},{name:"Cashino",desc:"Play games, complete simple tasks, and earn daily rewards with Cashino.",android:n4,ios:null,screenshots:["/apps/ch1.png","/apps/ch2.png","/apps/ch3.png"],launchNote:"Newly launched. Try now"},{name:"NewsPay",desc:"Earn rewards by reading daily news, completing offers, and referring friends. Available on Android and iOS.",android:"https://play.google.com/store/apps/details?id=com.ateam.newspay.newspay",ios:"https://apps.apple.com/in/app/newspay-daily-reading-perks/id6739415070",screenshots:["/apps/n1.webp","/apps/n2.webp","/apps/n3.webp"],stars:4.7,stats:[{label:"Downloads",value:"500k+"},{label:"Users Rewarded",value:"25k$+"},{label:"Happy Customers",value:"200k+"}]},{name:"Tap",desc:"Tap and play simple games while earning daily rewards and bonuses.",android:"https://play.google.com/store/apps/details?id=com.qateam.tap&hl=en_IN",ios:null,screenshots:["/apps/tap1.webp","/apps/tap2.webp","/apps/tap3.webp"],stars:4.1,stats:[{label:"Downloads",value:"70k+"},{label:"Daily Rewards",value:"20k$+"},{label:"Happy Customers",value:"10k+"}]},{name:"TaskPay",desc:"Earn rewards by scanning QR codes, completing offers, playing games, and referring friends.",android:"https://play.google.com/store/apps/details?id=com.earn.taskpay.taskpay",ios:null,screenshots:["/apps/q1.webp","/apps/q2.webp","/apps/q3.webp"],stars:4.8,stats:[{label:"Downloads",value:"100k+"},{label:"Users Rewarded",value:"10k$+"},{label:"Happy Customers",value:"5k+"}]},{name:"RadarCash",desc:"Listen to music, earn rewards, and explore trending stations with RadioCash.",android:"https://play.google.com/store/apps/details?id=com.qateam.radiocash&hl=en_IN",ios:null,screenshots:["/apps/r1.webp","/apps/r2.webp","/apps/r3.webp"],stars:5,stats:[{label:"Downloads",value:"50k+"},{label:"Users Rewarded",value:"5k$+"},{label:"Happy Customers",value:"11k+"}]}],n9=[{name:"Amit",text:"TubePay has changed how I earn online. Easy, fun, and rewarding!",stars:5},{name:"Sophia",text:"NewsPay keeps me updated AND pays me. Best of both worlds.",stars:4},{name:"Raj",text:"TaskPay is addictive, scanning QR for cash rewards is genius!",stars:5},{name:"Priya",text:"CashPlay surprises me with something fun daily â I really enjoy the variety of games!",stars:5},{name:"Vikram",text:"RadarCash keeps me hooked â scanning with the radar is fun and the instant rewards make it even better!",stars:4},{name:"Sneha",text:"Tap is my go-to for quick fun and rewards. Perfect for short breaks and the daily bonuses are a great",stars:4}];function n8(){return(0,h.jsxs)("main",{className:"relative min-h-screen text-white overflow-hidden bg-black",children:[(0,h.jsx)("div",{className:"absolute inset-0 z-0",children:(0,h.jsx)(n5,{colorStops:["#3A29FF","#FF94B4","#FF3232"],blend:.5,amplitude:1,speed:.5})}),(0,h.jsx)("div",{className:"absolute inset-0 bg-black/60 z-0"}),(0,h.jsx)(n7,{}),(0,h.jsxs)("nav",{className:"z-10 relative w-full flex justify-between items-center py-6 px-8 max-w-6xl mx-auto",children:[(0,h.jsx)(no.default,{href:"/",className:"text-2xl font-bold tracking-wide",children:"TUBEPAY"}),(0,h.jsxs)("div",{className:"flex gap-6 text-sm md:text-base",children:[(0,h.jsx)(no.default,{href:"/about",className:"hover:underline",children:"About"}),(0,h.jsx)(no.default,{href:"/privacy",className:"hover:underline",children:"Legal"}),(0,h.jsx)(no.default,{href:"/faq",className:"hover:underline",children:"FAQs"})]})]}),(0,h.jsx)("div",{className:"relative z-10 flex flex-col gap-32 mt-20",children:n6.map((t,e)=>(0,h.jsx)(na.section,{initial:{opacity:0,y:100},whileInView:{opacity:1,y:0},transition:{duration:.8,ease:"easeOut"},viewport:{once:!0,amount:.3},className:"flex flex-col md:flex-row items-center justify-between max-w-6xl mx-auto gap-12 px-6",children:e%2==0?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ae,{shots:t.screenshots}),(0,h.jsx)(ai,{app:t,align:"right"})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ai,{app:t,align:"left"}),(0,h.jsx)(ae,{shots:t.screenshots})]})},t.name))}),(0,h.jsxs)("div",{className:"relative z-10 mt-32 flex flex-col items-center",children:[(0,h.jsx)("h1",{className:"text-[14rem] md:text-[25rem] font-extrabold tracking-tight text-white/10 leading-none font-sans uppercase",children:"QATEAM"}),(0,h.jsxs)("div",{className:"w-full mt-16 flex flex-col items-center px-6",children:[(0,h.jsx)("h2",{className:"text-3xl md:text-5xl font-bold text-center mb-12",children:"Our Partners"}),(0,h.jsx)("div",{className:"flex flex-wrap justify-center items-center gap-12",children:["CPX Research","Notik Offerwall","KIWI-Walls","Strucon Games","AST Ltd.","BestOfferWall"].map((t,e)=>(0,h.jsxs)(na.span,{className:"relative overflow-hidden rounded-full border border-white/10 bg-white/5 px-6 py-3 text-xl md:text-2xl font-semibold text-gray-300 shadow-lg backdrop-blur-md transition duration-300 cursor-default hover:border-white/30 hover:text-white hover:shadow-[0_0_28px_rgba(255,148,180,0.35)]",whileHover:{scale:1.08,y:-4},transition:{type:"spring",stiffness:320,damping:18},children:[(0,h.jsx)("span",{className:"absolute inset-0 bg-gradient-to-r from-[#3A29FF]/0 via-[#FF94B4]/25 to-[#FF3232]/0 opacity-0 transition duration-300 hover:opacity-100"}),(0,h.jsx)("span",{className:"relative z-10",children:t})]},e))})]}),(0,h.jsxs)("div",{className:"mt-24 w-full max-w-6xl px-6",children:[(0,h.jsx)("h2",{className:"text-3xl md:text-5xl font-bold text-center mb-12",children:"What Our Users Say"}),(0,h.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:n9.map((t,e)=>(0,h.jsxs)(na.div,{initial:{opacity:0,y:50},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:.2*e},viewport:{once:!0},className:"relative group rounded-2xl overflow-hidden",children:[(0,h.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-[#3A29FF] via-[#FF94B4] to-[#FF3232] opacity-0 group-hover:opacity-100 blur-2xl transition duration-500"}),(0,h.jsxs)("div",{className:"relative bg-white/5 backdrop-blur-md rounded-2xl p-6 shadow-lg flex flex-col items-center text-center group-hover:shadow-[0_0_25px_rgba(255,148,180,0.6)] transition duration-500",children:[(0,h.jsxs)("div",{className:"flex mb-4",children:[Array.from({length:t.stars}).map((t,e)=>(0,h.jsx)("span",{className:"text-yellow-400 text-xl",children:"â
"},e)),Array.from({length:5-t.stars}).map((t,e)=>(0,h.jsx)("span",{className:"text-gray-500 text-xl",children:"â
"},e))]}),(0,h.jsxs)("p",{className:"text-gray-200 mb-4 italic",children:['"',t.text,'"']}),(0,h.jsx)("p",{className:"font-semibold",children:t.name})]})]},e))})]})]})]})}function n7(){let[t,e]=(0,l.useState)(3600),[i,s]=(0,l.useState)(!0);if((0,l.useEffect)(()=>{let t=window.setInterval(()=>{e(t=>Math.max(0,t-1))},1e3);return()=>window.clearInterval(t)},[]),!i)return null;let r=Math.floor(t/3600),n=Math.floor(t%3600/60);return(0,h.jsxs)(na.div,{initial:{y:-28,opacity:0}
107,animate:{y:0,opacity:1},className:"fixed bottom-4 left-4 right-4 z-50 rounded-xl border border-white/10 bg-black/90 px-4 py-3 shadow-[0_18px_50px_rgba(0,0,0,0.45)] backdrop-blur-xl md:relative md:bottom-auto md:left-auto md:right-auto md:z-20 md:rounded-none md:border-x-0 md:border-t-0 md:bg-black/70 md:px-4 md:py-2",children:[(0,h.jsxs)("div",{className:"mx-auto grid max-w-6xl grid-cols-1 items-center gap-3 pr-9 text-left md:grid-cols-[1fr_auto] md:gap-5 md:pr-10",children:[(0,h.jsxs)("div",{className:"min-w-0",children:[(0,h.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.16em] text-yellow-300 md:text-xs",children:"Cashino Launch Offer"}),(0,h.jsx)("p",{className:"text-sm font-medium leading-snug text-white/90 md:text-base",children:"Download and sign up to get a free 5000 Gems signup bonus."})]}),(0,h.jsxs)("div",{className:"flex items-center justify-between gap-3 md:justify-end",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2","aria-label":"Offer countdown",children:[(0,h.jsx)(at,{value:r,label:"Hrs"}),(0,h.jsx)("span",{className:"text-base font-bold text-white/40",children:":"}),(0,h.jsx)(at,{value:n,label:"Min"}),(0,h.jsx)("span",{className:"text-base font-bold text-white/40",children:":"}),(0,h.jsx)(at,{value:t%60,label:"Sec"})]}),(0,h.jsx)("a",{href:n4,target:"_blank",rel:"noopener noreferrer",className:"whitespace-nowrap rounded-full bg-yellow-300 px-4 py-2 text-xs font-bold text-black transition hover:bg-white hover:shadow-[0_0_22px_rgba(253,224,71,0.45)] md:px-5 md:text-sm",children:"Claim now"})]})]}),(0,h.jsx)("button",{type:"button","aria-label":"Close offer banner",onClick:()=>s(!1),className:"absolute right-3 top-3 flex h-7 w-7 items-center justify-center rounded-full border border-white/10 bg-white/10 text-lg leading-none text-white/70 transition hover:border-white/25 hover:bg-white/20 hover:text-white md:top-1/2 md:-translate-y-1/2",children:"Ã"})]})}function at({value:t,label:e}){let i=String(t).padStart(2,"0");return(0,h.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,h.jsx)(na.span,{initial:{rotateX:-90,opacity:0},animate:{rotateX:0,opacity:1},transition:{duration:.35,ease:"easeOut"},className:"inline-flex min-w-9 justify-center rounded-md border border-white/10 bg-white/10 px-1.5 py-1 font-mono text-base font-black tabular-nums text-white shadow-inner md:min-w-10",children:i},i),(0,h.jsx)("span",{className:"text-[9px] font-bold uppercase tracking-wider text-white/45",children:e})]})}function ae({shots:t}){return(0,h.jsx)("div",{className:"flex gap-4",children:t.map((t,e)=>(0,h.jsx)(na.img,{src:t,alt:"app screenshot",className:"w-[200px] md:w-[240px] rounded-2xl shadow-lg",whileHover:{scale:1.08,rotate:1},transition:{type:"spring",stiffness:300}},e))})}function ai({app:t,align:e}){return(0,h.jsxs)("div",{className:`flex flex-col gap-4 max-w-md flex-1 ${"right"===e?"text-right items-end":"text-left items-start"}`,children:[(0,h.jsx)("h2",{className:"text-4xl font-extrabold",children:t.name}),(0,h.jsx)("p",{className:"text-gray-300",children:t.desc}),t.stars&&(0,h.jsx)(as,{rating:t.stars,align:e}),t.launchNote&&(0,h.jsx)("p",{className:"text-2xl font-bold text-yellow-400",children:t.launchNote}),(0,h.jsxs)("div",{className:`flex gap-4 mt-2 ${"right"===e?"justify-end":""}`,children:[t.android&&(0,h.jsx)("a",{href:t.android,target:"_blank",rel:"noopener noreferrer",children:(0,h.jsx)("img",{src:"/google.png",alt:"google play",className:"w-[160px] hover:scale-105 transition"})}),t.ios&&(0,h.jsx)("a",{href:t.ios,target:"_blank",rel:"noopener noreferrer",children:(0,h.jsx)("img",{src:"/apple.png",alt:"apple store",className:"w-[160px] hover:scale-105 transition"})})]}),t.stats&&(0,h.jsx)("div",{className:`flex gap-10 mt-6 ${"right"===e?"justify-end":""}`,children:t.stats.map(t=>(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("p",{className:"text-2xl font-bold",children:t.value}),(0,h.jsx)("p",{className:"text-xs text-gray-400",children:t.label})]},t.label))})]})}function as({rating:t,align:e}){let i=Math.max(0,Math.min(5,t));return(0,h.jsx)("div",{className:`flex items-center ${"right"===e?"justify-end":"justify-start"}`,children:(0,h.jsx)("div",{className:"flex text-2xl","aria-label":`${i} star rating`,children:Array.from({length:5}).map((t,e)=>{let s=100*Math.max(0,Math.min(1,i-e));return(0,h.jsxs)("span",{className:"relative inline-block text-gray-500",children:["â
",(0,h.jsx)("span",{className:"absolute left-0 top-0 overflow-hidden text-yellow-400",style:{width:`${s}%`},"aria-hidden":"true",children:"â
"})]},e)})})})}t.s(["default",()=>n8],31713)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.