@visitscotland/component-library
Version:
VisitScotland Component Library
1 lines • 333 kB
JavaScript
"use strict";const a=require("vue"),dd=require("pinia"),Ht=(n,r)=>{const o=n.__vccOpts||n;for(const[i,s]of r)o[i]=s;return o},Nl=globalThis||void 0||self;var cw={},fw=Object.defineProperty,dw=(n,r,o)=>r in n?fw(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o,bn=(n,r,o)=>(dw(n,typeof r!="symbol"?r+"":r,o),o);const pd=n=>a.computed(()=>{const r=a.toValue(n);return r?`justify-content-${r}`:""}),za=(n,r)=>a.computed(()=>{const o=a.toValue(n),i=a.toValue(r);return o===!0?"true":typeof o=="string"?o:i===!1?"true":o===!1?"false":void 0});class po{constructor(r,o={}){if(bn(this,"cancelable",!0),bn(this,"componentId",null),bn(this,"_defaultPrevented",!1),bn(this,"eventType",""),bn(this,"nativeEvent",null),bn(this,"_preventDefault"),bn(this,"relatedTarget",null),bn(this,"target",null),!r)throw new TypeError(`Failed to construct '${this.constructor.name}'. 1 argument required, ${arguments.length} given.`);Object.assign(this,po.Defaults,o,{eventType:r}),this._preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)}}get defaultPrevented(){return this._defaultPrevented}set defaultPrevented(r){this._defaultPrevented=r}get preventDefault(){return this._preventDefault}set preventDefault(r){this._preventDefault=r}static get Defaults(){return{cancelable:!0,componentId:null,eventType:"",nativeEvent:null,relatedTarget:null,target:null}}}class rs extends po{constructor(r,o={}){super(r,o),bn(this,"trigger",null),Object.assign(this,po.Defaults,o,{eventType:r})}static get Defaults(){return{...super.Defaults,trigger:null}}}const pw=(n,r={})=>{const o=(s=[])=>{const{activeElement:u}=document;return u&&!s.some(c=>c===u)?u:null},i=s=>s===o();try{n.focus(r)}catch(s){console.error(s)}return i(n)},Mn=n=>((n==null?void 0:n())??[]).length===0,hw=n=>{if(n.getAttribute("display")==="none")return!1;const r=n.getBoundingClientRect();return!!(r&&r.height>0&&r.width>0)},vw=n=>{const r=window.getComputedStyle(n),o=r.transitionDelay.split(",")[0]||"",i=r.transitionDuration.split(",")[0]||"",s=Number(o.slice(0,-1))*1e3,u=Number(i.slice(0,-1))*1e3;return s+u},hd=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",vd=["top","right","bottom","left"],tf=["start","end"],nf=vd.reduce((n,r)=>n.concat(r,r+"-"+tf[0],r+"-"+tf[1]),[]),Xt=Math.min,it=Math.max,Ra=Math.round,ma=Math.floor,Un=n=>({x:n,y:n}),mw={left:"right",right:"left",bottom:"top",top:"bottom"},gw={start:"end",end:"start"};function Vl(n,r,o){return it(n,Xt(r,o))}function Sn(n,r){return typeof n=="function"?n(r):n}function Mt(n){return n.split("-")[0]}function Jt(n){return n.split("-")[1]}function md(n){return n==="x"?"y":"x"}function os(n){return n==="y"?"height":"width"}function Mr(n){return["top","bottom"].includes(Mt(n))?"y":"x"}function as(n){return md(Mr(n))}function gd(n,r,o){o===void 0&&(o=!1);const i=Jt(n),s=as(n),u=os(s);let c=s==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(c=Oa(c)),[c,Oa(c)]}function yw(n){const r=Oa(n);return[Fa(n),r,Fa(r)]}function Fa(n){return n.replace(/start|end/g,r=>gw[r])}function bw(n,r,o){const i=["left","right"],s=["right","left"],u=["top","bottom"],c=["bottom","top"];switch(n){case"top":case"bottom":return o?r?s:i:r?i:s;case"left":case"right":return r?u:c;default:return[]}}function _w(n,r,o,i){const s=Jt(n);let u=bw(Mt(n),o==="start",i);return s&&(u=u.map(c=>c+"-"+s),r&&(u=u.concat(u.map(Fa)))),u}function Oa(n){return n.replace(/left|right|bottom|top/g,r=>mw[r])}function ww(n){return{top:0,right:0,bottom:0,left:0,...n}}function is(n){return typeof n!="number"?ww(n):{top:n,right:n,bottom:n,left:n}}function Nr(n){return{...n,top:n.y,left:n.x,right:n.x+n.width,bottom:n.y+n.height}}function rf(n,r,o){let{reference:i,floating:s}=n;const u=Mr(r),c=as(r),h=os(c),g=Mt(r),b=u==="y",v=i.x+i.width/2-s.width/2,S=i.y+i.height/2-s.height/2,k=i[h]/2-s[h]/2;let B;switch(g){case"top":B={x:v,y:i.y-s.height};break;case"bottom":B={x:v,y:i.y+i.height};break;case"right":B={x:i.x+i.width,y:S};break;case"left":B={x:i.x-s.width,y:S};break;default:B={x:i.x,y:i.y}}switch(Jt(r)){case"start":B[c]-=k*(o&&b?-1:1);break;case"end":B[c]+=k*(o&&b?-1:1);break}return B}const xw=async(n,r,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:c}=o,h=u.filter(Boolean),g=await(c.isRTL==null?void 0:c.isRTL(r));let b=await c.getElementRects({reference:n,floating:r,strategy:s}),{x:v,y:S}=rf(b,i,g),k=i,B={},E=0;for(let A=0;A<h.length;A++){const{name:T,fn:$}=h[A],{x:L,y:M,data:D,reset:P}=await $({x:v,y:S,initialPlacement:i,placement:k,strategy:s,middlewareData:B,rects:b,platform:c,elements:{reference:n,floating:r}});v=L??v,S=M??S,B={...B,[T]:{...B[T],...D}},P&&E<=50&&(E++,typeof P=="object"&&(P.placement&&(k=P.placement),P.rects&&(b=P.rects===!0?await c.getElementRects({reference:n,floating:r,strategy:s}):P.rects),{x:v,y:S}=rf(b,k,g)),A=-1)}return{x:v,y:S,placement:k,strategy:s,middlewareData:B}};async function Vr(n,r){var o;r===void 0&&(r={});const{x:i,y:s,platform:u,rects:c,elements:h,strategy:g}=n,{boundary:b="clippingAncestors",rootBoundary:v="viewport",elementContext:S="floating",altBoundary:k=!1,padding:B=0}=Sn(r,n),E=is(B),A=h[k?S==="floating"?"reference":"floating":S],T=Nr(await u.getClippingRect({element:(o=await(u.isElement==null?void 0:u.isElement(A)))==null||o?A:A.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:b,rootBoundary:v,strategy:g})),$=S==="floating"?{...c.floating,x:i,y:s}:c.reference,L=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),M=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},D=Nr(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:$,offsetParent:L,strategy:g}):$);return{top:(T.top-D.top+E.top)/M.y,bottom:(D.bottom-T.bottom+E.bottom)/M.y,left:(T.left-D.left+E.left)/M.x,right:(D.right-T.right+E.right)/M.x}}const Bw=n=>({name:"arrow",options:n,async fn(r){const{x:o,y:i,placement:s,rects:u,platform:c,elements:h,middlewareData:g}=r,{element:b,padding:v=0}=Sn(n,r)||{};if(b==null)return{};const S=is(v),k={x:o,y:i},B=as(s),E=os(B),A=await c.getDimensions(b),T=B==="y",$=T?"top":"left",L=T?"bottom":"right",M=T?"clientHeight":"clientWidth",D=u.reference[E]+u.reference[B]-k[B]-u.floating[E],P=k[B]-u.reference[B],q=await(c.getOffsetParent==null?void 0:c.getOffsetParent(b));let K=q?q[M]:0;(!K||!await(c.isElement==null?void 0:c.isElement(q)))&&(K=h.floating[M]||u.floating[E]);const ee=D/2-P/2,ie=K/2-A[E]/2-1,xe=Xt(S[$],ie),Oe=Xt(S[L],ie),Ce=xe,Ie=K-A[E]-Oe,X=K/2-A[E]/2+ee,pe=Vl(Ce,X,Ie),Be=!g.arrow&&Jt(s)!=null&&X!==pe&&u.reference[E]/2-(X<Ce?xe:Oe)-A[E]/2<0,be=Be?X<Ce?X-Ce:X-Ie:0;return{[B]:k[B]+be,data:{[B]:pe,centerOffset:X-pe-be,...Be&&{alignmentOffset:be}},reset:Be}}});function Sw(n,r,o){return(n?[...o.filter(i=>Jt(i)===n),...o.filter(i=>Jt(i)!==n)]:o.filter(i=>Mt(i)===i)).filter(i=>n?Jt(i)===n||(r?Fa(i)!==i:!1):!0)}const Cw=function(n){return n===void 0&&(n={}),{name:"autoPlacement",options:n,async fn(r){var o,i,s;const{rects:u,middlewareData:c,placement:h,platform:g,elements:b}=r,{crossAxis:v=!1,alignment:S,allowedPlacements:k=nf,autoAlignment:B=!0,...E}=Sn(n,r),A=S!==void 0||k===nf?Sw(S||null,B,k):k,T=await Vr(r,E),$=((o=c.autoPlacement)==null?void 0:o.index)||0,L=A[$];if(L==null)return{};const M=gd(L,u,await(g.isRTL==null?void 0:g.isRTL(b.floating)));if(h!==L)return{reset:{placement:A[0]}};const D=[T[Mt(L)],T[M[0]],T[M[1]]],P=[...((i=c.autoPlacement)==null?void 0:i.overflows)||[],{placement:L,overflows:D}],q=A[$+1];if(q)return{data:{index:$+1,overflows:P},reset:{placement:q}};const K=P.map(ie=>{const xe=Jt(ie.placement);return[ie.placement,xe&&v?ie.overflows.slice(0,2).reduce((Oe,Ce)=>Oe+Ce,0):ie.overflows[0],ie.overflows]}).sort((ie,xe)=>ie[1]-xe[1]),ee=((s=K.filter(ie=>ie[2].slice(0,Jt(ie[0])?2:3).every(xe=>xe<=0))[0])==null?void 0:s[0])||K[0][0];return ee!==h?{data:{index:$+1,overflows:P},reset:{placement:ee}}:{}}}},Ew=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var o,i;const{placement:s,middlewareData:u,rects:c,initialPlacement:h,platform:g,elements:b}=r,{mainAxis:v=!0,crossAxis:S=!0,fallbackPlacements:k,fallbackStrategy:B="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:A=!0,...T}=Sn(n,r);if((o=u.arrow)!=null&&o.alignmentOffset)return{};const $=Mt(s),L=Mt(h)===h,M=await(g.isRTL==null?void 0:g.isRTL(b.floating)),D=k||(L||!A?[Oa(h)]:yw(h));!k&&E!=="none"&&D.push(..._w(h,A,E,M));const P=[h,...D],q=await Vr(r,T),K=[];let ee=((i=u.flip)==null?void 0:i.overflows)||[];if(v&&K.push(q[$]),S){const Ce=gd(s,c,M);K.push(q[Ce[0]],q[Ce[1]])}if(ee=[...ee,{placement:s,overflows:K}],!K.every(Ce=>Ce<=0)){var ie,xe;const Ce=(((ie=u.flip)==null?void 0:ie.index)||0)+1,Ie=P[Ce];if(Ie)return{data:{index:Ce,overflows:ee},reset:{placement:Ie}};let X=(xe=ee.filter(pe=>pe.overflows[0]<=0).sort((pe,Be)=>pe.overflows[1]-Be.overflows[1])[0])==null?void 0:xe.placement;if(!X)switch(B){case"bestFit":{var Oe;const pe=(Oe=ee.map(Be=>[Be.placement,Be.overflows.filter(be=>be>0).reduce((be,_e)=>be+_e,0)]).sort((Be,be)=>Be[1]-be[1])[0])==null?void 0:Oe[0];pe&&(X=pe);break}case"initialPlacement":X=h;break}if(s!==X)return{reset:{placement:X}}}return{}}}};function of(n,r){return{top:n.top-r.height,right:n.right-r.width,bottom:n.bottom-r.height,left:n.left-r.width}}function af(n){return vd.some(r=>n[r]>=0)}const kw=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(r){const{rects:o}=r,{strategy:i="referenceHidden",...s}=Sn(n,r);switch(i){case"referenceHidden":{const u=await Vr(r,{...s,elementContext:"reference"}),c=of(u,o.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:af(c)}}}case"escaped":{const u=await Vr(r,{...s,altBoundary:!0}),c=of(u,o.floating);return{data:{escapedOffsets:c,escaped:af(c)}}}default:return{}}}}};function yd(n){const r=Xt(...n.map(u=>u.left)),o=Xt(...n.map(u=>u.top)),i=it(...n.map(u=>u.right)),s=it(...n.map(u=>u.bottom));return{x:r,y:o,width:i-r,height:s-o}}function Aw(n){const r=n.slice().sort((s,u)=>s.y-u.y),o=[];let i=null;for(let s=0;s<r.length;s++){const u=r[s];!i||u.y-i.y>i.height/2?o.push([u]):o[o.length-1].push(u),i=u}return o.map(s=>Nr(yd(s)))}const Tw=function(n){return n===void 0&&(n={}),{name:"inline",options:n,async fn(r){const{placement:o,elements:i,rects:s,platform:u,strategy:c}=r,{padding:h=2,x:g,y:b}=Sn(n,r),v=Array.from(await(u.getClientRects==null?void 0:u.getClientRects(i.reference))||[]),S=Aw(v),k=Nr(yd(v)),B=is(h);function E(){if(S.length===2&&S[0].left>S[1].right&&g!=null&&b!=null)return S.find(T=>g>T.left-B.left&&g<T.right+B.right&&b>T.top-B.top&&b<T.bottom+B.bottom)||k;if(S.length>=2){if(Mr(o)==="y"){const xe=S[0],Oe=S[S.length-1],Ce=Mt(o)==="top",Ie=xe.top,X=Oe.bottom,pe=Ce?xe.left:Oe.left,Be=Ce?xe.right:Oe.right,be=Be-pe,_e=X-Ie;return{top:Ie,bottom:X,left:pe,right:Be,width:be,height:_e,x:pe,y:Ie}}const T=Mt(o)==="left",$=it(...S.map(xe=>xe.right)),L=Xt(...S.map(xe=>xe.left)),M=S.filter(xe=>T?xe.left===L:xe.right===$),D=M[0].top,P=M[M.length-1].bottom,q=L,K=$,ee=K-q,ie=P-D;return{top:D,bottom:P,left:q,right:K,width:ee,height:ie,x:q,y:D}}return k}const A=await u.getElementRects({reference:{getBoundingClientRect:E},floating:i.floating,strategy:c});return s.reference.x!==A.reference.x||s.reference.y!==A.reference.y||s.reference.width!==A.reference.width||s.reference.height!==A.reference.height?{reset:{rects:A}}:{}}}};async function Rw(n,r){const{placement:o,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=Mt(o),h=Jt(o),g=Mr(o)==="y",b=["left","top"].includes(c)?-1:1,v=u&&g?-1:1,S=Sn(r,n);let{mainAxis:k,crossAxis:B,alignmentAxis:E}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...S};return h&&typeof E=="number"&&(B=h==="end"?E*-1:E),g?{x:B*v,y:k*b}:{x:k*b,y:B*v}}const bd=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var o,i;const{x:s,y:u,placement:c,middlewareData:h}=r,g=await Rw(r,n);return c===((o=h.offset)==null?void 0:o.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:s+g.x,y:u+g.y,data:{...g,placement:c}}}}},Fw=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:o,y:i,placement:s}=r,{mainAxis:u=!0,crossAxis:c=!1,limiter:h={fn:T=>{let{x:$,y:L}=T;return{x:$,y:L}}},...g}=Sn(n,r),b={x:o,y:i},v=await Vr(r,g),S=Mr(Mt(s)),k=md(S);let B=b[k],E=b[S];if(u){const T=k==="y"?"top":"left",$=k==="y"?"bottom":"right",L=B+v[T],M=B-v[$];B=Vl(L,B,M)}if(c){const T=S==="y"?"top":"left",$=S==="y"?"bottom":"right",L=E+v[T],M=E-v[$];E=Vl(L,E,M)}const A=h.fn({...r,[k]:B,[S]:E});return{...A,data:{x:A.x-o,y:A.y-i}}}}},Ow=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){const{placement:o,rects:i,platform:s,elements:u}=r,{apply:c=()=>{},...h}=Sn(n,r),g=await Vr(r,h),b=Mt(o),v=Jt(o),S=Mr(o)==="y",{width:k,height:B}=i.floating;let E,A;b==="top"||b==="bottom"?(E=b,A=v===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(A=b,E=v==="end"?"top":"bottom");const T=B-g[E],$=k-g[A],L=!r.middlewareData.shift;let M=T,D=$;if(S){const q=k-g.left-g.right;D=v||L?Xt($,q):q}else{const q=B-g.top-g.bottom;M=v||L?Xt(T,q):q}if(L&&!v){const q=it(g.left,0),K=it(g.right,0),ee=it(g.top,0),ie=it(g.bottom,0);S?D=k-2*(q!==0||K!==0?q+K:it(g.left,g.right)):M=B-2*(ee!==0||ie!==0?ee+ie:it(g.top,g.bottom))}await c({...r,availableWidth:D,availableHeight:M});const P=await s.getDimensions(u.floating);return k!==P.width||B!==P.height?{reset:{rects:!0}}:{}}}};function xn(n){return ls(n)?(n.nodeName||"").toLowerCase():"#document"}function Ft(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function Cn(n){var r;return(r=(ls(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function ls(n){return n instanceof Node||n instanceof Ft(n).Node}function Bn(n){return n instanceof Element||n instanceof Ft(n).Element}function ln(n){return n instanceof HTMLElement||n instanceof Ft(n).HTMLElement}function lf(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ft(n).ShadowRoot}function go(n){const{overflow:r,overflowX:o,overflowY:i,display:s}=Ut(n);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&!["inline","contents"].includes(s)}function Iw(n){return["table","td","th"].includes(xn(n))}function ss(n){const r=us(),o=Ut(n);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!r&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!r&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(o.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(o.contain||"").includes(i))}function $w(n){let r=Dr(n);for(;ln(r)&&!Ma(r);){if(ss(r))return r;r=Dr(r)}return null}function us(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ma(n){return["html","body","#document"].includes(xn(n))}function Ut(n){return Ft(n).getComputedStyle(n)}function Ua(n){return Bn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Dr(n){if(xn(n)==="html")return n;const r=n.assignedSlot||n.parentNode||lf(n)&&n.host||Cn(n);return lf(r)?r.host:r}function _d(n){const r=Dr(n);return Ma(r)?n.ownerDocument?n.ownerDocument.body:n.body:ln(r)&&go(r)?r:_d(r)}function ho(n,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const s=_d(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),c=Ft(s);return u?r.concat(c,c.visualViewport||[],go(s)?s:[],c.frameElement&&o?ho(c.frameElement):[]):r.concat(s,ho(s,[],o))}function wd(n){const r=Ut(n);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const s=ln(n),u=s?n.offsetWidth:o,c=s?n.offsetHeight:i,h=Ra(o)!==u||Ra(i)!==c;return h&&(o=u,i=c),{width:o,height:i,$:h}}function cs(n){return Bn(n)?n:n.contextElement}function Ir(n){const r=cs(n);if(!ln(r))return Un(1);const o=r.getBoundingClientRect(),{width:i,height:s,$:u}=wd(r);let c=(u?Ra(o.width):o.width)/i,h=(u?Ra(o.height):o.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!h||!Number.isFinite(h))&&(h=1),{x:c,y:h}}const Pw=Un(0);function xd(n){const r=Ft(n);return!us()||!r.visualViewport?Pw:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Lw(n,r,o){return r===void 0&&(r=!1),!o||r&&o!==Ft(n)?!1:r}function lr(n,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const s=n.getBoundingClientRect(),u=cs(n);let c=Un(1);r&&(i?Bn(i)&&(c=Ir(i)):c=Ir(n));const h=Lw(u,o,i)?xd(u):Un(0);let g=(s.left+h.x)/c.x,b=(s.top+h.y)/c.y,v=s.width/c.x,S=s.height/c.y;if(u){const k=Ft(u),B=i&&Bn(i)?Ft(i):i;let E=k,A=E.frameElement;for(;A&&i&&B!==E;){const T=Ir(A),$=A.getBoundingClientRect(),L=Ut(A),M=$.left+(A.clientLeft+parseFloat(L.paddingLeft))*T.x,D=$.top+(A.clientTop+parseFloat(L.paddingTop))*T.y;g*=T.x,b*=T.y,v*=T.x,S*=T.y,g+=M,b+=D,E=Ft(A),A=E.frameElement}}return Nr({width:v,height:S,x:g,y:b})}const Nw=[":popover-open",":modal"];function Bd(n){return Nw.some(r=>{try{return n.matches(r)}catch{return!1}})}function Vw(n){let{elements:r,rect:o,offsetParent:i,strategy:s}=n;const u=s==="fixed",c=Cn(i),h=r?Bd(r.floating):!1;if(i===c||h&&u)return o;let g={scrollLeft:0,scrollTop:0},b=Un(1);const v=Un(0),S=ln(i);if((S||!S&&!u)&&((xn(i)!=="body"||go(c))&&(g=Ua(i)),ln(i))){const k=lr(i);b=Ir(i),v.x=k.x+i.clientLeft,v.y=k.y+i.clientTop}return{width:o.width*b.x,height:o.height*b.y,x:o.x*b.x-g.scrollLeft*b.x+v.x,y:o.y*b.y-g.scrollTop*b.y+v.y}}function Dw(n){return Array.from(n.getClientRects())}function Sd(n){return lr(Cn(n)).left+Ua(n).scrollLeft}function zw(n){const r=Cn(n),o=Ua(n),i=n.ownerDocument.body,s=it(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),u=it(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let c=-o.scrollLeft+Sd(n);const h=-o.scrollTop;return Ut(i).direction==="rtl"&&(c+=it(r.clientWidth,i.clientWidth)-s),{width:s,height:u,x:c,y:h}}function Mw(n,r){const o=Ft(n),i=Cn(n),s=o.visualViewport;let u=i.clientWidth,c=i.clientHeight,h=0,g=0;if(s){u=s.width,c=s.height;const b=us();(!b||b&&r==="fixed")&&(h=s.offsetLeft,g=s.offsetTop)}return{width:u,height:c,x:h,y:g}}function Uw(n,r){const o=lr(n,!0,r==="fixed"),i=o.top+n.clientTop,s=o.left+n.clientLeft,u=ln(n)?Ir(n):Un(1),c=n.clientWidth*u.x,h=n.clientHeight*u.y,g=s*u.x,b=i*u.y;return{width:c,height:h,x:g,y:b}}function sf(n,r,o){let i;if(r==="viewport")i=Mw(n,o);else if(r==="document")i=zw(Cn(n));else if(Bn(r))i=Uw(r,o);else{const s=xd(n);i={...r,x:r.x-s.x,y:r.y-s.y}}return Nr(i)}function Cd(n,r){const o=Dr(n);return o===r||!Bn(o)||Ma(o)?!1:Ut(o).position==="fixed"||Cd(o,r)}function Hw(n,r){const o=r.get(n);if(o)return o;let i=ho(n,[],!1).filter(h=>Bn(h)&&xn(h)!=="body"),s=null;const u=Ut(n).position==="fixed";let c=u?Dr(n):n;for(;Bn(c)&&!Ma(c);){const h=Ut(c),g=ss(c);!g&&h.position==="fixed"&&(s=null),(u?!g&&!s:!g&&h.position==="static"&&s&&["absolute","fixed"].includes(s.position)||go(c)&&!g&&Cd(n,c))?i=i.filter(b=>b!==c):s=h,c=Dr(c)}return r.set(n,i),i}function Ww(n){let{element:r,boundary:o,rootBoundary:i,strategy:s}=n;const u=[...o==="clippingAncestors"?Hw(r,this._c):[].concat(o),i],c=u[0],h=u.reduce((g,b)=>{const v=sf(r,b,s);return g.top=it(v.top,g.top),g.right=Xt(v.right,g.right),g.bottom=Xt(v.bottom,g.bottom),g.left=it(v.left,g.left),g},sf(r,c,s));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function qw(n){const{width:r,height:o}=wd(n);return{width:r,height:o}}function Gw(n,r,o){const i=ln(r),s=Cn(r),u=o==="fixed",c=lr(n,!0,u,r);let h={scrollLeft:0,scrollTop:0};const g=Un(0);if(i||!i&&!u)if((xn(r)!=="body"||go(s))&&(h=Ua(r)),i){const S=lr(r,!0,u,r);g.x=S.x+r.clientLeft,g.y=S.y+r.clientTop}else s&&(g.x=Sd(s));const b=c.left+h.scrollLeft-g.x,v=c.top+h.scrollTop-g.y;return{x:b,y:v,width:c.width,height:c.height}}function uf(n,r){return!ln(n)||Ut(n).position==="fixed"?null:r?r(n):n.offsetParent}function Ed(n,r){const o=Ft(n);if(!ln(n)||Bd(n))return o;let i=uf(n,r);for(;i&&Iw(i)&&Ut(i).position==="static";)i=uf(i,r);return i&&(xn(i)==="html"||xn(i)==="body"&&Ut(i).position==="static"&&!ss(i))?o:i||$w(n)||o}const jw=async function(n){const r=this.getOffsetParent||Ed,o=this.getDimensions;return{reference:Gw(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,...await o(n.floating)}}};function Kw(n){return Ut(n).direction==="rtl"}const Jw={convertOffsetParentRelativeRectToViewportRelativeRect:Vw,getDocumentElement:Cn,getClippingRect:Ww,getOffsetParent:Ed,getElementRects:jw,getClientRects:Dw,getDimensions:qw,getScale:Ir,isElement:Bn,isRTL:Kw};function Xw(n,r){let o=null,i;const s=Cn(n);function u(){var h;clearTimeout(i),(h=o)==null||h.disconnect(),o=null}function c(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),u();const{left:b,top:v,width:S,height:k}=n.getBoundingClientRect();if(h||r(),!S||!k)return;const B=ma(v),E=ma(s.clientWidth-(b+S)),A=ma(s.clientHeight-(v+k)),T=ma(b),$={rootMargin:-B+"px "+-E+"px "+-A+"px "+-T+"px",threshold:it(0,Xt(1,g))||1};let L=!0;function M(D){const P=D[0].intersectionRatio;if(P!==g){if(!L)return c();P?c(!1,P):i=setTimeout(()=>{c(!1,1e-7)},100)}L=!1}try{o=new IntersectionObserver(M,{...$,root:s.ownerDocument})}catch{o=new IntersectionObserver(M,$)}o.observe(n)}return c(!0),u}function kd(n,r,o,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=i,b=cs(n),v=s||u?[...b?ho(b):[],...ho(r)]:[];v.forEach($=>{s&&$.addEventListener("scroll",o,{passive:!0}),u&&$.addEventListener("resize",o)});const S=b&&h?Xw(b,o):null;let k=-1,B=null;c&&(B=new ResizeObserver($=>{let[L]=$;L&&L.target===b&&B&&(B.unobserve(r),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var M;(M=B)==null||M.observe(r)})),o()}),b&&!g&&B.observe(b),B.observe(r));let E,A=g?lr(n):null;g&&T();function T(){const $=lr(n);A&&($.x!==A.x||$.y!==A.y||$.width!==A.width||$.height!==A.height)&&o(),A=$,E=requestAnimationFrame(T)}return o(),()=>{var $;v.forEach(L=>{s&&L.removeEventListener("scroll",o),u&&L.removeEventListener("resize",o)}),S==null||S(),($=B)==null||$.disconnect(),B=null,g&&cancelAnimationFrame(E)}}const Yw=Cw,Ad=Fw,Td=Ew,Rd=Ow,Zw=kw,Qw=Bw,e1=Tw,t1=(n,r,o)=>{const i=new Map,s={platform:Jw,...o},u={...s.platform,_c:i};return xw(n,r,{...s,platform:u})};function n1(n){return n!=null&&typeof n=="object"&&"$el"in n}function Dl(n){if(n1(n)){const r=n.$el;return ls(r)&&xn(r)==="#comment"?null:r}return n}function r1(n){return{name:"arrow",options:n,fn(r){const o=Dl(a.unref(n.element));return o==null?{}:Qw({element:o,padding:n.padding}).fn(r)}}}function Fd(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function cf(n,r){const o=Fd(n);return Math.round(r*o)/o}function Od(n,r,o){o===void 0&&(o={});const i=o.whileElementsMounted,s=a.computed(()=>{var K;return(K=a.unref(o.open))!=null?K:!0}),u=a.computed(()=>a.unref(o.middleware)),c=a.computed(()=>{var K;return(K=a.unref(o.placement))!=null?K:"bottom"}),h=a.computed(()=>{var K;return(K=a.unref(o.strategy))!=null?K:"absolute"}),g=a.computed(()=>{var K;return(K=a.unref(o.transform))!=null?K:!0}),b=a.computed(()=>Dl(n.value)),v=a.computed(()=>Dl(r.value)),S=a.ref(0),k=a.ref(0),B=a.ref(h.value),E=a.ref(c.value),A=a.shallowRef({}),T=a.ref(!1),$=a.computed(()=>{const K={position:B.value,left:"0",top:"0"};if(!v.value)return K;const ee=cf(v.value,S.value),ie=cf(v.value,k.value);return g.value?{...K,transform:"translate("+ee+"px, "+ie+"px)",...Fd(v.value)>=1.5&&{willChange:"transform"}}:{position:B.value,left:ee+"px",top:ie+"px"}});let L;function M(){b.value==null||v.value==null||t1(b.value,v.value,{middleware:u.value,placement:c.value,strategy:h.value}).then(K=>{S.value=K.x,k.value=K.y,B.value=K.strategy,E.value=K.placement,A.value=K.middlewareData,T.value=!0})}function D(){typeof L=="function"&&(L(),L=void 0)}function P(){if(D(),i===void 0){M();return}if(b.value!=null&&v.value!=null){L=i(b.value,v.value,M);return}}function q(){s.value||(T.value=!1)}return a.watch([u,c,h],M,{flush:"sync"}),a.watch([b,v],P,{flush:"sync"}),a.watch(s,q,{flush:"sync"}),a.getCurrentScope()&&a.onScopeDispose(D),{x:a.shallowReadonly(S),y:a.shallowReadonly(k),strategy:a.shallowReadonly(B),placement:a.shallowReadonly(E),middlewareData:a.shallowReadonly(A),isPositioned:a.shallowReadonly(T),floatingStyles:$,update:M}}const o1=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),a1=/^aria-[\w-]*$/i,i1=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,l1=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,s1=(n,r)=>{const o=n.nodeName.toLowerCase();return r.includes(o)?o1.has(o)?!!(i1.test(n.nodeValue||"")||l1.test(n.nodeValue||"")):!0:r.filter(i=>i instanceof RegExp).some(i=>i.test(o))},Rr={"*":["class","dir","id","lang","role",a1],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:[]},Fr=(n,r,o)=>{if(!n.length)return n;const i=new window.DOMParser().parseFromString(n,"text/html"),s=i.body.querySelectorAll("*");for(const u of s){const c=u.nodeName.toLowerCase();if(!Object.keys(r).includes(c)){u.remove();continue}const h=u.attributes,g=[...r["*"]||[],...r[c]||[]];for(const b of h)s1(b,g)||u.removeAttribute(b.nodeName)}return i.body.innerHTML};function Ha(n){return a.getCurrentScope()?(a.onScopeDispose(n),!0):!1}function u1(n,r){if(typeof Symbol<"u"){const o={...n};return Object.defineProperty(o,Symbol.iterator,{enumerable:!1,value(){let i=0;return{next:()=>({value:r[i++],done:i>r.length})}}}),o}else return Object.assign([...r],n)}function wn(n){return typeof n=="function"?n():a.unref(n)}const Id=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const c1=n=>typeof n<"u",f1=Object.prototype.toString,d1=n=>f1.call(n)==="[object Object]",or=()=>{},zl=p1();function p1(){var n,r;return Id&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((r=window==null?void 0:window.navigator)==null?void 0:r.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function h1(n,r){function o(...i){return new Promise((s,u)=>{Promise.resolve(n(()=>r.apply(this,i),{fn:r,thisArg:this,args:i})).then(s).catch(u)})}return o}function v1(n,r={}){let o,i,s=or;const u=c=>{clearTimeout(c),s(),s=or};return c=>{const h=wn(n),g=wn(r.maxWait);return o&&u(o),h<=0||g!==void 0&&g<=0?(i&&(u(i),i=null),Promise.resolve(c())):new Promise((b,v)=>{s=r.rejectOnCancel?v:b,g&&!i&&(i=setTimeout(()=>{o&&u(o),i=null,b(c())},g)),o=setTimeout(()=>{i&&u(i),i=null,b(c())},h)})}}function m1(n){const r=Object.create(null);return o=>r[o]||(r[o]=n(o))}const g1=/-(\w)/g,y1=m1(n=>n.replace(g1,(r,o)=>o?o.toUpperCase():""));function b1(...n){if(n.length!==1)return a.toRef(...n);const r=n[0];return typeof r=="function"?a.readonly(a.customRef(()=>({get:r,set:or}))):a.ref(r)}function _1(n,r=200,o={}){return h1(v1(r,o),n)}function Tt(n,r={}){const{method:o="parseFloat",radix:i,nanToZero:s}=r;return a.computed(()=>{let u=wn(n);return typeof u=="string"&&(u=Number[o](u,i)),s&&Number.isNaN(u)&&(u=0),u})}function $d(n={}){const{inheritAttrs:r=!0}=n,o=a.shallowRef(),i=a.defineComponent({setup(u,{slots:c}){return()=>{o.value=c.default}}}),s=a.defineComponent({inheritAttrs:r,setup(u,{attrs:c,slots:h}){return()=>{var g;if(!o.value&&cw.NODE_ENV!=="production")throw new Error("[VueUse] Failed to find the definition of reusable template");const b=(g=o.value)==null?void 0:g.call(o,{...w1(c),$slots:h});return r&&(b==null?void 0:b.length)===1?b[0]:b}}});return u1({define:i,reuse:s},[i,s])}function w1(n){const r={};for(const o in n)r[y1(o)]=n[o];return r}function Dn(n){var r;const o=wn(n);return(r=o==null?void 0:o.$el)!=null?r:o}const yo=Id?window:void 0;function Rt(...n){let r,o,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([o,i,s]=n,r=yo):[r,o,i,s]=n,!r)return or;Array.isArray(o)||(o=[o]),Array.isArray(i)||(i=[i]);const u=[],c=()=>{u.forEach(v=>v()),u.length=0},h=(v,S,k,B)=>(v.addEventListener(S,k,B),()=>v.removeEventListener(S,k,B)),g=a.watch(()=>[Dn(r),wn(s)],([v,S])=>{if(c(),!v)return;const k=d1(S)?{...S}:S;u.push(...o.flatMap(B=>i.map(E=>h(v,B,E,k))))},{immediate:!0,flush:"post"}),b=()=>{g(),c()};return Ha(b),b}let ff=!1;function Pd(n,r,o={}){const{window:i=yo,ignore:s=[],capture:u=!0,detectIframe:c=!1}=o;if(!i)return or;zl&&!ff&&(ff=!0,Array.from(i.document.body.children).forEach(v=>v.addEventListener("click",or)),i.document.documentElement.addEventListener("click",or));let h=!0;const g=v=>s.some(S=>{if(typeof S=="string")return Array.from(i.document.querySelectorAll(S)).some(k=>k===v.target||v.composedPath().includes(k));{const k=Dn(S);return k&&(v.target===k||v.composedPath().includes(k))}}),b=[Rt(i,"click",v=>{const S=Dn(n);if(!(!S||S===v.target||v.composedPath().includes(S))){if(v.detail===0&&(h=!g(v)),!h){h=!0;return}r(v)}},{passive:!0,capture:u}),Rt(i,"pointerdown",v=>{const S=Dn(n);h=!g(v)&&!!(S&&!v.composedPath().includes(S))},{passive:!0}),c&&Rt(i,"blur",v=>{setTimeout(()=>{var S;const k=Dn(n);((S=i.document.activeElement)==null?void 0:S.tagName)==="IFRAME"&&!(k!=null&&k.contains(i.document.activeElement))&&r(v)},0)})].filter(Boolean);return()=>b.forEach(v=>v())}function x1(n){return typeof n=="function"?n:typeof n=="string"?r=>r.key===n:Array.isArray(n)?r=>n.includes(r.key):()=>!0}function tr(...n){let r,o,i={};n.length===3?(r=n[0],o=n[1],i=n[2]):n.length===2?typeof n[1]=="object"?(r=!0,o=n[0],i=n[1]):(r=n[0],o=n[1]):(r=!0,o=n[0]);const{target:s=yo,eventName:u="keydown",passive:c=!1,dedupe:h=!1}=i,g=x1(r);return Rt(s,u,b=>{b.repeat&&wn(h)||g(b)&&o(b)},c)}function B1(n){return JSON.parse(JSON.stringify(n))}const ga=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Nl<"u"?Nl:typeof self<"u"?self:{},ya="__vueuse_ssr_handlers__",S1=C1();function C1(){return ya in ga||(ga[ya]=ga[ya]||{}),ga[ya]}function E1(n,r){return S1[n]||r}function an(n,r={}){const{initialValue:o=!1,focusVisible:i=!1}=r,s=a.ref(!1),u=a.computed(()=>Dn(n));Rt(u,"focus",h=>{var g,b;(!i||(b=(g=h.target).matches)!=null&&b.call(g,":focus-visible"))&&(s.value=!0)}),Rt(u,"blur",()=>s.value=!1);const c=a.computed({get:()=>s.value,set(h){var g,b;!h&&s.value?(g=u.value)==null||g.blur():h&&!s.value&&((b=u.value)==null||b.focus())}});return a.watch(u,()=>{c.value=o},{immediate:!0,flush:"post"}),{focused:c}}function ml(n){return typeof Window<"u"&&n instanceof Window?n.document.documentElement:typeof Document<"u"&&n instanceof Document?n.documentElement:n}const k1={page:n=>[n.pageX,n.pageY],client:n=>[n.clientX,n.clientY],screen:n=>[n.screenX,n.screenY],movement:n=>n instanceof Touch?null:[n.movementX,n.movementY]};function A1(n={}){const{type:r="page",touch:o=!0,resetOnTouchEnds:i=!1,initialValue:s={x:0,y:0},window:u=yo,target:c=u,scroll:h=!0,eventFilter:g}=n;let b=null;const v=a.ref(s.x),S=a.ref(s.y),k=a.ref(null),B=typeof r=="function"?r:k1[r],E=P=>{const q=B(P);b=P,q&&([v.value,S.value]=q,k.value="mouse")},A=P=>{if(P.touches.length>0){const q=B(P.touches[0]);q&&([v.value,S.value]=q,k.value="touch")}},T=()=>{if(!b||!u)return;const P=B(b);b instanceof MouseEvent&&P&&(v.value=P[0]+u.scrollX,S.value=P[1]+u.scrollY)},$=()=>{v.value=s.x,S.value=s.y},L=g?P=>g(()=>E(P),{}):P=>E(P),M=g?P=>g(()=>A(P),{}):P=>A(P),D=g?()=>g(()=>T(),{}):()=>T();if(c){const P={passive:!0};Rt(c,["mousemove","dragover"],L,P),o&&r!=="movement"&&(Rt(c,["touchstart","touchmove"],M,P),i&&Rt(c,"touchend",$,P)),h&&r==="page"&&Rt(u,"scroll",D,{passive:!0})}return{x:v,y:S,sourceType:k}}function df(n,r={}){const{handleOutside:o=!0,window:i=yo}=r,s=r.type||"page",{x:u,y:c,sourceType:h}=A1(r),g=a.ref(n??(i==null?void 0:i.document.body)),b=a.ref(0),v=a.ref(0),S=a.ref(0),k=a.ref(0),B=a.ref(0),E=a.ref(0),A=a.ref(!0);let T=()=>{};return i&&(T=a.watch([g,u,c],()=>{const $=Dn(g);if(!$)return;const{left:L,top:M,width:D,height:P}=$.getBoundingClientRect();S.value=L+(s==="page"?i.pageXOffset:0),k.value=M+(s==="page"?i.pageYOffset:0),B.value=P,E.value=D;const q=u.value-S.value,K=c.value-k.value;A.value=D===0||P===0||q<0||K<0||q>D||K>P,(o||!A.value)&&(b.value=q,v.value=K)},{immediate:!0}),Rt(document,"mouseleave",()=>{A.value=!0})),{x:u,y:c,sourceType:h,elementX:b,elementY:v,elementPositionX:S,elementPositionY:k,elementHeight:B,elementWidth:E,isOutside:A,stop:T}}function Ld(n){const r=window.getComputedStyle(n);if(r.overflowX==="scroll"||r.overflowY==="scroll"||r.overflowX==="auto"&&n.clientWidth<n.scrollWidth||r.overflowY==="auto"&&n.clientHeight<n.scrollHeight)return!0;{const o=n.parentNode;return!o||o.tagName==="BODY"?!1:Ld(o)}}function T1(n){const r=n||window.event,o=r.target;return Ld(o)?!1:r.touches.length>1?!0:(r.preventDefault&&r.preventDefault(),!1)}const ba=new WeakMap;function R1(n,r=!1){const o=a.ref(r);let i=null;a.watch(b1(n),c=>{const h=ml(wn(c));if(h){const g=h;ba.get(g)||ba.set(g,g.style.overflow),o.value&&(g.style.overflow="hidden")}},{immediate:!0});const s=()=>{const c=ml(wn(n));!c||o.value||(zl&&(i=Rt(c,"touchmove",h=>{T1(h)},{passive:!1})),c.style.overflow="hidden",o.value=!0)},u=()=>{var c;const h=ml(wn(n));!h||!o.value||(zl&&(i==null||i()),h.style.overflow=(c=ba.get(h))!=null?c:"",ba.delete(h),o.value=!1)};return Ha(u),a.computed({get(){return o.value},set(c){c?s():u()}})}function F1(n,r,o,i={}){var s,u,c;const{clone:h=!1,passive:g=!1,eventName:b,deep:v=!1,defaultValue:S,shouldEmit:k}=i,B=a.getCurrentInstance(),E=o||(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 A=b;A=A||`update:${r.toString()}`;const T=M=>h?typeof h=="function"?h(M):B1(M):M,$=()=>c1(n[r])?T(n[r]):S,L=M=>{k?k(M)&&E(A,M):E(A,M)};if(g){const M=$(),D=a.ref(M);let P=!1;return a.watch(()=>n[r],q=>{P||(P=!0,D.value=T(q),a.nextTick(()=>P=!1))}),a.watch(D,q=>{!P&&(q!==n[r]||v)&&L(q)},{deep:v}),D}else return a.computed({get(){return $()},set(M){L(M)}})}const O1=["id"],I1=["id"],$1=["innerHTML"],P1=["innerHTML"],Nd=a.defineComponent({inheritAttrs:!1,__name:"BPopover",props:a.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:a.mergeModels(["hidden","hide","hide-prevented","show","show-prevented","shown"],["update:modelValue"]),setup(n,{expose:r,emit:o}){const i=n,s=o,u=a.useModel(n,"modelValue"),c=a.ref(u.value),h=a.ref(u.value);a.watchEffect(()=>{u.value=c.value}),a.watch(u,Z=>{Z!==c.value&&(Z?Ge():Le(new Event("update:modelValue")))});const g=Xe(()=>i.id,"popover"),b=a.ref(!1),v=a.ref(null),S=a.ref(null),k=a.ref(null),B=a.ref(null),E=a.ref(null),A=a.computed(()=>i.title?Fr(i.title,Rr):""),T=a.computed(()=>i.content?Fr(i.content,Rr):""),$=a.toRef(()=>i.placement.startsWith("auto")),L=Tt(()=>i.offset??NaN),M=a.computed(()=>i.boundary==="document"||i.boundary==="viewport"?void 0:i.boundary),D=a.computed(()=>i.boundary==="document"||i.boundary==="viewport"?i.boundary:void 0),P=a.ref({}),q=a.computed(()=>{if(i.floatingMiddleware!==void 0)return i.floatingMiddleware;const Z=i.offset!==null?L.value:i.tooltip?6:8,te=[bd(Z)];return i.noFlip===!1&&!$.value&&te.push(Td({boundary:M.value,rootBoundary:D.value,padding:i.boundaryPadding})),$.value&&te.push(Yw({alignment:i.placement.split("-")[1]||void 0,boundary:M.value,rootBoundary:D.value,padding:i.boundaryPadding})),i.noShift===!1&&te.push(Ad({boundary:M.value,rootBoundary:D.value,padding:i.boundaryPadding})),i.noHide===!1&&te.push(Zw({boundary:M.value,rootBoundary:D.value,padding:i.boundaryPadding})),i.inline===!0&&te.push(e1()),te.push(r1({element:k,padding:10})),i.noSize===!1&&te.push(Rd({boundary:M.value,rootBoundary:D.value,padding:i.boundaryPadding,apply({availableWidth:ve,availableHeight:et}){P.value={maxHeight:et?`${et}px`:void 0,maxWidth:ve?`${ve}px`:void 0}}})),te}),K=a.toRef(()=>$.value?void 0:i.placement),{floatingStyles:ee,middlewareData:ie,placement:xe,update:Oe}=Od(S,v,{placement:K,middleware:q,strategy:a.toRef(()=>i.strategy),whileElementsMounted:(...Z)=>kd(...Z,{animationFrame:i.realtime})}),Ce=a.ref({position:"absolute"});a.watch(ie,()=>{var Z;if(i.noHide===!1&&((Z=ie.value.hide)!=null&&Z.referenceHidden?b.value=!0:b.value=!1),ie.value.arrow){const{x:te,y:ve}=ie.value.arrow;Ce.value={position:"absolute",top:ve?`${ve}px`:"",left:te?`${te}px`:""}}});const Ie=a.computed(()=>{const Z=i.tooltip?"tooltip":"popover";return[Z,`b-${Z}`,{[`b-${Z}-${i.variant}`]:i.variant!==null,show:c.value&&!b.value,"pe-none":!c.value,fade:!i.noFade,"d-none":!c.value&&i.noFade,[`${i.customClass}`]:i.customClass!==void 0,[`bs-${Z}-${N1(xe.value)}`]:xe.value!==void 0}]}),{isOutside:X}=df(v),{isOutside:pe}=df(B),Be=Z=>{const te=Z??new Event("click");c.value?Le(te):Ge()},be=(Z,te={})=>new rs(Z,{cancelable:!1,target:v.value||null,relatedTarget:null,trigger:null,...te,componentId:g.value});let _e;const Ge=()=>{const Z=be("show",{cancelable:!0});if(s("show",Z),Z.defaultPrevented){s("show-prevented");return}h.value=!0,a.nextTick(()=>{var te;Oe(),_e=setTimeout(()=>{Oe(),c.value=!0,a.nextTick(()=>{s("shown",be("shown"))})},typeof i.delay=="number"?i.delay:((te=i.delay)==null?void 0:te.show)||0)})},Le=Z=>{var te;const ve=be("hide",{cancelable:!0});if(s("hide",ve),ve.defaultPrevented){s("hide-prevented");return}_e&&(clearTimeout(_e),_e=void 0);const et=typeof i.delay=="number"?i.delay:((te=i.delay)==null?void 0:te.hide)||0;setTimeout(()=>{var sn,Ye;(Z==null?void 0:Z.type)==="click"||(Z==null?void 0:Z.type)==="forceHide"||(Z==null?void 0:Z.type)==="update:modelValue"&&i.manual||!i.noninteractive&&X.value&&pe.value&&!((sn=v.value)!=null&&sn.contains(document==null?void 0:document.activeElement))&&!((Ye=B.value)!=null&&Ye.contains(document==null?void 0:document.activeElement))||i.noninteractive&&pe.value?(c.value=!1,a.nextTick(()=>{setTimeout(()=>{h.value=!1},v.value?vw(v.value):150),s("hidden",be("hidden"))})):setTimeout(()=>{Le(Z)},et<50?50:et)},et)};r({hide:Le,show:Ge,toggle:Be});const je=()=>{var Z;if(i.target){const te=gf(i.target);te?B.value=te:console.warn("Target element not found",i.target)}else B.value=(Z=E.value)==null?void 0:Z.nextElementSibling;if(i.reference){const te=gf(i.reference);te?S.value=te:console.warn("Reference element not found",i.reference)}else S.value=B.value;if(!(!B.value||i.manual)&&hd){if(B.value.addEventListener("forceHide",Le),i.click){B.value.addEventListener("click",Be);return}B.value.addEventListener("pointerenter",Ge),B.value.addEventListener("pointerleave",Le),B.value.addEventListener("focus",Ge),B.value.addEventListener("blur",Le)}},Wt=()=>{B.value&&(B.value.removeEventListener("forceHide",Le),B.value.removeEventListener("click",Be),B.value.removeEventListener("pointerenter",Ge),B.value.removeEventListener("pointerleave",Le),B.value.removeEventListener("focus",Ge),B.value.removeEventListener("blur",Le))};return Pd(v,()=>{c.value&&i.click&&!i.noAutoClose&&!i.manual&&Le(new Event("clickOutside"))},{ignore:[B]}),a.watch([()=>i.click,()=>i.target,()=>i.reference],()=>{Wt(),je()}),a.onMounted(je),a.onBeforeUnmount(Wt),(Z,te)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("span",{id:a.unref(g)+"_placeholder",ref_key:"placeholder",ref:E},null,8,O1),a.renderSlot(Z.$slots,"target",{show:Ge,hide:Le,toggle:Be,showState:c.value}),(a.openBlock(),a.createBlock(a.Teleport,{to:Z.teleportTo,disabled:!Z.teleportTo||Z.teleportDisabled},[h.value||i.persistent?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,id:a.unref(g)},Z.$attrs,{ref_key:"element",ref:v,class:Ie.value,role:"tooltip",tabindex:"-1",style:a.unref(ee)}),[a.createElementVNode("div",{ref_key:"arrow",ref:k,class:a.normalizeClass(`${i.tooltip?"tooltip":"popover"}-arrow`),style:a.normalizeStyle(Ce.value),"data-popper-arrow":""},null,6),a.createElementVNode("div",{class:"overflow-auto",style:a.normalizeStyle(P.value)},[Z.title||Z.$slots.title?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[i.html?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["position-sticky top-0",i.tooltip?"tooltip-inner":"popover-header"]),innerHTML:A.value},null,10,$1)):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["position-sticky top-0",i.tooltip?"tooltip-inner":"popover-header"])},[a.renderSlot(Z.$slots,"title",{},()=>[a.createTextVNode(a.toDisplayString(Z.title),1)])],2))],64)):a.createCommentVNode("",!0),i.tooltip&&!Z.$slots.title&&!Z.title||!i.tooltip?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[i.html?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(i.tooltip?"tooltip-inner":"popover-body"),innerHTML:T.value},null,10,P1)):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(i.tooltip?"tooltip-inner":"popover-body")},[a.renderSlot(Z.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(Z.content),1)])],2))],64)):a.createCommentVNode("",!0)],4)],16,I1)):a.createCommentVNode("",!0)],8,["to","disabled"]))],64))}}),L1=({top:n,end:r,start:o,alignCenter:i,alignEnd:s})=>{const u=n?"top":o?"left":r?"right":"bottom",c=s?"end":i?null:"start";return`${u}${c?`-${c}`:""}`},N1=n=>{const[r]=n.split("-");switch(r){case"left":return"start";case"right":return"end";default:return r}},Ml=n=>typeof n!="object"||n.active!==!1,pf=(n,r)=>{if(!Ml(n))return{};const o=typeof n>"u"||typeof n=="object"&&!n.title&&!n.content,i=r.getAttribute("title")||r.getAttribute("data-original-title");return o?i?(r.removeAttribute("title"),r.setAttribute("data-original-title",i),{content:Fr(i,Rr)}):{}:typeof n=="string"?{content:Fr(n,Rr)}:{title:n!=null&&n.title?Fr(n==null?void 0:n.title,Rr):void 0,content:n!=null&&n.content?Fr(n==null?void 0:n.content,Rr):void 0}},hf=(n,r)=>({target:r,modelValue:n.modifiers.show,inline:n.modifiers.inline,click:n.modifiers.click,realtime:n.modifiers.realtime,persistent:n.modifiers.persistent,placement:n.modifiers.left?"left":n.modifiers.right?"right":n.modifiers.bottom?"bottom":n.modifiers.top?"top":void 0,html:!0,...typeof n.value=="object"?n.value:{},...n.modifiers.interactive?{noninteractive:!1}:{},title:null,content:null}),vf=(n,r,o)=>{var i;const s=document.createElement("span");r.modifiers.body?document.body.appendChild(s):r.modifiers.child?n.appendChild(s):(i=n.parentNode)==null||i.insertBefore(s,n.nextSibling),a.render(a.h(Nd,o),s),n.$__element=s},mf=n=>{const r=n.$__element;r&&a.render(null,r),setTimeout(()=>{r==null||r.remove()},0),delete n.$__element},Wa=(n,r,o)=>r.concat(["sm","md","lg","xl","xxl"]).reduce((i,s)=>(i[n?`${n}${s.charAt(0).toUpperCase()+s.slice(1)}`:s]=o,i),{}),Vd=(n,r,o,i=o)=>Object.keys(r).reduce((s,u)=>(n[u]&&s.push([i,u.replace(o,""),n[u]].filter(c=>c&&typeof c!="boolean").join("-").toLowerCase()),s),[]),gf=n=>{if(n)return typeof n=="string"?typeof document>"u"?void 0:document.getElementById(n)??document.querySelector(n)??void 0:n.$el??n},V1=/^[0-9]*\.?[0-9]+$/,gl=/\s+/,D1=n=>{const r=n.trim();return r.charAt(0).toUpperCase()+r.slice(1)},z1=n=>!!(n.href||n.to),Dd=Symbol("tabs"),zd=Symbol("progress"),Md=Symbol("checkboxGroup"),Ud=Symbol("radioGroup"),Hd=Symbol("collapse"),Wd=Symbol("collapse"),qd=Symbol("navbar"),M1=Symbol("breadcrumbPlugin"),U1=Symbol("modalManagerPlugin"),H1=Symbol("idPluginKey"),uo=(n,r={},o={})=>{const i=[n];let s;for(let u=0;u<i.length&&!s;u++){const c=i[u];s=o[c]}return s&&typeof s=="function"?s(r):s},W1=(n,r)=>Object.keys(n).filter(o=>!r.map(i=>i.toString()).includes(o)).reduce((o,i)=>({...o,[i]:n[i]}),{}),Gd=(n,r)=>[...r].reduce((o,i)=>(o[i]=n[i],o),{}),Cr=(n,r,o)=>{const i=r.split(/[.[\]]/g);let s=n;for(const u of i){if(s==null)return o;u.trim()!==""&&(s=s[u])}return s===void 0?o:s},yf=(n,r)=>r+(n?D1(n):""),fs=(n,r)=>{const o=a.toRef(r),i=a.toRef(n),s=a.toRef(()=>z1(i.value)),u=a.computed(()=>s.value?Gd(i.value,o.value??["active","activeClass","append","href","rel","replace","routerComponentName","target","to","variant","opacity","opacityHover","underlineVariant","underlineOffset","underlineOffsetHover","underlineOpacity","underlineOpacityHover"]):{});return{computedLink:s,computedLinkProps:u}},q1=()=>({...a.inject(M1)}),zn=n=>a.computed(()=>{let r=a.toValue(n);return r={...r,variant:r.variant??null,bgVariant:r.bgVariant??null,textVariant:r.textVariant??null},{[`text-bg-${r.variant}`]:r.variant!==null,[`text-${r.textVariant}`]:r.textVariant!==null&&r.variant===null,[`bg-${r.bgVariant}`]:r.bgVariant!==null&&r.variant===null}}),bo=n=>a.computed(()=>{const r=a.toValue(n);return r===!0?"is-valid":r===!1?"is-invalid":null}),jd=n=>a.computed(()=>{const r=a.toValue(n);return{"form-check":r.plain===!1&&r.button===!1&&r.hasDefaultSlot,"form-check-reverse":r.reverse===!0,"form-check-inline":r.inline===!0,"form-switch":r.switch===!0,[`form-control-${r.size}`]:r.size!==void 0&&r.size!=="md"&&r.button===!1}}),Kd=n=>{const r=a.toRef(n),o=bo(()=>r.value.state??null);return a.computed(()=>[o.value,{"form-check-input":r.value.plain===!1&&r.value.button===!1,"btn-check":r.value.button===!0}])},Jd=n=>a.computed(()=>{const r=a.toValue(n);return{"form-check-label":r.plain===!1&&r.button===!1,btn:r.button===!0,[`btn-${r.buttonVariant}`]:r.button===!0&&r.buttonVariant!==void 0&&r.buttonVariant!==null,[`btn-${r.size}`]:r.button&&r.size&&r.size!=="md"}}),Xd=n=>{const r=a.toRef(n),o=za(()=>r.value.ariaInvalid,()=>r.value.state);return a.computed(()=>({"aria-invalid":o.value,"aria-required":r.value.required===!0?!0:void 0}))},Yd=n=>a.computed(()=>{const r=a.toValue(n);return{"was-validated":r.validated===!0,"btn-group":r.buttons===!0&&r.stacked===!1,"btn-group-vertical":r.stacked===!0&&r.buttons===!0,[`btn-group-${r.size}`]:r.size!==void 0}}),Xe=(n,r)=>a.computed(()=>a.toValue(n)||G1(r)),G1=(n="")=>`__BVID__${a.inject(H1,()=>Math.random().toString().slice(2,8))()}___BV_${n}__`,Zd=(n,r)=>{const o=a.ref(null),i=F1(n,"modelValue",r,{passive:!0}),s=Xe(()=>n.id,"input"),u=Tt(()=>n.debounce??0),c=Tt(()=>n.debounceMaxWait??NaN),h=_1(B=>{i.value=B},()=>n.lazy===!0?0:u.value,{maxWait:()=>n.lazy===!0?NaN:c.value}),g=(B,E=!1)=>{n.lazy===!0&&E===!1||h(B)},{focused:b}=an(o,{initialValue:n.autofocus}),v=(B,E,A=!1)=>n.formatter!==void 0&&(!n.lazyFormatter||A)?n.formatter(B,E):B,S=B=>n.trim?B.trim():n.number?Number.parseFloat(B):B;a.onMounted(()=>{var B;o.value&&(o.value.value=((B=i.value)==null?void 0:B.toString())??"")}),a.onActivated(()=>{a.nextTick(()=>{n.autofocus&&(b.value=!0)})});const k=za(()=>n.ariaInvalid,()=>n.state);return{input:o,computedId:s,computedAriaInvalid:k,onInput:B=>{const{value:E}=B.target,A=v(E,B);if(B.defaultPrevented){B.preventDefault();return}const T=S(A);g(T)},onChange:B=>{const{value:E}=B.target,A=v(E,B);if(B.defaultPrevented){B.preventDefault();return}const T=S(A);i.value!==T&&g(A,!0)},onBlur:B=>{if(!n.lazy&&!n.lazyFormatter)return;const{value:E}=B.target,A=v(E,B,!0),T=S(A);i.value!==T&&g(A,!0)},focus:()=>{n.disabled||(b.value=!0)},blur:()=>{n.disabled||(b.value=!1)}}},Qd=(n,r)=>{const o=u=>typeof u=="object"&&u!==null&&"label"in u,i=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=Cr(u,r.valueField),h=Cr(u,r.textField),g=Cr(u,r.htmlField),b=Cr(u,r.disabledField),v=r.optionsField?Cr(u,r.optionsField):void 0;return v!==void 0?{label:Cr(u,r.labelField)||h,options:v}:{value:c,text:h,html:g,disabled:b}},s=u=>u.map(c=>i(c));return{normalizedOptions:a.computed(()=>s(a.toValue(n))),isComplex:o}},yl="modal-open",j1=()=>{const n=a.inject(U1),r=i=>{n==null||n.removeStack(i),n==null||n.removeRegistry(i)},o=E1("updateHTMLAttrs",(i,s,u)=>{const c=typeof i=="string"?window==null?void 0:window.document.querySelector(i):Dn(i);c&&(s==="class"?c.classList.toggle(yl,u===yl):c.setAttribute(s,u))});return Ha(()=>{o("body","class","")}),a.watch(()=>n==null?void 0:n.countStack.value,i=>{i!==void 0&&o("body","class",i>0?yl:"")}),{...n,dispose:r}},K1=n=>{const{pushRegistry:r,pushStack:o,removeStack:i,stack:s,dispose:u,countStack:c}=j1(),h=a.getCurrentInstance();if(!h||h.type.__name!=="BModal")throw new Error("useModalManager must only use in BModal component");return r==null||r(h),Ha(()=>{u(h)}),a.watch(n,(g,b)=>{g?o==null||o(h):b&&!g&&(i==null||i(h))},{immediate:!0}),{activePosition:a.computed(()=>s==null?void 0:s.value.findIndex(g=>{var b,v;return((b=g.exposed)==null?void 0:b.id)===((v=h.exposed)==null?void 0:v.id)})),activeModalCount:c}},J1=(n,r="px")=>a.computed(()=>{const o=a.toValue(n),i=a.toValue(r);return V1.test(String(o))?`${Number(o)}${i}`:o}),ep=n=>{const r=(o,i)=>{const s=i===null?"":`${i}-`;return o==="circle"?`${s}rounded-circle`:o==="pill"?`${s}rounded-pill`:typeof o=="number"||o==="0"||o==="1"||o==="2"||o==="3"||o==="4"||o==="5"?`${s}rounded-${o}`: