fwtrash/js/bootstrap-native.min.js
2022-12-20 12:21:31 +01:00

3 lines
39 KiB
JavaScript

// Native JavaScript for Bootstrap v4.2.0 | 2022 © dnp_theme | MIT-License
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).BSN=e()}(this,(function(){"use strict";const t={};function e(e){const n=this,{type:s}=e;[...t[s]].forEach(t=>{const[i,a]=t;i===n&&[...a].forEach(t=>{const[n,a]=t;n.apply(i,[e]),a&&a.once&&o(i,s,n,a)})})}const n=(n,o,s,i)=>{t[o]||(t[o]=new Map);const a=t[o];a.has(n)||a.set(n,new Map);const r=a.get(n),{size:l}=r;r.set(s,i),l||n.addEventListener(o,e,i)},o=(n,o,s,i)=>{const a=t[o],r=a&&a.get(n),l=r&&r.get(s),{options:c}=void 0!==l?l:{options:i};r&&r.has(s)&&r.delete(s),!a||r&&r.size||a.delete(n),a&&a.size||delete t[o],r&&r.size||n.removeEventListener(o,e,c)},s={on:n,off:o,globalListener:e,registry:t};function i(t,e){const n=getComputedStyle(t);return e.includes("--")?n.getPropertyValue(e):n[e]}function a(t){const e=i(t,"transitionProperty"),n=i(t,"transitionDuration"),o=n.includes("ms")?1:1e3,s=e&&"none"!==e?parseFloat(n)*o:0;return Number.isNaN(s)?0:s}const r=(t,e)=>t.dispatchEvent(e);function l(t,e){let n=0;const o=new Event("transitionend"),s=a(t),l=function(t){const e=i(t,"transitionProperty"),n=i(t,"transitionDelay"),o=n.includes("ms")?1:1e3,s=e&&"none"!==e?parseFloat(n)*o:0;return Number.isNaN(s)?0:s}(t);if(s){const i=o=>{o.target===t&&(e.apply(t,[o]),t.removeEventListener("transitionend",i),n=1)};t.addEventListener("transitionend",i),setTimeout(()=>{n||r(t,o)},s+l+17)}else e.apply(t,[o])}const c=t=>t&&[1,2,3,4,5,6,7,8,9,10,11].some(e=>+t.nodeType===e)||!1,d=t=>t&&"Window"===t.constructor.name||!1,h=t=>t&&9===t.nodeType||!1;function u(t){return h(t)?t:c(t)?t.ownerDocument:d(t)?t.document:window.document}function f(t,e){if(c(t))return t;return(c(e)?e:u()).querySelector(t)}function p(t,e){return t?t.closest(e)||p(t.getRootNode().host,e):null}const g=(t,e)=>Object.assign(t,e);function m(t,e){return t.classList.contains(e)}function v(t,e){t.classList.remove(e)}const b=t=>t&&1===t.nodeType||!1,w=new Map,y={set:(t,e,n)=>{if(!b(t))return;w.has(e)||w.set(e,new Map);w.get(e).set(t,n)},getAllFor:t=>w.get(t)||null,get:(t,e)=>{if(!b(t)||!e)return null;const n=y.getAllFor(e);return t&&n&&n.get(t)||null},remove:(t,e)=>{const n=w.get(e);n&&b(t)&&(n.delete(t),0===n.size&&w.delete(e))}},T=(t,e)=>y.get(t,e);function x(t,e){const n=new CustomEvent(t,{cancelable:!0,bubbles:!0});return"object"==typeof e&&g(n,e),n}const E=(t,e)=>t.getAttribute(e);function A(t){return!!["true",!0].includes(t)||!["false",!1].includes(t)&&(""===t||"null"===t?null:""===t||Number.isNaN(+t)?t:+t)}const N=t=>Object.keys(t),k=t=>t.toLowerCase();class P{constructor(t,e){const n=this,o=f(t);if(!o)throw Error(`${n.name} Error: "${t}" is not a valid selector.`);n.options={};const s=y.get(o,n.name);s&&s.dispose(),n.element=o,n.defaults&&N(n.defaults).length&&(n.options=function(t,e,n,o){const s={...t.dataset},i={},a={};return N(s).forEach(t=>{const e=o&&t.includes(o)?t.replace(o,"").replace(/[A-Z]/,t=>k(t)):t;a[e]=A(s[t])}),N(n).forEach(t=>{n[t]=A(n[t])}),N(e).forEach(o=>{i[o]=o in n?n[o]:o in a?a[o]:"title"===o?E(t,"title"):e[o]}),i}(o,n.defaults,e||{},"bs")),y.set(o,n.name,n)}get version(){return"4.2.0"}get name(){return this.constructor.name}get defaults(){return this.constructor.defaults}dispose(){const t=this;y.remove(t.element,t.name),N(t).forEach(e=>{t[e]=null})}}const $=t=>T(t,"Alert"),H=x("close.bs.alert"),S=x("closed.bs.alert");function D(t){const{element:e}=t;C(t),r(e,S),t.dispose(),e.remove()}function C(t,e){const s=e?n:o,{dismiss:i}=t;i&&s(i,"click",t.close)}class M extends P{constructor(t){super(t);const{element:e}=this;this.dismiss=f('[data-bs-dismiss="alert"]',e),C(this,!0)}get name(){return"Alert"}close(t){const e=t?$(p(this,".alert")):this,{element:n}=e;if(n&&m(n,"show")){if(r(n,H),H.defaultPrevented)return;v(n,"show"),m(n,"fade")?l(n,()=>D(e)):D(e)}}dispose(){C(this),super.dispose()}}g(M,{selector:".alert",init:t=>new M(t),getInstance:$});const L=(t,e,n)=>t.setAttribute(e,n);function I(t,e){t.classList.add(e)}const R="data-bs-toggle",F=`[${R}="button"]`,O=t=>T(t,"Button");function W(t,e){(e?n:o)(t.element,"click",t.toggle)}class B extends P{constructor(t){super(t);const{element:e}=this;this.isActive=m(e,"active"),L(e,"aria-pressed",""+!!this.isActive),W(this,!0)}get name(){return"Button"}toggle(t){t&&t.preventDefault();const e=t?O(this):this;if(!e.element)return;const{element:n,isActive:o}=e;if(m(n,"disabled"))return;(o?v:I)(n,"active"),L(n,"aria-pressed",o?"false":"true"),e.isActive=m(n,"active")}dispose(){W(this),super.dispose()}}g(B,{selector:F,init:t=>new B(t),getInstance:O});const z="mouseenter",X="mouseleave";function j(t,e){const{width:n,height:o,top:s,right:i,bottom:a,left:r}=t.getBoundingClientRect();let l=1,c=1;if(e&&b(t)){const{offsetWidth:e,offsetHeight:s}=t;l=e>0?Math.round(n)/e:1,c=s>0?Math.round(o)/s:1}return{width:n/l,height:o/c,top:s/c,right:i/l,bottom:a/c,left:r/l,x:r/l,y:s/c}}function V(t){return u(t).documentElement}const Y=t=>{if(!t||!c(t))return!1;const{top:e,bottom:n}=j(t),{clientHeight:o}=V(t);return e<=o&&n>=0},q=t=>"rtl"===V(t).dir;function U(t,e){return(c(e)?e:u()).querySelectorAll(t)}function G(t,e){return(c(e)?e:u()).getElementsByClassName(t)}const Z=new Map,J=(t,e,n,o)=>{if(b(t))if(o&&o.length){Z.has(t)||Z.set(t,new Map);Z.get(t).set(o,setTimeout(e,n))}else Z.set(t,setTimeout(e,n))},K=(t,e)=>{if(!b(t))return null;const n=Z.get(t);return e&&e.length&&n&&n.get?n.get(e)||null:n||null},Q=(t,e)=>{if(b(t))if(e&&e.length){const n=Z.get(t);n&&n.get&&(clearTimeout(n.get(e)),n.delete(e),0===n.size&&Z.delete(t))}else clearTimeout(Z.get(t)),Z.delete(t)},_=t=>t.offsetHeight,tt={passive:!0};function et(t){const e=["data-bs-target","data-bs-parent","data-bs-container","href"],n=u(t);return e.map(e=>{const o=E(t,e);return o?"data-bs-parent"===e?p(t,o):f(o,n):null}).filter(t=>t)[0]}const nt='[data-bs-ride="carousel"]',ot="carousel-item",st="data-bs-slide",it={pause:"hover",keyboard:!1,touch:!0,interval:5e3},at=t=>T(t,"Carousel");let rt=0,lt=0,ct=0;const dt=x("slide.bs.carousel"),ht=x("slid.bs.carousel");function ut(){const t=this,e=at(t);!e||e.isPaused||K(t,"paused")||I(t,"paused")}function ft(){const t=at(this);t&&t.isPaused&&!K(this,"paused")&&t.cycle()}function pt(t){t.preventDefault();const e=p(this,nt)||et(this),n=at(e);if(!n||n.isAnimating)return;const o=+E(this,"data-bs-slide-to");!this||m(this,"active")||Number.isNaN(o)||n.to(o)}function gt(t){t.preventDefault();const e=p(this,nt)||et(this),n=at(e);if(!n||n.isAnimating)return;const o=E(this,st);"next"===o?n.next():"prev"===o&&n.prev()}function mt({code:t,target:e}){const n=u(e),[o]=[...U(nt,n)].filter(t=>Y(t)),s=at(o);if(!s||s.isAnimating||/textarea|input/i.test(e.tagName))return;const i=q(o),a=i?"ArrowLeft":"ArrowRight";t===(i?"ArrowRight":"ArrowLeft")?s.prev():t===a&&s.next()}function vt(t){const{target:e}=t,n=at(this),{controls:o,indicators:s}=n;[...o,...s].some(t=>t===e||t.contains(e))||!n||n.isAnimating||n.isTouch||(rt=t.pageX,this.contains(e)&&(n.isTouch=!0,Tt(n,!0)))}function bt(t){lt=t.pageX}function wt(t){const{target:e}=t,n=u(e),o=[...U(nt,n)].map(t=>at(t)).find(t=>t.isTouch);if(!o)return;const{element:s,index:i}=o,a=q(e);return o.isTouch=!1,Tt(o),n.getSelection().toString().length?(rt=0,lt=0,void(ct=0)):(ct=t.pageX,!s.contains(e)||Math.abs(rt-ct)<120?(rt=0,lt=0,void(ct=0)):(lt<rt?o.to(i+(a?-1:1)):lt>rt&&o.to(i+(a?1:-1)),rt=0,lt=0,void(ct=0)))}function yt(t,e){const{indicators:n}=t;[...n].forEach(t=>v(t,"active")),t.indicators[e]&&I(n[e],"active")}function Tt(t,e){const{element:s}=t,i=e?n:o;i(u(s),"pointermove",bt,tt),i(u(s),"pointerup",wt,tt)}function xt(t,e){const{element:s,options:i,slides:a,controls:r,indicators:l}=t,{touch:c,pause:d,interval:h,keyboard:f}=i,p=e?n:o;d&&h&&(p(s,z,ut),p(s,X,ft)),c&&a.length>2&&p(s,"pointerdown",vt,tt),r.length&&r.forEach(t=>{t&&p(t,"click",gt)}),l.length&&l.forEach(t=>{p(t,"click",pt)}),f&&p(u(s),"keydown",mt)}function Et(t){const{slides:e,element:n}=t,o=f(`.${ot}.active`,n);return[...e].indexOf(o)}class At extends P{constructor(t,e){super(t,e);const n=this,{element:o}=n;n.direction=q(o)?"right":"left",n.index=0,n.isTouch=!1,n.slides=G(ot,o);const{slides:s}=n;if(s.length<2)return;const i=u(o);n.controls=[...U(`[${st}]`,o),...U(`[${st}][data-bs-target="#${o.id}"]`,i)],n.indicator=f(".carousel-indicators",o),n.indicators=[...n.indicator?U("[data-bs-slide-to]",n.indicator):[],...U(`[data-bs-slide-to][data-bs-target="#${o.id}"]`,i)];const{options:a}=n;n.options.interval=!0===a.interval?it.interval:a.interval,Et(n)<0&&(I(s[0],"active"),n.indicators.length&&yt(n,0)),xt(n,!0),a.interval&&n.cycle()}get name(){return"Carousel"}get defaults(){return it}get isPaused(){return m(this.element,"paused")}get isAnimating(){return null!==f(`.${ot}-next,.${ot}-prev`,this.element)}cycle(){const t=this,{element:e,options:n,isPaused:o,index:s}=t;Q(e,"carousel"),o&&(Q(e,"paused"),v(e,"paused")),J(e,()=>{t.element&&!t.isPaused&&!t.isTouch&&Y(e)&&t.to(s+1)},n.interval,"carousel")}pause(){const{element:t,options:e}=this;!this.isPaused&&e.interval&&(I(t,"paused"),J(t,()=>{},1,"paused"))}next(){const t=this;t.isAnimating||t.to(t.index+1)}prev(){const t=this;t.isAnimating||t.to(t.index-1)}to(t){const e=this,{element:n,slides:o,options:s}=e,i=Et(e),c=q(n);let d=t;if(e.isAnimating||i===d||K(n,st))return;i<d||0===i&&d===o.length-1?e.direction=c?"right":"left":(i>d||i===o.length-1&&0===d)&&(e.direction=c?"left":"right");const{direction:h}=e;d<0?d=o.length-1:d>=o.length&&(d=0);const f="left"===h?"next":"prev",p="left"===h?"start":"end",b={relatedTarget:o[d],from:i,to:d,direction:h};g(dt,b),g(ht,b),r(n,dt),dt.defaultPrevented||(e.index=d,yt(e,d),a(o[d])&&m(n,"slide")?J(n,()=>{I(o[d],`${ot}-${f}`),_(o[d]),I(o[d],`${ot}-${p}`),I(o[i],`${ot}-${p}`),l(o[d],()=>function(t){const{index:e,direction:n,element:o,slides:s,options:i}=t;if(t.isAnimating&&at(o)){const a=Et(t),l="left"===n?"next":"prev",c="left"===n?"start":"end";I(s[e],"active"),v(s[e],`${ot}-${l}`),v(s[e],`${ot}-${c}`),v(s[a],"active"),v(s[a],`${ot}-${c}`),r(o,ht),Q(o,st),u(o).hidden||!i.interval||t.isPaused||t.cycle()}}(e))},0,st):(I(o[d],"active"),v(o[i],"active"),J(n,()=>{Q(n,st),n&&s.interval&&!e.isPaused&&e.cycle(),r(n,ht)},0,st)))}dispose(){const t=this,{slides:e}=t,n=["start","end","prev","next"];[...e].forEach((e,o)=>{m(e,"active")&&yt(t,o),n.forEach(t=>v(e,`${ot}-${t}`))}),xt(t),super.dispose()}}g(At,{selector:nt,init:t=>new At(t),getInstance:at});const Nt=(t,e)=>{var n;(n=e,Object.entries(n)).forEach(([e,n])=>{if(e.includes("--"))t.style.setProperty(e,n);else{const o={};o[e]=n,g(t.style,o)}})},kt=`[${R}="collapse"]`,Pt={parent:null},$t=t=>T(t,"Collapse"),Ht=x("show.bs.collapse"),St=x("shown.bs.collapse"),Dt=x("hide.bs.collapse"),Ct=x("hidden.bs.collapse");function Mt(t){const{element:e,parent:n,triggers:o}=t;r(e,Dt),Dt.defaultPrevented||(J(e,()=>{},17),n&&J(n,()=>{},17),Nt(e,{height:e.scrollHeight+"px"}),v(e,"collapse"),v(e,"show"),I(e,"collapsing"),_(e),Nt(e,{height:"0px"}),l(e,()=>{Q(e),n&&Q(n),o.forEach(t=>L(t,"aria-expanded","false")),v(e,"collapsing"),I(e,"collapse"),Nt(e,{height:""}),r(e,Ct)}))}function Lt(t,e){const s=e?n:o,{triggers:i}=t;i.length&&i.forEach(t=>s(t,"click",It))}function It(t){const{target:e}=t,n=e&&p(e,kt),o=n&&et(n),s=o&&$t(o);s&&s.toggle(),n&&"A"===n.tagName&&t.preventDefault()}class Rt extends P{constructor(t,e){super(t,e);const{element:n,options:o}=this,s=u(n);this.triggers=[...U(kt,s)].filter(t=>et(t)===n),this.parent=f(o.parent,s)||et(n)||null,Lt(this,!0)}get name(){return"Collapse"}get defaults(){return Pt}toggle(){m(this.element,"show")?this.hide():this.show()}hide(){const{triggers:t,element:e}=this;K(e)||(Mt(this),t.length&&t.forEach(t=>I(t,"collapsed")))}show(){const t=this,{element:e,parent:n,triggers:o}=t;let s,i;n&&(s=[...U(".collapse.show",n)].find(t=>$t(t)),i=s&&$t(s)),n&&K(n)||K(e)||(i&&s!==e&&(Mt(i),i.triggers.forEach(t=>{I(t,"collapsed")})),function(t){const{element:e,parent:n,triggers:o}=t;r(e,Ht),Ht.defaultPrevented||(J(e,()=>{},17),n&&J(n,()=>{},17),I(e,"collapsing"),v(e,"collapse"),Nt(e,{height:e.scrollHeight+"px"}),l(e,()=>{Q(e),n&&Q(n),o.forEach(t=>L(t,"aria-expanded","true")),v(e,"collapsing"),I(e,"collapse"),I(e,"show"),Nt(e,{height:""}),r(e,St)}))}(t),o.length&&o.forEach(t=>v(t,"collapsed")))}dispose(){Lt(this),super.dispose()}}g(Rt,{selector:".collapse",init:t=>new Rt(t),getInstance:$t});const Ft="scroll",Ot="resize",Wt="ArrowUp",Bt="ArrowDown",zt=(t,e)=>t.hasAttribute(e),Xt=t=>t.focus();function jt(t){return t?h(t)?t.defaultView:c(t)?t.ownerDocument.defaultView:t:window}const Vt=["dropdown","dropup","dropstart","dropend"];function Yt(t){const e=p(t,"A");return b(t)&&(zt(t,"href")&&"#"===t.href.slice(-1)||e&&zt(e,"href")&&"#"===e.href.slice(-1))}const[qt,Ut,Gt,Zt]=Vt,Jt=`[${R}="${qt}"]`,Kt=t=>T(t,"Dropdown"),Qt=[qt,Ut],_t=[Gt,Zt],te=["A","BUTTON"],ee={offset:5,display:"dynamic"},ne=x("show.bs."+qt),oe=x("shown.bs."+qt),se=x("hide.bs."+qt),ie=x("hidden.bs."+qt);function ae(t){const{element:e,menu:n,parentElement:o,options:s}=t,{offset:a}=s;if("static"===i(n,"position"))return;const r=q(e),l=m(n,"dropdown-menu-end");["margin","top","bottom","left","right"].forEach(t=>{n.style[t]=""});let c=Vt.find(t=>m(o,t))||qt,d={dropdown:[a,0,0],dropup:[0,0,a],dropstart:r?[-1,0,0,a]:[-1,a,0],dropend:r?[-1,a,0]:[-1,0,0,a]};const h={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:r?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:r?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:r?{right:0,left:"auto"}:{right:"auto",left:0},menuEnd:r?{right:"auto",left:0}:{right:0,left:"auto"}},{offsetWidth:u,offsetHeight:f}=n,{clientWidth:p,clientHeight:v}=V(e),{left:b,top:w,width:y,height:T}=j(e),x=b-u-a<0,E=b+u+y+a>=p,A=w+f+a>=v,N=w+f+T+a>=v,k=w-f-a<0,P=(!r&&l||r&&!l)&&b+y-u<0,$=(r&&l||!r&&!l)&&b+u>=p;if(_t.includes(c)&&x&&E&&(c=qt),c===Gt&&(r?E:x)&&(c=Zt),c===Zt&&(r?x:E)&&(c=Gt),c===Ut&&k&&!N&&(c=qt),c===qt&&N&&!k&&(c=Ut),_t.includes(c)&&A&&g(h[c],{top:"auto",bottom:0}),Qt.includes(c)&&(P||$)){let t;P||!$||r||(t={left:"auto",right:0}),P&&!$&&r&&(t={left:0,right:"auto"}),t&&g(h[c],t)}if(d=d[c],Nt(n,{...h[c],margin:""+d.map(t=>t?t+"px":t).join(" ")}),Qt.includes(c)&&l&&l){Nt(n,h[!r&&P||r&&$?"menuStart":"menuEnd"])}}function re(t){const{element:e,options:s}=t,i=t.open?n:o,a=u(e);i(a,"click",de),i(a,"focus",de),i(a,"keydown",ue),i(a,"keyup",fe),"dynamic"===s.display&&[Ft,Ot].forEach(t=>{i(jt(e),t,pe,tt)})}function le(t,e){(e?n:o)(t.element,"click",he)}function ce(t){const e=[...Vt,"btn-group","input-group"].map(e=>G(e+" show",u(t))).find(t=>t.length);return e&&e.length?[...e[0].children].find(t=>zt(t,R)):null}function de(t){const{target:e,type:n}=t;if(!e||!e.closest)return;const o=ce(e),s=Kt(o);if(!s)return;const{parentElement:i,menu:a}=s,r=null!==p(e,Jt),l=i&&i.contains(e)&&("form"===e.tagName||null!==p(e,"form"));"click"===n&&Yt(e)&&t.preventDefault(),("focus"!==n||e!==o&&e!==a&&!a.contains(e))&&(l||r||s&&s.hide())}function he(t){const{target:e}=t,n=Kt(this);n&&(n.toggle(),e&&Yt(e)&&t.preventDefault())}function ue(t){[Bt,Wt].includes(t.code)&&t.preventDefault()}function fe(t){const{code:e}=t,n=ce(this),o=n&&Kt(n),{activeElement:s}=n&&u(n);if(!o||!s)return;const{menu:i,open:a}=o,r=function(t){return[...t.children].map(t=>{if(t&&te.includes(t.tagName))return t;const{firstElementChild:e}=t;return e&&te.includes(e.tagName)?e:null}).filter(t=>t)}(i);if(r&&r.length&&[Bt,Wt].includes(e)){let t=r.indexOf(s);s===n?t=0:e===Wt?t=t>1?t-1:0:e===Bt&&(t=t<r.length-1?t+1:t),r[t]&&Xt(r[t])}"Escape"===e&&a&&(o.toggle(),Xt(n))}function pe(){const t=ce(this),e=t&&Kt(t);e&&e.open&&ae(e)}class ge extends P{constructor(t,e){super(t,e);const{element:n}=this,{parentElement:o}=n;this.parentElement=o,this.menu=f(".dropdown-menu",o),this.open=!1,le(this,!0)}get name(){return"Dropdown"}get defaults(){return ee}toggle(){this.open?this.hide():this.show()}show(){const{element:t,open:e,menu:n,parentElement:o}=this;if(e)return;const s=ce(t),i=s&&Kt(s);i&&i.hide(),[ne,oe].forEach(e=>{e.relatedTarget=t}),r(o,ne),ne.defaultPrevented||(I(n,"show"),I(o,"show"),L(t,"aria-expanded","true"),ae(this),this.open=!e,Xt(t),re(this),r(o,oe))}hide(){const{element:t,open:e,menu:n,parentElement:o}=this;e&&([se,ie].forEach(e=>{e.relatedTarget=t}),r(o,se),se.defaultPrevented||(v(n,"show"),v(o,"show"),L(t,"aria-expanded","false"),this.open=!e,re(this),r(o,ie)))}dispose(){this.open&&this.hide(),le(this),super.dispose()}}g(ge,{selector:Jt,init:t=>new ge(t),getInstance:Kt});const me=(t,e)=>t.removeAttribute(e);function ve(t){return u(t).body}const be=t=>t&&"ShadowRoot"===t.constructor.name||!1;const we=t=>t&&["TABLE","TD","TH"].includes(t.tagName)||!1;function ye(t,e){const n=["HTML","BODY"];if(e){let{offsetParent:e}=t;const o=jt(t);for(;e&&(we(e)||b(e)&&!["sticky","fixed"].includes(i(e,"position")));)e=e.offsetParent;return e&&!n.includes(e.tagName)&&"static"!==i(e,"position")||(e=o),e}const o=[];let{parentNode:s}=t;for(;s&&!n.includes(s.nodeName);)s="HTML"===(a=s).nodeName?a:a.assignedSlot||a.parentNode||be(a)&&a.host||V(a),be(s)||s.shadowRoot||we(s)||o.push(s);var a;return o.find((t,e)=>"relative"!==i(t,"position")&&o.slice(e+1).every(t=>"static"===i(t,"position"))?t:null)||ve(t)}const Te="sticky-top",xe="position-sticky",Ee=t=>[...G("fixed-top",t),...G("fixed-bottom",t),...G(Te,t),...G(xe,t),...G("is-fixed",t)];function Ae(t){const{clientWidth:e}=V(t),{innerWidth:n}=jt(t);return Math.abs(n-e)}function Ne(t,e){const n=ve(t),o=parseInt(i(n,"paddingRight"),10),s="hidden"===i(n,"overflow")&&o?0:Ae(t),a=Ee(n);e&&(Nt(n,{overflow:"hidden",paddingRight:o+s+"px"}),a.length&&a.forEach(t=>{const e=i(t,"paddingRight");if(t.style.paddingRight=parseInt(e,10)+s+"px",[Te,xe].some(e=>m(t,e))){const e=i(t,"marginRight");t.style.marginRight=parseInt(e,10)-s+"px"}}))}function ke(t){if(!t)return null;if("string"==typeof t)return u().createElement(t);const{tagName:e}=t,n={...t},o=ke(e);return delete n.tagName,g(o,n),o}const Pe="modal-backdrop",$e="offcanvas-backdrop",He=ke("div");function Se(t){return f(".modal.show,.offcanvas.show",u(t))}function De(t){const e=t?Pe:$e;[Pe,$e].forEach(t=>{v(He,t)}),I(He,e)}function Ce(t,e,n){De(n),t.append(He),e&&I(He,"fade")}function Me(){m(He,"show")||(I(He,"show"),_(He))}function Le(){v(He,"show")}function Ie(t){Se(t)||(v(He,"fade"),He.remove(),function(t){const e=ve(t);Nt(e,{paddingRight:"",overflow:""});const n=Ee(e);n.length&&n.forEach(t=>{Nt(t,{paddingRight:"",marginRight:""})})}(t))}function Re(t){return b(t)&&"hidden"!==i(t,"visibility")&&null!==t.offsetParent}const Fe=`[${R}="modal"]`,Oe={backdrop:!0,keyboard:!0},We=t=>T(t,"Modal"),Be=x("show.bs.modal"),ze=x("shown.bs.modal"),Xe=x("hide.bs.modal"),je=x("hidden.bs.modal");function Ve(t){const{element:e}=t,n=Ae(e),{clientHeight:o,scrollHeight:s}=V(e),{clientHeight:i,scrollHeight:a}=e,r=i!==a;if(!r&&n){const t={};t[q(e)?"paddingLeft":"paddingRight"]=n+"px",Nt(e,t)}Ne(e,r||o!==s)}function Ye(t,e){const s=e?n:o,{element:i}=t;s(i,"click",_e),s(jt(i),Ot,t.update,tt),s(u(i),"keydown",Qe)}function qe(t,e){const s=e?n:o,{triggers:i}=t;i.length&&i.forEach(t=>s(t,"click",Ke))}function Ue(t,e){const{triggers:n,element:o,relatedTarget:s}=t;Ie(o),Nt(o,{paddingRight:"",display:""}),Ye(t);const i=Be.relatedTarget||n.find(Re);i&&Xt(i),e&&e(),je.relatedTarget=s,r(o,je)}function Ge(t){const{element:e,relatedTarget:n}=t;Xt(e),Ye(t,!0),ze.relatedTarget=n,r(e,ze)}function Ze(t){const{element:e,hasFade:n}=t;Nt(e,{display:"block"}),Ve(t),Se(e)||Nt(ve(e),{overflow:"hidden"}),I(e,"show"),me(e,"aria-hidden"),L(e,"aria-modal","true"),n?l(e,()=>Ge(t)):Ge(t)}function Je(t,e){const{element:n,options:o,hasFade:s}=t;o.backdrop&&!e&&s&&m(He,"show")&&!Se(n)?(Le(),l(He,()=>Ue(t))):Ue(t,e)}function Ke(t){const{target:e}=t,n=e&&p(e,Fe),o=n&&et(n),s=o&&We(o);n&&"A"===n.tagName&&t.preventDefault(),s.relatedTarget=n,s.toggle()}function Qe({code:t,target:e}){const n=f(".modal.show",u(e)),o=n&&We(n),{options:s}=o;s.keyboard&&"Escape"===t&&m(n,"show")&&(o.relatedTarget=null,o.hide())}function _e(t){const e=this,n=We(e);if(!n||K(e))return;const{options:o,isStatic:s,modalDialog:i}=n,{backdrop:r}=o,{target:c}=t,d=u(e).getSelection().toString().length,h=i.contains(c),f=c&&p(c,'[data-bs-dismiss="modal"]');s&&!h?J(e,()=>{I(e,"modal-static"),l(i,()=>function(t){const{element:e,modalDialog:n}=t,o=a(n)+17;v(e,"modal-static"),J(e,()=>Q(e),o)}(n))},17):(f||!d&&!s&&!h&&r)&&(n.relatedTarget=f||null,n.hide(),t.preventDefault())}class tn extends P{constructor(t,e){super(t,e);const{element:n}=this;this.modalDialog=f(".modal-dialog",n),this.triggers=[...U(Fe,u(n))].filter(t=>et(t)===n),this.isStatic="static"===this.options.backdrop,this.hasFade=m(n,"fade"),this.relatedTarget=null,this.container=ye(n),qe(this,!0),this.update=this.update.bind(this)}get name(){return"Modal"}get defaults(){return Oe}toggle(){m(this.element,"show")?this.hide():this.show()}show(){const t=this,{element:e,options:n,hasFade:o,relatedTarget:s,container:i}=t,{backdrop:l}=n;let c=0;if(m(e,"show"))return;if(Be.relatedTarget=s||null,r(e,Be),Be.defaultPrevented)return;const d=Se(e);if(d&&d!==e){(We(d)||T(d,"Offcanvas")).hide()}l?(i.contains(He)?De(!0):Ce(i,o,!0),c=a(He),Me(),setTimeout(()=>Ze(t),c)):(Ze(t),d&&m(He,"show")&&Le())}hide(t){const e=this,{element:n,hasFade:o,relatedTarget:s}=e;m(n,"show")&&(Xe.relatedTarget=s||null,r(n,Xe),Xe.defaultPrevented||(v(n,"show"),L(n,"aria-hidden","true"),me(n,"aria-modal"),o?l(n,()=>Je(e,t)):Je(e,t)))}update(){m(this.element,"show")&&Ve(this)}dispose(){qe(this),this.hide(()=>super.dispose())}}g(tn,{selector:".modal",init:t=>new tn(t),getInstance:We});const en=`[${R}="offcanvas"]`,nn={backdrop:!0,keyboard:!0,scroll:!1},on=t=>T(t,"Offcanvas"),sn=x("show.bs.offcanvas"),an=x("shown.bs.offcanvas"),rn=x("hide.bs.offcanvas"),ln=x("hidden.bs.offcanvas");function cn(t,e){const s=e?n:o;t.triggers.forEach(t=>s(t,"click",fn))}function dn(t,e){const s=e?n:o,i=u(t.element);s(i,"keydown",gn),s(i,"click",pn)}function hn(t){const{element:e,options:n}=t;n.scroll||(!function(t){const{element:e}=t,{clientHeight:n,scrollHeight:o}=V(e);Ne(e,n!==o)}(t),Nt(ve(e),{overflow:"hidden"})),I(e,"offcanvas-toggling"),I(e,"show"),Nt(e,{visibility:"visible"}),l(e,()=>function(t){const{element:e}=t;v(e,"offcanvas-toggling"),me(e,"aria-hidden"),L(e,"aria-modal","true"),L(e,"role","dialog"),r(e,an),dn(t,!0),Xt(e)}(t))}function un(t,e){const{element:n,options:o}=t,s=Se(n);n.blur(),!s&&o.backdrop&&m(He,"show")?(Le(),l(He,()=>mn(t,e))):mn(t,e)}function fn(t){const e=p(this,en),n=e&&et(e),o=n&&on(n);o&&(o.relatedTarget=e,o.toggle(),e&&"A"===e.tagName&&t.preventDefault())}function pn(t){const{target:e}=t,n=f(".offcanvas.show",u(e)),o=f('[data-bs-dismiss="offcanvas"]',n),s=on(n);if(!s)return;const{options:i,triggers:a}=s,{backdrop:r}=i,l=p(e,en),c=u(n).getSelection();He.contains(e)&&"static"===r||(c&&c.toString().length||!(!n.contains(e)&&r&&(!l||a.includes(e))||o&&o.contains(e))||(s.relatedTarget=o&&o.contains(e)?o:null,s.hide()),l&&"A"===l.tagName&&t.preventDefault())}function gn({code:t,target:e}){const n=f(".offcanvas.show",u(e)),o=on(n);o&&o.options.keyboard&&"Escape"===t&&(o.relatedTarget=null,o.hide())}function mn(t,e){const{element:n,triggers:o}=t;L(n,"aria-hidden","true"),me(n,"aria-modal"),me(n,"role"),Nt(n,{visibility:""});const s=sn.relatedTarget||o.find(t=>Re(t));s&&Xt(s),Ie(n),r(n,ln),v(n,"offcanvas-toggling"),Se(n)||dn(t),e&&e()}class vn extends P{constructor(t,e){super(t,e);const{element:n}=this;this.triggers=[...U(en,u(n))].filter(t=>et(t)===n),this.container=ye(n),this.relatedTarget=null,cn(this,!0)}get name(){return"Offcanvas"}get defaults(){return nn}toggle(){m(this.element,"show")?this.hide():this.show()}show(){const t=this,{element:e,options:n,container:o,relatedTarget:s}=t;let i=0;if(m(e,"show"))return;if(sn.relatedTarget=s,an.relatedTarget=s,r(e,sn),sn.defaultPrevented)return;const l=Se(e);if(l&&l!==e){(on(l)||T(l,"Modal")).hide()}n.backdrop?(o.contains(He)?De():Ce(o,!0),i=a(He),Me(),setTimeout(()=>hn(t),i)):(hn(t),l&&m(He,"show")&&Le())}hide(t){const e=this,{element:n,relatedTarget:o}=e;m(n,"show")&&(rn.relatedTarget=o,ln.relatedTarget=o,r(n,rn),rn.defaultPrevented||(I(n,"offcanvas-toggling"),v(n,"show"),t?un(e,t):l(n,()=>un(e,t))))}dispose(){cn(this),this.hide(()=>super.dispose())}}g(vn,{selector:".offcanvas",init:t=>new vn(t),getInstance:on});function bn(t){const e="tooltip"===t;return`<div class="${t}" role="tooltip">${(e?"":`<h3 class="${t}-header"></h3>`)+`<div class="${t}-arrow"></div>`+`<div class="${e?t+"-inner":t+"-body"}"></div>`}</div>`}const wn=t=>t&&1===t.nodeType&&["SVG","Image","Video"].some(e=>t.constructor.name.includes(e))||!1;function yn(t,e,n){const o=b(e),s=j(t,o&&function(t){if(!t||!b(t))return!1;const{width:e,height:n}=j(t),{offsetWidth:o,offsetHeight:s}=t;return Math.round(e)!==o||Math.round(n)!==s}(e)),i={x:0,y:0};if(o){const t=j(e,!0);i.x=t.x+e.clientLeft,i.y=t.y+e.clientTop}return{x:s.left+n.x-i.x,y:s.top+n.y-i.y,width:s.width,height:s.height}}const Tn={top:"top",bottom:"bottom",left:"start",right:"end"};function xn(t,e){const n=/\b(top|bottom|start|end)+/,{element:o,tooltip:s,options:a,arrow:r,offsetParent:l}=t,c={...Tn},d=q(o);d&&(c.left="end",c.right="start"),Nt(s,{top:"",left:"",right:"",bottom:""});const h="Popover"===t.name,{offsetWidth:u,offsetHeight:f}=s,{clientWidth:p,clientHeight:g}=V(o),{container:m}=a;let{placement:v}=a;const{left:w,right:y,top:T}=j(m,!0),{clientWidth:x,offsetWidth:E}=m,A=Math.abs(x-E),N=i(m,"position"),k="fixed"===N,P="static"===N,$="sticky"===N&&T===parseFloat(i(m,"top")),H=d&&k?A:0,S=k?x+w+(d?A:0):x+w+(p-y)-1,{width:D,height:C,left:M,right:L,top:I}=j(o,!0),R=function(t){const e="scrollX"in t;return{x:e?t.scrollX:t.scrollLeft,y:e?t.scrollY:t.scrollTop}}(l),{x:F,y:O}=yn(o,l,R);let W,B,z,X,Y,U;Nt(r,{top:"",left:"",right:"",bottom:""});const G=r.offsetWidth||0,Z=r.offsetHeight||0,J=G/2;let K=I-f-Z<0,Q=I+f+C+Z>=g,_=M-u-G<H,tt=M+u+D+G>=S;const et=["left","right"],nt=["top","bottom"];if(K=et.includes(v)?I+C/2-f/2-Z<0:K,Q=et.includes(v)?I+f/2+C/2+Z>=g:Q,_=nt.includes(v)?M+D/2-u/2<H:_,tt=nt.includes(v)?M+u/2+D/2>=S:tt,v=et.includes(v)&&_&&tt?"top":v,v="top"===v&&K?"bottom":v,v="bottom"===v&&Q?"top":v,v="left"===v&&_?"right":v,v="right"===v&&tt?"left":v,s.className.includes(v)||(s.className=s.className.replace(n,c[v])),et.includes(v))B="left"===v?F-u-(h?G:0):F+D+(h?G:0),K?(W=O,W+=$?-T-R.y:0,X=C/2-G):Q?(W=O-f+C,W+=$?-T-R.y:0,X=f-C/2-G):(W=O-f/2+C/2,W+=$?-T-R.y:0,X=f/2-Z/2);else if(nt.includes(v))if(e&&wn(o)){let t=0,n=0;P?(t=e.pageX,n=e.pageY):(t=e.clientX-w+(k?R.x:0),n=e.clientY-T+(k?R.y:0)),t-=d&&k&&A?A:0,W="top"===v?n-f-G:n+G,e.clientX-u/2<H?(B=0,Y=t-J):e.clientX+u/2>S?(B="auto",z=0,U=S-t-J,U-=k?w+(d?A:0):0):(B=t-u/2,Y=u/2-J)}else W="top"===v?O-f-(h?Z:0):O+C+(h?Z:0),_?(B=0,Y=F+D/2-J):tt?(B="auto",z=0,U=D/2+S-L-J):(B=F-u/2+D/2,Y=u/2-J);Nt(s,{top:W+"px",left:"auto"===B?B:B+"px",right:void 0!==z?z+"px":""}),b(r)&&(void 0!==X&&(r.style.top=X+"px"),void 0!==Y?r.style.left=Y+"px":void 0!==U&&(r.style.right=U+"px"))}const En={template:bn("tooltip"),title:null,customClass:null,trigger:"hover focus",placement:"top",sanitizeFn:null,animation:!0,delay:200,container:null},An="focusin",Nn="focusout";let kn=0,Pn=0;const $n=new Map;const Hn=t=>t&&"Function"===t.constructor.name||!1,{userAgentData:Sn}=navigator,Dn=Sn,{userAgent:Cn}=navigator,Mn=Cn,Ln=/(iPhone|iPod|iPad)/,In=Dn?Dn.brands.some(t=>Ln.test(t.brand)):Ln.test(Mn),Rn=t=>"string"==typeof t;function Fn(t,e,n){var o,s;if(b(t)&&(!Rn(e)||e.length))if(Rn(e)){let o=e.trim();Hn(n)&&(o=n(o));const s=(new(jt(t).DOMParser)).parseFromString(o,"text/html");t.append(...s.body.childNodes)}else b(e)?t.append(e):((s=e)&&"NodeList"===s.constructor.name||(o=e,Array.isArray(o)&&e.every(c)))&&t.append(...e)}function On(t,e){return b(t)&&e.contains(t)}const Wn=`[${R}="tooltip"],[data-tip="tooltip"]`;let Bn=t=>T(t,"Tooltip");function zn(t,e){const s=e?n:o,{element:i}=t;s(u(i),"touchstart",t.handleTouch,tt),wn(i)||[Ft,Ot].forEach(e=>{s(jt(i),e,t.update,tt)})}function Xn(t){const{element:e}=t,n=x("shown.bs."+k(t.name));zn(t,!0),r(e,n),Q(e,"in")}function jn(t,e){const{element:n}=t,o=x("hidden.bs."+k(t.name));zn(t),function(t){const{element:e,tooltip:n}=t;me(e,"aria-describedby"),n.remove()}(t),r(n,o),Hn(e)&&e(),Q(n,"out")}function Vn(t,e){const s=e?n:o,{element:i,options:a,btn:r}=t,{trigger:l,dismissible:c}=a;if(l.includes("manual"))return;t.enabled=!!e;const d=l.split(" "),h=wn(i);h&&s(i,"mousemove",t.update,tt),d.forEach(e=>{h||"hover"===e?(s(i,"mousedown",t.show),s(i,z,t.show),c&&r?s(r,"click",t.hide):(s(i,X,t.hide),s(u(i),"touchstart",t.handleTouch,tt))):"click"===e?s(i,e,c?t.show:t.toggle):"focus"===e&&(s(i,An,t.show),c||s(i,Nn,t.hide),In&&s(i,"click",()=>Xt(i)))})}function Yn(t,e){const s=e?n:o,{element:i,options:a,offsetParent:r}=t,{container:l}=a,{offsetHeight:c,scrollHeight:d}=l,h=p(i,".modal"),u=p(i,".offcanvas");if(!wn(i)){const e=jt(i),n=c!==d||r!==e?l:e;s(e,Ot,t.update,tt),s(n,Ft,t.update,tt)}h&&s(h,"hide.bs.modal",t.hide),u&&s(u,"hide.bs.offcanvas",t.hide)}function qn(t,e){const n=["data-original-title","title"],{element:o}=t;L(o,n[e?0:1],e||E(o,n[0])),me(o,n[e?1:0])}class Un extends P{constructor(t,e){super(t,e);const n=this,{element:o}=n,s="Tooltip"===n.name,a=s?"tooltip":"popover",r=s?"Tooltip":"Popover";Bn=t=>T(t,r),n.tooltip={},s||(n.btn=null),n.arrow={},n.offsetParent={},n.enabled=!0,n.id=`${a}-${function t(e,n){let o=n?kn:Pn;if(n){const s=t(e),i=$n.get(s)||new Map;$n.has(s)||$n.set(s,i),i.has(n)?o=i.get(n):(i.set(n,o),kn+=1)}else{const t=e.id||e;$n.has(t)?o=$n.get(t):($n.set(t,o),Pn+=1)}return o}(o,a)}`;const{options:l}=n;if(!l.title&&s||!s&&!l.content)return;const c=f(l.container,u(o)),d=ye(o);n.options.container=!c||c&&["static","relative"].includes(i(c,"position"))?d:c||ve(o),En.title=null,n.handleTouch=n.handleTouch.bind(n),n.update=n.update.bind(n),n.show=n.show.bind(n),n.hide=n.hide.bind(n),n.toggle=n.toggle.bind(n),zt(o,"title")&&s&&qn(n,l.title),function(t){const{id:e,element:n,options:o}=t,{animation:s,customClass:i,sanitizeFn:a,placement:r,dismissible:l,title:c,content:d,template:h,btnClose:u}=o,p="Tooltip"===t.name,g=p?"tooltip":"popover",v={...Tn};let w=[],y=[];q(n)&&(v.left="end",v.right="start");const T=`bs-${g}-${v[r]}`;let x;if(b(h))x=h;else{const t=ke("div");Fn(t,h,a),x=t.firstChild}t.tooltip=b(x)&&x.cloneNode(!0);const{tooltip:E}=t;L(E,"id",e),L(E,"role","tooltip");const A=p?"tooltip-inner":"popover-body",N=p?null:f(".popover-header",E),k=f("."+A,E);t.arrow=f(`.${g}-arrow`,E);const{arrow:P}=t;if(b(c))w=[c.cloneNode(!0)];else{const t=ke("div");Fn(t,c,a),w=[...t.childNodes]}if(b(d))y=[d.cloneNode(!0)];else{const t=ke("div");Fn(t,d,a),y=[...t.childNodes]}if(l)if(c)if(b(u))w=[...w,u.cloneNode(!0)];else{const t=ke("div");Fn(t,u,a),w=[...w,t.firstChild]}else if(N&&N.remove(),b(u))y=[...y,u.cloneNode(!0)];else{const t=ke("div");Fn(t,u,a),y=[...y,t.firstChild]}p?c&&k&&Fn(k,c,a):(c&&N&&Fn(N,w,a),d&&k&&Fn(k,y,a),t.btn=f(".btn-close",E)),I(E,"position-absolute"),I(P,"position-absolute"),m(E,g)||I(E,g),s&&!m(E,"fade")&&I(E,"fade"),i&&!m(E,i)&&I(E,i),m(E,T)||I(E,T)}(n),Vn(n,!0)}get name(){return"Tooltip"}get defaults(){return En}show(t){const e=this,{options:n,tooltip:o,element:s,id:i}=e,{container:a,animation:c}=n,d=K(s,"out");Q(s,"out"),!o||d||On(o,a)||J(s,()=>{const n=x("show.bs."+k(e.name));r(s,n),n.defaultPrevented||(a.append(o),L(s,"aria-describedby","#"+i),e.offsetParent=ye(o,!0),e.update(t),Yn(e,!0),m(o,"show")||I(o,"show"),c?l(o,()=>Xn(e)):Xn(e))},17,"in")}hide(t){const e=this,{options:n,tooltip:o,element:s}=e,{container:i,animation:a,delay:c}=n;Q(s,"in"),o&&On(o,i)&&J(s,()=>{const n=x("hide.bs."+k(e.name));r(s,n),n.defaultPrevented||(v(o,"show"),Yn(e),a?l(o,()=>jn(e,t)):jn(e,t))},c+17,"out")}update(t){xn(this,t)}toggle(t){const{tooltip:e,options:n}=this;On(e,n.container)?this.hide():this.show(t)}enable(){const t=this,{enabled:e}=t;e||(Vn(t,!0),t.enabled=!e)}disable(){const t=this,{tooltip:e,options:n,enabled:o}=t,{animation:s,container:i}=n;o&&(On(e,i)&&s?t.hide(()=>Vn(t)):Vn(t),t.enabled=!o)}toggleEnabled(){this.enabled?this.disable():this.enable()}handleTouch({target:t}){const{tooltip:e,element:n}=this;e.contains(t)||t===n||t&&n.contains(t)||this.hide()}dispose(){const t=this,{tooltip:e,options:n}=t,o=()=>function(t,e){const{element:n}=t;Vn(t),zt(n,"data-original-title")&&"Tooltip"===t.name&&qn(t),e&&e()}(t,()=>super.dispose());n.animation&&On(e,n.container)?(t.options.delay=0,t.hide(o)):o()}}g(Un,{selector:Wn,init:t=>new Un(t),getInstance:Bn,styleTip:xn});const Gn=`[${R}="popover"],[data-tip="popover"]`,Zn={...En,template:bn("popover"),btnClose:'<button class="btn-close" aria-label="Close"></button>',dismissible:!1,content:null};class Jn extends Un{constructor(t,e){super(t,e)}get name(){return"Popover"}get defaults(){return Zn}show(){super.show();const{options:t,btn:e}=this;t.dismissible&&e&&setTimeout(()=>Xt(e),17)}}function Kn(t,e){return(c(e)?e:u()).getElementsByTagName(t)}g(Jn,{selector:Gn,init:t=>new Jn(t),getInstance:t=>T(t,"Popover"),styleTip:xn});const Qn={offset:10,target:null},_n=x("activate.bs.scrollspy");function to(t){const{target:e,scrollTarget:n,options:o,itemsLength:s,scrollHeight:i,element:a}=t,{offset:r}=o,l=d(n),c=e&&Kn("A",e),h=n&&function(t){return b(t)?t.scrollHeight:V(t).scrollHeight}(n);if(t.scrollTop=l?n.scrollY:n.scrollTop,c&&(s!==c.length||h!==i)){let e,n,o;t.items=[],t.offsets=[],t.scrollHeight=h,t.maxScroll=t.scrollHeight-function({element:t,scrollTarget:e}){return d(e)?e.innerHeight:j(t).height}(t),[...c].forEach(s=>{e=E(s,"href"),n=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&f(e,u(a)),n&&(t.items.push(s),o=j(n),t.offsets.push((l?o.top+t.scrollTop:n.offsetTop)-r))}),t.itemsLength=t.items.length}}function eo(t){[...Kn("A",t)].forEach(t=>{m(t,"active")&&v(t,"active")})}function no(t,e){const{target:n,element:o}=t;eo(n),t.activeItem=e,I(e,"active");const s=[];let i=e;for(;i!==ve(o);)i=i.parentElement,(m(i,"nav")||m(i,"dropdown-menu"))&&s.push(i);s.forEach(t=>{const e=t.previousElementSibling;e&&!m(e,"active")&&I(e,"active")}),_n.relatedTarget=e,r(o,_n)}function oo(t,e){(e?n:o)(t.scrollTarget,Ft,t.refresh,tt)}class so extends P{constructor(t,e){super(t,e);const{element:n,options:o}=this;this.target=f(o.target,u(n)),this.target&&(this.scrollTarget=n.clientHeight<n.scrollHeight?n:jt(n),this.scrollTop=0,this.maxScroll=0,this.scrollHeight=0,this.activeItem=null,this.items=[],this.itemsLength=0,this.offsets=[],this.refresh=this.refresh.bind(this),oo(this,!0),this.refresh())}get name(){return"ScrollSpy"}get defaults(){return Qn}refresh(){const t=this,{target:e}=t;if(0===e.offsetHeight)return;to(t);const{scrollTop:n,maxScroll:o,itemsLength:s,items:i,activeItem:a}=t;if(n>=o){const e=i[s-1];return void(a!==e&&no(t,e))}const{offsets:r}=t;if(a&&n<r[0]&&r[0]>0)return t.activeItem=null,void eo(e);i.forEach((e,o)=>{a!==e&&n>=r[o]&&(void 0===r[o+1]||n<r[o+1])&&no(t,e)})}dispose(){oo(this),super.dispose()}}g(so,{selector:'[data-bs-spy="scroll"]',init:t=>new so(t),getInstance:t=>T(t,"ScrollSpy")});const io=`[${R}="tab"]`,ao=t=>T(t,"Tab"),ro=x("show.bs.tab"),lo=x("shown.bs.tab"),co=x("hide.bs.tab"),ho=x("hidden.bs.tab"),uo=new Map;function fo(t){const{tabContent:e,nav:n}=t;e&&m(e,"collapsing")&&(e.style.height="",v(e,"collapsing")),n&&Q(n)}function po(t){const{element:e,tabContent:n,content:o,nav:s}=t,{tab:i}=s&&uo.get(s);if(n&&m(o,"fade")){const{currentHeight:o,nextHeight:s}=uo.get(e);o===s?fo(t):setTimeout(()=>{n.style.height=s+"px",_(n),l(n,()=>fo(t))},50)}else s&&Q(s);lo.relatedTarget=i,r(e,lo)}function go(t){const{element:e,content:n,tabContent:o,nav:s}=t,{tab:i,content:a}=s&&uo.get(s);let c=0;if(o&&m(n,"fade")&&([a,n].forEach(t=>{I(t,"overflow-hidden")}),c=a.scrollHeight||0),ro.relatedTarget=i,ho.relatedTarget=e,r(e,ro),!ro.defaultPrevented){if(I(n,"active"),v(a,"active"),o&&m(n,"fade")){const t=n.scrollHeight;uo.set(e,{currentHeight:c,nextHeight:t}),I(o,"collapsing"),o.style.height=c+"px",_(o),[a,n].forEach(t=>{v(t,"overflow-hidden")})}n&&m(n,"fade")?setTimeout(()=>{I(n,"show"),l(n,()=>{po(t)})},1):(I(n,"show"),po(t)),r(i,ho)}}function mo(t){const{nav:e}=t,n=G("active",e);let o;1!==n.length||Vt.some(t=>m(n[0].parentElement,t))?n.length>1&&(o=n[n.length-1]):[o]=n;return{tab:o,content:o?et(o):null}}function vo(t){const e=p(t,"."+Vt.join(",."));return e?f(`.${Vt[0]}-toggle`,e):null}function bo(t,e){(e?n:o)(t.element,"click",wo)}function wo(t){const e=ao(this);e&&(t.preventDefault(),e.show())}class yo extends P{constructor(t){super(t);const{element:e}=this,n=et(e);if(!n)return;const o=p(e,".nav"),s=p(n,".tab-content");this.nav=o,this.content=n,this.tabContent=s,this.dropdown=vo(e);const{tab:i}=mo(this);if(o&&!i){const t=f(io,o),n=t&&et(t);n&&(I(t,"active"),I(n,"show"),I(n,"active"),L(e,"aria-selected","true"))}bo(this,!0)}get name(){return"Tab"}show(){const t=this,{element:e,content:n,nav:o,dropdown:s}=t;if(!(o&&K(o)||m(e,"active"))){const{tab:i,content:a}=mo(t);if(o&&uo.set(o,{tab:i,content:a}),co.relatedTarget=e,r(i,co),co.defaultPrevented)return;I(e,"active"),L(e,"aria-selected","true");const c=vo(i);if(c&&m(c,"active")&&v(c,"active"),o){const t=()=>{v(i,"active"),L(i,"aria-selected","false"),s&&!m(s,"active")&&I(s,"active")};m(a,"fade")||m(n,"fade")?J(o,t,1):t()}v(a,"show"),m(a,"fade")?l(a,()=>go(t)):go(t)}}dispose(){bo(this),super.dispose()}}g(yo,{selector:io,init:t=>new yo(t),getInstance:ao});const To=`[${R}="toast"]`,xo={animation:!0,autohide:!0,delay:5e3},Eo=t=>T(t,"Toast"),Ao=x("show.bs.toast"),No=x("shown.bs.toast"),ko=x("hide.bs.toast"),Po=x("hidden.bs.toast");function $o(t){const{element:e,options:n}=t;v(e,"showing"),Q(e,"showing"),r(e,No),n.autohide&&J(e,()=>t.hide(),n.delay,"toast")}function Ho(t){const{element:e}=t;v(e,"showing"),v(e,"show"),I(e,"hide"),Q(e,"toast"),r(e,Po)}function So(t,e){const s=e?n:o,{element:i,triggers:a,dismiss:r,options:l}=t;r&&s(r,"click",t.hide),l.autohide&&[An,Nn,z,X].forEach(t=>s(i,t,Co)),a.length&&a.forEach(t=>s(t,"click",Do))}function Do(t){const{target:e}=t,n=e&&p(e,To),o=n&&et(n),s=o&&Eo(o);n&&"A"===n.tagName&&t.preventDefault(),s.relatedTarget=n,s.show()}function Co(t){const e=this,n=Eo(e),{type:o,relatedTarget:s}=t;n&&e!==s&&!e.contains(s)&&([z,An].includes(o)?Q(e,"toast"):J(e,()=>n.hide(),n.options.delay,"toast"))}class Mo extends P{constructor(t,e){super(t,e);const{element:n,options:o}=this;o.animation&&!m(n,"fade")?I(n,"fade"):!o.animation&&m(n,"fade")&&v(n,"fade"),this.dismiss=f('[data-bs-dismiss="toast"]',n),this.triggers=[...U(To,u(n))].filter(t=>et(t)===n),this.show=this.show.bind(this),this.hide=this.hide.bind(this),So(this,!0)}get name(){return"Toast"}get defaults(){return xo}get isShown(){return m(this.element,"show")}show(){const t=this,{element:e,isShown:n}=t;if(e&&!n){if(r(e,Ao),Ao.defaultPrevented)return;!function(t){const{element:e,options:n}=t;J(e,()=>{v(e,"hide"),_(e),I(e,"show"),I(e,"showing"),n.animation?l(e,()=>$o(t)):$o(t)},17,"showing")}(t)}}hide(){const t=this,{element:e,isShown:n}=t;if(e&&n){if(r(e,ko),ko.defaultPrevented)return;!function(t){const{element:e,options:n}=t;I(e,"showing"),n.animation?(_(e),l(e,()=>Ho(t))):Ho(t)}(t)}}dispose(){const{element:t,isShown:e}=this;e&&v(t,"show"),function(t){Q(t.element,"toast"),So(t)}(this),super.dispose()}}g(Mo,{selector:".toast",init:t=>new Mo(t),getInstance:Eo});const Lo={Alert:M,Button:B,Carousel:At,Collapse:Rt,Dropdown:ge,Modal:tn,Offcanvas:vn,Popover:Jn,ScrollSpy:so,Tab:yo,Toast:Mo,Tooltip:Un};function Io(t){const e=[...Kn("*",t&&t.nodeName?t:document)];N(Lo).forEach(t=>{const{init:n,selector:o}=Lo[t];var s,i;s=n,i=e.filter(t=>function(t,e){return t.matches(e)}(t,o)),[...i].forEach(t=>s(t))})}document.body?Io():n(document,"DOMContentLoaded",()=>Io(),{once:!0});return{Alert:M,Button:B,Carousel:At,Collapse:Rt,Dropdown:ge,Modal:tn,Offcanvas:vn,Popover:Jn,ScrollSpy:so,Tab:yo,Toast:Mo,Tooltip:Un,initCallback:Io,removeDataAPI:function(t){const e=t&&t.nodeName?t:document;N(Lo).forEach(t=>{!function(t,e){const n=y.getAllFor(t);n&&[...n].forEach(t=>{const[n,o]=t;e.contains(n)&&o.dispose()})}(t,e)})},Version:"4.2.0",EventListener:s}}));