@ptlm-azulejo/segmented-control 0.1.0 → 0.1.1-alpha.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/README.md +64 -3
- package/dist/index.js +5365 -2327
- package/dist/index.umd.cjs +1 -1
- package/dist/packages/SegmentedControl/index.d.ts +2 -0
- package/dist/packages/SegmentedControl/index.d.ts.map +1 -0
- package/dist/{src → packages/SegmentedControl/src}/index.vue.d.ts +16 -2
- package/dist/packages/SegmentedControl/src/index.vue.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/src/index.vue.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -15
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/useSegmentedControl.d.ts +0 -17
- package/dist/src/useSegmentedControl.d.ts.map +0 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(D,y){typeof exports=="object"&&typeof module!="undefined"?y(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],y):(D=typeof globalThis!="undefined"?globalThis:D||self,y(D["segmented-control"]={},D.Vue))})(this,function(D,y){"use strict";var sh=Object.defineProperty,oh=Object.defineProperties;var rh=Object.getOwnPropertyDescriptors;var ue=Object.getOwnPropertySymbols;var jo=Object.prototype.hasOwnProperty,_o=Object.prototype.propertyIsEnumerable;var yn=Math.pow,Io=(D,y,F)=>y in D?sh(D,y,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[y]=F,g=(D,y)=>{for(var F in y||(y={}))jo.call(y,F)&&Io(D,F,y[F]);if(ue)for(var F of ue(y))_o.call(y,F)&&Io(D,F,y[F]);return D},V=(D,y)=>oh(D,rh(y));var K=(D,y)=>{var F={};for(var z in D)jo.call(D,z)&&y.indexOf(z)<0&&(F[z]=D[z]);if(D!=null&&ue)for(var z of ue(D))y.indexOf(z)<0&&_o.call(D,z)&&(F[z]=D[z]);return F};const F=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function z(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,d=!1)=>{const p=d&&s?n:i;return h&&o.add(u),p.has(u)||p.add(u),u},cancel:u=>{i.delete(u),o.delete(u)},process:u=>{if(a=u,s){r=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,r&&(r=!1,c.process(u))}};return c}const et={},Uo=40;function vn(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=F.reduce((S,w)=>(S[w]=z(r),S),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:f,postRender:p}=o,m=()=>{const S=et.useManualTiming?s.timestamp:performance.now();n=!1,et.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(S-s.timestamp,Uo),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),f.process(s),p.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(m))},v=()=>{n=!0,i=!0,s.isProcessing||t(m)};return{schedule:F.reduce((S,w)=>{const T=o[w];return S[w]=(P,C=!1,E=!1)=>(n||v(),T.schedule(P,C,E)),S},{}),cancel:S=>{for(let w=0;w<F.length;w++)o[F[w]].cancel(S)},state:s,steps:o}}const $=t=>t,{schedule:M,cancel:nt,state:I,steps:ce}=vn(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:$,!0);let Wt;function No(){Wt=void 0}const U={now:()=>(Wt===void 0&&U.set(I.isProcessing||et.useManualTiming?I.timestamp:performance.now()),Wt),set:t=>{Wt=t,queueMicrotask(No)}},H=t=>t*1e3,W=t=>t/1e3;function $o(t,e){const n=U.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(nt(i),t(r-e))};return M.setup(i,!0),()=>nt(i)}const At=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ot=At("deg"),q=At("%"),x=At("px"),Ko=At("vh"),Wo=At("vw"),bn=V(g({},q),{parse:t=>q.parse(t)/100,transform:t=>q.transform(t*100)});function xn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Z={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=xn(t,e.target.x),i=xn(t,e.target.y);return`${n}% ${i}%`}},J=(t,e,n)=>n>e?e:n<t?t:n,pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Pt=V(g({},pt),{transform:t=>J(0,1,t)}),Gt=V(g({},pt),{default:1}),Et=t=>Math.round(t*1e5)/1e5,he=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Go(t){return t==null}const zo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fe=(t,e)=>n=>!!(typeof n=="string"&&zo.test(n)&&n.startsWith(t)||e&&!Go(n)&&Object.prototype.hasOwnProperty.call(n,e)),Tn=(t,e,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(he);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ho=t=>J(0,255,t),de=V(g({},pt),{transform:t=>Math.round(Ho(t))}),ut={test:fe("rgb","red"),parse:Tn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+de.transform(t)+", "+de.transform(e)+", "+de.transform(n)+", "+Et(Pt.transform(i))+")"};function Yo(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const pe={test:fe("#"),parse:Yo,transform:ut.transform},mt={test:fe("hsl","hue"),parse:Tn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+q.transform(Et(e))+", "+q.transform(Et(n))+", "+Et(Pt.transform(i))+")"},B={test:t=>ut.test(t)||pe.test(t)||mt.test(t),parse:t=>ut.test(t)?ut.parse(t):mt.test(t)?mt.parse(t):pe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ut.transform(t):mt.transform(t),getAnimatableNone:t=>{const e=B.parse(t);return e.alpha=0,B.transform(e)}},Xo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qo(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(he))==null?void 0:e.length)||0)+(((n=t.match(Xo))==null?void 0:n.length)||0)>0}const Sn="number",wn="color",Zo="var",Jo="var(",An="${}",Qo=/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 Vt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(Qo,l=>(B.test(l)?(i.color.push(r),s.push(wn),n.push(B.parse(l))):l.startsWith(Jo)?(i.var.push(r),s.push(Zo),n.push(l)):(i.number.push(r),s.push(Sn),n.push(parseFloat(l))),++r,An)).split(An);return{values:n,split:a,indexes:i,types:s}}function Pn(t){return Vt(t).values}function En(t){const{split:e,types:n}=Vt(t),i=e.length;return s=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],s[o]!==void 0){const a=n[o];a===Sn?r+=Et(s[o]):a===wn?r+=B.transform(s[o]):r+=s[o]}return r}}const tr=t=>typeof t=="number"?0:B.test(t)?B.getAnimatableNone(t):t;function er(t){const e=Pn(t);return En(t)(e.map(tr))}const rt={test:qo,parse:Pn,createTransformer:En,getAnimatableNone:er},R=(t,e,n)=>t+(e-t)*n,Vn={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=rt.parse(t);if(s.length>5)return i;const r=rt.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=R(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),r(s)}},Cn=t=>e=>typeof e=="string"&&e.startsWith(t),me=Cn("--"),nr=Cn("var(--"),ge=t=>nr(t)?ir.test(t.split("/*")[0].trim()):!1,ir=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Mn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Ct={borderRadius:V(g({},Z),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomLeftRadius:Z,borderBottomRightRadius:Z,boxShadow:Vn};function Dn(t){for(const e in t)Ct[e]=t[e],me(e)&&(Ct[e].isCSSVariable=!0)}function Mt(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,i=Symbol(n);return[o=>{const a=y.inject(i,o);if(a===void 0)throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(y.provide(i,o),o)]}const[sr,or]=Mt("Motion"),[rr]=Mt("LayoutGroup");function Rn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}class it{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(e){}beforeUnmount(){}}var gt=function(){},zt=function(){};process.env.NODE_ENV!=="production"&&(gt=function(t,e){!t&&typeof console!="undefined"&&console.warn(e)},zt=function(t,e){if(!t)throw new Error(e)});function Dt(t,e,n){if(Array.isArray(t))return t.reduce((i,s)=>{const r=Dt(s,e,n);return r?g(g({},i),r):i},{});if(typeof t=="object")return t;if(t&&e){const i=e[t];return typeof i=="function"?i(n):i}}function ar(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!lr(t,e):t!==e}function lr(t,e){const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Ln(t){return t==null?void 0:t.startsWith("--")}const ur=t=>t;function cr(t){return typeof t=="number"}const hr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],fr=new Set(hr);function Bn(t){return fr.has(t)}class dr{constructor(e){this.features=[];const{features:n=[],lazyMotionContext:i}=e.options,s=n.concat(i.features.value);this.features=s.map(o=>new o(e));const r=this.features;y.watch(i.features,o=>{o.forEach(a=>{if(!s.includes(a)){s.push(a);const l=new a(e);r.push(l),e.isMounted()&&(l.beforeMount(),l.mount())}})},{flush:"pre"})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>{var n;return(n=e.beforeMount)==null?void 0:n.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var n;return(n=e.update)==null?void 0:n.call(e)})}beforeUpdate(e){this.features.forEach(n=>{var i;return(i=n.beforeUpdate)==null?void 0:i.call(n,e)})}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}function pr(t){return typeof t=="string"||t===!1||Array.isArray(t)}const kn=new WeakMap;let mr=0;class gr{constructor(e,n){var i;this.element=null,this.isExiting=!1,this.presenceContainer=null,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=$,this.id=`motion-state-${mr++}`,this.options=e,this.parent=n,(i=n==null?void 0:n.children)==null||i.add(this);const r=(e.initial===void 0&&e.variants?this.context.initial:e.initial)===!1?["initial","animate"]:["initial"];this.initTarget(r),this.featureManager=new dr(this),this.type=Bn(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(n,i)=>{var s;return pr(this.options[i])?this.options[i]:(s=this.parent)==null?void 0:s.context[i]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var s;var n;const i=(s=this.options.custom)!=null?s:(n=this.options.animatePresenceContext)==null?void 0:n.custom;this.baseTarget=e.reduce((r,o)=>g(g({},r),Dt(this.options[o]||this.context[o],this.options.variants,i)),{}),this.target={}}updateOptions(e){var n;this.options=e,(n=this.visualElement)==null||n.update(V(g({},this.options),{whileTap:this.options.whilePress}),null)}beforeMount(){this.featureManager.beforeMount()}mount(e,n,i=!1){var s;zt(!!e,"Animation state must be mounted with valid Element"),this.element=e,this.updateOptions(n),this.featureManager.mount(),!i&&this.options.animate&&((s=this.startAnimation)==null||s.call(this))}clearAnimation(){var e,n;this.currentProcess&&nt(this.currentProcess),this.currentProcess=null,(n=(e=this.visualElement)==null?void 0:e.variantChildren)==null||n.forEach(i=>{i.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=M.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(){var e,n,i;(n=(e=this.parent)==null?void 0:e.children)==null||n.delete(this),kn.delete(this.element),this.featureManager.unmount(),(i=this.visualElement)==null||i.unmount(),this.clearAnimation()}beforeUpdate(e){this.featureManager.beforeUpdate(e)}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,n,i=!0){var s;!this.element||this.activeStates[e]===n||(this.activeStates[e]=n,(s=this.visualElement.variantChildren)==null||s.forEach(r=>{r.state.setActive(e,n,!1)}),i&&this.animateUpdates({isExit:e==="exit"&&this.activeStates.exit}))}isMounted(){return!!this.element}getSnapshot(e,n){}didUpdate(e){}}const ct=new WeakMap;function Fn(t,e,n){return new CustomEvent(t,{detail:{target:e,isExit:n}})}const On={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>`${t}deg`},yr={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>`${t}px`},rotate:On,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:ur},skew:On},vr=["translate","scale","rotate","skew"],br=["","X","Y","Z"],ye=new Map,Ht=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];vr.forEach(t=>{br.forEach(e=>{Ht.push(t+e),ye.set(t+e,yr[t])})});const xr=new Set(Ht),Tr=t=>xr.has(t),In={x:"translateX",y:"translateY",z:"translateZ"};function Sr([t],[e]){return Ht.indexOf(t)-Ht.indexOf(e)}function wr(t,[e,n]){return`${t} ${e}(${n})`}function Ar(t){return t.sort(Sr).reduce(wr,"").trim()}const jn={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},k=t=>!!(t&&t.getVelocity),Pr={get:(t,e)=>{let n=Ln(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!=="0"){const i=ye.get(e);i&&(n=i.initialValue)}return n},set:(t,e,n)=>{Ln(e)?t.style.setProperty(e,n):t.style[e]=n}};function Er(t){var e;const n={},i=[];for(let s in t){let r=t[s];r=k(r)?r.get():r,Tr(s)&&s in In&&(s=In[s]);let o=Array.isArray(r)?r[0]:r;const a=ye.get(s);a?(o=cr(r)?(e=a.toDefaultUnit)==null?void 0:e.call(a,r):r,i.push([s,o])):n[s]=o}return i.length&&(n.transform=Ar(i)),Object.keys(n).length===0?null:n}const Vr={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function Cr(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Mr(t,e,n=1,i=0){t.pathLength=1,delete t["path-length"],t["stroke-dashoffset"]=x.transform(-i);const s=x.transform(e),r=x.transform(n);t["stroke-dasharray"]=`${s} ${r}`}function Dr(t){const e={},n={};for(const i in t){const s=Cr(i);if(s in Vr){const r=t[i];e[s]=k(r)?r.get():r}else n[i]=t[i]}return e["path-length"]!==void 0&&Mr(e,e["path-length"],e["path-spacing"],e["path-offset"]),{attrs:e,style:n}}typeof WorkerGlobalScope!="undefined"&&globalThis instanceof WorkerGlobalScope;const Yt=t=>typeof t!="undefined";function Rr({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Lr(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Br(t,e){return Rr(Lr(t.getBoundingClientRect(),e))}const _n={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"]},ve={};for(const t in _n)ve[t]={isEnabled:e=>_n[t].some(n=>!!e[n])};const Un=()=>({translate:0,scale:1,origin:0,originPoint:0}),yt=()=>({x:Un(),y:Un()}),Nn=()=>({min:0,max:0}),O=()=>({x:Nn(),y:Nn()}),kr=typeof window!="undefined",Xt={current:null},$n={current:!1};function Fr(){if($n.current=!0,!!kr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Xt.current=t.matches;t.addEventListener("change",e),e()}else Xt.current=!1}function Or(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ir(t){return typeof t=="string"||Array.isArray(t)}const jr=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Kn(t){return Or(t.animate)||jr.some(e=>Ir(t[e]))}function _r(t){return!!(Kn(t)||t.variants)}function be(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}const Wn=new Set;function Gn(t,e,n){t||Wn.has(e)||(console.warn(be(e,n)),Wn.add(e))}function xe(t,e){t.indexOf(e)===-1&&t.push(e)}function qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Te{constructor(){this.subscriptions=[]}add(e){return xe(this.subscriptions,e),()=>qt(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function zn(t,e){return e?t*(1e3/e):0}const Hn=30,Ur=t=>!isNaN(parseFloat(t));class Nr{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var s;const r=U.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=U.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ur(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Gn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Te);const i=this.events[e].add(n);return e==="change"?()=>{i(),M.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=U.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Hn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hn);return zn(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function vt(t,e){return new Nr(t,e)}function $r(t,e,n){for(const i in e){const s=e[i],r=n[i];if(k(s))t.addValue(i,s);else if(k(r))t.addValue(i,vt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,vt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}function Yn(t){const e=[{},{}];return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function Xn(t,e,n,i){if(typeof e=="function"){const[s,r]=Yn(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=Yn(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function Kr(t){var e;for(let n=1;n<t.length;n++)(e=t[n])!=null||(t[n]=t[n-1])}const ht=t=>t*180/Math.PI,Se=t=>{const e=ht(Math.atan2(t[1],t[0]));return we(e)},Wr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Se,rotateZ:Se,skewX:t=>ht(Math.atan(t[1])),skewY:t=>ht(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},we=t=>(t=t%360,t<0&&(t+=360),t),qn=Se,Zn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Jn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Gr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zn,scaleY:Jn,scale:t=>(Zn(t)+Jn(t))/2,rotateX:t=>we(ht(Math.atan2(t[6],t[5]))),rotateY:t=>we(ht(Math.atan2(-t[2],t[0]))),rotateZ:qn,rotate:qn,skewX:t=>ht(Math.atan(t[4])),skewY:t=>ht(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ae(t){return t.includes("scale")?1:0}function Pe(t,e){if(!t||t==="none")return Ae(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Gr,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Wr,s=a}if(!s)return Ae(e);const r=i[e],o=s[1].split(",").map(Hr);return typeof r=="function"?r(o):o[r]}const zr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Pe(n,e)};function Hr(t){return parseFloat(t.trim())}const bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xt=new Set(bt),Qn=t=>t===pt||t===x,Yr=new Set(["x","y","z"]),Xr=bt.filter(t=>!Yr.has(t));function qr(t){const e=[];return Xr.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const at={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),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})=>Pe(e,"x"),y:(t,{transform:e})=>Pe(e,"y")};at.translateX=at.x,at.translateY=at.y;const ft=new Set;let Ee=!1,Ve=!1,Ce=!1;function ti(){if(Ve){const t=Array.from(ft).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=qr(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{var a;(a=i.getValue(r))==null||a.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Ve=!1,Ee=!1,ft.forEach(t=>t.complete(Ce)),ft.clear()}function ei(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ve=!0)})}function Zr(){Ce=!0,ei(),ti(),Ce=!1}class Me{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Ee||(Ee=!0,M.read(ei),M.resolveKeyframes(ti))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s==null?void 0:s.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}Kr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ni=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ii=t=>/^0[^.\s]+$/u.test(t),Jr={test:t=>t==="auto",parse:t=>t},si=t=>e=>e.test(t),oi=[pt,x,q,ot,Wo,Ko,Jr],ri=t=>oi.find(si(t)),Qr=[...oi,B,rt],ta=t=>Qr.find(si(t)),ea=new Set(["brightness","contrast","saturate","opacity"]);function na(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(he)||[];if(!i)return t;const s=n.replace(i,"");let r=ea.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const ia=/\b([a-z-]*)\(.*?\)/gu,De=V(g({},rt),{getAnimatableNone:t=>{const e=t.match(ia);return e?e.map(na).join(" "):t}}),ai=V(g({},pt),{transform:Math.round}),Re=V(g({borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,inset:x,insetBlock:x,insetBlockStart:x,insetBlockEnd:x,insetInline:x,insetInlineStart:x,insetInlineEnd:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,paddingBlock:x,paddingBlockStart:x,paddingBlockEnd:x,paddingInline:x,paddingInlineStart:x,paddingInlineEnd:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,marginBlock:x,marginBlockStart:x,marginBlockEnd:x,marginInline:x,marginInlineStart:x,marginInlineEnd:x,backgroundPositionX:x,backgroundPositionY:x},{rotate:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:ot,skewX:ot,skewY:ot,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:Pt,originX:bn,originY:bn,originZ:x}),{zIndex:ai,fillOpacity:Pt,strokeOpacity:Pt,numOctaves:ai}),sa=V(g({},Re),{color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:De,WebkitFilter:De}),li=t=>sa[t];function ui(t,e){let n=li(t);return n!==De&&(n=rt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const{schedule:ci}=vn(queueMicrotask,!0),hi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fi{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Me,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=U.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,M.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget=g({},l),this.initialValues=n.initial?g({},l):{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Kn(n),this.isVariantNode=_r(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const d=this.scrapeMotionValuesFromProps(n,{},this),{willChange:u}=d,h=K(d,["willChange"]);for(const f in h){const p=h[f];l[f]!==void 0&&k(p)&&p.set(l[f])}}mount(e){var n;this.current=e,ct.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:($n.current||Fr(),this.shouldReduceMotion=Xt.current),process.env.NODE_ENV!=="production"&&Gn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),nt(this.notifyUpdate),nt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(e){var n;this.children.add(e),(n=this.enteringChildren)!=null||(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=xt.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ve){const n=ve[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):O()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<hi.length;i++){const s=hi[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=e[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=$r(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=vt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!=null?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(ni(i)||ii(i))?i=parseFloat(i):!ta(i)&&rt.test(n)&&(i=ui(e,n)),this.setBaseTarget(e,k(i)?i.get():i)),k(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const o=Xn(this.props,i,(n=this.presenceContext)==null?void 0:n.custom);o&&(s=o[e])}if(i&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!k(r)?r:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Te),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ci.render(this.render)}}const di=new Set(["width","height","top","left","right","bottom",...bt]);var pi;let Rt=()=>{},Q=()=>{};typeof process!="undefined"&&((pi=process.env)==null?void 0:pi.NODE_ENV)!=="production"&&(Rt=(t,e,n)=>{!t&&typeof console!="undefined"&&console.warn(be(e,n))},Q=(t,e,n)=>{if(!t)throw new Error(be(e,n))});const oa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ra(t){const e=oa.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n!=null?n:i}`,s]}const aa=4;function mi(t,e,n=1){Q(n<=aa,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=ra(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return ni(o)?parseFloat(o):o}return ge(s)?mi(s,e,n+1):s}function la(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ii(t):!0}const ua=new Set(["auto","none","0"]);function ca(t,e,n){let i=0,s;for(;i<t.length&&!s;){const r=t[i];typeof r=="string"&&!ua.has(r)&&Vt(r).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=ui(n,s)}class ha extends Me{constructor(e,n,i,s,r){super(e,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),ge(h))){const d=mi(h,n.current);d!==void 0&&(e[u]=d),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!di.has(i)||e.length!==2)return;const[s,r]=e,o=ri(s),a=ri(r),l=Mn(s),c=Mn(r);if(l!==c&&at[i]){this.needsMeasurement=!0;return}if(o!==a)if(Qn(o)&&Qn(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else at[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||la(e[s]))&&i.push(s);i.length&&ca(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=at[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){var e;const{element:n,name:i,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const r=n.getValue(i);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,a=s[o];s[o]=at[i](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(e=this.removedTransforms)!=null&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class gi extends fi{constructor(){super(...arguments),this.KeyframeResolver=ha}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;k(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}const yi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,fa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},da=bt.length;function pa(t,e,n){let i="",s=!0;for(let r=0;r<da;r++){const o=bt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=yi(a,Re[o]);if(!l){s=!1;const u=fa[o]||o;i+=`${u}(${c}) `}n&&(e[o]=c)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function vi(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(xt.has(l)){o=!0;continue}else if(me(l)){s[l]=c;continue}else{const u=yi(c,Re[l]);l.startsWith("origin")?(a=!0,r[l]=u):i[l]=u}}if(e.transform||(o||n?i.transform=pa(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;i.transformOrigin=`${l} ${c} ${u}`}}function bi(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];s==null||s.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function ma(t,{layout:e,layoutId:n}){return xt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ct[t]||t==="opacity")}function xi(t,e,n){var i;const{style:s}=t,r={};for(const o in s)(k(s[o])||e.style&&k(e.style[o])||ma(o,t)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(r[o]=s[o]);return r}function ga(t){return window.getComputedStyle(t)}class Ti extends gi{constructor(){super(...arguments),this.type="html",this.renderInstance=bi}readValueFromInstance(e,n){var i;if(xt.has(n))return(i=this.projection)!=null&&i.isProjecting?Ae(n):zr(e,n);{const s=ga(e),r=(me(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Br(e,n)}build(e,n,i){vi(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return xi(e,n,i)}}const Le=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ya={offset:"stroke-dashoffset",array:"stroke-dasharray"},va={offset:"strokeDashoffset",array:"strokeDasharray"};function ba(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?ya:va;t[r.offset]=x.transform(-i);const o=x.transform(e),a=x.transform(n);t[r.array]=`${o} ${a}`}const xa=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ta(t,h,l,c,u){var d=h,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0}=d,a=K(d,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(vi(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:p}=t;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=(m=f.transformOrigin)!=null?m:"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=(v=u==null?void 0:u.transformBox)!=null?v:"fill-box",delete f.transformBox);for(const b of xa)f[b]!==void 0&&(p[b]=f[b],delete f[b]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&ba(f,s,r,o,!1)}const Si=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"]),Sa=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wa(t,e,n,i){bi(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(Si.has(s)?s:Le(s),e.attrs[s])}function Aa(t,e,n){const i=xi(t,e,n);for(const s in t)if(k(t[s])||k(e[s])){const r=bt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class wi extends gi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=O}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(xt.has(n)){const i=li(n);return i&&i.default||0}return n=Si.has(n)?n:Le(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return Aa(e,n,i)}build(e,n,i){Ta(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){wa(e,n,i,s)}mount(e){this.isSVGTag=Sa(e.tagName),super.mount(e)}}function Pa(t,e){return Bn(t)?new wi(e):new Ti(e)}function Ea(t,e,n,i=0,s=1){const r=Array.from(t),o=r.indexOf(e),a=t.size,l=(a-1)*i,c=typeof n=="function";return o===r.length-1&&(e.parent.enteringChildren=void 0),c?n(o,a):s===1?o*i:l-o*i}function Be(t){return typeof t=="object"&&!Array.isArray(t)}function ke(t,e,n){var i;if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const r=(i=n==null?void 0:n[t])!=null?i:s.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function Ai(t,e,n,i){return typeof t=="string"&&Be(e)?ke(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Va(t,e,n){return t*(e+1)}function Pi(t,e,n,i){var s;return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):(s=i.get(e))!=null?s:t}const Ca=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},Ei=t=>Array.isArray(t)&&typeof t[0]!="number";function Vi(t,e){return Ei(t)?t[Ca(0,t.length,e)]:t}function Ma(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(qt(t,s),i--)}}function Da(t,e,n,i,s,r){Ma(t,s,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:R(s,r,i[o]),easing:Vi(n,o)})}function Ra(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function La(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const Tt=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};function Ci(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Tt(0,e,i);t.push(R(n,1,s))}}function Mi(t){const e=[0];return Ci(e,t.length-1),e}const Zt=2e4;function Fe(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<Zt;)e+=n,i=t.next(e);return e>=Zt?1/0:e}function Di(t,e=100,n){const i=n(V(g({},t),{keyframes:[0,e]})),s=Math.min(Fe(i),Zt);return{type:"keyframes",ease:r=>i.next(s*r).value/e,duration:W(s)}}function Oe(t){return typeof t=="function"&&"applyToOptions"in t}const Ba="easeInOut",ka=20;function Fa(t,r={},i,s){var o=r,{defaultTransition:e={}}=o,n=K(o,["defaultTransition"]);const a=e.duration||.3,l=new Map,c=new Map,u={},h=new Map;let d=0,f=0,p=0;for(let m=0;m<t.length;m++){const v=t[m];if(typeof v=="string"){h.set(v,f);continue}else if(!Array.isArray(v)){h.set(v.name,Pi(f,v.at,d,h));continue}let[b,A,S={}]=v;S.at!==void 0&&(f=Pi(f,S.at,d,h));let w=0;const T=(P,C,E,j=0,N=0)=>{const _=Oa(P),Oo=C,{delay:mn=0,times:st=Mi(_),type:gn="keyframes",repeat:Ut,repeatType:ch,repeatDelay:hh=0}=Oo,ih=K(Oo,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:lt=e.ease||"easeOut",duration:X}=C;const Do=typeof mn=="function"?mn(j,N):mn,Ro=_.length,Lo=Oe(gn)?gn:s==null?void 0:s[gn||"keyframes"];if(Ro<=2&&Lo){let Nt=100;if(Ro===2&&_a(_)){const $t=_[1]-_[0];Nt=Math.abs($t)}const ae=g({},ih);X!==void 0&&(ae.duration=H(X));const le=Di(ae,Nt,Lo);lt=le.ease,X=le.duration}X!=null||(X=a);const Bo=f+Do;st.length===1&&st[0]===0&&(st[1]=1);const ko=st.length-_.length;if(ko>0&&Ci(st,ko),_.length===1&&_.unshift(null),Ut){Q(Ut<ka,"Repeat count too high, must be less than 20","repeat-count-high"),X=Va(X,Ut);const Nt=[..._],ae=[...st];lt=Array.isArray(lt)?[...lt]:[lt];const le=[...lt];for(let $t=0;$t<Ut;$t++){_.push(...Nt);for(let Kt=0;Kt<Nt.length;Kt++)st.push(ae[Kt]+($t+1)),lt.push(Kt===0?"linear":Vi(le,Kt-1))}Ra(st,Ut)}const Fo=Bo+X;Da(E,_,lt,st,Bo,Fo),w=Math.max(Do+X,w),p=Math.max(Fo,p)};if(k(b)){const P=Ri(b,c);T(A,S,Li("default",P))}else{const P=Ai(b,A,i,u),C=P.length;for(let E=0;E<C;E++){A=A,S=S;const j=P[E],N=Ri(j,c);for(const _ in A)T(A[_],Ia(S,_),Li(_,N),E,C)}}d=f,f+=w}return c.forEach((m,v)=>{for(const b in m){const A=m[b];A.sort(La);const S=[],w=[],T=[];for(let C=0;C<A.length;C++){const{at:E,value:j,easing:N}=A[C];S.push(j),w.push(Tt(0,p,E)),T.push(N||"easeOut")}w[0]!==0&&(w.unshift(0),S.unshift(S[0]),T.unshift(Ba)),w[w.length-1]!==1&&(w.push(1),S.push(null)),l.has(v)||l.set(v,{keyframes:{},transition:{}});const P=l.get(v);P.keyframes[b]=S,P.transition[b]=g(V(g({},e),{duration:p,ease:T,times:w}),n)}}),l}function Ri(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Li(t,e){return e[t]||(e[t]=[]),e[t]}function Oa(t){return Array.isArray(t)?t:[t]}function Ia(t,e){return t&&t[e]?g(g({},t),t[e]):g({},t)}const ja=t=>typeof t=="number",_a=t=>t.every(ja),Ua=t=>Array.isArray(t);function Na(t,e,n){const i=t.getProps();return Xn(i,e,i.custom,t)}function $a(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,vt(n))}function Ka(t){return Ua(t)?t[t.length-1]||0:t}function Wa(t,e){let o=Na(t,e)||{},{transitionEnd:i={},transition:s={}}=o,r=K(o,["transitionEnd","transition"]);r=g(g({},r),i);for(const a in r){const l=Ka(r[a]);$a(t,a,l)}}function Ga(t){return!!(k(t)&&t.add)}function za(t,e){const n=t.getValue("willChange");if(Ga(n))return n.add(e);if(!n&&et.WillChange){const i=new et.WillChange("auto");t.addValue("willChange",i),i.add(e)}}const Ha="data-"+Le("framerAppearId");function Bi(t){return t.props[Ha]}const Ya=t=>t!==null;function Xa(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Ya),r=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[r]}const qa={type:"spring",stiffness:500,damping:25,restSpeed:10},Za=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ja={type:"keyframes",duration:.8},Qa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tl=(t,{keyframes:e})=>e.length>2?Ja:xt.has(t)?t.startsWith("scale")?Za(e[1]):qa:Qa;function el(h){var d=h,{when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c}=d,u=K(d,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(u).length}function Ie(t,e){var n,i;return(i=(n=t==null?void 0:t[e])!=null?n:t==null?void 0:t.default)!=null?i:t}function je(t){t.duration=0,t.type="keyframes"}function _e(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function nl({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,r=0,o=0;if(!e)s=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=_e(l,a,t+1/3),r=_e(l,a,t),o=_e(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function Jt(t,e){return n=>n>0?e:t}const Ue=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},il=[pe,ut,mt],sl=t=>il.find(e=>e.test(t));function ki(t){const e=sl(t);if(Rt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===mt&&(n=nl(n)),n}const Fi=(t,e)=>{const n=ki(t),i=ki(e);if(!n||!i)return Jt(t,e);const s=g({},n);return r=>(s.red=Ue(n.red,i.red,r),s.green=Ue(n.green,i.green,r),s.blue=Ue(n.blue,i.blue,r),s.alpha=R(n.alpha,i.alpha,r),ut.transform(s))},Ne=new Set(["none","hidden"]);function ol(t,e){return Ne.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}const rl=(t,e)=>n=>e(t(n)),Lt=(...t)=>t.reduce(rl);function al(t,e){return n=>R(t,e,n)}function $e(t){return typeof t=="number"?al:typeof t=="string"?ge(t)?Jt:B.test(t)?Fi:cl:Array.isArray(t)?Oi:typeof t=="object"?B.test(t)?Fi:ll:Jt}function Oi(t,e){const n=[...t],i=n.length,s=t.map((r,o)=>$e(r)(r,e[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function ll(t,e){const n=g(g({},t),e),i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=$e(t[s])(t[s],e[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function ul(t,e){var s;const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(s=t.values[a])!=null?s:0;n[r]=l,i[o]++}return n}const cl=(t,e)=>{const n=rt.createTransformer(e),i=Vt(t),s=Vt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ne.has(t)&&!s.values.length||Ne.has(e)&&!i.values.length?ol(t,e):Lt(Oi(ul(i,s),s.values),n):(Rt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Jt(t,e))};function Ii(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?R(t,e,n):$e(t)(t,e)}const hl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>nt(e),now:()=>I.isProcessing?I.timestamp:U.now()}},ji=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)i+=Math.round(t(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},fl=5;function _i(t,e,n){const i=Math.max(e-fl,0);return zn(n-t(i),e-i)}const L={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ke=.001;function dl({duration:t=L.duration,bounce:e=L.bounce,velocity:n=L.velocity,mass:i=L.mass}){let s,r;Rt(t<=H(L.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=J(L.minDamping,L.maxDamping,o),t=J(L.minDuration,L.maxDuration,W(t)),o<1?(s=c=>{const u=c*o,h=u*t,d=u-n,f=We(c,o),p=Math.exp(-h);return Ke-d/f*p},r=c=>{const h=c*o*t,d=h*n+n,f=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=We(Math.pow(c,2),o);return(-s(c)+Ke>0?-1:1)*((d-f)*p)/m}):(s=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-Ke+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=ml(s,r,a);if(t=H(t),isNaN(l))return{stiffness:L.stiffness,damping:L.damping,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:t}}}const pl=12;function ml(t,e,n){let i=n;for(let s=1;s<pl;s++)i=i-t(i)/e(i);return i}function We(t,e){return t*Math.sqrt(1-e*e)}const gl=["duration","bounce"],yl=["stiffness","damping","mass"];function Ui(t,e){return e.some(n=>t[n]!==void 0)}function vl(t){let e=g({velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1},t);if(!Ui(t,yl)&&Ui(t,gl))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(s);e=V(g({},e),{mass:L.mass,stiffness:s,damping:r})}else{const n=dl(t);e=V(g(g({},e),n),{mass:L.mass}),e.isResolvedFromDuration=!0}return e}function Bt(t=L.visualDuration,e=L.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=vl(V(g({},n),{velocity:-W(n.velocity||0)})),p=d||0,m=c/(2*Math.sqrt(l*u)),v=o-r,b=W(Math.sqrt(l/u)),A=Math.abs(v)<5;i||(i=A?L.restSpeed.granular:L.restSpeed.default),s||(s=A?L.restDelta.granular:L.restDelta.default);let S;if(m<1){const T=We(b,m);S=P=>{const C=Math.exp(-m*b*P);return o-C*((p+m*b*v)/T*Math.sin(T*P)+v*Math.cos(T*P))}}else if(m===1)S=T=>o-Math.exp(-b*T)*(v+(p+b*v)*T);else{const T=b*Math.sqrt(m*m-1);S=P=>{const C=Math.exp(-m*b*P),E=Math.min(T*P,300);return o-C*((p+m*b*v)*Math.sinh(E)+T*v*Math.cosh(E))/T}}const w={calculatedDuration:f&&h||null,next:T=>{const P=S(T);if(f)a.done=T>=h;else{let C=T===0?p:0;m<1&&(C=T===0?H(p):_i(S,T,P));const E=Math.abs(C)<=i,j=Math.abs(o-P)<=s;a.done=E&&j}return a.value=a.done?o:P,a},toString:()=>{const T=Math.min(Fe(w),Zt),P=ji(C=>w.next(T*C).value,T,30);return T+"ms "+P},toTransition:()=>{}};return w}Bt.applyToOptions=t=>{const e=Di(t,100,Bt);return t.ease=e.ease,t.duration=H(e.duration),t.type="keyframes",t};function Ge({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},f=E=>a!==void 0&&E<a||l!==void 0&&E>l,p=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let m=n*e;const v=h+m,b=o===void 0?v:o(v);b!==v&&(m=b-h);const A=E=>-m*Math.exp(-E/i),S=E=>b+A(E),w=E=>{const j=A(E),N=S(E);d.done=Math.abs(j)<=c,d.value=d.done?b:N};let T,P;const C=E=>{f(d.value)&&(T=E,P=Bt({keyframes:[d.value,p(d.value)],velocity:_i(S,E,d.value),damping:s,stiffness:r,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:E=>{let j=!1;return!P&&T===void 0&&(j=!0,w(E),C(E)),T!==void 0&&E>=T?P.next(E-T):(!j&&w(E),d)}}}function bl(t,e,n){const i=[],s=n||et.mix||Ii,r=t.length-1;for(let o=0;o<r;o++){let a=s(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||$:e;a=Lt(l,a)}i.push(a)}return i}function xl(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(Q(r===e.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=bl(e,i,s),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const d=Tt(t[h],t[h+1],u);return a[h](d)};return n?u=>c(J(t[0],t[r-1],u)):c}function Tl(t,e){return t.map(n=>n*e)}const Ni=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Sl=1e-7,wl=12;function Al(t,e,n,i,s){let r,o,a=0;do o=e+(n-e)/2,r=Ni(o,i,s)-t,r>0?n=o:e=o;while(Math.abs(r)>Sl&&++a<wl);return o}function kt(t,e,n,i){if(t===e&&n===i)return $;const s=r=>Al(r,0,1,t,n);return r=>r===0||r===1?r:Ni(s(r),e,i)}const Pl=kt(.42,0,1,1),El=kt(0,0,.58,1),$i=kt(.42,0,.58,1),Ki=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Wi=t=>e=>1-t(1-e),Gi=kt(.33,1.53,.69,.99),ze=Wi(Gi),zi=Ki(ze),Hi=t=>(t*=2)<1?.5*ze(t):.5*(2-Math.pow(2,-10*(t-1))),He=t=>1-Math.sin(Math.acos(t)),Yi=Wi(He),Xi=Ki(He),qi=t=>Array.isArray(t)&&typeof t[0]=="number",Zi={linear:$,easeIn:Pl,easeInOut:$i,easeOut:El,circIn:He,circInOut:Xi,circOut:Yi,backIn:ze,backInOut:zi,backOut:Gi,anticipate:Hi},Vl=t=>typeof t=="string",Ji=t=>{if(qi(t)){Q(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,s]=t;return kt(e,n,i,s)}else if(Vl(t))return Q(Zi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Zi[t];return t};function Cl(t,e){return t.map(()=>e||$i).splice(0,t.length-1)}function St({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Ei(i)?i.map(Ji):Ji(i),r={done:!1,value:e[0]},o=Tl(n&&n.length===e.length?n:Mi(e),t),a=xl(o,e,{ease:Array.isArray(s)?s:Cl(e,s)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Ml=t=>t!==null;function Ye(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(Ml),a=s<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const Dl={decay:Ge,inertia:Ge,tween:St,keyframes:St,spring:Bt};function Qi(t){typeof t.type=="string"&&(t.type=Dl[t.type])}class Xe{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Rl=t=>t/100;class qe extends Xe{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,i;const{motionValue:s}=this.options;s&&s.updatedAt!==U.now()&&this.tick(U.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Qi(e);const{type:n=St,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||St;process.env.NODE_ENV!=="production"&&l!==St&&Q(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==St&&typeof a[0]!="number"&&(this.mixKeyframes=Lt(Rl,Ii(a[0],a[1])),a=[0,100]);const c=l(V(g({},e),{keyframes:a}));r==="mirror"&&(this.mirroredGenerator=l(V(g({},e),{keyframes:[...a].reverse(),velocity:-o}))),c.calculatedDuration===null&&(c.calculatedDuration=Fe(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,w=i;if(h){const E=Math.min(this.currentTime,s)/a;let j=Math.floor(E),N=E%1;!N&&E>=1&&(N=1),N===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(d==="reverse"?(N=1-N,f&&(N-=f/a)):d==="mirror"&&(w=o)),S=J(0,1,N)*a}const T=A?{done:!1,value:u[0]}:w.next(S);r&&(T.value=r(T.value));let{done:P}=T;!A&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return C&&p!==Ge&&(T.value=Ye(u,this.options,v,this.speed)),m&&m(T.value),C&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return W(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(this.currentTime)}set time(e){var n;e=H(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(U.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=W(this.currentTime))}play(){var e,n;if(this.isStopped)return;const{driver:i=hl,startTime:s}=this.options;this.driver||(this.driver=i(o=>this.tick(o))),(n=(e=this.options).onPlay)==null||n.call(e);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s!=null?s:r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(U.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}const Ll=t=>t.startsWith("--");function Bl(t,e,n){Ll(e)?t.style.setProperty(e,n):t.style[e]=n}function Ze(t){let e;return()=>(e===void 0&&(e=t()),e)}const kl=Ze(()=>window.ScrollTimeline!==void 0),Fl={};function Ol(t,e){const n=Ze(t);return()=>{var i;return(i=Fl[e])!=null?i:n()}}const ts=Ol(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ft=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,es={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ft([0,.65,.55,1]),circOut:Ft([.55,0,1,.45]),backIn:Ft([.31,.01,.66,-.59]),backOut:Ft([.33,1.53,.69,.99])};function ns(t,e){if(t)return typeof t=="function"?ts()?ji(t,e):"ease-out":qi(t)?Ft(t):Array.isArray(t)?t.map(n=>ns(n,e)||es.easeOut):es[t]}function Il(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=ns(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function jl(n){var i=n,{type:t}=i,e=K(i,["type"]);var s,r;return Oe(t)&&ts()?t.applyToOptions(e):((s=e.duration)!=null||(e.duration=300),(r=e.ease)!=null||(e.ease="easeOut"),e)}class _l extends Xe{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Q(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=jl(e);this.animation=Il(n,i,s,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=Ye(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Bl(n,i,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var e,n;const i=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return W(Number(i))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=H(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){var e;return(e=this.manualStartTime)!=null?e:Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&kl()?(this.animation.timeline=e,$):n(this)}}const is={anticipate:Hi,backInOut:zi,circInOut:Xi};function Ul(t){return t in is}function Nl(t){typeof t.ease=="string"&&Ul(t.ease)&&(t.ease=is[t.ease])}const Je=10;class $l extends _l{constructor(e){Nl(e),Qi(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const u=this.options,{motionValue:n,onUpdate:i,onComplete:s,element:r}=u,o=K(u,["motionValue","onUpdate","onComplete","element"]);if(!n)return;if(e!==void 0){n.set(e);return}const a=new qe(V(g({},o),{autoplay:!1})),l=Math.max(Je,U.now()-this.startTime),c=J(0,Je,l-Je);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const ss=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(rt.test(t)||t==="0")&&!t.startsWith("url("));function Kl(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Wl(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=ss(s,e),a=ss(r,e);return Rt(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Kl(t)||(n==="spring"||Oe(n))&&i}const Gl=new Set(["opacity","clipPath","filter","transform"]),zl=Ze(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hl(t){var e;const{motionValue:n,name:i,repeatDelay:s,repeatType:r,damping:o,type:a}=t;if(!(((e=n==null?void 0:n.owner)==null?void 0:e.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return zl()&&i&&Gl.has(i)&&(i!=="transform"||!u)&&!c&&!s&&r!=="mirror"&&o!==0&&a!=="inertia"}const Yl=40;class Xl extends Xe{constructor(d){var f=d,{autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u}=f,h=K(f,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var p;super(),this.stop=()=>{var b,A;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=U.now();const m=g({autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u},h),v=(u==null?void 0:u.KeyframeResolver)||Me;this.keyframeResolver=new v(a,(b,A,S)=>this.onKeyframesResolved(b,A,m,!S),l,c,u),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=U.now(),Wl(e,r,o,a)||((et.instantAnimations||!l)&&(u==null||u(Ye(e,i,n))),e[0]=e[e.length-1],je(i),i.repeat=0);const h=s?this.resolvedAt?this.resolvedAt-this.createdAt>Yl?this.resolvedAt:this.createdAt:this.createdAt:void 0,d=V(g({startTime:h,finalKeyframe:n},i),{keyframes:e}),f=!c&&Hl(d)?new $l(V(g({},d),{element:d.motionValue.owner.current})):new qe(d);f.finished.then(()=>this.notifyFinished()).catch($),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Zr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Qe=(t,e,n,i={},s,r)=>o=>{const a=Ie(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-H(l);const u=V(g({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity()},a),{delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s});el(a)||Object.assign(u,tl(t,u)),u.duration&&(u.duration=H(u.duration)),u.repeatDelay&&(u.repeatDelay=H(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(je(u),u.delay===0&&(h=!0)),(et.instantAnimations||et.skipAnimations)&&(h=!0,je(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=Xa(u.keyframes,a);if(d!==void 0){M.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new qe(u):new Xl(u)};function ql({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Zl(t,e,{delay:n=0,transitionOverride:i,type:s}={}){var h;let u=e,{transition:r=t.getDefaultTransition(),transitionEnd:o}=u,a=K(u,["transition","transitionEnd"]);i&&(r=i);const l=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const d in a){const f=t.getValue(d,(h=t.latestValues[d])!=null?h:null),p=a[d];if(p===void 0||c&&ql(c,d))continue;const m=g({delay:n},Ie(r||{},d)),v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===v&&!m.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const S=Bi(t);if(S){const w=window.MotionHandoffAnimation(S,d,M);w!==null&&(m.startTime=w,b=!0)}}za(t,d),f.start(Qe(d,f,p,t.shouldReduceMotion&&di.has(d)?{type:!1}:m,t,b));const A=f.animation;A&&l.push(A)}return o&&Promise.all(l).then(()=>{M.update(()=>{o&&Wa(t,o)})}),l}function Jl(t,e){return t in e}class Ql extends fi{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(Jl(n,e)){const i=e[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return O()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function os(t){return typeof t=="object"&&t!==null}function tn(t){return os(t)&&"ownerSVGElement"in t}function rs(t){return tn(t)&&t.tagName==="svg"}function tu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=tn(t)&&!rs(t)?new wi(e):new Ti(e);n.mount(t),ct.set(t,n)}function eu(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Ql(e);n.mount(t),ct.set(t,n)}function as(t,e,n){const i=k(t)?t:vt(t);return i.start(Qe("",i,e,n)),i.animation}function nu(t,e){return k(t)||typeof t=="number"||typeof t=="string"&&!Be(e)}function ls(t,e,n,i){const s=[];if(nu(t,e))s.push(as(t,Be(e)&&e.default||e,n&&(n.default||n)));else{const r=Ai(t,e,i),o=r.length;Q(!!o,"No valid elements provided.","no-valid-elements");for(let a=0;a<o;a++){const l=r[a];Q(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const c=l instanceof Element?tu:eu;ct.has(l)||c(l);const u=ct.get(l),h=g({},n);"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),s.push(...Zl(u,V(g({},e),{transition:h}),{}))}}return s}function iu(t,e,n){const i=[];return Fa(t,e,n,{spring:Bt}).forEach(({keyframes:r,transition:o},a)=>{i.push(...ls(a,r,o))}),i}class su{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=n}attachTimeline(e){const n=this.animations.map(i=>i.attachTimeline(e));return()=>{n.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return us(this.animations,"duration")}get iterationDuration(){return us(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function us(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];s!==null&&s>n&&(n=s)}return n}class ou extends su{then(e,n){return this.finished.finally(e).then(()=>{})}}function ru(t){return Array.isArray(t)&&t.some(Array.isArray)}function au(t){function e(n,i,s){let r=[],o;if(ru(n))r=iu(n,i,t);else{const l=s||{},{onComplete:c}=l,u=K(l,["onComplete"]);typeof c=="function"&&(o=c),r=ls(n,i,u,t)}const a=new ou(r);return o&&a.finished.then(o),a}return e}const lu=au(),uu=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];class cu extends it{constructor(e){var n,i;super(e),this.animateUpdates=({controlActiveState:s,directAnimate:r,directTransition:o,controlDelay:a=0,isExit:l}={})=>{const{reducedMotion:c}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion=c==="always"||c==="user"&&!!Xt.current;const u=this.state.target;this.state.target=g({},this.state.baseTarget);let h={};h=this.resolveStateAnimation({controlActiveState:s,directAnimate:r,directTransition:o}),this.state.finalTransition=h;const d=this.createAnimationFactories(u,h,a),{getChildAnimations:f}=this.setupChildAnimations(h,this.state.activeStates);return this.executeAnimations({factories:d,getChildAnimations:f,transition:h,controlActiveState:s,isExit:l})},this.state.visualElement=Pa(this.state.options.as,{presenceContext:null,parent:(n=this.state.parent)==null?void 0:n.visualElement,props:V(g({},this.state.options),{whileTap:this.state.options.whilePress}),visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:g({},this.state.baseTarget)},reducedMotionConfig:this.state.options.motionConfig.reducedMotion}),(i=this.state.visualElement.parent)==null||i.addChild(this.state.visualElement),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;Rn(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:n,transition:i,controlActiveState:s,isExit:r=!1}){const o=()=>Promise.all(e.map(h=>h()).filter(Boolean)),a=g({},this.state.target),l=this.state.element,c=h=>{var d,f;r&&(this.state.isExiting=!0),l.dispatchEvent(Fn("motionstart",a)),(f=(d=this.state.options).onAnimationStart)==null||f.call(d,a),h.then(()=>{var p,m,v,b;if(r){this.state.isExiting=!1;const A=this.state.options.animatePresenceContext;if(A!=null&&A.onMotionExitComplete&&this.state.presenceContainer){const S=this.state,w=S.visualElement.projection;(p=S.options)!=null&&p.layoutId&&((m=w.currentAnimation)==null?void 0:m.state)==="running"&&!S.options.exit||A.onMotionExitComplete(S.presenceContainer,S)}}l.dispatchEvent(Fn("motioncomplete",a,r)),(b=(v=this.state.options).onAnimationComplete)==null||b.call(v,a)}).catch($)},u=()=>{const h=i!=null&&i.when?(i.when==="beforeChildren"?o():n()).then(()=>i.when==="beforeChildren"?n():o()):Promise.all([o(),n()]);return c(h),h};return s?u:u()}setupChildAnimations(e,n){var i;const s=this.state.visualElement;if(!((i=s.variantChildren)!=null&&i.size)||!n)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:r=0,staggerDirection:o=1,delayChildren:a=0}=e||{},l=s.variantChildren.size,c=(l-1)*r,u=typeof a=="function",h=u?f=>a(f,l):o===1?(f=0)=>f*r:(f=0)=>c-f*r,d=Array.from(s.variantChildren).map((f,p)=>f.state.animateUpdates({controlActiveState:n,controlDelay:(u?0:a)+h(p)}));return{getChildAnimations:()=>Promise.all(d.map(f=>f()))}}createAnimationFactories(e,n,i){const s=[];return Object.keys(this.state.target).forEach(r=>{var l;var o;if(!ar(e[r],this.state.target[r]))return;(l=(o=this.state.baseTarget)[r])!=null||(o[r]=Pr.get(this.state.element,r));const a=this.state.target[r]==="none"&&Yt(jn[r])?jn[r]:this.state.target[r];s.push(()=>{var c;return lu(this.state.element,{[r]:a},V(g({},(n==null?void 0:n[r])||n),{delay:(((c=n==null?void 0:n[r])==null?void 0:c.delay)||(n==null?void 0:n.delay)||0)+i}))})}),s}resolveStateAnimation({controlActiveState:e,directAnimate:n,directTransition:i}){let s=this.state.options.transition,r={};const{variants:o,custom:a,transition:l,animatePresenceContext:c}=this.state.options,u=a!=null?a:c==null?void 0:c.custom;return this.state.activeStates=g(g({},this.state.activeStates),e),uu.forEach(h=>{if(!this.state.activeStates[h]||Rn(this.state.options[h]))return;const d=this.state.options[h];let f=Yt(d)?Dt(d,o,u):void 0;if(this.state.visualElement.isVariantNode){const p=Dt(this.state.context[h],o,u);f=Object.assign(p?p||{}:r,f)}f&&(h!=="initial"&&(s=f.transition||this.state.options.transition||{}),r=Object.assign(r,f))}),n&&(r=Dt(n,o,u),s=r.transition||i||l),Object.entries(r).forEach(([h,d])=>{h!=="transition"&&(this.state.target[h]=d)}),s}mount(){var e,n;const{element:i}=this.state;kn.set(i,this.state),ct.get(i)||(this.state.visualElement.mount(i),ct.set(i,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription();const s=this.state.visualElement,r=s.parent;if(s.enteringChildren=void 0,(e=this.state.parent)!=null&&e.isMounted()&&!s.isControllingVariants&&((n=r==null?void 0:r.enteringChildren)!=null&&n.has(s))){const{delayChildren:o}=this.state.parent.finalTransition||{};this.animateUpdates({controlActiveState:this.state.parent.activeStates,controlDelay:Ea(r.enteringChildren,s,o)})()}}update(){const{animate:e}=this.state.options,{animate:n}=this.state.visualElement.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;(e=this.unmountControls)==null||e.call(this)}}function hu(t){return os(t)&&"offsetHeight"in t}const fu={y:!1};function du(){return fu.y}const cs=(t,e)=>e?t===e?!0:cs(t,e.parentElement):!1,pu=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function hs(t,e){const n=ke(t),i=new AbortController,s=V(g({passive:!0},e),{signal:i.signal});return[n,s,()=>i.abort()]}const mu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gu(t){return mu.has(t.tagName)||t.isContentEditable===!0}const Qt=new WeakSet;function fs(t){return e=>{e.key==="Enter"&&t(e)}}function en(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const yu=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=fs(()=>{if(Qt.has(n))return;en(n,"down");const s=fs(()=>{en(n,"up")}),r=()=>en(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function ds(t){return pu(t)&&!0}function vu(t,e,n={}){const[i,s,r]=hs(t,n),o=a=>{const l=a.currentTarget;if(!ds(a))return;Qt.add(l);const c=e(l,a),u=(f,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),Qt.has(l)&&Qt.delete(l),ds(f)&&typeof c=="function"&&c(f,{success:p})},h=f=>{u(f,l===window||l===document||n.useGlobalTarget||cs(l,f.target))},d=f=>{u(f,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",d,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),hu(a)&&(a.addEventListener("focus",c=>yu(c,s)),!gu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function ps(t){return{point:{x:t.pageX,y:t.pageY}}}function ms(t,e,n){const i=t.options;i.whilePress&&t.setActive("whilePress",n==="Start");const s=`onPress${n==="End"?"":n}`,r=i[s];r&&M.postRender(()=>r(e,ps(e)))}class bu extends it{isActive(){const{whilePress:e,onPress:n,onPressCancel:i,onPressStart:s}=this.state.options;return!!(e||n||i||s)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:n,onPressCancel:i,onPressStart:s}=this.state.options;e||n||i||s||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=vu(e,(n,i)=>(ms(this.state,i,"Start"),(s,{success:r})=>ms(this.state,s,r?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}}function gs(t){return!(t.pointerType==="touch"||du())}function xu(t,e,n={}){const[i,s,r]=hs(t,n),o=a=>{if(!gs(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{gs(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return i.forEach(a=>{a.addEventListener("pointerenter",o,s)}),r}function ys(t,e,n){const i=t.options;i.whileHover&&t.setActive("whileHover",n==="Start");const s=`onHover${n}`,r=i[s];r&&M.postRender(()=>r(e,ps(e)))}class Tu extends it{isActive(){const{whileHover:e,onHoverStart:n,onHoverEnd:i}=this.state.options;return!!(e||n||i)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:n,onHoverEnd:i}=this.state.visualElement.prevProps;e||n||i||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=xu(e,(n,i)=>(ys(this.state,i,"Start"),s=>{ys(this.state,s,"End")})))}}const Su={some:0,all:1};function wu(t,e,{root:n,margin:i,amount:s="some"}={}){const r=ke(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const d=e(u.target,u);typeof d=="function"?o.set(u.target,d):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:i,threshold:typeof s=="number"?s:Su[s]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}function vs(t,e,n){const i=t.options;i.whileInView&&t.setActive("whileInView",n==="Enter");const s=`onViewport${n}`,r=i[s];r&&M.postRender(()=>r(e))}class Au extends it{isActive(){const{whileInView:e,onViewportEnter:n,onViewportLeave:i}=this.state.options;return!!(e||n||i)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const s=this.state.options.inViewOptions||{},{once:n}=s,i=K(s,["once"]);this.unmount=wu(e,(r,o)=>{if(vs(this.state,o,"Enter"),!n)return a=>{vs(this.state,o,"Leave")}},i)}mount(){this.startObserver()}update(){const{props:e,prevProps:n}=this.state.visualElement;["amount","margin","root"].some(Pu(e,n))&&this.startObserver()}}function Pu({inViewOptions:t={}},{inViewOptions:e={}}={}){return n=>t[n]!==e[n]}function te(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}class Eu extends it{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(":focus-visible")}catch(n){e=!0}e&&(this.state.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&(this.state.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Lt(te(this.state.element,"focus",()=>this.onFocus()),te(this.state.element,"blur",()=>this.onBlur()))}}const Vu=(t,e)=>t.depth-e.depth;class Cu{constructor(){this.children=[],this.isDirty=!1}add(e){xe(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Vu),this.isDirty=!1,this.children.forEach(e)}}function nn(t){return k(t)?t.get():t}const bs=["TopLeft","TopRight","BottomLeft","BottomRight"],Mu=bs.length,xs=t=>typeof t=="string"?parseFloat(t):t,Ts=t=>typeof t=="number"||x.test(t);function Du(t,e,n,i,s,r){var o,a,l,c;s?(t.opacity=R(0,(o=n.opacity)!=null?o:1,Ru(i)),t.opacityExit=R((a=e.opacity)!=null?a:1,0,Lu(i))):r&&(t.opacity=R((l=e.opacity)!=null?l:1,(c=n.opacity)!=null?c:1,i));for(let u=0;u<Mu;u++){const h=`border${bs[u]}Radius`;let d=Ss(e,h),f=Ss(n,h);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||Ts(d)===Ts(f)?(t[h]=Math.max(R(xs(d),xs(f),i),0),(q.test(f)||q.test(d))&&(t[h]+="%")):t[h]=f}(e.rotate||n.rotate)&&(t.rotate=R(e.rotate||0,n.rotate||0,i))}function Ss(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ru=ws(0,.5,Yi),Lu=ws(.5,.95,$);function ws(t,e,n){return i=>i<t?0:i>e?1:n(Tt(t,e,i))}function As(t,e){t.min=e.min,t.max=e.max}function Y(t,e){As(t.x,e.x),As(t.y,e.y)}function Ps(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function sn(t){return t===void 0||t===1}function on({scale:t,scaleX:e,scaleY:n}){return!sn(t)||!sn(e)||!sn(n)}function dt(t){return on(t)||Es(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Es(t){return Vs(t.x)||Vs(t.y)}function Vs(t){return t&&t!=="0%"}function ee(t,e,n){const i=t-n,s=e*i;return n+s}function Cs(t,e,n,i,s){return s!==void 0&&(t=ee(t,s,i)),ee(t,n,i)+e}function rn(t,e=0,n=1,i,s){t.min=Cs(t.min,e,n,i,s),t.max=Cs(t.max,e,n,i,s)}function Ms(t,{x:e,y:n}){rn(t.x,e.translate,e.scale,e.originPoint),rn(t.y,n.translate,n.scale,n.originPoint)}const Ds=.999999999999,Rs=1.0000000000001;function Bu(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&wt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ms(t,o)),i&&dt(r.latestValues)&&wt(t,r.latestValues))}e.x<Rs&&e.x>Ds&&(e.x=1),e.y<Rs&&e.y>Ds&&(e.y=1)}function ne(t,e){t.min=t.min+e,t.max=t.max+e}function Ls(t,e,n,i,s=.5){const r=R(t.min,t.max,s);rn(t,e,n,r,i)}function wt(t,e){Ls(t.x,e.x,e.scaleX,e.scale,e.originX),Ls(t.y,e.y,e.scaleY,e.scale,e.originY)}const Bs=1e-4,ku=1-Bs,Fu=1+Bs,ks=.01,Ou=0-ks,Iu=0+ks;function G(t){return t.max-t.min}function ju(t,e,n){return Math.abs(t-e)<=n}function Fs(t,e,n,i=.5){t.origin=i,t.originPoint=R(e.min,e.max,t.origin),t.scale=G(n)/G(e),t.translate=R(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ku&&t.scale<=Fu||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ou&&t.translate<=Iu||isNaN(t.translate))&&(t.translate=0)}function Ot(t,e,n,i){Fs(t.x,e.x,n.x,i?i.originX:void 0),Fs(t.y,e.y,n.y,i?i.originY:void 0)}function Os(t,e,n){t.min=n.min+e.min,t.max=t.min+G(e)}function _u(t,e,n){Os(t.x,e.x,n.x),Os(t.y,e.y,n.y)}function Is(t,e,n){t.min=e.min-n.min,t.max=t.min+G(e)}function ie(t,e,n){Is(t.x,e.x,n.x),Is(t.y,e.y,n.y)}function js(t,e,n,i,s){return t-=e,t=ee(t,1/n,i),s!==void 0&&(t=ee(t,1/s,i)),t}function Uu(t,e=0,n=1,i=.5,s,r=t,o=t){if(q.test(e)&&(e=parseFloat(e),e=R(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=R(r.min,r.max,i);t===r&&(a-=e),t.min=js(t.min,e,n,a,s),t.max=js(t.max,e,n,a,s)}function _s(t,e,[n,i,s],r,o){Uu(t,e[n],e[i],e[s],e.scale,r,o)}const Nu=["x","scaleX","originX"],$u=["y","scaleY","originY"];function Us(t,e,n,i){_s(t.x,e,Nu,n?n.x:void 0,i?i.x:void 0),_s(t.y,e,$u,n?n.y:void 0,i?i.y:void 0)}function Ns(t){return t.translate===0&&t.scale===1}function $s(t){return Ns(t.x)&&Ns(t.y)}function Ks(t,e){return t.min===e.min&&t.max===e.max}function Ku(t,e){return Ks(t.x,e.x)&&Ks(t.y,e.y)}function Ws(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Gs(t,e){return Ws(t.x,e.x)&&Ws(t.y,e.y)}function zs(t){return G(t.x)/G(t.y)}function Hs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Wu{constructor(){this.members=[]}add(e){xe(this.members,e),e.scheduleRender()}remove(e){if(qt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1){i=r;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Gu(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:d,skewX:f,skewY:p}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotateX(${h}deg) `),d&&(i+=`rotateY(${d}deg) `),f&&(i+=`skewX(${f}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}function Ys(t){return[t("x"),t("y")]}const se={hasAnimatedSinceResize:!0,hasEverUpdated:!1},an=["","X","Y","Z"],zu=1e3;let Hu=0;function ln(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Xs(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Bi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Xs(i)}function qs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Hu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(qu),this.nodes.forEach(tc),this.nodes.forEach(ec),this.nodes.forEach(Zu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cu)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Te),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=tn(o)&&!rs(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=$o(d,250),se.hasAnimatedSinceResize&&(se.hasAnimatedSinceResize=!1,this.nodes.forEach(Qs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||rc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=c.getProps(),b=!this.targetLayout||!Gs(this.targetLayout,f),A=!h&&d;if(this.options.layoutRoot||this.resumeFrom||A||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S=V(g({},Ie(p,"layout")),{onPlay:m,onComplete:v});(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,A)}else h||Qs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),nt(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(nc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Xs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Zs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Js);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qu),this.nodes.forEach(Yu),this.nodes.forEach(Xu)):this.nodes.forEach(Js),this.clearAllSnapshots();const a=U.now();I.delta=J(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,ce.update.process(I),ce.preRender.process(I),ce.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ci.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ju),this.sharedNodes.forEach(ic)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=O(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!$s(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||dt(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),ac(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return O();const l=a.measureViewportBox();if(!(((o=this.scroll)==null?void 0:o.wasRoot)||this.path.some(lc))){const{scroll:u}=this.root;u&&(ne(l.x,u.offset.x),ne(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=O();if(Y(l,o),(a=this.scroll)!=null&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:d}=u;u!==this.root&&h&&d.layoutScroll&&(h.wasRoot&&Y(l,o),ne(l.x,h.offset.x),ne(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=O();Y(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&wt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),dt(u.latestValues)&&wt(l,u.latestValues)}return dt(this.latestValues)&&wt(l,this.latestValues),l}removeTransform(o){const a=O();Y(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!dt(c.latestValues))continue;on(c.latestValues)&&c.updateSnapshot();const u=O(),h=c.measurePageBox();Y(u,h),Us(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return dt(this.latestValues)&&Us(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options=V(g(g({},this.options),o),{crossfade:o.crossfade!==void 0?o.crossfade:!0})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(a=this.parent)!=null&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!this.layout||!(h||d))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=O(),this.targetWithTransforms=O()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_u(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Y(this.target,this.layout.layoutBox),Ms(this.target,this.targetDelta)):Y(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||on(this.parent.latestValues)||Es(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=O(),this.relativeTargetOrigin=O(),ie(this.relativeTargetOrigin,a,l),Y(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(o=this.parent)!=null&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===I.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;Y(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Bu(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=O());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ps(this.prevProjectionDelta.x,this.projectionDelta.x),Ps(this.prevProjectionDelta.y,this.projectionDelta.y)),Ot(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Hs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Hs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yt(),this.projectionDelta=yt(),this.projectionDeltaWithTransform=yt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u=g({},this.latestValues),h=yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=O(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,v=this.getStack(),b=!v||v.members.length<=1,A=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(oc));this.animationProgress=0;let S;this.mixTargetDelta=w=>{const T=w/1e3;to(h.x,o.x,T),to(h.y,o.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ie(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sc(this.relativeTarget,this.relativeTargetOrigin,d,T),S&&Ku(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=O()),Y(S,this.relativeTarget)),m&&(this.animationValues=u,Du(u,c,this.latestValues,T,A,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(nt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{se.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=vt(0)),this.currentAnimation=as(this.motionValue,[0,1e3],V(g({},o),{velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(zu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&oo(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||O();const h=G(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=G(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Y(a,l),wt(a,u),Ot(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Wu),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ln("z",o,c,this.animationValues);for(let u=0;u<an.length;u++)ln(`rotate${an[u]}`,o,c,this.animationValues),ln(`skew${an[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){var p,m;if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=nn(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=nn(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!dt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Gu(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?(m=(p=u.opacity)!=null?p:this.latestValues.opacity)!=null?m:1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Ct){if(u[v]===void 0)continue;const{correct:b,applyTo:A,isCSSVariable:S}=Ct[v],w=h==="none"?u[v]:b(u[v],c);if(A){const T=A.length;for(let P=0;P<T;P++)o[A[P]]=w}else S?this.options.visualElement.renderState.vars[v]=w:o[v]=w}this.options.layoutId&&(o.pointerEvents=c===this?nn(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Zs),this.root.sharedNodes.clear()}}}function Yu(t){t.updateLayout()}function Xu(t){var e;const n=((e=t.resumeFrom)==null?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?Ys(h=>{const d=o?n.measuredBox[h]:n.layoutBox[h],f=G(d);d.min=i[h].min,d.max=d.min+f}):oo(r,n.layoutBox,i)&&Ys(h=>{const d=o?n.measuredBox[h]:n.layoutBox[h],f=G(i[h]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const a=yt();Ot(a,i,n.layoutBox);const l=yt();o?Ot(l,t.applyTransform(s,!0),n.measuredBox):Ot(l,i,n.layoutBox);const c=!$s(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:d,layout:f}=h;if(d&&f){const p=O();ie(p,n.layoutBox,d.layoutBox);const m=O();ie(m,i,f.layoutBox),Gs(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function qu(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 Zu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ju(t){t.clearSnapshot()}function Zs(t){t.clearMeasurements()}function Js(t){t.isLayoutDirty=!1}function Qu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Qs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function tc(t){t.resolveTargetDelta()}function ec(t){t.calcProjection()}function nc(t){t.resetSkewAndRotation()}function ic(t){t.removeLeadSnapshot()}function to(t,e,n){t.translate=R(e.translate,0,n),t.scale=R(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function eo(t,e,n,i){t.min=R(e.min,n.min,i),t.max=R(e.max,n.max,i)}function sc(t,e,n,i){eo(t.x,e.x,n.x,i),eo(t.y,e.y,n.y,i)}function oc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const rc={duration:.45,ease:[.4,0,.1,1]},no=t=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),io=no("applewebkit/")&&!no("chrome/")?Math.round:$;function so(t){t.min=io(t.min),t.max=io(t.max)}function ac(t){so(t.x),so(t.y)}function oo(t,e,n){return t==="position"||t==="preserve-aspect"&&!ju(zs(e),zs(n),.2)}function lc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}function uc(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const cc=qs({attachResizeListener:(t,e)=>uc(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),un={current:void 0},hc=qs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!un.current){const t=new cc({});t.mount(window),t.setOptions({layoutScroll:!0}),un.current=t}return un.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});function ro(t){if(t)return t.options.allowProjection!==!1?t.projection:ro(t.parent)}const ao={borderRadius:V(g({},Z),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomLeftRadius:Z,borderBottomRightRadius:Z,boxShadow:Vn};function It(t){return typeof t=="object"&&t!==null&&"nodeType"in t}class fc extends it{constructor(e){super(e),Dn(ao)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new hc(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:ro(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options,{layoutId:n,layout:i,drag:s=!1,dragConstraints:r=!1}=e;this.state.visualElement.projection.setOptions({layout:i,layoutId:n,alwaysMeasureLayout:!!n||!!s||r&&It(r),visualElement:this.state.visualElement,animationType:typeof e.layout=="string"?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var o,a;!((o=this.state.visualElement.projection)!=null&&o.isPresent)&&this.state.options.layoutId&&!this.state.isExiting&&((a=this.state.options.animatePresenceContext)==null||a.onMotionExitComplete(this.state.presenceContainer,this.state))}})}update(){this.setOptions()}mount(){var e;(e=this.state.visualElement.projection)==null||e.mount(this.state.element)}}function lo(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function cn(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function dc(t){return e=>lo(e)&&t(e,cn(e))}function jt(t,e,n,i){return te(t,e,dc(n),i)}function uo(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const co=uo("dragHorizontal"),ho=uo("dragVertical");function pc(t){let e=!1;if(t==="y")e=ho();else if(t==="x")e=co();else{const n=co(),i=ho();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function hn(t){return t.max-t.min}function mc(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?R(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?R(n,t,i.max):Math.min(t,n)),t}const fn=.35;function gc(t,{top:e,left:n,bottom:i,right:s}){return{x:fo(t.x,n,s),y:fo(t.y,e,i)}}function fo(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function yc(t=fn){return t===!1?t=0:t===!0&&(t=fn),{x:po(t,"left","right"),y:po(t,"top","bottom")}}function po(t,e,n){return{min:mo(t,e),max:mo(t,n)}}function mo(t,e){return typeof t=="number"?t:t[e]||0}function vc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}function bc(t,e){return{x:go(t.x,e.x),y:go(t.y,e.y)}}function go(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function xc(t,e){let n=.5;const i=hn(t),s=hn(e);return s>i?n=Tt(e.min,e.max-i,t.min):i>s&&(n=Tt(t.min,t.max-s,e.min)),J(0,1,n)}const yo=(t,e)=>Math.abs(t-e);function Tc(t,e){const n=yo(t.x,e.x),i=yo(t.y,e.y);return Math.sqrt(yn(n,2)+yn(i,2))}const vo=new Set(["auto","scroll"]);class bo{constructor(e,n,{transformPagePoint:i,contextWindow:s,dragSnapToOrigin:r=!1,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=pn(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=Tc(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:v}=I;this.history.push(V(g({},m),{timestamp:v}));const{onStart:b,onMove:A}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=dn(f,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=pn(d.type==="pointercancel"?this.lastMoveEventInfo:dn(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!lo(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.contextWindow=s||window;const a=cn(e),l=dn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=I;this.history=[V(g({},c),{timestamp:u})];const{onSessionStart:h}=n;h&&h(e,pn(l,this.history)),this.removeListeners=Lt(jt(this.contextWindow,"pointermove",this.handlePointerMove),jt(this.contextWindow,"pointerup",this.handlePointerUp),jt(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}isScrollable(e){const n=window.getComputedStyle(e);return n.overflow==="auto"||n.overflow==="scroll"||n.overflowX==="auto"||n.overflowX==="scroll"||n.overflowY==="auto"||n.overflowY==="scroll"}startScrollTracking(e){let n=e.parentElement;for(;n;){const i=getComputedStyle(n);(vo.has(i.overflowX)||vo.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const i=e===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,s),M.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){var e;this.removeListeners&&this.removeListeners(),(e=this.removeScrollListeners)==null||e.call(this),this.scrollPositions.clear(),nt(this.updatePoint)}}function dn(t,e){return e?{point:e(t.point)}:t}function xo(t,e){return{x:t.x-e.x,y:t.y-e.y}}function pn({point:t},e){return{point:t,delta:xo(t,To(e)),offset:xo(t,Sc(e)),velocity:wc(e,.1)}}function Sc(t){return t[0]}function To(t){return t[t.length-1]}function wc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=To(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>H(e)));)n--;if(!i)return{x:0,y:0};const r=W(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const So=()=>({min:0,max:0});function Ac(){return{x:So(),y:So()}}function tt(t){return[t("x"),t("y")]}function Pc(t){return!!(k(t)&&t.add)}function wo(t,e){const n=t.getValue("willChange");if(Pc(n))return n.add(e)}function Ao({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ec(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Vc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Po(t,e){t.min=t.min+e,t.max=t.max+e}function Cc(t,e){return Ao(Ec(t.getBoundingClientRect(),e))}function Mc(t,e,n){const i=Cc(t,n),{scroll:s}=e;return s&&(Po(i.x,s.offset.x),Po(i.y,s.offset.y)),i}function Dc(t){var e;return(e=t.projection)==null?void 0:e.isPresent}function Eo({current:t}){return t?t.ownerDocument.defaultView:null}const Rc=new WeakMap;class Lc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ac(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const i=c=>{n?this.stopAnimation():this.pauseAnimation(),n&&this.snapToCursor(cn(c,"page").point)},s=(c,u)=>{this.stopAnimation();const{drag:h,dragPropagation:d,onDragStart:f}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pc(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tt(m=>{let v=this.getAxisMotionValue(m).get()||0;if(q.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const A=b.layout.layoutBox[m];A&&(v=hn(A)*(parseFloat(v)/100))}}this.originPoint[m]=v}),f&&M.postRender(()=>f(c,u)),wo(this.visualElement,"transform"),this.visualElement.state.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:f,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:m}=u;if(d&&this.currentDirection===null){this.currentDirection=Bc(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),p&&p(c,u)},o=(c,u)=>this.stop(c,u),a=()=>tt(c=>{var u;return this.getAnimationState(c)==="paused"&&((u=this.getAxisMotionValue(c).animation)==null?void 0:u.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new bo(e,{onSessionStart:i,onStart:s,onMove:r,onSessionEnd:o,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:Eo(this.visualElement),element:this.visualElement.current})}stop(e,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:r}=this.getProps();r&&M.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:s}=this.getProps();if(!i||!oe(e,s,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=mc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)==null?void 0:e.layout,r=this.constraints;n&&It(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=gc(s.layoutBox,n):this.constraints=!1,this.elastic=yc(i),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&tt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=vc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!It(e))return!1;const i=e;zt(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const r=Mc(i,s.root,this.visualElement.getTransformPagePoint());let o=bc(s.layout.layoutBox,r);if(n){const a=n(Vc(o));this.hasMutatedConstraints=!!a,a&&(o=Ao(a))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=tt(u=>{if(!oe(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const d=s?200:1e6,f=s?40:1e7,p=g(g({type:"inertia",velocity:i?e[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},r),h);return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return wo(this.visualElement,e),i.start(Qe(e,i,0,n,this.visualElement,!1))}stopAnimation(){Dc(this.visualElement)&&tt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){tt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps();return i[n]||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){tt(n=>{const{drag:i}=this.getProps();if(!oe(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];r.set(e[n]-R(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!It(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};tt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=xc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),tt(o=>{if(!oe(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(R(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;Rc.set(this.visualElement,this);const e=this.visualElement.current,n=jt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();It(l)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,r=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),M.read(i);const o=te(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(tt(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=fn,dragMomentum:a=!0}=e;return V(g({},e),{drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a})}}function oe(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Bc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class kc extends it{constructor(e){super(e),this.removeGroupControls=$,this.removeListeners=$,this.controls=new Lc(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$}unmount(){this.removeGroupControls(),this.removeListeners()}}let _t=!1;class Fc extends it{constructor(e){super(e),Dn(ao),e.getSnapshot=this.getSnapshot.bind(this),e.didUpdate=this.didUpdate.bind(this)}beforeUpdate(e){this.getSnapshot(e,void 0)}update(){this.didUpdate()}didUpdate(){var e,n;_t&&(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(_t=!1,(n=(e=this.state.visualElement.projection)==null?void 0:e.root)==null||n.didUpdate())}mount(){var e;const n=this.state.options,i=this.state.options.layoutGroup;if(n.layout||n.layoutId){const s=this.state.visualElement.projection;if(s){s.promote();const r=s.getStack();r!=null&&r.prevLead&&!r.prevLead.snapshot&&(r.prevLead.willUpdate(),_t=!0),(e=i==null?void 0:i.group)==null||e.add(s)}se.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){this.getSnapshot(this.state.options,!1)}unmount(){const e=this.state.options.layoutGroup,n=this.state.visualElement.projection;n&&(e!=null&&e.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(n),this.state.options.layoutId&&(_t=!0),this.didUpdate())}getSnapshot(e,n){const i=this.state.visualElement.projection,{drag:s,layoutDependency:r,layout:o,layoutId:a}=e;if(!i||!o&&!a&&!s)return;_t=!0;const l=this.state.options;(s||l.layoutDependency!==r||r===void 0||Yt(n)&&i.isPresent!==n)&&i.willUpdate(),Yt(n)&&n!==i.isPresent&&(i.isPresent=n,n?i.promote():i.relegate())}}function Vo(t){return(e,n)=>{t&&M.postRender(()=>t(e,n))}}class Oc extends it{constructor(){super(...arguments),this.removePointerDownListener=$}onPointerDown(e){this.session=new bo(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:Eo(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:Vo((e,n)=>{const{onPanSessionStart:i}=this.state.options;i&&i(e,n)}),onStart:Vo((e,n)=>{const{onPanStart:i}=this.state.options;i&&i(e,n)}),onMove:(e,n)=>{const{onPan:i}=this.state.options;i&&i(e,n)},onEnd:(e,n)=>{const{onPanEnd:i}=this.state.options;delete this.session,i&&M.postRender(()=>i(e,n))}}}mount(){this.removePointerDownListener=jt(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ic=[cu,bu,Tu,Au,Eu,fc,Oc,kc,Fc],jc={reducedMotion:"never",transition:void 0,nonce:void 0},[_c]=Mt("MotionConfig");function Uc(){return _c(y.computed(()=>jc))}const Nc="data-ap-child",[$c]=Mt("AnimatePresenceContext");function re(t){if(t)return t.nodeType===3||t.nodeType===8?re(t.nextSibling):t}const[Kc]=Mt("LazyMotionContext");function Wc(t){var e;const n=sr(null),i=rr({}),s=Uc(),r=$c({}),o=Kc({features:y.ref([]),strict:!1});if(process.env.NODE_ENV!=="production"&&((e=t.features)!=null&&e.length)&&o.strict){const p="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?gt(!1,p):zt(!1,p)}const a=y.useAttrs();function l(){return i.id&&t.layoutId?`${i.id}-${t.layoutId}`:t.layoutId||void 0}function c(){var p,m;return V(g({},t),{lazyMotionContext:o,layoutId:l(),transition:(p=t.transition)!=null?p:s.value.transition,layoutGroup:i,motionConfig:s.value,inViewOptions:(m=t.inViewOptions)!=null?m:s.value.inViewOptions,animatePresenceContext:r,initial:r.initial===!1?r.initial:t.initial===!0?void 0:t.initial})}function u(){return g(g({},a),c())}const h=new gr(u(),n);or(h);function d(){var S,w;var p;const m=h.type==="svg",v=g({},a);Object.keys(a).forEach(T=>{k(a[T])&&(v[T]=a[T].get())});let b=g(g({},t.style),m?{}:((p=h.visualElement)==null?void 0:p.latestValues)||h.baseTarget);if(m){const{attrs:T,style:P}=Dr(g(g({},h.isMounted()?h.target:h.baseTarget),b));(P.transform||T.transformOrigin)&&(P.transformOrigin=(S=T.transformOrigin)!=null?S:"50% 50%",delete T.transformOrigin),P.transform&&(P.transformBox=(w=P.transformBox)!=null?w:"fill-box",delete T.transformBox),Object.assign(v,T),b=P}t.drag&&t.dragListener!==!1&&Object.assign(b,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`});const A=Er(b);return A&&(v.style=A),v}const f=y.getCurrentInstance().proxy;return y.onBeforeMount(()=>{h.beforeMount()}),y.onMounted(()=>{if(h.mount(re(f.$el),u(),zc(f)),r.register&&h.element){const p=h.element.closest(`[${Nc}]`);p?(h.presenceContainer=p,r.register(p,h)):r.registerPending&&r.registerPending(h)}}),y.onBeforeUnmount(()=>h.beforeUnmount()),y.onUnmounted(()=>{r.unregisterPending&&r.unregisterPending(h);const p=re(f.$el);p!=null&&p.isConnected||h.unmount()}),y.onBeforeUpdate(()=>{h.beforeUpdate(u())}),y.onUpdated(()=>{h.update(u())}),{getProps:c,getAttrs:d,layoutGroup:i,state:h}}const Gc={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},hover:{type:[String,Array,Object]},press:{type:[String,Array,Object]},inView:{type:[String,Array,Object]},focus:{type:[String,Array,Object]},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object],default:({hover:t})=>(process.env.NODE_ENV==="development"&&t&>(!0,"hover is deprecated. Use whileHover instead."),t)},whilePress:{type:[String,Array,Object],default:({press:t})=>(process.env.NODE_ENV==="development"&&t&>(!0,"press is deprecated. Use whilePress instead."),t)},whileInView:{type:[String,Array,Object],default:({inView:t})=>(process.env.NODE_ENV==="development"&&t&>(!0,"inView is deprecated. Use whileInView instead."),t)},whileFocus:{type:[String,Array,Object],default:({focus:t})=>(process.env.NODE_ENV==="development"&&t&>(!0,"focus is deprecated. Use whileFocus instead."),t)},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},layoutGroup:{type:Object},motionConfig:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:null,default:void 0},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};function zc(t){var e;const n=((e=re(t.$el))==null?void 0:e.style.display)==="none";return t.$.vnode.transition&&n}const Hc=new Map,Yc=new Map;function Xc(t){if(!Array.isArray(t))return[t];const e=[];for(const n of t)Array.isArray(n)?e.push(...n):e.push(n);return e}const qc=["area","img","input"];function Zc(t,e,n){var i,s;if(typeof t=="string"&&qc.includes(t))return y.h(t,e);if(t==="template"){if(!n.default)return null;const r=Xc(n.default()),o=r.findIndex(u=>u.type!==y.Comment);if(o===-1)return r;const a=r[o];(i=a.props)==null||delete i.ref;const l=a.props?y.mergeProps(e,a.props):e;e.class&&((s=a.props)!=null&&s.class)&&delete a.props.class;const c=y.cloneVNode(a,l);for(const u in l)u.startsWith("on")&&(c.props||(c.props={}),c.props[u]=l[u]);return r.length===1?c:(r[o]=c,r)}return null}function Co(t,e={}){var n;const i=typeof t=="string",s=i?t:t.name||"",r=((n=e.features)==null?void 0:n.length)>0?Hc:Yc;if(i&&(r!=null&&r.has(t)))return r.get(t);const o=y.defineComponent({inheritAttrs:!1,props:V(g({},Gc),{features:{type:Object,default:()=>e.features||[]},as:{type:[String,Object],default:t||"div"}}),name:s?`motion.${s}`:"Motion",setup(a,{slots:l}){const{getProps:c,getAttrs:u,state:h}=Wc(a);function d(){const f=h.element;if((!(typeof a.as=="object")||a.asChild)&&f){const{style:m}=u();if(m)for(const[v,b]of Object.entries(m))f.style[v]=b}}return()=>{const f=c(),p=u(),m=a.asChild?"template":a.as,v=V(g(g({},e.forwardMotionProps||a.forwardMotionProps?f:{}),p),{onVnodeUpdated:d}),b=Zc(m,v,l);return b!==null?b:y.h(m,g({},v),l)}}});return i&&(r==null||r.set(t,o)),o}function Jc(t=[]){return new Proxy({},{get(e,n){return n==="create"?(i,s)=>Co(i,V(g({},s),{features:t})):Co(n,{features:t})}})}const Mo=Jc(Ic);Mo.create("div");function Qc(t){function e(l){return t.modelValue.value===l.value}function n(l){return t.disabled.value||!!l.disabled}function i(l){n(l)||e(l)||t.onSelect(l.value)}function s(){const l=t.items.value,c=l.findIndex(u=>u.value===t.modelValue.value);return c>=0&&!n(l[c])?c:l.findIndex(u=>!n(u))}function r(l){const c=s();return c<0?-1:l===c?0:-1}function o(l,c){const u=t.items.value;let h=l;for(let d=0;d<u.length;d++)if(h=(h+c+u.length)%u.length,!n(u[h]))return h;return l}function a(l,c){var p;const u=t.items.value,h=u[c];if(!h||n(h))return;let d=null;switch(l.key){case"ArrowRight":case"ArrowDown":d=o(c,1);break;case"ArrowLeft":case"ArrowUp":d=o(c,-1);break;case"Home":d=u.findIndex(m=>!n(m));break;case"End":d=[...u].reverse().findIndex(m=>!n(m)),d>=0&&(d=u.length-1-d);break;default:return}if(d===null||d<0||d===c)return;l.preventDefault();const f=u[d];f&&(i(f),(p=t.focusIndex)==null||p.call(t,d))}return{isSelected:e,isSegmentDisabled:n,select:i,getTabIndex:r,onKeydown:a}}const th=["aria-label","aria-disabled"],eh=["aria-checked","aria-label","tabindex","disabled","onClick","onKeydown"],nh=y.defineComponent({__name:"index",props:{items:{},modelValue:{},size:{default:"m"},fullWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},ui:{default:()=>({})},ariaLabel:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=y.toRef(n,"items"),r=y.toRef(n,"modelValue"),o=y.toRef(n,"disabled"),a=y.ref([]);function l(w,T){a.value[T]=w}const{isSelected:c,isSegmentDisabled:u,select:h,getTabIndex:d,onKeydown:f}=Qc({items:s,modelValue:r,disabled:o,onSelect:w=>i("update:modelValue",w),focusIndex:w=>{var T;return(T=a.value[w])==null?void 0:T.focus()}}),p=y.computed(()=>{const w=n.items.findIndex(T=>T.value===n.modelValue);return w>=0?w:0}),m=y.computed(()=>{const w=n.items.length;if(w!==0)return n.fullWidth?`repeat(${w}, minmax(0, 1fr))`:`repeat(${w}, auto)`}),v=y.computed(()=>["segmented-control",n.size==="s"?"segmented-control--s":"segmented-control--m",n.fullWidth&&"segmented-control--full-width",n.ui.root]);function b(w){return["segmented-control__segment",c(w)&&"segmented-control__segment--selected",c(w)?n.ui.segmentSelected:n.ui.segment].filter(Boolean)}function A(w){return["segmented-control__label",c(w)&&"segmented-control__label--selected",c(w)?n.ui.labelSelected:n.ui.label].filter(Boolean)}const S={type:"spring",visualDuration:.2,bounce:.2};return(w,T)=>(y.openBlock(),y.createElementBlock("div",{"data-testid":"segmented-control",role:"radiogroup",class:y.normalizeClass(v.value),style:y.normalizeStyle(m.value?{gridTemplateColumns:m.value}:void 0),"aria-label":t.ariaLabel,"aria-disabled":t.disabled||void 0},[t.items.length>0?(y.openBlock(),y.createBlock(y.unref(Mo).div,{key:0,layout:"","data-testid":"segmented-control-indicator","data-state":t.modelValue,class:y.normalizeClass(["segmented-control__indicator",t.ui.indicator]),style:y.normalizeStyle({gridColumn:p.value+1,gridRow:1}),transition:S,"aria-hidden":"true"},null,8,["data-state","class","style"])):y.createCommentVNode("",!0),(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(t.items,(P,C)=>(y.openBlock(),y.createElementBlock("button",{key:P.value,ref_for:!0,ref:E=>l(E,C),type:"button",role:"radio","data-testid":"segmented-control-segment",class:y.normalizeClass(b(P)),style:y.normalizeStyle({gridColumn:C+1,gridRow:1}),"aria-checked":y.unref(c)(P),"aria-label":P.label,tabindex:y.unref(d)(C),disabled:y.unref(u)(P),onClick:E=>y.unref(h)(P),onKeydown:E=>y.unref(f)(E,C)},[y.createElementVNode("span",{"data-testid":"segmented-control-label",class:y.normalizeClass(A(P))},y.toDisplayString(P.label),3)],46,eh))),128))],14,th))}});D.AzSegmentedControl=nh,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(F,P){typeof exports=="object"&&typeof module!="undefined"?P(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],P):(F=typeof globalThis!="undefined"?globalThis:F||self,P(F["segmented-control"]={},F.Vue))})(this,function(F,P){"use strict";var Gd=Object.defineProperty,Wd=Object.defineProperties;var Kd=Object.getOwnPropertyDescriptors;var Ne=Object.getOwnPropertySymbols;var Ir=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable;var Jn=Math.pow,Br=(F,P,$)=>P in F?Gd(F,P,{enumerable:!0,configurable:!0,writable:!0,value:$}):F[P]=$,x=(F,P)=>{for(var $ in P||(P={}))Ir.call(P,$)&&Br(F,$,P[$]);if(Ne)for(var $ of Ne(P))Fr.call(P,$)&&Br(F,$,P[$]);return F},B=(F,P)=>Wd(F,Kd(P));var J=(F,P)=>{var $={};for(var it in F)Ir.call(F,it)&&P.indexOf(it)<0&&($[it]=F[it]);if(F!=null&&Ne)for(var it of Ne(F))P.indexOf(it)<0&&Fr.call(F,it)&&($[it]=F[it]);return $};const $=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function it(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&o.add(u),m.has(u)||m.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const gt={},Or=40;function Qn(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=$.reduce((T,M)=>(T[M]=it(r),T),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:m}=o,g=()=>{const T=gt.useManualTiming?i.timestamp:performance.now();n=!1,gt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,Or),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},y=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:$.reduce((T,M)=>{const S=o[M];return T[M]=(v,V=!1,p=!1)=>(n||y(),S.schedule(v,V,p)),T},{}),cancel:T=>{for(let M=0;M<$.length;M++)o[$[M]].cancel(T)},state:i,steps:o}}const Z=t=>t,{schedule:I,cancel:yt,state:H,steps:ze}=Qn(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Z,!0);let ge;function jr(){ge=void 0}const q={now:()=>(ge===void 0&&q.set(H.isProcessing||gt.useManualTiming?H.timestamp:performance.now()),ge),set:t=>{ge=t,queueMicrotask(jr)}},ot=t=>t*1e3,Q=t=>t/1e3;function _r(t,e){const n=q.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(yt(s),t(r-e))};return I.setup(s,!0),()=>yt(s)}const Xt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),xt=Xt("deg"),lt=Xt("%"),w=Xt("px"),Nr=Xt("vh"),zr=Xt("vw"),ts=B(x({},lt),{parse:t=>lt.parse(t)/100,transform:t=>lt.transform(t*100)});function es(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ct={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=es(t,e.target.x),s=es(t,e.target.y);return`${n}% ${s}%`}},ut=(t,e,n)=>n>e?e:n<t?t:n,Ot={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},qt=B(x({},Ot),{transform:t=>ut(0,1,t)}),ye=B(x({},Ot),{default:1}),Zt=t=>Math.round(t*1e5)/1e5,Ue=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ur(t){return t==null}const $r=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$e=(t,e)=>n=>!!(typeof n=="string"&&$r.test(n)&&n.startsWith(t)||e&&!Ur(n)&&Object.prototype.hasOwnProperty.call(n,e)),ns=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Ue);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Gr=t=>ut(0,255,t),Ge=B(x({},Ot),{transform:t=>Math.round(Gr(t))}),Ct={test:$e("rgb","red"),parse:ns("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ge.transform(t)+", "+Ge.transform(e)+", "+Ge.transform(n)+", "+Zt(qt.transform(s))+")"};function Wr(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const We={test:$e("#"),parse:Wr,transform:Ct.transform},jt={test:$e("hsl","hue"),parse:ns("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+lt.transform(Zt(e))+", "+lt.transform(Zt(n))+", "+Zt(qt.transform(s))+")"},z={test:t=>Ct.test(t)||We.test(t)||jt.test(t),parse:t=>Ct.test(t)?Ct.parse(t):jt.test(t)?jt.parse(t):We.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ct.transform(t):jt.transform(t),getAnimatableNone:t=>{const e=z.parse(t);return e.alpha=0,z.transform(e)}},Kr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Yr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ue))==null?void 0:e.length)||0)+(((n=t.match(Kr))==null?void 0:n.length)||0)>0}const ss="number",is="color",Hr="var",Xr="var(",os="${}",qr=/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 Jt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(qr,l=>(z.test(l)?(s.color.push(r),i.push(is),n.push(z.parse(l))):l.startsWith(Xr)?(s.var.push(r),i.push(Hr),n.push(l)):(s.number.push(r),i.push(ss),n.push(parseFloat(l))),++r,os)).split(os);return{values:n,split:a,indexes:s,types:i}}function rs(t){return Jt(t).values}function as(t){const{split:e,types:n}=Jt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===ss?r+=Zt(i[o]):a===is?r+=z.transform(i[o]):r+=i[o]}return r}}const Zr=t=>typeof t=="number"?0:z.test(t)?z.getAnimatableNone(t):t;function Jr(t){const e=rs(t);return as(t)(e.map(Zr))}const wt={test:Yr,parse:rs,createTransformer:as,getAnimatableNone:Jr},O=(t,e,n)=>t+(e-t)*n,ls={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=wt.parse(t);if(i.length>5)return s;const r=wt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=O(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},cs=t=>e=>typeof e=="string"&&e.startsWith(t),Ke=cs("--"),Qr=cs("var(--"),Ye=t=>Qr(t)?ta.test(t.split("/*")[0].trim()):!1,ta=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function us(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Qt={borderRadius:B(x({},ct),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomLeftRadius:ct,borderBottomRightRadius:ct,boxShadow:ls};function hs(t){for(const e in t)Qt[e]=t[e],Ke(e)&&(Qt[e].isCSSVariable=!0)}function te(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,s=Symbol(n);return[o=>{const a=P.inject(s,o);if(a===void 0)throw new Error(`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(P.provide(s,o),o)]}const[ea,na]=te("Motion"),[sa]=te("LayoutGroup");function ds(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}class vt{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(e){}beforeUnmount(){}}var _t=function(){},ve=function(){};process.env.NODE_ENV!=="production"&&(_t=function(t,e){!t&&typeof console!="undefined"&&console.warn(e)},ve=function(t,e){if(!t)throw new Error(e)});function ee(t,e,n){if(Array.isArray(t))return t.reduce((s,i)=>{const r=ee(i,e,n);return r?x(x({},s),r):s},{});if(typeof t=="object")return t;if(t&&e){const s=e[t];return typeof s=="function"?s(n):s}}function ia(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!oa(t,e):t!==e}function oa(t,e){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function fs(t){return t==null?void 0:t.startsWith("--")}const ra=t=>t;function aa(t){return typeof t=="number"}const la=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],ca=new Set(la);function ps(t){return ca.has(t)}class ua{constructor(e){this.features=[];const{features:n=[],lazyMotionContext:s}=e.options,i=n.concat(s.features.value);this.features=i.map(o=>new o(e));const r=this.features;P.watch(s.features,o=>{o.forEach(a=>{if(!i.includes(a)){i.push(a);const l=new a(e);r.push(l),e.isMounted()&&(l.beforeMount(),l.mount())}})},{flush:"pre"})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>{var n;return(n=e.beforeMount)==null?void 0:n.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var n;return(n=e.update)==null?void 0:n.call(e)})}beforeUpdate(e){this.features.forEach(n=>{var s;return(s=n.beforeUpdate)==null?void 0:s.call(n,e)})}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}function ha(t){return typeof t=="string"||t===!1||Array.isArray(t)}const ms=new WeakMap;let da=0;class fa{constructor(e,n){var s;this.element=null,this.isExiting=!1,this.presenceContainer=null,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=Z,this.id=`motion-state-${da++}`,this.options=e,this.parent=n,(s=n==null?void 0:n.children)==null||s.add(this);const r=(e.initial===void 0&&e.variants?this.context.initial:e.initial)===!1?["initial","animate"]:["initial"];this.initTarget(r),this.featureManager=new ua(this),this.type=ps(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(n,s)=>{var i;return ha(this.options[s])?this.options[s]:(i=this.parent)==null?void 0:i.context[s]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var i;var n;const s=(i=this.options.custom)!=null?i:(n=this.options.animatePresenceContext)==null?void 0:n.custom;this.baseTarget=e.reduce((r,o)=>x(x({},r),ee(this.options[o]||this.context[o],this.options.variants,s)),{}),this.target={}}updateOptions(e){var n;this.options=e,(n=this.visualElement)==null||n.update(B(x({},this.options),{whileTap:this.options.whilePress}),null)}beforeMount(){this.featureManager.beforeMount()}mount(e,n,s=!1){var i;ve(!!e,"Animation state must be mounted with valid Element"),this.element=e,this.updateOptions(n),this.featureManager.mount(),!s&&this.options.animate&&((i=this.startAnimation)==null||i.call(this))}clearAnimation(){var e,n;this.currentProcess&&yt(this.currentProcess),this.currentProcess=null,(n=(e=this.visualElement)==null?void 0:e.variantChildren)==null||n.forEach(s=>{s.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=I.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(){var e,n,s;(n=(e=this.parent)==null?void 0:e.children)==null||n.delete(this),ms.delete(this.element),this.featureManager.unmount(),(s=this.visualElement)==null||s.unmount(),this.clearAnimation()}beforeUpdate(e){this.featureManager.beforeUpdate(e)}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,n,s=!0){var i;!this.element||this.activeStates[e]===n||(this.activeStates[e]=n,(i=this.visualElement.variantChildren)==null||i.forEach(r=>{r.state.setActive(e,n,!1)}),s&&this.animateUpdates({isExit:e==="exit"&&this.activeStates.exit}))}isMounted(){return!!this.element}getSnapshot(e,n){}didUpdate(e){}}const kt=new WeakMap;function gs(t,e,n){return new CustomEvent(t,{detail:{target:e,isExit:n}})}const ys={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>`${t}deg`},pa={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>`${t}px`},rotate:ys,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:ra},skew:ys},ma=["translate","scale","rotate","skew"],ga=["","X","Y","Z"],He=new Map,be=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];ma.forEach(t=>{ga.forEach(e=>{be.push(t+e),He.set(t+e,pa[t])})});const ya=new Set(be),va=t=>ya.has(t),vs={x:"translateX",y:"translateY",z:"translateZ"};function ba([t],[e]){return be.indexOf(t)-be.indexOf(e)}function xa(t,[e,n]){return`${t} ${e}(${n})`}function wa(t){return t.sort(ba).reduce(xa,"").trim()}const bs={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},U=t=>!!(t&&t.getVelocity),Ta={get:(t,e)=>{let n=fs(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!=="0"){const s=He.get(e);s&&(n=s.initialValue)}return n},set:(t,e,n)=>{fs(e)?t.style.setProperty(e,n):t.style[e]=n}};function Sa(t){var e;const n={},s=[];for(let i in t){let r=t[i];r=U(r)?r.get():r,va(i)&&i in vs&&(i=vs[i]);let o=Array.isArray(r)?r[0]:r;const a=He.get(i);a?(o=aa(r)?(e=a.toDefaultUnit)==null?void 0:e.call(a,r):r,s.push([i,o])):n[i]=o}return s.length&&(n.transform=wa(s)),Object.keys(n).length===0?null:n}const Aa={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function Pa(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Ea(t,e,n=1,s=0){t.pathLength=1,delete t["path-length"],t["stroke-dashoffset"]=w.transform(-s);const i=w.transform(e),r=w.transform(n);t["stroke-dasharray"]=`${i} ${r}`}function Ca(t){const e={},n={};for(const s in t){const i=Pa(s);if(i in Aa){const r=t[s];e[i]=U(r)?r.get():r}else n[s]=t[s]}return e["path-length"]!==void 0&&Ea(e,e["path-length"],e["path-spacing"],e["path-offset"]),{attrs:e,style:n}}typeof WorkerGlobalScope!="undefined"&&globalThis instanceof WorkerGlobalScope;const xe=t=>typeof t!="undefined";function ka({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Va(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ma(t,e){return ka(Va(t.getBoundingClientRect(),e))}const xs={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"]},Xe={};for(const t in xs)Xe[t]={isEnabled:e=>xs[t].some(n=>!!e[n])};const ws=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nt=()=>({x:ws(),y:ws()}),Ts=()=>({min:0,max:0}),G=()=>({x:Ts(),y:Ts()}),Da=typeof window!="undefined",we={current:null},Ss={current:!1};function Ra(){if(Ss.current=!0,!!Da)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>we.current=t.matches;t.addEventListener("change",e),e()}else we.current=!1}function La(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ba(t){return typeof t=="string"||Array.isArray(t)}const Ia=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function As(t){return La(t.animate)||Ia.some(e=>Ba(t[e]))}function Fa(t){return!!(As(t)||t.variants)}function qe(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}const Ps=new Set;function Es(t,e,n){t||Ps.has(e)||(console.warn(qe(e,n)),Ps.add(e))}function Ze(t,e){t.indexOf(e)===-1&&t.push(e)}function Te(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Je{constructor(){this.subscriptions=[]}add(e){return Ze(this.subscriptions,e),()=>Te(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Cs(t,e){return e?t*(1e3/e):0}const ks=30,Oa=t=>!isNaN(parseFloat(t));class ja{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var i;const r=q.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Oa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Es(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Je);const s=this.events[e].add(n);return e==="change"?()=>{s(),I.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ks)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ks);return Cs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zt(t,e){return new ja(t,e)}function _a(t,e,n){for(const s in e){const i=e[s],r=n[s];if(U(i))t.addValue(s,i);else if(U(r))t.addValue(s,zt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,zt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}function Vs(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ms(t,e,n,s){if(typeof e=="function"){const[i,r]=Vs(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Vs(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function Na(t){var e;for(let n=1;n<t.length;n++)(e=t[n])!=null||(t[n]=t[n-1])}const Vt=t=>t*180/Math.PI,Qe=t=>{const e=Vt(Math.atan2(t[1],t[0]));return tn(e)},za={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qe,rotateZ:Qe,skewX:t=>Vt(Math.atan(t[1])),skewY:t=>Vt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tn=t=>(t=t%360,t<0&&(t+=360),t),Ds=Qe,Rs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ls=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ua={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Rs,scaleY:Ls,scale:t=>(Rs(t)+Ls(t))/2,rotateX:t=>tn(Vt(Math.atan2(t[6],t[5]))),rotateY:t=>tn(Vt(Math.atan2(-t[2],t[0]))),rotateZ:Ds,rotate:Ds,skewX:t=>Vt(Math.atan(t[4])),skewY:t=>Vt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function en(t){return t.includes("scale")?1:0}function nn(t,e){if(!t||t==="none")return en(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ua,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=za,i=a}if(!i)return en(e);const r=s[e],o=i[1].split(",").map(Ga);return typeof r=="function"?r(o):o[r]}const $a=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return nn(n,e)};function Ga(t){return parseFloat(t.trim())}const Ut=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$t=new Set(Ut),Bs=t=>t===Ot||t===w,Wa=new Set(["x","y","z"]),Ka=Ut.filter(t=>!Wa.has(t));function Ya(t){const e=[];return Ka.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Tt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),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})=>nn(e,"x"),y:(t,{transform:e})=>nn(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const Mt=new Set;let sn=!1,on=!1,rn=!1;function Is(){if(on){const t=Array.from(Mt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Ya(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}on=!1,sn=!1,Mt.forEach(t=>t.complete(rn)),Mt.clear()}function Fs(){Mt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(on=!0)})}function Ha(){rn=!0,Fs(),Is(),rn=!1}class an{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Mt.add(this),sn||(sn=!0,I.read(Fs),I.resolveKeyframes(Is))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Na(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Mt.delete(this)}cancel(){this.state==="scheduled"&&(Mt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Os=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),js=t=>/^0[^.\s]+$/u.test(t),Xa={test:t=>t==="auto",parse:t=>t},_s=t=>e=>e.test(t),Ns=[Ot,w,lt,xt,zr,Nr,Xa],zs=t=>Ns.find(_s(t)),qa=[...Ns,z,wt],Za=t=>qa.find(_s(t)),Ja=new Set(["brightness","contrast","saturate","opacity"]);function Qa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ue)||[];if(!s)return t;const i=n.replace(s,"");let r=Ja.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const tl=/\b([a-z-]*)\(.*?\)/gu,ln=B(x({},wt),{getAnimatableNone:t=>{const e=t.match(tl);return e?e.map(Qa).join(" "):t}}),Us=B(x({},Ot),{transform:Math.round}),cn=B(x({borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,radius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,inset:w,insetBlock:w,insetBlockStart:w,insetBlockEnd:w,insetInline:w,insetInlineStart:w,insetInlineEnd:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,paddingBlock:w,paddingBlockStart:w,paddingBlockEnd:w,paddingInline:w,paddingInlineStart:w,paddingInlineEnd:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,marginBlock:w,marginBlockStart:w,marginBlockEnd:w,marginInline:w,marginInlineStart:w,marginInlineEnd:w,backgroundPositionX:w,backgroundPositionY:w},{rotate:xt,rotateX:xt,rotateY:xt,rotateZ:xt,scale:ye,scaleX:ye,scaleY:ye,scaleZ:ye,skew:xt,skewX:xt,skewY:xt,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:qt,originX:ts,originY:ts,originZ:w}),{zIndex:Us,fillOpacity:qt,strokeOpacity:qt,numOctaves:Us}),el=B(x({},cn),{color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:ln,WebkitFilter:ln}),$s=t=>el[t];function Gs(t,e){let n=$s(t);return n!==ln&&(n=wt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const{schedule:Ws}=Qn(queueMicrotask,!0),Ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ys{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=an,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=q.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,I.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget=x({},l),this.initialValues=n.initial?x({},l):{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=As(n),this.isVariantNode=Fa(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const f=this.scrapeMotionValuesFromProps(n,{},this),{willChange:u}=f,h=J(f,["willChange"]);for(const d in h){const m=h[d];l[d]!==void 0&&U(m)&&m.set(l[d])}}mount(e){var n;this.current=e,kt.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ss.current||Ra(),this.shouldReduceMotion=we.current),process.env.NODE_ENV!=="production"&&Es(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),yt(this.notifyUpdate),yt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){var n;this.children.add(e),(n=this.enteringChildren)!=null||(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=$t.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&I.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Xe){const n=Xe[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ks.length;s++){const i=Ks[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=_a(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=zt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var i;let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!=null?i:this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Os(s)||js(s))?s=parseFloat(s):!Za(s)&&wt.test(n)&&(s=Gs(e,n)),this.setBaseTarget(e,U(s)?s.get():s)),U(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=Ms(this.props,s,(n=this.presenceContext)==null?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!U(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Je),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Ws.render(this.render)}}const Hs=new Set(["width","height","top","left","right","bottom",...Ut]);var Xs;let ne=()=>{},ht=()=>{};typeof process!="undefined"&&((Xs=process.env)==null?void 0:Xs.NODE_ENV)!=="production"&&(ne=(t,e,n)=>{!t&&typeof console!="undefined"&&console.warn(qe(e,n))},ht=(t,e,n)=>{if(!t)throw new Error(qe(e,n))});const nl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sl(t){const e=nl.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n!=null?n:s}`,i]}const il=4;function qs(t,e,n=1){ht(n<=il,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=sl(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Os(o)?parseFloat(o):o}return Ye(i)?qs(i,e,n+1):i}function ol(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||js(t):!0}const rl=new Set(["auto","none","0"]);function al(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!rl.has(r)&&Jt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Gs(n,i)}class ll extends an{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Ye(h))){const f=qs(h,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Hs.has(s)||e.length!==2)return;const[i,r]=e,o=zs(i),a=zs(r),l=us(i),c=us(r);if(l!==c&&Tt[s]){this.needsMeasurement=!0;return}if(o!==a)if(Bs(o)&&Bs(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else Tt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||ol(e[i]))&&s.push(i);s.length&&al(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=Tt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(e=this.removedTransforms)!=null&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class Zs extends Ys{constructor(){super(...arguments),this.KeyframeResolver=ll}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;U(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}const Js=(t,e)=>e&&typeof t=="number"?e.transform(t):t,cl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ul=Ut.length;function hl(t,e,n){let s="",i=!0;for(let r=0;r<ul;r++){const o=Ut[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Js(a,cn[o]);if(!l){i=!1;const u=cl[o]||o;s+=`${u}(${c}) `}n&&(e[o]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Qs(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if($t.has(l)){o=!0;continue}else if(Ke(l)){i[l]=c;continue}else{const u=Js(c,cn[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=hl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}function ti(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function dl(t,{layout:e,layoutId:n}){return $t.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Qt[t]||t==="opacity")}function ei(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(U(i[o])||e.style&&U(e.style[o])||dl(o,t)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function fl(t){return window.getComputedStyle(t)}class ni extends Zs{constructor(){super(...arguments),this.type="html",this.renderInstance=ti}readValueFromInstance(e,n){var s;if($t.has(n))return(s=this.projection)!=null&&s.isProjecting?en(n):$a(e,n);{const i=fl(e),r=(Ke(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ma(e,n)}build(e,n,s){Qs(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return ei(e,n,s)}}const un=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),pl={offset:"stroke-dashoffset",array:"stroke-dasharray"},ml={offset:"strokeDashoffset",array:"strokeDasharray"};function gl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?pl:ml;t[r.offset]=w.transform(-s);const o=w.transform(e),a=w.transform(n);t[r.array]=`${o} ${a}`}const yl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function vl(t,h,l,c,u){var f=h,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0}=f,a=J(f,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var g,y;if(Qs(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m}=t;d.transform&&(m.transform=d.transform,delete d.transform),(m.transform||d.transformOrigin)&&(m.transformOrigin=(g=d.transformOrigin)!=null?g:"50% 50%",delete d.transformOrigin),m.transform&&(m.transformBox=(y=u==null?void 0:u.transformBox)!=null?y:"fill-box",delete d.transformBox);for(const b of yl)d[b]!==void 0&&(m[b]=d[b],delete d[b]);e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&gl(d,i,r,o,!1)}const si=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"]),bl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function xl(t,e,n,s){ti(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(si.has(i)?i:un(i),e.attrs[i])}function wl(t,e,n){const s=ei(t,e,n);for(const i in t)if(U(t[i])||U(e[i])){const r=Ut.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class ii extends Zs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if($t.has(n)){const s=$s(n);return s&&s.default||0}return n=si.has(n)?n:un(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return wl(e,n,s)}build(e,n,s){vl(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){xl(e,n,s,i)}mount(e){this.isSVGTag=bl(e.tagName),super.mount(e)}}function Tl(t,e){return ps(t)?new ii(e):new ni(e)}function Sl(t,e,n,s=0,i=1){const r=Array.from(t),o=r.indexOf(e),a=t.size,l=(a-1)*s,c=typeof n=="function";return o===r.length-1&&(e.parent.enteringChildren=void 0),c?n(o,a):i===1?o*s:l-o*s}function hn(t){return typeof t=="object"&&!Array.isArray(t)}function dn(t,e,n){var s;if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const r=(s=n==null?void 0:n[t])!=null?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function oi(t,e,n,s){return typeof t=="string"&&hn(e)?dn(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Al(t,e,n){return t*(e+1)}function ri(t,e,n,s){var i;return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):(i=s.get(e))!=null?i:t}const Pl=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},ai=t=>Array.isArray(t)&&typeof t[0]!="number";function li(t,e){return ai(t)?t[Pl(0,t.length,e)]:t}function El(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(Te(t,i),s--)}}function Cl(t,e,n,s,i,r){El(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:O(i,r,s[o]),easing:li(n,o)})}function kl(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Vl(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const Gt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};function ci(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Gt(0,e,s);t.push(O(n,1,i))}}function ui(t){const e=[0];return ci(e,t.length-1),e}const Se=2e4;function fn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Se;)e+=n,s=t.next(e);return e>=Se?1/0:e}function hi(t,e=100,n){const s=n(B(x({},t),{keyframes:[0,e]})),i=Math.min(fn(s),Se);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:Q(i)}}function pn(t){return typeof t=="function"&&"applyToOptions"in t}const Ml="easeInOut",Dl=20;function Rl(t,r={},s,i){var o=r,{defaultTransition:e={}}=o,n=J(o,["defaultTransition"]);const a=e.duration||.3,l=new Map,c=new Map,u={},h=new Map;let f=0,d=0,m=0;for(let g=0;g<t.length;g++){const y=t[g];if(typeof y=="string"){h.set(y,d);continue}else if(!Array.isArray(y)){h.set(y.name,ri(d,y.at,f,h));continue}let[b,C,T={}]=y;T.at!==void 0&&(d=ri(d,T.at,f,h));let M=0;const S=(v,V,p,D=0,L=0)=>{const N=Ll(v),It=V,{delay:at=0,times:X=ui(N),type:Bt="keyframes",repeat:et,repeatType:nt,repeatDelay:Pt=0}=It,de=J(It,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:st=e.ease||"easeOut",duration:k}=V;const fe=typeof at=="function"?at(D,L):at,pe=N.length,me=pn(Bt)?Bt:i==null?void 0:i[Bt||"keyframes"];if(pe<=2&&me){let Et=100;if(pe===2&&Fl(N)){const pt=N[1]-N[0];Et=Math.abs(pt)}const _=x({},de);k!==void 0&&(_.duration=ot(k));const Ft=hi(_,Et,me);st=Ft.ease,k=Ft.duration}k!=null||(k=a);const Ht=d+fe;X.length===1&&X[0]===0&&(X[1]=1);const K=X.length-N.length;if(K>0&&ci(X,K),N.length===1&&N.unshift(null),et){ht(et<Dl,"Repeat count too high, must be less than 20","repeat-count-high"),k=Al(k,et);const Et=[...N],_=[...X];st=Array.isArray(st)?[...st]:[st];const Ft=[...st];for(let pt=0;pt<et;pt++){N.push(...Et);for(let mt=0;mt<Et.length;mt++)X.push(_[mt]+(pt+1)),st.push(mt===0?"linear":li(Ft,mt-1))}kl(X,et)}const Y=Ht+k;Cl(p,N,st,X,Ht,Y),M=Math.max(fe+k,M),m=Math.max(Y,m)};if(U(b)){const v=di(b,c);S(C,T,fi("default",v))}else{const v=oi(b,C,s,u),V=v.length;for(let p=0;p<V;p++){C=C,T=T;const D=v[p],L=di(D,c);for(const N in C)S(C[N],Bl(T,N),fi(N,L),p,V)}}f=d,d+=M}return c.forEach((g,y)=>{for(const b in g){const C=g[b];C.sort(Vl);const T=[],M=[],S=[];for(let V=0;V<C.length;V++){const{at:p,value:D,easing:L}=C[V];T.push(D),M.push(Gt(0,m,p)),S.push(L||"easeOut")}M[0]!==0&&(M.unshift(0),T.unshift(T[0]),S.unshift(Ml)),M[M.length-1]!==1&&(M.push(1),T.push(null)),l.has(y)||l.set(y,{keyframes:{},transition:{}});const v=l.get(y);v.keyframes[b]=T,v.transition[b]=x(B(x({},e),{duration:m,ease:S,times:M}),n)}}),l}function di(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function fi(t,e){return e[t]||(e[t]=[]),e[t]}function Ll(t){return Array.isArray(t)?t:[t]}function Bl(t,e){return t&&t[e]?x(x({},t),t[e]):x({},t)}const Il=t=>typeof t=="number",Fl=t=>t.every(Il),Ol=t=>Array.isArray(t);function jl(t,e,n){const s=t.getProps();return Ms(s,e,s.custom,t)}function _l(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,zt(n))}function Nl(t){return Ol(t)?t[t.length-1]||0:t}function zl(t,e){let o=jl(t,e)||{},{transitionEnd:s={},transition:i={}}=o,r=J(o,["transitionEnd","transition"]);r=x(x({},r),s);for(const a in r){const l=Nl(r[a]);_l(t,a,l)}}function Ul(t){return!!(U(t)&&t.add)}function $l(t,e){const n=t.getValue("willChange");if(Ul(n))return n.add(e);if(!n&>.WillChange){const s=new gt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}const Gl="data-"+un("framerAppearId");function pi(t){return t.props[Gl]}const Wl=t=>t!==null;function Kl(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Wl),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const Yl={type:"spring",stiffness:500,damping:25,restSpeed:10},Hl=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Xl={type:"keyframes",duration:.8},ql={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zl=(t,{keyframes:e})=>e.length>2?Xl:$t.has(t)?t.startsWith("scale")?Hl(e[1]):Yl:ql;function Jl(h){var f=h,{when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c}=f,u=J(f,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(u).length}function mn(t,e){var n,s;return(s=(n=t==null?void 0:t[e])!=null?n:t==null?void 0:t.default)!=null?s:t}function gn(t){t.duration=0,t.type="keyframes"}function yn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ql({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=yn(l,a,t+1/3),r=yn(l,a,t),o=yn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Ae(t,e){return n=>n>0?e:t}const vn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},tc=[We,Ct,jt],ec=t=>tc.find(e=>e.test(t));function mi(t){const e=ec(t);if(ne(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===jt&&(n=Ql(n)),n}const gi=(t,e)=>{const n=mi(t),s=mi(e);if(!n||!s)return Ae(t,e);const i=x({},n);return r=>(i.red=vn(n.red,s.red,r),i.green=vn(n.green,s.green,r),i.blue=vn(n.blue,s.blue,r),i.alpha=O(n.alpha,s.alpha,r),Ct.transform(i))},bn=new Set(["none","hidden"]);function nc(t,e){return bn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}const sc=(t,e)=>n=>e(t(n)),se=(...t)=>t.reduce(sc);function ic(t,e){return n=>O(t,e,n)}function xn(t){return typeof t=="number"?ic:typeof t=="string"?Ye(t)?Ae:z.test(t)?gi:ac:Array.isArray(t)?yi:typeof t=="object"?z.test(t)?gi:oc:Ae}function yi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>xn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function oc(t,e){const n=x(x({},t),e),s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=xn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function rc(t,e){var i;const n=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][s[o]],l=(i=t.values[a])!=null?i:0;n[r]=l,s[o]++}return n}const ac=(t,e)=>{const n=wt.createTransformer(e),s=Jt(t),i=Jt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?bn.has(t)&&!i.values.length||bn.has(e)&&!s.values.length?nc(t,e):se(yi(rc(s,i),i.values),n):(ne(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ae(t,e))};function vi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):xn(t)(t,e)}const lc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>I.update(e,n),stop:()=>yt(e),now:()=>H.isProcessing?H.timestamp:q.now()}},bi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},cc=5;function xi(t,e,n){const s=Math.max(e-cc,0);return Cs(n-t(s),e-s)}const j={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},wn=.001;function uc({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:s=j.mass}){let i,r;ne(t<=ot(j.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=ut(j.minDamping,j.maxDamping,o),t=ut(j.minDuration,j.maxDuration,Q(t)),o<1?(i=c=>{const u=c*o,h=u*t,f=u-n,d=Tn(c,o),m=Math.exp(-h);return wn-f/d*m},r=c=>{const h=c*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(c,2)*t,m=Math.exp(-h),g=Tn(Math.pow(c,2),o);return(-i(c)+wn>0?-1:1)*((f-d)*m)/g}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-wn+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=dc(i,r,a);if(t=ot(t),isNaN(l))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const hc=12;function dc(t,e,n){let s=n;for(let i=1;i<hc;i++)s=s-t(s)/e(s);return s}function Tn(t,e){return t*Math.sqrt(1-e*e)}const fc=["duration","bounce"],pc=["stiffness","damping","mass"];function wi(t,e){return e.some(n=>t[n]!==void 0)}function mc(t){let e=x({velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1},t);if(!wi(t,pc)&&wi(t,fc))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*ut(.05,1,1-(t.bounce||0))*Math.sqrt(i);e=B(x({},e),{mass:j.mass,stiffness:i,damping:r})}else{const n=uc(t);e=B(x(x({},e),n),{mass:j.mass}),e.isResolvedFromDuration=!0}return e}function ie(t=j.visualDuration,e=j.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=mc(B(x({},n),{velocity:-Q(n.velocity||0)})),m=f||0,g=c/(2*Math.sqrt(l*u)),y=o-r,b=Q(Math.sqrt(l/u)),C=Math.abs(y)<5;s||(s=C?j.restSpeed.granular:j.restSpeed.default),i||(i=C?j.restDelta.granular:j.restDelta.default);let T;if(g<1){const S=Tn(b,g);T=v=>{const V=Math.exp(-g*b*v);return o-V*((m+g*b*y)/S*Math.sin(S*v)+y*Math.cos(S*v))}}else if(g===1)T=S=>o-Math.exp(-b*S)*(y+(m+b*y)*S);else{const S=b*Math.sqrt(g*g-1);T=v=>{const V=Math.exp(-g*b*v),p=Math.min(S*v,300);return o-V*((m+g*b*y)*Math.sinh(p)+S*y*Math.cosh(p))/S}}const M={calculatedDuration:d&&h||null,next:S=>{const v=T(S);if(d)a.done=S>=h;else{let V=S===0?m:0;g<1&&(V=S===0?ot(m):xi(T,S,v));const p=Math.abs(V)<=s,D=Math.abs(o-v)<=i;a.done=p&&D}return a.value=a.done?o:v,a},toString:()=>{const S=Math.min(fn(M),Se),v=bi(V=>M.next(S*V).value,S,30);return S+"ms "+v},toTransition:()=>{}};return M}ie.applyToOptions=t=>{const e=hi(t,100,ie);return t.ease=e.ease,t.duration=ot(e.duration),t.type="keyframes",t};function Sn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=p=>a!==void 0&&p<a||l!==void 0&&p>l,m=p=>a===void 0?l:l===void 0||Math.abs(a-p)<Math.abs(l-p)?a:l;let g=n*e;const y=h+g,b=o===void 0?y:o(y);b!==y&&(g=b-h);const C=p=>-g*Math.exp(-p/s),T=p=>b+C(p),M=p=>{const D=C(p),L=T(p);f.done=Math.abs(D)<=c,f.value=f.done?b:L};let S,v;const V=p=>{d(f.value)&&(S=p,v=ie({keyframes:[f.value,m(f.value)],velocity:xi(T,p,f.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return V(0),{calculatedDuration:null,next:p=>{let D=!1;return!v&&S===void 0&&(D=!0,M(p),V(p)),S!==void 0&&p>=S?v.next(p-S):(!D&&M(p),f)}}}function gc(t,e,n){const s=[],i=n||gt.mix||vi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Z:e;a=se(l,a)}s.push(a)}return s}function yc(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(ht(r===e.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=gc(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=Gt(t[h],t[h+1],u);return a[h](f)};return n?u=>c(ut(t[0],t[r-1],u)):c}function vc(t,e){return t.map(n=>n*e)}const Ti=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,bc=1e-7,xc=12;function wc(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Ti(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>bc&&++a<xc);return o}function oe(t,e,n,s){if(t===e&&n===s)return Z;const i=r=>wc(r,0,1,t,n);return r=>r===0||r===1?r:Ti(i(r),e,s)}const Tc=oe(.42,0,1,1),Sc=oe(0,0,.58,1),Si=oe(.42,0,.58,1),Ai=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pi=t=>e=>1-t(1-e),Ei=oe(.33,1.53,.69,.99),An=Pi(Ei),Ci=Ai(An),ki=t=>(t*=2)<1?.5*An(t):.5*(2-Math.pow(2,-10*(t-1))),Pn=t=>1-Math.sin(Math.acos(t)),Vi=Pi(Pn),Mi=Ai(Pn),Di=t=>Array.isArray(t)&&typeof t[0]=="number",Ri={linear:Z,easeIn:Tc,easeInOut:Si,easeOut:Sc,circIn:Pn,circInOut:Mi,circOut:Vi,backIn:An,backInOut:Ci,backOut:Ei,anticipate:ki},Ac=t=>typeof t=="string",Li=t=>{if(Di(t)){ht(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return oe(e,n,s,i)}else if(Ac(t))return ht(Ri[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Ri[t];return t};function Pc(t,e){return t.map(()=>e||Si).splice(0,t.length-1)}function Wt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=ai(s)?s.map(Li):Li(s),r={done:!1,value:e[0]},o=vc(n&&n.length===e.length?n:ui(e),t),a=yc(o,e,{ease:Array.isArray(i)?i:Pc(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Ec=t=>t!==null;function En(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Ec),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Cc={decay:Sn,inertia:Sn,tween:Wt,keyframes:Wt,spring:ie};function Bi(t){typeof t.type=="string"&&(t.type=Cc[t.type])}class Cn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const kc=t=>t/100;class kn extends Cn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:i}=this.options;i&&i.updatedAt!==q.now()&&this.tick(q.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Bi(e);const{type:n=Wt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Wt;process.env.NODE_ENV!=="production"&&l!==Wt&&ht(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Wt&&typeof a[0]!="number"&&(this.mixKeyframes=se(kc,vi(a[0],a[1])),a=[0,100]);const c=l(B(x({},e),{keyframes:a}));r==="mirror"&&(this.mirroredGenerator=l(B(x({},e),{keyframes:[...a].reverse(),velocity:-o}))),c.calculatedDuration===null&&(c.calculatedDuration=fn(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,M=s;if(h){const p=Math.min(this.currentTime,i)/a;let D=Math.floor(p),L=p%1;!L&&p>=1&&(L=1),L===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(f==="reverse"?(L=1-L,d&&(L-=d/a)):f==="mirror"&&(M=o)),T=ut(0,1,L)*a}const S=C?{done:!1,value:u[0]}:M.next(T);r&&(S.value=r(S.value));let{done:v}=S;!C&&l!==null&&(v=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&v);return V&&m!==Sn&&(S.value=En(u,this.options,y,this.speed)),g&&g(S.value),V&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return Q(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Q(e)}get time(){return Q(this.currentTime)}set time(e){var n;e=ot(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(q.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Q(this.currentTime))}play(){var e,n;if(this.isStopped)return;const{driver:s=lc,startTime:i}=this.options;this.driver||(this.driver=s(o=>this.tick(o))),(n=(e=this.options).onPlay)==null||n.call(e);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=i!=null?i:r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(q.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}const Vc=t=>t.startsWith("--");function Mc(t,e,n){Vc(e)?t.style.setProperty(e,n):t.style[e]=n}function Vn(t){let e;return()=>(e===void 0&&(e=t()),e)}const Dc=Vn(()=>window.ScrollTimeline!==void 0),Rc={};function Lc(t,e){const n=Vn(t);return()=>{var s;return(s=Rc[e])!=null?s:n()}}const Ii=Lc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),re=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Fi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:re([0,.65,.55,1]),circOut:re([.55,0,1,.45]),backIn:re([.31,.01,.66,-.59]),backOut:re([.33,1.53,.69,.99])};function Oi(t,e){if(t)return typeof t=="function"?Ii()?bi(t,e):"ease-out":Di(t)?re(t):Array.isArray(t)?t.map(n=>Oi(n,e)||Fi.easeOut):Fi[t]}function Bc(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Oi(a,i);Array.isArray(h)&&(u.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function Ic(n){var s=n,{type:t}=s,e=J(s,["type"]);var i,r;return pn(t)&&Ii()?t.applyToOptions(e):((i=e.duration)!=null||(e.duration=300),(r=e.ease)!=null||(e.ease="easeOut"),e)}class Fc extends Cn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,ht(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Ic(e);this.animation=Bc(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=En(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Mc(n,s,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var e,n;const s=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return Q(Number(s))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Q(e)}get time(){return Q(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ot(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){var e;return(e=this.manualStartTime)!=null?e:Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Dc()?(this.animation.timeline=e,Z):n(this)}}const ji={anticipate:ki,backInOut:Ci,circInOut:Mi};function Oc(t){return t in ji}function jc(t){typeof t.ease=="string"&&Oc(t.ease)&&(t.ease=ji[t.ease])}const Mn=10;class _c extends Fc{constructor(e){jc(e),Bi(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const u=this.options,{motionValue:n,onUpdate:s,onComplete:i,element:r}=u,o=J(u,["motionValue","onUpdate","onComplete","element"]);if(!n)return;if(e!==void 0){n.set(e);return}const a=new kn(B(x({},o),{autoplay:!1})),l=Math.max(Mn,q.now()-this.startTime),c=ut(0,Mn,l-Mn);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const _i=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wt.test(t)||t==="0")&&!t.startsWith("url("));function Nc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function zc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=_i(i,e),a=_i(r,e);return ne(o===a,`You are trying to animate ${e} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Nc(t)||(n==="spring"||pn(n))&&s}const Uc=new Set(["opacity","clipPath","filter","transform"]),$c=Vn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gc(t){var e;const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(((e=n==null?void 0:n.owner)==null?void 0:e.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return $c()&&s&&Uc.has(s)&&(s!=="transform"||!u)&&!c&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}const Wc=40;class Kc extends Cn{constructor(f){var d=f,{autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u}=d,h=J(d,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var m;super(),this.stop=()=>{var b,C;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(C=this.keyframeResolver)==null||C.cancel()},this.createdAt=q.now();const g=x({autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u},h),y=(u==null?void 0:u.KeyframeResolver)||an;this.keyframeResolver=new y(a,(b,C,T)=>this.onKeyframesResolved(b,C,g,!T),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=q.now(),zc(e,r,o,a)||((gt.instantAnimations||!l)&&(u==null||u(En(e,s,n))),e[0]=e[e.length-1],gn(s),s.repeat=0);const h=i?this.resolvedAt?this.resolvedAt-this.createdAt>Wc?this.resolvedAt:this.createdAt:this.createdAt:void 0,f=B(x({startTime:h,finalKeyframe:n},s),{keyframes:e}),d=!c&&Gc(f)?new _c(B(x({},f),{element:f.motionValue.owner.current})):new kn(f);d.finished.then(()=>this.notifyFinished()).catch(Z),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(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Ha()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Dn=(t,e,n,s={},i,r)=>o=>{const a=mn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-ot(l);const u=B(x({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity()},a),{delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i});Jl(a)||Object.assign(u,Zl(t,u)),u.duration&&(u.duration=ot(u.duration)),u.repeatDelay&&(u.repeatDelay=ot(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(gn(u),u.delay===0&&(h=!0)),(gt.instantAnimations||gt.skipAnimations)&&(h=!0,gn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=Kl(u.keyframes,a);if(f!==void 0){I.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new kn(u):new Kc(u)};function Yc({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Hc(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var h;let u=e,{transition:r=t.getDefaultTransition(),transitionEnd:o}=u,a=J(u,["transition","transitionEnd"]);s&&(r=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,(h=t.latestValues[f])!=null?h:null),m=a[f];if(m===void 0||c&&Yc(c,f))continue;const g=x({delay:n},mn(r||{},f)),y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===y&&!g.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const T=pi(t);if(T){const M=window.MotionHandoffAnimation(T,f,I);M!==null&&(g.startTime=M,b=!0)}}$l(t,f),d.start(Dn(f,d,m,t.shouldReduceMotion&&Hs.has(f)?{type:!1}:g,t,b));const C=d.animation;C&&l.push(C)}return o&&Promise.all(l).then(()=>{I.update(()=>{o&&zl(t,o)})}),l}function Xc(t,e){return t in e}class qc extends Ys{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(Xc(n,e)){const s=e[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return G()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function Ni(t){return typeof t=="object"&&t!==null}function Rn(t){return Ni(t)&&"ownerSVGElement"in t}function zi(t){return Rn(t)&&t.tagName==="svg"}function Zc(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Rn(t)&&!zi(t)?new ii(e):new ni(e);n.mount(t),kt.set(t,n)}function Jc(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new qc(e);n.mount(t),kt.set(t,n)}function Ui(t,e,n){const s=U(t)?t:zt(t);return s.start(Dn("",s,e,n)),s.animation}function Qc(t,e){return U(t)||typeof t=="number"||typeof t=="string"&&!hn(e)}function $i(t,e,n,s){const i=[];if(Qc(t,e))i.push(Ui(t,hn(e)&&e.default||e,n&&(n.default||n)));else{const r=oi(t,e,s),o=r.length;ht(!!o,"No valid elements provided.","no-valid-elements");for(let a=0;a<o;a++){const l=r[a];ht(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const c=l instanceof Element?Zc:Jc;kt.has(l)||c(l);const u=kt.get(l),h=x({},n);"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),i.push(...Hc(u,B(x({},e),{transition:h}),{}))}}return i}function tu(t,e,n){const s=[];return Rl(t,e,n,{spring:ie}).forEach(({keyframes:r,transition:o},a)=>{s.push(...$i(a,r,o))}),s}class eu{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>s.attachTimeline(e));return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Gi(this.animations,"duration")}get iterationDuration(){return Gi(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Gi(t,e){let n=0;for(let s=0;s<t.length;s++){const i=t[s][e];i!==null&&i>n&&(n=i)}return n}class nu extends eu{then(e,n){return this.finished.finally(e).then(()=>{})}}function su(t){return Array.isArray(t)&&t.some(Array.isArray)}function iu(t){function e(n,s,i){let r=[],o;if(su(n))r=tu(n,s,t);else{const l=i||{},{onComplete:c}=l,u=J(l,["onComplete"]);typeof c=="function"&&(o=c),r=$i(n,s,u,t)}const a=new nu(r);return o&&a.finished.then(o),a}return e}const ou=iu(),ru=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];class au extends vt{constructor(e){var n,s;super(e),this.animateUpdates=({controlActiveState:i,directAnimate:r,directTransition:o,controlDelay:a=0,isExit:l}={})=>{const{reducedMotion:c}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion=c==="always"||c==="user"&&!!we.current;const u=this.state.target;this.state.target=x({},this.state.baseTarget);let h={};h=this.resolveStateAnimation({controlActiveState:i,directAnimate:r,directTransition:o}),this.state.finalTransition=h;const f=this.createAnimationFactories(u,h,a),{getChildAnimations:d}=this.setupChildAnimations(h,this.state.activeStates);return this.executeAnimations({factories:f,getChildAnimations:d,transition:h,controlActiveState:i,isExit:l})},this.state.visualElement=Tl(this.state.options.as,{presenceContext:null,parent:(n=this.state.parent)==null?void 0:n.visualElement,props:B(x({},this.state.options),{whileTap:this.state.options.whilePress}),visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:x({},this.state.baseTarget)},reducedMotionConfig:this.state.options.motionConfig.reducedMotion}),(s=this.state.visualElement.parent)==null||s.addChild(this.state.visualElement),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;ds(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:n,transition:s,controlActiveState:i,isExit:r=!1}){const o=()=>Promise.all(e.map(h=>h()).filter(Boolean)),a=x({},this.state.target),l=this.state.element,c=h=>{var f,d;r&&(this.state.isExiting=!0),l.dispatchEvent(gs("motionstart",a)),(d=(f=this.state.options).onAnimationStart)==null||d.call(f,a),h.then(()=>{var m,g,y,b;if(r){this.state.isExiting=!1;const C=this.state.options.animatePresenceContext;if(C!=null&&C.onMotionExitComplete&&this.state.presenceContainer){const T=this.state,M=T.visualElement.projection;(m=T.options)!=null&&m.layoutId&&((g=M.currentAnimation)==null?void 0:g.state)==="running"&&!T.options.exit||C.onMotionExitComplete(T.presenceContainer,T)}}l.dispatchEvent(gs("motioncomplete",a,r)),(b=(y=this.state.options).onAnimationComplete)==null||b.call(y,a)}).catch(Z)},u=()=>{const h=s!=null&&s.when?(s.when==="beforeChildren"?o():n()).then(()=>s.when==="beforeChildren"?n():o()):Promise.all([o(),n()]);return c(h),h};return i?u:u()}setupChildAnimations(e,n){var s;const i=this.state.visualElement;if(!((s=i.variantChildren)!=null&&s.size)||!n)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:r=0,staggerDirection:o=1,delayChildren:a=0}=e||{},l=i.variantChildren.size,c=(l-1)*r,u=typeof a=="function",h=u?d=>a(d,l):o===1?(d=0)=>d*r:(d=0)=>c-d*r,f=Array.from(i.variantChildren).map((d,m)=>d.state.animateUpdates({controlActiveState:n,controlDelay:(u?0:a)+h(m)}));return{getChildAnimations:()=>Promise.all(f.map(d=>d()))}}createAnimationFactories(e,n,s){const i=[];return Object.keys(this.state.target).forEach(r=>{var l;var o;if(!ia(e[r],this.state.target[r]))return;(l=(o=this.state.baseTarget)[r])!=null||(o[r]=Ta.get(this.state.element,r));const a=this.state.target[r]==="none"&&xe(bs[r])?bs[r]:this.state.target[r];i.push(()=>{var c;return ou(this.state.element,{[r]:a},B(x({},(n==null?void 0:n[r])||n),{delay:(((c=n==null?void 0:n[r])==null?void 0:c.delay)||(n==null?void 0:n.delay)||0)+s}))})}),i}resolveStateAnimation({controlActiveState:e,directAnimate:n,directTransition:s}){let i=this.state.options.transition,r={};const{variants:o,custom:a,transition:l,animatePresenceContext:c}=this.state.options,u=a!=null?a:c==null?void 0:c.custom;return this.state.activeStates=x(x({},this.state.activeStates),e),ru.forEach(h=>{if(!this.state.activeStates[h]||ds(this.state.options[h]))return;const f=this.state.options[h];let d=xe(f)?ee(f,o,u):void 0;if(this.state.visualElement.isVariantNode){const m=ee(this.state.context[h],o,u);d=Object.assign(m?m||{}:r,d)}d&&(h!=="initial"&&(i=d.transition||this.state.options.transition||{}),r=Object.assign(r,d))}),n&&(r=ee(n,o,u),i=r.transition||s||l),Object.entries(r).forEach(([h,f])=>{h!=="transition"&&(this.state.target[h]=f)}),i}mount(){var e,n;const{element:s}=this.state;ms.set(s,this.state),kt.get(s)||(this.state.visualElement.mount(s),kt.set(s,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription();const i=this.state.visualElement,r=i.parent;if(i.enteringChildren=void 0,(e=this.state.parent)!=null&&e.isMounted()&&!i.isControllingVariants&&((n=r==null?void 0:r.enteringChildren)!=null&&n.has(i))){const{delayChildren:o}=this.state.parent.finalTransition||{};this.animateUpdates({controlActiveState:this.state.parent.activeStates,controlDelay:Sl(r.enteringChildren,i,o)})()}}update(){const{animate:e}=this.state.options,{animate:n}=this.state.visualElement.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;(e=this.unmountControls)==null||e.call(this)}}function lu(t){return Ni(t)&&"offsetHeight"in t}const cu={y:!1};function uu(){return cu.y}const Wi=(t,e)=>e?t===e?!0:Wi(t,e.parentElement):!1,hu=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ki(t,e){const n=dn(t),s=new AbortController,i=B(x({passive:!0},e),{signal:s.signal});return[n,i,()=>s.abort()]}const du=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fu(t){return du.has(t.tagName)||t.isContentEditable===!0}const Pe=new WeakSet;function Yi(t){return e=>{e.key==="Enter"&&t(e)}}function Ln(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const pu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Yi(()=>{if(Pe.has(n))return;Ln(n,"down");const i=Yi(()=>{Ln(n,"up")}),r=()=>Ln(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Hi(t){return hu(t)&&!0}function mu(t,e,n={}){const[s,i,r]=Ki(t,n),o=a=>{const l=a.currentTarget;if(!Hi(a))return;Pe.add(l);const c=e(l,a),u=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Pe.has(l)&&Pe.delete(l),Hi(d)&&typeof c=="function"&&c(d,{success:m})},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||Wi(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),lu(a)&&(a.addEventListener("focus",c=>pu(c,i)),!fu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Xi(t){return{point:{x:t.pageX,y:t.pageY}}}function qi(t,e,n){const s=t.options;s.whilePress&&t.setActive("whilePress",n==="Start");const i=`onPress${n==="End"?"":n}`,r=s[i];r&&I.postRender(()=>r(e,Xi(e)))}class gu extends vt{isActive(){const{whilePress:e,onPress:n,onPressCancel:s,onPressStart:i}=this.state.options;return!!(e||n||s||i)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:n,onPressCancel:s,onPressStart:i}=this.state.options;e||n||s||i||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=mu(e,(n,s)=>(qi(this.state,s,"Start"),(i,{success:r})=>qi(this.state,i,r?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}}function Zi(t){return!(t.pointerType==="touch"||uu())}function yu(t,e,n={}){const[s,i,r]=Ki(t,n),o=a=>{if(!Zi(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{Zi(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}function Ji(t,e,n){const s=t.options;s.whileHover&&t.setActive("whileHover",n==="Start");const i=`onHover${n}`,r=s[i];r&&I.postRender(()=>r(e,Xi(e)))}class vu extends vt{isActive(){const{whileHover:e,onHoverStart:n,onHoverEnd:s}=this.state.options;return!!(e||n||s)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:n,onHoverEnd:s}=this.state.visualElement.prevProps;e||n||s||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=yu(e,(n,s)=>(Ji(this.state,s,"Start"),i=>{Ji(this.state,i,"End")})))}}const bu={some:0,all:1};function xu(t,e,{root:n,margin:s,amount:i="some"}={}){const r=dn(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const f=e(u.target,u);typeof f=="function"?o.set(u.target,f):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:bu[i]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}function Qi(t,e,n){const s=t.options;s.whileInView&&t.setActive("whileInView",n==="Enter");const i=`onViewport${n}`,r=s[i];r&&I.postRender(()=>r(e))}class wu extends vt{isActive(){const{whileInView:e,onViewportEnter:n,onViewportLeave:s}=this.state.options;return!!(e||n||s)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const i=this.state.options.inViewOptions||{},{once:n}=i,s=J(i,["once"]);this.unmount=xu(e,(r,o)=>{if(Qi(this.state,o,"Enter"),!n)return a=>{Qi(this.state,o,"Leave")}},s)}mount(){this.startObserver()}update(){const{props:e,prevProps:n}=this.state.visualElement;["amount","margin","root"].some(Tu(e,n))&&this.startObserver()}}function Tu({inViewOptions:t={}},{inViewOptions:e={}}={}){return n=>t[n]!==e[n]}function Ee(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}class Su extends vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(":focus-visible")}catch(n){e=!0}e&&(this.state.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&(this.state.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=se(Ee(this.state.element,"focus",()=>this.onFocus()),Ee(this.state.element,"blur",()=>this.onBlur()))}}const Au=(t,e)=>t.depth-e.depth;class Pu{constructor(){this.children=[],this.isDirty=!1}add(e){Ze(this.children,e),this.isDirty=!0}remove(e){Te(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Au),this.isDirty=!1,this.children.forEach(e)}}function Bn(t){return U(t)?t.get():t}const to=["TopLeft","TopRight","BottomLeft","BottomRight"],Eu=to.length,eo=t=>typeof t=="string"?parseFloat(t):t,no=t=>typeof t=="number"||w.test(t);function Cu(t,e,n,s,i,r){var o,a,l,c;i?(t.opacity=O(0,(o=n.opacity)!=null?o:1,ku(s)),t.opacityExit=O((a=e.opacity)!=null?a:1,0,Vu(s))):r&&(t.opacity=O((l=e.opacity)!=null?l:1,(c=n.opacity)!=null?c:1,s));for(let u=0;u<Eu;u++){const h=`border${to[u]}Radius`;let f=so(e,h),d=so(n,h);if(f===void 0&&d===void 0)continue;f||(f=0),d||(d=0),f===0||d===0||no(f)===no(d)?(t[h]=Math.max(O(eo(f),eo(d),s),0),(lt.test(d)||lt.test(f))&&(t[h]+="%")):t[h]=d}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function so(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const ku=io(0,.5,Vi),Vu=io(.5,.95,Z);function io(t,e,n){return s=>s<t?0:s>e?1:n(Gt(t,e,s))}function oo(t,e){t.min=e.min,t.max=e.max}function rt(t,e){oo(t.x,e.x),oo(t.y,e.y)}function ro(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function In(t){return t===void 0||t===1}function Fn({scale:t,scaleX:e,scaleY:n}){return!In(t)||!In(e)||!In(n)}function Dt(t){return Fn(t)||ao(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ao(t){return lo(t.x)||lo(t.y)}function lo(t){return t&&t!=="0%"}function Ce(t,e,n){const s=t-n,i=e*s;return n+i}function co(t,e,n,s,i){return i!==void 0&&(t=Ce(t,i,s)),Ce(t,n,s)+e}function On(t,e=0,n=1,s,i){t.min=co(t.min,e,n,s,i),t.max=co(t.max,e,n,s,i)}function uo(t,{x:e,y:n}){On(t.x,e.translate,e.scale,e.originPoint),On(t.y,n.translate,n.scale,n.originPoint)}const ho=.999999999999,fo=1.0000000000001;function Mu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Kt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,uo(t,o)),s&&Dt(r.latestValues)&&Kt(t,r.latestValues))}e.x<fo&&e.x>ho&&(e.x=1),e.y<fo&&e.y>ho&&(e.y=1)}function ke(t,e){t.min=t.min+e,t.max=t.max+e}function po(t,e,n,s,i=.5){const r=O(t.min,t.max,i);On(t,e,n,r,s)}function Kt(t,e){po(t.x,e.x,e.scaleX,e.scale,e.originX),po(t.y,e.y,e.scaleY,e.scale,e.originY)}const mo=1e-4,Du=1-mo,Ru=1+mo,go=.01,Lu=0-go,Bu=0+go;function tt(t){return t.max-t.min}function Iu(t,e,n){return Math.abs(t-e)<=n}function yo(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=tt(n)/tt(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Du&&t.scale<=Ru||isNaN(t.scale))&&(t.scale=1),(t.translate>=Lu&&t.translate<=Bu||isNaN(t.translate))&&(t.translate=0)}function ae(t,e,n,s){yo(t.x,e.x,n.x,s?s.originX:void 0),yo(t.y,e.y,n.y,s?s.originY:void 0)}function vo(t,e,n){t.min=n.min+e.min,t.max=t.min+tt(e)}function Fu(t,e,n){vo(t.x,e.x,n.x),vo(t.y,e.y,n.y)}function bo(t,e,n){t.min=e.min-n.min,t.max=t.min+tt(e)}function Ve(t,e,n){bo(t.x,e.x,n.x),bo(t.y,e.y,n.y)}function xo(t,e,n,s,i){return t-=e,t=Ce(t,1/n,s),i!==void 0&&(t=Ce(t,1/i,s)),t}function Ou(t,e=0,n=1,s=.5,i,r=t,o=t){if(lt.test(e)&&(e=parseFloat(e),e=O(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=O(r.min,r.max,s);t===r&&(a-=e),t.min=xo(t.min,e,n,a,i),t.max=xo(t.max,e,n,a,i)}function wo(t,e,[n,s,i],r,o){Ou(t,e[n],e[s],e[i],e.scale,r,o)}const ju=["x","scaleX","originX"],_u=["y","scaleY","originY"];function To(t,e,n,s){wo(t.x,e,ju,n?n.x:void 0,s?s.x:void 0),wo(t.y,e,_u,n?n.y:void 0,s?s.y:void 0)}function So(t){return t.translate===0&&t.scale===1}function Ao(t){return So(t.x)&&So(t.y)}function Po(t,e){return t.min===e.min&&t.max===e.max}function Nu(t,e){return Po(t.x,e.x)&&Po(t.y,e.y)}function Eo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Co(t,e){return Eo(t.x,e.x)&&Eo(t.y,e.y)}function ko(t){return tt(t.x)/tt(t.y)}function Vo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class zu{constructor(){this.members=[]}add(e){Ze(this.members,e),e.scheduleRender()}remove(e){if(Te(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Uu(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}function Mo(t){return[t("x"),t("y")]}const Me={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jn=["","X","Y","Z"],$u=1e3;let Gu=0;function _n(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Do(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=pi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",I,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Do(s)}function Ro({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Gu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Yu),this.nodes.forEach(Zu),this.nodes.forEach(Ju),this.nodes.forEach(Hu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Pu)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Je),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Rn(o)&&!zi(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;I.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=_r(f,250),Me.hasAnimatedSinceResize&&(Me.hasAnimatedSinceResize=!1,this.nodes.forEach(Io)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||sh,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=c.getProps(),b=!this.targetLayout||!Co(this.targetLayout,d),C=!h&&f;if(this.options.layoutRoot||this.resumeFrom||C||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T=B(x({},mn(m,"layout")),{onPlay:g,onComplete:y});(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(u,C)}else h||Io(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yt(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(Qu),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Do(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Lo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qu),this.nodes.forEach(Wu),this.nodes.forEach(Ku)):this.nodes.forEach(Bo),this.clearAllSnapshots();const a=q.now();H.delta=ut(0,1e3/60,a-H.timestamp),H.timestamp=a,H.isProcessing=!0,ze.update.process(H),ze.preRender.process(H),ze.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ws.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xu),this.sharedNodes.forEach(th)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!tt(this.snapshot.measuredBox.x)&&!tt(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=G(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ao(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Dt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),ih(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return G();const l=a.measureViewportBox();if(!(((o=this.scroll)==null?void 0:o.wasRoot)||this.path.some(oh))){const{scroll:u}=this.root;u&&(ke(l.x,u.offset.x),ke(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=G();if(rt(l,o),(a=this.scroll)!=null&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:f}=u;u!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&rt(l,o),ke(l.x,h.offset.x),ke(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=G();rt(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Kt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Dt(u.latestValues)&&Kt(l,u.latestValues)}return Dt(this.latestValues)&&Kt(l,this.latestValues),l}removeTransform(o){const a=G();rt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Dt(c.latestValues))continue;Fn(c.latestValues)&&c.updateSnapshot();const u=G(),h=c.measurePageBox();rt(u,h),To(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Dt(this.latestValues)&&To(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options=B(x(x({},this.options),o),{crossfade:o.crossfade!==void 0?o.crossfade:!0})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==H.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(a=this.parent)!=null&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!this.layout||!(h||f))return;this.resolvedRelativeTargetAt=H.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rt(this.target,this.layout.layoutBox),uo(this.target,this.targetDelta)):rt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Fn(this.parent.latestValues)||ao(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Ve(this.relativeTargetOrigin,a,l),rt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(o=this.parent)!=null&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===H.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;rt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Mu(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=G());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ro(this.prevProjectionDelta.x,this.projectionDelta.x),ro(this.prevProjectionDelta.y,this.projectionDelta.y)),ae(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Vo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Nt(),this.projectionDelta=Nt(),this.projectionDeltaWithTransform=Nt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u=x({},this.latestValues),h=Nt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=G(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,y=this.getStack(),b=!y||y.members.length<=1,C=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(nh));this.animationProgress=0;let T;this.mixTargetDelta=M=>{const S=M/1e3;Fo(h.x,o.x,S),Fo(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ve(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),eh(this.relativeTarget,this.relativeTargetOrigin,f,S),T&&Nu(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=G()),rt(T,this.relativeTarget)),g&&(this.animationValues=u,Cu(u,c,this.latestValues,S,C,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=I.update(()=>{Me.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zt(0)),this.currentAnimation=Ui(this.motionValue,[0,1e3],B(x({},o),{velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($u),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&zo(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||G();const h=tt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=tt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}rt(a,l),Kt(a,u),ae(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new zu),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&_n("z",o,c,this.animationValues);for(let u=0;u<jn.length;u++)_n(`rotate${jn[u]}`,o,c,this.animationValues),_n(`skew${jn[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){var m,g;if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Bn(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Bn(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Dt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Uu(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?o.opacity=c===this?(g=(m=u.opacity)!=null?m:this.latestValues.opacity)!=null?g:1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in Qt){if(u[y]===void 0)continue;const{correct:b,applyTo:C,isCSSVariable:T}=Qt[y],M=h==="none"?u[y]:b(u[y],c);if(C){const S=C.length;for(let v=0;v<S;v++)o[C[v]]=M}else T?this.options.visualElement.renderState.vars[y]=M:o[y]=M}this.options.layoutId&&(o.pointerEvents=c===this?Bn(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Lo),this.root.sharedNodes.clear()}}}function Wu(t){t.updateLayout()}function Ku(t){var e;const n=((e=t.resumeFrom)==null?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?Mo(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=tt(f);f.min=s[h].min,f.max=f.min+d}):zo(r,n.layoutBox,s)&&Mo(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=tt(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=Nt();ae(a,s,n.layoutBox);const l=Nt();o?ae(l,t.applyTransform(i,!0),n.measuredBox):ae(l,s,n.layoutBox);const c=!Ao(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=G();Ve(m,n.layoutBox,f.layoutBox);const g=G();Ve(g,s,d.layoutBox),Co(m,g)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Yu(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 Hu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Xu(t){t.clearSnapshot()}function Lo(t){t.clearMeasurements()}function Bo(t){t.isLayoutDirty=!1}function qu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Io(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Zu(t){t.resolveTargetDelta()}function Ju(t){t.calcProjection()}function Qu(t){t.resetSkewAndRotation()}function th(t){t.removeLeadSnapshot()}function Fo(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Oo(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function eh(t,e,n,s){Oo(t.x,e.x,n.x,s),Oo(t.y,e.y,n.y,s)}function nh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sh={duration:.45,ease:[.4,0,.1,1]},jo=t=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),_o=jo("applewebkit/")&&!jo("chrome/")?Math.round:Z;function No(t){t.min=_o(t.min),t.max=_o(t.max)}function ih(t){No(t.x),No(t.y)}function zo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Iu(ko(e),ko(n),.2)}function oh(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}function rh(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const ah=Ro({attachResizeListener:(t,e)=>rh(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Nn={current:void 0},lh=Ro({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Nn.current){const t=new ah({});t.mount(window),t.setOptions({layoutScroll:!0}),Nn.current=t}return Nn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});function Uo(t){if(t)return t.options.allowProjection!==!1?t.projection:Uo(t.parent)}const $o={borderRadius:B(x({},ct),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomLeftRadius:ct,borderBottomRightRadius:ct,boxShadow:ls};function le(t){return typeof t=="object"&&t!==null&&"nodeType"in t}class ch extends vt{constructor(e){super(e),hs($o)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new lh(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:Uo(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options,{layoutId:n,layout:s,drag:i=!1,dragConstraints:r=!1}=e;this.state.visualElement.projection.setOptions({layout:s,layoutId:n,alwaysMeasureLayout:!!n||!!i||r&&le(r),visualElement:this.state.visualElement,animationType:typeof e.layout=="string"?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var o,a;!((o=this.state.visualElement.projection)!=null&&o.isPresent)&&this.state.options.layoutId&&!this.state.isExiting&&((a=this.state.options.animatePresenceContext)==null||a.onMotionExitComplete(this.state.presenceContainer,this.state))}})}update(){this.setOptions()}mount(){var e;(e=this.state.visualElement.projection)==null||e.mount(this.state.element)}}function Go(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function zn(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function uh(t){return e=>Go(e)&&t(e,zn(e))}function ce(t,e,n,s){return Ee(t,e,uh(n),s)}function Wo(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Ko=Wo("dragHorizontal"),Yo=Wo("dragVertical");function hh(t){let e=!1;if(t==="y")e=Yo();else if(t==="x")e=Ko();else{const n=Ko(),s=Yo();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Un(t){return t.max-t.min}function dh(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?O(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?O(n,t,s.max):Math.min(t,n)),t}const $n=.35;function fh(t,{top:e,left:n,bottom:s,right:i}){return{x:Ho(t.x,n,i),y:Ho(t.y,e,s)}}function Ho(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ph(t=$n){return t===!1?t=0:t===!0&&(t=$n),{x:Xo(t,"left","right"),y:Xo(t,"top","bottom")}}function Xo(t,e,n){return{min:qo(t,e),max:qo(t,n)}}function qo(t,e){return typeof t=="number"?t:t[e]||0}function mh(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}function gh(t,e){return{x:Zo(t.x,e.x),y:Zo(t.y,e.y)}}function Zo(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function yh(t,e){let n=.5;const s=Un(t),i=Un(e);return i>s?n=Gt(e.min,e.max-s,t.min):s>i&&(n=Gt(t.min,t.max-i,e.min)),ut(0,1,n)}const Jo=(t,e)=>Math.abs(t-e);function vh(t,e){const n=Jo(t.x,e.x),s=Jo(t.y,e.y);return Math.sqrt(Jn(n,2)+Jn(s,2))}const Qo=new Set(["auto","scroll"]);class tr{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Wn(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,m=vh(f.offset,{x:0,y:0})>=3;if(!d&&!m)return;const{point:g}=f,{timestamp:y}=H;this.history.push(B(x({},g),{timestamp:y}));const{onStart:b,onMove:C}=this.handlers;d||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Gn(d,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Wn(f.type==="pointercancel"?this.lastMoveEventInfo:Gn(d,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,b),g&&g(f,b)},!Go(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const a=zn(e),l=Gn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=H;this.history=[B(x({},c),{timestamp:u})];const{onSessionStart:h}=n;h&&h(e,Wn(l,this.history)),this.removeListeners=se(ce(this.contextWindow,"pointermove",this.handlePointerMove),ce(this.contextWindow,"pointerup",this.handlePointerUp),ce(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}isScrollable(e){const n=window.getComputedStyle(e);return n.overflow==="auto"||n.overflow==="scroll"||n.overflowX==="auto"||n.overflowX==="scroll"||n.overflowY==="auto"||n.overflowY==="scroll"}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Qo.has(s.overflowX)||Qo.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),I.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){var e;this.removeListeners&&this.removeListeners(),(e=this.removeScrollListeners)==null||e.call(this),this.scrollPositions.clear(),yt(this.updatePoint)}}function Gn(t,e){return e?{point:e(t.point)}:t}function er(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Wn({point:t},e){return{point:t,delta:er(t,nr(e)),offset:er(t,bh(e)),velocity:xh(e,.1)}}function bh(t){return t[0]}function nr(t){return t[t.length-1]}function xh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=nr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ot(e)));)n--;if(!s)return{x:0,y:0};const r=Q(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const sr=()=>({min:0,max:0});function wh(){return{x:sr(),y:sr()}}function dt(t){return[t("x"),t("y")]}function Th(t){return!!(U(t)&&t.add)}function ir(t,e){const n=t.getValue("willChange");if(Th(n))return n.add(e)}function or({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Sh(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ah({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function rr(t,e){t.min=t.min+e,t.max=t.max+e}function Ph(t,e){return or(Sh(t.getBoundingClientRect(),e))}function Eh(t,e,n){const s=Ph(t,n),{scroll:i}=e;return i&&(rr(s.x,i.offset.x),rr(s.y,i.offset.y)),s}function Ch(t){var e;return(e=t.projection)==null?void 0:e.isPresent}function ar({current:t}){return t?t.ownerDocument.defaultView:null}const kh=new WeakMap;class Vh{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wh(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const s=c=>{n?this.stopAnimation():this.pauseAnimation(),n&&this.snapToCursor(zn(c,"page").point)},i=(c,u)=>{this.stopAnimation();const{drag:h,dragPropagation:f,onDragStart:d}=this.getProps();if(h&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=hh(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dt(g=>{let y=this.getAxisMotionValue(g).get()||0;if(lt.test(y)){const{projection:b}=this.visualElement;if(b&&b.layout){const C=b.layout.layoutBox[g];C&&(y=Un(C)*(parseFloat(y)/100))}}this.originPoint[g]=y}),d&&I.postRender(()=>d(c,u)),ir(this.visualElement,"transform"),this.visualElement.state.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:d,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:g}=u;if(f&&this.currentDirection===null){this.currentDirection=Mh(g),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",u.point,g),this.updateAxis("y",u.point,g),this.visualElement.render(),m&&m(c,u)},o=(c,u)=>this.stop(c,u),a=()=>dt(c=>{var u;return this.getAnimationState(c)==="paused"&&((u=this.getAxisMotionValue(c).animation)==null?void 0:u.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new tr(e,{onSessionStart:s,onStart:i,onMove:r,onSessionEnd:o,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:ar(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&I.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!De(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=dh(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)==null?void 0:e.layout,r=this.constraints;n&&le(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=fh(i.layoutBox,n):this.constraints=!1,this.elastic=ph(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&dt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=mh(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!le(e))return!1;const s=e;ve(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Eh(s,i.root,this.visualElement.getTransformPagePoint());let o=gh(i.layout.layoutBox,r);if(n){const a=n(Ah(o));this.hasMutatedConstraints=!!a,a&&(o=or(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=dt(u=>{if(!De(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m=x(x({type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10},r),h);return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return ir(this.visualElement,e),s.start(Dn(e,s,0,n,this.visualElement,!1))}stopAnimation(){Ch(this.visualElement)&&dt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){dt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps();return s[n]||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){dt(n=>{const{drag:s}=this.getProps();if(!De(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-O(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!le(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};dt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=yh({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),dt(o=>{if(!De(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(O(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;kh.set(this.visualElement,this);const e=this.visualElement.current,n=ce(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();le(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),I.read(s);const o=Ee(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(dt(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=$n,dragMomentum:a=!0}=e;return B(x({},e),{drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a})}}function De(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Mh(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Dh extends vt{constructor(e){super(e),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Vh(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}unmount(){this.removeGroupControls(),this.removeListeners()}}let ue=!1;class Rh extends vt{constructor(e){super(e),hs($o),e.getSnapshot=this.getSnapshot.bind(this),e.didUpdate=this.didUpdate.bind(this)}beforeUpdate(e){this.getSnapshot(e,void 0)}update(){this.didUpdate()}didUpdate(){var e,n;ue&&(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(ue=!1,(n=(e=this.state.visualElement.projection)==null?void 0:e.root)==null||n.didUpdate())}mount(){var e;const n=this.state.options,s=this.state.options.layoutGroup;if(n.layout||n.layoutId){const i=this.state.visualElement.projection;if(i){i.promote();const r=i.getStack();r!=null&&r.prevLead&&!r.prevLead.snapshot&&(r.prevLead.willUpdate(),ue=!0),(e=s==null?void 0:s.group)==null||e.add(i)}Me.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){this.getSnapshot(this.state.options,!1)}unmount(){const e=this.state.options.layoutGroup,n=this.state.visualElement.projection;n&&(e!=null&&e.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(n),this.state.options.layoutId&&(ue=!0),this.didUpdate())}getSnapshot(e,n){const s=this.state.visualElement.projection,{drag:i,layoutDependency:r,layout:o,layoutId:a}=e;if(!s||!o&&!a&&!i)return;ue=!0;const l=this.state.options;(i||l.layoutDependency!==r||r===void 0||xe(n)&&s.isPresent!==n)&&s.willUpdate(),xe(n)&&n!==s.isPresent&&(s.isPresent=n,n?s.promote():s.relegate())}}function lr(t){return(e,n)=>{t&&I.postRender(()=>t(e,n))}}class Lh extends vt{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(e){this.session=new tr(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:ar(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:lr((e,n)=>{const{onPanSessionStart:s}=this.state.options;s&&s(e,n)}),onStart:lr((e,n)=>{const{onPanStart:s}=this.state.options;s&&s(e,n)}),onMove:(e,n)=>{const{onPan:s}=this.state.options;s&&s(e,n)},onEnd:(e,n)=>{const{onPanEnd:s}=this.state.options;delete this.session,s&&I.postRender(()=>s(e,n))}}}mount(){this.removePointerDownListener=ce(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Bh=[au,gu,vu,wu,Su,ch,Lh,Dh,Rh],Ih={reducedMotion:"never",transition:void 0,nonce:void 0},[Fh]=te("MotionConfig");function Oh(){return Fh(P.computed(()=>Ih))}const jh="data-ap-child",[_h]=te("AnimatePresenceContext");function Re(t){if(t)return t.nodeType===3||t.nodeType===8?Re(t.nextSibling):t}const[Nh]=te("LazyMotionContext");function zh(t){var e;const n=ea(null),s=sa({}),i=Oh(),r=_h({}),o=Nh({features:P.ref([]),strict:!1});if(process.env.NODE_ENV!=="production"&&((e=t.features)!=null&&e.length)&&o.strict){const m="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?_t(!1,m):ve(!1,m)}const a=P.useAttrs();function l(){return s.id&&t.layoutId?`${s.id}-${t.layoutId}`:t.layoutId||void 0}function c(){var m,g;return B(x({},t),{lazyMotionContext:o,layoutId:l(),transition:(m=t.transition)!=null?m:i.value.transition,layoutGroup:s,motionConfig:i.value,inViewOptions:(g=t.inViewOptions)!=null?g:i.value.inViewOptions,animatePresenceContext:r,initial:r.initial===!1?r.initial:t.initial===!0?void 0:t.initial})}function u(){return x(x({},a),c())}const h=new fa(u(),n);na(h);function f(){var T,M;var m;const g=h.type==="svg",y=x({},a);Object.keys(a).forEach(S=>{U(a[S])&&(y[S]=a[S].get())});let b=x(x({},t.style),g?{}:((m=h.visualElement)==null?void 0:m.latestValues)||h.baseTarget);if(g){const{attrs:S,style:v}=Ca(x(x({},h.isMounted()?h.target:h.baseTarget),b));(v.transform||S.transformOrigin)&&(v.transformOrigin=(T=S.transformOrigin)!=null?T:"50% 50%",delete S.transformOrigin),v.transform&&(v.transformBox=(M=v.transformBox)!=null?M:"fill-box",delete S.transformBox),Object.assign(y,S),b=v}t.drag&&t.dragListener!==!1&&Object.assign(b,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`});const C=Sa(b);return C&&(y.style=C),y}const d=P.getCurrentInstance().proxy;return P.onBeforeMount(()=>{h.beforeMount()}),P.onMounted(()=>{if(h.mount(Re(d.$el),u(),$h(d)),r.register&&h.element){const m=h.element.closest(`[${jh}]`);m?(h.presenceContainer=m,r.register(m,h)):r.registerPending&&r.registerPending(h)}}),P.onBeforeUnmount(()=>h.beforeUnmount()),P.onUnmounted(()=>{r.unregisterPending&&r.unregisterPending(h);const m=Re(d.$el);m!=null&&m.isConnected||h.unmount()}),P.onBeforeUpdate(()=>{h.beforeUpdate(u())}),P.onUpdated(()=>{h.update(u())}),{getProps:c,getAttrs:f,layoutGroup:s,state:h}}const Uh={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},hover:{type:[String,Array,Object]},press:{type:[String,Array,Object]},inView:{type:[String,Array,Object]},focus:{type:[String,Array,Object]},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object],default:({hover:t})=>(process.env.NODE_ENV==="development"&&t&&_t(!0,"hover is deprecated. Use whileHover instead."),t)},whilePress:{type:[String,Array,Object],default:({press:t})=>(process.env.NODE_ENV==="development"&&t&&_t(!0,"press is deprecated. Use whilePress instead."),t)},whileInView:{type:[String,Array,Object],default:({inView:t})=>(process.env.NODE_ENV==="development"&&t&&_t(!0,"inView is deprecated. Use whileInView instead."),t)},whileFocus:{type:[String,Array,Object],default:({focus:t})=>(process.env.NODE_ENV==="development"&&t&&_t(!0,"focus is deprecated. Use whileFocus instead."),t)},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},layoutGroup:{type:Object},motionConfig:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:null,default:void 0},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};function $h(t){var e;const n=((e=Re(t.$el))==null?void 0:e.style.display)==="none";return t.$.vnode.transition&&n}const Gh=new Map,Wh=new Map;function Kh(t){if(!Array.isArray(t))return[t];const e=[];for(const n of t)Array.isArray(n)?e.push(...n):e.push(n);return e}const Yh=["area","img","input"];function Hh(t,e,n){var s,i;if(typeof t=="string"&&Yh.includes(t))return P.h(t,e);if(t==="template"){if(!n.default)return null;const r=Kh(n.default()),o=r.findIndex(u=>u.type!==P.Comment);if(o===-1)return r;const a=r[o];(s=a.props)==null||delete s.ref;const l=a.props?P.mergeProps(e,a.props):e;e.class&&((i=a.props)!=null&&i.class)&&delete a.props.class;const c=P.cloneVNode(a,l);for(const u in l)u.startsWith("on")&&(c.props||(c.props={}),c.props[u]=l[u]);return r.length===1?c:(r[o]=c,r)}return null}function cr(t,e={}){var n;const s=typeof t=="string",i=s?t:t.name||"",r=((n=e.features)==null?void 0:n.length)>0?Gh:Wh;if(s&&(r!=null&&r.has(t)))return r.get(t);const o=P.defineComponent({inheritAttrs:!1,props:B(x({},Uh),{features:{type:Object,default:()=>e.features||[]},as:{type:[String,Object],default:t||"div"}}),name:i?`motion.${i}`:"Motion",setup(a,{slots:l}){const{getProps:c,getAttrs:u,state:h}=zh(a);function f(){const d=h.element;if((!(typeof a.as=="object")||a.asChild)&&d){const{style:g}=u();if(g)for(const[y,b]of Object.entries(g))d.style[y]=b}}return()=>{const d=c(),m=u(),g=a.asChild?"template":a.as,y=B(x(x({},e.forwardMotionProps||a.forwardMotionProps?d:{}),m),{onVnodeUpdated:f}),b=Hh(g,y,l);return b!==null?b:P.h(g,x({},y),l)}}});return s&&(r==null||r.set(t,o)),o}function Xh(t=[]){return new Proxy({},{get(e,n){return n==="create"?(s,i)=>cr(s,B(x({},i),{features:t})):cr(n,{features:t})}})}const ur=Xh(Bh);ur.create("div");function hr(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=hr(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function qh(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=hr(t))&&(s&&(s+=" "),s+=e);return s}const Zh=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s<t.length;s++)n[s]=t[s];for(let s=0;s<e.length;s++)n[t.length+s]=e[s];return n},Jh=(t,e)=>({classGroupId:t,validator:e}),dr=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Le="-",fr=[],Qh="arbitrary..",td=t=>{const e=nd(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return ed(o);const a=o.split(Le),l=a[0]===""&&a.length>1?1:0;return pr(a,l,e)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=s[o],c=n[o];return l?c?Zh(c,l):l:c||fr}return n[o]||fr}}},pr=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],r=n.nextPart.get(i);if(r){const c=pr(t,e+1,r);if(c)return c}const o=n.validators;if(o===null)return;const a=e===0?t.join(Le):t.slice(e).join(Le),l=o.length;for(let c=0;c<l;c++){const u=o[c];if(u.validator(a))return u.classGroupId}},ed=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?Qh+s:void 0})(),nd=t=>{const{theme:e,classGroups:n}=t;return sd(n,e)},sd=(t,e)=>{const n=dr();for(const s in t){const i=t[s];Kn(i,n,s,e)}return n},Kn=(t,e,n,s)=>{const i=t.length;for(let r=0;r<i;r++){const o=t[r];id(o,e,n,s)}},id=(t,e,n,s)=>{if(typeof t=="string"){od(t,e,n);return}if(typeof t=="function"){rd(t,e,n,s);return}ad(t,e,n,s)},od=(t,e,n)=>{const s=t===""?e:mr(e,t);s.classGroupId=n},rd=(t,e,n,s)=>{if(ld(t)){Kn(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(Jh(n,t))},ad=(t,e,n,s)=>{const i=Object.entries(t),r=i.length;for(let o=0;o<r;o++){const[a,l]=i[o];Kn(l,mr(e,a),n,s)}},mr=(t,e)=>{let n=t;const s=e.split(Le),i=s.length;for(let r=0;r<i;r++){const o=s[r];let a=n.nextPart.get(o);a||(a=dr(),n.nextPart.set(o,a)),n=a}return n},ld=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,cd=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const i=(r,o)=>{n[r]=o,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(r){let o=n[r];if(o!==void 0)return o;if((o=s[r])!==void 0)return i(r,o),o},set(r,o){r in n?n[r]=o:i(r,o)}}},Yn="!",gr=":",ud=[],yr=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),hd=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const r=[];let o=0,a=0,l=0,c;const u=i.length;for(let g=0;g<u;g++){const y=i[g];if(o===0&&a===0){if(y===gr){r.push(i.slice(l,g)),l=g+1;continue}if(y==="/"){c=g;continue}}y==="["?o++:y==="]"?o--:y==="("?a++:y===")"&&a--}const h=r.length===0?i:i.slice(l);let f=h,d=!1;h.endsWith(Yn)?(f=h.slice(0,-1),d=!0):h.startsWith(Yn)&&(f=h.slice(1),d=!0);const m=c&&c>l?c-l:void 0;return yr(r,d,f,m)};if(e){const i=e+gr,r=s;s=o=>o.startsWith(i)?r(o.slice(i.length)):yr(ud,!1,o,void 0,!0)}if(n){const i=s;s=r=>n({className:r,parseClassName:i})}return s},dd=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let r=0;r<n.length;r++){const o=n[r],a=o[0]==="[",l=e.has(o);a||l?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(o)):i.push(o)}return i.length>0&&(i.sort(),s.push(...i)),s}},fd=t=>x({cache:cd(t.cacheSize),parseClassName:hd(t),sortModifiers:dd(t),postfixLookupClassGroupIds:pd(t)},td(t)),pd=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)e[n[s]]=!0;return e},md=/\s+/,gd=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:r,postfixLookupClassGroupIds:o}=e,a=[],l=t.trim().split(md);let c="";for(let u=l.length-1;u>=0;u-=1){const h=l[u],{isExternal:f,modifiers:d,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:y}=n(h);if(f){c=h+(c.length>0?" "+c:c);continue}let b=!!y,C;if(b){const V=g.substring(0,y);C=s(V);const p=C&&o[C]?s(g):void 0;p&&p!==C&&(C=p,b=!1)}else C=s(g);if(!C){if(!b){c=h+(c.length>0?" "+c:c);continue}if(C=s(g),!C){c=h+(c.length>0?" "+c:c);continue}b=!1}const T=d.length===0?"":d.length===1?d[0]:r(d).join(":"),M=m?T+Yn:T,S=M+C;if(a.indexOf(S)>-1)continue;a.push(S);const v=i(C,b);for(let V=0;V<v.length;++V){const p=v[V];a.push(M+p)}c=h+(c.length>0?" "+c:c)}return c},yd=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=vr(n))&&(i&&(i+=" "),i+=s);return i},vr=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=vr(t[s]))&&(n&&(n+=" "),n+=e);return n},br=(t,...e)=>{let n,s,i,r;const o=l=>{const c=e.reduce((u,h)=>h(u),t());return n=fd(c),s=n.cache.get,i=n.cache.set,r=a,a(l)},a=l=>{const c=s(l);if(c)return c;const u=gd(l,n);return i(l,u),u};return r=o,(...l)=>r(yd(...l))},vd=[],W=t=>{const e=n=>n[t]||vd;return e.isThemeGetter=!0,e},xr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,xd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Td=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ad=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,St=t=>bd.test(t),R=t=>!!t&&!Number.isNaN(Number(t)),ft=t=>!!t&&Number.isInteger(Number(t)),Hn=t=>t.endsWith("%")&&R(t.slice(0,-1)),bt=t=>xd.test(t),Tr=()=>!0,Pd=t=>wd.test(t)&&!Td.test(t),Xn=()=>!1,Ed=t=>Sd.test(t),Cd=t=>Ad.test(t),kd=t=>!A(t)&&!E(t),Vd=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Md=t=>At(t,kr,Xn),A=t=>xr.test(t),Rt=t=>At(t,Vr,Pd),Sr=t=>At(t,jd,R),Dd=t=>At(t,Dr,Tr),Rd=t=>At(t,Mr,Xn),Ar=t=>At(t,Er,Xn),Ld=t=>At(t,Cr,Cd),Be=t=>At(t,Rr,Ed),E=t=>wr.test(t),he=t=>Lt(t,Vr),Bd=t=>Lt(t,Mr),Pr=t=>Lt(t,Er),Id=t=>Lt(t,kr),Fd=t=>Lt(t,Cr),Ie=t=>Lt(t,Rr,!0),Od=t=>Lt(t,Dr,!0),At=(t,e,n)=>{const s=xr.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Lt=(t,e,n=!1)=>{const s=wr.exec(t);return s?s[1]?e(s[1]):n:!1},Er=t=>t==="position"||t==="percentage",Cr=t=>t==="image"||t==="url",kr=t=>t==="length"||t==="size"||t==="bg-size",Vr=t=>t==="length",jd=t=>t==="number",Mr=t=>t==="family-name",Dr=t=>t==="number"||t==="weight",Rr=t=>t==="shadow",Lr=()=>{const t=W("color"),e=W("font"),n=W("text"),s=W("font-weight"),i=W("tracking"),r=W("leading"),o=W("breakpoint"),a=W("container"),l=W("spacing"),c=W("radius"),u=W("shadow"),h=W("inset-shadow"),f=W("text-shadow"),d=W("drop-shadow"),m=W("blur"),g=W("perspective"),y=W("aspect"),b=W("ease"),C=W("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...M(),E,A],v=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],p=()=>[E,A,l],D=()=>[St,"full","auto",...p()],L=()=>[ft,"none","subgrid",E,A],N=()=>["auto",{span:["full",ft,E,A]},ft,E,A],at=()=>[ft,"auto",E,A],X=()=>["auto","min","max","fr",E,A],Bt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],et=()=>["start","end","center","stretch","center-safe","end-safe"],nt=()=>["auto",...p()],Pt=()=>[St,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],de=()=>[St,"screen","full","dvw","lvw","svw","min","max","fit",...p()],st=()=>[St,"screen","full","lh","dvh","lvh","svh","min","max","fit",...p()],k=()=>[t,E,A],fe=()=>[...M(),Pr,Ar,{position:[E,A]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],me=()=>["auto","cover","contain",Id,Md,{size:[E,A]}],Ht=()=>[Hn,he,Rt],K=()=>["","none","full",c,E,A],Y=()=>["",R,he,Rt],It=()=>["solid","dashed","dotted","double"],Et=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[R,Hn,Pr,Ar],Ft=()=>["","none",m,E,A],pt=()=>["none",R,E,A],mt=()=>["none",R,E,A],Zn=()=>[R,E,A],_e=()=>[St,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bt],breakpoint:[bt],color:[Tr],container:[bt],"drop-shadow":[bt],ease:["in","out","in-out"],font:[kd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bt],shadow:[bt],spacing:["px",R],text:[bt],"text-shadow":[bt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",St,A,E,y]}],container:["container"],"container-type":[{"@container":["","normal","size",E,A]}],"container-named":[Vd],columns:[{columns:[R,A,E,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[ft,"auto",E,A]}],basis:[{basis:[St,"full","auto",a,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[R,St,"auto","initial","none",A]}],grow:[{grow:["",R,E,A]}],shrink:[{shrink:["",R,E,A]}],order:[{order:[ft,"first","last","none",E,A]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":at()}],"col-end":[{"col-end":at()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":at()}],"row-end":[{"row-end":at()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...Bt(),"normal"]}],"justify-items":[{"justify-items":[...et(),"normal"]}],"justify-self":[{"justify-self":["auto",...et()]}],"align-content":[{content:["normal",...Bt()]}],"align-items":[{items:[...et(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...et(),{baseline:["","last"]}]}],"place-content":[{"place-content":Bt()}],"place-items":[{"place-items":[...et(),"baseline"]}],"place-self":[{"place-self":["auto",...et()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pbs:[{pbs:p()}],pbe:[{pbe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:nt()}],mx:[{mx:nt()}],my:[{my:nt()}],ms:[{ms:nt()}],me:[{me:nt()}],mbs:[{mbs:nt()}],mbe:[{mbe:nt()}],mt:[{mt:nt()}],mr:[{mr:nt()}],mb:[{mb:nt()}],ml:[{ml:nt()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:Pt()}],"inline-size":[{inline:["auto",...de()]}],"min-inline-size":[{"min-inline":["auto",...de()]}],"max-inline-size":[{"max-inline":["none",...de()]}],"block-size":[{block:["auto",...st()]}],"min-block-size":[{"min-block":["auto",...st()]}],"max-block-size":[{"max-block":["none",...st()]}],w:[{w:[a,"screen",...Pt()]}],"min-w":[{"min-w":[a,"screen","none",...Pt()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...Pt()]}],h:[{h:["screen","lh",...Pt()]}],"min-h":[{"min-h":["screen","lh","none",...Pt()]}],"max-h":[{"max-h":["screen","lh",...Pt()]}],"font-size":[{text:["base",n,he,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Od,Dd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hn,A]}],"font-family":[{font:[Bd,Rd,e]}],"font-features":[{"font-features":[A]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,E,A]}],"line-clamp":[{"line-clamp":[R,"none",E,Sr]}],leading:[{leading:[r,...p()]}],"list-image":[{"list-image":["none",E,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",E,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...It(),"wavy"]}],"text-decoration-thickness":[{decoration:[R,"from-font","auto",E,Rt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[R,"auto",E,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"tab-size":[{tab:[ft,E,A]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",E,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ft,E,A],radial:["",E,A],conic:[ft,E,A]},Fd,Ld]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:Ht()}],"gradient-via-pos":[{via:Ht()}],"gradient-to-pos":[{to:Ht()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-bs":[{"border-bs":Y()}],"border-w-be":[{"border-be":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...It(),"hidden","none"]}],"divide-style":[{divide:[...It(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...It(),"none","hidden"]}],"outline-offset":[{"outline-offset":[R,E,A]}],"outline-w":[{outline:["",R,he,Rt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,Ie,Be]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",h,Ie,Be]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[R,Rt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,Ie,Be]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[R,E,A]}],"mix-blend":[{"mix-blend":[...Et(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Et()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[R]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[E,A]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[R]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",E,A]}],filter:[{filter:["","none",E,A]}],blur:[{blur:Ft()}],brightness:[{brightness:[R,E,A]}],contrast:[{contrast:[R,E,A]}],"drop-shadow":[{"drop-shadow":["","none",d,Ie,Be]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",R,E,A]}],"hue-rotate":[{"hue-rotate":[R,E,A]}],invert:[{invert:["",R,E,A]}],saturate:[{saturate:[R,E,A]}],sepia:[{sepia:["",R,E,A]}],"backdrop-filter":[{"backdrop-filter":["","none",E,A]}],"backdrop-blur":[{"backdrop-blur":Ft()}],"backdrop-brightness":[{"backdrop-brightness":[R,E,A]}],"backdrop-contrast":[{"backdrop-contrast":[R,E,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",R,E,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R,E,A]}],"backdrop-invert":[{"backdrop-invert":["",R,E,A]}],"backdrop-opacity":[{"backdrop-opacity":[R,E,A]}],"backdrop-saturate":[{"backdrop-saturate":[R,E,A]}],"backdrop-sepia":[{"backdrop-sepia":["",R,E,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",E,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[R,"initial",E,A]}],ease:[{ease:["linear","initial",b,E,A]}],delay:[{delay:[R,E,A]}],animate:[{animate:["none",C,E,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,E,A]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:pt()}],"rotate-x":[{"rotate-x":pt()}],"rotate-y":[{"rotate-y":pt()}],"rotate-z":[{"rotate-z":pt()}],scale:[{scale:mt()}],"scale-x":[{"scale-x":mt()}],"scale-y":[{"scale-y":mt()}],"scale-z":[{"scale-z":mt()}],"scale-3d":["scale-3d"],skew:[{skew:Zn()}],"skew-x":[{"skew-x":Zn()}],"skew-y":[{"skew-y":Zn()}],transform:[{transform:[E,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],zoom:[{zoom:[ft,E,A]}],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",E,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mbs":[{"scroll-mbs":p()}],"scroll-mbe":[{"scroll-mbe":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pbs":[{"scroll-pbs":p()}],"scroll-pbe":[{"scroll-pbe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",E,A]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[R,he,Rt,Sr]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_d=(t,{cacheSize:e,prefix:n,experimentalParseClassName:s,extend:i={},override:r={}})=>(Yt(t,"cacheSize",e),Yt(t,"prefix",n),Yt(t,"experimentalParseClassName",s),Fe(t.theme,r.theme),Fe(t.classGroups,r.classGroups),Fe(t.conflictingClassGroups,r.conflictingClassGroups),Fe(t.conflictingClassGroupModifiers,r.conflictingClassGroupModifiers),Yt(t,"postfixLookupClassGroups",r.postfixLookupClassGroups),Yt(t,"orderSensitiveModifiers",r.orderSensitiveModifiers),Oe(t.theme,i.theme),Oe(t.classGroups,i.classGroups),Oe(t.conflictingClassGroups,i.conflictingClassGroups),Oe(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),qn(t,i,"postfixLookupClassGroups"),qn(t,i,"orderSensitiveModifiers"),t),Yt=(t,e,n)=>{n!==void 0&&(t[e]=n)},Fe=(t,e)=>{if(e)for(const n in e)Yt(t,n,e[n])},Oe=(t,e)=>{if(e)for(const n in e)qn(t,e,n)},qn=(t,e,n)=>{const s=e[n];s!==void 0&&(t[n]=t[n]?t[n].concat(s):s)},Nd=((t,...e)=>typeof t=="function"?br(Lr,t,...e):br(()=>_d(Lr(),t),...e))({extend:{theme:{color:["accent","on-accent","accent-hover","accent-subtle","accent-subtle-hover","accent-strong","accent-strong-hover","fg","fg-accent","surface","surface-muted","edge","danger","danger-hover"],radius:["btn"]}}});function je(...t){return Nd(qh(t))}const zd=["aria-label","aria-disabled"],Ud=["aria-checked","aria-label","tabindex","disabled","onClick","onKeydown"],$d=P.defineComponent({__name:"index",props:{items:{},modelValue:{},size:{default:"m"},fullWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},ui:{default:()=>({})},ariaLabel:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n={root:"relative isolate inline-grid grid-rows-1 items-stretch gap-1 overflow-hidden rounded-full border border-edge bg-surface font-sans",segment:["group relative z-[1] row-start-1 flex min-w-0 items-center justify-center rounded-full px-4 font-sans","disabled:cursor-not-allowed disabled:opacity-50","hover:aria-[checked=false]:not-disabled:bg-[color-mix(in_srgb,var(--color-text-primary)_5%,transparent)]","focus-visible:outline focus-visible:outline-[length:var(--border-m)] focus-visible:outline-[color:var(--color-text-accent)] focus-visible:outline-offset-[length:var(--border-m)]"].join(" "),segmentSelected:"",label:["relative text-sm leading-[1.3] whitespace-nowrap font-normal","text-[color:var(--color-text-tertiary)]","group-aria-[checked=true]:text-[color:var(--color-text-primary-inverse)] group-aria-[checked=true]:font-semibold"].join(" "),labelSelected:"",indicator:["z-0 row-start-1 self-stretch rounded-full","bg-[color:var(--color-blue-grey-600)]","motion-reduce:!transition-none"].join(" ")},s={size:{s:{root:"h-8 p-1"},m:{root:"h-12 p-2"}},fullWidth:{true:{root:"w-full"}}},i=t,r=e,o=P.ref([]),a=(v,V)=>{o.value[V]=v},l=v=>i.modelValue===v.value,c=v=>i.disabled||!!v.disabled,u=v=>{c(v)||l(v)||r("update:modelValue",v.value)},h=()=>{const v=i.items.findIndex(V=>V.value===i.modelValue);return v>=0&&!c(i.items[v])?v:i.items.findIndex(V=>!c(V))},f=v=>{const V=h();return V<0?-1:v===V?0:-1},d=(v,V)=>{const p=i.items;let D=v;for(let L=0;L<p.length;L++)if(D=(D+V+p.length)%p.length,!c(p[D]))return D;return v},m=(v,V)=>{var at;const p=i.items,D=p[V];if(!D||c(D))return;let L=null;switch(v.key){case"ArrowRight":case"ArrowDown":L=d(V,1);break;case"ArrowLeft":case"ArrowUp":L=d(V,-1);break;case"Home":L=p.findIndex(X=>!c(X));break;case"End":L=[...p].reverse().findIndex(X=>!c(X)),L>=0&&(L=p.length-1-L);break;default:return}if(L===null||L<0||L===V)return;v.preventDefault();const N=p[L];N&&(u(N),(at=o.value[L])==null||at.focus())},g=P.computed(()=>{const v=i.items.findIndex(V=>V.value===i.modelValue);return v>=0?v:0}),y=P.computed(()=>{const v=i.items.length;if(v!==0)return i.fullWidth?`repeat(${v}, minmax(0, 1fr))`:`repeat(${v}, auto)`}),b=P.computed(()=>je(n.root,s.size[i.size].root,i.fullWidth&&s.fullWidth.true.root,i.ui.root)),C=v=>je(n.segment,i.ui.segment,l(v)&&n.segmentSelected,l(v)&&i.ui.segmentSelected),T=v=>je(n.label,i.ui.label,l(v)&&n.labelSelected,l(v)&&i.ui.labelSelected),M=P.computed(()=>je(n.indicator,i.ui.indicator)),S={type:"spring",visualDuration:.2,bounce:.2};return(v,V)=>(P.openBlock(),P.createElementBlock("div",{"data-testid":"segmented-control",role:"radiogroup",class:P.normalizeClass(b.value),style:P.normalizeStyle(y.value?{gridTemplateColumns:y.value}:void 0),"aria-label":t.ariaLabel,"aria-disabled":t.disabled||void 0},[t.items.length>0?(P.openBlock(),P.createBlock(P.unref(ur).div,{key:0,layout:"","data-testid":"segmented-control-indicator","data-state":t.modelValue,class:P.normalizeClass(M.value),style:P.normalizeStyle({gridColumn:g.value+1}),transition:S,"aria-hidden":"true"},null,8,["data-state","class","style"])):P.createCommentVNode("",!0),(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(t.items,(p,D)=>(P.openBlock(),P.createElementBlock("button",{key:p.value,ref_for:!0,ref:L=>a(L,D),type:"button",role:"radio","data-testid":"segmented-control-segment",class:P.normalizeClass(C(p)),style:P.normalizeStyle({gridColumn:D+1}),"aria-checked":l(p),"aria-label":p.label,tabindex:f(D),disabled:c(p),onClick:L=>u(p),onKeydown:L=>m(L,D)},[P.createElementVNode("span",{"data-testid":"segmented-control-label",class:P.normalizeClass(T(p))},P.toDisplayString(p.label),3)],46,Ud))),128))],14,zd))}});F.AzSegmentedControl=$d,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
|