mirror of
https://github.com/detleph/components.git
synced 2026-09-04 08:36:03 +02:00
26 lines
105 KiB
JavaScript
26 lines
105 KiB
JavaScript
var Yi=Object.defineProperty;var o=(t,e)=>Yi(t,"name",{value:e,configurable:!0});import{R as Xi}from"./index.9b91f9b4.js";import{r as v,R as vs,a as xs,j as R,F as Te}from"./jsx-runtime.a00c908c.js";import"./iframe.6ca8268f.js";const je=v.exports.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Jt=v.exports.createContext({});function qi(){return v.exports.useContext(Jt).visualElement}o(qi,"useVisualElementContext");const St=v.exports.createContext(null),et=typeof document<"u",gt=et?v.exports.useLayoutEffect:v.exports.useEffect,bs=v.exports.createContext({strict:!1});function Zi(t,e,n,s){const i=qi(),a=v.exports.useContext(bs),r=v.exports.useContext(St),l=v.exports.useContext(je).reducedMotion,c=v.exports.useRef();s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceId:r?r.id:void 0,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:l}));const u=c.current;return gt(()=>{u&&u.render()}),gt(()=>{u&&u.animationState&&u.animationState.animateChanges()}),gt(()=>()=>u&&u.notify("Unmount"),[]),u}o(Zi,"useVisualElement");function rt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}o(rt,"isRefObject");function Ji(t,e,n){return v.exports.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):rt(n)&&(n.current=s))},[e])}o(Ji,"useMotionRef");function wt(t){return typeof t=="string"||Array.isArray(t)}o(wt,"isVariantLabel");function Qt(t){return typeof t=="object"&&typeof t.start=="function"}o(Qt,"isAnimationControls");const Qi=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function te(t){return Qt(t.animate)||Qi.some(e=>wt(t[e]))}o(te,"isControllingVariants");function Ts(t){return Boolean(te(t)||t.variants)}o(Ts,"isVariantNode");function to(t,e){if(te(t)){const{initial:n,animate:s}=t;return{initial:n===!1||wt(n)?n:void 0,animate:wt(s)?s:void 0}}return t.inherit!==!1?e:{}}o(to,"getCurrentTreeVariants");function eo(t){const{initial:e,animate:n}=to(t,v.exports.useContext(Jt));return v.exports.useMemo(()=>({initial:e,animate:n}),[mn(e),mn(n)])}o(eo,"useCreateMotionContext");function mn(t){return Array.isArray(t)?t.join(" "):t}o(mn,"variantLabelsAsDependency");const G=o(t=>({isEnabled:e=>t.some(n=>!!e[n])}),"createDefinition"),Pt={measureLayout:G(["layout","layoutId","drag"]),animation:G(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:G(["exit"]),drag:G(["drag","dragControls"]),focus:G(["whileFocus"]),hover:G(["whileHover","onHoverStart","onHoverEnd"]),tap:G(["whileTap","onTap","onTapStart","onTapCancel"]),pan:G(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:G(["whileInView","onViewportEnter","onViewportLeave"])};function no(t){for(const e in t)e==="projectionNodeConstructor"?Pt.projectionNodeConstructor=t[e]:Pt[e].Component=t[e]}o(no,"loadFeatures");function ee(t){const e=v.exports.useRef(null);return e.current===null&&(e.current=t()),e.current}o(ee,"useConstant");const yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let so=1;function io(){return ee(()=>{if(yt.hasEverUpdated)return so++})}o(io,"useProjectionId");const Ue=v.exports.createContext({});class Vs extends vs.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:n}=this.props;return e&&e.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}o(Vs,"VisualElementHandler");const ws=v.exports.createContext({}),oo=Symbol.for("motionComponentSymbol");function ro({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:n,useRender:s,useVisualState:i,Component:a}){t&&no(t);function r(c,u){const f={...v.exports.useContext(je),...c,layoutId:ao(c)},{isStatic:d}=f;let h=null;const p=eo(c),m=d?void 0:io(),g=i(c,d);if(!d&&et){p.visualElement=Zi(a,g,f,e);const T=v.exports.useContext(bs).strict,b=v.exports.useContext(ws);p.visualElement&&(h=p.visualElement.loadFeatures(f,T,t,m,n||Pt.projectionNodeConstructor,b))}return xs(Vs,{visualElement:p.visualElement,props:f,children:[h,R(Jt.Provider,{value:p,children:s(a,c,m,Ji(g,p.visualElement,u),g,d,p.visualElement)})]})}o(r,"MotionComponent");const l=v.exports.forwardRef(r);return l[oo]=a,l}o(ro,"createMotionComponent");function ao({layoutId:t}){const e=v.exports.useContext(Ue).id;return e&&t!==void 0?e+"-"+t:t}o(ao,"useLayoutId");function lo(t){function e(s,i={}){return ro(t(s,i))}if(o(e,"custom"),typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}o(lo,"createMotionProxy");const co=["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 Ne(t){return typeof t!="string"||t.includes("-")?!1:!!(co.indexOf(t)>-1||/[A-Z]/.test(t))}o(Ne,"isSVGComponent");const Ut={};function uo(t){Object.assign(Ut,t)}o(uo,"addScaleCorrector");const Nt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],nt=new Set(Nt);function Ps(t,{layout:e,layoutId:n}){return nt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ut[t]||t==="opacity")}o(Ps,"isForcedMotionValue");const $=o(t=>!!(t!=null&&t.getVelocity),"isMotionValue"),fo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ho=o((t,e)=>Nt.indexOf(t)-Nt.indexOf(e),"sortTransformProps");function po({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:s=!0},i,a){let r="";e.sort(ho);for(const l of e)r+=`${fo[l]||l}(${t[l]}) `;return n&&!t.z&&(r+="translateZ(0)"),r=r.trim(),a?r=a(t,i?"":r):s&&i&&(r="none"),r}o(po,"buildTransform");function As(t){return t.startsWith("--")}o(As,"isCSSVariable$1");const mo=o((t,e)=>e&&typeof t=="number"?e.transform(t):t,"getValueAsType"),ut=o((t,e,n)=>Math.min(Math.max(n,t),e),"clamp"),st={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},vt={...st,transform:t=>ut(0,1,t)},Et={...st,default:1},xt=o(t=>Math.round(t*1e5)/1e5,"sanitize"),At=/(-)?([\d]*\.?[\d])+/g,Ve=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,go=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dt(t){return typeof t=="string"}o(Dt,"isString");const Mt=o(t=>({test:e=>Dt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),"createUnitType"),K=Mt("deg"),N=Mt("%"),w=Mt("px"),yo=Mt("vh"),vo=Mt("vw"),gn={...N,parse:t=>N.parse(t)/100,transform:t=>N.transform(t*100)},yn={...st,transform:Math.round},Cs={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,radius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,size:w,top:w,right:w,bottom:w,left:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,rotate:K,rotateX:K,rotateY:K,rotateZ:K,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:K,skewX:K,skewY:K,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:vt,originX:gn,originY:gn,originZ:w,zIndex:yn,fillOpacity:vt,strokeOpacity:vt,numOctaves:yn};function $e(t,e,n,s){const{style:i,vars:a,transform:r,transformKeys:l,transformOrigin:c}=t;l.length=0;let u=!1,f=!1,d=!0;for(const h in e){const p=e[h];if(As(h)){a[h]=p;continue}const m=Cs[h],g=mo(p,m);if(nt.has(h)){if(u=!0,r[h]=g,l.push(h),!d)continue;p!==(m.default||0)&&(d=!1)}else h.startsWith("origin")?(f=!0,c[h]=g):i[h]=g}if(e.transform||(u||s?i.transform=po(t,n,d,s):i.transform&&(i.transform="none")),f){const{originX:h="50%",originY:p="50%",originZ:m=0}=c;i.transformOrigin=`${h} ${p} ${m}`}}o($e,"buildHTMLStyles");const ze=o(()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),"createHtmlRenderState");function Ss(t,e,n){for(const s in e)!$(e[s])&&!Ps(s,n)&&(t[s]=e[s])}o(Ss,"copyRawValuesOnly");function xo({transformTemplate:t},e,n){return v.exports.useMemo(()=>{const s=ze();return $e(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}o(xo,"useInitialMotionValues");function bo(t,e,n){const s=t.style||{},i={};return Ss(i,s,t),Object.assign(i,xo(t,e,n)),t.transformValues?t.transformValues(i):i}o(bo,"useStyle");function To(t,e,n){const s={},i=bo(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),s.style=i,s}o(To,"useHTMLProps");const Vo=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],wo=["whileTap","onTap","onTapStart","onTapCancel"],Po=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Ao=["whileInView","onViewportEnter","onViewportLeave","viewport"],Co=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Ao,...wo,...Vo,...Po]);function $t(t){return Co.has(t)}o($t,"isValidMotionProp");let Ds=o(t=>!$t(t),"shouldForward");function So(t){!t||(Ds=o(e=>e.startsWith("on")?!$t(e):t(e),"shouldForward"))}o(So,"loadExternalIsValidProp");try{So(require("@emotion/is-prop-valid").default)}catch{}function Do(t,e,n){const s={};for(const i in t)(Ds(i)||n===!0&&$t(i)||!e&&!$t(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}o(Do,"filterProps");function vn(t,e,n){return typeof t=="string"?t:w.transform(e+n*t)}o(vn,"calcOrigin$1");function Mo(t,e,n){const s=vn(e,t.x,t.width),i=vn(n,t.y,t.height);return`${s} ${i}`}o(Mo,"calcSVGTransformOrigin");const Ro={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lo={offset:"strokeDashoffset",array:"strokeDasharray"};function Eo(t,e,n=1,s=0,i=!0){t.pathLength=1;const a=i?Ro:Lo;t[a.offset]=w.transform(-s);const r=w.transform(e),l=w.transform(n);t[a.array]=`${r} ${l}`}o(Eo,"buildSVGPath");function Ge(t,{attrX:e,attrY:n,originX:s,originY:i,pathLength:a,pathSpacing:r=1,pathOffset:l=0,...c},u,f,d){if($e(t,c,u,d),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(s!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=Mo(m,s!==void 0?s:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),a!==void 0&&Eo(h,a,r,l,!1)}o(Ge,"buildSVGAttrs");const Ms=o(()=>({...ze(),attrs:{}}),"createSvgRenderState"),We=o(t=>typeof t=="string"&&t.toLowerCase()==="svg","isSVGTag");function Bo(t,e,n,s){const i=v.exports.useMemo(()=>{const a=Ms();return Ge(a,e,{enableHardwareAcceleration:!1},We(s),t.transformTemplate),{...a.attrs,style:{...a.style}}},[e]);if(t.style){const a={};Ss(a,t.style,t),i.style={...a,...i.style}}return i}o(Bo,"useSVGProps");function Oo(t=!1){return o((n,s,i,a,{latestValues:r},l)=>{const u=(Ne(n)?Bo:To)(s,r,l,n),d={...Do(s,typeof n=="string",t),...u,ref:a};return i&&(d["data-projection-id"]=i),v.exports.createElement(n,d)},"useRender")}o(Oo,"createUseRender");const Ke=o(t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"camelToDash");function Rs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const a in n)t.style.setProperty(a,n[a])}o(Rs,"renderHTML");const Ls=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 Es(t,e,n,s){Rs(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ls.has(i)?i:Ke(i),e.attrs[i])}o(Es,"renderSVG");function He(t){const{style:e}=t,n={};for(const s in e)($(e[s])||Ps(s,t))&&(n[s]=e[s]);return n}o(He,"scrapeMotionValuesFromProps$1");function Bs(t){const e=He(t);for(const n in t)if($(t[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;e[s]=t[n]}return e}o(Bs,"scrapeMotionValuesFromProps");function Ye(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}o(Ye,"resolveVariantFromProps");const zt=o(t=>Array.isArray(t),"isKeyframesTarget"),Fo=o(t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),"isCustomValue"),Io=o(t=>zt(t)?t[t.length-1]||0:t,"resolveFinalValueInKeyframes");function It(t){const e=$(t)?t.get():t;return Fo(e)?e.toValue():e}o(It,"resolveMotionValue");function _o({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,a){const r={latestValues:ko(s,i,a,t),renderState:e()};return n&&(r.mount=l=>n(s,l,r)),r}o(_o,"makeState");const Os=o(t=>(e,n)=>{const s=v.exports.useContext(Jt),i=v.exports.useContext(St),a=o(()=>_o(t,e,s,i),"make");return n?a():ee(a)},"makeUseVisualState");function ko(t,e,n,s){const i={},a=s(t);for(const h in a)i[h]=It(a[h]);let{initial:r,animate:l}=t;const c=te(t),u=Ts(t);e&&u&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),l===void 0&&(l=e.animate));let f=n?n.initial===!1:!1;f=f||r===!1;const d=f?l:r;return d&&typeof d!="boolean"&&!Qt(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const m=Ye(t,p);if(!m)return;const{transitionEnd:g,transition:T,...b}=m;for(const V in b){let y=b[V];if(Array.isArray(y)){const x=f?y.length-1:0;y=y[x]}y!==null&&(i[V]=y)}for(const V in g)i[V]=g[V]}),i}o(ko,"makeLatestValues");const jo={useVisualState:Os({scrapeMotionValuesFromProps:Bs,createRenderState:Ms,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Ge(n,s,{enableHardwareAcceleration:!1},We(e.tagName),t.transformTemplate),Es(e,n)}})},Uo={useVisualState:Os({scrapeMotionValuesFromProps:He,createRenderState:ze})};function No(t,{forwardMotionProps:e=!1},n,s,i){return{...Ne(t)?jo:Uo,preloadedFeatures:n,useRender:Oo(e),createVisualElement:s,projectionNodeConstructor:i,Component:t}}o(No,"createDomMotionConfig");var C;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(C||(C={}));function ne(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}o(ne,"addDomEvent");function we(t,e,n,s){v.exports.useEffect(()=>{const i=t.current;if(n&&i)return ne(i,e,n,s)},[t,e,n,s])}o(we,"useDomEvent");function $o({whileFocus:t,visualElement:e}){const{animationState:n}=e,s=o(()=>{n&&n.setActive(C.Focus,!0)},"onFocus"),i=o(()=>{n&&n.setActive(C.Focus,!1)},"onBlur");we(e,"focus",t?s:void 0),we(e,"blur",t?i:void 0)}o($o,"useFocusGesture");function Fs(t){return typeof PointerEvent<"u"&&t instanceof PointerEvent?t.pointerType==="mouse":t instanceof MouseEvent}o(Fs,"isMouseEvent");function Is(t){return!!t.touches}o(Is,"isTouchEvent");function zo(t){return e=>{const n=e instanceof MouseEvent;(!n||n&&e.button===0)&&t(e)}}o(zo,"filterPrimaryPointer");const Go={pageX:0,pageY:0};function Wo(t,e="page"){const s=t.touches[0]||t.changedTouches[0]||Go;return{x:s[e+"X"],y:s[e+"Y"]}}o(Wo,"pointFromTouch");function Ko(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}o(Ko,"pointFromMouse");function Xe(t,e="page"){return{point:Is(t)?Wo(t,e):Ko(t,e)}}o(Xe,"extractEventInfo");const _s=o((t,e=!1)=>{const n=o(s=>t(s,Xe(s)),"listener");return e?zo(n):n},"wrapHandler"),Ho=o(()=>et&&window.onpointerdown===null,"supportsPointerEvents"),Yo=o(()=>et&&window.ontouchstart===null,"supportsTouchEvents"),Xo=o(()=>et&&window.onmousedown===null,"supportsMouseEvents"),qo={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Zo={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ks(t){return Ho()?t:Yo()?Zo[t]:Xo()?qo[t]:t}o(ks,"getPointerEventName");function ct(t,e,n,s){return ne(t,ks(e),_s(n,e==="pointerdown"),s)}o(ct,"addPointerEvent");function Gt(t,e,n,s){return we(t,ks(e),n&&_s(n,e==="pointerdown"),s)}o(Gt,"usePointerEvent");function js(t){let e=null;return()=>{const n=o(()=>{e=null},"openLock");return e===null?(e=t,n):!1}}o(js,"createLock");const xn=js("dragHorizontal"),bn=js("dragVertical");function Us(t){let e=!1;if(t==="y")e=bn();else if(t==="x")e=xn();else{const n=xn(),s=bn();n&&s?e=o(()=>{n(),s()},"lock"):(n&&n(),s&&s())}return e}o(Us,"getGlobalLock");function Ns(){const t=Us(!0);return t?(t(),!1):!0}o(Ns,"isDragActive");function Tn(t,e,n){return(s,i)=>{!Fs(s)||Ns()||(t.animationState&&t.animationState.setActive(C.Hover,e),n&&n(s,i))}}o(Tn,"createHoverEvent");function Jo({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:s}){Gt(s,"pointerenter",t||n?Tn(s,!0,t):void 0,{passive:!t}),Gt(s,"pointerleave",e||n?Tn(s,!1,e):void 0,{passive:!e})}o(Jo,"useHoverGesture");const $s=o((t,e)=>e?t===e?!0:$s(t,e.parentElement):!1,"isNodeOrChild");function qe(t){return v.exports.useEffect(()=>()=>t(),[])}o(qe,"useUnmountEffect");const Qo=o((t,e)=>n=>e(t(n)),"combineFunctions"),se=o((...t)=>t.reduce(Qo),"pipe");function tr({onTap:t,onTapStart:e,onTapCancel:n,whileTap:s,visualElement:i}){const a=t||e||n||s,r=v.exports.useRef(!1),l=v.exports.useRef(null),c={passive:!(e||t||n||p)};function u(){l.current&&l.current(),l.current=null}o(u,"removePointerEndListener");function f(){return u(),r.current=!1,i.animationState&&i.animationState.setActive(C.Tap,!1),!Ns()}o(f,"checkPointerEnd");function d(m,g){!f()||($s(i.current,m.target)?t&&t(m,g):n&&n(m,g))}o(d,"onPointerUp");function h(m,g){!f()||n&&n(m,g)}o(h,"onPointerCancel");function p(m,g){u(),!r.current&&(r.current=!0,l.current=se(ct(window,"pointerup",d,c),ct(window,"pointercancel",h,c)),i.animationState&&i.animationState.setActive(C.Tap,!0),e&&e(m,g))}o(p,"onPointerDown"),Gt(i,"pointerdown",a?p:void 0,c),qe(u)}o(tr,"useTapGesture");const er="production",zs=typeof process>"u"||process.env===void 0?er:"production",Vn=new Set;function Gs(t,e,n){t||Vn.has(e)||(console.warn(e),n&&console.warn(n),Vn.add(e))}o(Gs,"warnOnce");const Pe=new WeakMap,le=new WeakMap,nr=o(t=>{const e=Pe.get(t.target);e&&e(t)},"fireObserverCallback"),sr=o(t=>{t.forEach(nr)},"fireAllObserverCallbacks");function ir({root:t,...e}){const n=t||document;le.has(n)||le.set(n,{});const s=le.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(sr,{root:t,...e})),s[i]}o(ir,"initIntersectionObserver");function or(t,e,n){const s=ir(e);return Pe.set(t,n),s.observe(t),()=>{Pe.delete(t),s.unobserve(t)}}o(or,"observeIntersection");function rr({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:s,viewport:i={}}){const a=v.exports.useRef({hasEnteredView:!1,isInView:!1});let r=Boolean(e||n||s);i.once&&a.current.hasEnteredView&&(r=!1),(typeof IntersectionObserver>"u"?cr:lr)(r,a.current,t,i)}o(rr,"useViewport");const ar={some:0,all:1};function lr(t,e,n,{root:s,margin:i,amount:a="some",once:r}){v.exports.useEffect(()=>{if(!t||!n.current)return;const l={root:s==null?void 0:s.current,rootMargin:i,threshold:typeof a=="number"?a:ar[a]},c=o(u=>{const{isIntersecting:f}=u;if(e.isInView===f||(e.isInView=f,r&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),n.animationState&&n.animationState.setActive(C.InView,f);const d=n.getProps(),h=f?d.onViewportEnter:d.onViewportLeave;h&&h(u)},"intersectionCallback");return or(n.current,l,c)},[t,s,i,a])}o(lr,"useIntersectionObserver");function cr(t,e,n,{fallback:s=!0}){v.exports.useEffect(()=>{!t||!s||(zs!=="production"&&Gs(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(C.InView,!0)}))},[t])}o(cr,"useMissingIntersectionObserver");const Y=o(t=>e=>(t(e),null),"makeRenderlessComponent"),ur={inView:Y(rr),tap:Y(tr),focus:Y($o),hover:Y(Jo)};function Ws(){const t=v.exports.useContext(St);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=v.exports.useId();return v.exports.useEffect(()=>s(i),[]),!e&&n?[!1,o(()=>n&&n(i),"safeToRemove")]:[!0]}o(Ws,"usePresence");function Ks(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}o(Ks,"shallowCompare");const fr=o(t=>/^\-?\d*\.?\d+$/.test(t),"isNumericalString"),dr=o(t=>/^0[^.\s]+$/.test(t),"isZeroValueString"),W={delta:0,timestamp:0},Hs=1/60*1e3,hr=typeof performance<"u"?()=>performance.now():()=>Date.now(),Ys=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(hr()),Hs);function pr(t){let e=[],n=[],s=0,i=!1,a=!1;const r=new WeakSet,l={schedule:(c,u=!1,f=!1)=>{const d=f&&i,h=d?e:n;return u&&r.add(c),h.indexOf(c)===-1&&(h.push(c),d&&i&&(s=e.length)),c},cancel:c=>{const u=n.indexOf(c);u!==-1&&n.splice(u,1),r.delete(c)},process:c=>{if(i){a=!0;return}if(i=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let u=0;u<s;u++){const f=e[u];f(c),r.has(f)&&(l.schedule(f),t())}i=!1,a&&(a=!1,l.process(c))}};return l}o(pr,"createRenderStep");const mr=40;let Ae=!0,Ct=!1,Ce=!1;const Rt=["read","update","preRender","render","postRender"],ie=Rt.reduce((t,e)=>(t[e]=pr(()=>Ct=!0),t),{}),O=Rt.reduce((t,e)=>{const n=ie[e];return t[e]=(s,i=!1,a=!1)=>(Ct||yr(),n.schedule(s,i,a)),t},{}),X=Rt.reduce((t,e)=>(t[e]=ie[e].cancel,t),{}),ce=Rt.reduce((t,e)=>(t[e]=()=>ie[e].process(W),t),{}),gr=o(t=>ie[t].process(W),"processStep"),Xs=o(t=>{Ct=!1,W.delta=Ae?Hs:Math.max(Math.min(t-W.timestamp,mr),1),W.timestamp=t,Ce=!0,Rt.forEach(gr),Ce=!1,Ct&&(Ae=!1,Ys(Xs))},"processFrame"),yr=o(()=>{Ct=!0,Ae=!0,Ce||Ys(Xs)},"startLoop");function Ze(t,e){t.indexOf(e)===-1&&t.push(e)}o(Ze,"addUniqueItem");function Je(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}o(Je,"removeItem");class oe{constructor(){this.subscriptions=[]}add(e){return Ze(this.subscriptions,e),()=>Je(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](e,n,s);else for(let a=0;a<i;a++){const r=this.subscriptions[a];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}o(oe,"SubscriptionManager");function Qe(t,e){return e?t*(1e3/e):0}o(Qe,"velocityPerSecond");const vr=o(t=>!isNaN(parseFloat(t)),"isFloat");class qs{constructor(e,n={}){this.version="7.10.3",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:a,timestamp:r}=W;this.lastUpdated!==r&&(this.timeDelta=a,this.lastUpdated=r,O.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>O.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=vr(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){return this.events[e]||(this.events[e]=new oe),this.events[e].add(n)}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e){this.passiveEffect=e}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Qe(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.stopAnimation&&(this.stopAnimation(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.clearListeners(),this.stop()}}o(qs,"MotionValue");function ft(t,e){return new qs(t,e)}o(ft,"motionValue");const tn=o((t,e)=>n=>Boolean(Dt(n)&&go.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),"isColorString"),Zs=o((t,e,n)=>s=>{if(!Dt(s))return s;const[i,a,r,l]=s.match(At);return{[t]:parseFloat(i),[e]:parseFloat(a),[n]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},"splitColor"),xr=o(t=>ut(0,255,t),"clampRgbUnit"),ue={...st,transform:t=>Math.round(xr(t))},tt={test:tn("rgb","red"),parse:Zs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ue.transform(t)+", "+ue.transform(e)+", "+ue.transform(n)+", "+xt(vt.transform(s))+")"};function br(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}o(br,"parseHex");const Se={test:tn("#"),parse:br,transform:tt.transform},at={test:tn("hsl","hue"),parse:Zs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+N.transform(xt(e))+", "+N.transform(xt(n))+", "+xt(vt.transform(s))+")"},B={test:t=>tt.test(t)||Se.test(t)||at.test(t),parse:t=>tt.test(t)?tt.parse(t):at.test(t)?at.parse(t):Se.parse(t),transform:t=>Dt(t)?t:t.hasOwnProperty("red")?tt.transform(t):at.transform(t)},Js="${c}",Qs="${n}";function Tr(t){var e,n;return isNaN(t)&&Dt(t)&&(((e=t.match(At))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Ve))===null||n===void 0?void 0:n.length)||0)>0}o(Tr,"test");function Wt(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0,s=0;const i=t.match(Ve);i&&(n=i.length,t=t.replace(Ve,Js),e.push(...i.map(B.parse)));const a=t.match(At);return a&&(s=a.length,t=t.replace(At,Qs),e.push(...a.map(st.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}o(Wt,"analyseComplexValue");function ti(t){return Wt(t).values}o(ti,"parse");function ei(t){const{values:e,numColors:n,tokenised:s}=Wt(t),i=e.length;return a=>{let r=s;for(let l=0;l<i;l++)r=r.replace(l<n?Js:Qs,l<n?B.transform(a[l]):xt(a[l]));return r}}o(ei,"createTransformer");const Vr=o(t=>typeof t=="number"?0:t,"convertNumbersToZero");function wr(t){const e=ti(t);return ei(t)(e.map(Vr))}o(wr,"getAnimatableNone$1");const q={test:Tr,parse:ti,createTransformer:ei,getAnimatableNone:wr},Pr=new Set(["brightness","contrast","saturate","opacity"]);function Ar(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(At)||[];if(!s)return t;const i=n.replace(s,"");let a=Pr.has(e)?1:0;return s!==n&&(a*=100),e+"("+a+i+")"}o(Ar,"applyDefaultFilter");const Cr=/([a-z-]*)\(.*?\)/g,De={...q,getAnimatableNone:t=>{const e=t.match(Cr);return e?e.map(Ar).join(" "):t}},Sr={...Cs,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:De,WebkitFilter:De},en=o(t=>Sr[t],"getDefaultValueType");function nn(t,e){var n;let s=en(t);return s!==De&&(s=q),(n=s.getAnimatableNone)===null||n===void 0?void 0:n.call(s,e)}o(nn,"getAnimatableNone");const ni=o(t=>e=>e.test(t),"testValueType"),Dr={test:t=>t==="auto",parse:t=>t},si=[st,w,N,K,vo,yo,Dr],ht=o(t=>si.find(ni(t)),"findDimensionValueType"),Mr=[...si,B,q],Rr=o(t=>Mr.find(ni(t)),"findValueType");function Lr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}o(Lr,"getCurrent");function Er(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}o(Er,"getVelocity$1");function re(t,e,n){const s=t.getProps();return Ye(s,e,n!==void 0?n:s.custom,Lr(t),Er(t))}o(re,"resolveVariant");function Br(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ft(n))}o(Br,"setMotionValue");function Or(t,e){const n=re(t,e);let{transitionEnd:s={},transition:i={},...a}=n?t.makeTargetAnimatable(n,!1):{};a={...a,...s};for(const r in a){const l=Io(a[r]);Br(t,r,l)}}o(Or,"setTarget");function Fr(t,e,n){var s,i;const a=Object.keys(e).filter(l=>!t.hasValue(l)),r=a.length;if(!!r)for(let l=0;l<r;l++){const c=a[l],u=e[c];let f=null;Array.isArray(u)&&(f=u[0]),f===null&&(f=(i=(s=n[c])!==null&&s!==void 0?s:t.readValue(c))!==null&&i!==void 0?i:e[c]),f!=null&&(typeof f=="string"&&(fr(f)||dr(f))?f=parseFloat(f):!Rr(f)&&q.test(u)&&(f=nn(c,u)),t.addValue(c,ft(f,{owner:t})),n[c]===void 0&&(n[c]=f),f!==null&&t.setBaseTarget(c,f))}}o(Fr,"checkTargetForNewValues");function Ir(t,e){return e?(e[t]||e.default||e).from:void 0}o(Ir,"getOriginFromTransition");function _r(t,e,n){var s;const i={};for(const a in t){const r=Ir(a,e);i[a]=r!==void 0?r:(s=n.getValue(a))===null||s===void 0?void 0:s.get()}return i}o(_r,"getOrigin");function Kt(t){return Boolean($(t)&&t.add)}o(Kt,"isWillChangeMotionValue");const kr=o((t,e)=>`${t}: ${e}`,"appearStoreId");function jr(t,e){const{MotionAppearAnimations:n}=window,s=kr(t,nt.has(e)?"transform":e),i=n&&n.get(s);return i?(O.render(()=>{try{i.cancel(),n.delete(s)}catch{}}),i.currentTime||0):0}o(jr,"handoffOptimizedAppearAnimation");const Ur="framerAppearId",Nr="data-"+Ke(Ur);var $r=o(function(){},"warning"),Ht=o(function(){},"invariant");const _t=o(t=>t*1e3,"secondsToMilliseconds"),zr={current:!1},sn=o(t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,"mirrorEasing"),on=o(t=>e=>1-t(1-e),"reverseEasing"),rn=o(t=>t*t,"easeIn"),Gr=on(rn),an=sn(rn),S=o((t,e,n)=>-n*t+n*e+t,"mix");function fe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}o(fe,"hueToRgb");function Wr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,a=0,r=0;if(!e)i=a=r=n;else{const l=n<.5?n*(1+e):n+e-n*e,c=2*n-l;i=fe(c,l,t+1/3),a=fe(c,l,t),r=fe(c,l,t-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(r*255),alpha:s}}o(Wr,"hslaToRgba");const de=o((t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},"mixLinearColor"),Kr=[Se,tt,at],Hr=o(t=>Kr.find(e=>e.test(t)),"getColorType");function wn(t){const e=Hr(t);let n=e.parse(t);return e===at&&(n=Wr(n)),n}o(wn,"asRGBA");const ii=o((t,e)=>{const n=wn(t),s=wn(e),i={...n};return a=>(i.red=de(n.red,s.red,a),i.green=de(n.green,s.green,a),i.blue=de(n.blue,s.blue,a),i.alpha=S(n.alpha,s.alpha,a),tt.transform(i))},"mixColor");function oi(t,e){return typeof t=="number"?n=>S(t,e,n):B.test(t)?ii(t,e):ai(t,e)}o(oi,"getMixer");const ri=o((t,e)=>{const n=[...t],s=n.length,i=t.map((a,r)=>oi(a,e[r]));return a=>{for(let r=0;r<s;r++)n[r]=i[r](a);return n}},"mixArray"),Yr=o((t,e)=>{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=oi(t[i],e[i]));return i=>{for(const a in s)n[a]=s[a](i);return n}},"mixObject"),ai=o((t,e)=>{const n=q.createTransformer(e),s=Wt(t),i=Wt(e);return s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?se(ri(s.values,i.values),n):r=>`${r>0?e:t}`},"mixComplex"),Yt=o((t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},"progress"),Pn=o((t,e)=>n=>S(t,e,n),"mixNumber");function Xr(t){return typeof t=="number"?Pn:typeof t=="string"?B.test(t)?ii:ai:Array.isArray(t)?ri:typeof t=="object"?Yr:Pn}o(Xr,"detectMixerFactory");function qr(t,e,n){const s=[],i=n||Xr(t[0]),a=t.length-1;for(let r=0;r<a;r++){let l=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]:e;l=se(c,l)}s.push(l)}return s}o(qr,"createMixers");function li(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const a=t.length;Ht(a===e.length),Ht(!s||!Array.isArray(s)||s.length===a-1),t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=qr(e,s,i),l=r.length,c=o(u=>{let f=0;if(l>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const d=Yt(t[f],t[f+1],u);return r[f](d)},"interpolator");return n?u=>c(ut(t[0],t[a-1],u)):c}o(li,"interpolate");const ln=o(t=>t,"noop"),ci=o((t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,"calcBezier"),Zr=1e-7,Jr=12;function Qr(t,e,n,s,i){let a,r,l=0;do r=e+(n-e)/2,a=ci(r,s,i)-t,a>0?n=r:e=r;while(Math.abs(a)>Zr&&++l<Jr);return r}o(Qr,"binarySubdivide");function ui(t,e,n,s){if(t===e&&n===s)return ln;const i=o(a=>Qr(a,0,1,t,n),"getTForX");return a=>a===0||a===1?a:ci(i(a),e,s)}o(ui,"cubicBezier");const fi=o(t=>1-Math.sin(Math.acos(t)),"circIn"),cn=on(fi),ta=sn(cn),di=ui(.33,1.53,.69,.99),un=on(di),ea=sn(un),na=o(t=>(t*=2)<1?.5*un(t):.5*(2-Math.pow(2,-10*(t-1))),"anticipate"),sa={linear:ln,easeIn:rn,easeInOut:an,easeOut:Gr,circIn:fi,circInOut:ta,circOut:cn,backIn:un,backInOut:ea,backOut:di,anticipate:na},An=o(t=>{if(Array.isArray(t)){Ht(t.length===4);const[e,n,s,i]=t;return ui(e,n,s,i)}else if(typeof t=="string")return sa[t];return t},"easingDefinitionToFunction"),ia=o(t=>Array.isArray(t)&&typeof t[0]!="number","isEasingArray");function oa(t,e){return t.map(()=>e||an).splice(0,t.length-1)}o(oa,"defaultEasing");function ra(t){const e=t.length;return t.map((n,s)=>s!==0?s/(e-1):0)}o(ra,"defaultOffset");function aa(t,e){return t.map(n=>n*e)}o(aa,"convertOffsetToTimes");function Xt({keyframes:t,ease:e=an,times:n,duration:s=300}){t=[...t];const i=Xt[0],a=ia(e)?e.map(An):An(e),r={done:!1,value:i},l=aa(n&&n.length===Xt.length?n:ra(t),s);function c(){return li(l,t,{ease:Array.isArray(a)?a:oa(t,a)})}o(c,"createInterpolator");let u=c();return{next:f=>(r.value=u(f),r.done=f>=s,r),flipTarget:()=>{t.reverse(),u=c()}}}o(Xt,"keyframes");const he=.001,la=.01,Cn=10,ca=.05,ua=1;function fa({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,a;$r(t<=Cn*1e3);let r=1-e;r=ut(ca,ua,r),t=ut(la,Cn,t/1e3),r<1?(i=o(u=>{const f=u*r,d=f*t,h=f-n,p=Me(u,r),m=Math.exp(-d);return he-h/p*m},"envelope"),a=o(u=>{const d=u*r*t,h=d*n+n,p=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-d),g=Me(Math.pow(u,2),r);return(-i(u)+he>0?-1:1)*((h-p)*m)/g},"derivative")):(i=o(u=>{const f=Math.exp(-u*t),d=(u-n)*t+1;return-he+f*d},"envelope"),a=o(u=>{const f=Math.exp(-u*t),d=(n-u)*(t*t);return f*d},"derivative"));const l=5/t,c=ha(i,a,l);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}o(fa,"findSpring");const da=12;function ha(t,e,n){let s=n;for(let i=1;i<da;i++)s=s-t(s)/e(s);return s}o(ha,"approximateRoot");function Me(t,e){return t*Math.sqrt(1-e*e)}o(Me,"calcAngularFreq");const pa=["duration","bounce"],ma=["stiffness","damping","mass"];function Sn(t,e){return e.some(n=>t[n]!==void 0)}o(Sn,"isSpringType");function ga(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Sn(t,ma)&&Sn(t,pa)){const n=fa(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}o(ga,"getSpringOptions");const ya=5;function hi({keyframes:t,restSpeed:e=2,restDelta:n=.01,...s}){let i=t[0],a=t[t.length-1];const r={done:!1,value:i},{stiffness:l,damping:c,mass:u,velocity:f,duration:d,isResolvedFromDuration:h}=ga(s);let p=va,m=f?-(f/1e3):0;const g=c/(2*Math.sqrt(l*u));function T(){const b=a-i,V=Math.sqrt(l/u)/1e3;if(n===void 0&&(n=Math.min(Math.abs(a-i)/100,.4)),g<1){const y=Me(V,g);p=o(x=>{const P=Math.exp(-g*V*x);return a-P*((m+g*V*b)/y*Math.sin(y*x)+b*Math.cos(y*x))},"resolveSpring")}else if(g===1)p=o(y=>a-Math.exp(-V*y)*(b+(m+V*b)*y),"resolveSpring");else{const y=V*Math.sqrt(g*g-1);p=o(x=>{const P=Math.exp(-g*V*x),A=Math.min(y*x,300);return a-P*((m+g*V*b)*Math.sinh(A)+y*b*Math.cosh(A))/y},"resolveSpring")}}return o(T,"createSpring"),T(),{next:b=>{const V=p(b);if(h)r.done=b>=d;else{let y=m;if(b!==0)if(g<1){const A=Math.max(0,b-ya);y=Qe(V-p(A),b-A)}else y=0;const x=Math.abs(y)<=e,P=Math.abs(a-V)<=n;r.done=x&&P}return r.value=r.done?a:V,r},flipTarget:()=>{m=-m,[i,a]=[a,i],T()}}}o(hi,"spring");hi.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const va=o(t=>0,"zero");function xa({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:i=.5,modifyTarget:a}){const r=t[0],l={done:!1,value:r};let c=n*e;const u=r+c,f=a===void 0?u:a(u);return f!==u&&(c=f-r),{next:d=>{const h=-c*Math.exp(-d/s);return l.done=!(h>i||h<-i),l.value=l.done?f:f+h,l},flipTarget:()=>{}}}o(xa,"decay");const ba={decay:xa,keyframes:Xt,tween:Xt,spring:hi};function pi(t,e,n=0){return t-e-n}o(pi,"loopElapsed");function Ta(t,e=0,n=0,s=!0){return s?pi(e+-t,e,n):e-(t-e)+n}o(Ta,"reverseElapsed");function Va(t,e,n,s){return s?t>=e+n:t<=-n}o(Va,"hasRepeatDelayElapsed");const wa=o(t=>{const e=o(({delta:n})=>t(n),"passTimestamp");return{start:()=>O.update(e,!0),stop:()=>X.update(e)}},"framesync");function qt({duration:t,driver:e=wa,elapsed:n=0,repeat:s=0,repeatType:i="loop",repeatDelay:a=0,keyframes:r,autoplay:l=!0,onPlay:c,onStop:u,onComplete:f,onRepeat:d,onUpdate:h,type:p="keyframes",...m}){var g,T;let b,V=0,y=t,x,P=!1,A=!0,L;const I=ba[r.length>2?"keyframes":p],_=r[0],E=r[r.length-1];!((T=(g=I).needsInterpolation)===null||T===void 0)&&T.call(g,_,E)&&(L=li([0,100],[_,E],{clamp:!1}),r=[0,100]);const z=I({...m,duration:t,keyframes:r});function Lt(){V++,i==="reverse"?(A=V%2===0,n=Ta(n,y,a,A)):(n=pi(n,y,a),i==="mirror"&&z.flipTarget()),P=!1,d&&d()}o(Lt,"repeat");function ae(){b.stop(),f&&f()}o(ae,"complete");function dt(k){if(A||(k=-k),n+=k,!P){const it=z.next(Math.max(0,n));x=it.value,L&&(x=L(x)),P=A?it.done:n<=0}h&&h(x),P&&(V===0&&(y=y!==void 0?y:n),V<s?Va(n,y,a,A)&&Lt():ae())}o(dt,"update");function M(){c&&c(),b=e(dt),b.start()}return o(M,"play"),l&&M(),{stop:()=>{u&&u(),b.stop()},sample:k=>z.next(Math.max(0,k))}}o(qt,"animate$1");function Pa(t){return!t||Array.isArray(t)||typeof t=="string"&&mi[t]}o(Pa,"isWaapiSupportedEasing");const mt=o(([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,"cubicBezierAsString"),mi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mt([0,.65,.55,1]),circOut:mt([.55,0,1,.45]),backIn:mt([.31,.01,.66,-.59]),backOut:mt([.33,1.53,.69,.99])};function Aa(t){if(!!t)return Array.isArray(t)?mt(t):mi[t]}o(Aa,"mapEasingToNativeEasing");function Ca(t,e,n,{delay:s=0,duration:i,repeat:a=0,repeatType:r="loop",ease:l,times:c}={}){return t.animate({[e]:n,offset:c},{delay:s,duration:i,easing:Aa(l),fill:"both",iterations:a+1,direction:r==="reverse"?"alternate":"normal"})}o(Ca,"animateStyle");const Bt=10;function Sa(t,e,{onUpdate:n,onComplete:s,...i}){let{keyframes:a,duration:r=.3,elapsed:l=0,ease:c}=i;if(i.type==="spring"||!Pa(i.ease)){const f=qt(i);let d={done:!1,value:a[0]};const h=[];let p=0;for(;!d.done;)d=f.sample(p),h.push(d.value),p+=Bt;a=h,r=p-Bt,c="linear"}const u=Ca(t.owner.current,e,a,{...i,delay:-l,duration:r,ease:c});return u.onfinish=()=>{t.set(a[a.length-1]),s&&s()},()=>{const{currentTime:f}=u;if(f){const d=qt(i);t.setWithVelocity(d.sample(f-Bt).value,d.sample(f).value,Bt)}O.update(()=>u.cancel())}}o(Sa,"createAcceleratedAnimation");function gi(t,e){const n=performance.now(),s=o(({timestamp:i})=>{const a=i-n;a>=e&&(X.read(s),t(a-e))},"checkElapsed");return O.read(s,!0),()=>X.read(s)}o(gi,"delay");function Da({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const i=o(()=>(n&&n(t[t.length-1]),s&&s(),()=>{}),"setValue");return e?gi(i,-e):i()}o(Da,"createInstantAnimation");function Ma({keyframes:t,velocity:e=0,min:n,max:s,power:i=.8,timeConstant:a=750,bounceStiffness:r=500,bounceDamping:l=10,restDelta:c=1,modifyTarget:u,driver:f,onUpdate:d,onComplete:h,onStop:p}){const m=t[0];let g;function T(x){return n!==void 0&&x<n||s!==void 0&&x>s}o(T,"isOutOfBounds");function b(x){return n===void 0?s:s===void 0||Math.abs(n-x)<Math.abs(s-x)?n:s}o(b,"findNearestBoundary");function V(x){g==null||g.stop(),g=qt({keyframes:[0,1],velocity:0,...x,driver:f,onUpdate:P=>{var A;d==null||d(P),(A=x.onUpdate)===null||A===void 0||A.call(x,P)},onComplete:h,onStop:p})}o(V,"startAnimation");function y(x){V({type:"spring",stiffness:r,damping:l,restDelta:c,...x})}if(o(y,"startSpring"),T(m))y({velocity:e,keyframes:[m,b(m)]});else{let x=i*e+m;typeof u<"u"&&(x=u(x));const P=b(x),A=P===n?-1:1;let L,I;const _=o(E=>{L=I,I=E,e=Qe(E-L,W.delta),(A===1&&E>P||A===-1&&E<P)&&y({keyframes:[E,P],velocity:e})},"checkBoundary");V({type:"decay",keyframes:[m,0],velocity:e,timeConstant:a,power:i,restDelta:c,modifyTarget:u,onUpdate:T(x)?_:void 0})}return{stop:()=>g==null?void 0:g.stop()}}o(Ma,"inertia");const Z=o(()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),"underDampedSpring"),Ot=o(t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),"criticallyDampedSpring"),pe=o(()=>({type:"keyframes",ease:"linear",duration:.3}),"linearTween"),Ra={type:"keyframes",duration:.8},Dn={x:Z,y:Z,z:Z,rotate:Z,rotateX:Z,rotateY:Z,rotateZ:Z,scaleX:Ot,scaleY:Ot,scale:Ot,opacity:pe,backgroundColor:pe,color:pe,default:Ot},La=o((t,{keyframes:e})=>e.length>2?Ra:(Dn[t]||Dn.default)(e[1]),"getDefaultTransition"),Re=o((t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&q.test(e)&&!e.startsWith("url(")),"isAnimatable");function Ea({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:a,repeatType:r,repeatDelay:l,from:c,...u}){return!!Object.keys(u).length}o(Ea,"isTransitionDefined");function Mn(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}o(Mn,"isZero");function Rn(t){return typeof t=="number"?0:nn("",t)}o(Rn,"getZeroUnit");function yi(t,e){return t[e]||t.default||t}o(yi,"getValueTransition");function Ba(t,e,n,s){const i=Re(e,n);let a=s.from!==void 0?s.from:t.get();return a==="none"&&i&&typeof n=="string"?a=nn(e,n):Mn(a)&&typeof n=="string"?a=Rn(n):!Array.isArray(n)&&Mn(n)&&typeof a=="string"&&(n=Rn(a)),Array.isArray(n)?(n[0]===null&&(n[0]=a),n):[a,n]}o(Ba,"getKeyframes");const Ln={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},me={},vi={};for(const t in Ln)vi[t]=()=>(me[t]===void 0&&(me[t]=Ln[t]()),me[t]);const Oa=new Set(["opacity"]),fn=o((t,e,n,s={})=>i=>{const a=yi(s,t)||{},r=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-_t(r);const c=Ba(e,t,n,a),u=c[0],f=c[c.length-1],d=Re(t,u),h=Re(t,f);let p={keyframes:c,velocity:e.getVelocity(),...a,elapsed:l,onUpdate:b=>{e.set(b),a.onUpdate&&a.onUpdate(b)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(!d||!h||zr.current||a.type===!1)return Da(p);if(a.type==="inertia"){const b=Ma(p);return()=>b.stop()}Ea(a)||(p={...p,...La(t,p)}),p.duration&&(p.duration=_t(p.duration)),p.repeatDelay&&(p.repeatDelay=_t(p.repeatDelay));const m=e.owner,g=m&&m.current;if(vi.waapi()&&Oa.has(t)&&!p.repeatDelay&&p.repeatType!=="mirror"&&p.damping!==0&&m&&g instanceof HTMLElement&&!m.getProps().onUpdate)return Sa(e,t,p);{const b=qt(p);return()=>b.stop()}},"createMotionValueAnimation");function Fa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(a=>Le(t,a,n));s=Promise.all(i)}else if(typeof e=="string")s=Le(t,e,n);else{const i=typeof e=="function"?re(t,e,n.custom):e;s=xi(t,i,n)}return s.then(()=>t.notify("AnimationComplete",e))}o(Fa,"animateVisualElement");function Le(t,e,n={}){var s;const i=re(t,e,n.custom);let{transition:a=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const r=i?()=>xi(t,i,n):()=>Promise.resolve(),l=!((s=t.variantChildren)===null||s===void 0)&&s.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=a;return Ia(t,e,f+u,d,h,n)}:()=>Promise.resolve(),{when:c}=a;if(c){const[u,f]=c==="beforeChildren"?[r,l]:[l,r];return u().then(f)}else return Promise.all([r(),l(n.delay)])}o(Le,"animateVariant");function xi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var a;let{transition:r=t.getDefaultTransition(),transitionEnd:l,...c}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(r=s);const f=[],d=i&&((a=t.animationState)===null||a===void 0?void 0:a.getState()[i]);for(const h in c){const p=t.getValue(h),m=c[h];if(!p||m===void 0||d&&ka(d,h))continue;let g={delay:n,elapsed:0,...r};if(t.shouldReduceMotion&&nt.has(h)&&(g={...g,type:!1,delay:0}),!p.hasAnimated){const b=t.getProps()[Nr];b&&(g.elapsed=jr(b,h))}let T=p.start(fn(h,p,m,g));Kt(u)&&(u.add(h),T=T.then(()=>u.remove(h))),f.push(T)}return Promise.all(f).then(()=>{l&&Or(t,l)})}o(xi,"animateTarget");function Ia(t,e,n=0,s=0,i=1,a){const r=[],l=(t.variantChildren.size-1)*s,c=i===1?(u=0)=>u*s:(u=0)=>l-u*s;return Array.from(t.variantChildren).sort(_a).forEach((u,f)=>{r.push(Le(u,e,{...a,delay:n+c(f)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}o(Ia,"animateChildren");function _a(t,e){return t.sortNodePosition(e)}o(_a,"sortByTreeOrder");function ka({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}o(ka,"shouldBlockAnimation");const dn=[C.Animate,C.InView,C.Focus,C.Hover,C.Tap,C.Drag,C.Exit],ja=[...dn].reverse(),Ua=dn.length;function Na(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Fa(t,n,s)))}o(Na,"animateList");function $a(t){let e=Na(t);const n=Ga();let s=!0;const i=o((c,u)=>{const f=re(t,u);if(f){const{transition:d,transitionEnd:h,...p}=f;c={...c,...p,...h}}return c},"buildResolvedTypeValues");function a(c){e=c(t)}o(a,"setAnimateFunction");function r(c,u){const f=t.getProps(),d=t.getVariantContext(!0)||{},h=[],p=new Set;let m={},g=1/0;for(let b=0;b<Ua;b++){const V=ja[b],y=n[V],x=f[V]!==void 0?f[V]:d[V],P=wt(x),A=V===u?y.isActive:null;A===!1&&(g=b);let L=x===d[V]&&x!==f[V]&&P;if(L&&s&&t.manuallyAnimateOnMount&&(L=!1),y.protectedKeys={...m},!y.isActive&&A===null||!x&&!y.prevProp||Qt(x)||typeof x=="boolean")continue;const I=za(y.prevProp,x);let _=I||V===u&&y.isActive&&!L&&P||b>g&&P;const E=Array.isArray(x)?x:[x];let z=E.reduce(i,{});A===!1&&(z={});const{prevResolvedValues:Lt={}}=y,ae={...Lt,...z},dt=o(M=>{_=!0,p.delete(M),y.needsAnimating[M]=!0},"markToAnimate");for(const M in ae){const k=z[M],it=Lt[M];m.hasOwnProperty(M)||(k!==it?zt(k)&&zt(it)?!Ks(k,it)||I?dt(M):y.protectedKeys[M]=!0:k!==void 0?dt(M):p.add(M):k!==void 0&&p.has(M)?dt(M):y.protectedKeys[M]=!0)}y.prevProp=x,y.prevResolvedValues=z,y.isActive&&(m={...m,...z}),s&&t.blockInitialAnimation&&(_=!1),_&&!L&&h.push(...E.map(M=>({animation:M,options:{type:V,...c}})))}if(p.size){const b={};p.forEach(V=>{const y=t.getBaseTarget(V);y!==void 0&&(b[V]=y)}),h.push({animation:b})}let T=Boolean(h.length);return s&&f.initial===!1&&!t.manuallyAnimateOnMount&&(T=!1),s=!1,T?e(h):Promise.resolve()}o(r,"animateChanges");function l(c,u,f){var d;if(n[c].isActive===u)return Promise.resolve();(d=t.variantChildren)===null||d===void 0||d.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(c,u)}),n[c].isActive=u;const h=r(f,c);for(const p in n)n[p].protectedKeys={};return h}return o(l,"setActive"),{animateChanges:r,setActive:l,setAnimateFunction:a,getState:()=>n}}o($a,"createAnimationState");function za(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ks(e,t):!1}o(za,"checkVariantsDidChange");function J(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}o(J,"createTypeState");function Ga(){return{[C.Animate]:J(!0),[C.InView]:J(),[C.Hover]:J(),[C.Tap]:J(),[C.Drag]:J(),[C.Focus]:J(),[C.Exit]:J()}}o(Ga,"createState");const Wa={animation:Y(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=$a(t)),Qt(e)&&v.exports.useEffect(()=>e.subscribe(t),[e])}),exit:Y(t=>{const{custom:e,visualElement:n}=t,[s,i]=Ws(),a=v.exports.useContext(St);v.exports.useEffect(()=>{n.isPresent=s;const r=n.animationState&&n.animationState.setActive(C.Exit,!s,{custom:a&&a.custom||e});r&&!s&&r.then(i)},[s])})},En=o((t,e)=>Math.abs(t-e),"distance");function Ka(t,e){const n=En(t.x,e.x),s=En(t.y,e.y);return Math.sqrt(n**2+s**2)}o(Ka,"distance2D");class hn{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=ye(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Ka(u.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:h}=u,{timestamp:p}=W;this.history.push({...h,timestamp:p});const{onStart:m,onMove:g}=this.handlers;f||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=ge(f,this.transformPagePoint),Fs(u)&&u.buttons===0){this.handlePointerUp(u,f);return}O.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:d,onSessionEnd:h}=this.handlers,p=ye(ge(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,p),h&&h(u,p)},Is(e)&&e.touches.length>1)return;this.handlers=n,this.transformPagePoint=s;const i=Xe(e),a=ge(i,this.transformPagePoint),{point:r}=a,{timestamp:l}=W;this.history=[{...r,timestamp:l}];const{onSessionStart:c}=n;c&&c(e,ye(a,this.history)),this.removeListeners=se(ct(window,"pointermove",this.handlePointerMove),ct(window,"pointerup",this.handlePointerUp),ct(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),X.update(this.updatePoint)}}o(hn,"PanSession");function ge(t,e){return e?{point:e(t.point)}:t}o(ge,"transformPoint");function Bn(t,e){return{x:t.x-e.x,y:t.y-e.y}}o(Bn,"subtractPoint");function ye({point:t},e){return{point:t,delta:Bn(t,bi(e)),offset:Bn(t,Ha(e)),velocity:Ya(e,.1)}}o(ye,"getPanInfo");function Ha(t){return t[0]}o(Ha,"startDevicePoint");function bi(t){return t[t.length-1]}o(bi,"lastDevicePoint");function Ya(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=bi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>_t(e)));)n--;if(!s)return{x:0,y:0};const a=(i.timestamp-s.timestamp)/1e3;if(a===0)return{x:0,y:0};const r={x:(i.x-s.x)/a,y:(i.y-s.y)/a};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}o(Ya,"getVelocity");function F(t){return t.max-t.min}o(F,"calcLength");function Ee(t,e=0,n=.01){return Math.abs(t-e)<=n}o(Ee,"isNear");function On(t,e,n,s=.5){t.origin=s,t.originPoint=S(e.min,e.max,t.origin),t.scale=F(n)/F(e),(Ee(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=S(n.min,n.max,t.origin)-t.originPoint,(Ee(t.translate)||isNaN(t.translate))&&(t.translate=0)}o(On,"calcAxisDelta");function bt(t,e,n,s){On(t.x,e.x,n.x,s==null?void 0:s.originX),On(t.y,e.y,n.y,s==null?void 0:s.originY)}o(bt,"calcBoxDelta");function Fn(t,e,n){t.min=n.min+e.min,t.max=t.min+F(e)}o(Fn,"calcRelativeAxis");function Xa(t,e,n){Fn(t.x,e.x,n.x),Fn(t.y,e.y,n.y)}o(Xa,"calcRelativeBox");function In(t,e,n){t.min=e.min-n.min,t.max=t.min+F(e)}o(In,"calcRelativeAxisPosition");function Tt(t,e,n){In(t.x,e.x,n.x),In(t.y,e.y,n.y)}o(Tt,"calcRelativePosition");function qa(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?S(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?S(n,t,s.max):Math.min(t,n)),t}o(qa,"applyConstraints");function _n(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}o(_n,"calcRelativeAxisConstraints");function Za(t,{top:e,left:n,bottom:s,right:i}){return{x:_n(t.x,n,i),y:_n(t.y,e,s)}}o(Za,"calcRelativeConstraints");function kn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}o(kn,"calcViewportAxisConstraints");function Ja(t,e){return{x:kn(t.x,e.x),y:kn(t.y,e.y)}}o(Ja,"calcViewportConstraints");function Qa(t,e){let n=.5;const s=F(t),i=F(e);return i>s?n=Yt(e.min,e.max-s,t.min):s>i&&(n=Yt(t.min,t.max-i,e.min)),ut(0,1,n)}o(Qa,"calcOrigin");function tl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}o(tl,"rebaseAxisConstraints");const Be=.35;function el(t=Be){return t===!1?t=0:t===!0&&(t=Be),{x:jn(t,"left","right"),y:jn(t,"top","bottom")}}o(el,"resolveDragElastic");function jn(t,e,n){return{min:Un(t,e),max:Un(t,n)}}o(jn,"resolveAxisElastic");function Un(t,e){return typeof t=="number"?t:t[e]||0}o(Un,"resolvePointElastic");const Nn=o(()=>({translate:0,scale:1,origin:0,originPoint:0}),"createAxisDelta"),Vt=o(()=>({x:Nn(),y:Nn()}),"createDelta"),$n=o(()=>({min:0,max:0}),"createAxis"),D=o(()=>({x:$n(),y:$n()}),"createBox");function U(t){return[t("x"),t("y")]}o(U,"eachAxis");function Ti({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}o(Ti,"convertBoundingBoxToBox");function nl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}o(nl,"convertBoxToBoundingBox");function sl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}o(sl,"transformBoxPoints");function ve(t){return t===void 0||t===1}o(ve,"isIdentityScale");function Oe({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}o(Oe,"hasScale");function Q(t){return Oe(t)||Vi(t)||t.z||t.rotate||t.rotateX||t.rotateY}o(Q,"hasTransform");function Vi(t){return zn(t.x)||zn(t.y)}o(Vi,"has2DTranslate");function zn(t){return t&&t!=="0%"}o(zn,"is2DTranslate");function Zt(t,e,n){const s=t-n,i=e*s;return n+i}o(Zt,"scalePoint");function Gn(t,e,n,s,i){return i!==void 0&&(t=Zt(t,i,s)),Zt(t,n,s)+e}o(Gn,"applyPointDelta");function Fe(t,e=0,n=1,s,i){t.min=Gn(t.min,e,n,s,i),t.max=Gn(t.max,e,n,s,i)}o(Fe,"applyAxisDelta");function wi(t,{x:e,y:n}){Fe(t.x,e.translate,e.scale,e.originPoint),Fe(t.y,n.translate,n.scale,n.originPoint)}o(wi,"applyBoxDelta");function il(t,e,n,s=!1){var i,a;const r=n.length;if(!r)return;e.x=e.y=1;let l,c;for(let u=0;u<r;u++)l=n[u],c=l.projectionDelta,((a=(i=l.instance)===null||i===void 0?void 0:i.style)===null||a===void 0?void 0:a.display)!=="contents"&&(s&&l.options.layoutScroll&&l.scroll&&l!==l.root&<(t,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),c&&(e.x*=c.x.scale,e.y*=c.y.scale,wi(t,c)),s&&Q(l.latestValues)&<(t,l.latestValues));e.x=Wn(e.x),e.y=Wn(e.y)}o(il,"applyTreeDeltas");function Wn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}o(Wn,"snapToDefault");function H(t,e){t.min=t.min+e,t.max=t.max+e}o(H,"translateAxis");function Kn(t,e,[n,s,i]){const a=e[i]!==void 0?e[i]:.5,r=S(t.min,t.max,a);Fe(t,e[n],e[s],r,e.scale)}o(Kn,"transformAxis");const ol=["x","scaleX","originX"],rl=["y","scaleY","originY"];function lt(t,e){Kn(t.x,e,ol),Kn(t.y,e,rl)}o(lt,"transformBox");function Pi(t,e){return Ti(sl(t.getBoundingClientRect(),e))}o(Pi,"measureViewportBox");function al(t,e,n){const s=Pi(t,n),{scroll:i}=e;return i&&(H(s.x,i.offset.x),H(s.y,i.offset.y)),s}o(al,"measurePageBox");const ll=new WeakMap;class Ai{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=D(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const s=o(l=>{this.stopAnimation(),n&&this.snapToCursor(Xe(l,"page").point)},"onSessionStart"),i=o((l,c)=>{var u;const{drag:f,dragPropagation:d,onDragStart:h}=this.getProps();f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Us(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),U(p=>{var m,g;let T=this.getAxisMotionValue(p).get()||0;if(N.test(T)){const b=(g=(m=this.visualElement.projection)===null||m===void 0?void 0:m.layout)===null||g===void 0?void 0:g.layoutBox[p];b&&(T=F(b)*(parseFloat(T)/100))}this.originPoint[p]=T}),h==null||h(l,c),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(C.Drag,!0))},"onStart"),a=o((l,c)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=c;if(f&&this.currentDirection===null){this.currentDirection=cl(p),this.currentDirection!==null&&(d==null||d(this.currentDirection));return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),h==null||h(l,c)},"onMove"),r=o((l,c)=>this.stop(l,c),"onSessionEnd");this.panSession=new hn(e,{onSessionStart:s,onStart:i,onMove:a,onSessionEnd:r},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a==null||a(e,n)}cancel(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(C.Drag,!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ft(e,i,this.currentDirection))return;const a=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=qa(r,this.constraints[e],this.elastic[e])),a.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&&rt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Za(s.layoutBox,e):this.constraints=!1,this.elastic=el(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&U(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=tl(s.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!rt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=al(s,i.root,this.visualElement.getTransformPagePoint());let r=Ja(i.layout.layoutBox,a);if(n){const l=n(nl(r));this.hasMutatedConstraints=!!l,l&&(r=Ti(l))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:a,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=U(f=>{if(!Ft(f,n,this.currentDirection))return;let d=(c==null?void 0:c[f])||{};r&&(d={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:s?e[f]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(f,m)});return Promise.all(u).then(l)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(fn(e,s,0,n))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var n;const s="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[s];return i||this.visualElement.getValue(e,((n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[e])||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!Ft(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[n];a.set(e[n]-S(r,l,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:n,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!rt(s)||!i||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};U(l=>{const c=this.getAxisMotionValue(l);if(c){const u=c.get();a[l]=Qa({min:u,max:u},this.constraints[l])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),U(l=>{if(!Ft(l,n,null))return;const c=this.getAxisMotionValue(l),{min:u,max:f}=this.constraints[l];c.set(S(u,f,a[l]))})}addListeners(){var e;if(!this.visualElement.current)return;ll.set(this.visualElement,this);const n=this.visualElement.current,s=ct(n,"pointerdown",u=>{const{drag:f,dragListener:d=!0}=this.getProps();f&&d&&this.start(u)}),i=o(()=>{const{dragConstraints:u}=this.getProps();rt(u)&&(this.constraints=this.resolveRefConstraints())},"measureDragConstraints"),{projection:a}=this.visualElement,r=a.addEventListener("measure",i);a&&!a.layout&&((e=a.root)===null||e===void 0||e.updateScroll(),a.updateLayout()),i();const l=ne(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(U(d=>{const h=this.getAxisMotionValue(d);!h||(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())});return()=>{l(),s(),r(),c==null||c()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:r=Be,dragMomentum:l=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:a,dragElastic:r,dragMomentum:l}}}o(Ai,"VisualElementDragControls");function Ft(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}o(Ft,"shouldDrag");function cl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}o(cl,"getCurrentDirection");function ul(t){const{dragControls:e,visualElement:n}=t,s=ee(()=>new Ai(n));v.exports.useEffect(()=>e&&e.subscribe(s),[s,e]),v.exports.useEffect(()=>s.addListeners(),[s])}o(ul,"useDrag");function fl({onPan:t,onPanStart:e,onPanEnd:n,onPanSessionStart:s,visualElement:i}){const a=t||e||n||s,r=v.exports.useRef(null),{transformPagePoint:l}=v.exports.useContext(je),c={onSessionStart:s,onStart:e,onMove:t,onEnd:(f,d)=>{r.current=null,n&&n(f,d)}};v.exports.useEffect(()=>{r.current!==null&&r.current.updateHandlers(c)});function u(f){r.current=new hn(f,c,{transformPagePoint:l})}o(u,"onPointerDown"),Gt(i,"pointerdown",a&&u),qe(()=>r.current&&r.current.end())}o(fl,"usePanGesture");const dl={pan:Y(fl),drag:Y(ul)};function Ie(t){return typeof t=="string"&&t.startsWith("var(--")}o(Ie,"isCSSVariable");const Ci=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function hl(t){const e=Ci.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}o(hl,"parseCSSVariable");function _e(t,e,n=1){const[s,i]=hl(t);if(!s)return;const a=window.getComputedStyle(e).getPropertyValue(s);return a?a.trim():Ie(i)?_e(i,e,n+1):i}o(_e,"getVariableValue");function pl(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const a=i.get();if(!Ie(a))return;const r=_e(a,s);r&&i.set(r)});for(const i in e){const a=e[i];if(!Ie(a))continue;const r=_e(a,s);!r||(e[i]=r,n&&n[i]===void 0&&(n[i]=a))}return{target:e,transitionEnd:n}}o(pl,"resolveCSSVariables");const ml=new Set(["width","height","top","left","right","bottom","x","y"]),Si=o(t=>ml.has(t),"isPositionalKey"),gl=o(t=>Object.keys(t).some(Si),"hasPositionalKey"),Di=o((t,e)=>{t.set(e,!1),t.set(e)},"setAndResetVelocity"),Hn=o(t=>t===st||t===w,"isNumOrPxType");var Yn;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(Yn||(Yn={}));const Xn=o((t,e)=>parseFloat(t.split(", ")[e]),"getPosFromMatrix"),qn=o((t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return Xn(i[1],e);{const a=s.match(/^matrix\((.+)\)$/);return a?Xn(a[1],t):0}},"getTranslateFromMatrix"),yl=new Set(["x","y","z"]),vl=Nt.filter(t=>!yl.has(t));function xl(t){const e=[];return vl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}o(xl,"removeNonTranslationalTransform");const Zn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:qn(4,13),y:qn(5,14)},bl=o((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,a=getComputedStyle(i),{display:r}=a,l={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{l[u]=Zn[u](s,a)}),e.render();const c=e.measureViewportBox();return n.forEach(u=>{const f=e.getValue(u);Di(f,l[u]),t[u]=Zn[u](c,a)}),t},"convertChangedValueTypes"),Tl=o((t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Si);let a=[],r=!1;const l=[];if(i.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let f=n[c],d=ht(f);const h=e[c];let p;if(zt(h)){const m=h.length,g=h[0]===null?1:0;f=h[g],d=ht(f);for(let T=g;T<m;T++)p?Ht(ht(h[T])===p):p=ht(h[T])}else p=ht(h);if(d!==p)if(Hn(d)&&Hn(p)){const m=u.get();typeof m=="string"&&u.set(parseFloat(m)),typeof h=="string"?e[c]=parseFloat(h):Array.isArray(h)&&p===w&&(e[c]=h.map(parseFloat))}else(d==null?void 0:d.transform)&&(p==null?void 0:p.transform)&&(f===0||h===0)?f===0?u.set(p.transform(f)):e[c]=d.transform(h):(r||(a=xl(t),r=!0),l.push(c),s[c]=s[c]!==void 0?s[c]:e[c],Di(u,h))}),l.length){const c=l.indexOf("height")>=0?window.pageYOffset:null,u=bl(e,t,l);return a.length&&a.forEach(([f,d])=>{t.getValue(f).set(d)}),t.render(),et&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:s}}else return{target:e,transitionEnd:s}},"checkAndConvertChangedValueTypes");function Vl(t,e,n,s){return gl(e)?Tl(t,e,n,s):{target:e,transitionEnd:s}}o(Vl,"unitConversion");const wl=o((t,e,n,s)=>{const i=pl(t,e,s);return e=i.target,s=i.transitionEnd,Vl(t,e,n,s)},"parseDomVariant"),ke={current:null},Mi={current:!1};function Pl(){if(Mi.current=!0,!!et)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=o(()=>ke.current=t.matches,"setReducedMotionPreferences");t.addListener(e),e()}else ke.current=!1}o(Pl,"initPrefersReducedMotion");function Al(t,e,n){const{willChange:s}=e;for(const i in e){const a=e[i],r=n[i];if($(a))t.addValue(i,a),Kt(s)&&s.add(i);else if($(r))t.addValue(i,ft(a,{owner:t})),Kt(s)&&s.remove(i);else if(r!==a)if(t.hasValue(i)){const l=t.getValue(i);!l.hasAnimated&&l.set(a)}else{const l=t.getStaticValue(i);t.addValue(i,ft(l!==void 0?l:a))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}o(Al,"updateMotionValuesFromProps");const Ri=Object.keys(Pt),Cl=Ri.length,Jn=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Li{constructor({parent:e,props:n,reducedMotionConfig: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.isPresent=!0,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.scheduleRender=()=>O.render(this.render,!1,!0);const{latestValues:r,renderState:l}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=n.initial?{...r}:{},this.renderState=l,this.parent=e,this.props=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.isControllingVariants=te(n),this.isVariantNode=Ts(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n);for(const f in u){const d=u[f];r[f]!==void 0&&$(d)&&(d.set(r[f],!1),Kt(c)&&c.add(f))}}scrapeMotionValuesFromProps(e){return{}}mount(e){var n;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),Mi.current||Pl(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ke.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,n,s;(e=this.projection)===null||e===void 0||e.unmount(),X.update(this.notifyUpdate),X.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(s=this.parent)===null||s===void 0||s.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,n){const s=nt.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&O.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),a()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures(e,n,s,i,a,r){const l=[];for(let c=0;c<Cl;c++){const u=Ri[c],{isEnabled:f,Component:d}=Pt[u];f(e)&&d&&l.push(v.exports.createElement(d,{key:u,...e,visualElement:this}))}if(!this.projection&&a){this.projection=new a(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:f,dragConstraints:d,layoutScroll:h}=e;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:Boolean(f)||d&&rt(d),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:r,layoutScroll:h})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):D()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(let n=0;n<Jn.length;n++){const s=Jn[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=e["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Al(this,this.scrapeMotionValuesFromProps(e),this.prevMotionValues)}getProps(){return this.props}getVariant(e){var n;return(n=this.props.variants)===null||n===void 0?void 0:n[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:(e=this.parent)===null||e===void 0?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var n,s;if(e)return(n=this.parent)===null||n===void 0?void 0:n.getVariantContext();if(!this.isControllingVariants){const a=((s=this.parent)===null||s===void 0?void 0:s.getVariantContext())||{};return this.props.initial!==void 0&&(a.initial=this.props.initial),a}const i={};for(let a=0;a<Sl;a++){const r=Ei[a],l=this.props[r];(wt(l)||l===!1)&&(i[r]=l)}return i}addVariantChild(e){var n;const s=this.getClosestVariantNode();if(s)return(n=s.variantChildren)===null||n===void 0||n.add(e),()=>s.variantChildren.delete(e)}addValue(e,n){this.hasValue(e)&&this.removeValue(e),this.values.set(e,n),this.latestValues[e]=n.get(),this.bindToMotionValue(e,n)}removeValue(e){var n;this.values.delete(e),(n=this.valueSubscriptions.get(e))===null||n===void 0||n(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=ft(n,{owner:this}),this.addValue(e,s)),s}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=Ye(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,e);return a!==void 0&&!$(a)?a:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new oe),this.events[e].add(n)}notify(e,...n){var s;(s=this.events[e])===null||s===void 0||s.notify(...n)}}o(Li,"VisualElement");const Ei=["initial",...dn],Sl=Ei.length;class pn extends Li{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){var s;return(s=e.style)===null||s===void 0?void 0:s[n]}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},a){let r=_r(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),r&&(r=i(r))),a){Fr(this,s,r);const l=wl(this,s,r,n);n=l.transitionEnd,s=l.target}return{transition:e,transitionEnd:n,...s}}}o(pn,"DOMVisualElement");function Dl(t){return window.getComputedStyle(t)}o(Dl,"getComputedStyle$1");class Bi extends pn{readValueFromInstance(e,n){if(nt.has(n)){const s=en(n);return s&&s.default||0}else{const s=Dl(e),i=(As(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Pi(e,n)}build(e,n,s,i){$e(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e){return He(e)}renderInstance(e,n,s,i){Rs(e,n,s,i)}}o(Bi,"HTMLVisualElement");class Oi extends pn{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){var s;return nt.has(n)?((s=en(n))===null||s===void 0?void 0:s.default)||0:(n=Ls.has(n)?n:Ke(n),e.getAttribute(n))}measureInstanceViewportBox(){return D()}scrapeMotionValuesFromProps(e){return Bs(e)}build(e,n,s,i){Ge(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Es(e,n,s,i)}mount(e){this.isSVGTag=We(e.tagName),super.mount(e)}}o(Oi,"SVGVisualElement");const Ml=o((t,e)=>Ne(t)?new Oi(e,{enableHardwareAcceleration:!1}):new Bi(e,{enableHardwareAcceleration:!0}),"createDomVisualElement");function Qn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}o(Qn,"pixelsToPercent");const pt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=Qn(t,e.target.x),s=Qn(t,e.target.y);return`${n}% ${s}%`}},ts="_$css",Rl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=t.includes("var("),a=[];i&&(t=t.replace(Ci,p=>(a.push(p),ts)));const r=q.parse(t);if(r.length>5)return s;const l=q.createTransformer(t),c=typeof r[0]!="number"?1:0,u=n.x.scale*e.x,f=n.y.scale*e.y;r[0+c]/=u,r[1+c]/=f;const d=S(u,f,.5);typeof r[2+c]=="number"&&(r[2+c]/=d),typeof r[3+c]=="number"&&(r[3+c]/=d);let h=l(r);if(i){let p=0;h=h.replace(ts,()=>{const m=a[p];return p++,m})}return h}};class Fi extends vs.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:a}=e;uo(El),a&&(n.group&&n.group.add(a),s&&s.register&&i&&s.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:a}=this.props,r=s.projection;return r&&(r.isPresent=a,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?r.promote():r.relegate()||O.postRender(()=>{var l;!((l=r.getStack())===null||l===void 0)&&l.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(i),s!=null&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}o(Fi,"MeasureLayoutWithContext");function Ll(t){const[e,n]=Ws(),s=v.exports.useContext(Ue);return R(Fi,{...t,layoutGroup:s,switchLayoutGroup:v.exports.useContext(ws),isPresent:e,safeToRemove:n})}o(Ll,"MeasureLayout");const El={borderRadius:{...pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pt,borderTopRightRadius:pt,borderBottomLeftRadius:pt,borderBottomRightRadius:pt,boxShadow:Rl},Bl={measureLayout:Ll};function Ol(t,e,n={}){const s=$(t)?t:ft(t);return s.start(fn("",s,e,n)),{stop:()=>s.stop(),isAnimating:()=>s.isAnimating()}}o(Ol,"animate");const Ii=["TopLeft","TopRight","BottomLeft","BottomRight"],Fl=Ii.length,es=o(t=>typeof t=="string"?parseFloat(t):t,"asNumber"),ns=o(t=>typeof t=="number"||w.test(t),"isPx");function Il(t,e,n,s,i,a){i?(t.opacity=S(0,n.opacity!==void 0?n.opacity:1,_l(s)),t.opacityExit=S(e.opacity!==void 0?e.opacity:1,0,kl(s))):a&&(t.opacity=S(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<Fl;r++){const l=`border${Ii[r]}Radius`;let c=ss(e,l),u=ss(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||ns(c)===ns(u)?(t[l]=Math.max(S(es(c),es(u),s),0),(N.test(u)||N.test(c))&&(t[l]+="%")):t[l]=u}(e.rotate||n.rotate)&&(t.rotate=S(e.rotate||0,n.rotate||0,s))}o(Il,"mixValues");function ss(t,e){return t[e]!==void 0?t[e]:t.borderRadius}o(ss,"getRadius");const _l=_i(0,.5,cn),kl=_i(.5,.95,ln);function _i(t,e,n){return s=>s<t?0:s>e?1:n(Yt(t,e,s))}o(_i,"compress");function is(t,e){t.min=e.min,t.max=e.max}o(is,"copyAxisInto");function j(t,e){is(t.x,e.x),is(t.y,e.y)}o(j,"copyBoxInto");function os(t,e,n,s,i){return t-=e,t=Zt(t,1/n,s),i!==void 0&&(t=Zt(t,1/i,s)),t}o(os,"removePointDelta");function jl(t,e=0,n=1,s=.5,i,a=t,r=t){if(N.test(e)&&(e=parseFloat(e),e=S(r.min,r.max,e/100)-r.min),typeof e!="number")return;let l=S(a.min,a.max,s);t===a&&(l-=e),t.min=os(t.min,e,n,l,i),t.max=os(t.max,e,n,l,i)}o(jl,"removeAxisDelta");function rs(t,e,[n,s,i],a,r){jl(t,e[n],e[s],e[i],e.scale,a,r)}o(rs,"removeAxisTransforms");const Ul=["x","scaleX","originX"],Nl=["y","scaleY","originY"];function as(t,e,n,s){rs(t.x,e,Ul,n==null?void 0:n.x,s==null?void 0:s.x),rs(t.y,e,Nl,n==null?void 0:n.y,s==null?void 0:s.y)}o(as,"removeBoxTransforms");function ls(t){return t.translate===0&&t.scale===1}o(ls,"isAxisDeltaZero");function ki(t){return ls(t.x)&&ls(t.y)}o(ki,"isDeltaZero");function ji(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}o(ji,"boxEquals");function cs(t){return F(t.x)/F(t.y)}o(cs,"aspectRatio");class Ui{constructor(){this.members=[]}add(e){Ze(this.members,e),e.scheduleRender()}remove(e){if(Je(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){s=a;break}}return s?(this.promote(s),!0):!1}promote(e,n){var s;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((s=e.root)===null||s===void 0)&&s.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:a}=e.options;a===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,a,r;(s=(n=e.options).onExitComplete)===null||s===void 0||s.call(n),(r=(i=e.resumingFrom)===null||i===void 0?void 0:(a=i.options).onExitComplete)===null||r===void 0||r.call(a)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}o(Ui,"NodeStack");function us(t,e,n){let s="";const i=t.x.translate/e.x,a=t.y.translate/e.y;if((i||a)&&(s=`translate3d(${i}px, ${a}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:u,rotateY:f}=n;c&&(s+=`rotate(${c}deg) `),u&&(s+=`rotateX(${u}deg) `),f&&(s+=`rotateY(${f}deg) `)}const r=t.x.scale*e.x,l=t.y.scale*e.y;return(r!==1||l!==1)&&(s+=`scale(${r}, ${l})`),s||"none"}o(us,"buildProjectionTransform");const $l=o((t,e)=>t.depth-e.depth,"compareByDepth");class Ni{constructor(){this.children=[],this.isDirty=!1}add(e){Ze(this.children,e),this.isDirty=!0}remove(e){Je(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($l),this.isDirty=!1,this.children.forEach(e)}}o(Ni,"FlatTree");const fs=["","X","Y","Z"],ds=1e3;let zl=0;function $i({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return o(class{constructor(r,l={},c=e==null?void 0:e()){this.id=zl++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Kl),this.nodes.forEach(Xl),this.nodes.forEach(ql)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=r,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,r&&this.root.registerPotentialNode(r,this);for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ni)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new oe),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const c=this.eventHandlers.get(r);c==null||c.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}registerPotentialNode(r,l){this.potentialNodes.set(r,l)}mount(r,l=!1){var c;if(this.instance)return;this.isSVG=r instanceof SVGElement&&r.tagName!=="svg",this.instance=r;const{layoutId:u,layout:f,visualElement:d}=this.options;if(d&&!d.current&&d.mount(r),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),l&&(f||u)&&(this.isLayoutDirty=!0),t){let h;const p=o(()=>this.root.updateBlockedByResize=!1,"resizeUnblockUpdate");t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=gi(p,250),yt.hasAnimatedSinceResize&&(yt.hasAnimatedSinceResize=!1,this.nodes.forEach(ps))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||f)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:g})=>{var T,b,V,y,x;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const P=(b=(T=this.options.transition)!==null&&T!==void 0?T:d.getDefaultTransition())!==null&&b!==void 0?b:ec,{onLayoutAnimationStart:A,onLayoutAnimationComplete:L}=d.getProps(),I=!this.targetLayout||!ji(this.targetLayout,g)||m,_=!p&&m;if(((V=this.resumeFrom)===null||V===void 0?void 0:V.instance)||_||p&&(I||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,_);const E={...yi(P,"layout"),onPlay:A,onComplete:L};d.shouldReduceMotion&&(E.delay=0,E.type=!1),this.startAnimation(E)}else!p&&this.animationProgress===0&&ps(this),this.isLead()&&((x=(y=this.options).onExitComplete)===null||x===void 0||x.call(y));this.targetLayout=g})}unmount(){var r,l;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(r=this.getStack())===null||r===void 0||r.remove(this),(l=this.parent)===null||l===void 0||l.children.delete(this),this.instance=void 0,X.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var r;return this.isAnimationBlocked||((r=this.parent)===null||r===void 0?void 0:r.isTreeAnimationBlocked())||!1}startUpdate(){var r;this.isUpdateBlocked()||(this.isUpdating=!0,(r=this.nodes)===null||r===void 0||r.forEach(Zl),this.animationId++)}willUpdate(r=!0){var l,c,u;if(this.root.isUpdateBlocked()){(c=(l=this.options).onExitComplete)===null||c===void 0||c.call(l);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const m=this.path[p];m.shouldResetTransform=!0,m.updateScroll("snapshot")}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;this.prevTransformTemplateValue=h==null?void 0:h(this.latestValues,""),this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(hs);return}!this.isUpdating||(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(nc),this.potentialNodes.clear()),this.nodes.forEach(Yl),this.nodes.forEach(Gl),this.nodes.forEach(Wl),this.clearAllSnapshots(),ce.update(),ce.preRender(),ce.render())}clearAllSnapshots(){this.nodes.forEach(Hl),this.sharedNodes.forEach(Jl)}scheduleUpdateProjection(){O.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){O.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var r;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=D(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),(r=this.options.visualElement)===null||r===void 0||r.notify("LayoutMeasure",this.layout.layoutBox,l==null?void 0:l.layoutBox)}updateScroll(r="measure"){let l=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){var r;if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform,c=this.projectionDelta&&!ki(this.projectionDelta),u=(r=this.options.visualElement)===null||r===void 0?void 0:r.getProps().transformTemplate,f=u==null?void 0:u(this.latestValues,""),d=f!==this.prevTransformTemplateValue;l&&(c||Q(this.latestValues)||d)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return r&&(c=this.removeTransform(c)),sc(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return D();const l=r.measureViewportBox(),{scroll:c}=this.root;return c&&(H(l.x,c.offset.x),H(l.y,c.offset.y)),l}removeElementScroll(r){const l=D();j(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:d}=u;if(u!==this.root&&f&&d.layoutScroll){if(f.isRoot){j(l,r);const{scroll:h}=this.root;h&&(H(l.x,-h.offset.x),H(l.y,-h.offset.y))}H(l.x,f.offset.x),H(l.y,f.offset.y)}}return l}applyTransform(r,l=!1){const c=D();j(c,r);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&<(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),Q(f.latestValues)&<(c,f.latestValues)}return Q(this.latestValues)&<(c,this.latestValues),c}removeTransform(r){var l;const c=D();j(c,r);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!Q(f.latestValues))continue;Oe(f.latestValues)&&f.updateSnapshot();const d=D(),h=f.measurePageBox();j(d,h),as(c,f.latestValues,(l=f.snapshot)===null||l===void 0?void 0:l.layoutBox,d)}return Q(this.latestValues)&&as(c,this.latestValues),c}setTargetDelta(r){this.targetDelta=r,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var r;const l=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;const{layout:c,layoutId:u}=this.options;if(!(!this.layout||!(c||u))){if(!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout?(this.relativeParent=f,this.relativeTarget=D(),this.relativeTargetOrigin=D(),Tt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=D(),this.targetWithTransforms=D()),this.relativeTarget&&this.relativeTargetOrigin&&((r=this.relativeParent)===null||r===void 0?void 0:r.target)?Xa(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):j(this.target,this.layout.layoutBox),wi(this.target,this.targetDelta)):j(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&Boolean(f.resumingFrom)===Boolean(this.resumingFrom)&&!f.options.layoutScroll&&f.target?(this.relativeParent=f,this.relativeTarget=D(),this.relativeTargetOrigin=D(),Tt(this.relativeTargetOrigin,this.target,f.target),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Oe(this.parent.latestValues)||Vi(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var r;const{isProjectionDirty:l,isTransformDirty:c}=this;this.isProjectionDirty=this.isTransformDirty=!1;const u=this.getLead(),f=Boolean(this.resumingFrom)||this!==u;let d=!0;if(l&&(d=!1),f&&c&&(d=!1),d)return;const{layout:h,layoutId:p}=this.options;if(this.isTreeAnimating=Boolean(((r=this.parent)===null||r===void 0?void 0:r.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||p))return;j(this.layoutCorrected,this.layout.layoutBox),il(this.layoutCorrected,this.treeScale,this.path,f);const{target:m}=u;if(!m)return;this.projectionDelta||(this.projectionDelta=Vt(),this.projectionDeltaWithTransform=Vt());const g=this.treeScale.x,T=this.treeScale.y,b=this.projectionTransform;bt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=us(this.projectionDelta,this.treeScale),(this.projectionTransform!==b||this.treeScale.x!==g||this.treeScale.y!==T)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var l,c,u;(c=(l=this.options).scheduleRender)===null||c===void 0||c.call(l),r&&((u=this.getStack())===null||u===void 0||u.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,l=!1){var c,u;const f=this.snapshot,d=(f==null?void 0:f.latestValues)||{},h={...this.latestValues},p=Vt();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!l;const m=D(),g=(f==null?void 0:f.source)!==((c=this.layout)===null||c===void 0?void 0:c.source),T=(((u=this.getStack())===null||u===void 0?void 0:u.members.length)||0)<=1,b=Boolean(g&&!T&&this.options.crossfade===!0&&!this.path.some(tc));this.animationProgress=0,this.mixTargetDelta=V=>{var y;const x=V/1e3;ms(p.x,r.x,x),ms(p.y,r.y,x),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((y=this.relativeParent)===null||y===void 0?void 0:y.layout)&&(Tt(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ql(this.relativeTarget,this.relativeTargetOrigin,m,x)),g&&(this.animationValues=h,Il(h,d,this.latestValues,x,b,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(0)}startAnimation(r){var l,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)===null||l===void 0||l.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(X.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=O.update(()=>{yt.hasAnimatedSinceResize=!0,this.currentAnimation=Ol(0,ds,{...r,onUpdate:u=>{var f;this.mixTargetDelta(u),(f=r.onUpdate)===null||f===void 0||f.call(r,u)},onComplete:()=>{var u;(u=r.onComplete)===null||u===void 0||u.call(r),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var r;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(r=this.getStack())===null||r===void 0||r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var r;this.currentAnimation&&((r=this.mixTargetDelta)===null||r===void 0||r.call(this,ds),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=r;if(!(!l||!c||!u)){if(this!==r&&this.layout&&u&&zi(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||D();const d=F(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+d;const h=F(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+h}j(l,c),lt(l,f),bt(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(r,l){var c,u,f;this.sharedNodes.has(r)||this.sharedNodes.set(r,new Ui),this.sharedNodes.get(r).add(l),l.promote({transition:(c=l.options.initialPromotionConfig)===null||c===void 0?void 0:c.transition,preserveFollowOpacity:(f=(u=l.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(u,l)})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:l}=this.options;return l?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:l}=this.options;return l?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:c}=r;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(l=!0),!l)return;const u={};for(let f=0;f<fs.length;f++){const d="rotate"+fs[f];c[d]&&(u[d]=c[d],r.setStaticValue(d,0))}r==null||r.render();for(const f in u)r.setStaticValue(f,u[f]);r.scheduleRender()}getProjectionStyles(r={}){var l,c,u;const f={};if(!this.instance||this.isSVG)return f;if(this.isVisible)f.visibility="";else return{visibility:"hidden"};const d=(l=this.options.visualElement)===null||l===void 0?void 0:l.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=It(r.pointerEvents)||"",f.transform=d?d(this.latestValues,""):"none",f;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const T={};return this.options.layoutId&&(T.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,T.pointerEvents=It(r.pointerEvents)||""),this.hasProjected&&!Q(this.latestValues)&&(T.transform=d?d({},""):"none",this.hasProjected=!1),T}const p=h.animationValues||h.latestValues;this.applyTransformsToTarget(),f.transform=us(this.projectionDeltaWithTransform,this.treeScale,p),d&&(f.transform=d(p,f.transform));const{x:m,y:g}=this.projectionDelta;f.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,h.animationValues?f.opacity=h===this?(u=(c=p.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:f.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const T in Ut){if(p[T]===void 0)continue;const{correct:b,applyTo:V}=Ut[T],y=b(p[T],h);if(V){const x=V.length;for(let P=0;P<x;P++)f[V[P]]=y}else f[T]=y}return this.options.layoutId&&(f.pointerEvents=h===this?It(r.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var l;return(l=r.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(hs),this.root.sharedNodes.clear()}},"ProjectionNode")}o($i,"createProjectionNode");function Gl(t){t.updateLayout()}o(Gl,"updateLayout");function Wl(t){var e,n,s;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:a,measuredBox:r}=t.layout,{animationType:l}=t.options,c=i.source!==t.layout.source;l==="size"?U(p=>{const m=c?i.measuredBox[p]:i.layoutBox[p],g=F(m);m.min=a[p].min,m.max=m.min+g}):zi(l,i.layoutBox,a)&&U(p=>{const m=c?i.measuredBox[p]:i.layoutBox[p],g=F(a[p]);m.max=m.min+g});const u=Vt();bt(u,a,i.layoutBox);const f=Vt();c?bt(f,t.applyTransform(r,!0),i.measuredBox):bt(f,a,i.layoutBox);const d=!ki(u);let h=!1;if(!t.resumeFrom){const p=t.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:g}=p;if(m&&g){const T=D();Tt(T,i.layoutBox,m.layoutBox);const b=D();Tt(b,a,g.layoutBox),ji(T,b)||(h=!0)}}}t.notifyListeners("didUpdate",{layout:a,snapshot:i,delta:f,layoutDelta:u,hasLayoutChanged:d,hasRelativeTargetChanged:h})}else t.isLead()&&((s=(n=t.options).onExitComplete)===null||s===void 0||s.call(n));t.options.transition=void 0}o(Wl,"notifyLayoutUpdate");function Kl(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}o(Kl,"propagateDirtyNodes");function Hl(t){t.clearSnapshot()}o(Hl,"clearSnapshot");function hs(t){t.clearMeasurements()}o(hs,"clearMeasurements");function Yl(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}o(Yl,"resetTransformStyle");function ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}o(ps,"finishAnimation");function Xl(t){t.resolveTargetDelta()}o(Xl,"resolveTargetDelta");function ql(t){t.calcProjection()}o(ql,"calcProjection");function Zl(t){t.resetRotation()}o(Zl,"resetRotation");function Jl(t){t.removeLeadSnapshot()}o(Jl,"removeLeadSnapshots");function ms(t,e,n){t.translate=S(e.translate,0,n),t.scale=S(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}o(ms,"mixAxisDelta");function gs(t,e,n,s){t.min=S(e.min,n.min,s),t.max=S(e.max,n.max,s)}o(gs,"mixAxis");function Ql(t,e,n,s){gs(t.x,e.x,n.x,s),gs(t.y,e.y,n.y,s)}o(Ql,"mixBox");function tc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}o(tc,"hasOpacityCrossfade");const ec={duration:.45,ease:[.4,0,.1,1]};function nc(t,e){let n=t.root;for(let a=t.path.length-1;a>=0;a--)if(Boolean(t.path[a].instance)){n=t.path[a];break}const i=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}o(nc,"mountNodeEarly");function ys(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}o(ys,"roundAxis");function sc(t){ys(t.x),ys(t.y)}o(sc,"roundBox");function zi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ee(cs(e),cs(n),.2)}o(zi,"shouldAnimatePositionOnly");const ic=$i({attachResizeListener:(t,e)=>ne(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xe={current:void 0},oc=$i({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!xe.current){const t=new ic(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),xe.current=t}return xe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),rc={...Wa,...ur,...dl,...Bl},Gi=lo((t,e)=>No(t,e,rc,Ml,oc));function Wi(){const t=v.exports.useRef(!1);return gt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}o(Wi,"useIsMounted");function ac(){const t=Wi(),[e,n]=v.exports.useState(0),s=v.exports.useCallback(()=>{t.current&&n(e+1)},[e]);return[v.exports.useCallback(()=>O.postRender(s),[s]),e]}o(ac,"useForceUpdate");class Ki extends v.exports.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}o(Ki,"PopChildMeasure");function lc({children:t,isPresent:e}){const n=v.exports.useId(),s=v.exports.useRef(null),i=v.exports.useRef({width:0,height:0,top:0,left:0});return v.exports.useInsertionEffect(()=>{const{width:a,height:r,top:l,left:c}=i.current;if(e||!s.current||!a||!r)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
[data-motion-pop-id="${n}"] {
|
|
position: absolute !important;
|
|
width: ${a}px !important;
|
|
height: ${r}px !important;
|
|
top: ${l}px !important;
|
|
left: ${c}px !important;
|
|
}
|
|
`),()=>{document.head.removeChild(u)}},[e]),R(Ki,{isPresent:e,childRef:s,sizeRef:i,children:v.exports.cloneElement(t,{ref:s})})}o(lc,"PopChild");const be=o(({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:a,mode:r})=>{const l=ee(cc),c=v.exports.useId(),u=v.exports.useMemo(()=>({id:c,initial:e,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const d of l.values())if(!d)return;s&&s()},register:f=>(l.set(f,!1),()=>l.delete(f))}),a?void 0:[n]);return v.exports.useMemo(()=>{l.forEach((f,d)=>l.set(d,!1))},[n]),v.exports.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),r==="popLayout"&&(t=R(lc,{isPresent:n,children:t})),R(St.Provider,{value:u,children:t})},"PresenceChild");function cc(){return new Map}o(cc,"newChildrenMap");const ot=o(t=>t.key||"","getChildKey");function uc(t,e){t.forEach(n=>{const s=ot(n);e.set(s,n)})}o(uc,"updateChildLookup");function fc(t){const e=[];return v.exports.Children.forEach(t,n=>{v.exports.isValidElement(n)&&e.push(n)}),e}o(fc,"onlyElements");const dc=o(({children:t,custom:e,initial:n=!0,onExitComplete:s,exitBeforeEnter:i,presenceAffectsLayout:a=!0,mode:r="sync"})=>{i&&(r="wait",Gs(!1,"Replace exitBeforeEnter with mode='wait'"));let[l]=ac();const c=v.exports.useContext(Ue).forceRender;c&&(l=c);const u=Wi(),f=fc(t);let d=f;const h=new Set,p=v.exports.useRef(d),m=v.exports.useRef(new Map).current,g=v.exports.useRef(!0);if(gt(()=>{g.current=!1,uc(f,m),p.current=d}),qe(()=>{g.current=!0,m.clear(),h.clear()}),g.current)return R(Te,{children:d.map(y=>R(be,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:a,mode:r,children:y},ot(y)))});d=[...d];const T=p.current.map(ot),b=f.map(ot),V=T.length;for(let y=0;y<V;y++){const x=T[y];b.indexOf(x)===-1&&h.add(x)}return r==="wait"&&h.size&&(d=[]),h.forEach(y=>{if(b.indexOf(y)!==-1)return;const x=m.get(y);if(!x)return;const P=T.indexOf(y),A=o(()=>{m.delete(y),h.delete(y);const L=p.current.findIndex(I=>I.key===y);if(p.current.splice(L,1),!h.size){if(p.current=f,u.current===!1)return;l(),s&&s()}},"onExit");d.splice(P,0,R(be,{isPresent:!1,onExitComplete:A,custom:e,presenceAffectsLayout:a,mode:r,children:x},ot(x)))}),d=d.map(y=>{const x=y.key;return h.has(x)?y:R(be,{isPresent:!0,presenceAffectsLayout:a,mode:r,children:y},ot(y))}),zs!=="production"&&r==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),R(Te,{children:h.size?d:d.map(y=>v.exports.cloneElement(y))})},"AnimatePresence"),hc="_drawer_meqy7_1",pc={drawer:hc},mc="_backdrop_tmj1y_1",gc={backdrop:mc},kt=o(({children:t,open:e,onClose:n})=>Xi.createPortal(R(dc,{children:e&&xs(Te,{children:[R(Gi.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:gc.backdrop,onClick:()=>n==null?void 0:n()},"backdrop"),t]})}),document.querySelector("#detleph-fg-context")),"OutsideElement");try{kt.displayName="OutsideElement",kt.__docgenInfo={description:"",displayName:"OutsideElement",props:{open:{defaultValue:null,description:"",name:"open",required:!0,type:{name:"boolean"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => unknown)"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/util/OutsideElement/OutsideElement.tsx#OutsideElement"]={docgenInfo:kt.__docgenInfo,name:"OutsideElement",path:"src/util/OutsideElement/OutsideElement.tsx#OutsideElement"})}catch{}const jt=o(({open:t,children:e,onClose:n})=>R(kt,{open:t,onClose:n,children:R(yc,{children:e})}),"Drawer"),yc=o(({children:t})=>R(Gi.div,{className:pc.drawer,initial:{y:"100%"},animate:{y:"0%"},exit:{y:"100%"},transition:{type:"tween"},children:t}),"UIDrawer"),Hi=jt;try{jt.displayName="Drawer",jt.__docgenInfo={description:"",displayName:"Drawer",props:{open:{defaultValue:null,description:"",name:"open",required:!0,type:{name:"boolean"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => unknown)"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/util/Drawer/Drawer.tsx#Drawer"]={docgenInfo:jt.__docgenInfo,name:"Drawer",path:"src/util/Drawer/Drawer.tsx#Drawer"})}catch{}const Ac={parameters:{storySource:{source:`import React from "react";
|
|
|
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
|
|
import Drawer from "../util/Drawer";
|
|
|
|
export default { title: "Drawer", component: Drawer } as ComponentMeta<typeof Drawer>;
|
|
|
|
const Template: ComponentStory<typeof Drawer> = (args) => <Drawer {...args} />;
|
|
|
|
export const DefaultDrawer = Template.bind({});
|
|
|
|
DefaultDrawer.args = {
|
|
children: "Test",
|
|
};
|
|
`,locationsMap:{"default-drawer":{startLoc:{col:48,line:9},endLoc:{col:78,line:9},startBody:{col:48,line:9},endBody:{col:78,line:9}}}}},title:"Drawer",component:Hi},vc=o(t=>R(Hi,{...t}),"Template"),xc=vc.bind({});xc.args={children:"Test"};const Cc=["DefaultDrawer"];export{xc as DefaultDrawer,Cc as __namedExportsOrder,Ac as default};
|
|
//# sourceMappingURL=Drawer.stories.149daeed.js.map
|