@surdeddd/bottom-sheet 0.13.0 → 0.20.0
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.
- package/README.md +46 -0
- package/dist/{BottomSheetCore-D16lsa6g.d.ts → BottomSheetCore-Cgn8b_6A.d.ts} +36 -2
- package/dist/{BottomSheetCore-CsIjyq7C.d.cts → BottomSheetCore-VPJZcKcg.d.cts} +36 -2
- package/dist/{BottomSheetEngine-BYjAVrmd.d.cts → BottomSheetEngine-B8C2CwF9.d.cts} +1 -1
- package/dist/{BottomSheetEngine-YuCNugZn.d.ts → BottomSheetEngine-DwYR_ygJ.d.ts} +1 -1
- package/dist/core.cjs +328 -33
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +328 -33
- package/dist/debug.d.cts +1 -1
- package/dist/debug.d.ts +1 -1
- package/dist/element.cjs +404 -108
- package/dist/element.d.cts +2 -2
- package/dist/element.d.ts +2 -2
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +404 -108
- package/dist/features.cjs +6 -50
- package/dist/features.d.cts +4 -4
- package/dist/features.d.ts +4 -4
- package/dist/features.js +6 -50
- package/dist/index-CnfbOKx0.d.cts +9 -0
- package/dist/index-DcMkhXAy.d.ts +9 -0
- package/dist/index.cjs +335 -829
- package/dist/index.d.cts +44 -47
- package/dist/index.d.ts +44 -47
- package/dist/index.js +336 -816
- package/dist/integrations/formik.d.cts +1 -1
- package/dist/integrations/formik.d.ts +1 -1
- package/dist/integrations/react-hook-form.d.cts +1 -1
- package/dist/integrations/react-hook-form.d.ts +1 -1
- package/dist/overlay.cjs +5 -5
- package/dist/overlay.js +5 -5
- package/dist/preact.d.cts +2 -2
- package/dist/preact.d.ts +2 -2
- package/dist/qwik-lib/index.qwik.cjs +323 -83
- package/dist/qwik-lib/index.qwik.mjs +323 -83
- package/dist/qwik.cjs +342 -83
- package/dist/qwik.d.cts +4 -2
- package/dist/qwik.d.ts +4 -2
- package/dist/qwik.js +342 -83
- package/dist/react.cjs +347 -85
- package/dist/react.d.cts +3 -4
- package/dist/react.d.ts +3 -4
- package/dist/react.js +347 -85
- package/dist/solid.cjs +348 -83
- package/dist/solid.d.cts +37 -1
- package/dist/solid.d.ts +37 -1
- package/dist/solid.js +348 -83
- package/dist/solid.source.jsx +356 -83
- package/dist/styles.css +24 -4
- package/dist/svelte-core.cjs +334 -83
- package/dist/svelte-core.js +334 -83
- package/dist/svelte-src/BottomSheet.svelte +14 -0
- package/dist/svelte.cjs +344 -83
- package/dist/svelte.d.cts +2 -0
- package/dist/svelte.d.ts +2 -0
- package/dist/svelte.js +344 -83
- package/dist/vue.cjs +350 -83
- package/dist/vue.js +350 -83
- package/dist/webgl.cjs +673 -0
- package/dist/webgl.d.cts +17 -0
- package/dist/webgl.d.ts +17 -0
- package/dist/webgl.js +671 -0
- package/package.json +64 -40
- package/dist/index-DdYLOIIT.d.ts +0 -15
- package/dist/index-dfrzw-lI.d.cts +0 -15
package/dist/element.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BottomSheetEngine } from './BottomSheetEngine-
|
|
2
|
-
import { C as CloseReason, A as AnchorOptions,
|
|
1
|
+
import { B as BottomSheetEngine } from './BottomSheetEngine-B8C2CwF9.cjs';
|
|
2
|
+
import { C as CloseReason, A as AnchorOptions, e as ScrimStagesOptions, E as EngineState } from './BottomSheetCore-VPJZcKcg.cjs';
|
|
3
3
|
import './transform-jVfAikE9.cjs';
|
|
4
4
|
|
|
5
5
|
declare const BaseHTMLElement: typeof HTMLElement;
|
package/dist/element.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BottomSheetEngine } from './BottomSheetEngine-
|
|
2
|
-
import { C as CloseReason, A as AnchorOptions,
|
|
1
|
+
import { B as BottomSheetEngine } from './BottomSheetEngine-DwYR_ygJ.js';
|
|
2
|
+
import { C as CloseReason, A as AnchorOptions, e as ScrimStagesOptions, E as EngineState } from './BottomSheetCore-Cgn8b_6A.js';
|
|
3
3
|
import './transform-jVfAikE9.js';
|
|
4
4
|
|
|
5
5
|
declare const BaseHTMLElement: typeof HTMLElement;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var surdeddd_bottomSheet=(()=>{var ie=Object.defineProperty;var fn=Object.getOwnPropertyDescriptor;var gn=Object.getOwnPropertyNames;var bn=Object.prototype.hasOwnProperty;var vn=(t,e,i)=>e in t?ie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var m=(t,e)=>()=>(t&&(e=t(t=0)),e);var pt=(t,e)=>{for(var i in e)ie(t,i,{get:e[i],enumerable:!0})},yn=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of gn(e))!bn.call(t,s)&&s!==i&&ie(t,s,{get:()=>e[s],enumerable:!(n=fn(e,s))||n.enumerable});return t};var Sn=t=>yn(ie({},"__esModule",{value:!0}),t);var o=(t,e,i)=>vn(t,typeof e!="symbol"?e+"":e,i);var we,w,ut=m(()=>{"use strict";we=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)}})}},w=new we});function ht(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 k,ne=m(()=>{"use strict";k=t=>t==="left"||t==="right"?"width":"height"});function Me(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${t}-${crypto.randomUUID()}`:(Ce[t]=(Ce[t]??0)+1,`${t}-${Ce[t]}`)}var Ce,mt=m(()=>{"use strict";Ce={}});function ft(){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 gt=m(()=>{"use strict"});var x,bt,xn,yt,vt,Tn,se,St=m(()=>{"use strict";x=null,bt="data-bs-probe",xn=t=>{if(typeof document>"u")return null;if(!x||!x.isConnected){let e=document.querySelector(`[${bt}]`);e?x=e:(x=document.createElement("div"),x.setAttribute("aria-hidden","true"),x.setAttribute(bt,""),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},yt=t=>t==="bottom"||t==="top",vt=t=>typeof window>"u"?0:yt(t)?window.innerHeight:window.innerWidth,Tn=/^(-?\d+(?:\.\d+)?)%$/,se=(t,e,i)=>{if(typeof t=="number")return Math.max(0,t);if(t==="full")return vt(e);if(t==="fit"||t==="content")return Math.max(0,i?.()??0);let n=t.match(Tn);if(n){let a=parseFloat(n[1])/100;return Math.max(0,vt(e)*a)}let s=yt(e)?"vertical":"horizontal",r=xn(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 y(...t){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.warn(...t)}var B=m(()=>{"use strict"});var xt,An,ze,En,Tt,N,wn,Cn,Mn,At,K=m(()=>{"use strict";St();B();xt=(t,e,i)=>t.map(n=>{let s=se(n.size,e,i);return!Number.isFinite(s)||s<0?(y(`[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),An=/(^|[^a-z])vh\b/i,ze=t=>{for(let e of t)typeof e.size=="string"&&An.test(e.size)&&y(`[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`)},En=(t,e,i,n=0,s=0)=>{let r=e.filter(c=>i.includes(c.id));if(r.length===0)return null;let a=t+n*s,l=r[0],p=Math.abs(a-l.size);for(let c=1;c<r.length;c++){let d=r[c],u=Math.abs(a-d.size);u<p&&(l=d,p=u)}return l},Tt=(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}},N=(t,e)=>e.find(i=>i.id===t)??null,wn=.4,Cn=12,Mn=.15,At=t=>{let e=Math.abs(t.velocity),i=t.pointerKind==="mouse"?wn:t.flickVelocity,n=t.pointerKind==="mouse"?Cn:t.dragThreshold,s=0;if((e>i||e>Mn)&&(s=t.velocity>0?1:-1),Math.abs(t.delta)<n&&s===0)return N(t.activeId,t.resolved);let r=e>i?Math.min(e*180,t.maxAxisSize):0;return En(t.size,t.resolved,t.allowed,s,r)}});function ke(t,e,i){let n=!1,s=!1;return t({...e,cancel:()=>{if(s){y(`[BottomSheet] ${i}.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.`);return}n=!0}}),s=!0,n}var Et=m(()=>{"use strict";B()});var re,wt=m(()=>{"use strict";K();re=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=xt(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()}setAllowedIds(e){this.allowedIds=e,this.rangeCache=null}findById(e){return N(e,this.resolved)}findDragSettleTarget(e){return At({...e,resolved:this.resolved,allowed:this.allowedIds,maxAxisSize:this.maxAxisSize})}getAllowedRange(){return this.rangeCache??(this.rangeCache=Tt(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 Ct(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(p=>p.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 Mt=m(()=>{"use strict"});function zt(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 p=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let c=t.resolveActiveSnap(),d=t.getMaxAxisSize(),u=Math.min(c?c.size:t.getSize(),d);t.setSize(u),c&&!t.isDragging()&&(t.applySize(u),p&&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 kt=m(()=>{"use strict"});function Rt(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",p=()=>d(),c=()=>{if(!(!s||!l))for(let h of Array.from(s.children))h instanceof HTMLSlotElement&&!a.has(h)&&(h.addEventListener("slotchange",p),a.add(h))},d=()=>{c();let h=zn(s);for(let g of r)h.includes(g)||(n.unobserve(g),r.delete(g));for(let g of h)r.has(g)||(n.observe(g),r.add(g));i()},u;return s&&(d(),typeof MutationObserver<"u"&&(u=new MutationObserver(d),u.observe(s,{childList:!0}))),()=>{n.disconnect(),u?.disconnect();for(let h of a)h.removeEventListener("slotchange",p);e&&cancelAnimationFrame(e)}}var zn,It=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 Dt(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=se(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=k(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 Ot=m(()=>{"use strict";K();ne()});var kn,Rn,Lt,Pt=m(()=>{"use strict";ne();kn=(t,e,i)=>{let n=i?"height":"width",s=t.style;if(!e){let g=s[n];s[n]="auto";let b=i?t.offsetHeight:t.offsetWidth;return s[n]=g,b}let r=e.style,a=s[n],l=r.flex,p=i?r.height:r.width;s[n]="auto",r.flex="none",i?r.height="auto":r.width="auto";let c=i?t.offsetHeight:t.offsetWidth,d=i?e.clientHeight:e.clientWidth,u=i?e.scrollHeight:e.scrollWidth,h=Math.max(c,c-d+u);return s[n]=a,r.flex=l,i?r.height=p:r.width=p,h},Rn=(t,e)=>{let i=t.offsetParent;return i&&i!==document.body&&i!==document.documentElement?e?i.clientHeight:i.clientWidth:e?window.innerHeight:window.innerWidth},Lt=t=>{let e=k(t.mode)==="height",i=kn(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=Rn(t.element,e);return r>0?Math.min(s,r):s}});function Ht(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 p=t.getAllowedIds(),c=p.indexOf(t.getActiveId());c!==-1&&(l.key===s&&c<p.length-1?(l.preventDefault(),t.snapTo(p[c+1])):l.key===r&&c>0?(l.preventDefault(),t.snapTo(p[c-1])):l.key==="Home"?(l.preventDefault(),t.snapTo(p[0])):l.key==="End"&&(l.preventDefault(),t.snapTo(p[p.length-1])))};return t.handle.addEventListener("keydown",a),()=>t.handle.removeEventListener("keydown",a)}var Ft=m(()=>{"use strict"});var Re,_t=m(()=>{"use strict";Re=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 E,Ie=m(()=>{"use strict";E=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 In(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 R(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=In(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 oe=m(()=>{"use strict"});var On,Ln,ae,Nt=m(()=>{"use strict";_t();K();Ie();B();oe();On=/^-?\d+(?:\.\d+)?(?:px|em|rem|%)$/,Ln="rgba(0, 0, 0, 0.4)",ae=class{constructor(e,i){o(this,"screenComponent");o(this,"backdrop");o(this,"mode");o(this,"isDestroyed");o(this,"isTopSheet");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 E);o(this,"screenOpacitySentinel",new E);o(this,"lastBackdropPointer","");o(this,"lastScreenDisplay","");this.screenComponent=e.screenComponent,this.backdrop=e.backdrop,this.mode=e.mode,this.isDestroyed=e.isDestroyed,this.isTopSheet=e.isTopSheet,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?Re[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?Ln: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&&this.isTopSheet()){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})}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(p=>{let c=N(p,a);return c!==null&&c.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=Re[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=On.test(n)?n:"16px";s!==n&&y(`[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&&y("[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 p=l.style;p.position="absolute",R(p,this.mode,r,s),a&&(p.pointerEvents="auto"),l.appendChild(e.children);let c=i.parentElement;if(!c)return y("[bottom-sheet] setScrimOverlay: scrim element has no parent, skipping overlay injection. Mount the sheet root before calling setScrimOverlay."),()=>{};c.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 Kt,Pn,Vt,Wt,Ut,Yt,le=m(()=>{"use strict";Kt=t=>1+2.40158*Math.pow(t-1,3)+1.40158*Math.pow(t-1,2),Pn=t=>1-Math.pow(1-t,3),Vt=t=>t,Wt=t=>1-Math.pow(1-t,5),Ut=({from:t,to:e,duration:i,easing:n=Pn,onUpdate:s})=>{let r=!1,a=0,l=null,p=performance.now(),c=new Promise(d=>{if(l=d,i<=0){s(e),d();return}let u=h=>{if(r)return;let g=h-p,b=Math.min(g/i,1),f=t+(e-t)*n(b);s(f),b<1?a=requestAnimationFrame(u):d()};a=requestAnimationFrame(u)});return{cancel:()=>{r=!0,cancelAnimationFrame(a),l?.()},promise:c}},Yt=()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches});var De,Hn,$t,Oe=m(()=>{"use strict";De={stiffness:220,damping:26,mass:1,restDelta:.5,restSpeed:.5},Hn=1/30,$t=({from:t,to:e,velocity:i=0,config:n,onUpdate:s})=>{let r={...De,...n},a=!1,l=0,p=null,c=t,d=i,u=performance.now(),h=new Promise(g=>{p=g;let b=f=>{if(a)return;let S=Math.min((f-u)/1e3,Hn);u=f;let te=Math.max(1,Math.ceil(S*240)),v=S/te,z=te;for(;z-- >0;){let _=(-r.stiffness*(c-e)-r.damping*d)/r.mass;d+=_*v,c+=d*v}if(!Number.isFinite(c)||!Number.isFinite(d)){s(e,0),g();return}s(c,d),Math.abs(e-c)<(r.restDelta??.5)&&Math.abs(d)<(r.restSpeed??.5)?(s(e,0),g()):l=requestAnimationFrame(b)};l=requestAnimationFrame(b)});return{cancel:()=>{a=!0,cancelAnimationFrame(l),p?.()},promise:h}}});function qt(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:Fn,easing:Vt};case"snappy":return{kind:"tween",duration:180,easing:Wt};case"tween":return{kind:"tween"};default:return{kind:"spring"}}}var Fn,Gt=m(()=>{"use strict";le();Fn=220});function jt(t,e,i,n){let s={...De,...n},r=1/Le,a=Zt/Le*1e3,l=Math.ceil(_n/1e3*Le),p=[t],c=t,d=i;for(let u=1;u<=l;u+=1){let h=-s.stiffness*(c-e)-s.damping*d;if(d+=h/s.mass*r,c+=d*r,!Number.isFinite(c)||!Number.isFinite(d)){p.push(e);break}if(u%Zt===0&&p.push(c),Math.abs(e-c)<(s.restDelta??.5)&&Math.abs(d)<(s.restSpeed??.5))break}return p[p.length-1]!==e&&p.push(e),{values:p,stepMs:a,durationMs:(p.length-1)*a}}function Xt(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 Le,Zt,_n,Qt=m(()=>{"use strict";Oe();Le=240,Zt=4,_n=3e3});var Bn,Jt,de,ei=m(()=>{"use strict";le();Oe();Gt();Qt();Bn=220,Jt=1e3,de=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=qt(i.animation);this.animationKind=n.kind,this.duration=i.duration??n.duration??Bn,this.easing=i.easing??n.easing??Kt,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}cancel(){if(this.currentTween?.cancel(),this.currentSpring?.cancel(),this.currentWaapi){let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}}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.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"?jt(this.getSize(),e,i*Jt,this.springConfig):Xt(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=$t({from:this.getSize(),to:e,velocity:i*Jt,config:this.springConfig,onUpdate:s=>this.applySizeFn(s)});this.currentSpring=n,await n.promise,this.currentSpring===n&&(this.currentSpring=null)}else{let n=Ut({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(b=>({transform:s(b)})),a=this.element.animate(r,{duration:e.durationMs,easing:"linear",fill:"forwards"}),l=!1,p=0,c=performance.now(),d=e.values.length-1,u=()=>{if(l)return;let b=performance.now()-c,f=Math.min(Math.floor(b/e.stepMs),d);n(e.values[f]),p=requestAnimationFrame(u)};p=requestAnimationFrame(u);let h={anim:a,stop:()=>{l=!0,cancelAnimationFrame(p)}};this.currentWaapi=h;try{await a.finished}catch{}h.stop();let g=this.currentWaapi===h;if(g&&(this.currentWaapi=null),g&&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 ti,Nn,ii,Pe,Kn,V,ni,si=m(()=>{"use strict";ti=["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(","),Nn=t=>typeof t.checkVisibility=="function"?t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):t.offsetParent!==null,ii=t=>{let e=Array.from(t.querySelectorAll(ti));if(typeof HTMLSlotElement<"u")for(let i of Array.from(t.querySelectorAll("slot")))for(let n of i.assignedElements())n.matches(ti)&&e.push(n),e.push(...ii(n));return e},Pe=t=>ii(t).filter(e=>!e.hasAttribute("inert")&&Nn(e)&&!e.matches("[aria-hidden='true']")),Kn=(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},V=[],ni=(t,e={})=>{if(typeof document>"u")return()=>{};let i={};V.push(i);let n=()=>V[V.length-1]===i,s=document.activeElement;(()=>{let c=e.initialFocus;if(c===!1){t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0});return}(typeof c=="string"?t.querySelector(c):c??Pe(t)[0]??t)?.focus({preventScroll:!0})})();let a=c=>{if(!n())return;if(c.key==="Escape"&&e.onEscape){e.onEscape();return}if(c.key!=="Tab")return;let d=Pe(t);if(d.length===0){c.preventDefault();return}let u=d[0],h=d[d.length-1],g=document.activeElement;c.shiftKey&&g===u?(c.preventDefault(),h.focus()):!c.shiftKey&&g===h&&(c.preventDefault(),u.focus())},l=c=>{if(!n())return;let d=c.target;d&&!Kn(t,d)&&Pe(t)[0]?.focus({preventScroll:!0})};document.addEventListener("keydown",a,!0),document.addEventListener("focusin",l,!0);let p=!1;return()=>{if(p)return;p=!0;let c=V.indexOf(i);c!==-1&&V.splice(c,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 W,A,ri,oi=m(()=>{"use strict";W=0,A=null,ri=()=>{if(typeof document>"u")return()=>{};if(W===0){let e=document.body;A={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=`-${A.scrollY}px`,e.style.width="100%"}W++;let t=!1;return()=>{if(!t&&(t=!0,W=Math.max(0,W-1),W===0&&A)){let e=document.body;e.style.overflow=A.overflow,e.style.position=A.position,e.style.top=A.top,e.style.width=A.width,e.style.paddingRight=A.paddingRight,window.scrollTo(0,A.scrollY),A=null}}}});function ai(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 li=m(()=>{"use strict"});var ce,di=m(()=>{"use strict";si();oi();li();ce=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=ai(()=>this.element)}get isInstalled(){return this.installed}install(){this.destroyed||(this.installed=!0,this.bodyScrollLockEnabled&&!this.releaseScrollLock&&(this.releaseScrollLock=ri()),this.focusTrapEnabled&&!this.releaseFocusTrap&&(this.releaseFocusTrap=ni(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,He,pi,ui=m(()=>{"use strict";ci=t=>t==="bottom"||t==="top",He=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}},pi=(t,e,i)=>{let n=null,s="touch",r=0,a=0,l=v=>v==="mouse"?160:120,p=32,c=new He(p),d=ci(e)?"Y":"X",u=e==="bottom"||e==="right"?-1:1,h=v=>d==="Y"?v.clientY:v.clientX,g=v=>{if(n===null&&!(v.button!==void 0&&v.button!==0)){n=v.pointerId,s=v.pointerType||"touch",r=h(v),a=r,c.reset(),c.push(v.timeStamp,r);try{t.setPointerCapture(v.pointerId)}catch{}i.onStart(r,s)}},b=v=>{if(v.pointerId!==n)return;let z=h(v),F=(z-r)*u;a=z,c.push(v.timeStamp,z);let _=v.timeStamp-l(s);c.pruneBefore(_,2),i.onMove(F)},f=v=>{if(v.pointerId!==n)return;let Ee=(a-r)*u,F=0;if(c.length>=3){let lt=c.oldest(),dt=c.newest(),ct=dt.t-lt.t;ct>0&&(F=(dt.v-lt.v)/ct*u)}let _=s;n=null,c.reset();try{t.hasPointerCapture(v.pointerId)&&t.releasePointerCapture(v.pointerId)}catch{}i.onEnd(Ee,F,_)},S=v=>{v.pointerId===n&&(n=null,c.reset(),i.onCancel?.())};t.addEventListener("pointerdown",g),t.addEventListener("pointermove",b),t.addEventListener("pointerup",f),t.addEventListener("pointercancel",S);let te=t.style.touchAction;return t.style.touchAction=ci(e)?"pan-x":"pan-y",()=>{t.removeEventListener("pointerdown",g),t.removeEventListener("pointermove",b),t.removeEventListener("pointerup",f),t.removeEventListener("pointercancel",S),t.style.touchAction=te,n!==null&&t.hasPointerCapture(n)&&t.releasePointerCapture(n)}}});function Fe(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 hi=m(()=>{"use strict"});function mi(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 fi=m(()=>{"use strict"});var pe,gi=m(()=>{"use strict";ui();hi();fi();pe=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=pi(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+Fe(l-s,r):s:l<n&&(l=a?n-Fe(n-l,r):n),this.deps.applySize(l),!this.keyboardDismissed&&this.currentPointerKind==="touch"&&this.deps.mode==="bottom"&&l<this.dragStartSize&&mi(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.detach)}forceClearDragState(){this.isDragging_&&(this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.element.style.willChange="")}}});var ue,bi=m(()=>{"use strict";ue=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 vi(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 yi=m(()=>{"use strict"});function Vn(t,e){let i={frames:null,duration:0,easing:he};if(t==="none")return i;if(t===void 0||typeof t=="string")return{frames:Si[t??"fade"][e],duration:_e,easing:he};let n=e==="enter"?t.enter:t.exit;return n?{frames:n,duration:t.duration??_e,easing:t.easing??he}:t.preset==="none"?i:{frames:Si[t.preset??"fade"][e],duration:t.duration??_e,easing:t.easing??he}}function I(t,e,i){if((typeof e=="object"?e.respectReducedMotion!==!1:!0)&&Yt())return Be;let{frames:s,duration:r,easing:a}=Vn(e,i);if(!s||r<=0||typeof t.animate!="function")return Be;let l=t.animate(s,{duration:r,easing:a,fill:"both"});return{finished:l.finished.then(()=>{}).catch(()=>{}),cancel:()=>{try{l.cancel()}catch{return}}}}var _e,he,Si,Be,Ne=m(()=>{"use strict";le();_e=200,he="cubic-bezier(0.22, 1, 0.36, 1)",Si={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)"}]}},Be={finished:Promise.resolve(),cancel:()=>{}}});function xi(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"):R(l,t.mode,r,e.inset??"16px"),e.fadeRange){let[b,f]=e.fadeRange,S=Math.max(f-b,1e-4);l.opacity=`clamp(0, calc((var(--bs-progress, 0) - ${b}) / ${S}), 1)`}n.appendChild(e.element),t.host.appendChild(n);let p=null,c=null,d=b=>typeof e.showOn=="function"?e.showOn(b):Array.isArray(e.showOn)?e.showOn.includes(b.activeId):a||b.size>0,u=(b,f)=>{if(b===p)return;if(p=b,c?.cancel(),c=null,n.style.pointerEvents=b&&s?"auto":"none",b){n.style.visibility="",f&&(c=I(e.element,e.animation,"enter"));return}if(!f){n.style.visibility="hidden";return}let S=I(e.element,e.animation,"exit");c=S,S.finished.then(()=>{c===S&&p===!1&&(n.style.visibility="hidden")})},h=b=>{t.isDestroyed()||u(d(t.getState()),b)},g=[t.on("snap",()=>h(!0)),t.on("open",()=>h(!0)),t.on("close",()=>h(!0))];return h(!1),{wrapper:n,detach:()=>{g.forEach(b=>b()),c?.cancel(),c=null,n.parentNode&&n.parentNode.removeChild(n)},syncZ:b=>{n.style.zIndex=String(b)}}}var Ti=m(()=>{"use strict";oe();Ne()});function Ei(t,e){let i=t.host.ownerDocument,n=e.stages.map(d=>{let u=i.createElement("div");u.className="bs-scrim-stage";let h=u.style;return h.position="absolute",R(h,t.mode,d.position??e.position??"center",d.inset??e.inset??"16px"),h.visibility="hidden",h.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=>Ai(u.def,d.activeId))??null:n.find(u=>Ai(u.def,d.activeId))??n.find(u=>Wn(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 h=I(d.def.element,d.def.animation??e.animation,"exit");d.inFlight=h,h.finished.then(()=>{d.inFlight===h&&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=I(d.def.element,d.def.animation??e.animation,"enter"))},p=d=>{if(t.isDestroyed())return;let u=r();if(u===s)return;let h=s;s=u,h&&a(h,d),u&&l(u,d)},c=[t.on("snap",()=>p(!0)),t.on("open",()=>p(!0)),t.on("close",()=>p(!0))];return n.some(d=>d.def.forRange)&&c.push(t.on("progress",()=>p(!0))),p(!1),()=>{c.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 Ai,Wn,wi=m(()=>{"use strict";oe();Ne();Ai=(t,e)=>t.for===void 0?!1:Array.isArray(t.for)?t.for.includes(e):t.for===e,Wn=(t,e)=>{if(!t.forRange)return!1;let[i,n]=t.forRange;return e>=i&&e<=n}});function Ci(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=Un(t.persistKey);s&&i.includes(s)&&(n=s)}return{mode:t.mode??"bottom",flickVelocity:t.flickVelocity??.65,dragThreshold:t.dragThreshold??18,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 Un,Mi=m(()=>{"use strict";Un=t=>{if(typeof window>"u"||typeof localStorage>"u")return null;try{return localStorage.getItem(t)}catch{return null}}});var D,Ke=m(()=>{"use strict";D=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 Yn,me,zi=m(()=>{"use strict";ut();ne();mt();gt();K();Et();B();wt();Mt();kt();It();Ot();Pt();Ft();Nt();ei();di();gi();bi();yi();Ti();wi();Mi();Ke();Ie();Yn=8,me=class{constructor(e){o(this,"id",Me("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,"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,"snapPointsRaw");o(this,"snaps");o(this,"activeId");o(this,"size",0);o(this,"gesture");o(this,"rootEl",null);o(this,"destroyed",!1);o(this,"currentViewTransition",null);o(this,"currentAbort",new AbortController);o(this,"sizeWriteSentinel",new E);o(this,"progressWriteSentinel",new E);o(this,"isTopSheet",!0);o(this,"opening",!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",ft());o(this,"persistKey");o(this,"linkedSheets",[]);o(this,"scrollCache");o(this,"teardowns",new D);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=Ci(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.transformTemplate=ht(this.mode),this.aria=new ue(this.handle,this.mode),this.flickVelocity=i.flickVelocity,this.dragThreshold=i.dragThreshold,this.rubberBandEnabled=i.rubberBandEnabled,this.scrim=new ae({mode:this.mode,screenComponent:this.screenComponent,backdrop:this.backdrop,isDestroyed:()=>this.destroyed,isTopSheet:()=>this.isTopSheet,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 de({element:this.element,getRootEl:()=>this.rootEl,applySize:r=>this.applySize(r),getSize:()=>this.size,isDragging:()=>this.gesture?.isDragging??!1,applyAux:r=>this.applySize(r,!0),getTransformFor:r=>this.transformTemplate(this.snaps.getMaxAxisSize()-r)},i.animation),this.lifecycle=new ce({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,ze(this.snapPointsRaw),this.auditDuplicateSnapIds(this.snapPointsRaw),this.rootEl=this.element.closest(".bs-root"),this.maxHeight=Dt({element:this.element,mode:this.mode,getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),setMaxAxisSize:r=>{this.snaps.setMaxAxisSize(r)},recompute:()=>this.recompute()}),this.fitDeps={element:this.element,scrollContainer:this.scrollContainer,mode:this.mode,getMaxHeightCap:()=>this.maxHeight.getCap()},this.snaps=new re(this.snapPointsRaw,i.initialAllowed,this.mode,()=>Lt(this.fitDeps),r=>{this.element.style[k(this.mode)]=`${r}px`});let s=this.snaps.findById(this.activeId);if(s&&(this.size=s.size),this.applySize(this.size),this.updateAriaSlider(),this.scrollCache=vi({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(Rt({handle:this.handle,scrollContainer:this.scrollContainer,hasFitSnap:()=>this.snapPointsRaw.some(r=>r.size==="fit"||r.size==="content"),isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,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.gesture?.isDragging??!1,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),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")&&y("[BottomSheet] closeOnBack/routedTo/closeOnRouteChange need routeFeature() \u2014 option ignored"),this.persistKey&&!e.has("persist")&&y("[BottomSheet] persistKey needs persistFeature() \u2014 snaps will not be saved")}get state(){return{size:this.size,activeId:this.activeId,isDragging:this.gesture?.isDragging??!1,isAnimating:this.animation.isAnimating,progress:this.computeProgress(this.size)}}on(e,i){return this.bus.on(e,i)}use(e){if(this.destroyed)return y(`[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){y(`[BottomSheet] unknown snap id: ${e}`);return}if(!this.snaps.getAllowedIds().includes(e)){y(`[BottomSheet] snap "${e}" is not in allowed list`);return}if(!n&&this.emitBeforeSnap(l,this.activeId))return;let p=this.newCycle(),c=()=>{this.animation.cancel(),this.newCycle()};a?.addEventListener("abort",c,{once:!0});let d=this.size===0,u=this.activeId,h=this.size;this.scrollCache.cache(u,h,l.size),this.activeId=e;let g=this.snapPointsRaw.find(f=>f.id===e)?.size;if(d&&!(e==="closed"||g===0)&&(this.opening=!0,w.promote(this.id)),this.animation.viewTransitionsAvailable){this.currentViewTransition?.skipTransition?.();let f=document.startViewTransition(()=>{this.applySize(l.size)});f.ready?.catch(()=>{}),this.currentViewTransition=f;try{await f.finished}catch{}this.currentViewTransition===f&&(this.currentViewTransition=null)}else await this.animation.animateTo(l.size,r);a?.removeEventListener("abort",c),!p.aborted&&(this.opening=!1,this.completeSnap(e,l.size,h,d,!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(),s&&i>0&&this.emitOpenSequence(e),i===0&&this.emitCloseSequence()}emitOpenSequence(e){this.emit("open",{id:e}),this.handleOpen(),Ct(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)}isTop(){return this.isTopSheet}depth(){return w.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=xi({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 y("[BottomSheet] setScrimStages: no scrim element mounted \u2014 pass `scrim` to the engine first."),()=>{};let n=Ei({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;this.animation.cancel(),this.newCycle(),this.snapPointsRaw=e,ze(e),this.auditDuplicateSnapIds(e),this.snaps.setRaw(e),i&&this.snaps.setAllowedIds(i),this.scrollCache.clear(),this.scrim.invalidateOpacityCache();let n=this.snaps.findById(this.activeId);n&&this.applySize(n.size),this.updateAriaSlider()}recompute(){this.destroyed||(this.maxHeight.resolveCap(),this.snaps.recompute(),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache(),!this.gesture?.isDragging&&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.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 ke(n=>this.emit("before-snap",n),{id:e.id,size:e.size,previousId:i},"before-snap")}emitBeforeClose(e){return ke(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=Me("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)&&y(`[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(w.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)}attach(){this.gesture=new pe({handle:this.handle,element:this.element,mode:this.mode,getRoot:()=>this.rootEl,getDragContext:()=>{let e=this.dragContextBuf,i=this.getAllowedRange();return e.size=this.size,e.maxAxisSize=this.snaps.getMaxAxisSize(),e.range.min=i.min,e.range.max=i.max,e.rubberBandEnabled=this.rubberBandEnabled,e},getDisableDrag:()=>this.disableDragFlag,cancelAnimation:()=>this.animation.cancel(),applySize:e=>this.applySize(e),animateTo:(e,i)=>this.animation.animateTo(e,i),settleAfterDrag:(e,i,n)=>this.settleAfterDrag(e,i,n),emit:(e,i)=>this.emit(e,i),listenerCount:e=>this.bus.listenerCount(e)}),this.teardowns.add(this.gesture.install());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(zt({element:this.element,getMode:()=>this.mode,isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,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.teardowns.add(Ht({handle:this.handle,mode:this.mode,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:e=>{this.snapTo(e)}})),this.scrim.attach()}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,p=this.snaps.findById(a)?.size;this.scrollCache.cache(a,l,r.size),this.activeId=r.id,p===0&&r.size>0&&(this.opening=!0,w.promote(this.id));let c=this.snaps.getMaxAxisSize(),d=c>0?Math.min(r.size,c):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,p===0,!0))})}clearWillChangeIfIdle(){this.animation.isAnimating||this.gesture?.isDragging||(this.element.style.willChange="")}haptic(){if(typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(Yn)}catch{}}applySize(e,i=!1){let n=this.snaps.getMaxAxisSize(),s=n>0&&e>n&&!this.gesture?.isDragging&&!this.allowOvershoot?n:e;this.size=s;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),p=this.progressWriteSentinel.shouldWrite(l,.005);p&&(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,p),p&&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(){w.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.lifecycle.release(),w.update()}}});function ki(){if(L>0){L-=1;let n=Ve.shift();n&&n(),O();return}if(T.length===0){We(),O();return}let t=null,e=-1;for(let n=T.length-1;n>=0;n-=1){let s=T[n];if(s.surface.isOpen()&&(t||(t=s,e=n),s.surface.isTop())){t=s,e=n;break}}if(!t){let n=T.pop();n&&(n.live=!1),O();return}t.live=!1,T.splice(e,1);let i=t;Promise.resolve(i.surface.close()).then(()=>{i.surface.isOpen()&&Gn(i)}),O()}function Gn(t){!P()||!$()||(t.live=!0,Se(()=>{try{history.pushState(Ue(t.surface),"",t.surface.url)}catch{t.live=!1}}),t.live&&(T.push(t),Ye()))}function Ri(t){let e={surface:t,priorUrl:void 0,live:!1};return!P()||!$()||(e.priorUrl=t.url!==void 0?location.href:void 0,Se(()=>{try{history.pushState(Ue(t),"",t.url),e.live=!0}catch{e.live=!1}}),e.live&&(T.push(e),Ye())),e}function $e(t){if(!P()||!$())return;let e=t,i=T.indexOf(e);if(i===-1||!e.live)return;let n=T.length-1;e.live=!1,T.splice(i,1);let s=null;if(i!==n){let r=T[T.length-1].surface,a=e.priorUrl;s=()=>{Se(()=>{history.replaceState(Ue(r),"",a!==void 0?a:location.href)})}}Ve.push(s),L+=1,Se(()=>{try{history.back()}catch{L=Math.max(0,L-1),Ve.pop()}}),O()}function Ii(t){return!P()||!$()?()=>{}:(C.add(t),C.size===1&&$n(),Ye(),()=>{C.has(t)&&(C.delete(t),C.size===0&&qn(),O())})}var T,C,L,fe,Ve,ge,be,U,Y,ve,ye,P,$,Ue,Se,We,Ye,O,$n,qn,Di=m(()=>{"use strict";T=[],C=new Set,L=0,fe=0,Ve=[],ge=!1,be=!1,U=null,Y=null,ve=null,ye=null,P=()=>typeof window<"u",$=()=>typeof history<"u",Ue=t=>({...t.markerState(),__bs:!0}),Se=t=>{fe+=1;try{t()}finally{fe-=1}},We=()=>{let t=Array.from(C);for(let e of t)e()},Ye=()=>{ge||!P()||(window.addEventListener("popstate",ki),ge=!0)},O=()=>{ge&&(T.length>0||C.size>0||L>0||(P()&&window.removeEventListener("popstate",ki),ge=!1))},$n=()=>{be||!$()||(U=history.pushState,Y=history.replaceState,ve=function(...t){U.apply(this,t),fe===0&&We()},ye=function(...t){Y.apply(this,t),fe===0&&We()},history.pushState=ve,history.replaceState=ye,be=!0)},qn=()=>{be&&(history.pushState===ve&&U&&(history.pushState=U),history.replaceState===ye&&Y&&(history.replaceState=Y),U=null,Y=null,ve=null,ye=null,be=!1)}});function Oi(t){if(typeof window>"u")return()=>{};if(!t.routedTo&&!t.closeOnBack)return()=>{};let e=null,i=()=>{e||(e=Ri({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&&($e(e),e=null)},s=t.on("open",i),r=t.on("close",n);return t.getSize()>0&&i(),()=>{s(),r(),e&&($e(e),e=null)}}function Li(t){return Ii(()=>{t.isDestroyed()||t.getSize()<=0||t.close()})}var Pi=m(()=>{"use strict";Di()});function Hi(t,e){return t.on("snap",({id:n})=>{if(!(typeof window>"u")&&!(typeof localStorage>"u"))try{localStorage.setItem(e,n)}catch{}})}var Fi=m(()=>{"use strict"});function _i(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 p=null;for(let c of t.getAllowedIds()){let d=t.resolveSnap(c);!d||d.size<=0||(!p||d.size<p.size)&&(p=d)}p&&(p.id===l.id||p.size>=l.size||t.snapTo(p.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 Bi=m(()=>{"use strict"});function Ni(t){let{container:e}=t,i=0,n=0,s=!1,r=p=>{let c=p.touches[0];c&&(i=c.clientY,n=e.scrollTop,s=!1)},a=p=>{let c=p.touches[0];c&&Math.abs(c.clientY-i)>60&&(s=!0)},l=p=>{if(!s||t.isDragging()||t.isAnimating()||e.scrollTop!==n)return;let c=p.changedTouches[0];if(!c)return;let d=c.clientY-i,u=e.scrollTop<=0,h=t.getAllowedIds(),g=h.indexOf(t.getActiveId());g!==-1&&(u&&d>60&&g>0?t.snapTo(h[g-1]):d<-60&&g<h.length-1&&t.snapTo(h[g+1]))};return e.addEventListener("touchstart",r,{passive:!0}),e.addEventListener("touchmove",a,{passive:!0}),e.addEventListener("touchend",l,{passive:!0}),()=>{e.removeEventListener("touchstart",r),e.removeEventListener("touchmove",a),e.removeEventListener("touchend",l)}}var Ki=m(()=>{"use strict"});function Vi(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 p=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let c=t.getMaxAxisSize();t.setSize(Math.min(t.getSize(),c));let d=t.resolveActiveSnap();d&&!t.isDragging()?(t.applySize(Math.min(d.size,c)),p&&t.resyncAfterCancel?.()):t.applySize(t.getSize())}))};return e.addEventListener("resize",n),()=>{e.removeEventListener("resize",n),i!==null&&cancelAnimationFrame(i)}}var Wi=m(()=>{"use strict"});function Ui(){return{name:"route",install:t=>{let e=new D;return t.options.closeOnRouteChange&&e.add(Li({isDestroyed:t.isDestroyed,getSize:t.getSize,close:()=>t.close()})),e.add(Oi({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 Yi(){return{name:"persist",install:t=>{let e=t.options.persistKey;if(e)return Hi({on:t.on},e)}}}function $i(){return{name:"auto-collapse",install:t=>_i({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 qi(){return{name:"content-swipe",stage:"attach",install:t=>{if(t.scrollContainer)return Ni({container:t.scrollContainer,isDragging:t.isDragging,isAnimating:t.isAnimating,getAllowedIds:t.allowedIdsBySize,getActiveId:t.getActiveId,snapTo:t.snapTo})}}}function Gi(){return{name:"visual-viewport",install:t=>{if(!(typeof window>"u"))return Vi({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 Zi=m(()=>{"use strict";Pi();Fi();Bi();Ki();Wi();Ke()});function ji(){return[qi(),Gi(),Yi(),$i(),Ui()]}var Xi=m(()=>{"use strict";Zi()});var xe,Qi=m(()=>{"use strict";zi();Xi();xe=class extends me{constructor(e){super({...e,features:[...ji(),...e.features??[]]})}}});var Ji,en=m(()=>{"use strict";Ji=':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));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-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,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,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,0.12)}.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 Te,tn,nn,sn=m(()=>{"use strict";Te=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=Te(t);i.appendChild(n);let s=()=>{i.hidden=n.assignedNodes({flatten:!0}).length===0};return n.addEventListener("slotchange",s),s(),i},nn=()=>{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(Te("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(Te("leftButton"));let r=document.createElement("div");r.className="bs-button-slot",r.setAttribute("data-side","right"),r.setAttribute("part","right-button"),r.appendChild(Te("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"),p=document.createElement("div");p.className="bs-content",p.setAttribute("part","content"),p.setAttribute("tabindex","0"),p.setAttribute("role","region"),p.setAttribute("aria-label","Sheet content");let c=document.createElement("slot");p.appendChild(c);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,p,d),t.append(e,i,n,s,r,u);let h=document.createDocumentFragment();return h.appendChild(t),{fragment:h,refs:{sheet:n,handle:a,header:l,content:p,footer:d,backdrop:e,screen:i,leftButton:s,rightButton:r,announcer:u}}}});var qe,Ge,Ze,je,Xe,on,Qe,Je,et,tt,it,nt,q,G,Z,st,j,X,rt,Q,J,M,an,ln,Zn,rn,dn,jn,Xn,cn,pn,Ae,ee,Qn,Jn,un,hn=m(()=>{"use strict";qe="snap-points",Ge="allowed",Ze="initial",je="mode",Xe="backdrop",on="stylesheet",Qe="animation",Je="focus-trap",et="close-on-escape",tt="lock-body-scroll",it="sheet-label",nt="stack-effect",q="persistent",G="disable-close",Z="disable-drag",st="close-on-route-change",j="radius",X="max-height",rt="return-focus-to",Q="backdrop-color",J="scrim-color",M="snap",an=new Set([j,X,Q,J,M,q,G,Z]),ln=[qe,Ge,Ze,je,Xe,Qe,Je,et,tt,it,nt,q,G,Z,st,j,X,rt,Q,J,M],Zn=t=>!!t&&typeof t=="object"&&typeof t.id=="string"&&(typeof t.size=="number"||typeof t.size=="string"),rn=[{id:"full",size:"full"}],dn=t=>{if(!t)return rn;try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&e.every(Zn))return e;if(Array.isArray(e))return rn}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}})},jn=["bottom","top","left","right"],Xn=["spring","tween","ios-spring","material-bounce","linear","snappy"],cn=t=>t&&jn.includes(t)?t:"bottom",pn=t=>t&&Xn.includes(t)?t:void 0,Ae=t=>t?t.split(",").map(e=>e.trim()).filter(Boolean):void 0,ee=t=>{if(t===null)return;let e=Number(t);return Number.isFinite(e)&&t.trim()!==""?e:t},Qn=["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"],Jn=["fade","scale","slide","pop","none"],un=t=>{let e=t.getAttribute("data-position"),i=t.getAttribute("data-animation"),n=Ae(t.getAttribute("data-show-on")),s=Ae(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&&Qn.includes(e)?e:void 0,inset:t.getAttribute("data-inset")??void 0,showOn:n,fadeRange:r,interactive:t.getAttribute("data-interactive")!=="false",animation:i&&Jn.includes(i)?i:void 0}}});var mn={};pt(mn,{BottomSheetElement:()=>H,defineBottomSheet:()=>ot});var es,H,ot,at=m(()=>{"use strict";Qi();en();sn();hn();es=typeof HTMLElement<"u"?HTMLElement:class{},H=class extends es{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=Ji,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}=
|
|
1
|
+
"use strict";var surdeddd_bottomSheet=(()=>{var de=Object.defineProperty;var Pn=Object.getOwnPropertyDescriptor;var Fn=Object.getOwnPropertyNames;var Hn=Object.prototype.hasOwnProperty;var _n=(t,e,i)=>e in t?de(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var m=(t,e)=>()=>(t&&(e=t(t=0)),e);var Mt=(t,e)=>{for(var i in e)de(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&&de(t,s,{get:()=>e[s],enumerable:!(n=Pn(e,s))||n.enumerable});return t};var Nn=t=>Bn(de({},"__esModule",{value:!0}),t);var o=(t,e,i)=>_n(t,typeof e!="symbol"?e+"":e,i);var Ie,C,zt=m(()=>{"use strict";Ie=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 Ie});function Le(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,ce=m(()=>{"use strict";M=t=>t==="left"||t==="right"?"width":"height"});function Fe(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${t}-${crypto.randomUUID()}`:(Pe[t]=(Pe[t]??0)+1,`${t}-${Pe[t]}`)}var Pe,Rt=m(()=>{"use strict";Pe={}});function Dt(){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 kt=m(()=>{"use strict"});var x,Ot,Kn,Lt,It,Vn,he,Pt=m(()=>{"use strict";x=null,Ot="data-bs-probe",Kn=t=>{if(typeof document>"u")return null;if(!x||!x.isConnected){let e=document.querySelector(`[${Ot}]`);e?x=e:(x=document.createElement("div"),x.setAttribute("aria-hidden","true"),x.setAttribute(Ot,""),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},Lt=t=>t==="bottom"||t==="top",It=t=>typeof window>"u"?0:Lt(t)?window.innerHeight:window.innerWidth,Vn=/^(-?\d+(?:\.\d+)?)%$/,he=(t,e,i)=>{if(typeof t=="number")return Math.max(0,t);if(t==="full")return It(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,It(e)*a)}let s=Lt(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 y(...t){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.warn(...t)}var V=m(()=>{"use strict"});var Ft,Gn,He,Wn,Ht,G,Un,$n,qn,_t,W=m(()=>{"use strict";Pt();V();Ft=(t,e,i)=>t.map(n=>{let s=he(n.size,e,i);return!Number.isFinite(s)||s<0?(y(`[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,He=t=>{for(let e of t)typeof e.size=="string"&&Gn.test(e.size)&&y(`[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},Ht=(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,_t=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 _e(t,e,i){let n=!1,s=!1;return t({...e,cancel:()=>{if(s){y(`[BottomSheet] ${i}.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.`);return}n=!0}}),s=!0,n}var Bt=m(()=>{"use strict";V()});var ue,Nt=m(()=>{"use strict";W();ue=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=Ft(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 _t({...e,resolved:this.resolved,allowed:this.allowedIds,maxAxisSize:this.maxAxisSize})}getAllowedRange(){return this.rangeCache??(this.rangeCache=Ht(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 Kt(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 Vt=m(()=>{"use strict"});function Gt(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 Wt=m(()=>{"use strict"});function Ut(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,$t=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 qt(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=he(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 Yt=m(()=>{"use strict";W();ce()});var Zn,Xn,Zt,Xt=m(()=>{"use strict";ce();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},Zt=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 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 Qt=m(()=>{"use strict"});var Be,Jt=m(()=>{"use strict";Be=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,Ne=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 pe=m(()=>{"use strict"});var Jn,es,me,ti=m(()=>{"use strict";Jt();W();Ne();V();pe();Jn=/^-?\d+(?:\.\d+)?(?:px|em|rem|%)$/,es="rgba(0, 0, 0, 0.4)",me=class{constructor(e,i){o(this,"screenComponent");o(this,"backdrop");o(this,"mode");o(this,"isDestroyed");o(this,"isTopSheet");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.isTopSheet=e.isTopSheet,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?Be[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&&this.isTopSheet()){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=Be[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&&y(`[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&&y("[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 y("[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 ii,ts,ni,si,ri,oi,fe=m(()=>{"use strict";ii=t=>1+2.40158*Math.pow(t-1,3)+1.40158*Math.pow(t-1,2),ts=t=>1-Math.pow(1-t,3),ni=t=>t,si=t=>1-Math.pow(1-t,5),ri=({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}},oi=()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches});var Ke,is,ai,Ve=m(()=>{"use strict";Ke={stiffness:220,damping:26,mass:1,restDelta:.5,restSpeed:.5},is=1/30,ai=({from:t,to:e,velocity:i=0,config:n,onUpdate:s})=>{let r={...Ke,...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 S=Math.min((f-u)/1e3,is);u=f;let B=Math.max(1,Math.ceil(S*240)),D=S/B,ae=B;for(;ae-- >0;){let le=(-r.stiffness*(h-e)-r.damping*d)/r.mass;d+=le*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 li(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:ni};case"snappy":return{kind:"tween",duration:180,easing:si};case"tween":return{kind:"tween"};default:return{kind:"spring"}}}var ns,di=m(()=>{"use strict";fe();ns=220});function hi(t,e,i,n){let s={...Ke,...n},r=1/Ge,a=ci/Ge*1e3,l=Math.ceil(ss/1e3*Ge),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%ci===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 ui(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 Ge,ci,ss,pi=m(()=>{"use strict";Ve();Ge=240,ci=4,ss=3e3});var rs,mi,ge,fi=m(()=>{"use strict";fe();Ve();di();pi();rs=220,mi=1e3,ge=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=li(i.animation);this.animationKind=n.kind,this.duration=i.duration??n.duration??rs,this.easing=i.easing??n.easing??ii,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}cancel(){if(this.currentTween?.cancel(),this.currentSpring?.cancel(),this.currentWaapi){let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}}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.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"?hi(this.getSize(),e,i*mi,this.springConfig):ui(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=ai({from:this.getSize(),to:e,velocity:i*mi,config:this.springConfig,onUpdate:s=>this.applySizeFn(s)});this.currentSpring=n,await n.promise,this.currentSpring===n&&(this.currentSpring=null)}else{let n=ri({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 gi,os,bi,We,as,U,vi,yi=m(()=>{"use strict";gi=["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,bi=t=>{let e=Array.from(t.querySelectorAll(gi));if(typeof HTMLSlotElement<"u")for(let i of Array.from(t.querySelectorAll("slot")))for(let n of i.assignedElements())n.matches(gi)&&e.push(n),e.push(...bi(n));return e},We=t=>bi(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=[],vi=(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??We(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=We(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)&&We(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,Si,xi=m(()=>{"use strict";$=0,T=null,Si=()=>{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 Ai(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 Ti=m(()=>{"use strict"});var be,Ei=m(()=>{"use strict";yi();xi();Ti();be=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=Ai(()=>this.element)}get isInstalled(){return this.installed}install(){this.destroyed||(this.installed=!0,this.bodyScrollLockEnabled&&!this.releaseScrollLock&&(this.releaseScrollLock=Si()),this.focusTrapEnabled&&!this.releaseFocusTrap&&(this.releaseFocusTrap=vi(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 wi,Ue,Ci,Mi=m(()=>{"use strict";wi=t=>t==="bottom"||t==="top",Ue=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}},Ci=(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 Ue(u),v=wi(e)?"Y":"X",g=e==="bottom"||e==="right"?-1:1,f=b=>v==="Y"?b.clientY:b.clientX,S=b=>v==="Y"?b.clientX:b.clientY,B=b=>{try{t.setPointerCapture(b)}catch{}},D=()=>{s=null,h=!1,p.reset()},ae=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=S(b),c=a,p.reset(),p.push(b.timeStamp,a),n.deferStart){h=!0;return}B(b.pointerId),i.onStart(a,r)}},De=b=>{if(b.pointerId!==s)return;let E=f(b),N=(E-a)*g;if(h){let K=n.deferStart(b,N,S(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 Oe=b.timeStamp-d(r);p.pruneBefore(Oe,2),i.onMove(N)},ke=b=>{if(b.pointerId!==s)return;if(h){D();return}let Et=(c-a)*g,N=0;if(p.length>=3){let K=p.oldest(),wt=p.newest(),Ct=wt.t-K.t;Ct>0&&(N=(wt.v-K.v)/Ct*g)}let Oe=r;s=null,p.reset();try{t.hasPointerCapture(b.pointerId)&&t.releasePointerCapture(b.pointerId)}catch{}i.onEnd(Et,N,Oe)},le=b=>{if(b.pointerId!==s)return;let E=h;D(),!E&&i.onCancel?.()};t.addEventListener("pointerdown",ae),t.addEventListener("pointermove",De),t.addEventListener("pointerup",ke),t.addEventListener("pointercancel",le);let Tt=n.manageTouchAction!==!1,Ln=t.style.touchAction;return Tt&&(t.style.touchAction=wi(e)?"pan-x":"pan-y"),()=>{t.removeEventListener("pointerdown",ae),t.removeEventListener("pointermove",De),t.removeEventListener("pointerup",ke),t.removeEventListener("pointercancel",le),Tt&&(t.style.touchAction=Ln),s!==null&&t.hasPointerCapture(s)&&t.releasePointerCapture(s)}}});function $e(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 zi=m(()=>{"use strict"});function Ri(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 Di=m(()=>{"use strict"});var q,ki=m(()=>{"use strict";Mi();zi();Di();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=Ci(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+$e(l-s,r):s:l<n&&(l=a?n-$e(n-l,r):n),this.deps.applySize(l),!this.keyboardDismissed&&this.currentPointerKind==="touch"&&this.deps.mode==="bottom"&&l<this.dragStartSize&&Ri(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 Ze(t,e){let i=ls(t);return i?i.closest(Ye)?!1:e==="zones"?i.closest(qe)!==null:!0:e!=="zones"}var qe,Ye,ls,Oi=m(()=>{"use strict";qe="[data-bs-drag]",Ye="[data-bs-no-drag]",ls=t=>{let e=t;return e&&typeof e.closest=="function"?e:null}});function Ii(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 Li=m(()=>{"use strict"});var ds,cs,ve,Xe=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"},ve=(t,e)=>{if(!ds(t))return t;let i=cs(e)==="rtl";return t==="start"?i?"right":"left":i?"left":"right"}});function je(t,e){let i=n=>{e()&&n.cancelable&&n.preventDefault()};return t.addEventListener("touchmove",i,{passive:!1}),()=>t.removeEventListener("touchmove",i)}var Pi=m(()=>{"use strict"});var Y,Fi=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 Hi(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 _i=m(()=>{"use strict"});function hs(t,e){let i={frames:null,duration:0,easing:ye};if(t==="none")return i;if(t===void 0||typeof t=="string")return{frames:Bi[t??"fade"][e],duration:Qe,easing:ye};let n=e==="enter"?t.enter:t.exit;return n?{frames:n,duration:t.duration??Qe,easing:t.easing??ye}:t.preset==="none"?i:{frames:Bi[t.preset??"fade"][e],duration:t.duration??Qe,easing:t.easing??ye}}function O(t,e,i){if((typeof e=="object"?e.respectReducedMotion!==!1:!0)&&oi())return Je;let{frames:s,duration:r,easing:a}=hs(e,i);if(!s||r<=0||typeof t.animate!="function")return Je;let l=t.animate(s,{duration:r,easing:a,fill:"both"});return{finished:l.finished.then(()=>{}).catch(()=>{}),cancel:()=>{try{l.cancel()}catch{return}}}}var Qe,ye,Bi,Je,et=m(()=>{"use strict";fe();Qe=200,ye="cubic-bezier(0.22, 1, 0.36, 1)",Bi={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)"}]}},Je={finished:Promise.resolve(),cancel:()=>{}}});function Ni(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,S=Math.max(f-g,1e-4);l.opacity=`clamp(0, calc((var(--bs-progress, 0) - ${g}) / ${S}), 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 S=O(e.element,e.animation,"exit");h=S,S.finished.then(()=>{h===S&&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 Ki=m(()=>{"use strict";pe();et()});function Gi(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=>Vi(u.def,d.activeId))??null:n.find(u=>Vi(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 Vi,us,Wi=m(()=>{"use strict";pe();et();Vi=(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 Ui(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:ve(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,$i=m(()=>{"use strict";Xe();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,tt=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,Se,qi=m(()=>{"use strict";zt();ce();Rt();kt();W();Bt();V();Nt();Vt();Wt();$t();Yt();Xt();Qt();ti();fi();Ei();ki();Oi();Li();Xe();Pi();Fi();_i();Ki();Wi();$i();tt();Ne();gs=8,Se=class{constructor(e){o(this,"id",Fe("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,"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",Dt());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=Ui(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=Le(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 me({mode:this.mode,screenComponent:this.screenComponent,backdrop:this.backdrop,isDestroyed:()=>this.destroyed,isTopSheet:()=>this.isTopSheet,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 ge({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 be({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,He(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=qt(this.maxHeightDeps),this.fitDeps={element:this.element,scrollContainer:this.scrollContainer,mode:this.mode,getMaxHeightCap:()=>this.maxHeight.getCap()},this.snaps=new ue(this.snapPointsRaw,i.initialAllowed,this.mode,()=>Zt(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=Hi({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(Ut({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")&&y("[BottomSheet] closeOnBack/routedTo/closeOnRouteChange need routeFeature() \u2014 option ignored"),this.persistKey&&!e.has("persist")&&y("[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 y(`[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){y(`[BottomSheet] unknown snap id: ${e}`);return}if(!this.snaps.getAllowedIds().includes(e)){y(`[BottomSheet] snap "${e}" is not in allowed list`);return}if(!n&&this.emitBeforeSnap(l,this.activeId))return;let c=this.newCycle(),h=()=>{this.animation.cancel(),this.newCycle()};a?.addEventListener("abort",h,{once:!0});let d=this.size===0,u=this.activeId,p=this.size;this.scrollCache.cache(u,p,l.size),this.activeId=e;let v=this.snapPointsRaw.find(f=>f.id===e)?.size;if(d&&!(e==="closed"||v===0)&&(this.opening=!0,C.promote(this.id)),this.animation.viewTransitionsAvailable){this.currentViewTransition?.skipTransition?.();let f=document.startViewTransition(()=>{this.applySize(l.size)});f.ready?.catch(()=>{}),this.currentViewTransition=f;try{await f.finished}catch{}this.currentViewTransition===f&&(this.currentViewTransition=null)}else await this.animation.animateTo(l.size,r);a?.removeEventListener("abort",h),!c.aborted&&(this.opening=!1,this.completeSnap(e,l.size,p,d,!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(),Kt(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=ve(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=Le(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=Ni({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 y("[BottomSheet] setScrimStages: no scrim element mounted \u2014 pass `scrim` to the engine first."),()=>{};let n=Gi({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,He(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 _e(n=>this.emit("before-snap",n),{id:e.id,size:e.size,previousId:i},"before-snap")}emitBeforeClose(e){return _e(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=Fe("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)&&y(`[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()||!Ze(i.target,"sheet"))return!1;let r=Ii({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=je(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(Ye)?!1:this.handle!==this.element&&n&&this.handle.contains(i)?!0:Ze(e.target,this.dragFromMode)?this.dragFromMode==="handle"?!0:!(this.scrollContainer&&n&&this.scrollContainer.contains(i)&&!i.closest(qe)):!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:je(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(Gt({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,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(){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.lifecycle.release(),C.update()}}});function Yi(){if(P>0){P-=1;let n=it.shift();n&&n(),L();return}if(A.length===0){nt(),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,Ce(()=>{try{history.pushState(st(t.surface),"",t.surface.url)}catch{t.live=!1}}),t.live&&(A.push(t),rt()))}function Zi(t){let e={surface:t,priorUrl:void 0,live:!1};return!F()||!j()||(e.priorUrl=t.url!==void 0?location.href:void 0,Ce(()=>{try{history.pushState(st(t),"",t.url),e.live=!0}catch{e.live=!1}}),e.live&&(A.push(e),rt())),e}function ot(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=()=>{Ce(()=>{history.replaceState(st(r),"",a!==void 0?a:location.href)})}}it.push(s),P+=1,Ce(()=>{try{history.back()}catch{P=Math.max(0,P-1),it.pop()}}),L()}function Xi(t){return!F()||!j()?()=>{}:(z.add(t),z.size===1&&bs(),rt(),()=>{z.has(t)&&(z.delete(t),z.size===0&&vs(),L())})}var A,z,P,xe,it,Ae,Te,Z,X,Ee,we,F,j,st,Ce,nt,rt,L,bs,vs,ji=m(()=>{"use strict";A=[],z=new Set,P=0,xe=0,it=[],Ae=!1,Te=!1,Z=null,X=null,Ee=null,we=null,F=()=>typeof window<"u",j=()=>typeof history<"u",st=t=>({...t.markerState(),__bs:!0}),Ce=t=>{xe+=1;try{t()}finally{xe-=1}},nt=()=>{let t=Array.from(z);for(let e of t)e()},rt=()=>{Ae||!F()||(window.addEventListener("popstate",Yi),Ae=!0)},L=()=>{Ae&&(A.length>0||z.size>0||P>0||(F()&&window.removeEventListener("popstate",Yi),Ae=!1))},bs=()=>{Te||!j()||(Z=history.pushState,X=history.replaceState,Ee=function(...t){Z.apply(this,t),xe===0&&nt()},we=function(...t){X.apply(this,t),xe===0&&nt()},history.pushState=Ee,history.replaceState=we,Te=!0)},vs=()=>{Te&&(history.pushState===Ee&&Z&&(history.pushState=Z),history.replaceState===we&&X&&(history.replaceState=X),Z=null,X=null,Ee=null,we=null,Te=!1)}});function Qi(t){if(typeof window>"u")return()=>{};if(!t.routedTo&&!t.closeOnBack)return()=>{};let e=null,i=()=>{e||(e=Zi({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&&(ot(e),e=null)},s=t.on("open",i),r=t.on("close",n);return t.getSize()>0&&i(),()=>{s(),r(),e&&(ot(e),e=null)}}function Ji(t){return Xi(()=>{t.isDestroyed()||t.getSize()<=0||t.close()})}var en=m(()=>{"use strict";ji()});function tn(t,e){return t.on("snap",({id:n})=>{if(!(typeof window>"u")&&!(typeof localStorage>"u"))try{localStorage.setItem(e,n)}catch{}})}var nn=m(()=>{"use strict"});function sn(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 rn=m(()=>{"use strict"});function on(t){let e=t.attachDragSurface(t.container,"content");return()=>e?.()}var an=m(()=>{"use strict"});function ln(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 dn=m(()=>{"use strict"});function cn(){return{name:"route",install:t=>{let e=new I;return t.options.closeOnRouteChange&&e.add(Ji({isDestroyed:t.isDestroyed,getSize:t.getSize,close:()=>t.close()})),e.add(Qi({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 hn(){return{name:"persist",install:t=>{let e=t.options.persistKey;if(e)return tn({on:t.on},e)}}}function un(){return{name:"auto-collapse",install:t=>sn({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 pn(){return{name:"content-swipe",stage:"attach",install:t=>{if(t.scrollContainer)return on({container:t.scrollContainer,attachDragSurface:t.attachDragSurface})}}}function mn(){return{name:"visual-viewport",install:t=>{if(!(typeof window>"u"))return ln({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 fn=m(()=>{"use strict";en();nn();rn();an();dn();tt()});function gn(){return[pn(),mn(),hn(),un(),cn()]}var bn=m(()=>{"use strict";fn()});var Me,vn=m(()=>{"use strict";qi();bn();Me=class extends Se{constructor(e){super({...e,features:[...gn(),...e.features??[]]})}}});var yn,Sn=m(()=>{"use strict";yn=':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 ze,xn,An,Tn=m(()=>{"use strict";ze=t=>{let e=document.createElement("slot");return e.name=t,e},xn=(t,e)=>{let i=document.createElement("div");i.className=e,i.setAttribute("part",t);let n=ze(t);i.appendChild(n);let s=()=>{i.hidden=n.assignedNodes({flatten:!0}).length===0};return n.addEventListener("slotchange",s),s(),i},An=()=>{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(ze("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(ze("leftButton"));let r=document.createElement("div");r.className="bs-button-slot",r.setAttribute("data-side","right"),r.setAttribute("part","right-button"),r.appendChild(ze("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=xn("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=xn("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 at,lt,dt,ct,ht,wn,ut,pt,mt,ft,gt,bt,Q,J,ee,te,H,vt,ie,ne,yt,se,re,R,Cn,Mn,Ss,En,zn,xs,As,Rn,Dn,Ts,St,Re,oe,Es,ws,kn,On=m(()=>{"use strict";at="snap-points",lt="allowed",dt="initial",ct="mode",ht="backdrop",wn="stylesheet",ut="animation",pt="focus-trap",mt="close-on-escape",ft="lock-body-scroll",gt="sheet-label",bt="stack-effect",Q="persistent",J="disable-close",ee="disable-drag",te="drag-from",H="drag-from-content",vt="close-on-route-change",ie="radius",ne="max-height",yt="return-focus-to",se="backdrop-color",re="scrim-color",R="snap",Cn=new Set([ie,ne,se,re,R,Q,J,ee,te,H]),Mn=[at,lt,dt,ct,ht,ut,pt,mt,ft,gt,bt,Q,J,ee,te,H,vt,ie,ne,yt,se,re,R],Ss=t=>!!t&&typeof t=="object"&&typeof t.id=="string"&&(typeof t.size=="number"||typeof t.size=="string"),En=[{id:"full",size:"full"}],zn=t=>{if(!t)return En;try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&e.every(Ss))return e;if(Array.isArray(e))return En}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"],Rn=t=>t&&xs.includes(t)?t:"bottom",Dn=t=>t&&As.includes(t)?t:void 0,Ts=["handle","sheet","zones"],St=t=>t&&Ts.includes(t)?t:void 0,Re=t=>t?t.split(",").map(e=>e.trim()).filter(Boolean):void 0,oe=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=Re(t.getAttribute("data-show-on")),s=Re(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={};Mt(In,{BottomSheetElement:()=>_,defineBottomSheet:()=>xt});var Cs,_,xt,At=m(()=>{"use strict";vn();Sn();Tn();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=yn,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}=An();this.refs=r,this.root.appendChild(s)}static get observedAttributes(){return Mn.slice()}connectedCallback(){if(!this.stylesheetLinked){this.stylesheetLinked=!0;let i=this.getAttribute(wn);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(Cn.has(i)){this.applyLiveAttribute(i,s);return}this.teardownEngine(),this.initEngine()}}applyLiveAttribute(i,n){if(this.engine)switch(i){case ie:{let s=oe(n);s!==void 0&&this.engine.setRadius(s);break}case ne:{let s=oe(n);s!==void 0&&this.engine.setMaxHeight(s);break}case se:case re:this.engine.setScrimColor(n);break;case Q:this.engine.setPersistent(n==="true");break;case J:this.engine.setDisableClose(n==="true");break;case ee:this.engine.setDisableDrag(n==="true");break;case H:this.engine.setDragFromContent(n!=="false");break;case te:{let s=St(n);s&&this.engine.setDragFrom(s);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=Rn(this.getAttribute(ct));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=zn(this.getAttribute(at)),u=this.getAttribute(dt)??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:Re(this.getAttribute(lt)),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(Q)==="true",disableClose:this.getAttribute(J)==="true",disableDrag:this.getAttribute(ee)==="true",dragFrom:St(this.getAttribute(te)),dragFromContent:this.getAttribute(H)===null?void 0:this.getAttribute(H)!=="false",closeOnRouteChange:this.getAttribute(vt)==="true",radius:oe(this.getAttribute(ie)),maxHeight:oe(this.getAttribute(ne)),returnFocusTo:this.getAttribute(yt)??void 0};this.engine=new Me(v),i.setAttribute("data-active",this.engine.state.activeId);let g=this.getAttribute(re)??this.getAttribute(se);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)}},xt=(t="bottom-sheet")=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,class extends _{})}});var Ms={};Mt(Ms,{BottomSheetElement:()=>_,defineBottomSheet:()=>xt});At();typeof window<"u"&&typeof customElements<"u"&&Promise.resolve().then(()=>(At(),In)).then(({defineBottomSheet:t})=>{t()});return Nn(Ms);})();
|
|
3
3
|
//# sourceMappingURL=element.iife.global.js.map
|