1import{On as e,ct as t,et as n,ft as r,g as i,k as a,mt as o,qt as s,v as c,wt as l,xt as u}from"./Ib1jYPSS.js";import{n as d,r as f}from"./CLlOHeIq.js";import{a as p,o as m,r as h,s as g,x as _}from"./CHbKfWZs2.js";var v=0;function y(e){let t=new WeakMap,n=g();function r(r){if(e.mode!==`popLayout`)return;let i=r.offsetParent,a=i instanceof HTMLElement&&i.offsetWidth||0,o={height:r.offsetHeight||0,width:r.offsetWidth||0,top:r.offsetTop,left:r.offsetLeft,right:0};o.right=a-o.width-o.left;let s=e.anchorX===`left`?`left: ${o.left}px`:`right: ${o.right}px`,c=`pop-${v++}`;r.dataset.motionPopId=c;let l=document.createElement(`style`);n.value.nonce&&(l.nonce=n.value.nonce),t.set(r,l),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` 2 [data-motion-pop-id="${c}"] { 3 position: absolute !important; 4 width: ${o.width}px !important; 5 height: ${o.height}px !important; 6 top: ${o.top}px !important; 7 ${s} !important; 8 } 9 `)}function i(e){let n=t.get(e);n&&(t.delete(e),_.render(()=>{document.head.removeChild(n)}))}return{addPopStyle:r,removePopStyle:i}}var b=0;function x(e){let n=String(b++),i=new Map,{addPopStyle:a,removePopStyle:o}=y(e);function s(e){let t=[],r=p.get(e);r&&e.getAttribute(m.motionAttribute)===n&&t.push(r);let i=Array.from(e.querySelectorAll(`[${m.motionAttribute}="${n}"]`));for(let e of i){let n=p.get(e);n&&t.push(n)}return t}function c(e,t){let n=i.get(e);n&&(n.remaining.delete(t),n.remaining.size===0&&u(n))}let l={initial:e.initial,custom:e.custom,presenceId:n,onMotionExitComplete:c};h(l),t(()=>{l.initial=void 0});function u(t){o(t.el),t.states.forEach(e=>{e.getSnapshot(e.options,!1)}),t.done(),i.delete(t.el),t.el?.isConnected?t.states[0]?.didUpdate():t.states.forEach(e=>{e.unmount()}),e.onExitComplete?.()}function d(e,t){s(e).forEach(e=>{e.setActive(`exit`,!1),e.getSnapshot(e.options,!0)}),t()}function f(t,n){l.custom=e.custom;let r=t,o=s(r);if(o.length===0){n(),e.onExitComplete?.();return}let c={remaining:new Set(o),states:o,done:n,el:r};i.set(r,c),a(r),o.forEach(e=>{e.presenceContainer=r,e.setActive(`exit`,!0),e.getSnapshot(e.options,!1)}),o[0]?.didUpdate()}return r(()=>{i.forEach(e=>{e.states.forEach(e=>{e.unmount()})}),i.clear()}),{enter:d,exit:f}}var S=a({name:`AnimatePresence`,inheritAttrs:!0,__name:`AnimatePresence`,props:{mode:{default:`sync`},initial:{type:Boolean,default:!0},as:{},custom:{},onExitComplete:{},anchorX:{default:`left`}},setup(t){let r=t,{enter:a,exit:p}=x(r),m=i(()=>r.mode===`wait`?{mode:r.mode===`wait`?`out-in`:void 0}:{tag:r.as});return(t,r)=>(o(),c(l(t.mode===`wait`?d:f),n(m.value,{appear:``,css:!1,onLeave:e(p),onEnter:e(a)}),{default:s(()=>[u(t.$slots,`default`)]),_:3},16,[`onLeave`,`onEnter`]))}});export{S as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.