(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,74829,e=>{"use strict";e.i(47167);var t=e.i(43476),n=e.i(71645),r=e.i(97944),o=e.i(82535),i=e.i(56198),s=e.i(9480),l=e.i(597),u=n,a=e.i(97679);function c(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class f extends u.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,l.isHTMLElement)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=(0,l.isHTMLElement)(e)&&e.offsetWidth||0,r=(0,l.isHTMLElement)(e)&&e.offsetHeight||0,o=getComputedStyle(t),i=this.props.sizeRef.current;i.height=parseFloat(o.height),i.width=parseFloat(o.width),i.top=t.offsetTop,i.left=t.offsetLeft,i.right=n-i.width-i.left,i.bottom=r-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function h({children:e,isPresent:r,anchorX:o,anchorY:i,root:s,pop:l}){let h=(0,u.useId)(),p=(0,u.useRef)(null),d=(0,u.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:m}=(0,u.useContext)(a.MotionConfigContext),g=function(...e){return n.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=c(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t{let{width:e,height:t,top:n,left:u,right:a,bottom:c}=d.current;if(r||!1===l||!p.current||!e||!t)return;let f="left"===o?`left: ${u}`:`right: ${a}`,g="bottom"===i?`bottom: ${c}`:`top: ${n}`;p.current.dataset.motionPopId=h;let E=document.createElement("style");m&&(E.nonce=m);let C=s??document.head;return C.appendChild(E),E.sheet&&E.sheet.insertRule(` [data-motion-pop-id="${h}"] { position: absolute !important; width: ${e}px !important; height: ${t}px !important; ${f}px !important; ${g}px !important; } `),()=>{p.current?.removeAttribute("data-motion-pop-id"),C.contains(E)&&C.removeChild(E)}},[r]),(0,t.jsx)(f,{isPresent:r,childRef:p,sizeRef:d,pop:l,children:!1===l?e:u.cloneElement(e,{ref:g})})}let p=({children:e,initial:r,isPresent:i,onExitComplete:l,custom:u,presenceAffectsLayout:a,mode:c,anchorX:f,anchorY:p,root:m})=>{let g=(0,o.useConstant)(d),E=(0,n.useId)(),C=!0,v=(0,n.useMemo)(()=>(C=!1,{id:E,initial:r,isPresent:i,custom:u,onExitComplete:e=>{for(let t of(g.set(e,!0),g.values()))if(!t)return;l&&l()},register:e=>(g.set(e,!1),()=>g.delete(e))}),[i,g,l]);return a&&C&&(v={...v}),(0,n.useMemo)(()=>{g.forEach((e,t)=>g.set(t,!1))},[i]),n.useEffect(()=>{i||g.size||!l||l()},[i]),e=(0,t.jsx)(h,{pop:"popLayout"===c,isPresent:i,anchorX:f,anchorY:p,root:m,children:e}),(0,t.jsx)(s.PresenceContext.Provider,{value:v,children:e})};function d(){return new Map}var m=e.i(81650);let g=e=>e.key||"";function E(e){let t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}let C=({children:e,custom:s,initial:l=!0,onExitComplete:u,presenceAffectsLayout:a=!0,mode:c="sync",propagate:f=!1,anchorX:h="left",anchorY:d="top",root:C})=>{let[v,y]=(0,m.usePresence)(f),x=(0,n.useMemo)(()=>E(e),[e]),b=f&&!v?[]:x.map(g),P=(0,n.useRef)(!0),w=(0,n.useRef)(x),R=(0,o.useConstant)(()=>new Map),T=(0,n.useRef)(new Set),[L,M]=(0,n.useState)(x),[$,A]=(0,n.useState)(x);(0,i.useIsomorphicLayoutEffect)(()=>{P.current=!1,w.current=x;for(let e=0;e<$.length;e++){let t=g($[e]);b.includes(t)?(R.delete(t),T.current.delete(t)):!0!==R.get(t)&&R.set(t,!1)}},[$,b.length,b.join("-")]);let j=[];if(x!==L){let e=[...x];for(let t=0;t<$.length;t++){let n=$[t],r=g(n);b.includes(r)||(e.splice(t,0,n),j.push(n))}return"wait"===c&&j.length&&(e=j),A(E(e)),M(x),null}let{forceRender:S}=(0,n.useContext)(r.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:$.map(e=>{let n=g(e),r=(!f||!!v)&&(x===$||b.includes(n));return(0,t.jsx)(p,{isPresent:r,initial:(!P.current||!!l)&&void 0,custom:s,presenceAffectsLayout:a,mode:c,root:C,onExitComplete:r?void 0:()=>{if(T.current.has(n)||!R.has(n))return;T.current.add(n),R.set(n,!0);let e=!0;R.forEach(t=>{t||(e=!1)}),e&&(S?.(),A(w.current),f&&y?.(),u&&u())},anchorX:h,anchorY:d,children:e},n)})})};e.s(["AnimatePresence",()=>C],74829)},91407,e=>{"use strict";var t=e.i(82535),n=e.i(56198),r=e.i(56299),o=e.i(24944),i=e.i(43461);function s(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&(0,o.setTarget)(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{s(e,t)})})}function l(){let e=!1,t=new Set,n={subscribe:e=>(t.add(e),()=>void t.delete(e)),start(n,o){(0,i.invariant)(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let s=[];return t.forEach(e=>{s.push((0,r.animateVisualElement)(e,n,{transitionOverride:o}))}),Promise.all(s)},set:n=>((0,i.invariant)(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(e=>{var t,r;t=e,Array.isArray(r=n)?s(t,r):"string"==typeof r?s(t,[r]):(0,o.setTarget)(t,r)})),stop(){t.forEach(e=>{e.values.forEach(e=>e.stop())})},mount:()=>(e=!0,()=>{e=!1,n.stop()})};return n}let u=function(){let e=(0,t.useConstant)(l);return(0,n.useIsomorphicLayoutEffect)(e.mount,[]),e};e.s(["useAnimation",()=>u],91407)}]);