@visitscotland/component-library
Version:
VisitScotland Component Library
1 lines • 298 kB
JavaScript
"use strict";const n=require("vue"),Cd=require("pinia"),Ct=(r,o)=>{const a=r.__vccOpts||r;for(const[l,s]of o)a[l]=s;return a};var I0={},z0=Object.defineProperty,M0=(r,o,a)=>o in r?z0(r,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[o]=a,Yt=(r,o,a)=>(M0(r,typeof o!="symbol"?o+"":o,a),a);const kd=r=>n.computed(()=>{const o=n.toValue(r);return o?`justify-content-${o}`:""}),Ma=(r,o)=>n.computed(()=>{const a=n.toValue(r),l=n.toValue(o);return a===!0?"true":typeof a=="string"?a:l===!1?"true":a===!1?"false":void 0});class Ar{constructor(o,a={}){if(Yt(this,"cancelable",!0),Yt(this,"componentId",null),Yt(this,"_defaultPrevented",!1),Yt(this,"eventType",""),Yt(this,"nativeEvent",null),Yt(this,"_preventDefault"),Yt(this,"relatedTarget",null),Yt(this,"target",null),!o)throw new TypeError(`Failed to construct '${this.constructor.name}'. 1 argument required, ${arguments.length} given.`);Object.assign(this,Ar.Defaults,a,{eventType:o}),this._preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)}}get defaultPrevented(){return this._defaultPrevented}set defaultPrevented(o){this._defaultPrevented=o}get preventDefault(){return this._preventDefault}set preventDefault(o){this._preventDefault=o}static get Defaults(){return{cancelable:!0,componentId:null,eventType:"",nativeEvent:null,relatedTarget:null,target:null}}}class Ha extends Ar{constructor(o,a={}){super(o,a),Yt(this,"trigger",null),Object.assign(this,Ar.Defaults,a,{eventType:o})}static get Defaults(){return{...super.Defaults,trigger:null}}}const H0=(r,o={})=>{const a=(s=[])=>{const{activeElement:u}=document;return u&&!s.some(c=>c===u)?u:null},l=s=>s===a();try{r.focus(o)}catch(s){console.error(s)}return l(r)},It=r=>((r==null?void 0:r())??[]).length===0,U0=r=>{if(r.getAttribute("display")==="none")return!1;const o=r.getBoundingClientRect();return!!(o&&o.height>0&&o.width>0)},W0=r=>{const o=window.getComputedStyle(r),a=o.transitionDelay.split(",")[0]||"",l=o.transitionDuration.split(",")[0]||"",s=Number(a.slice(0,-1))*1e3,u=Number(l.slice(0,-1))*1e3;return s+u},Sd=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Ed=["top","right","bottom","left"],$u=["start","end"],Du=Ed.reduce((r,o)=>r.concat(o,o+"-"+$u[0],o+"-"+$u[1]),[]),Nt=Math.min,Ge=Math.max,Fa=Math.round,Ta=Math.floor,yn=r=>({x:r,y:r}),q0={left:"right",right:"left",bottom:"top",top:"bottom"},G0={start:"end",end:"start"};function Ll(r,o,a){return Ge(r,Nt(o,a))}function tn(r,o){return typeof r=="function"?r(o):r}function xt(r){return r.split("-")[0]}function Vt(r){return r.split("-")[1]}function Td(r){return r==="x"?"y":"x"}function Hl(r){return r==="y"?"height":"width"}function or(r){return["top","bottom"].includes(xt(r))?"y":"x"}function Ul(r){return Td(or(r))}function Rd(r,o,a){a===void 0&&(a=!1);const l=Vt(r),s=Ul(r),u=Hl(s);let c=s==="x"?l===(a?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[u]>o.floating[u]&&(c=Da(c)),[c,Da(c)]}function K0(r){const o=Da(r);return[$a(r),o,$a(o)]}function $a(r){return r.replace(/start|end/g,o=>G0[o])}function j0(r,o,a){const l=["left","right"],s=["right","left"],u=["top","bottom"],c=["bottom","top"];switch(r){case"top":case"bottom":return a?o?s:l:o?l:s;case"left":case"right":return o?u:c;default:return[]}}function X0(r,o,a,l){const s=Vt(r);let u=j0(xt(r),a==="start",l);return s&&(u=u.map(c=>c+"-"+s),o&&(u=u.concat(u.map($a)))),u}function Da(r){return r.replace(/left|right|bottom|top/g,o=>q0[o])}function J0(r){return{top:0,right:0,bottom:0,left:0,...r}}function Wl(r){return typeof r!="number"?J0(r):{top:r,right:r,bottom:r,left:r}}function tr(r){return{...r,top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height}}function Iu(r,o,a){let{reference:l,floating:s}=r;const u=or(o),c=Ul(o),f=Hl(c),v=xt(o),h=u==="y",y=l.x+l.width/2-s.width/2,B=l.y+l.height/2-s.height/2,x=l[f]/2-s[f]/2;let b;switch(v){case"top":b={x:y,y:l.y-s.height};break;case"bottom":b={x:y,y:l.y+l.height};break;case"right":b={x:l.x+l.width,y:B};break;case"left":b={x:l.x-s.width,y:B};break;default:b={x:l.x,y:l.y}}switch(Vt(o)){case"start":b[c]-=x*(a&&h?-1:1);break;case"end":b[c]+=x*(a&&h?-1:1);break}return b}const Y0=async(r,o,a)=>{const{placement:l="bottom",strategy:s="absolute",middleware:u=[],platform:c}=a,f=u.filter(Boolean),v=await(c.isRTL==null?void 0:c.isRTL(o));let h=await c.getElementRects({reference:r,floating:o,strategy:s}),{x:y,y:B}=Iu(h,l,v),x=l,b={},k=0;for(let _=0;_<f.length;_++){const{name:C,fn:S}=f[_],{x:L,y:P,data:A,reset:V}=await S({x:y,y:B,initialPlacement:l,placement:x,strategy:s,middlewareData:b,rects:h,platform:c,elements:{reference:r,floating:o}});y=L??y,B=P??B,b={...b,[C]:{...b[C],...A}},V&&k<=50&&(k++,typeof V=="object"&&(V.placement&&(x=V.placement),V.rects&&(h=V.rects===!0?await c.getElementRects({reference:r,floating:o,strategy:s}):V.rects),{x:y,y:B}=Iu(h,x,v)),_=-1)}return{x:y,y:B,placement:x,strategy:s,middlewareData:b}};async function nr(r,o){var a;o===void 0&&(o={});const{x:l,y:s,platform:u,rects:c,elements:f,strategy:v}=r,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:B="floating",altBoundary:x=!1,padding:b=0}=tn(o,r),k=Wl(b),_=f[x?B==="floating"?"reference":"floating":B],C=tr(await u.getClippingRect({element:(a=await(u.isElement==null?void 0:u.isElement(_)))==null||a?_:_.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:h,rootBoundary:y,strategy:v})),S=B==="floating"?{...c.floating,x:l,y:s}:c.reference,L=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),P=await(u.isElement==null?void 0:u.isElement(L))?await(u.getScale==null?void 0:u.getScale(L))||{x:1,y:1}:{x:1,y:1},A=tr(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:S,offsetParent:L,strategy:v}):S);return{top:(C.top-A.top+k.top)/P.y,bottom:(A.bottom-C.bottom+k.bottom)/P.y,left:(C.left-A.left+k.left)/P.x,right:(A.right-C.right+k.right)/P.x}}const Z0=r=>({name:"arrow",options:r,async fn(o){const{x:a,y:l,placement:s,rects:u,platform:c,elements:f,middlewareData:v}=o,{element:h,padding:y=0}=tn(r,o)||{};if(h==null)return{};const B=Wl(y),x={x:a,y:l},b=Ul(s),k=Hl(b),_=await c.getDimensions(h),C=b==="y",S=C?"top":"left",L=C?"bottom":"right",P=C?"clientHeight":"clientWidth",A=u.reference[k]+u.reference[b]-x[b]-u.floating[k],V=x[b]-u.reference[b],$=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let M=$?$[P]:0;(!M||!await(c.isElement==null?void 0:c.isElement($)))&&(M=f.floating[P]||u.floating[k]);const J=A/2-V/2,Q=M/2-_[k]/2-1,ne=Nt(B[S],Q),ge=Nt(B[L],Q),G=ne,ie=M-_[k]-ge,H=M/2-_[k]/2+J,oe=Ll(G,H,ie),ce=!v.arrow&&Vt(s)!=null&&H!==oe&&u.reference[k]/2-(H<G?ne:ge)-_[k]/2<0,be=ce?H<G?H-G:H-ie:0;return{[b]:x[b]+be,data:{[b]:oe,centerOffset:H-oe-be,...ce&&{alignmentOffset:be}},reset:ce}}});function Q0(r,o,a){return(r?[...a.filter(l=>Vt(l)===r),...a.filter(l=>Vt(l)!==r)]:a.filter(l=>xt(l)===l)).filter(l=>r?Vt(l)===r||(o?$a(l)!==l:!1):!0)}const eb=function(r){return r===void 0&&(r={}),{name:"autoPlacement",options:r,async fn(o){var a,l,s;const{rects:u,middlewareData:c,placement:f,platform:v,elements:h}=o,{crossAxis:y=!1,alignment:B,allowedPlacements:x=Du,autoAlignment:b=!0,...k}=tn(r,o),_=B!==void 0||x===Du?Q0(B||null,b,x):x,C=await nr(o,k),S=((a=c.autoPlacement)==null?void 0:a.index)||0,L=_[S];if(L==null)return{};const P=Rd(L,u,await(v.isRTL==null?void 0:v.isRTL(h.floating)));if(f!==L)return{reset:{placement:_[0]}};const A=[C[xt(L)],C[P[0]],C[P[1]]],V=[...((l=c.autoPlacement)==null?void 0:l.overflows)||[],{placement:L,overflows:A}],$=_[S+1];if($)return{data:{index:S+1,overflows:V},reset:{placement:$}};const M=V.map(Q=>{const ne=Vt(Q.placement);return[Q.placement,ne&&y?Q.overflows.slice(0,2).reduce((ge,G)=>ge+G,0):Q.overflows[0],Q.overflows]}).sort((Q,ne)=>Q[1]-ne[1]),J=((s=M.filter(Q=>Q[2].slice(0,Vt(Q[0])?2:3).every(ne=>ne<=0))[0])==null?void 0:s[0])||M[0][0];return J!==f?{data:{index:S+1,overflows:V},reset:{placement:J}}:{}}}},tb=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(o){var a,l;const{placement:s,middlewareData:u,rects:c,initialPlacement:f,platform:v,elements:h}=o,{mainAxis:y=!0,crossAxis:B=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:_=!0,...C}=tn(r,o);if((a=u.arrow)!=null&&a.alignmentOffset)return{};const S=xt(s),L=xt(f)===f,P=await(v.isRTL==null?void 0:v.isRTL(h.floating)),A=x||(L||!_?[Da(f)]:K0(f));!x&&k!=="none"&&A.push(...X0(f,_,k,P));const V=[f,...A],$=await nr(o,C),M=[];let J=((l=u.flip)==null?void 0:l.overflows)||[];if(y&&M.push($[S]),B){const G=Rd(s,c,P);M.push($[G[0]],$[G[1]])}if(J=[...J,{placement:s,overflows:M}],!M.every(G=>G<=0)){var Q,ne;const G=(((Q=u.flip)==null?void 0:Q.index)||0)+1,ie=V[G];if(ie)return{data:{index:G,overflows:J},reset:{placement:ie}};let H=(ne=J.filter(oe=>oe.overflows[0]<=0).sort((oe,ce)=>oe.overflows[1]-ce.overflows[1])[0])==null?void 0:ne.placement;if(!H)switch(b){case"bestFit":{var ge;const oe=(ge=J.map(ce=>[ce.placement,ce.overflows.filter(be=>be>0).reduce((be,pe)=>be+pe,0)]).sort((ce,be)=>ce[1]-be[1])[0])==null?void 0:ge[0];oe&&(H=oe);break}case"initialPlacement":H=f;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function zu(r,o){return{top:r.top-o.height,right:r.right-o.width,bottom:r.bottom-o.height,left:r.left-o.width}}function Mu(r){return Ed.some(o=>r[o]>=0)}const nb=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(o){const{rects:a}=o,{strategy:l="referenceHidden",...s}=tn(r,o);switch(l){case"referenceHidden":{const u=await nr(o,{...s,elementContext:"reference"}),c=zu(u,a.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Mu(c)}}}case"escaped":{const u=await nr(o,{...s,altBoundary:!0}),c=zu(u,a.floating);return{data:{escapedOffsets:c,escaped:Mu(c)}}}default:return{}}}}};function Ad(r){const o=Nt(...r.map(u=>u.left)),a=Nt(...r.map(u=>u.top)),l=Ge(...r.map(u=>u.right)),s=Ge(...r.map(u=>u.bottom));return{x:o,y:a,width:l-o,height:s-a}}function rb(r){const o=r.slice().sort((s,u)=>s.y-u.y),a=[];let l=null;for(let s=0;s<o.length;s++){const u=o[s];!l||u.y-l.y>l.height/2?a.push([u]):a[a.length-1].push(u),l=u}return a.map(s=>tr(Ad(s)))}const ab=function(r){return r===void 0&&(r={}),{name:"inline",options:r,async fn(o){const{placement:a,elements:l,rects:s,platform:u,strategy:c}=o,{padding:f=2,x:v,y:h}=tn(r,o),y=Array.from(await(u.getClientRects==null?void 0:u.getClientRects(l.reference))||[]),B=rb(y),x=tr(Ad(y)),b=Wl(f);function k(){if(B.length===2&&B[0].left>B[1].right&&v!=null&&h!=null)return B.find(C=>v>C.left-b.left&&v<C.right+b.right&&h>C.top-b.top&&h<C.bottom+b.bottom)||x;if(B.length>=2){if(or(a)==="y"){const ne=B[0],ge=B[B.length-1],G=xt(a)==="top",ie=ne.top,H=ge.bottom,oe=G?ne.left:ge.left,ce=G?ne.right:ge.right,be=ce-oe,pe=H-ie;return{top:ie,bottom:H,left:oe,right:ce,width:be,height:pe,x:oe,y:ie}}const C=xt(a)==="left",S=Ge(...B.map(ne=>ne.right)),L=Nt(...B.map(ne=>ne.left)),P=B.filter(ne=>C?ne.left===L:ne.right===S),A=P[0].top,V=P[P.length-1].bottom,$=L,M=S,J=M-$,Q=V-A;return{top:A,bottom:V,left:$,right:M,width:J,height:Q,x:$,y:A}}return x}const _=await u.getElementRects({reference:{getBoundingClientRect:k},floating:l.floating,strategy:c});return s.reference.x!==_.reference.x||s.reference.y!==_.reference.y||s.reference.width!==_.reference.width||s.reference.height!==_.reference.height?{reset:{rects:_}}:{}}}};async function ob(r,o){const{placement:a,platform:l,elements:s}=r,u=await(l.isRTL==null?void 0:l.isRTL(s.floating)),c=xt(a),f=Vt(a),v=or(a)==="y",h=["left","top"].includes(c)?-1:1,y=u&&v?-1:1,B=tn(o,r);let{mainAxis:x,crossAxis:b,alignmentAxis:k}=typeof B=="number"?{mainAxis:B,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...B};return f&&typeof k=="number"&&(b=f==="end"?k*-1:k),v?{x:b*y,y:x*h}:{x:x*h,y:b*y}}const Od=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(o){var a,l;const{x:s,y:u,placement:c,middlewareData:f}=o,v=await ob(o,r);return c===((a=f.offset)==null?void 0:a.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:s+v.x,y:u+v.y,data:{...v,placement:c}}}}},lb=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(o){const{x:a,y:l,placement:s}=o,{mainAxis:u=!0,crossAxis:c=!1,limiter:f={fn:C=>{let{x:S,y:L}=C;return{x:S,y:L}}},...v}=tn(r,o),h={x:a,y:l},y=await nr(o,v),B=or(xt(s)),x=Td(B);let b=h[x],k=h[B];if(u){const C=x==="y"?"top":"left",S=x==="y"?"bottom":"right",L=b+y[C],P=b-y[S];b=Ll(L,b,P)}if(c){const C=B==="y"?"top":"left",S=B==="y"?"bottom":"right",L=k+y[C],P=k-y[S];k=Ll(L,k,P)}const _=f.fn({...o,[x]:b,[B]:k});return{..._,data:{x:_.x-a,y:_.y-l}}}}},ib=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(o){const{placement:a,rects:l,platform:s,elements:u}=o,{apply:c=()=>{},...f}=tn(r,o),v=await nr(o,f),h=xt(a),y=Vt(a),B=or(a)==="y",{width:x,height:b}=l.floating;let k,_;h==="top"||h==="bottom"?(k=h,_=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(_=h,k=y==="end"?"top":"bottom");const C=b-v[k],S=x-v[_],L=!o.middlewareData.shift;let P=C,A=S;if(B){const $=x-v.left-v.right;A=y||L?Nt(S,$):$}else{const $=b-v.top-v.bottom;P=y||L?Nt(C,$):$}if(L&&!y){const $=Ge(v.left,0),M=Ge(v.right,0),J=Ge(v.top,0),Q=Ge(v.bottom,0);B?A=x-2*($!==0||M!==0?$+M:Ge(v.left,v.right)):P=b-2*(J!==0||Q!==0?J+Q:Ge(v.top,v.bottom))}await c({...o,availableWidth:A,availableHeight:P});const V=await s.getDimensions(u.floating);return x!==V.width||b!==V.height?{reset:{rects:!0}}:{}}}};function Qt(r){return ql(r)?(r.nodeName||"").toLowerCase():"#document"}function ft(r){var o;return(r==null||(o=r.ownerDocument)==null?void 0:o.defaultView)||window}function nn(r){var o;return(o=(ql(r)?r.ownerDocument:r.document)||window.document)==null?void 0:o.documentElement}function ql(r){return r instanceof Node||r instanceof ft(r).Node}function en(r){return r instanceof Element||r instanceof ft(r).Element}function zt(r){return r instanceof HTMLElement||r instanceof ft(r).HTMLElement}function Hu(r){return typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof ft(r).ShadowRoot}function Lr(r){const{overflow:o,overflowX:a,overflowY:l,display:s}=Bt(r);return/auto|scroll|overlay|hidden|clip/.test(o+l+a)&&!["inline","contents"].includes(s)}function sb(r){return["table","td","th"].includes(Qt(r))}function Gl(r){const o=Kl(),a=Bt(r);return a.transform!=="none"||a.perspective!=="none"||(a.containerType?a.containerType!=="normal":!1)||!o&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!o&&(a.filter?a.filter!=="none":!1)||["transform","perspective","filter"].some(l=>(a.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(a.contain||"").includes(l))}function ub(r){let o=rr(r);for(;zt(o)&&!Ua(o);){if(Gl(o))return o;o=rr(o)}return null}function Kl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ua(r){return["html","body","#document"].includes(Qt(r))}function Bt(r){return ft(r).getComputedStyle(r)}function Wa(r){return en(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function rr(r){if(Qt(r)==="html")return r;const o=r.assignedSlot||r.parentNode||Hu(r)&&r.host||nn(r);return Hu(o)?o.host:o}function Ld(r){const o=rr(r);return Ua(o)?r.ownerDocument?r.ownerDocument.body:r.body:zt(o)&&Lr(o)?o:Ld(o)}function Or(r,o,a){var l;o===void 0&&(o=[]),a===void 0&&(a=!0);const s=Ld(r),u=s===((l=r.ownerDocument)==null?void 0:l.body),c=ft(s);return u?o.concat(c,c.visualViewport||[],Lr(s)?s:[],c.frameElement&&a?Or(c.frameElement):[]):o.concat(s,Or(s,[],a))}function Vd(r){const o=Bt(r);let a=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const s=zt(r),u=s?r.offsetWidth:a,c=s?r.offsetHeight:l,f=Fa(a)!==u||Fa(l)!==c;return f&&(a=u,l=c),{width:a,height:l,$:f}}function jl(r){return en(r)?r:r.contextElement}function er(r){const o=jl(r);if(!zt(o))return yn(1);const a=o.getBoundingClientRect(),{width:l,height:s,$:u}=Vd(o);let c=(u?Fa(a.width):a.width)/l,f=(u?Fa(a.height):a.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const db=yn(0);function Nd(r){const o=ft(r);return!Kl()||!o.visualViewport?db:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function cb(r,o,a){return o===void 0&&(o=!1),!a||o&&a!==ft(r)?!1:o}function On(r,o,a,l){o===void 0&&(o=!1),a===void 0&&(a=!1);const s=r.getBoundingClientRect(),u=jl(r);let c=yn(1);o&&(l?en(l)&&(c=er(l)):c=er(r));const f=cb(u,a,l)?Nd(u):yn(0);let v=(s.left+f.x)/c.x,h=(s.top+f.y)/c.y,y=s.width/c.x,B=s.height/c.y;if(u){const x=ft(u),b=l&&en(l)?ft(l):l;let k=x,_=k.frameElement;for(;_&&l&&b!==k;){const C=er(_),S=_.getBoundingClientRect(),L=Bt(_),P=S.left+(_.clientLeft+parseFloat(L.paddingLeft))*C.x,A=S.top+(_.clientTop+parseFloat(L.paddingTop))*C.y;v*=C.x,h*=C.y,y*=C.x,B*=C.y,v+=P,h+=A,k=ft(_),_=k.frameElement}}return tr({width:y,height:B,x:v,y:h})}const fb=[":popover-open",":modal"];function Pd(r){return fb.some(o=>{try{return r.matches(o)}catch{return!1}})}function pb(r){let{elements:o,rect:a,offsetParent:l,strategy:s}=r;const u=s==="fixed",c=nn(l),f=o?Pd(o.floating):!1;if(l===c||f&&u)return a;let v={scrollLeft:0,scrollTop:0},h=yn(1);const y=yn(0),B=zt(l);if((B||!B&&!u)&&((Qt(l)!=="body"||Lr(c))&&(v=Wa(l)),zt(l))){const x=On(l);h=er(l),y.x=x.x+l.clientLeft,y.y=x.y+l.clientTop}return{width:a.width*h.x,height:a.height*h.y,x:a.x*h.x-v.scrollLeft*h.x+y.x,y:a.y*h.y-v.scrollTop*h.y+y.y}}function vb(r){return Array.from(r.getClientRects())}function Fd(r){return On(nn(r)).left+Wa(r).scrollLeft}function mb(r){const o=nn(r),a=Wa(r),l=r.ownerDocument.body,s=Ge(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),u=Ge(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let c=-a.scrollLeft+Fd(r);const f=-a.scrollTop;return Bt(l).direction==="rtl"&&(c+=Ge(o.clientWidth,l.clientWidth)-s),{width:s,height:u,x:c,y:f}}function hb(r,o){const a=ft(r),l=nn(r),s=a.visualViewport;let u=l.clientWidth,c=l.clientHeight,f=0,v=0;if(s){u=s.width,c=s.height;const h=Kl();(!h||h&&o==="fixed")&&(f=s.offsetLeft,v=s.offsetTop)}return{width:u,height:c,x:f,y:v}}function gb(r,o){const a=On(r,!0,o==="fixed"),l=a.top+r.clientTop,s=a.left+r.clientLeft,u=zt(r)?er(r):yn(1),c=r.clientWidth*u.x,f=r.clientHeight*u.y,v=s*u.x,h=l*u.y;return{width:c,height:f,x:v,y:h}}function Uu(r,o,a){let l;if(o==="viewport")l=hb(r,a);else if(o==="document")l=mb(nn(r));else if(en(o))l=gb(o,a);else{const s=Nd(r);l={...o,x:o.x-s.x,y:o.y-s.y}}return tr(l)}function $d(r,o){const a=rr(r);return a===o||!en(a)||Ua(a)?!1:Bt(a).position==="fixed"||$d(a,o)}function yb(r,o){const a=o.get(r);if(a)return a;let l=Or(r,[],!1).filter(f=>en(f)&&Qt(f)!=="body"),s=null;const u=Bt(r).position==="fixed";let c=u?rr(r):r;for(;en(c)&&!Ua(c);){const f=Bt(c),v=Gl(c);!v&&f.position==="fixed"&&(s=null),(u?!v&&!s:!v&&f.position==="static"&&s&&["absolute","fixed"].includes(s.position)||Lr(c)&&!v&&$d(r,c))?l=l.filter(h=>h!==c):s=f,c=rr(c)}return o.set(r,l),l}function bb(r){let{element:o,boundary:a,rootBoundary:l,strategy:s}=r;const u=[...a==="clippingAncestors"?yb(o,this._c):[].concat(a),l],c=u[0],f=u.reduce((v,h)=>{const y=Uu(o,h,s);return v.top=Ge(y.top,v.top),v.right=Nt(y.right,v.right),v.bottom=Nt(y.bottom,v.bottom),v.left=Ge(y.left,v.left),v},Uu(o,c,s));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function _b(r){const{width:o,height:a}=Vd(r);return{width:o,height:a}}function wb(r,o,a){const l=zt(o),s=nn(o),u=a==="fixed",c=On(r,!0,u,o);let f={scrollLeft:0,scrollTop:0};const v=yn(0);if(l||!l&&!u)if((Qt(o)!=="body"||Lr(s))&&(f=Wa(o)),l){const B=On(o,!0,u,o);v.x=B.x+o.clientLeft,v.y=B.y+o.clientTop}else s&&(v.x=Fd(s));const h=c.left+f.scrollLeft-v.x,y=c.top+f.scrollTop-v.y;return{x:h,y,width:c.width,height:c.height}}function Wu(r,o){return!zt(r)||Bt(r).position==="fixed"?null:o?o(r):r.offsetParent}function Dd(r,o){const a=ft(r);if(!zt(r)||Pd(r))return a;let l=Wu(r,o);for(;l&&sb(l)&&Bt(l).position==="static";)l=Wu(l,o);return l&&(Qt(l)==="html"||Qt(l)==="body"&&Bt(l).position==="static"&&!Gl(l))?a:l||ub(r)||a}const xb=async function(r){const o=this.getOffsetParent||Dd,a=this.getDimensions;return{reference:wb(r.reference,await o(r.floating),r.strategy),floating:{x:0,y:0,...await a(r.floating)}}};function Bb(r){return Bt(r).direction==="rtl"}const Cb={convertOffsetParentRelativeRectToViewportRelativeRect:pb,getDocumentElement:nn,getClippingRect:bb,getOffsetParent:Dd,getElementRects:xb,getClientRects:vb,getDimensions:_b,getScale:er,isElement:en,isRTL:Bb};function kb(r,o){let a=null,l;const s=nn(r);function u(){var f;clearTimeout(l),(f=a)==null||f.disconnect(),a=null}function c(f,v){f===void 0&&(f=!1),v===void 0&&(v=1),u();const{left:h,top:y,width:B,height:x}=r.getBoundingClientRect();if(f||o(),!B||!x)return;const b=Ta(y),k=Ta(s.clientWidth-(h+B)),_=Ta(s.clientHeight-(y+x)),C=Ta(h),S={rootMargin:-b+"px "+-k+"px "+-_+"px "+-C+"px",threshold:Ge(0,Nt(1,v))||1};let L=!0;function P(A){const V=A[0].intersectionRatio;if(V!==v){if(!L)return c();V?c(!1,V):l=setTimeout(()=>{c(!1,1e-7)},100)}L=!1}try{a=new IntersectionObserver(P,{...S,root:s.ownerDocument})}catch{a=new IntersectionObserver(P,S)}a.observe(r)}return c(!0),u}function Id(r,o,a,l){l===void 0&&(l={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:v=!1}=l,h=jl(r),y=s||u?[...h?Or(h):[],...Or(o)]:[];y.forEach(S=>{s&&S.addEventListener("scroll",a,{passive:!0}),u&&S.addEventListener("resize",a)});const B=h&&f?kb(h,a):null;let x=-1,b=null;c&&(b=new ResizeObserver(S=>{let[L]=S;L&&L.target===h&&b&&(b.unobserve(o),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var P;(P=b)==null||P.observe(o)})),a()}),h&&!v&&b.observe(h),b.observe(o));let k,_=v?On(r):null;v&&C();function C(){const S=On(r);_&&(S.x!==_.x||S.y!==_.y||S.width!==_.width||S.height!==_.height)&&a(),_=S,k=requestAnimationFrame(C)}return a(),()=>{var S;y.forEach(L=>{s&&L.removeEventListener("scroll",a),u&&L.removeEventListener("resize",a)}),B==null||B(),(S=b)==null||S.disconnect(),b=null,v&&cancelAnimationFrame(k)}}const Sb=eb,zd=lb,Md=tb,Hd=ib,Eb=nb,Tb=Z0,Rb=ab,Ab=(r,o,a)=>{const l=new Map,s={platform:Cb,...a},u={...s.platform,_c:l};return Y0(r,o,{...s,platform:u})};function Ob(r){return r!=null&&typeof r=="object"&&"$el"in r}function Vl(r){if(Ob(r)){const o=r.$el;return ql(o)&&Qt(o)==="#comment"?null:o}return r}function Lb(r){return{name:"arrow",options:r,fn(o){const a=Vl(n.unref(r.element));return a==null?{}:Tb({element:a,padding:r.padding}).fn(o)}}}function Ud(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function qu(r,o){const a=Ud(r);return Math.round(o*a)/a}function Wd(r,o,a){a===void 0&&(a={});const l=a.whileElementsMounted,s=n.computed(()=>{var M;return(M=n.unref(a.open))!=null?M:!0}),u=n.computed(()=>n.unref(a.middleware)),c=n.computed(()=>{var M;return(M=n.unref(a.placement))!=null?M:"bottom"}),f=n.computed(()=>{var M;return(M=n.unref(a.strategy))!=null?M:"absolute"}),v=n.computed(()=>{var M;return(M=n.unref(a.transform))!=null?M:!0}),h=n.computed(()=>Vl(r.value)),y=n.computed(()=>Vl(o.value)),B=n.ref(0),x=n.ref(0),b=n.ref(f.value),k=n.ref(c.value),_=n.shallowRef({}),C=n.ref(!1),S=n.computed(()=>{const M={position:b.value,left:"0",top:"0"};if(!y.value)return M;const J=qu(y.value,B.value),Q=qu(y.value,x.value);return v.value?{...M,transform:"translate("+J+"px, "+Q+"px)",...Ud(y.value)>=1.5&&{willChange:"transform"}}:{position:b.value,left:J+"px",top:Q+"px"}});let L;function P(){h.value==null||y.value==null||Ab(h.value,y.value,{middleware:u.value,placement:c.value,strategy:f.value}).then(M=>{B.value=M.x,x.value=M.y,b.value=M.strategy,k.value=M.placement,_.value=M.middlewareData,C.value=!0})}function A(){typeof L=="function"&&(L(),L=void 0)}function V(){if(A(),l===void 0){P();return}if(h.value!=null&&y.value!=null){L=l(h.value,y.value,P);return}}function $(){s.value||(C.value=!1)}return n.watch([u,c,f],P,{flush:"sync"}),n.watch([h,y],V,{flush:"sync"}),n.watch(s,$,{flush:"sync"}),n.getCurrentScope()&&n.onScopeDispose(A),{x:n.shallowReadonly(B),y:n.shallowReadonly(x),strategy:n.shallowReadonly(b),placement:n.shallowReadonly(k),middlewareData:n.shallowReadonly(_),isPositioned:n.shallowReadonly(C),floatingStyles:S,update:P}}const Vb=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Nb=/^aria-[\w-]*$/i,Pb=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Fb=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,$b=(r,o)=>{const a=r.nodeName.toLowerCase();return o.includes(a)?Vb.has(a)?!!(Pb.test(r.nodeValue||"")||Fb.test(r.nodeValue||"")):!0:o.filter(l=>l instanceof RegExp).some(l=>l.test(a))},Zn={"*":["class","dir","id","lang","role",Nb],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Qn=(r,o,a)=>{if(!r.length)return r;const l=new window.DOMParser().parseFromString(r,"text/html"),s=l.body.querySelectorAll("*");for(const u of s){const c=u.nodeName.toLowerCase();if(!Object.keys(o).includes(c)){u.remove();continue}const f=u.attributes,v=[...o["*"]||[],...o[c]||[]];for(const h of f)$b(h,v)||u.removeAttribute(h.nodeName)}return l.body.innerHTML};function qa(r){return n.getCurrentScope()?(n.onScopeDispose(r),!0):!1}function Db(r,o){if(typeof Symbol<"u"){const a={...r};return Object.defineProperty(a,Symbol.iterator,{enumerable:!1,value(){let l=0;return{next:()=>({value:o[l++],done:l>o.length})}}}),a}else return Object.assign([...o],r)}function Zt(r){return typeof r=="function"?r():n.unref(r)}const qd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ib=r=>typeof r<"u",zb=Object.prototype.toString,Mb=r=>zb.call(r)==="[object Object]",Rn=()=>{},Nl=Hb();function Hb(){var r,o;return qd&&((r=window==null?void 0:window.navigator)==null?void 0:r.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((o=window==null?void 0:window.navigator)==null?void 0:o.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Ub(r,o){function a(...l){return new Promise((s,u)=>{Promise.resolve(r(()=>o.apply(this,l),{fn:o,thisArg:this,args:l})).then(s).catch(u)})}return a}function Wb(r,o={}){let a,l,s=Rn;const u=c=>{clearTimeout(c),s(),s=Rn};return c=>{const f=Zt(r),v=Zt(o.maxWait);return a&&u(a),f<=0||v!==void 0&&v<=0?(l&&(u(l),l=null),Promise.resolve(c())):new Promise((h,y)=>{s=o.rejectOnCancel?y:h,v&&!l&&(l=setTimeout(()=>{a&&u(a),l=null,h(c())},v)),a=setTimeout(()=>{l&&u(l),l=null,h(c())},f)})}}function qb(r){const o=Object.create(null);return a=>o[a]||(o[a]=r(a))}const Gb=/-(\w)/g,Kb=qb(r=>r.replace(Gb,(o,a)=>a?a.toUpperCase():""));function jb(...r){if(r.length!==1)return n.toRef(...r);const o=r[0];return typeof o=="function"?n.readonly(n.customRef(()=>({get:o,set:Rn}))):n.ref(o)}function Xb(r,o=200,a={}){return Ub(Wb(o,a),r)}function ct(r,o={}){const{method:a="parseFloat",radix:l,nanToZero:s}=o;return n.computed(()=>{let u=Zt(r);return typeof u=="string"&&(u=Number[a](u,l)),s&&Number.isNaN(u)&&(u=0),u})}function Gd(r={}){const{inheritAttrs:o=!0}=r,a=n.shallowRef(),l=n.defineComponent({setup(u,{slots:c}){return()=>{a.value=c.default}}}),s=n.defineComponent({inheritAttrs:o,setup(u,{attrs:c,slots:f}){return()=>{var v;if(!a.value&&I0.NODE_ENV!=="production")throw new Error("[VueUse] Failed to find the definition of reusable template");const h=(v=a.value)==null?void 0:v.call(a,{...Jb(c),$slots:f});return o&&(h==null?void 0:h.length)===1?h[0]:h}}});return Db({define:l,reuse:s},[l,s])}function Jb(r){const o={};for(const a in r)o[Kb(a)]=r[a];return o}function mn(r){var o;const a=Zt(r);return(o=a==null?void 0:a.$el)!=null?o:a}const Vr=qd?window:void 0;function nt(...r){let o,a,l,s;if(typeof r[0]=="string"||Array.isArray(r[0])?([a,l,s]=r,o=Vr):[o,a,l,s]=r,!o)return Rn;Array.isArray(a)||(a=[a]),Array.isArray(l)||(l=[l]);const u=[],c=()=>{u.forEach(y=>y()),u.length=0},f=(y,B,x,b)=>(y.addEventListener(B,x,b),()=>y.removeEventListener(B,x,b)),v=n.watch(()=>[mn(o),Zt(s)],([y,B])=>{if(c(),!y)return;const x=Mb(B)?{...B}:B;u.push(...a.flatMap(b=>l.map(k=>f(y,b,k,x))))},{immediate:!0,flush:"post"}),h=()=>{v(),c()};return qa(h),h}let Gu=!1;function Kd(r,o,a={}){const{window:l=Vr,ignore:s=[],capture:u=!0,detectIframe:c=!1}=a;if(!l)return Rn;Nl&&!Gu&&(Gu=!0,Array.from(l.document.body.children).forEach(y=>y.addEventListener("click",Rn)),l.document.documentElement.addEventListener("click",Rn));let f=!0;const v=y=>s.some(B=>{if(typeof B=="string")return Array.from(l.document.querySelectorAll(B)).some(x=>x===y.target||y.composedPath().includes(x));{const x=mn(B);return x&&(y.target===x||y.composedPath().includes(x))}}),h=[nt(l,"click",y=>{const B=mn(r);if(!(!B||B===y.target||y.composedPath().includes(B))){if(y.detail===0&&(f=!v(y)),!f){f=!0;return}o(y)}},{passive:!0,capture:u}),nt(l,"pointerdown",y=>{const B=mn(r);f=!v(y)&&!!(B&&!y.composedPath().includes(B))},{passive:!0}),c&&nt(l,"blur",y=>{setTimeout(()=>{var B;const x=mn(r);((B=l.document.activeElement)==null?void 0:B.tagName)==="IFRAME"&&!(x!=null&&x.contains(l.document.activeElement))&&o(y)},0)})].filter(Boolean);return()=>h.forEach(y=>y())}function Yb(r){return typeof r=="function"?r:typeof r=="string"?o=>o.key===r:Array.isArray(r)?o=>r.includes(o.key):()=>!0}function vn(...r){let o,a,l={};r.length===3?(o=r[0],a=r[1],l=r[2]):r.length===2?typeof r[1]=="object"?(o=!0,a=r[0],l=r[1]):(o=r[0],a=r[1]):(o=!0,a=r[0]);const{target:s=Vr,eventName:u="keydown",passive:c=!1,dedupe:f=!1}=l,v=Yb(o);return nt(s,u,h=>{h.repeat&&Zt(f)||v(h)&&a(h)},c)}function Zb(r){return JSON.parse(JSON.stringify(r))}const Ra=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Aa="__vueuse_ssr_handlers__",Qb=e_();function e_(){return Aa in Ra||(Ra[Aa]=Ra[Aa]||{}),Ra[Aa]}function t_(r,o){return Qb[r]||o}function Lt(r,o={}){const{initialValue:a=!1,focusVisible:l=!1}=o,s=n.ref(!1),u=n.computed(()=>mn(r));nt(u,"focus",f=>{var v,h;(!l||(h=(v=f.target).matches)!=null&&h.call(v,":focus-visible"))&&(s.value=!0)}),nt(u,"blur",()=>s.value=!1);const c=n.computed({get:()=>s.value,set(f){var v,h;!f&&s.value?(v=u.value)==null||v.blur():f&&!s.value&&((h=u.value)==null||h.focus())}});return n.watch(u,()=>{c.value=a},{immediate:!0,flush:"post"}),{focused:c}}function Cl(r){return typeof Window<"u"&&r instanceof Window?r.document.documentElement:typeof Document<"u"&&r instanceof Document?r.documentElement:r}const n_={page:r=>[r.pageX,r.pageY],client:r=>[r.clientX,r.clientY],screen:r=>[r.screenX,r.screenY],movement:r=>r instanceof Touch?null:[r.movementX,r.movementY]};function r_(r={}){const{type:o="page",touch:a=!0,resetOnTouchEnds:l=!1,initialValue:s={x:0,y:0},window:u=Vr,target:c=u,scroll:f=!0,eventFilter:v}=r;let h=null;const y=n.ref(s.x),B=n.ref(s.y),x=n.ref(null),b=typeof o=="function"?o:n_[o],k=V=>{const $=b(V);h=V,$&&([y.value,B.value]=$,x.value="mouse")},_=V=>{if(V.touches.length>0){const $=b(V.touches[0]);$&&([y.value,B.value]=$,x.value="touch")}},C=()=>{if(!h||!u)return;const V=b(h);h instanceof MouseEvent&&V&&(y.value=V[0]+u.scrollX,B.value=V[1]+u.scrollY)},S=()=>{y.value=s.x,B.value=s.y},L=v?V=>v(()=>k(V),{}):V=>k(V),P=v?V=>v(()=>_(V),{}):V=>_(V),A=v?()=>v(()=>C(),{}):()=>C();if(c){const V={passive:!0};nt(c,["mousemove","dragover"],L,V),a&&o!=="movement"&&(nt(c,["touchstart","touchmove"],P,V),l&&nt(c,"touchend",S,V)),f&&o==="page"&&nt(u,"scroll",A,{passive:!0})}return{x:y,y:B,sourceType:x}}function Ku(r,o={}){const{handleOutside:a=!0,window:l=Vr}=o,s=o.type||"page",{x:u,y:c,sourceType:f}=r_(o),v=n.ref(r??(l==null?void 0:l.document.body)),h=n.ref(0),y=n.ref(0),B=n.ref(0),x=n.ref(0),b=n.ref(0),k=n.ref(0),_=n.ref(!0);let C=()=>{};return l&&(C=n.watch([v,u,c],()=>{const S=mn(v);if(!S)return;const{left:L,top:P,width:A,height:V}=S.getBoundingClientRect();B.value=L+(s==="page"?l.pageXOffset:0),x.value=P+(s==="page"?l.pageYOffset:0),b.value=V,k.value=A;const $=u.value-B.value,M=c.value-x.value;_.value=A===0||V===0||$<0||M<0||$>A||M>V,(a||!_.value)&&(h.value=$,y.value=M)},{immediate:!0}),nt(document,"mouseleave",()=>{_.value=!0})),{x:u,y:c,sourceType:f,elementX:h,elementY:y,elementPositionX:B,elementPositionY:x,elementHeight:b,elementWidth:k,isOutside:_,stop:C}}function jd(r){const o=window.getComputedStyle(r);if(o.overflowX==="scroll"||o.overflowY==="scroll"||o.overflowX==="auto"&&r.clientWidth<r.scrollWidth||o.overflowY==="auto"&&r.clientHeight<r.scrollHeight)return!0;{const a=r.parentNode;return!a||a.tagName==="BODY"?!1:jd(a)}}function a_(r){const o=r||window.event,a=o.target;return jd(a)?!1:o.touches.length>1?!0:(o.preventDefault&&o.preventDefault(),!1)}const Oa=new WeakMap;function o_(r,o=!1){const a=n.ref(o);let l=null;n.watch(jb(r),c=>{const f=Cl(Zt(c));if(f){const v=f;Oa.get(v)||Oa.set(v,v.style.overflow),a.value&&(v.style.overflow="hidden")}},{immediate:!0});const s=()=>{const c=Cl(Zt(r));!c||a.value||(Nl&&(l=nt(c,"touchmove",f=>{a_(f)},{passive:!1})),c.style.overflow="hidden",a.value=!0)},u=()=>{var c;const f=Cl(Zt(r));!f||!a.value||(Nl&&(l==null||l()),f.style.overflow=(c=Oa.get(f))!=null?c:"",Oa.delete(f),a.value=!1)};return qa(u),n.computed({get(){return a.value},set(c){c?s():u()}})}function l_(r,o,a,l={}){var s,u,c;const{clone:f=!1,passive:v=!1,eventName:h,deep:y=!1,defaultValue:B,shouldEmit:x}=l,b=n.getCurrentInstance(),k=a||(b==null?void 0:b.emit)||((s=b==null?void 0:b.$emit)==null?void 0:s.bind(b))||((c=(u=b==null?void 0:b.proxy)==null?void 0:u.$emit)==null?void 0:c.bind(b==null?void 0:b.proxy));let _=h;_=_||`update:${o.toString()}`;const C=P=>f?typeof f=="function"?f(P):Zb(P):P,S=()=>Ib(r[o])?C(r[o]):B,L=P=>{x?x(P)&&k(_,P):k(_,P)};if(v){const P=S(),A=n.ref(P);let V=!1;return n.watch(()=>r[o],$=>{V||(V=!0,A.value=C($),n.nextTick(()=>V=!1))}),n.watch(A,$=>{!V&&($!==r[o]||y)&&L($)},{deep:y}),A}else return n.computed({get(){return S()},set(P){L(P)}})}const i_=["id"],s_=["id"],u_=["innerHTML"],d_=["innerHTML"],Xd=n.defineComponent({inheritAttrs:!1,__name:"BPopover",props:n.mergeModels({boundary:{default:"clippingAncestors"},boundaryPadding:{default:void 0},click:{type:Boolean,default:!1},content:{default:void 0},customClass:{default:""},delay:{default:()=>({show:100,hide:300})},floatingMiddleware:{default:void 0},hide:{type:Boolean,default:void 0},html:{type:Boolean,default:!1},id:{default:void 0},inline:{type:Boolean,default:!1},manual:{type:Boolean,default:!1},modelValue:{type:Boolean},noAutoClose:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},noFlip:{type:Boolean,default:!1},noHide:{type:Boolean,default:!1},noShift:{type:Boolean,default:!1},noSize:{type:Boolean,default:!1},noninteractive:{type:Boolean,default:!1},offset:{default:null},placement:{default:"top"},persistent:{type:Boolean,default:!1},realtime:{type:Boolean,default:!1},reference:{default:null},strategy:{default:"absolute"},target:{default:null},title:{default:void 0},tooltip:{type:Boolean,default:!1},variant:{default:null},teleportDisabled:{default:!1},teleportTo:{default:void 0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:n.mergeModels(["hidden","hide","hide-prevented","show","show-prevented","shown"],["update:modelValue"]),setup(r,{expose:o,emit:a}){const l=r,s=a,u=n.useModel(r,"modelValue"),c=n.ref(u.value),f=n.ref(u.value);n.watchEffect(()=>{u.value=c.value}),n.watch(u,U=>{U!==c.value&&(U?he():ye(new Event("update:modelValue")))});const v=$e(()=>l.id,"popover"),h=n.ref(!1),y=n.ref(null),B=n.ref(null),x=n.ref(null),b=n.ref(null),k=n.ref(null),_=n.computed(()=>l.title?Qn(l.title,Zn):""),C=n.computed(()=>l.content?Qn(l.content,Zn):""),S=n.toRef(()=>l.placement.startsWith("auto")),L=ct(()=>l.offset??NaN),P=n.computed(()=>l.boundary==="document"||l.boundary==="viewport"?void 0:l.boundary),A=n.computed(()=>l.boundary==="document"||l.boundary==="viewport"?l.boundary:void 0),V=n.ref({}),$=n.computed(()=>{if(l.floatingMiddleware!==void 0)return l.floatingMiddleware;const U=l.offset!==null?L.value:l.tooltip?6:8,re=[Od(U)];return l.noFlip===!1&&!S.value&&re.push(Md({boundary:P.value,rootBoundary:A.value,padding:l.boundaryPadding})),S.value&&re.push(Sb({alignment:l.placement.split("-")[1]||void 0,boundary:P.value,rootBoundary:A.value,padding:l.boundaryPadding})),l.noShift===!1&&re.push(zd({boundary:P.value,rootBoundary:A.value,padding:l.boundaryPadding})),l.noHide===!1&&re.push(Eb({boundary:P.value,rootBoundary:A.value,padding:l.boundaryPadding})),l.inline===!0&&re.push(Rb()),re.push(Lb({element:x,padding:10})),l.noSize===!1&&re.push(Hd({boundary:P.value,rootBoundary:A.value,padding:l.boundaryPadding,apply({availableWidth:Ce,availableHeight:Fe}){V.value={maxHeight:Fe?`${Fe}px`:void 0,maxWidth:Ce?`${Ce}px`:void 0}}})),re}),M=n.toRef(()=>S.value?void 0:l.placement),{floatingStyles:J,middlewareData:Q,placement:ne,update:ge}=Wd(B,y,{placement:M,middleware:$,strategy:n.toRef(()=>l.strategy),whileElementsMounted:(...U)=>Id(...U,{animationFrame:l.realtime})}),G=n.ref({position:"absolute"});n.watch(Q,()=>{var U;if(l.noHide===!1&&((U=Q.value.hide)!=null&&U.referenceHidden?h.value=!0:h.value=!1),Q.value.arrow){const{x:re,y:Ce}=Q.value.arrow;G.value={position:"absolute",top:Ce?`${Ce}px`:"",left:re?`${re}px`:""}}});const ie=n.computed(()=>{const U=l.tooltip?"tooltip":"popover";return[U,`b-${U}`,{[`b-${U}-${l.variant}`]:l.variant!==null,show:c.value&&!h.value,"pe-none":!c.value,fade:!l.noFade,"d-none":!c.value&&l.noFade,[`${l.customClass}`]:l.customClass!==void 0,[`bs-${U}-${f_(ne.value)}`]:ne.value!==void 0}]}),{isOutside:H}=Ku(y),{isOutside:oe}=Ku(b),ce=U=>{const re=U??new Event("click");c.value?ye(re):he()},be=(U,re={})=>new Ha(U,{cancelable:!1,target:y.value||null,relatedTarget:null,trigger:null,...re,componentId:v.value});let pe;const he=()=>{const U=be("show",{cancelable:!0});if(s("show",U),U.defaultPrevented){s("show-prevented");return}f.value=!0,n.nextTick(()=>{var re;ge(),pe=setTimeout(()=>{ge(),c.value=!0,n.nextTick(()=>{s("shown",be("shown"))})},typeof l.delay=="number"?l.delay:((re=l.delay)==null?void 0:re.show)||0)})},ye=U=>{var re;const Ce=be("hide",{cancelable:!0});if(s("hide",Ce),Ce.defaultPrevented){s("hide-prevented");return}pe&&(clearTimeout(pe),pe=void 0);const Fe=typeof l.delay=="number"?l.delay:((re=l.delay)==null?void 0:re.hide)||0;setTimeout(()=>{var De,de;(U==null?void 0:U.type)==="click"||(U==null?void 0:U.type)==="forceHide"||(U==null?void 0:U.type)==="update:modelValue"&&l.manual||!l.noninteractive&&H.value&&oe.value&&!((De=y.value)!=null&&De.contains(document==null?void 0:document.activeElement))&&!((de=b.value)!=null&&de.contains(document==null?void 0:document.activeElement))||l.noninteractive&&oe.value?(c.value=!1,n.nextTick(()=>{setTimeout(()=>{f.value=!1},y.value?W0(y.value):150),s("hidden",be("hidden"))})):setTimeout(()=>{ye(U)},Fe<50?50:Fe)},Fe)};o({hide:ye,show:he,toggle:ce});const Pe=()=>{var U;if(l.target){const re=Zu(l.target);re?b.value=re:console.warn("Target element not found",l.target)}else b.value=(U=k.value)==null?void 0:U.nextElementSibling;if(l.reference){const re=Zu(l.reference);re?B.value=re:console.warn("Reference element not found",l.reference)}else B.value=b.value;if(!(!b.value||l.manual)&&Sd){if(b.value.addEventListener("forceHide",ye),l.click){b.value.addEventListener("click",ce);return}b.value.addEventListener("pointerenter",he),b.value.addEventListener("pointerleave",ye),b.value.addEventListener("focus",he),b.value.addEventListener("blur",ye)}},Oe=()=>{b.value&&(b.value.removeEventListener("forceHide",ye),b.value.removeEventListener("click",ce),b.value.removeEventListener("pointerenter",he),b.value.removeEventListener("pointerleave",ye),b.value.removeEventListener("focus",he),b.value.removeEventListener("blur",ye))};return Kd(y,()=>{c.value&&l.click&&!l.noAutoClose&&!l.manual&&ye(new Event("clickOutside"))},{ignore:[b]}),n.watch([()=>l.click,()=>l.target,()=>l.reference],()=>{Oe(),Pe()}),n.onMounted(Pe),n.onBeforeUnmount(Oe),(U,re)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("span",{id:n.unref(v)+"_placeholder",ref_key:"placeholder",ref:k},null,8,i_),n.renderSlot(U.$slots,"target",{show:he,hide:ye,toggle:ce,showState:c.value}),(n.openBlock(),n.createBlock(n.Teleport,{to:U.teleportTo,disabled:!U.teleportTo||U.teleportDisabled},[f.value||l.persistent?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,id:n.unref(v)},U.$attrs,{ref_key:"element",ref:y,class:ie.value,role:"tooltip",tabindex:"-1",style:n.unref(J)}),[n.createElementVNode("div",{ref_key:"arrow",ref:x,class:n.normalizeClass(`${l.tooltip?"tooltip":"popover"}-arrow`),style:n.normalizeStyle(G.value),"data-popper-arrow":""},null,6),n.createElementVNode("div",{class:"overflow-auto",style:n.normalizeStyle(V.value)},[U.title||U.$slots.title?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[l.html?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["position-sticky top-0",l.tooltip?"tooltip-inner":"popover-header"]),innerHTML:_.value},null,10,u_)):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["position-sticky top-0",l.tooltip?"tooltip-inner":"popover-header"])},[n.renderSlot(U.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(U.title),1)])],2))],64)):n.createCommentVNode("",!0),l.tooltip&&!U.$slots.title&&!U.title||!l.tooltip?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[l.html?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(l.tooltip?"tooltip-inner":"popover-body"),innerHTML:C.value},null,10,d_)):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(l.tooltip?"tooltip-inner":"popover-body")},[n.renderSlot(U.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(U.content),1)])],2))],64)):n.createCommentVNode("",!0)],4)],16,s_)):n.createCommentVNode("",!0)],8,["to","disabled"]))],64))}}),c_=({top:r,end:o,start:a,alignCenter:l,alignEnd:s})=>{const u=r?"top":a?"left":o?"right":"bottom",c=s?"end":l?null:"start";return`${u}${c?`-${c}`:""}`},f_=r=>{const[o]=r.split("-");switch(o){case"left":return"start";case"right":return"end";default:return o}},Pl=r=>typeof r!="object"||r.active!==!1,ju=(r,o)=>{if(!Pl(r))return{};const a=typeof r>"u"||typeof r=="object"&&!r.title&&!r.content,l=o.getAttribute("title")||o.getAttribute("data-original-title");return a?l?(o.removeAttribute("title"),o.setAttribute("data-original-title",l),{content:Qn(l,Zn)}):{}:typeof r=="string"?{content:Qn(r,Zn)}:{title:r!=null&&r.title?Qn(r==null?void 0:r.title,Zn):void 0,content:r!=null&&r.content?Qn(r==null?void 0:r.content,Zn):void 0}},Xu=(r,o)=>({target:o,modelValue:r.modifiers.show,inline:r.modifiers.inline,click:r.modifiers.click,realtime:r.modifiers.realtime,persistent:r.modifiers.persistent,placement:r.modifiers.left?"left":r.modifiers.right?"right":r.modifiers.bottom?"bottom":r.modifiers.top?"top":void 0,html:!0,...typeof r.value=="object"?r.value:{},...r.modifiers.interactive?{noninteractive:!1}:{},title:null,content:null}),Ju=(r,o,a)=>{var l;const s=document.createElement("span");o.modifiers.body?document.body.appendChild(s):o.modifiers.child?r.appendChild(s):(l=r.parentNode)==null||l.insertBefore(s,r.nextSibling),n.render(n.h(Xd,a),s),r.$__element=s},Yu=r=>{const o=r.$__element;o&&n.render(null,o),setTimeout(()=>{o==null||o.remove()},0),delete r.$__element},Ga=(r,o,a)=>o.concat(["sm","md","lg","xl","xxl"]).reduce((l,s)=>(l[r?`${r}${s.charAt(0).toUpperCase()+s.slice(1)}`:s]=a,l),{}),Jd=(r,o,a,l=a)=>Object.keys(o).reduce((s,u)=>(r[u]&&s.push([l,u.replace(a,""),r[u]].filter(c=>c&&typeof c!="boolean").join("-").toLowerCase()),s),[]),Zu=r=>{if(r)return typeof r=="string"?typeof document>"u"?void 0:document.getElementById(r)??document.querySelector(r)??void 0:r.$el??r},p_=/^[0-9]*\.?[0-9]+$/,kl=/\s+/,v_=r=>{const o=r.trim();return o.charAt(0).toUpperCase()+o.slice(1)},m_=r=>!!(r.href||r.to),Yd=Symbol("tabs"),Zd=Symbol("progress"),Qd=Symbol("checkboxGroup"),ec=Symbol("radioGroup"),tc=Symbol("collapse"),nc=Symbol("collapse"),rc=Symbol("navbar"),h_=Symbol("breadcrumbPlugin"),g_=Symbol("modalManagerPlugin"),y_=Symbol("idPluginKey"),Er=(r,o={},a={})=>{const l=[r];let s;for(let u=0;u<l.length&&!s;u++){const c=l[u];s=a[c]}return s&&typeof s=="function"?s(o):s},b_=(r,o)=>Object.keys(r).filter(a=>!o.map(l=>l.toString()).includes(a)).reduce((a,l)=>({...a,[l]:r[l]}),{}),ac=(r,o)=>[...o].reduce((a,l)=>(a[l]=r[l],a),{}),Xn=(r,o,a)=>{const l=o.split(/[.[\]]/g);let s=r;for(const u of l){if(s==null)return a;u.trim()!==""&&(s=s[u])}return s===void 0?a:s},Qu=(r,o)=>o+(r?v_(r):""),Xl=(r,o)=>{const a=n.toRef(o),l=n.toRef(r),s=n.toRef(()=>m_(l.value)),u=n.computed(()=>s.value?ac(l.value,a.value??["active","activeClass","append","href","rel","replace","routerComponentName","target","to","variant","opacity","opacityHover","underlineVariant","underlineOffset","underlineOffsetHover","underlineOpacity","underlineOpacityHover"]):{});return{computedLink:s,computedLinkProps:u}},__=()=>({...n.inject(h_)}),hn=r=>n.computed(()=>{let o=n.toValue(r);return o={...o,variant:o.variant??null,bgVariant:o.bgVariant??null,textVariant:o.textVariant??null},{[`text-bg-${o.variant}`]:o.variant!==null,[`text-${o.textVariant}`]:o.textVariant!==null&&o.variant===null,[`bg-${o.bgVariant}`]:o.bgVariant!==null&&o.variant===null}}),Nr=r=>n.computed(()=>{const o=n.toValue(r);return o===!0?"is-valid":o===!1?"is-invalid":null}),oc=r=>n.computed(()=>{const o=n.toValue(r);return{"form-check":o.plain===!1&&o.button===!1&&o.hasDefaultSlot,"form-check-reverse":o.reverse===!0,"form-check-inline":o.inline===!0,"form-switch":o.switch===!0,[`form-control-${o.size}`]:o.size!==void 0&&o.size!=="md"&&o.button===!1}}),lc=r=>{const o=n.toRef(r),a=Nr(()=>o.value.state??null);return n.computed(()=>[a.value,{"form-check-input":o.value.plain===!1&&o.value.button===!1,"btn-check":o.value.button===!0}])},ic=r=>n.computed(()=>{const o=n.toValue(r);return{"form-check-label":o.plain===!1&&o.button===!1,btn:o.button===!0,[`btn-${o.buttonVariant}`]:o.button===!0&&o.buttonVariant!==void 0&&o.buttonVariant!==null,[`btn-${o.size}`]:o.button&&o.size&&o.size!=="md"}}),sc=r=>{const o=n.toRef(r),a=Ma(()=>o.value.ariaInvalid,()=>o.value.state);return n.computed(()=>({"aria-invalid":a.value,"aria-required":o.value.required===!0?!0:void 0}))},uc=r=>n.computed(()=>{const o=n.toValue(r);return{"was-validated":o.validated===!0,"btn-group":o.buttons===!0&&o.stacked===!1,"btn-group-vertical":o.stacked===!0&&o.buttons===!0,[`btn-group-${o.size}`]:o.size!==void 0}}),$e=(r,o)=>n.computed(()=>n.toValue(r)||w_(o)),w_=(r="")=>`__BVID__${n.inject(y_,()=>Math.random().toString().slice(2,8))()}___BV_${r}__`,dc=(r,o)=>{const a=n.ref(null),l=l_(r,"modelValue",o,{passive:!0}),s=$e(()=>r.id,"input"),u=ct(()=>r.debounce??0),c=ct(()=>r.debounceMaxWait??NaN),f=Xb(b=>{l.value=b},()=>r.lazy===!0?0:u.value,{maxWait:()=>r.lazy===!0?NaN:c.value}),v=(b,k=!1)=>{r.lazy===!0&&k===!1||f(b)},{focused:h}=Lt(a,{initialValue:r.autofocus}),y=(b,k,_=!1)=>r.formatter!==void 0&&(!r.lazyFormatter||_)?r.formatter(b,k):b,B=b=>r.trim?b.trim():r.number?Number.parseFloat(b):b;n.onMounted(()=>{var b;a.value&&(a.value.value=((b=l.value)==null?void 0:b.toString())??"")}),n.onActivated(()=>{n.nextTick(()=>{r.autofocus&&(h.value=!0)})});const x=Ma(()=>r.ariaInvalid,()=>r.state);return{input:a,computedId:s,computedAriaInvalid:x,onInput:b=>{const{value:k}=b.target,_=y(k,b);if(b.defaultPrevented){b.preventDefault();return}const C=B(_);v(C)},onChange:b=>{const{value:k}=b.target,_=y(k,b);if(b.defaultPrevented){b.preventDefault();return}const C=B(_);l.value!==C&&v(_,!0)},onBlur:b=>{if(!r.lazy&&!r.lazyFormatter)return;const{value:k}=b.target,_=y(k,b,!0),C=B(_);l.value!==C&&v(_,!0)},focus:()=>{r.disabled||(h.value=!0)},blur:()=>{r.disabled||(h.value=!1)}}},cc=(r,o)=>{const a=u=>typeof u=="object"&&u!==null&&"label"in u,l=u=>{if(typeof u=="string")return{value:u,text:u};if(typeof u=="number")return{value:u,text:`${u}`};if(u instanceof Date)return{value:u,text:u.toLocaleString()};const c=Xn(u,o.valueField),f=Xn(u,o.textField),v=Xn(u,o.htmlField),h=Xn(u,o.disabledField),y=o.optionsField?Xn(u,o.optionsField):void 0;return y!==void 0?{label:Xn(u,o.labelField)||f,options:y}:{value:c,text:f,html:v,disabled:h}},s=u=>u.map(c=>l(c));return{normalizedOptions:n.computed(()=>s(n.toValue(r))),isComplex:a}},Sl="modal-open",x_=()=>{const r=n.inject(g_),o=l=>{r==null||r.removeStack(l),r==null||r.removeRegistry(l)},a=t_("updateHTMLAttrs",(l,s,u)=>{const c=typeof l=="string"?window==null?void 0:window.document.querySelector(l):mn(l);c&&(s==="class"?c.classList.toggle(Sl,u===Sl):c.setAttribute(s,u))});return qa(()=>{a("body","class","")}),n.watch(()=>r==null?void 0:r.countStack.value,l=>{l!==void 0&&a("body","class",l>0?Sl:"")}),{...r,dispose:o}},B_=r=>{const{pushRegistry:o,pushStack:a,removeStack:l,stack:s,dispose:u,countStack:c}=x_(),f=n.getCurrentInstance();if(!f||f.type.__name!=="BModal")throw new Error("useModalManager must only use in BModal component");return o==null||o(f),qa(()=>{u(f)}),n.watch(r,(v,h)=>{v?a==null||a(f):h&&!v&&(l==null||l(f))},{immediate:!0}),{activePosition:n.computed(()=>s==null?void 0:s.value.findIndex(v=>{var h,y;return((h=v.exposed)==null?void 0:h.id)===((y=f.exposed)==null?void 0:y.id)})),activeModalCount:c}},C_=(r,o="px")=>n.computed(()=>{const a=n.toValue(r),l=n.toValue(o);return p_.test(String(a))?`${Number(a)}${l}`:a}),fc=r=>{const o=(a,l)=>{const s=l===null?"":`${l}-`;return a==="circle"?`${s}rounded-circle`:a==="pill"?`${s}rounded-pill`:typeof a=="number"||a==="0"||a==="1"||a==="2"||a==="3"||a==="4"||a==="5"?`${s}rounded-${a}`:a==="none"?`${s}rounded-0`:a==="sm"?`${s}rounded-1`:a==="lg"?`${s}rounded-5`:`${s}rounded`};re