@surdeddd/bottom-sheet 0.21.1 → 0.21.2

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,3 +1,3 @@
1
- "use strict";var surdeddd_bottomSheet=(()=>{var ce=Object.defineProperty;var Pn=Object.getOwnPropertyDescriptor;var Fn=Object.getOwnPropertyNames;var Hn=Object.prototype.hasOwnProperty;var _n=(t,e,i)=>e in t?ce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var m=(t,e)=>()=>(t&&(e=t(t=0)),e);var zt=(t,e)=>{for(var i in e)ce(t,i,{get:e[i],enumerable:!0})},Bn=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Fn(e))!Hn.call(t,s)&&s!==i&&ce(t,s,{get:()=>e[s],enumerable:!(n=Pn(e,s))||n.enumerable});return t};var Nn=t=>Bn(ce({},"__esModule",{value:!0}),t);var o=(t,e,i)=>_n(t,typeof e!="symbol"?e+"":e,i);var Le,C,Rt=m(()=>{"use strict";Le=class{constructor(){o(this,"entries",[])}push(e){return this.entries.push(e),this.recompute(),()=>this.remove(e.id)}remove(e){let i=this.entries.findIndex(n=>n.id===e);i!==-1&&(this.entries.splice(i,1),this.recompute())}promote(e){let i=this.entries.findIndex(n=>n.id===e);if(i!==-1){if(i!==this.entries.length-1){let[n]=this.entries.splice(i,1);this.entries.push(n)}this.recompute()}}update(){this.recompute()}size(){return this.entries.length}depthOf(e){let i=[];for(let s of this.entries)(!s.isOpen||s.isOpen())&&i.push(s);let n=i.findIndex(s=>s.id===e);return n===-1?0:i.length-1-n}clear(){this.entries=[]}recompute(){let e=null,i=[];for(let n of this.entries)(!n.isOpen||n.isOpen())&&(e=n,i.push(n));!e&&this.entries.length>0&&(e=this.entries[this.entries.length-1]),this.entries.forEach((n,s)=>{if(n.setZIndex(100+s*10),n.setIsTop(n===e),n.setDepth){let r=i.indexOf(n);n.setDepth(r===-1?0:i.length-1-r)}})}},C=new Le});function Pe(t){switch(t){case"bottom":return e=>`translate3d(0, ${e}px, 0)`;case"top":return e=>`translate3d(0, ${-e}px, 0)`;case"left":return e=>`translate3d(${-e}px, 0, 0)`;case"right":return e=>`translate3d(${e}px, 0, 0)`}}var M,he=m(()=>{"use strict";M=t=>t==="left"||t==="right"?"width":"height"});function He(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${t}-${crypto.randomUUID()}`:(Fe[t]=(Fe[t]??0)+1,`${t}-${Fe[t]}`)}var Fe,Dt=m(()=>{"use strict";Fe={}});function kt(){let t=new Map;return{on(e,i){let n=t.get(e);return n||(n=new Set,t.set(e,n)),n.add(i),()=>{n.delete(i)}},emit(e,i){let n=t.get(e);if(n)for(let s of[...n])s(i)},listenerCount(e){return t.get(e)?.size??0},clear(){t.clear()}}}var Ot=m(()=>{"use strict"});var x,It,Kn,Pt,Lt,Vn,ue,Ft=m(()=>{"use strict";x=null,It="data-bs-probe",Kn=t=>{if(typeof document>"u")return null;if(!x||!x.isConnected){let e=document.querySelector(`[${It}]`);e?x=e:(x=document.createElement("div"),x.setAttribute("aria-hidden","true"),x.setAttribute(It,""),x.style.cssText="position:absolute;visibility:hidden;pointer-events:none;contain:strict;left:0;top:0;width:0;height:0;",document.body.appendChild(x))}return t==="vertical"?(x.style.width="0",x.style.height=""):(x.style.height="0",x.style.width=""),x},Pt=t=>t==="bottom"||t==="top",Lt=t=>typeof window>"u"?0:Pt(t)?window.innerHeight:window.innerWidth,Vn=/^(-?\d+(?:\.\d+)?)%$/,ue=(t,e,i)=>{if(typeof t=="number")return Math.max(0,t);if(t==="full")return Lt(e);if(t==="fit"||t==="content")return Math.max(0,i?.()??0);let n=t.match(Vn);if(n){let a=parseFloat(n[1])/100;return Math.max(0,Lt(e)*a)}let s=Pt(e)?"vertical":"horizontal",r=Kn(s);return r?s==="vertical"?(r.style.height=t,Math.max(0,r.getBoundingClientRect().height)):(r.style.width=t,Math.max(0,r.getBoundingClientRect().width)):0}});function S(...t){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.warn(...t)}var V=m(()=>{"use strict"});var Ht,Gn,_e,Wn,_t,G,Un,$n,qn,Bt,W=m(()=>{"use strict";Ft();V();Ht=(t,e,i)=>t.map(n=>{let s=ue(n.size,e,i);return!Number.isFinite(s)||s<0?(S(`[BottomSheet] snap "${n.id}" resolved to invalid size (${String(n.size)} \u2192 ${s}); clamped to 0.`),{id:n.id,size:0}):{id:n.id,size:s}}).sort((n,s)=>n.size-s.size),Gn=/(^|[^a-z])vh\b/i,_e=t=>{for(let e of t)typeof e.size=="string"&&Gn.test(e.size)&&S(`[BottomSheet] snap "${e.id}" uses "vh" \u2014 prefer "dvh" on mobile (iOS Safari URL bar makes vh unstable). See https://web.dev/blog/viewport-units`)},Wn=(t,e,i,n=0,s=0)=>{let r=e.filter(h=>i.includes(h.id));if(r.length===0)return null;let a=t+n*s,l=r[0],c=Math.abs(a-l.size);for(let h=1;h<r.length;h++){let d=r[h],u=Math.abs(a-d.size);u<c&&(l=d,c=u)}return l},_t=(t,e)=>{let i=t.filter(n=>e.includes(n.id));return i.length===0?{min:0,max:0}:{min:i[0].size,max:i[i.length-1].size}},G=(t,e)=>e.find(i=>i.id===t)??null,Un=.4,$n=12,qn=.15,Bt=t=>{let e=Math.abs(t.velocity),i=t.pointerKind==="mouse"?Un:t.flickVelocity,n=t.pointerKind==="mouse"?$n:t.dragThreshold,s=0;if((e>i||e>qn)&&(s=t.velocity>0?1:-1),Math.abs(t.delta)<n&&s===0)return G(t.activeId,t.resolved);let r=e>i?Math.min(e*180,t.maxAxisSize):0;return Wn(t.size,t.resolved,t.allowed,s,r)}});function Be(t,e,i){let n=!1,s=!1;return t({...e,cancel:()=>{if(s){S(`[BottomSheet] ${i}.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.`);return}n=!0}}),s=!0,n}var Nt=m(()=>{"use strict";V()});var pe,Kt=m(()=>{"use strict";W();pe=class{constructor(e,i,n,s,r){o(this,"mode",n);o(this,"measureFit",s);o(this,"onMaxAxisSizeChange",r);o(this,"raw");o(this,"allowedIds");o(this,"resolved",[]);o(this,"maxAxisSize",0);o(this,"rangeCache",null);o(this,"notified",!1);this.raw=e,this.allowedIds=i??e.map(a=>a.id),this.recompute()}recompute(){let e=this.measureFit,i,n=e?()=>i??(i=e()):void 0;this.resolved=Ht(this.raw,this.mode,n);let s=this.resolved.reduce((a,l)=>l.size>a?l.size:a,0);this.rangeCache=null;let r=s!==this.maxAxisSize||!this.notified;this.maxAxisSize=s,this.notified=!0,r&&this.onMaxAxisSizeChange?.(this.maxAxisSize)}setRaw(e){this.raw=e,this.recompute()}setMode(e){e!==this.mode&&(this.mode=e,this.recompute())}setAllowedIds(e){this.allowedIds=e,this.rangeCache=null}findById(e){return G(e,this.resolved)}findDragSettleTarget(e){return Bt({...e,resolved:this.resolved,allowed:this.allowedIds,maxAxisSize:this.maxAxisSize})}getAllowedRange(){return this.rangeCache??(this.rangeCache=_t(this.resolved,this.allowedIds))}getResolvedSnaps(){return this.resolved}getAllowedIds(){return this.allowedIds}getMaxAxisSize(){return this.maxAxisSize}setMaxAxisSize(e){this.maxAxisSize=e,this.onMaxAxisSizeChange?.(e)}}});function Vt(t,e){if(t.length!==0){for(let i of t)if(i!==e)try{if(i.state.size===0)continue;let n=i.getAllowedIds(),s=i.getResolvedSnaps(),r=l=>s.find(c=>c.id===l)?.size??0,a=n.find(l=>r(l)>0);a&&a!==i.state.activeId&&i.snapTo(a)}catch(n){queueMicrotask(()=>{throw n})}}}var Gt=m(()=>{"use strict"});function Wt(t){if(typeof window>"u")return()=>{};let e=()=>{if(t.isDestroyed())return;t.recomputeSnaps();let s=t.getMode(),a=s==="bottom"||s==="top"?window.innerHeight:window.innerWidth,l=t.getMaxAxisSize();a>0&&a<l&&t.setMaxAxisSize(a);let c=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let h=t.resolveActiveSnap(),d=t.getMaxAxisSize(),u=Math.min(h?h.size:t.getSize(),d);t.setSize(u),h&&!t.isDragging()&&(t.applySize(u),c&&t.resyncAfterCancel?.())},i=null;typeof ResizeObserver<"u"?(i=new ResizeObserver(e),i.observe(document.documentElement)):window.addEventListener("resize",e),window.addEventListener("orientationchange",e);let n=()=>{t.isDestroyed()||document.hidden&&t.cancelInFlight()};return document.addEventListener("visibilitychange",n),()=>{i?.disconnect(),window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),document.removeEventListener("visibilitychange",n)}}var Ut=m(()=>{"use strict"});function $t(t){if(typeof ResizeObserver>"u")return()=>{};if(!t.hasFitSnap())return()=>{};let e=0,i=()=>{e||(e=requestAnimationFrame(()=>{e=0,!(t.isDestroyed()||t.isDragging())&&t.recompute()}))},n=new ResizeObserver(i);n.observe(t.handle);let s=t.scrollContainer,r=new Set,a=new Set,l=typeof HTMLSlotElement<"u",c=()=>d(),h=()=>{if(!(!s||!l))for(let p of Array.from(s.children))p instanceof HTMLSlotElement&&!a.has(p)&&(p.addEventListener("slotchange",c),a.add(p))},d=()=>{h();let p=Yn(s);for(let v of r)p.includes(v)||(n.unobserve(v),r.delete(v));for(let v of p)r.has(v)||(n.observe(v),r.add(v));i()},u;return s&&(d(),typeof MutationObserver<"u"&&(u=new MutationObserver(d),u.observe(s,{childList:!0}))),()=>{n.disconnect(),u?.disconnect();for(let p of a)p.removeEventListener("slotchange",c);e&&cancelAnimationFrame(e)}}var Yn,qt=m(()=>{"use strict";Yn=t=>{if(!t)return[];let e=typeof HTMLSlotElement<"u",i=[];for(let n of Array.from(t.children))if(e&&n instanceof HTMLSlotElement)for(let s of n.assignedElements())i.push(s);else i.push(n);return i}});function Yt(t){let e,i,n=()=>{let r=i;if(r===void 0){e=void 0;return}if(typeof r=="number"){e=r;return}if(typeof window>"u")return;let a=ue(r,t.mode);e=a>0?a:void 0};return{setRadius(r){t.element.style.setProperty("--bs-radius",typeof r=="number"?`${r}px`:r)},setMaxHeight(r){let a=typeof r=="number"?`${r}px`:r,l=M(t.mode);t.element.style.setProperty(l==="height"?"max-height":"max-width",a),i=r,n(),t.recompute()},resolveCap:n,clampTo:()=>{e!==void 0&&t.getMaxAxisSize()>e&&t.setMaxAxisSize(e)},getCap:()=>e}}var Zt=m(()=>{"use strict";W();he()});var Zn,Xn,Xt,jt=m(()=>{"use strict";he();Zn=(t,e,i)=>{let n=i?"height":"width",s=t.style;if(!e){let v=s[n];s[n]="auto";let g=i?t.offsetHeight:t.offsetWidth;return s[n]=v,g}let r=e.style,a=s[n],l=r.flex,c=i?r.height:r.width;s[n]="auto",r.flex="none",i?r.height="auto":r.width="auto";let h=i?t.offsetHeight:t.offsetWidth,d=i?e.clientHeight:e.clientWidth,u=i?e.scrollHeight:e.scrollWidth,p=Math.max(h,h-d+u);return s[n]=a,r.flex=l,i?r.height=c:r.width=c,p},Xn=(t,e)=>{let i=t.offsetParent;return i&&i!==document.body&&i!==document.documentElement?e?i.clientHeight:i.clientWidth:e?window.innerHeight:window.innerWidth},Xt=t=>{let e=M(t.mode)==="height",i=Zn(t.element,t.scrollContainer,e),n=t.getMaxHeightCap(),s=n!==void 0?Math.min(i,n):i;if(typeof window>"u")return s;let r=Xn(t.element,e);return r>0?Math.min(s,r):s}});function Qt(t){let e=t.mode==="bottom"||t.mode==="top",i=e?"ArrowUp":"ArrowRight",n=e?"ArrowDown":"ArrowLeft",s=t.mode==="top"?n:i,r=t.mode==="top"?i:n,a=l=>{if(t.isDestroyed())return;let c=t.getAllowedIds(),h=c.indexOf(t.getActiveId());h!==-1&&(l.key===s&&h<c.length-1?(l.preventDefault(),t.snapTo(c[h+1])):l.key===r&&h>0?(l.preventDefault(),t.snapTo(c[h-1])):l.key==="Home"?(l.preventDefault(),t.snapTo(c[0])):l.key==="End"&&(l.preventDefault(),t.snapTo(c[c.length-1])))};return t.handle.addEventListener("keydown",a),()=>t.handle.removeEventListener("keydown",a)}var Jt=m(()=>{"use strict"});var Ne,ei=m(()=>{"use strict";Ne=Object.freeze({subtle:{color:"rgba(0,0,0,0.2)",blur:void 0,range:[.3,1],interactive:!1},standard:{color:"rgba(0,0,0,0.4)",blur:void 0,range:[0,1],interactive:!1},monitoring:{color:"rgba(15,15,20,0.55)",blur:"4px",range:[0,1],interactive:!1},cinematic:{color:"rgba(0,0,0,0.7)",blur:"12px",range:[0,1],interactive:!1}})});var w,Ke=m(()=>{"use strict";w=class{constructor(){o(this,"last",-1)}shouldWrite(e,i){return Math.abs(e-this.last)<=i?!1:(this.last=e,!0)}invalidate(){this.last=-1}setLastWritten(e){this.last=e}get value(){return this.last}}});function jn(t,e,i){let n=`calc(var(--bs-size, 0px) + ${i})`;switch(t){case"bottom":return e==="sheet-top-left"?{bottom:n,left:i}:e==="sheet-top-right"?{bottom:n,right:i}:{bottom:n,left:"50%",transform:"translateX(-50%)"};case"top":return e==="sheet-top-left"?{top:n,left:i}:e==="sheet-top-right"?{top:n,right:i}:{top:n,left:"50%",transform:"translateX(-50%)"};case"left":return e==="sheet-top-left"?{left:n,top:i}:e==="sheet-top-right"?{left:n,bottom:i}:{left:n,top:"50%",transform:"translateY(-50%)"};case"right":return e==="sheet-top-left"?{right:n,top:i}:e==="sheet-top-right"?{right:n,bottom:i}:{right:n,top:"50%",transform:"translateY(-50%)"}}}function k(t,e,i,n){switch(i){case"top-left":t.top=n,t.left=n;break;case"top-center":t.top=n,t.left="50%",t.transform="translateX(-50%)";break;case"top-right":t.top=n,t.right=n;break;case"center-left":t.top="50%",t.left=n,t.transform="translateY(-50%)";break;case"center":t.top="50%",t.left="50%",t.transform="translate(-50%, -50%)";break;case"center-right":t.top="50%",t.right=n,t.transform="translateY(-50%)";break;case"bottom-left":t.bottom=n,t.left=n;break;case"bottom-center":t.bottom=n,t.left="50%",t.transform="translateX(-50%)";break;case"bottom-right":t.bottom=n,t.right=n;break;case"sheet-top-left":case"sheet-top-center":case"sheet-top-right":{let s=jn(e,i,n);s.top!==void 0&&(t.top=s.top),s.bottom!==void 0&&(t.bottom=s.bottom),s.left!==void 0&&(t.left=s.left),s.right!==void 0&&(t.right=s.right),s.transform!==void 0&&(t.transform=s.transform);break}}}var me=m(()=>{"use strict"});var Jn,es,fe,ii=m(()=>{"use strict";ei();W();Ke();V();me();Jn=/^-?\d+(?:\.\d+)?(?:px|em|rem|%)$/,es="rgba(0, 0, 0, 0.4)",fe=class{constructor(e,i){o(this,"screenComponent");o(this,"backdrop");o(this,"mode");o(this,"isDestroyed");o(this,"getAllowedIds");o(this,"getResolvedSnaps");o(this,"snapToFn");o(this,"closeFn");o(this,"scrimInteractive",!1);o(this,"scrimMode");o(this,"backdropRange");o(this,"screenRange");o(this,"scrimEnabled",!0);o(this,"savedScrimRanges",null);o(this,"scrimTapToCloseEnabled",!1);o(this,"detachScrimTap",null);o(this,"scrimOverlayTeardown",null);o(this,"backdropOpacitySentinel",new w);o(this,"screenOpacitySentinel",new w);o(this,"lastBackdropPointer","");o(this,"lastScreenDisplay","");this.screenComponent=e.screenComponent,this.backdrop=e.backdrop,this.mode=e.mode,this.isDestroyed=e.isDestroyed,this.getAllowedIds=e.getAllowedIds,this.getResolvedSnaps=e.getResolvedSnaps,this.snapToFn=e.snapTo,this.closeFn=e.close,this.scrimMode=i.scrimMode??"full";let n=i.scrimPreset?Ne[i.scrimPreset]:null;this.backdropRange=i.backdropRange??n?.range??[0,1],this.screenRange=i.screenRange??n?.range??[0,1],this.scrimTapToCloseEnabled=i.scrimTapToClose??!1;let r=i.scrimColor??n?.color??(this.scrimMode!=="off"&&!this.backdrop?es:void 0);if(this.screenComponent){if(this.applyScrimStyles({color:r,blur:i.scrimBlur??n?.blur,interactive:i.scrimInteractive??n?.interactive??!1}),this.scrimMode==="above-sheet")this.applyAboveSheetInset();else if(this.scrimMode==="off"){let a=this.screenComponent.style;a.opacity="0",a.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"}}}invalidateOpacityCache(){this.backdropOpacitySentinel.invalidate(),this.screenOpacitySentinel.invalidate()}attach(){this.scrimTapToCloseEnabled&&this.setScrimTapToClose(!0)}applyOpacity(e,i){if(!(!i&&this.backdropOpacitySentinel.value!==-1&&this.screenOpacitySentinel.value!==-1)){if(this.backdrop){let[n,s]=this.backdropRange,r=Math.max(s-n,1e-4),a=Math.min(Math.max((e-n)/r,0),1);this.backdropOpacitySentinel.shouldWrite(a,.005)&&(this.backdrop.style.opacity=String(a));let l=a>.05?"auto":"none";l!==this.lastBackdropPointer&&(this.backdrop.style.pointerEvents=l,this.lastBackdropPointer=l)}if(this.screenComponent&&this.scrimMode!=="off"){let[n,s]=this.screenRange,r=Math.min(1,Math.max(0,(e-n)/Math.max(1e-4,s-n)));this.screenOpacitySentinel.shouldWrite(r,.005)&&(this.screenComponent.style.opacity=String(r));let a=r>0?"":"none";a!==this.lastScreenDisplay&&(this.screenComponent.style.display=a,this.lastScreenDisplay=a)}}}setBackdropRange(e,i){this.isDestroyed()||(this.backdropRange=e,this.invalidateOpacityCache(),i())}setScreenRange(e,i){this.isDestroyed()||(this.screenRange=e,this.invalidateOpacityCache(),i())}setScrimColor(e){this.isDestroyed()||this.applyScrimStyles({color:e===void 0?null:e})}setScrimBlur(e){this.isDestroyed()||this.applyScrimStyles({blur:e===void 0?null:e})}setScrimInteractive(e){this.isDestroyed()||this.applyScrimStyles({interactive:e})}setSheetMode(e){this.isDestroyed()||e===this.mode||(this.mode=e,this.invalidateOpacityCache())}setScrimMode(e,i){if(this.isDestroyed()||e===this.scrimMode)return;this.invalidateOpacityCache();let n=this.scrimMode;if(this.scrimMode=e,this.screenComponent){let s=this.screenComponent.style;n==="above-sheet"&&e!=="above-sheet"&&(s.position="",s.inset="",s.pointerEvents=""),e==="above-sheet"?this.applyAboveSheetInset():e==="off"?(s.opacity="0",s.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"):this.lastScreenDisplay==="none"&&(s.display="",this.lastScreenDisplay="")}i()}setScrimTapToClose(e){if(this.isDestroyed()||!this.screenComponent)return;let i=this.detachScrimTap!==null;if(e!==i)if(e){let n=this.screenComponent;n.style.pointerEvents==="none"&&(n.style.pointerEvents="auto");let s=()=>{if(this.isDestroyed())return;if(this.closeFn){this.closeFn();return}let r=this.getAllowedIds(),a=this.getResolvedSnaps(),l=r.find(c=>{let h=G(c,a);return h!==null&&h.size===0});l&&this.snapToFn(l)};n.addEventListener("click",s),this.detachScrimTap=()=>n.removeEventListener("click",s),this.scrimTapToCloseEnabled=!0}else this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimTapToCloseEnabled=!1}setScrimEnabled(e,i){this.isDestroyed()||e!==this.scrimEnabled&&(this.scrimEnabled=e,this.invalidateOpacityCache(),e?(this.screenRange=this.savedScrimRanges?.screen??[0,1],this.backdropRange=this.savedScrimRanges?.backdrop??[0,1],this.savedScrimRanges=null):(this.savedScrimRanges={screen:this.screenRange,backdrop:this.backdropRange},this.screenRange=[1,1],this.backdropRange=[1,1]),i())}setScrim(e,i){if(this.isDestroyed())return;if(e.preset){let s=Ne[e.preset];this.applyScrimStyles({color:s.color,blur:s.blur??null,interactive:s.interactive}),!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:s.range,backdrop:s.range}:(this.screenRange=s.range,this.backdropRange=s.range)}let n=()=>{};e.mode!==void 0&&this.setScrimMode(e.mode,n),e.enabled!==void 0&&this.setScrimEnabled(e.enabled,n),e.tapToClose!==void 0&&this.setScrimTapToClose(e.tapToClose),this.applyScrimStyles({color:e.color,blur:e.blur,interactive:e.interactive}),e.range!==void 0&&(!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:e.range,backdrop:this.savedScrimRanges.backdrop}:this.screenRange=e.range),this.invalidateOpacityCache(),i()}setScrimOverlay(e){if(this.isDestroyed())return()=>{};if(!this.screenComponent)return()=>{};this.scrimOverlayTeardown?.();let i=this.screenComponent,n=e.inset??"16px",s=Jn.test(n)?n:"16px";s!==n&&S(`[bottom-sheet] setScrimOverlay: invalid inset ${JSON.stringify(n)}; expected a CSS length like "16px" / "1rem" / "5%". Falling back to "16px".`),e.children.ownerDocument&&e.children.ownerDocument!==i.ownerDocument&&S("[bottom-sheet] setScrimOverlay: children belong to a different document than the scrim. Cross-document adoption can drop event listeners; construct children via the same document as the sheet root.");let r=e.position??"top-right",a=e.interactive??!0,l=i.ownerDocument.createElement("div");l.className="bs-scrim-overlay";let c=l.style;c.position="absolute",k(c,this.mode,r,s),a&&(c.pointerEvents="auto"),l.appendChild(e.children);let h=i.parentElement;if(!h)return S("[bottom-sheet] setScrimOverlay: scrim element has no parent, skipping overlay injection. Mount the sheet root before calling setScrimOverlay."),()=>{};h.appendChild(l);let d=()=>{l.parentNode&&l.parentNode.removeChild(l),this.scrimOverlayTeardown===d&&(this.scrimOverlayTeardown=null)};return this.scrimOverlayTeardown=d,d}destroy(){if(this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimOverlayTeardown?.(),this.scrimOverlayTeardown=null,this.screenComponent){let e=this.screenComponent.style;e.opacity="",e.display="",e.position="",e.inset="",e.pointerEvents=""}this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents=""),this.invalidateOpacityCache(),this.lastBackdropPointer="",this.lastScreenDisplay=""}applyScrimStyles(e){if(!this.screenComponent)return;let i=this.screenComponent.style;if(e.color!==void 0&&(i.background=e.color===null?"":e.color),e.blur!==void 0){let n=i;if(e.blur===null)i.backdropFilter="",n.webkitBackdropFilter="";else{let s=`blur(${e.blur})`;i.backdropFilter=s,n.webkitBackdropFilter=s}}e.interactive!==void 0&&(this.scrimInteractive=e.interactive,i.pointerEvents=e.interactive?"auto":"none")}applyAboveSheetInset(){if(!this.screenComponent)return;let e={bottom:"0 0 var(--bs-size) 0",top:"var(--bs-size) 0 0 0",left:"0 0 0 var(--bs-size)",right:"0 var(--bs-size) 0 0"},i=this.screenComponent.style;i.position="fixed",i.inset=e[this.mode],i.pointerEvents=this.scrimInteractive||this.scrimTapToCloseEnabled?"auto":"none"}}});var ni,ts,si,ri,oi,ai,ge=m(()=>{"use strict";ni=t=>1+2.40158*Math.pow(t-1,3)+1.40158*Math.pow(t-1,2),ts=t=>1-Math.pow(1-t,3),si=t=>t,ri=t=>1-Math.pow(1-t,5),oi=({from:t,to:e,duration:i,easing:n=ts,onUpdate:s})=>{let r=!1,a=0,l=null,c=performance.now(),h=new Promise(d=>{if(l=d,i<=0){s(e),d();return}let u=p=>{if(r)return;let v=p-c,g=Math.min(v/i,1),f=t+(e-t)*n(g);s(f),g<1?a=requestAnimationFrame(u):d()};a=requestAnimationFrame(u)});return{cancel:()=>{r=!0,cancelAnimationFrame(a),l?.()},promise:h}},ai=()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches});var Ve,is,li,Ge=m(()=>{"use strict";Ve={stiffness:220,damping:26,mass:1,restDelta:.5,restSpeed:.5},is=1/30,li=({from:t,to:e,velocity:i=0,config:n,onUpdate:s})=>{let r={...Ve,...n},a=!1,l=0,c=null,h=t,d=i,u=performance.now(),p=new Promise(v=>{c=v;let g=f=>{if(a)return;let y=Math.min((f-u)/1e3,is);u=f;let B=Math.max(1,Math.ceil(y*240)),D=y/B,le=B;for(;le-- >0;){let de=(-r.stiffness*(h-e)-r.damping*d)/r.mass;d+=de*D,h+=d*D}if(!Number.isFinite(h)||!Number.isFinite(d)){s(e,0),v();return}s(h,d),Math.abs(e-h)<(r.restDelta??.5)&&Math.abs(d)<(r.restSpeed??.5)?(s(e,0),v()):l=requestAnimationFrame(g)};l=requestAnimationFrame(g)});return{cancel:()=>{a=!0,cancelAnimationFrame(l),c?.()},promise:p}}});function di(t){switch(t){case"ios-spring":return{kind:"spring",spring:{stiffness:300,damping:30,mass:1}};case"material-bounce":return{kind:"spring",spring:{stiffness:200,damping:22,mass:1}};case"linear":return{kind:"tween",duration:ns,easing:si};case"snappy":return{kind:"tween",duration:180,easing:ri};case"tween":return{kind:"tween"};default:return{kind:"spring"}}}var ns,ci=m(()=>{"use strict";ge();ns=220});function ui(t,e,i,n){let s={...Ve,...n},r=1/We,a=hi/We*1e3,l=Math.ceil(ss/1e3*We),c=[t],h=t,d=i;for(let u=1;u<=l;u+=1){let p=-s.stiffness*(h-e)-s.damping*d;if(d+=p/s.mass*r,h+=d*r,!Number.isFinite(h)||!Number.isFinite(d)){c.push(e);break}if(u%hi===0&&c.push(h),Math.abs(e-h)<(s.restDelta??.5)&&Math.abs(d)<(s.restSpeed??.5))break}return c[c.length-1]!==e&&c.push(e),{values:c,stepMs:a,durationMs:(c.length-1)*a}}function pi(t,e,i,n){let s=Math.max(2,Math.min(60,Math.round(i/16))),r=[];for(let a=0;a<=s;a+=1){let l=a/s;r.push(t+(e-t)*n(l))}return r[r.length-1]=e,{values:r,stepMs:i/s,durationMs:i}}var We,hi,ss,mi=m(()=>{"use strict";Ge();We=240,hi=4,ss=3e3});var rs,fi,be,gi=m(()=>{"use strict";ge();Ge();ci();mi();rs=220,fi=1e3,be=class{constructor(e,i){o(this,"element");o(this,"getRootEl");o(this,"applySizeFn");o(this,"getSize");o(this,"isDragging");o(this,"applyAux");o(this,"getTransformFor");o(this,"settleWaapi");o(this,"currentWaapi",null);o(this,"animationKind");o(this,"springConfig");o(this,"duration");o(this,"easing");o(this,"respectReducedMotion");o(this,"reducedMotion",!1);o(this,"detachReducedMotion",null);o(this,"viewTransitionsAvailable");o(this,"currentTween",null);o(this,"currentSpring",null);this.element=e.element,this.getRootEl=e.getRootEl,this.applySizeFn=e.applySize,this.getSize=e.getSize,this.isDragging=e.isDragging,this.applyAux=e.applyAux,this.getTransformFor=e.getTransformFor,this.settleWaapi=i.settleAnimation==="waapi";let n=di(i.animation);this.animationKind=n.kind,this.duration=i.duration??n.duration??rs,this.easing=i.easing??n.easing??ni,this.springConfig={...n.spring??{},...i.spring??{}},this.respectReducedMotion=i.respectReducedMotion??!0;let s=i.viewTransitions??!1;if(this.viewTransitionsAvailable=s&&typeof document<"u"&&typeof document.startViewTransition=="function",this.respectReducedMotion&&typeof window<"u"&&typeof window.matchMedia=="function"){let r=window.matchMedia("(prefers-reduced-motion: reduce)");this.reducedMotion=r.matches;let a=l=>{this.reducedMotion=l.matches};typeof r.addEventListener=="function"?(r.addEventListener("change",a),this.detachReducedMotion=()=>r.removeEventListener("change",a)):typeof r.addListener=="function"&&(r.addListener(a),this.detachReducedMotion=()=>r.removeListener(a))}}get isAnimating(){return this.currentTween!==null||this.currentSpring!==null||this.currentWaapi!==null}cancelWaapi(){if(!this.currentWaapi)return;let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}cancel(){this.currentTween?.cancel(),this.currentSpring?.cancel(),this.cancelWaapi()}async animateTo(e,i){if(e===this.getSize()){!this.isAnimating&&!this.isDragging()&&(this.element.style.willChange="");return}if(this.currentTween?.cancel(),this.currentSpring?.cancel(),this.cancelWaapi(),this.getRootEl()?.setAttribute("data-animating","true"),this.element.style.willChange="transform",this.reducedMotion){this.applySizeFn(e),this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange="");return}if(this.settleWaapi&&this.applyAux&&this.getTransformFor&&typeof this.element.animate=="function"){let n=this.animationKind==="spring"?ui(this.getSize(),e,i*fi,this.springConfig):pi(this.getSize(),e,this.duration,this.easing);if(n.values.length>=2&&n.durationMs>0){await this.runWaapiSettle(n,e),this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""));return}}if(this.animationKind==="spring"){let n=li({from:this.getSize(),to:e,velocity:i*fi,config:this.springConfig,onUpdate:s=>this.applySizeFn(s)});this.currentSpring=n,await n.promise,this.currentSpring===n&&(this.currentSpring=null)}else{let n=oi({from:this.getSize(),to:e,duration:this.duration,easing:this.easing,onUpdate:s=>this.applySizeFn(s)});this.currentTween=n,await n.promise,this.currentTween===n&&(this.currentTween=null)}this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""))}async runWaapiSettle(e,i){let n=this.applyAux,s=this.getTransformFor,r=e.values.map(g=>({transform:s(g)})),a=this.element.animate(r,{duration:e.durationMs,easing:"linear",fill:"forwards"}),l=!1,c=0,h=performance.now(),d=e.values.length-1,u=()=>{if(l)return;let g=performance.now()-h,f=Math.min(Math.floor(g/e.stepMs),d);n(e.values[f]),c=requestAnimationFrame(u)};c=requestAnimationFrame(u);let p={anim:a,stop:()=>{l=!0,cancelAnimationFrame(c)}};this.currentWaapi=p;try{await a.finished}catch{}p.stop();let v=this.currentWaapi===p;if(v&&(this.currentWaapi=null),v&&a.playState==="finished"){this.applySizeFn(i);try{a.cancel()}catch{}}}destroy(){if(this.detachReducedMotion?.(),this.detachReducedMotion=null,this.currentTween=null,this.currentSpring=null,this.currentWaapi){let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}}}});var bi,os,vi,Ue,as,U,yi,Si=m(()=>{"use strict";bi=["a[href]","area[href]","button:not([disabled])","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","[contenteditable='true']","[tabindex]:not([tabindex='-1'])"].join(","),os=t=>typeof t.checkVisibility=="function"?t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):t.offsetParent!==null,vi=t=>{let e=Array.from(t.querySelectorAll(bi));if(typeof HTMLSlotElement<"u")for(let i of Array.from(t.querySelectorAll("slot")))for(let n of i.assignedElements())n.matches(bi)&&e.push(n),e.push(...vi(n));return e},Ue=t=>vi(t).filter(e=>!e.hasAttribute("inert")&&os(e)&&!e.matches("[aria-hidden='true']")),as=(t,e)=>{let i=e;for(;i;){if(i===t)return!0;let n=i.assignedSlot;if(n){i=n;continue}let s=i.parentNode;i=s instanceof ShadowRoot?s.host:s}return!1},U=[],yi=(t,e={})=>{if(typeof document>"u")return()=>{};let i={};U.push(i);let n=()=>U[U.length-1]===i,s=document.activeElement;(()=>{let h=e.initialFocus;if(h===!1){t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0});return}(typeof h=="string"?t.querySelector(h):h??Ue(t)[0]??t)?.focus({preventScroll:!0})})();let a=h=>{if(!n())return;if(h.key==="Escape"&&e.onEscape){e.onEscape();return}if(h.key!=="Tab")return;let d=Ue(t);if(d.length===0){h.preventDefault();return}let u=d[0],p=d[d.length-1],v=document.activeElement;h.shiftKey&&v===u?(h.preventDefault(),p.focus()):!h.shiftKey&&v===p&&(h.preventDefault(),u.focus())},l=h=>{if(!n())return;let d=h.target;d&&!as(t,d)&&Ue(t)[0]?.focus({preventScroll:!0})};document.addEventListener("keydown",a,!0),document.addEventListener("focusin",l,!0);let c=!1;return()=>{if(c)return;c=!0;let h=U.indexOf(i);h!==-1&&U.splice(h,1),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",l,!0),s&&document.contains(s)?s.focus({preventScroll:!0}):document.querySelector("[data-bs-restore-fallback]")?.focus({preventScroll:!0})}}});var $,T,xi,Ai=m(()=>{"use strict";$=0,T=null,xi=()=>{if(typeof document>"u")return()=>{};if($===0){let e=document.body;T={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:window.scrollY};let i=window.innerWidth-document.documentElement.clientWidth;if(i>0){let n=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${n+i}px`}e.style.overflow="hidden",e.style.position="fixed",e.style.top=`-${T.scrollY}px`,e.style.width="100%"}$++;let t=!1;return()=>{if(!t&&(t=!0,$=Math.max(0,$-1),$===0&&T)){let e=document.body;e.style.overflow=T.overflow,e.style.position=T.position,e.style.top=T.top,e.style.width=T.width,e.style.paddingRight=T.paddingRight,window.scrollTo(0,T.scrollY),T=null}}}});function Ti(t){let e=[];return{apply(){if(typeof document>"u")return;let i=t();for(;i.parentElement&&i.parentElement!==document.body;)i=i.parentElement;let n=i.parentElement??document.body;for(let s of Array.from(n.children))s!==i&&(s.hasAttribute("inert")||s.classList.contains("bs-backdrop")||s.classList.contains("bs-screen")||s.classList.contains("bs-root")||(s.setAttribute("inert",""),e.push(s)))},remove(){for(let i of e)i.removeAttribute("inert");e.length=0}}}var Ei=m(()=>{"use strict"});var ve,wi=m(()=>{"use strict";Si();Ai();Ei();ve=class{constructor(e,i){o(this,"element");o(this,"focusTrapEnabled");o(this,"initialFocus");o(this,"closeOnEscape");o(this,"bodyScrollLockEnabled");o(this,"inertSiblingsEnabled");o(this,"inertSiblings");o(this,"shouldApplyInertSiblings");o(this,"returnFocus");o(this,"releaseFocusTrap",null);o(this,"releaseScrollLock",null);o(this,"installed",!1);o(this,"destroyed",!1);this.element=e.element,this.focusTrapEnabled=i.focusTrap??!1,this.initialFocus=i.initialFocus,this.closeOnEscape=i.closeOnEscape??!0,this.bodyScrollLockEnabled=i.lockBodyScroll??!0,this.inertSiblingsEnabled=i.inertSiblings??!1,this.shouldApplyInertSiblings=i.shouldApplyInertSiblings??(()=>!0),this.returnFocus=i.returnFocus,this.inertSiblings=Ti(()=>this.element)}get isInstalled(){return this.installed}install(){this.destroyed||(this.installed=!0,this.bodyScrollLockEnabled&&!this.releaseScrollLock&&(this.releaseScrollLock=xi()),this.focusTrapEnabled&&!this.releaseFocusTrap&&(this.releaseFocusTrap=yi(this.element,{initialFocus:this.initialFocus})),this.inertSiblingsEnabled&&this.shouldApplyInertSiblings()&&this.inertSiblings.apply())}setReturnFocus(e){this.destroyed||(this.returnFocus=e)}release(){this.installed&&(this.installed=!1,this.releaseFocusTrap?.(),this.releaseFocusTrap=null,this.releaseScrollLock?.(),this.releaseScrollLock=null,this.inertSiblings.remove(),this.returnFocus&&(typeof this.returnFocus=="function"?this.returnFocus():typeof this.returnFocus=="string"?typeof document<"u"?document.querySelector(this.returnFocus):null:this.returnFocus)?.focus?.())}destroy(){this.release(),this.destroyed=!0}}});var Ci,$e,Mi,zi=m(()=>{"use strict";Ci=t=>t==="bottom"||t==="top",$e=class{constructor(e){o(this,"slots");o(this,"capacity");o(this,"head",0);o(this,"size",0);this.capacity=e,this.slots=new Array(e);for(let i=0;i<e;i++)this.slots[i]={t:0,v:0}}push(e,i){let n=this.slots[this.head];n.t=e,n.v=i,this.head=(this.head+1)%this.capacity,this.size<this.capacity&&this.size++}pruneBefore(e,i){for(;this.size>i;){let n=(this.head-this.size+this.capacity)%this.capacity;if(this.slots[n].t<e)this.size--;else break}}get length(){return this.size}oldest(){if(this.size!==0)return this.slots[(this.head-this.size+this.capacity)%this.capacity]}newest(){if(this.size!==0)return this.slots[(this.head-1+this.capacity)%this.capacity]}reset(){this.head=0,this.size=0}},Mi=(t,e,i,n={})=>{let s=null,r="touch",a=0,l=0,c=0,h=!1,d=b=>b==="mouse"?160:120,u=32,p=new $e(u),v=Ci(e)?"Y":"X",g=e==="bottom"||e==="right"?-1:1,f=b=>v==="Y"?b.clientY:b.clientX,y=b=>v==="Y"?b.clientX:b.clientY,B=b=>{try{t.setPointerCapture(b)}catch{}},D=()=>{s=null,h=!1,p.reset()},le=b=>{if(s===null&&!(b.button!==void 0&&b.button!==0)&&!(n.shouldStart&&!n.shouldStart(b))){if(s=b.pointerId,r=b.pointerType||"touch",a=f(b),l=y(b),c=a,p.reset(),p.push(b.timeStamp,a),n.deferStart){h=!0;return}B(b.pointerId),i.onStart(a,r)}},ke=b=>{if(b.pointerId!==s)return;let E=f(b),N=(E-a)*g;if(h){let K=n.deferStart(b,N,y(b)-l);if(K===!1){D();return}if(K!==!0)return;h=!1,a=E,c=E,p.reset(),p.push(b.timeStamp,E),B(b.pointerId),i.onStart(a,r);return}c=E,p.push(b.timeStamp,E);let Ie=b.timeStamp-d(r);p.pruneBefore(Ie,2),i.onMove(N)},Oe=b=>{if(b.pointerId!==s)return;if(h){D();return}let wt=(c-a)*g,N=0;if(p.length>=3){let K=p.oldest(),Ct=p.newest(),Mt=Ct.t-K.t;Mt>0&&(N=(Ct.v-K.v)/Mt*g)}let Ie=r;s=null,p.reset();try{t.hasPointerCapture(b.pointerId)&&t.releasePointerCapture(b.pointerId)}catch{}i.onEnd(wt,N,Ie)},de=b=>{if(b.pointerId!==s)return;let E=h;D(),!E&&i.onCancel?.()};t.addEventListener("pointerdown",le),t.addEventListener("pointermove",ke),t.addEventListener("pointerup",Oe),t.addEventListener("pointercancel",de);let Et=n.manageTouchAction!==!1,Ln=t.style.touchAction;return Et&&(t.style.touchAction=Ci(e)?"pan-x":"pan-y"),()=>{t.removeEventListener("pointerdown",le),t.removeEventListener("pointermove",ke),t.removeEventListener("pointerup",Oe),t.removeEventListener("pointercancel",de),Et&&(t.style.touchAction=Ln),s!==null&&t.hasPointerCapture(s)&&t.releasePointerCapture(s)}}});function qe(t,e){let i=Math.min(e*.15,80);if(i<=0)return 0;let n=Math.abs(t);return Math.sign(t)*(i*n/(n+i))}var Ri=m(()=>{"use strict"});function Di(t){if(typeof document>"u")return!1;let e=document.activeElement;if(!e||!t.contains(e))return!1;let i=e.tagName;if(!(i==="INPUT"||i==="TEXTAREA"||e.isContentEditable===!0))return!1;try{return e.blur(),!0}catch{return!1}}var ki=m(()=>{"use strict"});var q,Oi=m(()=>{"use strict";zi();Ri();ki();q=class{constructor(e){o(this,"deps");o(this,"detach",null);o(this,"isDragging_",!1);o(this,"dragStartSize",0);o(this,"currentPointerKind","touch");o(this,"keyboardDismissed",!1);o(this,"dragSuppressed",!1);o(this,"dragPayload",{size:0,delta:0});this.deps=e}get isDragging(){return this.isDragging_}install(){return this.detach?this.detach:(this.detach=Mi(this.deps.handle,this.deps.mode,{onStart:(e,i)=>{if(this.deps.getDisableDrag?.()){this.dragSuppressed=!0;return}this.dragSuppressed=!1,this.deps.cancelAnimation(),this.isDragging_=!0,this.dragStartSize=this.deps.getDragContext().size,this.currentPointerKind=i,this.keyboardDismissed=!1,this.deps.getRoot()?.setAttribute("data-dragging","true"),this.deps.element.style.willChange="transform",this.deps.emit("dragstart",{size:this.dragStartSize})},onMove:e=>{if(this.dragSuppressed)return;let i=this.deps.getDragContext(),{min:n,max:s}=i.range,r=i.maxAxisSize,a=i.rubberBandEnabled,l=this.dragStartSize+e;l>s?l=a?s+qe(l-s,r):s:l<n&&(l=a?n-qe(n-l,r):n),this.deps.applySize(l),!this.keyboardDismissed&&this.currentPointerKind==="touch"&&this.deps.mode==="bottom"&&l<this.dragStartSize&&Di(this.deps.element)&&(this.keyboardDismissed=!0),this.deps.listenerCount("drag")>0&&(this.dragPayload.size=l,this.dragPayload.delta=e,this.deps.emit("drag",this.dragPayload))},onEnd:(e,i,n)=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:i}),this.deps.settleAfterDrag(e,i,n)},onCancel:()=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:0});let e=this.dragStartSize;this.deps.animateTo(e,0)}},this.deps.gestureOptions),this.detach)}forceClearDragState(){this.isDragging_&&(this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.element.style.willChange="")}}});function Xe(t,e){let i=ls(t);return i?i.closest(Ze)?!1:e==="zones"?i.closest(Ye)!==null:!0:e!=="zones"}var Ye,Ze,ls,Ii=m(()=>{"use strict";Ye="[data-bs-drag]",Ze="[data-bs-no-drag]",ls=t=>{let e=t;return e&&typeof e.closest=="function"?e:null}});function Li(t){let e=t.slop??6,i=t.crossDelta??0;return t.sharesScrollAxis??!0?Math.abs(t.delta)<e?"pending":t.scrollTop>0||t.delta>0&&t.atMaxSnap?"scroll":"drag":Math.abs(t.delta)<e&&Math.abs(i)<e?"pending":Math.abs(t.delta)<=Math.abs(i)?"scroll":"drag"}var Pi=m(()=>{"use strict"});var ds,cs,ye,je=m(()=>{"use strict";ds=t=>t==="start"||t==="end",cs=t=>{if(!t)return"ltr";if(typeof getComputedStyle=="function")try{if(getComputedStyle(t).direction==="rtl")return"rtl"}catch{}try{let e=t.closest?.("[dir]");if(e)return e.getAttribute("dir")?.toLowerCase()==="rtl"?"rtl":"ltr"}catch{}return"ltr"},ye=(t,e)=>{if(!ds(t))return t;let i=cs(e)==="rtl";return t==="start"?i?"right":"left":i?"left":"right"}});function Qe(t,e){let i=n=>{e()&&n.cancelable&&n.preventDefault()};return t.addEventListener("touchmove",i,{passive:!1}),()=>t.removeEventListener("touchmove",i)}var Fi=m(()=>{"use strict"});var Y,Hi=m(()=>{"use strict";Y=class{constructor(e,i){o(this,"handle",e);e.setAttribute("aria-orientation",i==="bottom"||i==="top"?"vertical":"horizontal")}setValue(e,i){if(e.length===0){this.handle.removeAttribute("aria-valuemin"),this.handle.removeAttribute("aria-valuemax"),this.handle.removeAttribute("aria-valuenow"),this.handle.removeAttribute("aria-valuetext");return}let n=Math.max(e.length-1,0),s=Math.max(e.indexOf(i),0);this.handle.setAttribute("aria-valuemin","0"),this.handle.setAttribute("aria-valuemax",String(n)),this.handle.setAttribute("aria-valuenow",String(s)),this.handle.setAttribute("aria-valuetext",i)}}});function _i(t){let e=new Map,i=n=>{let s=t.getMaxAxisSize();return s<=0?!1:n<s/2};return{cache(n,s,r){let a=t.scrollContainer;a&&(i(s)||i(r)&&e.set(n,a.scrollTop))},restore(n,s,r){let a=t.scrollContainer;if(!a||i(r)||!i(s))return;let l=e.get(n);l!==void 0&&(a.scrollTop=l,e.delete(n))},clear(){e.clear()}}}var Bi=m(()=>{"use strict"});function hs(t,e){let i={frames:null,duration:0,easing:Se};if(t==="none")return i;if(t===void 0||typeof t=="string")return{frames:Ni[t??"fade"][e],duration:Je,easing:Se};let n=e==="enter"?t.enter:t.exit;return n?{frames:n,duration:t.duration??Je,easing:t.easing??Se}:t.preset==="none"?i:{frames:Ni[t.preset??"fade"][e],duration:t.duration??Je,easing:t.easing??Se}}function O(t,e,i){if((typeof e=="object"?e.respectReducedMotion!==!1:!0)&&ai())return et;let{frames:s,duration:r,easing:a}=hs(e,i);if(!s||r<=0||typeof t.animate!="function")return et;let l=t.animate(s,{duration:r,easing:a,fill:"both"});return{finished:l.finished.then(()=>{}).catch(()=>{}),cancel:()=>{try{l.cancel()}catch{return}}}}var Je,Se,Ni,et,tt=m(()=>{"use strict";ge();Je=200,Se="cubic-bezier(0.22, 1, 0.36, 1)",Ni={fade:{enter:[{opacity:0},{opacity:1}],exit:[{opacity:1},{opacity:0}]},scale:{enter:[{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}]},slide:{enter:[{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"translateY(0)"}],exit:[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(10px)"}]},pop:{enter:[{opacity:0,transform:"scale(0.6)",offset:0},{opacity:1,transform:"scale(1.06)",offset:.7},{opacity:1,transform:"scale(1)",offset:1}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.6)"}]}},et={finished:Promise.resolve(),cancel:()=>{}}});function Ki(t,e){let n=t.host.ownerDocument.createElement("div");n.className="bs-anchor";let s=e.interactive??!0,r=e.position??"sheet-top-right",a=r==="dock-bottom"||r==="dock-top",l=n.style;if(l.position="fixed",a?(l.left="0",l.right="0",r==="dock-bottom"?l.bottom="0":l.top="0"):k(l,t.mode,r,e.inset??"16px"),e.fadeRange){let[g,f]=e.fadeRange,y=Math.max(f-g,1e-4);l.opacity=`clamp(0, calc((var(--bs-progress, 0) - ${g}) / ${y}), 1)`}n.appendChild(e.element),t.host.appendChild(n);let c=null,h=null,d=g=>typeof e.showOn=="function"?e.showOn(g):Array.isArray(e.showOn)?e.showOn.includes(g.activeId):a||g.size>0,u=(g,f)=>{if(g===c)return;if(c=g,h?.cancel(),h=null,n.style.pointerEvents=g&&s?"auto":"none",g){n.style.visibility="",f&&(h=O(e.element,e.animation,"enter"));return}if(!f){n.style.visibility="hidden";return}let y=O(e.element,e.animation,"exit");h=y,y.finished.then(()=>{h===y&&c===!1&&(n.style.visibility="hidden")})},p=g=>{t.isDestroyed()||u(d(t.getState()),g)},v=[t.on("snap",()=>p(!0)),t.on("open",()=>p(!0)),t.on("close",()=>p(!0))];return p(!1),{wrapper:n,detach:()=>{v.forEach(g=>g()),h?.cancel(),h=null,n.parentNode&&n.parentNode.removeChild(n)},syncZ:g=>{n.style.zIndex=String(g)}}}var Vi=m(()=>{"use strict";me();tt()});function Wi(t,e){let i=t.host.ownerDocument,n=e.stages.map(d=>{let u=i.createElement("div");u.className="bs-scrim-stage";let p=u.style;return p.position="absolute",k(p,t.mode,d.position??e.position??"center",d.inset??e.inset??"16px"),p.visibility="hidden",p.pointerEvents="none",u.appendChild(d.element),t.host.appendChild(u),{def:d,wrapper:u,inFlight:null}}),s=null,r=()=>{let d=t.getState();return d.size===0?n.find(u=>Gi(u.def,d.activeId))??null:n.find(u=>Gi(u.def,d.activeId))??n.find(u=>us(u.def,d.progress))??null},a=(d,u)=>{if(d.inFlight?.cancel(),d.wrapper.style.pointerEvents="none",!u){d.inFlight=null,d.wrapper.style.visibility="hidden";return}let p=O(d.def.element,d.def.animation??e.animation,"exit");d.inFlight=p,p.finished.then(()=>{d.inFlight===p&&s!==d&&(d.wrapper.style.visibility="hidden")})},l=(d,u)=>{d.inFlight?.cancel(),d.inFlight=null,d.wrapper.style.visibility="",d.wrapper.style.pointerEvents=d.def.interactive??e.interactive??!1?"auto":"none",u&&(d.inFlight=O(d.def.element,d.def.animation??e.animation,"enter"))},c=d=>{if(t.isDestroyed())return;let u=r();if(u===s)return;let p=s;s=u,p&&a(p,d),u&&l(u,d)},h=[t.on("snap",()=>c(!0)),t.on("open",()=>c(!0)),t.on("close",()=>c(!0))];return n.some(d=>d.def.forRange)&&h.push(t.on("progress",()=>c(!0))),c(!1),()=>{h.forEach(d=>d());for(let d of n)d.inFlight?.cancel(),d.inFlight=null,d.wrapper.parentNode&&d.wrapper.parentNode.removeChild(d.wrapper);s=null}}var Gi,us,Ui=m(()=>{"use strict";me();tt();Gi=(t,e)=>t.for===void 0?!1:Array.isArray(t.for)?t.for.includes(e):t.for===e,us=(t,e)=>{if(!t.forRange)return!1;let[i,n]=t.forRange;return e>=i&&e<=n}});function $i(t,e){let i=t.allowed??t.snapPoints.map(s=>s.id),n=t.initial??i[0]??t.snapPoints[0]?.id??"default";if(t.persistKey){let s=fs(t.persistKey);s&&i.includes(s)&&(n=s)}return{mode:ye(t.mode??"bottom",t.element),flickVelocity:t.flickVelocity??ps,dragThreshold:t.dragThreshold??ms,dragFrom:t.dragFrom??(t.handle?"handle":"sheet"),dragFromContent:t.dragFromContent??!0,rubberBandEnabled:t.rubberBand??!0,closeOnBack:t.closeOnBack??!1,persistent:t.persistent??!1,disableClose:t.disableClose??!1,disableDrag:t.disableDrag??!1,closeOnRouteChange:t.closeOnRouteChange??!1,radius:t.radius,maxHeight:t.maxHeight,initialAllowed:i,initialId:n,scrim:{scrimMode:t.scrimMode,scrimColor:t.scrimColor,scrimBlur:t.scrimBlur,scrimInteractive:t.scrimInteractive??(t.scrimTapToClose?!0:void 0),scrimTapToClose:t.scrimTapToClose,scrimPreset:t.scrimPreset,screenRange:t.screenRange,backdropRange:t.backdropRange},animation:{animation:t.animation,settleAnimation:t.settleAnimation,duration:t.duration,easing:t.easing,spring:t.spring,respectReducedMotion:t.respectReducedMotion,viewTransitions:t.viewTransitions},lifecycle:{focusTrap:t.focusTrap,initialFocus:t.initialFocus,closeOnEscape:t.closeOnEscape,lockBodyScroll:t.lockBodyScroll,inertSiblings:t.inertSiblings,shouldApplyInertSiblings:e?.shouldApplyInertSiblings,returnFocus:t.returnFocusTo}}}var ps,ms,fs,qi=m(()=>{"use strict";je();ps=.65,ms=18;fs=t=>{if(typeof window>"u"||typeof localStorage>"u")return null;try{return localStorage.getItem(t)}catch{return null}}});var I,it=m(()=>{"use strict";I=class{constructor(){o(this,"fns",[])}add(e){e&&this.fns.push(e)}drain(){for(;this.fns.length;)try{this.fns.pop()()}catch(e){queueMicrotask(()=>{throw e})}}}});var gs,xe,Yi=m(()=>{"use strict";Rt();he();Dt();Ot();W();Nt();V();Kt();Gt();Ut();qt();Zt();jt();Jt();ii();gi();wi();Oi();Ii();Pi();je();Fi();Hi();Bi();Vi();Ui();qi();it();Ke();gs=8,xe=class{constructor(e){o(this,"id",He("bs"));o(this,"element");o(this,"handle");o(this,"scrollContainer");o(this,"backdrop");o(this,"screenComponent");o(this,"scrimParent",null);o(this,"mode");o(this,"flickVelocity");o(this,"dragThreshold");o(this,"dragFromMode");o(this,"dragFromContentDefault");o(this,"rubberBandEnabled");o(this,"scrim");o(this,"aria");o(this,"animation");o(this,"lifecycle");o(this,"closeOnBack");o(this,"routedTo");o(this,"persistent");o(this,"disableCloseFlag");o(this,"disableDragFlag");o(this,"closeOnRouteChange");o(this,"maxHeight");o(this,"maxHeightDeps");o(this,"snapPointsRaw");o(this,"snaps");o(this,"activeId");o(this,"size",0);o(this,"gesture");o(this,"contentGesture");o(this,"detachSheetGesture",null);o(this,"detachSliderKeyboard",null);o(this,"rootEl",null);o(this,"destroyed",!1);o(this,"restClosed",!1);o(this,"currentViewTransition",null);o(this,"currentAbort",new AbortController);o(this,"sizeWriteSentinel",new w);o(this,"progressWriteSentinel",new w);o(this,"isTopSheet",!0);o(this,"opening",!1);o(this,"promotedForOpen",!1);o(this,"allowOvershoot",!1);o(this,"progressPayload",{value:0,size:0});o(this,"dragContextBuf",{size:0,maxAxisSize:0,range:{min:0,max:0},rubberBandEnabled:!1});o(this,"bus",kt());o(this,"persistKey");o(this,"linkedSheets",[]);o(this,"scrollCache");o(this,"teardowns",new I);o(this,"anchors",[]);o(this,"anchorHost",null);o(this,"stackZ",100);o(this,"detachScrimStages",null);o(this,"stackEffectEnabled",!1);o(this,"stackEffectPrimed",!1);o(this,"fitDeps");o(this,"transformTemplate");o(this,"featureList",[]);o(this,"featureCtx");let i=$i(e,{shouldApplyInertSiblings:()=>typeof document>"u"?!1:Array.from(document.body.children).some(a=>a===e.element||a.contains(e.element))});this.element=e.element,this.handle=e.handle??e.element,this.scrollContainer=e.scrollContainer,this.backdrop=e.backdrop,this.screenComponent=e.scrim??e.screenComponent,this.scrimParent=this.screenComponent?.parentElement??null,this.mode=i.mode,this.element.dataset.mode=this.mode,this.transformTemplate=Pe(this.mode),this.aria=new Y(this.handle,this.mode),this.flickVelocity=i.flickVelocity,this.dragThreshold=i.dragThreshold,this.dragFromMode=i.dragFrom,this.dragFromContentDefault=i.dragFromContent,this.rubberBandEnabled=i.rubberBandEnabled,this.scrim=new fe({mode:this.mode,screenComponent:this.screenComponent,backdrop:this.backdrop,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),getResolvedSnaps:()=>this.snaps.getResolvedSnaps().slice(),snapTo:r=>{this.snapTo(r)},close:()=>{this.canDismiss()&&this.close("backdrop")}},i.scrim),this.animation=new be({element:this.element,getRootEl:()=>this.rootEl,applySize:r=>this.applySize(r),getSize:()=>this.size,isDragging:()=>this.isDraggingAny(),applyAux:r=>this.applySize(r,!0),getTransformFor:r=>this.transformTemplate(this.snaps.getMaxAxisSize()-r)},i.animation),this.lifecycle=new ve({element:this.element,close:()=>this.close()},i.lifecycle),this.closeOnBack=i.closeOnBack,this.routedTo=e.routedTo,this.persistent=i.persistent,this.disableCloseFlag=i.disableClose,this.disableDragFlag=i.disableDrag,this.closeOnRouteChange=i.closeOnRouteChange,this.stackEffectEnabled=e.stackEffect??!1,this.snapPointsRaw=e.snapPoints,this.persistKey=e.persistKey,e.linkedSheets&&(this.linkedSheets=e.linkedSheets);let n=new Map;for(let r of e.features??[])n.set(r.name,r);this.featureList=Array.from(n.values()),this.activeId=i.initialId,_e(this.snapPointsRaw),this.auditDuplicateSnapIds(this.snapPointsRaw),this.rootEl=this.element.closest(".bs-root"),this.maxHeightDeps={element:this.element,mode:this.mode,getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),setMaxAxisSize:r=>{this.snaps.setMaxAxisSize(r)},recompute:()=>this.recompute()},this.maxHeight=Yt(this.maxHeightDeps),this.fitDeps={element:this.element,scrollContainer:this.scrollContainer,mode:this.mode,getMaxHeightCap:()=>this.maxHeight.getCap()},this.snaps=new pe(this.snapPointsRaw,i.initialAllowed,this.mode,()=>Xt(this.fitDeps),r=>{this.element.style[M(this.mode)]=`${r}px`});let s=this.snaps.findById(this.activeId);if(s&&(this.size=s.size),this.applySize(this.size),this.setRestClosed(this.size===0),this.updateAriaSlider(),this.scrollCache=_i({scrollContainer:this.scrollContainer,getMaxAxisSize:()=>this.snaps.getMaxAxisSize()}),this.featureCtx=this.buildFeatureContext(e.autoCollapseAfter),this.attach(),this.registerInStack(),this.snaps.getMaxAxisSize()===0&&typeof IntersectionObserver<"u"&&typeof document<"u"){let r=new IntersectionObserver(a=>{for(let l of a)if(l.isIntersecting){if(this.destroyed)return;this.snaps.recompute(),this.healActiveSnap(),r.disconnect();return}});r.observe(this.element),this.teardowns.add(()=>r.disconnect())}this.teardowns.add($t({handle:this.handle,scrollContainer:this.scrollContainer,hasFitSnap:()=>this.snapPointsRaw.some(r=>r.size==="fit"||r.size==="content"),isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),recompute:()=>this.recompute()})),i.radius!==void 0&&this.setRadius(i.radius),i.maxHeight!==void 0&&this.setMaxHeight(i.maxHeight),this.applyAutoAriaLabelledBy(),this.runFeatureStage("post"),this.warnOrphanFeatureOptions(),this.size>0&&this.handleOpen()}buildFeatureContext(e){return{element:this.element,scrollContainer:this.scrollContainer,sheetId:this.id,options:{routedTo:this.routedTo,closeOnBack:this.closeOnBack,closeOnRouteChange:this.closeOnRouteChange,persistKey:this.persistKey,autoCollapseAfter:e},isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),isAnimating:()=>this.animation.isAnimating,isTopSheet:()=>this.isTopSheet,isVerticalAxis:()=>this.mode==="bottom"||this.mode==="top",getSize:()=>this.size,getActiveId:()=>this.activeId,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),allowedIdsBySize:()=>this.allowedIdsBySize(),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),resolveSnap:i=>this.snaps.findById(i),resolveActiveSnap:()=>this.snaps.findById(this.activeId),setSize:i=>{this.size=i},setMaxAxisSize:i=>{this.snaps.setMaxAxisSize(i)},applySize:i=>this.applySize(i),recomputeSnaps:()=>this.recomputeSnaps(),newCycle:()=>{this.newCycle()},cancelInFlight:()=>{this.animation.cancel()},resyncAfterResize:()=>this.resyncAfterResize(),snapTo:i=>{this.snapTo(i)},close:i=>this.close(i),attachDragSurface:(i,n)=>this.attachDragSurface(i,n),on:(i,n)=>this.on(i,n),addTeardown:i=>this.teardowns.add(i)}}runFeatureStage(e){for(let i of this.featureList){if((i.stage??"post")!==e)continue;let n=i.install(this.featureCtx);n&&this.teardowns.add(n)}}warnOrphanFeatureOptions(){let e=new Set(this.featureList.map(i=>i.name));(this.closeOnBack||this.routedTo!==void 0||this.closeOnRouteChange)&&!e.has("route")&&S("[BottomSheet] closeOnBack/routedTo/closeOnRouteChange need routeFeature() \u2014 option ignored"),this.persistKey&&!e.has("persist")&&S("[BottomSheet] persistKey needs persistFeature() \u2014 snaps will not be saved")}get state(){return{size:this.size,activeId:this.activeId,isDragging:this.isDraggingAny(),isAnimating:this.animation.isAnimating,progress:this.computeProgress(this.size)}}on(e,i){return this.bus.on(e,i)}use(e){if(this.destroyed)return S(`[BottomSheet] use("${e.name}") called on destroyed engine \u2014 ignored.`),this;let i=[],n={add:r=>{typeof r=="function"&&i.push(r)}},s;try{s=e.install(this,n)}catch(r){for(let a=i.length-1;a>=0;a--)try{i[a]()}catch(l){queueMicrotask(()=>{throw l})}return queueMicrotask(()=>{throw r}),this}for(let r of i)this.teardowns.add(r);return typeof s=="function"&&this.teardowns.add(s),this}setLinkedSheets(e){this.destroyed||(this.linkedSheets=e)}getAllowedIds(){return this.snaps.getAllowedIds().slice()}getResolvedSnaps(){return this.snaps.getResolvedSnaps()}async snapTo(e,i=0,n=!1){if(this.destroyed)return;let s=typeof i=="object"?i:{velocity:i},r=s.velocity??0,a=s.signal;if(a?.aborted)return;let l=this.snaps.findById(e);if(!l){S(`[BottomSheet] unknown snap id: ${e}`);return}if(!this.snaps.getAllowedIds().includes(e)){S(`[BottomSheet] snap "${e}" is not in allowed list`);return}if(!n&&this.emitBeforeSnap(l,this.activeId))return;let c=this.opening,h=this.newCycle(),d=()=>{this.animation.cancel(),this.newCycle()};a?.addEventListener("abort",d,{once:!0});let u=this.size===0||c,p=this.activeId,v=this.size;this.scrollCache.cache(p,v,l.size),this.activeId=e;let g=this.snapPointsRaw.find(y=>y.id===e)?.size;if(u&&!(e==="closed"||g===0)&&(this.opening=!0,c||(this.promotedForOpen=!0,C.promote(this.id))),this.animation.viewTransitionsAvailable){this.currentViewTransition?.skipTransition?.();let y=document.startViewTransition(()=>{this.applySize(l.size)});y.ready?.catch(()=>{}),this.currentViewTransition=y;try{await y.finished}catch{}this.currentViewTransition===y&&(this.currentViewTransition=null)}else await this.animation.animateTo(l.size,r);a?.removeEventListener("abort",d),!h.aborted&&(this.opening=!1,this.completeSnap(e,l.size,v,u,!1))}completeSnap(e,i,n,s,r){this.scrollCache.restore(e,n,i),this.updateAriaSlider(),this.emit("snap",{id:e,size:this.size,progress:this.computeProgress(this.size)}),r&&this.haptic(),this.setRestClosed(i===0),s&&i>0&&this.emitOpenSequence(e),i===0&&this.emitCloseSequence()}setRestClosed(e){e!==this.restClosed&&(this.restClosed=e,e?this.element.setAttribute("data-bs-rest","closed"):this.element.removeAttribute("data-bs-rest"))}emitOpenSequence(e){this.emit("open",{id:e}),this.handleOpen(),Vt(this.linkedSheets,this),this.emit("opened",{id:e})}emitCloseSequence(){this.emit("close",void 0),this.handleClose(),this.emit("closed",void 0)}async dragTo(e,i=0){if(this.destroyed)return;let n=typeof i=="object"?i:{velocity:i},s=n.velocity??0,r=n.signal;if(r?.aborted)return;this.newCycle();let a=()=>{this.animation.cancel(),this.newCycle()};r?.addEventListener("abort",a,{once:!0});let l=Math.max(0,Math.min(e,this.snaps.getMaxAxisSize()));await this.animation.animateTo(l,s),r?.removeEventListener("abort",a),this.destroyed||r?.aborted}open(e){if(this.destroyed)return Promise.resolve();let i=e??this.snaps.getAllowedIds().find(n=>(this.snaps.findById(n)?.size??0)>0)??this.activeId;return this.snapTo(i)}close(e="programmatic"){if(this.destroyed||this.disableCloseFlag||this.size>0&&this.emitBeforeClose(e))return Promise.resolve();let i=this.snapPointsRaw.find(n=>n.id==="closed")?.id??this.snaps.getAllowedIds().find(n=>this.snaps.findById(n)?.size===0)??this.snaps.getAllowedIds()[0];return this.snapTo(i??this.activeId)}canDismiss(){return!this.persistent&&!this.disableCloseFlag&&!this.destroyed}setPersistent(e){this.destroyed||(this.persistent=e)}setDisableClose(e){this.destroyed||(this.disableCloseFlag=e)}setDisableDrag(e){this.destroyed||(this.disableDragFlag=e)}setDragFromContent(e){this.destroyed||(this.dragFromContentDefault=e)}setDragFrom(e){this.destroyed||e===this.dragFromMode||(this.gesture?.forceClearDragState(),this.detachSheetGesture?.(),this.dragFromMode=e,this.mountSheetGesture())}getDragFrom(){return this.dragFromMode}setMode(e){if(this.destroyed)return;let i=ye(e,this.element);if(i===this.mode)return;let n=this.mode==="bottom"||this.mode==="top",s=i==="bottom"||i==="top";this.gesture?.forceClearDragState(),this.detachSheetGesture?.(),this.animation.cancel(),this.element.style.removeProperty(M(this.mode)),this.mode=i,this.element.dataset.mode=i,this.transformTemplate=Pe(i),this.maxHeightDeps.mode=i,this.fitDeps.mode=i,this.snaps.setMode(i),this.scrim.setSheetMode(i),n!==s&&(this.aria=new Y(this.handle,i)),this.detachSliderKeyboard?.(),this.mountSliderKeyboard(),this.mountSheetGesture(),this.recompute();let r=this.snaps.findById(this.activeId);r&&this.applySize(r.size),this.updateAriaSlider()}getMode(){return this.mode}isTop(){return this.isTopSheet}depth(){return C.depthOf(this.id)}expand(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),i=e[e.length-1];return i?this.snapTo(i):Promise.resolve()}collapse(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),n=e.find(s=>(this.snaps.findById(s)?.size??0)>0)??e[0];return n?this.snapTo(n):Promise.resolve()}setRadius(e){this.destroyed||this.maxHeight.setRadius(e)}setMaxHeight(e){this.destroyed||this.maxHeight.setMaxHeight(e)}setAllowed(e,i){if(!this.destroyed){if(this.snaps.setAllowedIds(e),this.updateAriaSlider(),i&&e.includes(i))this.snapTo(i,0,!0);else if(!e.includes(this.activeId)){let n=e[0];n&&this.snapTo(n,0,!0)}}}setBackdropRange(e){this.scrim.setBackdropRange(e,()=>this.applySize(this.size))}setScreenRange(e){this.scrim.setScreenRange(e,()=>this.applySize(this.size))}setScrimColor(e){this.scrim.setScrimColor(e)}setScrimBlur(e){this.scrim.setScrimBlur(e)}setScrimInteractive(e){this.scrim.setScrimInteractive(e)}setScrim(e){this.scrim.setScrim(e,()=>this.applySize(this.size))}setScrimMode(e){this.scrim.setScrimMode(e,()=>this.applySize(this.size))}setScrimTapToClose(e){this.scrim.setScrimTapToClose(e)}setScrimEnabled(e){this.scrim.setScrimEnabled(e,()=>this.applySize(this.size))}setScrimOverlay(e){return this.scrim.setScrimOverlay(e)}addAnchor(e){if(this.destroyed||typeof document>"u")return()=>{};this.anchorHost||(this.anchorHost=this.rootEl??this.element.parentElement??document.body,this.anchorHost.style.setProperty("--bs-size",`${this.size}px`),this.anchorHost.style.setProperty("--bs-progress",String(this.computeProgress(this.size))));let i=Ki({mode:this.mode,host:this.anchorHost,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(s,r)=>this.on(s,r),isDestroyed:()=>this.destroyed},e);i.syncZ(this.stackZ+1),this.anchors.push(i);let n=()=>{let s=this.anchors.indexOf(i);s!==-1&&(this.anchors.splice(s,1),i.detach())};return this.teardowns.add(n),n}setScrimStages(e){if(this.destroyed||typeof document>"u")return()=>{};if(this.detachScrimStages?.(),this.detachScrimStages=null,!e)return()=>{};let i=this.screenComponent?.parentElement;if(!i)return S("[BottomSheet] setScrimStages: no scrim element mounted \u2014 pass `scrim` to the engine first."),()=>{};let n=Wi({mode:this.mode,host:i,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(r,a)=>this.on(r,a),isDestroyed:()=>this.destroyed},e),s=()=>{this.detachScrimStages===s&&(this.detachScrimStages=null),n()};return this.detachScrimStages=s,this.teardowns.add(()=>this.detachScrimStages?.()),s}getScrimState(){return{mode:this.scrim.scrimMode,enabled:this.scrim.scrimEnabled}}setSnapPoints(e,i){if(this.destroyed)return;if(this.animation.cancel(),this.newCycle(),this.snapPointsRaw=e,_e(e),this.auditDuplicateSnapIds(e),this.snaps.setRaw(e),i)this.snaps.setAllowedIds(i);else{let s=this.snaps.getResolvedSnaps().map(a=>a.id),r=this.snaps.getAllowedIds().filter(a=>s.includes(a));this.snaps.setAllowedIds(r.length?r:s)}this.scrollCache.clear(),this.scrim.invalidateOpacityCache();let n=this.snaps.findById(this.activeId);if(n)this.applySize(n.size);else{let s=this.snaps.getResolvedSnaps().find(r=>this.snaps.getAllowedIds().includes(r.id))??this.snaps.getResolvedSnaps()[0];s&&(this.activeId=s.id,this.applySize(s.size))}this.updateAriaSlider()}recompute(){this.destroyed||(this.maxHeight.resolveCap(),this.snaps.recompute(),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache(),!this.isDraggingAny()&&this.healActiveSnap())}healActiveSnap(){let e=this.snaps.findById(this.activeId);e&&(this.size=e.size,this.applySize(this.size),this.updateAriaSlider(),this.size>0&&!this.lifecycle.isInstalled&&!this.opening&&!this.animation.isAnimating&&this.emitOpenSequence(this.activeId))}destroy(){this.destroyed=!0,this.opening=!1,this.currentAbort.abort(),this.currentViewTransition?.skipTransition?.(),this.currentViewTransition=null,this.bus.clear(),this.animation.cancel(),this.gesture?.forceClearDragState(),this.contentGesture?.forceClearDragState(),this.setRestClosed(!1),this.teardowns.drain(),this.scrim.destroy(),this.animation.destroy(),this.lifecycle.destroy(),this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents="");for(let e of[this.anchorHost,this.scrimParent,this.rootEl])e&&(e.style.removeProperty("--bs-size"),e.style.removeProperty("--bs-progress"));this.screenComponent&&(this.screenComponent.style.opacity="",this.screenComponent.style.display=""),this.sizeWriteSentinel.invalidate(),this.progressWriteSentinel.invalidate()}emit(e,i){this.bus.emit(e,i)}newCycle(){return this.allowOvershoot=!1,this.opening=!1,this.currentAbort.abort(),this.currentAbort=new AbortController,this.currentAbort.signal}emitBeforeSnap(e,i){return Be(n=>this.emit("before-snap",n),{id:e.id,size:e.size,previousId:i},"before-snap")}emitBeforeClose(e){return Be(i=>this.emit("before-close",i),{reason:e},"before-close")}applyAutoAriaLabelledBy(){if(typeof document>"u"||!this.lifecycle.focusTrapEnabled||this.element.getAttribute("aria-labelledby"))return;let e=this.handle??this.element,i=e.querySelector("[data-bs-title]")??e.querySelector("h1,h2,h3,h4,h5,h6");i&&(i.id||(i.id=He("bs-title")),this.element.setAttribute("aria-labelledby",i.id))}recomputeSnaps(){this.maxHeight.resolveCap(),this.snaps.setRaw(this.snapPointsRaw),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache()}auditDuplicateSnapIds(e){let i=new Set;for(let n of e)i.has(n.id)&&S(`[BottomSheet] duplicate snap id "${n.id}" \u2014 only the first occurrence is reachable.`),i.add(n.id)}getAllowedRange(){return this.snaps.getAllowedRange()}allowedIdsBySize(){return this.snaps.getAllowedIds().slice().sort((e,i)=>(this.snaps.findById(e)?.size??0)-(this.snaps.findById(i)?.size??0))}updateAriaSlider(){this.aria.setValue(this.allowedIdsBySize(),this.activeId)}registerInStack(){this.teardowns.add(C.push({id:this.id,setZIndex:e=>{this.stackZ=e,this.element.style.zIndex=String(e),this.backdrop&&(this.backdrop.style.zIndex=String(e-1));for(let i of this.anchors)i.syncZ(e+1)},setIsTop:e=>{this.isTopSheet=e},isOpen:()=>this.size>0||this.opening,setDepth:e=>this.applyStackDepth(e)}))}applyStackDepth(e){if(!this.stackEffectEnabled)return;if(this.element.setAttribute("data-stack-depth",String(e)),!this.stackEffectPrimed){this.stackEffectPrimed=!0;let n=this.mode==="bottom"||this.mode==="top";this.element.style.transformOrigin=n?"50% 100%":"0% 50%",this.element.style.transition="scale 320ms cubic-bezier(0.29, 1.04, 0.84, 0.99)"}let i=Math.max(1-e*.04,.86);this.element.style.scale=i===1?"":String(i)}buildGestureDeps(e,i){return{handle:e,element:this.element,mode:this.mode,gestureOptions:i,getRoot:()=>this.rootEl,getDragContext:()=>{let n=this.dragContextBuf,s=this.getAllowedRange();return n.size=this.size,n.maxAxisSize=this.snaps.getMaxAxisSize(),n.range.min=s.min,n.range.max=s.max,n.rubberBandEnabled=this.rubberBandEnabled,n},getDisableDrag:()=>this.disableDragFlag,cancelAnimation:()=>this.animation.cancel(),applySize:n=>this.applySize(n),animateTo:(n,s)=>this.animation.animateTo(n,s),settleAfterDrag:(n,s,r)=>this.settleAfterDrag(n,s,r),emit:(n,s)=>this.emit(n,s),listenerCount:n=>this.bus.listenerCount(n)}}isContentDragAllowed(){return this.disableDragFlag?!1:this.snapPointsRaw.find(i=>i.id===this.activeId)?.dragFromContent??this.dragFromContentDefault}decideContentDrag(e,i,n,s){if(this.destroyed||i.pointerType==="mouse"||this.gesture?.isDragging||!this.isContentDragAllowed()||!Xe(i.target,"sheet"))return!1;let r=Li({delta:n,crossDelta:s,sharesScrollAxis:this.mode==="bottom"||this.mode==="top",scrollTop:e.scrollTop,atMaxSnap:this.size>=this.getAllowedRange().max-.5});return r==="pending"?null:r==="drag"}attachDragSurface(e,i){if(this.destroyed||i!=="content"||this.contentGesture)return;let n=new q(this.buildGestureDeps(e,{manageTouchAction:!1,deferStart:(a,l,c)=>this.decideContentDrag(e,a,l,c)}));this.contentGesture=n;let s=n.install(),r=Qe(e,()=>n.isDragging);return()=>{r(),s(),this.contentGesture===n&&(this.contentGesture=void 0)}}sheetDragSurface(){return this.dragFromMode==="handle"?this.handle:this.element}canStartSheetDrag(e){if(this.contentGesture?.isDragging)return!1;let i=e.target,n=typeof i?.closest=="function";return n&&i.closest(Ze)?!1:this.handle!==this.element&&n&&this.handle.contains(i)?!0:Xe(e.target,this.dragFromMode)?this.dragFromMode==="handle"?!0:!(this.scrollContainer&&n&&this.scrollContainer.contains(i)&&!i.closest(Ye)):!1}mountSheetGesture(){let e=this.sheetDragSurface(),i=new q(this.buildGestureDeps(e,{shouldStart:r=>this.canStartSheetDrag(r),manageTouchAction:this.dragFromMode==="handle"}));this.gesture=i;let n=i.install(),s=this.dragFromMode==="handle"?null:Qe(e,()=>i.isDragging);this.detachSheetGesture=()=>{s?.(),n()}}attach(){this.mountSheetGesture(),this.teardowns.add(()=>{this.detachSheetGesture?.(),this.detachSheetGesture=null});try{this.attachFeatures()}catch(e){this.teardowns.drain();try{this.scrim.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.animation.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.lifecycle.destroy()}catch(i){queueMicrotask(()=>{throw i})}throw this.destroyed=!0,e}}attachFeatures(){if(this.runFeatureStage("attach"),typeof window<"u"&&(this.teardowns.add(Wt({element:this.element,getMode:()=>this.mode,isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),resolveActiveSnap:()=>this.snaps.findById(this.activeId),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),getSize:()=>this.size,setMaxAxisSize:e=>{this.snaps.setMaxAxisSize(e)},setSize:e=>{this.size=e},recomputeSnaps:()=>this.recomputeSnaps(),applySize:e=>this.applySize(e),cancelInFlight:()=>{this.animation.cancel()},newCycle:()=>{this.newCycle()},isAnimating:()=>this.animation.isAnimating,resyncAfterCancel:()=>this.resyncAfterResize()})),this.lifecycle.closeOnEscape)){let e=i=>{this.destroyed||i.defaultPrevented||this.canDismiss()&&i.key==="Escape"&&this.isTopSheet&&this.size>0&&this.close("escape")};document.addEventListener("keydown",e),this.teardowns.add(()=>document.removeEventListener("keydown",e))}this.mountSliderKeyboard(),this.scrim.attach()}mountSliderKeyboard(){let e=Qt({handle:this.handle,mode:this.mode,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:i=>{this.snapTo(i)}});this.detachSliderKeyboard=e,this.teardowns.add(()=>{this.detachSliderKeyboard?.(),this.detachSliderKeyboard=null})}settleAfterDrag(e,i,n="touch"){let s=this.newCycle(),r=this.snaps.findDragSettleTarget({delta:e,velocity:i,pointerKind:n,size:this.size,activeId:this.activeId,flickVelocity:this.flickVelocity,dragThreshold:this.dragThreshold});if(!r){this.clearWillChangeIfIdle();return}let a=this.activeId;if(r.id===a&&r.size===this.size){this.clearWillChangeIfIdle();return}if(this.emitBeforeSnap(r,a)){let u=this.snaps.findById(a);u&&this.animation.animateTo(u.size,0);return}let l=this.size,c=this.snaps.findById(a)?.size;this.scrollCache.cache(a,l,r.size),this.activeId=r.id,c===0&&r.size>0&&(this.opening=!0,this.promotedForOpen=!0,C.promote(this.id));let h=this.snaps.getMaxAxisSize(),d=h>0?Math.min(r.size,h):r.size;this.allowOvershoot=!0,this.animation.animateTo(d,i).then(()=>{s.aborted||(this.allowOvershoot=!1,this.opening=!1,this.completeSnap(r.id,r.size,l,c===0,!0))})}isDraggingAny(){return(this.gesture?.isDragging??!1)||(this.contentGesture?.isDragging??!1)}clearWillChangeIfIdle(){this.animation.isAnimating||this.isDraggingAny()||(this.element.style.willChange="")}haptic(){if(typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(gs)}catch{}}applySize(e,i=!1){let n=this.snaps.getMaxAxisSize(),s=n>0&&e>n&&!this.isDraggingAny()&&!this.allowOvershoot?n:e;this.size=s,s>0&&this.setRestClosed(!1);let r=n-s,a=this.element.style;i||(a.transform=this.transformTemplate(r)),this.sizeWriteSentinel.shouldWrite(s,.5)&&(a.setProperty("--bs-size",`${s}px`),this.scrimParent&&this.scrimParent.style.setProperty("--bs-size",`${s}px`),this.anchorHost&&this.anchorHost!==this.scrimParent&&this.anchorHost.style.setProperty("--bs-size",`${s}px`),this.rootEl&&this.rootEl!==this.scrimParent&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-size",`${s}px`));let l=this.computeProgress(s),c=this.progressWriteSentinel.shouldWrite(l,.005);c&&(a.setProperty("--bs-progress",String(l)),this.anchorHost&&this.anchorHost.style.setProperty("--bs-progress",String(l)),this.rootEl&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-progress",String(l))),this.scrim.applyOpacity(l,c),c&&this.bus.listenerCount("progress")>0&&(this.progressPayload.value=l,this.progressPayload.size=s,this.emit("progress",this.progressPayload))}computeProgress(e){let{min:i,max:n}=this.getAllowedRange(),s=Math.min(n,this.snaps.getMaxAxisSize());return s<=i?0:Math.min(Math.max((e-i)/(s-i),0),1)}handleOpen(){this.promotedForOpen?this.promotedForOpen=!1:C.promote(this.id);try{this.lifecycle.install()}catch(e){this.destroyed||this.newCycle(),this.handleClose(),this.applySize(0),this.activeId=this.snapPointsRaw.find(i=>i.id==="closed")?.id??this.activeId,this.size=0,queueMicrotask(()=>{throw e})}}resyncAfterResize(){if(this.destroyed)return;let e=this.snaps.findById(this.activeId);e&&(this.updateAriaSlider(),this.emit("snap",{id:e.id,size:this.size,progress:this.computeProgress(this.size)}),e.size>0&&!this.lifecycle.isInstalled?this.emitOpenSequence(e.id):e.size===0&&this.lifecycle.isInstalled&&this.emitCloseSequence())}handleClose(){this.opening=!1,this.promotedForOpen=!1,this.lifecycle.release(),C.update()}}});function Zi(){if(P>0){P-=1;let n=nt.shift();n&&n(),L();return}if(A.length===0){st(),L();return}let t=null,e=-1;for(let n=A.length-1;n>=0;n-=1){let s=A[n];if(s.surface.isOpen()&&(t||(t=s,e=n),s.surface.isTop())){t=s,e=n;break}}if(!t){let n=A.pop();n&&(n.live=!1),L();return}t.live=!1,A.splice(e,1);let i=t;Promise.resolve(i.surface.close()).then(()=>{i.surface.isOpen()&&ys(i)}),L()}function ys(t){!F()||!j()||(t.live=!0,Me(()=>{try{history.pushState(rt(t.surface),"",t.surface.url)}catch{t.live=!1}}),t.live&&(A.push(t),ot()))}function Xi(t){let e={surface:t,priorUrl:void 0,live:!1};return!F()||!j()||(e.priorUrl=t.url!==void 0?location.href:void 0,Me(()=>{try{history.pushState(rt(t),"",t.url),e.live=!0}catch{e.live=!1}}),e.live&&(A.push(e),ot())),e}function at(t){if(!F()||!j())return;let e=t,i=A.indexOf(e);if(i===-1||!e.live)return;let n=A.length-1;e.live=!1,A.splice(i,1);let s=null;if(i!==n){let r=A[A.length-1].surface,a=e.priorUrl;s=()=>{Me(()=>{history.replaceState(rt(r),"",a!==void 0?a:location.href)})}}nt.push(s),P+=1,Me(()=>{try{history.back()}catch{P=Math.max(0,P-1),nt.pop()}}),L()}function ji(t){return!F()||!j()?()=>{}:(z.add(t),z.size===1&&bs(),ot(),()=>{z.has(t)&&(z.delete(t),z.size===0&&vs(),L())})}var A,z,P,Ae,nt,Te,Ee,Z,X,we,Ce,F,j,rt,Me,st,ot,L,bs,vs,Qi=m(()=>{"use strict";A=[],z=new Set,P=0,Ae=0,nt=[],Te=!1,Ee=!1,Z=null,X=null,we=null,Ce=null,F=()=>typeof window<"u",j=()=>typeof history<"u",rt=t=>({...t.markerState(),__bs:!0}),Me=t=>{Ae+=1;try{t()}finally{Ae-=1}},st=()=>{let t=Array.from(z);for(let e of t)e()},ot=()=>{Te||!F()||(window.addEventListener("popstate",Zi),Te=!0)},L=()=>{Te&&(A.length>0||z.size>0||P>0||(F()&&window.removeEventListener("popstate",Zi),Te=!1))},bs=()=>{Ee||!j()||(Z=history.pushState,X=history.replaceState,we=function(...t){Z.apply(this,t),Ae===0&&st()},Ce=function(...t){X.apply(this,t),Ae===0&&st()},history.pushState=we,history.replaceState=Ce,Ee=!0)},vs=()=>{Ee&&(history.pushState===we&&Z&&(history.pushState=Z),history.replaceState===Ce&&X&&(history.replaceState=X),Z=null,X=null,we=null,Ce=null,Ee=!1)}});function Ji(t){if(typeof window>"u")return()=>{};if(!t.routedTo&&!t.closeOnBack)return()=>{};let e=null,i=()=>{e||(e=Xi({isOpen:()=>!t.isDestroyed()&&t.getSize()>0,isTop:t.isTopSheet,close:t.close,markerState:()=>t.routedTo!==void 0?{__bsRouted:t.sheetId}:{__bsSheet:t.sheetId},url:t.routedTo}))},n=()=>{e&&(at(e),e=null)},s=t.on("open",i),r=t.on("close",n);return t.getSize()>0&&i(),()=>{s(),r(),e&&(at(e),e=null)}}function en(t){return ji(()=>{t.isDestroyed()||t.getSize()<=0||t.close()})}var tn=m(()=>{"use strict";Qi()});function nn(t,e){return t.on("snap",({id:n})=>{if(!(typeof window>"u")&&!(typeof localStorage>"u"))try{localStorage.setItem(e,n)}catch{}})}var sn=m(()=>{"use strict"});function rn(t){let{ms:e}=t;if(e===void 0||e<=0)return()=>{};let i=null,n=()=>{i!==null&&(clearTimeout(i),i=null)},s=()=>{if(t.isDestroyed()||t.isDragging())return;let l=t.resolveSnap(t.getActiveId());if(!l||l.size===0)return;let c=null;for(let h of t.getAllowedIds()){let d=t.resolveSnap(h);!d||d.size<=0||(!c||d.size<c.size)&&(c=d)}c&&(c.id===l.id||c.size>=l.size||t.snapTo(c.id))},r=()=>{n(),!t.isDestroyed()&&(i=setTimeout(()=>{i=null,s()},e))},a=t.on("snap",()=>r());return(t.resolveSnap(t.getActiveId())?.size??0)>0&&r(),()=>{n(),a()}}var on=m(()=>{"use strict"});function an(t){let e=t.attachDragSurface(t.container,"content");return()=>e?.()}var ln=m(()=>{"use strict"});function dn(t){if(typeof window>"u"||!window.visualViewport)return()=>{};let e=window.visualViewport,i=null,n=()=>{i===null&&(i=requestAnimationFrame(()=>{if(i=null,t.isDestroyed())return;t.recomputeSnaps();let s=t.isVerticalAxis(),r=s?e.height:e.width,a=s?window.innerHeight:window.innerWidth,l=Math.max(0,Math.min(a,r)-8);l<t.getMaxAxisSize()&&t.setMaxAxisSize(l);let c=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let h=t.getMaxAxisSize();t.setSize(Math.min(t.getSize(),h));let d=t.resolveActiveSnap();d&&!t.isDragging()?(t.applySize(Math.min(d.size,h)),c&&t.resyncAfterCancel?.()):t.applySize(t.getSize())}))};return e.addEventListener("resize",n),()=>{e.removeEventListener("resize",n),i!==null&&cancelAnimationFrame(i)}}var cn=m(()=>{"use strict"});function hn(){return{name:"route",install:t=>{let e=new I;return t.options.closeOnRouteChange&&e.add(en({isDestroyed:t.isDestroyed,getSize:t.getSize,close:()=>t.close()})),e.add(Ji({routedTo:t.options.routedTo,closeOnBack:t.options.closeOnBack,isTopSheet:t.isTopSheet,getSize:t.getSize,isDestroyed:t.isDestroyed,close:()=>t.close("back"),on:t.on,sheetId:t.sheetId})),()=>e.drain()}}}function un(){return{name:"persist",install:t=>{let e=t.options.persistKey;if(e)return nn({on:t.on},e)}}}function pn(){return{name:"auto-collapse",install:t=>rn({ms:t.options.autoCollapseAfter,isDestroyed:t.isDestroyed,isDragging:t.isDragging,getAllowedIds:t.getAllowedIds,getActiveId:t.getActiveId,resolveSnap:t.resolveSnap,snapTo:t.snapTo,on:t.on})}}function mn(){return{name:"content-swipe",stage:"attach",install:t=>{if(t.scrollContainer)return an({container:t.scrollContainer,attachDragSurface:t.attachDragSurface})}}}function fn(){return{name:"visual-viewport",install:t=>{if(!(typeof window>"u"))return dn({element:t.element,isVerticalAxis:t.isVerticalAxis,isDestroyed:t.isDestroyed,isDragging:t.isDragging,recomputeSnaps:t.recomputeSnaps,resolveActiveSnap:t.resolveActiveSnap,getMaxAxisSize:t.getMaxAxisSize,getSize:t.getSize,setMaxAxisSize:t.setMaxAxisSize,setSize:t.setSize,applySize:t.applySize,cancelInFlight:t.cancelInFlight,newCycle:t.newCycle,isAnimating:t.isAnimating,resyncAfterCancel:t.resyncAfterResize})}}}var gn=m(()=>{"use strict";tn();sn();on();ln();cn();it()});function bn(){return[mn(),fn(),un(),pn(),hn()]}var vn=m(()=>{"use strict";gn()});var ze,yn=m(()=>{"use strict";Yi();vn();ze=class extends xe{constructor(e){super({...e,features:[...bn(),...e.features??[]]})}}});var Sn,xn=m(()=>{"use strict";Sn=':where(.bs-root){--bs-surface-d:#ffffff;--bs-surface-border-d:rgba(225,227,237,1);--bs-radius-d:20px;--bs-handle-color-d:rgba(26,22,20,0.3);--bs-handle-width:40px;--bs-handle-height:5px;--bs-z-backdrop:90;--bs-z-sheet:100;--bs-backdrop-color-d:rgba(0,0,0,0.5);--bs-scrim-color-d:transparent;--bs-scrim-blur:0px;--bs-z-scrim:calc(var(--bs-z-sheet) - 1);--bs-size:0px;--bs-progress:0}.bs-backdrop{position:fixed;inset:0;background:var(--bs-backdrop-color,var(--bs-backdrop-color-d));opacity:0;pointer-events:none;z-index:var(--bs-z-backdrop);transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-backdrop,.bs-root[data-animating="true"] .bs-backdrop{transition:none}.bs-sheet{position:fixed;background:var(--bs-surface,var(--bs-surface-d));box-shadow:var(--bs-shadow,var(--bs-shadow-auto,none));--bs-shadow-fade:clamp(0,calc(var(--bs-progress,0) * 8),1);z-index:var(--bs-z-sheet);pointer-events:auto;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none;overscroll-behavior:contain}.bs-sheet[data-mode="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));padding-bottom:env(safe-area-inset-bottom);--bs-shadow-auto:0 calc(var(--bs-progress,0) * -2px - 3px) calc(var(--bs-progress,0) * 18px + 12px) rgba( 0,0,0,calc(var(--bs-shadow-fade) * (var(--bs-progress,0) * 0.15 + 0.12)) )}.bs-sheet[data-mode="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom:1px solid var(--bs-surface-border,var(--bs-surface-border-d));flex-direction:column-reverse;--bs-shadow-auto:0 3px 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12));padding-top:env(safe-area-inset-top)}.bs-sheet[data-mode="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-mode="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:-3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-bs-rest="closed"]{box-shadow:none;visibility:hidden}.bs-sheet[data-bs-webgl="on"],.bs-sheet[data-bs-webgl="on"] .bs-handle,.bs-sheet[data-bs-webgl="on"] .bs-header,.bs-sheet[data-bs-webgl="on"] .bs-footer{background:transparent;box-shadow:none}.bs-sheet[data-mode="left"] .bs-content{padding-right:36px}.bs-sheet[data-mode="right"] .bs-content{padding-left:36px}.bs-handle{flex-shrink:0;min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:var(--bs-handle-padding,8px 16px 4px);cursor:grab;touch-action:none;user-select:none;background:var(--bs-surface,var(--bs-surface-d));-webkit-tap-highlight-color:transparent;outline:none;position:relative}.bs-handle:active{cursor:grabbing}.bs-handle:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:var(--bs-radius,var(--bs-radius-d))}.bs-handle::before{content:"";display:block;width:var(--bs-handle-width);height:var(--bs-handle-height);background:var(--bs-handle-color,var(--bs-handle-color-d));border-radius:calc(var(--bs-handle-height) / 2);margin:0 auto 8px;transition:width 0.15s ease,background 0.15s ease,transform 0.15s ease;pointer-events:none}.bs-sheet[data-mode="left"] .bs-handle,.bs-sheet[data-mode="right"] .bs-handle{position:absolute;top:0;bottom:0;width:28px;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;background:var(--bs-surface,var(--bs-surface-d));z-index:1;overflow:hidden}.bs-sheet[data-mode="left"] .bs-handle>*,.bs-sheet[data-mode="right"] .bs-handle>*{display:none}.bs-sheet[data-mode="left"] .bs-handle{right:0;border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="right"] .bs-handle{left:0;border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="left"] .bs-handle::before,.bs-sheet[data-mode="right"] .bs-handle::before{width:var(--bs-handle-height);height:var(--bs-handle-width);margin:0}.bs-sheet:hover .bs-handle::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 15%)}.bs-handle:active::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 35%);transform:scaleX(1.15)}.bs-handle.bs-handle--ticks::after{content:"";display:block;position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:calc(var(--bs-handle-width) * 2);height:3px;background-image:radial-gradient( circle,var(--bs-handle-color,var(--bs-handle-color-d)) 0 1.5px,transparent 1.6px );background-size:8px 3px;background-repeat:repeat-x;background-position:center;opacity:0;transition:opacity 0.18s ease-out;pointer-events:none}.bs-root[data-dragging="true"] .bs-handle.bs-handle--ticks::after{opacity:0.4}.bs-sheet[data-mode="top"] .bs-handle.bs-handle--ticks::after{bottom:auto;top:6px}.bs-sheet[data-mode="left"] .bs-handle.bs-handle--ticks::after,.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:3px;height:calc(var(--bs-handle-width) * 2);background-size:3px 8px;background-repeat:repeat-y;margin-left:calc(var(--bs-handle-height) + 6px)}.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{margin-left:calc(-1 * (var(--bs-handle-height) + 6px))}.bs-header{flex:0 0 auto;min-height:var(--bs-header-min-height,0px);padding:var(--bs-header-padding,0 16px 8px);background:var(--bs-surface,var(--bs-surface-d))}.bs-content{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:text;padding:var(--bs-content-padding,0 16px 16px)}.bs-footer{flex:0 0 auto;padding:var(--bs-footer-padding,12px 16px calc(12px + env(safe-area-inset-bottom)));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-mode="bottom"]:has(.bs-footer:not([hidden]):has(*)){padding-bottom:0}.bs-header:not(:has(*)),.bs-footer:not(:has(*)),.bs-header[hidden],.bs-footer[hidden]{display:none}.bs-screen{position:absolute;inset:0;pointer-events:none;z-index:var(--bs-z-scrim);background:var(--bs-scrim-color,var(--bs-scrim-color-d));backdrop-filter:blur(var(--bs-scrim-blur,0px));-webkit-backdrop-filter:blur(var(--bs-scrim-blur,0px));transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-screen,.bs-root[data-animating="true"] .bs-screen{transition:none}.bs-scrim-overlay{z-index:calc(var(--bs-z-sheet) + 1);pointer-events:none}.bs-button-slot{position:fixed;z-index:calc(var(--bs-z-sheet) + 1);pointer-events:auto}.bs-button-slot[data-side="left"]{left:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-side="right"]{right:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="top"]{bottom:auto;top:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="left"]{left:calc(var(--bs-size,0px) + 12px);right:auto;bottom:auto;top:16px}.bs-button-slot[data-mode="right"]{right:calc(var(--bs-size,0px) + 12px);left:auto;bottom:auto;top:16px}@media (prefers-reduced-motion:reduce){.bs-backdrop,.bs-handle::before,.bs-button-slot[data-side="left"],.bs-button-slot[data-side="right"]{transition:none !important}}@media (prefers-color-scheme:dark){:where(.bs-root){--bs-surface-d:#1a1a1d;--bs-surface-border-d:rgba(255,255,255,0.08);--bs-handle-color-d:rgba(255,255,255,0.45);--bs-shadow-auto:0 -3px 16px rgba(0,0,0,0.5)}}@media (forced-colors:active){.bs-sheet{border:1px solid CanvasText}.bs-handle::before{background:CanvasText;forced-color-adjust:none}.bs-backdrop,.bs-screen{forced-color-adjust:none}}.bs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.ovl-root){--ovl-surface:var(--bs-surface,var(--bs-surface-d,#ffffff));--ovl-surface-border:var(--bs-surface-border,var(--bs-surface-border-d,rgba(0,0,0,0.08)));--ovl-shadow:0 -8px 40px rgba(0,0,0,0.35);--ovl-radius:var(--bs-radius,var(--bs-radius-d,20px));--ovl-backdrop-color:rgba(0,0,0,0.5);--ovl-z-backdrop:200;--ovl-z-panel:201}.ovl-backdrop{position:fixed;inset:0;background:var(--ovl-backdrop-color);opacity:0;pointer-events:none;z-index:var(--ovl-z-backdrop)}.ovl-panel{position:fixed;background:var(--ovl-surface);box-shadow:var(--ovl-shadow);z-index:var(--ovl-z-panel);-webkit-tap-highlight-color:transparent;outline:none;transition:transform 0.32s cubic-bezier(0.29,1.24,0.84,0.99),opacity 0.32s ease-out}.ovl-panel[data-state="open"]{transform:translate3d(0,0,0);opacity:1}@starting-style{.ovl-panel[data-edge="bottom"][data-state="open"]{transform:translate3d(0,100%,0);opacity:0}.ovl-panel[data-edge="top"][data-state="open"]{transform:translate3d(0,-100%,0);opacity:0}.ovl-panel[data-edge="left"][data-state="open"]{transform:translate3d(-100%,0,0);opacity:0}.ovl-panel[data-edge="right"][data-state="open"]{transform:translate3d(100%,0,0);opacity:0}}.ovl-panel[data-edge="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--ovl-radius);border-top-right-radius:var(--ovl-radius);border-top:1px solid var(--ovl-surface-border);padding-bottom:env(safe-area-inset-bottom)}.ovl-panel[data-edge="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-bottom:1px solid var(--ovl-surface-border);padding-top:env(safe-area-inset-top)}.ovl-panel[data-edge="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-right:1px solid var(--ovl-surface-border)}.ovl-panel[data-edge="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--ovl-radius);border-bottom-left-radius:var(--ovl-radius);border-left:1px solid var(--ovl-surface-border)}@media (prefers-reduced-motion:reduce){.ovl-panel,.ovl-backdrop{transition:none !important}}'});var Re,An,Tn,En=m(()=>{"use strict";Re=t=>{let e=document.createElement("slot");return e.name=t,e},An=(t,e)=>{let i=document.createElement("div");i.className=e,i.setAttribute("part",t);let n=Re(t);i.appendChild(n);let s=()=>{i.hidden=n.assignedNodes({flatten:!0}).length===0};return n.addEventListener("slotchange",s),s(),i},Tn=()=>{let t=document.createElement("div");t.className="bs-root";let e=document.createElement("div");e.className="bs-backdrop",e.setAttribute("part","backdrop");let i=document.createElement("div");i.className="bs-screen",i.setAttribute("part","screen"),i.appendChild(Re("screen"));let n=document.createElement("section");n.className="bs-sheet",n.setAttribute("part","sheet"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false");let s=document.createElement("div");s.className="bs-button-slot",s.setAttribute("data-side","left"),s.setAttribute("part","left-button"),s.appendChild(Re("leftButton"));let r=document.createElement("div");r.className="bs-button-slot",r.setAttribute("data-side","right"),r.setAttribute("part","right-button"),r.appendChild(Re("rightButton"));let a=document.createElement("div");a.className="bs-handle",a.setAttribute("part","handle"),a.setAttribute("role","slider"),a.setAttribute("tabindex","0"),a.setAttribute("aria-label","Resize sheet");let l=An("header","bs-header"),c=document.createElement("div");c.className="bs-content",c.setAttribute("part","content"),c.setAttribute("tabindex","0"),c.setAttribute("role","region"),c.setAttribute("aria-label","Sheet content");let h=document.createElement("slot");c.appendChild(h);let d=An("footer","bs-footer"),u=document.createElement("span");u.className="bs-sr-announce",u.setAttribute("role","status"),u.setAttribute("aria-live","polite"),u.setAttribute("aria-atomic","true"),u.style.cssText="position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);",n.append(a,l,c,d),t.append(e,i,n,s,r,u);let p=document.createDocumentFragment();return p.appendChild(t),{fragment:p,refs:{sheet:n,handle:a,header:l,content:c,footer:d,backdrop:e,screen:i,leftButton:s,rightButton:r,announcer:u}}}});var lt,dt,ct,Q,ht,Cn,ut,pt,mt,ft,gt,bt,J,ee,te,ie,H,vt,ne,se,yt,re,oe,R,Mn,zn,Ss,wn,Rn,xs,As,St,Dn,Ts,xt,De,ae,Es,ws,kn,On=m(()=>{"use strict";lt="snap-points",dt="allowed",ct="initial",Q="mode",ht="backdrop",Cn="stylesheet",ut="animation",pt="focus-trap",mt="close-on-escape",ft="lock-body-scroll",gt="sheet-label",bt="stack-effect",J="persistent",ee="disable-close",te="disable-drag",ie="drag-from",H="drag-from-content",vt="close-on-route-change",ne="radius",se="max-height",yt="return-focus-to",re="backdrop-color",oe="scrim-color",R="snap",Mn=new Set([Q,ne,se,re,oe,R,J,ee,te,ie,H]),zn=[lt,dt,ct,Q,ht,ut,pt,mt,ft,gt,bt,J,ee,te,ie,H,vt,ne,se,yt,re,oe,R],Ss=t=>!!t&&typeof t=="object"&&typeof t.id=="string"&&(typeof t.size=="number"||typeof t.size=="string"),wn=[{id:"full",size:"full"}],Rn=t=>{if(!t)return wn;try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&e.every(Ss))return e;if(Array.isArray(e))return wn}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let[i,n]=e.split(":").map(a=>a.trim()),s=Number(n),r=Number.isFinite(s)?s:n;return{id:i??"default",size:r}})},xs=["bottom","top","left","right"],As=["spring","tween","ios-spring","material-bounce","linear","snappy"],St=t=>t&&xs.includes(t)?t:"bottom",Dn=t=>t&&As.includes(t)?t:void 0,Ts=["handle","sheet","zones"],xt=t=>t&&Ts.includes(t)?t:void 0,De=t=>t?t.split(",").map(e=>e.trim()).filter(Boolean):void 0,ae=t=>{if(t===null)return;let e=Number(t);return Number.isFinite(e)&&t.trim()!==""?e:t},Es=["top-left","top-center","top-right","center-left","center","center-right","bottom-left","bottom-center","bottom-right","sheet-top-left","sheet-top-center","sheet-top-right","dock-bottom","dock-top"],ws=["fade","scale","slide","pop","none"],kn=t=>{let e=t.getAttribute("data-position"),i=t.getAttribute("data-animation"),n=De(t.getAttribute("data-show-on")),s=De(t.getAttribute("data-fade-range")),r=s?.length===2&&s.every(a=>Number.isFinite(Number(a)))?[Number(s[0]),Number(s[1])]:void 0;return{position:e&&Es.includes(e)?e:void 0,inset:t.getAttribute("data-inset")??void 0,showOn:n,fadeRange:r,interactive:t.getAttribute("data-interactive")!=="false",animation:i&&ws.includes(i)?i:void 0}}});var In={};zt(In,{BottomSheetElement:()=>_,defineBottomSheet:()=>At});var Cs,_,At,Tt=m(()=>{"use strict";yn();xn();En();On();Cs=typeof HTMLElement<"u"?HTMLElement:class{},_=class extends Cs{constructor(){super();o(this,"engine",null);o(this,"root");o(this,"offHandlers",[]);o(this,"refs");o(this,"backdropClickHandler",null);o(this,"stylesheetLinked",!1);o(this,"declarativeAnchors",[]);o(this,"lastActiveId",null);this.root=this.attachShadow({mode:"open"});let i=document.createElement("style");i.textContent=Sn,this.root.appendChild(i);let n=document.createElement("style");n.textContent=[":host { display: contents; }",".bs-handle:focus-visible {"," outline: 2px solid currentColor;"," outline-offset: -2px;"," border-radius: var(--bs-radius, 20px);","}","@media (forced-colors: active) {"," .bs-handle:focus-visible { outline: 2px solid CanvasText; }","}"].join(`
2
- `),this.root.appendChild(n);let{fragment:s,refs:r}=Tn();this.refs=r,this.root.appendChild(s)}static get observedAttributes(){return zn.slice()}connectedCallback(){if(!this.stylesheetLinked){this.stylesheetLinked=!0;let i=this.getAttribute(Cn);if(i){let n=document.createElement("link");n.rel="stylesheet",n.href=i,this.root.appendChild(n)}}this.initEngine()}disconnectedCallback(){this.teardownEngine()}attributeChangedCallback(i,n,s){if(this.engine){if(Mn.has(i)){this.applyLiveAttribute(i,s);return}this.teardownEngine(),this.initEngine()}}applyLiveAttribute(i,n){if(this.engine)switch(i){case ne:{let s=ae(n);s!==void 0&&this.engine.setRadius(s);break}case se:{let s=ae(n);s!==void 0&&this.engine.setMaxHeight(s);break}case re:case oe:this.engine.setScrimColor(n);break;case J:this.engine.setPersistent(n==="true");break;case ee:this.engine.setDisableClose(n==="true");break;case te:this.engine.setDisableDrag(n==="true");break;case H:this.engine.setDragFromContent(n!=="false");break;case ie:{let s=xt(n);s&&this.engine.setDragFrom(s);break}case Q:this.engine.setMode(St(n));break;case R:n&&n!==this.engine.state.activeId&&this.engine.snapTo(n);break}}getEngine(){return this.engine}teardownEngine(){this.lastActiveId=this.engine?.state.activeId??this.lastActiveId,this.offHandlers.forEach(i=>i()),this.offHandlers=[],this.backdropClickHandler&&(this.refs.backdrop.removeEventListener("click",this.backdropClickHandler),this.backdropClickHandler=null),this.engine?.destroy(),this.engine=null;for(let i of this.declarativeAnchors)this.appendChild(i);this.declarativeAnchors=[]}initEngine(){let{sheet:i,handle:n,content:s,backdrop:r,announcer:a}=this.refs,l=St(this.getAttribute(Q));i.setAttribute("data-mode",l),this.refs.leftButton.setAttribute("data-mode",l),this.refs.rightButton.setAttribute("data-mode",l);let c=this.getAttribute(pt)==="true";c?i.setAttribute("aria-modal","true"):i.removeAttribute("aria-modal"),i.setAttribute("aria-label",this.getAttribute(gt)??"Bottom sheet");let h=this.getAttribute(ht)!=="false";r.style.display=h?"":"none",h&&(this.backdropClickHandler=()=>{this.engine?.canDismiss()&&this.engine.close("backdrop")},r.addEventListener("click",this.backdropClickHandler));let d=Rn(this.getAttribute(lt)),u=this.getAttribute(ct)??void 0,p=this.lastActiveId&&d.some(f=>f.id===this.lastActiveId)?this.lastActiveId:u,v={element:i,handle:n,scrollContainer:s,backdrop:h?r:void 0,scrim:this.refs.screen,mode:l,snapPoints:d,allowed:De(this.getAttribute(dt)),initial:p,animation:Dn(this.getAttribute(ut)),focusTrap:c,closeOnEscape:this.getAttribute(mt)!=="false",lockBodyScroll:this.getAttribute(ft)!=="false",stackEffect:this.getAttribute(bt)==="true",persistent:this.getAttribute(J)==="true",disableClose:this.getAttribute(ee)==="true",disableDrag:this.getAttribute(te)==="true",dragFrom:xt(this.getAttribute(ie)),dragFromContent:this.getAttribute(H)===null?void 0:this.getAttribute(H)!=="false",closeOnRouteChange:this.getAttribute(vt)==="true",radius:ae(this.getAttribute(ne)),maxHeight:ae(this.getAttribute(se)),returnFocusTo:this.getAttribute(yt)??void 0};this.engine=new ze(v),i.setAttribute("data-active",this.engine.state.activeId);let g=this.getAttribute(oe)??this.getAttribute(re);g!==null&&this.engine.setScrimColor(g);for(let f of Array.from(this.querySelectorAll('[slot="anchor"]')))this.declarativeAnchors.push(f),this.engine.addAnchor({...kn(f),element:f});this.offHandlers=[this.engine.on("snap",f=>{i.setAttribute("data-active",f.id),a.textContent=f.id,this.dispatchEvent(new CustomEvent("snap",{detail:f}))}),this.engine.on("before-snap",f=>{this.dispatchEvent(new CustomEvent("before-snap",{detail:f,cancelable:!0}))||f.cancel()}),this.engine.on("open",f=>this.dispatchEvent(new CustomEvent("open",{detail:f}))),this.engine.on("close",()=>this.dispatchEvent(new CustomEvent("close"))),this.engine.on("progress",f=>this.dispatchEvent(new CustomEvent("progress",{detail:f}))),this.engine.on("before-close",f=>{this.dispatchEvent(new CustomEvent("before-close",{detail:f,cancelable:!0}))||f.cancel()}),this.engine.on("opened",f=>this.dispatchEvent(new CustomEvent("opened",{detail:f}))),this.engine.on("closed",()=>this.dispatchEvent(new CustomEvent("closed"))),this.engine.on("dragstart",f=>this.dispatchEvent(new CustomEvent("drag-start",{detail:f}))),this.engine.on("dragend",f=>this.dispatchEvent(new CustomEvent("drag-end",{detail:f}))),this.engine.on("drag",f=>this.dispatchEvent(new CustomEvent("drag",{detail:f})))]}snapTo(i){return this.engine?.snapTo(i)??Promise.resolve()}open(i){return this.engine?.open(i)??Promise.resolve()}close(i){return this.engine?.close(i)??Promise.resolve()}expand(){return this.engine?.expand()??Promise.resolve()}collapse(){return this.engine?.collapse()??Promise.resolve()}isTop(){return this.engine?.isTop()??!1}depth(){return this.engine?.depth()??0}canDismiss(){return this.engine?.canDismiss()??!1}setRadius(i){this.engine?.setRadius(i)}setMaxHeight(i){this.engine?.setMaxHeight(i)}setAllowed(i,n){this.engine?.setAllowed(i,n)}addAnchor(i){return this.engine?.addAnchor(i)??(()=>{})}setScrimStages(i){return this.engine?.setScrimStages(i)??(()=>{})}recompute(){this.engine?.recompute()}get sheetState(){return this.engine?.state??null}get snap(){return this.engine?.state.activeId??this.getAttribute(R)}set snap(i){if(i===null){this.removeAttribute(R);return}this.engine?i!==this.engine.state.activeId&&this.engine.snapTo(i):this.setAttribute(R,i)}},At=(t="bottom-sheet")=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,class extends _{})}});var Ms={};zt(Ms,{BottomSheetElement:()=>_,defineBottomSheet:()=>At});Tt();typeof window<"u"&&typeof customElements<"u"&&Promise.resolve().then(()=>(Tt(),In)).then(({defineBottomSheet:t})=>{t()});return Nn(Ms);})();
1
+ "use strict";var surdeddd_bottomSheet=(()=>{var ce=Object.defineProperty;var Fn=Object.getOwnPropertyDescriptor;var Hn=Object.getOwnPropertyNames;var _n=Object.prototype.hasOwnProperty;var Bn=(t,e,i)=>e in t?ce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var m=(t,e)=>()=>(t&&(e=t(t=0)),e);var zt=(t,e)=>{for(var i in e)ce(t,i,{get:e[i],enumerable:!0})},Nn=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Hn(e))!_n.call(t,s)&&s!==i&&ce(t,s,{get:()=>e[s],enumerable:!(n=Fn(e,s))||n.enumerable});return t};var Kn=t=>Nn(ce({},"__esModule",{value:!0}),t);var o=(t,e,i)=>Bn(t,typeof e!="symbol"?e+"":e,i);var Le,C,Rt=m(()=>{"use strict";Le=class{constructor(){o(this,"entries",[])}push(e){return this.entries.push(e),this.recompute(),()=>this.remove(e.id)}remove(e){let i=this.entries.findIndex(n=>n.id===e);i!==-1&&(this.entries.splice(i,1),this.recompute())}promote(e){let i=this.entries.findIndex(n=>n.id===e);if(i!==-1){if(i!==this.entries.length-1){let[n]=this.entries.splice(i,1);this.entries.push(n)}this.recompute()}}update(){this.recompute()}size(){return this.entries.length}depthOf(e){let i=[];for(let s of this.entries)(!s.isOpen||s.isOpen())&&i.push(s);let n=i.findIndex(s=>s.id===e);return n===-1?0:i.length-1-n}clear(){this.entries=[]}recompute(){let e=null,i=[];for(let n of this.entries)(!n.isOpen||n.isOpen())&&(e=n,i.push(n));!e&&this.entries.length>0&&(e=this.entries[this.entries.length-1]),this.entries.forEach((n,s)=>{if(n.setZIndex(100+s*10),n.setIsTop(n===e),n.setDepth){let r=i.indexOf(n);n.setDepth(r===-1?0:i.length-1-r)}})}},C=new Le});function Pe(t){switch(t){case"bottom":return e=>`translate3d(0, ${e}px, 0)`;case"top":return e=>`translate3d(0, ${-e}px, 0)`;case"left":return e=>`translate3d(${-e}px, 0, 0)`;case"right":return e=>`translate3d(${e}px, 0, 0)`}}var M,he=m(()=>{"use strict";M=t=>t==="left"||t==="right"?"width":"height"});function He(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${t}-${crypto.randomUUID()}`:(Fe[t]=(Fe[t]??0)+1,`${t}-${Fe[t]}`)}var Fe,Dt=m(()=>{"use strict";Fe={}});function kt(){let t=new Map;return{on(e,i){let n=t.get(e);return n||(n=new Set,t.set(e,n)),n.add(i),()=>{n.delete(i)}},emit(e,i){let n=t.get(e);if(n)for(let s of[...n])s(i)},listenerCount(e){return t.get(e)?.size??0},clear(){t.clear()}}}var Ot=m(()=>{"use strict"});var x,It,Vn,Pt,Lt,Gn,ue,Ft=m(()=>{"use strict";x=null,It="data-bs-probe",Vn=t=>{if(typeof document>"u")return null;if(!x||!x.isConnected){let e=document.querySelector(`[${It}]`);e?x=e:(x=document.createElement("div"),x.setAttribute("aria-hidden","true"),x.setAttribute(It,""),x.style.cssText="position:absolute;visibility:hidden;pointer-events:none;contain:strict;left:0;top:0;width:0;height:0;",document.body.appendChild(x))}return t==="vertical"?(x.style.width="0",x.style.height=""):(x.style.height="0",x.style.width=""),x},Pt=t=>t==="bottom"||t==="top",Lt=t=>typeof window>"u"?0:Pt(t)?window.innerHeight:window.innerWidth,Gn=/^(-?\d+(?:\.\d+)?)%$/,ue=(t,e,i)=>{if(typeof t=="number")return Math.max(0,t);if(t==="full")return Lt(e);if(t==="fit"||t==="content")return Math.max(0,i?.()??0);let n=t.match(Gn);if(n){let a=parseFloat(n[1])/100;return Math.max(0,Lt(e)*a)}let s=Pt(e)?"vertical":"horizontal",r=Vn(s);return r?s==="vertical"?(r.style.height=t,Math.max(0,r.getBoundingClientRect().height)):(r.style.width=t,Math.max(0,r.getBoundingClientRect().width)):0}});function S(...t){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.warn(...t)}var V=m(()=>{"use strict"});var Ht,Wn,_e,Un,_t,G,$n,qn,Yn,Bt,W=m(()=>{"use strict";Ft();V();Ht=(t,e,i)=>t.map(n=>{let s=ue(n.size,e,i);return!Number.isFinite(s)||s<0?(S(`[BottomSheet] snap "${n.id}" resolved to invalid size (${String(n.size)} \u2192 ${s}); clamped to 0.`),{id:n.id,size:0}):{id:n.id,size:s}}).sort((n,s)=>n.size-s.size),Wn=/(^|[^a-z])vh\b/i,_e=t=>{for(let e of t)typeof e.size=="string"&&Wn.test(e.size)&&S(`[BottomSheet] snap "${e.id}" uses "vh" \u2014 prefer "dvh" on mobile (iOS Safari URL bar makes vh unstable). See https://web.dev/blog/viewport-units`)},Un=(t,e,i,n=0,s=0)=>{let r=e.filter(h=>i.includes(h.id));if(r.length===0)return null;let a=t+n*s,l=r[0],c=Math.abs(a-l.size);for(let h=1;h<r.length;h++){let d=r[h],u=Math.abs(a-d.size);u<c&&(l=d,c=u)}return l},_t=(t,e)=>{let i=t.filter(n=>e.includes(n.id));return i.length===0?{min:0,max:0}:{min:i[0].size,max:i[i.length-1].size}},G=(t,e)=>e.find(i=>i.id===t)??null,$n=.4,qn=12,Yn=.15,Bt=t=>{let e=Math.abs(t.velocity),i=t.pointerKind==="mouse"?$n:t.flickVelocity,n=t.pointerKind==="mouse"?qn:t.dragThreshold,s=0;if((e>i||e>Yn)&&(s=t.velocity>0?1:-1),Math.abs(t.delta)<n&&s===0)return G(t.activeId,t.resolved);let r=e>i?Math.min(e*180,t.maxAxisSize):0;return Un(t.size,t.resolved,t.allowed,s,r)}});function Be(t,e,i){let n=!1,s=!1;return t({...e,cancel:()=>{if(s){S(`[BottomSheet] ${i}.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.`);return}n=!0}}),s=!0,n}var Nt=m(()=>{"use strict";V()});var pe,Kt=m(()=>{"use strict";W();pe=class{constructor(e,i,n,s,r){o(this,"mode",n);o(this,"measureFit",s);o(this,"onMaxAxisSizeChange",r);o(this,"raw");o(this,"allowedIds");o(this,"resolved",[]);o(this,"maxAxisSize",0);o(this,"rangeCache",null);o(this,"notified",!1);this.raw=e,this.allowedIds=i??e.map(a=>a.id),this.recompute()}recompute(){let e=this.measureFit,i,n=e?()=>i??(i=e()):void 0;this.resolved=Ht(this.raw,this.mode,n);let s=this.resolved.reduce((a,l)=>l.size>a?l.size:a,0);this.rangeCache=null;let r=s!==this.maxAxisSize||!this.notified;this.maxAxisSize=s,this.notified=!0,r&&this.onMaxAxisSizeChange?.(this.maxAxisSize)}setRaw(e){this.raw=e,this.recompute()}setMode(e){e!==this.mode&&(this.mode=e,this.recompute())}setAllowedIds(e){this.allowedIds=e,this.rangeCache=null}findById(e){return G(e,this.resolved)}findDragSettleTarget(e){return Bt({...e,resolved:this.resolved,allowed:this.allowedIds,maxAxisSize:this.maxAxisSize})}getAllowedRange(){return this.rangeCache??(this.rangeCache=_t(this.resolved,this.allowedIds))}getResolvedSnaps(){return this.resolved}getAllowedIds(){return this.allowedIds}getMaxAxisSize(){return this.maxAxisSize}setMaxAxisSize(e){this.maxAxisSize=e,this.onMaxAxisSizeChange?.(e)}}});function Vt(t,e){if(t.length!==0){for(let i of t)if(i!==e)try{if(i.state.size===0)continue;let n=i.getAllowedIds(),s=i.getResolvedSnaps(),r=l=>s.find(c=>c.id===l)?.size??0,a=n.find(l=>r(l)>0);a&&a!==i.state.activeId&&i.snapTo(a)}catch(n){queueMicrotask(()=>{throw n})}}}var Gt=m(()=>{"use strict"});function Ut(t){if(typeof window>"u")return()=>{};let e=()=>{let r=t.resolveActiveSnap(),a=t.getMaxAxisSize();return{target:r?Math.min(r.size,a):null,max:a}},i=()=>{if(t.isDestroyed())return;let r=e();t.recomputeSnaps();let a=t.getMode(),c=a==="bottom"||a==="top"?window.innerHeight:window.innerWidth,h=t.getMaxAxisSize();c>0&&c<h&&t.setMaxAxisSize(c);let d=e();if(r.target!==null&&d.target!==null&&Math.abs(d.target-r.target)<.5&&Math.abs(d.max-r.max)<.5)return;let u=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let p=t.resolveActiveSnap(),b=t.getMaxAxisSize(),g=Math.min(p?p.size:t.getSize(),b);t.setSize(g),p&&!t.isDragging()&&(t.applySize(g),u&&t.resyncAfterCancel?.())},n=null;typeof ResizeObserver<"u"?(n=new ResizeObserver(i),n.observe(document.documentElement)):window.addEventListener("resize",i),window.addEventListener("orientationchange",i);let s=()=>{t.isDestroyed()||document.hidden&&t.cancelInFlight()};return document.addEventListener("visibilitychange",s),()=>{n?.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i),document.removeEventListener("visibilitychange",s)}}var $t=m(()=>{"use strict"});function qt(t){if(typeof ResizeObserver>"u")return()=>{};if(!t.hasFitSnap())return()=>{};let e=0,i=()=>{e||(e=requestAnimationFrame(()=>{e=0,!(t.isDestroyed()||t.isDragging())&&t.recompute()}))},n=new ResizeObserver(i);n.observe(t.handle);let s=t.scrollContainer,r=new Set,a=new Set,l=typeof HTMLSlotElement<"u",c=()=>d(),h=()=>{if(!(!s||!l))for(let p of Array.from(s.children))p instanceof HTMLSlotElement&&!a.has(p)&&(p.addEventListener("slotchange",c),a.add(p))},d=()=>{h();let p=Zn(s);for(let b of r)p.includes(b)||(n.unobserve(b),r.delete(b));for(let b of p)r.has(b)||(n.observe(b),r.add(b));i()},u;return s&&(d(),typeof MutationObserver<"u"&&(u=new MutationObserver(d),u.observe(s,{childList:!0}))),()=>{n.disconnect(),u?.disconnect();for(let p of a)p.removeEventListener("slotchange",c);e&&cancelAnimationFrame(e)}}var Zn,Yt=m(()=>{"use strict";Zn=t=>{if(!t)return[];let e=typeof HTMLSlotElement<"u",i=[];for(let n of Array.from(t.children))if(e&&n instanceof HTMLSlotElement)for(let s of n.assignedElements())i.push(s);else i.push(n);return i}});function Zt(t){let e,i,n=()=>{let r=i;if(r===void 0){e=void 0;return}if(typeof r=="number"){e=r;return}if(typeof window>"u")return;let a=ue(r,t.mode);e=a>0?a:void 0};return{setRadius(r){t.element.style.setProperty("--bs-radius",typeof r=="number"?`${r}px`:r)},setMaxHeight(r){let a=typeof r=="number"?`${r}px`:r,l=M(t.mode);t.element.style.setProperty(l==="height"?"max-height":"max-width",a),i=r,n(),t.recompute()},resolveCap:n,clampTo:()=>{e!==void 0&&t.getMaxAxisSize()>e&&t.setMaxAxisSize(e)},getCap:()=>e}}var Xt=m(()=>{"use strict";W();he()});var Xn,jn,jt,Qt=m(()=>{"use strict";he();Xn=(t,e,i)=>{let n=i?"height":"width",s=t.style;if(!e){let b=s[n];s[n]="auto";let g=i?t.offsetHeight:t.offsetWidth;return s[n]=b,g}let r=e.style,a=s[n],l=r.flex,c=i?r.height:r.width;s[n]="auto",r.flex="none",i?r.height="auto":r.width="auto";let h=i?t.offsetHeight:t.offsetWidth,d=i?e.clientHeight:e.clientWidth,u=i?e.scrollHeight:e.scrollWidth,p=Math.max(h,h-d+u);return s[n]=a,r.flex=l,i?r.height=c:r.width=c,p},jn=(t,e)=>{let i=t.offsetParent;return i&&i!==document.body&&i!==document.documentElement?e?i.clientHeight:i.clientWidth:e?window.innerHeight:window.innerWidth},jt=t=>{let e=M(t.mode)==="height",i=Xn(t.element,t.scrollContainer,e),n=t.getMaxHeightCap(),s=n!==void 0?Math.min(i,n):i;if(typeof window>"u")return s;let r=jn(t.element,e);return r>0?Math.min(s,r):s}});function Jt(t){let e=t.mode==="bottom"||t.mode==="top",i=e?"ArrowUp":"ArrowRight",n=e?"ArrowDown":"ArrowLeft",s=t.mode==="top"?n:i,r=t.mode==="top"?i:n,a=l=>{if(t.isDestroyed())return;let c=t.getAllowedIds(),h=c.indexOf(t.getActiveId());h!==-1&&(l.key===s&&h<c.length-1?(l.preventDefault(),t.snapTo(c[h+1])):l.key===r&&h>0?(l.preventDefault(),t.snapTo(c[h-1])):l.key==="Home"?(l.preventDefault(),t.snapTo(c[0])):l.key==="End"&&(l.preventDefault(),t.snapTo(c[c.length-1])))};return t.handle.addEventListener("keydown",a),()=>t.handle.removeEventListener("keydown",a)}var ei=m(()=>{"use strict"});var Ne,ti=m(()=>{"use strict";Ne=Object.freeze({subtle:{color:"rgba(0,0,0,0.2)",blur:void 0,range:[.3,1],interactive:!1},standard:{color:"rgba(0,0,0,0.4)",blur:void 0,range:[0,1],interactive:!1},monitoring:{color:"rgba(15,15,20,0.55)",blur:"4px",range:[0,1],interactive:!1},cinematic:{color:"rgba(0,0,0,0.7)",blur:"12px",range:[0,1],interactive:!1}})});var w,Ke=m(()=>{"use strict";w=class{constructor(){o(this,"last",-1)}shouldWrite(e,i){return Math.abs(e-this.last)<=i?!1:(this.last=e,!0)}invalidate(){this.last=-1}setLastWritten(e){this.last=e}get value(){return this.last}}});function Qn(t,e,i){let n=`calc(var(--bs-size, 0px) + ${i})`;switch(t){case"bottom":return e==="sheet-top-left"?{bottom:n,left:i}:e==="sheet-top-right"?{bottom:n,right:i}:{bottom:n,left:"50%",transform:"translateX(-50%)"};case"top":return e==="sheet-top-left"?{top:n,left:i}:e==="sheet-top-right"?{top:n,right:i}:{top:n,left:"50%",transform:"translateX(-50%)"};case"left":return e==="sheet-top-left"?{left:n,top:i}:e==="sheet-top-right"?{left:n,bottom:i}:{left:n,top:"50%",transform:"translateY(-50%)"};case"right":return e==="sheet-top-left"?{right:n,top:i}:e==="sheet-top-right"?{right:n,bottom:i}:{right:n,top:"50%",transform:"translateY(-50%)"}}}function k(t,e,i,n){switch(i){case"top-left":t.top=n,t.left=n;break;case"top-center":t.top=n,t.left="50%",t.transform="translateX(-50%)";break;case"top-right":t.top=n,t.right=n;break;case"center-left":t.top="50%",t.left=n,t.transform="translateY(-50%)";break;case"center":t.top="50%",t.left="50%",t.transform="translate(-50%, -50%)";break;case"center-right":t.top="50%",t.right=n,t.transform="translateY(-50%)";break;case"bottom-left":t.bottom=n,t.left=n;break;case"bottom-center":t.bottom=n,t.left="50%",t.transform="translateX(-50%)";break;case"bottom-right":t.bottom=n,t.right=n;break;case"sheet-top-left":case"sheet-top-center":case"sheet-top-right":{let s=Qn(e,i,n);s.top!==void 0&&(t.top=s.top),s.bottom!==void 0&&(t.bottom=s.bottom),s.left!==void 0&&(t.left=s.left),s.right!==void 0&&(t.right=s.right),s.transform!==void 0&&(t.transform=s.transform);break}}}var me=m(()=>{"use strict"});var es,ts,fe,ni=m(()=>{"use strict";ti();W();Ke();V();me();es=/^-?\d+(?:\.\d+)?(?:px|em|rem|%)$/,ts="rgba(0, 0, 0, 0.4)",fe=class{constructor(e,i){o(this,"screenComponent");o(this,"backdrop");o(this,"mode");o(this,"isDestroyed");o(this,"getAllowedIds");o(this,"getResolvedSnaps");o(this,"snapToFn");o(this,"closeFn");o(this,"scrimInteractive",!1);o(this,"scrimMode");o(this,"backdropRange");o(this,"screenRange");o(this,"scrimEnabled",!0);o(this,"savedScrimRanges",null);o(this,"scrimTapToCloseEnabled",!1);o(this,"detachScrimTap",null);o(this,"scrimOverlayTeardown",null);o(this,"backdropOpacitySentinel",new w);o(this,"screenOpacitySentinel",new w);o(this,"lastBackdropPointer","");o(this,"lastScreenDisplay","");this.screenComponent=e.screenComponent,this.backdrop=e.backdrop,this.mode=e.mode,this.isDestroyed=e.isDestroyed,this.getAllowedIds=e.getAllowedIds,this.getResolvedSnaps=e.getResolvedSnaps,this.snapToFn=e.snapTo,this.closeFn=e.close,this.scrimMode=i.scrimMode??"full";let n=i.scrimPreset?Ne[i.scrimPreset]:null;this.backdropRange=i.backdropRange??n?.range??[0,1],this.screenRange=i.screenRange??n?.range??[0,1],this.scrimTapToCloseEnabled=i.scrimTapToClose??!1;let r=i.scrimColor??n?.color??(this.scrimMode!=="off"&&!this.backdrop?ts:void 0);if(this.screenComponent){if(this.applyScrimStyles({color:r,blur:i.scrimBlur??n?.blur,interactive:i.scrimInteractive??n?.interactive??!1}),this.scrimMode==="above-sheet")this.applyAboveSheetInset();else if(this.scrimMode==="off"){let a=this.screenComponent.style;a.opacity="0",a.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"}}}invalidateOpacityCache(){this.backdropOpacitySentinel.invalidate(),this.screenOpacitySentinel.invalidate()}attach(){this.scrimTapToCloseEnabled&&this.setScrimTapToClose(!0)}applyOpacity(e,i){if(!(!i&&this.backdropOpacitySentinel.value!==-1&&this.screenOpacitySentinel.value!==-1)){if(this.backdrop){let[n,s]=this.backdropRange,r=Math.max(s-n,1e-4),a=Math.min(Math.max((e-n)/r,0),1);this.backdropOpacitySentinel.shouldWrite(a,.005)&&(this.backdrop.style.opacity=String(a));let l=a>.05?"auto":"none";l!==this.lastBackdropPointer&&(this.backdrop.style.pointerEvents=l,this.lastBackdropPointer=l)}if(this.screenComponent&&this.scrimMode!=="off"){let[n,s]=this.screenRange,r=Math.min(1,Math.max(0,(e-n)/Math.max(1e-4,s-n)));this.screenOpacitySentinel.shouldWrite(r,.005)&&(this.screenComponent.style.opacity=String(r));let a=r>0?"":"none";a!==this.lastScreenDisplay&&(this.screenComponent.style.display=a,this.lastScreenDisplay=a)}}}setBackdropRange(e,i){this.isDestroyed()||(this.backdropRange=e,this.invalidateOpacityCache(),i())}setScreenRange(e,i){this.isDestroyed()||(this.screenRange=e,this.invalidateOpacityCache(),i())}setScrimColor(e){this.isDestroyed()||this.applyScrimStyles({color:e===void 0?null:e})}setScrimBlur(e){this.isDestroyed()||this.applyScrimStyles({blur:e===void 0?null:e})}setScrimInteractive(e){this.isDestroyed()||this.applyScrimStyles({interactive:e})}setSheetMode(e){this.isDestroyed()||e===this.mode||(this.mode=e,this.invalidateOpacityCache())}setScrimMode(e,i){if(this.isDestroyed()||e===this.scrimMode)return;this.invalidateOpacityCache();let n=this.scrimMode;if(this.scrimMode=e,this.screenComponent){let s=this.screenComponent.style;n==="above-sheet"&&e!=="above-sheet"&&(s.position="",s.inset="",s.pointerEvents=""),e==="above-sheet"?this.applyAboveSheetInset():e==="off"?(s.opacity="0",s.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"):this.lastScreenDisplay==="none"&&(s.display="",this.lastScreenDisplay="")}i()}setScrimTapToClose(e){if(this.isDestroyed()||!this.screenComponent)return;let i=this.detachScrimTap!==null;if(e!==i)if(e){let n=this.screenComponent;n.style.pointerEvents==="none"&&(n.style.pointerEvents="auto");let s=()=>{if(this.isDestroyed())return;if(this.closeFn){this.closeFn();return}let r=this.getAllowedIds(),a=this.getResolvedSnaps(),l=r.find(c=>{let h=G(c,a);return h!==null&&h.size===0});l&&this.snapToFn(l)};n.addEventListener("click",s),this.detachScrimTap=()=>n.removeEventListener("click",s),this.scrimTapToCloseEnabled=!0}else this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimTapToCloseEnabled=!1}setScrimEnabled(e,i){this.isDestroyed()||e!==this.scrimEnabled&&(this.scrimEnabled=e,this.invalidateOpacityCache(),e?(this.screenRange=this.savedScrimRanges?.screen??[0,1],this.backdropRange=this.savedScrimRanges?.backdrop??[0,1],this.savedScrimRanges=null):(this.savedScrimRanges={screen:this.screenRange,backdrop:this.backdropRange},this.screenRange=[1,1],this.backdropRange=[1,1]),i())}setScrim(e,i){if(this.isDestroyed())return;if(e.preset){let s=Ne[e.preset];this.applyScrimStyles({color:s.color,blur:s.blur??null,interactive:s.interactive}),!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:s.range,backdrop:s.range}:(this.screenRange=s.range,this.backdropRange=s.range)}let n=()=>{};e.mode!==void 0&&this.setScrimMode(e.mode,n),e.enabled!==void 0&&this.setScrimEnabled(e.enabled,n),e.tapToClose!==void 0&&this.setScrimTapToClose(e.tapToClose),this.applyScrimStyles({color:e.color,blur:e.blur,interactive:e.interactive}),e.range!==void 0&&(!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:e.range,backdrop:this.savedScrimRanges.backdrop}:this.screenRange=e.range),this.invalidateOpacityCache(),i()}setScrimOverlay(e){if(this.isDestroyed())return()=>{};if(!this.screenComponent)return()=>{};this.scrimOverlayTeardown?.();let i=this.screenComponent,n=e.inset??"16px",s=es.test(n)?n:"16px";s!==n&&S(`[bottom-sheet] setScrimOverlay: invalid inset ${JSON.stringify(n)}; expected a CSS length like "16px" / "1rem" / "5%". Falling back to "16px".`),e.children.ownerDocument&&e.children.ownerDocument!==i.ownerDocument&&S("[bottom-sheet] setScrimOverlay: children belong to a different document than the scrim. Cross-document adoption can drop event listeners; construct children via the same document as the sheet root.");let r=e.position??"top-right",a=e.interactive??!0,l=i.ownerDocument.createElement("div");l.className="bs-scrim-overlay";let c=l.style;c.position="absolute",k(c,this.mode,r,s),a&&(c.pointerEvents="auto"),l.appendChild(e.children);let h=i.parentElement;if(!h)return S("[bottom-sheet] setScrimOverlay: scrim element has no parent, skipping overlay injection. Mount the sheet root before calling setScrimOverlay."),()=>{};h.appendChild(l);let d=()=>{l.parentNode&&l.parentNode.removeChild(l),this.scrimOverlayTeardown===d&&(this.scrimOverlayTeardown=null)};return this.scrimOverlayTeardown=d,d}destroy(){if(this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimOverlayTeardown?.(),this.scrimOverlayTeardown=null,this.screenComponent){let e=this.screenComponent.style;e.opacity="",e.display="",e.position="",e.inset="",e.pointerEvents=""}this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents=""),this.invalidateOpacityCache(),this.lastBackdropPointer="",this.lastScreenDisplay=""}applyScrimStyles(e){if(!this.screenComponent)return;let i=this.screenComponent.style;if(e.color!==void 0&&(i.background=e.color===null?"":e.color),e.blur!==void 0){let n=i;if(e.blur===null)i.backdropFilter="",n.webkitBackdropFilter="";else{let s=`blur(${e.blur})`;i.backdropFilter=s,n.webkitBackdropFilter=s}}e.interactive!==void 0&&(this.scrimInteractive=e.interactive,i.pointerEvents=e.interactive?"auto":"none")}applyAboveSheetInset(){if(!this.screenComponent)return;let e={bottom:"0 0 var(--bs-size) 0",top:"var(--bs-size) 0 0 0",left:"0 0 0 var(--bs-size)",right:"0 var(--bs-size) 0 0"},i=this.screenComponent.style;i.position="fixed",i.inset=e[this.mode],i.pointerEvents=this.scrimInteractive||this.scrimTapToCloseEnabled?"auto":"none"}}});var si,is,ri,oi,ai,li,ge=m(()=>{"use strict";si=t=>1+2.40158*Math.pow(t-1,3)+1.40158*Math.pow(t-1,2),is=t=>1-Math.pow(1-t,3),ri=t=>t,oi=t=>1-Math.pow(1-t,5),ai=({from:t,to:e,duration:i,easing:n=is,onUpdate:s})=>{let r=!1,a=0,l=null,c=performance.now(),h=new Promise(d=>{if(l=d,i<=0){s(e),d();return}let u=p=>{if(r)return;let b=p-c,g=Math.min(b/i,1),f=t+(e-t)*n(g);s(f),g<1?a=requestAnimationFrame(u):d()};a=requestAnimationFrame(u)});return{cancel:()=>{r=!0,cancelAnimationFrame(a),l?.()},promise:h}},li=()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches});var Ve,ns,di,Ge=m(()=>{"use strict";Ve={stiffness:220,damping:26,mass:1,restDelta:.5,restSpeed:.5},ns=1/30,di=({from:t,to:e,velocity:i=0,config:n,onUpdate:s})=>{let r={...Ve,...n},a=!1,l=0,c=null,h=t,d=i,u=performance.now(),p=new Promise(b=>{c=b;let g=f=>{if(a)return;let y=Math.min((f-u)/1e3,ns);u=f;let B=Math.max(1,Math.ceil(y*240)),D=y/B,le=B;for(;le-- >0;){let de=(-r.stiffness*(h-e)-r.damping*d)/r.mass;d+=de*D,h+=d*D}if(!Number.isFinite(h)||!Number.isFinite(d)){s(e,0),b();return}s(h,d),Math.abs(e-h)<(r.restDelta??.5)&&Math.abs(d)<(r.restSpeed??.5)?(s(e,0),b()):l=requestAnimationFrame(g)};l=requestAnimationFrame(g)});return{cancel:()=>{a=!0,cancelAnimationFrame(l),c?.()},promise:p}}});function ci(t){switch(t){case"ios-spring":return{kind:"spring",spring:{stiffness:300,damping:30,mass:1}};case"material-bounce":return{kind:"spring",spring:{stiffness:200,damping:22,mass:1}};case"linear":return{kind:"tween",duration:ss,easing:ri};case"snappy":return{kind:"tween",duration:180,easing:oi};case"tween":return{kind:"tween"};default:return{kind:"spring"}}}var ss,hi=m(()=>{"use strict";ge();ss=220});function pi(t,e,i,n){let s={...Ve,...n},r=1/We,a=ui/We*1e3,l=Math.ceil(rs/1e3*We),c=[t],h=t,d=i;for(let u=1;u<=l;u+=1){let p=-s.stiffness*(h-e)-s.damping*d;if(d+=p/s.mass*r,h+=d*r,!Number.isFinite(h)||!Number.isFinite(d)){c.push(e);break}if(u%ui===0&&c.push(h),Math.abs(e-h)<(s.restDelta??.5)&&Math.abs(d)<(s.restSpeed??.5))break}return c[c.length-1]!==e&&c.push(e),{values:c,stepMs:a,durationMs:(c.length-1)*a}}function mi(t,e,i,n){let s=Math.max(2,Math.min(60,Math.round(i/16))),r=[];for(let a=0;a<=s;a+=1){let l=a/s;r.push(t+(e-t)*n(l))}return r[r.length-1]=e,{values:r,stepMs:i/s,durationMs:i}}var We,ui,rs,fi=m(()=>{"use strict";Ge();We=240,ui=4,rs=3e3});var os,gi,be,bi=m(()=>{"use strict";ge();Ge();hi();fi();os=220,gi=1e3,be=class{constructor(e,i){o(this,"element");o(this,"getRootEl");o(this,"applySizeFn");o(this,"getSize");o(this,"isDragging");o(this,"applyAux");o(this,"getTransformFor");o(this,"settleWaapi");o(this,"currentWaapi",null);o(this,"animationKind");o(this,"springConfig");o(this,"duration");o(this,"easing");o(this,"respectReducedMotion");o(this,"reducedMotion",!1);o(this,"detachReducedMotion",null);o(this,"viewTransitionsAvailable");o(this,"currentTween",null);o(this,"currentSpring",null);this.element=e.element,this.getRootEl=e.getRootEl,this.applySizeFn=e.applySize,this.getSize=e.getSize,this.isDragging=e.isDragging,this.applyAux=e.applyAux,this.getTransformFor=e.getTransformFor,this.settleWaapi=i.settleAnimation==="waapi";let n=ci(i.animation);this.animationKind=n.kind,this.duration=i.duration??n.duration??os,this.easing=i.easing??n.easing??si,this.springConfig={...n.spring??{},...i.spring??{}},this.respectReducedMotion=i.respectReducedMotion??!0;let s=i.viewTransitions??!1;if(this.viewTransitionsAvailable=s&&typeof document<"u"&&typeof document.startViewTransition=="function",this.respectReducedMotion&&typeof window<"u"&&typeof window.matchMedia=="function"){let r=window.matchMedia("(prefers-reduced-motion: reduce)");this.reducedMotion=r.matches;let a=l=>{this.reducedMotion=l.matches};typeof r.addEventListener=="function"?(r.addEventListener("change",a),this.detachReducedMotion=()=>r.removeEventListener("change",a)):typeof r.addListener=="function"&&(r.addListener(a),this.detachReducedMotion=()=>r.removeListener(a))}}get isAnimating(){return this.currentTween!==null||this.currentSpring!==null||this.currentWaapi!==null}cancelWaapi(){if(!this.currentWaapi)return;let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}cancel(){this.currentTween?.cancel(),this.currentSpring?.cancel(),this.cancelWaapi()}async animateTo(e,i){if(e===this.getSize()){!this.isAnimating&&!this.isDragging()&&(this.element.style.willChange="");return}if(this.currentTween?.cancel(),this.currentSpring?.cancel(),this.cancelWaapi(),this.getRootEl()?.setAttribute("data-animating","true"),this.element.style.willChange="transform",this.reducedMotion){this.applySizeFn(e),this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange="");return}if(this.settleWaapi&&this.applyAux&&this.getTransformFor&&typeof this.element.animate=="function"){let n=this.animationKind==="spring"?pi(this.getSize(),e,i*gi,this.springConfig):mi(this.getSize(),e,this.duration,this.easing);if(n.values.length>=2&&n.durationMs>0){await this.runWaapiSettle(n,e),this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""));return}}if(this.animationKind==="spring"){let n=di({from:this.getSize(),to:e,velocity:i*gi,config:this.springConfig,onUpdate:s=>this.applySizeFn(s)});this.currentSpring=n,await n.promise,this.currentSpring===n&&(this.currentSpring=null)}else{let n=ai({from:this.getSize(),to:e,duration:this.duration,easing:this.easing,onUpdate:s=>this.applySizeFn(s)});this.currentTween=n,await n.promise,this.currentTween===n&&(this.currentTween=null)}this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""))}async runWaapiSettle(e,i){let n=this.applyAux,s=this.getTransformFor,r=e.values.map(g=>({transform:s(g)})),a=this.element.animate(r,{duration:e.durationMs,easing:"linear",fill:"forwards"}),l=!1,c=0,h=performance.now(),d=e.values.length-1,u=()=>{if(l)return;let g=performance.now()-h,f=Math.min(Math.floor(g/e.stepMs),d);n(e.values[f]),c=requestAnimationFrame(u)};c=requestAnimationFrame(u);let p={anim:a,stop:()=>{l=!0,cancelAnimationFrame(c)}};this.currentWaapi=p;try{await a.finished}catch{}p.stop();let b=this.currentWaapi===p;if(b&&(this.currentWaapi=null),b&&a.playState==="finished"){this.applySizeFn(i);try{a.cancel()}catch{}}}destroy(){if(this.detachReducedMotion?.(),this.detachReducedMotion=null,this.currentTween=null,this.currentSpring=null,this.currentWaapi){let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}}}});var vi,as,yi,Ue,ls,U,Si,xi=m(()=>{"use strict";vi=["a[href]","area[href]","button:not([disabled])","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","[contenteditable='true']","[tabindex]:not([tabindex='-1'])"].join(","),as=t=>typeof t.checkVisibility=="function"?t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):t.offsetParent!==null,yi=t=>{let e=Array.from(t.querySelectorAll(vi));if(typeof HTMLSlotElement<"u")for(let i of Array.from(t.querySelectorAll("slot")))for(let n of i.assignedElements())n.matches(vi)&&e.push(n),e.push(...yi(n));return e},Ue=t=>yi(t).filter(e=>!e.hasAttribute("inert")&&as(e)&&!e.matches("[aria-hidden='true']")),ls=(t,e)=>{let i=e;for(;i;){if(i===t)return!0;let n=i.assignedSlot;if(n){i=n;continue}let s=i.parentNode;i=s instanceof ShadowRoot?s.host:s}return!1},U=[],Si=(t,e={})=>{if(typeof document>"u")return()=>{};let i={};U.push(i);let n=()=>U[U.length-1]===i,s=document.activeElement;(()=>{let h=e.initialFocus;if(h===!1){t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0});return}(typeof h=="string"?t.querySelector(h):h??Ue(t)[0]??t)?.focus({preventScroll:!0})})();let a=h=>{if(!n())return;if(h.key==="Escape"&&e.onEscape){e.onEscape();return}if(h.key!=="Tab")return;let d=Ue(t);if(d.length===0){h.preventDefault();return}let u=d[0],p=d[d.length-1],b=document.activeElement;h.shiftKey&&b===u?(h.preventDefault(),p.focus()):!h.shiftKey&&b===p&&(h.preventDefault(),u.focus())},l=h=>{if(!n())return;let d=h.target;d&&!ls(t,d)&&Ue(t)[0]?.focus({preventScroll:!0})};document.addEventListener("keydown",a,!0),document.addEventListener("focusin",l,!0);let c=!1;return()=>{if(c)return;c=!0;let h=U.indexOf(i);h!==-1&&U.splice(h,1),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",l,!0),s&&document.contains(s)?s.focus({preventScroll:!0}):document.querySelector("[data-bs-restore-fallback]")?.focus({preventScroll:!0})}}});var $,T,Ai,Ti=m(()=>{"use strict";$=0,T=null,Ai=()=>{if(typeof document>"u")return()=>{};if($===0){let e=document.body;T={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:window.scrollY};let i=window.innerWidth-document.documentElement.clientWidth;if(i>0){let n=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${n+i}px`}e.style.overflow="hidden",e.style.position="fixed",e.style.top=`-${T.scrollY}px`,e.style.width="100%"}$++;let t=!1;return()=>{if(!t&&(t=!0,$=Math.max(0,$-1),$===0&&T)){let e=document.body;e.style.overflow=T.overflow,e.style.position=T.position,e.style.top=T.top,e.style.width=T.width,e.style.paddingRight=T.paddingRight,window.scrollTo(0,T.scrollY),T=null}}}});function Ei(t){let e=[];return{apply(){if(typeof document>"u")return;let i=t();for(;i.parentElement&&i.parentElement!==document.body;)i=i.parentElement;let n=i.parentElement??document.body;for(let s of Array.from(n.children))s!==i&&(s.hasAttribute("inert")||s.classList.contains("bs-backdrop")||s.classList.contains("bs-screen")||s.classList.contains("bs-root")||(s.setAttribute("inert",""),e.push(s)))},remove(){for(let i of e)i.removeAttribute("inert");e.length=0}}}var wi=m(()=>{"use strict"});var ve,Ci=m(()=>{"use strict";xi();Ti();wi();ve=class{constructor(e,i){o(this,"element");o(this,"focusTrapEnabled");o(this,"initialFocus");o(this,"closeOnEscape");o(this,"bodyScrollLockEnabled");o(this,"inertSiblingsEnabled");o(this,"inertSiblings");o(this,"shouldApplyInertSiblings");o(this,"returnFocus");o(this,"releaseFocusTrap",null);o(this,"releaseScrollLock",null);o(this,"installed",!1);o(this,"destroyed",!1);this.element=e.element,this.focusTrapEnabled=i.focusTrap??!1,this.initialFocus=i.initialFocus,this.closeOnEscape=i.closeOnEscape??!0,this.bodyScrollLockEnabled=i.lockBodyScroll??!0,this.inertSiblingsEnabled=i.inertSiblings??!1,this.shouldApplyInertSiblings=i.shouldApplyInertSiblings??(()=>!0),this.returnFocus=i.returnFocus,this.inertSiblings=Ei(()=>this.element)}get isInstalled(){return this.installed}install(){this.destroyed||(this.installed=!0,this.bodyScrollLockEnabled&&!this.releaseScrollLock&&(this.releaseScrollLock=Ai()),this.focusTrapEnabled&&!this.releaseFocusTrap&&(this.releaseFocusTrap=Si(this.element,{initialFocus:this.initialFocus})),this.inertSiblingsEnabled&&this.shouldApplyInertSiblings()&&this.inertSiblings.apply())}setReturnFocus(e){this.destroyed||(this.returnFocus=e)}release(){this.installed&&(this.installed=!1,this.releaseFocusTrap?.(),this.releaseFocusTrap=null,this.releaseScrollLock?.(),this.releaseScrollLock=null,this.inertSiblings.remove(),this.returnFocus&&(typeof this.returnFocus=="function"?this.returnFocus():typeof this.returnFocus=="string"?typeof document<"u"?document.querySelector(this.returnFocus):null:this.returnFocus)?.focus?.())}destroy(){this.release(),this.destroyed=!0}}});var Mi,$e,zi,Ri=m(()=>{"use strict";Mi=t=>t==="bottom"||t==="top",$e=class{constructor(e){o(this,"slots");o(this,"capacity");o(this,"head",0);o(this,"size",0);this.capacity=e,this.slots=new Array(e);for(let i=0;i<e;i++)this.slots[i]={t:0,v:0}}push(e,i){let n=this.slots[this.head];n.t=e,n.v=i,this.head=(this.head+1)%this.capacity,this.size<this.capacity&&this.size++}pruneBefore(e,i){for(;this.size>i;){let n=(this.head-this.size+this.capacity)%this.capacity;if(this.slots[n].t<e)this.size--;else break}}get length(){return this.size}oldest(){if(this.size!==0)return this.slots[(this.head-this.size+this.capacity)%this.capacity]}newest(){if(this.size!==0)return this.slots[(this.head-1+this.capacity)%this.capacity]}reset(){this.head=0,this.size=0}},zi=(t,e,i,n={})=>{let s=null,r="touch",a=0,l=0,c=0,h=!1,d=v=>v==="mouse"?160:120,u=32,p=new $e(u),b=Mi(e)?"Y":"X",g=e==="bottom"||e==="right"?-1:1,f=v=>b==="Y"?v.clientY:v.clientX,y=v=>b==="Y"?v.clientX:v.clientY,B=v=>{try{t.setPointerCapture(v)}catch{}},D=()=>{s=null,h=!1,p.reset()},le=v=>{if(s===null&&!(v.button!==void 0&&v.button!==0)&&!(n.shouldStart&&!n.shouldStart(v))){if(s=v.pointerId,r=v.pointerType||"touch",a=f(v),l=y(v),c=a,p.reset(),p.push(v.timeStamp,a),n.deferStart){h=!0;return}B(v.pointerId),i.onStart(a,r)}},ke=v=>{if(v.pointerId!==s)return;let E=f(v),N=(E-a)*g;if(h){let K=n.deferStart(v,N,y(v)-l);if(K===!1){D();return}if(K!==!0)return;h=!1,a=E,c=E,p.reset(),p.push(v.timeStamp,E),B(v.pointerId),i.onStart(a,r);return}c=E,p.push(v.timeStamp,E);let Ie=v.timeStamp-d(r);p.pruneBefore(Ie,2),i.onMove(N)},Oe=v=>{if(v.pointerId!==s)return;if(h){D();return}let wt=(c-a)*g,N=0;if(p.length>=3){let K=p.oldest(),Ct=p.newest(),Mt=Ct.t-K.t;Mt>0&&(N=(Ct.v-K.v)/Mt*g)}let Ie=r;s=null,p.reset();try{t.hasPointerCapture(v.pointerId)&&t.releasePointerCapture(v.pointerId)}catch{}i.onEnd(wt,N,Ie)},de=v=>{if(v.pointerId!==s)return;let E=h;D(),!E&&i.onCancel?.()};t.addEventListener("pointerdown",le),t.addEventListener("pointermove",ke),t.addEventListener("pointerup",Oe),t.addEventListener("pointercancel",de);let Et=n.manageTouchAction!==!1,Pn=t.style.touchAction;return Et&&(t.style.touchAction=Mi(e)?"pan-x":"pan-y"),()=>{t.removeEventListener("pointerdown",le),t.removeEventListener("pointermove",ke),t.removeEventListener("pointerup",Oe),t.removeEventListener("pointercancel",de),Et&&(t.style.touchAction=Pn),s!==null&&t.hasPointerCapture(s)&&t.releasePointerCapture(s)}}});function qe(t,e){let i=Math.min(e*.15,80);if(i<=0)return 0;let n=Math.abs(t);return Math.sign(t)*(i*n/(n+i))}var Di=m(()=>{"use strict"});function ki(t){if(typeof document>"u")return!1;let e=document.activeElement;if(!e||!t.contains(e))return!1;let i=e.tagName;if(!(i==="INPUT"||i==="TEXTAREA"||e.isContentEditable===!0))return!1;try{return e.blur(),!0}catch{return!1}}var Oi=m(()=>{"use strict"});var q,Ii=m(()=>{"use strict";Ri();Di();Oi();q=class{constructor(e){o(this,"deps");o(this,"detach",null);o(this,"isDragging_",!1);o(this,"dragStartSize",0);o(this,"currentPointerKind","touch");o(this,"keyboardDismissed",!1);o(this,"dragSuppressed",!1);o(this,"dragPayload",{size:0,delta:0});this.deps=e}get isDragging(){return this.isDragging_}install(){return this.detach?this.detach:(this.detach=zi(this.deps.handle,this.deps.mode,{onStart:(e,i)=>{if(this.deps.getDisableDrag?.()){this.dragSuppressed=!0;return}this.dragSuppressed=!1,this.deps.cancelAnimation(),this.isDragging_=!0,this.dragStartSize=this.deps.getDragContext().size,this.currentPointerKind=i,this.keyboardDismissed=!1,this.deps.getRoot()?.setAttribute("data-dragging","true"),this.deps.element.style.willChange="transform",this.deps.emit("dragstart",{size:this.dragStartSize})},onMove:e=>{if(this.dragSuppressed)return;let i=this.deps.getDragContext(),{min:n,max:s}=i.range,r=i.maxAxisSize,a=i.rubberBandEnabled,l=this.dragStartSize+e;l>s?l=a?s+qe(l-s,r):s:l<n&&(l=a?n-qe(n-l,r):n),this.deps.applySize(l),!this.keyboardDismissed&&this.currentPointerKind==="touch"&&this.deps.mode==="bottom"&&l<this.dragStartSize&&ki(this.deps.element)&&(this.keyboardDismissed=!0),this.deps.listenerCount("drag")>0&&(this.dragPayload.size=l,this.dragPayload.delta=e,this.deps.emit("drag",this.dragPayload))},onEnd:(e,i,n)=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:i}),this.deps.settleAfterDrag(e,i,n)},onCancel:()=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:0});let e=this.dragStartSize;this.deps.animateTo(e,0)}},this.deps.gestureOptions),this.detach)}forceClearDragState(){this.isDragging_&&(this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.element.style.willChange="")}}});function Xe(t,e){let i=ds(t);return i?i.closest(Ze)?!1:e==="zones"?i.closest(Ye)!==null:!0:e!=="zones"}var Ye,Ze,ds,Li=m(()=>{"use strict";Ye="[data-bs-drag]",Ze="[data-bs-no-drag]",ds=t=>{let e=t;return e&&typeof e.closest=="function"?e:null}});function Pi(t){let e=t.slop??6,i=t.crossDelta??0;return t.sharesScrollAxis??!0?Math.abs(t.delta)<e?"pending":t.scrollTop>0||t.delta>0&&t.atMaxSnap?"scroll":"drag":Math.abs(t.delta)<e&&Math.abs(i)<e?"pending":Math.abs(t.delta)<=Math.abs(i)?"scroll":"drag"}var Fi=m(()=>{"use strict"});var cs,hs,ye,je=m(()=>{"use strict";cs=t=>t==="start"||t==="end",hs=t=>{if(!t)return"ltr";if(typeof getComputedStyle=="function")try{if(getComputedStyle(t).direction==="rtl")return"rtl"}catch{}try{let e=t.closest?.("[dir]");if(e)return e.getAttribute("dir")?.toLowerCase()==="rtl"?"rtl":"ltr"}catch{}return"ltr"},ye=(t,e)=>{if(!cs(t))return t;let i=hs(e)==="rtl";return t==="start"?i?"right":"left":i?"left":"right"}});function Qe(t,e){let i=n=>{e()&&n.cancelable&&n.preventDefault()};return t.addEventListener("touchmove",i,{passive:!1}),()=>t.removeEventListener("touchmove",i)}var Hi=m(()=>{"use strict"});var Y,_i=m(()=>{"use strict";Y=class{constructor(e,i){o(this,"handle",e);e.setAttribute("aria-orientation",i==="bottom"||i==="top"?"vertical":"horizontal")}setValue(e,i){if(e.length===0){this.handle.removeAttribute("aria-valuemin"),this.handle.removeAttribute("aria-valuemax"),this.handle.removeAttribute("aria-valuenow"),this.handle.removeAttribute("aria-valuetext");return}let n=Math.max(e.length-1,0),s=Math.max(e.indexOf(i),0);this.handle.setAttribute("aria-valuemin","0"),this.handle.setAttribute("aria-valuemax",String(n)),this.handle.setAttribute("aria-valuenow",String(s)),this.handle.setAttribute("aria-valuetext",i)}}});function Bi(t){let e=new Map,i=n=>{let s=t.getMaxAxisSize();return s<=0?!1:n<s/2};return{cache(n,s,r){let a=t.scrollContainer;a&&(i(s)||i(r)&&e.set(n,a.scrollTop))},restore(n,s,r){let a=t.scrollContainer;if(!a||i(r)||!i(s))return;let l=e.get(n);l!==void 0&&(a.scrollTop=l,e.delete(n))},clear(){e.clear()}}}var Ni=m(()=>{"use strict"});function us(t,e){let i={frames:null,duration:0,easing:Se};if(t==="none")return i;if(t===void 0||typeof t=="string")return{frames:Ki[t??"fade"][e],duration:Je,easing:Se};let n=e==="enter"?t.enter:t.exit;return n?{frames:n,duration:t.duration??Je,easing:t.easing??Se}:t.preset==="none"?i:{frames:Ki[t.preset??"fade"][e],duration:t.duration??Je,easing:t.easing??Se}}function O(t,e,i){if((typeof e=="object"?e.respectReducedMotion!==!1:!0)&&li())return et;let{frames:s,duration:r,easing:a}=us(e,i);if(!s||r<=0||typeof t.animate!="function")return et;let l=t.animate(s,{duration:r,easing:a,fill:"both"});return{finished:l.finished.then(()=>{}).catch(()=>{}),cancel:()=>{try{l.cancel()}catch{return}}}}var Je,Se,Ki,et,tt=m(()=>{"use strict";ge();Je=200,Se="cubic-bezier(0.22, 1, 0.36, 1)",Ki={fade:{enter:[{opacity:0},{opacity:1}],exit:[{opacity:1},{opacity:0}]},scale:{enter:[{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}]},slide:{enter:[{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"translateY(0)"}],exit:[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(10px)"}]},pop:{enter:[{opacity:0,transform:"scale(0.6)",offset:0},{opacity:1,transform:"scale(1.06)",offset:.7},{opacity:1,transform:"scale(1)",offset:1}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.6)"}]}},et={finished:Promise.resolve(),cancel:()=>{}}});function Vi(t,e){let n=t.host.ownerDocument.createElement("div");n.className="bs-anchor";let s=e.interactive??!0,r=e.position??"sheet-top-right",a=r==="dock-bottom"||r==="dock-top",l=n.style;if(l.position="fixed",a?(l.left="0",l.right="0",r==="dock-bottom"?l.bottom="0":l.top="0"):k(l,t.mode,r,e.inset??"16px"),e.fadeRange){let[g,f]=e.fadeRange,y=Math.max(f-g,1e-4);l.opacity=`clamp(0, calc((var(--bs-progress, 0) - ${g}) / ${y}), 1)`}n.appendChild(e.element),t.host.appendChild(n);let c=null,h=null,d=g=>typeof e.showOn=="function"?e.showOn(g):Array.isArray(e.showOn)?e.showOn.includes(g.activeId):a||g.size>0,u=(g,f)=>{if(g===c)return;if(c=g,h?.cancel(),h=null,n.style.pointerEvents=g&&s?"auto":"none",g){n.style.visibility="",f&&(h=O(e.element,e.animation,"enter"));return}if(!f){n.style.visibility="hidden";return}let y=O(e.element,e.animation,"exit");h=y,y.finished.then(()=>{h===y&&c===!1&&(n.style.visibility="hidden")})},p=g=>{t.isDestroyed()||u(d(t.getState()),g)},b=[t.on("snap",()=>p(!0)),t.on("open",()=>p(!0)),t.on("close",()=>p(!0))];return p(!1),{wrapper:n,detach:()=>{b.forEach(g=>g()),h?.cancel(),h=null,n.parentNode&&n.parentNode.removeChild(n)},syncZ:g=>{n.style.zIndex=String(g)}}}var Gi=m(()=>{"use strict";me();tt()});function Ui(t,e){let i=t.host.ownerDocument,n=e.stages.map(d=>{let u=i.createElement("div");u.className="bs-scrim-stage";let p=u.style;return p.position="absolute",k(p,t.mode,d.position??e.position??"center",d.inset??e.inset??"16px"),p.visibility="hidden",p.pointerEvents="none",u.appendChild(d.element),t.host.appendChild(u),{def:d,wrapper:u,inFlight:null}}),s=null,r=()=>{let d=t.getState();return d.size===0?n.find(u=>Wi(u.def,d.activeId))??null:n.find(u=>Wi(u.def,d.activeId))??n.find(u=>ps(u.def,d.progress))??null},a=(d,u)=>{if(d.inFlight?.cancel(),d.wrapper.style.pointerEvents="none",!u){d.inFlight=null,d.wrapper.style.visibility="hidden";return}let p=O(d.def.element,d.def.animation??e.animation,"exit");d.inFlight=p,p.finished.then(()=>{d.inFlight===p&&s!==d&&(d.wrapper.style.visibility="hidden")})},l=(d,u)=>{d.inFlight?.cancel(),d.inFlight=null,d.wrapper.style.visibility="",d.wrapper.style.pointerEvents=d.def.interactive??e.interactive??!1?"auto":"none",u&&(d.inFlight=O(d.def.element,d.def.animation??e.animation,"enter"))},c=d=>{if(t.isDestroyed())return;let u=r();if(u===s)return;let p=s;s=u,p&&a(p,d),u&&l(u,d)},h=[t.on("snap",()=>c(!0)),t.on("open",()=>c(!0)),t.on("close",()=>c(!0))];return n.some(d=>d.def.forRange)&&h.push(t.on("progress",()=>c(!0))),c(!1),()=>{h.forEach(d=>d());for(let d of n)d.inFlight?.cancel(),d.inFlight=null,d.wrapper.parentNode&&d.wrapper.parentNode.removeChild(d.wrapper);s=null}}var Wi,ps,$i=m(()=>{"use strict";me();tt();Wi=(t,e)=>t.for===void 0?!1:Array.isArray(t.for)?t.for.includes(e):t.for===e,ps=(t,e)=>{if(!t.forRange)return!1;let[i,n]=t.forRange;return e>=i&&e<=n}});function qi(t,e){let i=t.allowed??t.snapPoints.map(s=>s.id),n=t.initial??i[0]??t.snapPoints[0]?.id??"default";if(t.persistKey){let s=gs(t.persistKey);s&&i.includes(s)&&(n=s)}return{mode:ye(t.mode??"bottom",t.element),flickVelocity:t.flickVelocity??ms,dragThreshold:t.dragThreshold??fs,dragFrom:t.dragFrom??(t.handle?"handle":"sheet"),dragFromContent:t.dragFromContent??!0,rubberBandEnabled:t.rubberBand??!0,closeOnBack:t.closeOnBack??!1,persistent:t.persistent??!1,disableClose:t.disableClose??!1,disableDrag:t.disableDrag??!1,closeOnRouteChange:t.closeOnRouteChange??!1,radius:t.radius,maxHeight:t.maxHeight,initialAllowed:i,initialId:n,scrim:{scrimMode:t.scrimMode,scrimColor:t.scrimColor,scrimBlur:t.scrimBlur,scrimInteractive:t.scrimInteractive??(t.scrimTapToClose?!0:void 0),scrimTapToClose:t.scrimTapToClose,scrimPreset:t.scrimPreset,screenRange:t.screenRange,backdropRange:t.backdropRange},animation:{animation:t.animation,settleAnimation:t.settleAnimation,duration:t.duration,easing:t.easing,spring:t.spring,respectReducedMotion:t.respectReducedMotion,viewTransitions:t.viewTransitions},lifecycle:{focusTrap:t.focusTrap,initialFocus:t.initialFocus,closeOnEscape:t.closeOnEscape,lockBodyScroll:t.lockBodyScroll,inertSiblings:t.inertSiblings,shouldApplyInertSiblings:e?.shouldApplyInertSiblings,returnFocus:t.returnFocusTo}}}var ms,fs,gs,Yi=m(()=>{"use strict";je();ms=.65,fs=18;gs=t=>{if(typeof window>"u"||typeof localStorage>"u")return null;try{return localStorage.getItem(t)}catch{return null}}});var I,it=m(()=>{"use strict";I=class{constructor(){o(this,"fns",[])}add(e){e&&this.fns.push(e)}drain(){for(;this.fns.length;)try{this.fns.pop()()}catch(e){queueMicrotask(()=>{throw e})}}}});var bs,xe,Zi=m(()=>{"use strict";Rt();he();Dt();Ot();W();Nt();V();Kt();Gt();$t();Yt();Xt();Qt();ei();ni();bi();Ci();Ii();Li();Fi();je();Hi();_i();Ni();Gi();$i();Yi();it();Ke();bs=8,xe=class{constructor(e){o(this,"id",He("bs"));o(this,"element");o(this,"handle");o(this,"scrollContainer");o(this,"backdrop");o(this,"screenComponent");o(this,"scrimParent",null);o(this,"mode");o(this,"flickVelocity");o(this,"dragThreshold");o(this,"dragFromMode");o(this,"dragFromContentDefault");o(this,"rubberBandEnabled");o(this,"scrim");o(this,"aria");o(this,"animation");o(this,"lifecycle");o(this,"closeOnBack");o(this,"routedTo");o(this,"persistent");o(this,"disableCloseFlag");o(this,"disableDragFlag");o(this,"closeOnRouteChange");o(this,"maxHeight");o(this,"maxHeightDeps");o(this,"snapPointsRaw");o(this,"snaps");o(this,"activeId");o(this,"size",0);o(this,"gesture");o(this,"contentGesture");o(this,"detachSheetGesture",null);o(this,"detachSliderKeyboard",null);o(this,"rootEl",null);o(this,"destroyed",!1);o(this,"restClosed",!1);o(this,"currentViewTransition",null);o(this,"currentAbort",new AbortController);o(this,"sizeWriteSentinel",new w);o(this,"progressWriteSentinel",new w);o(this,"isTopSheet",!0);o(this,"opening",!1);o(this,"promotedForOpen",!1);o(this,"allowOvershoot",!1);o(this,"progressPayload",{value:0,size:0});o(this,"dragContextBuf",{size:0,maxAxisSize:0,range:{min:0,max:0},rubberBandEnabled:!1});o(this,"bus",kt());o(this,"persistKey");o(this,"linkedSheets",[]);o(this,"scrollCache");o(this,"teardowns",new I);o(this,"anchors",[]);o(this,"anchorHost",null);o(this,"stackZ",100);o(this,"detachScrimStages",null);o(this,"stackEffectEnabled",!1);o(this,"stackEffectPrimed",!1);o(this,"fitDeps");o(this,"transformTemplate");o(this,"featureList",[]);o(this,"featureCtx");let i=qi(e,{shouldApplyInertSiblings:()=>typeof document>"u"?!1:Array.from(document.body.children).some(a=>a===e.element||a.contains(e.element))});this.element=e.element,this.handle=e.handle??e.element,this.scrollContainer=e.scrollContainer,this.backdrop=e.backdrop,this.screenComponent=e.scrim??e.screenComponent,this.scrimParent=this.screenComponent?.parentElement??null,this.mode=i.mode,this.element.dataset.mode=this.mode,this.transformTemplate=Pe(this.mode),this.aria=new Y(this.handle,this.mode),this.flickVelocity=i.flickVelocity,this.dragThreshold=i.dragThreshold,this.dragFromMode=i.dragFrom,this.dragFromContentDefault=i.dragFromContent,this.rubberBandEnabled=i.rubberBandEnabled,this.scrim=new fe({mode:this.mode,screenComponent:this.screenComponent,backdrop:this.backdrop,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),getResolvedSnaps:()=>this.snaps.getResolvedSnaps().slice(),snapTo:r=>{this.snapTo(r)},close:()=>{this.canDismiss()&&this.close("backdrop")}},i.scrim),this.animation=new be({element:this.element,getRootEl:()=>this.rootEl,applySize:r=>this.applySize(r),getSize:()=>this.size,isDragging:()=>this.isDraggingAny(),applyAux:r=>this.applySize(r,!0),getTransformFor:r=>this.transformTemplate(this.snaps.getMaxAxisSize()-r)},i.animation),this.lifecycle=new ve({element:this.element,close:()=>this.close()},i.lifecycle),this.closeOnBack=i.closeOnBack,this.routedTo=e.routedTo,this.persistent=i.persistent,this.disableCloseFlag=i.disableClose,this.disableDragFlag=i.disableDrag,this.closeOnRouteChange=i.closeOnRouteChange,this.stackEffectEnabled=e.stackEffect??!1,this.snapPointsRaw=e.snapPoints,this.persistKey=e.persistKey,e.linkedSheets&&(this.linkedSheets=e.linkedSheets);let n=new Map;for(let r of e.features??[])n.set(r.name,r);this.featureList=Array.from(n.values()),this.activeId=i.initialId,_e(this.snapPointsRaw),this.auditDuplicateSnapIds(this.snapPointsRaw),this.rootEl=this.element.closest(".bs-root"),this.maxHeightDeps={element:this.element,mode:this.mode,getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),setMaxAxisSize:r=>{this.snaps.setMaxAxisSize(r)},recompute:()=>this.recompute()},this.maxHeight=Zt(this.maxHeightDeps),this.fitDeps={element:this.element,scrollContainer:this.scrollContainer,mode:this.mode,getMaxHeightCap:()=>this.maxHeight.getCap()},this.snaps=new pe(this.snapPointsRaw,i.initialAllowed,this.mode,()=>jt(this.fitDeps),r=>{this.element.style[M(this.mode)]=`${r}px`});let s=this.snaps.findById(this.activeId);if(s&&(this.size=s.size),this.applySize(this.size),this.setRestClosed(this.size===0),this.updateAriaSlider(),this.scrollCache=Bi({scrollContainer:this.scrollContainer,getMaxAxisSize:()=>this.snaps.getMaxAxisSize()}),this.featureCtx=this.buildFeatureContext(e.autoCollapseAfter),this.attach(),this.registerInStack(),this.snaps.getMaxAxisSize()===0&&typeof IntersectionObserver<"u"&&typeof document<"u"){let r=new IntersectionObserver(a=>{for(let l of a)if(l.isIntersecting){if(this.destroyed)return;this.snaps.recompute(),this.healActiveSnap(),r.disconnect();return}});r.observe(this.element),this.teardowns.add(()=>r.disconnect())}this.teardowns.add(qt({handle:this.handle,scrollContainer:this.scrollContainer,hasFitSnap:()=>this.snapPointsRaw.some(r=>r.size==="fit"||r.size==="content"),isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),recompute:()=>this.recompute()})),i.radius!==void 0&&this.setRadius(i.radius),i.maxHeight!==void 0&&this.setMaxHeight(i.maxHeight),this.applyAutoAriaLabelledBy(),this.runFeatureStage("post"),this.warnOrphanFeatureOptions(),this.size>0&&this.handleOpen()}buildFeatureContext(e){return{element:this.element,scrollContainer:this.scrollContainer,sheetId:this.id,options:{routedTo:this.routedTo,closeOnBack:this.closeOnBack,closeOnRouteChange:this.closeOnRouteChange,persistKey:this.persistKey,autoCollapseAfter:e},isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),isAnimating:()=>this.animation.isAnimating,isTopSheet:()=>this.isTopSheet,isVerticalAxis:()=>this.mode==="bottom"||this.mode==="top",getSize:()=>this.size,getActiveId:()=>this.activeId,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),allowedIdsBySize:()=>this.allowedIdsBySize(),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),resolveSnap:i=>this.snaps.findById(i),resolveActiveSnap:()=>this.snaps.findById(this.activeId),setSize:i=>{this.size=i},setMaxAxisSize:i=>{this.snaps.setMaxAxisSize(i)},applySize:i=>this.applySize(i),recomputeSnaps:()=>this.recomputeSnaps(),newCycle:()=>{this.newCycle()},cancelInFlight:()=>{this.animation.cancel()},resyncAfterResize:()=>this.resyncAfterResize(),snapTo:i=>{this.snapTo(i)},close:i=>this.close(i),attachDragSurface:(i,n)=>this.attachDragSurface(i,n),on:(i,n)=>this.on(i,n),addTeardown:i=>this.teardowns.add(i)}}runFeatureStage(e){for(let i of this.featureList){if((i.stage??"post")!==e)continue;let n=i.install(this.featureCtx);n&&this.teardowns.add(n)}}warnOrphanFeatureOptions(){let e=new Set(this.featureList.map(i=>i.name));(this.closeOnBack||this.routedTo!==void 0||this.closeOnRouteChange)&&!e.has("route")&&S("[BottomSheet] closeOnBack/routedTo/closeOnRouteChange need routeFeature() \u2014 option ignored"),this.persistKey&&!e.has("persist")&&S("[BottomSheet] persistKey needs persistFeature() \u2014 snaps will not be saved")}get state(){return{size:this.size,activeId:this.activeId,isDragging:this.isDraggingAny(),isAnimating:this.animation.isAnimating,progress:this.computeProgress(this.size)}}on(e,i){return this.bus.on(e,i)}use(e){if(this.destroyed)return S(`[BottomSheet] use("${e.name}") called on destroyed engine \u2014 ignored.`),this;let i=[],n={add:r=>{typeof r=="function"&&i.push(r)}},s;try{s=e.install(this,n)}catch(r){for(let a=i.length-1;a>=0;a--)try{i[a]()}catch(l){queueMicrotask(()=>{throw l})}return queueMicrotask(()=>{throw r}),this}for(let r of i)this.teardowns.add(r);return typeof s=="function"&&this.teardowns.add(s),this}setLinkedSheets(e){this.destroyed||(this.linkedSheets=e)}getAllowedIds(){return this.snaps.getAllowedIds().slice()}getResolvedSnaps(){return this.snaps.getResolvedSnaps()}async snapTo(e,i=0,n=!1){if(this.destroyed)return;let s=typeof i=="object"?i:{velocity:i},r=s.velocity??0,a=s.signal;if(a?.aborted)return;let l=this.snaps.findById(e);if(!l){S(`[BottomSheet] unknown snap id: ${e}`);return}if(!this.snaps.getAllowedIds().includes(e)){S(`[BottomSheet] snap "${e}" is not in allowed list`);return}if(!n&&this.emitBeforeSnap(l,this.activeId))return;let c=this.opening,h=this.newCycle(),d=()=>{this.animation.cancel(),this.newCycle()};a?.addEventListener("abort",d,{once:!0});let u=this.size===0||c,p=this.activeId,b=this.size;this.scrollCache.cache(p,b,l.size),this.activeId=e;let g=this.snapPointsRaw.find(y=>y.id===e)?.size;if(u&&!(e==="closed"||g===0)&&(this.opening=!0,c||(this.promotedForOpen=!0,C.promote(this.id))),this.animation.viewTransitionsAvailable){this.currentViewTransition?.skipTransition?.();let y=document.startViewTransition(()=>{this.applySize(l.size)});y.ready?.catch(()=>{}),this.currentViewTransition=y;try{await y.finished}catch{}this.currentViewTransition===y&&(this.currentViewTransition=null)}else await this.animation.animateTo(l.size,r);a?.removeEventListener("abort",d),!h.aborted&&(this.opening=!1,this.completeSnap(e,l.size,b,u,!1))}completeSnap(e,i,n,s,r){this.scrollCache.restore(e,n,i),this.updateAriaSlider(),this.emit("snap",{id:e,size:this.size,progress:this.computeProgress(this.size)}),r&&this.haptic(),this.setRestClosed(i===0),s&&i>0&&this.emitOpenSequence(e),i===0&&this.emitCloseSequence()}setRestClosed(e){e!==this.restClosed&&(this.restClosed=e,e?this.element.setAttribute("data-bs-rest","closed"):this.element.removeAttribute("data-bs-rest"))}emitOpenSequence(e){this.emit("open",{id:e}),this.handleOpen(),Vt(this.linkedSheets,this),this.emit("opened",{id:e})}emitCloseSequence(){this.emit("close",void 0),this.handleClose(),this.emit("closed",void 0)}async dragTo(e,i=0){if(this.destroyed)return;let n=typeof i=="object"?i:{velocity:i},s=n.velocity??0,r=n.signal;if(r?.aborted)return;this.newCycle();let a=()=>{this.animation.cancel(),this.newCycle()};r?.addEventListener("abort",a,{once:!0});let l=Math.max(0,Math.min(e,this.snaps.getMaxAxisSize()));await this.animation.animateTo(l,s),r?.removeEventListener("abort",a),this.destroyed||r?.aborted}open(e){if(this.destroyed)return Promise.resolve();let i=e??this.snaps.getAllowedIds().find(n=>(this.snaps.findById(n)?.size??0)>0)??this.activeId;return this.snapTo(i)}close(e="programmatic"){if(this.destroyed||this.disableCloseFlag||this.size>0&&this.emitBeforeClose(e))return Promise.resolve();let i=this.snapPointsRaw.find(n=>n.id==="closed")?.id??this.snaps.getAllowedIds().find(n=>this.snaps.findById(n)?.size===0)??this.snaps.getAllowedIds()[0];return this.snapTo(i??this.activeId)}canDismiss(){return!this.persistent&&!this.disableCloseFlag&&!this.destroyed}setPersistent(e){this.destroyed||(this.persistent=e)}setDisableClose(e){this.destroyed||(this.disableCloseFlag=e)}setDisableDrag(e){this.destroyed||(this.disableDragFlag=e)}setDragFromContent(e){this.destroyed||(this.dragFromContentDefault=e)}setDragFrom(e){this.destroyed||e===this.dragFromMode||(this.gesture?.forceClearDragState(),this.detachSheetGesture?.(),this.dragFromMode=e,this.mountSheetGesture())}getDragFrom(){return this.dragFromMode}setMode(e){if(this.destroyed)return;let i=ye(e,this.element);if(i===this.mode)return;let n=this.mode==="bottom"||this.mode==="top",s=i==="bottom"||i==="top";this.gesture?.forceClearDragState(),this.detachSheetGesture?.(),this.animation.cancel(),this.element.style.removeProperty(M(this.mode)),this.mode=i,this.element.dataset.mode=i,this.transformTemplate=Pe(i),this.maxHeightDeps.mode=i,this.fitDeps.mode=i,this.snaps.setMode(i),this.scrim.setSheetMode(i),n!==s&&(this.aria=new Y(this.handle,i)),this.detachSliderKeyboard?.(),this.mountSliderKeyboard(),this.mountSheetGesture(),this.recompute();let r=this.snaps.findById(this.activeId);r&&this.applySize(r.size),this.updateAriaSlider()}getMode(){return this.mode}isTop(){return this.isTopSheet}depth(){return C.depthOf(this.id)}expand(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),i=e[e.length-1];return i?this.snapTo(i):Promise.resolve()}collapse(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),n=e.find(s=>(this.snaps.findById(s)?.size??0)>0)??e[0];return n?this.snapTo(n):Promise.resolve()}setRadius(e){this.destroyed||this.maxHeight.setRadius(e)}setMaxHeight(e){this.destroyed||this.maxHeight.setMaxHeight(e)}setAllowed(e,i){if(!this.destroyed){if(this.snaps.setAllowedIds(e),this.updateAriaSlider(),i&&e.includes(i))this.snapTo(i,0,!0);else if(!e.includes(this.activeId)){let n=e[0];n&&this.snapTo(n,0,!0)}}}setBackdropRange(e){this.scrim.setBackdropRange(e,()=>this.applySize(this.size))}setScreenRange(e){this.scrim.setScreenRange(e,()=>this.applySize(this.size))}setScrimColor(e){this.scrim.setScrimColor(e)}setScrimBlur(e){this.scrim.setScrimBlur(e)}setScrimInteractive(e){this.scrim.setScrimInteractive(e)}setScrim(e){this.scrim.setScrim(e,()=>this.applySize(this.size))}setScrimMode(e){this.scrim.setScrimMode(e,()=>this.applySize(this.size))}setScrimTapToClose(e){this.scrim.setScrimTapToClose(e)}setScrimEnabled(e){this.scrim.setScrimEnabled(e,()=>this.applySize(this.size))}setScrimOverlay(e){return this.scrim.setScrimOverlay(e)}addAnchor(e){if(this.destroyed||typeof document>"u")return()=>{};this.anchorHost||(this.anchorHost=this.rootEl??this.element.parentElement??document.body,this.anchorHost.style.setProperty("--bs-size",`${this.size}px`),this.anchorHost.style.setProperty("--bs-progress",String(this.computeProgress(this.size))));let i=Vi({mode:this.mode,host:this.anchorHost,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(s,r)=>this.on(s,r),isDestroyed:()=>this.destroyed},e);i.syncZ(this.stackZ+1),this.anchors.push(i);let n=()=>{let s=this.anchors.indexOf(i);s!==-1&&(this.anchors.splice(s,1),i.detach())};return this.teardowns.add(n),n}setScrimStages(e){if(this.destroyed||typeof document>"u")return()=>{};if(this.detachScrimStages?.(),this.detachScrimStages=null,!e)return()=>{};let i=this.screenComponent?.parentElement;if(!i)return S("[BottomSheet] setScrimStages: no scrim element mounted \u2014 pass `scrim` to the engine first."),()=>{};let n=Ui({mode:this.mode,host:i,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(r,a)=>this.on(r,a),isDestroyed:()=>this.destroyed},e),s=()=>{this.detachScrimStages===s&&(this.detachScrimStages=null),n()};return this.detachScrimStages=s,this.teardowns.add(()=>this.detachScrimStages?.()),s}getScrimState(){return{mode:this.scrim.scrimMode,enabled:this.scrim.scrimEnabled}}setSnapPoints(e,i){if(this.destroyed)return;if(this.animation.cancel(),this.newCycle(),this.snapPointsRaw=e,_e(e),this.auditDuplicateSnapIds(e),this.snaps.setRaw(e),i)this.snaps.setAllowedIds(i);else{let s=this.snaps.getResolvedSnaps().map(a=>a.id),r=this.snaps.getAllowedIds().filter(a=>s.includes(a));this.snaps.setAllowedIds(r.length?r:s)}this.scrollCache.clear(),this.scrim.invalidateOpacityCache();let n=this.snaps.findById(this.activeId);if(n)this.applySize(n.size);else{let s=this.snaps.getResolvedSnaps().find(r=>this.snaps.getAllowedIds().includes(r.id))??this.snaps.getResolvedSnaps()[0];s&&(this.activeId=s.id,this.applySize(s.size))}this.updateAriaSlider()}recompute(){this.destroyed||(this.maxHeight.resolveCap(),this.snaps.recompute(),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache(),!this.isDraggingAny()&&this.healActiveSnap())}healActiveSnap(){let e=this.snaps.findById(this.activeId);e&&(this.size=e.size,this.applySize(this.size),this.updateAriaSlider(),this.size>0&&!this.lifecycle.isInstalled&&!this.opening&&!this.animation.isAnimating&&this.emitOpenSequence(this.activeId))}destroy(){this.destroyed=!0,this.opening=!1,this.currentAbort.abort(),this.currentViewTransition?.skipTransition?.(),this.currentViewTransition=null,this.bus.clear(),this.animation.cancel(),this.gesture?.forceClearDragState(),this.contentGesture?.forceClearDragState(),this.setRestClosed(!1),this.teardowns.drain(),this.scrim.destroy(),this.animation.destroy(),this.lifecycle.destroy(),this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents="");for(let e of[this.anchorHost,this.scrimParent,this.rootEl])e&&(e.style.removeProperty("--bs-size"),e.style.removeProperty("--bs-progress"));this.screenComponent&&(this.screenComponent.style.opacity="",this.screenComponent.style.display=""),this.sizeWriteSentinel.invalidate(),this.progressWriteSentinel.invalidate()}emit(e,i){this.bus.emit(e,i)}newCycle(){return this.allowOvershoot=!1,this.opening=!1,this.currentAbort.abort(),this.currentAbort=new AbortController,this.currentAbort.signal}emitBeforeSnap(e,i){return Be(n=>this.emit("before-snap",n),{id:e.id,size:e.size,previousId:i},"before-snap")}emitBeforeClose(e){return Be(i=>this.emit("before-close",i),{reason:e},"before-close")}applyAutoAriaLabelledBy(){if(typeof document>"u"||!this.lifecycle.focusTrapEnabled||this.element.getAttribute("aria-labelledby"))return;let e=this.handle??this.element,i=e.querySelector("[data-bs-title]")??e.querySelector("h1,h2,h3,h4,h5,h6");i&&(i.id||(i.id=He("bs-title")),this.element.setAttribute("aria-labelledby",i.id))}recomputeSnaps(){this.maxHeight.resolveCap(),this.snaps.setRaw(this.snapPointsRaw),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache()}auditDuplicateSnapIds(e){let i=new Set;for(let n of e)i.has(n.id)&&S(`[BottomSheet] duplicate snap id "${n.id}" \u2014 only the first occurrence is reachable.`),i.add(n.id)}getAllowedRange(){return this.snaps.getAllowedRange()}allowedIdsBySize(){return this.snaps.getAllowedIds().slice().sort((e,i)=>(this.snaps.findById(e)?.size??0)-(this.snaps.findById(i)?.size??0))}updateAriaSlider(){this.aria.setValue(this.allowedIdsBySize(),this.activeId)}registerInStack(){this.teardowns.add(C.push({id:this.id,setZIndex:e=>{this.stackZ=e,this.element.style.zIndex=String(e),this.backdrop&&(this.backdrop.style.zIndex=String(e-1));for(let i of this.anchors)i.syncZ(e+1)},setIsTop:e=>{this.isTopSheet=e},isOpen:()=>this.size>0||this.opening,setDepth:e=>this.applyStackDepth(e)}))}applyStackDepth(e){if(!this.stackEffectEnabled)return;if(this.element.setAttribute("data-stack-depth",String(e)),!this.stackEffectPrimed){this.stackEffectPrimed=!0;let n=this.mode==="bottom"||this.mode==="top";this.element.style.transformOrigin=n?"50% 100%":"0% 50%",this.element.style.transition="scale 320ms cubic-bezier(0.29, 1.04, 0.84, 0.99)"}let i=Math.max(1-e*.04,.86);this.element.style.scale=i===1?"":String(i)}buildGestureDeps(e,i){return{handle:e,element:this.element,mode:this.mode,gestureOptions:i,getRoot:()=>this.rootEl,getDragContext:()=>{let n=this.dragContextBuf,s=this.getAllowedRange();return n.size=this.size,n.maxAxisSize=this.snaps.getMaxAxisSize(),n.range.min=s.min,n.range.max=s.max,n.rubberBandEnabled=this.rubberBandEnabled,n},getDisableDrag:()=>this.disableDragFlag,cancelAnimation:()=>this.animation.cancel(),applySize:n=>this.applySize(n),animateTo:(n,s)=>this.animation.animateTo(n,s),settleAfterDrag:(n,s,r)=>this.settleAfterDrag(n,s,r),emit:(n,s)=>this.emit(n,s),listenerCount:n=>this.bus.listenerCount(n)}}isContentDragAllowed(){return this.disableDragFlag?!1:this.snapPointsRaw.find(i=>i.id===this.activeId)?.dragFromContent??this.dragFromContentDefault}decideContentDrag(e,i,n,s){if(this.destroyed||i.pointerType==="mouse"||this.gesture?.isDragging||!this.isContentDragAllowed()||!Xe(i.target,"sheet"))return!1;let r=Pi({delta:n,crossDelta:s,sharesScrollAxis:this.mode==="bottom"||this.mode==="top",scrollTop:e.scrollTop,atMaxSnap:this.size>=this.getAllowedRange().max-.5});return r==="pending"?null:r==="drag"}attachDragSurface(e,i){if(this.destroyed||i!=="content"||this.contentGesture)return;let n=new q(this.buildGestureDeps(e,{manageTouchAction:!1,deferStart:(a,l,c)=>this.decideContentDrag(e,a,l,c)}));this.contentGesture=n;let s=n.install(),r=Qe(e,()=>n.isDragging);return()=>{r(),s(),this.contentGesture===n&&(this.contentGesture=void 0)}}sheetDragSurface(){return this.dragFromMode==="handle"?this.handle:this.element}canStartSheetDrag(e){if(this.contentGesture?.isDragging)return!1;let i=e.target,n=typeof i?.closest=="function";return n&&i.closest(Ze)?!1:this.handle!==this.element&&n&&this.handle.contains(i)?!0:Xe(e.target,this.dragFromMode)?this.dragFromMode==="handle"?!0:!(this.scrollContainer&&n&&this.scrollContainer.contains(i)&&!i.closest(Ye)):!1}mountSheetGesture(){let e=this.sheetDragSurface(),i=new q(this.buildGestureDeps(e,{shouldStart:r=>this.canStartSheetDrag(r),manageTouchAction:this.dragFromMode==="handle"}));this.gesture=i;let n=i.install(),s=this.dragFromMode==="handle"?null:Qe(e,()=>i.isDragging);this.detachSheetGesture=()=>{s?.(),n()}}attach(){this.mountSheetGesture(),this.teardowns.add(()=>{this.detachSheetGesture?.(),this.detachSheetGesture=null});try{this.attachFeatures()}catch(e){this.teardowns.drain();try{this.scrim.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.animation.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.lifecycle.destroy()}catch(i){queueMicrotask(()=>{throw i})}throw this.destroyed=!0,e}}attachFeatures(){if(this.runFeatureStage("attach"),typeof window<"u"&&(this.teardowns.add(Ut({element:this.element,getMode:()=>this.mode,isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),resolveActiveSnap:()=>this.snaps.findById(this.activeId),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),getSize:()=>this.size,setMaxAxisSize:e=>{this.snaps.setMaxAxisSize(e)},setSize:e=>{this.size=e},recomputeSnaps:()=>this.recomputeSnaps(),applySize:e=>this.applySize(e),cancelInFlight:()=>{this.animation.cancel()},newCycle:()=>{this.newCycle()},isAnimating:()=>this.animation.isAnimating,resyncAfterCancel:()=>this.resyncAfterResize()})),this.lifecycle.closeOnEscape)){let e=i=>{this.destroyed||i.defaultPrevented||this.canDismiss()&&i.key==="Escape"&&this.isTopSheet&&this.size>0&&this.close("escape")};document.addEventListener("keydown",e),this.teardowns.add(()=>document.removeEventListener("keydown",e))}this.mountSliderKeyboard(),this.scrim.attach()}mountSliderKeyboard(){let e=Jt({handle:this.handle,mode:this.mode,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:i=>{this.snapTo(i)}});this.detachSliderKeyboard=e,this.teardowns.add(()=>{this.detachSliderKeyboard?.(),this.detachSliderKeyboard=null})}settleAfterDrag(e,i,n="touch"){let s=this.newCycle(),r=this.snaps.findDragSettleTarget({delta:e,velocity:i,pointerKind:n,size:this.size,activeId:this.activeId,flickVelocity:this.flickVelocity,dragThreshold:this.dragThreshold});if(!r){this.clearWillChangeIfIdle();return}let a=this.activeId;if(r.id===a&&r.size===this.size){this.clearWillChangeIfIdle();return}if(this.emitBeforeSnap(r,a)){let u=this.snaps.findById(a);u&&this.animation.animateTo(u.size,0);return}let l=this.size,c=this.snaps.findById(a)?.size;this.scrollCache.cache(a,l,r.size),this.activeId=r.id,c===0&&r.size>0&&(this.opening=!0,this.promotedForOpen=!0,C.promote(this.id));let h=this.snaps.getMaxAxisSize(),d=h>0?Math.min(r.size,h):r.size;this.allowOvershoot=!0,this.animation.animateTo(d,i).then(()=>{s.aborted||(this.allowOvershoot=!1,this.opening=!1,this.completeSnap(r.id,r.size,l,c===0,!0))})}isDraggingAny(){return(this.gesture?.isDragging??!1)||(this.contentGesture?.isDragging??!1)}clearWillChangeIfIdle(){this.animation.isAnimating||this.isDraggingAny()||(this.element.style.willChange="")}haptic(){if(typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(bs)}catch{}}applySize(e,i=!1){let n=this.snaps.getMaxAxisSize(),s=n>0&&e>n&&!this.isDraggingAny()&&!this.allowOvershoot?n:e;this.size=s,s>0&&this.setRestClosed(!1);let r=n-s,a=this.element.style;i||(a.transform=this.transformTemplate(r)),this.sizeWriteSentinel.shouldWrite(s,.5)&&(a.setProperty("--bs-size",`${s}px`),this.scrimParent&&this.scrimParent.style.setProperty("--bs-size",`${s}px`),this.anchorHost&&this.anchorHost!==this.scrimParent&&this.anchorHost.style.setProperty("--bs-size",`${s}px`),this.rootEl&&this.rootEl!==this.scrimParent&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-size",`${s}px`));let l=this.computeProgress(s),c=this.progressWriteSentinel.shouldWrite(l,.005);c&&(a.setProperty("--bs-progress",String(l)),this.anchorHost&&this.anchorHost.style.setProperty("--bs-progress",String(l)),this.rootEl&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-progress",String(l))),this.scrim.applyOpacity(l,c),c&&this.bus.listenerCount("progress")>0&&(this.progressPayload.value=l,this.progressPayload.size=s,this.emit("progress",this.progressPayload))}computeProgress(e){let{min:i,max:n}=this.getAllowedRange(),s=Math.min(n,this.snaps.getMaxAxisSize());return s<=i?0:Math.min(Math.max((e-i)/(s-i),0),1)}handleOpen(){this.promotedForOpen?this.promotedForOpen=!1:C.promote(this.id);try{this.lifecycle.install()}catch(e){this.destroyed||this.newCycle(),this.handleClose(),this.applySize(0),this.activeId=this.snapPointsRaw.find(i=>i.id==="closed")?.id??this.activeId,this.size=0,queueMicrotask(()=>{throw e})}}resyncAfterResize(){if(this.destroyed)return;let e=this.snaps.findById(this.activeId);e&&(this.updateAriaSlider(),this.emit("snap",{id:e.id,size:this.size,progress:this.computeProgress(this.size)}),e.size>0&&!this.lifecycle.isInstalled?this.emitOpenSequence(e.id):e.size===0&&this.lifecycle.isInstalled&&this.emitCloseSequence())}handleClose(){this.opening=!1,this.promotedForOpen=!1,this.lifecycle.release(),C.update()}}});function Xi(){if(P>0){P-=1;let n=nt.shift();n&&n(),L();return}if(A.length===0){st(),L();return}let t=null,e=-1;for(let n=A.length-1;n>=0;n-=1){let s=A[n];if(s.surface.isOpen()&&(t||(t=s,e=n),s.surface.isTop())){t=s,e=n;break}}if(!t){let n=A.pop();n&&(n.live=!1),L();return}t.live=!1,A.splice(e,1);let i=t;Promise.resolve(i.surface.close()).then(()=>{i.surface.isOpen()&&Ss(i)}),L()}function Ss(t){!F()||!j()||(t.live=!0,Me(()=>{try{history.pushState(rt(t.surface),"",t.surface.url)}catch{t.live=!1}}),t.live&&(A.push(t),ot()))}function ji(t){let e={surface:t,priorUrl:void 0,live:!1};return!F()||!j()||(e.priorUrl=t.url!==void 0?location.href:void 0,Me(()=>{try{history.pushState(rt(t),"",t.url),e.live=!0}catch{e.live=!1}}),e.live&&(A.push(e),ot())),e}function at(t){if(!F()||!j())return;let e=t,i=A.indexOf(e);if(i===-1||!e.live)return;let n=A.length-1;e.live=!1,A.splice(i,1);let s=null;if(i!==n){let r=A[A.length-1].surface,a=e.priorUrl;s=()=>{Me(()=>{history.replaceState(rt(r),"",a!==void 0?a:location.href)})}}nt.push(s),P+=1,Me(()=>{try{history.back()}catch{P=Math.max(0,P-1),nt.pop()}}),L()}function Qi(t){return!F()||!j()?()=>{}:(z.add(t),z.size===1&&vs(),ot(),()=>{z.has(t)&&(z.delete(t),z.size===0&&ys(),L())})}var A,z,P,Ae,nt,Te,Ee,Z,X,we,Ce,F,j,rt,Me,st,ot,L,vs,ys,Ji=m(()=>{"use strict";A=[],z=new Set,P=0,Ae=0,nt=[],Te=!1,Ee=!1,Z=null,X=null,we=null,Ce=null,F=()=>typeof window<"u",j=()=>typeof history<"u",rt=t=>({...t.markerState(),__bs:!0}),Me=t=>{Ae+=1;try{t()}finally{Ae-=1}},st=()=>{let t=Array.from(z);for(let e of t)e()},ot=()=>{Te||!F()||(window.addEventListener("popstate",Xi),Te=!0)},L=()=>{Te&&(A.length>0||z.size>0||P>0||(F()&&window.removeEventListener("popstate",Xi),Te=!1))},vs=()=>{Ee||!j()||(Z=history.pushState,X=history.replaceState,we=function(...t){Z.apply(this,t),Ae===0&&st()},Ce=function(...t){X.apply(this,t),Ae===0&&st()},history.pushState=we,history.replaceState=Ce,Ee=!0)},ys=()=>{Ee&&(history.pushState===we&&Z&&(history.pushState=Z),history.replaceState===Ce&&X&&(history.replaceState=X),Z=null,X=null,we=null,Ce=null,Ee=!1)}});function en(t){if(typeof window>"u")return()=>{};if(!t.routedTo&&!t.closeOnBack)return()=>{};let e=null,i=()=>{e||(e=ji({isOpen:()=>!t.isDestroyed()&&t.getSize()>0,isTop:t.isTopSheet,close:t.close,markerState:()=>t.routedTo!==void 0?{__bsRouted:t.sheetId}:{__bsSheet:t.sheetId},url:t.routedTo}))},n=()=>{e&&(at(e),e=null)},s=t.on("open",i),r=t.on("close",n);return t.getSize()>0&&i(),()=>{s(),r(),e&&(at(e),e=null)}}function tn(t){return Qi(()=>{t.isDestroyed()||t.getSize()<=0||t.close()})}var nn=m(()=>{"use strict";Ji()});function sn(t,e){return t.on("snap",({id:n})=>{if(!(typeof window>"u")&&!(typeof localStorage>"u"))try{localStorage.setItem(e,n)}catch{}})}var rn=m(()=>{"use strict"});function on(t){let{ms:e}=t;if(e===void 0||e<=0)return()=>{};let i=null,n=()=>{i!==null&&(clearTimeout(i),i=null)},s=()=>{if(t.isDestroyed()||t.isDragging())return;let l=t.resolveSnap(t.getActiveId());if(!l||l.size===0)return;let c=null;for(let h of t.getAllowedIds()){let d=t.resolveSnap(h);!d||d.size<=0||(!c||d.size<c.size)&&(c=d)}c&&(c.id===l.id||c.size>=l.size||t.snapTo(c.id))},r=()=>{n(),!t.isDestroyed()&&(i=setTimeout(()=>{i=null,s()},e))},a=t.on("snap",()=>r());return(t.resolveSnap(t.getActiveId())?.size??0)>0&&r(),()=>{n(),a()}}var an=m(()=>{"use strict"});function ln(t){let e=t.attachDragSurface(t.container,"content");return()=>e?.()}var dn=m(()=>{"use strict"});function cn(t){if(typeof window>"u"||!window.visualViewport)return()=>{};let e=window.visualViewport,i=null,n=()=>{i===null&&(i=requestAnimationFrame(()=>{if(i=null,t.isDestroyed())return;t.recomputeSnaps();let s=t.isVerticalAxis(),r=s?e.height:e.width,a=s?window.innerHeight:window.innerWidth,l=Math.max(0,Math.min(a,r)-8);l<t.getMaxAxisSize()&&t.setMaxAxisSize(l);let c=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let h=t.getMaxAxisSize();t.setSize(Math.min(t.getSize(),h));let d=t.resolveActiveSnap();d&&!t.isDragging()?(t.applySize(Math.min(d.size,h)),c&&t.resyncAfterCancel?.()):t.applySize(t.getSize())}))};return e.addEventListener("resize",n),()=>{e.removeEventListener("resize",n),i!==null&&cancelAnimationFrame(i)}}var hn=m(()=>{"use strict"});function un(){return{name:"route",install:t=>{let e=new I;return t.options.closeOnRouteChange&&e.add(tn({isDestroyed:t.isDestroyed,getSize:t.getSize,close:()=>t.close()})),e.add(en({routedTo:t.options.routedTo,closeOnBack:t.options.closeOnBack,isTopSheet:t.isTopSheet,getSize:t.getSize,isDestroyed:t.isDestroyed,close:()=>t.close("back"),on:t.on,sheetId:t.sheetId})),()=>e.drain()}}}function pn(){return{name:"persist",install:t=>{let e=t.options.persistKey;if(e)return sn({on:t.on},e)}}}function mn(){return{name:"auto-collapse",install:t=>on({ms:t.options.autoCollapseAfter,isDestroyed:t.isDestroyed,isDragging:t.isDragging,getAllowedIds:t.getAllowedIds,getActiveId:t.getActiveId,resolveSnap:t.resolveSnap,snapTo:t.snapTo,on:t.on})}}function fn(){return{name:"content-swipe",stage:"attach",install:t=>{if(t.scrollContainer)return ln({container:t.scrollContainer,attachDragSurface:t.attachDragSurface})}}}function gn(){return{name:"visual-viewport",install:t=>{if(!(typeof window>"u"))return cn({element:t.element,isVerticalAxis:t.isVerticalAxis,isDestroyed:t.isDestroyed,isDragging:t.isDragging,recomputeSnaps:t.recomputeSnaps,resolveActiveSnap:t.resolveActiveSnap,getMaxAxisSize:t.getMaxAxisSize,getSize:t.getSize,setMaxAxisSize:t.setMaxAxisSize,setSize:t.setSize,applySize:t.applySize,cancelInFlight:t.cancelInFlight,newCycle:t.newCycle,isAnimating:t.isAnimating,resyncAfterCancel:t.resyncAfterResize})}}}var bn=m(()=>{"use strict";nn();rn();an();dn();hn();it()});function vn(){return[fn(),gn(),pn(),mn(),un()]}var yn=m(()=>{"use strict";bn()});var ze,Sn=m(()=>{"use strict";Zi();yn();ze=class extends xe{constructor(e){super({...e,features:[...vn(),...e.features??[]]})}}});var xn,An=m(()=>{"use strict";xn=':where(.bs-root){--bs-surface-d:#ffffff;--bs-surface-border-d:rgba(225,227,237,1);--bs-radius-d:20px;--bs-handle-color-d:rgba(26,22,20,0.3);--bs-handle-width:40px;--bs-handle-height:5px;--bs-z-backdrop:90;--bs-z-sheet:100;--bs-backdrop-color-d:rgba(0,0,0,0.5);--bs-scrim-color-d:transparent;--bs-scrim-blur:0px;--bs-z-scrim:calc(var(--bs-z-sheet) - 1);--bs-size:0px;--bs-progress:0}.bs-backdrop{position:fixed;inset:0;background:var(--bs-backdrop-color,var(--bs-backdrop-color-d));opacity:0;pointer-events:none;z-index:var(--bs-z-backdrop);transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-backdrop,.bs-root[data-animating="true"] .bs-backdrop{transition:none}.bs-sheet{position:fixed;background:var(--bs-surface,var(--bs-surface-d));box-shadow:var(--bs-shadow,var(--bs-shadow-auto,none));--bs-shadow-fade:clamp(0,calc(var(--bs-progress,0) * 8),1);z-index:var(--bs-z-sheet);pointer-events:auto;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none;overscroll-behavior:contain}.bs-sheet[data-mode="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));padding-bottom:env(safe-area-inset-bottom);--bs-shadow-auto:0 calc(var(--bs-progress,0) * -2px - 3px) calc(var(--bs-progress,0) * 18px + 12px) rgba( 0,0,0,calc(var(--bs-shadow-fade) * (var(--bs-progress,0) * 0.15 + 0.12)) )}.bs-sheet[data-mode="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom:1px solid var(--bs-surface-border,var(--bs-surface-border-d));flex-direction:column-reverse;--bs-shadow-auto:0 3px 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12));padding-top:env(safe-area-inset-top)}.bs-sheet[data-mode="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-mode="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:-3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-bs-rest="closed"]{box-shadow:none;visibility:hidden}.bs-sheet[data-bs-webgl="on"],.bs-sheet[data-bs-webgl="on"] .bs-handle,.bs-sheet[data-bs-webgl="on"] .bs-header,.bs-sheet[data-bs-webgl="on"] .bs-footer{background:transparent;box-shadow:none}.bs-sheet[data-mode="left"] .bs-content{padding-right:36px}.bs-sheet[data-mode="right"] .bs-content{padding-left:36px}.bs-handle{flex-shrink:0;min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:var(--bs-handle-padding,8px 16px 4px);cursor:grab;touch-action:none;user-select:none;background:var(--bs-surface,var(--bs-surface-d));-webkit-tap-highlight-color:transparent;outline:none;position:relative}.bs-handle:active{cursor:grabbing}.bs-handle:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:var(--bs-radius,var(--bs-radius-d))}.bs-handle::before{content:"";display:block;width:var(--bs-handle-width);height:var(--bs-handle-height);background:var(--bs-handle-color,var(--bs-handle-color-d));border-radius:calc(var(--bs-handle-height) / 2);margin:0 auto 8px;transition:width 0.15s ease,background 0.15s ease,transform 0.15s ease;pointer-events:none}.bs-sheet[data-mode="left"] .bs-handle,.bs-sheet[data-mode="right"] .bs-handle{position:absolute;top:0;bottom:0;width:28px;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;background:var(--bs-surface,var(--bs-surface-d));z-index:1;overflow:hidden}.bs-sheet[data-mode="left"] .bs-handle>*,.bs-sheet[data-mode="right"] .bs-handle>*{display:none}.bs-sheet[data-mode="left"] .bs-handle{right:0;border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="right"] .bs-handle{left:0;border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="left"] .bs-handle::before,.bs-sheet[data-mode="right"] .bs-handle::before{width:var(--bs-handle-height);height:var(--bs-handle-width);margin:0}.bs-sheet:hover .bs-handle::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 15%)}.bs-handle:active::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 35%);transform:scaleX(1.15)}.bs-handle.bs-handle--ticks::after{content:"";display:block;position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:calc(var(--bs-handle-width) * 2);height:3px;background-image:radial-gradient( circle,var(--bs-handle-color,var(--bs-handle-color-d)) 0 1.5px,transparent 1.6px );background-size:8px 3px;background-repeat:repeat-x;background-position:center;opacity:0;transition:opacity 0.18s ease-out;pointer-events:none}.bs-root[data-dragging="true"] .bs-handle.bs-handle--ticks::after{opacity:0.4}.bs-sheet[data-mode="top"] .bs-handle.bs-handle--ticks::after{bottom:auto;top:6px}.bs-sheet[data-mode="left"] .bs-handle.bs-handle--ticks::after,.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:3px;height:calc(var(--bs-handle-width) * 2);background-size:3px 8px;background-repeat:repeat-y;margin-left:calc(var(--bs-handle-height) + 6px)}.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{margin-left:calc(-1 * (var(--bs-handle-height) + 6px))}.bs-header{flex:0 0 auto;min-height:var(--bs-header-min-height,0px);padding:var(--bs-header-padding,0 16px 8px);background:var(--bs-surface,var(--bs-surface-d))}.bs-content{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:text;padding:var(--bs-content-padding,0 16px 16px)}.bs-footer{flex:0 0 auto;padding:var(--bs-footer-padding,12px 16px calc(12px + env(safe-area-inset-bottom)));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-mode="bottom"]:has(.bs-footer:not([hidden]):has(*)){padding-bottom:0}.bs-header:not(:has(*)),.bs-footer:not(:has(*)),.bs-header[hidden],.bs-footer[hidden]{display:none}.bs-screen{position:absolute;inset:0;pointer-events:none;z-index:var(--bs-z-scrim);background:var(--bs-scrim-color,var(--bs-scrim-color-d));backdrop-filter:blur(var(--bs-scrim-blur,0px));-webkit-backdrop-filter:blur(var(--bs-scrim-blur,0px));transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-screen,.bs-root[data-animating="true"] .bs-screen{transition:none}.bs-scrim-overlay{z-index:calc(var(--bs-z-sheet) + 1);pointer-events:none}.bs-button-slot{position:fixed;z-index:calc(var(--bs-z-sheet) + 1);pointer-events:auto}.bs-button-slot[data-side="left"]{left:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-side="right"]{right:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="top"]{bottom:auto;top:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="left"]{left:calc(var(--bs-size,0px) + 12px);right:auto;bottom:auto;top:16px}.bs-button-slot[data-mode="right"]{right:calc(var(--bs-size,0px) + 12px);left:auto;bottom:auto;top:16px}@media (prefers-reduced-motion:reduce){.bs-backdrop,.bs-handle::before,.bs-button-slot[data-side="left"],.bs-button-slot[data-side="right"]{transition:none !important}}@media (prefers-color-scheme:dark){:where(.bs-root){--bs-surface-d:#1a1a1d;--bs-surface-border-d:rgba(255,255,255,0.08);--bs-handle-color-d:rgba(255,255,255,0.45);--bs-shadow-auto:0 -3px 16px rgba(0,0,0,0.5)}}@media (forced-colors:active){.bs-sheet{border:1px solid CanvasText}.bs-handle::before{background:CanvasText;forced-color-adjust:none}.bs-backdrop,.bs-screen{forced-color-adjust:none}}.bs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.ovl-root){--ovl-surface:var(--bs-surface,var(--bs-surface-d,#ffffff));--ovl-surface-border:var(--bs-surface-border,var(--bs-surface-border-d,rgba(0,0,0,0.08)));--ovl-shadow:0 -8px 40px rgba(0,0,0,0.35);--ovl-radius:var(--bs-radius,var(--bs-radius-d,20px));--ovl-backdrop-color:rgba(0,0,0,0.5);--ovl-z-backdrop:200;--ovl-z-panel:201}.ovl-backdrop{position:fixed;inset:0;background:var(--ovl-backdrop-color);opacity:0;pointer-events:none;z-index:var(--ovl-z-backdrop)}.ovl-panel{position:fixed;background:var(--ovl-surface);box-shadow:var(--ovl-shadow);z-index:var(--ovl-z-panel);-webkit-tap-highlight-color:transparent;outline:none;transition:transform 0.32s cubic-bezier(0.29,1.24,0.84,0.99),opacity 0.32s ease-out}.ovl-panel[data-state="open"]{transform:translate3d(0,0,0);opacity:1}@starting-style{.ovl-panel[data-edge="bottom"][data-state="open"]{transform:translate3d(0,100%,0);opacity:0}.ovl-panel[data-edge="top"][data-state="open"]{transform:translate3d(0,-100%,0);opacity:0}.ovl-panel[data-edge="left"][data-state="open"]{transform:translate3d(-100%,0,0);opacity:0}.ovl-panel[data-edge="right"][data-state="open"]{transform:translate3d(100%,0,0);opacity:0}}.ovl-panel[data-edge="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--ovl-radius);border-top-right-radius:var(--ovl-radius);border-top:1px solid var(--ovl-surface-border);padding-bottom:env(safe-area-inset-bottom)}.ovl-panel[data-edge="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-bottom:1px solid var(--ovl-surface-border);padding-top:env(safe-area-inset-top)}.ovl-panel[data-edge="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-right:1px solid var(--ovl-surface-border)}.ovl-panel[data-edge="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--ovl-radius);border-bottom-left-radius:var(--ovl-radius);border-left:1px solid var(--ovl-surface-border)}@media (prefers-reduced-motion:reduce){.ovl-panel,.ovl-backdrop{transition:none !important}}'});var Re,Tn,En,wn=m(()=>{"use strict";Re=t=>{let e=document.createElement("slot");return e.name=t,e},Tn=(t,e)=>{let i=document.createElement("div");i.className=e,i.setAttribute("part",t);let n=Re(t);i.appendChild(n);let s=()=>{i.hidden=n.assignedNodes({flatten:!0}).length===0};return n.addEventListener("slotchange",s),s(),i},En=()=>{let t=document.createElement("div");t.className="bs-root";let e=document.createElement("div");e.className="bs-backdrop",e.setAttribute("part","backdrop");let i=document.createElement("div");i.className="bs-screen",i.setAttribute("part","screen"),i.appendChild(Re("screen"));let n=document.createElement("section");n.className="bs-sheet",n.setAttribute("part","sheet"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false");let s=document.createElement("div");s.className="bs-button-slot",s.setAttribute("data-side","left"),s.setAttribute("part","left-button"),s.appendChild(Re("leftButton"));let r=document.createElement("div");r.className="bs-button-slot",r.setAttribute("data-side","right"),r.setAttribute("part","right-button"),r.appendChild(Re("rightButton"));let a=document.createElement("div");a.className="bs-handle",a.setAttribute("part","handle"),a.setAttribute("role","slider"),a.setAttribute("tabindex","0"),a.setAttribute("aria-label","Resize sheet");let l=Tn("header","bs-header"),c=document.createElement("div");c.className="bs-content",c.setAttribute("part","content"),c.setAttribute("tabindex","0"),c.setAttribute("role","region"),c.setAttribute("aria-label","Sheet content");let h=document.createElement("slot");c.appendChild(h);let d=Tn("footer","bs-footer"),u=document.createElement("span");u.className="bs-sr-announce",u.setAttribute("role","status"),u.setAttribute("aria-live","polite"),u.setAttribute("aria-atomic","true"),u.style.cssText="position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);",n.append(a,l,c,d),t.append(e,i,n,s,r,u);let p=document.createDocumentFragment();return p.appendChild(t),{fragment:p,refs:{sheet:n,handle:a,header:l,content:c,footer:d,backdrop:e,screen:i,leftButton:s,rightButton:r,announcer:u}}}});var lt,dt,ct,Q,ht,Mn,ut,pt,mt,ft,gt,bt,J,ee,te,ie,H,vt,ne,se,yt,re,oe,R,zn,Rn,xs,Cn,Dn,As,Ts,St,kn,Es,xt,De,ae,ws,Cs,On,In=m(()=>{"use strict";lt="snap-points",dt="allowed",ct="initial",Q="mode",ht="backdrop",Mn="stylesheet",ut="animation",pt="focus-trap",mt="close-on-escape",ft="lock-body-scroll",gt="sheet-label",bt="stack-effect",J="persistent",ee="disable-close",te="disable-drag",ie="drag-from",H="drag-from-content",vt="close-on-route-change",ne="radius",se="max-height",yt="return-focus-to",re="backdrop-color",oe="scrim-color",R="snap",zn=new Set([Q,ne,se,re,oe,R,J,ee,te,ie,H]),Rn=[lt,dt,ct,Q,ht,ut,pt,mt,ft,gt,bt,J,ee,te,ie,H,vt,ne,se,yt,re,oe,R],xs=t=>!!t&&typeof t=="object"&&typeof t.id=="string"&&(typeof t.size=="number"||typeof t.size=="string"),Cn=[{id:"full",size:"full"}],Dn=t=>{if(!t)return Cn;try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&e.every(xs))return e;if(Array.isArray(e))return Cn}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let[i,n]=e.split(":").map(a=>a.trim()),s=Number(n),r=Number.isFinite(s)?s:n;return{id:i??"default",size:r}})},As=["bottom","top","left","right"],Ts=["spring","tween","ios-spring","material-bounce","linear","snappy"],St=t=>t&&As.includes(t)?t:"bottom",kn=t=>t&&Ts.includes(t)?t:void 0,Es=["handle","sheet","zones"],xt=t=>t&&Es.includes(t)?t:void 0,De=t=>t?t.split(",").map(e=>e.trim()).filter(Boolean):void 0,ae=t=>{if(t===null)return;let e=Number(t);return Number.isFinite(e)&&t.trim()!==""?e:t},ws=["top-left","top-center","top-right","center-left","center","center-right","bottom-left","bottom-center","bottom-right","sheet-top-left","sheet-top-center","sheet-top-right","dock-bottom","dock-top"],Cs=["fade","scale","slide","pop","none"],On=t=>{let e=t.getAttribute("data-position"),i=t.getAttribute("data-animation"),n=De(t.getAttribute("data-show-on")),s=De(t.getAttribute("data-fade-range")),r=s?.length===2&&s.every(a=>Number.isFinite(Number(a)))?[Number(s[0]),Number(s[1])]:void 0;return{position:e&&ws.includes(e)?e:void 0,inset:t.getAttribute("data-inset")??void 0,showOn:n,fadeRange:r,interactive:t.getAttribute("data-interactive")!=="false",animation:i&&Cs.includes(i)?i:void 0}}});var Ln={};zt(Ln,{BottomSheetElement:()=>_,defineBottomSheet:()=>At});var Ms,_,At,Tt=m(()=>{"use strict";Sn();An();wn();In();Ms=typeof HTMLElement<"u"?HTMLElement:class{},_=class extends Ms{constructor(){super();o(this,"engine",null);o(this,"root");o(this,"offHandlers",[]);o(this,"refs");o(this,"backdropClickHandler",null);o(this,"stylesheetLinked",!1);o(this,"declarativeAnchors",[]);o(this,"lastActiveId",null);this.root=this.attachShadow({mode:"open"});let i=document.createElement("style");i.textContent=xn,this.root.appendChild(i);let n=document.createElement("style");n.textContent=[":host { display: contents; }",".bs-handle:focus-visible {"," outline: 2px solid currentColor;"," outline-offset: -2px;"," border-radius: var(--bs-radius, 20px);","}","@media (forced-colors: active) {"," .bs-handle:focus-visible { outline: 2px solid CanvasText; }","}"].join(`
2
+ `),this.root.appendChild(n);let{fragment:s,refs:r}=En();this.refs=r,this.root.appendChild(s)}static get observedAttributes(){return Rn.slice()}connectedCallback(){if(!this.stylesheetLinked){this.stylesheetLinked=!0;let i=this.getAttribute(Mn);if(i){let n=document.createElement("link");n.rel="stylesheet",n.href=i,this.root.appendChild(n)}}this.initEngine()}disconnectedCallback(){this.teardownEngine()}attributeChangedCallback(i,n,s){if(this.engine){if(zn.has(i)){this.applyLiveAttribute(i,s);return}this.teardownEngine(),this.initEngine()}}applyLiveAttribute(i,n){if(this.engine)switch(i){case ne:{let s=ae(n);s!==void 0&&this.engine.setRadius(s);break}case se:{let s=ae(n);s!==void 0&&this.engine.setMaxHeight(s);break}case re:case oe:this.engine.setScrimColor(n);break;case J:this.engine.setPersistent(n==="true");break;case ee:this.engine.setDisableClose(n==="true");break;case te:this.engine.setDisableDrag(n==="true");break;case H:this.engine.setDragFromContent(n!=="false");break;case ie:{let s=xt(n);s&&this.engine.setDragFrom(s);break}case Q:this.engine.setMode(St(n));break;case R:n&&n!==this.engine.state.activeId&&this.engine.snapTo(n);break}}getEngine(){return this.engine}teardownEngine(){this.lastActiveId=this.engine?.state.activeId??this.lastActiveId,this.offHandlers.forEach(i=>i()),this.offHandlers=[],this.backdropClickHandler&&(this.refs.backdrop.removeEventListener("click",this.backdropClickHandler),this.backdropClickHandler=null),this.engine?.destroy(),this.engine=null;for(let i of this.declarativeAnchors)this.appendChild(i);this.declarativeAnchors=[]}initEngine(){let{sheet:i,handle:n,content:s,backdrop:r,announcer:a}=this.refs,l=St(this.getAttribute(Q));i.setAttribute("data-mode",l),this.refs.leftButton.setAttribute("data-mode",l),this.refs.rightButton.setAttribute("data-mode",l);let c=this.getAttribute(pt)==="true";c?i.setAttribute("aria-modal","true"):i.removeAttribute("aria-modal"),i.setAttribute("aria-label",this.getAttribute(gt)??"Bottom sheet");let h=this.getAttribute(ht)!=="false";r.style.display=h?"":"none",h&&(this.backdropClickHandler=()=>{this.engine?.canDismiss()&&this.engine.close("backdrop")},r.addEventListener("click",this.backdropClickHandler));let d=Dn(this.getAttribute(lt)),u=this.getAttribute(ct)??void 0,p=this.lastActiveId&&d.some(f=>f.id===this.lastActiveId)?this.lastActiveId:u,b={element:i,handle:n,scrollContainer:s,backdrop:h?r:void 0,scrim:this.refs.screen,mode:l,snapPoints:d,allowed:De(this.getAttribute(dt)),initial:p,animation:kn(this.getAttribute(ut)),focusTrap:c,closeOnEscape:this.getAttribute(mt)!=="false",lockBodyScroll:this.getAttribute(ft)!=="false",stackEffect:this.getAttribute(bt)==="true",persistent:this.getAttribute(J)==="true",disableClose:this.getAttribute(ee)==="true",disableDrag:this.getAttribute(te)==="true",dragFrom:xt(this.getAttribute(ie)),dragFromContent:this.getAttribute(H)===null?void 0:this.getAttribute(H)!=="false",closeOnRouteChange:this.getAttribute(vt)==="true",radius:ae(this.getAttribute(ne)),maxHeight:ae(this.getAttribute(se)),returnFocusTo:this.getAttribute(yt)??void 0};this.engine=new ze(b),i.setAttribute("data-active",this.engine.state.activeId);let g=this.getAttribute(oe)??this.getAttribute(re);g!==null&&this.engine.setScrimColor(g);for(let f of Array.from(this.querySelectorAll('[slot="anchor"]')))this.declarativeAnchors.push(f),this.engine.addAnchor({...On(f),element:f});this.offHandlers=[this.engine.on("snap",f=>{i.setAttribute("data-active",f.id),a.textContent=f.id,this.dispatchEvent(new CustomEvent("snap",{detail:f}))}),this.engine.on("before-snap",f=>{this.dispatchEvent(new CustomEvent("before-snap",{detail:f,cancelable:!0}))||f.cancel()}),this.engine.on("open",f=>this.dispatchEvent(new CustomEvent("open",{detail:f}))),this.engine.on("close",()=>this.dispatchEvent(new CustomEvent("close"))),this.engine.on("progress",f=>this.dispatchEvent(new CustomEvent("progress",{detail:f}))),this.engine.on("before-close",f=>{this.dispatchEvent(new CustomEvent("before-close",{detail:f,cancelable:!0}))||f.cancel()}),this.engine.on("opened",f=>this.dispatchEvent(new CustomEvent("opened",{detail:f}))),this.engine.on("closed",()=>this.dispatchEvent(new CustomEvent("closed"))),this.engine.on("dragstart",f=>this.dispatchEvent(new CustomEvent("drag-start",{detail:f}))),this.engine.on("dragend",f=>this.dispatchEvent(new CustomEvent("drag-end",{detail:f}))),this.engine.on("drag",f=>this.dispatchEvent(new CustomEvent("drag",{detail:f})))]}snapTo(i){return this.engine?.snapTo(i)??Promise.resolve()}open(i){return this.engine?.open(i)??Promise.resolve()}close(i){return this.engine?.close(i)??Promise.resolve()}expand(){return this.engine?.expand()??Promise.resolve()}collapse(){return this.engine?.collapse()??Promise.resolve()}isTop(){return this.engine?.isTop()??!1}depth(){return this.engine?.depth()??0}canDismiss(){return this.engine?.canDismiss()??!1}setRadius(i){this.engine?.setRadius(i)}setMaxHeight(i){this.engine?.setMaxHeight(i)}setAllowed(i,n){this.engine?.setAllowed(i,n)}addAnchor(i){return this.engine?.addAnchor(i)??(()=>{})}setScrimStages(i){return this.engine?.setScrimStages(i)??(()=>{})}recompute(){this.engine?.recompute()}get sheetState(){return this.engine?.state??null}get snap(){return this.engine?.state.activeId??this.getAttribute(R)}set snap(i){if(i===null){this.removeAttribute(R);return}this.engine?i!==this.engine.state.activeId&&this.engine.snapTo(i):this.setAttribute(R,i)}},At=(t="bottom-sheet")=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,class extends _{})}});var zs={};zt(zs,{BottomSheetElement:()=>_,defineBottomSheet:()=>At});Tt();typeof window<"u"&&typeof customElements<"u"&&Promise.resolve().then(()=>(Tt(),Ln)).then(({defineBottomSheet:t})=>{t()});return Kn(zs);})();
3
3
  //# sourceMappingURL=element.iife.global.js.map
package/dist/element.js CHANGED
@@ -431,14 +431,31 @@ var init_linked_sheets = __esm({
431
431
  }
432
432
  });
433
433
 
434
+ // src/core/primitives/hot-path-thresholds.ts
435
+ var SIZE_WRITE_EPSILON, OPACITY_WRITE_EPSILON, POINTER_EVENTS_OPACITY_THRESHOLD, RANGE_DIVISION_EPSILON;
436
+ var init_hot_path_thresholds = __esm({
437
+ "src/core/primitives/hot-path-thresholds.ts"() {
438
+ SIZE_WRITE_EPSILON = 0.5;
439
+ OPACITY_WRITE_EPSILON = 5e-3;
440
+ POINTER_EVENTS_OPACITY_THRESHOLD = 0.05;
441
+ RANGE_DIVISION_EPSILON = 1e-4;
442
+ }
443
+ });
444
+
434
445
  // src/core/features/resize-observer.ts
435
446
  function installResizeObserver(deps) {
436
447
  if (typeof window === "undefined") {
437
448
  return () => {
438
449
  };
439
450
  }
451
+ const seatFor = () => {
452
+ const snap = deps.resolveActiveSnap();
453
+ const max = deps.getMaxAxisSize();
454
+ return { target: snap ? Math.min(snap.size, max) : null, max };
455
+ };
440
456
  const onResize = () => {
441
457
  if (deps.isDestroyed()) return;
458
+ const before = seatFor();
442
459
  deps.recomputeSnaps();
443
460
  const mode = deps.getMode();
444
461
  const isVerticalAxis = mode === "bottom" || mode === "top";
@@ -447,6 +464,10 @@ function installResizeObserver(deps) {
447
464
  if (viewportSize2 > 0 && viewportSize2 < max) {
448
465
  deps.setMaxAxisSize(viewportSize2);
449
466
  }
467
+ const after = seatFor();
468
+ if (before.target !== null && after.target !== null && Math.abs(after.target - before.target) < SIZE_WRITE_EPSILON && Math.abs(after.max - before.max) < SIZE_WRITE_EPSILON) {
469
+ return;
470
+ }
450
471
  const wasAnimating = deps.isAnimating?.() ?? false;
451
472
  deps.cancelInFlight();
452
473
  deps.newCycle();
@@ -481,6 +502,7 @@ function installResizeObserver(deps) {
481
502
  }
482
503
  var init_resize_observer = __esm({
483
504
  "src/core/features/resize-observer.ts"() {
505
+ init_hot_path_thresholds();
484
506
  }
485
507
  });
486
508
 
@@ -745,17 +767,6 @@ var init_types = __esm({
745
767
  }
746
768
  });
747
769
 
748
- // src/core/primitives/hot-path-thresholds.ts
749
- var SIZE_WRITE_EPSILON, OPACITY_WRITE_EPSILON, POINTER_EVENTS_OPACITY_THRESHOLD, RANGE_DIVISION_EPSILON;
750
- var init_hot_path_thresholds = __esm({
751
- "src/core/primitives/hot-path-thresholds.ts"() {
752
- SIZE_WRITE_EPSILON = 0.5;
753
- OPACITY_WRITE_EPSILON = 5e-3;
754
- POINTER_EVENTS_OPACITY_THRESHOLD = 0.05;
755
- RANGE_DIVISION_EPSILON = 1e-4;
756
- }
757
- });
758
-
759
770
  // src/core/primitives/opacity-dedup.ts
760
771
  var WriteSentinel;
761
772
  var init_opacity_dedup = __esm({