@lockerverse/react 0.2.251-dev.1 → 0.2.252

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{a as So,c as tn,e as Dt,f as Lr,g as Mr,h as at,i as Fr,j as Ft}from"./chunk-NI5BJ3EM.js";import{a as nn,b as Hr,l as Vr,m as Ur,n as Wr}from"./chunk-76ZR5YKJ.js";import{L as Br,a as N,b as ht,c as wr,d as Pr,e as Nt,f as Dn,g as Ar,h as Co,i as Or,j as Ir,l as Nr,m as Dr,n as _n,p as Ln,q as _r,r as ge,s as et,t as _t,u as Fe,v as Lt,x as Mt}from"./chunk-QTLPHZRX.js";import{a as Nn,b as gt,c as C}from"./chunk-DCANE7XH.js";var rs=Nn(os=>{"use strict";var Kt=N();function Su(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cu=typeof Object.is=="function"?Object.is:Su,Tu=Kt.useState,ku=Kt.useEffect,wu=Kt.useLayoutEffect,Pu=Kt.useDebugValue;function Au(e,t){var n=t(),o=Tu({inst:{value:n,getSnapshot:t}}),r=o[0].inst,i=o[1];return wu(function(){r.value=n,r.getSnapshot=t,cr(r)&&i({inst:r})},[e,n,t]),ku(function(){return cr(r)&&i({inst:r}),e(function(){cr(r)&&i({inst:r})})},[e]),Pu(n),n}function cr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cu(e,n)}catch{return!0}}function Ou(e,t){return t()}var Iu=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ou:Au;os.useSyncExternalStore=Kt.useSyncExternalStore!==void 0?Kt.useSyncExternalStore:Iu});var ar=Nn((Jm,is)=>{"use strict";is.exports=rs()});var cs=Nn(ss=>{"use strict";var oo=N(),Nu=ar();function Du(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _u=typeof Object.is=="function"?Object.is:Du,Lu=Nu.useSyncExternalStore,Mu=oo.useRef,Fu=oo.useEffect,Bu=oo.useMemo,Hu=oo.useDebugValue;ss.useSyncExternalStoreWithSelector=function(e,t,n,o,r){var i=Mu(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Bu(function(){function u(p){if(!c){if(c=!0,l=p,p=o(p),r!==void 0&&s.hasValue){var d=s.value;if(r(d,p))return f=d}return f=p}if(d=f,_u(l,p))return d;var h=o(p);return r!==void 0&&r(d,h)?(l=p,d):(l=p,f=h)}var c=!1,l,f,m=n===void 0?null:n;return[function(){return u(t())},m===null?void 0:function(){return u(m())}]},[t,n,o,r]);var a=Lu(e,i[0],i[1]);return Fu(function(){s.hasValue=!0,s.value=a},[a]),Hu(a),a}});var us=Nn((Zm,as)=>{"use strict";as.exports=cs()});var Ae=C(N(),1);var ho=C(N(),1);var st={};gt(st,{Backdrop:()=>si,Close:()=>pi,Description:()=>yi,Handle:()=>Sn,Popup:()=>Vs,Portal:()=>Ys,Root:()=>nc,Title:()=>sc,Trigger:()=>uc,Viewport:()=>rc,createHandle:()=>lc});var ii=C(N(),1);function Bc(e,t){return function(o,...r){let i=new URL(e);return i.searchParams.set("code",o.toString()),r.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${o}; visit ${i} for the full message.`}}var Hc=Bc("https://base-ui.com/production-error","Base UI"),ze=Hc;var on=C(N(),1),Mn=on.createContext(!1),To=on.createContext(void 0);function Ie(e){let t=on.useContext(To);if(e===!1&&t===void 0)throw new Error(ze(27));return t}var yt=C(N(),1);var zr=C(N(),1),$r={};function Xe(e,t){let n=zr.useRef($r);return n.current===$r&&(n.current=e(t)),n}function Bt(e,t,n,o){let r=Xe(Yr).current;return Vc(r,e,t,n,o)&&Gr(r,[e,t,n,o]),r.callback}function jr(e){let t=Xe(Yr).current;return Uc(t,e)&&Gr(t,e),t.callback}function Yr(){return{callback:null,cleanup:null,refs:[]}}function Vc(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function Uc(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function Gr(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){let o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){let i=t[r];if(i!=null)switch(typeof i){case"function":{let s=i(n);typeof s=="function"&&(o[r]=s);break}case"object":{i.current=n;break}default:}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){let i=t[r];if(i!=null)switch(typeof i){case"function":{let s=o[r];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var qr=C(N(),1);var Kr=C(N(),1),Wc=parseInt(Kr.version,10);function Ht(e){return Wc>=e}function ko(e){if(!qr.isValidElement(e))return null;let t=e,n=t.props;return(Ht(19)?n?.ref:t.ref)??null}function rn(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Vt(){}var wf=Object.freeze([]),he=Object.freeze({});function Xr(e,t){let n={};for(let o in e){let r=e[o];if(t?.hasOwnProperty(o)){let i=t[o](r);i!=null&&Object.assign(n,i);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function Jr(e,t){return typeof e=="function"?e(t):e}function Qr(e,t){return typeof e=="function"?e(t):e}var wo={};function cn(e,t,n,o,r){if(!n&&!o&&!r&&!e)return Fn(t);let i=Fn(e);return t&&(i=sn(i,t)),n&&(i=sn(i,n)),o&&(i=sn(i,o)),r&&(i=sn(i,r)),i}function Zr(e){if(e.length===0)return wo;if(e.length===1)return Fn(e[0]);let t=Fn(e[0]);for(let n=1;n<e.length;n+=1)t=sn(t,e[n]);return t}function Fn(e){return Po(e)?{...ti(e,wo)}:$c(e)}function sn(e,t){return Po(t)?ti(t,e):zc(e,t)}function $c(e){let t={...e};for(let n in t){let o=t[n];ei(n,o)&&(t[n]=ni(o))}return t}function zc(e,t){if(!t)return e;for(let n in t){let o=t[n];switch(n){case"style":{e[n]=rn(e.style,o);break}case"className":{e[n]=Ao(e.className,o);break}default:ei(n,o)?e[n]=jc(e[n],o):e[n]=o}}return e}function ei(e,t){let n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Po(e){return typeof e=="function"}function ti(e,t){return Po(e)?e(t):e??wo}function jc(e,t){return t?e?(...n)=>{let o=n[0];if(oi(o)){let i=o;an(i);let s=t(...n);return i.baseUIHandlerPrevented||e?.(...n),s}let r=t(...n);return e?.(...n),r}:ni(t):e}function ni(e){return e&&((...t)=>{let n=t[0];return oi(n)&&an(n),e(...t)})}function an(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ao(e,t){return t?e?t+" "+e:t:e}function oi(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Oo=C(N(),1);function _e(e,t,n={}){let o=t.render,r=Yc(t,n);if(n.enabled===!1)return null;let i=n.state??he;return qc(e,o,r,i)}function Yc(e,t={}){let{className:n,style:o,render:r}=e,{state:i=he,ref:s,props:a,stateAttributesMapping:u,enabled:c=!0}=t,l=c?Jr(n,i):void 0,f=c?Qr(o,i):void 0,m=c?Xr(i,u):he,p=c&&a?Gc(a):void 0,d=c?rn(m,p)??{}:he;return typeof document<"u"&&(c?Array.isArray(s)?d.ref=jr([d.ref,ko(r),...s]):d.ref=Bt(d.ref,ko(r),s):Bt(null,null)),c?(l!==void 0&&(d.className=Ao(d.className,l)),f!==void 0&&(d.style=rn(d.style,f)),d):he}function Gc(e){return Array.isArray(e)?Zr(e):cn(void 0,e)}var Kc=Symbol.for("react.lazy");function qc(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);let r=cn(n,t.props);r.ref=n.ref;let i=t;return i?.$$typeof===Kc&&(i=yt.Children.toArray(t)[0]),yt.cloneElement(i,r)}if(e&&typeof e=="string")return Xc(e,n);throw new Error(ze(8))}function Xc(e,t){return e==="button"?(0,Oo.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,Oo.createElement)("img",{alt:"",...t,key:t.key}):yt.createElement(e,t)}var bt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),Jc={[bt.startingStyle]:""},Qc={[bt.endingStyle]:""},Ut={transitionStatus(e){return e==="starting"?Jc:e==="ending"?Qc:null}};var We=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=bt.startingStyle]="startingStyle",e[e.endingStyle=bt.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Io=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),Zc={[Io.popupOpen]:""},Yf={[Io.popupOpen]:"",[Io.pressed]:""},ea={[We.open]:""},ta={[We.closed]:""},na={[We.anchorHidden]:""},ri={open(e){return e?Zc:null}};var Wt={open(e){return e?ea:ta},anchorHidden(e){return e?na:null}};var oa={...Wt,...Ut},si=ii.forwardRef(function(t,n){let{render:o,className:r,style:i,forceRender:s=!1,...a}=t,{store:u}=Ie(),c=u.useState("open"),l=u.useState("nested"),f=u.useState("mounted"),m=u.useState("transitionStatus");return _e("div",t,{state:{open:c,transitionStatus:m},ref:[u.context.backdropRef,n],stateAttributesMapping:oa,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:s||!l})});var di=C(N(),1);var $t=C(N(),1);function Bn(){return typeof window<"u"}function Le(e){return Hn(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ra(e){var t;return(t=(Hn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hn(e){return Bn()?e instanceof Node||e instanceof je(e).Node:!1}function ut(e){return Bn()?e instanceof Element||e instanceof je(e).Element:!1}function Ne(e){return Bn()?e instanceof HTMLElement||e instanceof je(e).HTMLElement:!1}function tt(e){return!Bn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof je(e).ShadowRoot}function Vn(e){let{overflow:t,overflowX:n,overflowY:o,display:r}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Un(e){return/^(html|body|#document)$/.test(Le(e))}function Et(e){return je(e).getComputedStyle(e)}function ci(e){if(Le(e)==="html")return e;let t=e.assignedSlot||e.parentNode||tt(e)&&e.host||ra(e);return tt(t)?t.host:t}var ia=C(N(),1),un={...ia};var No=un.useInsertionEffect,sa=No&&No!==un.useLayoutEffect?No:e=>e();function oe(e){let t=Xe(ca).current;return t.next=e,sa(t.effect),t.trampoline}function ca(){let e={next:void 0,callback:aa,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function aa(){}var ai=C(N(),1),ua=()=>{},J=typeof document<"u"?ai.useLayoutEffect:ua;var Wn=C(N(),1),la=Wn.createContext(void 0);function ui(e=!1){let t=Wn.useContext(la);if(t===void 0&&!e)throw new Error(ze(16));return t}var li=C(N(),1);function fi(e){let{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:r=0,isNativeButton:i}=e,s=o&&t!==!1,a=o&&t===!1;return{props:li.useMemo(()=>{let c={onKeyDown(l){n&&t&&l.key!=="Tab"&&l.preventDefault()}};return o||(c.tabIndex=r,!i&&n&&(c.tabIndex=t?r:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[o,n,t,s,a,i,r])}}function ln(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:r=!0,composite:i}=e,s=$t.useRef(null),a=ui(!0),u=i??a!==void 0,{props:c}=fi({focusableWhenDisabled:n,disabled:t,composite:u,tabIndex:o,isNativeButton:r}),l=$t.useCallback(()=>{let p=s.current;Do(p)&&u&&t&&c.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,c.disabled,u]);J(l,[l]);let f=$t.useCallback((p={})=>{let{onClick:d,onMouseDown:h,onKeyUp:y,onKeyDown:g,onPointerDown:b,...v}=p;return cn({onClick(E){if(t){E.preventDefault();return}d?.(E)},onMouseDown(E){t||h?.(E)},onKeyDown(E){if(t||(an(E),g?.(E),E.baseUIHandlerPrevented))return;let R=E.target===E.currentTarget,w=E.currentTarget,S=Do(w),k=!r&&fa(w),P=R&&(r?S:!k),_=E.key==="Enter",I=E.key===" ",W=w.getAttribute("role"),L=W?.startsWith("menuitem")||W==="option"||W==="gridcell";if(R&&u&&I){if(E.defaultPrevented&&L)return;E.preventDefault(),k||r&&S?(w.click(),E.preventBaseUIHandler()):P&&(d?.(E),E.preventBaseUIHandler());return}P&&(!r&&(I||_)&&E.preventDefault(),!r&&_&&d?.(E))},onKeyUp(E){if(!t){if(an(E),y?.(E),E.target===E.currentTarget&&r&&u&&Do(E.currentTarget)&&E.key===" "){E.preventDefault();return}E.baseUIHandlerPrevented||E.target===E.currentTarget&&!r&&!u&&E.key===" "&&d?.(E)}},onPointerDown(E){if(t){E.preventDefault();return}b?.(E)}},r?{type:"button"}:{role:"button"},c,v)},[t,c,u,r]),m=oe(p=>{s.current=p,l()});return{getButtonProps:f,buttonRef:m}}function Do(e){return Ne(e)&&e.tagName==="BUTTON"}function fa(e){return!!(e?.tagName==="A"&&e?.href)}var ye={};gt(ye,{cancelOpen:()=>Ha,chipRemovePress:()=>Ra,clearPress:()=>va,closePress:()=>ba,closeWatcher:()=>Na,decrementPress:()=>Ca,disabled:()=>Ua,drag:()=>Ma,escapeKey:()=>Ia,focusOut:()=>Oa,imperativeAction:()=>za,incrementPress:()=>Sa,initial:()=>$a,inputBlur:()=>wa,inputChange:()=>Ta,inputClear:()=>ka,inputPaste:()=>Pa,inputPress:()=>Aa,itemPress:()=>ya,keyboard:()=>_a,linkPress:()=>Ea,listNavigation:()=>Da,missing:()=>Wa,none:()=>da,outsidePress:()=>ha,pointer:()=>La,scrub:()=>Ba,siblingOpen:()=>Va,swipe:()=>ja,trackPress:()=>xa,triggerFocus:()=>ga,triggerHover:()=>ma,triggerPress:()=>pa,wheel:()=>Fa,windowResize:()=>Ya});var da="none",pa="trigger-press",ma="trigger-hover",ga="trigger-focus",ha="outside-press",ya="item-press",ba="close-press",Ea="link-press",va="clear-press",Ra="chip-remove-press",xa="track-press",Sa="increment-press",Ca="decrement-press",Ta="input-change",ka="input-clear",wa="input-blur",Pa="input-paste",Aa="input-press",Oa="focus-out",Ia="escape-key",Na="close-watcher",Da="list-navigation",_a="keyboard",La="pointer",Ma="drag",Fa="wheel",Ba="scrub",Ha="cancel-open",Va="sibling-open",Ua="disabled",Wa="missing",$a="initial",za="imperative-action",ja="swipe",Ya="window-resize";function we(e,t,n,o){let r=!1,i=!1,s=o??he;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...s}}var pi=di.forwardRef(function(t,n){let{render:o,className:r,style:i,disabled:s=!1,nativeButton:a=!0,...u}=t,{store:c}=Ie(),l=c.useState("open"),{getButtonProps:f,buttonRef:m}=ln({disabled:s,native:a}),p={disabled:s};function d(h){l&&c.setOpen(!1,we(ye.closePress,h.nativeEvent))}return _e("button",t,{state:p,ref:[n,m],props:[{onClick:d},u,f]})});var hi=C(N(),1);var $n=C(N(),1);var mi=0;function Ga(e,t="mui"){let[n,o]=$n.useState(e),r=e||n;return $n.useEffect(()=>{n==null&&(mi+=1,o(`${t}-${mi}`))},[n,t]),r}var gi=un.useId;function zt(e,t){if(gi!==void 0){let n=gi();return e??(t?`${t}-${n}`:n)}return Ga(e,t)}function jt(e){return zt(e,"base-ui")}var yi=hi.forwardRef(function(t,n){let{render:o,className:r,style:i,id:s,...a}=t,{store:u}=Ie(),c=jt(s);return u.useSyncedValueWithCleanup("descriptionElementId",c),_e("p",t,{ref:n,props:[{id:c},a]})});var Bs=C(N(),1);var bi=C(N(),1),Ka=[];function zn(e){bi.useEffect(e,Ka)}var fn=0,ot=class e{static create(){return new e}currentId=fn;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=fn,n()},t)}isStarted(){return this.currentId!==fn}clear=()=>{this.currentId!==fn&&(clearTimeout(this.currentId),this.currentId=fn)};disposeEffect=()=>this.clear};function lt(){let e=Xe(ot.create).current;return zn(e.disposeEffect),e}var Oe={};gt(Oe,{engine:()=>Bo,env:()=>Vo,os:()=>Mo,screenReader:()=>Ho});var Mo={};gt(Mo,{android:()=>Ri,apple:()=>Lo,ios:()=>_o,linux:()=>Za,mac:()=>xi,windows:()=>Qa});function qa(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Xa,platform:Ja,maxTouchPoints:Ei}=qa(),vt=Xa.toLowerCase(),Rt=Ja.toLowerCase();var _o=/^i(os$|p)/.test(Rt)||Rt==="macintel"&&Ei>1,vi="android",Ri=Rt===vi||vt.includes(vi),xi=!_o&&Rt.startsWith("mac"),Qa=Rt.startsWith("win"),Za=!Ri&&/^(linux|chrome os)/.test(Rt),Lo=xi||_o;var Bo={};gt(Bo,{blink:()=>tu,gecko:()=>eu,webkit:()=>Fo});var Fo=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),eu=!Fo&&vt.includes("firefox"),tu=!Fo&&vt.includes("chrom");var Ho={};gt(Ho,{voiceOver:()=>nu});var nu=Lo;var Vo={};gt(Vo,{jsdom:()=>ou});var ou=/jsdom|happydom/.test(vt);function Si(e){e.preventDefault(),e.stopPropagation()}function Ci(e){return"nativeEvent"in e}function Ti(e){return e.pointerType===""&&e.isTrusted?!0:Oe.os.android&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ki(e){return Oe.env.jsdom?!1:!Oe.os.android&&e.width===0&&e.height===0||Oe.os.android&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Uo(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function wi(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var dn="data-base-ui-focusable";var Pi="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ye(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Q(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&tt(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function He(e){return"composedPath"in e?e.composedPath()[0]:e.target}function jn(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ai(e){return e.matches("html,body")}function pn(e){return Ne(e)&&e.matches(Pi)}function Wo(e){return e?e.getAttribute("role")==="combobox"&&pn(e):!1}function $o(e){return e?e.hasAttribute(dn)?e:e.querySelector(`[${dn}]`)||e:null}var Me=C(N(),1);function re(e,t,n,o){return e.addEventListener(t,n,o),()=>{e.removeEventListener(t,n,o)}}function rt(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function mn(e){let t=Xe(ru,e).current;return t.next=e,J(t.effect),t}function ru(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Yn=null,sp=globalThis.requestAnimationFrame,zo=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let r=0;r<n.length;r+=1)n[r]?.(t)};request(t){let n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){let n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}},Gn=new zo,Ge=class e{static create(){return new e}static request(t){return Gn.request(t)}static cancel(t){return Gn.cancel(t)}currentId=Yn;request(t){this.cancel(),this.currentId=Gn.request(()=>{this.currentId=Yn,t()})}cancel=()=>{this.currentId!==Yn&&(Gn.cancel(this.currentId),this.currentId=Yn)};disposeEffect=()=>this.cancel};function Yt(){let e=Xe(Ge.create).current;return zn(e.disposeEffect),e}function be(e){return e?.ownerDocument||document}var Kn=C(N(),1);var Oi={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ii={...Oi,position:"fixed",top:0,left:0},lp={...Oi,position:"absolute"};var Ni=C(ge(),1),Gt=Kn.forwardRef(function(t,n){let[o,r]=Kn.useState();return J(()=>{Oe.screenReader.voiceOver&&Oe.engine.webkit&&r("button")},[]),(0,Ni.jsx)("span",{...t,ref:n,style:Ii,"aria-hidden":o?void 0:!0,...{tabIndex:0,role:o},"data-base-ui-focus-guard":""})});function iu(e){return e.visibility==="hidden"||e.visibility==="collapse"}function qn(e,t=e?Et(e):null){return!e||!e.isConnected||!t||iu(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}var su='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function cu(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return tt(n)?n.host:null}function Yo(e){for(let t of Array.from(e.children))if(Le(t)==="summary")return t;return null}function au(e,t){let n=Yo(t);return!!n&&(e===n||Q(n,e))}function Di(e){let t=e?Le(e):"";return e!=null&&e.matches(su)&&(t!=="summary"||e.parentElement!=null&&Le(e.parentElement)==="details"&&Yo(e.parentElement)===e)&&(t!=="details"||Yo(e)==null)&&(t!=="input"||e.type!=="hidden")}function _i(e){if(!Di(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=cu(t)){let n=t!==e,o=Le(t)==="slot";if(t.hasAttribute("inert")||n&&Le(t)==="details"&&!t.open&&!au(e,t)||t.hasAttribute("hidden")||!o&&!uu(t,n))return!1}return!0}function uu(e,t){let n=Et(e);return t?n.display!=="none":qn(e,n)}function Li(e){let t=e.tabIndex;if(t<0){let n=Le(e);if(n==="details"||n==="audio"||n==="video"||Ne(e)&&e.isContentEditable)return 0}return t}function jo(e){if(Le(e)!=="input")return null;let t=e;return t.type==="radio"&&t.name!==""?t:null}function lu(e,t){let n=jo(e);if(!n)return!0;let o=t.find(r=>{let i=jo(r);return i?.name===n.name&&i.form===n.form&&i.checked});return o?o===n:t.find(r=>{let i=jo(r);return i?.name===n.name&&i.form===n.form})===n}function Mi(e){if(Ne(e)&&Le(e)==="slot"){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ne(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Fi(e,t){Mi(e).forEach(n=>{Di(n)&&t.push(n),Fi(n,t)})}function Bi(e,t,n){Mi(e).forEach(o=>{Ne(o)&&o.matches(t)&&n.push(o),Bi(o,t,n)})}function Xn(e){return _i(e)&&Li(e)>=0}function Go(e){let t=[];return Fi(e,t),t.filter(_i)}function gn(e){let t=Go(e);return t.filter(n=>Li(n)>=0&&lu(n,t))}function Hi(e,t){let n=gn(e),o=n.length;if(o===0)return;let r=Ye(be(e)),i=n.indexOf(r),s=i===-1?t===1?0:o-1:i+t;return n[s]}function Jn(e){return Hi(be(e).body,1)||e}function Qn(e){return Hi(be(e).body,-1)||e}function xt(e,t){let n=t||e.currentTarget,o=e.relatedTarget;return!o||!Q(n,o)}function Vi(e){gn(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ko(e){let t=[];Bi(e,"[data-tabindex]",t),t.forEach(n=>{let o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}function St(e,t,n=!0){return e.filter(r=>r.parentId===t).flatMap(r=>[...!n||r.context?.open?[r]:[],...St(e,r.id,n)])}function qo(e,t){let n=[],o=e.find(r=>r.id===t)?.parentId;for(;o;){let r=e.find(i=>i.id===o);o=r?.parentId,r&&(n=n.concat(r))}return n}function Ct(e){return`data-base-ui-${e}`}var Zn=0;function eo(e,t={}){let{preventScroll:n=!1,sync:o=!1,shouldFocus:r}=t;cancelAnimationFrame(Zn);function i(){r&&!r()||e?.focus({preventScroll:n})}if(o)return i(),Vt;let s=requestAnimationFrame(i);return Zn=s,()=>{Zn===s&&(cancelAnimationFrame(s),Zn=0)}}var Xo={inert:new WeakMap,"aria-hidden":new WeakMap},Ui="data-base-ui-inert",Qo={inert:new WeakSet,"aria-hidden":new WeakSet},hn=new WeakMap,Jo=0;function fu(e){return Qo[e]}function ji(e){return e?tt(e)?e.host:ji(e.parentNode):null}var Wi=(e,t)=>t.map(n=>{if(e.contains(n))return n;let o=ji(n);return e.contains(o)?o:null}).filter(n=>n!=null),$i=e=>{let t=new Set;return e.forEach(n=>{let o=n;for(;o&&!t.has(o);)t.add(o),o=o.parentNode}),t},zi=(e,t,n)=>{let o=[],r=i=>{!i||n.has(i)||Array.from(i.children).forEach(s=>{Le(s)!=="script"&&(t.has(s)?r(s):o.push(s))})};return r(e),o};function du(e,t,n,o,{mark:r=!0}){let i=null;o?i="inert":n&&(i="aria-hidden");let s=null,a=null,u=Wi(t,e),c=r?zi(t,$i(u),new Set(u)):[],l=[],f=[];if(i){let m=Xo[i],p=fu(i);a=p,s=m;let d=Wi(t,Array.from(t.querySelectorAll("[aria-live]"))),h=u.concat(d);zi(t,$i(h),new Set(h)).forEach(g=>{let b=g.getAttribute(i),v=b!==null&&b!=="false",E=(m.get(g)||0)+1;m.set(g,E),l.push(g),E===1&&v&&p.add(g),v||g.setAttribute(i,i==="inert"?"":"true")})}return r&&c.forEach(m=>{let p=(hn.get(m)||0)+1;hn.set(m,p),f.push(m),p===1&&m.setAttribute(Ui,"")}),Jo+=1,()=>{s&&l.forEach(m=>{let d=(s.get(m)||0)-1;s.set(m,d),d||(!a?.has(m)&&i&&m.removeAttribute(i),a?.delete(m))}),r&&f.forEach(m=>{let p=(hn.get(m)||0)-1;hn.set(m,p),p||m.removeAttribute(Ui)}),Jo-=1,Jo||(Xo.inert=new WeakMap,Xo["aria-hidden"]=new WeakMap,Qo.inert=new WeakSet,Qo["aria-hidden"]=new WeakSet,hn=new WeakMap)}}function Zo(e,t={}){let{ariaHidden:n=!1,inert:o=!1,mark:r=!0}=t,i=be(e[0]).body;return du(e,i,n,o,{mark:r})}var Ee=C(N(),1),er=C(So(),1);var to="data-base-ui-click-trigger",pu="data-base-ui-swipe-ignore",mu="data-swipe-ignore",Op=`[${pu}]`,Ip=`[${mu}]`;var Yi={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var Tt=C(ge(),1),Gi=Ee.createContext(null),tr=()=>Ee.useContext(Gi),gu=Ct("portal");function Ki(e={}){let{ref:t,container:n,componentProps:o=he,elementProps:r}=e,i=zt(),a=tr()?.portalNode,[u,c]=Ee.useState(null),[l,f]=Ee.useState(null),m=oe(y=>{y!==null&&f(y)}),p=Ee.useRef(null);J(()=>{if(n===null){p.current&&(p.current=null,f(null),c(null));return}if(i==null)return;let y=(n&&(Hn(n)?n:n.current))??a??document.body;if(y==null){p.current&&(p.current=null,f(null),c(null));return}p.current!==y&&(p.current=y,f(null),c(y))},[n,a,i]);let d=_e("div",o,{ref:[t,m],props:[{id:i,[gu]:""},r]});return{portalNode:l,portalSubtree:u&&d?er.createPortal(d,u):null}}var nr=Ee.forwardRef(function(t,n){let{render:o,className:r,style:i,children:s,container:a,renderGuards:u,...c}=t,{portalNode:l,portalSubtree:f}=Ki({container:a,ref:n,componentProps:t,elementProps:c}),m=Ee.useRef(null),p=Ee.useRef(null),d=Ee.useRef(null),h=Ee.useRef(null),[y,g]=Ee.useState(null),b=Ee.useRef(!1),v=y?.modal,E=y?.open,R=typeof u=="boolean"?u:!!y&&!y.modal&&y.open&&!!l;Ee.useEffect(()=>{if(!l||v)return;function S(k){l&&k.relatedTarget&&xt(k)&&(k.type==="focusin"?b.current&&(Ko(l),b.current=!1):(Vi(l),b.current=!0))}return rt(re(l,"focusin",S,!0),re(l,"focusout",S,!0))},[l,v]),J(()=>{!l||E!==!0||!b.current||(Ko(l),b.current=!1)},[E,l]);let w=Ee.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:p,beforeInsideRef:d,afterInsideRef:h,portalNode:l,setFocusManagerState:g}),[l]);return(0,Tt.jsxs)(Ee.Fragment,{children:[f,(0,Tt.jsxs)(Gi.Provider,{value:w,children:[R&&l&&(0,Tt.jsx)(Gt,{"data-type":"outside",ref:m,onFocus:S=>{if(xt(S,l))d.current?.focus();else{let k=y?y.domReference:null;Qn(k)?.focus()}}}),R&&l&&(0,Tt.jsx)("span",{"aria-owns":l.id,style:Yi}),l&&er.createPortal(s,l),R&&l&&(0,Tt.jsx)(Gt,{"data-type":"outside",ref:p,onFocus:S=>{if(xt(S,l))h.current?.focus();else{let k=y?y.domReference:null;Jn(k)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,we(ye.focusOut,S.nativeEvent))}}})]})]})});var kt=C(N(),1);function qi(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var hu=C(ge(),1),yu=kt.createContext(null),bu=kt.createContext(null),Xi=()=>kt.useContext(yu)?.id||null,no=e=>{let t=kt.useContext(bu);return e??t};function Je(e){return e==null?e:"current"in e?e.current:e}var yn=C(ge(),1);function Eu(e,t){let n=je(He(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}var Ji=20,ft=[];function or(){ft=ft.filter(e=>e.deref()?.isConnected)}function Qi(e){or(),e&&Le(e)!=="body"&&(ft.push(new WeakRef(e)),ft.length>Ji&&(ft=ft.slice(-Ji)))}function Zi(){return or(),ft[ft.length-1]?.deref()}function vu(e){return e?Xn(e)?e:gn(e)[0]||e:null}function es(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let n=Go(e).filter(r=>{let i=r.getAttribute("data-tabindex")||"";return Xn(r)||r.hasAttribute("data-tabindex")&&!i.startsWith("-")}),o=e.getAttribute("tabindex");n.length===0?o!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function rr(e){let{context:t,children:n,disabled:o=!1,initialFocus:r=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:u=!0,openInteractionType:c="",nextFocusableElement:l,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:p,getInsideElements:d}=e,h="rootStore"in t?t.rootStore:t,y=h.useState("open"),g=h.useState("domReferenceElement"),b=h.useState("floatingElement"),{events:v,dataRef:E}=h.context,R=oe(()=>E.current.floatingContext?.nodeId),w=r===!1,S=Wo(g)&&w,k=mn(r),P=mn(i),_=mn(c),I=mn(y),W=no(p),L=tr(),D=Me.useRef(!1),te=Me.useRef(!1),G=Me.useRef(!1),V=Me.useRef(null),q=Me.useRef(""),Se=Me.useRef(""),ie=Me.useRef(null),Ce=Me.useRef(null),$=Bt(ie,m,L?.beforeInsideRef),le=Bt(Ce,L?.afterInsideRef),de=lt(),T=lt(),U=Yt(),fe=L!=null,A=$o(b),ke=oe((x=A)=>x?gn(x):[]),pe=oe(()=>d?.().filter(x=>x!=null)??[]);Me.useEffect(()=>{if(o||!a)return;function x(j){j.key==="Tab"&&Q(A,Ye(be(A)))&&ke().length===0&&!S&&Si(j)}let B=be(A);return re(B,"keydown",x)},[o,A,a,S,ke]),Me.useEffect(()=>{if(o||!y)return;let x=be(A);function B(){G.current=!1}function j(me){let M=He(me),X=pe(),H=Q(b,M)||Q(g,M)||Q(L?.portalNode,M)||X.some(se=>se===M||Q(se,M));G.current=!H,Se.current=me.pointerType||"keyboard",M?.closest(`[${to}]`)&&(te.current=!0,T.start(0,()=>{te.current=!1}))}function Z(){Se.current="keyboard"}return rt(re(x,"pointerdown",j,!0),re(x,"pointerup",B,!0),re(x,"pointercancel",B,!0),re(x,"keydown",Z,!0),B)},[o,b,g,A,y,L,T,pe]),Me.useEffect(()=>{if(o||!u)return;let x=be(A);function B(){te.current=!0,T.start(0,()=>{te.current=!1})}function j(X){let H=He(X);Xn(H)&&(V.current=H)}function Z(X){let H=X.relatedTarget,se=X.currentTarget,Re=He(X);a&&H==null&&Re!=null&&Q(b,Re)&&Qi(Re),queueMicrotask(()=>{let ce=R(),Ze=h.context.triggerElements,O=pe(),F=H?.hasAttribute(Ct("focus-guard"))&&[ie.current,Ce.current,L?.beforeInsideRef.current,L?.afterInsideRef.current,L?.beforeOutsideRef.current,L?.afterOutsideRef.current,Je(f),Je(l)].includes(H),De=!(Q(g,H)||Q(b,H)||Q(H,b)||Q(L?.portalNode,H)||O.some(ee=>ee===H||Q(ee,H))||H!=null&&Ze.hasElement(H)||Ze.hasMatchingElement(ee=>Q(ee,H))||F||W&&(St(W.nodesRef.current,ce).find(ee=>Q(ee.context?.elements.floating,H)||Q(ee.context?.elements.domReference,H))||qo(W.nodesRef.current,ce).find(ee=>[ee.context?.elements.floating,$o(ee.context?.elements.floating)].includes(H)||ee.context?.elements.domReference===H)));if(se===g&&A&&es(A),s&&se!==g&&!qn(Re)&&Ye(x)===x.body){if(Ne(A)&&(A.focus(),s==="popup")){U.request(()=>{A.focus()});return}let ee=ke(),qe=V.current,nt=(qe&&ee.includes(qe)?qe:null)||ee[ee.length-1]||A;Ne(nt)&&nt.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(S||!a)&&H&&De&&!te.current&&(S||H!==Zi())&&(D.current=!0,h.setOpen(!1,we(ye.focusOut,X)))})}function me(){G.current||(E.current.insideReactTree=!0,de.start(0,()=>{E.current.insideReactTree=!1}))}let M=Ne(g)?g:null;if(!(!b&&!M))return rt(M&&re(M,"focusout",Z),M&&re(M,"pointerdown",B),b&&re(b,"focusin",j),b&&re(b,"focusout",Z),b&&L&&re(b,"focusout",me,!0))},[o,g,b,A,a,W,L,h,u,s,ke,S,R,E,de,T,U,l,f,pe]),Me.useEffect(()=>{if(o||!b||!y)return;let x=Array.from(L?.portalNode?.querySelectorAll(`[${Ct("portal")}]`)||[]),j=(W?qo(W.nodesRef.current,R()):[]).find(se=>Wo(se.context?.elements.domReference||null))?.context?.elements.domReference,me=[...[b,...x,ie.current,Ce.current,L?.beforeOutsideRef.current,L?.afterOutsideRef.current,...pe()],j,Je(f),Je(l),S?g:null].filter(se=>se!=null),M=Zo(me,{ariaHidden:a||S,mark:!1}),X=[b,...x].filter(se=>se!=null),H=Zo(X);return()=>{H(),M()}},[y,o,g,b,a,L,S,W,R,l,f,pe]),J(()=>{if(!y||o||!Ne(A))return;let x=be(A),B=Ye(x);queueMicrotask(()=>{let j=k.current,Z=typeof j=="function"?j(_.current||""):j;if(Z===void 0||Z===!1||Q(A,B))return;let M=null,X=()=>(M==null&&(M=ke(A)),M[0]||A),H;Z===!0||Z===null?H=X():H=Je(Z),H=H||X();let se=Q(A,Ye(x));eo(H,{preventScroll:H===A,shouldFocus(){if(!I.current)return!1;if(se)return!0;let Re=Ye(x);return!(Re!==H&&Q(A,Re))}})})},[o,y,A,ke,k,_,I]),J(()=>{if(o||!A)return;let x=be(A),B=Ye(x),j=_.current==null;Qi(B);function Z(M){if(M.open||(q.current=Eu(M.nativeEvent,Se.current)),M.reason===ye.triggerHover&&M.nativeEvent.type==="mouseleave"&&(D.current=!0),M.reason===ye.outsidePress)if(M.nested)D.current=!1;else if(Ti(M.nativeEvent)||ki(M.nativeEvent))D.current=!1;else{let X=!1;be(A).createElement("div").focus({get preventScroll(){return X=!0,!1}}),X?D.current=!1:D.current=!0}}v.on("openchange",Z);function me(){let M=P.current,X=typeof M=="function"?M(q.current):M;if(X===void 0||X===!1)return null;X===null&&(X=!0);let H=g?.isConnected?g:null,se=B?.isConnected&&Le(B)!=="body"?B:null,Re=j?se||H:H||se;return Re||(Re=Zi()||null),typeof X=="boolean"?Re:Je(X)||Re||null}return()=>{v.off("openchange",Z);let M=Ye(x),X=pe(),H=Q(b,M)||X.some(ce=>ce===M||Q(ce,M))||W&&St(W.nodesRef.current,R(),!1).some(ce=>Q(ce.context?.elements.floating,M)),se=P.current,Re=me();queueMicrotask(()=>{let ce=vu(Re),Ze=typeof se!="boolean";se&&!D.current&&Ne(ce)&&(!(!Ze&&ce!==M&&M!==x.body)||H)&&ce.focus({preventScroll:!0}),D.current=!1})}},[o,b,A,P,_,v,W,g,R,pe]),J(()=>{if(!Oe.engine.webkit||y||!b)return;let x=Ye(be(b));!Ne(x)||!pn(x)||Q(b,x)&&x.blur()},[y,b]),J(()=>{if(!(o||!L))return L.setFocusManagerState({modal:a,closeOnFocusOut:u,open:y,onOpenChange:h.setOpen,domReference:g}),()=>{L.setFocusManagerState(null)}},[o,L,a,y,h,u,g]),J(()=>{if(!(o||!A))return es(A),()=>{queueMicrotask(or)}},[o,A]);let ne=!o&&(a?!S:!0)&&(fe||a);return(0,yn.jsxs)(Me.Fragment,{children:[ne&&(0,yn.jsx)(Gt,{"data-type":"inside",ref:$,onFocus:x=>{if(a){let B=ke();eo(B[B.length-1])}else L?.portalNode&&(D.current=!1,xt(x,L.portalNode)?Jn(g)?.focus():Je(f??L.beforeOutsideRef)?.focus())}}),n,ne&&(0,yn.jsx)(Gt,{"data-type":"inside",ref:le,onFocus:x=>{a?eo(ke()[0]):L?.portalNode&&(u&&(D.current=!0),xt(x,L.portalNode)?Qn(g)?.focus():Je(l??L.afterOutsideRef)?.focus())}})]})}var bn=C(N(),1);function ir(e,t={}){let{enabled:n=!0,event:o="click",toggle:r=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:a=0,reason:u=ye.triggerPress}=t,c="rootStore"in e?e.rootStore:e,l=c.context.dataRef,f=bn.useRef(void 0),m=Yt(),p=lt(),d=bn.useMemo(()=>{function h(g,b,v,E){let R=we(u,b,v);g&&E==="touch"&&a>0?p.start(a,()=>{c.setOpen(!0,R)}):c.setOpen(g,R)}function y(g,b,v){let E=l.current.openEvent,R=c.select("domReferenceElement")!==b;return g&&R||!g||!r?!0:E&&s?!v(E.type):!1}return{onPointerDown(g){f.current=g.pointerType},onMouseDown(g){let b=f.current,v=g.nativeEvent,E=c.select("open");if(g.button!==0||o==="click"||Uo(b,!0)&&i)return;let R=y(E,g.currentTarget,k=>k==="click"||k==="mousedown"),w=He(v);if(pn(w)){h(R,v,w,b);return}let S=g.currentTarget;m.request(()=>{h(R,v,S,b)})},onClick(g){if(o==="mousedown-only")return;let b=f.current;if(o==="mousedown"&&b){f.current=void 0;return}if(Uo(b,!0)&&i)return;let v=c.select("open"),E=y(v,g.currentTarget,R=>R==="click"||R==="mousedown"||R==="keydown"||R==="keyup");h(E,g.nativeEvent,g.currentTarget,b)},onKeyDown(){f.current=void 0}}},[l,o,i,u,c,s,r,m,p,a]);return bn.useMemo(()=>n?{reference:d}:he,[n,d])}var Ve=C(N(),1);function Ru(){return!1}function xu(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function sr(e,t={}){let{enabled:n=!0,escapeKey:o=!0,outsidePress:r=!0,outsidePressEvent:i="sloppy",referencePress:s=Ru,bubbles:a,externalTree:u}=t,c="rootStore"in e?e.rootStore:e,l=c.useState("open"),f=c.useState("floatingElement"),{dataRef:m}=c.context,p=no(u),d=oe(typeof r=="function"?r:()=>!1),h=typeof r=="function"?d:r,y=h!==!1,g=oe(()=>i),{escapeKey:b,outsidePress:v}=xu(a),E=Ve.useRef(!1),R=Ve.useRef(!1),w=Ve.useRef(!1),S=Ve.useRef(!1),k=Ve.useRef(""),P=Ve.useRef(null),_=lt(),I=lt(),W=oe(()=>{I.clear(),m.current.insideReactTree=!1}),L=oe($=>{let le=m.current.floatingContext?.nodeId;return(p?St(p.nodesRef.current,le):[]).some(T=>T.context?.open&&!T.context.dataRef.current[$])}),D=oe($=>jn($,c.select("floatingElement"))||jn($,c.select("domReferenceElement"))),te=oe($=>{s()&&c.setOpen(!1,we(ye.triggerPress,$.nativeEvent))}),G=oe($=>{if(!l||!n||!o||$.key!=="Escape"||S.current||!b&&L("__escapeKeyBubbles"))return;let le=Ci($)?$.nativeEvent:$,de=we(ye.escapeKey,le);c.setOpen(!1,de),de.isCanceled||$.preventDefault(),!b&&!de.isPropagationAllowed&&$.stopPropagation()}),V=oe(()=>{m.current.insideReactTree=!0,I.start(0,W)}),q=oe($=>{if(!l||!n||$.button!==0)return;let le=He($.nativeEvent);Q(c.select("floatingElement"),le)&&(E.current||(E.current=!0,R.current=!1))}),Se=oe($=>{!l||!n||($.defaultPrevented||$.nativeEvent.defaultPrevented)&&E.current&&(R.current=!0)});Ve.useEffect(()=>{if(!l||!n)return;m.current.__escapeKeyBubbles=b,m.current.__outsidePressBubbles=v;let $=new ot,le=new ot;function de(){$.clear(),S.current=!0}function T(){$.start(Oe.engine.webkit?5:0,()=>{S.current=!1})}function U(){w.current=!0,le.start(0,()=>{w.current=!1})}function fe(){E.current=!1,R.current=!1}function A(){let O=k.current,F=O==="pen"||!O?"mouse":O,De=g(),ee=typeof De=="function"?De():De;return typeof ee=="string"?ee:ee[F]}function ke(O){let F=A();return F==="intentional"&&O.type!=="click"||F==="sloppy"&&O.type==="click"}function pe(O){let F=m.current.floatingContext?.nodeId,De=p&&St(p.nodesRef.current,F).some(ee=>jn(O,ee.context?.elements.floating));return D(O)||De}function ne(O){if(ke(O)){O.type!=="click"&&!D(O)&&(le.clear(),w.current=!1),W();return}if(m.current.insideReactTree){W();return}let F=He(O),De=`[${Ct("inert")}]`,ee=ut(F)?F.getRootNode():null,qe=Array.from((tt(ee)?ee:be(c.select("floatingElement"))).querySelectorAll(De)),nt=c.context.triggerElements;if(F&&(nt.hasElement(F)||nt.hasMatchingElement(Be=>Q(Be,F))))return;let $e=ut(F)?F:null;for(;$e&&!Un($e);){let Be=ci($e);if(Un(Be)||!ut(Be))break;$e=Be}if(!(qe.length&&ut(F)&&!Ai(F)&&!Q(F,c.select("floatingElement"))&&qe.every(Be=>!Q($e,Be)))){if(Ne(F)&&!("touches"in O)){let Be=Un(F),pt=Et(F),mt=/auto|scroll/,yo=Be||mt.test(pt.overflowX),bo=Be||mt.test(pt.overflowY),Eo=yo&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,vo=bo&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,Ro=pt.direction==="rtl",In=vo&&(Ro?O.offsetX<=F.offsetWidth-F.clientWidth:O.offsetX>F.clientWidth),xo=Eo&&O.offsetY>F.clientHeight;if(In||xo)return}if(!pe(O)){if(A()==="intentional"&&w.current){le.clear(),w.current=!1;return}typeof h=="function"&&!h(O)||L("__outsidePressBubbles")||(c.setOpen(!1,we(ye.outsidePress,O)),W())}}}function x(O){A()!=="sloppy"||O.pointerType==="touch"||!c.select("open")||!n||D(O)||ne(O)}function B(O){if(A()!=="sloppy"||!c.select("open")||!n||D(O))return;let F=O.touches[0];F&&(P.current={startTime:Date.now(),startX:F.clientX,startY:F.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}function j(O,F){let De=He(O);if(!De)return;let ee=re(De,O.type,()=>{F(O),ee()})}function Z(O){k.current="touch",j(O,B)}function me(O){_.clear(),O.type==="pointerdown"&&(k.current=O.pointerType),!(O.type==="mousedown"&&P.current&&!P.current.dismissOnMouseDown)&&j(O,F=>{F.type==="pointerdown"?x(F):ne(F)})}function M(O){if(!E.current)return;let F=R.current;if(fe(),A()==="intentional"){if(O.type==="pointercancel"){F&&U();return}if(!pe(O)){if(F){U();return}typeof h=="function"&&!h(O)||(le.clear(),w.current=!0,W())}}}function X(O){if(A()!=="sloppy"||!P.current||D(O))return;let F=O.touches[0];if(!F)return;let De=Math.abs(F.clientX-P.current.startX),ee=Math.abs(F.clientY-P.current.startY),qe=Math.sqrt(De*De+ee*ee);qe>5&&(P.current.dismissOnTouchEnd=!0),qe>10&&(ne(O),_.clear(),P.current=null)}function H(O){j(O,X)}function se(O){A()!=="sloppy"||!P.current||D(O)||(P.current.dismissOnTouchEnd&&ne(O),_.clear(),P.current=null)}function Re(O){j(O,se)}let ce=be(f),Ze=rt(o&&rt(re(ce,"keydown",G),re(ce,"compositionstart",de),re(ce,"compositionend",T)),y&&rt(re(ce,"click",me,!0),re(ce,"pointerdown",me,!0),re(ce,"pointerup",M,!0),re(ce,"pointercancel",M,!0),re(ce,"mousedown",me,!0),re(ce,"mouseup",M,!0),re(ce,"touchstart",Z,!0),re(ce,"touchmove",H,!0),re(ce,"touchend",Re,!0)));return()=>{Ze(),$.clear(),le.clear(),fe(),w.current=!1}},[m,f,o,y,h,l,n,b,v,G,W,g,L,D,p,c,_]),Ve.useEffect(W,[h,W]);let ie=Ve.useMemo(()=>({onKeyDown:G,onPointerDown:te,onClick:te}),[G,te]),Ce=Ve.useMemo(()=>({onKeyDown:G,onPointerDown:Se,onMouseDown:Se,onClickCapture:V,onMouseDownCapture($){V(),q($)},onPointerDownCapture($){V(),q($)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[G,V,q,Se]);return Ve.useMemo(()=>n?{reference:ie,floating:Ce,trigger:ie}:{},[n,ie,Ce])}var Xt=C(N(),1),qu=C(So(),1);var ts=C(N(),1);function ns(e){let t=ts.useRef(!0);t.current&&(t.current=!1,e())}var ms=C(N(),1);var K=(e,t,n,o,r,i,...s)=>{if(s.length>0)throw new Error(ze(1));let a;if(e&&t&&n&&o&&r&&i)a=(u,c,l,f)=>{let m=e(u,c,l,f),p=t(u,c,l,f),d=n(u,c,l,f),h=o(u,c,l,f),y=r(u,c,l,f);return i(m,p,d,h,y,c,l,f)};else if(e&&t&&n&&o&&r)a=(u,c,l,f)=>{let m=e(u,c,l,f),p=t(u,c,l,f),d=n(u,c,l,f),h=o(u,c,l,f);return r(m,p,d,h,c,l,f)};else if(e&&t&&n&&o)a=(u,c,l,f)=>{let m=e(u,c,l,f),p=t(u,c,l,f),d=n(u,c,l,f);return o(m,p,d,c,l,f)};else if(e&&t&&n)a=(u,c,l,f)=>{let m=e(u,c,l,f),p=t(u,c,l,f);return n(m,p,c,l,f)};else if(e&&t)a=(u,c,l,f)=>{let m=e(u,c,l,f);return t(m,c,l,f)};else if(e)a=e;else throw new Error("Missing arguments");return a};var ds=C(N(),1),ur=C(ar(),1),ps=C(us(),1);var Vu=C(N(),1);var Uu=[],Wu;function ls(){return Wu}function fs(e){Uu.push(e)}var $u=Ht(19),zu=$u?Yu:Gu;function ro(e,t,n,o,r){return zu(e,t,n,o,r)}function ju(e,t,n,o,r){let i=ds.useCallback(()=>t(e.getSnapshot(),n,o,r),[e,t,n,o,r]);return(0,ur.useSyncExternalStore)(e.subscribe,i,i)}fs({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let o=e.syncHooks[n],r=o.selector(o.store.state,o.a1,o.a2,o.a3);Object.is(o.value,r)||(t=!0,o.value=r)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let r of e.syncHooks)n.add(r.store);let o=[];for(let r of n)o.push(r.subscribe(t));return()=>{for(let r of o)r()}}),(0,ur.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Yu(e,t,n,o,r){let i=ls();if(!i)return ju(e,t,n,o,r);let s=i.syncIndex;i.syncIndex+=1;let a;return i.didInitialize?(a=i.syncHooks[s],(a.store!==e||a.selector!==t||!Object.is(a.a1,n)||!Object.is(a.a2,o)||!Object.is(a.a3,r))&&(a.store!==e&&(i.didChangeStore=!0),a.store=e,a.selector=t,a.a1=n,a.a2=o,a.a3=r,a.value=t(e.getSnapshot(),n,o,r))):(a={store:e,selector:t,a1:n,a2:o,a3:r,value:t(e.getSnapshot(),n,o,r)},i.syncHooks.push(a)),a.value}function Gu(e,t,n,o,r){return(0,ps.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,o,r))}var io=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let n=this.updateTick;for(let o of this.listeners){if(n!==this.updateTick)return;o(t)}}update(t){for(let n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){let t={...this.state};this.setState(t)}use(t,n,o,r){return ro(this,t,n,o,r)}};var wt=C(N(),1);var qt=class extends io{constructor(t,n={},o){super(t),this.context=n,this.selectors=o}useSyncedValue(t,n){wt.useDebugValue(t);let o=this;J(()=>{o.state[t]!==n&&o.set(t,n)},[o,t,n])}useSyncedValueWithCleanup(t,n){let o=this;J(()=>(o.state[t]!==n&&o.set(t,n),()=>{o.set(t,void 0)}),[o,t,n])}useSyncedValues(t){let n=this,o=Object.values(t);J(()=>{n.update(t)},[n,...o])}useControlledProp(t,n){wt.useDebugValue(t);let o=this,r=n!==void 0;J(()=>{r&&!Object.is(o.state[t],n)&&o.setState({...o.state,[t]:n})},[o,t,n,r])}select(t,n,o,r){let i=this.selectors[t];return i(this.state,n,o,r)}useState(t,n,o,r){return wt.useDebugValue(t),ro(this,this.selectors[t],n,o,r)}useContextCallback(t,n){wt.useDebugValue(t);let o=oe(n??Vt);this.context[t]=o}useStateSetter(t){let n=wt.useRef(void 0);return n.current===void 0&&(n.current=o=>{this.set(t,o)}),n.current}observe(t,n){let o;typeof t=="function"?o=t:o=this.selectors[t];let r=o(this.state);return n(r,r,this),this.subscribe(i=>{let s=o(i);if(!Object.is(r,s)){let a=r;r=s,n(s,a,this)}})}};var Ku={open:K(e=>e.open),transitionStatus:K(e=>e.transitionStatus),domReferenceElement:K(e=>e.domReferenceElement),referenceElement:K(e=>e.positionReference??e.referenceElement),floatingElement:K(e=>e.floatingElement),floatingId:K(e=>e.floatingId)},dt=class extends qt{constructor(t){let{syncOnly:n,nested:o,onOpenChange:r,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:qi(),nested:o,triggerElements:i},Ku),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&wi(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);let o={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",o)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}};function gs(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:o,floatingId:r,nested:i,onOpenChange:s}=e,a=t.useState("open"),u=t.useState("activeTriggerElement"),c=t.useState(n?"popupElement":"positionerElement"),l=t.context.triggerElements,f=s,m=ms.useRef(null);o===void 0&&m.current===null&&(m.current=new dt({open:a,transitionStatus:void 0,referenceElement:u,floatingElement:c,triggerElements:l,onOpenChange:f,floatingId:r,syncOnly:!0,nested:i}));let p=o??m.current;return t.useSyncedValue("floatingId",r),J(()=>{let d={open:a,floatingId:r,referenceElement:u,floatingElement:c};ut(u)&&(d.domReferenceElement=u),p.state.positionReference===p.state.referenceElement&&(d.positionReference=u),p.update(d)},[a,r,u,c,p]),p.context.onOpenChange=f,p.context.nested=i,p}var lr=C(N(),1);function hs(e,t=!1,n=!1){let[o,r]=lr.useState(e&&t?"idle":void 0),[i,s]=lr.useState(e);return e&&!i&&(s(!0),r("starting")),!e&&i&&o!=="ending"&&!n&&r("ending"),!e&&!i&&o==="ending"&&r(void 0),J(()=>{if(!e&&i&&o!=="ending"&&n){let a=Ge.request(()=>{r("ending")});return()=>{Ge.cancel(a)}}},[e,i,o,n]),J(()=>{if(!e||t)return;let a=Ge.request(()=>{r(void 0)});return()=>{Ge.cancel(a)}},[t,e]),J(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&r("starting");let a=Ge.request(()=>{r("idle")});return()=>{Ge.cancel(a)}},[t,e,i,o]),{mounted:i,setMounted:s,transitionStatus:o}}var Es=C(N(),1);var ys=C(So(),1);function bs(e,t=!1,n=!0){let o=Yt();return oe((r,i=null)=>{o.cancel();let s=Je(e);if(s==null)return;let a=s,u=()=>{ys.flushSync(r)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function c(){Promise.all(a.getAnimations().map(l=>l.finished)).then(()=>{i?.aborted||u()}).catch(()=>{if(n){i?.aborted||u();return}let l=a.getAnimations();!i?.aborted&&l.length>0&&l.some(f=>f.pending||f.playState!=="finished")&&c()})}if(t){let l=bt.startingStyle;if(!a.hasAttribute(l)){o.request(c);return}let f=new MutationObserver(()=>{a.hasAttribute(l)||(f.disconnect(),c())});f.observe(a,{attributes:!0,attributeFilter:[l]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}o.request(c)})}function so(e){let{enabled:t=!0,open:n,ref:o,onComplete:r}=e,i=oe(r),s=bs(o,n,!1);Es.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}var vs={tabIndex:-1,[dn]:""};function Rs(e){return t=>t==="touch"?e.current:!0}function xs(e,t,n=!1){let o=zt(),r=Xi()!=null,i=Xt.useRef(null);e===void 0&&i.current===null&&(i.current=t(o,r));let s=e??i.current;return gs({popupStore:s,treatPopupAsFloatingElement:n,floatingRootContext:s.state.floatingRootContext,floatingId:o,nested:r,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function Xu(e,t){let n=Xt.useRef(null),o=Xt.useRef(null);return Xt.useCallback(r=>{if(e===void 0)return;let i=!1;if(n.current!==null){let s=n.current,a=o.current,u=t.context.triggerElements.getById(s);a&&u===a&&(t.context.triggerElements.delete(s),i=!0),n.current=null,o.current=null}if(r!==null&&(n.current=e,o.current=r,t.context.triggerElements.add(e,r),i=!0),i){let s=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==s&&t.set("triggerCount",s)}},[t,e])}function Ss(e,t,n,o=!1){t?e.preventUnmountingOnClose=!1:o&&(e.preventUnmountingOnClose=!0);let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function Cs(e,t,n,o){let r=n.useState("isMountedByTrigger",e),i=Xu(e,n),s=oe(a=>{if(i(a),!a)return;let u=n.select("open"),c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:a,...u?o:null});return}c==null&&u&&n.update({activeTriggerId:e,activeTriggerElement:a,...o})});return J(()=>{r&&n.update({activeTriggerElement:t.current,...o})},[r,n,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:r}}function Ts(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,o=e.useState("open"),r=e.useState("triggerCount");J(()=>{if(!o){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let i=e.context.triggerElements.size,s={};e.state.triggerCount!==i&&(s.triggerCount=i);let a=e.select("activeTriggerId"),u=null;if(a){let c=e.context.triggerElements.getById(a);c?c!==e.state.activeTriggerElement&&(s.activeTriggerElement=c):u=a}if(!u&&!a&&i===1){let c=e.context.triggerElements.entries().next();if(!c.done){let[l,f]=c.value;s.activeTriggerId=l,s.activeTriggerElement=f}}(s.triggerCount!==void 0||s.activeTriggerId!==void 0||s.activeTriggerElement!==void 0)&&e.update(s),u&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===u&&!e.context.triggerElements.getById(u)){let c=we(ye.none);e.setOpen(!1,c),c.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,r,n])}function ks(e,t,n){let{mounted:o,setMounted:r,transitionStatus:i}=hs(e),s=t.useState("preventUnmountingOnClose"),a=e?!1:s;t.useSyncedValues({mounted:o,transitionStatus:i,preventUnmountingOnClose:a});let u=oe(()=>{r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return so({enabled:o&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||u()}}),{forceUnmount:u,transitionStatus:i}}function ws(e,t){e.useSyncedValues(t),J(()=>()=>{e.update({activeTriggerProps:he,inactiveTriggerProps:he,popupProps:he})},[e])}function Ps(e,t){J(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),J(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}var Jt=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){let o=this.idMap.get(t);o!==n&&(o!==void 0&&this.elementsSet.delete(o),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){let n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function As(){return new dt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Jt,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Is(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:As(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:he,inactiveTriggerProps:he,popupProps:he}}function Ns(e,t,n=!1){return new dt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var En=K(e=>e.triggerIdProp??e.activeTriggerId),fr=K(e=>e.openProp??e.open),Os=K(e=>(e.popupElement?.id??e.floatingId)||void 0);function Ds(e,t){return t!==void 0&&fr(e)&&En(e)===t}function Ju(e,t){return Ds(e,t)?!0:t!==void 0&&fr(e)&&En(e)==null&&e.triggerCount===1}var _s={open:fr,mounted:K(e=>e.mounted),transitionStatus:K(e=>e.transitionStatus),floatingRootContext:K(e=>e.floatingRootContext),triggerCount:K(e=>e.triggerCount),preventUnmountingOnClose:K(e=>e.preventUnmountingOnClose),payload:K(e=>e.payload),activeTriggerId:En,activeTriggerElement:K(e=>e.mounted?e.activeTriggerElement:null),popupId:Os,isTriggerActive:K((e,t)=>t!==void 0&&En(e)===t),isOpenedByTrigger:K((e,t)=>Ds(e,t)),isMountedByTrigger:K((e,t)=>t!==void 0&&En(e)===t&&e.mounted),triggerProps:K((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:K((e,t)=>Ju(e,t)?Os(e):void 0),popupProps:K(e=>e.popupProps),popupElement:K(e=>e.popupElement),positionerElement:K(e=>e.positionerElement)};var Ls=(function(e){return e.nestedDialogs="--nested-dialogs",e})({});var Ms=(function(e){return e[e.open=We.open]="open",e[e.closed=We.closed]="closed",e[e.startingStyle=We.startingStyle]="startingStyle",e[e.endingStyle=We.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});var co=C(N(),1),dr=co.createContext(void 0);function ao(){let e=co.useContext(dr);if(e===void 0)throw new Error(ze(26));return e}var Qu="ArrowUp",Zu="ArrowDown",el="ArrowLeft",tl="ArrowRight",nl="Home",ol="End";var rl=new Set([el,tl]);var il=new Set([Qu,Zu]);var sl=new Set([...rl,...il]),Fs=new Set([...sl,nl,ol]);var Hs=C(ge(),1),cl={...Wt,...Ut,nestedDialogOpen(e){return e?{[Ms.nestedDialogOpen]:""}:null}},Vs=Bs.forwardRef(function(t,n){let{render:o,className:r,style:i,finalFocus:s,initialFocus:a,...u}=t,{store:c}=Ie(),l=c.useState("descriptionElementId"),f=c.useState("disablePointerDismissal"),m=c.useState("floatingRootContext"),p=c.useState("popupProps"),d=c.useState("modal"),h=c.useState("mounted"),y=c.useState("nested"),g=c.useState("nestedOpenDialogCount"),b=c.useState("open"),v=c.useState("openMethod"),E=c.useState("titleElementId"),R=c.useState("transitionStatus"),w=c.useState("role"),S=m.useState("floatingId"),k=u.id??S;ao(),so({open:b,ref:c.context.popupRef,onComplete(){b&&c.context.onOpenChangeComplete?.(!0)}});let P=a===void 0?Rs(c.context.popupRef):a,_=g>0,I=c.useStateSetter("popupElement"),L=_e("div",t,{state:{open:b,nested:y,transitionStatus:R,nestedDialogOpen:_},props:[p,{id:k,"aria-labelledby":E??void 0,"aria-describedby":l??void 0,role:w,...vs,hidden:!h,onKeyDown(D){Fs.has(D.key)&&D.stopPropagation()},style:{[Ls.nestedDialogs]:g}},u],ref:[n,c.context.popupRef,I],stateAttributesMapping:cl});return(0,Hs.jsx)(rr,{context:m,openInteractionType:v,disabled:!h,closeOnFocusOut:!f,initialFocus:P,returnFocus:s,modal:d!==!1,restoreFocus:"popup",children:L})});var js=C(N(),1);function Us(e){return Ht(19)?e:e?"true":void 0}var Ws=C(N(),1),$s=C(ge(),1),zs=Ws.forwardRef(function(t,n){let{cutout:o,...r}=t,i;if(o){let s=o.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${s.left}px ${s.top}px,${s.left}px ${s.bottom}px,${s.right}px ${s.bottom}px,${s.right}px ${s.top}px,${s.left}px ${s.top}px)`}return(0,$s.jsx)("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});var vn=C(ge(),1),Ys=js.forwardRef(function(t,n){let{keepMounted:o=!1,...r}=t,{store:i}=Ie(),s=i.useState("mounted"),a=i.useState("modal"),u=i.useState("open");return s||o?(0,vn.jsx)(dr.Provider,{value:o,children:(0,vn.jsxs)(nr,{ref:n,...r,children:[s&&a===!0&&(0,vn.jsx)(zs,{ref:i.context.internalBackdropRef,inert:Us(!u)}),t.children]})}):null});var tc=C(N(),1);var Zs=C(N(),1);var it=C(N(),1);var Gs={},Ks={},qs="";function al(e){if(typeof document>"u")return!1;let t=be(e);return je(t).innerWidth-t.documentElement.clientWidth>0}function ul(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;let n=be(e),o=n.documentElement,r=n.body,i=Vn(o)?o:r,s=i.style.overflowY,a=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",i.style.overflowY="scroll";let u=i.offsetWidth;i.style.overflowY="hidden";let c=i.offsetWidth;return i.style.overflowY=s,o.style.scrollbarGutter=a,u===c}function ll(e){let t=be(e),n=t.documentElement,o=t.body,r=Vn(n)?n:o,i={overflowY:r.style.overflowY,overflowX:r.style.overflowX};return Object.assign(r.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(r.style,i)}}function fl(e){let t=be(e),n=t.documentElement,o=t.body,r=je(n),i=0,s=0,a=!1,u=Ge.create();if(Oe.engine.webkit&&(r.visualViewport?.scale??1)!==1)return()=>{};function c(){let p=r.getComputedStyle(n),d=r.getComputedStyle(o),g=(p.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,Gs={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},qs=n.style.scrollBehavior,Ks={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};let b=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,E=p.overflowY==="scroll"||d.overflowY==="scroll",R=p.overflowX==="scroll"||d.overflowX==="scroll",w=Math.max(0,r.innerWidth-o.clientWidth),S=Math.max(0,r.innerHeight-o.clientHeight),k=parseFloat(d.marginTop)+parseFloat(d.marginBottom),P=parseFloat(d.marginLeft)+parseFloat(d.marginRight),_=Vn(n)?n:o;if(a=ul(e),a){n.style.scrollbarGutter=g,_.style.overflowY="hidden",_.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:g,overflowY:"hidden",overflowX:"hidden"}),(b||E)&&(n.style.overflowY="scroll"),(v||R)&&(n.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:k||S?`calc(100dvh - ${k+S}px)`:"100dvh",width:P||w?`calc(100vw - ${P+w}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),o.scrollTop=i,o.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function l(){Object.assign(n.style,Gs),Object.assign(o.style,Ks),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=qs)}function f(){l(),u.request(c)}c();let m=re(r,"resize",f);return()=>{u.cancel(),l(),typeof r.removeEventListener=="function"&&m()}}var pr=class{lockCount=0;restore=null;timeoutLock=ot.create();timeoutUnlock=ot.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;let o=be(t).documentElement,r=je(o).getComputedStyle(o).overflowY;if(r==="hidden"||r==="clip"){this.restore=Vt;return}let i=Oe.os.ios||!al(t);this.restore=i?ll(t):fl(t)}},dl=new pr;function Xs(e=!0,t=null){J(()=>{if(e)return dl.acquire(t)},[e,t])}function Js(e){let{store:t,actionsRef:n}=e,o=t.useState("open");Ps(t,o),Ts(t);let{forceUnmount:r}=ks(o,t),i=it.useCallback(()=>{t.setOpen(!1,we(ye.imperativeAction))},[t]);it.useImperativeHandle(n,()=>({unmount:r,close:i}),[r,i])}function Qs({store:e,parentContext:t,isDrawer:n}){let o=e.useState("open"),r=e.useState("disablePointerDismissal"),i=e.useState("modal"),s=e.useState("popupElement"),a=e.useState("floatingRootContext"),[u,c]=it.useState(0),[l,f]=it.useState(0),m=u===0,p=sr(a,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(g){if(!e.context.outsidePressEnabledRef.current||"button"in g&&g.button!==0||"touches"in g&&g.touches.length!==1)return!1;let b=He(g);return m&&!r?i&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===b||e.context.backdropRef.current===b||Q(b,s)&&!b?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:m});Xs(o&&i===!0,s),e.useContextCallback("onNestedDialogOpen",(g,b)=>{c(g),f(b)}),e.useContextCallback("onNestedDialogClose",()=>{c(0),f(0)}),it.useEffect(()=>(t?.onNestedDialogOpen&&o&&t.onNestedDialogOpen(u+1,l+(n?1:0)),t?.onNestedDialogClose&&!o&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&o&&t.onNestedDialogClose()}),[n,o,u,l,t]);let d=p.reference??he,h=p.trigger??he,y=p.floating??he;return ws(e,{activeTriggerProps:d,inactiveTriggerProps:h,popupProps:y,nestedOpenDialogCount:u,nestedOpenDrawerCount:l}),null}var uo=C(N(),1);var pl={..._s,modal:K(e=>e.modal),nested:K(e=>e.nested),nestedOpenDialogCount:K(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:K(e=>e.nestedOpenDrawerCount),disablePointerDismissal:K(e=>e.disablePointerDismissal),openMethod:K(e=>e.openMethod),descriptionElementId:K(e=>e.descriptionElementId),titleElementId:K(e=>e.titleElementId),viewportElement:K(e=>e.viewportElement),role:K(e=>e.role)},Qt=class e extends qt{constructor(t,n,o=!1){let r=new Jt,i=ml(t);i.floatingRootContext=Ns(r,n,o),super(i,{popupRef:uo.createRef(),backdropRef:uo.createRef(),internalBackdropRef:uo.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},pl)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);let o={open:t};Ss(o,t,n.trigger),this.update(o)};static useStore(t,n){return xs(t,(r,i)=>new e(n,r,i),!0).store}};function ml(e={}){return{...Is(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}var Rn=C(ge(),1);function ec(e,t="dialog"){let{children:n,open:o,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:s,disablePointerDismissal:a=!1,modal:u=!0,actionsRef:c,handle:l,triggerId:f,defaultTriggerId:m=null}=e,p=t==="drawer",d=t==="alert-dialog",h=d?!0:u,y=d||a,g=d?"alertdialog":"dialog",b=Ie(!0),E={modal:h,disablePointerDismissal:y,nested:!!b,role:g},R=Qt.useStore(l?.store,{open:r,openProp:o,activeTriggerId:m,triggerIdProp:f,...E});ns(()=>{let I=o===void 0&&R.state.open===!1&&r===!0?{open:!0,activeTriggerId:m}:null;d?R.update(I?{...E,...I}:E):I&&R.update(I)}),R.useControlledProp("openProp",o),R.useControlledProp("triggerIdProp",f),R.useSyncedValues(E),R.useContextCallback("onOpenChange",i),R.useContextCallback("onOpenChangeComplete",s);let w=R.useState("open"),S=R.useState("mounted"),k=R.useState("payload");Js({store:R,actionsRef:c});let P=w||S,_=Zs.useMemo(()=>({store:R}),[R]);return(0,Rn.jsx)(Mn.Provider,{value:!1,children:(0,Rn.jsxs)(To.Provider,{value:_,children:[P&&(0,Rn.jsx)(Qs,{store:R,parentContext:b?.store.context,isDrawer:p}),typeof n=="function"?n({payload:k}):n]})})}function nc(e){let t=tc.useContext(Mn)?"drawer":"dialog";return ec(e,t)}var oc=C(N(),1);var mr=(function(e){return e[e.open=We.open]="open",e[e.closed=We.closed]="closed",e[e.startingStyle=We.startingStyle]="startingStyle",e[e.endingStyle=We.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});var gl={...Wt,...Ut,nested(e){return e?{[mr.nested]:""}:null},nestedDialogOpen(e){return e?{[mr.nestedDialogOpen]:""}:null}},rc=oc.forwardRef(function(t,n){let{render:o,className:r,style:i,children:s,...a}=t,u=ao(),{store:c}=Ie(),l=c.useState("open"),f=c.useState("nested"),m=c.useState("transitionStatus"),p=c.useState("nestedOpenDialogCount"),d=c.useState("mounted"),h=c.useStateSetter("viewportElement"),y=p>0;return _e("div",t,{enabled:u||d,state:{open:l,nested:f,transitionStatus:m,nestedDialogOpen:y},ref:[n,h],stateAttributesMapping:gl,props:[{role:"presentation",hidden:!d,style:{pointerEvents:l?void 0:"none"},children:s},a]})});var ic=C(N(),1);var sc=ic.forwardRef(function(t,n){let{render:o,className:r,style:i,id:s,...a}=t,{store:u}=Ie(),c=jt(s);return u.useSyncedValueWithCleanup("titleElementId",c),_e("h2",t,{ref:n,props:[{id:c},a]})});var lo=C(N(),1);var gr=C(N(),1);var xn=C(N(),1);function cc(e){let t=xn.useRef(""),n=xn.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:xn.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function ac(e,t){let n=oe((i,s)=>{(typeof e=="function"?e():e)||t(s||(Oe.os.ios?"touch":""))}),{onClick:o,onPointerDown:r}=cc(n);return gr.useMemo(()=>({onClick:o,onPointerDown:r}),[o,r])}var uc=lo.forwardRef(function(t,n){let{render:o,className:r,style:i,disabled:s=!1,nativeButton:a=!0,id:u,payload:c,handle:l,...f}=t,m=Ie(!0),p=l?.store??m?.store;if(!p)throw new Error(ze(79));let d=jt(u),h=p.useState("floatingRootContext"),y=p.useState("isOpenedByTrigger",d),g=p.useState("triggerPopupId",d),b=lo.useRef(null),{registerTrigger:v,isMountedByThisTrigger:E}=Cs(d,b,p,{payload:c}),{getButtonProps:R,buttonRef:w}=ln({disabled:s,native:a}),S=ir(h,{enabled:h!=null}),k=ac(()=>p.select("open"),I=>{p.set("openMethod",I)}),P={disabled:s,open:y},_=p.useState("triggerProps",E);return _e("button",t,{state:P,ref:[w,n,v,b],props:[S.reference,_,k,{[to]:"",id:d,"aria-haspopup":"dialog","aria-expanded":y,"aria-controls":g},f,R],stateAttributesMapping:ri})});var Sn=class{constructor(t){this.store=t??new Qt}open(t){let n=t?this.store.context.triggerElements.getById(t):void 0;this.store.setOpen(!0,we(ye.imperativeAction,void 0,n))}openWithPayload(t){this.store.set("payload",t),this.store.setOpen(!0,we(ye.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,we(ye.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function lc(){return new Sn}var Zt=C(N(),1);var Te=C(N(),1);var hl={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function yl(e,t){let n=e.scrollSnapList();return typeof t=="number"?n.map(()=>t):t(n,e)}function bl(e,t){let n=e.rootNode();return t&&t(n)||n}function fo(e={}){let t,n,o,r,i=null,s=0,a=!1,u=!1,c=!1,l=!1;function f(D,te){n=D;let{mergeOptions:G,optionsAtMedia:V}=te,q=G(hl,fo.globalOptions),Se=G(q,e);if(t=V(Se),n.scrollSnapList().length<=1)return;l=t.jump,o=!1,r=yl(n,t.delay);let{eventStore:ie,ownerDocument:Ce}=n.internalEngine(),$=!!n.internalEngine().options.watchDrag,le=bl(n,t.rootNode);ie.add(Ce,"visibilitychange",g),$&&n.on("pointerDown",v),$&&!t.stopOnInteraction&&n.on("pointerUp",E),t.stopOnMouseEnter&&ie.add(le,"mouseenter",R),t.stopOnMouseEnter&&!t.stopOnInteraction&&ie.add(le,"mouseleave",w),t.stopOnFocusIn&&n.on("slideFocusStart",y),t.stopOnFocusIn&&!t.stopOnInteraction&&ie.add(n.containerNode(),"focusout",h),t.playOnInit&&h()}function m(){n.off("pointerDown",v).off("pointerUp",E).off("slideFocusStart",y),y(),o=!0,a=!1}function p(){let{ownerWindow:D}=n.internalEngine();D.clearTimeout(s),s=D.setTimeout(I,r[n.selectedScrollSnap()]),i=new Date().getTime(),n.emit("autoplay:timerset")}function d(){let{ownerWindow:D}=n.internalEngine();D.clearTimeout(s),s=0,i=null,n.emit("autoplay:timerstopped")}function h(){if(!o){if(b()){c=!0;return}a||n.emit("autoplay:play"),p(),a=!0}}function y(){o||(a&&n.emit("autoplay:stop"),d(),a=!1)}function g(){if(b())return c=a,y();c&&h()}function b(){let{ownerDocument:D}=n.internalEngine();return D.visibilityState==="hidden"}function v(){u||y()}function E(){u||h()}function R(){u=!0,y()}function w(){u=!1,h()}function S(D){typeof D<"u"&&(l=D),h()}function k(){a&&y()}function P(){a&&h()}function _(){return a}function I(){let{index:D}=n.internalEngine(),te=D.clone().add(1).get(),G=n.scrollSnapList().length-1,V=t.stopOnLastSnap&&te===G;if(n.canScrollNext()?n.scrollNext(l):n.scrollTo(0,l),n.emit("autoplay:select"),V)return y();h()}function W(){if(!i)return null;let D=r[n.selectedScrollSnap()],te=new Date().getTime()-i;return D-te}return{name:"autoplay",options:e,init:f,destroy:m,play:S,stop:k,reset:P,isPlaying:_,timeUntilNext:W}}fo.globalOptions=void 0;var Ke=C(N(),1);function El(e){return Object.prototype.toString.call(e)==="[object Object]"}function fc(e){return El(e)||Array.isArray(e)}function pc(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function po(e,t){let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==i?!1:n.every(s=>{let a=e[s],u=t[s];return typeof a=="function"?`${a}`==`${u}`:!fc(a)||!fc(u)?a===u:po(a,u)})}function dc(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function mc(e,t){if(e.length!==t.length)return!1;let n=dc(e),o=dc(t);return n.every((r,i)=>{let s=o[i];return po(r,s)})}function br(e){return typeof e=="number"}function hr(e){return typeof e=="string"}function mo(e){return typeof e=="boolean"}function gc(e){return Object.prototype.toString.call(e)==="[object Object]"}function ve(e){return Math.abs(e)}function Er(e){return Math.sign(e)}function Tn(e,t){return ve(e-t)}function vl(e,t){if(e===0||t===0||ve(e)<=ve(t))return 0;let n=Tn(ve(e),ve(t));return ve(n/e)}function Rl(e){return Math.round(e*100)/100}function kn(e){return wn(e).map(Number)}function Qe(e){return e[An(e)]}function An(e){return Math.max(0,e.length-1)}function vr(e,t){return t===An(e)}function hc(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function wn(e){return Object.keys(e)}function yc(e,t){return[e,t].reduce((n,o)=>(wn(o).forEach(r=>{let i=n[r],s=o[r],a=gc(i)&&gc(s);n[r]=a?yc(i,s):s}),n),{})}function yr(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function xl(e,t){let n={start:o,center:r,end:i};function o(){return 0}function r(u){return i(u)/2}function i(u){return t-u}function s(u,c){return hr(e)?n[e](u):e(t,u,c)}return{measure:s}}function Pn(){let e=[];function t(r,i,s,a={passive:!0}){let u;if("addEventListener"in r)r.addEventListener(i,s,a),u=()=>r.removeEventListener(i,s,a);else{let c=r;c.addListener(s),u=()=>c.removeListener(s)}return e.push(u),o}function n(){e=e.filter(r=>r())}let o={add:t,clear:n};return o}function Sl(e,t,n,o){let r=Pn(),i=1e3/60,s=null,a=0,u=0;function c(){r.add(e,"visibilitychange",()=>{e.hidden&&d()})}function l(){p(),r.clear()}function f(y){if(!u)return;s||(s=y,n(),n());let g=y-s;for(s=y,a+=g;a>=i;)n(),a-=i;let b=a/i;o(b),u&&(u=t.requestAnimationFrame(f))}function m(){u||(u=t.requestAnimationFrame(f))}function p(){t.cancelAnimationFrame(u),s=null,a=0,u=0}function d(){s=null,a=0}return{init:c,destroy:l,start:m,stop:p,update:n,render:o}}function Cl(e,t){let n=t==="rtl",o=e==="y",r=o?"y":"x",i=o?"x":"y",s=!o&&n?-1:1,a=l(),u=f();function c(d){let{height:h,width:y}=d;return o?h:y}function l(){return o?"top":n?"right":"left"}function f(){return o?"bottom":n?"left":"right"}function m(d){return d*s}return{scroll:r,cross:i,startEdge:a,endEdge:u,measureSize:c,direction:m}}function Pt(e=0,t=0){let n=ve(e-t);function o(c){return c<e}function r(c){return c>t}function i(c){return o(c)||r(c)}function s(c){return i(c)?o(c)?e:t:c}function a(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:s,reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:a}}function bc(e,t,n){let{constrain:o}=Pt(0,e),r=e+1,i=s(t);function s(m){return n?ve((r+m)%r):o(m)}function a(){return i}function u(m){return i=s(m),f}function c(m){return l().set(a()+m)}function l(){return bc(e,a(),n)}let f={get:a,set:u,add:c,clone:l};return f}function Tl(e,t,n,o,r,i,s,a,u,c,l,f,m,p,d,h,y,g,b){let{cross:v,direction:E}=e,R=["INPUT","SELECT","TEXTAREA"],w={passive:!1},S=Pn(),k=Pn(),P=Pt(50,225).constrain(p.measure(20)),_={mouse:300,touch:400},I={mouse:500,touch:600},W=d?43:25,L=!1,D=0,te=0,G=!1,V=!1,q=!1,Se=!1;function ie(x){if(!b)return;function B(Z){(mo(b)||b(x,Z))&&U(Z)}let j=t;S.add(j,"dragstart",Z=>Z.preventDefault(),w).add(j,"touchmove",()=>{},w).add(j,"touchend",()=>{}).add(j,"touchstart",B).add(j,"mousedown",B).add(j,"touchcancel",A).add(j,"contextmenu",A).add(j,"click",ke,!0)}function Ce(){S.clear(),k.clear()}function $(){let x=Se?n:t;k.add(x,"touchmove",fe,w).add(x,"touchend",A).add(x,"mousemove",fe,w).add(x,"mouseup",A)}function le(x){let B=x.nodeName||"";return R.includes(B)}function de(){return(d?I:_)[Se?"mouse":"touch"]}function T(x,B){let j=f.add(Er(x)*-1),Z=l.byDistance(x,!d).distance;return d||ve(x)<P?Z:y&&B?Z*.5:l.byIndex(j.get(),0).distance}function U(x){let B=yr(x,o);Se=B,q=d&&B&&!x.buttons&&L,L=Tn(r.get(),s.get())>=2,!(B&&x.button!==0)&&(le(x.target)||(G=!0,i.pointerDown(x),c.useFriction(0).useDuration(0),r.set(s),$(),D=i.readPoint(x),te=i.readPoint(x,v),m.emit("pointerDown")))}function fe(x){if(!yr(x,o)&&x.touches.length>=2)return A(x);let j=i.readPoint(x),Z=i.readPoint(x,v),me=Tn(j,D),M=Tn(Z,te);if(!V&&!Se&&(!x.cancelable||(V=me>M,!V)))return A(x);let X=i.pointerMove(x);me>h&&(q=!0),c.useFriction(.3).useDuration(.75),a.start(),r.add(E(X)),x.preventDefault()}function A(x){let j=l.byDistance(0,!1).index!==f.get(),Z=i.pointerUp(x)*de(),me=T(E(Z),j),M=vl(Z,me),X=W-10*M,H=g+M/50;V=!1,G=!1,k.clear(),c.useDuration(X).useFriction(H),u.distance(me,!d),Se=!1,m.emit("pointerUp")}function ke(x){q&&(x.stopPropagation(),x.preventDefault(),q=!1)}function pe(){return G}return{init:ie,destroy:Ce,pointerDown:pe}}function kl(e,t){let o,r;function i(f){return f.timeStamp}function s(f,m){let d=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(yr(f,t)?f:f.touches[0])[d]}function a(f){return o=f,r=f,s(f)}function u(f){let m=s(f)-s(r),p=i(f)-i(o)>170;return r=f,p&&(o=f),m}function c(f){if(!o||!r)return 0;let m=s(r)-s(o),p=i(f)-i(o),d=i(f)-i(r)>170,h=m/p;return p&&!d&&ve(h)>.1?h:0}return{pointerDown:a,pointerMove:u,pointerUp:c,readPoint:s}}function wl(){function e(n){let{offsetTop:o,offsetLeft:r,offsetWidth:i,offsetHeight:s}=n;return{top:o,right:r+i,bottom:o+s,left:r,width:i,height:s}}return{measure:e}}function Pl(e){function t(o){return e*(o/100)}return{measure:t}}function Al(e,t,n,o,r,i,s){let a=[e].concat(o),u,c,l=[],f=!1;function m(y){return r.measureSize(s.measure(y))}function p(y){if(!i)return;c=m(e),l=o.map(m);function g(b){for(let v of b){if(f)return;let E=v.target===e,R=o.indexOf(v.target),w=E?c:l[R],S=m(E?e:o[R]);if(ve(S-w)>=.5){y.reInit(),t.emit("resize");break}}}u=new ResizeObserver(b=>{(mo(i)||i(y,b))&&g(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>u.observe(b))})}function d(){f=!0,u&&u.disconnect()}return{init:p,destroy:d}}function Ol(e,t,n,o,r,i){let s=0,a=0,u=r,c=i,l=e.get(),f=0;function m(){let w=o.get()-e.get(),S=!u,k=0;return S?(s=0,n.set(o),e.set(o),k=w):(n.set(e),s+=w/u,s*=c,l+=s,e.add(s),k=l-f),a=Er(k),f=l,R}function p(){let w=o.get()-t.get();return ve(w)<.001}function d(){return u}function h(){return a}function y(){return s}function g(){return v(r)}function b(){return E(i)}function v(w){return u=w,R}function E(w){return c=w,R}let R={direction:h,duration:d,velocity:y,seek:m,settled:p,useBaseFriction:b,useBaseDuration:g,useFriction:E,useDuration:v};return R}function Il(e,t,n,o,r){let i=r.measure(10),s=r.measure(50),a=Pt(.1,.99),u=!1;function c(){return!(u||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function l(p){if(!c())return;let d=e.reachedMin(t.get())?"min":"max",h=ve(e[d]-t.get()),y=n.get()-t.get(),g=a.constrain(h/s);n.subtract(y*g),!p&&ve(y)<i&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function f(p){u=!p}return{shouldConstrain:c,constrain:l,toggleActive:f}}function Nl(e,t,n,o,r){let i=Pt(-t+e,0),s=f(),a=l(),u=m();function c(d,h){return Tn(d,h)<=1}function l(){let d=s[0],h=Qe(s),y=s.lastIndexOf(d),g=s.indexOf(h)+1;return Pt(y,g)}function f(){return n.map((d,h)=>{let{min:y,max:g}=i,b=i.constrain(d),v=!h,E=vr(n,h);return v?g:E||c(y,b)?y:c(g,b)?g:b}).map(d=>parseFloat(d.toFixed(3)))}function m(){if(t<=e+r)return[i.max];if(o==="keepSnaps")return s;let{min:d,max:h}=a;return s.slice(d,h)}return{snapsContained:u,scrollContainLimit:a}}function Dl(e,t,n){let o=t[0],r=n?o-e:Qe(t);return{limit:Pt(r,o)}}function _l(e,t,n,o){let i=t.min+.1,s=t.max+.1,{reachedMin:a,reachedMax:u}=Pt(i,s);function c(m){return m===1?u(n.get()):m===-1?a(n.get()):!1}function l(m){if(!c(m))return;let p=e*(m*-1);o.forEach(d=>d.add(p))}return{loop:l}}function Ll(e){let{max:t,length:n}=e;function o(i){let s=i-t;return n?s/-n:0}return{get:o}}function Ml(e,t,n,o,r){let{startEdge:i,endEdge:s}=e,{groupSlides:a}=r,u=f().map(t.measure),c=m(),l=p();function f(){return a(o).map(h=>Qe(h)[s]-h[0][i]).map(ve)}function m(){return o.map(h=>n[i]-h[i]).map(h=>-ve(h))}function p(){return a(c).map(h=>h[0]).map((h,y)=>h+u[y])}return{snaps:c,snapsAligned:l}}function Fl(e,t,n,o,r,i){let{groupSlides:s}=r,{min:a,max:u}=o,c=l();function l(){let m=s(i),p=!e||t==="keepSnaps";return n.length===1?[i]:p?m:m.slice(a,u).map((d,h,y)=>{let g=!h,b=vr(y,h);if(g){let v=Qe(y[0])+1;return hc(v)}if(b){let v=An(i)-Qe(y)[0]+1;return hc(v,Qe(y)[0])}return d})}return{slideRegistry:c}}function Bl(e,t,n,o,r){let{reachedAny:i,removeOffset:s,constrain:a}=o;function u(d){return d.concat().sort((h,y)=>ve(h)-ve(y))[0]}function c(d){let h=e?s(d):a(d),y=t.map((b,v)=>({diff:l(b-h,0),index:v})).sort((b,v)=>ve(b.diff)-ve(v.diff)),{index:g}=y[0];return{index:g,distance:h}}function l(d,h){let y=[d,d+n,d-n];if(!e)return d;if(!h)return u(y);let g=y.filter(b=>Er(b)===h);return g.length?u(g):Qe(y)-n}function f(d,h){let y=t[d]-r.get(),g=l(y,h);return{index:d,distance:g}}function m(d,h){let y=r.get()+d,{index:g,distance:b}=c(y),v=!e&&i(y);if(!h||v)return{index:g,distance:d};let E=t[g]-b,R=d+l(E,0);return{index:g,distance:R}}return{byDistance:m,byIndex:f,shortcut:l}}function Hl(e,t,n,o,r,i,s){function a(f){let m=f.distance,p=f.index!==t.get();i.add(m),m&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),s.emit("select"))}function u(f,m){let p=r.byDistance(f,m);a(p)}function c(f,m){let p=t.clone().set(f),d=r.byIndex(p.get(),m);a(d)}return{distance:u,index:c}}function Vl(e,t,n,o,r,i,s,a){let u={passive:!0,capture:!0},c=0;function l(p){if(!a)return;function d(h){if(new Date().getTime()-c>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;let b=n.findIndex(v=>v.includes(h));br(b)&&(r.useDuration(0),o.index(b,0),s.emit("slideFocus"))}i.add(document,"keydown",f,!1),t.forEach((h,y)=>{i.add(h,"focus",g=>{(mo(a)||a(p,g))&&d(y)},u)})}function f(p){p.code==="Tab"&&(c=new Date().getTime())}return{init:l}}function Cn(e){let t=e;function n(){return t}function o(u){t=s(u)}function r(u){t+=s(u)}function i(u){t-=s(u)}function s(u){return br(u)?u:u.get()}return{get:n,set:o,add:r,subtract:i}}function Ec(e,t){let n=e.scroll==="x"?s:a,o=t.style,r=null,i=!1;function s(m){return`translate3d(${m}px,0px,0px)`}function a(m){return`translate3d(0px,${m}px,0px)`}function u(m){if(i)return;let p=Rl(e.direction(m));p!==r&&(o.transform=n(p),r=p)}function c(m){i=!m}function l(){i||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:l,to:u,toggleActive:c}}function Ul(e,t,n,o,r,i,s,a,u){let l=kn(r),f=kn(r).reverse(),m=g().concat(b());function p(S,k){return S.reduce((P,_)=>P-r[_],k)}function d(S,k){return S.reduce((P,_)=>p(P,k)>0?P.concat([_]):P,[])}function h(S){return i.map((k,P)=>({start:k-o[P]+.5+S,end:k+t-.5+S}))}function y(S,k,P){let _=h(k);return S.map(I=>{let W=P?0:-n,L=P?n:0,D=P?"end":"start",te=_[I][D];return{index:I,loopPoint:te,slideLocation:Cn(-1),translate:Ec(e,u[I]),target:()=>a.get()>te?W:L}})}function g(){let S=s[0],k=d(f,S);return y(k,n,!1)}function b(){let S=t-s[0]-1,k=d(l,S);return y(k,-n,!0)}function v(){return m.every(({index:S})=>{let k=l.filter(P=>P!==S);return p(k,t)<=.1})}function E(){m.forEach(S=>{let{target:k,translate:P,slideLocation:_}=S,I=k();I!==_.get()&&(P.to(I),_.set(I))})}function R(){m.forEach(S=>S.translate.clear())}return{canLoop:v,clear:R,loop:E,loopPoints:m}}function Wl(e,t,n){let o,r=!1;function i(u){if(!n)return;function c(l){for(let f of l)if(f.type==="childList"){u.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(l=>{r||(mo(n)||n(u,l))&&c(l)}),o.observe(e,{childList:!0})}function s(){o&&o.disconnect(),r=!0}return{init:i,destroy:s}}function $l(e,t,n,o){let r={},i=null,s=null,a,u=!1;function c(){a=new IntersectionObserver(d=>{u||(d.forEach(h=>{let y=t.indexOf(h.target);r[y]=h}),i=null,s=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(d=>a.observe(d))}function l(){a&&a.disconnect(),u=!0}function f(d){return wn(r).reduce((h,y)=>{let g=parseInt(y),{isIntersecting:b}=r[g];return(d&&b||!d&&!b)&&h.push(g),h},[])}function m(d=!0){if(d&&i)return i;if(!d&&s)return s;let h=f(d);return d&&(i=h),d||(s=h),h}return{init:c,destroy:l,get:m}}function zl(e,t,n,o,r,i){let{measureSize:s,startEdge:a,endEdge:u}=e,c=n[0]&&r,l=d(),f=h(),m=n.map(s),p=y();function d(){if(!c)return 0;let b=n[0];return ve(t[a]-b[a])}function h(){if(!c)return 0;let b=i.getComputedStyle(Qe(o));return parseFloat(b.getPropertyValue(`margin-${u}`))}function y(){return n.map((b,v,E)=>{let R=!v,w=vr(E,v);return R?m[v]+l:w?m[v]+f:E[v+1][a]-b[a]}).map(ve)}return{slideSizes:m,slideSizesWithGaps:p,startGap:l,endGap:f}}function jl(e,t,n,o,r,i,s,a,u){let{startEdge:c,endEdge:l,direction:f}=e,m=br(n);function p(g,b){return kn(g).filter(v=>v%b===0).map(v=>g.slice(v,v+b))}function d(g){return g.length?kn(g).reduce((b,v,E)=>{let R=Qe(b)||0,w=R===0,S=v===An(g),k=r[c]-i[R][c],P=r[c]-i[v][l],_=!o&&w?f(s):0,I=!o&&S?f(a):0,W=ve(P-I-(k+_));return E&&W>t+u&&b.push(v),S&&b.push(g.length),b},[]).map((b,v,E)=>{let R=Math.max(E[v-1]||0);return g.slice(R,b)}):[]}function h(g){return m?p(g,n):d(g)}return{groupSlides:h}}function Yl(e,t,n,o,r,i,s){let{align:a,axis:u,direction:c,startIndex:l,loop:f,duration:m,dragFree:p,dragThreshold:d,inViewThreshold:h,slidesToScroll:y,skipSnaps:g,containScroll:b,watchResize:v,watchSlides:E,watchDrag:R,watchFocus:w}=i,S=2,k=wl(),P=k.measure(t),_=n.map(k.measure),I=Cl(u,c),W=I.measureSize(P),L=Pl(W),D=xl(a,W),te=!f&&!!b,G=f||!!b,{slideSizes:V,slideSizesWithGaps:q,startGap:Se,endGap:ie}=zl(I,P,_,n,G,r),Ce=jl(I,W,y,f,P,_,Se,ie,S),{snaps:$,snapsAligned:le}=Ml(I,D,P,_,Ce),de=-Qe($)+Qe(q),{snapsContained:T,scrollContainLimit:U}=Nl(W,de,le,b,S),fe=te?T:le,{limit:A}=Dl(de,fe,f),ke=bc(An(fe),l,f),pe=ke.clone(),ne=kn(n),x=({dragHandler:$e,scrollBody:Be,scrollBounds:pt,options:{loop:mt}})=>{mt||pt.constrain($e.pointerDown()),Be.seek()},B=({scrollBody:$e,translate:Be,location:pt,offsetLocation:mt,previousLocation:yo,scrollLooper:bo,slideLooper:Eo,dragHandler:vo,animation:Ro,eventHandler:In,scrollBounds:xo,options:{loop:xr}},Sr)=>{let Cr=$e.settled(),Mc=!xo.shouldConstrain(),Tr=xr?Cr:Cr&&Mc,kr=Tr&&!vo.pointerDown();kr&&Ro.stop();let Fc=pt.get()*Sr+yo.get()*(1-Sr);mt.set(Fc),xr&&(bo.loop($e.direction()),Eo.loop()),Be.to(mt.get()),kr&&In.emit("settle"),Tr||In.emit("scroll")},j=Sl(o,r,()=>x(nt),$e=>B(nt,$e)),Z=.68,me=fe[ke.get()],M=Cn(me),X=Cn(me),H=Cn(me),se=Cn(me),Re=Ol(M,H,X,se,m,Z),ce=Bl(f,fe,de,A,se),Ze=Hl(j,ke,pe,Re,ce,se,s),O=Ll(A),F=Pn(),De=$l(t,n,s,h),{slideRegistry:ee}=Fl(te,b,fe,U,Ce,ne),qe=Vl(e,n,ee,Ze,Re,F,s,w),nt={ownerDocument:o,ownerWindow:r,eventHandler:s,containerRect:P,slideRects:_,animation:j,axis:I,dragHandler:Tl(I,e,o,r,se,kl(I,r),M,j,Ze,Re,ce,ke,s,L,p,d,g,Z,R),eventStore:F,percentOfView:L,index:ke,indexPrevious:pe,limit:A,location:M,offsetLocation:H,previousLocation:X,options:i,resizeHandler:Al(t,s,r,n,I,v,k),scrollBody:Re,scrollBounds:Il(A,H,se,Re,L),scrollLooper:_l(de,A,H,[M,H,X,se]),scrollProgress:O,scrollSnapList:fe.map(O.get),scrollSnaps:fe,scrollTarget:ce,scrollTo:Ze,slideLooper:Ul(I,W,de,V,q,$,fe,H,n),slideFocus:qe,slidesHandler:Wl(t,s,E),slidesInView:De,slideIndexes:ne,slideRegistry:ee,slidesToScroll:Ce,target:se,translate:Ec(I,t)};return nt}function Gl(){let e={},t;function n(c){t=c}function o(c){return e[c]||[]}function r(c){return o(c).forEach(l=>l(t,c)),u}function i(c,l){return e[c]=o(c).concat([l]),u}function s(c,l){return e[c]=o(c).filter(f=>f!==l),u}function a(){e={}}let u={init:n,emit:r,off:s,on:i,clear:a};return u}var Kl={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function ql(e){function t(i,s){return yc(i,s||{})}function n(i){let s=i.breakpoints||{},a=wn(s).filter(u=>e.matchMedia(u).matches).map(u=>s[u]).reduce((u,c)=>t(u,c),{});return t(i,a)}function o(i){return i.map(s=>wn(s.breakpoints||{})).reduce((s,a)=>s.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function Xl(e){let t=[];function n(i,s){return t=s.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(i,e)),s.reduce((a,u)=>Object.assign(a,{[u.name]:u}),{})}function o(){t=t.filter(i=>i.destroy())}return{init:n,destroy:o}}function On(e,t,n){let o=e.ownerDocument,r=o.defaultView,i=ql(r),s=Xl(i),a=Pn(),u=Gl(),{mergeOptions:c,optionsAtMedia:l,optionsMediaQueries:f}=i,{on:m,off:p,emit:d}=u,h=I,y=!1,g,b=c(Kl,On.globalOptions),v=c(b),E=[],R,w,S;function k(){let{container:ne,slides:x}=v;w=(hr(ne)?e.querySelector(ne):ne)||e.children[0];let j=hr(x)?w.querySelectorAll(x):x;S=[].slice.call(j||w.children)}function P(ne){let x=Yl(e,w,S,o,r,ne,u);if(ne.loop&&!x.slideLooper.canLoop()){let B=Object.assign({},ne,{loop:!1});return P(B)}return x}function _(ne,x){y||(b=c(b,ne),v=l(b),E=x||E,k(),g=P(v),f([b,...E.map(({options:B})=>B)]).forEach(B=>a.add(B,"change",I)),v.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(pe),g.eventHandler.init(pe),g.resizeHandler.init(pe),g.slidesHandler.init(pe),g.options.loop&&g.slideLooper.loop(),w.offsetParent&&S.length&&g.dragHandler.init(pe),R=s.init(pe,E)))}function I(ne,x){let B=Ce();W(),_(c({startIndex:B},ne),x),u.emit("reInit")}function W(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),s.destroy(),a.clear()}function L(){y||(y=!0,a.clear(),W(),u.emit("destroy"),u.clear())}function D(ne,x,B){!v.active||y||(g.scrollBody.useBaseFriction().useDuration(x===!0?0:v.duration),g.scrollTo.index(ne,B||0))}function te(ne){let x=g.index.add(1).get();D(x,ne,-1)}function G(ne){let x=g.index.add(-1).get();D(x,ne,1)}function V(){return g.index.add(1).get()!==Ce()}function q(){return g.index.add(-1).get()!==Ce()}function Se(){return g.scrollSnapList}function ie(){return g.scrollProgress.get(g.offsetLocation.get())}function Ce(){return g.index.get()}function $(){return g.indexPrevious.get()}function le(){return g.slidesInView.get()}function de(){return g.slidesInView.get(!1)}function T(){return R}function U(){return g}function fe(){return e}function A(){return w}function ke(){return S}let pe={canScrollNext:V,canScrollPrev:q,containerNode:A,internalEngine:U,destroy:L,off:p,on:m,emit:d,plugins:T,previousScrollSnap:$,reInit:h,rootNode:fe,scrollNext:te,scrollPrev:G,scrollProgress:ie,scrollSnapList:Se,scrollTo:D,selectedScrollSnap:Ce,slideNodes:ke,slidesInView:le,slidesNotInView:de};return _(t,n),setTimeout(()=>u.emit("init"),0),pe}On.globalOptions=void 0;function go(e={},t=[]){let n=(0,Ke.useRef)(e),o=(0,Ke.useRef)(t),[r,i]=(0,Ke.useState)(),[s,a]=(0,Ke.useState)(),u=(0,Ke.useCallback)(()=>{r&&r.reInit(n.current,o.current)},[r]);return(0,Ke.useEffect)(()=>{po(n.current,e)||(n.current=e,u())},[e,u]),(0,Ke.useEffect)(()=>{mc(o.current,t)||(o.current=t,u())},[t,u]),(0,Ke.useEffect)(()=>{if(pc()&&s){On.globalOptions=go.globalOptions;let c=On(s,n.current,o.current);return i(c),()=>c.destroy()}else i(void 0)},[s,i]),[a,r]}go.globalOptions=void 0;var Ue=C(N(),1),At=6e3;function vc(e,t){let n=(0,Ue.useRef)(At),o=(0,Ue.useRef)(null),[r,i]=(0,Ue.useState)(At),s=(0,Ue.useMemo)(()=>fo({delay:r,playOnInit:!1,stopOnFocusIn:!1,stopOnInteraction:!0,stopOnMouseEnter:!1}),[r]),[a,u]=go({duration:t?0:25,loop:!0},[s]),c=(0,Ue.useCallback)(()=>{o.current&&(o.current.style.transform=`scaleX(${1-n.current/At})`)},[]),l=(0,Ue.useCallback)(()=>{let m=s.timeUntilNext();m!==null&&(n.current=Math.max(1,Math.min(At,m))),s.stop(),c()},[s,c]),f=(0,Ue.useCallback)(()=>{n.current=At,i(At),s.reset(),c()},[s,c]);return(0,Ue.useEffect)(()=>{u&&(e?r===n.current?s.play():i(n.current):l())},[u,e,s,r,i,n,l]),(0,Ue.useEffect)(()=>{if(!u)return;let m=0,p=()=>{let g=s.timeUntilNext();!e||g===null||(n.current=Math.max(0,Math.min(At,g)),c(),m=requestAnimationFrame(p))},d=()=>{cancelAnimationFrame(m),e&&(m=requestAnimationFrame(p))},h=()=>cancelAnimationFrame(m),y=()=>{e&&s.play()};return u.on("select",f).on("reInit",y).on("autoplay:timerset",d).on("autoplay:timerstopped",h),c(),d(),()=>{h(),u.off("select",f).off("reInit",y).off("autoplay:timerset",d).off("autoplay:timerstopped",h)}},[u,s,e,n,f,c]),{embla:u,freeze:l,progressRef:o,reset:f,viewportRef:a}}var ue=C(ge(),1);function Rc({photos:e,name:t,imageSizes:n="(max-width: 1279px) 100vw, 45vw",selected:o,paused:r=!1,photoButtonRef:i,onSelect:s,onExpand:a}){let u=(0,Te.useRef)(null),c=(0,Te.useRef)(null),l=(0,Te.useRef)([]),[f,m]=(0,Te.useState)(!0),[p,d]=(0,Te.useState)(!1),[h,y]=(0,Te.useState)(!1),[g,b]=(0,Te.useState)(!1),[v,E]=(0,Te.useState)(!1),{ref:R,visible:w}=Fr(),[S,k]=(0,Te.useState)(!1),[P,_]=(0,Te.useState)(!0),I=(0,Te.useRef)(null),L=`lockerverse-auction-gallery__control ${P||S||h?"is-visible":""}`,D=()=>{I.current&&clearTimeout(I.current),I.current=setTimeout(()=>k(!1),2e3)},te=T=>{if(T.pointerType!=="mouse"){_(!0);return}k(!0),I.current&&clearTimeout(I.current),T.target instanceof Element&&T.target.closest("[data-gallery-control]")||D()};(0,Te.useEffect)(()=>{let T=window.matchMedia("(hover: none), (pointer: coarse)"),U=()=>_(T.matches);return U(),T.addEventListener("change",U),()=>{T.removeEventListener("change",U),clearTimeout(I.current??void 0)}},[]);let G=!(r||f||p||h||g||v)&&w,V=e.length,q=V?(o%V+V)%V:0,{viewportRef:Se,embla:ie,progressRef:Ce,freeze:$,reset:le}=vc(G&&V>1,f);(0,Te.useEffect)(()=>{let T=window.matchMedia("(prefers-reduced-motion: reduce)"),U=()=>m(T.matches);return U(),T.addEventListener("change",U),()=>T.removeEventListener("change",U)},[]),(0,Te.useEffect)(()=>{if(!ie)return;let T=()=>s(ie.selectedScrollSnap());return ie.on("select",T).on("reInit",T),()=>{ie.off("select",T).off("reInit",T)}},[ie,s]),(0,Te.useEffect)(()=>{ie&&ie.selectedScrollSnap()!==q&&ie.scrollTo(q,!0)},[ie,q]),(0,Te.useEffect)(()=>{let T=()=>{document.hidden&&$()},U=()=>E(!1);return T(),document.addEventListener("visibilitychange",T,!0),window.addEventListener("pointerup",U),window.addEventListener("pointercancel",U),()=>{document.removeEventListener("visibilitychange",T,!0),window.removeEventListener("pointerup",U),window.removeEventListener("pointercancel",U)}},[$]);let de=T=>{ie?.scrollTo((T+V)%V,f),le()};return(0,Te.useEffect)(()=>{let T=c.current;c.current=null,T&&document.activeElement===T&&R.current?.querySelector('.lockerverse-auction-gallery__photo[tabindex="0"]')?.focus({preventScroll:!0})},[q,R]),(0,Te.useEffect)(()=>{let T=u.current,U=l.current[q];if(!(T&&U))return;let fe=T.getBoundingClientRect(),A=U.getBoundingClientRect();A.left<fe.left?T.scrollLeft-=fe.left-A.left:A.right>fe.right&&(T.scrollLeft+=A.right-fe.right)},[q,V]),(0,ue.jsxs)("section",{"aria-label":`${t} photos`,className:"lockerverse-auction-gallery",onBlurCapture:T=>{T.currentTarget.contains(T.relatedTarget)||y(!1)},onFocusCapture:T=>y(T.target.matches(":focus-visible")),onKeyDown:T=>{V<2||T.altKey||T.ctrlKey||T.metaKey||T.shiftKey||(T.key==="ArrowLeft"||T.key==="ArrowRight")&&(T.preventDefault(),T.target instanceof HTMLButtonElement&&T.target.classList.contains("lockerverse-auction-gallery__photo")&&(c.current=T.target),de(q+(T.key==="ArrowRight"?1:-1)))},onPointerEnter:T=>{T.pointerType==="mouse"&&d(!0)},onPointerLeave:T=>{T.pointerType==="mouse"&&d(!1)},ref:R,children:[V?(0,ue.jsxs)("div",{className:"lockerverse-auction-gallery__stage",onPointerEnter:te,onPointerLeave:D,onPointerMove:te,children:[(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__viewport",onPointerDownCapture:()=>{$(),E(!0)},ref:Se,children:(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__track",children:e.map((T,U)=>(0,ue.jsx)("div",{"aria-hidden":U!==q,className:"lockerverse-auction-gallery__slide",children:(0,ue.jsx)("button",{"aria-label":`View photo ${U+1} of ${t} at full size`,className:"lockerverse-auction-gallery__photo",onClick:()=>{a(U)},ref:U===q?i:void 0,tabIndex:U===q?0:-1,type:"button",children:(0,ue.jsx)(at,{alt:`${t}, ${U+1} of ${V}`,className:"lockerverse-auction-gallery__image",draggable:!1,fetchPriority:U===0?"high":"auto",height:900,loading:U===q?"eager":"lazy",maxWidth:1920,sizes:U===q?n:`auto, ${n}`,src:T,width:1200})})},`${T}-${U}`))})}),V>1&&!f&&(0,ue.jsxs)("div",{className:"lockerverse-auction-gallery__rotation",children:[(0,ue.jsx)("div",{"aria-hidden":"true",className:"lockerverse-auction-gallery__progress-track",children:(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__progress",ref:Ce,style:{transform:"scaleX(0)"}})}),(0,ue.jsx)("button",{"aria-label":g?"Play photo rotation":"Pause photo rotation",className:`lockerverse-auction-gallery__play ${L}`,"data-gallery-control":!0,onClick:()=>b(T=>!T),title:g?"Play photo rotation":"Pause photo rotation",type:"button",children:g?(0,ue.jsx)(Dr,{"aria-hidden":"true",size:13}):(0,ue.jsx)(Nr,{"aria-hidden":"true",size:13})})]}),V>1&&(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)("button",{"aria-label":"Previous photo",className:`lockerverse-auction-gallery__previous ${L}`,"data-gallery-control":!0,onClick:()=>de(q-1),type:"button",children:(0,ue.jsx)(Nt,{"aria-hidden":"true",className:"lockerverse-auction-gallery__chevron"})}),(0,ue.jsx)("button",{"aria-label":"Next photo",className:`lockerverse-auction-gallery__next ${L}`,"data-gallery-control":!0,onClick:()=>de(q+1),type:"button",children:(0,ue.jsx)(Dn,{"aria-hidden":"true",className:"lockerverse-auction-gallery__chevron"})})]})]}):(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__empty",children:"No photo available"}),V>1&&(0,ue.jsx)("section",{"aria-label":"Choose a photo",className:"lockerverse-auction-gallery__strip",ref:u,children:(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__thumbnails",children:e.map((T,U)=>(0,ue.jsx)("button",{"aria-label":`Show photo ${U+1} of ${V}`,"aria-pressed":q===U,className:`lockerverse-auction-gallery__thumbnail ${q===U?"is-selected":""}`,onClick:()=>de(U),ref:fe=>{l.current[U]=fe},type:"button",children:(0,ue.jsx)(at,{alt:"",className:"lockerverse-auction-gallery__thumbnail-image",height:66,loading:"lazy",maxWidth:192,sizes:"88px",src:T,width:88})},`${T}-${U}`))})})]})}var xe=C(ge(),1);function xc({images:e,fallbackImage:t,name:n,imageSizes:o}){let r=[...new Set(e.filter(Boolean))];!r.length&&t&&r.push(t);let[i,s]=(0,Zt.useState)(0),[a,u]=(0,Zt.useState)(!1),c=(0,Zt.useRef)(null),l=(0,Zt.useRef)(null),f=c.current?.getRootNode(),m=f&&f instanceof ShadowRoot?f:void 0,p=r.length,d=p?(i%p+p)%p:0;return(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(Rc,{imageSizes:o,name:n,onExpand:h=>{s(h),u(!0)},onSelect:s,paused:a,photoButtonRef:c,photos:r,selected:d}),p>0&&(0,xe.jsx)(st.Root,{onOpenChange:u,open:a,children:(0,xe.jsxs)(st.Portal,{container:m,children:[(0,xe.jsx)(st.Backdrop,{className:"lockerverse-auction-gallery__backdrop"}),(0,xe.jsxs)(st.Popup,{"aria-describedby":void 0,className:"lockerverse-auction-gallery__viewer",finalFocus:c,onKeyDown:h=>{p<2||h.altKey||h.ctrlKey||h.metaKey||h.shiftKey||(h.key==="ArrowLeft"||h.key==="ArrowRight")&&(h.preventDefault(),s((d+(h.key==="ArrowRight"?1:-1)+p)%p))},children:[(0,xe.jsxs)(st.Title,{className:"lockerverse-auction-gallery__sr-only",children:[n," \xB7 Photo ",d+1," of ",p]}),(0,xe.jsxs)("div",{className:"lockerverse-auction-gallery__full-image",onTouchCancel:()=>{l.current=null},onTouchEnd:h=>{let y=l.current;l.current=null;let g=h.changedTouches.item(0);if(!(y&&g)||p<2)return;let b=g.clientX-y.x,v=g.clientY-y.y;Math.abs(b)>=45&&Math.abs(b)>Math.abs(v)*1.3&&s((d+(b<0?1:-1)+p)%p)},onTouchMove:h=>{h.touches.length!==1&&(l.current=null)},onTouchStart:h=>{let y=h.touches.item(0);l.current=h.touches.length===1&&y?{x:y.clientX,y:y.clientY}:null},children:[(0,xe.jsx)(at,{alt:`${n}, ${d+1} of ${p}`,height:900,maxWidth:1920,sizes:"100vw",src:r[d],width:1200}),a&&p>1&&(0,xe.jsx)(at,{alt:"","aria-hidden":"true",className:"lockerverse-auction-gallery__preload",height:900,loading:"eager",maxWidth:1920,sizes:"100vw",src:r[(d+1)%p],width:1200})]}),(0,xe.jsx)(st.Close,{"aria-label":"Close photo viewer",className:"lockerverse-auction-gallery__viewer-close",children:(0,xe.jsx)(_r,{"aria-hidden":"true",size:22})}),p>1&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("button",{"aria-label":"Previous photo",className:"lockerverse-auction-gallery__viewer-previous",onClick:()=>s((d-1+p)%p),type:"button",children:(0,xe.jsx)(Nt,{"aria-hidden":"true",size:28})}),(0,xe.jsx)("button",{"aria-label":"Next photo",className:"lockerverse-auction-gallery__viewer-next",onClick:()=>s((d+1)%p),type:"button",children:(0,xe.jsx)(Dn,{"aria-hidden":"true",size:28})})]})]})]})})]})}var ae=C(ge(),1),Jl={1:"h1",2:"h2"};function Ql(e){return e==="Buy Now"?(0,ae.jsx)(_n,{"aria-hidden":"true",size:16}):e==="Available"||e==="Increment"?(0,ae.jsx)(Ln,{"aria-hidden":"true",size:16}):(0,ae.jsx)(Or,{"aria-hidden":"true",size:16})}function Zl(e,t){return e.saleMode==="buy_now"?[["Buy Now",Fe(e.buyNowPriceAmount??0)],["Available",e.availableQuantity===null?"Available":String(e.availableQuantity)]]:t==="finished"?[["Final bid",e.maxBidAmount?Fe(e.maxBidAmount):"No bids"]]:[["Current bid",Fe(e.maxBidAmount??0)],["Floor",Fe(e.minBidAmount??0)],["Increment",Fe(e.bidIncrementAmount??100)]]}function Sc({auction:e,item:t,itemHeadingLevel:n=2,galleryImageSizes:o}){Ft(t.startAt??e.startAt,t.endAt??e.endAt);let[r,i]=(0,ho.useState)(!1),s=(0,ho.useId)(),a=Lt(e,t),u={active:"Closes",draft:"Opens",finished:"Closed"}[a],c=_t(e,a,t),l=t.saleMode==="buy_now",f=(t.description??"").trim().length>240,m=Zl(t,a),p=Jl[n];return(0,ae.jsxs)("section",{className:"lockerverse-auctions__item-summary",children:[(0,ae.jsx)(xc,{fallbackImage:t.image??e.configuration.image??e.community?.banner??e.community?.thumbnail??null,imageSizes:o,images:t.images,name:t.name}),(0,ae.jsxs)("div",{className:"lockerverse-auctions__item-copy",children:[(0,ae.jsx)(p,{children:t.name}),t.description?(0,ae.jsxs)("div",{className:"lockerverse-auctions__item-description",children:[(0,ae.jsx)(Lr,{className:!r&&f?"lockerverse-auctions__description-clamped":void 0,description:t.description,id:s}),f?(0,ae.jsxs)("button",{"aria-controls":s,"aria-expanded":r,className:"lockerverse-auctions__description-toggle",onClick:()=>i(!r),type:"button",children:[r?"Hide description":"Read full description"," ",(0,ae.jsx)(Pr,{"aria-hidden":"true",size:16,style:{transform:r?"rotate(180deg)":void 0}})]}):null]}):null,(0,ae.jsxs)("dl",{className:"lockerverse-auctions__stat-panel",children:[m.map(([d,h])=>(0,ae.jsxs)("div",{className:"lockerverse-auctions__stat-row",children:[(0,ae.jsxs)("dt",{children:[Ql(d),d]}),(0,ae.jsx)("dd",{children:h})]},d)),(0,ae.jsxs)("div",{className:"lockerverse-auctions__stat-row",children:[(0,ae.jsxs)("dt",{children:[(0,ae.jsx)(Ar,{"aria-hidden":"true",size:16}),u]}),(0,ae.jsx)("dd",{className:"lockerverse-auctions__stat-date",children:c})]}),!l&&a==="finished"?(0,ae.jsxs)("div",{className:"lockerverse-auctions__stat-footer",children:[(0,ae.jsxs)("div",{children:[(0,ae.jsx)("dt",{children:"Floor"}),(0,ae.jsx)("dd",{children:Fe(t.minBidAmount??0)})]}),(0,ae.jsxs)("div",{children:[(0,ae.jsx)("dt",{children:"Bid increment"}),(0,ae.jsx)("dd",{children:Fe(t.bidIncrementAmount??100)})]})]}):null]})]})]})}var Ot=C(N(),1);var Y=C(ge(),1),ef={1:"h2",2:"h3"},Cc=/^\d+$/;function tf(e,t){let n=Number(e),o=n*(t.buyNowPriceAmount??0);if(!(Cc.test(e)&&Number.isSafeInteger(o))||n<1)return"Enter a whole-number quantity.";if(!t.additionalCharge)return`Total: ${Fe(o)}`;let r=t.additionalCharge.firstUnitAmountCents+t.additionalCharge.additionalUnitAmountCents*(n-1),i=o+r;return Number.isSafeInteger(i)?`Subtotal: ${Fe(o)} \xB7 ${t.additionalCharge.name}: ${Fe(r)} \xB7 Total: ${Fe(i)}`:"Enter a valid quantity."}function nf(e,t,n){return String(e?t?t.quantity:1:t?t.amount/100:n)}function of(e,t){return Mt(e)?"This item is sold out.":t==="draft"?"This item is not open yet.":t==="finished"?e.saleMode==="buy_now"?"Purchases are closed for this item.":"Bidding is closed for this item.":"This item is not available."}function rf(e,t,n){return Mt(t)?"All available quantities have been purchased.":n==="draft"?`This item opens ${_t(e,"draft",t)}.`:t.saleMode==="buy_now"?"This item is no longer available to purchase.":"Bidding has closed for this item."}function sf(e,t,n,o,r){let i={amount:t?0:Number(o)*100,includeServiceFee:n?n.includeServiceFee:e.serviceFeeEnabled&&e.serviceFeeDefaultChecked,quantity:t?Number(o):1};return t||(i.bidType=r),i}function Tc({auction:e,item:t,initialSelection:n,onContinue:o,onError:r,onBack:i,backHref:s,itemHeadingLevel:a=2}){let u=ef[a],c=t.saleMode==="buy_now",l=Math.ceil(Br(t)/100),[f,m]=(0,Ot.useState)(nf(c,n,l)),[p,d]=(0,Ot.useState)(n?.bidType??"fixed"),[h,y]=(0,Ot.useState)(null),g=(0,Ot.useId)();Ft(t.startAt??e.startAt,t.endAt??e.endAt);let b=Lt(e,t),v=b==="active"&&!Mt(t)&&t.saleMode!=="hybrid";function E(R){if(R.preventDefault(),!Cc.test(f)){y(c?"Enter a whole-number quantity.":"Enter a whole-dollar bid amount.");return}let w=sf(e,c,n,f,p),S=Hr(e,t,w);if(S){y(S),r(S);return}try{nn(e,t,w)}catch{y("Enter a valid amount or quantity.");return}o(w)}return v?(0,Y.jsxs)("form",{className:"lockerverse-auctions__selection",onSubmit:E,children:[(0,Y.jsx)(cf,{buyNow:c,headingTag:u,item:t}),(0,Y.jsxs)("div",{className:"lockerverse-auctions__selection-body",children:[(0,Y.jsx)(lf,{bidType:p,enabled:!c&&!!t.supportsMaximumBids,id:g,onChange:R=>{d(R),y(null)}}),(0,Y.jsxs)("label",{className:"lockerverse-auctions__field",htmlFor:g,children:[uf(c,p),(0,Y.jsxs)("span",{className:"lockerverse-auctions__amount-control",children:[c?null:(0,Y.jsx)("span",{"aria-hidden":"true",children:"$"}),(0,Y.jsx)("input",{"aria-describedby":c?`${g}-help`:void 0,"aria-invalid":!!h,autoComplete:"off",id:g,inputMode:"numeric",onChange:R=>{m(R.target.value),y(null)},placeholder:c?"1":String(l),required:!0,value:f})]})]}),h?(0,Y.jsx)("p",{role:"alert",children:h}):null,c&&(0,Y.jsx)("p",{id:`${g}-help`,children:tf(f,t)}),(0,Y.jsx)(af,{item:t}),(0,Y.jsxs)("div",{className:"lockerverse-auctions__selection-footer",children:[(0,Y.jsx)("p",{children:c?"You pay at checkout.":"We charge your card only if you win."}),(0,Y.jsxs)("button",{className:"lockerverse-auctions__button",disabled:!e.payment,type:"submit",children:[c?"Continue to Checkout":"Continue to Payment"," ",(0,Y.jsx)(ht,{"aria-hidden":"true",size:16})]})]}),e.payment?null:(0,Y.jsx)("p",{role:"alert",children:"Payments are not configured for this auction."})]})]}):(0,Y.jsxs)("div",{className:"lockerverse-auctions__selection lockerverse-auctions__read-only",children:[(0,Y.jsx)("p",{className:"lockerverse-auctions__eyebrow",children:"Item status"}),(0,Y.jsx)(u,{children:of(t,b)}),(0,Y.jsx)("p",{children:rf(e,t,b)}),(0,Y.jsxs)(Dt,{className:"lockerverse-auctions__button",href:s,onBack:i,children:["Browse auction items ",(0,Y.jsx)(ht,{"aria-hidden":"true",size:16})]})]})}function cf({headingTag:e,item:t,buyNow:n}){return(0,Y.jsxs)("div",{className:"lockerverse-auctions__selection-header",children:[(0,Y.jsx)("p",{className:"lockerverse-auctions__eyebrow",children:"Step 1 of 2"}),(0,Y.jsx)(e,{children:n?"Buy this item":"Place your bid"}),n?(0,Y.jsxs)("p",{children:[Fe(t.buyNowPriceAmount??0)," each",t.availableQuantity===null?"":` \xB7 ${t.availableQuantity} available`]}):null]})}function af({item:e}){return e.saleMode==="buy_now"||!e.additionalCharge?null:(0,Y.jsxs)("p",{children:[e.additionalCharge.name,":"," ",Fe(e.additionalCharge.firstUnitAmountCents)," if you win."]})}function uf(e,t){return e?"Quantity":t==="maximum"?"Your maximum bid":"Your bid amount"}function lf({bidType:e,enabled:t,id:n,onChange:o}){return t?(0,Y.jsxs)("fieldset",{className:"lockerverse-auctions__bid-types",children:[(0,Y.jsx)("legend",{children:"Bid type"}),["fixed","maximum"].map(r=>(0,Y.jsxs)("div",{className:"lockerverse-auctions__bid-type",children:[(0,Y.jsxs)("label",{children:[(0,Y.jsx)("input",{checked:e===r,name:`${n}-bid-type`,onChange:()=>o(r),type:"radio",value:r}),(0,Y.jsx)("span",{children:r==="fixed"?"Fixed bid":"Maximum bid"})]}),(0,Y.jsx)(ff,{id:`${n}-${r}-help`,type:r})]},r))]}):null}function ff({id:e,type:t}){let[n,o]=(0,Ot.useState)(!1);return(0,Y.jsxs)("button",{"aria-describedby":n?e:void 0,"aria-label":`About ${t==="fixed"?"fixed":"maximum"} bids`,className:"lockerverse-auctions__bid-help-button",onBlur:()=>o(!1),onClick:()=>o(!0),onFocus:()=>o(!0),onKeyDown:r=>{r.key==="Escape"&&o(!1)},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),type:"button",children:[(0,Y.jsx)(Ir,{"aria-hidden":"true",size:16}),n&&(0,Y.jsx)("span",{className:"lockerverse-auctions__bid-tip",id:e,role:"tooltip",children:t==="fixed"?"Bid this exact amount. It will not increase automatically.":"We bid only what is needed to lead, up to your private limit. Accepted bids cannot be changed or canceled. A new bid is separate."})]})}var It=C(N(),1);var kc=C(N(),1);var Pc=C(ge(),1),Rr=()=>{};function wc(e){let t=(0,kc.useId)(),{auction:n,item:o,selection:r,resumePurchase:i}=e,s=i?i.pricing:nn(n,o,r),a=!!i||o.saleMode==="buy_now";return(0,Pc.jsx)(Ur,{billingFields:null,buttonText:a?"Buy Now":"Authorize Bid",communityName:e.communityName??n.name,contactErrors:{},email:e.contact.email,id:t,includeServiceFee:r.includeServiceFee,isMaximumBid:!a&&r.bidType==="maximum",isPurchase:a,isTerminal:!1,item:o,locked:!0,message:null,onBack:i||e.interactionLocked?void 0:e.onBack,onEmailChange:Rr,onIncludeServiceFeeChange:e.onIncludeServiceFeeChange,onPhoneChange:Rr,onSameAsBillingChange:Rr,onSubmit:u=>u.preventDefault(),paymentFields:null,phone:e.contact.phone,phoneCountry:Vr(e.contact.phone),pricing:s,quantity:r.quantity,sameAsBilling:!0,serviceFeeCents:i?s.serviceFeeCents:nn(n,o,{...r,includeServiceFee:n.serviceFeeEnabled}).serviceFeeCents,serviceFeeEnabled:n.serviceFeeEnabled,shippingFields:null,showFields:!i,submitDisabled:!0})}var ct=C(ge(),1),Ac,Oc=null;function Ic(){return Ac??=import("./auction-payment-view-DYTC57VM.js").then(e=>(Oc=e.AuctionPayment,e)),Ac}function Nc(e,t,n){let o=e?.publishableKey,r=e?.connectedAccountId,[i,s]=(0,It.useState)(null);return(0,It.useEffect)(()=>{if(!(n&&o))return;let a=Ic().then(u=>u.loadAuctionStripe(o,r,t)).catch(()=>null);s({connectedAccountId:r,publishableKey:o,stripe:a,stripeLoader:t})},[n,o,r,t]),i?.publishableKey===o&&i?.connectedAccountId===r&&i?.stripeLoader===t?i?.stripe:void 0}function Dc(e){let[t,n]=(0,It.useState)(()=>Oc),[o,r]=(0,It.useState)(!1),i=!!(e.resumePurchase||e.interactionLocked);return(0,It.useEffect)(()=>{let s=!0;return Ic().then(({AuctionPayment:a})=>{s&&n(()=>a)},()=>{s&&r(!0)}),()=>{s=!1}},[]),t?(0,ct.jsx)(t,{...e}):o?(0,ct.jsxs)("div",{children:[(0,ct.jsx)("p",{role:"alert",children:"Payment details could not load."}),i&&(0,ct.jsx)("p",{children:"Your purchase status is not confirmed. Keep this page open and contact the auction organizer before you try another purchase."}),i?null:(0,ct.jsx)("button",{onClick:e.onBack,type:"button",children:"Back to item"}),!i&&(0,ct.jsx)("button",{onClick:()=>window.location.reload(),type:"button",children:"Reload page to try again"})]}):(0,ct.jsx)(wc,{...e})}var en=C(N(),1);var z=C(ge(),1);function _c({action:e,secondary:t=!1}){let n=`lockerverse-auction-result__action${t?" lockerverse-auction-result__action--secondary":""}`,o=(0,z.jsxs)(z.Fragment,{children:[e.label,t?null:(0,z.jsx)(ht,{"aria-hidden":"true",size:18})]});return e.href?(0,z.jsx)("a",{className:n,href:e.href,onClick:e.onClick,children:o}):(0,z.jsx)("button",{className:n,onClick:e.onClick,type:"button",children:o})}var df={bid:{assurance:"A bid is not a purchase. Payment is collected only if you win at settlement.",assuranceTitle:"Bid authorization saved",badge:"Bid submitted",description:"Your bid and payment method are recorded. You have not been charged for this bid.",next:"Other bidders can still place bids until the item closes.",nextTitle:"Follow the auction",receiptLabel:"Bid summary",steps:["Your bid is recorded. This does not confirm that you have won.","Your saved payment method can be charged if you win at settlement.","Watch your email for bid updates and return to the item to check its status."],title:"Bid received"},purchase:{assurance:"This receipt shows the amount paid for your purchase.",assuranceTitle:"Payment processed",badge:"Purchase confirmed",description:"Your payment is confirmed and your purchase is recorded.",next:"The community handles delivery or collection for this item.",nextTitle:"Next steps",receiptLabel:"Purchase receipt",steps:["Your payment is complete and your purchase is recorded.","The community can review your buyer and delivery details.","Keep your receipt number. Contact the community if you need help with your order."],title:"Purchase complete"},receipt:{assurance:"The amounts below are the recorded purchase amounts, not proof of payment.",assuranceTitle:"Recorded purchase",badge:"Purchase details",description:"Payment status is not confirmed on this page.",next:"Contact the community if you need to confirm your payment or order status.",nextTitle:"Next steps",receiptLabel:"Purchase receipt",steps:["These are the recorded purchase details. They do not confirm payment.","Check your purchase confirmation for the payment result.","Contact the community with your receipt number if you need help."],title:"Purchase details"}};function pf(e){let t=[];return e.amountCents!==void 0&&t.push([e.bidType==="maximum"?"Maximum bid":"Bid amount",et(e.amountCents)]),e.additionalCharge&&t.push([e.additionalCharge.name,et(e.additionalChargeCents??0)]),(e.additionalCharge||e.bidType==="maximum")&&((e.serviceFeeCents??0)>0&&t.push([e.bidType==="maximum"?"Maximum service fee":"Service fee",et(e.serviceFeeCents??0)]),e.totalCents!==void 0&&t.push([e.bidType==="maximum"?"Maximum total if I win":"Total if I win",et(e.totalCents)])),t}function mf({outcome:e,auctionName:t,communityName:n,closesAtLabel:o}){let r=[];return e.kind==="bid"?r.push(...pf(e)):(r.push(["Unit price",et(e.unitAmountCents)],["Quantity",String(e.quantity)],["Subtotal",et(e.subtotalCents)]),e.additionalCharge&&r.push([e.additionalCharge.name,et(e.additionalChargeCents??0)]),e.serviceFeeCents>0&&r.push(["Service fee",et(e.serviceFeeCents)]),r.push([e.kind==="purchase"?"Total paid":"Total",et(e.totalCents)],["Receipt",e.purchaseId])),t&&r.push(["Auction",t]),n&&r.push(["Community",n]),o&&r.push(["Closes",o]),r}function Lc(e){let{outcome:t,itemName:n,imageUrl:o,communityName:r,primaryAction:i,secondaryAction:s,className:a,theme:u="dark",style:c}=e,l=(0,en.useId)(),f=(0,en.useRef)(null);(0,en.useEffect)(()=>{e.focusHeading&&f.current?.focus()},[e.focusHeading]);let m=df[t.kind],p=t.kind==="receipt"?Co:wr,d=t.kind==="receipt"?Co:_n,h=mf(e);return(0,z.jsx)("section",{"aria-labelledby":l,className:["lockerverse-auctions lockerverse-auction-result",a].filter(Boolean).join(" "),"data-lockerverse-theme":u,style:tn({},c,u),children:(0,z.jsxs)("div",{className:"lockerverse-auction-result__layout",children:[(0,z.jsxs)("div",{className:"lockerverse-auction-result__summary",children:[(0,z.jsxs)("span",{className:"lockerverse-auction-result__badge",children:[(0,z.jsx)(p,{"aria-hidden":"true",size:18}),m.badge]}),r?(0,z.jsx)("p",{className:"lockerverse-auction-result__community",children:r}):null,(0,z.jsxs)("h2",{className:"lockerverse-auction-result__title",id:l,ref:f,tabIndex:e.focusHeading?-1:void 0,children:[m.title," for ",n,"."]}),(0,z.jsxs)("p",{className:"lockerverse-auction-result__description",children:[m.description,t.kind==="bid"&&t.bidType==="maximum"?" We bid for you up to your private maximum. If you win, you pay the final winning price plus applicable fees. This submission does not confirm that you are leading.":""]}),(0,z.jsxs)("div",{className:"lockerverse-auction-result__assurance",children:[(0,z.jsx)(d,{"aria-hidden":"true",size:22}),(0,z.jsxs)("div",{children:[(0,z.jsx)("strong",{children:m.assuranceTitle}),(0,z.jsx)("p",{children:m.assurance})]})]}),(0,z.jsxs)("div",{className:"lockerverse-auction-result__assurance",children:[(0,z.jsx)(Ln,{"aria-hidden":"true",size:22}),(0,z.jsxs)("div",{children:[(0,z.jsx)("strong",{children:m.nextTitle}),(0,z.jsx)("p",{children:m.next})]})]}),i||s?(0,z.jsxs)("div",{className:"lockerverse-auction-result__actions",children:[i?(0,z.jsx)(_c,{action:i}):null,s?(0,z.jsx)(_c,{action:s,secondary:!0}):null]}):null]}),(0,z.jsxs)("aside",{"aria-label":m.receiptLabel,className:"lockerverse-auction-result__receipt",children:[o?(0,z.jsx)(at,{alt:n,className:"lockerverse-auction-result__image",height:300,maxWidth:960,sizes:"100vw",src:o,width:420}):null,(0,z.jsxs)("div",{className:"lockerverse-auction-result__receipt-body",children:[(0,z.jsx)("p",{className:"lockerverse-auction-result__eyebrow",children:m.receiptLabel}),(0,z.jsx)("h3",{className:"lockerverse-auction-result__receipt-title",children:n}),(0,z.jsx)("dl",{className:"lockerverse-auction-result__details",children:h.map(([y,g])=>(0,z.jsxs)("div",{children:[(0,z.jsx)("dt",{children:y}),(0,z.jsx)("dd",{children:g})]},y))}),(0,z.jsx)("h4",{children:"What happens next"}),(0,z.jsx)("ol",{className:"lockerverse-auction-result__steps",role:"list",children:m.steps.map((y,g)=>(0,z.jsxs)("li",{children:[(0,z.jsx)("span",{"aria-hidden":"true",className:"lockerverse-auction-result__step-number",children:String(g+1).padStart(2,"0")}),(0,z.jsx)("span",{children:y})]},y))})]})]})]})})}var Pe=C(ge(),1);function gf(e){let{auction:t,item:n,outcome:o}=e,r;return e.backHref?r={href:e.backHref,label:"View auction items"}:e.onBack&&(r={label:"View auction items",onClick:e.onBack}),(0,Pe.jsx)(Lc,{auctionName:t.name,className:e.className,closesAtLabel:_t(t,"active",n),communityName:e.communityName??t.community?.name,focusHeading:!0,imageUrl:n.image??n.images[0]??t.configuration.image??void 0,itemName:n.name,outcome:o,primaryAction:e.returnToItemHref?{href:e.returnToItemHref,label:"Return to item"}:r,secondaryAction:e.returnToItemHref?r:void 0,style:tn(t,e.style,e.theme??"dark"),theme:e.theme})}function hf(e){let{auction:t,itemId:n,resumePurchase:o,className:r,theme:i="dark",style:s}=e,a=(0,Ae.useRef)(null),[u,c]=(0,Ae.useState)(t),l=(0,Ae.useRef)(t),f=u.items.find(G=>G.id===n)??o?.item;Ft(f?.startAt??u.startAt,f?.endAt??u.endAt);let[m,p]=(0,Ae.useState)(()=>o?{amount:0,includeServiceFee:o.submission.includeServiceFee??!1,quantity:o.submission.quantity}:null),[d,h]=(0,Ae.useState)(!!o),y=(0,Ae.useRef)(!0),g=(0,Ae.useRef)(e);g.current=e;let b=(0,Ae.useRef)(null),v=(0,Ae.useCallback)(G=>{y.current&&h(G),b.current!==G&&(b.current=G,Wr(g.current.onInteractionLockChange,G))},[]),E=!!o;(0,Ae.useEffect)(()=>(y.current=!0,v(E),()=>{y.current=!1}),[E,v]);let[R,w]=(0,Ae.useState)({email:"",phone:""}),[S,k]=(0,Ae.useState)(!!o),[P,_]=(0,Ae.useState)(null),[I,W]=(0,Ae.useState)(null);(0,Ae.useEffect)(()=>{!(S||d||o)&&l.current!==t&&(l.current=t,c(t))},[t,S,d,o]);let L=Nc(o?.payment??u.payment,e.stripeLoader,!!o||!!(f&&Lt(u,f)==="active"&&!Mt(f)&&f.saleMode!=="hybrid"));function D(G,V){v(!1),l.current=g.current.auction,c(G),p(null),k(!1),_(V)}function te(G){_(null),p(G),k(!0)}return f?I?(0,Pe.jsx)(gf,{...e,auction:u,item:f,outcome:I}):(0,Pe.jsxs)("section",{className:["lockerverse-auctions",r].filter(Boolean).join(" "),"data-lockerverse-theme":i,ref:a,style:tn(u,s,i),children:[d?null:(0,Pe.jsxs)(Dt,{className:"lockerverse-auctions__back",href:e.backHref,onBack:e.onBack,children:[(0,Pe.jsx)(Nt,{"aria-hidden":"true",size:16})," All items"]}),(0,Pe.jsxs)("div",{className:"lockerverse-auctions__detail",children:[(0,Pe.jsx)(Sc,{auction:u,galleryImageSizes:e.galleryImageSizes,item:f,itemHeadingLevel:e.itemHeadingLevel}),(0,Pe.jsxs)("div",{className:"lockerverse-auctions__transaction",children:[P?(0,Pe.jsx)("p",{className:"lockerverse-auctions__notice",role:"alert",children:P}):null,S&&m?(0,Pe.jsx)(Dc,{...e,appearanceRoot:a,auction:u,communityName:e.communityName??u.community?.name,contact:R,interactionLocked:d,item:f,onBack:()=>k(!1),onContactChange:w,onIncludeServiceFeeChange:G=>p(V=>V&&{...V,includeServiceFee:u.serviceFeeEnabled&&G}),onInteractionLockChange:v,onResult:W,onReview:D,selection:m,stripePromise:L}):(0,Pe.jsx)(Tc,{auction:u,backHref:e.backHref,initialSelection:m,item:f,itemHeadingLevel:e.itemHeadingLevel,onBack:e.onBack,onContinue:te,onError:_}),d?null:(0,Pe.jsxs)(Dt,{className:"lockerverse-auctions__footer-back",href:e.backHref,onBack:e.onBack,children:["Back to auction items ",(0,Pe.jsx)(ht,{"aria-hidden":"true",size:16})]})]})]})]}):(0,Pe.jsxs)("div",{children:[(0,Pe.jsx)("p",{role:"alert",children:"This auction item is no longer available."}),(0,Pe.jsx)(Dt,{href:e.backHref,onBack:e.onBack,children:"Back to auction items"})]})}function Kb(e){let t=(0,Ae.useRef)({auctionId:e.auction.id,client:e.client,itemId:e.itemId});if(t.current.client!==e.client||t.current.auctionId!==e.auction.id||t.current.itemId!==e.itemId)throw new TypeError("Auction item identity cannot change. Remount with a new React key.");if(e.resumePurchase&&(e.resumePurchase.auctionId!==e.auction.id||e.resumePurchase.itemId!==e.itemId||e.resumePurchase.item.id!==e.itemId||e.resumePurchase.item.auctionId!==e.auction.id))throw new TypeError("The purchase recovery record belongs to a different auction item.");return(0,Pe.jsx)(Mr.Provider,{value:e.auction.mediaBaseUrl,children:(0,Pe.jsx)(hf,{...e})})}export{Kb as LockerverseAuctionItem};
2
- /*! For license information please see lockerverse-auction-item-VWFBWF4K.js.LEGAL.txt */
1
+ import{a as So,c as tn,e as Dt,f as Lr,g as Mr,h as at,i as Fr,j as Ft}from"./chunk-UBSAGJVH.js";import{a as nn,b as Hr,l as Vr,m as Ur,n as Wr}from"./chunk-L2IGU4SE.js";import{L as Br,a as N,b as ht,c as wr,d as Pr,e as Nt,f as Dn,g as Ar,h as Co,i as Or,j as Ir,l as Nr,m as Dr,n as _n,p as Ln,q as _r,r as ge,s as et,t as _t,u as Fe,v as Lt,x as Mt}from"./chunk-DFKS7K2W.js";import{a as Nn,b as gt,c as C}from"./chunk-DCANE7XH.js";var rs=Nn(os=>{"use strict";var Kt=N();function Su(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cu=typeof Object.is=="function"?Object.is:Su,Tu=Kt.useState,ku=Kt.useEffect,wu=Kt.useLayoutEffect,Pu=Kt.useDebugValue;function Au(e,t){var n=t(),o=Tu({inst:{value:n,getSnapshot:t}}),r=o[0].inst,i=o[1];return wu(function(){r.value=n,r.getSnapshot=t,cr(r)&&i({inst:r})},[e,n,t]),ku(function(){return cr(r)&&i({inst:r}),e(function(){cr(r)&&i({inst:r})})},[e]),Pu(n),n}function cr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cu(e,n)}catch{return!0}}function Ou(e,t){return t()}var Iu=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ou:Au;os.useSyncExternalStore=Kt.useSyncExternalStore!==void 0?Kt.useSyncExternalStore:Iu});var ar=Nn((Jm,is)=>{"use strict";is.exports=rs()});var cs=Nn(ss=>{"use strict";var oo=N(),Nu=ar();function Du(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _u=typeof Object.is=="function"?Object.is:Du,Lu=Nu.useSyncExternalStore,Mu=oo.useRef,Fu=oo.useEffect,Bu=oo.useMemo,Hu=oo.useDebugValue;ss.useSyncExternalStoreWithSelector=function(e,t,n,o,r){var i=Mu(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Bu(function(){function u(p){if(!c){if(c=!0,l=p,p=o(p),r!==void 0&&s.hasValue){var d=s.value;if(r(d,p))return f=d}return f=p}if(d=f,_u(l,p))return d;var h=o(p);return r!==void 0&&r(d,h)?(l=p,d):(l=p,f=h)}var c=!1,l,f,m=n===void 0?null:n;return[function(){return u(t())},m===null?void 0:function(){return u(m())}]},[t,n,o,r]);var a=Lu(e,i[0],i[1]);return Fu(function(){s.hasValue=!0,s.value=a},[a]),Hu(a),a}});var us=Nn((Zm,as)=>{"use strict";as.exports=cs()});var Ae=C(N(),1);var ho=C(N(),1);var st={};gt(st,{Backdrop:()=>si,Close:()=>pi,Description:()=>yi,Handle:()=>Sn,Popup:()=>Vs,Portal:()=>Ys,Root:()=>nc,Title:()=>sc,Trigger:()=>uc,Viewport:()=>rc,createHandle:()=>lc});var ii=C(N(),1);function Bc(e,t){return function(o,...r){let i=new URL(e);return i.searchParams.set("code",o.toString()),r.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${o}; visit ${i} for the full message.`}}var Hc=Bc("https://base-ui.com/production-error","Base UI"),ze=Hc;var on=C(N(),1),Mn=on.createContext(!1),To=on.createContext(void 0);function Ie(e){let t=on.useContext(To);if(e===!1&&t===void 0)throw new Error(ze(27));return t}var yt=C(N(),1);var zr=C(N(),1),$r={};function Xe(e,t){let n=zr.useRef($r);return n.current===$r&&(n.current=e(t)),n}function Bt(e,t,n,o){let r=Xe(Yr).current;return Vc(r,e,t,n,o)&&Gr(r,[e,t,n,o]),r.callback}function jr(e){let t=Xe(Yr).current;return Uc(t,e)&&Gr(t,e),t.callback}function Yr(){return{callback:null,cleanup:null,refs:[]}}function Vc(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function Uc(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function Gr(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){let o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){let i=t[r];if(i!=null)switch(typeof i){case"function":{let s=i(n);typeof s=="function"&&(o[r]=s);break}case"object":{i.current=n;break}default:}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){let i=t[r];if(i!=null)switch(typeof i){case"function":{let s=o[r];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var qr=C(N(),1);var Kr=C(N(),1),Wc=parseInt(Kr.version,10);function Ht(e){return Wc>=e}function ko(e){if(!qr.isValidElement(e))return null;let t=e,n=t.props;return(Ht(19)?n?.ref:t.ref)??null}function rn(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Vt(){}var wf=Object.freeze([]),he=Object.freeze({});function Xr(e,t){let n={};for(let o in e){let r=e[o];if(t?.hasOwnProperty(o)){let i=t[o](r);i!=null&&Object.assign(n,i);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function Jr(e,t){return typeof e=="function"?e(t):e}function Qr(e,t){return typeof e=="function"?e(t):e}var wo={};function cn(e,t,n,o,r){if(!n&&!o&&!r&&!e)return Fn(t);let i=Fn(e);return t&&(i=sn(i,t)),n&&(i=sn(i,n)),o&&(i=sn(i,o)),r&&(i=sn(i,r)),i}function Zr(e){if(e.length===0)return wo;if(e.length===1)return Fn(e[0]);let t=Fn(e[0]);for(let n=1;n<e.length;n+=1)t=sn(t,e[n]);return t}function Fn(e){return Po(e)?{...ti(e,wo)}:$c(e)}function sn(e,t){return Po(t)?ti(t,e):zc(e,t)}function $c(e){let t={...e};for(let n in t){let o=t[n];ei(n,o)&&(t[n]=ni(o))}return t}function zc(e,t){if(!t)return e;for(let n in t){let o=t[n];switch(n){case"style":{e[n]=rn(e.style,o);break}case"className":{e[n]=Ao(e.className,o);break}default:ei(n,o)?e[n]=jc(e[n],o):e[n]=o}}return e}function ei(e,t){let n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Po(e){return typeof e=="function"}function ti(e,t){return Po(e)?e(t):e??wo}function jc(e,t){return t?e?(...n)=>{let o=n[0];if(oi(o)){let i=o;an(i);let s=t(...n);return i.baseUIHandlerPrevented||e?.(...n),s}let r=t(...n);return e?.(...n),r}:ni(t):e}function ni(e){return e&&((...t)=>{let n=t[0];return oi(n)&&an(n),e(...t)})}function an(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ao(e,t){return t?e?t+" "+e:t:e}function oi(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Oo=C(N(),1);function _e(e,t,n={}){let o=t.render,r=Yc(t,n);if(n.enabled===!1)return null;let i=n.state??he;return qc(e,o,r,i)}function Yc(e,t={}){let{className:n,style:o,render:r}=e,{state:i=he,ref:s,props:a,stateAttributesMapping:u,enabled:c=!0}=t,l=c?Jr(n,i):void 0,f=c?Qr(o,i):void 0,m=c?Xr(i,u):he,p=c&&a?Gc(a):void 0,d=c?rn(m,p)??{}:he;return typeof document<"u"&&(c?Array.isArray(s)?d.ref=jr([d.ref,ko(r),...s]):d.ref=Bt(d.ref,ko(r),s):Bt(null,null)),c?(l!==void 0&&(d.className=Ao(d.className,l)),f!==void 0&&(d.style=rn(d.style,f)),d):he}function Gc(e){return Array.isArray(e)?Zr(e):cn(void 0,e)}var Kc=Symbol.for("react.lazy");function qc(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);let r=cn(n,t.props);r.ref=n.ref;let i=t;return i?.$$typeof===Kc&&(i=yt.Children.toArray(t)[0]),yt.cloneElement(i,r)}if(e&&typeof e=="string")return Xc(e,n);throw new Error(ze(8))}function Xc(e,t){return e==="button"?(0,Oo.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,Oo.createElement)("img",{alt:"",...t,key:t.key}):yt.createElement(e,t)}var bt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),Jc={[bt.startingStyle]:""},Qc={[bt.endingStyle]:""},Ut={transitionStatus(e){return e==="starting"?Jc:e==="ending"?Qc:null}};var We=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=bt.startingStyle]="startingStyle",e[e.endingStyle=bt.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Io=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),Zc={[Io.popupOpen]:""},Yf={[Io.popupOpen]:"",[Io.pressed]:""},ea={[We.open]:""},ta={[We.closed]:""},na={[We.anchorHidden]:""},ri={open(e){return e?Zc:null}};var Wt={open(e){return e?ea:ta},anchorHidden(e){return e?na:null}};var oa={...Wt,...Ut},si=ii.forwardRef(function(t,n){let{render:o,className:r,style:i,forceRender:s=!1,...a}=t,{store:u}=Ie(),c=u.useState("open"),l=u.useState("nested"),f=u.useState("mounted"),m=u.useState("transitionStatus");return _e("div",t,{state:{open:c,transitionStatus:m},ref:[u.context.backdropRef,n],stateAttributesMapping:oa,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:s||!l})});var di=C(N(),1);var $t=C(N(),1);function Bn(){return typeof window<"u"}function Le(e){return Hn(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ra(e){var t;return(t=(Hn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hn(e){return Bn()?e instanceof Node||e instanceof je(e).Node:!1}function ut(e){return Bn()?e instanceof Element||e instanceof je(e).Element:!1}function Ne(e){return Bn()?e instanceof HTMLElement||e instanceof je(e).HTMLElement:!1}function tt(e){return!Bn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof je(e).ShadowRoot}function Vn(e){let{overflow:t,overflowX:n,overflowY:o,display:r}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Un(e){return/^(html|body|#document)$/.test(Le(e))}function Et(e){return je(e).getComputedStyle(e)}function ci(e){if(Le(e)==="html")return e;let t=e.assignedSlot||e.parentNode||tt(e)&&e.host||ra(e);return tt(t)?t.host:t}var ia=C(N(),1),un={...ia};var No=un.useInsertionEffect,sa=No&&No!==un.useLayoutEffect?No:e=>e();function oe(e){let t=Xe(ca).current;return t.next=e,sa(t.effect),t.trampoline}function ca(){let e={next:void 0,callback:aa,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function aa(){}var ai=C(N(),1),ua=()=>{},J=typeof document<"u"?ai.useLayoutEffect:ua;var Wn=C(N(),1),la=Wn.createContext(void 0);function ui(e=!1){let t=Wn.useContext(la);if(t===void 0&&!e)throw new Error(ze(16));return t}var li=C(N(),1);function fi(e){let{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:r=0,isNativeButton:i}=e,s=o&&t!==!1,a=o&&t===!1;return{props:li.useMemo(()=>{let c={onKeyDown(l){n&&t&&l.key!=="Tab"&&l.preventDefault()}};return o||(c.tabIndex=r,!i&&n&&(c.tabIndex=t?r:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[o,n,t,s,a,i,r])}}function ln(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:r=!0,composite:i}=e,s=$t.useRef(null),a=ui(!0),u=i??a!==void 0,{props:c}=fi({focusableWhenDisabled:n,disabled:t,composite:u,tabIndex:o,isNativeButton:r}),l=$t.useCallback(()=>{let p=s.current;Do(p)&&u&&t&&c.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,c.disabled,u]);J(l,[l]);let f=$t.useCallback((p={})=>{let{onClick:d,onMouseDown:h,onKeyUp:y,onKeyDown:g,onPointerDown:b,...v}=p;return cn({onClick(E){if(t){E.preventDefault();return}d?.(E)},onMouseDown(E){t||h?.(E)},onKeyDown(E){if(t||(an(E),g?.(E),E.baseUIHandlerPrevented))return;let R=E.target===E.currentTarget,w=E.currentTarget,S=Do(w),k=!r&&fa(w),P=R&&(r?S:!k),_=E.key==="Enter",I=E.key===" ",W=w.getAttribute("role"),L=W?.startsWith("menuitem")||W==="option"||W==="gridcell";if(R&&u&&I){if(E.defaultPrevented&&L)return;E.preventDefault(),k||r&&S?(w.click(),E.preventBaseUIHandler()):P&&(d?.(E),E.preventBaseUIHandler());return}P&&(!r&&(I||_)&&E.preventDefault(),!r&&_&&d?.(E))},onKeyUp(E){if(!t){if(an(E),y?.(E),E.target===E.currentTarget&&r&&u&&Do(E.currentTarget)&&E.key===" "){E.preventDefault();return}E.baseUIHandlerPrevented||E.target===E.currentTarget&&!r&&!u&&E.key===" "&&d?.(E)}},onPointerDown(E){if(t){E.preventDefault();return}b?.(E)}},r?{type:"button"}:{role:"button"},c,v)},[t,c,u,r]),m=oe(p=>{s.current=p,l()});return{getButtonProps:f,buttonRef:m}}function Do(e){return Ne(e)&&e.tagName==="BUTTON"}function fa(e){return!!(e?.tagName==="A"&&e?.href)}var ye={};gt(ye,{cancelOpen:()=>Ha,chipRemovePress:()=>Ra,clearPress:()=>va,closePress:()=>ba,closeWatcher:()=>Na,decrementPress:()=>Ca,disabled:()=>Ua,drag:()=>Ma,escapeKey:()=>Ia,focusOut:()=>Oa,imperativeAction:()=>za,incrementPress:()=>Sa,initial:()=>$a,inputBlur:()=>wa,inputChange:()=>Ta,inputClear:()=>ka,inputPaste:()=>Pa,inputPress:()=>Aa,itemPress:()=>ya,keyboard:()=>_a,linkPress:()=>Ea,listNavigation:()=>Da,missing:()=>Wa,none:()=>da,outsidePress:()=>ha,pointer:()=>La,scrub:()=>Ba,siblingOpen:()=>Va,swipe:()=>ja,trackPress:()=>xa,triggerFocus:()=>ga,triggerHover:()=>ma,triggerPress:()=>pa,wheel:()=>Fa,windowResize:()=>Ya});var da="none",pa="trigger-press",ma="trigger-hover",ga="trigger-focus",ha="outside-press",ya="item-press",ba="close-press",Ea="link-press",va="clear-press",Ra="chip-remove-press",xa="track-press",Sa="increment-press",Ca="decrement-press",Ta="input-change",ka="input-clear",wa="input-blur",Pa="input-paste",Aa="input-press",Oa="focus-out",Ia="escape-key",Na="close-watcher",Da="list-navigation",_a="keyboard",La="pointer",Ma="drag",Fa="wheel",Ba="scrub",Ha="cancel-open",Va="sibling-open",Ua="disabled",Wa="missing",$a="initial",za="imperative-action",ja="swipe",Ya="window-resize";function we(e,t,n,o){let r=!1,i=!1,s=o??he;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...s}}var pi=di.forwardRef(function(t,n){let{render:o,className:r,style:i,disabled:s=!1,nativeButton:a=!0,...u}=t,{store:c}=Ie(),l=c.useState("open"),{getButtonProps:f,buttonRef:m}=ln({disabled:s,native:a}),p={disabled:s};function d(h){l&&c.setOpen(!1,we(ye.closePress,h.nativeEvent))}return _e("button",t,{state:p,ref:[n,m],props:[{onClick:d},u,f]})});var hi=C(N(),1);var $n=C(N(),1);var mi=0;function Ga(e,t="mui"){let[n,o]=$n.useState(e),r=e||n;return $n.useEffect(()=>{n==null&&(mi+=1,o(`${t}-${mi}`))},[n,t]),r}var gi=un.useId;function zt(e,t){if(gi!==void 0){let n=gi();return e??(t?`${t}-${n}`:n)}return Ga(e,t)}function jt(e){return zt(e,"base-ui")}var yi=hi.forwardRef(function(t,n){let{render:o,className:r,style:i,id:s,...a}=t,{store:u}=Ie(),c=jt(s);return u.useSyncedValueWithCleanup("descriptionElementId",c),_e("p",t,{ref:n,props:[{id:c},a]})});var Bs=C(N(),1);var bi=C(N(),1),Ka=[];function zn(e){bi.useEffect(e,Ka)}var fn=0,ot=class e{static create(){return new e}currentId=fn;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=fn,n()},t)}isStarted(){return this.currentId!==fn}clear=()=>{this.currentId!==fn&&(clearTimeout(this.currentId),this.currentId=fn)};disposeEffect=()=>this.clear};function lt(){let e=Xe(ot.create).current;return zn(e.disposeEffect),e}var Oe={};gt(Oe,{engine:()=>Bo,env:()=>Vo,os:()=>Mo,screenReader:()=>Ho});var Mo={};gt(Mo,{android:()=>Ri,apple:()=>Lo,ios:()=>_o,linux:()=>Za,mac:()=>xi,windows:()=>Qa});function qa(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Xa,platform:Ja,maxTouchPoints:Ei}=qa(),vt=Xa.toLowerCase(),Rt=Ja.toLowerCase();var _o=/^i(os$|p)/.test(Rt)||Rt==="macintel"&&Ei>1,vi="android",Ri=Rt===vi||vt.includes(vi),xi=!_o&&Rt.startsWith("mac"),Qa=Rt.startsWith("win"),Za=!Ri&&/^(linux|chrome os)/.test(Rt),Lo=xi||_o;var Bo={};gt(Bo,{blink:()=>tu,gecko:()=>eu,webkit:()=>Fo});var Fo=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),eu=!Fo&&vt.includes("firefox"),tu=!Fo&&vt.includes("chrom");var Ho={};gt(Ho,{voiceOver:()=>nu});var nu=Lo;var Vo={};gt(Vo,{jsdom:()=>ou});var ou=/jsdom|happydom/.test(vt);function Si(e){e.preventDefault(),e.stopPropagation()}function Ci(e){return"nativeEvent"in e}function Ti(e){return e.pointerType===""&&e.isTrusted?!0:Oe.os.android&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ki(e){return Oe.env.jsdom?!1:!Oe.os.android&&e.width===0&&e.height===0||Oe.os.android&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Uo(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function wi(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var dn="data-base-ui-focusable";var Pi="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ye(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Q(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&tt(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function He(e){return"composedPath"in e?e.composedPath()[0]:e.target}function jn(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ai(e){return e.matches("html,body")}function pn(e){return Ne(e)&&e.matches(Pi)}function Wo(e){return e?e.getAttribute("role")==="combobox"&&pn(e):!1}function $o(e){return e?e.hasAttribute(dn)?e:e.querySelector(`[${dn}]`)||e:null}var Me=C(N(),1);function re(e,t,n,o){return e.addEventListener(t,n,o),()=>{e.removeEventListener(t,n,o)}}function rt(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function mn(e){let t=Xe(ru,e).current;return t.next=e,J(t.effect),t}function ru(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Yn=null,sp=globalThis.requestAnimationFrame,zo=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let r=0;r<n.length;r+=1)n[r]?.(t)};request(t){let n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){let n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}},Gn=new zo,Ge=class e{static create(){return new e}static request(t){return Gn.request(t)}static cancel(t){return Gn.cancel(t)}currentId=Yn;request(t){this.cancel(),this.currentId=Gn.request(()=>{this.currentId=Yn,t()})}cancel=()=>{this.currentId!==Yn&&(Gn.cancel(this.currentId),this.currentId=Yn)};disposeEffect=()=>this.cancel};function Yt(){let e=Xe(Ge.create).current;return zn(e.disposeEffect),e}function be(e){return e?.ownerDocument||document}var Kn=C(N(),1);var Oi={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ii={...Oi,position:"fixed",top:0,left:0},lp={...Oi,position:"absolute"};var Ni=C(ge(),1),Gt=Kn.forwardRef(function(t,n){let[o,r]=Kn.useState();return J(()=>{Oe.screenReader.voiceOver&&Oe.engine.webkit&&r("button")},[]),(0,Ni.jsx)("span",{...t,ref:n,style:Ii,"aria-hidden":o?void 0:!0,...{tabIndex:0,role:o},"data-base-ui-focus-guard":""})});function iu(e){return e.visibility==="hidden"||e.visibility==="collapse"}function qn(e,t=e?Et(e):null){return!e||!e.isConnected||!t||iu(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}var su='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function cu(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return tt(n)?n.host:null}function Yo(e){for(let t of Array.from(e.children))if(Le(t)==="summary")return t;return null}function au(e,t){let n=Yo(t);return!!n&&(e===n||Q(n,e))}function Di(e){let t=e?Le(e):"";return e!=null&&e.matches(su)&&(t!=="summary"||e.parentElement!=null&&Le(e.parentElement)==="details"&&Yo(e.parentElement)===e)&&(t!=="details"||Yo(e)==null)&&(t!=="input"||e.type!=="hidden")}function _i(e){if(!Di(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=cu(t)){let n=t!==e,o=Le(t)==="slot";if(t.hasAttribute("inert")||n&&Le(t)==="details"&&!t.open&&!au(e,t)||t.hasAttribute("hidden")||!o&&!uu(t,n))return!1}return!0}function uu(e,t){let n=Et(e);return t?n.display!=="none":qn(e,n)}function Li(e){let t=e.tabIndex;if(t<0){let n=Le(e);if(n==="details"||n==="audio"||n==="video"||Ne(e)&&e.isContentEditable)return 0}return t}function jo(e){if(Le(e)!=="input")return null;let t=e;return t.type==="radio"&&t.name!==""?t:null}function lu(e,t){let n=jo(e);if(!n)return!0;let o=t.find(r=>{let i=jo(r);return i?.name===n.name&&i.form===n.form&&i.checked});return o?o===n:t.find(r=>{let i=jo(r);return i?.name===n.name&&i.form===n.form})===n}function Mi(e){if(Ne(e)&&Le(e)==="slot"){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ne(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Fi(e,t){Mi(e).forEach(n=>{Di(n)&&t.push(n),Fi(n,t)})}function Bi(e,t,n){Mi(e).forEach(o=>{Ne(o)&&o.matches(t)&&n.push(o),Bi(o,t,n)})}function Xn(e){return _i(e)&&Li(e)>=0}function Go(e){let t=[];return Fi(e,t),t.filter(_i)}function gn(e){let t=Go(e);return t.filter(n=>Li(n)>=0&&lu(n,t))}function Hi(e,t){let n=gn(e),o=n.length;if(o===0)return;let r=Ye(be(e)),i=n.indexOf(r),s=i===-1?t===1?0:o-1:i+t;return n[s]}function Jn(e){return Hi(be(e).body,1)||e}function Qn(e){return Hi(be(e).body,-1)||e}function xt(e,t){let n=t||e.currentTarget,o=e.relatedTarget;return!o||!Q(n,o)}function Vi(e){gn(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ko(e){let t=[];Bi(e,"[data-tabindex]",t),t.forEach(n=>{let o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}function St(e,t,n=!0){return e.filter(r=>r.parentId===t).flatMap(r=>[...!n||r.context?.open?[r]:[],...St(e,r.id,n)])}function qo(e,t){let n=[],o=e.find(r=>r.id===t)?.parentId;for(;o;){let r=e.find(i=>i.id===o);o=r?.parentId,r&&(n=n.concat(r))}return n}function Ct(e){return`data-base-ui-${e}`}var Zn=0;function eo(e,t={}){let{preventScroll:n=!1,sync:o=!1,shouldFocus:r}=t;cancelAnimationFrame(Zn);function i(){r&&!r()||e?.focus({preventScroll:n})}if(o)return i(),Vt;let s=requestAnimationFrame(i);return Zn=s,()=>{Zn===s&&(cancelAnimationFrame(s),Zn=0)}}var Xo={inert:new WeakMap,"aria-hidden":new WeakMap},Ui="data-base-ui-inert",Qo={inert:new WeakSet,"aria-hidden":new WeakSet},hn=new WeakMap,Jo=0;function fu(e){return Qo[e]}function ji(e){return e?tt(e)?e.host:ji(e.parentNode):null}var Wi=(e,t)=>t.map(n=>{if(e.contains(n))return n;let o=ji(n);return e.contains(o)?o:null}).filter(n=>n!=null),$i=e=>{let t=new Set;return e.forEach(n=>{let o=n;for(;o&&!t.has(o);)t.add(o),o=o.parentNode}),t},zi=(e,t,n)=>{let o=[],r=i=>{!i||n.has(i)||Array.from(i.children).forEach(s=>{Le(s)!=="script"&&(t.has(s)?r(s):o.push(s))})};return r(e),o};function du(e,t,n,o,{mark:r=!0}){let i=null;o?i="inert":n&&(i="aria-hidden");let s=null,a=null,u=Wi(t,e),c=r?zi(t,$i(u),new Set(u)):[],l=[],f=[];if(i){let m=Xo[i],p=fu(i);a=p,s=m;let d=Wi(t,Array.from(t.querySelectorAll("[aria-live]"))),h=u.concat(d);zi(t,$i(h),new Set(h)).forEach(g=>{let b=g.getAttribute(i),v=b!==null&&b!=="false",E=(m.get(g)||0)+1;m.set(g,E),l.push(g),E===1&&v&&p.add(g),v||g.setAttribute(i,i==="inert"?"":"true")})}return r&&c.forEach(m=>{let p=(hn.get(m)||0)+1;hn.set(m,p),f.push(m),p===1&&m.setAttribute(Ui,"")}),Jo+=1,()=>{s&&l.forEach(m=>{let d=(s.get(m)||0)-1;s.set(m,d),d||(!a?.has(m)&&i&&m.removeAttribute(i),a?.delete(m))}),r&&f.forEach(m=>{let p=(hn.get(m)||0)-1;hn.set(m,p),p||m.removeAttribute(Ui)}),Jo-=1,Jo||(Xo.inert=new WeakMap,Xo["aria-hidden"]=new WeakMap,Qo.inert=new WeakSet,Qo["aria-hidden"]=new WeakSet,hn=new WeakMap)}}function Zo(e,t={}){let{ariaHidden:n=!1,inert:o=!1,mark:r=!0}=t,i=be(e[0]).body;return du(e,i,n,o,{mark:r})}var Ee=C(N(),1),er=C(So(),1);var to="data-base-ui-click-trigger",pu="data-base-ui-swipe-ignore",mu="data-swipe-ignore",Op=`[${pu}]`,Ip=`[${mu}]`;var Yi={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var Tt=C(ge(),1),Gi=Ee.createContext(null),tr=()=>Ee.useContext(Gi),gu=Ct("portal");function Ki(e={}){let{ref:t,container:n,componentProps:o=he,elementProps:r}=e,i=zt(),a=tr()?.portalNode,[u,c]=Ee.useState(null),[l,f]=Ee.useState(null),m=oe(y=>{y!==null&&f(y)}),p=Ee.useRef(null);J(()=>{if(n===null){p.current&&(p.current=null,f(null),c(null));return}if(i==null)return;let y=(n&&(Hn(n)?n:n.current))??a??document.body;if(y==null){p.current&&(p.current=null,f(null),c(null));return}p.current!==y&&(p.current=y,f(null),c(y))},[n,a,i]);let d=_e("div",o,{ref:[t,m],props:[{id:i,[gu]:""},r]});return{portalNode:l,portalSubtree:u&&d?er.createPortal(d,u):null}}var nr=Ee.forwardRef(function(t,n){let{render:o,className:r,style:i,children:s,container:a,renderGuards:u,...c}=t,{portalNode:l,portalSubtree:f}=Ki({container:a,ref:n,componentProps:t,elementProps:c}),m=Ee.useRef(null),p=Ee.useRef(null),d=Ee.useRef(null),h=Ee.useRef(null),[y,g]=Ee.useState(null),b=Ee.useRef(!1),v=y?.modal,E=y?.open,R=typeof u=="boolean"?u:!!y&&!y.modal&&y.open&&!!l;Ee.useEffect(()=>{if(!l||v)return;function S(k){l&&k.relatedTarget&&xt(k)&&(k.type==="focusin"?b.current&&(Ko(l),b.current=!1):(Vi(l),b.current=!0))}return rt(re(l,"focusin",S,!0),re(l,"focusout",S,!0))},[l,v]),J(()=>{!l||E!==!0||!b.current||(Ko(l),b.current=!1)},[E,l]);let w=Ee.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:p,beforeInsideRef:d,afterInsideRef:h,portalNode:l,setFocusManagerState:g}),[l]);return(0,Tt.jsxs)(Ee.Fragment,{children:[f,(0,Tt.jsxs)(Gi.Provider,{value:w,children:[R&&l&&(0,Tt.jsx)(Gt,{"data-type":"outside",ref:m,onFocus:S=>{if(xt(S,l))d.current?.focus();else{let k=y?y.domReference:null;Qn(k)?.focus()}}}),R&&l&&(0,Tt.jsx)("span",{"aria-owns":l.id,style:Yi}),l&&er.createPortal(s,l),R&&l&&(0,Tt.jsx)(Gt,{"data-type":"outside",ref:p,onFocus:S=>{if(xt(S,l))h.current?.focus();else{let k=y?y.domReference:null;Jn(k)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,we(ye.focusOut,S.nativeEvent))}}})]})]})});var kt=C(N(),1);function qi(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var hu=C(ge(),1),yu=kt.createContext(null),bu=kt.createContext(null),Xi=()=>kt.useContext(yu)?.id||null,no=e=>{let t=kt.useContext(bu);return e??t};function Je(e){return e==null?e:"current"in e?e.current:e}var yn=C(ge(),1);function Eu(e,t){let n=je(He(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}var Ji=20,ft=[];function or(){ft=ft.filter(e=>e.deref()?.isConnected)}function Qi(e){or(),e&&Le(e)!=="body"&&(ft.push(new WeakRef(e)),ft.length>Ji&&(ft=ft.slice(-Ji)))}function Zi(){return or(),ft[ft.length-1]?.deref()}function vu(e){return e?Xn(e)?e:gn(e)[0]||e:null}function es(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let n=Go(e).filter(r=>{let i=r.getAttribute("data-tabindex")||"";return Xn(r)||r.hasAttribute("data-tabindex")&&!i.startsWith("-")}),o=e.getAttribute("tabindex");n.length===0?o!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function rr(e){let{context:t,children:n,disabled:o=!1,initialFocus:r=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:u=!0,openInteractionType:c="",nextFocusableElement:l,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:p,getInsideElements:d}=e,h="rootStore"in t?t.rootStore:t,y=h.useState("open"),g=h.useState("domReferenceElement"),b=h.useState("floatingElement"),{events:v,dataRef:E}=h.context,R=oe(()=>E.current.floatingContext?.nodeId),w=r===!1,S=Wo(g)&&w,k=mn(r),P=mn(i),_=mn(c),I=mn(y),W=no(p),L=tr(),D=Me.useRef(!1),te=Me.useRef(!1),G=Me.useRef(!1),V=Me.useRef(null),q=Me.useRef(""),Se=Me.useRef(""),ie=Me.useRef(null),Ce=Me.useRef(null),$=Bt(ie,m,L?.beforeInsideRef),le=Bt(Ce,L?.afterInsideRef),de=lt(),T=lt(),U=Yt(),fe=L!=null,A=$o(b),ke=oe((x=A)=>x?gn(x):[]),pe=oe(()=>d?.().filter(x=>x!=null)??[]);Me.useEffect(()=>{if(o||!a)return;function x(j){j.key==="Tab"&&Q(A,Ye(be(A)))&&ke().length===0&&!S&&Si(j)}let B=be(A);return re(B,"keydown",x)},[o,A,a,S,ke]),Me.useEffect(()=>{if(o||!y)return;let x=be(A);function B(){G.current=!1}function j(me){let M=He(me),X=pe(),H=Q(b,M)||Q(g,M)||Q(L?.portalNode,M)||X.some(se=>se===M||Q(se,M));G.current=!H,Se.current=me.pointerType||"keyboard",M?.closest(`[${to}]`)&&(te.current=!0,T.start(0,()=>{te.current=!1}))}function Z(){Se.current="keyboard"}return rt(re(x,"pointerdown",j,!0),re(x,"pointerup",B,!0),re(x,"pointercancel",B,!0),re(x,"keydown",Z,!0),B)},[o,b,g,A,y,L,T,pe]),Me.useEffect(()=>{if(o||!u)return;let x=be(A);function B(){te.current=!0,T.start(0,()=>{te.current=!1})}function j(X){let H=He(X);Xn(H)&&(V.current=H)}function Z(X){let H=X.relatedTarget,se=X.currentTarget,Re=He(X);a&&H==null&&Re!=null&&Q(b,Re)&&Qi(Re),queueMicrotask(()=>{let ce=R(),Ze=h.context.triggerElements,O=pe(),F=H?.hasAttribute(Ct("focus-guard"))&&[ie.current,Ce.current,L?.beforeInsideRef.current,L?.afterInsideRef.current,L?.beforeOutsideRef.current,L?.afterOutsideRef.current,Je(f),Je(l)].includes(H),De=!(Q(g,H)||Q(b,H)||Q(H,b)||Q(L?.portalNode,H)||O.some(ee=>ee===H||Q(ee,H))||H!=null&&Ze.hasElement(H)||Ze.hasMatchingElement(ee=>Q(ee,H))||F||W&&(St(W.nodesRef.current,ce).find(ee=>Q(ee.context?.elements.floating,H)||Q(ee.context?.elements.domReference,H))||qo(W.nodesRef.current,ce).find(ee=>[ee.context?.elements.floating,$o(ee.context?.elements.floating)].includes(H)||ee.context?.elements.domReference===H)));if(se===g&&A&&es(A),s&&se!==g&&!qn(Re)&&Ye(x)===x.body){if(Ne(A)&&(A.focus(),s==="popup")){U.request(()=>{A.focus()});return}let ee=ke(),qe=V.current,nt=(qe&&ee.includes(qe)?qe:null)||ee[ee.length-1]||A;Ne(nt)&&nt.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(S||!a)&&H&&De&&!te.current&&(S||H!==Zi())&&(D.current=!0,h.setOpen(!1,we(ye.focusOut,X)))})}function me(){G.current||(E.current.insideReactTree=!0,de.start(0,()=>{E.current.insideReactTree=!1}))}let M=Ne(g)?g:null;if(!(!b&&!M))return rt(M&&re(M,"focusout",Z),M&&re(M,"pointerdown",B),b&&re(b,"focusin",j),b&&re(b,"focusout",Z),b&&L&&re(b,"focusout",me,!0))},[o,g,b,A,a,W,L,h,u,s,ke,S,R,E,de,T,U,l,f,pe]),Me.useEffect(()=>{if(o||!b||!y)return;let x=Array.from(L?.portalNode?.querySelectorAll(`[${Ct("portal")}]`)||[]),j=(W?qo(W.nodesRef.current,R()):[]).find(se=>Wo(se.context?.elements.domReference||null))?.context?.elements.domReference,me=[...[b,...x,ie.current,Ce.current,L?.beforeOutsideRef.current,L?.afterOutsideRef.current,...pe()],j,Je(f),Je(l),S?g:null].filter(se=>se!=null),M=Zo(me,{ariaHidden:a||S,mark:!1}),X=[b,...x].filter(se=>se!=null),H=Zo(X);return()=>{H(),M()}},[y,o,g,b,a,L,S,W,R,l,f,pe]),J(()=>{if(!y||o||!Ne(A))return;let x=be(A),B=Ye(x);queueMicrotask(()=>{let j=k.current,Z=typeof j=="function"?j(_.current||""):j;if(Z===void 0||Z===!1||Q(A,B))return;let M=null,X=()=>(M==null&&(M=ke(A)),M[0]||A),H;Z===!0||Z===null?H=X():H=Je(Z),H=H||X();let se=Q(A,Ye(x));eo(H,{preventScroll:H===A,shouldFocus(){if(!I.current)return!1;if(se)return!0;let Re=Ye(x);return!(Re!==H&&Q(A,Re))}})})},[o,y,A,ke,k,_,I]),J(()=>{if(o||!A)return;let x=be(A),B=Ye(x),j=_.current==null;Qi(B);function Z(M){if(M.open||(q.current=Eu(M.nativeEvent,Se.current)),M.reason===ye.triggerHover&&M.nativeEvent.type==="mouseleave"&&(D.current=!0),M.reason===ye.outsidePress)if(M.nested)D.current=!1;else if(Ti(M.nativeEvent)||ki(M.nativeEvent))D.current=!1;else{let X=!1;be(A).createElement("div").focus({get preventScroll(){return X=!0,!1}}),X?D.current=!1:D.current=!0}}v.on("openchange",Z);function me(){let M=P.current,X=typeof M=="function"?M(q.current):M;if(X===void 0||X===!1)return null;X===null&&(X=!0);let H=g?.isConnected?g:null,se=B?.isConnected&&Le(B)!=="body"?B:null,Re=j?se||H:H||se;return Re||(Re=Zi()||null),typeof X=="boolean"?Re:Je(X)||Re||null}return()=>{v.off("openchange",Z);let M=Ye(x),X=pe(),H=Q(b,M)||X.some(ce=>ce===M||Q(ce,M))||W&&St(W.nodesRef.current,R(),!1).some(ce=>Q(ce.context?.elements.floating,M)),se=P.current,Re=me();queueMicrotask(()=>{let ce=vu(Re),Ze=typeof se!="boolean";se&&!D.current&&Ne(ce)&&(!(!Ze&&ce!==M&&M!==x.body)||H)&&ce.focus({preventScroll:!0}),D.current=!1})}},[o,b,A,P,_,v,W,g,R,pe]),J(()=>{if(!Oe.engine.webkit||y||!b)return;let x=Ye(be(b));!Ne(x)||!pn(x)||Q(b,x)&&x.blur()},[y,b]),J(()=>{if(!(o||!L))return L.setFocusManagerState({modal:a,closeOnFocusOut:u,open:y,onOpenChange:h.setOpen,domReference:g}),()=>{L.setFocusManagerState(null)}},[o,L,a,y,h,u,g]),J(()=>{if(!(o||!A))return es(A),()=>{queueMicrotask(or)}},[o,A]);let ne=!o&&(a?!S:!0)&&(fe||a);return(0,yn.jsxs)(Me.Fragment,{children:[ne&&(0,yn.jsx)(Gt,{"data-type":"inside",ref:$,onFocus:x=>{if(a){let B=ke();eo(B[B.length-1])}else L?.portalNode&&(D.current=!1,xt(x,L.portalNode)?Jn(g)?.focus():Je(f??L.beforeOutsideRef)?.focus())}}),n,ne&&(0,yn.jsx)(Gt,{"data-type":"inside",ref:le,onFocus:x=>{a?eo(ke()[0]):L?.portalNode&&(u&&(D.current=!0),xt(x,L.portalNode)?Qn(g)?.focus():Je(l??L.afterOutsideRef)?.focus())}})]})}var bn=C(N(),1);function ir(e,t={}){let{enabled:n=!0,event:o="click",toggle:r=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:a=0,reason:u=ye.triggerPress}=t,c="rootStore"in e?e.rootStore:e,l=c.context.dataRef,f=bn.useRef(void 0),m=Yt(),p=lt(),d=bn.useMemo(()=>{function h(g,b,v,E){let R=we(u,b,v);g&&E==="touch"&&a>0?p.start(a,()=>{c.setOpen(!0,R)}):c.setOpen(g,R)}function y(g,b,v){let E=l.current.openEvent,R=c.select("domReferenceElement")!==b;return g&&R||!g||!r?!0:E&&s?!v(E.type):!1}return{onPointerDown(g){f.current=g.pointerType},onMouseDown(g){let b=f.current,v=g.nativeEvent,E=c.select("open");if(g.button!==0||o==="click"||Uo(b,!0)&&i)return;let R=y(E,g.currentTarget,k=>k==="click"||k==="mousedown"),w=He(v);if(pn(w)){h(R,v,w,b);return}let S=g.currentTarget;m.request(()=>{h(R,v,S,b)})},onClick(g){if(o==="mousedown-only")return;let b=f.current;if(o==="mousedown"&&b){f.current=void 0;return}if(Uo(b,!0)&&i)return;let v=c.select("open"),E=y(v,g.currentTarget,R=>R==="click"||R==="mousedown"||R==="keydown"||R==="keyup");h(E,g.nativeEvent,g.currentTarget,b)},onKeyDown(){f.current=void 0}}},[l,o,i,u,c,s,r,m,p,a]);return bn.useMemo(()=>n?{reference:d}:he,[n,d])}var Ve=C(N(),1);function Ru(){return!1}function xu(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function sr(e,t={}){let{enabled:n=!0,escapeKey:o=!0,outsidePress:r=!0,outsidePressEvent:i="sloppy",referencePress:s=Ru,bubbles:a,externalTree:u}=t,c="rootStore"in e?e.rootStore:e,l=c.useState("open"),f=c.useState("floatingElement"),{dataRef:m}=c.context,p=no(u),d=oe(typeof r=="function"?r:()=>!1),h=typeof r=="function"?d:r,y=h!==!1,g=oe(()=>i),{escapeKey:b,outsidePress:v}=xu(a),E=Ve.useRef(!1),R=Ve.useRef(!1),w=Ve.useRef(!1),S=Ve.useRef(!1),k=Ve.useRef(""),P=Ve.useRef(null),_=lt(),I=lt(),W=oe(()=>{I.clear(),m.current.insideReactTree=!1}),L=oe($=>{let le=m.current.floatingContext?.nodeId;return(p?St(p.nodesRef.current,le):[]).some(T=>T.context?.open&&!T.context.dataRef.current[$])}),D=oe($=>jn($,c.select("floatingElement"))||jn($,c.select("domReferenceElement"))),te=oe($=>{s()&&c.setOpen(!1,we(ye.triggerPress,$.nativeEvent))}),G=oe($=>{if(!l||!n||!o||$.key!=="Escape"||S.current||!b&&L("__escapeKeyBubbles"))return;let le=Ci($)?$.nativeEvent:$,de=we(ye.escapeKey,le);c.setOpen(!1,de),de.isCanceled||$.preventDefault(),!b&&!de.isPropagationAllowed&&$.stopPropagation()}),V=oe(()=>{m.current.insideReactTree=!0,I.start(0,W)}),q=oe($=>{if(!l||!n||$.button!==0)return;let le=He($.nativeEvent);Q(c.select("floatingElement"),le)&&(E.current||(E.current=!0,R.current=!1))}),Se=oe($=>{!l||!n||($.defaultPrevented||$.nativeEvent.defaultPrevented)&&E.current&&(R.current=!0)});Ve.useEffect(()=>{if(!l||!n)return;m.current.__escapeKeyBubbles=b,m.current.__outsidePressBubbles=v;let $=new ot,le=new ot;function de(){$.clear(),S.current=!0}function T(){$.start(Oe.engine.webkit?5:0,()=>{S.current=!1})}function U(){w.current=!0,le.start(0,()=>{w.current=!1})}function fe(){E.current=!1,R.current=!1}function A(){let O=k.current,F=O==="pen"||!O?"mouse":O,De=g(),ee=typeof De=="function"?De():De;return typeof ee=="string"?ee:ee[F]}function ke(O){let F=A();return F==="intentional"&&O.type!=="click"||F==="sloppy"&&O.type==="click"}function pe(O){let F=m.current.floatingContext?.nodeId,De=p&&St(p.nodesRef.current,F).some(ee=>jn(O,ee.context?.elements.floating));return D(O)||De}function ne(O){if(ke(O)){O.type!=="click"&&!D(O)&&(le.clear(),w.current=!1),W();return}if(m.current.insideReactTree){W();return}let F=He(O),De=`[${Ct("inert")}]`,ee=ut(F)?F.getRootNode():null,qe=Array.from((tt(ee)?ee:be(c.select("floatingElement"))).querySelectorAll(De)),nt=c.context.triggerElements;if(F&&(nt.hasElement(F)||nt.hasMatchingElement(Be=>Q(Be,F))))return;let $e=ut(F)?F:null;for(;$e&&!Un($e);){let Be=ci($e);if(Un(Be)||!ut(Be))break;$e=Be}if(!(qe.length&&ut(F)&&!Ai(F)&&!Q(F,c.select("floatingElement"))&&qe.every(Be=>!Q($e,Be)))){if(Ne(F)&&!("touches"in O)){let Be=Un(F),pt=Et(F),mt=/auto|scroll/,yo=Be||mt.test(pt.overflowX),bo=Be||mt.test(pt.overflowY),Eo=yo&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,vo=bo&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,Ro=pt.direction==="rtl",In=vo&&(Ro?O.offsetX<=F.offsetWidth-F.clientWidth:O.offsetX>F.clientWidth),xo=Eo&&O.offsetY>F.clientHeight;if(In||xo)return}if(!pe(O)){if(A()==="intentional"&&w.current){le.clear(),w.current=!1;return}typeof h=="function"&&!h(O)||L("__outsidePressBubbles")||(c.setOpen(!1,we(ye.outsidePress,O)),W())}}}function x(O){A()!=="sloppy"||O.pointerType==="touch"||!c.select("open")||!n||D(O)||ne(O)}function B(O){if(A()!=="sloppy"||!c.select("open")||!n||D(O))return;let F=O.touches[0];F&&(P.current={startTime:Date.now(),startX:F.clientX,startY:F.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}function j(O,F){let De=He(O);if(!De)return;let ee=re(De,O.type,()=>{F(O),ee()})}function Z(O){k.current="touch",j(O,B)}function me(O){_.clear(),O.type==="pointerdown"&&(k.current=O.pointerType),!(O.type==="mousedown"&&P.current&&!P.current.dismissOnMouseDown)&&j(O,F=>{F.type==="pointerdown"?x(F):ne(F)})}function M(O){if(!E.current)return;let F=R.current;if(fe(),A()==="intentional"){if(O.type==="pointercancel"){F&&U();return}if(!pe(O)){if(F){U();return}typeof h=="function"&&!h(O)||(le.clear(),w.current=!0,W())}}}function X(O){if(A()!=="sloppy"||!P.current||D(O))return;let F=O.touches[0];if(!F)return;let De=Math.abs(F.clientX-P.current.startX),ee=Math.abs(F.clientY-P.current.startY),qe=Math.sqrt(De*De+ee*ee);qe>5&&(P.current.dismissOnTouchEnd=!0),qe>10&&(ne(O),_.clear(),P.current=null)}function H(O){j(O,X)}function se(O){A()!=="sloppy"||!P.current||D(O)||(P.current.dismissOnTouchEnd&&ne(O),_.clear(),P.current=null)}function Re(O){j(O,se)}let ce=be(f),Ze=rt(o&&rt(re(ce,"keydown",G),re(ce,"compositionstart",de),re(ce,"compositionend",T)),y&&rt(re(ce,"click",me,!0),re(ce,"pointerdown",me,!0),re(ce,"pointerup",M,!0),re(ce,"pointercancel",M,!0),re(ce,"mousedown",me,!0),re(ce,"mouseup",M,!0),re(ce,"touchstart",Z,!0),re(ce,"touchmove",H,!0),re(ce,"touchend",Re,!0)));return()=>{Ze(),$.clear(),le.clear(),fe(),w.current=!1}},[m,f,o,y,h,l,n,b,v,G,W,g,L,D,p,c,_]),Ve.useEffect(W,[h,W]);let ie=Ve.useMemo(()=>({onKeyDown:G,onPointerDown:te,onClick:te}),[G,te]),Ce=Ve.useMemo(()=>({onKeyDown:G,onPointerDown:Se,onMouseDown:Se,onClickCapture:V,onMouseDownCapture($){V(),q($)},onPointerDownCapture($){V(),q($)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[G,V,q,Se]);return Ve.useMemo(()=>n?{reference:ie,floating:Ce,trigger:ie}:{},[n,ie,Ce])}var Xt=C(N(),1),qu=C(So(),1);var ts=C(N(),1);function ns(e){let t=ts.useRef(!0);t.current&&(t.current=!1,e())}var ms=C(N(),1);var K=(e,t,n,o,r,i,...s)=>{if(s.length>0)throw new Error(ze(1));let a;if(e&&t&&n&&o&&r&&i)a=(u,c,l,f)=>{let m=e(u,c,l,f),p=t(u,c,l,f),d=n(u,c,l,f),h=o(u,c,l,f),y=r(u,c,l,f);return i(m,p,d,h,y,c,l,f)};else if(e&&t&&n&&o&&r)a=(u,c,l,f)=>{let m=e(u,c,l,f),p=t(u,c,l,f),d=n(u,c,l,f),h=o(u,c,l,f);return r(m,p,d,h,c,l,f)};else if(e&&t&&n&&o)a=(u,c,l,f)=>{let m=e(u,c,l,f),p=t(u,c,l,f),d=n(u,c,l,f);return o(m,p,d,c,l,f)};else if(e&&t&&n)a=(u,c,l,f)=>{let m=e(u,c,l,f),p=t(u,c,l,f);return n(m,p,c,l,f)};else if(e&&t)a=(u,c,l,f)=>{let m=e(u,c,l,f);return t(m,c,l,f)};else if(e)a=e;else throw new Error("Missing arguments");return a};var ds=C(N(),1),ur=C(ar(),1),ps=C(us(),1);var Vu=C(N(),1);var Uu=[],Wu;function ls(){return Wu}function fs(e){Uu.push(e)}var $u=Ht(19),zu=$u?Yu:Gu;function ro(e,t,n,o,r){return zu(e,t,n,o,r)}function ju(e,t,n,o,r){let i=ds.useCallback(()=>t(e.getSnapshot(),n,o,r),[e,t,n,o,r]);return(0,ur.useSyncExternalStore)(e.subscribe,i,i)}fs({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let o=e.syncHooks[n],r=o.selector(o.store.state,o.a1,o.a2,o.a3);Object.is(o.value,r)||(t=!0,o.value=r)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let r of e.syncHooks)n.add(r.store);let o=[];for(let r of n)o.push(r.subscribe(t));return()=>{for(let r of o)r()}}),(0,ur.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Yu(e,t,n,o,r){let i=ls();if(!i)return ju(e,t,n,o,r);let s=i.syncIndex;i.syncIndex+=1;let a;return i.didInitialize?(a=i.syncHooks[s],(a.store!==e||a.selector!==t||!Object.is(a.a1,n)||!Object.is(a.a2,o)||!Object.is(a.a3,r))&&(a.store!==e&&(i.didChangeStore=!0),a.store=e,a.selector=t,a.a1=n,a.a2=o,a.a3=r,a.value=t(e.getSnapshot(),n,o,r))):(a={store:e,selector:t,a1:n,a2:o,a3:r,value:t(e.getSnapshot(),n,o,r)},i.syncHooks.push(a)),a.value}function Gu(e,t,n,o,r){return(0,ps.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,o,r))}var io=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let n=this.updateTick;for(let o of this.listeners){if(n!==this.updateTick)return;o(t)}}update(t){for(let n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){let t={...this.state};this.setState(t)}use(t,n,o,r){return ro(this,t,n,o,r)}};var wt=C(N(),1);var qt=class extends io{constructor(t,n={},o){super(t),this.context=n,this.selectors=o}useSyncedValue(t,n){wt.useDebugValue(t);let o=this;J(()=>{o.state[t]!==n&&o.set(t,n)},[o,t,n])}useSyncedValueWithCleanup(t,n){let o=this;J(()=>(o.state[t]!==n&&o.set(t,n),()=>{o.set(t,void 0)}),[o,t,n])}useSyncedValues(t){let n=this,o=Object.values(t);J(()=>{n.update(t)},[n,...o])}useControlledProp(t,n){wt.useDebugValue(t);let o=this,r=n!==void 0;J(()=>{r&&!Object.is(o.state[t],n)&&o.setState({...o.state,[t]:n})},[o,t,n,r])}select(t,n,o,r){let i=this.selectors[t];return i(this.state,n,o,r)}useState(t,n,o,r){return wt.useDebugValue(t),ro(this,this.selectors[t],n,o,r)}useContextCallback(t,n){wt.useDebugValue(t);let o=oe(n??Vt);this.context[t]=o}useStateSetter(t){let n=wt.useRef(void 0);return n.current===void 0&&(n.current=o=>{this.set(t,o)}),n.current}observe(t,n){let o;typeof t=="function"?o=t:o=this.selectors[t];let r=o(this.state);return n(r,r,this),this.subscribe(i=>{let s=o(i);if(!Object.is(r,s)){let a=r;r=s,n(s,a,this)}})}};var Ku={open:K(e=>e.open),transitionStatus:K(e=>e.transitionStatus),domReferenceElement:K(e=>e.domReferenceElement),referenceElement:K(e=>e.positionReference??e.referenceElement),floatingElement:K(e=>e.floatingElement),floatingId:K(e=>e.floatingId)},dt=class extends qt{constructor(t){let{syncOnly:n,nested:o,onOpenChange:r,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:qi(),nested:o,triggerElements:i},Ku),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&wi(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);let o={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",o)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}};function gs(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:o,floatingId:r,nested:i,onOpenChange:s}=e,a=t.useState("open"),u=t.useState("activeTriggerElement"),c=t.useState(n?"popupElement":"positionerElement"),l=t.context.triggerElements,f=s,m=ms.useRef(null);o===void 0&&m.current===null&&(m.current=new dt({open:a,transitionStatus:void 0,referenceElement:u,floatingElement:c,triggerElements:l,onOpenChange:f,floatingId:r,syncOnly:!0,nested:i}));let p=o??m.current;return t.useSyncedValue("floatingId",r),J(()=>{let d={open:a,floatingId:r,referenceElement:u,floatingElement:c};ut(u)&&(d.domReferenceElement=u),p.state.positionReference===p.state.referenceElement&&(d.positionReference=u),p.update(d)},[a,r,u,c,p]),p.context.onOpenChange=f,p.context.nested=i,p}var lr=C(N(),1);function hs(e,t=!1,n=!1){let[o,r]=lr.useState(e&&t?"idle":void 0),[i,s]=lr.useState(e);return e&&!i&&(s(!0),r("starting")),!e&&i&&o!=="ending"&&!n&&r("ending"),!e&&!i&&o==="ending"&&r(void 0),J(()=>{if(!e&&i&&o!=="ending"&&n){let a=Ge.request(()=>{r("ending")});return()=>{Ge.cancel(a)}}},[e,i,o,n]),J(()=>{if(!e||t)return;let a=Ge.request(()=>{r(void 0)});return()=>{Ge.cancel(a)}},[t,e]),J(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&r("starting");let a=Ge.request(()=>{r("idle")});return()=>{Ge.cancel(a)}},[t,e,i,o]),{mounted:i,setMounted:s,transitionStatus:o}}var Es=C(N(),1);var ys=C(So(),1);function bs(e,t=!1,n=!0){let o=Yt();return oe((r,i=null)=>{o.cancel();let s=Je(e);if(s==null)return;let a=s,u=()=>{ys.flushSync(r)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function c(){Promise.all(a.getAnimations().map(l=>l.finished)).then(()=>{i?.aborted||u()}).catch(()=>{if(n){i?.aborted||u();return}let l=a.getAnimations();!i?.aborted&&l.length>0&&l.some(f=>f.pending||f.playState!=="finished")&&c()})}if(t){let l=bt.startingStyle;if(!a.hasAttribute(l)){o.request(c);return}let f=new MutationObserver(()=>{a.hasAttribute(l)||(f.disconnect(),c())});f.observe(a,{attributes:!0,attributeFilter:[l]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}o.request(c)})}function so(e){let{enabled:t=!0,open:n,ref:o,onComplete:r}=e,i=oe(r),s=bs(o,n,!1);Es.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}var vs={tabIndex:-1,[dn]:""};function Rs(e){return t=>t==="touch"?e.current:!0}function xs(e,t,n=!1){let o=zt(),r=Xi()!=null,i=Xt.useRef(null);e===void 0&&i.current===null&&(i.current=t(o,r));let s=e??i.current;return gs({popupStore:s,treatPopupAsFloatingElement:n,floatingRootContext:s.state.floatingRootContext,floatingId:o,nested:r,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function Xu(e,t){let n=Xt.useRef(null),o=Xt.useRef(null);return Xt.useCallback(r=>{if(e===void 0)return;let i=!1;if(n.current!==null){let s=n.current,a=o.current,u=t.context.triggerElements.getById(s);a&&u===a&&(t.context.triggerElements.delete(s),i=!0),n.current=null,o.current=null}if(r!==null&&(n.current=e,o.current=r,t.context.triggerElements.add(e,r),i=!0),i){let s=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==s&&t.set("triggerCount",s)}},[t,e])}function Ss(e,t,n,o=!1){t?e.preventUnmountingOnClose=!1:o&&(e.preventUnmountingOnClose=!0);let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function Cs(e,t,n,o){let r=n.useState("isMountedByTrigger",e),i=Xu(e,n),s=oe(a=>{if(i(a),!a)return;let u=n.select("open"),c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:a,...u?o:null});return}c==null&&u&&n.update({activeTriggerId:e,activeTriggerElement:a,...o})});return J(()=>{r&&n.update({activeTriggerElement:t.current,...o})},[r,n,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:r}}function Ts(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,o=e.useState("open"),r=e.useState("triggerCount");J(()=>{if(!o){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let i=e.context.triggerElements.size,s={};e.state.triggerCount!==i&&(s.triggerCount=i);let a=e.select("activeTriggerId"),u=null;if(a){let c=e.context.triggerElements.getById(a);c?c!==e.state.activeTriggerElement&&(s.activeTriggerElement=c):u=a}if(!u&&!a&&i===1){let c=e.context.triggerElements.entries().next();if(!c.done){let[l,f]=c.value;s.activeTriggerId=l,s.activeTriggerElement=f}}(s.triggerCount!==void 0||s.activeTriggerId!==void 0||s.activeTriggerElement!==void 0)&&e.update(s),u&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===u&&!e.context.triggerElements.getById(u)){let c=we(ye.none);e.setOpen(!1,c),c.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,r,n])}function ks(e,t,n){let{mounted:o,setMounted:r,transitionStatus:i}=hs(e),s=t.useState("preventUnmountingOnClose"),a=e?!1:s;t.useSyncedValues({mounted:o,transitionStatus:i,preventUnmountingOnClose:a});let u=oe(()=>{r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return so({enabled:o&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||u()}}),{forceUnmount:u,transitionStatus:i}}function ws(e,t){e.useSyncedValues(t),J(()=>()=>{e.update({activeTriggerProps:he,inactiveTriggerProps:he,popupProps:he})},[e])}function Ps(e,t){J(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),J(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}var Jt=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){let o=this.idMap.get(t);o!==n&&(o!==void 0&&this.elementsSet.delete(o),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){let n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function As(){return new dt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Jt,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Is(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:As(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:he,inactiveTriggerProps:he,popupProps:he}}function Ns(e,t,n=!1){return new dt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var En=K(e=>e.triggerIdProp??e.activeTriggerId),fr=K(e=>e.openProp??e.open),Os=K(e=>(e.popupElement?.id??e.floatingId)||void 0);function Ds(e,t){return t!==void 0&&fr(e)&&En(e)===t}function Ju(e,t){return Ds(e,t)?!0:t!==void 0&&fr(e)&&En(e)==null&&e.triggerCount===1}var _s={open:fr,mounted:K(e=>e.mounted),transitionStatus:K(e=>e.transitionStatus),floatingRootContext:K(e=>e.floatingRootContext),triggerCount:K(e=>e.triggerCount),preventUnmountingOnClose:K(e=>e.preventUnmountingOnClose),payload:K(e=>e.payload),activeTriggerId:En,activeTriggerElement:K(e=>e.mounted?e.activeTriggerElement:null),popupId:Os,isTriggerActive:K((e,t)=>t!==void 0&&En(e)===t),isOpenedByTrigger:K((e,t)=>Ds(e,t)),isMountedByTrigger:K((e,t)=>t!==void 0&&En(e)===t&&e.mounted),triggerProps:K((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:K((e,t)=>Ju(e,t)?Os(e):void 0),popupProps:K(e=>e.popupProps),popupElement:K(e=>e.popupElement),positionerElement:K(e=>e.positionerElement)};var Ls=(function(e){return e.nestedDialogs="--nested-dialogs",e})({});var Ms=(function(e){return e[e.open=We.open]="open",e[e.closed=We.closed]="closed",e[e.startingStyle=We.startingStyle]="startingStyle",e[e.endingStyle=We.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});var co=C(N(),1),dr=co.createContext(void 0);function ao(){let e=co.useContext(dr);if(e===void 0)throw new Error(ze(26));return e}var Qu="ArrowUp",Zu="ArrowDown",el="ArrowLeft",tl="ArrowRight",nl="Home",ol="End";var rl=new Set([el,tl]);var il=new Set([Qu,Zu]);var sl=new Set([...rl,...il]),Fs=new Set([...sl,nl,ol]);var Hs=C(ge(),1),cl={...Wt,...Ut,nestedDialogOpen(e){return e?{[Ms.nestedDialogOpen]:""}:null}},Vs=Bs.forwardRef(function(t,n){let{render:o,className:r,style:i,finalFocus:s,initialFocus:a,...u}=t,{store:c}=Ie(),l=c.useState("descriptionElementId"),f=c.useState("disablePointerDismissal"),m=c.useState("floatingRootContext"),p=c.useState("popupProps"),d=c.useState("modal"),h=c.useState("mounted"),y=c.useState("nested"),g=c.useState("nestedOpenDialogCount"),b=c.useState("open"),v=c.useState("openMethod"),E=c.useState("titleElementId"),R=c.useState("transitionStatus"),w=c.useState("role"),S=m.useState("floatingId"),k=u.id??S;ao(),so({open:b,ref:c.context.popupRef,onComplete(){b&&c.context.onOpenChangeComplete?.(!0)}});let P=a===void 0?Rs(c.context.popupRef):a,_=g>0,I=c.useStateSetter("popupElement"),L=_e("div",t,{state:{open:b,nested:y,transitionStatus:R,nestedDialogOpen:_},props:[p,{id:k,"aria-labelledby":E??void 0,"aria-describedby":l??void 0,role:w,...vs,hidden:!h,onKeyDown(D){Fs.has(D.key)&&D.stopPropagation()},style:{[Ls.nestedDialogs]:g}},u],ref:[n,c.context.popupRef,I],stateAttributesMapping:cl});return(0,Hs.jsx)(rr,{context:m,openInteractionType:v,disabled:!h,closeOnFocusOut:!f,initialFocus:P,returnFocus:s,modal:d!==!1,restoreFocus:"popup",children:L})});var js=C(N(),1);function Us(e){return Ht(19)?e:e?"true":void 0}var Ws=C(N(),1),$s=C(ge(),1),zs=Ws.forwardRef(function(t,n){let{cutout:o,...r}=t,i;if(o){let s=o.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${s.left}px ${s.top}px,${s.left}px ${s.bottom}px,${s.right}px ${s.bottom}px,${s.right}px ${s.top}px,${s.left}px ${s.top}px)`}return(0,$s.jsx)("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});var vn=C(ge(),1),Ys=js.forwardRef(function(t,n){let{keepMounted:o=!1,...r}=t,{store:i}=Ie(),s=i.useState("mounted"),a=i.useState("modal"),u=i.useState("open");return s||o?(0,vn.jsx)(dr.Provider,{value:o,children:(0,vn.jsxs)(nr,{ref:n,...r,children:[s&&a===!0&&(0,vn.jsx)(zs,{ref:i.context.internalBackdropRef,inert:Us(!u)}),t.children]})}):null});var tc=C(N(),1);var Zs=C(N(),1);var it=C(N(),1);var Gs={},Ks={},qs="";function al(e){if(typeof document>"u")return!1;let t=be(e);return je(t).innerWidth-t.documentElement.clientWidth>0}function ul(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;let n=be(e),o=n.documentElement,r=n.body,i=Vn(o)?o:r,s=i.style.overflowY,a=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",i.style.overflowY="scroll";let u=i.offsetWidth;i.style.overflowY="hidden";let c=i.offsetWidth;return i.style.overflowY=s,o.style.scrollbarGutter=a,u===c}function ll(e){let t=be(e),n=t.documentElement,o=t.body,r=Vn(n)?n:o,i={overflowY:r.style.overflowY,overflowX:r.style.overflowX};return Object.assign(r.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(r.style,i)}}function fl(e){let t=be(e),n=t.documentElement,o=t.body,r=je(n),i=0,s=0,a=!1,u=Ge.create();if(Oe.engine.webkit&&(r.visualViewport?.scale??1)!==1)return()=>{};function c(){let p=r.getComputedStyle(n),d=r.getComputedStyle(o),g=(p.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,Gs={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},qs=n.style.scrollBehavior,Ks={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};let b=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,E=p.overflowY==="scroll"||d.overflowY==="scroll",R=p.overflowX==="scroll"||d.overflowX==="scroll",w=Math.max(0,r.innerWidth-o.clientWidth),S=Math.max(0,r.innerHeight-o.clientHeight),k=parseFloat(d.marginTop)+parseFloat(d.marginBottom),P=parseFloat(d.marginLeft)+parseFloat(d.marginRight),_=Vn(n)?n:o;if(a=ul(e),a){n.style.scrollbarGutter=g,_.style.overflowY="hidden",_.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:g,overflowY:"hidden",overflowX:"hidden"}),(b||E)&&(n.style.overflowY="scroll"),(v||R)&&(n.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:k||S?`calc(100dvh - ${k+S}px)`:"100dvh",width:P||w?`calc(100vw - ${P+w}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),o.scrollTop=i,o.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function l(){Object.assign(n.style,Gs),Object.assign(o.style,Ks),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=qs)}function f(){l(),u.request(c)}c();let m=re(r,"resize",f);return()=>{u.cancel(),l(),typeof r.removeEventListener=="function"&&m()}}var pr=class{lockCount=0;restore=null;timeoutLock=ot.create();timeoutUnlock=ot.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;let o=be(t).documentElement,r=je(o).getComputedStyle(o).overflowY;if(r==="hidden"||r==="clip"){this.restore=Vt;return}let i=Oe.os.ios||!al(t);this.restore=i?ll(t):fl(t)}},dl=new pr;function Xs(e=!0,t=null){J(()=>{if(e)return dl.acquire(t)},[e,t])}function Js(e){let{store:t,actionsRef:n}=e,o=t.useState("open");Ps(t,o),Ts(t);let{forceUnmount:r}=ks(o,t),i=it.useCallback(()=>{t.setOpen(!1,we(ye.imperativeAction))},[t]);it.useImperativeHandle(n,()=>({unmount:r,close:i}),[r,i])}function Qs({store:e,parentContext:t,isDrawer:n}){let o=e.useState("open"),r=e.useState("disablePointerDismissal"),i=e.useState("modal"),s=e.useState("popupElement"),a=e.useState("floatingRootContext"),[u,c]=it.useState(0),[l,f]=it.useState(0),m=u===0,p=sr(a,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(g){if(!e.context.outsidePressEnabledRef.current||"button"in g&&g.button!==0||"touches"in g&&g.touches.length!==1)return!1;let b=He(g);return m&&!r?i&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===b||e.context.backdropRef.current===b||Q(b,s)&&!b?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:m});Xs(o&&i===!0,s),e.useContextCallback("onNestedDialogOpen",(g,b)=>{c(g),f(b)}),e.useContextCallback("onNestedDialogClose",()=>{c(0),f(0)}),it.useEffect(()=>(t?.onNestedDialogOpen&&o&&t.onNestedDialogOpen(u+1,l+(n?1:0)),t?.onNestedDialogClose&&!o&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&o&&t.onNestedDialogClose()}),[n,o,u,l,t]);let d=p.reference??he,h=p.trigger??he,y=p.floating??he;return ws(e,{activeTriggerProps:d,inactiveTriggerProps:h,popupProps:y,nestedOpenDialogCount:u,nestedOpenDrawerCount:l}),null}var uo=C(N(),1);var pl={..._s,modal:K(e=>e.modal),nested:K(e=>e.nested),nestedOpenDialogCount:K(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:K(e=>e.nestedOpenDrawerCount),disablePointerDismissal:K(e=>e.disablePointerDismissal),openMethod:K(e=>e.openMethod),descriptionElementId:K(e=>e.descriptionElementId),titleElementId:K(e=>e.titleElementId),viewportElement:K(e=>e.viewportElement),role:K(e=>e.role)},Qt=class e extends qt{constructor(t,n,o=!1){let r=new Jt,i=ml(t);i.floatingRootContext=Ns(r,n,o),super(i,{popupRef:uo.createRef(),backdropRef:uo.createRef(),internalBackdropRef:uo.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},pl)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);let o={open:t};Ss(o,t,n.trigger),this.update(o)};static useStore(t,n){return xs(t,(r,i)=>new e(n,r,i),!0).store}};function ml(e={}){return{...Is(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}var Rn=C(ge(),1);function ec(e,t="dialog"){let{children:n,open:o,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:s,disablePointerDismissal:a=!1,modal:u=!0,actionsRef:c,handle:l,triggerId:f,defaultTriggerId:m=null}=e,p=t==="drawer",d=t==="alert-dialog",h=d?!0:u,y=d||a,g=d?"alertdialog":"dialog",b=Ie(!0),E={modal:h,disablePointerDismissal:y,nested:!!b,role:g},R=Qt.useStore(l?.store,{open:r,openProp:o,activeTriggerId:m,triggerIdProp:f,...E});ns(()=>{let I=o===void 0&&R.state.open===!1&&r===!0?{open:!0,activeTriggerId:m}:null;d?R.update(I?{...E,...I}:E):I&&R.update(I)}),R.useControlledProp("openProp",o),R.useControlledProp("triggerIdProp",f),R.useSyncedValues(E),R.useContextCallback("onOpenChange",i),R.useContextCallback("onOpenChangeComplete",s);let w=R.useState("open"),S=R.useState("mounted"),k=R.useState("payload");Js({store:R,actionsRef:c});let P=w||S,_=Zs.useMemo(()=>({store:R}),[R]);return(0,Rn.jsx)(Mn.Provider,{value:!1,children:(0,Rn.jsxs)(To.Provider,{value:_,children:[P&&(0,Rn.jsx)(Qs,{store:R,parentContext:b?.store.context,isDrawer:p}),typeof n=="function"?n({payload:k}):n]})})}function nc(e){let t=tc.useContext(Mn)?"drawer":"dialog";return ec(e,t)}var oc=C(N(),1);var mr=(function(e){return e[e.open=We.open]="open",e[e.closed=We.closed]="closed",e[e.startingStyle=We.startingStyle]="startingStyle",e[e.endingStyle=We.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});var gl={...Wt,...Ut,nested(e){return e?{[mr.nested]:""}:null},nestedDialogOpen(e){return e?{[mr.nestedDialogOpen]:""}:null}},rc=oc.forwardRef(function(t,n){let{render:o,className:r,style:i,children:s,...a}=t,u=ao(),{store:c}=Ie(),l=c.useState("open"),f=c.useState("nested"),m=c.useState("transitionStatus"),p=c.useState("nestedOpenDialogCount"),d=c.useState("mounted"),h=c.useStateSetter("viewportElement"),y=p>0;return _e("div",t,{enabled:u||d,state:{open:l,nested:f,transitionStatus:m,nestedDialogOpen:y},ref:[n,h],stateAttributesMapping:gl,props:[{role:"presentation",hidden:!d,style:{pointerEvents:l?void 0:"none"},children:s},a]})});var ic=C(N(),1);var sc=ic.forwardRef(function(t,n){let{render:o,className:r,style:i,id:s,...a}=t,{store:u}=Ie(),c=jt(s);return u.useSyncedValueWithCleanup("titleElementId",c),_e("h2",t,{ref:n,props:[{id:c},a]})});var lo=C(N(),1);var gr=C(N(),1);var xn=C(N(),1);function cc(e){let t=xn.useRef(""),n=xn.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:xn.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function ac(e,t){let n=oe((i,s)=>{(typeof e=="function"?e():e)||t(s||(Oe.os.ios?"touch":""))}),{onClick:o,onPointerDown:r}=cc(n);return gr.useMemo(()=>({onClick:o,onPointerDown:r}),[o,r])}var uc=lo.forwardRef(function(t,n){let{render:o,className:r,style:i,disabled:s=!1,nativeButton:a=!0,id:u,payload:c,handle:l,...f}=t,m=Ie(!0),p=l?.store??m?.store;if(!p)throw new Error(ze(79));let d=jt(u),h=p.useState("floatingRootContext"),y=p.useState("isOpenedByTrigger",d),g=p.useState("triggerPopupId",d),b=lo.useRef(null),{registerTrigger:v,isMountedByThisTrigger:E}=Cs(d,b,p,{payload:c}),{getButtonProps:R,buttonRef:w}=ln({disabled:s,native:a}),S=ir(h,{enabled:h!=null}),k=ac(()=>p.select("open"),I=>{p.set("openMethod",I)}),P={disabled:s,open:y},_=p.useState("triggerProps",E);return _e("button",t,{state:P,ref:[w,n,v,b],props:[S.reference,_,k,{[to]:"",id:d,"aria-haspopup":"dialog","aria-expanded":y,"aria-controls":g},f,R],stateAttributesMapping:ri})});var Sn=class{constructor(t){this.store=t??new Qt}open(t){let n=t?this.store.context.triggerElements.getById(t):void 0;this.store.setOpen(!0,we(ye.imperativeAction,void 0,n))}openWithPayload(t){this.store.set("payload",t),this.store.setOpen(!0,we(ye.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,we(ye.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function lc(){return new Sn}var Zt=C(N(),1);var Te=C(N(),1);var hl={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function yl(e,t){let n=e.scrollSnapList();return typeof t=="number"?n.map(()=>t):t(n,e)}function bl(e,t){let n=e.rootNode();return t&&t(n)||n}function fo(e={}){let t,n,o,r,i=null,s=0,a=!1,u=!1,c=!1,l=!1;function f(D,te){n=D;let{mergeOptions:G,optionsAtMedia:V}=te,q=G(hl,fo.globalOptions),Se=G(q,e);if(t=V(Se),n.scrollSnapList().length<=1)return;l=t.jump,o=!1,r=yl(n,t.delay);let{eventStore:ie,ownerDocument:Ce}=n.internalEngine(),$=!!n.internalEngine().options.watchDrag,le=bl(n,t.rootNode);ie.add(Ce,"visibilitychange",g),$&&n.on("pointerDown",v),$&&!t.stopOnInteraction&&n.on("pointerUp",E),t.stopOnMouseEnter&&ie.add(le,"mouseenter",R),t.stopOnMouseEnter&&!t.stopOnInteraction&&ie.add(le,"mouseleave",w),t.stopOnFocusIn&&n.on("slideFocusStart",y),t.stopOnFocusIn&&!t.stopOnInteraction&&ie.add(n.containerNode(),"focusout",h),t.playOnInit&&h()}function m(){n.off("pointerDown",v).off("pointerUp",E).off("slideFocusStart",y),y(),o=!0,a=!1}function p(){let{ownerWindow:D}=n.internalEngine();D.clearTimeout(s),s=D.setTimeout(I,r[n.selectedScrollSnap()]),i=new Date().getTime(),n.emit("autoplay:timerset")}function d(){let{ownerWindow:D}=n.internalEngine();D.clearTimeout(s),s=0,i=null,n.emit("autoplay:timerstopped")}function h(){if(!o){if(b()){c=!0;return}a||n.emit("autoplay:play"),p(),a=!0}}function y(){o||(a&&n.emit("autoplay:stop"),d(),a=!1)}function g(){if(b())return c=a,y();c&&h()}function b(){let{ownerDocument:D}=n.internalEngine();return D.visibilityState==="hidden"}function v(){u||y()}function E(){u||h()}function R(){u=!0,y()}function w(){u=!1,h()}function S(D){typeof D<"u"&&(l=D),h()}function k(){a&&y()}function P(){a&&h()}function _(){return a}function I(){let{index:D}=n.internalEngine(),te=D.clone().add(1).get(),G=n.scrollSnapList().length-1,V=t.stopOnLastSnap&&te===G;if(n.canScrollNext()?n.scrollNext(l):n.scrollTo(0,l),n.emit("autoplay:select"),V)return y();h()}function W(){if(!i)return null;let D=r[n.selectedScrollSnap()],te=new Date().getTime()-i;return D-te}return{name:"autoplay",options:e,init:f,destroy:m,play:S,stop:k,reset:P,isPlaying:_,timeUntilNext:W}}fo.globalOptions=void 0;var Ke=C(N(),1);function El(e){return Object.prototype.toString.call(e)==="[object Object]"}function fc(e){return El(e)||Array.isArray(e)}function pc(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function po(e,t){let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==i?!1:n.every(s=>{let a=e[s],u=t[s];return typeof a=="function"?`${a}`==`${u}`:!fc(a)||!fc(u)?a===u:po(a,u)})}function dc(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function mc(e,t){if(e.length!==t.length)return!1;let n=dc(e),o=dc(t);return n.every((r,i)=>{let s=o[i];return po(r,s)})}function br(e){return typeof e=="number"}function hr(e){return typeof e=="string"}function mo(e){return typeof e=="boolean"}function gc(e){return Object.prototype.toString.call(e)==="[object Object]"}function ve(e){return Math.abs(e)}function Er(e){return Math.sign(e)}function Tn(e,t){return ve(e-t)}function vl(e,t){if(e===0||t===0||ve(e)<=ve(t))return 0;let n=Tn(ve(e),ve(t));return ve(n/e)}function Rl(e){return Math.round(e*100)/100}function kn(e){return wn(e).map(Number)}function Qe(e){return e[An(e)]}function An(e){return Math.max(0,e.length-1)}function vr(e,t){return t===An(e)}function hc(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function wn(e){return Object.keys(e)}function yc(e,t){return[e,t].reduce((n,o)=>(wn(o).forEach(r=>{let i=n[r],s=o[r],a=gc(i)&&gc(s);n[r]=a?yc(i,s):s}),n),{})}function yr(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function xl(e,t){let n={start:o,center:r,end:i};function o(){return 0}function r(u){return i(u)/2}function i(u){return t-u}function s(u,c){return hr(e)?n[e](u):e(t,u,c)}return{measure:s}}function Pn(){let e=[];function t(r,i,s,a={passive:!0}){let u;if("addEventListener"in r)r.addEventListener(i,s,a),u=()=>r.removeEventListener(i,s,a);else{let c=r;c.addListener(s),u=()=>c.removeListener(s)}return e.push(u),o}function n(){e=e.filter(r=>r())}let o={add:t,clear:n};return o}function Sl(e,t,n,o){let r=Pn(),i=1e3/60,s=null,a=0,u=0;function c(){r.add(e,"visibilitychange",()=>{e.hidden&&d()})}function l(){p(),r.clear()}function f(y){if(!u)return;s||(s=y,n(),n());let g=y-s;for(s=y,a+=g;a>=i;)n(),a-=i;let b=a/i;o(b),u&&(u=t.requestAnimationFrame(f))}function m(){u||(u=t.requestAnimationFrame(f))}function p(){t.cancelAnimationFrame(u),s=null,a=0,u=0}function d(){s=null,a=0}return{init:c,destroy:l,start:m,stop:p,update:n,render:o}}function Cl(e,t){let n=t==="rtl",o=e==="y",r=o?"y":"x",i=o?"x":"y",s=!o&&n?-1:1,a=l(),u=f();function c(d){let{height:h,width:y}=d;return o?h:y}function l(){return o?"top":n?"right":"left"}function f(){return o?"bottom":n?"left":"right"}function m(d){return d*s}return{scroll:r,cross:i,startEdge:a,endEdge:u,measureSize:c,direction:m}}function Pt(e=0,t=0){let n=ve(e-t);function o(c){return c<e}function r(c){return c>t}function i(c){return o(c)||r(c)}function s(c){return i(c)?o(c)?e:t:c}function a(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:s,reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:a}}function bc(e,t,n){let{constrain:o}=Pt(0,e),r=e+1,i=s(t);function s(m){return n?ve((r+m)%r):o(m)}function a(){return i}function u(m){return i=s(m),f}function c(m){return l().set(a()+m)}function l(){return bc(e,a(),n)}let f={get:a,set:u,add:c,clone:l};return f}function Tl(e,t,n,o,r,i,s,a,u,c,l,f,m,p,d,h,y,g,b){let{cross:v,direction:E}=e,R=["INPUT","SELECT","TEXTAREA"],w={passive:!1},S=Pn(),k=Pn(),P=Pt(50,225).constrain(p.measure(20)),_={mouse:300,touch:400},I={mouse:500,touch:600},W=d?43:25,L=!1,D=0,te=0,G=!1,V=!1,q=!1,Se=!1;function ie(x){if(!b)return;function B(Z){(mo(b)||b(x,Z))&&U(Z)}let j=t;S.add(j,"dragstart",Z=>Z.preventDefault(),w).add(j,"touchmove",()=>{},w).add(j,"touchend",()=>{}).add(j,"touchstart",B).add(j,"mousedown",B).add(j,"touchcancel",A).add(j,"contextmenu",A).add(j,"click",ke,!0)}function Ce(){S.clear(),k.clear()}function $(){let x=Se?n:t;k.add(x,"touchmove",fe,w).add(x,"touchend",A).add(x,"mousemove",fe,w).add(x,"mouseup",A)}function le(x){let B=x.nodeName||"";return R.includes(B)}function de(){return(d?I:_)[Se?"mouse":"touch"]}function T(x,B){let j=f.add(Er(x)*-1),Z=l.byDistance(x,!d).distance;return d||ve(x)<P?Z:y&&B?Z*.5:l.byIndex(j.get(),0).distance}function U(x){let B=yr(x,o);Se=B,q=d&&B&&!x.buttons&&L,L=Tn(r.get(),s.get())>=2,!(B&&x.button!==0)&&(le(x.target)||(G=!0,i.pointerDown(x),c.useFriction(0).useDuration(0),r.set(s),$(),D=i.readPoint(x),te=i.readPoint(x,v),m.emit("pointerDown")))}function fe(x){if(!yr(x,o)&&x.touches.length>=2)return A(x);let j=i.readPoint(x),Z=i.readPoint(x,v),me=Tn(j,D),M=Tn(Z,te);if(!V&&!Se&&(!x.cancelable||(V=me>M,!V)))return A(x);let X=i.pointerMove(x);me>h&&(q=!0),c.useFriction(.3).useDuration(.75),a.start(),r.add(E(X)),x.preventDefault()}function A(x){let j=l.byDistance(0,!1).index!==f.get(),Z=i.pointerUp(x)*de(),me=T(E(Z),j),M=vl(Z,me),X=W-10*M,H=g+M/50;V=!1,G=!1,k.clear(),c.useDuration(X).useFriction(H),u.distance(me,!d),Se=!1,m.emit("pointerUp")}function ke(x){q&&(x.stopPropagation(),x.preventDefault(),q=!1)}function pe(){return G}return{init:ie,destroy:Ce,pointerDown:pe}}function kl(e,t){let o,r;function i(f){return f.timeStamp}function s(f,m){let d=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(yr(f,t)?f:f.touches[0])[d]}function a(f){return o=f,r=f,s(f)}function u(f){let m=s(f)-s(r),p=i(f)-i(o)>170;return r=f,p&&(o=f),m}function c(f){if(!o||!r)return 0;let m=s(r)-s(o),p=i(f)-i(o),d=i(f)-i(r)>170,h=m/p;return p&&!d&&ve(h)>.1?h:0}return{pointerDown:a,pointerMove:u,pointerUp:c,readPoint:s}}function wl(){function e(n){let{offsetTop:o,offsetLeft:r,offsetWidth:i,offsetHeight:s}=n;return{top:o,right:r+i,bottom:o+s,left:r,width:i,height:s}}return{measure:e}}function Pl(e){function t(o){return e*(o/100)}return{measure:t}}function Al(e,t,n,o,r,i,s){let a=[e].concat(o),u,c,l=[],f=!1;function m(y){return r.measureSize(s.measure(y))}function p(y){if(!i)return;c=m(e),l=o.map(m);function g(b){for(let v of b){if(f)return;let E=v.target===e,R=o.indexOf(v.target),w=E?c:l[R],S=m(E?e:o[R]);if(ve(S-w)>=.5){y.reInit(),t.emit("resize");break}}}u=new ResizeObserver(b=>{(mo(i)||i(y,b))&&g(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>u.observe(b))})}function d(){f=!0,u&&u.disconnect()}return{init:p,destroy:d}}function Ol(e,t,n,o,r,i){let s=0,a=0,u=r,c=i,l=e.get(),f=0;function m(){let w=o.get()-e.get(),S=!u,k=0;return S?(s=0,n.set(o),e.set(o),k=w):(n.set(e),s+=w/u,s*=c,l+=s,e.add(s),k=l-f),a=Er(k),f=l,R}function p(){let w=o.get()-t.get();return ve(w)<.001}function d(){return u}function h(){return a}function y(){return s}function g(){return v(r)}function b(){return E(i)}function v(w){return u=w,R}function E(w){return c=w,R}let R={direction:h,duration:d,velocity:y,seek:m,settled:p,useBaseFriction:b,useBaseDuration:g,useFriction:E,useDuration:v};return R}function Il(e,t,n,o,r){let i=r.measure(10),s=r.measure(50),a=Pt(.1,.99),u=!1;function c(){return!(u||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function l(p){if(!c())return;let d=e.reachedMin(t.get())?"min":"max",h=ve(e[d]-t.get()),y=n.get()-t.get(),g=a.constrain(h/s);n.subtract(y*g),!p&&ve(y)<i&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function f(p){u=!p}return{shouldConstrain:c,constrain:l,toggleActive:f}}function Nl(e,t,n,o,r){let i=Pt(-t+e,0),s=f(),a=l(),u=m();function c(d,h){return Tn(d,h)<=1}function l(){let d=s[0],h=Qe(s),y=s.lastIndexOf(d),g=s.indexOf(h)+1;return Pt(y,g)}function f(){return n.map((d,h)=>{let{min:y,max:g}=i,b=i.constrain(d),v=!h,E=vr(n,h);return v?g:E||c(y,b)?y:c(g,b)?g:b}).map(d=>parseFloat(d.toFixed(3)))}function m(){if(t<=e+r)return[i.max];if(o==="keepSnaps")return s;let{min:d,max:h}=a;return s.slice(d,h)}return{snapsContained:u,scrollContainLimit:a}}function Dl(e,t,n){let o=t[0],r=n?o-e:Qe(t);return{limit:Pt(r,o)}}function _l(e,t,n,o){let i=t.min+.1,s=t.max+.1,{reachedMin:a,reachedMax:u}=Pt(i,s);function c(m){return m===1?u(n.get()):m===-1?a(n.get()):!1}function l(m){if(!c(m))return;let p=e*(m*-1);o.forEach(d=>d.add(p))}return{loop:l}}function Ll(e){let{max:t,length:n}=e;function o(i){let s=i-t;return n?s/-n:0}return{get:o}}function Ml(e,t,n,o,r){let{startEdge:i,endEdge:s}=e,{groupSlides:a}=r,u=f().map(t.measure),c=m(),l=p();function f(){return a(o).map(h=>Qe(h)[s]-h[0][i]).map(ve)}function m(){return o.map(h=>n[i]-h[i]).map(h=>-ve(h))}function p(){return a(c).map(h=>h[0]).map((h,y)=>h+u[y])}return{snaps:c,snapsAligned:l}}function Fl(e,t,n,o,r,i){let{groupSlides:s}=r,{min:a,max:u}=o,c=l();function l(){let m=s(i),p=!e||t==="keepSnaps";return n.length===1?[i]:p?m:m.slice(a,u).map((d,h,y)=>{let g=!h,b=vr(y,h);if(g){let v=Qe(y[0])+1;return hc(v)}if(b){let v=An(i)-Qe(y)[0]+1;return hc(v,Qe(y)[0])}return d})}return{slideRegistry:c}}function Bl(e,t,n,o,r){let{reachedAny:i,removeOffset:s,constrain:a}=o;function u(d){return d.concat().sort((h,y)=>ve(h)-ve(y))[0]}function c(d){let h=e?s(d):a(d),y=t.map((b,v)=>({diff:l(b-h,0),index:v})).sort((b,v)=>ve(b.diff)-ve(v.diff)),{index:g}=y[0];return{index:g,distance:h}}function l(d,h){let y=[d,d+n,d-n];if(!e)return d;if(!h)return u(y);let g=y.filter(b=>Er(b)===h);return g.length?u(g):Qe(y)-n}function f(d,h){let y=t[d]-r.get(),g=l(y,h);return{index:d,distance:g}}function m(d,h){let y=r.get()+d,{index:g,distance:b}=c(y),v=!e&&i(y);if(!h||v)return{index:g,distance:d};let E=t[g]-b,R=d+l(E,0);return{index:g,distance:R}}return{byDistance:m,byIndex:f,shortcut:l}}function Hl(e,t,n,o,r,i,s){function a(f){let m=f.distance,p=f.index!==t.get();i.add(m),m&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),s.emit("select"))}function u(f,m){let p=r.byDistance(f,m);a(p)}function c(f,m){let p=t.clone().set(f),d=r.byIndex(p.get(),m);a(d)}return{distance:u,index:c}}function Vl(e,t,n,o,r,i,s,a){let u={passive:!0,capture:!0},c=0;function l(p){if(!a)return;function d(h){if(new Date().getTime()-c>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;let b=n.findIndex(v=>v.includes(h));br(b)&&(r.useDuration(0),o.index(b,0),s.emit("slideFocus"))}i.add(document,"keydown",f,!1),t.forEach((h,y)=>{i.add(h,"focus",g=>{(mo(a)||a(p,g))&&d(y)},u)})}function f(p){p.code==="Tab"&&(c=new Date().getTime())}return{init:l}}function Cn(e){let t=e;function n(){return t}function o(u){t=s(u)}function r(u){t+=s(u)}function i(u){t-=s(u)}function s(u){return br(u)?u:u.get()}return{get:n,set:o,add:r,subtract:i}}function Ec(e,t){let n=e.scroll==="x"?s:a,o=t.style,r=null,i=!1;function s(m){return`translate3d(${m}px,0px,0px)`}function a(m){return`translate3d(0px,${m}px,0px)`}function u(m){if(i)return;let p=Rl(e.direction(m));p!==r&&(o.transform=n(p),r=p)}function c(m){i=!m}function l(){i||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:l,to:u,toggleActive:c}}function Ul(e,t,n,o,r,i,s,a,u){let l=kn(r),f=kn(r).reverse(),m=g().concat(b());function p(S,k){return S.reduce((P,_)=>P-r[_],k)}function d(S,k){return S.reduce((P,_)=>p(P,k)>0?P.concat([_]):P,[])}function h(S){return i.map((k,P)=>({start:k-o[P]+.5+S,end:k+t-.5+S}))}function y(S,k,P){let _=h(k);return S.map(I=>{let W=P?0:-n,L=P?n:0,D=P?"end":"start",te=_[I][D];return{index:I,loopPoint:te,slideLocation:Cn(-1),translate:Ec(e,u[I]),target:()=>a.get()>te?W:L}})}function g(){let S=s[0],k=d(f,S);return y(k,n,!1)}function b(){let S=t-s[0]-1,k=d(l,S);return y(k,-n,!0)}function v(){return m.every(({index:S})=>{let k=l.filter(P=>P!==S);return p(k,t)<=.1})}function E(){m.forEach(S=>{let{target:k,translate:P,slideLocation:_}=S,I=k();I!==_.get()&&(P.to(I),_.set(I))})}function R(){m.forEach(S=>S.translate.clear())}return{canLoop:v,clear:R,loop:E,loopPoints:m}}function Wl(e,t,n){let o,r=!1;function i(u){if(!n)return;function c(l){for(let f of l)if(f.type==="childList"){u.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(l=>{r||(mo(n)||n(u,l))&&c(l)}),o.observe(e,{childList:!0})}function s(){o&&o.disconnect(),r=!0}return{init:i,destroy:s}}function $l(e,t,n,o){let r={},i=null,s=null,a,u=!1;function c(){a=new IntersectionObserver(d=>{u||(d.forEach(h=>{let y=t.indexOf(h.target);r[y]=h}),i=null,s=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(d=>a.observe(d))}function l(){a&&a.disconnect(),u=!0}function f(d){return wn(r).reduce((h,y)=>{let g=parseInt(y),{isIntersecting:b}=r[g];return(d&&b||!d&&!b)&&h.push(g),h},[])}function m(d=!0){if(d&&i)return i;if(!d&&s)return s;let h=f(d);return d&&(i=h),d||(s=h),h}return{init:c,destroy:l,get:m}}function zl(e,t,n,o,r,i){let{measureSize:s,startEdge:a,endEdge:u}=e,c=n[0]&&r,l=d(),f=h(),m=n.map(s),p=y();function d(){if(!c)return 0;let b=n[0];return ve(t[a]-b[a])}function h(){if(!c)return 0;let b=i.getComputedStyle(Qe(o));return parseFloat(b.getPropertyValue(`margin-${u}`))}function y(){return n.map((b,v,E)=>{let R=!v,w=vr(E,v);return R?m[v]+l:w?m[v]+f:E[v+1][a]-b[a]}).map(ve)}return{slideSizes:m,slideSizesWithGaps:p,startGap:l,endGap:f}}function jl(e,t,n,o,r,i,s,a,u){let{startEdge:c,endEdge:l,direction:f}=e,m=br(n);function p(g,b){return kn(g).filter(v=>v%b===0).map(v=>g.slice(v,v+b))}function d(g){return g.length?kn(g).reduce((b,v,E)=>{let R=Qe(b)||0,w=R===0,S=v===An(g),k=r[c]-i[R][c],P=r[c]-i[v][l],_=!o&&w?f(s):0,I=!o&&S?f(a):0,W=ve(P-I-(k+_));return E&&W>t+u&&b.push(v),S&&b.push(g.length),b},[]).map((b,v,E)=>{let R=Math.max(E[v-1]||0);return g.slice(R,b)}):[]}function h(g){return m?p(g,n):d(g)}return{groupSlides:h}}function Yl(e,t,n,o,r,i,s){let{align:a,axis:u,direction:c,startIndex:l,loop:f,duration:m,dragFree:p,dragThreshold:d,inViewThreshold:h,slidesToScroll:y,skipSnaps:g,containScroll:b,watchResize:v,watchSlides:E,watchDrag:R,watchFocus:w}=i,S=2,k=wl(),P=k.measure(t),_=n.map(k.measure),I=Cl(u,c),W=I.measureSize(P),L=Pl(W),D=xl(a,W),te=!f&&!!b,G=f||!!b,{slideSizes:V,slideSizesWithGaps:q,startGap:Se,endGap:ie}=zl(I,P,_,n,G,r),Ce=jl(I,W,y,f,P,_,Se,ie,S),{snaps:$,snapsAligned:le}=Ml(I,D,P,_,Ce),de=-Qe($)+Qe(q),{snapsContained:T,scrollContainLimit:U}=Nl(W,de,le,b,S),fe=te?T:le,{limit:A}=Dl(de,fe,f),ke=bc(An(fe),l,f),pe=ke.clone(),ne=kn(n),x=({dragHandler:$e,scrollBody:Be,scrollBounds:pt,options:{loop:mt}})=>{mt||pt.constrain($e.pointerDown()),Be.seek()},B=({scrollBody:$e,translate:Be,location:pt,offsetLocation:mt,previousLocation:yo,scrollLooper:bo,slideLooper:Eo,dragHandler:vo,animation:Ro,eventHandler:In,scrollBounds:xo,options:{loop:xr}},Sr)=>{let Cr=$e.settled(),Mc=!xo.shouldConstrain(),Tr=xr?Cr:Cr&&Mc,kr=Tr&&!vo.pointerDown();kr&&Ro.stop();let Fc=pt.get()*Sr+yo.get()*(1-Sr);mt.set(Fc),xr&&(bo.loop($e.direction()),Eo.loop()),Be.to(mt.get()),kr&&In.emit("settle"),Tr||In.emit("scroll")},j=Sl(o,r,()=>x(nt),$e=>B(nt,$e)),Z=.68,me=fe[ke.get()],M=Cn(me),X=Cn(me),H=Cn(me),se=Cn(me),Re=Ol(M,H,X,se,m,Z),ce=Bl(f,fe,de,A,se),Ze=Hl(j,ke,pe,Re,ce,se,s),O=Ll(A),F=Pn(),De=$l(t,n,s,h),{slideRegistry:ee}=Fl(te,b,fe,U,Ce,ne),qe=Vl(e,n,ee,Ze,Re,F,s,w),nt={ownerDocument:o,ownerWindow:r,eventHandler:s,containerRect:P,slideRects:_,animation:j,axis:I,dragHandler:Tl(I,e,o,r,se,kl(I,r),M,j,Ze,Re,ce,ke,s,L,p,d,g,Z,R),eventStore:F,percentOfView:L,index:ke,indexPrevious:pe,limit:A,location:M,offsetLocation:H,previousLocation:X,options:i,resizeHandler:Al(t,s,r,n,I,v,k),scrollBody:Re,scrollBounds:Il(A,H,se,Re,L),scrollLooper:_l(de,A,H,[M,H,X,se]),scrollProgress:O,scrollSnapList:fe.map(O.get),scrollSnaps:fe,scrollTarget:ce,scrollTo:Ze,slideLooper:Ul(I,W,de,V,q,$,fe,H,n),slideFocus:qe,slidesHandler:Wl(t,s,E),slidesInView:De,slideIndexes:ne,slideRegistry:ee,slidesToScroll:Ce,target:se,translate:Ec(I,t)};return nt}function Gl(){let e={},t;function n(c){t=c}function o(c){return e[c]||[]}function r(c){return o(c).forEach(l=>l(t,c)),u}function i(c,l){return e[c]=o(c).concat([l]),u}function s(c,l){return e[c]=o(c).filter(f=>f!==l),u}function a(){e={}}let u={init:n,emit:r,off:s,on:i,clear:a};return u}var Kl={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function ql(e){function t(i,s){return yc(i,s||{})}function n(i){let s=i.breakpoints||{},a=wn(s).filter(u=>e.matchMedia(u).matches).map(u=>s[u]).reduce((u,c)=>t(u,c),{});return t(i,a)}function o(i){return i.map(s=>wn(s.breakpoints||{})).reduce((s,a)=>s.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function Xl(e){let t=[];function n(i,s){return t=s.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(i,e)),s.reduce((a,u)=>Object.assign(a,{[u.name]:u}),{})}function o(){t=t.filter(i=>i.destroy())}return{init:n,destroy:o}}function On(e,t,n){let o=e.ownerDocument,r=o.defaultView,i=ql(r),s=Xl(i),a=Pn(),u=Gl(),{mergeOptions:c,optionsAtMedia:l,optionsMediaQueries:f}=i,{on:m,off:p,emit:d}=u,h=I,y=!1,g,b=c(Kl,On.globalOptions),v=c(b),E=[],R,w,S;function k(){let{container:ne,slides:x}=v;w=(hr(ne)?e.querySelector(ne):ne)||e.children[0];let j=hr(x)?w.querySelectorAll(x):x;S=[].slice.call(j||w.children)}function P(ne){let x=Yl(e,w,S,o,r,ne,u);if(ne.loop&&!x.slideLooper.canLoop()){let B=Object.assign({},ne,{loop:!1});return P(B)}return x}function _(ne,x){y||(b=c(b,ne),v=l(b),E=x||E,k(),g=P(v),f([b,...E.map(({options:B})=>B)]).forEach(B=>a.add(B,"change",I)),v.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(pe),g.eventHandler.init(pe),g.resizeHandler.init(pe),g.slidesHandler.init(pe),g.options.loop&&g.slideLooper.loop(),w.offsetParent&&S.length&&g.dragHandler.init(pe),R=s.init(pe,E)))}function I(ne,x){let B=Ce();W(),_(c({startIndex:B},ne),x),u.emit("reInit")}function W(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),s.destroy(),a.clear()}function L(){y||(y=!0,a.clear(),W(),u.emit("destroy"),u.clear())}function D(ne,x,B){!v.active||y||(g.scrollBody.useBaseFriction().useDuration(x===!0?0:v.duration),g.scrollTo.index(ne,B||0))}function te(ne){let x=g.index.add(1).get();D(x,ne,-1)}function G(ne){let x=g.index.add(-1).get();D(x,ne,1)}function V(){return g.index.add(1).get()!==Ce()}function q(){return g.index.add(-1).get()!==Ce()}function Se(){return g.scrollSnapList}function ie(){return g.scrollProgress.get(g.offsetLocation.get())}function Ce(){return g.index.get()}function $(){return g.indexPrevious.get()}function le(){return g.slidesInView.get()}function de(){return g.slidesInView.get(!1)}function T(){return R}function U(){return g}function fe(){return e}function A(){return w}function ke(){return S}let pe={canScrollNext:V,canScrollPrev:q,containerNode:A,internalEngine:U,destroy:L,off:p,on:m,emit:d,plugins:T,previousScrollSnap:$,reInit:h,rootNode:fe,scrollNext:te,scrollPrev:G,scrollProgress:ie,scrollSnapList:Se,scrollTo:D,selectedScrollSnap:Ce,slideNodes:ke,slidesInView:le,slidesNotInView:de};return _(t,n),setTimeout(()=>u.emit("init"),0),pe}On.globalOptions=void 0;function go(e={},t=[]){let n=(0,Ke.useRef)(e),o=(0,Ke.useRef)(t),[r,i]=(0,Ke.useState)(),[s,a]=(0,Ke.useState)(),u=(0,Ke.useCallback)(()=>{r&&r.reInit(n.current,o.current)},[r]);return(0,Ke.useEffect)(()=>{po(n.current,e)||(n.current=e,u())},[e,u]),(0,Ke.useEffect)(()=>{mc(o.current,t)||(o.current=t,u())},[t,u]),(0,Ke.useEffect)(()=>{if(pc()&&s){On.globalOptions=go.globalOptions;let c=On(s,n.current,o.current);return i(c),()=>c.destroy()}else i(void 0)},[s,i]),[a,r]}go.globalOptions=void 0;var Ue=C(N(),1),At=6e3;function vc(e,t){let n=(0,Ue.useRef)(At),o=(0,Ue.useRef)(null),[r,i]=(0,Ue.useState)(At),s=(0,Ue.useMemo)(()=>fo({delay:r,playOnInit:!1,stopOnFocusIn:!1,stopOnInteraction:!0,stopOnMouseEnter:!1}),[r]),[a,u]=go({duration:t?0:25,loop:!0},[s]),c=(0,Ue.useCallback)(()=>{o.current&&(o.current.style.transform=`scaleX(${1-n.current/At})`)},[]),l=(0,Ue.useCallback)(()=>{let m=s.timeUntilNext();m!==null&&(n.current=Math.max(1,Math.min(At,m))),s.stop(),c()},[s,c]),f=(0,Ue.useCallback)(()=>{n.current=At,i(At),s.reset(),c()},[s,c]);return(0,Ue.useEffect)(()=>{u&&(e?r===n.current?s.play():i(n.current):l())},[u,e,s,r,i,n,l]),(0,Ue.useEffect)(()=>{if(!u)return;let m=0,p=()=>{let g=s.timeUntilNext();!e||g===null||(n.current=Math.max(0,Math.min(At,g)),c(),m=requestAnimationFrame(p))},d=()=>{cancelAnimationFrame(m),e&&(m=requestAnimationFrame(p))},h=()=>cancelAnimationFrame(m),y=()=>{e&&s.play()};return u.on("select",f).on("reInit",y).on("autoplay:timerset",d).on("autoplay:timerstopped",h),c(),d(),()=>{h(),u.off("select",f).off("reInit",y).off("autoplay:timerset",d).off("autoplay:timerstopped",h)}},[u,s,e,n,f,c]),{embla:u,freeze:l,progressRef:o,reset:f,viewportRef:a}}var ue=C(ge(),1);function Rc({photos:e,name:t,imageSizes:n="(max-width: 1279px) 100vw, 45vw",selected:o,paused:r=!1,photoButtonRef:i,onSelect:s,onExpand:a}){let u=(0,Te.useRef)(null),c=(0,Te.useRef)(null),l=(0,Te.useRef)([]),[f,m]=(0,Te.useState)(!0),[p,d]=(0,Te.useState)(!1),[h,y]=(0,Te.useState)(!1),[g,b]=(0,Te.useState)(!1),[v,E]=(0,Te.useState)(!1),{ref:R,visible:w}=Fr(),[S,k]=(0,Te.useState)(!1),[P,_]=(0,Te.useState)(!0),I=(0,Te.useRef)(null),L=`lockerverse-auction-gallery__control ${P||S||h?"is-visible":""}`,D=()=>{I.current&&clearTimeout(I.current),I.current=setTimeout(()=>k(!1),2e3)},te=T=>{if(T.pointerType!=="mouse"){_(!0);return}k(!0),I.current&&clearTimeout(I.current),T.target instanceof Element&&T.target.closest("[data-gallery-control]")||D()};(0,Te.useEffect)(()=>{let T=window.matchMedia("(hover: none), (pointer: coarse)"),U=()=>_(T.matches);return U(),T.addEventListener("change",U),()=>{T.removeEventListener("change",U),clearTimeout(I.current??void 0)}},[]);let G=!(r||f||p||h||g||v)&&w,V=e.length,q=V?(o%V+V)%V:0,{viewportRef:Se,embla:ie,progressRef:Ce,freeze:$,reset:le}=vc(G&&V>1,f);(0,Te.useEffect)(()=>{let T=window.matchMedia("(prefers-reduced-motion: reduce)"),U=()=>m(T.matches);return U(),T.addEventListener("change",U),()=>T.removeEventListener("change",U)},[]),(0,Te.useEffect)(()=>{if(!ie)return;let T=()=>s(ie.selectedScrollSnap());return ie.on("select",T).on("reInit",T),()=>{ie.off("select",T).off("reInit",T)}},[ie,s]),(0,Te.useEffect)(()=>{ie&&ie.selectedScrollSnap()!==q&&ie.scrollTo(q,!0)},[ie,q]),(0,Te.useEffect)(()=>{let T=()=>{document.hidden&&$()},U=()=>E(!1);return T(),document.addEventListener("visibilitychange",T,!0),window.addEventListener("pointerup",U),window.addEventListener("pointercancel",U),()=>{document.removeEventListener("visibilitychange",T,!0),window.removeEventListener("pointerup",U),window.removeEventListener("pointercancel",U)}},[$]);let de=T=>{ie?.scrollTo((T+V)%V,f),le()};return(0,Te.useEffect)(()=>{let T=c.current;c.current=null,T&&document.activeElement===T&&R.current?.querySelector('.lockerverse-auction-gallery__photo[tabindex="0"]')?.focus({preventScroll:!0})},[q,R]),(0,Te.useEffect)(()=>{let T=u.current,U=l.current[q];if(!(T&&U))return;let fe=T.getBoundingClientRect(),A=U.getBoundingClientRect();A.left<fe.left?T.scrollLeft-=fe.left-A.left:A.right>fe.right&&(T.scrollLeft+=A.right-fe.right)},[q,V]),(0,ue.jsxs)("section",{"aria-label":`${t} photos`,className:"lockerverse-auction-gallery",onBlurCapture:T=>{T.currentTarget.contains(T.relatedTarget)||y(!1)},onFocusCapture:T=>y(T.target.matches(":focus-visible")),onKeyDown:T=>{V<2||T.altKey||T.ctrlKey||T.metaKey||T.shiftKey||(T.key==="ArrowLeft"||T.key==="ArrowRight")&&(T.preventDefault(),T.target instanceof HTMLButtonElement&&T.target.classList.contains("lockerverse-auction-gallery__photo")&&(c.current=T.target),de(q+(T.key==="ArrowRight"?1:-1)))},onPointerEnter:T=>{T.pointerType==="mouse"&&d(!0)},onPointerLeave:T=>{T.pointerType==="mouse"&&d(!1)},ref:R,children:[V?(0,ue.jsxs)("div",{className:"lockerverse-auction-gallery__stage",onPointerEnter:te,onPointerLeave:D,onPointerMove:te,children:[(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__viewport",onPointerDownCapture:()=>{$(),E(!0)},ref:Se,children:(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__track",children:e.map((T,U)=>(0,ue.jsx)("div",{"aria-hidden":U!==q,className:"lockerverse-auction-gallery__slide",children:(0,ue.jsx)("button",{"aria-label":`View photo ${U+1} of ${t} at full size`,className:"lockerverse-auction-gallery__photo",onClick:()=>{a(U)},ref:U===q?i:void 0,tabIndex:U===q?0:-1,type:"button",children:(0,ue.jsx)(at,{alt:`${t}, ${U+1} of ${V}`,className:"lockerverse-auction-gallery__image",draggable:!1,fetchPriority:U===0?"high":"auto",height:900,loading:U===q?"eager":"lazy",maxWidth:1920,sizes:U===q?n:`auto, ${n}`,src:T,width:1200})})},`${T}-${U}`))})}),V>1&&!f&&(0,ue.jsxs)("div",{className:"lockerverse-auction-gallery__rotation",children:[(0,ue.jsx)("div",{"aria-hidden":"true",className:"lockerverse-auction-gallery__progress-track",children:(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__progress",ref:Ce,style:{transform:"scaleX(0)"}})}),(0,ue.jsx)("button",{"aria-label":g?"Play photo rotation":"Pause photo rotation",className:`lockerverse-auction-gallery__play ${L}`,"data-gallery-control":!0,onClick:()=>b(T=>!T),title:g?"Play photo rotation":"Pause photo rotation",type:"button",children:g?(0,ue.jsx)(Dr,{"aria-hidden":"true",size:13}):(0,ue.jsx)(Nr,{"aria-hidden":"true",size:13})})]}),V>1&&(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)("button",{"aria-label":"Previous photo",className:`lockerverse-auction-gallery__previous ${L}`,"data-gallery-control":!0,onClick:()=>de(q-1),type:"button",children:(0,ue.jsx)(Nt,{"aria-hidden":"true",className:"lockerverse-auction-gallery__chevron"})}),(0,ue.jsx)("button",{"aria-label":"Next photo",className:`lockerverse-auction-gallery__next ${L}`,"data-gallery-control":!0,onClick:()=>de(q+1),type:"button",children:(0,ue.jsx)(Dn,{"aria-hidden":"true",className:"lockerverse-auction-gallery__chevron"})})]})]}):(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__empty",children:"No photo available"}),V>1&&(0,ue.jsx)("section",{"aria-label":"Choose a photo",className:"lockerverse-auction-gallery__strip",ref:u,children:(0,ue.jsx)("div",{className:"lockerverse-auction-gallery__thumbnails",children:e.map((T,U)=>(0,ue.jsx)("button",{"aria-label":`Show photo ${U+1} of ${V}`,"aria-pressed":q===U,className:`lockerverse-auction-gallery__thumbnail ${q===U?"is-selected":""}`,onClick:()=>de(U),ref:fe=>{l.current[U]=fe},type:"button",children:(0,ue.jsx)(at,{alt:"",className:"lockerverse-auction-gallery__thumbnail-image",height:66,loading:"lazy",maxWidth:192,sizes:"88px",src:T,width:88})},`${T}-${U}`))})})]})}var xe=C(ge(),1);function xc({images:e,fallbackImage:t,name:n,imageSizes:o}){let r=[...new Set(e.filter(Boolean))];!r.length&&t&&r.push(t);let[i,s]=(0,Zt.useState)(0),[a,u]=(0,Zt.useState)(!1),c=(0,Zt.useRef)(null),l=(0,Zt.useRef)(null),f=c.current?.getRootNode(),m=f&&f instanceof ShadowRoot?f:void 0,p=r.length,d=p?(i%p+p)%p:0;return(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(Rc,{imageSizes:o,name:n,onExpand:h=>{s(h),u(!0)},onSelect:s,paused:a,photoButtonRef:c,photos:r,selected:d}),p>0&&(0,xe.jsx)(st.Root,{onOpenChange:u,open:a,children:(0,xe.jsxs)(st.Portal,{container:m,children:[(0,xe.jsx)(st.Backdrop,{className:"lockerverse-auction-gallery__backdrop"}),(0,xe.jsxs)(st.Popup,{"aria-describedby":void 0,className:"lockerverse-auction-gallery__viewer",finalFocus:c,onKeyDown:h=>{p<2||h.altKey||h.ctrlKey||h.metaKey||h.shiftKey||(h.key==="ArrowLeft"||h.key==="ArrowRight")&&(h.preventDefault(),s((d+(h.key==="ArrowRight"?1:-1)+p)%p))},children:[(0,xe.jsxs)(st.Title,{className:"lockerverse-auction-gallery__sr-only",children:[n," \xB7 Photo ",d+1," of ",p]}),(0,xe.jsxs)("div",{className:"lockerverse-auction-gallery__full-image",onTouchCancel:()=>{l.current=null},onTouchEnd:h=>{let y=l.current;l.current=null;let g=h.changedTouches.item(0);if(!(y&&g)||p<2)return;let b=g.clientX-y.x,v=g.clientY-y.y;Math.abs(b)>=45&&Math.abs(b)>Math.abs(v)*1.3&&s((d+(b<0?1:-1)+p)%p)},onTouchMove:h=>{h.touches.length!==1&&(l.current=null)},onTouchStart:h=>{let y=h.touches.item(0);l.current=h.touches.length===1&&y?{x:y.clientX,y:y.clientY}:null},children:[(0,xe.jsx)(at,{alt:`${n}, ${d+1} of ${p}`,height:900,maxWidth:1920,sizes:"100vw",src:r[d],width:1200}),a&&p>1&&(0,xe.jsx)(at,{alt:"","aria-hidden":"true",className:"lockerverse-auction-gallery__preload",height:900,loading:"eager",maxWidth:1920,sizes:"100vw",src:r[(d+1)%p],width:1200})]}),(0,xe.jsx)(st.Close,{"aria-label":"Close photo viewer",className:"lockerverse-auction-gallery__viewer-close",children:(0,xe.jsx)(_r,{"aria-hidden":"true",size:22})}),p>1&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("button",{"aria-label":"Previous photo",className:"lockerverse-auction-gallery__viewer-previous",onClick:()=>s((d-1+p)%p),type:"button",children:(0,xe.jsx)(Nt,{"aria-hidden":"true",size:28})}),(0,xe.jsx)("button",{"aria-label":"Next photo",className:"lockerverse-auction-gallery__viewer-next",onClick:()=>s((d+1)%p),type:"button",children:(0,xe.jsx)(Dn,{"aria-hidden":"true",size:28})})]})]})]})})]})}var ae=C(ge(),1),Jl={1:"h1",2:"h2"};function Ql(e){return e==="Buy Now"?(0,ae.jsx)(_n,{"aria-hidden":"true",size:16}):e==="Available"||e==="Increment"?(0,ae.jsx)(Ln,{"aria-hidden":"true",size:16}):(0,ae.jsx)(Or,{"aria-hidden":"true",size:16})}function Zl(e,t){return e.saleMode==="buy_now"?[["Buy Now",Fe(e.buyNowPriceAmount??0)],["Available",e.availableQuantity===null?"Available":String(e.availableQuantity)]]:t==="finished"?[["Final bid",e.maxBidAmount?Fe(e.maxBidAmount):"No bids"]]:[["Current bid",Fe(e.maxBidAmount??0)],["Floor",Fe(e.minBidAmount??0)],["Increment",Fe(e.bidIncrementAmount??100)]]}function Sc({auction:e,item:t,itemHeadingLevel:n=2,galleryImageSizes:o}){Ft(t.startAt??e.startAt,t.endAt??e.endAt);let[r,i]=(0,ho.useState)(!1),s=(0,ho.useId)(),a=Lt(e,t),u={active:"Closes",draft:"Opens",finished:"Closed"}[a],c=_t(e,a,t),l=t.saleMode==="buy_now",f=(t.description??"").trim().length>240,m=Zl(t,a),p=Jl[n];return(0,ae.jsxs)("section",{className:"lockerverse-auctions__item-summary",children:[(0,ae.jsx)(xc,{fallbackImage:t.image??e.configuration.image??e.community?.banner??e.community?.thumbnail??null,imageSizes:o,images:t.images,name:t.name}),(0,ae.jsxs)("div",{className:"lockerverse-auctions__item-copy",children:[(0,ae.jsx)(p,{children:t.name}),t.description?(0,ae.jsxs)("div",{className:"lockerverse-auctions__item-description",children:[(0,ae.jsx)(Lr,{className:!r&&f?"lockerverse-auctions__description-clamped":void 0,description:t.description,id:s}),f?(0,ae.jsxs)("button",{"aria-controls":s,"aria-expanded":r,className:"lockerverse-auctions__description-toggle",onClick:()=>i(!r),type:"button",children:[r?"Hide description":"Read full description"," ",(0,ae.jsx)(Pr,{"aria-hidden":"true",size:16,style:{transform:r?"rotate(180deg)":void 0}})]}):null]}):null,(0,ae.jsxs)("dl",{className:"lockerverse-auctions__stat-panel",children:[m.map(([d,h])=>(0,ae.jsxs)("div",{className:"lockerverse-auctions__stat-row",children:[(0,ae.jsxs)("dt",{children:[Ql(d),d]}),(0,ae.jsx)("dd",{children:h})]},d)),(0,ae.jsxs)("div",{className:"lockerverse-auctions__stat-row",children:[(0,ae.jsxs)("dt",{children:[(0,ae.jsx)(Ar,{"aria-hidden":"true",size:16}),u]}),(0,ae.jsx)("dd",{className:"lockerverse-auctions__stat-date",children:c})]}),!l&&a==="finished"?(0,ae.jsxs)("div",{className:"lockerverse-auctions__stat-footer",children:[(0,ae.jsxs)("div",{children:[(0,ae.jsx)("dt",{children:"Floor"}),(0,ae.jsx)("dd",{children:Fe(t.minBidAmount??0)})]}),(0,ae.jsxs)("div",{children:[(0,ae.jsx)("dt",{children:"Bid increment"}),(0,ae.jsx)("dd",{children:Fe(t.bidIncrementAmount??100)})]})]}):null]})]})]})}var Ot=C(N(),1);var Y=C(ge(),1),ef={1:"h2",2:"h3"},Cc=/^\d+$/;function tf(e,t){let n=Number(e),o=n*(t.buyNowPriceAmount??0);if(!(Cc.test(e)&&Number.isSafeInteger(o))||n<1)return"Enter a whole-number quantity.";if(!t.additionalCharge)return`Total: ${Fe(o)}`;let r=t.additionalCharge.firstUnitAmountCents+t.additionalCharge.additionalUnitAmountCents*(n-1),i=o+r;return Number.isSafeInteger(i)?`Subtotal: ${Fe(o)} \xB7 ${t.additionalCharge.name}: ${Fe(r)} \xB7 Total: ${Fe(i)}`:"Enter a valid quantity."}function nf(e,t,n){return String(e?t?t.quantity:1:t?t.amount/100:n)}function of(e,t){return Mt(e)?"This item is sold out.":t==="draft"?"This item is not open yet.":t==="finished"?e.saleMode==="buy_now"?"Purchases are closed for this item.":"Bidding is closed for this item.":"This item is not available."}function rf(e,t,n){return Mt(t)?"All available quantities have been purchased.":n==="draft"?`This item opens ${_t(e,"draft",t)}.`:t.saleMode==="buy_now"?"This item is no longer available to purchase.":"Bidding has closed for this item."}function sf(e,t,n,o,r){let i={amount:t?0:Number(o)*100,includeServiceFee:n?n.includeServiceFee:e.serviceFeeEnabled&&e.serviceFeeDefaultChecked,quantity:t?Number(o):1};return t||(i.bidType=r),i}function Tc({auction:e,item:t,initialSelection:n,onContinue:o,onError:r,onBack:i,backHref:s,itemHeadingLevel:a=2}){let u=ef[a],c=t.saleMode==="buy_now",l=Math.ceil(Br(t)/100),[f,m]=(0,Ot.useState)(nf(c,n,l)),[p,d]=(0,Ot.useState)(n?.bidType??"fixed"),[h,y]=(0,Ot.useState)(null),g=(0,Ot.useId)();Ft(t.startAt??e.startAt,t.endAt??e.endAt);let b=Lt(e,t),v=b==="active"&&!Mt(t)&&t.saleMode!=="hybrid";function E(R){if(R.preventDefault(),!Cc.test(f)){y(c?"Enter a whole-number quantity.":"Enter a whole-dollar bid amount.");return}let w=sf(e,c,n,f,p),S=Hr(e,t,w);if(S){y(S),r(S);return}try{nn(e,t,w)}catch{y("Enter a valid amount or quantity.");return}o(w)}return v?(0,Y.jsxs)("form",{className:"lockerverse-auctions__selection",onSubmit:E,children:[(0,Y.jsx)(cf,{buyNow:c,headingTag:u,item:t}),(0,Y.jsxs)("div",{className:"lockerverse-auctions__selection-body",children:[(0,Y.jsx)(lf,{bidType:p,enabled:!c&&!!t.supportsMaximumBids,id:g,onChange:R=>{d(R),y(null)}}),(0,Y.jsxs)("label",{className:"lockerverse-auctions__field",htmlFor:g,children:[uf(c,p),(0,Y.jsxs)("span",{className:"lockerverse-auctions__amount-control",children:[c?null:(0,Y.jsx)("span",{"aria-hidden":"true",children:"$"}),(0,Y.jsx)("input",{"aria-describedby":c?`${g}-help`:void 0,"aria-invalid":!!h,autoComplete:"off",id:g,inputMode:"numeric",onChange:R=>{m(R.target.value),y(null)},placeholder:c?"1":String(l),required:!0,value:f})]})]}),h?(0,Y.jsx)("p",{role:"alert",children:h}):null,c&&(0,Y.jsx)("p",{id:`${g}-help`,children:tf(f,t)}),(0,Y.jsx)(af,{item:t}),(0,Y.jsxs)("div",{className:"lockerverse-auctions__selection-footer",children:[(0,Y.jsx)("p",{children:c?"You pay at checkout.":"We charge your card only if you win."}),(0,Y.jsxs)("button",{className:"lockerverse-auctions__button",disabled:!e.payment,type:"submit",children:[c?"Continue to Checkout":"Continue to Payment"," ",(0,Y.jsx)(ht,{"aria-hidden":"true",size:16})]})]}),e.payment?null:(0,Y.jsx)("p",{role:"alert",children:"Payments are not configured for this auction."})]})]}):(0,Y.jsxs)("div",{className:"lockerverse-auctions__selection lockerverse-auctions__read-only",children:[(0,Y.jsx)("p",{className:"lockerverse-auctions__eyebrow",children:"Item status"}),(0,Y.jsx)(u,{children:of(t,b)}),(0,Y.jsx)("p",{children:rf(e,t,b)}),(0,Y.jsxs)(Dt,{className:"lockerverse-auctions__button",href:s,onBack:i,children:["Browse auction items ",(0,Y.jsx)(ht,{"aria-hidden":"true",size:16})]})]})}function cf({headingTag:e,item:t,buyNow:n}){return(0,Y.jsxs)("div",{className:"lockerverse-auctions__selection-header",children:[(0,Y.jsx)("p",{className:"lockerverse-auctions__eyebrow",children:"Step 1 of 2"}),(0,Y.jsx)(e,{children:n?"Buy this item":"Place your bid"}),n?(0,Y.jsxs)("p",{children:[Fe(t.buyNowPriceAmount??0)," each",t.availableQuantity===null?"":` \xB7 ${t.availableQuantity} available`]}):null]})}function af({item:e}){return e.saleMode==="buy_now"||!e.additionalCharge?null:(0,Y.jsxs)("p",{children:[e.additionalCharge.name,":"," ",Fe(e.additionalCharge.firstUnitAmountCents)," if you win."]})}function uf(e,t){return e?"Quantity":t==="maximum"?"Your maximum bid":"Your bid amount"}function lf({bidType:e,enabled:t,id:n,onChange:o}){return t?(0,Y.jsxs)("fieldset",{className:"lockerverse-auctions__bid-types",children:[(0,Y.jsx)("legend",{children:"Bid type"}),["fixed","maximum"].map(r=>(0,Y.jsxs)("div",{className:"lockerverse-auctions__bid-type",children:[(0,Y.jsxs)("label",{children:[(0,Y.jsx)("input",{checked:e===r,name:`${n}-bid-type`,onChange:()=>o(r),type:"radio",value:r}),(0,Y.jsx)("span",{children:r==="fixed"?"Fixed bid":"Maximum bid"})]}),(0,Y.jsx)(ff,{id:`${n}-${r}-help`,type:r})]},r))]}):null}function ff({id:e,type:t}){let[n,o]=(0,Ot.useState)(!1);return(0,Y.jsxs)("button",{"aria-describedby":n?e:void 0,"aria-label":`About ${t==="fixed"?"fixed":"maximum"} bids`,className:"lockerverse-auctions__bid-help-button",onBlur:()=>o(!1),onClick:()=>o(!0),onFocus:()=>o(!0),onKeyDown:r=>{r.key==="Escape"&&o(!1)},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),type:"button",children:[(0,Y.jsx)(Ir,{"aria-hidden":"true",size:16}),n&&(0,Y.jsx)("span",{className:"lockerverse-auctions__bid-tip",id:e,role:"tooltip",children:t==="fixed"?"Bid this exact amount. It will not increase automatically.":"We bid only what is needed to lead, up to your private limit. Accepted bids cannot be changed or canceled. A new bid is separate."})]})}var It=C(N(),1);var kc=C(N(),1);var Pc=C(ge(),1),Rr=()=>{};function wc(e){let t=(0,kc.useId)(),{auction:n,item:o,selection:r,resumePurchase:i}=e,s=i?i.pricing:nn(n,o,r),a=!!i||o.saleMode==="buy_now";return(0,Pc.jsx)(Ur,{billingFields:null,buttonText:a?"Buy Now":"Authorize Bid",communityName:e.communityName??n.name,contactErrors:{},email:e.contact.email,id:t,includeServiceFee:r.includeServiceFee,isMaximumBid:!a&&r.bidType==="maximum",isPurchase:a,isTerminal:!1,item:o,locked:!0,message:null,onBack:i||e.interactionLocked?void 0:e.onBack,onEmailChange:Rr,onIncludeServiceFeeChange:e.onIncludeServiceFeeChange,onPhoneChange:Rr,onSameAsBillingChange:Rr,onSubmit:u=>u.preventDefault(),paymentFields:null,phone:e.contact.phone,phoneCountry:Vr(e.contact.phone),pricing:s,quantity:r.quantity,sameAsBilling:!0,serviceFeeCents:i?s.serviceFeeCents:nn(n,o,{...r,includeServiceFee:n.serviceFeeEnabled}).serviceFeeCents,serviceFeeEnabled:n.serviceFeeEnabled,shippingFields:null,showFields:!i,submitDisabled:!0})}var ct=C(ge(),1),Ac,Oc=null;function Ic(){return Ac??=import("./auction-payment-view-MVQGNAGH.js").then(e=>(Oc=e.AuctionPayment,e)),Ac}function Nc(e,t,n){let o=e?.publishableKey,r=e?.connectedAccountId,[i,s]=(0,It.useState)(null);return(0,It.useEffect)(()=>{if(!(n&&o))return;let a=Ic().then(u=>u.loadAuctionStripe(o,r,t)).catch(()=>null);s({connectedAccountId:r,publishableKey:o,stripe:a,stripeLoader:t})},[n,o,r,t]),i?.publishableKey===o&&i?.connectedAccountId===r&&i?.stripeLoader===t?i?.stripe:void 0}function Dc(e){let[t,n]=(0,It.useState)(()=>Oc),[o,r]=(0,It.useState)(!1),i=!!(e.resumePurchase||e.interactionLocked);return(0,It.useEffect)(()=>{let s=!0;return Ic().then(({AuctionPayment:a})=>{s&&n(()=>a)},()=>{s&&r(!0)}),()=>{s=!1}},[]),t?(0,ct.jsx)(t,{...e}):o?(0,ct.jsxs)("div",{children:[(0,ct.jsx)("p",{role:"alert",children:"Payment details could not load."}),i&&(0,ct.jsx)("p",{children:"Your purchase status is not confirmed. Keep this page open and contact the auction organizer before you try another purchase."}),i?null:(0,ct.jsx)("button",{onClick:e.onBack,type:"button",children:"Back to item"}),!i&&(0,ct.jsx)("button",{onClick:()=>window.location.reload(),type:"button",children:"Reload page to try again"})]}):(0,ct.jsx)(wc,{...e})}var en=C(N(),1);var z=C(ge(),1);function _c({action:e,secondary:t=!1}){let n=`lockerverse-auction-result__action${t?" lockerverse-auction-result__action--secondary":""}`,o=(0,z.jsxs)(z.Fragment,{children:[e.label,t?null:(0,z.jsx)(ht,{"aria-hidden":"true",size:18})]});return e.href?(0,z.jsx)("a",{className:n,href:e.href,onClick:e.onClick,children:o}):(0,z.jsx)("button",{className:n,onClick:e.onClick,type:"button",children:o})}var df={bid:{assurance:"A bid is not a purchase. Payment is collected only if you win at settlement.",assuranceTitle:"Bid authorization saved",badge:"Bid submitted",description:"Your bid and payment method are recorded. You have not been charged for this bid.",next:"Other bidders can still place bids until the item closes.",nextTitle:"Follow the auction",receiptLabel:"Bid summary",steps:["Your bid is recorded. This does not confirm that you have won.","Your saved payment method can be charged if you win at settlement.","Watch your email for bid updates and return to the item to check its status."],title:"Bid received"},purchase:{assurance:"This receipt shows the amount paid for your purchase.",assuranceTitle:"Payment processed",badge:"Purchase confirmed",description:"Your payment is confirmed and your purchase is recorded.",next:"The community handles delivery or collection for this item.",nextTitle:"Next steps",receiptLabel:"Purchase receipt",steps:["Your payment is complete and your purchase is recorded.","The community can review your buyer and delivery details.","Keep your receipt number. Contact the community if you need help with your order."],title:"Purchase complete"},receipt:{assurance:"The amounts below are the recorded purchase amounts, not proof of payment.",assuranceTitle:"Recorded purchase",badge:"Purchase details",description:"Payment status is not confirmed on this page.",next:"Contact the community if you need to confirm your payment or order status.",nextTitle:"Next steps",receiptLabel:"Purchase receipt",steps:["These are the recorded purchase details. They do not confirm payment.","Check your purchase confirmation for the payment result.","Contact the community with your receipt number if you need help."],title:"Purchase details"}};function pf(e){let t=[];return e.amountCents!==void 0&&t.push([e.bidType==="maximum"?"Maximum bid":"Bid amount",et(e.amountCents)]),e.additionalCharge&&t.push([e.additionalCharge.name,et(e.additionalChargeCents??0)]),(e.additionalCharge||e.bidType==="maximum")&&((e.serviceFeeCents??0)>0&&t.push([e.bidType==="maximum"?"Maximum service fee":"Service fee",et(e.serviceFeeCents??0)]),e.totalCents!==void 0&&t.push([e.bidType==="maximum"?"Maximum total if I win":"Total if I win",et(e.totalCents)])),t}function mf({outcome:e,auctionName:t,communityName:n,closesAtLabel:o}){let r=[];return e.kind==="bid"?r.push(...pf(e)):(r.push(["Unit price",et(e.unitAmountCents)],["Quantity",String(e.quantity)],["Subtotal",et(e.subtotalCents)]),e.additionalCharge&&r.push([e.additionalCharge.name,et(e.additionalChargeCents??0)]),e.serviceFeeCents>0&&r.push(["Service fee",et(e.serviceFeeCents)]),r.push([e.kind==="purchase"?"Total paid":"Total",et(e.totalCents)],["Receipt",e.purchaseId])),t&&r.push(["Auction",t]),n&&r.push(["Community",n]),o&&r.push(["Closes",o]),r}function Lc(e){let{outcome:t,itemName:n,imageUrl:o,communityName:r,primaryAction:i,secondaryAction:s,className:a,theme:u="dark",style:c}=e,l=(0,en.useId)(),f=(0,en.useRef)(null);(0,en.useEffect)(()=>{e.focusHeading&&f.current?.focus()},[e.focusHeading]);let m=df[t.kind],p=t.kind==="receipt"?Co:wr,d=t.kind==="receipt"?Co:_n,h=mf(e);return(0,z.jsx)("section",{"aria-labelledby":l,className:["lockerverse-auctions lockerverse-auction-result",a].filter(Boolean).join(" "),"data-lockerverse-theme":u,style:tn({},c,u),children:(0,z.jsxs)("div",{className:"lockerverse-auction-result__layout",children:[(0,z.jsxs)("div",{className:"lockerverse-auction-result__summary",children:[(0,z.jsxs)("span",{className:"lockerverse-auction-result__badge",children:[(0,z.jsx)(p,{"aria-hidden":"true",size:18}),m.badge]}),r?(0,z.jsx)("p",{className:"lockerverse-auction-result__community",children:r}):null,(0,z.jsxs)("h2",{className:"lockerverse-auction-result__title",id:l,ref:f,tabIndex:e.focusHeading?-1:void 0,children:[m.title," for ",n,"."]}),(0,z.jsxs)("p",{className:"lockerverse-auction-result__description",children:[m.description,t.kind==="bid"&&t.bidType==="maximum"?" We bid for you up to your private maximum. If you win, you pay the final winning price plus applicable fees. This submission does not confirm that you are leading.":""]}),(0,z.jsxs)("div",{className:"lockerverse-auction-result__assurance",children:[(0,z.jsx)(d,{"aria-hidden":"true",size:22}),(0,z.jsxs)("div",{children:[(0,z.jsx)("strong",{children:m.assuranceTitle}),(0,z.jsx)("p",{children:m.assurance})]})]}),(0,z.jsxs)("div",{className:"lockerverse-auction-result__assurance",children:[(0,z.jsx)(Ln,{"aria-hidden":"true",size:22}),(0,z.jsxs)("div",{children:[(0,z.jsx)("strong",{children:m.nextTitle}),(0,z.jsx)("p",{children:m.next})]})]}),i||s?(0,z.jsxs)("div",{className:"lockerverse-auction-result__actions",children:[i?(0,z.jsx)(_c,{action:i}):null,s?(0,z.jsx)(_c,{action:s,secondary:!0}):null]}):null]}),(0,z.jsxs)("aside",{"aria-label":m.receiptLabel,className:"lockerverse-auction-result__receipt",children:[o?(0,z.jsx)(at,{alt:n,className:"lockerverse-auction-result__image",height:300,maxWidth:960,sizes:"100vw",src:o,width:420}):null,(0,z.jsxs)("div",{className:"lockerverse-auction-result__receipt-body",children:[(0,z.jsx)("p",{className:"lockerverse-auction-result__eyebrow",children:m.receiptLabel}),(0,z.jsx)("h3",{className:"lockerverse-auction-result__receipt-title",children:n}),(0,z.jsx)("dl",{className:"lockerverse-auction-result__details",children:h.map(([y,g])=>(0,z.jsxs)("div",{children:[(0,z.jsx)("dt",{children:y}),(0,z.jsx)("dd",{children:g})]},y))}),(0,z.jsx)("h4",{children:"What happens next"}),(0,z.jsx)("ol",{className:"lockerverse-auction-result__steps",role:"list",children:m.steps.map((y,g)=>(0,z.jsxs)("li",{children:[(0,z.jsx)("span",{"aria-hidden":"true",className:"lockerverse-auction-result__step-number",children:String(g+1).padStart(2,"0")}),(0,z.jsx)("span",{children:y})]},y))})]})]})]})})}var Pe=C(ge(),1);function gf(e){let{auction:t,item:n,outcome:o}=e,r;return e.backHref?r={href:e.backHref,label:"View auction items"}:e.onBack&&(r={label:"View auction items",onClick:e.onBack}),(0,Pe.jsx)(Lc,{auctionName:t.name,className:e.className,closesAtLabel:_t(t,"active",n),communityName:e.communityName??t.community?.name,focusHeading:!0,imageUrl:n.image??n.images[0]??t.configuration.image??void 0,itemName:n.name,outcome:o,primaryAction:e.returnToItemHref?{href:e.returnToItemHref,label:"Return to item"}:r,secondaryAction:e.returnToItemHref?r:void 0,style:tn(t,e.style,e.theme??"dark"),theme:e.theme})}function hf(e){let{auction:t,itemId:n,resumePurchase:o,className:r,theme:i="dark",style:s}=e,a=(0,Ae.useRef)(null),[u,c]=(0,Ae.useState)(t),l=(0,Ae.useRef)(t),f=u.items.find(G=>G.id===n)??o?.item;Ft(f?.startAt??u.startAt,f?.endAt??u.endAt);let[m,p]=(0,Ae.useState)(()=>o?{amount:0,includeServiceFee:o.submission.includeServiceFee??!1,quantity:o.submission.quantity}:null),[d,h]=(0,Ae.useState)(!!o),y=(0,Ae.useRef)(!0),g=(0,Ae.useRef)(e);g.current=e;let b=(0,Ae.useRef)(null),v=(0,Ae.useCallback)(G=>{y.current&&h(G),b.current!==G&&(b.current=G,Wr(g.current.onInteractionLockChange,G))},[]),E=!!o;(0,Ae.useEffect)(()=>(y.current=!0,v(E),()=>{y.current=!1}),[E,v]);let[R,w]=(0,Ae.useState)({email:"",phone:""}),[S,k]=(0,Ae.useState)(!!o),[P,_]=(0,Ae.useState)(null),[I,W]=(0,Ae.useState)(null);(0,Ae.useEffect)(()=>{!(S||d||o)&&l.current!==t&&(l.current=t,c(t))},[t,S,d,o]);let L=Nc(o?.payment??u.payment,e.stripeLoader,!!o||!!(f&&Lt(u,f)==="active"&&!Mt(f)&&f.saleMode!=="hybrid"));function D(G,V){v(!1),l.current=g.current.auction,c(G),p(null),k(!1),_(V)}function te(G){_(null),p(G),k(!0)}return f?I?(0,Pe.jsx)(gf,{...e,auction:u,item:f,outcome:I}):(0,Pe.jsxs)("section",{className:["lockerverse-auctions",r].filter(Boolean).join(" "),"data-lockerverse-theme":i,ref:a,style:tn(u,s,i),children:[d?null:(0,Pe.jsxs)(Dt,{className:"lockerverse-auctions__back",href:e.backHref,onBack:e.onBack,children:[(0,Pe.jsx)(Nt,{"aria-hidden":"true",size:16})," All items"]}),(0,Pe.jsxs)("div",{className:"lockerverse-auctions__detail",children:[(0,Pe.jsx)(Sc,{auction:u,galleryImageSizes:e.galleryImageSizes,item:f,itemHeadingLevel:e.itemHeadingLevel}),(0,Pe.jsxs)("div",{className:"lockerverse-auctions__transaction",children:[P?(0,Pe.jsx)("p",{className:"lockerverse-auctions__notice",role:"alert",children:P}):null,S&&m?(0,Pe.jsx)(Dc,{...e,appearanceRoot:a,auction:u,communityName:e.communityName??u.community?.name,contact:R,interactionLocked:d,item:f,onBack:()=>k(!1),onContactChange:w,onIncludeServiceFeeChange:G=>p(V=>V&&{...V,includeServiceFee:u.serviceFeeEnabled&&G}),onInteractionLockChange:v,onResult:W,onReview:D,selection:m,stripePromise:L}):(0,Pe.jsx)(Tc,{auction:u,backHref:e.backHref,initialSelection:m,item:f,itemHeadingLevel:e.itemHeadingLevel,onBack:e.onBack,onContinue:te,onError:_}),d?null:(0,Pe.jsxs)(Dt,{className:"lockerverse-auctions__footer-back",href:e.backHref,onBack:e.onBack,children:["Back to auction items ",(0,Pe.jsx)(ht,{"aria-hidden":"true",size:16})]})]})]})]}):(0,Pe.jsxs)("div",{children:[(0,Pe.jsx)("p",{role:"alert",children:"This auction item is no longer available."}),(0,Pe.jsx)(Dt,{href:e.backHref,onBack:e.onBack,children:"Back to auction items"})]})}function Kb(e){let t=(0,Ae.useRef)({auctionId:e.auction.id,client:e.client,itemId:e.itemId});if(t.current.client!==e.client||t.current.auctionId!==e.auction.id||t.current.itemId!==e.itemId)throw new TypeError("Auction item identity cannot change. Remount with a new React key.");if(e.resumePurchase&&(e.resumePurchase.auctionId!==e.auction.id||e.resumePurchase.itemId!==e.itemId||e.resumePurchase.item.id!==e.itemId||e.resumePurchase.item.auctionId!==e.auction.id))throw new TypeError("The purchase recovery record belongs to a different auction item.");return(0,Pe.jsx)(Mr.Provider,{value:e.auction.mediaBaseUrl,children:(0,Pe.jsx)(hf,{...e})})}export{Kb as LockerverseAuctionItem};
2
+ /*! For license information please see lockerverse-auction-item-XPNH4J4V.js.LEGAL.txt */