UNPKG

@coreui/coreui

Version:

The most popular front-end framework for developing responsive, mobile-first projects on the web rewritten and maintained by the CoreUI Team

6 lines 99.9 kB
/*! * CoreUI v5.6.1 (https://coreui.io) * Copyright 2026 The CoreUI Team (https://github.com/orgs/coreui/people) * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE) */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap=t()}(this,function(){"use strict";const e=new Map,t={set(t,i,n){e.has(t)||e.set(t,new Map);const s=e.get(t);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,i)=>e.has(t)&&e.get(t).get(i)||null,remove(t,i){if(!e.has(t))return;const n=e.get(t);n.delete(i),0===n.size&&e.delete(t)}},i="transitionend",n=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),s=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),o=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},r=e=>{e.dispatchEvent(new Event(i))},a=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),l=e=>a(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(n(e)):null,c=e=>{if(!a(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),i=e.closest("details:not([open])");if(!i)return t;if(i!==e){const t=e.closest("summary");if(t&&t.parentNode!==i)return!1;if(null===t)return!1}return t},h=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),d=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?d(e.parentNode):null},u=()=>{},f=e=>{e.offsetHeight},p=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,_=[],g=()=>"rtl"===document.documentElement.dir,m=e=>{var t;t=()=>{const t=p();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}},"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of _)e()}),_.push(t)):t()},b=(e,t=[],i=e)=>"function"==typeof e?e.call(...t):i,v=(e,t,n=!0)=>{if(!n)return void b(e);const s=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const n=Number.parseFloat(t),s=Number.parseFloat(i);return n||s?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let o=!1;const a=({target:n})=>{n===t&&(o=!0,t.removeEventListener(i,a),b(e))};t.addEventListener(i,a),setTimeout(()=>{o||r(t)},s)},y=(e,t,i,n)=>{const s=e.length;let o=e.indexOf(t);return-1===o?!i&&n?e[s-1]:e[0]:(o+=i?1:-1,n&&(o=(o+s)%s),e[Math.max(0,Math.min(o,s-1))])},w=/[^.]*(?=\..*)\.|.*/,C=/\..*/,E=/::\d+$/,A={};let T=1;const k={mouseenter:"mouseover",mouseleave:"mouseout"},x=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 O(e,t){return t&&`${t}::${T++}`||e.uidEvent||T++}function L(e){const t=O(e);return e.uidEvent=t,A[t]=A[t]||{},A[t]}function S(e,t,i=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===i)}function I(e,t,i){const n="string"==typeof t,s=n?i:t||i;let o=M(e);return x.has(o)||(o=e),[n,s,o]}function D(e,t,i,n,s){if("string"!=typeof t||!e)return;let[o,r,a]=I(t,i,n);if(t in k){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=L(e),c=l[a]||(l[a]={}),h=S(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,t.replace(w,"")),u=o?function(e,t,i){return function n(s){const o=e.querySelectorAll(t);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(e,s.type,t,i),i.apply(r,[s])}}(e,i,r):function(e,t){return function i(n){return j(n,{delegateTarget:e}),i.oneOff&&P.off(e,n.type,t),t.apply(e,[n])}}(e,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,e.addEventListener(a,u,o)}function $(e,t,i,n,s){const o=S(t[i],n,s);o&&(e.removeEventListener(i,o,Boolean(s)),delete t[i][o.uidEvent])}function N(e,t,i,n){const s=t[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&$(e,t,i,r.callable,r.delegationSelector)}function M(e){return e=e.replace(C,""),k[e]||e}const P={on(e,t,i,n){D(e,t,i,n,!1)},one(e,t,i,n){D(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[s,o,r]=I(t,i,n),a=r!==t,l=L(e),c=l[r]||{},h=t.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))N(e,l,i,t.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(E,"");a&&!t.includes(s)||$(e,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;$(e,l,r,o,s?i:null)}},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=p();let s=null,o=!0,r=!0,a=!1;t!==M(t)&&n&&(s=n.Event(t,i),n(e).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=j(new Event(t,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function j(e,t={}){for(const[i,n]of Object.entries(t))try{e[i]=n}catch(t){Object.defineProperty(e,i,{configurable:!0,get:()=>n})}return e}function F(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function B(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const H={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${B(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${B(t)}`)},getDataAttributes(e){if(!e)return{};const t={},i=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),t[i]=F(e.dataset[n])}return t},getDataAttribute:(e,t)=>F(e.getAttribute(`data-bs-${B(t)}`))};class R{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(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const i=a(t)?H.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...a(t)?H.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[i,n]of Object.entries(t)){const t=e[i],o=a(t)?"element":s(t);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${n}".`)}}}class z extends R{constructor(e,i){super(),(e=l(e))&&(this._element=e,this._config=this._getConfig(i),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),P.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,i=!0){v(e,t,i)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return t.get(l(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.6.1"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const V=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t?t.split(",").map(e=>n(e)).join(","):null},W={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter(e=>e.matches(t)),parents(e,t){const i=[];let n=e.parentNode.closest(t);for(;n;)i.push(n),n=n.parentNode.closest(t);return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(e=>!h(e)&&c(e))},getSelectorFromElement(e){const t=V(e);return t&&W.findOne(t)?t:null},getElementFromSelector(e){const t=V(e);return t?W.findOne(t):null},getMultipleElementsFromSelector(e){const t=V(e);return t?W.find(t):[]}},q=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,n=e.NAME;P.on(document,i,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),h(this))return;const s=W.getElementFromSelector(this)||this.closest(`.${n}`);e.getOrCreateInstance(s)[t]()})},U=".bs.alert",K=`close${U}`,Q=`closed${U}`;class Y extends z{static get NAME(){return"alert"}close(){if(P.trigger(this._element,K).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),P.trigger(this._element,Q),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Y.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}q(Y,"close"),m(Y);const X='[data-bs-toggle="button"]';class G extends z{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each(function(){const t=G.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}P.on(document,"click.bs.button.data-api",X,e=>{e.preventDefault();const t=e.target.closest(X);G.getOrCreateInstance(t).toggle()}),m(G);const J=".bs.swipe",Z=`touchstart${J}`,ee=`touchmove${J}`,te=`touchend${J}`,ie=`pointerdown${J}`,ne=`pointerup${J}`,se={endCallback:null,leftCallback:null,rightCallback:null},oe={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class re extends R{constructor(e,t){super(),this._element=e,e&&re.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return se}static get DefaultType(){return oe}static get NAME(){return"swipe"}dispose(){P.off(this._element,J)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),b(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&b(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(P.on(this._element,ie,e=>this._start(e)),P.on(this._element,ne,e=>this._end(e)),this._element.classList.add("pointer-event")):(P.on(this._element,Z,e=>this._start(e)),P.on(this._element,ee,e=>this._move(e)),P.on(this._element,te,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ae=".bs.carousel",le=".data-api",ce="ArrowLeft",he="ArrowRight",de="next",ue="prev",fe="left",pe="right",_e=`slide${ae}`,ge=`slid${ae}`,me=`keydown${ae}`,be=`mouseenter${ae}`,ve=`mouseleave${ae}`,ye=`dragstart${ae}`,we=`load${ae}${le}`,Ce=`click${ae}${le}`,Ee="carousel",Ae="active",Te=".active",ke=".carousel-item",xe=Te+ke,Oe={[ce]:pe,[he]:fe},Le={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ie extends z{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=W.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Ee&&this.cycle()}static get Default(){return Le}static get DefaultType(){return Se}static get NAME(){return"carousel"}next(){this._slide(de)}nextWhenVisible(){!document.hidden&&c(this._element)&&this.next()}prev(){this._slide(ue)}pause(){this._isSliding&&r(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?P.one(this._element,ge,()=>this.cycle()):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void P.one(this._element,ge,()=>this.to(e));const i=this._getItemIndex(this._getActive());if(i===e)return;const n=e>i?de:ue;this._slide(n,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&P.on(this._element,me,e=>this._keydown(e)),"hover"===this._config.pause&&(P.on(this._element,be,()=>this.pause()),P.on(this._element,ve,()=>this._maybeEnableCycle())),this._config.touch&&re.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of W.find(".carousel-item img",this._element))P.on(e,ye,e=>e.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(fe)),rightCallback:()=>this._slide(this._directionToOrder(pe)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new re(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Oe[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=W.findOne(Te,this._indicatorsElement);t.classList.remove(Ae),t.removeAttribute("aria-current");const i=W.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);i&&(i.classList.add(Ae),i.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const i=this._getActive(),n=e===de,s=t||y(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=t=>P.trigger(this._element,t,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(i),to:o});if(r(_e).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),f(s),i.classList.add(l),s.classList.add(l),this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(Ae),i.classList.remove(Ae,c,l),this._isSliding=!1,r(ge)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return W.findOne(xe,this._element)}_getItems(){return W.find(ke,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return g()?e===fe?ue:de:e===fe?de:ue}_orderToDirection(e){return g()?e===ue?fe:pe:e===ue?pe:fe}static jQueryInterface(e){return this.each(function(){const t=Ie.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)})}}P.on(document,Ce,"[data-bs-slide], [data-bs-slide-to]",function(e){const t=W.getElementFromSelector(this);if(!t||!t.classList.contains(Ee))return;e.preventDefault();const i=Ie.getOrCreateInstance(t),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===H.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),P.on(window,we,()=>{const e=W.find('[data-bs-ride="carousel"]');for(const t of e)Ie.getOrCreateInstance(t)}),m(Ie);const De=".bs.chip",$e=`remove${De}`,Ne=`removed${De}`,Me=`select${De}`,Pe=`selected${De}`,je=`deselect${De}`,Fe=`deselected${De}`,Be=".chip-remove",He=".chip:not(.disabled)",Re="active",ze="disabled",Ve={ariaRemoveLabel:"Remove",disabled:!1,removable:!1,removeIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"/><line x1="12" y1="4" x2="4" y2="12"/></svg>',selectable:!1,selected:!1},We={ariaRemoveLabel:"string",disabled:"boolean",removable:"boolean",removeIcon:"string",selectable:"boolean",selected:"boolean"};class qe extends z{constructor(e,t){super(e,t),this._disabled=this._config.disabled||this._element.classList.contains(ze),this._selected=this._config.selected||this._element.classList.contains(Re),this._ensureRemoveButton(),this._applyState(),(this._config.selectable||this._config.removable)&&this._makeFocusable(),this._addEventListeners()}static get Default(){return Ve}static get DefaultType(){return We}static get NAME(){return"chip"}remove(){P.trigger(this._element,$e).defaultPrevented||this._destroyElement()}toggle(){this._config.selectable&&(this._selected?this.deselect():this.select())}select(){this._config.selectable&&(this._selected||P.trigger(this._element,Me).defaultPrevented||(this._selected=!0,this._applyState(),P.trigger(this._element,Pe)))}deselect(){this._config.selectable&&this._selected&&(P.trigger(this._element,je).defaultPrevented||(this._selected=!1,this._applyState(),P.trigger(this._element,Fe)))}_addEventListeners(){P.on(this._element,"keydown",e=>this._handleKeydown(e)),P.on(this._element,"click",e=>{this._disabled||e.target.closest(Be)||this.toggle()}),P.on(this._element,"click",Be,e=>{e.stopPropagation(),this.remove()})}_applyState(){this._disabled||!this._config.clickable&&!this._config.selectable||this._element.classList.add("chip-clickable"),this._disabled?(this._element.classList.add(ze),this._element.setAttribute("aria-disabled","true")):(this._element.classList.remove(ze),"true"===this._element.getAttribute("aria-disabled")&&this._element.setAttribute("aria-disabled","false")),this._config.selectable?(this._element.classList.toggle(Re,this._selected),this._element.setAttribute("aria-selected",this._selected?"true":"false")):(this._element.classList.remove(Re),"true"===this._element.getAttribute("aria-selected")&&this._element.setAttribute("aria-selected","false"))}_createRemoveButton(){const e=document.createElement("button");return e.type="button",e.className="chip-remove",e.setAttribute("aria-label",this._config.ariaRemoveLabel),e.setAttribute("tabindex","-1"),e.innerHTML=this._config.removeIcon,e}_ensureRemoveButton(){this._config.removable&&(W.findOne(Be,this._element)||this._element.append(this._createRemoveButton()))}_makeFocusable(){this._element.hasAttribute("tabindex")||this._disabled||this._element.setAttribute("tabindex","0")}_handleKeydown(e){const{key:t}=e;if(!this._disabled)switch(t){case"Enter":case" ":case"Spacebar":if(!this._config.selectable)return;e.preventDefault(),this.toggle();break;case"Backspace":case"Delete":if(this._config.removable){e.preventDefault();const t=this._getFocusableSibling(!1)||this._getFocusableSibling(!0);null==t||t.focus(),this.remove()}break;case"ArrowLeft":{e.preventDefault();const t=this._getFocusableSibling(!1);null==t||t.focus();break}case"ArrowRight":{e.preventDefault();const t=this._getFocusableSibling(!0);null==t||t.focus();break}case"Home":e.preventDefault(),this._navigateToEdge(0);break;case"End":e.preventDefault(),this._navigateToEdge(-1)}}_getFocusableSibling(e){const t=W.find(He,this._element.parentElement),i=y(t,this._element,e,!t.includes(this._element));return i===this._element?null:i}_navigateToEdge(e){const t=W.find(He,this._element.parentElement);if(0===t.length)return;const i=t.at(e);null==i||i.focus()}_destroyElement(){P.trigger(this._element,Ne),this._element.remove(),this.dispose()}static chipInterface(e,t){const i=qe.getOrCreateInstance(e,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each(function(){const t=qe.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}P.on(document,`DOMContentLoaded${De}.data-api`,()=>{for(const e of W.find("[data-bs-chip]"))qe.chipInterface(e)}),m(qe);const Ue=".bs.chip-input",Ke=`add${Ue}`,Qe=`remove${Ue}`,Ye=`change${Ue}`,Xe=`select${Ue}`,Ge=`input${Ue}`,Je=".chip",Ze=`${Je}.active`,et=".chip-remove",tt="disabled",it={chipClassName:null,createOnBlur:!0,disabled:!1,id:null,maxChips:null,name:null,placeholder:"",readonly:!1,removable:!0,removeIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"/><line x1="12" y1="4" x2="4" y2="12"/></svg>',selectable:!1,separator:","},nt={chipClassName:"(string|function|null)",createOnBlur:"boolean",disabled:"boolean",maxChips:"(number|null)",id:"(string|null)",name:"(string|null)",placeholder:"string",readonly:"boolean",removable:"boolean",removeIcon:"string",selectable:"boolean",separator:"(string|null)"};class st extends z{constructor(e,t){var i;super(e,t),this._uniqueId=null!=(i=this._config.id)?i:o(`${this.constructor.NAME}`),this._disabled=this._config.disabled||this._element.classList.contains(tt),this._readonly=this._config.readonly,this._chips=[],this._input=W.findOne("input",this._element),this._hiddenInput=null,this._input?this._setInputSize():this._createInput(),this._applyInteractionState(),this._initializeExistingChips(),this._createHiddenInput(),this._addEventListeners()}static get Default(){return it}static get DefaultType(){return nt}static get NAME(){return"chip-input"}add(e){if(this._disabled||this._readonly)return null;const t=String(e).trim();if(!t)return null;if(this._chips.includes(t))return null;if(null!==this._config.maxChips&&this._chips.length>=this._config.maxChips)return null;if(P.trigger(this._element,Ke,{value:t,relatedTarget:this._input}).defaultPrevented)return null;const i=this._createChip(t);this._element.insertBefore(i,this._input),this._chips.push(t);const n=this.getValues();return this._hiddenInput.value=n.join(","),P.trigger(this._element,Ye,{values:n}),i}remove(e){if(this._disabled||this._readonly)return!1;let t,i;if("string"==typeof e?(i=e,t=this._findChipByValue(i)):(t=e,i=this._getChipValue(t)),!t||!i)return!1;if(P.trigger(this._element,Qe,{value:i,chip:t,relatedTarget:this._input}).defaultPrevented)return!1;const n=qe.getInstance(t);return n?n.remove():(t.remove(),this._handleChipRemoved(t,i)),!t.isConnected}removeSelected(){var e;const t=this._getSelectedChipElements();for(const e of t)this.remove(e);null==(e=this._input)||e.focus()}getValues(){return[...this._chips]}getSelectedValues(){return this._getSelectedChipElements().map(e=>this._getChipValue(e))}clear(){const e=W.find(Je,this._element);for(const t of e)this.remove(t)}clearSelection(){for(const t of this._getSelectedChipElements()){var e;null==(e=qe.getInstance(t))||e.deselect()}P.trigger(this._element,Xe,{selected:[]})}selectChip(e){if(!this._getChipElements().includes(e))return;const t=qe.getInstance(e);t&&t.select()}focus(){var e;null==(e=this._input)||e.focus()}_emitSelectionChange(){P.trigger(this._element,Xe,{selected:this.getSelectedValues()})}_getChipElements(){return W.find(Je,this._element)}_getSelectedChipElements(){return W.find(Ze,this._element)}_createInput(){const e=document.createElement("input"),t=W.findOne(".chip-input-label",this._element),i=null==t?void 0:t.getAttribute("for"),n=i||o(`${this.constructor.NAME}-input`);e.type="text",e.className="chip-input-field",e.id=n,this._config.placeholder&&(e.placeholder=this._config.placeholder),t&&!i&&t.setAttribute("for",n),this._input=e,this._setInputSize(),this._element.append(e)}_createHiddenInput(){const e=document.createElement("input");e.type="hidden",e.id=this._uniqueId,e.name=this._config.name||this._uniqueId,this._element.append(e),this._hiddenInput=e,this._hiddenInput.value=this.getValues().join(",")}_createChip(e){const t=document.createElement("span");return t.className="chip",t.dataset.bsChipValue=e,t.append(document.createTextNode(e)),this._applyChipClassName(t,e),this._setupChip(t),t}_createChipFromInput(){if(this._disabled||this._readonly)return;const e=this._input.value.trim();e&&(this.add(e),this._input.value="",this._setInputSize())}_findChipByValue(e){return this._getChipElements().find(t=>this._getChipValue(t)===e)}_getChipValue(e){var t;if(e.dataset.bsChipValue)return e.dataset.bsChipValue;const i=e.cloneNode(!0),n=W.findOne(et,i);return n&&n.remove(),(null==(t=i.textContent)?void 0:t.trim())||""}_initializeExistingChips(){const e=W.find(Je,this._element);for(const t of e){const e=this._getChipValue(t);e&&(this._chips.push(e),this._applyChipClassName(t,e),this._setupChip(t))}}_applyChipClassName(e,t){const i=this._resolveChipClassName(t);i&&e.classList.add(...i.split(/\s+/).filter(Boolean))}_resolveChipClassName(e){const{chipClassName:t}=this._config;if(!t)return"";if("function"==typeof t){const i=t(e);return"string"==typeof i?i:""}return"string"==typeof t?t:""}_setupChip(e){qe.getOrCreateInstance(e,{ariaRemoveLabel:`Remove ${this._getChipValue(e)}`,disabled:this._disabled,removable:this._config.removable&&!this._readonly&&!this._disabled,removeIcon:this._config.removeIcon,selectable:this._config.selectable});const t=W.findOne(et,e);t&&(t.disabled=this._disabled||this._readonly)}_applyInteractionState(){this._element.classList.toggle(tt,this._disabled),this._input.disabled=this._disabled,this._input.readOnly=!this._disabled&&this._readonly,this._element.setAttribute("aria-disabled",this._disabled?"true":"false"),this._element.setAttribute("aria-readonly",this._readonly?"true":"false")}_addEventListeners(){P.on(this._element,"keydown",e=>{e.target!==this._input&&1===e.key.length&&this._input.focus()}),P.on(this._input,"keydown",e=>this._handleInputKeydown(e)),P.on(this._input,"input",e=>this._handleInput(e)),P.on(this._input,"paste",e=>this._handlePaste(e)),P.on(this._input,"focus",()=>this.clearSelection()),this._config.createOnBlur&&P.on(this._input,"blur",e=>{var t;null!=(t=e.relatedTarget)&&t.closest(Je)||this._createChipFromInput()}),P.on(this._element,"selected.bs.chip",Je,()=>{this._emitSelectionChange()}),P.on(this._element,"deselected.bs.chip",Je,()=>{this._emitSelectionChange()}),P.on(this._element,"remove.bs.chip",Je,e=>{(this._disabled||this._readonly)&&e.preventDefault()}),P.on(this._element,"removed.bs.chip",Je,e=>{const t=e.target.closest(Je);var i;t&&(this._handleChipRemoved(t),W.find(".chip:not(.disabled)",this._element).length>0&&(null==(i=this._input)||i.focus()),this._emitSelectionChange())}),P.on(this._element,"click",e=>{var t;e.target===this._element&&(null==(t=this._input)||t.focus())})}_handleInputKeydown(e){const{key:t}=e;switch(t){case"Enter":e.preventDefault(),this._createChipFromInput();break;case"Backspace":case"Delete":if(""===this._input.value){e.preventDefault();const t=this._getChipElements();t.length>0&&t.at(-1).focus()}break;case"ArrowLeft":if(0===this._input.selectionStart&&0===this._input.selectionEnd){e.preventDefault();const t=this._getChipElements();t.length>0&&t.at(-1).focus()}break;case"Escape":this._input.value="",this._input.blur()}}_handleChipRemoved(e,t=null){const i=t||this._getChipValue(e),n=this._chips.indexOf(i);-1!==n&&this._chips.splice(n,1);const s=this.getValues();this._hiddenInput.value=s.join(","),P.trigger(this._element,Ye,{values:s})}_handleInput(e){if(this._disabled||this._readonly)return;const{value:t}=e.target,{separator:i}=this._config;if(i&&t.includes(i)){const e=t.split(i);for(const t of e.slice(0,-1))this.add(t.trim());this._input.value=e.at(-1)}this._setInputSize(),P.trigger(this._element,Ge,{value:this._input.value,relatedTarget:this._input})}_handlePaste(e){if(this._disabled||this._readonly)return;const{separator:t}=this._config;if(!t)return;const i=(e.clipboardData||window.clipboardData).getData("text");if(i.includes(t)){e.preventDefault();const n=i.split(t);for(const e of n)this.add(e.trim())}}_setInputSize(){this._input&&(this._input.size=Math.max(this._input.placeholder.length,this._input.value.length)||1)}}P.on(document,`DOMContentLoaded${Ue}.data-api`,()=>{for(const e of W.find("[data-bs-chip-input]"))st.getOrCreateInstance(e)});const ot=".bs.collapse",rt=`show${ot}`,at=`shown${ot}`,lt=`hide${ot}`,ct=`hidden${ot}`,ht=`click${ot}.data-api`,dt="show",ut="collapse",ft="collapsing",pt=`:scope .${ut} .${ut}`,_t='[data-bs-toggle="collapse"]',gt={parent:null,toggle:!0},mt={parent:"(null|element)",toggle:"boolean"};class bt extends z{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const i=W.find(_t);for(const e of i){const t=W.getSelectorFromElement(e),i=W.find(t).filter(e=>e===this._element);null!==t&&i.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return gt}static get DefaultType(){return mt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(e=>e!==this._element).map(e=>bt.getOrCreateInstance(e,{toggle:!1}))),e.length&&e[0]._isTransitioning)return;if(P.trigger(this._element,rt).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(ut),this._element.classList.add(ft),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ft),this._element.classList.add(ut,dt),this._element.style[t]="",P.trigger(this._element,at)},this._element,!0),this._element.style[t]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,lt).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,f(this._element),this._element.classList.add(ft),this._element.classList.remove(ut,dt);for(const e of this._triggerArray){const t=W.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ft),this._element.classList.add(ut),P.trigger(this._element,ct)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(dt)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=l(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(_t);for(const t of e){const e=W.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=W.find(pt,this._config.parent);return W.find(e,this._config.parent).filter(e=>!t.includes(e))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const i of e)i.classList.toggle("collapsed",!t),i.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const i=bt.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}})}}P.on(document,ht,_t,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of W.getMultipleElementsFromSelector(this))bt.getOrCreateInstance(e,{toggle:!1}).toggle()}),m(bt);var vt="top",yt="bottom",wt="right",Ct="left",Et="auto",At=[vt,yt,wt,Ct],Tt="start",kt="end",xt="clippingParents",Ot="viewport",Lt="popper",St="reference",It=At.reduce(function(e,t){return e.concat([t+"-"+Tt,t+"-"+kt])},[]),Dt=[].concat(At,[Et]).reduce(function(e,t){return e.concat([t,t+"-"+Tt,t+"-"+kt])},[]),$t="beforeRead",Nt="read",Mt="afterRead",Pt="beforeMain",jt="main",Ft="afterMain",Bt="beforeWrite",Ht="write",Rt="afterWrite",zt=[$t,Nt,Mt,Pt,jt,Ft,Bt,Ht,Rt];function Vt(e){return e?(e.nodeName||"").toLowerCase():null}function Wt(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qt(e){return e instanceof Wt(e).Element||e instanceof Element}function Ut(e){return e instanceof Wt(e).HTMLElement||e instanceof HTMLElement}function Kt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Wt(e).ShadowRoot||e instanceof ShadowRoot)}const Qt={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];Ut(s)&&Vt(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],s=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce(function(e,t){return e[t]="",e},{});Ut(n)&&Vt(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};function Yt(e){return e.split("-")[0]}var Xt=Math.max,Gt=Math.min,Jt=Math.round;function Zt(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ei(){return!/^((?!chrome|android).)*safari/i.test(Zt())}function ti(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),s=1,o=1;t&&Ut(e)&&(s=e.offsetWidth>0&&Jt(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Jt(n.height)/e.offsetHeight||1);var r=(qt(e)?Wt(e):window).visualViewport,a=!ei()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function ii(e){var t=ti(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function ni(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Kt(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function si(e){return Wt(e).getComputedStyle(e)}function oi(e){return["table","td","th"].indexOf(Vt(e))>=0}function ri(e){return((qt(e)?e.ownerDocument:e.document)||window.document).documentElement}function ai(e){return"html"===Vt(e)?e:e.assignedSlot||e.parentNode||(Kt(e)?e.host:null)||ri(e)}function li(e){return Ut(e)&&"fixed"!==si(e).position?e.offsetParent:null}function ci(e){for(var t=Wt(e),i=li(e);i&&oi(i)&&"static"===si(i).position;)i=li(i);return i&&("html"===Vt(i)||"body"===Vt(i)&&"static"===si(i).position)?t:i||function(e){var t=/firefox/i.test(Zt());if(/Trident/i.test(Zt())&&Ut(e)&&"fixed"===si(e).position)return null;var i=ai(e);for(Kt(i)&&(i=i.host);Ut(i)&&["html","body"].indexOf(Vt(i))<0;){var n=si(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function hi(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function di(e,t,i){return Xt(e,Gt(t,i))}function ui(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function fi(e,t){return t.reduce(function(t,i){return t[i]=e,t},{})}const pi={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,s=e.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=Yt(i.placement),l=hi(a),c=[Ct,wt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(e,t){return ui("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:fi(e,At))}(s.padding,i),d=ii(o),u="y"===l?vt:Ct,f="y"===l?yt:wt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],_=r[l]-i.rects.reference[l],g=ci(o),m=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-_/2,v=h[u],y=m-d[c]-h[f],w=m/2-d[c]/2+b,C=di(v,w,y),E=l;i.modifiersData[n]=((t={})[E]=C,t.centerOffset=C-w,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&ni(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _i(e){return e.split("-")[1]}var gi={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mi(e){var t,i=e.popper,n=e.popperRect,s=e.placement,o=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,h=e.roundOffsets,d=e.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,_=void 0===p?0:p,g="function"==typeof h?h({x:f,y:_}):{x:f,y:_};f=g.x,_=g.y;var m=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Ct,y=vt,w=window;if(c){var C=ci(i),E="clientHeight",A="clientWidth";C===Wt(i)&&"static"!==si(C=ri(i)).position&&"absolute"===a&&(E="scrollHeight",A="scrollWidth"),(s===vt||(s===Ct||s===wt)&&o===kt)&&(y=yt,_-=(d&&C===w&&w.visualViewport?w.visualViewport.height:C[E])-n.height,_*=l?1:-1),s!==Ct&&(s!==vt&&s!==yt||o!==kt)||(v=wt,f-=(d&&C===w&&w.visualViewport?w.visualViewport.width:C[A])-n.width,f*=l?1:-1)}var T,k=Object.assign({position:a},c&&gi),x=!0===h?function(e,t){var i=e.x,n=e.y,s=t.devicePixelRatio||1;return{x:Jt(i*s)/s||0,y:Jt(n*s)/s||0}}({x:f,y:_},Wt(i)):{x:f,y:_};return f=x.x,_=x.y,l?Object.assign({},k,((T={})[y]=b?"0":"",T[v]=m?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+_+"px)":"translate3d("+f+"px, "+_+"px, 0)",T)):Object.assign({},k,((t={})[y]=b?_+"px":"",t[v]=m?f+"px":"",t.transform="",t))}const bi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:Yt(t.placement),variation:_i(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mi(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mi(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var vi={passive:!0};const yi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Wt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",i.update,vi)}),a&&l.addEventListener("resize",i.update,vi),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",i.update,vi)}),a&&l.removeEventListener("resize",i.update,vi)}},data:{}};var wi={left:"right",right:"left",bottom:"top",top:"bottom"};function Ci(e){return e.replace(/left|right|bottom|top/g,function(e){return wi[e]})}var Ei={start:"end",end:"start"};function Ai(e){return e.replace(/start|end/g,function(e){return Ei[e]})}function Ti(e){var t=Wt(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ki(e){return ti(ri(e)).left+Ti(e).scrollLeft}function xi(e){var t=si(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Oi(e){return["html","body","#document"].indexOf(Vt(e))>=0?e.ownerDocument.body:Ut(e)&&xi(e)?e:Oi(ai(e))}function Li(e,t){var i;void 0===t&&(t=[]);var n=Oi(e),s=n===(null==(i=e.ownerDocument)?void 0:i.body),o=Wt(n),r=s?[o].concat(o.visualViewport||[],xi(n)?n:[]):n,a=t.concat(r);return s?a:a.concat(Li(ai(r)))}function Si(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ii(e,t,i){return t===Ot?Si(function(e,t){var i=Wt(e),n=ri(e),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=ei();(c||!c&&"fixed"===t)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+ki(e),y:l}}(e,i)):qt(t)?function(e,t){var i=ti(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):Si(function(e){var t,i=ri(e),n=Ti(e),s=null==(t=e.ownerDocument)?void 0:t.body,o=Xt(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Xt(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ki(e),l=-n.scrollTop;return"rtl"===si(s||i).direction&&(a+=Xt(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(ri(e)))}function Di(e){var t,i=e.reference,n=e.element,s=e.placement,o=s?Yt(s):null,r=s?_i(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case vt:t={x:a,y:i.y-n.height};break;case yt:t={x:a,y:i.y+i.height};break;case wt:t={x:i.x+i.width,y:l};break;case Ct:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=o?hi(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Tt:t[c]=t[c]-(i[h]/2-n[h]/2);break;case kt:t[c]=t[c]+(i[h]/2-n[h]/2)}}return t}function $i(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=void 0===n?e.placement:n,o=i.strategy,r=void 0===o?e.strategy:o,a=i.boundary,l=void 0===a?xt:a,c=i.rootBoundary,h=void 0===c?Ot:c,d=i.elementContext,u=void 0===d?Lt:d,f=i.altBoundary,p=void 0!==f&&f,_=i.padding,g=void 0===_?0:_,m=ui("number"!=typeof g?g:fi(g,At)),b=u===Lt?St:Lt,v=e.rects.popper,y=e.elements[p?b:u],w=function(e,t,i,n){var s="clippingParents"===t?function(e){var t=Li(ai(e)),i=["absolute","fixed"].indexOf(si(e).position)>=0&&Ut(e)?ci(e):e;return qt(i)?t.filter(function(e){return qt(e)&&ni(e,i)&&"body"!==Vt(e)}):[]}(e):[].concat(t),o=[].concat(s,[i]),r=o[0],a=o.reduce(function(t,i){var s=Ii(e,i,n);return t.top=Xt(s.top,t.top),t.right=Gt(s.right,t.right),t.bottom=Gt(s.bottom,t.bottom),t.left=Xt(s.left,t.left),t},Ii(e,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(qt(y)?y:y.contextElement||ri(e.elements.popper),l,h,r),C=ti(e.elements.reference),E=Di({reference:C,element:v,placement:s}),A=Si(Object.assign({},v,E)),T=u===Lt?A:C,k={top:w.top-T.top+m.top,bottom:T.bottom-w.bottom+m.bottom,left:w.left-T.left+m.left,right:T.right-w.right+m.right},x=e.modifiersData.offset;if(u===Lt&&x){var O=x[s];Object.keys(k).forEach(function(e){var t=[wt,yt].indexOf(e)>=0?1:-1,i=[vt,yt].indexOf(e)>=0?"y":"x";k[e]+=O[i]*t})}return k}function Ni(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Dt:l,h=_i(n),d=h?a?It:It.filter(function(e){return _i(e)===h}):At,u=d.filter(function(e){return c.indexOf(e)>=0});0===u.length&&(u=d);var f=u.reduce(function(t,i){return t[i]=$i(e,{placement:i,boundary:s,rootBoundary:o,padding:r})[Yt(i)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}const Mi={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,_=i.allowedAutoPlacements,g=t.options.placement,m=Yt(g),b=l||(m!==g&&p?function(e){if(Yt(e)===Et)return[];var t=Ci(e);return[Ai(e),t,Ai(t)]}(g):[Ci(g)]),v=[g].concat(b).reduce(function(e,i){return e.concat(Yt(i)===Et?Ni(t,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:_}):i)},[]),y=t.rects.reference,w=t.rects.popper,C=new Map,E=!0,A=v[0],T=0;T<v.length;T++){var k=v[T],x=Yt(k),O=_i(k)===Tt,L=[vt,yt].indexOf(x)>=0,S=L?"width":"height",I=$i(t,{placement:k,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),D=L?O?wt:Ct:O?yt:vt;y[S]>w[S]&&(D=Ci(D));var $=Ci(D),N=[];if(o&&N.push(I[x]<=0),a&&N.push(I[D]<=0,I[$]<=0),N.every(function(e){return e})){A=k,E=!1;break}C.set(k,N)}if(E)for(var M=function(e){var t=v.find(function(t){var i=C.get(t);if(i)return i.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},P=p?3:1;P>0&&"break"!==M(P);P--);t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Pi(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function ji(e){return[vt,wt,yt,Ct].some(function(t){return e[t]>=0})}const Fi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=$i(t,{elementContext:"reference"}),a=$i(t,{altBoundary:!0}),l=Pi(r,n),c=Pi(a,s,o),h=ji(l),d=ji(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},Bi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.offset,o=void 0===s?[0,0]:s,r=Dt.reduce(function(e,i){return e[i]=function(e,t,i){var n=Yt(e),s=[Ct,vt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},t,{placement:e})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Ct,wt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,t.rects,o),e},{}),a=r[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=r}},Hi={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=Di({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},Ri={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,_=void 0===p?0:p,g=$i(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),m=Yt(t.placement),b=_i(t.placement),v=!b,y=hi(m),w="x"===y?"y":"x",C=t.modifiersData.popperOffsets,E=t.rects.reference,A=t.rects.popper,T="function"==typeof _?_(Object.assign({},t.rects,{placement:t.placement})):_,k="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(C){if(o){var L,S="y"===y?vt:Ct,I="y"===y?yt:wt,D="y"===y?"height":"width",$=C[y],N=$+g[S],M=$-g[I],P=f?-A[D]/2:0,j=b===Tt?E[D]:A[D],F=b===Tt?-A[D]:-E[D],B=t.elements.arrow,H=f&&B?ii(B):{width:0,height:0},R=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=R[S],V=R[I],W=di(0,E[D],H[D]),q=v?E[D]/2-P-W-z-k.mainAxis:j-W-z-k.mainAxis,U=v?-E[D]/2+P+W+V+k.mainAxis:F+W+V+k.mainAxis,K=t.elements.arrow&&ci(t.elements.arrow),Q=K?"y"===y?K.clientTop||0:K.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,X=$+U-Y,G=di(f?Gt(N,$+q-Y-Q):N,$,f?Xt(M,X):M);C[y]=G,O[y]=G-$}if(a){var J,Z="x"===y?vt:Ct,ee="x"===y?yt:wt,te=C[w],ie="y"===w?"height":"width",ne=te+g[Z],se=te-g[ee],oe=