mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 23:53:15 +01:00
19 lines
66 KiB
JavaScript
19 lines
66 KiB
JavaScript
import*as t from"@popperjs/core";const e=1e6;const s=1e3;const n="transitionend";const toType=t=>null===t||void 0===t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase();const getUID=t=>{do{t+=Math.floor(Math.random()*e)}while(document.getElementById(t));return t};const getSelector=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let s=t.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`);e=s&&"#"!==s?s.trim():null}return e};const getSelectorFromElement=t=>{const e=getSelector(t);return e&&document.querySelector(e)?e:null};const getElementFromSelector=t=>{const e=getSelector(t);return e?document.querySelector(e):null};const getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const i=Number.parseFloat(e);const o=Number.parseFloat(n);if(!i&&!o)return 0;e=e.split(",")[0];n=n.split(",")[0];return(Number.parseFloat(e)+Number.parseFloat(n))*s};const triggerTransitionEnd=t=>{t.dispatchEvent(new Event(n))};const isElement=t=>{if(!t||"object"!==typeof t)return false;"undefined"!==typeof t.jquery&&(t=t[0]);return"undefined"!==typeof t.nodeType};const getElement=t=>isElement(t)?t.jquery?t[0]:t:"string"===typeof t&&t.length>0?document.querySelector(t):null;const isVisible=t=>{if(!isElement(t)||0===t.getClientRects().length)return false;const e="visible"===getComputedStyle(t).getPropertyValue("visibility");const s=t.closest("details:not([open])");if(!s)return e;if(s!==t){const e=t.closest("summary");if(e&&e.parentNode!==s)return false;if(null===e)return false}return e};const isDisabled=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||("undefined"!==typeof t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")));const findShadowRoot=t=>{if(!document.documentElement.attachShadow)return null;if("function"===typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?findShadowRoot(t.parentNode):null};const noop=()=>{};
|
|
/**
|
|
* Trick to restart an element's animation
|
|
*
|
|
* @param {HTMLElement} element
|
|
* @return void
|
|
*
|
|
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
|
|
*/const reflow=t=>{t.offsetHeight};const getjQuery=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null;const i=[];const onDOMContentLoaded=t=>{if("loading"===document.readyState){i.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of i)t()}));i.push(t)}else t()};const isRTL=()=>"rtl"===document.documentElement.dir;const defineJQueryPlugin=t=>{onDOMContentLoaded((()=>{const e=getjQuery();if(e){const s=t.NAME;const n=e.fn[s];e.fn[s]=t.jQueryInterface;e.fn[s].Constructor=t;e.fn[s].noConflict=()=>{e.fn[s]=n;return t.jQueryInterface}}}))};const execute=t=>{"function"===typeof t&&t()};const executeAfterTransition=(t,e,s=true)=>{if(!s){execute(t);return}const i=5;const o=getTransitionDurationFromElement(e)+i;let r=false;const handler=({target:s})=>{if(s===e){r=true;e.removeEventListener(n,handler);execute(t)}};e.addEventListener(n,handler);setTimeout((()=>{r||triggerTransitionEnd(e)}),o)};
|
|
/**
|
|
* Return the previous/next element of a list.
|
|
*
|
|
* @param {array} list The list of elements
|
|
* @param activeElement The active element
|
|
* @param shouldGetNext Choose to get next or previous element
|
|
* @param isCycleAllowed
|
|
* @return {Element|elem} The proper element
|
|
*/const getNextActiveElement=(t,e,s,n)=>{const i=t.length;let o=t.indexOf(e);if(-1===o)return!s&&n?t[i-1]:t[0];o+=s?1:-1;n&&(o=(o+i)%i);return t[Math.max(0,Math.min(o,i-1))]};const o=/[^.]*(?=\..*)\.|.*/;const r=/\..*/;const a=/::\d+$/;const c={};let l=1;const h={mouseenter:"mouseover",mouseleave:"mouseout"};const u=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function makeEventUid(t,e){return e&&`${e}::${l++}`||t.uidEvent||l++}function getElementEvents(t){const e=makeEventUid(t);t.uidEvent=e;c[e]=c[e]||{};return c[e]}function bootstrapHandler(t,e){return function handler(s){hydrateObj(s,{delegateTarget:t});handler.oneOff&&d.off(t,s.type,e);return e.apply(t,[s])}}function bootstrapDelegationHandler(t,e,s){return function handler(n){const i=t.querySelectorAll(e);for(let{target:o}=n;o&&o!==this;o=o.parentNode)for(const r of i)if(r===o){hydrateObj(n,{delegateTarget:o});handler.oneOff&&d.off(t,n.type,e,s);return s.apply(o,[n])}}}function findHandler(t,e,s=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===s))}function normalizeParameters(t,e,s){const n="string"===typeof e;const i=n?s:e||s;let o=getTypeEvent(t);u.has(o)||(o=t);return[n,i,o]}function addHandler(t,e,s,n,i){if("string"!==typeof e||!t)return;let[r,a,c]=normalizeParameters(e,s,n);if(e in h){const wrapFunction=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};a=wrapFunction(a)}const l=getElementEvents(t);const u=l[c]||(l[c]={});const d=findHandler(u,a,r?s:null);if(d){d.oneOff=d.oneOff&&i;return}const f=makeEventUid(a,e.replace(o,""));const _=r?bootstrapDelegationHandler(t,s,a):bootstrapHandler(t,a);_.delegationSelector=r?s:null;_.callable=a;_.oneOff=i;_.uidEvent=f;u[f]=_;t.addEventListener(c,_,r)}function removeHandler(t,e,s,n,i){const o=findHandler(e[s],n,i);if(o){t.removeEventListener(s,o,Boolean(i));delete e[s][o.uidEvent]}}function removeNamespacedHandlers(t,e,s,n){const i=e[s]||{};for(const o of Object.keys(i))if(o.includes(n)){const n=i[o];removeHandler(t,e,s,n.callable,n.delegationSelector)}}function getTypeEvent(t){t=t.replace(r,"");return h[t]||t}const d={on(t,e,s,n){addHandler(t,e,s,n,false)},one(t,e,s,n){addHandler(t,e,s,n,true)},off(t,e,s,n){if("string"!==typeof e||!t)return;const[i,o,r]=normalizeParameters(e,s,n);const c=r!==e;const l=getElementEvents(t);const h=l[r]||{};const u=e.startsWith(".");if("undefined"===typeof o){if(u)for(const s of Object.keys(l))removeNamespacedHandlers(t,l,s,e.slice(1));for(const s of Object.keys(h)){const n=s.replace(a,"");if(!c||e.includes(n)){const e=h[s];removeHandler(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(h).length)return;removeHandler(t,l,r,o,i?s:null)}},trigger(t,e,s){if("string"!==typeof e||!t)return null;const n=getjQuery();const i=getTypeEvent(e);const o=e!==i;let r=null;let a=true;let c=true;let l=false;if(o&&n){r=n.Event(e,s);n(t).trigger(r);a=!r.isPropagationStopped();c=!r.isImmediatePropagationStopped();l=r.isDefaultPrevented()}let h=new Event(e,{bubbles:a,cancelable:true});h=hydrateObj(h,s);l&&h.preventDefault();c&&t.dispatchEvent(h);h.defaultPrevented&&r&&r.preventDefault();return h}};function hydrateObj(t,e){for(const[s,n]of Object.entries(e||{}))try{t[s]=n}catch(e){Object.defineProperty(t,s,{configurable:true,get(){return n}})}return t}const f=new Map;const _={set(t,e,s){f.has(t)||f.set(t,new Map);const n=f.get(t);n.has(e)||0===n.size?n.set(e,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get(t,e){return f.has(t)&&f.get(t).get(e)||null},remove(t,e){if(!f.has(t))return;const s=f.get(t);s.delete(e);0===s.size&&f.delete(t)}};function normalizeData(t){if("true"===t)return true;if("false"===t)return false;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!==typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function normalizeDataKey(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const g={setDataAttribute(t,e,s){t.setAttribute(`data-bs-${normalizeDataKey(e)}`,s)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${normalizeDataKey(e)}`)},getDataAttributes(t){if(!t)return{};const e={};const s=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of s){let s=n.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length);e[s]=normalizeData(t.dataset[n])}return e},getDataAttribute(t,e){return normalizeData(t.getAttribute(`data-bs-${normalizeDataKey(e)}`))}};class Config{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){t=this._mergeConfigObj(t);t=this._configAfterMerge(t);this._typeCheckConfig(t);return t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const s=isElement(e)?g.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"===typeof s?s:{},...isElement(e)?g.getDataAttributes(e):{},..."object"===typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const s of Object.keys(e)){const n=e[s];const i=t[s];const o=isElement(i)?"element":toType(i);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)}}}const p="5.2.3";class BaseComponent extends Config{constructor(t,e){super();t=getElement(t);if(t){this._element=t;this._config=this._getConfig(e);_.set(this._element,this.constructor.DATA_KEY,this)}}dispose(){_.remove(this._element,this.constructor.DATA_KEY);d.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,s=true){executeAfterTransition(t,e,s)}_getConfig(t){t=this._mergeConfigObj(t,this._element);t=this._configAfterMerge(t);this._typeCheckConfig(t);return t}static getInstance(t){return _.get(getElement(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"===typeof e?e:null)}static get VERSION(){return p}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const enableDismissTrigger=(t,e="hide")=>{const s=`click.dismiss${t.EVENT_KEY}`;const n=t.NAME;d.on(document,s,`[data-bs-dismiss="${n}"]`,(function(s){["A","AREA"].includes(this.tagName)&&s.preventDefault();if(isDisabled(this))return;const i=getElementFromSelector(this)||this.closest(`.${n}`);const o=t.getOrCreateInstance(i);o[e]()}))};const m="alert";const b="bs.alert";const v=`.${b}`;const y=`close${v}`;const w=`closed${v}`;const C="fade";const A="show";class Alert extends BaseComponent{static get NAME(){return m}close(){const t=d.trigger(this._element,y);if(t.defaultPrevented)return;this._element.classList.remove(A);const e=this._element.classList.contains(C);this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove();d.trigger(this._element,w);this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Alert.getOrCreateInstance(this);if("string"===typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}enableDismissTrigger(Alert,"close");defineJQueryPlugin(Alert);const T="button";const E="bs.button";const k=`.${E}`;const $=".data-api";const D="active";const L='[data-bs-toggle="button"]';const S=`click${k}${$}`;class Button extends BaseComponent{static get NAME(){return T}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(D))}static jQueryInterface(t){return this.each((function(){const e=Button.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}d.on(document,S,L,(t=>{t.preventDefault();const e=t.target.closest(L);const s=Button.getOrCreateInstance(e);s.toggle()}));defineJQueryPlugin(Button);const O={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter((t=>t.matches(e)))},parents(t,e){const s=[];let n=t.parentNode.closest(e);while(n){s.push(n);n=n.parentNode.closest(e)}return s},prev(t,e){let s=t.previousElementSibling;while(s){if(s.matches(e))return[s];s=s.previousElementSibling}return[]},next(t,e){let s=t.nextElementSibling;while(s){if(s.matches(e))return[s];s=s.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!isDisabled(t)&&isVisible(t)))}};const I="swipe";const N=".bs.swipe";const P=`touchstart${N}`;const x=`touchmove${N}`;const M=`touchend${N}`;const j=`pointerdown${N}`;const H=`pointerup${N}`;const B="touch";const z="pen";const F="pointer-event";const q=40;const W={endCallback:null,leftCallback:null,rightCallback:null};const K={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Swipe extends Config{constructor(t,e){super();this._element=t;if(t&&Swipe.isSupported()){this._config=this._getConfig(e);this._deltaX=0;this._supportPointerEvents=Boolean(window.PointerEvent);this._initEvents()}}static get Default(){return W}static get DefaultType(){return K}static get NAME(){return I}dispose(){d.off(this._element,N)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX);this._handleSwipe();execute(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=q)return;const e=t/this._deltaX;this._deltaX=0;e&&execute(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){if(this._supportPointerEvents){d.on(this._element,j,(t=>this._start(t)));d.on(this._element,H,(t=>this._end(t)));this._element.classList.add(F)}else{d.on(this._element,P,(t=>this._start(t)));d.on(this._element,x,(t=>this._move(t)));d.on(this._element,M,(t=>this._end(t)))}}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===z||t.pointerType===B)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const R="carousel";const V="bs.carousel";const Q=`.${V}`;const X=".data-api";const Y="ArrowLeft";const U="ArrowRight";const G=500;const J="next";const Z="prev";const tt="left";const et="right";const st=`slide${Q}`;const nt=`slid${Q}`;const it=`keydown${Q}`;const ot=`mouseenter${Q}`;const rt=`mouseleave${Q}`;const at=`dragstart${Q}`;const ct=`load${Q}${X}`;const lt=`click${Q}${X}`;const ht="carousel";const ut="active";const dt="slide";const ft="carousel-item-end";const _t="carousel-item-start";const gt="carousel-item-next";const pt="carousel-item-prev";const mt=".active";const bt=".carousel-item";const vt=mt+bt;const yt=".carousel-item img";const wt=".carousel-indicators";const Ct="[data-bs-slide], [data-bs-slide-to]";const At='[data-bs-ride="carousel"]';const Tt={[Y]:et,[U]:tt};const Et={interval:5e3,keyboard:true,pause:"hover",ride:false,touch:true,wrap:true};const kt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Carousel extends BaseComponent{constructor(t,e){super(t,e);this._interval=null;this._activeElement=null;this._isSliding=false;this.touchTimeout=null;this._swipeHelper=null;this._indicatorsElement=O.findOne(wt,this._element);this._addEventListeners();this._config.ride===ht&&this.cycle()}static get Default(){return Et}static get DefaultType(){return kt}static get NAME(){return R}next(){this._slide(J)}nextWhenVisible(){!document.hidden&&isVisible(this._element)&&this.next()}prev(){this._slide(Z)}pause(){this._isSliding&&triggerTransitionEnd(this._element);this._clearInterval()}cycle(){this._clearInterval();this._updateInterval();this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?d.one(this._element,nt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding){d.one(this._element,nt,(()=>this.to(t)));return}const s=this._getItemIndex(this._getActive());if(s===t)return;const n=t>s?J:Z;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose();super.dispose()}_configAfterMerge(t){t.defaultInterval=t.interval;return t}_addEventListeners(){this._config.keyboard&&d.on(this._element,it,(t=>this._keydown(t)));if("hover"===this._config.pause){d.on(this._element,ot,(()=>this.pause()));d.on(this._element,rt,(()=>this._maybeEnableCycle()))}this._config.touch&&Swipe.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of O.find(yt,this._element))d.on(t,at,(t=>t.preventDefault()));const endCallBack=()=>{if("hover"===this._config.pause){this.pause();this.touchTimeout&&clearTimeout(this.touchTimeout);this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),G+this._config.interval)}};const t={leftCallback:()=>this._slide(this._directionToOrder(tt)),rightCallback:()=>this._slide(this._directionToOrder(et)),endCallback:endCallBack};this._swipeHelper=new Swipe(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Tt[t.key];if(e){t.preventDefault();this._slide(this._directionToOrder(e))}}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=O.findOne(mt,this._indicatorsElement);e.classList.remove(ut);e.removeAttribute("aria-current");const s=O.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);if(s){s.classList.add(ut);s.setAttribute("aria-current","true")}}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const s=this._getActive();const n=t===J;const i=e||getNextActiveElement(this._getItems(),s,n,this._config.wrap);if(i===s)return;const o=this._getItemIndex(i);const triggerEvent=e=>d.trigger(this._element,e,{relatedTarget:i,direction:this._orderToDirection(t),from:this._getItemIndex(s),to:o});const r=triggerEvent(st);if(r.defaultPrevented)return;if(!s||!i)return;const a=Boolean(this._interval);this.pause();this._isSliding=true;this._setActiveIndicatorElement(o);this._activeElement=i;const c=n?_t:ft;const l=n?gt:pt;i.classList.add(l);reflow(i);s.classList.add(c);i.classList.add(c);const completeCallBack=()=>{i.classList.remove(c,l);i.classList.add(ut);s.classList.remove(ut,l,c);this._isSliding=false;triggerEvent(nt)};this._queueCallback(completeCallBack,s,this._isAnimated());a&&this.cycle()}_isAnimated(){return this._element.classList.contains(dt)}_getActive(){return O.findOne(vt,this._element)}_getItems(){return O.find(bt,this._element)}_clearInterval(){if(this._interval){clearInterval(this._interval);this._interval=null}}_directionToOrder(t){return isRTL()?t===tt?Z:J:t===tt?J:Z}_orderToDirection(t){return isRTL()?t===Z?tt:et:t===Z?et:tt}static jQueryInterface(t){return this.each((function(){const e=Carousel.getOrCreateInstance(this,t);if("number"!==typeof t){if("string"===typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}d.on(document,lt,Ct,(function(t){const e=getElementFromSelector(this);if(!e||!e.classList.contains(ht))return;t.preventDefault();const s=Carousel.getOrCreateInstance(e);const n=this.getAttribute("data-bs-slide-to");if(n){s.to(n);s._maybeEnableCycle()}else if("next"!==g.getDataAttribute(this,"slide")){s.prev();s._maybeEnableCycle()}else{s.next();s._maybeEnableCycle()}}));d.on(window,ct,(()=>{const t=O.find(At);for(const e of t)Carousel.getOrCreateInstance(e)}));defineJQueryPlugin(Carousel);const $t="collapse";const Dt="bs.collapse";const Lt=`.${Dt}`;const St=".data-api";const Ot=`show${Lt}`;const It=`shown${Lt}`;const Nt=`hide${Lt}`;const Pt=`hidden${Lt}`;const xt=`click${Lt}${St}`;const Mt="show";const jt="collapse";const Ht="collapsing";const Bt="collapsed";const zt=`:scope .${jt} .${jt}`;const Ft="collapse-horizontal";const qt="width";const Wt="height";const Kt=".collapse.show, .collapse.collapsing";const Rt='[data-bs-toggle="collapse"]';const Vt={parent:null,toggle:true};const Qt={parent:"(null|element)",toggle:"boolean"};class Collapse extends BaseComponent{constructor(t,e){super(t,e);this._isTransitioning=false;this._triggerArray=[];const s=O.find(Rt);for(const t of s){const e=getSelectorFromElement(t);const s=O.find(e).filter((t=>t===this._element));null!==e&&s.length&&this._triggerArray.push(t)}this._initializeChildren();this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown());this._config.toggle&&this.toggle()}static get Default(){return Vt}static get DefaultType(){return Qt}static get NAME(){return $t}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];this._config.parent&&(t=this._getFirstLevelChildren(Kt).filter((t=>t!==this._element)).map((t=>Collapse.getOrCreateInstance(t,{toggle:false}))));if(t.length&&t[0]._isTransitioning)return;const e=d.trigger(this._element,Ot);if(e.defaultPrevented)return;for(const e of t)e.hide();const s=this._getDimension();this._element.classList.remove(jt);this._element.classList.add(Ht);this._element.style[s]=0;this._addAriaAndCollapsedClass(this._triggerArray,true);this._isTransitioning=true;const complete=()=>{this._isTransitioning=false;this._element.classList.remove(Ht);this._element.classList.add(jt,Mt);this._element.style[s]="";d.trigger(this._element,It)};const n=s[0].toUpperCase()+s.slice(1);const i=`scroll${n}`;this._queueCallback(complete,this._element,true);this._element.style[s]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;const t=d.trigger(this._element,Nt);if(t.defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`;reflow(this._element);this._element.classList.add(Ht);this._element.classList.remove(jt,Mt);for(const t of this._triggerArray){const e=getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],false)}this._isTransitioning=true;const complete=()=>{this._isTransitioning=false;this._element.classList.remove(Ht);this._element.classList.add(jt);d.trigger(this._element,Pt)};this._element.style[e]="";this._queueCallback(complete,this._element,true)}_isShown(t=this._element){return t.classList.contains(Mt)}_configAfterMerge(t){t.toggle=Boolean(t.toggle);t.parent=getElement(t.parent);return t}_getDimension(){return this._element.classList.contains(Ft)?qt:Wt}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Rt);for(const e of t){const t=getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=O.find(zt,this._config.parent);return O.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const s of t){s.classList.toggle(Bt,!e);s.setAttribute("aria-expanded",e)}}static jQueryInterface(t){const e={};"string"===typeof t&&/show|hide/.test(t)&&(e.toggle=false);return this.each((function(){const s=Collapse.getOrCreateInstance(this,e);if("string"===typeof t){if("undefined"===typeof s[t])throw new TypeError(`No method named "${t}"`);s[t]()}}))}}d.on(document,xt,Rt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=getSelectorFromElement(this);const s=O.find(e);for(const t of s)Collapse.getOrCreateInstance(t,{toggle:false}).toggle()}));defineJQueryPlugin(Collapse);const Xt="dropdown";const Yt="bs.dropdown";const Ut=`.${Yt}`;const Gt=".data-api";const Jt="Escape";const Zt="Tab";const te="ArrowUp";const ee="ArrowDown";const se=2;const ne=`hide${Ut}`;const ie=`hidden${Ut}`;const oe=`show${Ut}`;const re=`shown${Ut}`;const ae=`click${Ut}${Gt}`;const ce=`keydown${Ut}${Gt}`;const le=`keyup${Ut}${Gt}`;const he="show";const ue="dropup";const de="dropend";const fe="dropstart";const _e="dropup-center";const ge="dropdown-center";const pe='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)';const me=`${pe}.${he}`;const be=".dropdown-menu";const ve=".navbar";const ye=".navbar-nav";const we=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)";const Ce=isRTL()?"top-end":"top-start";const Ae=isRTL()?"top-start":"top-end";const Te=isRTL()?"bottom-end":"bottom-start";const Ee=isRTL()?"bottom-start":"bottom-end";const ke=isRTL()?"left-start":"right-start";const $e=isRTL()?"right-start":"left-start";const De="top";const Le="bottom";const Se={autoClose:true,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"};const Oe={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Dropdown extends BaseComponent{constructor(t,e){super(t,e);this._popper=null;this._parent=this._element.parentNode;this._menu=O.next(this._element,be)[0]||O.prev(this._element,be)[0]||O.findOne(be,this._parent);this._inNavbar=this._detectNavbar()}static get Default(){return Se}static get DefaultType(){return Oe}static get NAME(){return Xt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(isDisabled(this._element)||this._isShown())return;const t={relatedTarget:this._element};const e=d.trigger(this._element,oe,t);if(!e.defaultPrevented){this._createPopper();if("ontouchstart"in document.documentElement&&!this._parent.closest(ye))for(const t of[].concat(...document.body.children))d.on(t,"mouseover",noop);this._element.focus();this._element.setAttribute("aria-expanded",true);this._menu.classList.add(he);this._element.classList.add(he);d.trigger(this._element,re,t)}}hide(){if(isDisabled(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy();super.dispose()}update(){this._inNavbar=this._detectNavbar();this._popper&&this._popper.update()}_completeHide(t){const e=d.trigger(this._element,ne,t);if(!e.defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))d.off(t,"mouseover",noop);this._popper&&this._popper.destroy();this._menu.classList.remove(he);this._element.classList.remove(he);this._element.setAttribute("aria-expanded","false");g.removeDataAttribute(this._menu,"popper");d.trigger(this._element,ie,t)}}_getConfig(t){t=super._getConfig(t);if("object"===typeof t.reference&&!isElement(t.reference)&&"function"!==typeof t.reference.getBoundingClientRect)throw new TypeError(`${Xt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if("undefined"===typeof t)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:isElement(this._config.reference)?e=getElement(this._config.reference):"object"===typeof this._config.reference&&(e=this._config.reference);const s=this._getPopperConfig();this._popper=t.createPopper(e,this._menu,s)}_isShown(){return this._menu.classList.contains(he)}_getPlacement(){const t=this._parent;if(t.classList.contains(de))return ke;if(t.classList.contains(fe))return $e;if(t.classList.contains(_e))return De;if(t.classList.contains(ge))return Le;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains(ue)?e?Ae:Ce:e?Ee:Te}_detectNavbar(){return null!==this._element.closest(ve)}_getOffset(){const{offset:t}=this._config;return"string"===typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"===typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};if(this._inNavbar||"static"===this._config.display){g.setDataAttribute(this._menu,"popper","static");t.modifiers=[{name:"applyStyles",enabled:false}]}return{...t,..."function"===typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const s=O.find(we,this._menu).filter((t=>isVisible(t)));s.length&&getNextActiveElement(s,e,t===ee,!s.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Dropdown.getOrCreateInstance(this,t);if("string"===typeof t){if("undefined"===typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===se||"keyup"===t.type&&t.key!==Zt)return;const e=O.find(me);for(const s of e){const e=Dropdown.getInstance(s);if(!e||false===e._config.autoClose)continue;const n=t.composedPath();const i=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!i||"outside"===e._config.autoClose&&i)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===Zt||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t);e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName);const s=t.key===Jt;const n=[te,ee].includes(t.key);if(!n&&!s)return;if(e&&!s)return;t.preventDefault();const i=this.matches(pe)?this:O.prev(this,pe)[0]||O.next(this,pe)[0]||O.findOne(pe,t.delegateTarget.parentNode);const o=Dropdown.getOrCreateInstance(i);if(n){t.stopPropagation();o.show();o._selectMenuItem(t)}else if(o._isShown()){t.stopPropagation();o.hide();i.focus()}}}d.on(document,ce,pe,Dropdown.dataApiKeydownHandler);d.on(document,ce,be,Dropdown.dataApiKeydownHandler);d.on(document,ae,Dropdown.clearMenus);d.on(document,le,Dropdown.clearMenus);d.on(document,ae,pe,(function(t){t.preventDefault();Dropdown.getOrCreateInstance(this).toggle()}));defineJQueryPlugin(Dropdown);const Ie=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top";const Ne=".sticky-top";const Pe="padding-right";const xe="margin-right";class ScrollBarHelper{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow();this._setElementAttributes(this._element,Pe,(e=>e+t));this._setElementAttributes(Ie,Pe,(e=>e+t));this._setElementAttributes(Ne,xe,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow");this._resetElementAttributes(this._element,Pe);this._resetElementAttributes(Ie,Pe);this._resetElementAttributes(Ne,xe)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow");this._element.style.overflow="hidden"}_setElementAttributes(t,e,s){const n=this.getWidth();const manipulationCallBack=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const i=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${s(Number.parseFloat(i))}px`)};this._applyManipulationCallback(t,manipulationCallBack)}_saveInitialAttribute(t,e){const s=t.style.getPropertyValue(e);s&&g.setDataAttribute(t,e,s)}_resetElementAttributes(t,e){const manipulationCallBack=t=>{const s=g.getDataAttribute(t,e);if(null!==s){g.removeDataAttribute(t,e);t.style.setProperty(e,s)}else t.style.removeProperty(e)};this._applyManipulationCallback(t,manipulationCallBack)}_applyManipulationCallback(t,e){if(isElement(t))e(t);else for(const s of O.find(t,this._element))e(s)}}const Me="backdrop";const je="fade";const He="show";const Be=`mousedown.bs.${Me}`;const ze={className:"modal-backdrop",clickCallback:null,isAnimated:false,isVisible:true,rootElement:"body"};const Fe={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Backdrop extends Config{constructor(t){super();this._config=this._getConfig(t);this._isAppended=false;this._element=null}static get Default(){return ze}static get DefaultType(){return Fe}static get NAME(){return Me}show(t){if(!this._config.isVisible){execute(t);return}this._append();const e=this._getElement();this._config.isAnimated&&reflow(e);e.classList.add(He);this._emulateAnimation((()=>{execute(t)}))}hide(t){if(this._config.isVisible){this._getElement().classList.remove(He);this._emulateAnimation((()=>{this.dispose();execute(t)}))}else execute(t)}dispose(){if(this._isAppended){d.off(this._element,Be);this._element.remove();this._isAppended=false}}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className;this._config.isAnimated&&t.classList.add(je);this._element=t}return this._element}_configAfterMerge(t){t.rootElement=getElement(t.rootElement);return t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t);d.on(t,Be,(()=>{execute(this._config.clickCallback)}));this._isAppended=true}_emulateAnimation(t){executeAfterTransition(t,this._getElement(),this._config.isAnimated)}}const qe="focustrap";const We="bs.focustrap";const Ke=`.${We}`;const Re=`focusin${Ke}`;const Ve=`keydown.tab${Ke}`;const Qe="Tab";const Xe="forward";const Ye="backward";const Ue={autofocus:true,trapElement:null};const Ge={autofocus:"boolean",trapElement:"element"};class FocusTrap extends Config{constructor(t){super();this._config=this._getConfig(t);this._isActive=false;this._lastTabNavDirection=null}static get Default(){return Ue}static get DefaultType(){return Ge}static get NAME(){return qe}activate(){if(!this._isActive){this._config.autofocus&&this._config.trapElement.focus();d.off(document,Ke);d.on(document,Re,(t=>this._handleFocusin(t)));d.on(document,Ve,(t=>this._handleKeydown(t)));this._isActive=true}}deactivate(){if(this._isActive){this._isActive=false;d.off(document,Ke)}}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const s=O.focusableChildren(e);0===s.length?e.focus():this._lastTabNavDirection===Ye?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){t.key===Qe&&(this._lastTabNavDirection=t.shiftKey?Ye:Xe)}}const Je="modal";const Ze="bs.modal";const ts=`.${Ze}`;const es=".data-api";const ss="Escape";const ns=`hide${ts}`;const is=`hidePrevented${ts}`;const os=`hidden${ts}`;const rs=`show${ts}`;const as=`shown${ts}`;const cs=`resize${ts}`;const ls=`click.dismiss${ts}`;const hs=`mousedown.dismiss${ts}`;const us=`keydown.dismiss${ts}`;const ds=`click${ts}${es}`;const fs="modal-open";const _s="fade";const gs="show";const ps="modal-static";const ms=".modal.show";const bs=".modal-dialog";const vs=".modal-body";const ys='[data-bs-toggle="modal"]';const ws={backdrop:true,focus:true,keyboard:true};const Cs={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Modal extends BaseComponent{constructor(t,e){super(t,e);this._dialog=O.findOne(bs,this._element);this._backdrop=this._initializeBackDrop();this._focustrap=this._initializeFocusTrap();this._isShown=false;this._isTransitioning=false;this._scrollBar=new ScrollBarHelper;this._addEventListeners()}static get Default(){return ws}static get DefaultType(){return Cs}static get NAME(){return Je}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;const e=d.trigger(this._element,rs,{relatedTarget:t});if(!e.defaultPrevented){this._isShown=true;this._isTransitioning=true;this._scrollBar.hide();document.body.classList.add(fs);this._adjustDialog();this._backdrop.show((()=>this._showElement(t)))}}hide(){if(!this._isShown||this._isTransitioning)return;const t=d.trigger(this._element,ns);if(!t.defaultPrevented){this._isShown=false;this._isTransitioning=true;this._focustrap.deactivate();this._element.classList.remove(gs);this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())}}dispose(){for(const t of[window,this._dialog])d.off(t,ts);this._backdrop.dispose();this._focustrap.deactivate();super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Backdrop({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.setAttribute("aria-modal",true);this._element.setAttribute("role","dialog");this._element.scrollTop=0;const e=O.findOne(vs,this._dialog);e&&(e.scrollTop=0);reflow(this._element);this._element.classList.add(gs);const transitionComplete=()=>{this._config.focus&&this._focustrap.activate();this._isTransitioning=false;d.trigger(this._element,as,{relatedTarget:t})};this._queueCallback(transitionComplete,this._dialog,this._isAnimated())}_addEventListeners(){d.on(this._element,us,(t=>{if(t.key===ss)if(this._config.keyboard){t.preventDefault();this.hide()}else this._triggerBackdropTransition()}));d.on(window,cs,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}));d.on(this._element,hs,(t=>{d.one(this._element,ls,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none";this._element.setAttribute("aria-hidden",true);this._element.removeAttribute("aria-modal");this._element.removeAttribute("role");this._isTransitioning=false;this._backdrop.hide((()=>{document.body.classList.remove(fs);this._resetAdjustments();this._scrollBar.reset();d.trigger(this._element,os)}))}_isAnimated(){return this._element.classList.contains(_s)}_triggerBackdropTransition(){const t=d.trigger(this._element,is);if(t.defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight;const s=this._element.style.overflowY;if("hidden"!==s&&!this._element.classList.contains(ps)){e||(this._element.style.overflowY="hidden");this._element.classList.add(ps);this._queueCallback((()=>{this._element.classList.remove(ps);this._queueCallback((()=>{this._element.style.overflowY=s}),this._dialog)}),this._dialog);this._element.focus()}}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight;const e=this._scrollBar.getWidth();const s=e>0;if(s&&!t){const t=isRTL()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!s&&t){const t=isRTL()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="";this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const s=Modal.getOrCreateInstance(this,t);if("string"===typeof t){if("undefined"===typeof s[t])throw new TypeError(`No method named "${t}"`);s[t](e)}}))}}d.on(document,ds,ys,(function(t){const e=getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault();d.one(e,rs,(t=>{t.defaultPrevented||d.one(e,os,(()=>{isVisible(this)&&this.focus()}))}));const s=O.findOne(ms);s&&Modal.getInstance(s).hide();const n=Modal.getOrCreateInstance(e);n.toggle(this)}));enableDismissTrigger(Modal);defineJQueryPlugin(Modal);const As="offcanvas";const Ts="bs.offcanvas";const Es=`.${Ts}`;const ks=".data-api";const $s=`load${Es}${ks}`;const Ds="Escape";const Ls="show";const Ss="showing";const Os="hiding";const Is="offcanvas-backdrop";const Ns=".offcanvas.show";const Ps=`show${Es}`;const xs=`shown${Es}`;const Ms=`hide${Es}`;const js=`hidePrevented${Es}`;const Hs=`hidden${Es}`;const Bs=`resize${Es}`;const zs=`click${Es}${ks}`;const Fs=`keydown.dismiss${Es}`;const qs='[data-bs-toggle="offcanvas"]';const Ws={backdrop:true,keyboard:true,scroll:false};const Ks={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Offcanvas extends BaseComponent{constructor(t,e){super(t,e);this._isShown=false;this._backdrop=this._initializeBackDrop();this._focustrap=this._initializeFocusTrap();this._addEventListeners()}static get Default(){return Ws}static get DefaultType(){return Ks}static get NAME(){return As}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;const e=d.trigger(this._element,Ps,{relatedTarget:t});if(e.defaultPrevented)return;this._isShown=true;this._backdrop.show();this._config.scroll||(new ScrollBarHelper).hide();this._element.setAttribute("aria-modal",true);this._element.setAttribute("role","dialog");this._element.classList.add(Ss);const completeCallBack=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate();this._element.classList.add(Ls);this._element.classList.remove(Ss);d.trigger(this._element,xs,{relatedTarget:t})};this._queueCallback(completeCallBack,this._element,true)}hide(){if(!this._isShown)return;const t=d.trigger(this._element,Ms);if(t.defaultPrevented)return;this._focustrap.deactivate();this._element.blur();this._isShown=false;this._element.classList.add(Os);this._backdrop.hide();const completeCallback=()=>{this._element.classList.remove(Ls,Os);this._element.removeAttribute("aria-modal");this._element.removeAttribute("role");this._config.scroll||(new ScrollBarHelper).reset();d.trigger(this._element,Hs)};this._queueCallback(completeCallback,this._element,true)}dispose(){this._backdrop.dispose();this._focustrap.deactivate();super.dispose()}_initializeBackDrop(){const clickCallback=()=>{"static"!==this._config.backdrop?this.hide():d.trigger(this._element,js)};const t=Boolean(this._config.backdrop);return new Backdrop({className:Is,isVisible:t,isAnimated:true,rootElement:this._element.parentNode,clickCallback:t?clickCallback:null})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_addEventListeners(){d.on(this._element,Fs,(t=>{t.key===Ds&&(this._config.keyboard?this.hide():d.trigger(this._element,js))}))}static jQueryInterface(t){return this.each((function(){const e=Offcanvas.getOrCreateInstance(this,t);if("string"===typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}d.on(document,zs,qs,(function(t){const e=getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault();if(isDisabled(this))return;d.one(e,Hs,(()=>{isVisible(this)&&this.focus()}));const s=O.findOne(Ns);s&&s!==e&&Offcanvas.getInstance(s).hide();const n=Offcanvas.getOrCreateInstance(e);n.toggle(this)}));d.on(window,$s,(()=>{for(const t of O.find(Ns))Offcanvas.getOrCreateInstance(t).show()}));d.on(window,Bs,(()=>{for(const t of O.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Offcanvas.getOrCreateInstance(t).hide()}));enableDismissTrigger(Offcanvas);defineJQueryPlugin(Offcanvas);const Rs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]);const Vs=/^aria-[\w-]*$/i;const Qs=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;const Xs=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;const allowedAttribute=(t,e)=>{const s=t.nodeName.toLowerCase();return e.includes(s)?!Rs.has(s)||Boolean(Qs.test(t.nodeValue)||Xs.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(s)))};const Ys={"*":["class","dir","id","lang","role",Vs],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:[]};function sanitizeHtml(t,e,s){if(!t.length)return t;if(s&&"function"===typeof s)return s(t);const n=new window.DOMParser;const i=n.parseFromString(t,"text/html");const o=[].concat(...i.body.querySelectorAll("*"));for(const t of o){const s=t.nodeName.toLowerCase();if(!Object.keys(e).includes(s)){t.remove();continue}const n=[].concat(...t.attributes);const i=[].concat(e["*"]||[],e[s]||[]);for(const e of n)allowedAttribute(e,i)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}const Us="TemplateFactory";const Gs={allowList:Ys,content:{},extraClass:"",html:false,sanitize:true,sanitizeFn:null,template:"<div></div>"};const Js={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"};const Zs={entry:"(string|element|function|null)",selector:"(string|element)"};class TemplateFactory extends Config{constructor(t){super();this._config=this._getConfig(t)}static get Default(){return Gs}static get DefaultType(){return Js}static get NAME(){return Us}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){this._checkContent(t);this._config.content={...this._config.content,...t};return this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,s]of Object.entries(this._config.content))this._setContent(t,s,e);const e=t.children[0];const s=this._resolvePossibleFunction(this._config.extraClass);s&&e.classList.add(...s.split(" "));return e}_typeCheckConfig(t){super._typeCheckConfig(t);this._checkContent(t.content)}_checkContent(t){for(const[e,s]of Object.entries(t))super._typeCheckConfig({selector:e,entry:s},Zs)}_setContent(t,e,s){const n=O.findOne(s,t);if(n){e=this._resolvePossibleFunction(e);e?isElement(e)?this._putElementInTemplate(getElement(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove()}}_maybeSanitize(t){return this._config.sanitize?sanitizeHtml(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"===typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html){e.innerHTML="";e.append(t)}else e.textContent=t.textContent}}const tn="tooltip";const en=new Set(["sanitize","allowList","sanitizeFn"]);const sn="fade";const nn="modal";const on="show";const rn=".tooltip-inner";const an=`.${nn}`;const cn="hide.bs.modal";const ln="hover";const hn="focus";const un="click";const dn="manual";const fn="hide";const _n="hidden";const gn="show";const pn="shown";const mn="inserted";const bn="click";const vn="focusin";const yn="focusout";const wn="mouseenter";const Cn="mouseleave";const An={AUTO:"auto",TOP:"top",RIGHT:isRTL()?"left":"right",BOTTOM:"bottom",LEFT:isRTL()?"right":"left"};const Tn={allowList:Ys,animation:true,boundary:"clippingParents",container:false,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:false,offset:[0,0],placement:"top",popperConfig:null,sanitize:true,sanitizeFn:null,selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"};const En={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Tooltip extends BaseComponent{constructor(e,s){if("undefined"===typeof t)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,s);this._isEnabled=true;this._timeout=0;this._isHovered=null;this._activeTrigger={};this._popper=null;this._templateFactory=null;this._newContent=null;this.tip=null;this._setListeners();this._config.selector||this._fixTitle()}static get Default(){return Tn}static get DefaultType(){return En}static get NAME(){return tn}enable(){this._isEnabled=true}disable(){this._isEnabled=false}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){this._activeTrigger.click=!this._activeTrigger.click;this._isShown()?this._leave():this._enter()}}dispose(){clearTimeout(this._timeout);d.off(this._element.closest(an),cn,this._hideModalHandler);this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title"));this._disposePopper();super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const t=d.trigger(this._element,this.constructor.eventName(gn));const e=findShadowRoot(this._element);const s=(e||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!s)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(!this._element.ownerDocument.documentElement.contains(this.tip)){i.append(n);d.trigger(this._element,this.constructor.eventName(mn))}this._popper=this._createPopper(n);n.classList.add(on);if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))d.on(t,"mouseover",noop);const complete=()=>{d.trigger(this._element,this.constructor.eventName(pn));false===this._isHovered&&this._leave();this._isHovered=false};this._queueCallback(complete,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;const t=d.trigger(this._element,this.constructor.eventName(fn));if(t.defaultPrevented)return;const e=this._getTipElement();e.classList.remove(on);if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))d.off(t,"mouseover",noop);this._activeTrigger[un]=false;this._activeTrigger[hn]=false;this._activeTrigger[ln]=false;this._isHovered=null;const complete=()=>{if(!this._isWithActiveTrigger()){this._isHovered||this._disposePopper();this._element.removeAttribute("aria-describedby");d.trigger(this._element,this.constructor.eventName(_n))}};this._queueCallback(complete,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate()));return this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(sn,on);e.classList.add(`bs-${this.constructor.NAME}-auto`);const s=getUID(this.constructor.NAME).toString();e.setAttribute("id",s);this._isAnimated()&&e.classList.add(sn);return e}setContent(t){this._newContent=t;if(this._isShown()){this._disposePopper();this.show()}}_getTemplateFactory(t){this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new TemplateFactory({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)});return this._templateFactory}_getContentForTemplate(){return{[rn]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(sn)}_isShown(){return this.tip&&this.tip.classList.contains(on)}_createPopper(e){const s="function"===typeof this._config.placement?this._config.placement.call(this,e,this._element):this._config.placement;const n=An[s.toUpperCase()];return t.createPopper(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"===typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"===typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"===typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:true,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"===typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)d.on(this._element,this.constructor.eventName(bn),this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e.toggle()}));else if(e!==dn){const t=e===ln?this.constructor.eventName(wn):this.constructor.eventName(vn);const s=e===ln?this.constructor.eventName(Cn):this.constructor.eventName(yn);d.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?hn:ln]=true;e._enter()}));d.on(this._element,s,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?hn:ln]=e._element.contains(t.relatedTarget);e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()};d.on(this._element.closest(an),cn,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");if(t){this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t);this._element.setAttribute("data-bs-original-title",t);this._element.removeAttribute("title")}}_enter(){if(this._isShown()||this._isHovered)this._isHovered=true;else{this._isHovered=true;this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show)}}_leave(){if(!this._isWithActiveTrigger()){this._isHovered=false;this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide)}}_setTimeout(t,e){clearTimeout(this._timeout);this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(true)}_getConfig(t){const e=g.getDataAttributes(this._element);for(const t of Object.keys(e))en.has(t)&&delete e[t];t={...e,..."object"===typeof t&&t?t:{}};t=this._mergeConfigObj(t);t=this._configAfterMerge(t);this._typeCheckConfig(t);return t}_configAfterMerge(t){t.container=false===t.container?document.body:getElement(t.container);"number"===typeof t.delay&&(t.delay={show:t.delay,hide:t.delay});"number"===typeof t.title&&(t.title=t.title.toString());"number"===typeof t.content&&(t.content=t.content.toString());return t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);t.selector=false;t.trigger="manual";return t}_disposePopper(){if(this._popper){this._popper.destroy();this._popper=null}if(this.tip){this.tip.remove();this.tip=null}}static jQueryInterface(t){return this.each((function(){const e=Tooltip.getOrCreateInstance(this,t);if("string"===typeof t){if("undefined"===typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}defineJQueryPlugin(Tooltip);const kn="popover";const $n=".popover-header";const Dn=".popover-body";const Ln={...Tooltip.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"};const Sn={...Tooltip.DefaultType,content:"(null|string|element|function)"};class Popover extends Tooltip{static get Default(){return Ln}static get DefaultType(){return Sn}static get NAME(){return kn}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[$n]:this._getTitle(),[Dn]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Popover.getOrCreateInstance(this,t);if("string"===typeof t){if("undefined"===typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}defineJQueryPlugin(Popover);const On="scrollspy";const In="bs.scrollspy";const Nn=`.${In}`;const Pn=".data-api";const xn=`activate${Nn}`;const Mn=`click${Nn}`;const jn=`load${Nn}${Pn}`;const Hn="dropdown-item";const Bn="active";const zn='[data-bs-spy="scroll"]';const Fn="[href]";const qn=".nav, .list-group";const Wn=".nav-link";const Kn=".nav-item";const Rn=".list-group-item";const Vn=`${Wn}, ${Kn} > ${Wn}, ${Rn}`;const Qn=".dropdown";const Xn=".dropdown-toggle";const Yn={offset:null,rootMargin:"0px 0px -25%",smoothScroll:false,target:null,threshold:[.1,.5,1]};const Un={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ScrollSpy extends BaseComponent{constructor(t,e){super(t,e);this._targetLinks=new Map;this._observableSections=new Map;this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element;this._activeTarget=null;this._observer=null;this._previousScrollData={visibleEntryTop:0,parentScrollTop:0};this.refresh()}static get Default(){return Yn}static get DefaultType(){return Un}static get NAME(){return On}refresh(){this._initializeTargetsAndObservables();this._maybeEnableSmoothScroll();this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect();super.dispose()}_configAfterMerge(t){t.target=getElement(t.target)||document.body;t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin;"string"===typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t))));return t}_maybeEnableSmoothScroll(){if(this._config.smoothScroll){d.off(this._config.target,Mn);d.on(this._config.target,Mn,Fn,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const s=this._rootElement||window;const n=e.offsetTop-this._element.offsetTop;if(s.scrollTo){s.scrollTo({top:n,behavior:"smooth"});return}s.scrollTop=n}}))}}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const targetElement=t=>this._targetLinks.get(`#${t.target.id}`);const activate=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop;this._process(targetElement(t))};const e=(this._rootElement||document.documentElement).scrollTop;const s=e>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=e;for(const n of t){if(!n.isIntersecting){this._activeTarget=null;this._clearActiveClass(targetElement(n));continue}const t=n.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){activate(n);if(!e)return}else s||t||activate(n)}}_initializeTargetsAndObservables(){this._targetLinks=new Map;this._observableSections=new Map;const t=O.find(Fn,this._config.target);for(const e of t){if(!e.hash||isDisabled(e))continue;const t=O.findOne(e.hash,this._element);if(isVisible(t)){this._targetLinks.set(e.hash,e);this._observableSections.set(e.hash,t)}}}_process(t){if(this._activeTarget!==t){this._clearActiveClass(this._config.target);this._activeTarget=t;t.classList.add(Bn);this._activateParents(t);d.trigger(this._element,xn,{relatedTarget:t})}}_activateParents(t){if(t.classList.contains(Hn))O.findOne(Xn,t.closest(Qn)).classList.add(Bn);else for(const e of O.parents(t,qn))for(const t of O.prev(e,Vn))t.classList.add(Bn)}_clearActiveClass(t){t.classList.remove(Bn);const e=O.find(`${Fn}.${Bn}`,t);for(const t of e)t.classList.remove(Bn)}static jQueryInterface(t){return this.each((function(){const e=ScrollSpy.getOrCreateInstance(this,t);if("string"===typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}d.on(window,jn,(()=>{for(const t of O.find(zn))ScrollSpy.getOrCreateInstance(t)}));defineJQueryPlugin(ScrollSpy);const Gn="tab";const Jn="bs.tab";const Zn=`.${Jn}`;const ti=`hide${Zn}`;const ei=`hidden${Zn}`;const si=`show${Zn}`;const ni=`shown${Zn}`;const ii=`click${Zn}`;const oi=`keydown${Zn}`;const ri=`load${Zn}`;const ai="ArrowLeft";const ci="ArrowRight";const li="ArrowUp";const hi="ArrowDown";const ui="active";const di="fade";const fi="show";const _i="dropdown";const gi=".dropdown-toggle";const pi=".dropdown-menu";const mi=":not(.dropdown-toggle)";const bi='.list-group, .nav, [role="tablist"]';const vi=".nav-item, .list-group-item";const yi=`.nav-link${mi}, .list-group-item${mi}, [role="tab"]${mi}`;const wi='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';const Ci=`${yi}, ${wi}`;const Ai=`.${ui}[data-bs-toggle="tab"], .${ui}[data-bs-toggle="pill"], .${ui}[data-bs-toggle="list"]`;class Tab extends BaseComponent{constructor(t){super(t);this._parent=this._element.closest(bi);if(this._parent){this._setInitialAttributes(this._parent,this._getChildren());d.on(this._element,oi,(t=>this._keydown(t)))}}static get NAME(){return Gn}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem();const s=e?d.trigger(e,ti,{relatedTarget:t}):null;const n=d.trigger(t,si,{relatedTarget:e});if(!(n.defaultPrevented||s&&s.defaultPrevented)){this._deactivate(e,t);this._activate(t,e)}}_activate(t,e){if(!t)return;t.classList.add(ui);this._activate(getElementFromSelector(t));const complete=()=>{if("tab"===t.getAttribute("role")){t.removeAttribute("tabindex");t.setAttribute("aria-selected",true);this._toggleDropDown(t,true);d.trigger(t,ni,{relatedTarget:e})}else t.classList.add(fi)};this._queueCallback(complete,t,t.classList.contains(di))}_deactivate(t,e){if(!t)return;t.classList.remove(ui);t.blur();this._deactivate(getElementFromSelector(t));const complete=()=>{if("tab"===t.getAttribute("role")){t.setAttribute("aria-selected",false);t.setAttribute("tabindex","-1");this._toggleDropDown(t,false);d.trigger(t,ei,{relatedTarget:e})}else t.classList.remove(fi)};this._queueCallback(complete,t,t.classList.contains(di))}_keydown(t){if(![ai,ci,li,hi].includes(t.key))return;t.stopPropagation();t.preventDefault();const e=[ci,hi].includes(t.key);const s=getNextActiveElement(this._getChildren().filter((t=>!isDisabled(t))),t.target,e,true);if(s){s.focus({preventScroll:true});Tab.getOrCreateInstance(s).show()}}_getChildren(){return O.find(Ci,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t);const s=this._getOuterElement(t);t.setAttribute("aria-selected",e);s!==t&&this._setAttributeIfNotExists(s,"role","presentation");e||t.setAttribute("tabindex","-1");this._setAttributeIfNotExists(t,"role","tab");this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=getElementFromSelector(t);if(e){this._setAttributeIfNotExists(e,"role","tabpanel");t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`)}}_toggleDropDown(t,e){const s=this._getOuterElement(t);if(!s.classList.contains(_i))return;const toggle=(t,n)=>{const i=O.findOne(t,s);i&&i.classList.toggle(n,e)};toggle(gi,ui);toggle(pi,fi);s.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,s){t.hasAttribute(e)||t.setAttribute(e,s)}_elemIsActive(t){return t.classList.contains(ui)}_getInnerElement(t){return t.matches(Ci)?t:O.findOne(Ci,t)}_getOuterElement(t){return t.closest(vi)||t}static jQueryInterface(t){return this.each((function(){const e=Tab.getOrCreateInstance(this);if("string"===typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}d.on(document,ii,wi,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault();isDisabled(this)||Tab.getOrCreateInstance(this).show()}));d.on(window,ri,(()=>{for(const t of O.find(Ai))Tab.getOrCreateInstance(t)}));defineJQueryPlugin(Tab);const Ti="toast";const Ei="bs.toast";const ki=`.${Ei}`;const $i=`mouseover${ki}`;const Di=`mouseout${ki}`;const Li=`focusin${ki}`;const Si=`focusout${ki}`;const Oi=`hide${ki}`;const Ii=`hidden${ki}`;const Ni=`show${ki}`;const Pi=`shown${ki}`;const xi="fade";const Mi="hide";const ji="show";const Hi="showing";const Bi={animation:"boolean",autohide:"boolean",delay:"number"};const zi={animation:true,autohide:true,delay:5e3};class Toast extends BaseComponent{constructor(t,e){super(t,e);this._timeout=null;this._hasMouseInteraction=false;this._hasKeyboardInteraction=false;this._setListeners()}static get Default(){return zi}static get DefaultType(){return Bi}static get NAME(){return Ti}show(){const t=d.trigger(this._element,Ni);if(t.defaultPrevented)return;this._clearTimeout();this._config.animation&&this._element.classList.add(xi);const complete=()=>{this._element.classList.remove(Hi);d.trigger(this._element,Pi);this._maybeScheduleHide()};this._element.classList.remove(Mi);reflow(this._element);this._element.classList.add(ji,Hi);this._queueCallback(complete,this._element,this._config.animation)}hide(){if(!this.isShown())return;const t=d.trigger(this._element,Oi);if(t.defaultPrevented)return;const complete=()=>{this._element.classList.add(Mi);this._element.classList.remove(Hi,ji);d.trigger(this._element,Ii)};this._element.classList.add(Hi);this._queueCallback(complete,this._element,this._config.animation)}dispose(){this._clearTimeout();this.isShown()&&this._element.classList.remove(ji);super.dispose()}isShown(){return this._element.classList.contains(ji)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e;break}if(e){this._clearTimeout();return}const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){d.on(this._element,$i,(t=>this._onInteraction(t,true)));d.on(this._element,Di,(t=>this._onInteraction(t,false)));d.on(this._element,Li,(t=>this._onInteraction(t,true)));d.on(this._element,Si,(t=>this._onInteraction(t,false)))}_clearTimeout(){clearTimeout(this._timeout);this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Toast.getOrCreateInstance(this,t);if("string"===typeof t){if("undefined"===typeof e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}enableDismissTrigger(Toast);defineJQueryPlugin(Toast);export{Alert,Button,Carousel,Collapse,Dropdown,Modal,Offcanvas,Popover,ScrollSpy,Tab,Toast,Tooltip};
|
|
|