"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6649],{1541:function(t,e,i){i.d(e,{M:function(){return g}});var n=i(27573),r=i(7653),s=i(97801),o=i(91311),a=i(7508);class l extends r.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){let t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function u({children:t,isPresent:e}){let i=(0,r.useId)(),s=(0,r.useRef)(null),o=(0,r.useRef)({width:0,height:0,top:0,left:0}),{nonce:u}=(0,r.useContext)(a._);return(0,r.useInsertionEffect)(()=>{let{width:t,height:n,top:r,left:a}=o.current;if(e||!s.current||!t||!n)return;s.current.dataset.motionPopId=i;let l=document.createElement("style");return u&&(l.nonce=u),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` [data-motion-pop-id="${i}"] { position: absolute !important; width: ${t}px !important; height: ${n}px !important; top: ${r}px !important; left: ${a}px !important; } `),()=>{document.head.removeChild(l)}},[e]),(0,n.jsx)(l,{isPresent:e,childRef:s,sizeRef:o,children:r.cloneElement(t,{ref:s})})}let h=({children:t,initial:e,isPresent:i,onExitComplete:a,custom:l,presenceAffectsLayout:h,mode:d})=>{let p=(0,o.h)(c),m=(0,r.useId)(),f=(0,r.useMemo)(()=>({id:m,initial:e,isPresent:i,custom:l,onExitComplete:t=>{for(let e of(p.set(t,!0),p.values()))if(!e)return;a&&a()},register:t=>(p.set(t,!1),()=>p.delete(t))}),h?[Math.random()]:[i]);return(0,r.useMemo)(()=>{p.forEach((t,e)=>p.set(e,!1))},[i]),r.useEffect(()=>{i||p.size||!a||a()},[i]),"popLayout"===d&&(t=(0,n.jsx)(u,{isPresent:i,children:t})),(0,n.jsx)(s.O.Provider,{value:f,children:t})};function c(){return new Map}var d=i(3930),p=i(86266);let m=t=>t.key||"";function f(t){let e=[];return r.Children.forEach(t,t=>{(0,r.isValidElement)(t)&&e.push(t)}),e}var v=i(68918);let g=({children:t,exitBeforeEnter:e,custom:i,initial:s=!0,onExitComplete:a,presenceAffectsLayout:l=!0,mode:u="sync"})=>{(0,p.k)(!e,"Replace exitBeforeEnter with mode='wait'");let c=(0,r.useMemo)(()=>f(t),[t]),g=c.map(m),y=(0,r.useRef)(!0),x=(0,r.useRef)(c),b=(0,o.h)(()=>new Map),[P,T]=(0,r.useState)(c),[w,E]=(0,r.useState)(c);(0,v.L)(()=>{y.current=!1,x.current=c;for(let t=0;t{let e=m(t),r=c===w||g.includes(e);return(0,n.jsx)(h,{isPresent:r,initial:(!y.current||!!s)&&void 0,custom:r?void 0:i,presenceAffectsLayout:l,mode:u,onExitComplete:r?void 0:()=>{if(!b.has(e))return;b.set(e,!0);let t=!0;b.forEach(e=>{e||(t=!1)}),t&&(null==A||A(),E(x.current),a&&a())},children:t},e)})})}},3930:function(t,e,i){i.d(e,{p:function(){return n}});let n=(0,i(7653).createContext)({})},7508:function(t,e,i){i.d(e,{_:function(){return n}});let n=(0,i(7653).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},97801:function(t,e,i){i.d(e,{O:function(){return n}});let n=(0,i(7653).createContext)(null)},3158:function(t,e,i){let n;i.d(e,{E:function(){return su}});var r,s=i(27573),o=i(7653),a=i(7508);let l=(0,o.createContext)({});var u=i(97801),h=i(68918);let c=(0,o.createContext)({strict:!1}),d=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),p="data-"+d("framerAppearId"),m={skipAnimations:!1,useManualTiming:!1},f=["read","resolveKeyframes","update","preRender","render","postRender"];function v(t,e){let i=!1,n=!0,r={delta:0,timestamp:0,isProcessing:!1},s=()=>i=!0,o=f.reduce((t,e)=>(t[e]=function(t){let e=new Set,i=new Set,n=!1,r=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function a(e){s.has(e)&&(l.schedule(e),t()),e(o)}let l={schedule:(t,r=!1,o=!1)=>{let a=o&&n?e:i;return r&&s.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),s.delete(t)},process:t=>{if(o=t,n){r=!0;return}n=!0,[e,i]=[i,e],i.clear(),e.forEach(a),n=!1,r&&(r=!1,l.process(t))}};return l}(s),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:h,render:c,postRender:d}=o,p=()=>{let s=m.useManualTiming?r.timestamp:performance.now();i=!1,r.delta=n?1e3/60:Math.max(Math.min(s-r.timestamp,40),1),r.timestamp=s,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),h.process(r),c.process(r),d.process(r),r.isProcessing=!1,i&&e&&(n=!1,t(p))},v=()=>{i=!0,n=!0,r.isProcessing||t(p)};return{schedule:f.reduce((t,e)=>{let n=o[e];return t[e]=(t,e=!1,r=!1)=>(i||v(),n.schedule(t,e,r)),t},{}),cancel:t=>{for(let e=0;ew(t[e]))}function M(t){return!!(C(t)||t.variants)}function V(t){return Array.isArray(t)?t.join(" "):t}let R={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},D={};for(let t in R)D[t]={isEnabled:e=>R[t].some(t=>!!e[t])};var k=i(79701),F=i(3930);let L=Symbol.for("motionComponentSymbol"),j=["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 I(t){if("string"!=typeof t||t.includes("-"));else if(j.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}let O={},B=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],U=new Set(B);function N(t,{layout:e,layoutId:i}){return U.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!O[t]||"opacity"===t)}let z=t=>!!(t&&t.getVelocity),$=(t,e)=>e&&"number"==typeof t?e.transform(t):t,W=(t,e,i)=>i>e?e:i"number"==typeof t,parse:parseFloat,transform:t=>t},H={...Y,transform:t=>W(0,1,t)},Z={...Y,default:1},G=t=>Math.round(1e5*t)/1e5,K=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,X=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,q=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function _(t){return"string"==typeof t}let J=t=>({test:e=>_(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Q=J("deg"),tt=J("%"),te=J("px"),ti=J("vh"),tn=J("vw"),tr={...tt,parse:t=>tt.parse(t)/100,transform:t=>tt.transform(100*t)},ts={...Y,transform:Math.round},to={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,radius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,size:te,top:te,right:te,bottom:te,left:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,rotate:Q,rotateX:Q,rotateY:Q,rotateZ:Q,scale:Z,scaleX:Z,scaleY:Z,scaleZ:Z,skew:Q,skewX:Q,skewY:Q,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:H,originX:tr,originY:tr,originZ:te,zIndex:ts,backgroundPositionX:te,backgroundPositionY:te,fillOpacity:H,strokeOpacity:H,numOctaves:ts},ta={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tl=B.length,tu=t=>e=>"string"==typeof e&&e.startsWith(t),th=tu("--"),tc=tu("var(--"),td=t=>!!tc(t)&&tp.test(t.split("/*")[0].trim()),tp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tm(t,e,i){let{style:n,vars:r,transformOrigin:s}=t,o=!1,a=!1;for(let t in e){let i=e[t];if(U.has(t)){o=!0;continue}if(th(t)){r[t]=i;continue}{let e=$(i,to[t]);t.startsWith("origin")?(a=!0,s[t]=e):n[t]=e}}if(!e.transform&&(o||i?n.transform=function(t,e,i){let n="",r=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}});function tv(t,e,i){for(let n in e)z(e[n])||N(n,i)||(t[n]=e[n])}let tg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ty(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||tg.has(t)}let tx=t=>!ty(t);try{(r=require("@emotion/is-prop-valid").default)&&(tx=t=>t.startsWith("on")?!ty(t):r(t))}catch(t){}function tb(t,e,i){return"string"==typeof t?t:te.transform(e+i*t)}let tP={offset:"stroke-dashoffset",array:"stroke-dasharray"},tT={offset:"strokeDashoffset",array:"strokeDasharray"};function tw(t,{attrX:e,attrY:i,attrScale:n,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},h,c){if(tm(t,u,c),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==r||void 0!==s||p.transform)&&(p.transformOrigin=function(t,e,i){let n=tb(e,t.x,t.width),r=tb(i,t.y,t.height);return`${n} ${r}`}(m,void 0!==r?r:.5,void 0!==s?s:.5)),void 0!==e&&(d.x=e),void 0!==i&&(d.y=i),void 0!==n&&(d.scale=n),void 0!==o&&function(t,e,i=1,n=0,r=!0){t.pathLength=1;let s=r?tP:tT;t[s.offset]=te.transform(-n);let o=te.transform(e),a=te.transform(i);t[s.array]=`${o} ${a}`}(d,o,a,l,!1)}let tE=()=>({...tf(),attrs:{}}),tS=t=>"string"==typeof t&&"svg"===t.toLowerCase();function tA(t,{style:e,vars:i},n,r){for(let s in Object.assign(t.style,e,r&&r.getProjectionStyles(n)),i)t.style.setProperty(s,i[s])}let tC=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 tM(t,e,i,n){for(let i in tA(t,e,void 0,n),e.attrs)t.setAttribute(tC.has(i)?i:d(i),e.attrs[i])}function tV(t,e,i){var n;let{style:r}=t,s={};for(let o in r)(z(r[o])||e.style&&z(e.style[o])||N(o,t)||(null===(n=null==i?void 0:i.getValue(o))||void 0===n?void 0:n.liveStyle)!==void 0)&&(s[o]=r[o]);return i&&r&&"string"==typeof r.willChange&&(i.applyWillChange=!1),s}function tR(t,e,i){let n=tV(t,e,i);for(let i in t)(z(t[i])||z(e[i]))&&(n[-1!==B.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}function tD(t){let e=[{},{}];return null==t||t.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function tk(t,e,i,n){if("function"==typeof e){let[r,s]=tD(n);e=e(void 0!==i?i:t.custom,r,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[r,s]=tD(n);e=e(void 0!==i?i:t.custom,r,s)}return e}var tF=i(91311);let tL=t=>Array.isArray(t),tj=t=>!!(t&&"object"==typeof t&&t.mix&&t.toValue),tI=t=>tL(t)?t[t.length-1]||0:t;function tO(t){let e=z(t)?t.get():t;return tj(e)?e.toValue():e}let tB=new Set(["opacity","clipPath","filter","transform"]);function tU(t){return U.has(t)?"transform":tB.has(t)?d(t):void 0}function tN(t,e){-1===t.indexOf(e)&&t.push(e)}function tz(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}let t$=t=>(e,i)=>{let n=(0,o.useContext)(l),r=(0,o.useContext)(u.O),s=()=>(function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:i,onMount:n},r,s,o,a){let l={latestValues:function(t,e,i,n,r){var s;let o={},a=[],l=n&&(null===(s=t.style)||void 0===s?void 0:s.willChange)===void 0,u=r(t,{});for(let t in u)o[t]=tO(u[t]);let{initial:h,animate:c}=t,d=C(t),p=M(t);e&&p&&!d&&!1!==t.inherit&&(void 0===h&&(h=e.initial),void 0===c&&(c=e.animate));let m=!!i&&!1===i.initial,f=(m=m||!1===h)?c:h;return f&&"boolean"!=typeof f&&!E(f)&&tW(t,f,(t,e)=>{for(let e in t){let i=t[e];if(Array.isArray(i)){let t=m?i.length-1:0;i=i[t]}null!==i&&(o[e]=i)}for(let t in e)o[t]=e[t]}),l&&(c&&!1!==h&&!E(c)&&tW(t,c,t=>{for(let e in t)!function(t,e){let i=tU(e);i&&tN(t,i)}(a,e)}),a.length&&(o.willChange=a.join(","))),o}(r,s,o,!a&&t,e),renderState:i()};return n&&(l.mount=t=>n(r,t,l)),l})(t,e,n,r,i);return i?s():(0,tF.h)(s)};function tW(t,e,i){let n=Array.isArray(e)?e:[e];for(let e=0;e{tH.read(()=>{try{i.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){i.dimensions={x:0,y:0,width:0,height:0}}}),tH.render(()=>{tw(i,n,tS(e.tagName),t.transformTemplate),tM(e,i)})}})},tq={useVisualState:t$({applyWillChange:!0,scrapeMotionValuesFromProps:tV,createRenderState:tf})};function t_(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}let tJ=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function tQ(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}let t0=t=>e=>tJ(e)&&t(e,tQ(e));function t1(t,e,i,n){return t_(t,e,t0(i),n)}let t5=(t,e)=>i=>e(t(i)),t3=(...t)=>t.reduce(t5);function t2(t){let e=null;return()=>null===e&&(e=t,()=>{e=null})}let t9=t2("dragHorizontal"),t6=t2("dragVertical");function t8(t){let e=!1;if("y"===t)e=t6();else if("x"===t)e=t9();else{let t=t9(),i=t6();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function t4(){let t=t8(!0);return!t||(t(),!1)}class t7{constructor(t){this.isMounted=!1,this.node=t}update(){}}function et(t,e){let i=e?"onHoverStart":"onHoverEnd";return t1(t.current,e?"pointerenter":"pointerleave",(n,r)=>{if("touch"===n.pointerType||t4())return;let s=t.getProps();t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",e);let o=s[i];o&&tH.postRender(()=>o(n,r))},{passive:!t.getProps()[i]})}class ee extends t7{mount(){this.unmount=t3(et(this.node,!0),et(this.node,!1))}unmount(){}}class ei extends t7{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=t3(t_(this.node.current,"focus",()=>this.onFocus()),t_(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let en=(t,e)=>!!e&&(t===e||en(t,e.parentElement));function er(t,e){if(!e)return;let i=new PointerEvent("pointer"+t);e(i,tQ(i))}class es extends t7{constructor(){super(...arguments),this.removeStartListeners=tY.Z,this.removeEndListeners=tY.Z,this.removeAccessibleListeners=tY.Z,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();let i=this.node.getProps(),n=t1(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;let{onTap:i,onTapCancel:n,globalTapTarget:r}=this.node.getProps(),s=r||en(this.node.current,t.target)?i:n;s&&tH.update(()=>s(t,e))},{passive:!(i.onTap||i.onPointerUp)}),r=t1(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=t3(n,r),this.startPress(t,e)},this.startAccessiblePress=()=>{let t=t_(this.node.current,"keydown",t=>{"Enter"!==t.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=t_(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&er("up",(t,e)=>{let{onTap:i}=this.node.getProps();i&&tH.postRender(()=>i(t,e))})}),er("down",(t,e)=>{this.startPress(t,e)}))}),e=t_(this.node.current,"blur",()=>{this.isPressing&&er("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=t3(t,e)}}startPress(t,e){this.isPressing=!0;let{onTapStart:i,whileTap:n}=this.node.getProps();n&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&tH.postRender(()=>i(t,e))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!t4()}cancelPress(t,e){if(!this.checkPressEnd())return;let{onTapCancel:i}=this.node.getProps();i&&tH.postRender(()=>i(t,e))}mount(){let t=this.node.getProps(),e=t1(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),i=t_(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=t3(e,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}let eo=new WeakMap,ea=new WeakMap,el=t=>{let e=eo.get(t.target);e&&e(t)},eu=t=>{t.forEach(el)},eh={some:0,all:1};class ec extends t7{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:r}=t,s={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:eh[n]};return function(t,e,i){let n=function({root:t,...e}){let i=t||document;ea.has(i)||ea.set(i,{});let n=ea.get(i),r=JSON.stringify(e);return n[r]||(n[r]=new IntersectionObserver(eu,{root:t,...e})),n[r]}(e);return eo.set(t,i),n.observe(t),()=>{eo.delete(t),n.unobserve(t)}}(this.node.current,s,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),s=e?i:n;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}function ed(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;n1e3*t,ef=t=>t/1e3,ev={type:"spring",stiffness:500,damping:25,restSpeed:10},eg=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),ey={type:"keyframes",duration:.8},ex={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eb=(t,{keyframes:e})=>e.length>2?ey:U.has(t)?t.startsWith("scale")?eg(e[1]):ev:ex;function eP(t,e){return t[e]||t.default||t}let eT={current:!1},ew=t=>null!==t;function eE(t,{repeat:e,repeatType:i="loop"},n){let r=t.filter(ew),s=e&&"loop"!==i&&e%2==1?0:r.length-1;return s&&void 0!==n?n:r[s]}let eS=t=>/^0[^.\s]+$/u.test(t);var eA=i(86266);let eC=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),eM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,eV=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),eR=t=>t===Y||t===te,eD=(t,e)=>parseFloat(t.split(", ")[e]),ek=(t,e)=>(i,{transform:n})=>{if("none"===n||!n)return 0;let r=n.match(/^matrix3d\((.+)\)$/u);if(r)return eD(r[1],e);{let e=n.match(/^matrix\((.+)\)$/u);return e?eD(e[1],t):0}},eF=new Set(["x","y","z"]),eL=B.filter(t=>!eF.has(t)),ej={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:ek(4,13),y:ek(5,14)};ej.translateX=ej.x,ej.translateY=ej.y;let eI=t=>e=>e.test(t),eO=[Y,te,tt,Q,tn,ti,{test:t=>"auto"===t,parse:t=>t}],eB=t=>eO.find(eI(t)),eU=new Set,eN=!1,ez=!1;function e$(){if(ez){let t=Array.from(eU).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return eL.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{var n;null===(n=t.getValue(e))||void 0===n||n.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}ez=!1,eN=!1,eU.forEach(t=>t.complete()),eU.clear()}function eW(){eU.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ez=!0)})}class eY{constructor(t,e,i,n,r,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=r,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(eU.add(this),eN||(eN=!0,tH.read(eW),tH.resolveKeyframes(e$))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;for(let r=0;ri=>!!(_(i)&&q.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),eZ=(t,e,i)=>n=>{if(!_(n))return n;let[r,s,o,a]=n.match(K);return{[t]:parseFloat(r),[e]:parseFloat(s),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},eG=t=>W(0,255,t),eK={...Y,transform:t=>Math.round(eG(t))},eX={test:eH("rgb","red"),parse:eZ("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+eK.transform(t)+", "+eK.transform(e)+", "+eK.transform(i)+", "+G(H.transform(n))+")"},eq={test:eH("#"),parse:function(t){let e="",i="",n="",r="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),r=t.substring(4,5),e+=e,i+=i,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}},transform:eX.transform},e_={test:eH("hsl","hue"),parse:eZ("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+tt.transform(G(e))+", "+tt.transform(G(i))+", "+G(H.transform(n))+")"},eJ={test:t=>eX.test(t)||eq.test(t)||e_.test(t),parse:t=>eX.test(t)?eX.parse(t):e_.test(t)?e_.parse(t):eq.parse(t),transform:t=>_(t)?t:t.hasOwnProperty("red")?eX.transform(t):e_.transform(t)},eQ="number",e0="color",e1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function e5(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},r=[],s=0,o=e.replace(e1,t=>(eJ.test(t)?(n.color.push(s),r.push(e0),i.push(eJ.parse(t))):t.startsWith("var(")?(n.var.push(s),r.push("var"),i.push(t)):(n.number.push(s),r.push(eQ),i.push(parseFloat(t))),++s,"${}")).split("${}");return{values:i,split:o,indexes:n,types:r}}function e3(t){return e5(t).values}function e2(t){let{split:e,types:i}=e5(t),n=e.length;return t=>{let r="";for(let s=0;s"number"==typeof t?0:t,e6={test:function(t){var e,i;return isNaN(t)&&_(t)&&((null===(e=t.match(K))||void 0===e?void 0:e.length)||0)+((null===(i=t.match(X))||void 0===i?void 0:i.length)||0)>0},parse:e3,createTransformer:e2,getAnimatableNone:function(t){let e=e3(t);return e2(t)(e.map(e9))}},e8=new Set(["brightness","contrast","saturate","opacity"]);function e4(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(K)||[];if(!n)return t;let r=i.replace(n,""),s=e8.has(e)?1:0;return n!==i&&(s*=100),e+"("+s+r+")"}let e7=/\b([a-z-]*)\(.*?\)/gu,it={...e6,getAnimatableNone:t=>{let e=t.match(e7);return e?e.map(e4).join(" "):t}},ie={...to,color:eJ,backgroundColor:eJ,outlineColor:eJ,fill:eJ,stroke:eJ,borderColor:eJ,borderTopColor:eJ,borderRightColor:eJ,borderBottomColor:eJ,borderLeftColor:eJ,filter:it,WebkitFilter:it},ii=t=>ie[t];function ir(t,e){let i=ii(t);return i!==it&&(i=e6),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let is=new Set(["auto","none","0"]);class io extends eY{constructor(t,e,i,n,r){super(t,e,i,n,r,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i{e.getValue(t).set(i)}),this.resolveNoneKeyframes()}}function ia(t){let e;return()=>(void 0===e&&(e=t()),e)}function il(){n=void 0}let iu={now:()=>(void 0===n&&iu.set(tG.isProcessing||m.useManualTiming?tG.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(il)}},ih=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(e6.test(t)||"0"===t)&&!t.startsWith("url("));class ic{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=iu.now(),this.options={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:r,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(eW(),e$()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=iu.now(),this.hasAttemptedResolve=!0;let{name:i,type:n,velocity:r,delay:s,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,i,n){let r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;let s=t[t.length-1],o=ih(r,e),a=ih(s,e);return(0,eA.K)(o===a,`You are trying to animate ${e} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i{this.resolveFinishedPromise=t})}}function id(t,e,i){var n,r;let s=Math.max(e-5,0);return n=i-t(s),(r=e-s)?1e3/r*n:0}function ip(t,e){return t*Math.sqrt(1-e*e)}let im=["duration","bounce"],iv=["stiffness","damping","mass"];function ig(t,e){return e.some(e=>void 0!==t[e])}function iy({keyframes:t,restDelta:e,restSpeed:i,...n}){let r;let s=t[0],o=t[t.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:h,duration:c,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ig(t,iv)&&ig(t,im)){let i=function({duration:t=800,bounce:e=.25,velocity:i=0,mass:n=1}){let r,s;(0,eA.K)(t<=em(10),"Spring duration must be 10 seconds or less");let o=1-e;o=W(.05,1,o),t=W(.01,10,ef(t)),o<1?(r=e=>{let n=e*o,r=n*t;return .001-(n-i)/ip(e,o)*Math.exp(-r)},s=e=>{let n=e*o*t,s=Math.pow(o,2)*Math.pow(e,2)*t,a=ip(Math.pow(e,2),o);return(n*i+i-s)*Math.exp(-n)*(-r(e)+.001>0?-1:1)/a}):(r=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),s=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(r,s,5/t);if(t=em(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{let e=Math.pow(a,2)*n;return{stiffness:e,damping:2*o*Math.sqrt(n*e),duration:t}}}(t);(e={...e,...i,mass:1}).isResolvedFromDuration=!0}return e}({...n,velocity:-ef(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*h)),v=o-s,g=ef(Math.sqrt(l/h)),y=5>Math.abs(v);if(i||(i=y?.01:2),e||(e=y?.005:.5),f<1){let t=ip(g,f);r=e=>o-Math.exp(-f*g*e)*((m+f*g*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}else if(1===f)r=t=>o-Math.exp(-g*t)*(v+(m+g*v)*t);else{let t=g*Math.sqrt(f*f-1);r=e=>{let i=Math.exp(-f*g*e),n=Math.min(t*e,300);return o-i*((m+f*g*v)*Math.sinh(n)+t*v*Math.cosh(n))/t}}return{calculatedDuration:p&&c||null,next:t=>{let n=r(t);if(p)a.done=t>=c;else{let s=0;f<1&&(s=0===t?em(m):id(r,t,n));let l=Math.abs(s)<=i,u=Math.abs(o-n)<=e;a.done=l&&u}return a.value=a.done?o:n,a}}}function ix({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){let c,d;let p=t[0],m={done:!1,value:p},f=t=>void 0!==a&&tl,v=t=>void 0===a?l:void 0===l?a:Math.abs(a-t)-g*Math.exp(-t/n),P=t=>x+b(t),T=t=>{let e=b(t),i=P(t);m.done=Math.abs(e)<=u,m.value=m.done?x:i},w=t=>{f(m.value)&&(c=t,d=iy({keyframes:[m.value,v(m.value)],velocity:id(P,t,m.value),damping:r,stiffness:s,restDelta:u,restSpeed:h}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return(d||void 0!==c||(e=!0,T(t),w(t)),void 0!==c&&t>=c)?d.next(t-c):(e||T(t),m)}}}let ib=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function iP(t,e,i,n){if(t===e&&i===n)return tY.Z;let r=e=>(function(t,e,i,n,r){let s,o;let a=0;do(s=ib(o=e+(i-e)/2,n,r)-t)>0?i=o:e=o;while(Math.abs(s)>1e-7&&++a<12);return o})(e,0,1,t,i);return t=>0===t||1===t?t:ib(r(t),e,n)}let iT=iP(.42,0,1,1),iw=iP(0,0,.58,1),iE=iP(.42,0,.58,1),iS=t=>Array.isArray(t)&&"number"!=typeof t[0],iA=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,iC=t=>e=>1-t(1-e),iM=t=>1-Math.sin(Math.acos(t)),iV=iC(iM),iR=iA(iM),iD=iP(.33,1.53,.69,.99),ik=iC(iD),iF=iA(ik),iL={linear:tY.Z,easeIn:iT,easeInOut:iE,easeOut:iw,circIn:iM,circInOut:iR,circOut:iV,backIn:ik,backInOut:iF,backOut:iD,anticipate:t=>(t*=2)<1?.5*ik(t):.5*(2-Math.pow(2,-10*(t-1)))},ij=t=>{if(Array.isArray(t)){(0,eA.k)(4===t.length,"Cubic bezier arrays must contain four numerical values.");let[e,i,n,r]=t;return iP(e,i,n,r)}return"string"==typeof t?((0,eA.k)(void 0!==iL[t],`Invalid easing type '${t}'`),iL[t]):t},iI=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n},iO=(t,e,i)=>t+(e-t)*i;function iB(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function iU(t,e){return i=>i>0?e:t}let iN=(t,e,i)=>{let n=t*t,r=i*(e*e-n)+n;return r<0?0:Math.sqrt(r)},iz=[eq,eX,e_],i$=t=>iz.find(e=>e.test(t));function iW(t){let e=i$(t);if((0,eA.K)(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let i=e.parse(t);return e===e_&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let r=0,s=0,o=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;r=iB(a,n,t+1/3),s=iB(a,n,t),o=iB(a,n,t-1/3)}else r=s=o=i;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*o),alpha:n}}(i)),i}let iY=(t,e)=>{let i=iW(t),n=iW(e);if(!i||!n)return iU(t,e);let r={...i};return t=>(r.red=iN(i.red,n.red,t),r.green=iN(i.green,n.green,t),r.blue=iN(i.blue,n.blue,t),r.alpha=iO(i.alpha,n.alpha,t),eX.transform(r))},iH=new Set(["none","hidden"]);function iZ(t,e){return i=>iO(t,e,i)}function iG(t){return"number"==typeof t?iZ:"string"==typeof t?td(t)?iU:eJ.test(t)?iY:iq:Array.isArray(t)?iK:"object"==typeof t?eJ.test(t)?iY:iX:iU}function iK(t,e){let i=[...t],n=i.length,r=t.map((t,i)=>iG(t)(t,e[i]));return t=>{for(let e=0;e{for(let e in n)i[e]=n[e](t);return i}}let iq=(t,e)=>{let i=e6.createTransformer(e),n=e5(t),r=e5(e);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?iH.has(t)&&!r.values.length||iH.has(e)&&!n.values.length?iH.has(t)?i=>i<=0?t:e:i=>i>=1?e:t:t3(iK(function(t,e){var i;let n=[],r={color:0,var:0,number:0};for(let s=0;se[0];if(2===s&&t[0]===t[1])return()=>e[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let o=function(t,e,i){let n=[],r=i||i_,s=t.length-1;for(let i=0;i{let i=0;if(a>1)for(;il(W(t[0],t[s-1],e)):l}((i&&i.length===e.length?i:function(t){let e=[0];return function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let r=iI(0,e,n);t.push(iO(i,1,r))}}(e,t.length-1),e}(e)).map(e=>e*t),e,{ease:Array.isArray(r)?r:e.map(()=>r||iE).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(s.value=o(e),s.done=e>=t,s)}}let iQ=t=>{let e=({timestamp:e})=>t(e);return{start:()=>tH.update(e,!0),stop:()=>tZ(e),now:()=>tG.isProcessing?tG.timestamp:iu.now()}},i0={decay:ix,inertia:ix,tween:iJ,keyframes:iJ,spring:iy},i1=t=>t/100;class i5 extends ic{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:t}=this.options;t&&t()};let{name:e,motionValue:i,element:n,keyframes:r}=this.options,s=(null==n?void 0:n.KeyframeResolver)||eY;this.resolver=new s(r,(t,e)=>this.onKeyframesResolved(t,e),e,i,n),this.resolver.scheduleResolve()}initPlayback(t){let e,i;let{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:a=0}=this.options,l=i0[n]||iJ;l!==iJ&&"number"!=typeof t[0]&&(e=t3(i1,i_(t[0],t[1])),t=[0,100]);let u=l({...this.options,keyframes:t});"mirror"===o&&(i=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),null===u.calculatedDuration&&(u.calculatedDuration=function(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}(u));let{calculatedDuration:h}=u,c=h+s;return{generator:u,mirroredGenerator:i,mapPercentToKeyframes:e,calculatedDuration:h,resolvedDuration:c,totalDuration:c*(r+1)-s}}onPostResolved(){let{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){let{resolved:i}=this;if(!i){let{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}let{finalKeyframe:n,generator:r,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:h}=i;if(null===this.startTime)return r.next(0);let{delay:c,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;let v=this.currentTime-c*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,x=r;if(d){let t=Math.min(this.currentTime,u)/h,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,d+1))%2&&("reverse"===p?(i=1-i,m&&(i-=m/h)):"mirror"===p&&(x=s)),y=W(0,1,i)*h}let b=g?{done:!1,value:a[0]}:x.next(y);o&&(b.value=o(b.value));let{done:P}=b;g||null===l||(P=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return T&&void 0!==n&&(b.value=eE(a,this.options,n)),f&&f(b.value),T&&this.finish(),b}get duration(){let{resolved:t}=this;return t?ef(t.calculatedDuration):0}get time(){return ef(this.currentTime)}set time(t){t=em(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=ef(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=iQ,onPlay:e,startTime:i}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();let n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=n):this.startTime=null!=i?i:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}let i3=t=>Array.isArray(t)&&"number"==typeof t[0],i2=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,i9={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:i2([0,.65,.55,1]),circOut:i2([.55,0,1,.45]),backIn:i2([.31,.01,.66,-.59]),backOut:i2([.33,1.53,.69,.99])};function i6(t){return i8(t)||i9.easeOut}function i8(t){if(t)return i3(t)?i2(t):Array.isArray(t)?t.map(i6):i9[t]}let i4=ia(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class i7 extends ic{constructor(t){super(t);let{name:e,motionValue:i,element:n,keyframes:r}=this.options;this.resolver=new io(r,(t,e)=>this.onKeyframesResolved(t,e),e,i,n),this.resolver.scheduleResolve()}initPlayback(t,e){var i,n;let{duration:r=300,times:s,ease:o,type:a,motionValue:l,name:u,startTime:h}=this.options;if(!(null===(i=l.owner)||void 0===i?void 0:i.current))return!1;if("spring"===(n=this.options).type||!function t(e){return!!(!e||"string"==typeof e&&e in i9||i3(e)||Array.isArray(e)&&e.every(t))}(n.ease)){let{onComplete:e,onUpdate:i,motionValue:n,element:l,...u}=this.options,h=function(t,e){let i=new i5({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:t[0]},r=[],s=0;for(;!n.done&&s<2e4;)r.push((n=i.sample(s)).value),s+=10;return{times:void 0,keyframes:r,duration:s-10,ease:"linear"}}(t,u);1===(t=h.keyframes).length&&(t[1]=t[0]),r=h.duration,s=h.times,o=h.ease,a="keyframes"}let c=function(t,e,i,{delay:n=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){let u={[e]:i};l&&(u.offset=l);let h=i8(a);return Array.isArray(h)&&(u.easing=h),t.animate(u,{delay:n,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:"reverse"===o?"alternate":"normal"})}(l.owner.current,u,t,{...this.options,duration:r,times:s,ease:o});return c.startTime=null!=h?h:this.calcStartTime(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{let{onComplete:i}=this.options;l.set(eE(t,this.options,e)),i&&i(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:s,type:a,ease:o,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:e}=t;return ef(e)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:e}=t;return ef(e.currentTime||0)}set time(t){let{resolved:e}=this;if(!e)return;let{animation:i}=e;i.currentTime=em(t)}get speed(){let{resolved:t}=this;if(!t)return 1;let{animation:e}=t;return e.playbackRate}set speed(t){let{resolved:e}=this;if(!e)return;let{animation:i}=e;i.playbackRate=t}get state(){let{resolved:t}=this;if(!t)return"idle";let{animation:e}=t;return e.playState}get startTime(){let{resolved:t}=this;if(!t)return null;let{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){let{resolved:e}=this;if(!e)return tY.Z;let{animation:i}=e;i.timeline=t,i.onfinish=null}else this.pendingTimeline=t;return tY.Z}play(){if(this.isStopped)return;let{resolved:t}=this;if(!t)return;let{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){let{resolved:t}=this;if(!t)return;let{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:t}=this;if(!t)return;let{animation:e,keyframes:i,duration:n,type:r,ease:s,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){let{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,h=new i5({...u,keyframes:i,duration:n,type:r,ease:s,times:o,isGenerator:!0}),c=em(this.time);t.setWithVelocity(h.sample(c-10).value,h.sample(c).value,10)}let{onStop:a}=this.options;a&&a(),this.cancel()}complete(){let{resolved:t}=this;t&&t.animation.finish()}cancel(){let{resolved:t}=this;t&&t.animation.cancel()}static supports(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:r,damping:s,type:o}=t;return i4()&&i&&tB.has(i)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!n&&"mirror"!==r&&0!==s&&"inertia"!==o}}let nt=ia(()=>void 0!==window.ScrollTimeline);class ne{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let i=0;i{if(!nt()||!e.attachTimeline)return e.pause(),function(t,e){let i;let n=()=>{let{currentTime:n}=e,r=(null===n?0:n.value)/100;i!==r&&t(r),i=r};return tH.update(n,!0),()=>tZ(n)}(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;ee[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}let ni=(t,e,i,n={},r,s,o)=>a=>{let l=eP(n,t)||{},u=l.delay||n.delay||0,{elapsed:h=0}=n;h-=em(u);let c={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-h,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),o&&o()},onStop:o,name:t,motionValue:e,element:s?void 0:r};!function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(l)&&(c={...c,...eb(t,c)}),c.duration&&(c.duration=em(c.duration)),c.repeatDelay&&(c.repeatDelay=em(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(c.duration=0,0!==c.delay||(d=!0)),(eT.current||m.skipAnimations)&&(d=!0,c.duration=0,c.delay=0),d&&!s&&void 0!==e.get()){let t=eE(c.keyframes,l);if(void 0!==t)return tH.update(()=>{c.onUpdate(t),c.onComplete()}),new ne([])}return!s&&i7.supports(c)?new i7(c):new i5(c)};class nn{constructor(){this.subscriptions=[]}add(t){return tN(this.subscriptions,t),()=>tz(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](t,e,i);else for(let r=0;r!isNaN(parseFloat(t)),ns={current:void 0};class no{constructor(t,e={}){this.version="11.3.31",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{let i=iu.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=iu.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=nr(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new nn);let i=this.events[t].add(e);return"change"===t?()=>{i(),tH.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ns.current&&ns.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=iu.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function na(t,e){return new no(t,e)}class nl extends no{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){let e=tU(t);if(!e)return;let i=this.counts.get(e)||0;this.counts.set(e,i+1),0===i&&(this.output.push(e),this.update());let n=!1;return()=>{if(n)return;n=!0;let t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(tz(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function nu(t,e){var i,n;if(!t.applyWillChange)return;let r=t.getValue("willChange");if(r||(null===(i=t.props.style)||void 0===i?void 0:i.willChange)||(r=new nl("auto"),t.addValue("willChange",r)),z(n=r)&&n.add)return r.add(e)}function nh(t,e,{delay:i=0,transitionOverride:n,type:r}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;n&&(o=n);let u=[],h=r&&t.animationState&&t.animationState.getState()[r];for(let e in l){let n=t.getValue(e,null!==(s=t.latestValues[e])&&void 0!==s?s:null),r=l[e];if(void 0===r||h&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(h,e))continue;let a={delay:i,...eP(o||{},e)},c=!1;if(window.MotionHandoffAnimation){let i=t.props[p];if(i){let t=window.MotionHandoffAnimation(i,e,tH);null!==t&&(a.startTime=t,c=!0)}}n.start(ni(e,n,r,t.shouldReduceMotion&&U.has(e)?{type:!1}:a,t,c,nu(t,e)));let d=n.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{tH.update(()=>{a&&function(t,e){let{transitionEnd:i={},transition:n={},...r}=ep(t,e)||{};for(let e in r={...r,...i}){let i=tI(r[e]);t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,na(i))}}(t,a)})}),u}function nc(t,e,i={}){var n;let r=ep(t,e,"exit"===i.type?null===(n=t.presenceContext)||void 0===n?void 0:n.custom:void 0),{transition:s=t.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(s=i.transitionOverride);let o=r?()=>Promise.all(nh(t,r,i)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,i=0,n=0,r=1,s){let o=[],a=(t.variantChildren.size-1)*n,l=1===r?(t=0)=>t*n:(t=0)=>a-t*n;return Array.from(t.variantChildren).sort(nd).forEach((t,n)=>{t.notify("AnimationStart",e),o.push(nc(t,e,{...s,delay:i+l(n)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,r+n,o,a,i)}:()=>Promise.resolve(),{when:l}=s;if(!l)return Promise.all([o(),a(i.delay)]);{let[t,e]="beforeChildren"===l?[o,a]:[a,o];return t().then(()=>e())}}function nd(t,e){return t.sortNodePosition(e)}let np=[...S].reverse(),nm=S.length;function nf(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nv(){return{animate:nf(!0),whileInView:nf(),whileHover:nf(),whileTap:nf(),whileDrag:nf(),whileFocus:nf(),exit:nf()}}class ng extends t7{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>nc(t,e,i)));else if("string"==typeof e)n=nc(t,e,i);else{let r="function"==typeof e?ep(t,e,i.custom):e;n=Promise.all(nh(t,r,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=nv(),n=!0,r=e=>(i,n)=>{var r;let s=ep(t,n,"exit"===e?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);if(s){let{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function s(s){let o=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set,h={},c=1/0;for(let e=0;ec&&v),b=!1,P=Array.isArray(f)?f:[f],T=P.reduce(r(p),{});!1===g&&(T={});let{prevResolvedValues:S={}}=m,A={...S,...T},C=e=>{x=!0,u.has(e)&&(b=!0,u.delete(e)),m.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in A){let e=T[t],i=S[t];if(!h.hasOwnProperty(t))(tL(e)&&tL(i)?ed(e,i):e===i)?void 0!==e&&u.has(t)?C(t):m.protectedKeys[t]=!0:null!=e?C(t):u.add(t)}m.prevProp=f,m.prevResolvedValues=T,m.isActive&&(h={...h,...T}),n&&t.blockInitialAnimation&&(x=!1),x&&(!y||b)&&l.push(...P.map(t=>({animation:t,options:{type:p}})))}if(u.size){let e={};u.forEach(i=>{let n=t.getBaseTarget(i),r=t.getValue(i);r&&(r.liveStyle=!0),e[i]=null!=n?n:null}),l.push({animation:e})}let p=!!l.length;return n&&(!1===o.initial||o.initial===o.animate)&&!t.manuallyAnimateOnMount&&(p=!1),n=!1,p?e(l):Promise.resolve()}return{animateChanges:s,setActive:function(e,n){var r;if(i[e].isActive===n)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var i;return null===(i=t.animationState)||void 0===i?void 0:i.setActive(e,n)}),i[e].isActive=n;let o=s(e);for(let t in i)i[t].protectedKeys={};return o},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=nv(),n=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();E(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}let ny=0;class nx extends t7{constructor(){super(...arguments),this.id=ny++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>e(this.id))}mount(){let{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}let nb=(t,e)=>Math.abs(t-e);class nP{constructor(t,e,{transformPagePoint:i,contextWindow:n,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let i=nE(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,r=(t=i.offset,e={x:0,y:0},Math.sqrt(nb(t.x,e.x)**2+nb(t.y,e.y)**2)>=3);if(!n&&!r)return;let{point:s}=i,{timestamp:o}=tG;this.history.push({...s,timestamp:o});let{onStart:a,onMove:l}=this.handlers;n||(a&&a(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=nT(e,this.transformPagePoint),tH.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let s=nE("pointercancel"===t.type?this.lastMoveEventInfo:nT(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,s),n&&n(t,s)},!tJ(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=i,this.contextWindow=n||window;let s=nT(tQ(t),this.transformPagePoint),{point:o}=s,{timestamp:a}=tG;this.history=[{...o,timestamp:a}];let{onSessionStart:l}=e;l&&l(t,nE(s,this.history)),this.removeListeners=t3(t1(this.contextWindow,"pointermove",this.handlePointerMove),t1(this.contextWindow,"pointerup",this.handlePointerUp),t1(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),tZ(this.updatePoint)}}function nT(t,e){return e?{point:e(t.point)}:t}function nw(t,e){return{x:t.x-e.x,y:t.y-e.y}}function nE({point:t},e){return{point:t,delta:nw(t,nS(e)),offset:nw(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,r=nS(t);for(;i>=0&&(n=t[i],!(r.timestamp-n.timestamp>em(.1)));)i--;if(!n)return{x:0,y:0};let s=ef(r.timestamp-n.timestamp);if(0===s)return{x:0,y:0};let o={x:(r.x-n.x)/s,y:(r.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,0)}}function nS(t){return t[t.length-1]}function nA(t){return t.max-t.min}function nC(t,e,i,n=.5){t.origin=n,t.originPoint=iO(e.min,e.max,t.origin),t.scale=nA(i)/nA(e),t.translate=iO(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function nM(t,e,i,n){nC(t.x,e.x,i.x,n?n.originX:void 0),nC(t.y,e.y,i.y,n?n.originY:void 0)}function nV(t,e,i){t.min=i.min+e.min,t.max=t.min+nA(e)}function nR(t,e,i){t.min=e.min-i.min,t.max=t.min+nA(e)}function nD(t,e,i){nR(t.x,e.x,i.x),nR(t.y,e.y,i.y)}function nk(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function nF(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min({translate:0,scale:1,origin:0,originPoint:0}),nO=()=>({x:nI(),y:nI()}),nB=()=>({min:0,max:0}),nU=()=>({x:nB(),y:nB()});function nN(t){return[t("x"),t("y")]}function nz({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function n$(t){return void 0===t||1===t}function nW({scale:t,scaleX:e,scaleY:i}){return!n$(t)||!n$(e)||!n$(i)}function nY(t){return nW(t)||nH(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function nH(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function nZ(t,e,i,n,r){return void 0!==r&&(t=n+r*(t-n)),n+i*(t-n)+e}function nG(t,e=0,i=1,n,r){t.min=nZ(t.min,e,i,n,r),t.max=nZ(t.max,e,i,n,r)}function nK(t,{x:e,y:i}){nG(t.x,e.translate,e.scale,e.originPoint),nG(t.y,i.translate,i.scale,i.originPoint)}function nX(t,e){t.min=t.min+e,t.max=t.max+e}function nq(t,e,i,n,r=.5){let s=iO(t.min,t.max,r);nG(t,e,i,s,n)}function n_(t,e){nq(t.x,e.x,e.scaleX,e.scale,e.originX),nq(t.y,e.y,e.scaleY,e.scale,e.originY)}function nJ(t,e){return nz(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}let nQ=({current:t})=>t?t.ownerDocument.defaultView:null,n0=new WeakMap;class n1{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nU(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){let{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;let{dragSnapToOrigin:n}=this.getProps();this.panSession=new nP(t,{onSessionStart:t=>{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(tQ(t,"page").point)},onStart:(t,e)=>{var i;let{drag:n,dragPropagation:r,onDragStart:s}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=t8(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nN(t=>{let e=this.getAxisMotionValue(t).get()||0;if(tt.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];if(n){let t=nA(n);e=parseFloat(e)/100*t}}}this.originPoint[t]=e}),s&&tH.postRender(()=>s(t,e)),null===(i=this.removeWillChange)||void 0===i||i.call(this),this.removeWillChange=nu(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:r,onDrag:s}=this.getProps();if(!i&&!this.openGlobalLock)return;let{offset:o}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),s&&s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>nN(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:n,contextWindow:nQ(this.visualElement)})}stop(t,e){var i;null===(i=this.removeWillChange)||void 0===i||i.call(this);let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=e;this.startAnimation(r);let{onDragEnd:s}=this.getProps();s&&tH.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!n5(t,n,this.currentDirection))return;let r=this.getAxisMotionValue(t),s=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:i},n){return void 0!==e&&ti&&(t=n?iO(i,t,n.max):Math.min(t,i)),t}(s,this.constraints[t],this.elastic[t])),r.set(s)}resolveConstraints(){var t;let{dragConstraints:e,dragElastic:i}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,r=this.constraints;e&&x(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(t,{top:e,left:i,bottom:n,right:r}){return{x:nk(t.x,i,r),y:nk(t.y,e,n)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:nL(t,"left","right"),y:nL(t,"top","bottom")}}(i),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&nN(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!x(e))return!1;let n=e.current;(0,eA.k)(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let s=function(t,e,i){let n=nJ(t,i),{scroll:r}=e;return r&&(nX(n.x,r.offset.x),nX(n.y,r.offset.y)),n}(n,r.root,this.visualElement.getTransformPagePoint()),o={x:nF((t=r.layout.layoutBox).x,s.x),y:nF(t.y,s.y)};if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=nz(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(nN(o=>{if(!n5(o,e,this.currentDirection))return;let l=a&&a[o]||{};s&&(l={min:0,max:0});let u={type:"inertia",velocity:i?t[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(o,u)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return i.start(ni(t,i,0,e,this.visualElement,!1,nu(this.visualElement,t)))}stopAnimation(){nN(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nN(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){nN(e=>{let{drag:i}=this.getProps();if(!n5(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,r=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[e];r.set(t[e]-iO(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!x(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};nN(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();n[t]=function(t,e){let i=.5,n=nA(t),r=nA(e);return r>n?i=iI(e.min,e.max-n,t.min):n>r&&(i=iI(t.min,t.max-r,e.min)),W(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),nN(e=>{if(!n5(e,t,null))return;let i=this.getAxisMotionValue(e),{min:r,max:s}=this.constraints[e];i.set(iO(r,s,n[e]))})}addListeners(){if(!this.visualElement.current)return;n0.set(this.visualElement,this);let t=t1(this.visualElement.current,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{let{dragConstraints:t}=this.getProps();x(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,n=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),tH.read(e);let r=t_(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(nN(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),n(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:r=!1,dragElastic:s=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:r,dragElastic:s,dragMomentum:o}}}function n5(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class n3 extends t7{constructor(t){super(t),this.removeGroupControls=tY.Z,this.removeListeners=tY.Z,this.controls=new n1(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tY.Z}unmount(){this.removeGroupControls(),this.removeListeners()}}let n2=t=>(e,i)=>{t&&tH.postRender(()=>t(e,i))};class n9 extends t7{constructor(){super(...arguments),this.removePointerDownListener=tY.Z}onPointerDown(t){this.session=new nP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nQ(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:n2(t),onStart:n2(e),onMove:i,onEnd:(t,e)=>{delete this.session,n&&tH.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=t1(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let n6={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function n8(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let n4={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!te.test(t))return t;t=parseFloat(t)}let i=n8(t,e.target.x),n=n8(t,e.target.y);return`${i}% ${n}%`}};class n7 extends o.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:r}=t;Object.assign(O,re),r&&(e.group&&e.group.add(r),i&&i.register&&n&&i.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),n6.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:r}=this.props,s=i.projection;return s&&(s.isPresent=r,n||t.layoutDependency!==e||void 0===e?s.willUpdate():this.safeToRemove(),t.isPresent===r||(r?s.promote():s.relegate()||tH.postRender(()=>{let t=s.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),g.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function rt(t){let[e,i]=function(){let t=(0,o.useContext)(u.O);if(null===t)return[!0,null];let{isPresent:e,onExitComplete:i,register:n}=t,r=(0,o.useId)();(0,o.useEffect)(()=>n(r),[]);let s=(0,o.useCallback)(()=>i&&i(r),[r,i]);return!e&&i?[!1,s]:[!0]}(),n=(0,o.useContext)(F.p);return(0,s.jsx)(n7,{...t,layoutGroup:n,switchLayoutGroup:(0,o.useContext)(b),isPresent:e,safeToRemove:i})}let re={borderRadius:{...n4,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:n4,borderTopRightRadius:n4,borderBottomLeftRadius:n4,borderBottomRightRadius:n4,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=e6.parse(t);if(n.length>5)return t;let r=e6.createTransformer(t),s="number"!=typeof n[0]?1:0,o=i.x.scale*e.x,a=i.y.scale*e.y;n[0+s]/=o,n[1+s]/=a;let l=iO(o,a,.5);return"number"==typeof n[2+s]&&(n[2+s]/=l),"number"==typeof n[3+s]&&(n[3+s]/=l),r(n)}}},ri=["TopLeft","TopRight","BottomLeft","BottomRight"],rn=ri.length,rr=t=>"string"==typeof t?parseFloat(t):t,rs=t=>"number"==typeof t||te.test(t);function ro(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let ra=ru(0,.5,iV),rl=ru(.5,.95,tY.Z);function ru(t,e,i){return n=>ne?1:i(iI(t,e,n))}function rh(t,e){t.min=e.min,t.max=e.max}function rc(t,e){rh(t.x,e.x),rh(t.y,e.y)}function rd(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function rp(t,e,i,n,r){return t-=e,t=n+1/i*(t-n),void 0!==r&&(t=n+1/r*(t-n)),t}function rm(t,e,[i,n,r],s,o){!function(t,e=0,i=1,n=.5,r,s=t,o=t){if(tt.test(e)&&(e=parseFloat(e),e=iO(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=iO(s.min,s.max,n);t===s&&(a-=e),t.min=rp(t.min,e,i,a,r),t.max=rp(t.max,e,i,a,r)}(t,e[i],e[n],e[r],e.scale,s,o)}let rf=["x","scaleX","originX"],rv=["y","scaleY","originY"];function rg(t,e,i,n){rm(t.x,e,rf,i?i.x:void 0,n?n.x:void 0),rm(t.y,e,rv,i?i.y:void 0,n?n.y:void 0)}function ry(t){return 0===t.translate&&1===t.scale}function rx(t){return ry(t.x)&&ry(t.y)}function rb(t,e){return t.min===e.min&&t.max===e.max}function rP(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function rT(t,e){return rP(t.x,e.x)&&rP(t.y,e.y)}function rw(t){return nA(t.x)/nA(t.y)}function rE(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class rS{constructor(){this.members=[]}add(t){tN(this.members,t),t.scheduleRender()}remove(t){if(tz(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e;let i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;!1===n&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let rA=(t,e)=>t.depth-e.depth;class rC{constructor(){this.children=[],this.isDirty=!1}add(t){tN(this.children,t),this.isDirty=!0}remove(t){tz(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rA),this.isDirty=!1,this.children.forEach(t)}}let rM={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},rV="undefined"!=typeof window&&void 0!==window.MotionDebug,rR=["","X","Y","Z"],rD={visibility:"hidden"},rk=0;function rF(t,e,i,n){let{latestValues:r}=e;r[t]&&(i[t]=r[t],e.setStaticValue(t,0),n&&(n[t]=0))}function rL({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(t={},i=null==e?void 0:e()){this.id=rk++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,rV&&(rM.totalNodes=rM.resolvedTargetDeltas=rM.recalculatedProjection=0),this.nodes.forEach(rO),this.nodes.forEach(rY),this.nodes.forEach(rH),this.nodes.forEach(rB),rV&&window.MotionDebug.record(rM)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=iu.now(),n=({timestamp:e})=>{let r=e-i;r>=250&&(tZ(n),t(r-250))};return tH.read(n,!0),()=>tZ(n)}(n,0),n6.hasAnimatedSinceResize&&(n6.hasAnimatedSinceResize=!1,this.nodes.forEach(rW))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||r)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||s.getDefaultTransition()||r_,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!rT(this.targetLayout,n)||i,u=!e&&i;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);let e={...eP(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||rW(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,tZ(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rZ),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let n=i.props[p];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tH,!(t||i))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,i),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=nU());let{target:l}=e;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(rd(this.prevProjectionDelta.x,this.projectionDelta.x),rd(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nM(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&rE(this.projectionDelta.x,this.prevProjectionDelta.x)&&rE(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),rV&&rM.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=nO(),this.projectionDelta=nO(),this.projectionDeltaWithTransform=nO()}setAnimationOrigin(t,e=!1){let i;let n=this.snapshot,r=n?n.latestValues:{},s={...this.latestValues},o=nO();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=nU(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),h=!u||u.members.length<=1,c=!!(l&&!h&&!0===this.options.crossfade&&!this.path.some(rq));this.animationProgress=0,this.mixTargetDelta=e=>{let n=e/1e3;if(rK(o.x,t.x,n),rK(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,d,p,m;nD(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,rX(p.x,m.x,a.x,n),rX(p.y,m.y,a.y,n),i&&(u=this.relativeTarget,d=i,rb(u.x,d.x)&&rb(u.y,d.y))&&(this.isProjectionDirty=!1),i||(i=nU()),rc(i,this.relativeTarget)}l&&(this.animationValues=s,function(t,e,i,n,r,s){r?(t.opacity=iO(0,void 0!==i.opacity?i.opacity:1,ra(n)),t.opacityExit=iO(void 0!==e.opacity?e.opacity:1,0,rl(n))):s&&(t.opacity=iO(void 0!==e.opacity?e.opacity:1,void 0!==i.opacity?i.opacity:1,n));for(let r=0;r{n6.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,i){let n=z(0)?0:na(0);return n.start(ni("",n,1e3,i)),n.animation}(0,0,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:r}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&r1(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||nU();let e=nA(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=nA(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}rc(e,i),n_(e,r),nM(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new rS),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){var t;let{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;let{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&rF("z",t,n,this.animationValues);for(let e=0;e{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(rN),this.root.sharedNodes.clear()}}}function rj(t){t.updateLayout()}function rI(t){var e;let i=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){let{layoutBox:e,measuredBox:n}=t.layout,{animationType:r}=t.options,s=i.source!==t.layout.source;"size"===r?nN(t=>{let n=s?i.measuredBox[t]:i.layoutBox[t],r=nA(n);n.min=e[t].min,n.max=n.min+r}):r1(r,i.layoutBox,e)&&nN(n=>{let r=s?i.measuredBox[n]:i.layoutBox[n],o=nA(e[n]);r.max=r.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+o)});let o=nO();nM(o,e,i.layoutBox);let a=nO();s?nM(a,t.applyTransform(n,!0),i.measuredBox):nM(a,e,i.layoutBox);let l=!rx(o),u=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:r,layout:s}=n;if(r&&s){let o=nU();nD(o,i.layoutBox,r.layoutBox);let a=nU();nD(a,e,s.layoutBox),rT(o,a)||(u=!0),n.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:i,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function rO(t){rV&&rM.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function rB(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rU(t){t.clearSnapshot()}function rN(t){t.clearMeasurements()}function rz(t){t.isLayoutDirty=!1}function r$(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rW(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rY(t){t.resolveTargetDelta()}function rH(t){t.calcProjection()}function rZ(t){t.resetSkewAndRotation()}function rG(t){t.removeLeadSnapshot()}function rK(t,e,i){t.translate=iO(e.translate,0,i),t.scale=iO(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function rX(t,e,i,n){t.min=iO(e.min,i.min,n),t.max=iO(e.max,i.max,n)}function rq(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let r_={duration:.45,ease:[.4,0,.1,1]},rJ=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),rQ=rJ("applewebkit/")&&!rJ("chrome/")?Math.round:tY.Z;function r0(t){t.min=rQ(t.min),t.max=rQ(t.max)}function r1(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(rw(e)-rw(i)))}function r5(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}let r3=rL({attachResizeListener:(t,e)=>t_(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),r2={current:void 0},r9=rL({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!r2.current){let t=new r3({});t.mount(window),t.setOptions({layoutScroll:!0}),r2.current=t}return r2.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),r6={current:null},r8={current:!1},r4=new WeakMap,r7=[...eO,eJ,e6],st=t=>r7.find(eI(t)),se=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],si=A.length;class sn{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:r,visualState:s},o={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eY,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,tH.render(this.render,!1,!0))};let{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.blockInitialAnimation=!!r,this.isControllingVariants=C(e),this.isVariantNode=M(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(let t in h){let e=h[t];void 0!==a[t]&&z(e)&&e.set(a[t],!1)}}mount(t){this.current=t,r4.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),r8.current||function(){if(r8.current=!0,k.j){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>r6.current=t.matches;t.addListener(e),e()}else r6.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||r6.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in r4.delete(this.current),this.projection&&this.projection.unmount(),tZ(this.notifyUpdate),tZ(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){let i;this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=U.has(t),r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tH.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),s(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in D){let e=D[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nU()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=na(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){var i;let n=void 0===this.latestValues[t]&&this.current?null!==(i=this.getBaseTargetFromProps(this.props,t))&&void 0!==i?i:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(eC(n)||eS(n))?n=parseFloat(n):!st(n)&&e6.test(e)&&(n=ir(t,e)),this.setBaseTarget(t,z(n)?n.get():n)),z(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;let i;let{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let r=tk(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(i=r[t])}if(n&&void 0!==i)return i;let r=this.getBaseTargetFromProps(this.props,t);return void 0===r||z(r)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new nn),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class sr extends sn{constructor(){super(...arguments),this.KeyframeResolver=io}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}}class ss extends sr{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=tA}readValueFromInstance(t,e){if(U.has(e)){let t=ii(e);return t&&t.default||0}{let i=window.getComputedStyle(t),n=(th(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return nJ(t,e)}build(t,e,i){tm(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return tV(t,e,i)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;z(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class so extends sr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nU}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(U.has(e)){let t=ii(e);return t&&t.default||0}return e=tC.has(e)?e:d(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return tR(t,e,i)}build(t,e,i){tw(t,e,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,i,n){tM(t,e,i,n)}mount(t){this.isSVGTag=tS(t.tagName),super.mount(t)}}let sa=(t,e)=>I(t)?new so(e):new ss(e,{allowProjection:t!==o.Fragment}),sl={animation:{Feature:ng},exit:{Feature:nx},inView:{Feature:ec},tap:{Feature:es},focus:{Feature:ei},hover:{Feature:ee},pan:{Feature:n9},drag:{Feature:n3,ProjectionNode:r9,MeasureLayout:rt},layout:{ProjectionNode:r9,MeasureLayout:rt}},su=function(t){function e(e,i={}){return function({preloadedFeatures:t,createVisualElement:e,useRender:i,useVisualState:n,Component:r}){t&&function(t){for(let e in t)D[e]={...D[e],...t[e]}}(t);let d=(0,o.forwardRef)(function(t,d){var m;let f;let v={...(0,o.useContext)(a._),...t,layoutId:function({layoutId:t}){let e=(0,o.useContext)(F.p).id;return e&&void 0!==t?e+"-"+t:t}(t)},{isStatic:y}=v,E=function(t){let{initial:e,animate:i}=function(t,e){if(C(t)){let{initial:e,animate:i}=t;return{initial:!1===e||w(e)?e:void 0,animate:w(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,o.useContext)(l));return(0,o.useMemo)(()=>({initial:e,animate:i}),[V(e),V(i)])}(t),S=n(t,y);if(!y&&k.j){(0,o.useContext)(c).strict;let t=function(t){let{drag:e,layout:i}=D;if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==i?void 0:i.isEnabled(t))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(v);f=t.MeasureLayout,E.visualElement=function(t,e,i,n,r){var s;let{visualElement:d}=(0,o.useContext)(l),m=(0,o.useContext)(c),f=(0,o.useContext)(u.O),v=(0,o.useContext)(a._).reducedMotion,y=(0,o.useRef)();n=n||m.renderer,!y.current&&n&&(y.current=n(t,{visualState:e,parent:d,props:i,presenceContext:f,blockInitialAnimation:!!f&&!1===f.initial,reducedMotionConfig:v}));let w=y.current,E=(0,o.useContext)(b);w&&!w.projection&&r&&("html"===w.type||"svg"===w.type)&&function(t,e,i,n){let{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&x(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:u})}(y.current,i,r,E),(0,o.useInsertionEffect)(()=>{w&&w.update(i,f)});let S=i[p],A=(0,o.useRef)(!!S&&!window.MotionHandoffIsComplete&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,S)));return(0,h.L)(()=>{w&&(w.updateFeatures(),g.render(w.render),A.current&&w.animationState&&w.animationState.animateChanges())}),(0,o.useEffect)(()=>{w&&(!A.current&&w.animationState&&w.animationState.animateChanges(),A.current=!1,P||(P=!0,queueMicrotask(T)))}),w}(r,S,v,e,t.ProjectionNode)}return(0,s.jsxs)(l.Provider,{value:E,children:[f&&E.visualElement?(0,s.jsx)(f,{visualElement:E.visualElement,...v}):null,i(r,t,(m=E.visualElement,(0,o.useCallback)(t=>{t&&S.mount&&S.mount(t),m&&(t?m.mount(t):m.unmount()),d&&("function"==typeof d?d(t):x(d)&&(d.current=t))},[m])),S,y,E.visualElement)]})});return d[L]=r,d}(t(e,i))}if("undefined"==typeof Proxy)return e;let i=new Map;return new Proxy(e,{get:(t,n)=>(i.has(n)||i.set(n,e(n)),i.get(n))})}((t,e)=>(function(t,{forwardMotionProps:e=!1},i,n){return{...I(t)?tX:tq,preloadedFeatures:i,useRender:function(t=!1){return(e,i,n,{latestValues:r},s)=>{let a=(I(e)?function(t,e,i,n){let r=(0,o.useMemo)(()=>{let i=tE();return tw(i,e,tS(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};tv(e,t.style,t),r.style={...e,...r.style}}return r}:function(t,e){let i={},n=function(t,e){let i=t.style||{},n={};return tv(n,i,t),Object.assign(n,function({transformTemplate:t},e){return(0,o.useMemo)(()=>{let i=tf();return tm(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),n}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=n,i})(i,r,s,e),l=function(t,e,i){let n={};for(let r in t)("values"!==r||"object"!=typeof t.values)&&(tx(r)||!0===i&&ty(r)||!e&&!ty(r)||t.draggable&&r.startsWith("onDrag"))&&(n[r]=t[r]);return n}(i,"string"==typeof e,t),u=e!==o.Fragment?{...l,...a,ref:n}:{},{children:h}=i,c=(0,o.useMemo)(()=>z(h)?h.get():h,[h]);return(0,o.createElement)(e,{...u,children:c})}}(e),createVisualElement:n,Component:t}})(t,e,sl,sa))},86266:function(t,e,i){i.d(e,{K:function(){return r},k:function(){return s}});var n=i(33909);let r=n.Z,s=n.Z},79701:function(t,e,i){i.d(e,{j:function(){return n}});let n="undefined"!=typeof window},33909:function(t,e,i){i.d(e,{Z:function(){return n}});let n=t=>t},91311:function(t,e,i){i.d(e,{h:function(){return r}});var n=i(7653);function r(t){let e=(0,n.useRef)(null);return null===e.current&&(e.current=t()),e.current}},68918:function(t,e,i){i.d(e,{L:function(){return r}});var n=i(7653);let r=i(79701).j?n.useLayoutEffect:n.useEffect},2128:function(t,e,i){let n,r,s,o,a;i.d(e,{Vq:function(){return ty},EM:function(){return tg}});var l=i(7653),u=i(85831),h=i(65960);function c(t,e,i,n){let r=(0,h.E)(i);(0,l.useEffect)(()=>{function i(t){r.current(t)}return(t=null!=t?t:window).addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)},[t,e,n])}var d=i(4193),p=i(62125),m=i(32552),f=i(11513),v=i(15913),g=i(88909),y=i(74277),x=i(62308),b=i(36441);let P=(0,l.createContext)(null);function T(t){let{children:e,node:i}=t,[n,r]=(0,l.useState)(null),s=w(null!=i?i:n);return l.createElement(P.Provider,{value:s},e,null===s&&l.createElement(x._,{features:x.x.Hidden,ref:t=>{var e,i;if(t){for(let n of null!=(i=null==(e=(0,b.r)(t))?void 0:e.querySelectorAll("html > *, body > *"))?i:[])if(n!==document.body&&n!==document.head&&n instanceof HTMLElement&&null!=n&&n.contains(t)){r(n);break}}}}))}function w(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null!=(t=(0,l.useContext)(P))?t:e}var E=i(41824),S=i(12357),A=i(91335),C=i(37182),M=i(32586),V=i(88205),R=i(87295),D=i(8840),k=i(90142),F=i(31240),L=i(86031),j=i(96938),I=i(47874),O=((n=O||{})[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n);function B(t,e){let i=(0,l.useRef)([]),n=(0,p.z)(t);(0,l.useEffect)(()=>{let t=[...i.current];for(let[r,s]of e.entries())if(i.current[r]!==s){let r=n(e,t);return i.current=e,r}},[n,...e])}var U=i(26959);let N=[];!function(t){function e(){"loading"!==document.readyState&&(t(),document.removeEventListener("DOMContentLoaded",e))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",e),e())}(()=>{function t(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||N[0]===t.target)return;let e=t.target;e=e.closest(U.y),N.unshift(null!=e?e:t.target),(N=N.filter(t=>null!=t&&t.isConnected)).splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});var z=i(51327);function $(t){if(!t)return new Set;if("function"==typeof t)return new Set(t());let e=new Set;for(let i of t.current)i.current instanceof HTMLElement&&e.add(i.current);return e}var W=((r=W||{})[r.None=0]="None",r[r.InitialFocus=1]="InitialFocus",r[r.TabLock=2]="TabLock",r[r.FocusLock=4]="FocusLock",r[r.RestoreFocus=8]="RestoreFocus",r[r.AutoFocus=16]="AutoFocus",r);let Y=Object.assign((0,D.yV)(function(t,e){let i,n=(0,l.useRef)(null),r=(0,A.T)(n,e),{initialFocus:s,initialFocusFallback:o,containers:a,features:u=15,...h}=t;(0,S.H)()||(u=0);let m=(0,y.i)(n);!function(t,e){let{ownerDocument:i}=e,n=!!(8&t),r=function(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=(0,l.useRef)(N.slice());return B((t,i)=>{let[n]=t,[r]=i;!0===r&&!1===n&&(0,z.Y)(()=>{e.current.splice(0)}),!1===r&&!0===n&&(e.current=N.slice())},[t,N,e]),(0,p.z)(()=>{var t;return null!=(t=e.current.find(t=>null!=t&&t.isConnected))?t:null})}(n);B(()=>{n||(null==i?void 0:i.activeElement)===(null==i?void 0:i.body)&&(0,U.C5)(r())},[n]),(0,j.L)(()=>{n&&(0,U.C5)(r())})}(u,{ownerDocument:m});let f=function(t,e){let{ownerDocument:i,container:n,initialFocus:r,initialFocusFallback:s}=e,o=(0,l.useRef)(null),a=(0,d.g)(!!(1&t),"focus-trap#initial-focus"),u=(0,L.t)();return B(()=>{if(0===t)return;if(!a){null!=s&&s.current&&(0,U.C5)(s.current);return}let e=n.current;e&&(0,z.Y)(()=>{if(!u.current)return;let n=null==i?void 0:i.activeElement;if(null!=r&&r.current){if((null==r?void 0:r.current)===n){o.current=n;return}}else if(e.contains(n)){o.current=n;return}if(null!=r&&r.current)(0,U.C5)(r.current);else{if(16&t){if((0,U.jA)(e,U.TO.First|U.TO.AutoFocus)!==U.fE.Error)return}else if((0,U.jA)(e,U.TO.First)!==U.fE.Error)return;if(null!=s&&s.current&&((0,U.C5)(s.current),(null==i?void 0:i.activeElement)===s.current))return;console.warn("There are no focusable elements inside the ")}o.current=null==i?void 0:i.activeElement})},[s,a,t]),o}(u,{ownerDocument:m,container:n,initialFocus:s,initialFocusFallback:o});!function(t,e){let{ownerDocument:i,container:n,containers:r,previousActiveElement:s}=e,o=(0,L.t)(),a=!!(4&t);c(null==i?void 0:i.defaultView,"focus",t=>{if(!a||!o.current)return;let e=$(r);n.current instanceof HTMLElement&&e.add(n.current);let i=s.current;if(!i)return;let l=t.target;l&&l instanceof HTMLElement?H(e,l)?(s.current=l,(0,U.C5)(l)):(t.preventDefault(),t.stopPropagation(),(0,U.C5)(i)):(0,U.C5)(s.current)},!0)}(u,{ownerDocument:m,container:n,containers:a,previousActiveElement:f});let v=(i=(0,l.useRef)(0),(0,I.s)(!0,"keydown",t=>{"Tab"===t.key&&(i.current=t.shiftKey?1:0)},!0),i),g=(0,p.z)(t=>{let e=n.current;e&&(0,R.E)(v.current,{[O.Forwards]:()=>{(0,U.jA)(e,U.TO.First,{skipElements:[t.relatedTarget,o]})},[O.Backwards]:()=>{(0,U.jA)(e,U.TO.Last,{skipElements:[t.relatedTarget,o]})}})}),b=(0,d.g)(!!(2&u),"focus-trap#tab-lock"),P=(0,F.G)(),T=(0,l.useRef)(!1);return l.createElement(l.Fragment,null,b&&l.createElement(x._,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:g,features:x.x.Focusable}),(0,D.sY)({ourProps:{ref:r,onKeyDown(t){"Tab"==t.key&&(T.current=!0,P.requestAnimationFrame(()=>{T.current=!1}))},onBlur(t){if(!(4&u))return;let e=$(a);n.current instanceof HTMLElement&&e.add(n.current);let i=t.relatedTarget;i instanceof HTMLElement&&"true"!==i.dataset.headlessuiFocusGuard&&(H(e,i)||(T.current?(0,U.jA)(n.current,(0,R.E)(v.current,{[O.Forwards]:()=>U.TO.Next,[O.Backwards]:()=>U.TO.Previous})|U.TO.WrapAround,{relativeTo:t.target}):t.target instanceof HTMLElement&&(0,U.C5)(t.target)))}},theirProps:h,defaultTag:"div",name:"FocusTrap"}),b&&l.createElement(x._,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:g,features:x.x.Focusable}))}),{features:W});function H(t,e){for(let i of t)if(i.contains(e))return!0;return!1}var Z=i(97831),G=i(27291),K=i(49336);function X(t){var e;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||(null!=(e=t.as)?e:te)!==l.Fragment||1===l.Children.count(t.children)}let q=(0,l.createContext)(null);q.displayName="TransitionContext";var _=((s=_||{}).Visible="visible",s.Hidden="hidden",s);let J=(0,l.createContext)(null);function Q(t){return"children"in t?Q(t.children):t.current.filter(t=>{let{el:e}=t;return null!==e.current}).filter(t=>{let{state:e}=t;return"visible"===e}).length>0}function tt(t,e){let i=(0,h.E)(t),n=(0,l.useRef)([]),r=(0,L.t)(),s=(0,F.G)(),o=(0,p.z)(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.l4.Hidden,o=n.current.findIndex(e=>{let{el:i}=e;return i===t});-1!==o&&((0,R.E)(e,{[D.l4.Unmount](){n.current.splice(o,1)},[D.l4.Hidden](){n.current[o].state="hidden"}}),s.microTask(()=>{var t;!Q(n)&&r.current&&(null==(t=i.current)||t.call(i))}))}),a=(0,p.z)(t=>{let e=n.current.find(e=>{let{el:i}=e;return i===t});return e?"visible"!==e.state&&(e.state="visible"):n.current.push({el:t,state:"visible"}),()=>o(t,D.l4.Unmount)}),u=(0,l.useRef)([]),c=(0,l.useRef)(Promise.resolve()),d=(0,l.useRef)({enter:[],leave:[]}),m=(0,p.z)((t,i,n)=>{u.current.splice(0),e&&(e.chains.current[i]=e.chains.current[i].filter(e=>{let[i]=e;return i!==t})),null==e||e.chains.current[i].push([t,new Promise(t=>{u.current.push(t)})]),null==e||e.chains.current[i].push([t,new Promise(t=>{Promise.all(d.current[i].map(t=>{let[e,i]=t;return i})).then(()=>t())})]),"enter"===i?c.current=c.current.then(()=>null==e?void 0:e.wait.current).then(()=>n(i)):n(i)}),f=(0,p.z)((t,e,i)=>{Promise.all(d.current[e].splice(0).map(t=>{let[e,i]=t;return i})).then(()=>{var t;null==(t=u.current.shift())||t()}).then(()=>i(e))});return(0,l.useMemo)(()=>({children:n,register:a,unregister:o,onStart:m,onStop:f,wait:c,chains:d}),[a,o,n,m,f,d,c])}J.displayName="NestingContext";let te=l.Fragment,ti=D.VN.RenderStrategy,tn=(0,D.yV)(function(t,e){let{show:i,appear:n=!1,unmount:r=!0,...s}=t,o=(0,l.useRef)(null),a=X(t),u=(0,A.T)(...a?[o,e]:null===e?[]:[e]);(0,S.H)();let h=(0,M.oJ)();if(void 0===i&&null!==h&&(i=(h&M.ZM.Open)===M.ZM.Open),void 0===i)throw Error("A is used but it is missing a `show={true | false}` prop.");let[c,d]=(0,l.useState)(i?"visible":"hidden"),m=tt(()=>{i||d("hidden")}),[v,g]=(0,l.useState)(!0),y=(0,l.useRef)([i]);(0,f.e)(()=>{!1!==v&&y.current[y.current.length-1]!==i&&(y.current.push(i),g(!1))},[y,i]);let x=(0,l.useMemo)(()=>({show:i,appear:n,initial:v}),[i,n,v]);(0,f.e)(()=>{i?d("visible"):Q(m)||null===o.current||d("hidden")},[i,m]);let b={unmount:r},P=(0,p.z)(()=>{var e;v&&g(!1),null==(e=t.beforeEnter)||e.call(t)}),T=(0,p.z)(()=>{var e;v&&g(!1),null==(e=t.beforeLeave)||e.call(t)});return l.createElement(J.Provider,{value:m},l.createElement(q.Provider,{value:x},(0,D.sY)({ourProps:{...b,as:l.Fragment,children:l.createElement(tr,{ref:u,...b,...s,beforeEnter:P,beforeLeave:T})},theirProps:{},defaultTag:l.Fragment,features:ti,visible:"visible"===c,name:"Transition"})))}),tr=(0,D.yV)(function(t,e){var i,n;let{transition:r=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:u,enter:h,enterFrom:c,enterTo:d,entered:m,leave:v,leaveFrom:g,leaveTo:y,...x}=t,[b,P]=(0,l.useState)(null),T=(0,l.useRef)(null),w=X(t),E=(0,A.T)(...w?[T,e,P]:null===e?[]:[e]),C=null==(i=x.unmount)||i?D.l4.Unmount:D.l4.Hidden,{show:V,appear:k,initial:F}=function(){let t=(0,l.useContext)(q);if(null===t)throw Error("A is used but it is missing a parent or .");return t}(),[L,j]=(0,l.useState)(V?"visible":"hidden"),I=function(){let t=(0,l.useContext)(J);if(null===t)throw Error("A is used but it is missing a parent or .");return t}(),{register:O,unregister:B}=I;(0,f.e)(()=>O(T),[O,T]),(0,f.e)(()=>{if(C===D.l4.Hidden&&T.current){if(V&&"visible"!==L){j("visible");return}return(0,R.E)(L,{hidden:()=>B(T),visible:()=>O(T)})}},[L,T,O,B,V,C]);let U=(0,S.H)();(0,f.e)(()=>{if(w&&U&&"visible"===L&&null===T.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[T,L,U,w]);let N=F&&!k,z=k&&V&&F,$=(0,l.useRef)(!1),W=tt(()=>{$.current||(j("hidden"),B(T))},I),Y=(0,p.z)(t=>{$.current=!0,W.onStart(T,t?"enter":"leave",t=>{"enter"===t?null==s||s():"leave"===t&&(null==a||a())})}),H=(0,p.z)(t=>{let e=t?"enter":"leave";$.current=!1,W.onStop(T,e,t=>{"enter"===t?null==o||o():"leave"===t&&(null==u||u())}),"leave"!==e||Q(W)||(j("hidden"),B(T))});(0,l.useEffect)(()=>{w&&r||(Y(V),H(V))},[V,w,r]);let Z=!(!r||!w||!U||N),[,_]=(0,G.Y)(Z,b,V,{start:Y,end:H}),tn=(0,D.oA)({ref:E,className:(null==(n=(0,K.A)(x.className,z&&h,z&&c,_.enter&&h,_.enter&&_.closed&&c,_.enter&&!_.closed&&d,_.leave&&v,_.leave&&!_.closed&&g,_.leave&&_.closed&&y,!_.transition&&V&&m))?void 0:n.trim())||void 0,...(0,G.X)(_)}),tr=0;return"visible"===L&&(tr|=M.ZM.Open),"hidden"===L&&(tr|=M.ZM.Closed),_.enter&&(tr|=M.ZM.Opening),_.leave&&(tr|=M.ZM.Closing),l.createElement(J.Provider,{value:W},l.createElement(M.up,{value:tr},(0,D.sY)({ourProps:tn,theirProps:x,defaultTag:te,features:ti,visible:"visible"===L,name:"Transition.Child"})))}),ts=(0,D.yV)(function(t,e){let i=null!==(0,l.useContext)(q),n=null!==(0,M.oJ)();return l.createElement(l.Fragment,null,!i&&n?l.createElement(tn,{ref:e,...t}):l.createElement(tr,{ref:e,...t}))}),to=Object.assign(tn,{Child:ts,Root:tn});var ta=((o=ta||{})[o.Open=0]="Open",o[o.Closed=1]="Closed",o),tl=((a=tl||{})[a.SetTitleId=0]="SetTitleId",a);let tu={0:(t,e)=>t.titleId===e.id?t:{...t,titleId:e.id}},th=(0,l.createContext)(null);function tc(t){let e=(0,l.useContext)(th);if(null===e){let e=Error("<".concat(t," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(e,tc),e}return e}function td(t,e){return(0,R.E)(e.type,tu,t,e)}th.displayName="DialogContext";let tp=(0,D.yV)(function(t,e){let i=(0,l.useId)(),{id:n="headlessui-dialog-".concat(i),open:r,onClose:s,initialFocus:o,role:a="dialog",autoFocus:h=!0,__demoMode:x=!1,unmount:b=!1,...P}=t,T=(0,l.useRef)(!1);a="dialog"===a||"alertdialog"===a?a:(T.current||(T.current=!0,console.warn("Invalid role [".concat(a,"] passed to . Only `dialog` and and `alertdialog` are supported. Using `dialog` instead."))),"dialog");let R=(0,M.oJ)();void 0===r&&null!==R&&(r=(R&M.ZM.Open)===M.ZM.Open);let F=(0,l.useRef)(null),L=(0,A.T)(F,e),j=(0,y.i)(F),I=r?0:1,[O,B]=(0,l.useReducer)(td,{titleId:null,descriptionId:null,panelRef:(0,l.createRef)()}),U=(0,p.z)(()=>s(!1)),N=(0,p.z)(t=>B({type:0,id:t})),z=!!(0,S.H)()&&0===I,[$,H]=(0,Z.kF)(),G=w(),{resolveContainers:K}=function(){let{defaultContainers:t=[],portals:e,mainTreeNode:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,y.i)(i),r=(0,p.z)(()=>{var r,s;let o=[];for(let e of t)null!==e&&(e instanceof HTMLElement?o.push(e):"current"in e&&e.current instanceof HTMLElement&&o.push(e.current));if(null!=e&&e.current)for(let t of e.current)o.push(t);for(let t of null!=(r=null==n?void 0:n.querySelectorAll("html > *, body > *"))?r:[])t!==document.body&&t!==document.head&&t instanceof HTMLElement&&"headlessui-portal-root"!==t.id&&(i&&(t.contains(i)||t.contains(null==(s=null==i?void 0:i.getRootNode())?void 0:s.host))||o.some(e=>t.contains(e))||o.push(t));return o});return{resolveContainers:r,contains:(0,p.z)(t=>r().some(e=>e.contains(t)))}}({mainTreeNode:G,portals:$,defaultContainers:[{get current(){var X;return null!=(X=O.panelRef.current)?X:F.current}}]}),q=null!==R&&(R&M.ZM.Closing)===M.ZM.Closing;(0,m.s)(!x&&!q&&z,{allowed:(0,p.z)(()=>{var t,e;return[null!=(e=null==(t=F.current)?void 0:t.closest("[data-headlessui-portal]"))?e:null]}),disallowed:(0,p.z)(()=>{var t;return[null!=(t=null==G?void 0:G.closest("body > *:not(#headlessui-portal-root)"))?t:null]})}),(0,g.O)(z,K,t=>{t.preventDefault(),U()}),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"undefined"!=typeof document?document.defaultView:null,i=arguments.length>2?arguments[2]:void 0,n=(0,d.g)(t,"escape");c(e,"keydown",t=>{n&&(t.defaultPrevented||t.key===u.R.Escape&&i(t))})}(z,null==j?void 0:j.defaultView,t=>{t.preventDefault(),t.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur(),U()}),(0,E.P)(!x&&!q&&z,j,K),(0,v.m)(z,F,U);let[_,J]=(0,k.fw)(),Q=(0,l.useMemo)(()=>[{dialogState:I,close:U,setTitleId:N,unmount:b},O],[I,O,U,N,b]),tt=(0,l.useMemo)(()=>({open:0===I}),[I]),te={ref:L,id:n,role:a,tabIndex:-1,"aria-modal":x?void 0:0===I||void 0,"aria-labelledby":O.titleId,"aria-describedby":_,unmount:b},ti=!function(){var t;let[e]=(0,l.useState)(()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null),[i,n]=(0,l.useState)(null!=(t=null==e?void 0:e.matches)&&t);return(0,f.e)(()=>{if(e)return e.addEventListener("change",t),()=>e.removeEventListener("change",t);function t(t){n(t.matches)}},[e]),i}(),tn=W.None;return z&&!x&&(tn|=W.RestoreFocus,tn|=W.TabLock,h&&(tn|=W.AutoFocus),ti&&(tn|=W.InitialFocus)),l.createElement(M.uu,null,l.createElement(V.O,{force:!0},l.createElement(Z.h_,null,l.createElement(th.Provider,{value:Q},l.createElement(Z.wA,{target:F},l.createElement(V.O,{force:!1},l.createElement(J,{slot:tt},l.createElement(H,null,l.createElement(Y,{initialFocus:o,initialFocusFallback:F,containers:K,features:tn},l.createElement(C.Z,{value:U},(0,D.sY)({ourProps:te,theirProps:P,slot:tt,defaultTag:tm,features:tf,visible:0===I,name:"Dialog"})))))))))))}),tm="div",tf=D.VN.RenderStrategy|D.VN.Static,tv=(0,D.yV)(function(t,e){let{transition:i=!1,open:n,...r}=t,s=(0,M.oJ)(),o=t.hasOwnProperty("open")||null!==s,a=t.hasOwnProperty("onClose");if(!o&&!a)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!s&&"boolean"!=typeof t.open)throw Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: ".concat(t.open));if("function"!=typeof t.onClose)throw Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: ".concat(t.onClose));return(void 0!==n||i)&&!r.static?l.createElement(T,null,l.createElement(to,{show:n,transition:i,unmount:r.unmount},l.createElement(tp,{ref:e,...r}))):l.createElement(T,null,l.createElement(tp,{ref:e,open:n,...r}))}),tg=(0,D.yV)(function(t,e){let i=(0,l.useId)(),{id:n="headlessui-dialog-panel-".concat(i),transition:r=!1,...s}=t,[{dialogState:o,unmount:a},u]=tc("Dialog.Panel"),h=(0,A.T)(e,u.panelRef),c=(0,l.useMemo)(()=>({open:0===o}),[o]),d=(0,p.z)(t=>{t.stopPropagation()});return l.createElement(r?ts:l.Fragment,{...r?{unmount:a}:{}},(0,D.sY)({ourProps:{ref:h,id:n,onClick:d},theirProps:s,slot:c,defaultTag:"div",name:"Dialog.Panel"}))}),ty=Object.assign(tv,{Panel:tg,Title:((0,D.yV)(function(t,e){let{transition:i=!1,...n}=t,[{dialogState:r,unmount:s}]=tc("Dialog.Backdrop"),o=(0,l.useMemo)(()=>({open:0===r}),[r]);return l.createElement(i?ts:l.Fragment,{...i?{unmount:s}:{}},(0,D.sY)({ourProps:{ref:e,"aria-hidden":!0},theirProps:n,slot:o,defaultTag:"div",name:"Dialog.Backdrop"}))}),(0,D.yV)(function(t,e){let i=(0,l.useId)(),{id:n="headlessui-dialog-title-".concat(i),...r}=t,[{dialogState:s,setTitleId:o}]=tc("Dialog.Title"),a=(0,A.T)(e);(0,l.useEffect)(()=>(o(n),()=>o(null)),[n,o]);let u=(0,l.useMemo)(()=>({open:0===s}),[s]);return(0,D.sY)({ourProps:{ref:a,id:n},theirProps:r,slot:u,defaultTag:"h2",name:"Dialog.Title"})})),Description:k.dk})},46294:function(t,e,i){let n,r;i.d(e,{pJ:function(){return j},lG:function(){return F},V2:function(){return L}});var s,o=i(44915),a=i(84989),l=i(7653),u=i(62142),h=i(62125),c=i(56613),d=i(91335),p=i(27291),m=i(37182),f=i(32586),v=i(27345),g=i(87295),y=i(36441),x=i(8840);let b=null!=(s=l.startTransition)?s:function(t){t()};var P=i(85831),T=((n=T||{})[n.Open=0]="Open",n[n.Closed=1]="Closed",n),w=((r=w||{})[r.ToggleDisclosure=0]="ToggleDisclosure",r[r.CloseDisclosure=1]="CloseDisclosure",r[r.SetButtonId=2]="SetButtonId",r[r.SetPanelId=3]="SetPanelId",r[r.SetButtonElement=4]="SetButtonElement",r[r.SetPanelElement=5]="SetPanelElement",r);let E={0:t=>({...t,disclosureState:(0,g.E)(t.disclosureState,{0:1,1:0})}),1:t=>1===t.disclosureState?t:{...t,disclosureState:1},2:(t,e)=>t.buttonId===e.buttonId?t:{...t,buttonId:e.buttonId},3:(t,e)=>t.panelId===e.panelId?t:{...t,panelId:e.panelId},4:(t,e)=>t.buttonElement===e.element?t:{...t,buttonElement:e.element},5:(t,e)=>t.panelElement===e.element?t:{...t,panelElement:e.element}},S=(0,l.createContext)(null);function A(t){let e=(0,l.useContext)(S);if(null===e){let e=Error("<".concat(t," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(e,A),e}return e}S.displayName="DisclosureContext";let C=(0,l.createContext)(null);C.displayName="DisclosureAPIContext";let M=(0,l.createContext)(null);function V(t,e){return(0,g.E)(e.type,E,t,e)}M.displayName="DisclosurePanelContext";let R=l.Fragment,D=x.VN.RenderStrategy|x.VN.Static,k=(0,x.yV)(function(t,e){let{defaultOpen:i=!1,...n}=t,r=(0,l.useRef)(null),s=(0,d.T)(e,(0,d.h)(t=>{r.current=t},void 0===t.as||t.as===l.Fragment)),o=(0,l.useReducer)(V,{disclosureState:i?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:a,buttonId:u},c]=o,p=(0,h.z)(t=>{c({type:1});let e=(0,y.r)(r);if(!e||!u)return;let i=t?t instanceof HTMLElement?t:t.current instanceof HTMLElement?t.current:e.getElementById(u):e.getElementById(u);null==i||i.focus()}),v=(0,l.useMemo)(()=>({close:p}),[p]),b=(0,l.useMemo)(()=>({open:0===a,close:p}),[a,p]);return l.createElement(S.Provider,{value:o},l.createElement(C.Provider,{value:v},l.createElement(m.Z,{value:p},l.createElement(f.up,{value:(0,g.E)(a,{0:f.ZM.Open,1:f.ZM.Closed})},(0,x.sY)({ourProps:{ref:s},theirProps:n,slot:b,defaultTag:R,name:"Disclosure"})))))}),F=(0,x.yV)(function(t,e){let i=(0,l.useId)(),{id:n="headlessui-disclosure-button-".concat(i),disabled:r=!1,autoFocus:s=!1,...p}=t,[m,f]=A("Disclosure.Button"),g=(0,l.useContext)(M),y=null!==g&&g===m.panelId,b=(0,l.useRef)(null),T=(0,d.T)(b,e,(0,h.z)(t=>{if(!y)return f({type:4,element:t})})),w=(0,x.Y2)();(0,l.useEffect)(()=>{if(!y)return f({type:2,buttonId:n}),()=>{f({type:2,buttonId:null})}},[n,f,y]);let E=(0,h.z)(t=>{var e;if(y){if(1===m.disclosureState)return;switch(t.key){case P.R.Space:case P.R.Enter:t.preventDefault(),t.stopPropagation(),f({type:0}),null==(e=m.buttonElement)||e.focus()}}else switch(t.key){case P.R.Space:case P.R.Enter:t.preventDefault(),t.stopPropagation(),f({type:0})}}),S=(0,h.z)(t=>{t.key===P.R.Space&&t.preventDefault()}),C=(0,h.z)(t=>{var e;(0,v.P)(t.currentTarget)||r||(y?(f({type:0}),null==(e=m.buttonElement)||e.focus()):f({type:0}))}),{isFocusVisible:V,focusProps:R}=(0,o.F)({autoFocus:s}),{isHovered:D,hoverProps:k}=(0,a.X)({isDisabled:r}),{pressed:F,pressProps:L}=(0,u.x)({disabled:r}),j=(0,l.useMemo)(()=>({open:0===m.disclosureState,hover:D,active:F,disabled:r,focus:V,autofocus:s}),[m,D,F,V,r,s]),I=(0,c.f)(t,m.buttonElement),O=y?(0,x.dG)({ref:T,type:I,disabled:r||void 0,autoFocus:s,onKeyDown:E,onClick:C},R,k,L):(0,x.dG)({ref:T,id:n,type:I,"aria-expanded":0===m.disclosureState,"aria-controls":m.panelElement?m.panelId:void 0,disabled:r||void 0,autoFocus:s,onKeyDown:E,onKeyUp:S,onClick:C},R,k,L);return(0,x.sY)({mergeRefs:w,ourProps:O,theirProps:p,slot:j,defaultTag:"button",name:"Disclosure.Button"})}),L=(0,x.yV)(function(t,e){let i=(0,l.useId)(),{id:n="headlessui-disclosure-panel-".concat(i),transition:r=!1,...s}=t,[o,a]=A("Disclosure.Panel"),{close:u}=function t(e){let i=(0,l.useContext)(C);if(null===i){let i=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return i}("Disclosure.Panel"),c=(0,x.Y2)(),[m,v]=(0,l.useState)(null),g=(0,d.T)(e,(0,h.z)(t=>{b(()=>a({type:5,element:t}))}),v);(0,l.useEffect)(()=>(a({type:3,panelId:n}),()=>{a({type:3,panelId:null})}),[n,a]);let y=(0,f.oJ)(),[P,T]=(0,p.Y)(r,m,null!==y?(y&f.ZM.Open)===f.ZM.Open:0===o.disclosureState),w=(0,l.useMemo)(()=>({open:0===o.disclosureState,close:u}),[o.disclosureState,u]),E={ref:g,id:n,...(0,p.X)(T)};return l.createElement(f.uu,null,l.createElement(M.Provider,{value:o.panelId},(0,x.sY)({mergeRefs:c,ourProps:E,theirProps:s,slot:w,defaultTag:"div",features:D,visible:P,name:"Disclosure.Panel"})))}),j=Object.assign(k,{Button:F,Panel:L})},97812:function(t,e,i){let n,r,s;i.r(e),i.d(e,{Tab:function(){return $},TabGroup:function(){return B},TabList:function(){return U},TabPanel:function(){return z},TabPanels:function(){return N}});var o=i(44915),a=i(84989),l=i(7653),u=i(62142),h=i(62125),c=i(11513),d=i(65960),p=i(56613),m=i(91335),f=i(86031),v=i(62308);function g(t){let{onFocus:e}=t,[i,n]=(0,l.useState)(!0),r=(0,f.t)();return i?l.createElement(v._,{as:"button",type:"button",features:v.x.Focusable,onFocus:t=>{t.preventDefault();let i,s=50;i=requestAnimationFrame(function t(){if(s--<=0){i&&cancelAnimationFrame(i);return}if(e()){if(cancelAnimationFrame(i),!r.current)return;n(!1);return}i=requestAnimationFrame(t)})}}):null}var y=i(26959),x=i(87295),b=i(51327),P=i(36441),T=i(8840);let w=l.createContext(null);function E(t){let{children:e}=t,i=l.useRef({groups:new Map,get(t,e){var i;let n=this.groups.get(t);n||(n=new Map,this.groups.set(t,n));let r=null!=(i=n.get(e))?i:0;return n.set(e,r+1),[Array.from(n.keys()).indexOf(e),function(){let t=n.get(e);t>1?n.set(e,t-1):n.delete(e)}]}});return l.createElement(w.Provider,{value:i},e)}function S(t){let e=l.useContext(w);if(!e)throw Error("You must wrap your component in a ");let i=l.useId(),[n,r]=e.current.get(t,i);return l.useEffect(()=>r,[]),n}var A=i(85831),C=((n=C||{})[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n),M=((r=M||{})[r.Less=-1]="Less",r[r.Equal=0]="Equal",r[r.Greater=1]="Greater",r),V=((s=V||{})[s.SetSelectedIndex=0]="SetSelectedIndex",s[s.RegisterTab=1]="RegisterTab",s[s.UnregisterTab=2]="UnregisterTab",s[s.RegisterPanel=3]="RegisterPanel",s[s.UnregisterPanel=4]="UnregisterPanel",s);let R={0(t,e){var i;let n=(0,y.z2)(t.tabs,t=>t.current),r=(0,y.z2)(t.panels,t=>t.current),s=n.filter(t=>{var e;return!(null!=(e=t.current)&&e.hasAttribute("disabled"))}),o={...t,tabs:n,panels:r};if(e.index<0||e.index>n.length-1){let i=(0,x.E)(Math.sign(e.index-t.selectedIndex),{[-1]:()=>1,0:()=>(0,x.E)(Math.sign(e.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===s.length)return o;let r=(0,x.E)(i,{0:()=>n.indexOf(s[0]),1:()=>n.indexOf(s[s.length-1])});return{...o,selectedIndex:-1===r?t.selectedIndex:r}}let a=n.slice(0,e.index),l=[...n.slice(e.index),...a].find(t=>s.includes(t));if(!l)return o;let u=null!=(i=n.indexOf(l))?i:t.selectedIndex;return -1===u&&(u=t.selectedIndex),{...o,selectedIndex:u}},1(t,e){if(t.tabs.includes(e.tab))return t;let i=t.tabs[t.selectedIndex],n=(0,y.z2)([...t.tabs,e.tab],t=>t.current),r=t.selectedIndex;return t.info.current.isControlled||-1===(r=n.indexOf(i))&&(r=t.selectedIndex),{...t,tabs:n,selectedIndex:r}},2:(t,e)=>({...t,tabs:t.tabs.filter(t=>t!==e.tab)}),3:(t,e)=>t.panels.includes(e.panel)?t:{...t,panels:(0,y.z2)([...t.panels,e.panel],t=>t.current)},4:(t,e)=>({...t,panels:t.panels.filter(t=>t!==e.panel)})},D=(0,l.createContext)(null);function k(t){let e=(0,l.useContext)(D);if(null===e){let e=Error("<".concat(t," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(e,k),e}return e}D.displayName="TabsDataContext";let F=(0,l.createContext)(null);function L(t){let e=(0,l.useContext)(F);if(null===e){let e=Error("<".concat(t," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(e,L),e}return e}function j(t,e){return(0,x.E)(e.type,R,t,e)}F.displayName="TabsActionsContext";let I=T.VN.RenderStrategy|T.VN.Static,O=(0,T.yV)(function(t,e){var i,n;let r=(0,l.useId)(),{id:s="headlessui-tabs-tab-".concat(r),disabled:d=!1,autoFocus:f=!1,...v}=t,{orientation:g,activation:w,selectedIndex:E,tabs:C,panels:M}=k("Tab"),V=L("Tab"),R=k("Tab"),[D,F]=(0,l.useState)(null),j=(0,l.useRef)(null),I=(0,m.T)(j,e,F);(0,c.e)(()=>V.registerTab(j),[V,j]);let O=S("tabs"),B=C.indexOf(j);-1===B&&(B=O);let U=B===E,N=(0,h.z)(t=>{var e;let i=t();if(i===y.fE.Success&&"auto"===w){let t=null==(e=(0,P.r)(j))?void 0:e.activeElement,i=R.tabs.findIndex(e=>e.current===t);-1!==i&&V.change(i)}return i}),z=(0,h.z)(t=>{let e=C.map(t=>t.current).filter(Boolean);if(t.key===A.R.Space||t.key===A.R.Enter){t.preventDefault(),t.stopPropagation(),V.change(B);return}switch(t.key){case A.R.Home:case A.R.PageUp:return t.preventDefault(),t.stopPropagation(),N(()=>(0,y.jA)(e,y.TO.First));case A.R.End:case A.R.PageDown:return t.preventDefault(),t.stopPropagation(),N(()=>(0,y.jA)(e,y.TO.Last))}if(N(()=>(0,x.E)(g,{vertical:()=>t.key===A.R.ArrowUp?(0,y.jA)(e,y.TO.Previous|y.TO.WrapAround):t.key===A.R.ArrowDown?(0,y.jA)(e,y.TO.Next|y.TO.WrapAround):y.fE.Error,horizontal:()=>t.key===A.R.ArrowLeft?(0,y.jA)(e,y.TO.Previous|y.TO.WrapAround):t.key===A.R.ArrowRight?(0,y.jA)(e,y.TO.Next|y.TO.WrapAround):y.fE.Error}))===y.fE.Success)return t.preventDefault()}),$=(0,l.useRef)(!1),W=(0,h.z)(()=>{var t;$.current||($.current=!0,null==(t=j.current)||t.focus({preventScroll:!0}),V.change(B),(0,b.Y)(()=>{$.current=!1}))}),Y=(0,h.z)(t=>{t.preventDefault()}),{isFocusVisible:H,focusProps:Z}=(0,o.F)({autoFocus:f}),{isHovered:G,hoverProps:K}=(0,a.X)({isDisabled:d}),{pressed:X,pressProps:q}=(0,u.x)({disabled:d}),_=(0,l.useMemo)(()=>({selected:U,hover:G,active:X,focus:H,autofocus:f,disabled:d}),[U,G,H,X,f,d]),J=(0,T.dG)({ref:I,onKeyDown:z,onMouseDown:Y,onClick:W,id:s,role:"tab",type:(0,p.f)(t,D),"aria-controls":null==(n=null==(i=M[B])?void 0:i.current)?void 0:n.id,"aria-selected":U,tabIndex:U?0:-1,disabled:d||void 0,autoFocus:f},Z,K,q);return(0,T.sY)({ourProps:J,theirProps:v,slot:_,defaultTag:"button",name:"Tabs.Tab"})}),B=(0,T.yV)(function(t,e){let{defaultIndex:i=0,vertical:n=!1,manual:r=!1,onChange:s,selectedIndex:o=null,...a}=t,u=n?"vertical":"horizontal",p=r?"manual":"auto",f=null!==o,v=(0,d.E)({isControlled:f}),x=(0,m.T)(e),[b,P]=(0,l.useReducer)(j,{info:v,selectedIndex:null!=o?o:i,tabs:[],panels:[]}),w=(0,l.useMemo)(()=>({selectedIndex:b.selectedIndex}),[b.selectedIndex]),S=(0,d.E)(s||(()=>{})),A=(0,d.E)(b.tabs),C=(0,l.useMemo)(()=>({orientation:u,activation:p,...b}),[u,p,b]),M=(0,h.z)(t=>(P({type:1,tab:t}),()=>P({type:2,tab:t}))),V=(0,h.z)(t=>(P({type:3,panel:t}),()=>P({type:4,panel:t}))),R=(0,h.z)(t=>{k.current!==t&&S.current(t),f||P({type:0,index:t})}),k=(0,d.E)(f?t.selectedIndex:b.selectedIndex),L=(0,l.useMemo)(()=>({registerTab:M,registerPanel:V,change:R}),[]);return(0,c.e)(()=>{P({type:0,index:null!=o?o:i})},[o]),(0,c.e)(()=>{if(void 0===k.current||b.tabs.length<=0)return;let t=(0,y.z2)(b.tabs,t=>t.current);t.some((t,e)=>b.tabs[e]!==t)&&R(t.indexOf(b.tabs[k.current]))}),l.createElement(E,null,l.createElement(F.Provider,{value:L},l.createElement(D.Provider,{value:C},C.tabs.length<=0&&l.createElement(g,{onFocus:()=>{var t,e;for(let i of A.current)if((null==(t=i.current)?void 0:t.tabIndex)===0)return null==(e=i.current)||e.focus(),!0;return!1}}),(0,T.sY)({ourProps:{ref:x},theirProps:a,slot:w,defaultTag:"div",name:"Tabs"}))))}),U=(0,T.yV)(function(t,e){let{orientation:i,selectedIndex:n}=k("Tab.List"),r=(0,m.T)(e),s=(0,l.useMemo)(()=>({selectedIndex:n}),[n]);return(0,T.sY)({ourProps:{ref:r,role:"tablist","aria-orientation":i},theirProps:t,slot:s,defaultTag:"div",name:"Tabs.List"})}),N=(0,T.yV)(function(t,e){let{selectedIndex:i}=k("Tab.Panels"),n=(0,m.T)(e),r=(0,l.useMemo)(()=>({selectedIndex:i}),[i]);return(0,T.sY)({ourProps:{ref:n},theirProps:t,slot:r,defaultTag:"div",name:"Tabs.Panels"})}),z=(0,T.yV)(function(t,e){var i,n,r,s;let a=(0,l.useId)(),{id:u="headlessui-tabs-panel-".concat(a),tabIndex:h=0,...d}=t,{selectedIndex:p,tabs:f,panels:g}=k("Tab.Panel"),y=L("Tab.Panel"),x=(0,l.useRef)(null),b=(0,m.T)(x,e);(0,c.e)(()=>y.registerPanel(x),[y,x]);let P=S("panels"),w=g.indexOf(x);-1===w&&(w=P);let E=w===p,{isFocusVisible:A,focusProps:C}=(0,o.F)(),M=(0,l.useMemo)(()=>({selected:E,focus:A}),[E,A]),V=(0,T.dG)({ref:b,id:u,role:"tabpanel","aria-labelledby":null==(n=null==(i=f[w])?void 0:i.current)?void 0:n.id,tabIndex:E?h:-1},C);return E||null!=(r=d.unmount)&&!r||null!=(s=d.static)&&s?(0,T.sY)({ourProps:V,theirProps:d,slot:M,defaultTag:"div",features:I,visible:E,name:"Tabs.Panel"}):l.createElement(v._,{"aria-hidden":"true",...V})}),$=Object.assign(O,{Group:B,List:U,Panels:N,Panel:z})},86031:function(t,e,i){i.d(e,{t:function(){return s}});var n=i(7653),r=i(11513);function s(){let t=(0,n.useRef)(!1);return(0,r.e)(()=>(t.current=!0,()=>{t.current=!1}),[]),t}},37182:function(t,e,i){i.d(e,{Z:function(){return s}});var n=i(7653);let r=(0,n.createContext)(()=>{});function s(t){let{value:e,children:i}=t;return n.createElement(r.Provider,{value:e},i)}}}]);