Bootstrap
Bootstrap
this._checkContent(t),this._config.content={...this._config.content,...t},this}toHt
ml(){const
t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.templa
te);for(const[e,i]of
Object.entries(this._config.content))this._setContent(t,i,e);const
e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return
i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t)
{super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t)
{for(const[e,i]of
Object.entries(t))super._typeCheckConfig({selector:e,entry:i},we)}_setContent(t,e,i
){const s=U.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?l(e)?
this._putElementInTemplate(c(e),s):this._config.html?
s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t)
{return this._config.sanitize?function(t,e,i){if(!t.length)return
t;if(i&&"function"==typeof i)return i(t);const s=(new
window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelecto
rAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!
Object.keys(e).includes(i)){t.remove();continue}const
s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of
s)me(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}
(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t)
{return"function"==typeof t?t(this):t}_putElementInTemplate(t,e)
{if(this._config.html)return e.innerHTML="",void
e.append(t);e.textContent=t.textContent}}const Ee=new
Set(["sanitize","allowList","sanitizeFn"]),Ce="fade",Te="show",ke=".modal",Le="hide
.bs.modal",Oe="hover",Ie="focus",Se={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right"
,BOTTOM:"bottom",LEFT:m()?"right":"left"},De={allowList:be,animation:!
0,boundary:"clippingParents",container:!
1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!
1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!
0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div
class="tooltip-arrow"></div><div
class="tooltip-inner"></div></div>',title:"",trigger:"hover
focus"},Ne={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 Pe extends V{constructor(t,e){if(void
0===i)throw new TypeError("Bootstrap's tooltips require Popper
(https://popper.js.org)");super(t,e),this._isEnabled=!
0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,thi
s._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),th
is._config.selector||this._fixTitle()}static get Default(){return De}static get
DefaultType(){return Ne}static get NAME(){return"tooltip"}enable()
{this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!
this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!
this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose()
{clearTimeout(this._timeout),
$.off(this._element.closest(ke),Le,this._hideModalHandler),this.tip&&this.tip.remov
e(),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=$.trigger(this._element,this.constructor.eventName("show")),e=(u(this._element)||
this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPr
evented||!e)return;this.tip&&(this.tip.remove(),this.tip=null);const
i=this._getTipElement();this._element.setAttribute("aria-
describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element
.ownerDocument.documentElement.contains(this.tip)||(s.append(i),
$.trigger(this._element,this.constructor.eventName("inserted"))),this._popper?
this._popper.update():this._popper=this._createPopper(i),i.classList.add(Te),"ontou
chstart"in document.documentElement)for(const t
of[].concat(...document.body.children))
$.on(t,"mouseover",_);this._queueCallback((()=>{$.trigger(this._element,this.constr
uctor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!
1}),this.tip,this._isAnimated())}hide(){if(!
this._isShown())return;if($.trigger(this._element,this.constructor.eventName("hide"
)).defaultPrevented)return;const
t=this._getTipElement();if(t.classList.remove(Te),"ontouchstart"in
document.documentElement)for(const t of[].concat(...document.body.children))
$.off(t,"mouseover",_);this._activeTrigger.click=!1,this._activeTrigger.focus=!
1,this._activeTrigger.hover=!
1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||
(this._isHovered||t.remove(),this._element.removeAttribute("aria-describedby"),
$.trigger(this._element,this.constructor.eventName("hidden")),this._disposePopper()
)}),this.tip,this._isAnimated())}update()
{this._popper&&this._popper.update()}_isWithContent(){return
Boolean(this._getTitle())}_getTipElement(){return this.tip||
(this.tip=this._createTipElement(this._newContent||
this._getContentForTemplate())),this.tip}_createTipElement(t){const
e=this._getTemplateFactory(t).toHtml();if(!e)return
null;e.classList.remove(Ce,Te),e.classList.add(`bs-${this.constructor.NAME}-
auto`);const
i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return
t})(this.constructor.NAME).toString();return
e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Ce),e}setContent(t)
{this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTempla
teFactory(t){return this._templateFactory?
this._templateFactory.changeContent(t):this._templateFactory=new
Ae({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config
.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-
inner":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())}_i
sAnimated(){return this._config.animation||
this.tip&&this.tip.classList.contains(Ce)}_isShown(){return
this.tip&&this.tip.classList.contains(Te)}_createPopper(t){const
e="function"==typeof this._config.placement?
this._config.placement.call(this,t,this._element):this._config.placement,s=Se[e.toU
pperCase()];return
i.createPopper(this._element,t,this._getPopperConfig(s))}_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:!
0,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)
$.on(this._element,this.constructor.eventName("click"),this._config.selector,
(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const
t=e===Oe?
this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e=
==Oe?
this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");
$.on(this._element,t,this._config.selector,(t=>{const
e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Ie:Oe]=!
0,e._enter()})),$.on(this._element,i,this._config.selector,(t=>{const
e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?
Ie:Oe]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()
=>{this._element&&this.hide()},
$.on(this._element.closest(ke),Le,this._hideModalHandler)}_fixTitle(){const
t=this._element.getAttribute("title");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(){this._isShown()||
this._isHovered?this._isHovered=!0:(this._isHovered=!
0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_
leave(){this._isWithActiveTrigger()||(this._isHovered=!
1,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(!0)}_getConfig(t){const
e=W.getDataAttributes(this._element);for(const t of
Object.keys(e))Ee.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:
{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),
t}_configAfterMerge(t){return t.container=!1===t.container?
document.body:c(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()),t}_getDelegateConfig(){const
t={};for(const e in this._config)this.constructor.Default[e]!
==this._config[e]&&(t[e]=this._config[e]);return t.selector=!
1,t.trigger="manual",t}_disposePopper()
{this._popper&&(this._popper.destroy(),this._popper=null)}static
jQueryInterface(t){return this.each((function(){const
e=Pe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new
TypeError(`No method named "${t}"`);e[t]()}}))}}b(Pe);const
xe={...Pe.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"},Me={...Pe.DefaultType,content:"
(null|string|element|function)"};class je extends Pe{static get Default(){return
xe}static get DefaultType(){return Me}static get NAME()
{return"popover"}_isWithContent(){return this._getTitle()||
this._getContent()}_getContentForTemplate(){return{".popover-
header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return
this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t)
{return this.each((function(){const
e=je.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new
TypeError(`No method named "${t}"`);e[t]()}}))}}b(je);const
$e="click.bs.scrollspy",Fe="active",ze="[href]",He={offset:null,rootMargin:"0px 0px
-25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},qe={offset:"(number|
null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array
"};class Be extends V{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._previousScroll
Data={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default()
{return He}static get DefaultType(){return qe}static get NAME()
{return"scrollspy"}refresh()
{this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._obse
rver?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){return
t.target=c(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)))),t}
_maybeEnableSmoothScroll(){this._config.smoothScroll&&($.off(this._config.target,
$e),$.on(this._config.target,$e,ze,(t=>{const
e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const
i=this._rootElement||window,s=e.offsetTop-
this._element.offsetTop;if(i.scrollTo)return void
i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_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
e=t=>this._targetLinks.get(`#$
{t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,t
his._process(e(t))},s=(this._rootElement||
document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;t
his._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting)
{this._activeTarget=null,this._clearActiveClass(e(o));continue}const
t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!
s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new
Map,this._observableSections=new Map;const
t=U.find(ze,this._config.target);for(const e of t){if(!e.hash||d(e))continue;const
t=U.findOne(e.hash,this._element);h(t)&&(this._targetLinks.set(e.hash,e),this._obse
rvableSections.set(e.hash,t))}}_process(t){this._activeTarget!
==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.
add(Fe),this._activateParents(t),$.trigger(this._element,"activate.bs.scrollspy",
{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-
item"))U.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Fe);else
for(const e of U.parents(t,".nav, .list-group"))for(const t of U.prev(e,".nav-link,
.nav-item > .nav-link, .list-group-item"))t.classList.add(Fe)}_clearActiveClass(t)
{t.classList.remove(Fe);const e=U.find("[href].active",t);for(const t of
e)t.classList.remove(Fe)}static jQueryInterface(t){return this.each((function()
{const e=Be.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]()}}))}}$.on(window,"load.bs.scrollspy.data-api",(()=>{for(const t of
U.find('[data-bs-spy="scroll"]'))Be.getOrCreateInstance(t)})),b(Be);const
We="ArrowLeft",Re="ArrowRight",Ve="ArrowUp",Ke="ArrowDown",Qe="active",Xe="fade",Ye
="show",Ue='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-
toggle="list"]',Ge=`.nav-link:not(.dropdown-toggle), .list-group-
item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Ue}`;class Je
extends V{constructor(t){super(t),this._parent=this._element.closest('.list-
group, .nav,
[role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._get
Children()),$.on(this._element,"keydown.bs.tab",(t=>this._keydown(t))))}static get
NAME(){return"tab"}show(){const
t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?
$.trigger(e,"hide.bs.tab",{relatedTarget:t}):null;$.trigger(t,"show.bs.tab",
{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||
(this._deactivate(e,t),this._activate(t,e))}_activate(t,e)
{t&&(t.classList.add(Qe),this._activate(r(t)),this._queueCallback((()=>{"tab"===t.g
etAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!
0),this._toggleDropDown(t,!0),$.trigger(t,"shown.bs.tab",
{relatedTarget:e})):t.classList.add(Ye)}),t,t.classList.contains(Xe)))}_deactivate(
t,e)
{t&&(t.classList.remove(Qe),t.blur(),this._deactivate(r(t)),this._queueCallback((()
=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!
1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),
$.trigger(t,"hidden.bs.tab",
{relatedTarget:e})):t.classList.remove(Ye)}),t,t.classList.contains(Xe)))}_keydown(
t){if(!
[We,Re,Ve,Ke].includes(t.key))return;t.stopPropagation(),t.preventDefault();const
e=[Re,Ke].includes(t.key),i=w(this._getChildren().filter((t=>!d(t))),t.target,e,!
0);i&&(i.focus({preventScroll:!0}),Je.getOrCreateInstance(i).show())}_getChildren()
{return U.find(Ge,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),i=this._getOuterElement(t);t.setAttribute("aria-
selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||
t.setAttribute("tabindex","-
1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTarge
tPanel(t)}_setInitialAttributesOnTargetPanel(t){const
e=r(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttrib
uteIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const
i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const
s=(t,s)=>{const n=U.findOne(t,i);n&&n.classList.toggle(s,e)};s(".dropdown-
toggle",Qe),s(".dropdown-menu",Ye),i.setAttribute("aria-
expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||
t.setAttribute(e,i)}_elemIsActive(t){return
t.classList.contains(Qe)}_getInnerElement(t){return t.matches(Ge)?
t:U.findOne(Ge,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-
item")||t}static jQueryInterface(t){return this.each((function(){const
e=Je.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||
t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "$
{t}"`);e[t]()}}))}}$.on(document,"click.bs.tab",Ue,(function(t)
{["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this)||
Je.getOrCreateInstance(this).show()})),$.on(window,"load.bs.tab",(()=>{for(const t
of U.find('.active[data-bs-toggle="tab"], .active[data-bs-
toggle="pill"], .active[data-bs-
toggle="list"]'))Je.getOrCreateInstance(t)})),b(Je);const
Ze="hide",ti="show",ei="showing",ii={animation:"boolean",autohide:"boolean",delay:"
number"},si={animation:!0,autohide:!0,delay:5e3};class ni extends
V{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!
1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return
si}static get DefaultType(){return ii}static get NAME(){return"toast"}show()
{$.trigger(this._element,"show.bs.toast").defaultPrevented||
(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),t
his._element.classList.remove(Ze),g(this._element),this._element.classList.add(ti,e
i),this._queueCallback((()=>{this._element.classList.remove(ei),
$.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element
,this._config.animation))}hide()
{this.isShown()&&($.trigger(this._element,"hide.bs.toast").defaultPrevented||
(this._element.classList.add(ei),this._queueCallback((()=>{this._element.classList.
add(Ze),this._element.classList.remove(ei,ti),
$.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation))
)}dispose()
{this._clearTimeout(),this.isShown()&&this._element.classList.remove(ti),super.disp
ose()}isShown(){return this._element.classList.contains(ti)}_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":cas
e"focusout":this._hasKeyboardInteraction=e}if(e)return void
this._clearTimeout();const i=t.relatedTarget;this._element===i||
this._element.contains(i)||this._maybeScheduleHide()}_setListeners()
{$.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),
$.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),$.
on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),
$.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!
1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static
jQueryInterface(t){return this.each((function(){const
e=ni.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new
TypeError(`No method named "${t}"`);e[t](this)}}))}}return K(ni),b(ni),
{Alert:Q,Button:Y,Carousel:ht,Collapse:mt,Dropdown:Mt,Modal:ne,Offcanvas:_e,Popover
:je,ScrollSpy:Be,Tab:Je,Toast:ni,Tooltip:Pe}}));
//# sourceMappingURL=bootstrap.min.js.map