UNPKG

@coreui/coreui-pro

Version:

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

6 lines 192 kB
/*! * CoreUI v5.14.2 (https://coreui.io) * Copyright 2025 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).coreui=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=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},a=e=>{e.dispatchEvent(new Event(i))},o=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),r=e=>o(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(n(e)):null,l=e=>{if(!o(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},c=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),h=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?h(e.parentNode):null},d=()=>{},u=e=>{e.offsetHeight},_=()=>window.jQuery&&!document.body.hasAttribute("data-coreui-no-jquery")?window.jQuery:null,f=[],g=()=>"rtl"===document.documentElement.dir,p=e=>{var t;t=()=>{const t=_();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?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of f)e()})),f.push(t)):t()},m=(e,t=[],i=e)=>"function"==typeof e?e.call(...t):i,b=(e,t,n=!0)=>{if(!n)return void m(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 r=({target:n})=>{n===t&&(o=!0,t.removeEventListener(i,r),m(e))};t.addEventListener(i,r),setTimeout((()=>{o||a(t)}),s)},v=(e,t,i,n)=>{const s=e.length;let a=e.indexOf(t);return-1===a?!i&&n?e[s-1]:e[0]:(a+=i?1:-1,n&&(a=(a+s)%s),e[Math.max(0,Math.min(a,s-1))])},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,D=/::\d+$/,k={};let E=1;const L={mouseenter:"mouseover",mouseleave:"mouseout"},A=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 C(e,t){return t&&`${t}::${E++}`||e.uidEvent||E++}function T(e){const t=C(e);return e.uidEvent=t,k[t]=k[t]||{},k[t]}function x(e,t,i=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===i))}function S(e,t,i){const n="string"==typeof t,s=n?i:t||i;let a=I(e);return A.has(a)||(a=e),[n,s,a]}function O(e,t,i,n,s){if("string"!=typeof t||!e)return;let[a,o,r]=S(t,i,n);if(t in L){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};o=e(o)}const l=T(e),c=l[r]||(l[r]={}),h=x(c,o,a?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=C(o,t.replace(y,"")),u=a?function(e,t,i){return function n(s){const a=e.querySelectorAll(t);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(const r of a)if(r===o)return M(s,{delegateTarget:o}),n.oneOff&&P.off(e,s.type,t,i),i.apply(o,[s])}}(e,i,o):function(e,t){return function i(n){return M(n,{delegateTarget:e}),i.oneOff&&P.off(e,n.type,t),t.apply(e,[n])}}(e,o);u.delegationSelector=a?i:null,u.callable=o,u.oneOff=s,u.uidEvent=d,c[d]=u,e.addEventListener(r,u,a)}function $(e,t,i,n,s){const a=x(t[i],n,s);a&&(e.removeEventListener(i,a,Boolean(s)),delete t[i][a.uidEvent])}function N(e,t,i,n){const s=t[i]||{};for(const[a,o]of Object.entries(s))a.includes(n)&&$(e,t,i,o.callable,o.delegationSelector)}function I(e){return e=e.replace(w,""),L[e]||e}const P={on(e,t,i,n){O(e,t,i,n,!1)},one(e,t,i,n){O(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[s,a,o]=S(t,i,n),r=o!==t,l=T(e),c=l[o]||{},h=t.startsWith(".");if(void 0===a){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(D,"");r&&!t.includes(s)||$(e,l,o,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;$(e,l,o,a,s?i:null)}},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=_();let s=null,a=!0,o=!0,r=!1;t!==I(t)&&n&&(s=n.Event(t,i),n(e).trigger(s),a=!s.isPropagationStopped(),o=!s.isImmediatePropagationStopped(),r=s.isDefaultPrevented());const l=M(new Event(t,{bubbles:a,cancelable:!0}),i);return r&&l.preventDefault(),o&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function M(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 B(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 j(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const F={setDataAttribute(e,t,i){e.setAttribute(`data-coreui-${j(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-coreui-${j(t)}`)},getDataAttributes(e){if(!e)return{};const t={},i=Object.keys(e.dataset).filter((e=>e.startsWith("coreui")&&!e.startsWith("coreuiConfig")));for(const n of i){let i=n.replace(/^coreui/,"");i=i.charAt(0).toLowerCase()+i.slice(1),t[i]=B(e.dataset[n])}return t},getDataAttribute:(e,t)=>B(e.getAttribute(`data-coreui-${j(t)}`))};class H{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=o(t)?F.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...o(t)?F.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,s]of Object.entries(t)){const t=e[n],a=o(t)?"element":null==(i=t)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${s}".`)}var i}}class V extends H{constructor(e,i){super(),(e=r(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){b(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(r(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.14.2"}static get DATA_KEY(){return`coreui.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const z=e=>{let t=e.getAttribute("data-coreui-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},R={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=>!c(e)&&l(e)))},getSelectorFromElement(e){const t=z(e);return t&&R.findOne(t)?t:null},getElementFromSelector(e){const t=z(e);return t?R.findOne(t):null},getMultipleElementsFromSelector(e){const t=z(e);return t?R.find(t):[]}},W=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,n=e.NAME;P.on(document,i,`[data-coreui-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const s=R.getElementFromSelector(this)||this.closest(`.${n}`);e.getOrCreateInstance(s)[t]()}))},Y=".coreui.alert",q=`close${Y}`,U=`closed${Y}`;class Q extends V{static get NAME(){return"alert"}close(){if(P.trigger(this._element,q).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,U),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=Q.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)}}))}}W(Q,"close"),p(Q);const K='[data-coreui-toggle="button"]';class X extends V{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=X.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}P.on(document,"click.coreui.button.data-api",K,(e=>{e.preventDefault();const t=e.target.closest(K);X.getOrCreateInstance(t).toggle()})),p(X);const G=(e,t)=>{if(null===e)return null;if(e instanceof Date)return e;if("week"===t)return(e=>{const[t,i]=e.split(/[Ww]/),n=new Date(Number(t),0,4);return n.setDate(n.getDate()-(n.getDay()||7)+1+7*(Number(i)-1)),n})(e);if("month"===t||"year"===t){const t=new Date(Date.parse(e)),i=6e4*t.getTimezoneOffset();return new Date(t.getTime()+i)}return new Date(Date.parse(e))},Z=(e,t)=>{const i=Math.ceil(e.length/t);return Array.from({length:t}).fill("").map(((t,n)=>e.slice(n*i,(n+1)*i)))},J=(e,t)=>{if(null===e)return null;if("week"===t)return`${e.getFullYear()}W${ee(e)}`;if("month"===t){const t=`0${e.getMonth()+1}`.slice(-2);return`${e.getFullYear()}-${t}`}return"year"===t?`${e.getFullYear()}`:e},ee=e=>{const t=new Date(e);t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);const i=new Date(t.getFullYear(),0,4);return 1+Math.round((t.getTime()-i.getTime())/864e5/7)},te=(e,t,i,n)=>{if(t&&e<t)return!0;if(i&&e>i)return!0;if(void 0===n)return!1;if("function"==typeof n)return n(e);if(n instanceof Date&&oe(e,n))return!0;if(Array.isArray(n)&&n)for(const t of n){if("function"==typeof t&&t(e))return!0;if(Array.isArray(t)&&ie(e,t[0],t[1]))return!0;if(t instanceof Date&&oe(e,t))return!0}return!1},ie=(e,t,i)=>{const n=ce(e),s=t?ce(t):null,a=i?ce(i):null;return Boolean(s&&a&&s<=n&&n<=a)},ne=(e,t,i)=>!(null===t||!oe(t,e))||!(null===i||!oe(i,e)),se=(e,t,i)=>{if(e&&t){const n=new Date(e);let s=!1;for(;n<t;)if(n.setDate(n.getDate()+1),te(n,null,null,i)){s=!0;break}return s}return!1},ae=(e,t,i)=>{const n=e.getFullYear(),s=e.getMonth(),a=t?12*t.getFullYear()+t.getMonth():null,o=i?12*i.getFullYear()+i.getMonth():null,r=12*n+s;return Boolean(a&&o&&a<=r&&r<=o)},oe=(e,t)=>e instanceof Date&&t instanceof Date?e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear():null===e&&null===t,re=e=>{const t=new Date;return oe(e,t)},le=(e,t,i)=>{const n=e.getFullYear(),s=t?t.getFullYear():null,a=i?i.getFullYear():null;return Boolean(s&&a&&s<=n&&n<=a)},ce=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t},he=(e,t)=>{if(null===e)return null;if(!(t instanceof Date))return e;const i=new Date(e);return i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i},de=".coreui.calendar",ue=".data-api",_e="ArrowUp",fe="ArrowRight",ge="ArrowDown",pe="ArrowLeft",me=`blur${de}`,be=`calendarDateChange${de}`,ve=`calendarMouseleave${de}`,ye=`cellHover${de}`,we=`endDateChange${de}`,De=`focus${de}`,ke=`keydown${de}`,Ee=`selectEndChange${de}`,Le=`startDateChange${de}`,Ae=`mouseenter${de}`,Ce=`mouseleave${de}`,Te=`load${de}${ue}`,xe=`click${de}${ue}`,Se="calendar-cell",Oe="calendar-cell-inner",$e="calendar-row",Ne=".btn-double-next",Ie=".btn-double-prev",Pe=".btn-month",Me=".btn-next",Be=".btn-prev",je=".btn-year",Fe=".calendar-cell",He=`${Fe}[tabindex="0"]`,Ve=".calendar-row",ze=`${Ve}[tabindex="0"]`,Re={ariaNavNextMonthLabel:"Next month",ariaNavNextYearLabel:"Next year",ariaNavPrevMonthLabel:"Previous month",ariaNavPrevYearLabel:"Previous year",calendarDate:null,calendars:1,disabledDates:null,endDate:null,firstDayOfWeek:1,locale:"default",maxDate:null,minDate:null,range:!1,selectAdjacementDays:!1,selectEndDate:!1,selectionType:"day",showAdjacementDays:!0,showWeekNumber:!1,startDate:null,weekdayFormat:2,weekNumbersLabel:null},We={ariaNavNextMonthLabel:"string",ariaNavNextYearLabel:"string",ariaNavPrevMonthLabel:"string",ariaNavPrevYearLabel:"string",calendarDate:"(date|number|string|null)",calendars:"number",disabledDates:"(array|date|function|null)",endDate:"(date|number|string|null)",firstDayOfWeek:"number",locale:"string",maxDate:"(date|number|string|null)",minDate:"(date|number|string|null)",range:"boolean",selectAdjacementDays:"boolean",selectEndDate:"boolean",selectionType:"string",showAdjacementDays:"boolean",showWeekNumber:"boolean",startDate:"(date|number|string|null)",weekdayFormat:"(number|string)",weekNumbersLabel:"(string|null)"};class Ye extends V{constructor(e,t){super(e),this._config=this._getConfig(t),this._initializeDates(),this._initializeView(),this._createCalendar(),this._addEventListeners()}static get Default(){return Re}static get DefaultType(){return We}static get NAME(){return"calendar"}update(e){this._config=this._getConfig(e),this._initializeDates(),this._initializeView(),this._element.innerHTML="",this._createCalendar()}_focusOnFirstAvailableCell(){const e=R.findOne(He,this._element);e&&e.focus()}_getDate(e){if("week"===this._config.selectionType){const t=R.findOne(Fe,e.closest(Ve));return new Date(F.getDataAttribute(t,"date"))}return new Date(F.getDataAttribute(e,"date"))}_handleCalendarClick(e){const t=e.target.classList.contains(Oe)?e.target.parentElement:e.target,i=this._getDate(t),n=new Date(i),s=F.getDataAttribute(t.closest(".calendar"),"calendar-index");return"days"===this._view&&this._setCalendarDate(s?new Date(n.setMonth(n.getMonth()-s)):i),"months"===this._view&&"month"!==this._config.selectionType?(this._setCalendarDate(s?new Date(n.setMonth(n.getMonth()-s)):i),this._view="days",void this._updateCalendar(this._focusOnFirstAvailableCell.bind(this))):"years"===this._view&&"year"!==this._config.selectionType?(this._setCalendarDate(s?new Date(n.setFullYear(n.getFullYear()-s)):i),this._view="months",void this._updateCalendar(this._focusOnFirstAvailableCell.bind(this))):void(te(i,this._minDate,this._maxDate,this._config.disabledDates)||(this._hoverDate=null,this._selectDate(i),this._updateClassNamesAndAriaLabels()))}_handleCalendarKeydown(e){const t=this._getDate(e.target);if("Space"!==e.code&&"Enter"!==e.key||(e.preventDefault(),this._handleCalendarClick(e)),e.key===fe||e.key===pe||e.key===_e||e.key===ge){if(e.preventDefault(),this._maxDate&&t>=G(this._maxDate,this._config.selectionType)&&(e.key===fe||e.key===ge))return;if(this._minDate&&t<=G(this._minDate,this._config.selectionType)&&(e.key===pe||e.key===_e))return;let i=e.target;"week"===this._config.selectionType&&-1===i.tabIndex&&(i=i.closest(ze));const n=R.find("week"===this._config.selectionType?ze:He,this._element),s=n.indexOf(i),a=0===s,o=s===n.length-1,r={start:s,end:n.length-(s+1)},l={ArrowRight:1,ArrowLeft:-1,ArrowUp:"week"===this._config.selectionType&&"days"===this._view?-1:"days"===this._view?-7:-3,ArrowDown:"week"===this._config.selectionType&&"days"===this._view?1:"days"===this._view?7:3};if(e.key===fe&&o||e.key===ge&&r.end<l.ArrowDown||e.key===pe&&a||e.key===_e&&r.start<Math.abs(l.ArrowUp)){const t=e=>{const t=R.find(`${He}, ${ze}`,this._element);t.length&&e===fe&&t[0].focus(),t.length&&e===pe&&t[t.length-1].focus(),t.length&&e===ge&&t[l.ArrowDown-(n.length-s)].focus(),t.length&&e===_e&&t[t.length-(Math.abs(l.ArrowUp)+1-(s+1))].focus()};return"days"===this._view&&this._modifyCalendarDate(0,e.key===fe||e.key===ge?1:-1,t.bind(this,e.key)),"months"===this._view&&this._modifyCalendarDate(e.key===fe||e.key===ge?1:-1,0,t.bind(this,e.key)),void("years"===this._view&&this._modifyCalendarDate(e.key===fe||e.key===ge?10:-10,0,t.bind(this,e.key)))}if(0===n[s+l[e.key]].tabIndex)return void n[s+l[e.key]].focus();for(let t=s;t<n.length;e.key===fe||e.key===ge?t++:t--)if(0===n[t+l[e.key]].tabIndex){n[t+l[e.key]].focus();break}}}_handleCalendarMouseEnter(e){const t=e.target.classList.contains(Oe)?e.target.parentElement:e.target,i=this._getDate(t);te(i,this._minDate,this._maxDate,this._config.disabledDates)||(this._hoverDate=he(i,this._selectEndDate?this._endDate:this._startDate),P.trigger(this._element,ye,{date:J(this._hoverDate,this._config.selectionType)}),this._updateClassNamesAndAriaLabels())}_handleCalendarMouseLeave(){this._hoverDate=null,P.trigger(this._element,ye,{date:null}),this._updateClassNamesAndAriaLabels()}_addEventListeners(){P.on(this._element,xe,He,(e=>{this._handleCalendarClick(e)})),P.on(this._element,ke,He,(e=>{this._handleCalendarKeydown(e)})),P.on(this._element,Ae,He,(e=>{this._handleCalendarMouseEnter(e)})),P.on(this._element,Ce,He,(()=>{this._handleCalendarMouseLeave()})),P.on(this._element,De,He,(e=>{this._handleCalendarMouseEnter(e)})),P.on(this._element,me,He,(()=>{this._handleCalendarMouseLeave()})),P.on(this._element,xe,ze,(e=>{this._handleCalendarClick(e)})),P.on(this._element,ke,ze,(e=>{this._handleCalendarKeydown(e)})),P.on(this._element,Ae,ze,(e=>{this._handleCalendarMouseEnter(e)})),P.on(this._element,Ce,ze,(()=>{this._handleCalendarMouseLeave()})),P.on(this._element,De,ze,(e=>{this._handleCalendarMouseEnter(e)})),P.on(this._element,me,ze,(()=>{this._handleCalendarMouseLeave()})),this._addNavigationEventListeners(),P.on(this._element,Ce,"table",(()=>{P.trigger(this._element,ve)}))}_addNavigationEventListeners(){const e={[Be]:()=>this._modifyCalendarDate(0,-1),[Ie]:()=>this._modifyCalendarDate("years"===this._view?-10:-1),[Me]:()=>this._modifyCalendarDate(0,1),[Ne]:()=>this._modifyCalendarDate("years"===this._view?10:1),[Pe]:()=>{this._view="months",this._updateCalendar()},[je]:()=>{this._view="years",this._updateCalendar()}};for(const[t,i]of Object.entries(e))P.on(this._element,xe,t,(e=>{e.preventDefault();const n=R.find(t,this._element).indexOf(e.target.closest(t));i();const s=R.find(t,this._element);s&&s[n]&&s[n].focus()}))}_setCalendarDate(e){this._calendarDate=e,P.trigger(this._element,be,{date:e})}_modifyCalendarDate(e,t=0,i){const n=this._calendarDate.getFullYear(),s=this._calendarDate.getMonth(),a=new Date(n,s,1);e&&a.setFullYear(a.getFullYear()+e),t&&a.setMonth(a.getMonth()+t),this._calendarDate=a,"days"===this._view&&P.trigger(this._element,be,{date:a}),this._updateCalendar(i)}_setEndDate(e){this._endDate=he(e,this._endDate),P.trigger(this._element,we,{date:J(this._endDate,this._config.selectionType)})}_setStartDate(e){this._startDate=he(e,this._startDate),P.trigger(this._element,Le,{date:J(this._startDate,this._config.selectionType)})}_setSelectEndDate(e){this._selectEndDate=e,P.trigger(this._element,Ee,{value:e})}_selectDate(e){if(!te(e,this._minDate,this._maxDate,this._config.disabledDates))return this._config.range?this._selectEndDate?(this._setSelectEndDate(!1),this._startDate&&this._startDate>e||se(this._startDate,e,this._config.disabledDates)?(this._setStartDate(null),void this._setEndDate(null)):void this._setEndDate(e)):this._endDate&&this._endDate<e||se(e,this._endDate,this._config.disabledDates)?(this._setStartDate(null),void this._setEndDate(null)):(this._setSelectEndDate(!0),void this._setStartDate(e)):void this._setStartDate(e)}_createCalendarPanel(e){var t;const i=((e,t,i)=>0!==t&&"days"===i?new Date(e.getFullYear(),e.getMonth()+t,1):0!==t&&"months"===i?new Date(e.getFullYear()+t,e.getMonth(),1):0!==t&&"years"===i?new Date(e.getFullYear()+12*t,e.getMonth(),1):e)(this._calendarDate,e,this._view),n=i.getFullYear(),s=i.getMonth(),a=document.createElement("div");a.classList.add("calendar"),F.setDataAttribute(a,"calendar-index",e);const o=document.createElement("div");o.classList.add("calendar-nav"),o.innerHTML=`\n <div class="calendar-nav-prev">\n <button class="btn btn-transparent btn-sm btn-double-prev" aria-label="${this._config.ariaNavPrevYearLabel}">\n <span class="calendar-nav-icon calendar-nav-icon-double-prev"></span>\n </button>\n ${"days"===this._view?`<button class="btn btn-transparent btn-sm btn-prev" aria-label="${this._config.ariaNavPrevMonthLabel}">\n <span class="calendar-nav-icon calendar-nav-icon-prev"></span>\n </button>`:""}\n </div>\n <div class="calendar-nav-date" aria-live="polite">\n ${"days"===this._view?`<button class="btn btn-transparent btn-sm btn-month">\n ${i.toLocaleDateString(this._config.locale,{month:"long"})}\n </button>`:""}\n <button class="btn btn-transparent btn-sm btn-year">\n ${i.toLocaleDateString(this._config.locale,{year:"numeric"})}\n </button>\n </div>\n <div class="calendar-nav-next">\n ${"days"===this._view?`<button class="btn btn-transparent btn-sm btn-next" aria-label="${this._config.ariaNavNextMonthLabel}">\n <span class="calendar-nav-icon calendar-nav-icon-next"></span>\n </button>`:""}\n <button class="btn btn-transparent btn-sm btn-double-next" aria-label="${this._config.ariaNavNextYearLabel}">\n <span class="calendar-nav-icon calendar-nav-icon-double-next"></span>\n </button>\n </div>\n `;const r=((e,t,i)=>{const n=((e,t,i)=>{const n=[],s=new Date(e,t),a=s.getFullYear(),o=s.getMonth();let r=6-(6-new Date(a,o,1).getDay())-i;i&&(r=r<0?7+r:r);for(let e=-1*r;e<0;e++)n.push({date:new Date(a,o,e+1),month:"previous"});return n})(e,t,i),s=((e,t)=>{const i=[],n=new Date(e,t+1,0).getDate();for(let s=1;s<=n;s++)i.push({date:new Date(e,t,s),month:"current"});return i})(e,t),a=((e,t,i,n)=>{const s=[],a=42-(i.length+n.length);for(let i=1;i<=a;i++)s.push({date:new Date(e,t+1,i),month:"next"});return s})(e,t,n,s),o=[...n,...s,...a],r=[];for(const[e,t]of o.entries())e%7!=0&&0!==r.length||r.push({days:[]}),(e+1)%7==0&&(r[r.length-1].weekNumber=ee(t.date)),r[r.length-1].days.push(t);return r})(n,s,this._config.firstDayOfWeek),l=Z(((e,t="short")=>Array.from({length:12},((i,n)=>new Date(2e3,n,1).toLocaleString(e,{month:t}))))(this._config.locale),4),c=Z(((e,t=6)=>Array.from({length:2*t},((i,n)=>e-t+n)))(i.getFullYear()),4),h=r[0].days,d=document.createElement("table");return d.innerHTML=`\n ${"days"===this._view?`\n <thead>\n <tr>\n ${this._config.showWeekNumber?`<th class="${Se}">\n <div class="calendar-header-cell-inner">\n ${null!=(t=this._config.weekNumbersLabel)?t:""}\n </div>\n </th>`:""}\n ${h.map((({date:e})=>`<th class="${Se}" abbr="${e.toLocaleDateString(this._config.locale,{weekday:"long"})}">\n <div class="calendar-header-cell-inner">\n ${"string"==typeof this._config.weekdayFormat?e.toLocaleDateString(this._config.locale,{weekday:this._config.weekdayFormat}):e.toLocaleDateString(this._config.locale,{weekday:"long"}).slice(0,this._config.weekdayFormat)}\n </div>\n </th>`)).join("")}\n </tr>\n </thead>`:""}\n <tbody>\n ${"days"===this._view?r.map((e=>{const t=G(0===e.weekNumber?`${i.getFullYear()}W53`:`${i.getFullYear()}W${e.weekNumber}`,this._config.selectionType),n=this._rowWeekAttributes(t);return`<tr \n class="${n.className}"\n tabindex="${n.tabIndex}"\n ${n.ariaSelected?'aria-selected="true"':""}\n >\n ${this._config.showWeekNumber?`<th class="calendar-cell-week-number">${0===e.weekNumber?53:e.weekNumber}</td>`:""}\n ${e.days.map((({date:e,month:t})=>{const i=this._cellDayAttributes(e,t);return"current"===t||this._config.showAdjacementDays?`<td \n class="${i.className}"\n tabindex="${i.tabIndex}"\n ${i.ariaSelected?'aria-selected="true"':""}\n data-coreui-date="${e}"\n >\n <div class="calendar-cell-inner day">\n ${e.toLocaleDateString(this._config.locale,{day:"numeric"})}\n </div>\n </td>`:"<td></td>"})).join("")}</tr>`})).join(""):""}\n ${"months"===this._view?l.map(((e,t)=>`<tr>\n ${e.map(((e,n)=>{const s=new Date(i.getFullYear(),3*t+n,1),a=this._cellMonthAttributes(s);return`<td\n class="${a.className}"\n tabindex="${a.tabIndex}"\n ${a.ariaSelected?'aria-selected="true"':""}\n data-coreui-date="${s.toDateString()}"\n >\n <div class="calendar-cell-inner month">\n ${e}\n </div>\n </td>`})).join("")}\n </tr>`)).join(""):""}\n ${"years"===this._view?c.map((e=>`<tr>\n ${e.map((e=>{const t=new Date(e,0,1),i=this._cellYearAttributes(t);return`<td\n class="${i.className}"\n tabindex="${i.tabIndex}"\n ${i.ariaSelected?'aria-selected="true"':""}\n data-coreui-date="${t.toDateString()}"\n >\n <div class="calendar-cell-inner year">\n ${e}\n </div>\n </td>`})).join("")}\n </tr>`)).join(""):""}\n </tbody>\n `,a.append(o,d),a}_createCalendar(){this._config.selectionType&&"days"===this._view&&this._element.classList.add(`select-${this._config.selectionType}`),this._config.showWeekNumber&&this._element.classList.add("show-week-numbers");for(const[e,t]of Array.from({length:this._config.calendars}).entries())this._element.append(this._createCalendarPanel(e));this._element.classList.add("calendars")}_initializeDates(){this._calendarDate=G(this._config.calendarDate||this._config.startDate||this._config.endDate||new Date,this._config.selectionType),this._startDate=G(this._config.startDate,this._config.selectionType),this._endDate=G(this._config.endDate,this._config.selectionType),this._minDate=G(this._config.minDate,this._config.selectionType),this._maxDate=G(this._config.maxDate,this._config.selectionType),this._hoverDate=null,this._selectEndDate=this._config.selectEndDate}_initializeView(){this._view={day:"days",week:"days",month:"months",year:"years"}[this._config.selectionType]||"days"}_updateCalendar(e){this._element.innerHTML="",this._createCalendar(),e&&setTimeout(e,1)}_updateClassNamesAndAriaLabels(){if("week"===this._config.selectionType){const e=R.find(Ve,this._element);for(const t of e){const e=R.findOne(Fe,t),i=new Date(F.getDataAttribute(e,"date")),n=this._rowWeekAttributes(i);t.className=n.className,t.tabIndex=n.tabIndex,n.ariaSelected?t.setAttribute("aria-selected",!0):t.removeAttribute("aria-selected")}return}const e=R.find(He,this._element);for(const t of e){const e=new Date(F.getDataAttribute(t,"date"));let i;i="days"===this._view?this._cellDayAttributes(e,"current"):"months"===this._view?this._cellMonthAttributes(e):this._cellYearAttributes(e),t.className=i.className,t.tabIndex=i.tabIndex,i.ariaSelected?t.setAttribute("aria-selected",!0):t.removeAttribute("aria-selected")}}_classNames(e){return Object.entries(e).filter((([e,t])=>Boolean(t))).map((([e])=>e)).join(" ")}_cellDayAttributes(e,t){const i="current"===t,n=te(e,this._minDate,this._maxDate,this._config.disabledDates),s=ne(e,this._startDate,this._endDate);return{className:this._classNames({[Se]:!0,..."day"===this._config.selectionType&&"days"===this._view&&{clickable:!i&&this._config.selectAdjacementDays,disabled:n,range:i&&ie(e,this._startDate,this._endDate),"range-hover":i&&(this._hoverDate&&this._selectEndDate?ie(e,this._startDate,this._hoverDate):ie(e,this._hoverDate,this._endDate)),selected:s},today:re(e),[t]:!0}),tabIndex:"day"!==this._config.selectionType||!i&&!this._config.selectAdjacementDays||n?-1:0,ariaSelected:s}}_cellMonthAttributes(e){const t=((e,t,i,n)=>{const s=12*e.getFullYear()+e.getMonth(),a=t?12*t.getFullYear()+t.getMonth():null,o=i?12*i.getFullYear()+i.getMonth():null;if(a&&s<a)return!0;if(o&&s>o)return!0;if(void 0===n)return!1;const r=t?Math.max(e.getTime(),t.getTime()):e,l=i?Math.min(e.getTime(),i.getTime()):new Date((new Date).getFullYear(),11,31);for(const e=new Date(r);e<=l;e.setDate(e.getDate()+1))if(!te(e,t,i,n))return!1;return!1})(e,this._minDate,this._maxDate,this._config.disabledDates),i=((e,t,i)=>{const n=e.getFullYear(),s=e.getMonth();return null!==t&&n===t.getFullYear()&&s===t.getMonth()||null!==i&&n===i.getFullYear()&&s===i.getMonth()})(e,this._startDate,this._endDate);return{className:this._classNames({[Se]:!0,disabled:t,"range-hover":"month"===this._config.selectionType&&(this._hoverDate&&this._selectEndDate?ae(e,this._startDate,this._hoverDate):ae(e,this._hoverDate,this._endDate)),range:ae(e,this._startDate,this._endDate),selected:i}),tabIndex:t?-1:0,ariaSelected:i}}_cellYearAttributes(e){const t=((e,t,i,n)=>{const s=e.getFullYear(),a=t?t.getFullYear():null,o=i?i.getFullYear():null;if(a&&s<a)return!0;if(o&&s>o)return!0;if(void 0===n)return!1;const r=t?Math.max(e.getTime(),t.getTime()):e,l=i?Math.min(e.getTime(),i.getTime()):new Date((new Date).getFullYear(),11,31);for(const e=new Date(r);e<=l;e.setDate(e.getDate()+1))if(!te(e,t,i,n))return!1;return!1})(e,this._minDate,this._maxDate,this._config.disabledDates),i=((e,t,i)=>{const n=e.getFullYear();return null!==t&&n===t.getFullYear()||null!==i&&n===i.getFullYear()})(e,this._startDate,this._endDate);return{className:this._classNames({[Se]:!0,disabled:t,"range-hover":"year"===this._config.selectionType&&(this._hoverDate&&this._selectEndDate?le(e,this._startDate,this._hoverDate):le(e,this._hoverDate,this._endDate)),range:le(e,this._startDate,this._endDate),selected:i}),tabIndex:t?-1:0,ariaSelected:i}}_rowWeekAttributes(e){const t=te(e,this._minDate,this._maxDate,this._config.disabledDates),i=ne(e,this._startDate,this._endDate);return{className:this._classNames({[$e]:!0,disabled:t,range:"week"===this._config.selectionType&&ie(e,this._startDate,this._endDate),"range-hover":"week"===this._config.selectionType&&(this._hoverDate&&this._selectEndDate?le(e,this._startDate,this._hoverDate):le(e,this._hoverDate,this._endDate)),selected:i}),tabIndex:"week"!==this._config.selectionType||t?-1:0,ariaSelected:i}}static calendarInterface(e,t){const i=Ye.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=Ye.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}P.on(window,Te,(()=>{for(const e of Array.from(document.querySelectorAll('[data-coreui-toggle="calendar"]')))Ye.calendarInterface(e)})),p(Ye);const qe=".coreui.swipe",Ue=`touchstart${qe}`,Qe=`touchmove${qe}`,Ke=`touchend${qe}`,Xe=`pointerdown${qe}`,Ge=`pointerup${qe}`,Ze={endCallback:null,leftCallback:null,rightCallback:null},Je={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class et extends H{constructor(e,t){super(),this._element=e,e&&et.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ze}static get DefaultType(){return Je}static get NAME(){return"swipe"}dispose(){P.off(this._element,qe)}_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(),m(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&&m(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(P.on(this._element,Xe,(e=>this._start(e))),P.on(this._element,Ge,(e=>this._end(e))),this._element.classList.add("pointer-event")):(P.on(this._element,Ue,(e=>this._start(e))),P.on(this._element,Qe,(e=>this._move(e))),P.on(this._element,Ke,(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 tt=".coreui.carousel",it=".data-api",nt="ArrowLeft",st="ArrowRight",at="next",ot="prev",rt="left",lt="right",ct=`slide${tt}`,ht=`slid${tt}`,dt=`keydown${tt}`,ut=`mouseenter${tt}`,_t=`mouseleave${tt}`,ft=`dragstart${tt}`,gt=`load${tt}${it}`,pt=`click${tt}${it}`,mt="carousel",bt="active",vt=".active",yt=".carousel-item",wt=vt+yt,Dt={[nt]:lt,[st]:rt},kt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Et={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Lt extends V{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=R.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===mt&&this.cycle()}static get Default(){return kt}static get DefaultType(){return Et}static get NAME(){return"carousel"}next(){this._slide(at)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(ot)}pause(){this._isSliding&&a(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,ht,(()=>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,ht,(()=>this.to(e)));const i=this._getItemIndex(this._getActive());if(i===e)return;const n=e>i?at:ot;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,dt,(e=>this._keydown(e))),"hover"===this._config.pause&&(P.on(this._element,ut,(()=>this.pause())),P.on(this._element,_t,(()=>this._maybeEnableCycle()))),this._config.touch&&et.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of R.find(".carousel-item img",this._element))P.on(e,ft,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(rt)),rightCallback:()=>this._slide(this._directionToOrder(lt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new et(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Dt[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=R.findOne(vt,this._indicatorsElement);t.classList.remove(bt),t.removeAttribute("aria-current");const i=R.findOne(`[data-coreui-slide-to="${e}"]`,this._indicatorsElement);i&&(i.classList.add(bt),i.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-coreui-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const i=this._getActive(),n=e===at,s=t||v(this._getItems(),i,n,this._config.wrap);if(s===i)return;const a=this._getItemIndex(s),o=t=>P.trigger(this._element,t,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(i),to:a});if(o(ct).defaultPrevented)return;if(!i||!s)return;const r=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),u(s),i.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(bt),i.classList.remove(bt,c,l),this._isSliding=!1,o(ht)}),i,this._isAnimated()),r&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return R.findOne(wt,this._element)}_getItems(){return R.find(yt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return g()?e===rt?ot:at:e===rt?at:ot}_orderToDirection(e){return g()?e===ot?rt:lt:e===ot?lt:rt}static jQueryInterface(e){return this.each((function(){const t=Lt.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,pt,"[data-coreui-slide], [data-coreui-slide-to]",(function(e){const t=R.getElementFromSelector(this);if(!t||!t.classList.contains(mt))return;e.preventDefault();const i=Lt.getOrCreateInstance(t),n=this.getAttribute("data-coreui-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===F.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),P.on(window,gt,(()=>{const e=R.find('[data-coreui-ride="carousel"]');for(const t of e)Lt.getOrCreateInstance(t)})),p(Lt);const At=".coreui.collapse",Ct=`show${At}`,Tt=`shown${At}`,xt=`hide${At}`,St=`hidden${At}`,Ot=`click${At}.data-api`,$t="show",Nt="collapse",It="collapsing",Pt=`:scope .${Nt} .${Nt}`,Mt='[data-coreui-toggle="collapse"]',Bt={parent:null,toggle:!0},jt={parent:"(null|element)",toggle:"boolean"};class Ft extends V{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const i=R.find(Mt);for(const e of i){const t=R.getSelectorFromElement(e),i=R.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 Bt}static get DefaultType(){return jt}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=>Ft.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(P.trigger(this._element,Ct).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(Nt),this._element.classList.add(It),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(It),this._element.classList.add(Nt,$t),this._element.style[t]="",P.trigger(this._element,Tt)}),this._element,!0),this._element.style[t]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,xt).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,u(this._element),this._element.classList.add(It),this._element.classList.remove(Nt,$t);for(const e of this._triggerArray){const t=R.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(It),this._element.classList.add(Nt),P.trigger(this._element,St)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains($t)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=r(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Mt);for(const t of e){const e=R.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=R.find(Pt,this._config.parent);return R.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=Ft.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}}P.on(document,Ot,Mt,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of R.getMultipleElementsFromSelector(this))Ft.getOrCreateInstance(e,{toggle:!1}).toggle()})),p(Ft);var Ht="top",Vt="bottom",zt="right",Rt="left",Wt="auto",Yt=[Ht,Vt,zt,Rt],qt="start",Ut="end",Qt="clippingParents",Kt="viewport",Xt="popper",Gt="reference",Zt=Yt.reduce((function(e,t){return e.concat([t+"-"+qt,t+"-"+Ut])}),[]),Jt=[].concat(Yt,[Wt]).reduce((function(e,t){return e.concat([t,t+"-"+qt,t+"-"+Ut])}),[]),ei="beforeRead",ti="read",ii="afterRead",ni="beforeMain",si="main",ai="afterMain",oi="beforeWrite",ri="write",li="afterWrite",ci=[ei,ti,ii,ni,si,ai,oi,ri,li];function hi(e){return e?(e.nodeName||"").toLowerCase():null}function di(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ui(e){return e instanceof di(e).Element||e instanceof Element}function _i(e){return e instanceof di(e).HTMLElement||e instanceof HTMLElement}function fi(e){return"undefined"!=typeof ShadowRoot&&(e instanceof di(e).ShadowRoot||e instanceof ShadowRoot)}const gi={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];_i(s)&&hi(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]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});_i(n)&&hi(n)&&(Object.assign(n.style,a),Object.keys(s).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function pi(e){return e.split("-")[0]}var mi=Math.max,bi=Math.min,vi=Math.round;function yi(){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 wi(){return!/^((?!chrome|android).)*safari/i.test(yi())}function Di(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),s=1,a=1;t&&_i(e)&&(s=e.offsetWidth>0&&vi(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&vi(n.height)/e.offsetHeight||1);var o=(ui(e)?di(e):window).visualViewport,r=!wi()&&i,l=(n.left+(r&&o?o.offsetLeft:0))/s,c=(n.top+(r&&o?o.offsetTop:0))/a,h=n.width/s,d=n.height/a;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function ki(e){var t=Di(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 Ei(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&fi(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Li(e){return di(e).getComputedStyle(e)}function Ai(e){return["table","td","th"].indexOf(hi(e))>=0}function Ci(e){return((ui(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ti(e){return"html"===hi(e)?e:e.assignedSlot||e.parentNode||(fi(e)?e.host:null)||Ci(e)}function xi(e){return _i(e)&&"fixed"!==Li(e).position?e.offsetParent:null}function Si(e){for(var t=di(e),i=xi(e);i&&Ai(i)&&"static"===Li(i).position;)i=xi(i);return i&&("html"===hi(i)||"body"===hi(i)&&"static"===Li(i).position)?t:i||function(e){var t=/firefox/i.test(yi());if(/Trident/i.test(yi())&&_i(e)&&"fixed"===Li(e).position)return null;var i=Ti(e);for(fi(i)&&(i=i.host);_i(i)&&["html","body"].indexOf(hi(i))<0;){var n=Li(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 Oi(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function $i(e,t,i){return mi(e,bi(t,i))}function Ni(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Ii(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,a=i.elements.arrow,o=i.modifiersData.popperOffsets,r=pi(i.placement),l=Oi(r),c=[Rt,zt].indexOf(r)>=0?"height":"width";if(a&&o){var h=function(e,t){return Ni("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ii(e,Yt))}(s.padding,i),d=ki(a),u="y"===l?Ht:Rt,_="y"===l?Vt:zt,f=i.rects.reference[c]+i.rects.reference[l]-o[l]-i.rects.popper[c],g=o[l]-i.rects.reference[l],p=Si(a),m=p?"y"===l?p.clientHeight||0:p.clientWidth||0:0,b=f/2-g/2,v=h[u],y=m-d[c]-h[_],w=m/2-d[c]/2+b,D=$i(v,w,y),k=l;i.modifiersData[n]=((t={})[k]=D,t.centerOffset=D-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)))&&Ei(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Mi(e){return e.split("-")[1]}var Bi={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ji(e){var t,i=e.popper,n=e.popperRect,s=e.placement,a=e.variation,o=e.offsets,r=e.position,l=e.gpuAcceleration,c=e.adaptive,h=e.roundOffsets,d=e.isFixed,u=o.x,_=void 0===u?0:u,f=o.y,g=void 0===f?0:f,p="function"==typeof h?h({x:_,y:g}):{x:_,y:g};_=p.x,g=p.y;var m=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),v=Rt,y=Ht,w=window;if(c){var D=Si(i),k="clientHeight",E="clientWidth";D===di(i)&&"static"!==Li(D=Ci(i)).position&&"absolute"===r&&(k="scrollHeight",E="scrollWidth"),(s===Ht||(s===Rt||s===zt)&&a===Ut)&&(y=Vt,g-=(d&&D===w&&w.visualViewport?w.visualViewport.height:D[k])-n.height,g*=l?1:-1),s!==Rt&&(s!==Ht&&s!==Vt||a!==Ut)||(v=zt,_-=(d&&D===w&&w.visualViewport?w.visualViewport.width:D[E])-n.width,_*=l?1:-1)}var L,A=Object.assign({position:r},c&&Bi),C=!0===h?function(e,t){var i=e.x,n=e.y,s=t.devicePixelRatio||1;return{x:vi(i*s)/s||0,y:vi(n*s)/s||0}}({x:_,y:g},di(i)):{x:_,y:g};return _=C.x,g=C.y,l?Object.assign({},A,((L={})[y]=b?"0":"",L[v]=m?"0":"",L.transform=(w.devicePixelRatio||1)<=1?"translate("+_+"px, "+g+"px)":"translate3d("+_+"px, "+g+"px, 0)",L)):Object.assign({},A,((t={})[y]=b?g+"px":"",t[v]=m?_+"px":"",t.transform="",t))}const Fi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,a=i.adaptive,o=void 0===a||a,r=i.roundOffsets,l=void 0===r||r,c={placement:pi(t.placement),variation:Mi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOff