1import{u as d}from"./chunk-4N6VE7H7-CuSen5_J.js";import{r as K}from"./index-BhBNjC-2.js";function Pt(t){return t==null?[]:Array.isArray(t)?t:[t]}var Re=t=>t[0],be=t=>t[t.length-1];function ht(t,e,n={}){const{step:r=1,loop:o=!0}=n,s=e+r,u=t.length,a=u-1;return e===-1?r>0?0:a:s<0?o?a:0:s>=u?o?0:e>u?u:e:s}function Ne(t,e,n={}){return t[ht(t,e,n)]}function Ot(t,e,n={}){const{step:r=1,loop:o=!0}=n;return ht(t,e,{step:-r,loop:o})}function Ce(t,e,n={}){return t[Ot(t,e,n)]}var _t=t=>t!=null&&typeof t=="object",W=t=>typeof t=="string",T=t=>typeof t=="function",$e=t=>t==null,yt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Tt=t=>Object.prototype.toString.call(t),Et=Function.prototype.toString,It=Et.call(Object),kt=t=>{if(!_t(t)||Tt(t)!="[object Object]"||Vt(t))return!1;const e=Object.getPrototypeOf(t);if(e===null)return!0;const n=yt(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Et.call(n)==It},Mt=t=>typeof t=="object"&&t!==null&&"$$typeof"in t&&"props"in t,Dt=t=>typeof t=="object"&&t!==null&&"__v_isVNode"in t,Vt=t=>Mt(t)||Dt(t),je=(t,...e)=>(typeof t=="function"?t(...e):t)??void 0,Ae=t=>t,Wt=t=>t(),Pe=()=>{},Lt=(...t)=>(...e)=>{t.forEach(function(n){n==null||n(...e)})},Oe=(()=>{let t=0;return()=>(t++,t.toString(36))})();function mt(t){if(!kt(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(r=>typeof r=="string"),n={};for(const r of e){const o=t[r];o!==void 0&&(n[r]=mt(o))}return n}function it(...t){t.length===1?t[0]:t[1],t.length===2&&t[0]}function ct(...t){t.length===1?t[0]:t[1],t.length===2&&t[0]}function X(t,e){if(t==null)throw new Error(e())}function _e(t,e,n){let r=[];for(const o of e)t[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}function zt(t,e){return`${t} returned \`undefined\`. Seems you forgot to wrap component within ${e}`}function St(t={}){const{name:e,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:s,defaultValue:u}=t,a=d.createContext(u);a.displayName=e;function f(){const p=d.useContext(a);if(!p&&n){const S=new Error(s??zt(r,o));throw S.name="ContextError",yt(Error,"captureStackTrace")&&T(Error.captureStackTrace)&&Error.captureStackTrace(S,f),S}return p}return[a.Provider,f,a]}var[Te,Ie]=St({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}});function Ft(...t){return e=>{const n=[];for(const r of t)if(typeof r=="function"){const o=r(e);typeof o=="function"&&n.push(o)}else r&&(r.current=e);if(n.length)return()=>{for(const r of n)r()}}}var Bt=(...t)=>t.map(e=>{var n;return(n=e==null?void 0:e.trim)==null?void 0:n.call(e)}).filter(Boolean).join(" "),Gt=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,ft=t=>{const e={};let n;for(;n=Gt.exec(t);)e[n[1]]=n[2];return e},qt=(t,e)=>{if(W(t)){if(W(e))return`${t};${e}`;t=ft(t)}else W(e)&&(e=ft(e));return Object.assign({},t??{},e??{})};function Ut(...t){let e={};for(let n of t){if(!n)continue;for(let o in e){if(o.startsWith("on")&&typeof e[o]=="function"&&typeof n[o]=="function"){e[o]=Lt(n[o],e[o]);continue}if(o==="className"||o==="class"){e[o]=Bt(e[o],n[o]);continue}if(o==="style"){e[o]=qt(e[o],n[o]);continue}e[o]=n[o]!==void 0?n[o]:e[o]}for(let o in n)e[o]===void 0&&(e[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)e[o]=n[o]}return e}var C=".",wt="#",lt=new WeakMap,xt=new WeakMap;function q(t){return t.join(C)}function Kt(t){return t.includes(C)}function Rt(t){return t.startsWith(wt)}function Xt(t){return t.startsWith(C)}function Zt(t){return Rt(t)?t.slice(wt.length):t}function U(t,e){return t?`${t}${C}${e}`:e}function Ht(t){const e=new Map,n=new Map,r=(o,s)=>{e.set(o,s);const u=s.id;u&&(n.has(u)&&ct(`[zag-js] Duplicate state id: "${u}"`),n.set(u,o));const a=s.states;if(a){X(s.initial,()=>`[zag-js] Compound state "${o}" has child states but no "initial" property`),s.initial in a||ct(`[zag-js] Compound state "${o}" has initial "${String(s.initial)}" which is not a child state`);for(const[f,p]of Object.entries(a)){if(!p)continue;const S=U(o,f);r(S,p)}}};for(const[o,s]of Object.entries(t.states))s&&r(o,s);return{index:e,idIndex:n}}function M(t){const e=lt.get(t);if(e)return e;const{index:n,idIndex:r}=Ht(t);return lt.set(t,n),xt.set(t,r),n}function Jt(t,e){var n;return M(t),(n=xt.get(t))==null?void 0:n.get(e)}
1function Z(t){return t?String(t).split(C).filter(Boolean):[]}function L(t,e){if(!e)return[];const n=M(t),r=Z(e),o=[],s=[];for(const u of r){s.push(u);const a=q(s),f=n.get(a);if(!f)break;o.push({path:a,state:f})}return o}function I(t,e){const n=M(t),r=Z(e);if(!r.length)return e;const o=[];for(const a of r){o.push(a);const f=q(o);if(!n.has(f))return e}let s=q(o),u=n.get(s);for(;u!=null&&u.initial;){const a=`${s}${C}${u.initial}`,f=n.get(a);if(!f)break;s=a,u=f}return s}function dt(t,e){return M(t).has(e)}function gt(t,e,n){const r=String(e);if(Rt(r)){const o=Zt(r),s=Jt(t,o);return X(s,()=>`[zag-js] Unknown state id: "${o}"`),I(t,s)}if(Xt(r)&&n){const o=U(n,r.slice(1));return I(t,o)}if(!Kt(r)&&n){const o=Z(n);for(let s=o.length-1;s>=1;s--){const u=o.slice(0,s).join(C),a=U(u,r);if(dt(t,a))return I(t,a)}if(dt(t,r))return I(t,r)}return I(t,r)}function Qt(t,e,n){var s,u;const r=L(t,e);for(let a=r.length-1;a>=0;a--){const f=(s=r[a])==null?void 0:s.state.on,p=f==null?void 0:f[n];if(p)return{transitions:p,source:(u=r[a])==null?void 0:u.path}}const o=t.on;return{transitions:o==null?void 0:o[n],source:void 0}}function Yt(t,e,n,r){var S,m,h,y;const o=e?L(t,e):[],s=L(t,n);let u=0;for(;u<o.length&&u<s.length&&((S=o[u])==null?void 0:S.path)===((m=s[u])==null?void 0:m.path);)u+=1;let a=o.slice(u).reverse(),f=s.slice(u);const p=((h=o.at(-1))==null?void 0:h.path)===((y=s.at(-1))==null?void 0:y.path);return r&&p&&(a=o.slice().reverse(),f=s),{exiting:a,entering:f}}function te(t,e){return t?t===e||t.startsWith(`${e}${C}`):!1}function ee(t,e,n){return L(t,e).some(r=>{var o;return(o=r.state.tags)==null?void 0:o.includes(n)})}function ne(){return{and:(...t)=>function(n){return t.every(r=>n.guard(r))},or:(...t)=>function(n){return t.some(r=>n.guard(r))},not:t=>function(n){return!n.guard(t)}}}function re(t){return M(t),t}function ke(){return{guards:ne(),createMachine:t=>re(t),choose:t=>function({choose:n}){var r;return(r=n(t))==null?void 0:r.actions}}}var A=(t=>(t.NotStarted="Not Started",t.Started="Started",t.Stopped="Stopped",t))(A||{}),B="__init__",Me=(t,e)=>t.map((n,r)=>t[(Math.max(e,0)+r)%t.length]),De=()=>{},F=t=>typeof t=="object"&&t!==null,Ve=2147483647,We=t=>t?"":void 0,Le=t=>t?"true":void 0,oe=1,se=9,ue=11,P=t=>F(t)&&t.nodeType===oe&&typeof t.nodeName=="string",H=t=>F(t)&&t.nodeType===se,ae=t=>F(t)&&t===t.window,bt=t=>P(t)?t.localName||"":"#document";function ze(t){return["html","body","#document"].includes(bt(t))}var Nt=t=>F(t)&&t.nodeType!==void 0,k=t=>Nt(t)&&t.nodeType===ue&&"host"in t,ie=t=>P(t)&&t.localName==="input",Fe=t=>!!(t!=null&&t.matches("a[href]")),Be=t=>P(t)?t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0:!1;function ce(t){if(!t)return!1;const e=t.getRootNode();return $t(e)===t}var fe=/(textarea|select)/;function Ge(t){if(t==null||!P(t))return!1;try{return ie(t)&&t.selectionStart!=null||fe.test(t.localName)||t.isContentEditable||t.getAttribute("contenteditable")==="true"||t.getAttribute("contenteditable")===""}catch{return!1}}function qe(t,e){var r;if(!t||!e||!P(t)||!Nt(e))return!1;if(P(e)&&t===e||t.contains(e))return!0;const n=(r=e.getRootNode)==null?void 0:r.call(e);if(n&&k(n)){let o=e;for(;o;){if(t===o)return!0;o=o.parentNode||o.host}}return!1}function Ct(t){return H(t)?t:ae(t)?t.document:(t==null?void 0:t.ownerDocument)??document}function le(t){return Ct(t).documentElement}function de(t){var e;return k(t)?de(t.host):H(t)?t.defaultView??window:P(t)?((e=t.ownerDocument)==null?void 0:e.defaultView)??window:window}function $t(t){let e=t.activeElement;for(;e!=null&&e.shadowRoot;){const n=e.shadowRoot.activeElement;if(!n||n===e)break;e=n}return e}function Ue(t){if(bt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||k(t)&&t.host||le(t);return k(e)?e.host:e}function Ke(t){let e;try{if(e=t.getRootNode({composed:!0}),H(e)||k(e))return e}catch{}return t.ownerDocument??document}function ge(t){const e=()=>{var u;return((u=t.getRootNode)==null?void 0:u.call(t))??document},n=()=>Ct(e());return{...t,getRootNode:e,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>$t(e()),isActiveElement:ce,getById:u=>e().getElementById(u)}}function pe(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.
1isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var G=t=>{const e=d.memo(d.forwardRef((n,r)=>{const{asChild:o,children:s,...u}=n;if(!o)return d.createElement(t,{...u,ref:r},s);if(!d.isValidElement(s))return null;const a=d.Children.only(s),f=pe(a);return d.cloneElement(a,{...Ut(u,a.props),ref:r?Ft(r,f):f})}));return e.displayName=t.displayName||t.name,e},ve=()=>{const t=new Map;return new Proxy(G,{apply(e,n,r){return G(r[0])},get(e,n){const r=n;return t.has(r)||t.set(r,G(r)),t.get(r)}})},Xe=ve(),[Ze,He]=St({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),pt=Object.defineProperty,Je=(t,e)=>{let n={};for(var r in t)pt(n,r,{get:t[r],enumerable:!0});return pt(n,Symbol.toStringTag,{value:"Module"}),n},jt=typeof globalThis.document<"u"?d.useLayoutEffect:d.useEffect;function z(t){const e=t().value??t().defaultValue,n=t().isEqual??Object.is,[r]=d.useState(e),[o,s]=d.useState(r),u=t().value!==void 0,a=d.useRef(o);a.current=u?t().value:o;const f=d.useRef(a.current);jt(()=>{f.current=a.current},[o,t().value]);const p=m=>{var b,$;const h=f.current,y=T(m)?m(h):m;t().debug&&console.log(`[bindable > ${t().debug}] setValue`,{next:y,prev:h}),u||s(y),n(y,h)||($=(b=t()).onChange)==null||$.call(b,y,h)};function S(){return u?t().value:o}return{initial:r,ref:a,get:S,set(m){(t().sync?K.flushSync:Wt)(()=>p(m))},invoke(m,h){var y,b;(b=(y=t()).onChange)==null||b.call(y,m,h)},hash(m){var h,y;return((y=(h=t()).hash)==null?void 0:y.call(h,m))??String(m)}}}z.cleanup=t=>{d.useEffect(()=>t,[])};z.ref=t=>{const e=d.useRef(t);return{get:()=>e.current,set:n=>{e.current=n}}};function he(t){const e=d.useRef(t);return{get(n){return e.current[n]},set(n,r){e.current[n]=r}}}var ye=(t,e)=>{const n=d.useRef(!1),r=d.useRef(!1);d.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},[...(t??[]).map(o=>typeof o=="function"?o():o)]),d.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Qe(t,e={}){var rt,ot,st,ut;const n=d.useMemo(()=>{const{id:c,ids:i,getRootNode:l}=e;return ge({id:c,ids:i,getRootNode:l})},[e]),r=(...c)=>{t.debug&&console.log(...c)},o=((rt=t.props)==null?void 0:rt.call(t,{props:mt(e),scope:n}))??e,s=Ee(o),u=(ot=t.context)==null?void 0:ot.call(t,{prop:s,bindable:z,scope:n,flush:vt,getContext(){return f},getComputed(){return D},getRefs(){return $},getEvent(){return y()}}),a=At(u),f={get(c){var i;return(i=a.current)==null?void 0:i[c].ref.current},set(c,i){var l;(l=a.current)==null||l[c].set(i)},initial(c){var i;return(i=a.current)==null?void 0:i[c].initial},hash(c){var l,E;const i=(l=a.current)==null?void 0:l[c].get();return(E=a.current)==null?void 0:E[c].hash(i)}},p=d.useRef(new Map),S=d.useRef(null),m=d.useRef(null),h=d.useRef({type:""}),y=()=>({...h.current,current(){return h.current},previous(){return m.current}}),b=()=>({...R,matches(...c){return c.some(i=>te(R.ref.current,i))},hasTag(c){return ee(t,R.ref.current,c)}}),$=he(((st=t.refs)==null?void 0:st.call(t,{prop:s,context:f}))??{}),N=()=>({state:b(),context:f,event:y(),prop:s,send:nt,action:j,guard:J,track:ye,refs:$,computed:D,flush:vt,scope:n,choose:Y}),j=c=>{const i=T(c)?c(N()):c;if(!i)return;const l=i.map(E=>{var x,v;const g=(v=(x=t.implementations)==null?void 0:x.actions)==null?void 0:v[E];return g||it(`[zag-js] No implementation found for action "${JSON.stringify(E)}"`),g});for(const E of l)E==null||E(N())},J=c=>{var i,l;return T(c)?c(N()):(l=(i=t.implementations)==null?void 0:i.guards)==null?void 0:l[c](N())},Q=c=>{const i=T(c)?c(N()):c;if(!i)return;const l=i.map(g=>{var v,w;const x=(w=(v=t.implementations)==null?void 0:v.effects)==null?void 0:w[g];return x||it(`[zag-js] No implementation found for effect "${JSON.stringify(g)}"`),x}),E=[];for(const g of l){const x=g==null?void 0:g(N());x&&E.push(x)}return()=>E.forEach(g=>g==null?void 0:g())},Y=c=>Pt(c).find(i=>{let l=!i.guard;return W(i.guard)?l=!!J(i.guard):T(i.guard)&&(l=i.guard(N())),l}),D=c=>{X(t.computed,()=>"[zag-js] No computed object found on machine");const i=t.computed[c];return i({context:f,event:y(),prop:s,refs:$,scope:n,computed:D})},R=z(()=>({defaultValue:gt(t,t.initialState({prop:s})),onChange(c,i){var g,x;const{exiting:l,entering:E}=Yt(t,i,c,(g=S.current)==null?void 0:g.reenter);if(l.forEach(v=>{const w=p.current.get(v.path);w==null||w(),p.current.delete(v.path)}),l.forEach(v=>{var w;j((w=v.state)==null?void 0:w.exit)}
1),j((x=S.current)==null?void 0:x.actions),E.forEach(v=>{var at;const w=Q((at=v.state)==null?void 0:at.effects);w&&p.current.set(v.path,w)}),i===B){j(t.entry);const v=Q(t.effects);v&&p.current.set(B,v)}E.forEach(v=>{var w;j((w=v.state)==null?void 0:w.entry)})}})),tt=d.useRef(void 0),O=d.useRef(A.NotStarted);jt(()=>{queueMicrotask(()=>{const i=O.current===A.Started;O.current=A.Started,r(i?"rehydrating...":"initializing...");const l=tt.current??R.initial;R.invoke(l,i?R.get():B)});const c=p.current;return()=>{const i=et();r("unmounting..."),tt.current=i,O.current=A.Stopped,c.forEach(l=>l==null?void 0:l()),p.current=new Map,S.current=null,queueMicrotask(()=>{j(t.exit),O.current=A.Stopped})}},[]);const et=()=>"ref"in R?R.ref.current:R.get(),nt=c=>{queueMicrotask(()=>{if(O.current!==A.Started)return;m.current=h.current,h.current=c;let i=et();const{transitions:l,source:E}=Qt(t,i,c.type),g=Y(l);if(!g)return;S.current=g;const x=gt(t,g.target??i,E);r("transition",c.type,g.target||i,`(${g.actions})`),x!==i?K.flushSync(()=>R.set(x)):g.reenter?R.invoke(i,i):j(g.actions??[])})};return(ut=t.watch)==null||ut.call(t,N()),{state:b(),send:nt,context:f,prop:s,scope:n,refs:$,computed:D,event:y(),getStatus:()=>O.current}}function At(t){const e=d.useRef(t);return e.current=t,e}function Ee(t){const e=At(t);return function(r){return e.current[r]}}function vt(t){queueMicrotask(()=>{K.flushSync(()=>t())})}function me(t){return new Proxy({},{get(e,n){return n==="style"?r=>t({style:r}).style:t}})}var Ye=me(t=>t),V=(t,e=[])=>({parts:(...n)=>{if(Se(e))return V(t,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>V(t,[...e,...n]),omit:(...n)=>V(t,e.filter(r=>!n.includes(r))),rename:n=>V(n,e),keys:()=>e,build:()=>[...new Set(e)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${_(t)}"][data-part="${_(r)}"]`,`& [data-scope="${_(t)}"][data-part="${_(r)}"]`].join(", "),attrs:{"data-scope":_(t),"data-part":_(r)}}}),{})}),_=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Se=t=>t.length===0;export{P as A,ie as B,$e as C,ze as D,k as E,be as F,Ut as G,Ne as H,Pe as I,De as J,Ye as K,Ce as L,Ve as M,je as N,ke as O,Ie as P,He as Q,Qe as R,Oe as S,it as T,Me as U,Je as _,Le as a,Xe as b,Lt as c,Ae as d,mt as e,Ft as f,qe as g,V as h,St as i,ne as j,re as k,We as l,_e as m,Re as n,$t as o,Ct as p,Ue as q,Ke as r,de as s,yt as t,ce as u,Fe as v,H as w,Ge as x,Be as y,T as z};
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.