@dynamo-caffeina-dev/locator-frontend 0.7.1 → 0.7.3

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/dist/index.umd.js CHANGED
@@ -106,7 +106,7 @@
106
106
  *
107
107
  * This source code is licensed under the ISC license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
- */const bo=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Co=g.createContext({});function lc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vn=typeof window<"u",cc=Vn?g.useLayoutEffect:g.useEffect,Bn=g.createContext(null),So=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uc(e=!0){const t=g.useContext(Bn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=g.useId();g.useEffect(()=>{if(e)return o(s)},[e]);const i=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}function Fn(e,t){e.indexOf(t)===-1&&e.push(t)}function $n(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ae=e=>e;let lt=ae,Pe=ae;process.env.NODE_ENV!=="production"&&(lt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Pe=(e,t)=>{if(!e)throw new Error(t)});const dc={useManualTiming:!1};function jn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ct=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class zn{constructor(){this.subscriptions=[]}add(t){return Fn(this.subscriptions,t),()=>$n(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const he=e=>e*1e3,Ce=e=>e/1e3;function wo(e,t){return t?e*(1e3/t):0}const _o=new Set;function rn(e,t,n){e||_o.has(t)||(console.warn(t),_o.add(t))}const fc=jn(()=>window.ScrollTimeline!==void 0);class hc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(fc()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class pc extends hc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Un(e,t){return e?e[t]||e.default||e:void 0}const Rn=2e4;function xo(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Rn;)t+=n,r=e.next(t);return t>=Rn?1/0:t}function Xn(e){return typeof e=="function"}function Eo(e,t){e.timeline=t,e.onfinish=null}const qn=e=>Array.isArray(e)&&typeof e[0]=="number",mc={linearEasing:void 0};function gc(e,t){const n=jn(e);return()=>{var r;return(r=mc[t])!==null&&r!==void 0?r:n()}}const on=gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),To=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(ct(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ao(e){return!!(typeof e=="function"&&on()||!e||typeof e=="string"&&(e in Gn||on())||qn(e)||Array.isArray(e)&&e.every(Ao))}const Et=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Gn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function Mo(e,t){if(e)return typeof e=="function"&&on()?To(e,t):qn(e)?Et(e):Array.isArray(e)?e.map(n=>Mo(n,t)||Gn.easeOut):Gn[e]}const sn=["read","resolveKeyframes","update","preRender","render","postRender"],Po={value:null};function yc(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Po.value&&Po.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const vc=40;function Lo(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=sn.reduce((b,C)=>(b[C]=yc(s,t?C:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,vc),1),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:sn.reduce((b,C)=>{const S=i[C];return b[C]=(_,w=!1,x=!1)=>(n||p(),S.schedule(_,w,x)),b},{}),cancel:b=>{for(let C=0;C<sn.length;C++)i[sn[C]].cancel(b)},state:o,steps:i}}const{schedule:F,cancel:Le,state:Y,steps:Wn}=Lo(typeof requestAnimationFrame<"u"?requestAnimationFrame:ae,!0),{schedule:Kn}=Lo(queueMicrotask,!1);let an;function bc(){an=void 0}const pe={now:()=>(an===void 0&&pe.set(Y.isProcessing||dc.useManualTiming?Y.timestamp:performance.now()),an),set:e=>{an=e,queueMicrotask(bc)}},de={x:!1,y:!1};function Oo(){return de.x||de.y}function Cc(e){return e==="x"||e==="y"?de[e]?null:(de[e]=!0,()=>{de[e]=!1}):de.x||de.y?null:(de.x=de.y=!0,()=>{de.x=de.y=!1})}function Sc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=(r=void 0)!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function ko(e,t){const n=Sc(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function No(e){return!(e.pointerType==="touch"||Oo())}function wc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{if(!No(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{No(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Do(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Io=(e,t)=>t?e===t?!0:Io(e,t.parentElement):!1,Hn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_c=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xc(e){return _c.has(e.tagName)||e.tabIndex!==-1}const Tt=new WeakSet;function Vo(e){return t=>{t.key==="Enter"&&e(t)}}function Zn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ec=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vo(()=>{if(Tt.has(n))return;Zn(n,"down");const o=Vo(()=>{Zn(n,"up")}),s=()=>Zn(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Bo(e){return Hn(e)&&!Oo()}function Tc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{const l=a.currentTarget;if(!l||!Bo(a)||Tt.has(l))return;Tt.add(l),Do(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Do(h,"release"),!(!Bo(h)||!Tt.has(l))&&(Tt.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?Ac(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||Io(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!xc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>Ec(c,o),o)}),s}function Ac(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Fo=30,Mc=e=>!isNaN(parseFloat(e));class Pc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=pe.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=pe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Mc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new zn);const r=this.events[t].add(n);return t==="change"?()=>{r(),F.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=pe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fo);return wo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function At(e,t){return new Pc(e,t)}const $o=g.createContext({strict:!1}),jo={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"]},ut={};for(const e in jo)ut[e]={isEnabled:t=>jo[e].some(n=>!!t[n])};function Lc(e){for(const t in e)ut[t]={...ut[t],...e[t]}}const Oc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ln(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Oc.has(e)}let zo=e=>!ln(e);function kc(e){e&&(zo=t=>t.startsWith("on")?!ln(t):e(t))}try{kc(require("@emotion/is-prop-valid").default)}catch{}function Nc(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(zo(o)||n===!0&&ln(o)||!t&&!ln(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Dc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const cn=g.createContext({});function un(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Mt(e){return typeof e=="string"||Array.isArray(e)}const Yn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Jn=["initial",...Yn];function dn(e){return un(e.animate)||Jn.some(t=>Mt(e[t]))}function Uo(e){return!!(dn(e)||e.variants)}function Ic(e,t){if(dn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Mt(n)?n:void 0,animate:Mt(r)?r:void 0}}return e.inherit!==!1?t:{}}function Vc(e){const{initial:t,animate:n}=Ic(e,g.useContext(cn));return g.useMemo(()=>({initial:t,animate:n}),[Ro(t),Ro(n)])}function Ro(e){return Array.isArray(e)?e.join(" "):e}const Bc=Symbol.for("motionComponentSymbol");function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Fc(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):dt(n)&&(n.current=r))},[t])}const Qn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xo="data-"+Qn("framerAppearId"),qo=g.createContext({});function $c(e,t,n,r,o){var s,i;const{visualElement:a}=g.useContext(cn),l=g.useContext($o),c=g.useContext(Bn),u=g.useContext(So).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=g.useContext(qo);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&jc(d.current,n,o,h);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[Xo],v=g.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return cc(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Kn.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),v.current=!1))}),f}function jc(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Go(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&dt(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Go(e){if(e)return e.options.allowProjection!==!1?e.projection:Go(e.parent)}function zc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&Lc(e);function a(c,u){let d;const f={...g.useContext(So),...c,layoutId:Uc(c)},{isStatic:h}=f,p=Vc(c),m=r(c,h);if(!h&&Vn){Rc(f,e);const v=Xc(f);d=v.MeasureLayout,p.visualElement=$c(o,m,f,t,v.ProjectionNode)}return y.jsxs(cn.Provider,{value:p,children:[d&&p.visualElement?y.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,Fc(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=g.forwardRef(a);return l[Bc]=o,l}function Uc({layoutId:e}){const t=g.useContext(Co).id;return t&&e!==void 0?t+"-"+e:e}function Rc(e,t){const n=g.useContext($o).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?lt(!1,r):Pe(!1,r)}}function Xc(e){const{drag:t,layout:n}=ut;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Wo=e=>t=>typeof t=="string"&&t.startsWith(e),er=Wo("--"),qc=Wo("var(--"),tr=e=>qc(e)?Gc.test(e.split("/*")[0].trim()):!1,Gc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Pt={};function Wc(e){for(const t in e)Pt[t]=e[t],er(t)&&(Pt[t].isCSSVariable=!0)}const ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ge=new Set(ft);function Ko(e,{layout:t,layoutId:n}){return Ge.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pt[e]||e==="opacity")}const te=e=>!!(e&&e.getVelocity),Ho=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Se=(e,t,n)=>n>t?t:n<e?e:n,ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Lt={...ht,transform:e=>Se(0,1,e)},fn={...ht,default:1},Ot=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Oe=Ot("deg"),me=Ot("%"),N=Ot("px"),Kc=Ot("vh"),Hc=Ot("vw"),Zo={...me,parse:e=>me.parse(e)/100,transform:e=>me.transform(e*100)},Zc={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,radius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,backgroundPositionX:N,backgroundPositionY:N},Yc={rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scale:fn,scaleX:fn,scaleY:fn,scaleZ:fn,skew:Oe,skewX:Oe,skewY:Oe,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:Lt,originX:Zo,originY:Zo,originZ:N},Yo={...ht,transform:Math.round},nr={...Zc,...Yc,zIndex:Yo,size:N,fillOpacity:Lt,strokeOpacity:Lt,numOctaves:Yo},Jc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qc=ft.length;function eu(e,t,n){let r="",o=!0;for(let s=0;s<Qc;s++){const i=ft[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Ho(a,nr[i]);if(!l){o=!1;const u=Jc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function rr(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ge.has(l)){i=!0;continue}else if(er(l)){o[l]=c;continue}else{const u=Ho(c,nr[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=eu(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const or=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Jo(e,t,n){for(const r in t)!te(t[r])&&!Ko(r,n)&&(e[r]=t[r])}function tu({transformTemplate:e},t){return g.useMemo(()=>{const n=or();return rr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function nu(e,t){const n=e.style||{},r={};return Jo(r,n,e),Object.assign(r,tu(e,t)),r}function ru(e,t){const n={},r=nu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ou=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sr(e){return typeof e!="string"||e.includes("-")?!1:!!(ou.indexOf(e)>-1||/[A-Z]/u.test(e))}const su={offset:"stroke-dashoffset",array:"stroke-dasharray"},iu={offset:"strokeDashoffset",array:"strokeDasharray"};function au(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?su:iu;e[s.offset]=N.transform(-r);const i=N.transform(t),a=N.transform(n);e[s.array]=`${i} ${a}`}function Qo(e,t,n){return typeof e=="string"?e:N.transform(t+n*e)}function lu(e,t,n){const r=Qo(t,e.x,e.width),o=Qo(n,e.y,e.height);return`${r} ${o}`}function ir(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(rr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=lu(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&au(f,i,a,l,!1)}const es=()=>({...or(),attrs:{}}),ar=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cu(e,t,n,r){const o=g.useMemo(()=>{const s=es();return ir(s,t,ar(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Jo(s,e.style,e),o.style={...s,...o.style}}return o}function uu(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(sr(n)?cu:ru)(r,s,i,n),c=Nc(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=g.useMemo(()=>te(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function ts(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function lr(e,t,n,r){if(typeof t=="function"){const[o,s]=ts(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ts(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const cr=e=>Array.isArray(e),du=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fu=e=>cr(e)?e[e.length-1]||0:e;function hn(e){const t=te(e)?e.get():e;return du(t)?t.toValue():t}function hu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:pu(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const ns=e=>(t,n)=>{const r=g.useContext(cn),o=g.useContext(Bn),s=()=>hu(e,t,r,o);return n?s():lc(s)};function pu(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=hn(s[f]);let{initial:i,animate:a}=e;const l=dn(e),c=Uo(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!un(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=lr(e,f[h]);if(p){const{transitionEnd:m,transition:v,...b}=p;for(const C in b){let S=b[C];if(Array.isArray(S)){const _=u?S.length-1:0;S=S[_]}S!==null&&(o[C]=S)}for(const C in m)o[C]=m[C]}}}return o}function ur(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(te(o[i])||t.style&&te(t.style[i])||Ko(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const mu={useVisualState:ns({scrapeMotionValuesFromProps:ur,createRenderState:or})};function rs(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function os(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ss=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function is(e,t,n,r){os(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ss.has(o)?o:Qn(o),t.attrs[o])}function as(e,t,n){const r=ur(e,t,n);for(const o in e)if(te(e[o])||te(t[o])){const s=ft.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const ls=["x","y","width","height","cx","cy","r"],gu={useVisualState:ns({scrapeMotionValuesFromProps:as,createRenderState:es,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Ge.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<ls.length;a++){const l=ls[a];e[l]!==t[l]&&(i=!0)}i&&F.read(()=>{rs(n,r),F.render(()=>{ir(r,o,ar(n.tagName),e.transformTemplate),is(n,r)})})}})};function yu(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...sr(r)?gu:mu,preloadedFeatures:e,useRender:uu(o),createVisualElement:t,Component:r};return zc(i)}}function kt(e,t,n){const r=e.getProps();return lr(r,t,n!==void 0?n:r.custom,e)}const cs=new Set(["width","height","top","left","right","bottom",...ft]);function vu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,At(n))}function bu(e,t){const n=kt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=fu(s[i]);vu(e,i,a)}}function Cu(e){return!!(te(e)&&e.add)}function dr(e,t){const n=e.getValue("willChange");if(Cu(n))return n.add(t)}function us(e){return e.props[Xo]}const ds=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Su=1e-7,wu=12;function _u(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=ds(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>Su&&++a<wu);return i}function Nt(e,t,n,r){if(e===t&&n===r)return ae;const o=s=>_u(s,0,1,e,n);return s=>s===0||s===1?s:ds(o(s),t,r)}const fs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hs=e=>t=>1-e(1-t),ps=Nt(.33,1.53,.69,.99),fr=hs(ps),ms=fs(fr),gs=e=>(e*=2)<1?.5*fr(e):.5*(2-Math.pow(2,-10*(e-1))),hr=e=>1-Math.sin(Math.acos(e)),ys=hs(hr),vs=fs(hr),bs=e=>/^0[^.\s]+$/u.test(e);function xu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bs(e):!0}const Dt=e=>Math.round(e*1e5)/1e5,pr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Eu(e){return e==null}const Tu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mr=(e,t)=>n=>!!(typeof n=="string"&&Tu.test(n)&&n.startsWith(e)||t&&!Eu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cs=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(pr);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Au=e=>Se(0,255,e),gr={...ht,transform:e=>Math.round(Au(e))},We={test:mr("rgb","red"),parse:Cs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+gr.transform(e)+", "+gr.transform(t)+", "+gr.transform(n)+", "+Dt(Lt.transform(r))+")"};function Mu(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const yr={test:mr("#"),parse:Mu,transform:We.transform},pt={test:mr("hsl","hue"),parse:Cs("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+me.transform(Dt(t))+", "+me.transform(Dt(n))+", "+Dt(Lt.transform(r))+")"},ne={test:e=>We.test(e)||yr.test(e)||pt.test(e),parse:e=>We.test(e)?We.parse(e):pt.test(e)?pt.parse(e):yr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?We.transform(e):pt.transform(e)},Pu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Lu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Pu))===null||n===void 0?void 0:n.length)||0)>0}const Ss="number",ws="color",Ou="var",ku="var(",_s="${}",Nu=/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 It(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(Nu,l=>(ne.test(l)?(r.color.push(s),o.push(ws),n.push(ne.parse(l))):l.startsWith(ku)?(r.var.push(s),o.push(Ou),n.push(l)):(r.number.push(s),o.push(Ss),n.push(parseFloat(l))),++s,_s)).split(_s);return{values:n,split:a,indexes:r,types:o}}function xs(e){return It(e).values}function Es(e){const{split:t,types:n}=It(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Ss?s+=Dt(o[i]):a===ws?s+=ne.transform(o[i]):s+=o[i]}return s}}const Du=e=>typeof e=="number"?0:e;function Iu(e){const t=xs(e);return Es(e)(t.map(Du))}const ke={test:Lu,parse:xs,createTransformer:Es,getAnimatableNone:Iu},Vu=new Set(["brightness","contrast","saturate","opacity"]);function Bu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(pr)||[];if(!r)return e;const o=n.replace(r,"");let s=Vu.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const Fu=/\b([a-z-]*)\(.*?\)/gu,vr={...ke,getAnimatableNone:e=>{const t=e.match(Fu);return t?t.map(Bu).join(" "):e}},$u={...nr,color:ne,backgroundColor:ne,outlineColor:ne,fill:ne,stroke:ne,borderColor:ne,borderTopColor:ne,borderRightColor:ne,borderBottomColor:ne,borderLeftColor:ne,filter:vr,WebkitFilter:vr},Ts=e=>$u[e];function As(e,t){let n=Ts(e);return n!==vr&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ju=new Set(["auto","none","0"]);function zu(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!ju.has(s)&&It(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=As(n,o)}const Ke=e=>e*180/Math.PI,br=e=>{const t=Ke(Math.atan2(e[1],e[0]));return Cr(t)},Uu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:br,rotateZ:br,skewX:e=>Ke(Math.atan(e[1])),skewY:e=>Ke(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cr=e=>(e=e%360,e<0&&(e+=360),e),Ms=br,Ps=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ls=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ru={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ps,scaleY:Ls,scale:e=>(Ps(e)+Ls(e))/2,rotateX:e=>Cr(Ke(Math.atan2(e[6],e[5]))),rotateY:e=>Cr(Ke(Math.atan2(-e[2],e[0]))),rotateZ:Ms,rotate:Ms,skewX:e=>Ke(Math.atan(e[4])),skewY:e=>Ke(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Os(e){return e.includes("scale")?1:0}function Sr(e,t){if(!e||e==="none")return Os(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Ru,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Uu,o=a}if(!o)return Os(t);const s=r[t],i=o[1].split(",").map(qu);return typeof s=="function"?s(i):i[s]}const Xu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Sr(n,t)};function qu(e){return parseFloat(e.trim())}const ks=e=>e===ht||e===N,Gu=new Set(["x","y","z"]),Wu=ft.filter(e=>!Gu.has(e));function Ku(e){const t=[];return Wu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Sr(t,"x"),y:(e,{transform:t})=>Sr(t,"y")};mt.translateX=mt.x,mt.translateY=mt.y;const He=new Set;let wr=!1,_r=!1;function Ns(){if(_r){const e=Array.from(He).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Ku(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_r=!1,wr=!1,He.forEach(e=>e.complete()),He.clear()}function Ds(){He.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_r=!0)})}function Hu(){Ds(),Ns()}class xr{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(He.add(this),wr||(wr=!0,F.read(Ds),F.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),He.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,He.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Is=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Zu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Yu(e){const t=Zu.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Ju=4;function Vs(e,t,n=1){Pe(n<=Ju,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Yu(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Is(i)?parseFloat(i):i}return tr(o)?Vs(o,t,n+1):o}const Bs=e=>t=>t.test(e),Fs=[ht,N,me,Oe,Hc,Kc,{test:e=>e==="auto",parse:e=>e}],$s=e=>Fs.find(Bs(e));class js extends xr{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),tr(c))){const u=Vs(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!cs.has(r)||t.length!==2)return;const[o,s]=t,i=$s(o),a=$s(s);if(i!==a)if(ks(i)&&ks(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)xu(t[o])&&r.push(o);r.length&&zu(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const zs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function Qu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ed(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=zs(o,t),a=zs(s,t);return lt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:Qu(e)||(n==="spring"||Xn(n))&&r}const td=e=>e!==null;function pn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(td),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const nd=40;class Us{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=pe.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>nd?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Hu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=pe.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!ed(t,r,o,s))if(i)this.options.duration=0;else{l&&l(pn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const z=(e,t,n)=>e+(t-e)*n;function Er(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rd({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Er(l,a,e+1/3),s=Er(l,a,e),i=Er(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function mn(e,t){return n=>n>0?t:e}const Tr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},od=[yr,We,pt],sd=e=>od.find(t=>t.test(e));function Rs(e){const t=sd(e);if(lt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===pt&&(n=rd(n)),n}const Xs=(e,t)=>{const n=Rs(e),r=Rs(t);if(!n||!r)return mn(e,t);const o={...n};return s=>(o.red=Tr(n.red,r.red,s),o.green=Tr(n.green,r.green,s),o.blue=Tr(n.blue,r.blue,s),o.alpha=z(n.alpha,r.alpha,s),We.transform(o))},id=(e,t)=>n=>t(e(n)),Vt=(...e)=>e.reduce(id),Ar=new Set(["none","hidden"]);function ad(e,t){return Ar.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ld(e,t){return n=>z(e,t,n)}function Mr(e){return typeof e=="number"?ld:typeof e=="string"?tr(e)?mn:ne.test(e)?Xs:dd:Array.isArray(e)?qs:typeof e=="object"?ne.test(e)?Xs:cd:mn}function qs(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Mr(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function cd(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Mr(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function ud(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const dd=(e,t)=>{const n=ke.createTransformer(t),r=It(e),o=It(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ar.has(e)&&!o.values.length||Ar.has(t)&&!r.values.length?ad(e,t):Vt(qs(ud(r,o),o.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),mn(e,t))};function Gs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?z(e,t,n):Mr(e)(e,t)}const fd=5;function Ws(e,t,n){const r=Math.max(t-fd,0);return wo(n-e(r),t-r)}const U={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},Ks=.001;function hd({duration:e=U.duration,bounce:t=U.bounce,velocity:n=U.velocity,mass:r=U.mass}){let o,s;lt(e<=he(U.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Se(U.minDamping,U.maxDamping,i),e=Se(U.minDuration,U.maxDuration,Ce(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Pr(c,i),p=Math.exp(-d);return Ks-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Pr(Math.pow(c,2),i);return(-o(c)+Ks>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=md(o,s,a);if(e=he(e),isNaN(l))return{stiffness:U.stiffness,damping:U.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const pd=12;function md(e,t,n){let r=n;for(let o=1;o<pd;o++)r=r-e(r)/t(r);return r}function Pr(e,t){return e*Math.sqrt(1-t*t)}const gd=["duration","bounce"],yd=["stiffness","damping","mass"];function Hs(e,t){return t.some(n=>e[n]!==void 0)}function vd(e){let t={velocity:U.velocity,stiffness:U.stiffness,damping:U.damping,mass:U.mass,isResolvedFromDuration:!1,...e};if(!Hs(e,yd)&&Hs(e,gd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Se(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:U.mass,stiffness:o,damping:s}}else{const n=hd(e);t={...t,...n,mass:U.mass},t.isResolvedFromDuration=!0}return t}function Zs(e=U.visualDuration,t=U.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=vd({...n,velocity:-Ce(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),v=i-s,b=Ce(Math.sqrt(l/u)),C=Math.abs(v)<5;r||(r=C?U.restSpeed.granular:U.restSpeed.default),o||(o=C?U.restDelta.granular:U.restDelta.default);let S;if(m<1){const w=Pr(b,m);S=x=>{const A=Math.exp(-m*b*x);return i-A*((p+m*b*v)/w*Math.sin(w*x)+v*Math.cos(w*x))}}else if(m===1)S=w=>i-Math.exp(-b*w)*(v+(p+b*v)*w);else{const w=b*Math.sqrt(m*m-1);S=x=>{const A=Math.exp(-m*b*x),T=Math.min(w*x,300);return i-A*((p+m*b*v)*Math.sinh(T)+w*v*Math.cosh(T))/w}}const _={calculatedDuration:h&&d||null,next:w=>{const x=S(w);if(h)a.done=w>=d;else{let A=0;m<1&&(A=w===0?he(p):Ws(S,w,x));const T=Math.abs(A)<=r,O=Math.abs(i-x)<=o;a.done=T&&O}return a.value=a.done?i:x,a},toString:()=>{const w=Math.min(xo(_),Rn),x=To(A=>_.next(w*A).value,w,30);return w+"ms "+x}};return _}function Ys({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*t;const v=d+m,b=i===void 0?v:i(v);b!==v&&(m=b-d);const C=T=>-m*Math.exp(-T/r),S=T=>b+C(T),_=T=>{const O=C(T),P=S(T);f.done=Math.abs(O)<=c,f.value=f.done?b:P};let w,x;const A=T=>{h(f.value)&&(w=T,x=Zs({keyframes:[f.value,p(f.value)],velocity:Ws(S,T,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:T=>{let O=!1;return!x&&w===void 0&&(O=!0,_(T),A(T)),w!==void 0&&T>=w?x.next(T-w):(!O&&_(T),f)}}}const bd=Nt(.42,0,1,1),Cd=Nt(0,0,.58,1),Js=Nt(.42,0,.58,1),Sd=e=>Array.isArray(e)&&typeof e[0]!="number",Qs={linear:ae,easeIn:bd,easeInOut:Js,easeOut:Cd,circIn:hr,circInOut:vs,circOut:ys,backIn:fr,backInOut:ms,backOut:ps,anticipate:gs},ei=e=>{if(qn(e)){Pe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Nt(t,n,r,o)}else if(typeof e=="string")return Pe(Qs[e]!==void 0,`Invalid easing type '${e}'`),Qs[e];return e};function wd(e,t,n){const r=[],o=n||Gs,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||ae:t;a=Vt(l,a)}r.push(a)}return r}function _d(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Pe(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=wd(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Se(e[0],e[s-1],u)):c}function xd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ct(0,t,r);e.push(z(n,1,o))}}function Ed(e){const t=[0];return xd(t,e.length-1),t}function Td(e,t){return e.map(n=>n*t)}function Ad(e,t){return e.map(()=>t||Js).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Sd(r)?r.map(ei):ei(r),s={done:!1,value:t[0]},i=Td(n&&n.length===t.length?n:Ed(t),e),a=_d(i,t,{ease:Array.isArray(o)?o:Ad(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Md=e=>{const t=({timestamp:n})=>e(n);return{start:()=>F.update(t,!0),stop:()=>Le(t),now:()=>Y.isProcessing?Y.timestamp:pe.now()}},Pd={decay:Ys,inertia:Ys,tween:Bt,keyframes:Bt,spring:Zs},Ld=e=>e/100;class Lr extends Us{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||xr,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=Xn(n)?n:Pd[n]||Bt;let l,c;process.env.NODE_ENV!=="production"&&a!==Bt&&Pe(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Bt&&typeof t[0]!="number"&&(l=Vt(Ld,Gs(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=xo(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-f*(this.speed>=0?1:-1),C=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,_=s;if(h){const T=Math.min(this.currentTime,u)/d;let O=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(p==="reverse"?(P=1-P,m&&(P-=m/d)):p==="mirror"&&(_=i)),S=Se(0,1,P)*d}const w=C?{done:!1,value:l[0]}:_.next(S);a&&(w.value=a(w.value));let{done:x}=w;!C&&c!==null&&(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&x);return A&&o!==void 0&&(w.value=pn(l,this.options,o)),v&&v(w.value),A&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Ce(t.calculatedDuration):0}get time(){return Ce(this.currentTime)}set time(t){t=he(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ce(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Md,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Od=new Set(["opacity","clipPath","filter","transform"]);function kd(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Mo(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Nd=jn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),gn=10,Dd=2e4;function Id(e){return Xn(e.type)||e.type==="spring"||!Ao(e.ease)}function Vd(e,t){const n=new Lr({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<Dd;)r=n.sample(s),o.push(r.value),s+=gn;return{times:void 0,keyframes:o,duration:s-gn,ease:"linear"}}const ti={anticipate:gs,backInOut:ms,circInOut:vs};function Bd(e){return e in ti}class ni extends Us{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new js(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&on()&&Bd(s)&&(s=ti[s]),Id(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,v=Vd(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=kd(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Eo(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(pn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ce(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ce(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=he(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ae;const{animation:r}=n;Eo(r,t)}return ae}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new Lr({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=he(this.time);c.setWithVelocity(p.sample(m-gn).value,p.sample(m).value,gn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Nd()&&r&&Od.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const Fd={type:"spring",stiffness:500,damping:25,restSpeed:10},$d=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jd={type:"keyframes",duration:.8},zd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ud=(e,{keyframes:t})=>t.length>2?jd:Ge.has(e)?e.startsWith("scale")?$d(t[1]):Fd:zd;function Rd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Or=(e,t,n,r={},o,s)=>i=>{const a=Un(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-he(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};Rd(a)||(u={...u,...Ud(e,u)}),u.duration&&(u.duration=he(u.duration)),u.repeatDelay&&(u.repeatDelay=he(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=pn(u.keyframes,a);if(f!==void 0)return F.update(()=>{u.onUpdate(f),u.onComplete()}),new pc([])}return!s&&ni.supports(u)?new ni(u):new Lr(u)};function Xd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ri(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&Xd(u,d))continue;const p={delay:n,...Un(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=us(e);if(b){const C=window.MotionHandoffAnimation(b,d,F);C!==null&&(p.startTime=C,m=!0)}}dr(e,d),f.start(Or(d,f,h,e.shouldReduceMotion&&cs.has(d)?{type:!1}:p,e,m));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{F.update(()=>{a&&bu(e,a)})}),c}function kr(e,t,n={}){var r;const o=kt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(ri(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return qd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function qd(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(Gd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(kr(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Gd(e,t){return e.sortNodePosition(t)}function Wd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>kr(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=kr(e,t,n);else{const o=typeof t=="function"?kt(e,t,n.custom):t;r=Promise.all(ri(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function oi(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Kd=Jn.length;function si(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?si(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kd;n++){const r=Jn[n],o=e.props[r];(Mt(o)||o===!1)&&(t[r]=o)}return t}const Hd=[...Yn].reverse(),Zd=Yn.length;function Yd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Wd(e,n,r)))}function Jd(e){let t=Yd(e),n=ii(),r=!0;const o=l=>(c,u)=>{var d;const f=kt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=si(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<Zd;v++){const b=Hd[v],C=n[b],S=c[b]!==void 0?c[b]:u[b],_=Mt(S),w=b===l?C.isActive:null;w===!1&&(p=v);let x=S===u[b]&&S!==c[b]&&_;if(x&&r&&e.manuallyAnimateOnMount&&(x=!1),C.protectedKeys={...h},!C.isActive&&w===null||!S&&!C.prevProp||un(S)||typeof S=="boolean")continue;const A=Qd(C.prevProp,S);let T=A||b===l&&C.isActive&&!x&&_||v>p&&_,O=!1;const P=Array.isArray(S)?S:[S];let V=P.reduce(o(b),{});w===!1&&(V={});const{prevResolvedValues:q={}}=C,se={...q,...V},ie=L=>{T=!0,f.has(L)&&(O=!0,f.delete(L)),C.needsAnimating[L]=!0;const D=e.getValue(L);D&&(D.liveStyle=!1)};for(const L in se){const D=V[L],B=q[L];if(h.hasOwnProperty(L))continue;let G=!1;cr(D)&&cr(B)?G=!oi(D,B):G=D!==B,G?D!=null?ie(L):f.add(L):D!==void 0&&f.has(L)?ie(L):C.protectedKeys[L]=!0}C.prevProp=S,C.prevResolvedValues=V,C.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(x&&A)||O)&&d.push(...P.map(L=>({animation:L,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=kt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const C=e.getBaseTarget(b),S=e.getValue(b);S&&(S.liveStyle=!0),v[b]=C??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ii(),r=!0}}}function Qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oi(t,e):!1}function Ze(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ii(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class Ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ef extends Ne{constructor(t){super(t),t.animationState||(t.animationState=Jd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();un(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let tf=0;class nf extends Ne{constructor(){super(...arguments),this.id=tf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const rf={animation:{Feature:ef},exit:{Feature:nf}};function Ft(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $t(e){return{point:{x:e.pageX,y:e.pageY}}}const of=e=>t=>Hn(t)&&e(t,$t(t));function jt(e,t,n,r){return Ft(e,t,of(n),r)}function ai({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function af(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const li=1e-4,lf=1-li,cf=1+li,ci=.01,uf=0-ci,df=0+ci;function re(e){return e.max-e.min}function ff(e,t,n){return Math.abs(e-t)<=n}function ui(e,t,n,r=.5){e.origin=r,e.originPoint=z(t.min,t.max,e.origin),e.scale=re(n)/re(t),e.translate=z(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lf&&e.scale<=cf||isNaN(e.scale))&&(e.scale=1),(e.translate>=uf&&e.translate<=df||isNaN(e.translate))&&(e.translate=0)}function zt(e,t,n,r){ui(e.x,t.x,n.x,r?r.originX:void 0),ui(e.y,t.y,n.y,r?r.originY:void 0)}function di(e,t,n){e.min=n.min+t.min,e.max=e.min+re(t)}function hf(e,t,n){di(e.x,t.x,n.x),di(e.y,t.y,n.y)}function fi(e,t,n){e.min=t.min-n.min,e.max=e.min+re(t)}function Ut(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}const hi=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:hi(),y:hi()}),pi=()=>({min:0,max:0}),X=()=>({x:pi(),y:pi()});function ce(e){return[e("x"),e("y")]}function Nr(e){return e===void 0||e===1}function Dr({scale:e,scaleX:t,scaleY:n}){return!Nr(e)||!Nr(t)||!Nr(n)}function Ye(e){return Dr(e)||mi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mi(e){return gi(e.x)||gi(e.y)}function gi(e){return e&&e!=="0%"}function yn(e,t,n){const r=e-n,o=t*r;return n+o}function yi(e,t,n,r,o){return o!==void 0&&(e=yn(e,o,r)),yn(e,n,r)+t}function Ir(e,t=0,n=1,r,o){e.min=yi(e.min,t,n,r,o),e.max=yi(e.max,t,n,r,o)}function vi(e,{x:t,y:n}){Ir(e.x,t.translate,t.scale,t.originPoint),Ir(e.y,n.translate,n.scale,n.originPoint)}const bi=.999999999999,Ci=1.0000000000001;function pf(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,vi(e,i)),r&&Ye(s.latestValues)&&vt(e,s.latestValues))}t.x<Ci&&t.x>bi&&(t.x=1),t.y<Ci&&t.y>bi&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function Si(e,t,n,r,o=.5){const s=z(e.min,e.max,o);Ir(e,t,n,s,r)}function vt(e,t){Si(e.x,t.x,t.scaleX,t.scale,t.originX),Si(e.y,t.y,t.scaleY,t.scale,t.originY)}function wi(e,t){return ai(af(e.getBoundingClientRect(),t))}function mf(e,t,n){const r=wi(e,n),{scroll:o}=t;return o&&(yt(r.x,o.offset.x),yt(r.y,o.offset.y)),r}const _i=({current:e})=>e?e.ownerDocument.defaultView:null,xi=(e,t)=>Math.abs(e-t);function gf(e,t){const n=xi(e.x,t.x),r=xi(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ei{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Br(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=gf(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Y;this.history.push({...p,timestamp:m});const{onStart:v,onMove:b}=this.handlers;f||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Vr(f,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Br(d.type==="pointercancel"?this.lastMoveEventInfo:Vr(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,v),p&&p(d,v)},!Hn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=$t(t),a=Vr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Y;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Br(a,this.history)),this.removeListeners=Vt(jt(this.contextWindow,"pointermove",this.handlePointerMove),jt(this.contextWindow,"pointerup",this.handlePointerUp),jt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Le(this.updatePoint)}}function Vr(e,t){return t?{point:t(e.point)}:e}function Ti(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Br({point:e},t){return{point:e,delta:Ti(e,Ai(t)),offset:Ti(e,yf(t)),velocity:vf(t,.1)}}function yf(e){return e[0]}function Ai(e){return e[e.length-1]}function vf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ai(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>he(t)));)n--;if(!r)return{x:0,y:0};const s=Ce(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function bf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?z(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?z(n,e,r.max):Math.min(e,n)),e}function Mi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Cf(e,{top:t,left:n,bottom:r,right:o}){return{x:Mi(e.x,n,o),y:Mi(e.y,t,r)}}function Pi(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Sf(e,t){return{x:Pi(e.x,t.x),y:Pi(e.y,t.y)}}function wf(e,t){let n=.5;const r=re(e),o=re(t);return o>r?n=ct(t.min,t.max-r,e.min):r>o&&(n=ct(e.min,e.max-o,t.min)),Se(0,1,n)}function _f(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Fr=.35;function xf(e=Fr){return e===!1?e=0:e===!0&&(e=Fr),{x:Li(e,"left","right"),y:Li(e,"top","bottom")}}function Li(e,t,n){return{min:Oi(e,t),max:Oi(e,n)}}function Oi(e,t){return typeof e=="number"?e:e[t]||0}const Ef=new WeakMap;class Tf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=X(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($t(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Cc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ce(v=>{let b=this.getAxisMotionValue(v).get()||0;if(me.test(b)){const{projection:C}=this.visualElement;if(C&&C.layout){const S=C.layout.layoutBox[v];S&&(b=re(S)*(parseFloat(b)/100))}}this.originPoint[v]=b}),p&&F.postRender(()=>p(u,d)),dr(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=Af(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>ce(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ei(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:_i(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&F.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!vn(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=bf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=Cf(o.layoutBox,n):this.constraints=!1,this.elastic=xf(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ce(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=_f(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current;Pe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=mf(r,o.root,this.visualElement.getTransformPagePoint());let i=Sf(o.layout.layoutBox,s);if(n){const a=n(sf(i));this.hasMutatedConstraints=!!a,a&&(i=ai(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ce(u=>{if(!vn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return dr(this.visualElement,t),r.start(Or(t,r,0,n,this.visualElement,!1))}stopAnimation(){ce(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ce(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ce(n=>{const{drag:r}=this.getProps();if(!vn(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-z(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ce(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=wf({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ce(i=>{if(!vn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(z(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Ef.set(this.visualElement,this);const t=this.visualElement.current,n=jt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.read(r);const i=Ft(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ce(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Fr,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function vn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Af(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Mf extends Ne{constructor(t){super(t),this.removeGroupControls=ae,this.removeListeners=ae,this.controls=new Tf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ae}unmount(){this.removeGroupControls(),this.removeListeners()}}const ki=e=>(t,n)=>{e&&F.postRender(()=>e(t,n))};class Pf extends Ne{constructor(){super(...arguments),this.removePointerDownListener=ae}onPointerDown(t){this.session=new Ei(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_i(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ki(t),onStart:ki(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&F.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=jt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const bn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ni(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(N.test(e))e=parseFloat(e);else return e;const n=Ni(e,t.target.x),r=Ni(e,t.target.y);return`${n}% ${r}%`}},Lf={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ke.parse(e);if(o.length>5)return r;const s=ke.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=z(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class Of extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;Wc(kf),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),bn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||F.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Kn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Di(e){const[t,n]=uc(),r=g.useContext(Co);return y.jsx(Of,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(qo),isPresent:t,safeToRemove:n})}const kf={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:Lf};function Nf(e,t,n){const r=te(e)?e:At(e);return r.start(Or("",r,t,n)),r.animation}function Df(e){return e instanceof SVGElement&&e.tagName!=="svg"}const If=(e,t)=>e.depth-t.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(t){Fn(this.children,t),this.isDirty=!0}remove(t){$n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(If),this.isDirty=!1,this.children.forEach(t)}}function Bf(e,t){const n=pe.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Le(r),e(s-t))};return F.read(r,!0),()=>Le(r)}const Ii=["TopLeft","TopRight","BottomLeft","BottomRight"],Ff=Ii.length,Vi=e=>typeof e=="string"?parseFloat(e):e,Bi=e=>typeof e=="number"||N.test(e);function $f(e,t,n,r,o,s){o?(e.opacity=z(0,n.opacity!==void 0?n.opacity:1,jf(r)),e.opacityExit=z(t.opacity!==void 0?t.opacity:1,0,zf(r))):s&&(e.opacity=z(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<Ff;i++){const a=`border${Ii[i]}Radius`;let l=Fi(t,a),c=Fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Bi(l)===Bi(c)?(e[a]=Math.max(z(Vi(l),Vi(c),r),0),(me.test(c)||me.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=z(t.rotate||0,n.rotate||0,r))}function Fi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const jf=$i(0,.5,ys),zf=$i(.5,.95,ae);function $i(e,t,n){return r=>r<e?0:r>t?1:n(ct(e,t,r))}function ji(e,t){e.min=t.min,e.max=t.max}function ue(e,t){ji(e.x,t.x),ji(e.y,t.y)}function zi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ui(e,t,n,r,o){return e-=t,e=yn(e,1/n,r),o!==void 0&&(e=yn(e,1/o,r)),e}function Uf(e,t=0,n=1,r=.5,o,s=e,i=e){if(me.test(t)&&(t=parseFloat(t),t=z(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=z(s.min,s.max,r);e===s&&(a-=t),e.min=Ui(e.min,t,n,a,o),e.max=Ui(e.max,t,n,a,o)}function Ri(e,t,[n,r,o],s,i){Uf(e,t[n],t[r],t[o],t.scale,s,i)}const Rf=["x","scaleX","originX"],Xf=["y","scaleY","originY"];function Xi(e,t,n,r){Ri(e.x,t,Rf,n?n.x:void 0,r?r.x:void 0),Ri(e.y,t,Xf,n?n.y:void 0,r?r.y:void 0)}function qi(e){return e.translate===0&&e.scale===1}function Gi(e){return qi(e.x)&&qi(e.y)}function Wi(e,t){return e.min===t.min&&e.max===t.max}function qf(e,t){return Wi(e.x,t.x)&&Wi(e.y,t.y)}function Ki(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hi(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Zi(e){return re(e.x)/re(e.y)}function Yi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Gf{constructor(){this.members=[]}add(t){Fn(this.members,t),t.scheduleRender()}remove(t){if($n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Wf(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $r=["","X","Y","Z"],Kf={visibility:"hidden"},Ji=1e3;let Hf=0;function jr(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Qi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=us(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",F,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Qi(r)}function ea({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Hf++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Jf),this.nodes.forEach(rh),this.nodes.forEach(oh),this.nodes.forEach(Qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,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 Vf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new zn),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Df(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Bf(f,250),bn.hasAnimatedSinceResize&&(bn.hasAnimatedSinceResize=!1,this.nodes.forEach(na))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||ch,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),C=!this.targetLayout||!Hi(this.targetLayout,p),S=!f&&h;if(this.options.layoutRoot||this.resumeFrom||S||f&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const _={...Un(m,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else f||na(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Le(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(sh),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.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(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ta);return}this.isUpdating||this.nodes.forEach(th),this.isUpdating=!1,this.nodes.forEach(nh),this.nodes.forEach(Zf),this.nodes.forEach(Yf),this.clearAllSnapshots();const a=pe.now();Y.delta=Se(0,1e3/60,a-Y.timestamp),Y.timestamp=a,Y.isProcessing=!0,Wn.update.process(Y),Wn.preRender.process(Y),Wn.render.process(Y),Y.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Kn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eh),this.sharedNodes.forEach(ih)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!re(this.snapshot.measuredBox.x)&&!re(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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=X(),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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ye(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),uh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return X();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(dh))){const{scroll:u}=this.root;u&&(yt(l.x,u.offset.x),yt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=X();if(ue(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ue(l,i),yt(l.x,d.offset.x),yt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=X();ue(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ye(u.latestValues)&&vt(l,u.latestValues)}return Ye(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=X();ue(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ye(c.latestValues))continue;Dr(c.latestValues)&&c.updateSnapshot();const u=X(),d=c.measurePageBox();ue(u,d),Xi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ye(this.latestValues)&&Xi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==Y.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!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(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Y.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),Ut(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=X(),this.targetWithTransforms=X()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ue(this.target,this.layout.layoutBox),vi(this.target,this.targetDelta)):ue(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),Ut(this.relativeTargetOrigin,this.target,h.target),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Dr(this.parent.latestValues)||mi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Y.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=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||d))return;ue(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;pf(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=X());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),zt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Yi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Yi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gt(),this.projectionDelta=gt(),this.projectionDeltaWithTransform=gt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=X(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),b=!v||v.members.length<=1,C=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(lh));this.animationProgress=0;let S;this.mixTargetDelta=_=>{const w=_/1e3;ra(d.x,i.x,w),ra(d.y,i.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ut(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ah(this.relativeTarget,this.relativeTargetOrigin,f,w),S&&qf(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=X()),ue(S,this.relativeTarget)),m&&(this.animationValues=u,$f(u,c,this.latestValues,w,C,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Le(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{bn.hasAnimatedSinceResize=!0,this.currentAnimation=Nf(0,Ji,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ji),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&la(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||X();const d=re(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=re(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}ue(a,l),vt(a,u),zt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Gf),this.sharedNodes.get(i).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 i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&jr("z",i,c,this.animationValues);for(let u=0;u<$r.length;u++)jr(`rotate${$r[u]}`,i,c,this.animationValues),jr(`skew${$r[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Kf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=hn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=hn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ye(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Wf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Pt){if(f[m]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:C}=Pt[m],S=c.transform==="none"?f[m]:v(f[m],d);if(b){const _=b.length;for(let w=0;w<_;w++)c[b[w]]=S}else C?this.options.visualElement.renderState.vars[m]=S:c[m]=S}return this.options.layoutId&&(c.pointerEvents=d===this?hn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ta),this.root.sharedNodes.clear()}}}function Zf(e){e.updateLayout()}function Yf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?ce(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=re(f);f.min=r[d].min,f.max=f.min+h}):la(s,n.layoutBox,r)&&ce(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=re(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=gt();zt(a,r,n.layoutBox);const l=gt();i?zt(l,e.applyTransform(o,!0),n.measuredBox):zt(l,r,n.layoutBox);const c=!Gi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=X();Ut(p,n.layoutBox,f.layoutBox);const m=X();Ut(m,r,h.layoutBox),Hi(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Jf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eh(e){e.clearSnapshot()}function ta(e){e.clearMeasurements()}function th(e){e.isLayoutDirty=!1}function nh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function na(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rh(e){e.resolveTargetDelta()}function oh(e){e.calcProjection()}function sh(e){e.resetSkewAndRotation()}function ih(e){e.removeLeadSnapshot()}function ra(e,t,n){e.translate=z(t.translate,0,n),e.scale=z(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oa(e,t,n,r){e.min=z(t.min,n.min,r),e.max=z(t.max,n.max,r)}function ah(e,t,n,r){oa(e.x,t.x,n.x,r),oa(e.y,t.y,n.y,r)}function lh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ch={duration:.45,ease:[.4,0,.1,1]},sa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ia=sa("applewebkit/")&&!sa("chrome/")?Math.round:ae;function aa(e){e.min=ia(e.min),e.max=ia(e.max)}function uh(e){aa(e.x),aa(e.y)}function la(e,t,n){return e==="position"||e==="preserve-aspect"&&!ff(Zi(t),Zi(n),.2)}function dh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const fh=ea({attachResizeListener:(e,t)=>Ft(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zr={current:void 0},ca=ea({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zr.current){const e=new fh({});e.mount(window),e.setOptions({layoutScroll:!0}),zr.current=e}return zr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hh={pan:{Feature:Pf},drag:{Feature:Mf,ProjectionNode:ca,MeasureLayout:Di}};function ua(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&F.postRender(()=>s(t,$t(t)))}class ph extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=wc(t,(n,r)=>(ua(this.node,r,"Start"),o=>ua(this.node,o,"End"))))}unmount(){}}class mh extends Ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vt(Ft(this.node.current,"focus",()=>this.onFocus()),Ft(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function da(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&F.postRender(()=>s(t,$t(t)))}class gh extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=Tc(t,(n,r)=>(da(this.node,r,"Start"),(o,{success:s})=>da(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ur=new WeakMap,Rr=new WeakMap,yh=e=>{const t=Ur.get(e.target);t&&t(e)},vh=e=>{e.forEach(yh)};function bh({root:e,...t}){const n=e||document;Rr.has(n)||Rr.set(n,{});const r=Rr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(vh,{root:e,...t})),r[o]}function Ch(e,t,n){const r=bh(t);return Ur.set(e,n),r.observe(e),()=>{Ur.delete(e),r.unobserve(e)}}const Sh={some:0,all:1};class wh extends Ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Sh[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Ch(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_h(t,n))&&this.startObserver()}unmount(){}}function _h({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xh={inView:{Feature:wh},tap:{Feature:gh},focus:{Feature:mh},hover:{Feature:ph}},Eh={layout:{ProjectionNode:ca,MeasureLayout:Di}},Xr={current:null},fa={current:!1};function Th(){if(fa.current=!0,!!Vn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xr.current=e.matches;e.addListener(t),t()}else Xr.current=!1}const Ah=[...Fs,ne,ke],Mh=e=>Ah.find(Bs(e)),Ph=new WeakMap;function Lh(e,t,n){for(const r in t){const o=t[r],s=n[r];if(te(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rn(o.version==="12.5.0",`Attempting to mix Motion versions ${o.version} with 12.5.0 may not work as expected.`);else if(te(s))e.addValue(r,At(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,At(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ha=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Oh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xr,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 h=pe.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,F.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=dn(n),this.isVariantNode=Uo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&te(p)&&p.set(l[h],!1)}}mount(t){this.current=t,Ph.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),fa.current||Th(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xr.current,process.env.NODE_ENV!=="production"&&rn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Le(this.notifyUpdate),Le(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ge.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&F.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ut){const n=ut[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):X()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ha.length;r++){const o=ha[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=Lh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=At(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Is(o)||bs(o))?o=parseFloat(o):!Mh(o)&&ke.test(n)&&(o=As(t,n)),this.setBaseTarget(t,te(o)?o.get():o)),te(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=lr(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!te(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new zn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class pa extends Oh{constructor(){super(...arguments),this.KeyframeResolver=js}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;te(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kh(e){return window.getComputedStyle(e)}class Nh extends pa{constructor(){super(...arguments),this.type="html",this.renderInstance=os}readValueFromInstance(t,n){if(Ge.has(n))return Xu(t,n);{const r=kh(t),o=(er(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wi(t,n)}build(t,n,r){rr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ur(t,n,r)}}class Dh extends pa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=X,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&rs(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ge.has(n)){const r=Ts(n);return r&&r.default||0}return n=ss.has(n)?n:Qn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return as(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&F.postRender(this.updateDimensions)}build(t,n,r){ir(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){is(t,n,r,o)}mount(t){this.isSVGTag=ar(t.tagName),super.mount(t)}}const Ih=(e,t)=>sr(e)?new Dh(t):new Nh(t,{allowProjection:e!==g.Fragment}),Vh=yu({...rf,...xh,...hh,...Eh},Ih),Je=Dc(Vh),Bh={root:"_root_uup2j_1"},ma={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function De(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ma).includes(t)).filter(t=>e[t]===!0).map(t=>ma[t]):null}const Ie="Errore: ",Fh="Impossibile acquisire la posizione.",Cn="Impossibile caricare i punti di mappa.",$h="Si è verificato un errore.",jh="Impossibile caricare i suggerimenti.",zh="Impossibile caricare i dettagli della location.",Uh="Impossibile caricare la mappa.",Rh="Impossibile trovare punti di mappa nell'area di ricerca.",Xh="Ottieni indicazioni di navigazione per questa destinazione",qh="Condividi questa destinazione",Gh="Scarica l'evento",Wh="dyn-locator__portal-root",ga=3e3,ya=6,va=2e4,Kh=300,Xt={north:47.1,south:36.6,east:18.6,west:6.6},Hh={lat:(Xt.north+Xt.south)/2,lng:(Xt.east+Xt.west)/2},Qe={AIRC:"airc",GOOGLE:"google"};function we(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function _e(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function ba(e,t){const{type:n,url:r}=e??{};switch(n){case"navigate":case"directions":return{"aria-label":Xh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"share":return{"aria-label":qh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Gh,as:"a",href:r??"#",download:!0,target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"email":default:return{}}}function Zh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}function Yh(e){var l,c,u,d;const t=(e==null?void 0:e.address_components)??[];function n(f){return t.find(h=>h.types.includes(f))}const r=(e==null?void 0:e.formatted_address)??"No address found",o=((l=n("locality"))==null?void 0:l.long_name)??"No city found",s=((c=n("country"))==null?void 0:c.long_name)??"No country found",i=((u=n("administrative_area_level_1"))==null?void 0:u.long_name)??"No region found",a=((d=n("administrative_area_level_2"))==null?void 0:d.short_name)??"No province found";return{address:r,city:o,province:a,region:i,country:s}}function Sn({fallback:e,format:t,...n}){if(typeof e>"u"&&(e=""),t)switch(t){case"ZIP_CITY_PROVINCE":{const{zip:r,city:o,province:s}=n??{};return[r,o,s].every(Boolean)?`${r} ${o} (${s})`:e}case"STREET_ZIP_CITY_PROVINCE":{const{street:r,zip:o,city:s,province:i}=n??{};return[r,o,s,i].every(Boolean)?`${r}, ${o} ${s} (${i})`:e}case"STREET_CITY_PROVINCE":{const{street:r,city:o,province:s}=n??{};return[r,o,s].every(Boolean)?`${r}, ${o} (${s})`:e}case"ZIP_CITY":{const{zip:r,city:o}=n??{};return[r,o].every(Boolean)?`${r} ${o}`:e}case"CITY_PROVINCE":{const{city:r,province:o}=n??{};return[r,o].every(Boolean)?`${r} (${o})`:e}case"STREET_CITY":{const{street:r,city:o}=n??{};return[r,o].every(Boolean)?`${r}, ${o}`:e}case"STREET_ZIP_CITY":{const{street:r,zip:o,city:s}=n??{};return[r,o,s].every(Boolean)?`${r}, ${o} ${s}`:e}default:return e}return e}const Ca="Anchor";function Sa({as:e,wrapper:t,children:n,variant:r="default",className:o,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},h){const p=t||"span",m=s?Je[p]:p,v=e||"a",b=De(f)??[],C=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},_=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return y.jsx(m,{className:j(Bh.root,"dyn-locator__"+_e(Ca),we(o),...b),"data-variant":r,...d?{style:d}:{},...C,...f,children:y.jsx(v,{ref:h,href:a,target:l,rel:_,...u,children:n})})}Sa.displayName=Ca;const wa=g.forwardRef(Sa),_a="ErrorBanner";function xa({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:o,className:s,children:i,...a}){const l=De(a)??[];return y.jsxs("div",{className:j("dyn-locator__"+_e(_a),xt.root,we(s),...l??[]),children:[y.jsxs("header",{className:xt.header,children:[y.jsx(Jl,{size:28,color:"currentColor",className:xt.icon})," ",y.jsx("h3",{children:e})]}),y.jsxs("div",{className:xt.body,children:[y.jsx("p",{children:t}),n&&r&&y.jsxs("p",{children:["Prova a"," ",y.jsx(wa,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,o&&y.jsx("div",{className:xt.content,children:y.jsx("pre",{children:o})})]})]})}xa.displayName=_a;const Ea=xa;class Jh extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||y.jsx("div",{className:Rl.container,children:y.jsx(Ea,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Qh=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",fillRule:"evenodd",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M12 2.5a9.5 9.5 0 1 0 0 19 9.5 9.5 0 0 0 0-19ZM13.286 14.518h2.459l.386-2.498h-2.845v-1.365c0-1.037.338-1.957 1.309-1.957h1.56v-2.18c-.275-.037-.854-.118-1.949-.118-2.287 0-3.627 1.208-3.627 3.959v1.661h-2.35v2.498h2.35v6.864c.465.07.937.118 1.421.118.438 0 .864-.04 1.286-.097v-6.885Z"})]}),ep=g.forwardRef(Qh),tp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M8 3a5 5 0 0 0-5 5v8a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5V8a5 5 0 0 0-5-5H8Zm10 2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-6 2a5 5 0 1 1-.001 10.001A5 5 0 0 1 12 7Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"})]}),np=g.forwardRef(tp),rp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM9 17H6.477v-7H9v7ZM7.694 8.717c-.771 0-1.286-.514-1.286-1.2 0-.686.514-1.2 1.371-1.2.771 0 1.286.514 1.286 1.2 0 .686-.514 1.2-1.371 1.2ZM18 17h-2.442v-3.826c0-1.058-.651-1.302-.895-1.302s-1.058.163-1.058 1.302V17h-2.523v-7h2.523v.977c.325-.57.976-.977 2.197-.977S18 10.977 18 13.174V17Z"})]}),op=g.forwardRef(rp),sp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.68 1.92H4.32a2.403 2.403 0 0 0-2.4 2.4v15.36c0 1.323 1.077 2.4 2.4 2.4h15.36c1.323 0 2.4-1.077 2.4-2.4V4.32c0-1.323-1.077-2.4-2.4-2.4Zm-1.917 8.795a3.596 3.596 0 0 1-3.34-1.61v5.538a4.093 4.093 0 1 1-4.093-4.093c.085 0 .169.008.253.013v2.017c-.084-.01-.167-.025-.253-.025a2.089 2.089 0 1 0 0 4.178c1.154 0 2.173-.91 2.173-2.063l.02-9.405h1.927a3.594 3.594 0 0 0 3.313 3.208v2.242Z"})]}),ip=g.forwardRef(sp),ap=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.077 4.928A9.927 9.927 0 0 0 12.011 2c-5.506 0-9.987 4.479-9.989 9.985a9.962 9.962 0 0 0 1.333 4.992L2 22l5.233-1.237a9.98 9.98 0 0 0 4.773 1.216h.004c5.505 0 9.986-4.48 9.989-9.985a9.922 9.922 0 0 0-2.922-7.066Zm-2.179 10.626c-.208.583-1.227 1.145-1.685 1.186-.458.042-.887.207-2.995-.624-2.537-1-4.139-3.601-4.263-3.767-.125-.167-1.019-1.353-1.019-2.581s.645-1.832.874-2.081a.916.916 0 0 1 .666-.312c.166 0 .333 0 .478.006.178.007.375.016.562.431.222.494.707 1.728.769 1.853.062.125.104.271.021.437-.083.166-.125.27-.249.416-.125.146-.262.325-.374.437-.125.124-.255.26-.11.509.146.25.646 1.067 1.388 1.728.954.85 1.757 1.113 2.007 1.239.25.125.395.104.541-.063.146-.166.624-.728.79-.978.166-.25.333-.208.562-.125.229.083 1.456.687 1.705.812.25.125.416.187.478.291.062.103.062.603-.146 1.186Z"})]}),lp=g.forwardRef(ap),cp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsxs("g",{transform:"scale(1.2) translate(-2.4, -2.4)",children:[y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 3 4.965 21H3.108L18.643 3H20.5Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillOpacity:"0.3",fillRule:"evenodd",d:"M15.572 20.5 3.91 3.5h4.479l11.661 17h-4.479Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.862 4.5 10.29 15h-2.054L5.81 4.5h2.053Zm.79-1.5h-5.69l12.346 18H21L8.652 3Z",clipRule:"evenodd"})]})]}),Ta=g.forwardRef(cp),up=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M21.551 6.96c-.191-1.056-1.102-1.824-2.16-2.064-1.582-.336-4.511-.576-7.68-.576-3.167 0-6.142.24-7.727.576-1.055.24-1.968.96-2.16 2.064-.193 1.2-.384 2.88-.384 5.04s.191 3.84.431 5.04c.193 1.056 1.105 1.824 2.16 2.064 1.68.336 4.56.576 7.729.576 3.169 0 6.049-.24 7.729-.576 1.055-.24 1.967-.96 2.16-2.064.19-1.2.43-2.929.48-5.04-.098-2.16-.338-3.84-.578-5.04ZM9.12 15.36V8.64L14.976 12 9.12 15.36Z"})]}),dp=g.forwardRef(up),Aa={ArrowLeft:Wl,ArrowUpRight:Hl,ChevronUp:Yl,ChevronDown:Zl,Close:bo,Expand:rc,Location:nc,Search:ic,Share:ac,Target:ec,Email:tc,Copy:Ql,X:Ta,Twitter:Ta,Facebook:ep,Instagram:np,Linkedin:op,TikTok:ip,Whatsapp:lp,Youtube:dp},ge={root:"_root_md12w_4",header:"_header_md12w_21",body:"_body_md12w_22",cta:"_cta_md12w_23",titleContainer:"_titleContainer_md12w_40",shareButton:"_shareButton_md12w_51",capabilities:"_capabilities_md12w_59",tagContainer:"_tagContainer_md12w_72",notes:"_notes_md12w_78",tag:"_tag_md12w_72"},bt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},qr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function fp(e){return g.isValidElement(e)||typeof e=="function"}function hp(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function pp(e){return!!e&&typeof e=="object"&&"path"in e}const Ma="Icon";function Pa({as:e,icon:t,iconRef:n,label:r,size:o="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const h=e||"span",p=l?Je[h]:h,{iconMap:m}=Ep();function v(S){if(hp(S)){const _=typeof S=="string"?S:S.name;return m[_]?g.createElement(m[_],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:qr.icon}):'No icon found for "'+_+'"!'}return pp(S)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),y.jsx("img",{...n?{ref:n}:{},src:S.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:qr.icon})):"No icon provided"}const b=De(d)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return y.jsx(p,{ref:f,className:j(qr.root,"dyn-locator__"+_e(Ma),we(a),...b),...u?{style:u}:{},"data-variant":i,"data-size":o,...s?{"data-radius":s}:{},...C,...d,children:v(t)})}Pa.displayName=Ma;const ye=g.forwardRef(Pa),La="Tag";function Oa({as:e,iconPosition:t="left",children:n,icon:r,className:o,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?Je[u]:u,f=De(l)??[],h=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return y.jsx(d,{ref:c,className:j(bt.root,"dyn-locator__"+_e(La),we(o),...f),"data-icon-position":t,...a?{style:a}:{},...h,...l,children:y.jsxs("div",{className:bt.container,children:[r?y.jsx("div",{className:bt.icon,children:fp(r)?typeof r=="function"?y.jsx(r,{className:bt.icon}):r:y.jsx(ye,{className:bt.icon,icon:r})}):null,y.jsx("div",{className:bt.label,children:n})]})})}Oa.displayName=La;const mp=g.forwardRef(Oa),gp={root:"_root_u5v4v_1"},ka="IconButton";function Na({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},h){const p=e||"button",m=o?Je[p]:p,v=De(f)??[],b=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},C=p==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return y.jsx(m,{ref:h,className:j(gp.root,"dyn-locator__"+_e(ka),we(n),...v),"data-variant":r,"data-element":p,"aria-label":a,disabled:d,...i?{style:i}:{},...b,...C,...f,children:t})}Na.displayName=ka;const Ve=g.forwardRef(Na),Da={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Ia="Card";function Va({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=o?Je[d]:d,h=De(c)??[],p=o?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return y.jsx(f,{ref:u,className:j(Da.root,"dyn-locator__"+_e(Ia),we(n),...h),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...p,...c,children:r==="bare"?t:y.jsx("div",{className:Da.content,children:t})})}Va.displayName=Ia;const yp=g.forwardRef(Va);function Ba(e){const{componentMap:t}=Tp();return t[e]}var fe=(e=>(e.FULLSCREEN_TOGGLE="fullscreen",e.BACK_BUTTON_CLICK="back_button",e.SEARCH="search",e.AUTOCOMPLETE_ITEM_SELECT="autocomplete_item_select",e.GEOLOCATION="geolocation",e.LOCATION_CARD_CLICK="location_card_click",e.LOCATION_CARD_PRIMARY_ACTION="location_card_primary_action",e.LOCATION_CARD_SECONDARY_ACTION="location_card_secondary_action",e.INFO_WINDOW_PRIMARY_ACTION="info_window_primary_action",e.INFO_WINDOW_SECONDARY_ACTION="info_window_secondary_action",e.CARD_LIST_TOGGLE="card_list_toggle",e.SHARE_SHEET_OPEN="share_sheet_open",e.SHARE_SHEET_CLOSE="share_sheet_close",e.SHARE_SHEET_SHARE="share_sheet_share",e.AREA_SEARCH_TOGGLE="area_search_toggle",e.AREA_SEARCH_SUBMIT="area_search_submit",e.AREA_SEARCH_CANCEL="area_search_cancel",e))(fe||{});const vp=[fe.LOCATION_CARD_PRIMARY_ACTION,fe.LOCATION_CARD_SECONDARY_ACTION,fe.AUTOCOMPLETE_ITEM_SELECT,fe.INFO_WINDOW_PRIMARY_ACTION,fe.INFO_WINDOW_SECONDARY_ACTION];class bp{constructor(){co(this,"config",{});co(this,"isInitialized",!1)}initialize(t={}){this.config=t,this.isInitialized=!0,Object.keys(t).forEach(n=>{vp.includes(n)||console.warn(`[TrackingService] Event "${n}" is not yet implemented; adding it in the config has no effect.`)})}isEventEnabled(t){var r,o;if(!this.isInitialized)return!1;const n=!!((r=this.config[t])!=null&&r.enabled)&&typeof((o=this.config[t])==null?void 0:o.tracker)=="function";return n||console.warn(`[TrackingService] Event "${t}" is not enabled or missing its tracker function.`),n}track(t,n={}){if(this.isEventEnabled(t))try{const r={...n,timestamp:n.timestamp??Date.now()},{tracker:o}=this.config[t]??{};if(typeof o!="function")throw new Error(`[TrackingService] Tracker function not found for event "${t}"`);o(r)}catch(r){console.error(`[TrackingService] Error tracking event "${t}":`,r)}}isTrackerInitialized(){return this.isInitialized}reset(){this.config={},this.isInitialized=!1}}const Ct=new bp,Fa="LocationCard",Cp="Prodotti disponibili in piazza";function Sp(e){return typeof e=="string"&&e.trim().length>0}function $a({title:e,timestamp:t,address:n,zip:r,province:o,street:s,city:i,country:a,capabilities:l,actions:c,className:u,notes:d,id:f,coords:h,on_share:p,markerType:m,...v},b){const C=Ba("ctaButton"),S=M(O=>O.toggleShareSheet),_=M(O=>O.featureFlags),w=M(O=>O.presentationPrefs),{addressFormat:x}=w??{};function A(){S(!0)}function T(O,P){return()=>{Ct.track(fe[P===0?"LOCATION_CARD_PRIMARY_ACTION":"LOCATION_CARD_SECONDARY_ACTION"],{cta_event_type:O.type??"",cta_url:O.url??"",cta_label:O.label??""})}}return y.jsx(yp,{ref:b,variant:"bare",clickable:!0,className:j("dyn-locator__"+_e(Fa),we(u)),...v,style:{...v.style?v.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:y.jsxs("div",{className:ge.root,children:[y.jsxs("header",{className:ge.header,children:[t?y.jsx("time",{children:t}):null,y.jsxs("div",{className:ge.titleContainer,children:[e?y.jsx("h4",{children:e}):null,_.share?y.jsx(Ve,{className:ge.shareButton,variant:"bare",onClick:A,children:y.jsx(ye,{size:"M",icon:"Share"})}):null]}),n?y.jsx("address",{children:x?Sn({fallback:n,format:x,zip:r,city:i,province:o,street:s,country:a}):n}):null]}),l!=null&&l.length?y.jsx("div",{className:ge.body,children:l.map((O,P)=>{const V=O.title===Cp&&Sp(d)?d.trim():null;return y.jsxs(g.Fragment,{children:[y.jsxs("div",{className:ge.capabilities,children:[y.jsx("h5",{children:O.title}),y.jsx("ul",{className:ge.tagContainer,children:(O.capabilities??[]).map((q,se)=>y.jsx(mp,{as:"li",animationDelay:+`.${se+1}`,className:ge.tag,children:q.label},se))})]}),V?y.jsx("p",{className:ge.notes,children:V}):null]},P)})}):null,c!=null&&c.length?y.jsx("div",{className:ge.cta,children:c.map((O,P)=>y.jsx(C,{animate:!1,fullWidth:!0,variant:P===0?"themed":"secondary",...ba(O,T(O,P)),children:O.label},P))}):null]})})}$a.displayName=Fa;const wp=g.forwardRef($a),ja={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},za="Button";function Ua({as:e,children:t,className:n,variant:r="default",size:o="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:h,...p},m){const v=e||(u?"a":"button"),b=l?Je[v]:v,C=De(p)??[],S=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},_=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return y.jsx(b,{ref:m,className:j(ja.root,"dyn-locator__"+_e(za),we(n),...C),"data-variant":r,"data-size":o,"data-full-width":a,disabled:s||i,...h?{style:h}:{},...S,..._,...p,children:i?y.jsxs("span",{style:{display:"flex",gap:10},children:[t,y.jsx("span",{className:ja.loader,"aria-hidden":"true"})]}):t})}Ua.displayName=za;const qt=g.forwardRef(Ua),Ra={locationCard:wp,ctaButton:qt},_p={iconMap:Aa,componentMap:Ra},Gr=g.createContext(_p);function xp({children:e,customIcons:t,customComponents:n}){const r={...Aa,...t??{}},o={...Ra,...n??{}};return y.jsx(Gr.Provider,{value:{iconMap:r,componentMap:o},children:e})}function Ep(){const{iconMap:e}=g.useContext(Gr);return{iconMap:e}}function Tp(){const{componentMap:e}=g.useContext(Gr);return{componentMap:e}}var St=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e.ALL_MARKERS="allMarkers",e))(St||{});const Xa=g.createContext({endpointMap:{},apiUrl:""});function Ap({children:e,endpoints:t,apiUrl:n}){var r;if(!n||!((r=Object.keys(t??{}))!=null&&r.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return y.jsx(Xa.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function Mp(e){const{endpointMap:t,apiUrl:n}=g.useContext(Xa);return{getEndpoint:(r={})=>{const o=t[e];if(!o)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return o.buildPath?s=o.buildPath(r):(s=o.path,Object.entries(r).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:o.method}}}}let Pp={data:""},Lp=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Pp,Op=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,kp=/\/\*[^]*?\*\/| +/g,qa=/\n+/g,Be=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?Be(i,s):s+"{"+Be(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=Be(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Be.p?Be.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},xe={},Ga=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ga(e[n]);return t}return e},Np=(e,t,n,r,o)=>{let s=Ga(e),i=xe[s]||(xe[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!xe[i]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=Op.exec(c.replace(kp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(qa," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(qa," ").trim();return f[0]})(e);xe[i]=Be(o?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&xe.g?xe.g:null;return n&&(xe.g=xe[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(xe[i],t,r,a),i},Dp=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":Be(a,""):a===!1?"":a}return r+o+(i??"")},"");function wn(e){let t=this||{},n=e.call?e(t.p):e;return Np(n.unshift?n.raw?Dp(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,Lp(t.target),t.g,t.o,t.k)}let Wa,Wr,Kr;wn.bind({g:1});let Ee=wn.bind({k:1});function Ip(e,t,n,r){Be.p=t,Wa=e,Wr=n,Kr=r}function Fe(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),l=a.className||o.className;n.p=Object.assign({theme:Wr&&Wr()},a),n.o=/ *go\d+/.test(l),a.className=wn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Kr&&c[0]&&Kr(a),Wa(c,a)}return t?t(o):o}}var Vp=e=>typeof e=="function",_n=(e,t)=>Vp(e)?e(t):e,Bp=(()=>{let e=0;return()=>(++e).toString()})(),Ka=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Fp=20,Ha=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Fp)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return Ha(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},xn=[],et={toasts:[],pausedAt:void 0},tt=e=>{et=Ha(et,e),xn.forEach(t=>{t(et)})},$p={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},jp=(e={})=>{let[t,n]=g.useState(et),r=g.useRef(et);g.useEffect(()=>(r.current!==et&&n(et),xn.push(n),()=>{let s=xn.indexOf(n);s>-1&&xn.splice(s,1)}),[]);let o=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||$p[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:o}},zp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Bp()}),Gt=e=>(t,n)=>{let r=zp(t,e,n);return tt({type:2,toast:r}),r.id},$=(e,t)=>Gt("blank")(e,t);$.error=Gt("error"),$.success=Gt("success"),$.loading=Gt("loading"),$.custom=Gt("custom"),$.dismiss=e=>{tt({type:3,toastId:e})},$.remove=e=>tt({type:4,toastId:e}),$.promise=(e,t,n)=>{let r=$.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(o=>{let s=t.success?_n(t.success,o):void 0;return s?$.success(s,{id:r,...n,...n==null?void 0:n.success}):$.dismiss(r),o}).catch(o=>{let s=t.error?_n(t.error,o):void 0;s?$.error(s,{id:r,...n,...n==null?void 0:n.error}):$.dismiss(r)}),e};var Up=(e,t)=>{tt({type:1,toast:{id:e,height:t}})},Rp=()=>{tt({type:5,time:Date.now()})},Wt=new Map,Xp=1e3,qp=(e,t=Xp)=>{if(Wt.has(e))return;let n=setTimeout(()=>{Wt.delete(e),tt({type:4,toastId:e})},t);Wt.set(e,n)},Gp=e=>{let{toasts:t,pausedAt:n}=jp(e);g.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&$.dismiss(a.id);return}return setTimeout(()=>$.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=g.useCallback(()=>{n&&tt({type:6,time:Date.now()})},[n]),o=g.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(h=>(h.position||c)===(s.position||c)&&h.height),d=u.findIndex(h=>h.id===s.id),f=u.filter((h,p)=>p<d&&h.visible).length;return u.filter(h=>h.visible).slice(...a?[f+1]:[0,f]).reduce((h,p)=>h+(p.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(s=>{if(s.dismissed)qp(s.id,s.removeDelay);else{let i=Wt.get(s.id);i&&(clearTimeout(i),Wt.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:Up,startPause:Rp,endPause:r,calculateOffset:o}}},Wp=Ee`
109
+ */const bo=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Co=g.createContext({});function lc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vn=typeof window<"u",cc=Vn?g.useLayoutEffect:g.useEffect,Bn=g.createContext(null),So=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uc(e=!0){const t=g.useContext(Bn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=g.useId();g.useEffect(()=>{if(e)return o(s)},[e]);const i=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}function Fn(e,t){e.indexOf(t)===-1&&e.push(t)}function $n(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ae=e=>e;let lt=ae,Pe=ae;process.env.NODE_ENV!=="production"&&(lt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Pe=(e,t)=>{if(!e)throw new Error(t)});const dc={useManualTiming:!1};function jn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ct=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class zn{constructor(){this.subscriptions=[]}add(t){return Fn(this.subscriptions,t),()=>$n(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const he=e=>e*1e3,Ce=e=>e/1e3;function wo(e,t){return t?e*(1e3/t):0}const _o=new Set;function rn(e,t,n){e||_o.has(t)||(console.warn(t),_o.add(t))}const fc=jn(()=>window.ScrollTimeline!==void 0);class hc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(fc()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class pc extends hc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Un(e,t){return e?e[t]||e.default||e:void 0}const Rn=2e4;function xo(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Rn;)t+=n,r=e.next(t);return t>=Rn?1/0:t}function Xn(e){return typeof e=="function"}function Eo(e,t){e.timeline=t,e.onfinish=null}const qn=e=>Array.isArray(e)&&typeof e[0]=="number",mc={linearEasing:void 0};function gc(e,t){const n=jn(e);return()=>{var r;return(r=mc[t])!==null&&r!==void 0?r:n()}}const on=gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),To=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(ct(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ao(e){return!!(typeof e=="function"&&on()||!e||typeof e=="string"&&(e in Gn||on())||qn(e)||Array.isArray(e)&&e.every(Ao))}const Et=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Gn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function Mo(e,t){if(e)return typeof e=="function"&&on()?To(e,t):qn(e)?Et(e):Array.isArray(e)?e.map(n=>Mo(n,t)||Gn.easeOut):Gn[e]}const sn=["read","resolveKeyframes","update","preRender","render","postRender"],Po={value:null};function yc(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Po.value&&Po.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const vc=40;function Lo(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=sn.reduce((b,C)=>(b[C]=yc(s,t?C:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,vc),1),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:sn.reduce((b,C)=>{const S=i[C];return b[C]=(_,w=!1,x=!1)=>(n||p(),S.schedule(_,w,x)),b},{}),cancel:b=>{for(let C=0;C<sn.length;C++)i[sn[C]].cancel(b)},state:o,steps:i}}const{schedule:F,cancel:Le,state:Y,steps:Wn}=Lo(typeof requestAnimationFrame<"u"?requestAnimationFrame:ae,!0),{schedule:Kn}=Lo(queueMicrotask,!1);let an;function bc(){an=void 0}const pe={now:()=>(an===void 0&&pe.set(Y.isProcessing||dc.useManualTiming?Y.timestamp:performance.now()),an),set:e=>{an=e,queueMicrotask(bc)}},de={x:!1,y:!1};function Oo(){return de.x||de.y}function Cc(e){return e==="x"||e==="y"?de[e]?null:(de[e]=!0,()=>{de[e]=!1}):de.x||de.y?null:(de.x=de.y=!0,()=>{de.x=de.y=!1})}function Sc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=(r=void 0)!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function ko(e,t){const n=Sc(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function No(e){return!(e.pointerType==="touch"||Oo())}function wc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{if(!No(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{No(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Do(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Io=(e,t)=>t?e===t?!0:Io(e,t.parentElement):!1,Hn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_c=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xc(e){return _c.has(e.tagName)||e.tabIndex!==-1}const Tt=new WeakSet;function Vo(e){return t=>{t.key==="Enter"&&e(t)}}function Zn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ec=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vo(()=>{if(Tt.has(n))return;Zn(n,"down");const o=Vo(()=>{Zn(n,"up")}),s=()=>Zn(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Bo(e){return Hn(e)&&!Oo()}function Tc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{const l=a.currentTarget;if(!l||!Bo(a)||Tt.has(l))return;Tt.add(l),Do(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Do(h,"release"),!(!Bo(h)||!Tt.has(l))&&(Tt.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?Ac(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||Io(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!xc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>Ec(c,o),o)}),s}function Ac(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Fo=30,Mc=e=>!isNaN(parseFloat(e));class Pc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=pe.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=pe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Mc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new zn);const r=this.events[t].add(n);return t==="change"?()=>{r(),F.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=pe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fo);return wo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function At(e,t){return new Pc(e,t)}const $o=g.createContext({strict:!1}),jo={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"]},ut={};for(const e in jo)ut[e]={isEnabled:t=>jo[e].some(n=>!!t[n])};function Lc(e){for(const t in e)ut[t]={...ut[t],...e[t]}}const Oc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ln(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Oc.has(e)}let zo=e=>!ln(e);function kc(e){e&&(zo=t=>t.startsWith("on")?!ln(t):e(t))}try{kc(require("@emotion/is-prop-valid").default)}catch{}function Nc(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(zo(o)||n===!0&&ln(o)||!t&&!ln(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Dc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const cn=g.createContext({});function un(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Mt(e){return typeof e=="string"||Array.isArray(e)}const Yn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Jn=["initial",...Yn];function dn(e){return un(e.animate)||Jn.some(t=>Mt(e[t]))}function Uo(e){return!!(dn(e)||e.variants)}function Ic(e,t){if(dn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Mt(n)?n:void 0,animate:Mt(r)?r:void 0}}return e.inherit!==!1?t:{}}function Vc(e){const{initial:t,animate:n}=Ic(e,g.useContext(cn));return g.useMemo(()=>({initial:t,animate:n}),[Ro(t),Ro(n)])}function Ro(e){return Array.isArray(e)?e.join(" "):e}const Bc=Symbol.for("motionComponentSymbol");function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Fc(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):dt(n)&&(n.current=r))},[t])}const Qn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xo="data-"+Qn("framerAppearId"),qo=g.createContext({});function $c(e,t,n,r,o){var s,i;const{visualElement:a}=g.useContext(cn),l=g.useContext($o),c=g.useContext(Bn),u=g.useContext(So).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=g.useContext(qo);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&jc(d.current,n,o,h);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[Xo],v=g.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return cc(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Kn.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),v.current=!1))}),f}function jc(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Go(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&dt(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Go(e){if(e)return e.options.allowProjection!==!1?e.projection:Go(e.parent)}function zc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&Lc(e);function a(c,u){let d;const f={...g.useContext(So),...c,layoutId:Uc(c)},{isStatic:h}=f,p=Vc(c),m=r(c,h);if(!h&&Vn){Rc(f,e);const v=Xc(f);d=v.MeasureLayout,p.visualElement=$c(o,m,f,t,v.ProjectionNode)}return y.jsxs(cn.Provider,{value:p,children:[d&&p.visualElement?y.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,Fc(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=g.forwardRef(a);return l[Bc]=o,l}function Uc({layoutId:e}){const t=g.useContext(Co).id;return t&&e!==void 0?t+"-"+e:e}function Rc(e,t){const n=g.useContext($o).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?lt(!1,r):Pe(!1,r)}}function Xc(e){const{drag:t,layout:n}=ut;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Wo=e=>t=>typeof t=="string"&&t.startsWith(e),er=Wo("--"),qc=Wo("var(--"),tr=e=>qc(e)?Gc.test(e.split("/*")[0].trim()):!1,Gc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Pt={};function Wc(e){for(const t in e)Pt[t]=e[t],er(t)&&(Pt[t].isCSSVariable=!0)}const ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ge=new Set(ft);function Ko(e,{layout:t,layoutId:n}){return Ge.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pt[e]||e==="opacity")}const te=e=>!!(e&&e.getVelocity),Ho=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Se=(e,t,n)=>n>t?t:n<e?e:n,ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Lt={...ht,transform:e=>Se(0,1,e)},fn={...ht,default:1},Ot=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Oe=Ot("deg"),me=Ot("%"),N=Ot("px"),Kc=Ot("vh"),Hc=Ot("vw"),Zo={...me,parse:e=>me.parse(e)/100,transform:e=>me.transform(e*100)},Zc={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,radius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,backgroundPositionX:N,backgroundPositionY:N},Yc={rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scale:fn,scaleX:fn,scaleY:fn,scaleZ:fn,skew:Oe,skewX:Oe,skewY:Oe,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:Lt,originX:Zo,originY:Zo,originZ:N},Yo={...ht,transform:Math.round},nr={...Zc,...Yc,zIndex:Yo,size:N,fillOpacity:Lt,strokeOpacity:Lt,numOctaves:Yo},Jc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qc=ft.length;function eu(e,t,n){let r="",o=!0;for(let s=0;s<Qc;s++){const i=ft[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Ho(a,nr[i]);if(!l){o=!1;const u=Jc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function rr(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ge.has(l)){i=!0;continue}else if(er(l)){o[l]=c;continue}else{const u=Ho(c,nr[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=eu(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const or=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Jo(e,t,n){for(const r in t)!te(t[r])&&!Ko(r,n)&&(e[r]=t[r])}function tu({transformTemplate:e},t){return g.useMemo(()=>{const n=or();return rr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function nu(e,t){const n=e.style||{},r={};return Jo(r,n,e),Object.assign(r,tu(e,t)),r}function ru(e,t){const n={},r=nu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ou=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sr(e){return typeof e!="string"||e.includes("-")?!1:!!(ou.indexOf(e)>-1||/[A-Z]/u.test(e))}const su={offset:"stroke-dashoffset",array:"stroke-dasharray"},iu={offset:"strokeDashoffset",array:"strokeDasharray"};function au(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?su:iu;e[s.offset]=N.transform(-r);const i=N.transform(t),a=N.transform(n);e[s.array]=`${i} ${a}`}function Qo(e,t,n){return typeof e=="string"?e:N.transform(t+n*e)}function lu(e,t,n){const r=Qo(t,e.x,e.width),o=Qo(n,e.y,e.height);return`${r} ${o}`}function ir(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(rr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=lu(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&au(f,i,a,l,!1)}const es=()=>({...or(),attrs:{}}),ar=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cu(e,t,n,r){const o=g.useMemo(()=>{const s=es();return ir(s,t,ar(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Jo(s,e.style,e),o.style={...s,...o.style}}return o}function uu(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(sr(n)?cu:ru)(r,s,i,n),c=Nc(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=g.useMemo(()=>te(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function ts(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function lr(e,t,n,r){if(typeof t=="function"){const[o,s]=ts(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ts(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const cr=e=>Array.isArray(e),du=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fu=e=>cr(e)?e[e.length-1]||0:e;function hn(e){const t=te(e)?e.get():e;return du(t)?t.toValue():t}function hu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:pu(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const ns=e=>(t,n)=>{const r=g.useContext(cn),o=g.useContext(Bn),s=()=>hu(e,t,r,o);return n?s():lc(s)};function pu(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=hn(s[f]);let{initial:i,animate:a}=e;const l=dn(e),c=Uo(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!un(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=lr(e,f[h]);if(p){const{transitionEnd:m,transition:v,...b}=p;for(const C in b){let S=b[C];if(Array.isArray(S)){const _=u?S.length-1:0;S=S[_]}S!==null&&(o[C]=S)}for(const C in m)o[C]=m[C]}}}return o}function ur(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(te(o[i])||t.style&&te(t.style[i])||Ko(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const mu={useVisualState:ns({scrapeMotionValuesFromProps:ur,createRenderState:or})};function rs(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function os(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ss=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function is(e,t,n,r){os(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ss.has(o)?o:Qn(o),t.attrs[o])}function as(e,t,n){const r=ur(e,t,n);for(const o in e)if(te(e[o])||te(t[o])){const s=ft.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const ls=["x","y","width","height","cx","cy","r"],gu={useVisualState:ns({scrapeMotionValuesFromProps:as,createRenderState:es,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Ge.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<ls.length;a++){const l=ls[a];e[l]!==t[l]&&(i=!0)}i&&F.read(()=>{rs(n,r),F.render(()=>{ir(r,o,ar(n.tagName),e.transformTemplate),is(n,r)})})}})};function yu(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...sr(r)?gu:mu,preloadedFeatures:e,useRender:uu(o),createVisualElement:t,Component:r};return zc(i)}}function kt(e,t,n){const r=e.getProps();return lr(r,t,n!==void 0?n:r.custom,e)}const cs=new Set(["width","height","top","left","right","bottom",...ft]);function vu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,At(n))}function bu(e,t){const n=kt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=fu(s[i]);vu(e,i,a)}}function Cu(e){return!!(te(e)&&e.add)}function dr(e,t){const n=e.getValue("willChange");if(Cu(n))return n.add(t)}function us(e){return e.props[Xo]}const ds=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Su=1e-7,wu=12;function _u(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=ds(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>Su&&++a<wu);return i}function Nt(e,t,n,r){if(e===t&&n===r)return ae;const o=s=>_u(s,0,1,e,n);return s=>s===0||s===1?s:ds(o(s),t,r)}const fs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hs=e=>t=>1-e(1-t),ps=Nt(.33,1.53,.69,.99),fr=hs(ps),ms=fs(fr),gs=e=>(e*=2)<1?.5*fr(e):.5*(2-Math.pow(2,-10*(e-1))),hr=e=>1-Math.sin(Math.acos(e)),ys=hs(hr),vs=fs(hr),bs=e=>/^0[^.\s]+$/u.test(e);function xu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bs(e):!0}const Dt=e=>Math.round(e*1e5)/1e5,pr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Eu(e){return e==null}const Tu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mr=(e,t)=>n=>!!(typeof n=="string"&&Tu.test(n)&&n.startsWith(e)||t&&!Eu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cs=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(pr);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Au=e=>Se(0,255,e),gr={...ht,transform:e=>Math.round(Au(e))},We={test:mr("rgb","red"),parse:Cs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+gr.transform(e)+", "+gr.transform(t)+", "+gr.transform(n)+", "+Dt(Lt.transform(r))+")"};function Mu(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const yr={test:mr("#"),parse:Mu,transform:We.transform},pt={test:mr("hsl","hue"),parse:Cs("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+me.transform(Dt(t))+", "+me.transform(Dt(n))+", "+Dt(Lt.transform(r))+")"},ne={test:e=>We.test(e)||yr.test(e)||pt.test(e),parse:e=>We.test(e)?We.parse(e):pt.test(e)?pt.parse(e):yr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?We.transform(e):pt.transform(e)},Pu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Lu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Pu))===null||n===void 0?void 0:n.length)||0)>0}const Ss="number",ws="color",Ou="var",ku="var(",_s="${}",Nu=/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 It(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(Nu,l=>(ne.test(l)?(r.color.push(s),o.push(ws),n.push(ne.parse(l))):l.startsWith(ku)?(r.var.push(s),o.push(Ou),n.push(l)):(r.number.push(s),o.push(Ss),n.push(parseFloat(l))),++s,_s)).split(_s);return{values:n,split:a,indexes:r,types:o}}function xs(e){return It(e).values}function Es(e){const{split:t,types:n}=It(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Ss?s+=Dt(o[i]):a===ws?s+=ne.transform(o[i]):s+=o[i]}return s}}const Du=e=>typeof e=="number"?0:e;function Iu(e){const t=xs(e);return Es(e)(t.map(Du))}const ke={test:Lu,parse:xs,createTransformer:Es,getAnimatableNone:Iu},Vu=new Set(["brightness","contrast","saturate","opacity"]);function Bu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(pr)||[];if(!r)return e;const o=n.replace(r,"");let s=Vu.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const Fu=/\b([a-z-]*)\(.*?\)/gu,vr={...ke,getAnimatableNone:e=>{const t=e.match(Fu);return t?t.map(Bu).join(" "):e}},$u={...nr,color:ne,backgroundColor:ne,outlineColor:ne,fill:ne,stroke:ne,borderColor:ne,borderTopColor:ne,borderRightColor:ne,borderBottomColor:ne,borderLeftColor:ne,filter:vr,WebkitFilter:vr},Ts=e=>$u[e];function As(e,t){let n=Ts(e);return n!==vr&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ju=new Set(["auto","none","0"]);function zu(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!ju.has(s)&&It(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=As(n,o)}const Ke=e=>e*180/Math.PI,br=e=>{const t=Ke(Math.atan2(e[1],e[0]));return Cr(t)},Uu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:br,rotateZ:br,skewX:e=>Ke(Math.atan(e[1])),skewY:e=>Ke(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cr=e=>(e=e%360,e<0&&(e+=360),e),Ms=br,Ps=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ls=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ru={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ps,scaleY:Ls,scale:e=>(Ps(e)+Ls(e))/2,rotateX:e=>Cr(Ke(Math.atan2(e[6],e[5]))),rotateY:e=>Cr(Ke(Math.atan2(-e[2],e[0]))),rotateZ:Ms,rotate:Ms,skewX:e=>Ke(Math.atan(e[4])),skewY:e=>Ke(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Os(e){return e.includes("scale")?1:0}function Sr(e,t){if(!e||e==="none")return Os(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Ru,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Uu,o=a}if(!o)return Os(t);const s=r[t],i=o[1].split(",").map(qu);return typeof s=="function"?s(i):i[s]}const Xu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Sr(n,t)};function qu(e){return parseFloat(e.trim())}const ks=e=>e===ht||e===N,Gu=new Set(["x","y","z"]),Wu=ft.filter(e=>!Gu.has(e));function Ku(e){const t=[];return Wu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Sr(t,"x"),y:(e,{transform:t})=>Sr(t,"y")};mt.translateX=mt.x,mt.translateY=mt.y;const He=new Set;let wr=!1,_r=!1;function Ns(){if(_r){const e=Array.from(He).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Ku(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_r=!1,wr=!1,He.forEach(e=>e.complete()),He.clear()}function Ds(){He.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_r=!0)})}function Hu(){Ds(),Ns()}class xr{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(He.add(this),wr||(wr=!0,F.read(Ds),F.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),He.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,He.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Is=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Zu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Yu(e){const t=Zu.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Ju=4;function Vs(e,t,n=1){Pe(n<=Ju,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Yu(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Is(i)?parseFloat(i):i}return tr(o)?Vs(o,t,n+1):o}const Bs=e=>t=>t.test(e),Fs=[ht,N,me,Oe,Hc,Kc,{test:e=>e==="auto",parse:e=>e}],$s=e=>Fs.find(Bs(e));class js extends xr{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),tr(c))){const u=Vs(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!cs.has(r)||t.length!==2)return;const[o,s]=t,i=$s(o),a=$s(s);if(i!==a)if(ks(i)&&ks(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)xu(t[o])&&r.push(o);r.length&&zu(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const zs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function Qu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ed(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=zs(o,t),a=zs(s,t);return lt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:Qu(e)||(n==="spring"||Xn(n))&&r}const td=e=>e!==null;function pn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(td),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const nd=40;class Us{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=pe.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>nd?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Hu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=pe.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!ed(t,r,o,s))if(i)this.options.duration=0;else{l&&l(pn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const z=(e,t,n)=>e+(t-e)*n;function Er(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rd({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Er(l,a,e+1/3),s=Er(l,a,e),i=Er(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function mn(e,t){return n=>n>0?t:e}const Tr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},od=[yr,We,pt],sd=e=>od.find(t=>t.test(e));function Rs(e){const t=sd(e);if(lt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===pt&&(n=rd(n)),n}const Xs=(e,t)=>{const n=Rs(e),r=Rs(t);if(!n||!r)return mn(e,t);const o={...n};return s=>(o.red=Tr(n.red,r.red,s),o.green=Tr(n.green,r.green,s),o.blue=Tr(n.blue,r.blue,s),o.alpha=z(n.alpha,r.alpha,s),We.transform(o))},id=(e,t)=>n=>t(e(n)),Vt=(...e)=>e.reduce(id),Ar=new Set(["none","hidden"]);function ad(e,t){return Ar.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ld(e,t){return n=>z(e,t,n)}function Mr(e){return typeof e=="number"?ld:typeof e=="string"?tr(e)?mn:ne.test(e)?Xs:dd:Array.isArray(e)?qs:typeof e=="object"?ne.test(e)?Xs:cd:mn}function qs(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Mr(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function cd(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Mr(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function ud(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const dd=(e,t)=>{const n=ke.createTransformer(t),r=It(e),o=It(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ar.has(e)&&!o.values.length||Ar.has(t)&&!r.values.length?ad(e,t):Vt(qs(ud(r,o),o.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),mn(e,t))};function Gs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?z(e,t,n):Mr(e)(e,t)}const fd=5;function Ws(e,t,n){const r=Math.max(t-fd,0);return wo(n-e(r),t-r)}const U={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},Ks=.001;function hd({duration:e=U.duration,bounce:t=U.bounce,velocity:n=U.velocity,mass:r=U.mass}){let o,s;lt(e<=he(U.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Se(U.minDamping,U.maxDamping,i),e=Se(U.minDuration,U.maxDuration,Ce(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Pr(c,i),p=Math.exp(-d);return Ks-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Pr(Math.pow(c,2),i);return(-o(c)+Ks>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=md(o,s,a);if(e=he(e),isNaN(l))return{stiffness:U.stiffness,damping:U.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const pd=12;function md(e,t,n){let r=n;for(let o=1;o<pd;o++)r=r-e(r)/t(r);return r}function Pr(e,t){return e*Math.sqrt(1-t*t)}const gd=["duration","bounce"],yd=["stiffness","damping","mass"];function Hs(e,t){return t.some(n=>e[n]!==void 0)}function vd(e){let t={velocity:U.velocity,stiffness:U.stiffness,damping:U.damping,mass:U.mass,isResolvedFromDuration:!1,...e};if(!Hs(e,yd)&&Hs(e,gd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Se(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:U.mass,stiffness:o,damping:s}}else{const n=hd(e);t={...t,...n,mass:U.mass},t.isResolvedFromDuration=!0}return t}function Zs(e=U.visualDuration,t=U.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=vd({...n,velocity:-Ce(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),v=i-s,b=Ce(Math.sqrt(l/u)),C=Math.abs(v)<5;r||(r=C?U.restSpeed.granular:U.restSpeed.default),o||(o=C?U.restDelta.granular:U.restDelta.default);let S;if(m<1){const w=Pr(b,m);S=x=>{const A=Math.exp(-m*b*x);return i-A*((p+m*b*v)/w*Math.sin(w*x)+v*Math.cos(w*x))}}else if(m===1)S=w=>i-Math.exp(-b*w)*(v+(p+b*v)*w);else{const w=b*Math.sqrt(m*m-1);S=x=>{const A=Math.exp(-m*b*x),T=Math.min(w*x,300);return i-A*((p+m*b*v)*Math.sinh(T)+w*v*Math.cosh(T))/w}}const _={calculatedDuration:h&&d||null,next:w=>{const x=S(w);if(h)a.done=w>=d;else{let A=0;m<1&&(A=w===0?he(p):Ws(S,w,x));const T=Math.abs(A)<=r,O=Math.abs(i-x)<=o;a.done=T&&O}return a.value=a.done?i:x,a},toString:()=>{const w=Math.min(xo(_),Rn),x=To(A=>_.next(w*A).value,w,30);return w+"ms "+x}};return _}function Ys({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*t;const v=d+m,b=i===void 0?v:i(v);b!==v&&(m=b-d);const C=T=>-m*Math.exp(-T/r),S=T=>b+C(T),_=T=>{const O=C(T),P=S(T);f.done=Math.abs(O)<=c,f.value=f.done?b:P};let w,x;const A=T=>{h(f.value)&&(w=T,x=Zs({keyframes:[f.value,p(f.value)],velocity:Ws(S,T,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:T=>{let O=!1;return!x&&w===void 0&&(O=!0,_(T),A(T)),w!==void 0&&T>=w?x.next(T-w):(!O&&_(T),f)}}}const bd=Nt(.42,0,1,1),Cd=Nt(0,0,.58,1),Js=Nt(.42,0,.58,1),Sd=e=>Array.isArray(e)&&typeof e[0]!="number",Qs={linear:ae,easeIn:bd,easeInOut:Js,easeOut:Cd,circIn:hr,circInOut:vs,circOut:ys,backIn:fr,backInOut:ms,backOut:ps,anticipate:gs},ei=e=>{if(qn(e)){Pe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Nt(t,n,r,o)}else if(typeof e=="string")return Pe(Qs[e]!==void 0,`Invalid easing type '${e}'`),Qs[e];return e};function wd(e,t,n){const r=[],o=n||Gs,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||ae:t;a=Vt(l,a)}r.push(a)}return r}function _d(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Pe(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=wd(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Se(e[0],e[s-1],u)):c}function xd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ct(0,t,r);e.push(z(n,1,o))}}function Ed(e){const t=[0];return xd(t,e.length-1),t}function Td(e,t){return e.map(n=>n*t)}function Ad(e,t){return e.map(()=>t||Js).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Sd(r)?r.map(ei):ei(r),s={done:!1,value:t[0]},i=Td(n&&n.length===t.length?n:Ed(t),e),a=_d(i,t,{ease:Array.isArray(o)?o:Ad(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Md=e=>{const t=({timestamp:n})=>e(n);return{start:()=>F.update(t,!0),stop:()=>Le(t),now:()=>Y.isProcessing?Y.timestamp:pe.now()}},Pd={decay:Ys,inertia:Ys,tween:Bt,keyframes:Bt,spring:Zs},Ld=e=>e/100;class Lr extends Us{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||xr,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=Xn(n)?n:Pd[n]||Bt;let l,c;process.env.NODE_ENV!=="production"&&a!==Bt&&Pe(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Bt&&typeof t[0]!="number"&&(l=Vt(Ld,Gs(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=xo(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-f*(this.speed>=0?1:-1),C=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,_=s;if(h){const T=Math.min(this.currentTime,u)/d;let O=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(p==="reverse"?(P=1-P,m&&(P-=m/d)):p==="mirror"&&(_=i)),S=Se(0,1,P)*d}const w=C?{done:!1,value:l[0]}:_.next(S);a&&(w.value=a(w.value));let{done:x}=w;!C&&c!==null&&(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&x);return A&&o!==void 0&&(w.value=pn(l,this.options,o)),v&&v(w.value),A&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Ce(t.calculatedDuration):0}get time(){return Ce(this.currentTime)}set time(t){t=he(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ce(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Md,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Od=new Set(["opacity","clipPath","filter","transform"]);function kd(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Mo(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Nd=jn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),gn=10,Dd=2e4;function Id(e){return Xn(e.type)||e.type==="spring"||!Ao(e.ease)}function Vd(e,t){const n=new Lr({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<Dd;)r=n.sample(s),o.push(r.value),s+=gn;return{times:void 0,keyframes:o,duration:s-gn,ease:"linear"}}const ti={anticipate:gs,backInOut:ms,circInOut:vs};function Bd(e){return e in ti}class ni extends Us{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new js(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&on()&&Bd(s)&&(s=ti[s]),Id(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,v=Vd(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=kd(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Eo(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(pn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ce(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ce(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=he(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ae;const{animation:r}=n;Eo(r,t)}return ae}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new Lr({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=he(this.time);c.setWithVelocity(p.sample(m-gn).value,p.sample(m).value,gn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Nd()&&r&&Od.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const Fd={type:"spring",stiffness:500,damping:25,restSpeed:10},$d=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jd={type:"keyframes",duration:.8},zd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ud=(e,{keyframes:t})=>t.length>2?jd:Ge.has(e)?e.startsWith("scale")?$d(t[1]):Fd:zd;function Rd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Or=(e,t,n,r={},o,s)=>i=>{const a=Un(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-he(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};Rd(a)||(u={...u,...Ud(e,u)}),u.duration&&(u.duration=he(u.duration)),u.repeatDelay&&(u.repeatDelay=he(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=pn(u.keyframes,a);if(f!==void 0)return F.update(()=>{u.onUpdate(f),u.onComplete()}),new pc([])}return!s&&ni.supports(u)?new ni(u):new Lr(u)};function Xd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ri(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&Xd(u,d))continue;const p={delay:n,...Un(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=us(e);if(b){const C=window.MotionHandoffAnimation(b,d,F);C!==null&&(p.startTime=C,m=!0)}}dr(e,d),f.start(Or(d,f,h,e.shouldReduceMotion&&cs.has(d)?{type:!1}:p,e,m));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{F.update(()=>{a&&bu(e,a)})}),c}function kr(e,t,n={}){var r;const o=kt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(ri(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return qd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function qd(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(Gd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(kr(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Gd(e,t){return e.sortNodePosition(t)}function Wd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>kr(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=kr(e,t,n);else{const o=typeof t=="function"?kt(e,t,n.custom):t;r=Promise.all(ri(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function oi(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Kd=Jn.length;function si(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?si(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kd;n++){const r=Jn[n],o=e.props[r];(Mt(o)||o===!1)&&(t[r]=o)}return t}const Hd=[...Yn].reverse(),Zd=Yn.length;function Yd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Wd(e,n,r)))}function Jd(e){let t=Yd(e),n=ii(),r=!0;const o=l=>(c,u)=>{var d;const f=kt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=si(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<Zd;v++){const b=Hd[v],C=n[b],S=c[b]!==void 0?c[b]:u[b],_=Mt(S),w=b===l?C.isActive:null;w===!1&&(p=v);let x=S===u[b]&&S!==c[b]&&_;if(x&&r&&e.manuallyAnimateOnMount&&(x=!1),C.protectedKeys={...h},!C.isActive&&w===null||!S&&!C.prevProp||un(S)||typeof S=="boolean")continue;const A=Qd(C.prevProp,S);let T=A||b===l&&C.isActive&&!x&&_||v>p&&_,O=!1;const P=Array.isArray(S)?S:[S];let V=P.reduce(o(b),{});w===!1&&(V={});const{prevResolvedValues:q={}}=C,se={...q,...V},ie=L=>{T=!0,f.has(L)&&(O=!0,f.delete(L)),C.needsAnimating[L]=!0;const D=e.getValue(L);D&&(D.liveStyle=!1)};for(const L in se){const D=V[L],B=q[L];if(h.hasOwnProperty(L))continue;let G=!1;cr(D)&&cr(B)?G=!oi(D,B):G=D!==B,G?D!=null?ie(L):f.add(L):D!==void 0&&f.has(L)?ie(L):C.protectedKeys[L]=!0}C.prevProp=S,C.prevResolvedValues=V,C.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(x&&A)||O)&&d.push(...P.map(L=>({animation:L,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=kt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const C=e.getBaseTarget(b),S=e.getValue(b);S&&(S.liveStyle=!0),v[b]=C??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ii(),r=!0}}}function Qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oi(t,e):!1}function Ze(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ii(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class Ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ef extends Ne{constructor(t){super(t),t.animationState||(t.animationState=Jd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();un(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let tf=0;class nf extends Ne{constructor(){super(...arguments),this.id=tf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const rf={animation:{Feature:ef},exit:{Feature:nf}};function Ft(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $t(e){return{point:{x:e.pageX,y:e.pageY}}}const of=e=>t=>Hn(t)&&e(t,$t(t));function jt(e,t,n,r){return Ft(e,t,of(n),r)}function ai({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function af(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const li=1e-4,lf=1-li,cf=1+li,ci=.01,uf=0-ci,df=0+ci;function re(e){return e.max-e.min}function ff(e,t,n){return Math.abs(e-t)<=n}function ui(e,t,n,r=.5){e.origin=r,e.originPoint=z(t.min,t.max,e.origin),e.scale=re(n)/re(t),e.translate=z(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lf&&e.scale<=cf||isNaN(e.scale))&&(e.scale=1),(e.translate>=uf&&e.translate<=df||isNaN(e.translate))&&(e.translate=0)}function zt(e,t,n,r){ui(e.x,t.x,n.x,r?r.originX:void 0),ui(e.y,t.y,n.y,r?r.originY:void 0)}function di(e,t,n){e.min=n.min+t.min,e.max=e.min+re(t)}function hf(e,t,n){di(e.x,t.x,n.x),di(e.y,t.y,n.y)}function fi(e,t,n){e.min=t.min-n.min,e.max=e.min+re(t)}function Ut(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}const hi=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:hi(),y:hi()}),pi=()=>({min:0,max:0}),X=()=>({x:pi(),y:pi()});function ce(e){return[e("x"),e("y")]}function Nr(e){return e===void 0||e===1}function Dr({scale:e,scaleX:t,scaleY:n}){return!Nr(e)||!Nr(t)||!Nr(n)}function Ye(e){return Dr(e)||mi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mi(e){return gi(e.x)||gi(e.y)}function gi(e){return e&&e!=="0%"}function yn(e,t,n){const r=e-n,o=t*r;return n+o}function yi(e,t,n,r,o){return o!==void 0&&(e=yn(e,o,r)),yn(e,n,r)+t}function Ir(e,t=0,n=1,r,o){e.min=yi(e.min,t,n,r,o),e.max=yi(e.max,t,n,r,o)}function vi(e,{x:t,y:n}){Ir(e.x,t.translate,t.scale,t.originPoint),Ir(e.y,n.translate,n.scale,n.originPoint)}const bi=.999999999999,Ci=1.0000000000001;function pf(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,vi(e,i)),r&&Ye(s.latestValues)&&vt(e,s.latestValues))}t.x<Ci&&t.x>bi&&(t.x=1),t.y<Ci&&t.y>bi&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function Si(e,t,n,r,o=.5){const s=z(e.min,e.max,o);Ir(e,t,n,s,r)}function vt(e,t){Si(e.x,t.x,t.scaleX,t.scale,t.originX),Si(e.y,t.y,t.scaleY,t.scale,t.originY)}function wi(e,t){return ai(af(e.getBoundingClientRect(),t))}function mf(e,t,n){const r=wi(e,n),{scroll:o}=t;return o&&(yt(r.x,o.offset.x),yt(r.y,o.offset.y)),r}const _i=({current:e})=>e?e.ownerDocument.defaultView:null,xi=(e,t)=>Math.abs(e-t);function gf(e,t){const n=xi(e.x,t.x),r=xi(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ei{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Br(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=gf(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Y;this.history.push({...p,timestamp:m});const{onStart:v,onMove:b}=this.handlers;f||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Vr(f,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Br(d.type==="pointercancel"?this.lastMoveEventInfo:Vr(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,v),p&&p(d,v)},!Hn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=$t(t),a=Vr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Y;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Br(a,this.history)),this.removeListeners=Vt(jt(this.contextWindow,"pointermove",this.handlePointerMove),jt(this.contextWindow,"pointerup",this.handlePointerUp),jt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Le(this.updatePoint)}}function Vr(e,t){return t?{point:t(e.point)}:e}function Ti(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Br({point:e},t){return{point:e,delta:Ti(e,Ai(t)),offset:Ti(e,yf(t)),velocity:vf(t,.1)}}function yf(e){return e[0]}function Ai(e){return e[e.length-1]}function vf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ai(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>he(t)));)n--;if(!r)return{x:0,y:0};const s=Ce(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function bf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?z(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?z(n,e,r.max):Math.min(e,n)),e}function Mi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Cf(e,{top:t,left:n,bottom:r,right:o}){return{x:Mi(e.x,n,o),y:Mi(e.y,t,r)}}function Pi(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Sf(e,t){return{x:Pi(e.x,t.x),y:Pi(e.y,t.y)}}function wf(e,t){let n=.5;const r=re(e),o=re(t);return o>r?n=ct(t.min,t.max-r,e.min):r>o&&(n=ct(e.min,e.max-o,t.min)),Se(0,1,n)}function _f(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Fr=.35;function xf(e=Fr){return e===!1?e=0:e===!0&&(e=Fr),{x:Li(e,"left","right"),y:Li(e,"top","bottom")}}function Li(e,t,n){return{min:Oi(e,t),max:Oi(e,n)}}function Oi(e,t){return typeof e=="number"?e:e[t]||0}const Ef=new WeakMap;class Tf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=X(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($t(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Cc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ce(v=>{let b=this.getAxisMotionValue(v).get()||0;if(me.test(b)){const{projection:C}=this.visualElement;if(C&&C.layout){const S=C.layout.layoutBox[v];S&&(b=re(S)*(parseFloat(b)/100))}}this.originPoint[v]=b}),p&&F.postRender(()=>p(u,d)),dr(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=Af(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>ce(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ei(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:_i(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&F.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!vn(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=bf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=Cf(o.layoutBox,n):this.constraints=!1,this.elastic=xf(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ce(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=_f(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current;Pe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=mf(r,o.root,this.visualElement.getTransformPagePoint());let i=Sf(o.layout.layoutBox,s);if(n){const a=n(sf(i));this.hasMutatedConstraints=!!a,a&&(i=ai(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ce(u=>{if(!vn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return dr(this.visualElement,t),r.start(Or(t,r,0,n,this.visualElement,!1))}stopAnimation(){ce(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ce(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ce(n=>{const{drag:r}=this.getProps();if(!vn(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-z(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ce(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=wf({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ce(i=>{if(!vn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(z(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Ef.set(this.visualElement,this);const t=this.visualElement.current,n=jt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.read(r);const i=Ft(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ce(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Fr,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function vn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Af(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Mf extends Ne{constructor(t){super(t),this.removeGroupControls=ae,this.removeListeners=ae,this.controls=new Tf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ae}unmount(){this.removeGroupControls(),this.removeListeners()}}const ki=e=>(t,n)=>{e&&F.postRender(()=>e(t,n))};class Pf extends Ne{constructor(){super(...arguments),this.removePointerDownListener=ae}onPointerDown(t){this.session=new Ei(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_i(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ki(t),onStart:ki(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&F.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=jt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const bn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ni(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(N.test(e))e=parseFloat(e);else return e;const n=Ni(e,t.target.x),r=Ni(e,t.target.y);return`${n}% ${r}%`}},Lf={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ke.parse(e);if(o.length>5)return r;const s=ke.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=z(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class Of extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;Wc(kf),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),bn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||F.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Kn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Di(e){const[t,n]=uc(),r=g.useContext(Co);return y.jsx(Of,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(qo),isPresent:t,safeToRemove:n})}const kf={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:Lf};function Nf(e,t,n){const r=te(e)?e:At(e);return r.start(Or("",r,t,n)),r.animation}function Df(e){return e instanceof SVGElement&&e.tagName!=="svg"}const If=(e,t)=>e.depth-t.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(t){Fn(this.children,t),this.isDirty=!0}remove(t){$n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(If),this.isDirty=!1,this.children.forEach(t)}}function Bf(e,t){const n=pe.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Le(r),e(s-t))};return F.read(r,!0),()=>Le(r)}const Ii=["TopLeft","TopRight","BottomLeft","BottomRight"],Ff=Ii.length,Vi=e=>typeof e=="string"?parseFloat(e):e,Bi=e=>typeof e=="number"||N.test(e);function $f(e,t,n,r,o,s){o?(e.opacity=z(0,n.opacity!==void 0?n.opacity:1,jf(r)),e.opacityExit=z(t.opacity!==void 0?t.opacity:1,0,zf(r))):s&&(e.opacity=z(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<Ff;i++){const a=`border${Ii[i]}Radius`;let l=Fi(t,a),c=Fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Bi(l)===Bi(c)?(e[a]=Math.max(z(Vi(l),Vi(c),r),0),(me.test(c)||me.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=z(t.rotate||0,n.rotate||0,r))}function Fi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const jf=$i(0,.5,ys),zf=$i(.5,.95,ae);function $i(e,t,n){return r=>r<e?0:r>t?1:n(ct(e,t,r))}function ji(e,t){e.min=t.min,e.max=t.max}function ue(e,t){ji(e.x,t.x),ji(e.y,t.y)}function zi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ui(e,t,n,r,o){return e-=t,e=yn(e,1/n,r),o!==void 0&&(e=yn(e,1/o,r)),e}function Uf(e,t=0,n=1,r=.5,o,s=e,i=e){if(me.test(t)&&(t=parseFloat(t),t=z(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=z(s.min,s.max,r);e===s&&(a-=t),e.min=Ui(e.min,t,n,a,o),e.max=Ui(e.max,t,n,a,o)}function Ri(e,t,[n,r,o],s,i){Uf(e,t[n],t[r],t[o],t.scale,s,i)}const Rf=["x","scaleX","originX"],Xf=["y","scaleY","originY"];function Xi(e,t,n,r){Ri(e.x,t,Rf,n?n.x:void 0,r?r.x:void 0),Ri(e.y,t,Xf,n?n.y:void 0,r?r.y:void 0)}function qi(e){return e.translate===0&&e.scale===1}function Gi(e){return qi(e.x)&&qi(e.y)}function Wi(e,t){return e.min===t.min&&e.max===t.max}function qf(e,t){return Wi(e.x,t.x)&&Wi(e.y,t.y)}function Ki(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hi(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Zi(e){return re(e.x)/re(e.y)}function Yi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Gf{constructor(){this.members=[]}add(t){Fn(this.members,t),t.scheduleRender()}remove(t){if($n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Wf(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $r=["","X","Y","Z"],Kf={visibility:"hidden"},Ji=1e3;let Hf=0;function jr(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Qi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=us(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",F,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Qi(r)}function ea({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Hf++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Jf),this.nodes.forEach(rh),this.nodes.forEach(oh),this.nodes.forEach(Qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,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 Vf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new zn),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Df(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Bf(f,250),bn.hasAnimatedSinceResize&&(bn.hasAnimatedSinceResize=!1,this.nodes.forEach(na))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||ch,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),C=!this.targetLayout||!Hi(this.targetLayout,p),S=!f&&h;if(this.options.layoutRoot||this.resumeFrom||S||f&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const _={...Un(m,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else f||na(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Le(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(sh),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.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(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ta);return}this.isUpdating||this.nodes.forEach(th),this.isUpdating=!1,this.nodes.forEach(nh),this.nodes.forEach(Zf),this.nodes.forEach(Yf),this.clearAllSnapshots();const a=pe.now();Y.delta=Se(0,1e3/60,a-Y.timestamp),Y.timestamp=a,Y.isProcessing=!0,Wn.update.process(Y),Wn.preRender.process(Y),Wn.render.process(Y),Y.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Kn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eh),this.sharedNodes.forEach(ih)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!re(this.snapshot.measuredBox.x)&&!re(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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=X(),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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ye(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),uh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return X();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(dh))){const{scroll:u}=this.root;u&&(yt(l.x,u.offset.x),yt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=X();if(ue(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ue(l,i),yt(l.x,d.offset.x),yt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=X();ue(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ye(u.latestValues)&&vt(l,u.latestValues)}return Ye(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=X();ue(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ye(c.latestValues))continue;Dr(c.latestValues)&&c.updateSnapshot();const u=X(),d=c.measurePageBox();ue(u,d),Xi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ye(this.latestValues)&&Xi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==Y.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!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(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Y.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),Ut(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=X(),this.targetWithTransforms=X()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ue(this.target,this.layout.layoutBox),vi(this.target,this.targetDelta)):ue(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),Ut(this.relativeTargetOrigin,this.target,h.target),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Dr(this.parent.latestValues)||mi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Y.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=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||d))return;ue(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;pf(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=X());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),zt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Yi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Yi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gt(),this.projectionDelta=gt(),this.projectionDeltaWithTransform=gt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=X(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),b=!v||v.members.length<=1,C=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(lh));this.animationProgress=0;let S;this.mixTargetDelta=_=>{const w=_/1e3;ra(d.x,i.x,w),ra(d.y,i.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ut(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ah(this.relativeTarget,this.relativeTargetOrigin,f,w),S&&qf(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=X()),ue(S,this.relativeTarget)),m&&(this.animationValues=u,$f(u,c,this.latestValues,w,C,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Le(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{bn.hasAnimatedSinceResize=!0,this.currentAnimation=Nf(0,Ji,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ji),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&la(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||X();const d=re(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=re(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}ue(a,l),vt(a,u),zt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Gf),this.sharedNodes.get(i).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 i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&jr("z",i,c,this.animationValues);for(let u=0;u<$r.length;u++)jr(`rotate${$r[u]}`,i,c,this.animationValues),jr(`skew${$r[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Kf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=hn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=hn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ye(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Wf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Pt){if(f[m]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:C}=Pt[m],S=c.transform==="none"?f[m]:v(f[m],d);if(b){const _=b.length;for(let w=0;w<_;w++)c[b[w]]=S}else C?this.options.visualElement.renderState.vars[m]=S:c[m]=S}return this.options.layoutId&&(c.pointerEvents=d===this?hn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ta),this.root.sharedNodes.clear()}}}function Zf(e){e.updateLayout()}function Yf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?ce(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=re(f);f.min=r[d].min,f.max=f.min+h}):la(s,n.layoutBox,r)&&ce(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=re(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=gt();zt(a,r,n.layoutBox);const l=gt();i?zt(l,e.applyTransform(o,!0),n.measuredBox):zt(l,r,n.layoutBox);const c=!Gi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=X();Ut(p,n.layoutBox,f.layoutBox);const m=X();Ut(m,r,h.layoutBox),Hi(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Jf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eh(e){e.clearSnapshot()}function ta(e){e.clearMeasurements()}function th(e){e.isLayoutDirty=!1}function nh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function na(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rh(e){e.resolveTargetDelta()}function oh(e){e.calcProjection()}function sh(e){e.resetSkewAndRotation()}function ih(e){e.removeLeadSnapshot()}function ra(e,t,n){e.translate=z(t.translate,0,n),e.scale=z(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oa(e,t,n,r){e.min=z(t.min,n.min,r),e.max=z(t.max,n.max,r)}function ah(e,t,n,r){oa(e.x,t.x,n.x,r),oa(e.y,t.y,n.y,r)}function lh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ch={duration:.45,ease:[.4,0,.1,1]},sa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ia=sa("applewebkit/")&&!sa("chrome/")?Math.round:ae;function aa(e){e.min=ia(e.min),e.max=ia(e.max)}function uh(e){aa(e.x),aa(e.y)}function la(e,t,n){return e==="position"||e==="preserve-aspect"&&!ff(Zi(t),Zi(n),.2)}function dh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const fh=ea({attachResizeListener:(e,t)=>Ft(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zr={current:void 0},ca=ea({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zr.current){const e=new fh({});e.mount(window),e.setOptions({layoutScroll:!0}),zr.current=e}return zr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hh={pan:{Feature:Pf},drag:{Feature:Mf,ProjectionNode:ca,MeasureLayout:Di}};function ua(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&F.postRender(()=>s(t,$t(t)))}class ph extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=wc(t,(n,r)=>(ua(this.node,r,"Start"),o=>ua(this.node,o,"End"))))}unmount(){}}class mh extends Ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vt(Ft(this.node.current,"focus",()=>this.onFocus()),Ft(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function da(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&F.postRender(()=>s(t,$t(t)))}class gh extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=Tc(t,(n,r)=>(da(this.node,r,"Start"),(o,{success:s})=>da(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ur=new WeakMap,Rr=new WeakMap,yh=e=>{const t=Ur.get(e.target);t&&t(e)},vh=e=>{e.forEach(yh)};function bh({root:e,...t}){const n=e||document;Rr.has(n)||Rr.set(n,{});const r=Rr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(vh,{root:e,...t})),r[o]}function Ch(e,t,n){const r=bh(t);return Ur.set(e,n),r.observe(e),()=>{Ur.delete(e),r.unobserve(e)}}const Sh={some:0,all:1};class wh extends Ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Sh[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Ch(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_h(t,n))&&this.startObserver()}unmount(){}}function _h({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xh={inView:{Feature:wh},tap:{Feature:gh},focus:{Feature:mh},hover:{Feature:ph}},Eh={layout:{ProjectionNode:ca,MeasureLayout:Di}},Xr={current:null},fa={current:!1};function Th(){if(fa.current=!0,!!Vn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xr.current=e.matches;e.addListener(t),t()}else Xr.current=!1}const Ah=[...Fs,ne,ke],Mh=e=>Ah.find(Bs(e)),Ph=new WeakMap;function Lh(e,t,n){for(const r in t){const o=t[r],s=n[r];if(te(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rn(o.version==="12.5.0",`Attempting to mix Motion versions ${o.version} with 12.5.0 may not work as expected.`);else if(te(s))e.addValue(r,At(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,At(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ha=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Oh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xr,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 h=pe.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,F.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=dn(n),this.isVariantNode=Uo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&te(p)&&p.set(l[h],!1)}}mount(t){this.current=t,Ph.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),fa.current||Th(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xr.current,process.env.NODE_ENV!=="production"&&rn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Le(this.notifyUpdate),Le(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ge.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&F.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ut){const n=ut[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):X()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ha.length;r++){const o=ha[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=Lh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=At(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Is(o)||bs(o))?o=parseFloat(o):!Mh(o)&&ke.test(n)&&(o=As(t,n)),this.setBaseTarget(t,te(o)?o.get():o)),te(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=lr(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!te(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new zn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class pa extends Oh{constructor(){super(...arguments),this.KeyframeResolver=js}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;te(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kh(e){return window.getComputedStyle(e)}class Nh extends pa{constructor(){super(...arguments),this.type="html",this.renderInstance=os}readValueFromInstance(t,n){if(Ge.has(n))return Xu(t,n);{const r=kh(t),o=(er(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wi(t,n)}build(t,n,r){rr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ur(t,n,r)}}class Dh extends pa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=X,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&rs(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ge.has(n)){const r=Ts(n);return r&&r.default||0}return n=ss.has(n)?n:Qn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return as(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&F.postRender(this.updateDimensions)}build(t,n,r){ir(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){is(t,n,r,o)}mount(t){this.isSVGTag=ar(t.tagName),super.mount(t)}}const Ih=(e,t)=>sr(e)?new Dh(t):new Nh(t,{allowProjection:e!==g.Fragment}),Vh=yu({...rf,...xh,...hh,...Eh},Ih),Je=Dc(Vh),Bh={root:"_root_uup2j_1"},ma={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function De(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ma).includes(t)).filter(t=>e[t]===!0).map(t=>ma[t]):null}const Ie="Errore: ",Fh="Impossibile acquisire la posizione.",Cn="Impossibile caricare i punti di mappa.",$h="Si è verificato un errore.",jh="Impossibile caricare i suggerimenti.",zh="Impossibile caricare i dettagli della location.",Uh="Impossibile caricare la mappa.",Rh="Impossibile trovare punti di mappa nell'area di ricerca.",Xh="Ottieni indicazioni di navigazione per questa destinazione",qh="Condividi questa destinazione",Gh="Scarica l'evento",Wh="dyn-locator__portal-root",ga=3e3,ya=6,va=2e4,Kh=300,Xt={north:47.1,south:36.6,east:18.6,west:6.6},Hh={lat:(Xt.north+Xt.south)/2,lng:(Xt.east+Xt.west)/2},Qe={AIRC:"airc",GOOGLE:"google"};function we(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function _e(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function ba(e,t){const{type:n,url:r}=e??{};switch(n){case"navigate":case"directions":return{"aria-label":Xh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"share":return{"aria-label":qh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Gh,as:"a",href:r??"#",download:!0,target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"email":default:return{}}}function Zh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}function Yh(e){var l,c,u,d;const t=(e==null?void 0:e.address_components)??[];function n(f){return t.find(h=>h.types.includes(f))}const r=(e==null?void 0:e.formatted_address)??"No address found",o=((l=n("locality"))==null?void 0:l.long_name)??"No city found",s=((c=n("country"))==null?void 0:c.long_name)??"No country found",i=((u=n("administrative_area_level_1"))==null?void 0:u.long_name)??"No region found",a=((d=n("administrative_area_level_2"))==null?void 0:d.short_name)??"No province found";return{address:r,city:o,province:a,region:i,country:s}}function Sn({fallback:e,format:t,...n}){if(typeof e>"u"&&(e=""),t)switch(t){case"ZIP_CITY_PROVINCE":{const{zip:r,city:o,province:s}=n??{};return[r,o,s].every(Boolean)?`${r} ${o} (${s})`:e}case"STREET_ZIP_CITY_PROVINCE":{const{street:r,zip:o,city:s,province:i}=n??{};return[r,o,s,i].every(Boolean)?`${r}, ${o} ${s} (${i})`:e}case"STREET_CITY_PROVINCE":{const{street:r,city:o,province:s}=n??{};return[r,o,s].every(Boolean)?`${r}, ${o} (${s})`:e}case"ZIP_CITY":{const{zip:r,city:o}=n??{};return[r,o].every(Boolean)?`${r} ${o}`:e}case"CITY_PROVINCE":{const{city:r,province:o}=n??{};return[r,o].every(Boolean)?`${r} (${o})`:e}case"STREET_CITY":{const{street:r,city:o}=n??{};return[r,o].every(Boolean)?`${r}, ${o}`:e}case"STREET_ZIP_CITY":{const{street:r,zip:o,city:s}=n??{};return[r,o,s].every(Boolean)?`${r}, ${o} ${s}`:e}default:return e}return e}const Ca="Anchor";function Sa({as:e,wrapper:t,children:n,variant:r="default",className:o,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},h){const p=t||"span",m=s?Je[p]:p,v=e||"a",b=De(f)??[],C=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},_=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return y.jsx(m,{className:j(Bh.root,"dyn-locator__"+_e(Ca),we(o),...b),"data-variant":r,...d?{style:d}:{},...C,...f,children:y.jsx(v,{ref:h,href:a,target:l,rel:_,...u,children:n})})}Sa.displayName=Ca;const wa=g.forwardRef(Sa),_a="ErrorBanner";function xa({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:o,className:s,children:i,...a}){const l=De(a)??[];return y.jsxs("div",{className:j("dyn-locator__"+_e(_a),xt.root,we(s),...l??[]),children:[y.jsxs("header",{className:xt.header,children:[y.jsx(Jl,{size:28,color:"currentColor",className:xt.icon})," ",y.jsx("h3",{children:e})]}),y.jsxs("div",{className:xt.body,children:[y.jsx("p",{children:t}),n&&r&&y.jsxs("p",{children:["Prova a"," ",y.jsx(wa,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,o&&y.jsx("div",{className:xt.content,children:y.jsx("pre",{children:o})})]})]})}xa.displayName=_a;const Ea=xa;class Jh extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||y.jsx("div",{className:Rl.container,children:y.jsx(Ea,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Qh=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",fillRule:"evenodd",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M12 2.5a9.5 9.5 0 1 0 0 19 9.5 9.5 0 0 0 0-19ZM13.286 14.518h2.459l.386-2.498h-2.845v-1.365c0-1.037.338-1.957 1.309-1.957h1.56v-2.18c-.275-.037-.854-.118-1.949-.118-2.287 0-3.627 1.208-3.627 3.959v1.661h-2.35v2.498h2.35v6.864c.465.07.937.118 1.421.118.438 0 .864-.04 1.286-.097v-6.885Z"})]}),ep=g.forwardRef(Qh),tp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M8 3a5 5 0 0 0-5 5v8a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5V8a5 5 0 0 0-5-5H8Zm10 2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-6 2a5 5 0 1 1-.001 10.001A5 5 0 0 1 12 7Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"})]}),np=g.forwardRef(tp),rp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM9 17H6.477v-7H9v7ZM7.694 8.717c-.771 0-1.286-.514-1.286-1.2 0-.686.514-1.2 1.371-1.2.771 0 1.286.514 1.286 1.2 0 .686-.514 1.2-1.371 1.2ZM18 17h-2.442v-3.826c0-1.058-.651-1.302-.895-1.302s-1.058.163-1.058 1.302V17h-2.523v-7h2.523v.977c.325-.57.976-.977 2.197-.977S18 10.977 18 13.174V17Z"})]}),op=g.forwardRef(rp),sp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.68 1.92H4.32a2.403 2.403 0 0 0-2.4 2.4v15.36c0 1.323 1.077 2.4 2.4 2.4h15.36c1.323 0 2.4-1.077 2.4-2.4V4.32c0-1.323-1.077-2.4-2.4-2.4Zm-1.917 8.795a3.596 3.596 0 0 1-3.34-1.61v5.538a4.093 4.093 0 1 1-4.093-4.093c.085 0 .169.008.253.013v2.017c-.084-.01-.167-.025-.253-.025a2.089 2.089 0 1 0 0 4.178c1.154 0 2.173-.91 2.173-2.063l.02-9.405h1.927a3.594 3.594 0 0 0 3.313 3.208v2.242Z"})]}),ip=g.forwardRef(sp),ap=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.077 4.928A9.927 9.927 0 0 0 12.011 2c-5.506 0-9.987 4.479-9.989 9.985a9.962 9.962 0 0 0 1.333 4.992L2 22l5.233-1.237a9.98 9.98 0 0 0 4.773 1.216h.004c5.505 0 9.986-4.48 9.989-9.985a9.922 9.922 0 0 0-2.922-7.066Zm-2.179 10.626c-.208.583-1.227 1.145-1.685 1.186-.458.042-.887.207-2.995-.624-2.537-1-4.139-3.601-4.263-3.767-.125-.167-1.019-1.353-1.019-2.581s.645-1.832.874-2.081a.916.916 0 0 1 .666-.312c.166 0 .333 0 .478.006.178.007.375.016.562.431.222.494.707 1.728.769 1.853.062.125.104.271.021.437-.083.166-.125.27-.249.416-.125.146-.262.325-.374.437-.125.124-.255.26-.11.509.146.25.646 1.067 1.388 1.728.954.85 1.757 1.113 2.007 1.239.25.125.395.104.541-.063.146-.166.624-.728.79-.978.166-.25.333-.208.562-.125.229.083 1.456.687 1.705.812.25.125.416.187.478.291.062.103.062.603-.146 1.186Z"})]}),lp=g.forwardRef(ap),cp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsxs("g",{transform:"scale(1.2) translate(-2.4, -2.4)",children:[y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 3 4.965 21H3.108L18.643 3H20.5Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillOpacity:"0.3",fillRule:"evenodd",d:"M15.572 20.5 3.91 3.5h4.479l11.661 17h-4.479Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.862 4.5 10.29 15h-2.054L5.81 4.5h2.053Zm.79-1.5h-5.69l12.346 18H21L8.652 3Z",clipRule:"evenodd"})]})]}),Ta=g.forwardRef(cp),up=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M21.551 6.96c-.191-1.056-1.102-1.824-2.16-2.064-1.582-.336-4.511-.576-7.68-.576-3.167 0-6.142.24-7.727.576-1.055.24-1.968.96-2.16 2.064-.193 1.2-.384 2.88-.384 5.04s.191 3.84.431 5.04c.193 1.056 1.105 1.824 2.16 2.064 1.68.336 4.56.576 7.729.576 3.169 0 6.049-.24 7.729-.576 1.055-.24 1.967-.96 2.16-2.064.19-1.2.43-2.929.48-5.04-.098-2.16-.338-3.84-.578-5.04ZM9.12 15.36V8.64L14.976 12 9.12 15.36Z"})]}),dp=g.forwardRef(up),Aa={ArrowLeft:Wl,ArrowUpRight:Hl,ChevronUp:Yl,ChevronDown:Zl,Close:bo,Expand:rc,Location:nc,Search:ic,Share:ac,Target:ec,Email:tc,Copy:Ql,X:Ta,Twitter:Ta,Facebook:ep,Instagram:np,Linkedin:op,TikTok:ip,Whatsapp:lp,Youtube:dp},ge={root:"_root_1ayle_4",header:"_header_1ayle_21",body:"_body_1ayle_22",cta:"_cta_1ayle_23",titleContainer:"_titleContainer_1ayle_40",shareButton:"_shareButton_1ayle_51",capabilities:"_capabilities_1ayle_59",tagContainer:"_tagContainer_1ayle_72",notes:"_notes_1ayle_78",tag:"_tag_1ayle_72"},bt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},qr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function fp(e){return g.isValidElement(e)||typeof e=="function"}function hp(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function pp(e){return!!e&&typeof e=="object"&&"path"in e}const Ma="Icon";function Pa({as:e,icon:t,iconRef:n,label:r,size:o="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const h=e||"span",p=l?Je[h]:h,{iconMap:m}=Ep();function v(S){if(hp(S)){const _=typeof S=="string"?S:S.name;return m[_]?g.createElement(m[_],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:qr.icon}):'No icon found for "'+_+'"!'}return pp(S)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),y.jsx("img",{...n?{ref:n}:{},src:S.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:qr.icon})):"No icon provided"}const b=De(d)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return y.jsx(p,{ref:f,className:j(qr.root,"dyn-locator__"+_e(Ma),we(a),...b),...u?{style:u}:{},"data-variant":i,"data-size":o,...s?{"data-radius":s}:{},...C,...d,children:v(t)})}Pa.displayName=Ma;const ye=g.forwardRef(Pa),La="Tag";function Oa({as:e,iconPosition:t="left",children:n,icon:r,className:o,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?Je[u]:u,f=De(l)??[],h=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return y.jsx(d,{ref:c,className:j(bt.root,"dyn-locator__"+_e(La),we(o),...f),"data-icon-position":t,...a?{style:a}:{},...h,...l,children:y.jsxs("div",{className:bt.container,children:[r?y.jsx("div",{className:bt.icon,children:fp(r)?typeof r=="function"?y.jsx(r,{className:bt.icon}):r:y.jsx(ye,{className:bt.icon,icon:r})}):null,y.jsx("div",{className:bt.label,children:n})]})})}Oa.displayName=La;const mp=g.forwardRef(Oa),gp={root:"_root_u5v4v_1"},ka="IconButton";function Na({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},h){const p=e||"button",m=o?Je[p]:p,v=De(f)??[],b=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},C=p==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return y.jsx(m,{ref:h,className:j(gp.root,"dyn-locator__"+_e(ka),we(n),...v),"data-variant":r,"data-element":p,"aria-label":a,disabled:d,...i?{style:i}:{},...b,...C,...f,children:t})}Na.displayName=ka;const Ve=g.forwardRef(Na),Da={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Ia="Card";function Va({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=o?Je[d]:d,h=De(c)??[],p=o?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return y.jsx(f,{ref:u,className:j(Da.root,"dyn-locator__"+_e(Ia),we(n),...h),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...p,...c,children:r==="bare"?t:y.jsx("div",{className:Da.content,children:t})})}Va.displayName=Ia;const yp=g.forwardRef(Va);function Ba(e){const{componentMap:t}=Tp();return t[e]}var fe=(e=>(e.FULLSCREEN_TOGGLE="fullscreen",e.BACK_BUTTON_CLICK="back_button",e.SEARCH="search",e.AUTOCOMPLETE_ITEM_SELECT="autocomplete_item_select",e.GEOLOCATION="geolocation",e.LOCATION_CARD_CLICK="location_card_click",e.LOCATION_CARD_PRIMARY_ACTION="location_card_primary_action",e.LOCATION_CARD_SECONDARY_ACTION="location_card_secondary_action",e.INFO_WINDOW_PRIMARY_ACTION="info_window_primary_action",e.INFO_WINDOW_SECONDARY_ACTION="info_window_secondary_action",e.CARD_LIST_TOGGLE="card_list_toggle",e.SHARE_SHEET_OPEN="share_sheet_open",e.SHARE_SHEET_CLOSE="share_sheet_close",e.SHARE_SHEET_SHARE="share_sheet_share",e.AREA_SEARCH_TOGGLE="area_search_toggle",e.AREA_SEARCH_SUBMIT="area_search_submit",e.AREA_SEARCH_CANCEL="area_search_cancel",e))(fe||{});const vp=[fe.LOCATION_CARD_PRIMARY_ACTION,fe.LOCATION_CARD_SECONDARY_ACTION,fe.AUTOCOMPLETE_ITEM_SELECT,fe.INFO_WINDOW_PRIMARY_ACTION,fe.INFO_WINDOW_SECONDARY_ACTION];class bp{constructor(){co(this,"config",{});co(this,"isInitialized",!1)}initialize(t={}){this.config=t,this.isInitialized=!0,Object.keys(t).forEach(n=>{vp.includes(n)||console.warn(`[TrackingService] Event "${n}" is not yet implemented; adding it in the config has no effect.`)})}isEventEnabled(t){var r,o;if(!this.isInitialized)return!1;const n=!!((r=this.config[t])!=null&&r.enabled)&&typeof((o=this.config[t])==null?void 0:o.tracker)=="function";return n||console.warn(`[TrackingService] Event "${t}" is not enabled or missing its tracker function.`),n}track(t,n={}){if(this.isEventEnabled(t))try{const r={...n,timestamp:n.timestamp??Date.now()},{tracker:o}=this.config[t]??{};if(typeof o!="function")throw new Error(`[TrackingService] Tracker function not found for event "${t}"`);o(r)}catch(r){console.error(`[TrackingService] Error tracking event "${t}":`,r)}}isTrackerInitialized(){return this.isInitialized}reset(){this.config={},this.isInitialized=!1}}const Ct=new bp,Fa="LocationCard",Cp="Prodotti disponibili in piazza";function Sp(e){return typeof e=="string"&&e.trim().length>0}function $a({title:e,timestamp:t,address:n,zip:r,province:o,street:s,city:i,country:a,capabilities:l,actions:c,className:u,notes:d,id:f,coords:h,on_share:p,markerType:m,...v},b){const C=Ba("ctaButton"),S=M(O=>O.toggleShareSheet),_=M(O=>O.featureFlags),w=M(O=>O.presentationPrefs),{addressFormat:x}=w??{};function A(){S(!0)}function T(O,P){return()=>{Ct.track(fe[P===0?"LOCATION_CARD_PRIMARY_ACTION":"LOCATION_CARD_SECONDARY_ACTION"],{cta_event_type:O.type??"",cta_url:O.url??"",cta_label:O.label??""})}}return y.jsx(yp,{ref:b,variant:"bare",clickable:!0,className:j("dyn-locator__"+_e(Fa),we(u)),...v,style:{...v.style?v.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:y.jsxs("div",{className:ge.root,children:[y.jsxs("header",{className:ge.header,children:[t?y.jsx("time",{children:t}):null,y.jsxs("div",{className:ge.titleContainer,children:[e?y.jsx("h4",{children:e}):null,_.share?y.jsx(Ve,{className:ge.shareButton,variant:"bare",onClick:A,children:y.jsx(ye,{size:"M",icon:"Share"})}):null]}),n?y.jsx("address",{children:x?Sn({fallback:n,format:x,zip:r,city:i,province:o,street:s,country:a}):n}):null]}),l!=null&&l.length?y.jsx("div",{className:ge.body,children:l.map((O,P)=>{const V=O.title===Cp&&Sp(d)?d.trim():null;return y.jsxs(g.Fragment,{children:[y.jsxs("div",{className:ge.capabilities,children:[y.jsx("h5",{children:O.title}),y.jsx("ul",{className:ge.tagContainer,children:(O.capabilities??[]).map((q,se)=>y.jsx(mp,{as:"li",animationDelay:+`.${se+1}`,className:ge.tag,children:q.label},se))})]}),V?y.jsx("p",{className:ge.notes,children:V}):null]},P)})}):null,c!=null&&c.length?y.jsx("div",{className:ge.cta,children:c.map((O,P)=>y.jsx(C,{animate:!1,fullWidth:!0,variant:P===0?"themed":"secondary",...ba(O,T(O,P)),children:O.label},P))}):null]})})}$a.displayName=Fa;const wp=g.forwardRef($a),ja={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},za="Button";function Ua({as:e,children:t,className:n,variant:r="default",size:o="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:h,...p},m){const v=e||(u?"a":"button"),b=l?Je[v]:v,C=De(p)??[],S=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},_=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return y.jsx(b,{ref:m,className:j(ja.root,"dyn-locator__"+_e(za),we(n),...C),"data-variant":r,"data-size":o,"data-full-width":a,disabled:s||i,...h?{style:h}:{},...S,..._,...p,children:i?y.jsxs("span",{style:{display:"flex",gap:10},children:[t,y.jsx("span",{className:ja.loader,"aria-hidden":"true"})]}):t})}Ua.displayName=za;const qt=g.forwardRef(Ua),Ra={locationCard:wp,ctaButton:qt},_p={iconMap:Aa,componentMap:Ra},Gr=g.createContext(_p);function xp({children:e,customIcons:t,customComponents:n}){const r={...Aa,...t??{}},o={...Ra,...n??{}};return y.jsx(Gr.Provider,{value:{iconMap:r,componentMap:o},children:e})}function Ep(){const{iconMap:e}=g.useContext(Gr);return{iconMap:e}}function Tp(){const{componentMap:e}=g.useContext(Gr);return{componentMap:e}}var St=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e.ALL_MARKERS="allMarkers",e))(St||{});const Xa=g.createContext({endpointMap:{},apiUrl:""});function Ap({children:e,endpoints:t,apiUrl:n}){var r;if(!n||!((r=Object.keys(t??{}))!=null&&r.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return y.jsx(Xa.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function Mp(e){const{endpointMap:t,apiUrl:n}=g.useContext(Xa);return{getEndpoint:(r={})=>{const o=t[e];if(!o)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return o.buildPath?s=o.buildPath(r):(s=o.path,Object.entries(r).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:o.method}}}}let Pp={data:""},Lp=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Pp,Op=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,kp=/\/\*[^]*?\*\/| +/g,qa=/\n+/g,Be=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?Be(i,s):s+"{"+Be(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=Be(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Be.p?Be.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},xe={},Ga=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ga(e[n]);return t}return e},Np=(e,t,n,r,o)=>{let s=Ga(e),i=xe[s]||(xe[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!xe[i]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=Op.exec(c.replace(kp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(qa," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(qa," ").trim();return f[0]})(e);xe[i]=Be(o?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&xe.g?xe.g:null;return n&&(xe.g=xe[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(xe[i],t,r,a),i},Dp=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":Be(a,""):a===!1?"":a}return r+o+(i??"")},"");function wn(e){let t=this||{},n=e.call?e(t.p):e;return Np(n.unshift?n.raw?Dp(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,Lp(t.target),t.g,t.o,t.k)}let Wa,Wr,Kr;wn.bind({g:1});let Ee=wn.bind({k:1});function Ip(e,t,n,r){Be.p=t,Wa=e,Wr=n,Kr=r}function Fe(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),l=a.className||o.className;n.p=Object.assign({theme:Wr&&Wr()},a),n.o=/ *go\d+/.test(l),a.className=wn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Kr&&c[0]&&Kr(a),Wa(c,a)}return t?t(o):o}}var Vp=e=>typeof e=="function",_n=(e,t)=>Vp(e)?e(t):e,Bp=(()=>{let e=0;return()=>(++e).toString()})(),Ka=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Fp=20,Ha=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Fp)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return Ha(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},xn=[],et={toasts:[],pausedAt:void 0},tt=e=>{et=Ha(et,e),xn.forEach(t=>{t(et)})},$p={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},jp=(e={})=>{let[t,n]=g.useState(et),r=g.useRef(et);g.useEffect(()=>(r.current!==et&&n(et),xn.push(n),()=>{let s=xn.indexOf(n);s>-1&&xn.splice(s,1)}),[]);let o=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||$p[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:o}},zp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Bp()}),Gt=e=>(t,n)=>{let r=zp(t,e,n);return tt({type:2,toast:r}),r.id},$=(e,t)=>Gt("blank")(e,t);$.error=Gt("error"),$.success=Gt("success"),$.loading=Gt("loading"),$.custom=Gt("custom"),$.dismiss=e=>{tt({type:3,toastId:e})},$.remove=e=>tt({type:4,toastId:e}),$.promise=(e,t,n)=>{let r=$.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(o=>{let s=t.success?_n(t.success,o):void 0;return s?$.success(s,{id:r,...n,...n==null?void 0:n.success}):$.dismiss(r),o}).catch(o=>{let s=t.error?_n(t.error,o):void 0;s?$.error(s,{id:r,...n,...n==null?void 0:n.error}):$.dismiss(r)}),e};var Up=(e,t)=>{tt({type:1,toast:{id:e,height:t}})},Rp=()=>{tt({type:5,time:Date.now()})},Wt=new Map,Xp=1e3,qp=(e,t=Xp)=>{if(Wt.has(e))return;let n=setTimeout(()=>{Wt.delete(e),tt({type:4,toastId:e})},t);Wt.set(e,n)},Gp=e=>{let{toasts:t,pausedAt:n}=jp(e);g.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&$.dismiss(a.id);return}return setTimeout(()=>$.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=g.useCallback(()=>{n&&tt({type:6,time:Date.now()})},[n]),o=g.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(h=>(h.position||c)===(s.position||c)&&h.height),d=u.findIndex(h=>h.id===s.id),f=u.filter((h,p)=>p<d&&h.visible).length;return u.filter(h=>h.visible).slice(...a?[f+1]:[0,f]).reduce((h,p)=>h+(p.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(s=>{if(s.dismissed)qp(s.id,s.removeDelay);else{let i=Wt.get(s.id);i&&(clearTimeout(i),Wt.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:Up,startPause:Rp,endPause:r,calculateOffset:o}}},Wp=Ee`
110
110
  from {
111
111
  transform: scale(0) rotate(45deg);
112
112
  opacity: 0;