From ae8adc2a0678325d5af547a8e4b2a4212dd72170 Mon Sep 17 00:00:00 2001 From: Star Date: Mon, 17 Aug 2026 12:42:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(bootstrap):=20=E7=BB=9F=E4=B8=80=20outline?= =?UTF-8?q?=20=E6=8C=89=E9=92=AE=E8=BF=90=E8=A1=8C=E6=97=B6=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E8=89=B2=EF=BC=88by=20AI=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ README.md | 4 ++-- TEST.md | 6 ++++++ dist/bootstrap.js | 10 ++++++++++ dist/bootstrap.min.js | 2 +- package.json | 2 +- src/index.js | 10 ++++++++++ test/bootstrap.spec.js | 16 +++++++++++++++- 8 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 TEST.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 47a2fab..754adb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.0.11 (2026-08-17) + +### Fixes +- **Outline Theme Colors**: `btn-outline-*` now follows every runtime semantic color configured through `Bootstrap.config`, including default, hover, active, and disabled states. + ## 1.0.9 (2026-06-27) ### Fixes diff --git a/README.md b/README.md index f3f8ee5..6d12b87 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Bootstrap 5.3 自包含集成引擎。 ## 0. 快速开始 (Quick Start) 直接在 HTML 中引入(无需打包,完全非 ESM 注入): ```html - + ``` ## 1. 运行时接口 @@ -21,7 +21,7 @@ Bootstrap 5.3 自包含集成引擎。 #### 参数 `options`: - **主题色**: `primary`, `secondary`, `success`, `info`, `warning`, `danger`, `light`, `dark` (Hex 字符串)。 - - *行为*: 自动更新 CSS 变量并注入深度样式补丁(覆盖按钮、表单控件、开关、进度条等硬编码样式)。实心按钮保留较深的 hover / active 状态。 + - *行为*: 自动更新 CSS 变量并注入深度样式补丁(覆盖实心与 outline 按钮、表单控件、开关、进度条等硬编码样式)。按钮保留明确的 hover / active 状态。 - *链接按钮*: 支持 `btn-link-primary`、`btn-link-info` 等全部语义色类;hover / active 会随配置色变深。也兼容组合写法 `btn btn-link btn-link-info`。 - **暗黑模式**: - `darkMode`: (Boolean) 直接设置主题。`true` 为 dark,`false` 为 light。 diff --git a/TEST.md b/TEST.md new file mode 100644 index 0000000..6d3a3a6 --- /dev/null +++ b/TEST.md @@ -0,0 +1,6 @@ +# Test Report + +## v1.0.11 - 2026-08-17 + +- `npm test`: Playwright verifies configured primary colors for solid, link, and outline button variables, including outline hover and active states. +- `npm run build`: Vite produces the self-contained browser bundle and minified bundle. diff --git a/dist/bootstrap.js b/dist/bootstrap.js index a3ca575..9c16f21 100644 --- a/dist/bootstrap.js +++ b/dist/bootstrap.js @@ -7270,6 +7270,16 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA --bs-btn-disabled-bg: var(--bs-${name}) !important; --bs-btn-disabled-border-color: var(--bs-${name}) !important; } + .btn-outline-${name} { + --bs-btn-color: var(--bs-${name}) !important; + --bs-btn-border-color: var(--bs-${name}) !important; + --bs-btn-hover-bg: var(--bs-${name}) !important; + --bs-btn-hover-border-color: var(--bs-${name}) !important; + --bs-btn-active-bg: ${activeColor} !important; + --bs-btn-active-border-color: ${activeColor} !important; + --bs-btn-disabled-color: var(--bs-${name}) !important; + --bs-btn-disabled-border-color: var(--bs-${name}) !important; + } .bg-${name} { background-color: var(--bs-${name}) !important; } .text-${name} { color: var(--bs-${name}) !important; } .border-${name} { border-color: var(--bs-${name}) !important; } diff --git a/dist/bootstrap.min.js b/dist/bootstrap.min.js index 86c9b5b..e5d5af6 100644 --- a/dist/bootstrap.min.js +++ b/dist/bootstrap.min.js @@ -2189,4 +2189,4 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA * Bootstrap v5.3.8 (https://getbootstrap.com/) * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */let ee=1;const ne={mouseenter:"mouseover",mouseleave:"mouseout"},ie=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 se(t,e){return e&&`${e}::${ee++}`||t.uidEvent||ee++}function oe(t){const e=se(t);return t.uidEvent=e,te[e]=te[e]||{},te[e]}function re(t,e,n=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===n)}function ae(t,e,n){const i="string"==typeof e,s=i?n:e||n;let o=de(t);return ie.has(o)||(o=t),[i,s,o]}function le(t,e,n,i,s){if("string"!=typeof e||!t)return;let[o,r,a]=ae(e,n,i);if(e in ne){r=(t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)})(r)}const l=oe(t),c=l[a]||(l[a]={}),h=re(c,r,o?n:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=se(r,e.replace(Gt,"")),u=o?function(t,e,n){return function i(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return fe(s,{delegateTarget:r}),i.oneOff&&ue.off(t,s.type,e,n),n.apply(r,[s])}}(t,n,r):function(t,e){return function n(i){return fe(i,{delegateTarget:t}),n.oneOff&&ue.off(t,i.type,e),e.apply(t,[i])}}(t,r);u.delegationSelector=o?n:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function ce(t,e,n,i,s){const o=re(e[n],i,s);o&&(t.removeEventListener(n,o,Boolean(s)),delete e[n][o.uidEvent])}function he(t,e,n,i){const s=e[n]||{};for(const[o,r]of Object.entries(s))o.includes(i)&&ce(t,e,n,r.callable,r.delegationSelector)}function de(t){return t=t.replace(Jt,""),ne[t]||t}const ue={on(t,e,n,i){le(t,e,n,i,!1)},one(t,e,n,i){le(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[s,o,r]=ae(e,n,i),a=r!==e,l=oe(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const n of Object.keys(l))he(t,l,n,e.slice(1));for(const[n,i]of Object.entries(c)){const s=n.replace(Zt,"");a&&!e.includes(s)||ce(t,l,r,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;ce(t,l,r,o,s?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=qt();let s=null,o=!0,r=!0,a=!1;e!==de(e)&&i&&(s=i.Event(e,n),i(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=fe(new Event(e,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function fe(t,e={}){for(const[n,i]of Object.entries(e))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}function pe(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function me(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const ge={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${me(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${me(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),e[n]=pe(t.dataset[i])}return e},getDataAttribute:(t,e)=>pe(t.getAttribute(`data-bs-${me(e)}`))};class _e{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=jt(e)?ge.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...jt(e)?ge.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,i]of Object.entries(e)){const e=t[n],s=jt(e)?"element":Pt(e);if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${s}" but expected type "${i}".`)}}}class be extends _e{constructor(t,e){super(),(t=Ft(t))&&(this._element=t,this._config=this._getConfig(e),Dt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Dt.remove(this._element,this.constructor.DATA_KEY),ue.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){Yt(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Dt.get(Ft(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const ve=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e?e.split(",").map(t=>Nt(t)).join(","):null},ye={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(t=>!Bt(t)&&Ht(t))},getSelectorFromElement(t){const e=ve(t);return e&&ye.findOne(e)?e:null},getElementFromSelector(t){const e=ve(t);return e?ye.findOne(e):null},getMultipleElementsFromSelector(t){const e=ve(t);return e?ye.find(e):[]}},we=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;ue.on(document,n,`[data-bs-dismiss="${i}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Bt(this))return;const s=ye.getElementFromSelector(this)||this.closest(`.${i}`);t.getOrCreateInstance(s)[e]()})},Ae=".bs.alert",Ee=`close${Ae}`,Te=`closed${Ae}`;class Ce extends be{static get NAME(){return"alert"}close(){if(ue.trigger(this._element,Ee).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),ue.trigger(this._element,Te),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=Ce.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}we(Ce,"close"),Qt(Ce);const ke='[data-bs-toggle="button"]';class Oe extends be{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const e=Oe.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}ue.on(document,"click.bs.button.data-api",ke,t=>{t.preventDefault();const e=t.target.closest(ke);Oe.getOrCreateInstance(e).toggle()}),Qt(Oe);const xe=".bs.swipe",$e=`touchstart${xe}`,Le=`touchmove${xe}`,Se=`touchend${xe}`,De=`pointerdown${xe}`,Ie=`pointerup${xe}`,Ne={endCallback:null,leftCallback:null,rightCallback:null},Pe={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Me extends _e{constructor(t,e){super(),this._element=t,t&&Me.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ne}static get DefaultType(){return Pe}static get NAME(){return"swipe"}dispose(){ue.off(this._element,xe)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Xt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Xt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ue.on(this._element,De,t=>this._start(t)),ue.on(this._element,Ie,t=>this._end(t)),this._element.classList.add("pointer-event")):(ue.on(this._element,$e,t=>this._start(t)),ue.on(this._element,Le,t=>this._move(t)),ue.on(this._element,Se,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const je=".bs.carousel",Fe=".data-api",He="ArrowLeft",Be="ArrowRight",We="next",ze="prev",Re="left",qe="right",Ve=`slide${je}`,Ke=`slid${je}`,Qe=`keydown${je}`,Xe=`mouseenter${je}`,Ye=`mouseleave${je}`,Ue=`dragstart${je}`,Ge=`load${je}${Fe}`,Je=`click${je}${Fe}`,Ze="carousel",tn="active",en=".active",nn=".carousel-item",sn=en+nn,on={[He]:qe,[Be]:Re},rn={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},an={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ln extends be{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ye.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Ze&&this.cycle()}static get Default(){return rn}static get DefaultType(){return an}static get NAME(){return"carousel"}next(){this._slide(We)}nextWhenVisible(){!document.hidden&&Ht(this._element)&&this.next()}prev(){this._slide(ze)}pause(){this._isSliding&&Mt(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?ue.one(this._element,Ke,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void ue.one(this._element,Ke,()=>this.to(t));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?We:ze;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&ue.on(this._element,Qe,t=>this._keydown(t)),"hover"===this._config.pause&&(ue.on(this._element,Xe,()=>this.pause()),ue.on(this._element,Ye,()=>this._maybeEnableCycle())),this._config.touch&&Me.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ye.find(".carousel-item img",this._element))ue.on(t,Ue,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(Re)),rightCallback:()=>this._slide(this._directionToOrder(qe)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Me(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=on[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=ye.findOne(en,this._indicatorsElement);e.classList.remove(tn),e.removeAttribute("aria-current");const n=ye.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(tn),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===We,s=e||Ut(this._getItems(),n,i,this._config.wrap);if(s===n)return;const o=this._getItemIndex(s),r=e=>ue.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:o});if(r(Ve).defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";s.classList.add(c),Rt(s),n.classList.add(l),s.classList.add(l);this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(tn),n.classList.remove(tn,c,l),this._isSliding=!1,r(Ke)},n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return ye.findOne(sn,this._element)}_getItems(){return ye.find(nn,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Kt()?t===Re?ze:We:t===Re?We:ze}_orderToDirection(t){return Kt()?t===ze?Re:qe:t===ze?qe:Re}static jQueryInterface(t){return this.each(function(){const e=ln.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)})}}ue.on(document,Je,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=ye.getElementFromSelector(this);if(!e||!e.classList.contains(Ze))return;t.preventDefault();const n=ln.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===ge.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),ue.on(window,Ge,()=>{const t=ye.find('[data-bs-ride="carousel"]');for(const e of t)ln.getOrCreateInstance(e)}),Qt(ln);const cn=".bs.collapse",hn=`show${cn}`,dn=`shown${cn}`,un=`hide${cn}`,fn=`hidden${cn}`,pn=`click${cn}.data-api`,mn="show",gn="collapse",_n="collapsing",bn=`:scope .${gn} .${gn}`,vn='[data-bs-toggle="collapse"]',yn={parent:null,toggle:!0},wn={parent:"(null|element)",toggle:"boolean"};class An extends be{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=ye.find(vn);for(const t of n){const e=ye.getSelectorFromElement(t),n=ye.find(e).filter(t=>t===this._element);null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return yn}static get DefaultType(){return wn}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(t=>t!==this._element).map(t=>An.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(ue.trigger(this._element,hn).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(gn),this._element.classList.add(_n),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(_n),this._element.classList.add(gn,mn),this._element.style[e]="",ue.trigger(this._element,dn)},this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(ue.trigger(this._element,un).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Rt(this._element),this._element.classList.add(_n),this._element.classList.remove(gn,mn);for(const t of this._triggerArray){const e=ye.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(_n),this._element.classList.add(gn),ue.trigger(this._element,fn)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(mn)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Ft(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(vn);for(const e of t){const t=ye.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ye.find(bn,this._config.parent);return ye.find(t,this._config.parent).filter(t=>!e.includes(t))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle("collapsed",!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const n=An.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}})}}ue.on(document,pn,vn,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of ye.getMultipleElementsFromSelector(this))An.getOrCreateInstance(t,{toggle:!1}).toggle()}),Qt(An);const En="dropdown",Tn=".bs.dropdown",Cn=".data-api",kn="ArrowUp",On="ArrowDown",xn=`hide${Tn}`,$n=`hidden${Tn}`,Ln=`show${Tn}`,Sn=`shown${Tn}`,Dn=`click${Tn}${Cn}`,In=`keydown${Tn}${Cn}`,Nn=`keyup${Tn}${Cn}`,Pn="show",Mn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',jn=`${Mn}.${Pn}`,Fn=".dropdown-menu",Hn=Kt()?"top-end":"top-start",Bn=Kt()?"top-start":"top-end",Wn=Kt()?"bottom-end":"bottom-start",zn=Kt()?"bottom-start":"bottom-end",Rn=Kt()?"left-start":"right-start",qn=Kt()?"right-start":"left-start",Vn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Kn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Qn extends be{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=ye.next(this._element,Fn)[0]||ye.prev(this._element,Fn)[0]||ye.findOne(Fn,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vn}static get DefaultType(){return Kn}static get NAME(){return En}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Bt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!ue.trigger(this._element,Ln,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))ue.on(t,"mouseover",zt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Pn),this._element.classList.add(Pn),ue.trigger(this._element,Sn,t)}}hide(){if(Bt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!ue.trigger(this._element,xn,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.off(t,"mouseover",zt);this._popper&&this._popper.destroy(),this._menu.classList.remove(Pn),this._element.classList.remove(Pn),this._element.setAttribute("aria-expanded","false"),ge.removeDataAttribute(this._menu,"popper"),ue.trigger(this._element,$n,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!jt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${En.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Lt)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let t=this._element;"parent"===this._config.reference?t=this._parent:jt(this._config.reference)?t=Ft(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=$t(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Pn)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Rn;if(t.classList.contains("dropstart"))return qn;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Bn:Hn:e?zn:Wn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(ge.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...Xt(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const n=ye.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>Ht(t));n.length&&Ut(n,e,t===On,!n.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Qn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=ye.find(jn);for(const n of e){const e=Qn.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),s=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n="Escape"===t.key,i=[kn,On].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const s=this.matches(Mn)?this:ye.prev(this,Mn)[0]||ye.next(this,Mn)[0]||ye.findOne(Mn,t.delegateTarget.parentNode),o=Qn.getOrCreateInstance(s);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}ue.on(document,In,Mn,Qn.dataApiKeydownHandler),ue.on(document,In,Fn,Qn.dataApiKeydownHandler),ue.on(document,Dn,Qn.clearMenus),ue.on(document,Nn,Qn.clearMenus),ue.on(document,Dn,Mn,function(t){t.preventDefault(),Qn.getOrCreateInstance(this).toggle()}),Qt(Qn);const Xn="backdrop",Yn="show",Un=`mousedown.bs.${Xn}`,Gn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Jn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Zn extends _e{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Gn}static get DefaultType(){return Jn}static get NAME(){return Xn}show(t){if(!this._config.isVisible)return void Xt(t);this._append();const e=this._getElement();this._config.isAnimated&&Rt(e),e.classList.add(Yn),this._emulateAnimation(()=>{Xt(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Yn),this._emulateAnimation(()=>{this.dispose(),Xt(t)})):Xt(t)}dispose(){this._isAppended&&(ue.off(this._element,Un),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Ft(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),ue.on(t,Un,()=>{Xt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){Yt(t,this._getElement(),this._config.isAnimated)}}const ti=".bs.focustrap",ei=`focusin${ti}`,ni=`keydown.tab${ti}`,ii="backward",si={autofocus:!0,trapElement:null},oi={autofocus:"boolean",trapElement:"element"};class ri extends _e{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return si}static get DefaultType(){return oi}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ue.off(document,ti),ue.on(document,ei,t=>this._handleFocusin(t)),ue.on(document,ni,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ue.off(document,ti))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=ye.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===ii?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?ii:"forward")}}const ai=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",li=".sticky-top",ci="padding-right",hi="margin-right";class di{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ci,e=>e+t),this._setElementAttributes(ai,ci,e=>e+t),this._setElementAttributes(li,hi,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ci),this._resetElementAttributes(ai,ci),this._resetElementAttributes(li,hi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(s))}px`)})}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&ge.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const n=ge.getDataAttribute(t,e);null!==n?(ge.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(jt(t))e(t);else for(const n of ye.find(t,this._element))e(n)}}const ui=".bs.modal",fi=`hide${ui}`,pi=`hidePrevented${ui}`,mi=`hidden${ui}`,gi=`show${ui}`,_i=`shown${ui}`,bi=`resize${ui}`,vi=`click.dismiss${ui}`,yi=`mousedown.dismiss${ui}`,wi=`keydown.dismiss${ui}`,Ai=`click${ui}.data-api`,Ei="modal-open",Ti="show",Ci="modal-static",ki={backdrop:!0,focus:!0,keyboard:!0},Oi={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class xi extends be{constructor(t,e){super(t,e),this._dialog=ye.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new di,this._addEventListeners()}static get Default(){return ki}static get DefaultType(){return Oi}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;ue.trigger(this._element,gi,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ei),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning)return;ue.trigger(this._element,fi).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ti),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){ue.off(window,ui),ue.off(this._dialog,ui),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ri({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=ye.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Rt(this._element),this._element.classList.add(Ti);this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ue.trigger(this._element,_i,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){ue.on(this._element,wi,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),ue.on(window,bi,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ue.on(this._element,yi,t=>{ue.one(this._element,vi,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Ei),this._resetAdjustments(),this._scrollBar.reset(),ue.trigger(this._element,mi)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ue.trigger(this._element,pi).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Ci)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ci),this._queueCallback(()=>{this._element.classList.remove(Ci),this._queueCallback(()=>{this._element.style.overflowY=e},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=Kt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=Kt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const n=xi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}})}}ue.on(document,Ai,'[data-bs-toggle="modal"]',function(t){const e=ye.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),ue.one(e,gi,t=>{t.defaultPrevented||ue.one(e,mi,()=>{Ht(this)&&this.focus()})});const n=ye.findOne(".modal.show");n&&xi.getInstance(n).hide();xi.getOrCreateInstance(e).toggle(this)}),we(xi),Qt(xi);const $i=".bs.offcanvas",Li=".data-api",Si=`load${$i}${Li}`,Di="show",Ii="showing",Ni="hiding",Pi=".offcanvas.show",Mi=`show${$i}`,ji=`shown${$i}`,Fi=`hide${$i}`,Hi=`hidePrevented${$i}`,Bi=`hidden${$i}`,Wi=`resize${$i}`,zi=`click${$i}${Li}`,Ri=`keydown.dismiss${$i}`,qi={backdrop:!0,keyboard:!0,scroll:!1},Vi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Ki extends be{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return qi}static get DefaultType(){return Vi}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(ue.trigger(this._element,Mi,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new di).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Ii);this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Di),this._element.classList.remove(Ii),ue.trigger(this._element,ji,{relatedTarget:t})},this._element,!0)}hide(){if(!this._isShown)return;if(ue.trigger(this._element,Fi).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Ni),this._backdrop.hide();this._queueCallback(()=>{this._element.classList.remove(Di,Ni),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new di).reset(),ue.trigger(this._element,Bi)},this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Zn({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():ue.trigger(this._element,Hi)}:null})}_initializeFocusTrap(){return new ri({trapElement:this._element})}_addEventListeners(){ue.on(this._element,Ri,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():ue.trigger(this._element,Hi))})}static jQueryInterface(t){return this.each(function(){const e=Ki.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}ue.on(document,zi,'[data-bs-toggle="offcanvas"]',function(t){const e=ye.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this))return;ue.one(e,Bi,()=>{Ht(this)&&this.focus()});const n=ye.findOne(Pi);n&&n!==e&&Ki.getInstance(n).hide();Ki.getOrCreateInstance(e).toggle(this)}),ue.on(window,Si,()=>{for(const t of ye.find(Pi))Ki.getOrCreateInstance(t).show()}),ue.on(window,Wi,()=>{for(const t of ye.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Ki.getOrCreateInstance(t).hide()}),we(Ki),Qt(Ki);const Qi={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Xi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Yi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Ui=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!Xi.has(n)||Boolean(Yi.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(n))};const Gi={allowList:Qi,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Ji={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Zi={entry:"(string|element|function|null)",selector:"(string|element)"};class ts extends _e{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Gi}static get DefaultType(){return Ji}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},Zi)}_setContent(t,e,n){const i=ye.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?jt(e)?this._putElementInTemplate(Ft(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const t of s){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[n]||[]);for(const e of i)Ui(e,s)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Xt(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const es=new Set(["sanitize","allowList","sanitizeFn"]),ns="fade",is="show",ss=".tooltip-inner",os=".modal",rs="hide.bs.modal",as="hover",ls="focus",cs="click",hs={AUTO:"auto",TOP:"top",RIGHT:Kt()?"left":"right",BOTTOM:"bottom",LEFT:Kt()?"right":"left"},ds={allowList:Qi,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},us={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class fs extends be{constructor(t,e){if(void 0===Lt)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ds}static get DefaultType(){return us}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),ue.off(this._element.closest(os),rs,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=ue.trigger(this._element,this.constructor.eventName("show")),e=(Wt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),ue.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(is),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.on(t,"mouseover",zt);this._queueCallback(()=>{ue.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(ue.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(is),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.off(t,"mouseover",zt);this._activeTrigger[cs]=!1,this._activeTrigger[ls]=!1,this._activeTrigger[as]=!1,this._isHovered=null;this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ue.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ns,is),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(ns),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ts({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ss]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ns)}_isShown(){return this.tip&&this.tip.classList.contains(is)}_createPopper(t){const e=Xt(this._config.placement,[this,t,this._element]),n=hs[e.toUpperCase()];return $t(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return Xt(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...Xt(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)ue.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[cs]=!(e._isShown()&&e._activeTrigger[cs]),e.toggle()});else if("manual"!==e){const t=e===as?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=e===as?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");ue.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?ls:as]=!0,e._enter()}),ue.on(this._element,n,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?ls:as]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ue.on(this._element.closest(os),rs,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=ge.getDataAttributes(this._element);for(const t of Object.keys(e))es.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:Ft(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,n]of Object.entries(this._config))this.constructor.Default[e]!==n&&(t[e]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=fs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Qt(fs);const ps=".popover-header",ms=".popover-body",gs={...fs.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},_s={...fs.DefaultType,content:"(null|string|element|function)"};class bs extends fs{static get Default(){return gs}static get DefaultType(){return _s}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ps]:this._getTitle(),[ms]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=bs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Qt(bs);const vs=".bs.scrollspy",ys=`activate${vs}`,ws=`click${vs}`,As=`load${vs}.data-api`,Es="active",Ts="[href]",Cs=".nav-link",ks=`${Cs}, .nav-item > ${Cs}, .list-group-item`,Os={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},xs={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $s extends be{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Os}static get DefaultType(){return xs}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Ft(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ue.off(this._config.target,ws),ue.on(this._config.target,ws,Ts,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const n=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),n=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(n(o),!i)return}else s||t||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ye.find(Ts,this._config.target);for(const e of t){if(!e.hash||Bt(e))continue;const t=ye.findOne(decodeURI(e.hash),this._element);Ht(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Es),this._activateParents(t),ue.trigger(this._element,ys,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))ye.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Es);else for(const e of ye.parents(t,".nav, .list-group"))for(const t of ye.prev(e,ks))t.classList.add(Es)}_clearActiveClass(t){t.classList.remove(Es);const e=ye.find(`${Ts}.${Es}`,t);for(const t of e)t.classList.remove(Es)}static jQueryInterface(t){return this.each(function(){const e=$s.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}ue.on(window,As,()=>{for(const t of ye.find('[data-bs-spy="scroll"]'))$s.getOrCreateInstance(t)}),Qt($s);const Ls=".bs.tab",Ss=`hide${Ls}`,Ds=`hidden${Ls}`,Is=`show${Ls}`,Ns=`shown${Ls}`,Ps=`click${Ls}`,Ms=`keydown${Ls}`,js=`load${Ls}`,Fs="ArrowLeft",Hs="ArrowRight",Bs="ArrowUp",Ws="ArrowDown",zs="Home",Rs="End",qs="active",Vs="fade",Ks="show",Qs=".dropdown-toggle",Xs=`:not(${Qs})`,Ys='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Us=`${`.nav-link${Xs}, .list-group-item${Xs}, [role="tab"]${Xs}`}, ${Ys}`,Gs=`.${qs}[data-bs-toggle="tab"], .${qs}[data-bs-toggle="pill"], .${qs}[data-bs-toggle="list"]`;class Js extends be{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ue.on(this._element,Ms,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),n=e?ue.trigger(e,Ss,{relatedTarget:t}):null;ue.trigger(t,Is,{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(qs),this._activate(ye.getElementFromSelector(t));this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),ue.trigger(t,Ns,{relatedTarget:e})):t.classList.add(Ks)},t,t.classList.contains(Vs))}_deactivate(t,e){if(!t)return;t.classList.remove(qs),t.blur(),this._deactivate(ye.getElementFromSelector(t));this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),ue.trigger(t,Ds,{relatedTarget:e})):t.classList.remove(Ks)},t,t.classList.contains(Vs))}_keydown(t){if(![Fs,Hs,Bs,Ws,zs,Rs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!Bt(t));let n;if([zs,Rs].includes(t.key))n=e[t.key===zs?0:e.length-1];else{const i=[Hs,Ws].includes(t.key);n=Ut(e,t.target,i,!0)}n&&(n.focus({preventScroll:!0}),Js.getOrCreateInstance(n).show())}_getChildren(){return ye.find(Us,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),n=this._getOuterElement(t);t.setAttribute("aria-selected",e),n!==t&&this._setAttributeIfNotExists(n,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=ye.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains("dropdown"))return;const i=(t,i)=>{const s=ye.findOne(t,n);s&&s.classList.toggle(i,e)};i(Qs,qs),i(".dropdown-menu",Ks),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(qs)}_getInnerElement(t){return t.matches(Us)?t:ye.findOne(Us,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=Js.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}ue.on(document,Ps,Ys,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this)||Js.getOrCreateInstance(this).show()}),ue.on(window,js,()=>{for(const t of ye.find(Gs))Js.getOrCreateInstance(t)}),Qt(Js);const Zs=".bs.toast",to=`mouseover${Zs}`,eo=`mouseout${Zs}`,no=`focusin${Zs}`,io=`focusout${Zs}`,so=`hide${Zs}`,oo=`hidden${Zs}`,ro=`show${Zs}`,ao=`shown${Zs}`,lo="hide",co="show",ho="showing",uo={animation:"boolean",autohide:"boolean",delay:"number"},fo={animation:!0,autohide:!0,delay:5e3};class po extends be{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return fo}static get DefaultType(){return uo}static get NAME(){return"toast"}show(){if(ue.trigger(this._element,ro).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(lo),Rt(this._element),this._element.classList.add(co,ho),this._queueCallback(()=>{this._element.classList.remove(ho),ue.trigger(this._element,ao),this._maybeScheduleHide()},this._element,this._config.animation)}hide(){if(!this.isShown())return;if(ue.trigger(this._element,so).defaultPrevented)return;this._element.classList.add(ho),this._queueCallback(()=>{this._element.classList.add(lo),this._element.classList.remove(ho,co),ue.trigger(this._element,oo)},this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(co),super.dispose()}isShown(){return this._element.classList.contains(co)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){ue.on(this._element,to,t=>this._onInteraction(t,!0)),ue.on(this._element,eo,t=>this._onInteraction(t,!1)),ue.on(this._element,no,t=>this._onInteraction(t,!0)),ue.on(this._element,io,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=po.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}we(po),Qt(po);const mo=Object.freeze(Object.defineProperty({__proto__:null,Alert:Ce,Button:Oe,Carousel:ln,Collapse:An,Dropdown:Qn,Modal:xi,Offcanvas:Ki,Popover:bs,ScrollSpy:$s,Tab:Js,Toast:po,Tooltip:fs},Symbol.toStringTag,{value:"Module"})),go={config:(t={})=>{if("undefined"==typeof document)return;const e=document.documentElement;let n="";if(["primary","secondary","success","info","warning","danger","light","dark"].forEach(i=>{const s=t[i];if(s){e.style.setProperty(`--bs-${i}`,s);const t=go._hexToRgb(s);if(t){const o=`${t.r}, ${t.g}, ${t.b}`,r=go._shadeColor(s,.15),a=go._shadeColor(s,.2);e.style.setProperty(`--bs-${i}-rgb`,o),n+=`\n .btn-${i} {\n --bs-btn-bg: var(--bs-${i}) !important;\n --bs-btn-border-color: var(--bs-${i}) !important;\n --bs-btn-hover-bg: ${r} !important;\n --bs-btn-hover-border-color: ${r} !important;\n --bs-btn-active-bg: ${a} !important;\n --bs-btn-active-border-color: ${a} !important;\n --bs-btn-disabled-bg: var(--bs-${i}) !important;\n --bs-btn-disabled-border-color: var(--bs-${i}) !important;\n }\n .bg-${i} { background-color: var(--bs-${i}) !important; }\n .text-${i} { color: var(--bs-${i}) !important; }\n .border-${i} { border-color: var(--bs-${i}) !important; }\n .badge.bg-${i} { background-color: var(--bs-${i}) !important; }\n\n /* 语义色链接按钮 */\n .btn-link-${i},\n .btn-link.btn-link-${i} {\n --bs-btn-color: var(--bs-${i});\n --bs-btn-hover-color: ${r};\n --bs-btn-active-color: ${a};\n --bs-btn-disabled-color: var(--bs-${i});\n }\n\n /* 表单控件补丁 (Form Controls) */\n .form-check-input:checked {\n background-color: var(--bs-primary) !important;\n border-color: var(--bs-primary) !important;\n }\n .form-check-input:focus {\n border-color: var(--bs-primary) !important;\n box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;\n }\n .form-switch .form-check-input:checked {\n background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;\n }\n .form-range::-webkit-slider-thumb { background: var(--bs-primary) !important; }\n .form-range::-moz-range-thumb { background: var(--bs-primary) !important; }\n .form-range::-webkit-slider-thumb:active { background-color: rgba(var(--bs-primary-rgb), 0.5) !important; }\n\n /* 进度条与分页 (Progress & Pagination) */\n .progress-bar { background-color: var(--bs-primary) !important; }\n .page-link { color: var(--bs-primary); }\n .active > .page-link, .page-link.active {\n background-color: var(--bs-primary) !important;\n border-color: var(--bs-primary) !important;\n }\n\n /* 导航与下拉菜单 (Nav & Dropdown) */\n .nav {\n --bs-nav-link-color: var(--bs-body-color) !important;\n --bs-nav-link-hover-color: var(--bs-primary) !important;\n }\n .nav-pills {\n --bs-nav-pills-link-active-bg: var(--bs-primary) !important;\n --bs-nav-pills-link-active-color: #fff !important;\n }\n .dropdown-menu {\n --bs-dropdown-link-active-bg: var(--bs-primary) !important;\n --bs-dropdown-link-active-color: #fff !important;\n }\n .navbar-nav .nav-link.active,\n .navbar-nav .nav-link.show {\n color: var(--bs-primary) !important;\n }\n\n /* 列表组 (List Group) */\n .list-group-item.active {\n background-color: var(--bs-primary) !important;\n border-color: var(--bs-primary) !important;\n }\n `}}}),n){let t=document.getElementById("bs-config-patch");t||(t=document.createElement("style"),t.id="bs-config-patch",document.head.appendChild(t)),t.innerHTML=n}let{bindDarkMode:i,darkMode:s}=t;const o=t=>{e.setAttribute("data-bs-theme",t?"dark":"light")};if(Array.isArray(i)&&(i={state:i[0],key:i[1]}),i&&i.state&&i.key){const{state:t,key:e}=i;t.__watch&&(t.__watch(e,o),o(t[e]))}else void 0!==s&&o(s)},_hexToRgb:t=>{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,n,i)=>e+e+n+n+i+i);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},_shadeColor:(t,e)=>{const n=go._hexToRgb(t);if(!n)return t;const i=t=>Math.round(t*(1-e)).toString(16).padStart(2,"0");return`#${i(n.r)}${i(n.g)}${i(n.b)}`}};"undefined"!=typeof globalThis&&(globalThis.bootstrap=mo,globalThis.Bootstrap=go),t.Bootstrap=go,t.default=go,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); + */let ee=1;const ne={mouseenter:"mouseover",mouseleave:"mouseout"},ie=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 se(t,e){return e&&`${e}::${ee++}`||t.uidEvent||ee++}function oe(t){const e=se(t);return t.uidEvent=e,te[e]=te[e]||{},te[e]}function re(t,e,n=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===n)}function ae(t,e,n){const i="string"==typeof e,s=i?n:e||n;let o=de(t);return ie.has(o)||(o=t),[i,s,o]}function le(t,e,n,i,s){if("string"!=typeof e||!t)return;let[o,r,a]=ae(e,n,i);if(e in ne){r=(t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)})(r)}const l=oe(t),c=l[a]||(l[a]={}),h=re(c,r,o?n:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=se(r,e.replace(Gt,"")),u=o?function(t,e,n){return function i(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return fe(s,{delegateTarget:r}),i.oneOff&&ue.off(t,s.type,e,n),n.apply(r,[s])}}(t,n,r):function(t,e){return function n(i){return fe(i,{delegateTarget:t}),n.oneOff&&ue.off(t,i.type,e),e.apply(t,[i])}}(t,r);u.delegationSelector=o?n:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function ce(t,e,n,i,s){const o=re(e[n],i,s);o&&(t.removeEventListener(n,o,Boolean(s)),delete e[n][o.uidEvent])}function he(t,e,n,i){const s=e[n]||{};for(const[o,r]of Object.entries(s))o.includes(i)&&ce(t,e,n,r.callable,r.delegationSelector)}function de(t){return t=t.replace(Jt,""),ne[t]||t}const ue={on(t,e,n,i){le(t,e,n,i,!1)},one(t,e,n,i){le(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[s,o,r]=ae(e,n,i),a=r!==e,l=oe(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const n of Object.keys(l))he(t,l,n,e.slice(1));for(const[n,i]of Object.entries(c)){const s=n.replace(Zt,"");a&&!e.includes(s)||ce(t,l,r,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;ce(t,l,r,o,s?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=qt();let s=null,o=!0,r=!0,a=!1;e!==de(e)&&i&&(s=i.Event(e,n),i(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=fe(new Event(e,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function fe(t,e={}){for(const[n,i]of Object.entries(e))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}function pe(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function me(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const ge={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${me(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${me(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),e[n]=pe(t.dataset[i])}return e},getDataAttribute:(t,e)=>pe(t.getAttribute(`data-bs-${me(e)}`))};class _e{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=jt(e)?ge.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...jt(e)?ge.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,i]of Object.entries(e)){const e=t[n],s=jt(e)?"element":Pt(e);if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${s}" but expected type "${i}".`)}}}class be extends _e{constructor(t,e){super(),(t=Ft(t))&&(this._element=t,this._config=this._getConfig(e),Dt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Dt.remove(this._element,this.constructor.DATA_KEY),ue.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){Yt(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Dt.get(Ft(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const ve=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e?e.split(",").map(t=>Nt(t)).join(","):null},ye={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(t=>!Bt(t)&&Ht(t))},getSelectorFromElement(t){const e=ve(t);return e&&ye.findOne(e)?e:null},getElementFromSelector(t){const e=ve(t);return e?ye.findOne(e):null},getMultipleElementsFromSelector(t){const e=ve(t);return e?ye.find(e):[]}},we=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;ue.on(document,n,`[data-bs-dismiss="${i}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Bt(this))return;const s=ye.getElementFromSelector(this)||this.closest(`.${i}`);t.getOrCreateInstance(s)[e]()})},Ae=".bs.alert",Ee=`close${Ae}`,Te=`closed${Ae}`;class Ce extends be{static get NAME(){return"alert"}close(){if(ue.trigger(this._element,Ee).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),ue.trigger(this._element,Te),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=Ce.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}we(Ce,"close"),Qt(Ce);const ke='[data-bs-toggle="button"]';class Oe extends be{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const e=Oe.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}ue.on(document,"click.bs.button.data-api",ke,t=>{t.preventDefault();const e=t.target.closest(ke);Oe.getOrCreateInstance(e).toggle()}),Qt(Oe);const xe=".bs.swipe",$e=`touchstart${xe}`,Le=`touchmove${xe}`,Se=`touchend${xe}`,De=`pointerdown${xe}`,Ie=`pointerup${xe}`,Ne={endCallback:null,leftCallback:null,rightCallback:null},Pe={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Me extends _e{constructor(t,e){super(),this._element=t,t&&Me.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ne}static get DefaultType(){return Pe}static get NAME(){return"swipe"}dispose(){ue.off(this._element,xe)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Xt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Xt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ue.on(this._element,De,t=>this._start(t)),ue.on(this._element,Ie,t=>this._end(t)),this._element.classList.add("pointer-event")):(ue.on(this._element,$e,t=>this._start(t)),ue.on(this._element,Le,t=>this._move(t)),ue.on(this._element,Se,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const je=".bs.carousel",Fe=".data-api",He="ArrowLeft",Be="ArrowRight",We="next",ze="prev",Re="left",qe="right",Ve=`slide${je}`,Ke=`slid${je}`,Qe=`keydown${je}`,Xe=`mouseenter${je}`,Ye=`mouseleave${je}`,Ue=`dragstart${je}`,Ge=`load${je}${Fe}`,Je=`click${je}${Fe}`,Ze="carousel",tn="active",en=".active",nn=".carousel-item",sn=en+nn,on={[He]:qe,[Be]:Re},rn={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},an={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ln extends be{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ye.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Ze&&this.cycle()}static get Default(){return rn}static get DefaultType(){return an}static get NAME(){return"carousel"}next(){this._slide(We)}nextWhenVisible(){!document.hidden&&Ht(this._element)&&this.next()}prev(){this._slide(ze)}pause(){this._isSliding&&Mt(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?ue.one(this._element,Ke,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void ue.one(this._element,Ke,()=>this.to(t));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?We:ze;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&ue.on(this._element,Qe,t=>this._keydown(t)),"hover"===this._config.pause&&(ue.on(this._element,Xe,()=>this.pause()),ue.on(this._element,Ye,()=>this._maybeEnableCycle())),this._config.touch&&Me.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ye.find(".carousel-item img",this._element))ue.on(t,Ue,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(Re)),rightCallback:()=>this._slide(this._directionToOrder(qe)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Me(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=on[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=ye.findOne(en,this._indicatorsElement);e.classList.remove(tn),e.removeAttribute("aria-current");const n=ye.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(tn),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===We,s=e||Ut(this._getItems(),n,i,this._config.wrap);if(s===n)return;const o=this._getItemIndex(s),r=e=>ue.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:o});if(r(Ve).defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";s.classList.add(c),Rt(s),n.classList.add(l),s.classList.add(l);this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(tn),n.classList.remove(tn,c,l),this._isSliding=!1,r(Ke)},n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return ye.findOne(sn,this._element)}_getItems(){return ye.find(nn,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Kt()?t===Re?ze:We:t===Re?We:ze}_orderToDirection(t){return Kt()?t===ze?Re:qe:t===ze?qe:Re}static jQueryInterface(t){return this.each(function(){const e=ln.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)})}}ue.on(document,Je,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=ye.getElementFromSelector(this);if(!e||!e.classList.contains(Ze))return;t.preventDefault();const n=ln.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===ge.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),ue.on(window,Ge,()=>{const t=ye.find('[data-bs-ride="carousel"]');for(const e of t)ln.getOrCreateInstance(e)}),Qt(ln);const cn=".bs.collapse",hn=`show${cn}`,dn=`shown${cn}`,un=`hide${cn}`,fn=`hidden${cn}`,pn=`click${cn}.data-api`,mn="show",gn="collapse",_n="collapsing",bn=`:scope .${gn} .${gn}`,vn='[data-bs-toggle="collapse"]',yn={parent:null,toggle:!0},wn={parent:"(null|element)",toggle:"boolean"};class An extends be{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=ye.find(vn);for(const t of n){const e=ye.getSelectorFromElement(t),n=ye.find(e).filter(t=>t===this._element);null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return yn}static get DefaultType(){return wn}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(t=>t!==this._element).map(t=>An.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(ue.trigger(this._element,hn).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(gn),this._element.classList.add(_n),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(_n),this._element.classList.add(gn,mn),this._element.style[e]="",ue.trigger(this._element,dn)},this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(ue.trigger(this._element,un).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Rt(this._element),this._element.classList.add(_n),this._element.classList.remove(gn,mn);for(const t of this._triggerArray){const e=ye.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(_n),this._element.classList.add(gn),ue.trigger(this._element,fn)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(mn)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Ft(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(vn);for(const e of t){const t=ye.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ye.find(bn,this._config.parent);return ye.find(t,this._config.parent).filter(t=>!e.includes(t))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle("collapsed",!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const n=An.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}})}}ue.on(document,pn,vn,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of ye.getMultipleElementsFromSelector(this))An.getOrCreateInstance(t,{toggle:!1}).toggle()}),Qt(An);const En="dropdown",Tn=".bs.dropdown",Cn=".data-api",kn="ArrowUp",On="ArrowDown",xn=`hide${Tn}`,$n=`hidden${Tn}`,Ln=`show${Tn}`,Sn=`shown${Tn}`,Dn=`click${Tn}${Cn}`,In=`keydown${Tn}${Cn}`,Nn=`keyup${Tn}${Cn}`,Pn="show",Mn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',jn=`${Mn}.${Pn}`,Fn=".dropdown-menu",Hn=Kt()?"top-end":"top-start",Bn=Kt()?"top-start":"top-end",Wn=Kt()?"bottom-end":"bottom-start",zn=Kt()?"bottom-start":"bottom-end",Rn=Kt()?"left-start":"right-start",qn=Kt()?"right-start":"left-start",Vn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Kn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Qn extends be{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=ye.next(this._element,Fn)[0]||ye.prev(this._element,Fn)[0]||ye.findOne(Fn,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vn}static get DefaultType(){return Kn}static get NAME(){return En}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Bt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!ue.trigger(this._element,Ln,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))ue.on(t,"mouseover",zt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Pn),this._element.classList.add(Pn),ue.trigger(this._element,Sn,t)}}hide(){if(Bt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!ue.trigger(this._element,xn,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.off(t,"mouseover",zt);this._popper&&this._popper.destroy(),this._menu.classList.remove(Pn),this._element.classList.remove(Pn),this._element.setAttribute("aria-expanded","false"),ge.removeDataAttribute(this._menu,"popper"),ue.trigger(this._element,$n,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!jt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${En.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Lt)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let t=this._element;"parent"===this._config.reference?t=this._parent:jt(this._config.reference)?t=Ft(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=$t(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Pn)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Rn;if(t.classList.contains("dropstart"))return qn;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Bn:Hn:e?zn:Wn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(ge.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...Xt(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const n=ye.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>Ht(t));n.length&&Ut(n,e,t===On,!n.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Qn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=ye.find(jn);for(const n of e){const e=Qn.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),s=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n="Escape"===t.key,i=[kn,On].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const s=this.matches(Mn)?this:ye.prev(this,Mn)[0]||ye.next(this,Mn)[0]||ye.findOne(Mn,t.delegateTarget.parentNode),o=Qn.getOrCreateInstance(s);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}ue.on(document,In,Mn,Qn.dataApiKeydownHandler),ue.on(document,In,Fn,Qn.dataApiKeydownHandler),ue.on(document,Dn,Qn.clearMenus),ue.on(document,Nn,Qn.clearMenus),ue.on(document,Dn,Mn,function(t){t.preventDefault(),Qn.getOrCreateInstance(this).toggle()}),Qt(Qn);const Xn="backdrop",Yn="show",Un=`mousedown.bs.${Xn}`,Gn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Jn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Zn extends _e{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Gn}static get DefaultType(){return Jn}static get NAME(){return Xn}show(t){if(!this._config.isVisible)return void Xt(t);this._append();const e=this._getElement();this._config.isAnimated&&Rt(e),e.classList.add(Yn),this._emulateAnimation(()=>{Xt(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Yn),this._emulateAnimation(()=>{this.dispose(),Xt(t)})):Xt(t)}dispose(){this._isAppended&&(ue.off(this._element,Un),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Ft(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),ue.on(t,Un,()=>{Xt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){Yt(t,this._getElement(),this._config.isAnimated)}}const ti=".bs.focustrap",ei=`focusin${ti}`,ni=`keydown.tab${ti}`,ii="backward",si={autofocus:!0,trapElement:null},oi={autofocus:"boolean",trapElement:"element"};class ri extends _e{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return si}static get DefaultType(){return oi}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ue.off(document,ti),ue.on(document,ei,t=>this._handleFocusin(t)),ue.on(document,ni,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ue.off(document,ti))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=ye.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===ii?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?ii:"forward")}}const ai=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",li=".sticky-top",ci="padding-right",hi="margin-right";class di{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ci,e=>e+t),this._setElementAttributes(ai,ci,e=>e+t),this._setElementAttributes(li,hi,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ci),this._resetElementAttributes(ai,ci),this._resetElementAttributes(li,hi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(s))}px`)})}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&ge.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const n=ge.getDataAttribute(t,e);null!==n?(ge.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(jt(t))e(t);else for(const n of ye.find(t,this._element))e(n)}}const ui=".bs.modal",fi=`hide${ui}`,pi=`hidePrevented${ui}`,mi=`hidden${ui}`,gi=`show${ui}`,_i=`shown${ui}`,bi=`resize${ui}`,vi=`click.dismiss${ui}`,yi=`mousedown.dismiss${ui}`,wi=`keydown.dismiss${ui}`,Ai=`click${ui}.data-api`,Ei="modal-open",Ti="show",Ci="modal-static",ki={backdrop:!0,focus:!0,keyboard:!0},Oi={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class xi extends be{constructor(t,e){super(t,e),this._dialog=ye.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new di,this._addEventListeners()}static get Default(){return ki}static get DefaultType(){return Oi}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;ue.trigger(this._element,gi,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ei),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning)return;ue.trigger(this._element,fi).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ti),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){ue.off(window,ui),ue.off(this._dialog,ui),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ri({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=ye.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Rt(this._element),this._element.classList.add(Ti);this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ue.trigger(this._element,_i,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){ue.on(this._element,wi,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),ue.on(window,bi,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ue.on(this._element,yi,t=>{ue.one(this._element,vi,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Ei),this._resetAdjustments(),this._scrollBar.reset(),ue.trigger(this._element,mi)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ue.trigger(this._element,pi).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Ci)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ci),this._queueCallback(()=>{this._element.classList.remove(Ci),this._queueCallback(()=>{this._element.style.overflowY=e},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=Kt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=Kt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const n=xi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}})}}ue.on(document,Ai,'[data-bs-toggle="modal"]',function(t){const e=ye.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),ue.one(e,gi,t=>{t.defaultPrevented||ue.one(e,mi,()=>{Ht(this)&&this.focus()})});const n=ye.findOne(".modal.show");n&&xi.getInstance(n).hide();xi.getOrCreateInstance(e).toggle(this)}),we(xi),Qt(xi);const $i=".bs.offcanvas",Li=".data-api",Si=`load${$i}${Li}`,Di="show",Ii="showing",Ni="hiding",Pi=".offcanvas.show",Mi=`show${$i}`,ji=`shown${$i}`,Fi=`hide${$i}`,Hi=`hidePrevented${$i}`,Bi=`hidden${$i}`,Wi=`resize${$i}`,zi=`click${$i}${Li}`,Ri=`keydown.dismiss${$i}`,qi={backdrop:!0,keyboard:!0,scroll:!1},Vi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Ki extends be{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return qi}static get DefaultType(){return Vi}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(ue.trigger(this._element,Mi,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new di).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Ii);this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Di),this._element.classList.remove(Ii),ue.trigger(this._element,ji,{relatedTarget:t})},this._element,!0)}hide(){if(!this._isShown)return;if(ue.trigger(this._element,Fi).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Ni),this._backdrop.hide();this._queueCallback(()=>{this._element.classList.remove(Di,Ni),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new di).reset(),ue.trigger(this._element,Bi)},this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Zn({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():ue.trigger(this._element,Hi)}:null})}_initializeFocusTrap(){return new ri({trapElement:this._element})}_addEventListeners(){ue.on(this._element,Ri,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():ue.trigger(this._element,Hi))})}static jQueryInterface(t){return this.each(function(){const e=Ki.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}ue.on(document,zi,'[data-bs-toggle="offcanvas"]',function(t){const e=ye.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this))return;ue.one(e,Bi,()=>{Ht(this)&&this.focus()});const n=ye.findOne(Pi);n&&n!==e&&Ki.getInstance(n).hide();Ki.getOrCreateInstance(e).toggle(this)}),ue.on(window,Si,()=>{for(const t of ye.find(Pi))Ki.getOrCreateInstance(t).show()}),ue.on(window,Wi,()=>{for(const t of ye.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Ki.getOrCreateInstance(t).hide()}),we(Ki),Qt(Ki);const Qi={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Xi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Yi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Ui=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!Xi.has(n)||Boolean(Yi.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(n))};const Gi={allowList:Qi,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Ji={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Zi={entry:"(string|element|function|null)",selector:"(string|element)"};class ts extends _e{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Gi}static get DefaultType(){return Ji}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},Zi)}_setContent(t,e,n){const i=ye.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?jt(e)?this._putElementInTemplate(Ft(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const t of s){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[n]||[]);for(const e of i)Ui(e,s)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Xt(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const es=new Set(["sanitize","allowList","sanitizeFn"]),ns="fade",is="show",ss=".tooltip-inner",os=".modal",rs="hide.bs.modal",as="hover",ls="focus",cs="click",hs={AUTO:"auto",TOP:"top",RIGHT:Kt()?"left":"right",BOTTOM:"bottom",LEFT:Kt()?"right":"left"},ds={allowList:Qi,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},us={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class fs extends be{constructor(t,e){if(void 0===Lt)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ds}static get DefaultType(){return us}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),ue.off(this._element.closest(os),rs,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=ue.trigger(this._element,this.constructor.eventName("show")),e=(Wt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),ue.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(is),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.on(t,"mouseover",zt);this._queueCallback(()=>{ue.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(ue.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(is),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.off(t,"mouseover",zt);this._activeTrigger[cs]=!1,this._activeTrigger[ls]=!1,this._activeTrigger[as]=!1,this._isHovered=null;this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ue.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ns,is),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(ns),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ts({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ss]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ns)}_isShown(){return this.tip&&this.tip.classList.contains(is)}_createPopper(t){const e=Xt(this._config.placement,[this,t,this._element]),n=hs[e.toUpperCase()];return $t(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return Xt(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...Xt(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)ue.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[cs]=!(e._isShown()&&e._activeTrigger[cs]),e.toggle()});else if("manual"!==e){const t=e===as?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=e===as?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");ue.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?ls:as]=!0,e._enter()}),ue.on(this._element,n,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?ls:as]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ue.on(this._element.closest(os),rs,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=ge.getDataAttributes(this._element);for(const t of Object.keys(e))es.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:Ft(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,n]of Object.entries(this._config))this.constructor.Default[e]!==n&&(t[e]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=fs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Qt(fs);const ps=".popover-header",ms=".popover-body",gs={...fs.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},_s={...fs.DefaultType,content:"(null|string|element|function)"};class bs extends fs{static get Default(){return gs}static get DefaultType(){return _s}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ps]:this._getTitle(),[ms]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=bs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Qt(bs);const vs=".bs.scrollspy",ys=`activate${vs}`,ws=`click${vs}`,As=`load${vs}.data-api`,Es="active",Ts="[href]",Cs=".nav-link",ks=`${Cs}, .nav-item > ${Cs}, .list-group-item`,Os={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},xs={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $s extends be{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Os}static get DefaultType(){return xs}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Ft(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ue.off(this._config.target,ws),ue.on(this._config.target,ws,Ts,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const n=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),n=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(n(o),!i)return}else s||t||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ye.find(Ts,this._config.target);for(const e of t){if(!e.hash||Bt(e))continue;const t=ye.findOne(decodeURI(e.hash),this._element);Ht(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Es),this._activateParents(t),ue.trigger(this._element,ys,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))ye.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Es);else for(const e of ye.parents(t,".nav, .list-group"))for(const t of ye.prev(e,ks))t.classList.add(Es)}_clearActiveClass(t){t.classList.remove(Es);const e=ye.find(`${Ts}.${Es}`,t);for(const t of e)t.classList.remove(Es)}static jQueryInterface(t){return this.each(function(){const e=$s.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}ue.on(window,As,()=>{for(const t of ye.find('[data-bs-spy="scroll"]'))$s.getOrCreateInstance(t)}),Qt($s);const Ls=".bs.tab",Ss=`hide${Ls}`,Ds=`hidden${Ls}`,Is=`show${Ls}`,Ns=`shown${Ls}`,Ps=`click${Ls}`,Ms=`keydown${Ls}`,js=`load${Ls}`,Fs="ArrowLeft",Hs="ArrowRight",Bs="ArrowUp",Ws="ArrowDown",zs="Home",Rs="End",qs="active",Vs="fade",Ks="show",Qs=".dropdown-toggle",Xs=`:not(${Qs})`,Ys='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Us=`${`.nav-link${Xs}, .list-group-item${Xs}, [role="tab"]${Xs}`}, ${Ys}`,Gs=`.${qs}[data-bs-toggle="tab"], .${qs}[data-bs-toggle="pill"], .${qs}[data-bs-toggle="list"]`;class Js extends be{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ue.on(this._element,Ms,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),n=e?ue.trigger(e,Ss,{relatedTarget:t}):null;ue.trigger(t,Is,{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(qs),this._activate(ye.getElementFromSelector(t));this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),ue.trigger(t,Ns,{relatedTarget:e})):t.classList.add(Ks)},t,t.classList.contains(Vs))}_deactivate(t,e){if(!t)return;t.classList.remove(qs),t.blur(),this._deactivate(ye.getElementFromSelector(t));this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),ue.trigger(t,Ds,{relatedTarget:e})):t.classList.remove(Ks)},t,t.classList.contains(Vs))}_keydown(t){if(![Fs,Hs,Bs,Ws,zs,Rs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!Bt(t));let n;if([zs,Rs].includes(t.key))n=e[t.key===zs?0:e.length-1];else{const i=[Hs,Ws].includes(t.key);n=Ut(e,t.target,i,!0)}n&&(n.focus({preventScroll:!0}),Js.getOrCreateInstance(n).show())}_getChildren(){return ye.find(Us,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),n=this._getOuterElement(t);t.setAttribute("aria-selected",e),n!==t&&this._setAttributeIfNotExists(n,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=ye.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains("dropdown"))return;const i=(t,i)=>{const s=ye.findOne(t,n);s&&s.classList.toggle(i,e)};i(Qs,qs),i(".dropdown-menu",Ks),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(qs)}_getInnerElement(t){return t.matches(Us)?t:ye.findOne(Us,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=Js.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}ue.on(document,Ps,Ys,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this)||Js.getOrCreateInstance(this).show()}),ue.on(window,js,()=>{for(const t of ye.find(Gs))Js.getOrCreateInstance(t)}),Qt(Js);const Zs=".bs.toast",to=`mouseover${Zs}`,eo=`mouseout${Zs}`,no=`focusin${Zs}`,io=`focusout${Zs}`,so=`hide${Zs}`,oo=`hidden${Zs}`,ro=`show${Zs}`,ao=`shown${Zs}`,lo="hide",co="show",ho="showing",uo={animation:"boolean",autohide:"boolean",delay:"number"},fo={animation:!0,autohide:!0,delay:5e3};class po extends be{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return fo}static get DefaultType(){return uo}static get NAME(){return"toast"}show(){if(ue.trigger(this._element,ro).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(lo),Rt(this._element),this._element.classList.add(co,ho),this._queueCallback(()=>{this._element.classList.remove(ho),ue.trigger(this._element,ao),this._maybeScheduleHide()},this._element,this._config.animation)}hide(){if(!this.isShown())return;if(ue.trigger(this._element,so).defaultPrevented)return;this._element.classList.add(ho),this._queueCallback(()=>{this._element.classList.add(lo),this._element.classList.remove(ho,co),ue.trigger(this._element,oo)},this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(co),super.dispose()}isShown(){return this._element.classList.contains(co)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){ue.on(this._element,to,t=>this._onInteraction(t,!0)),ue.on(this._element,eo,t=>this._onInteraction(t,!1)),ue.on(this._element,no,t=>this._onInteraction(t,!0)),ue.on(this._element,io,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=po.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}we(po),Qt(po);const mo=Object.freeze(Object.defineProperty({__proto__:null,Alert:Ce,Button:Oe,Carousel:ln,Collapse:An,Dropdown:Qn,Modal:xi,Offcanvas:Ki,Popover:bs,ScrollSpy:$s,Tab:Js,Toast:po,Tooltip:fs},Symbol.toStringTag,{value:"Module"})),go={config:(t={})=>{if("undefined"==typeof document)return;const e=document.documentElement;let n="";if(["primary","secondary","success","info","warning","danger","light","dark"].forEach(i=>{const s=t[i];if(s){e.style.setProperty(`--bs-${i}`,s);const t=go._hexToRgb(s);if(t){const o=`${t.r}, ${t.g}, ${t.b}`,r=go._shadeColor(s,.15),a=go._shadeColor(s,.2);e.style.setProperty(`--bs-${i}-rgb`,o),n+=`\n .btn-${i} {\n --bs-btn-bg: var(--bs-${i}) !important;\n --bs-btn-border-color: var(--bs-${i}) !important;\n --bs-btn-hover-bg: ${r} !important;\n --bs-btn-hover-border-color: ${r} !important;\n --bs-btn-active-bg: ${a} !important;\n --bs-btn-active-border-color: ${a} !important;\n --bs-btn-disabled-bg: var(--bs-${i}) !important;\n --bs-btn-disabled-border-color: var(--bs-${i}) !important;\n }\n .btn-outline-${i} {\n --bs-btn-color: var(--bs-${i}) !important;\n --bs-btn-border-color: var(--bs-${i}) !important;\n --bs-btn-hover-bg: var(--bs-${i}) !important;\n --bs-btn-hover-border-color: var(--bs-${i}) !important;\n --bs-btn-active-bg: ${a} !important;\n --bs-btn-active-border-color: ${a} !important;\n --bs-btn-disabled-color: var(--bs-${i}) !important;\n --bs-btn-disabled-border-color: var(--bs-${i}) !important;\n }\n .bg-${i} { background-color: var(--bs-${i}) !important; }\n .text-${i} { color: var(--bs-${i}) !important; }\n .border-${i} { border-color: var(--bs-${i}) !important; }\n .badge.bg-${i} { background-color: var(--bs-${i}) !important; }\n\n /* 语义色链接按钮 */\n .btn-link-${i},\n .btn-link.btn-link-${i} {\n --bs-btn-color: var(--bs-${i});\n --bs-btn-hover-color: ${r};\n --bs-btn-active-color: ${a};\n --bs-btn-disabled-color: var(--bs-${i});\n }\n\n /* 表单控件补丁 (Form Controls) */\n .form-check-input:checked {\n background-color: var(--bs-primary) !important;\n border-color: var(--bs-primary) !important;\n }\n .form-check-input:focus {\n border-color: var(--bs-primary) !important;\n box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;\n }\n .form-switch .form-check-input:checked {\n background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;\n }\n .form-range::-webkit-slider-thumb { background: var(--bs-primary) !important; }\n .form-range::-moz-range-thumb { background: var(--bs-primary) !important; }\n .form-range::-webkit-slider-thumb:active { background-color: rgba(var(--bs-primary-rgb), 0.5) !important; }\n\n /* 进度条与分页 (Progress & Pagination) */\n .progress-bar { background-color: var(--bs-primary) !important; }\n .page-link { color: var(--bs-primary); }\n .active > .page-link, .page-link.active {\n background-color: var(--bs-primary) !important;\n border-color: var(--bs-primary) !important;\n }\n\n /* 导航与下拉菜单 (Nav & Dropdown) */\n .nav {\n --bs-nav-link-color: var(--bs-body-color) !important;\n --bs-nav-link-hover-color: var(--bs-primary) !important;\n }\n .nav-pills {\n --bs-nav-pills-link-active-bg: var(--bs-primary) !important;\n --bs-nav-pills-link-active-color: #fff !important;\n }\n .dropdown-menu {\n --bs-dropdown-link-active-bg: var(--bs-primary) !important;\n --bs-dropdown-link-active-color: #fff !important;\n }\n .navbar-nav .nav-link.active,\n .navbar-nav .nav-link.show {\n color: var(--bs-primary) !important;\n }\n\n /* 列表组 (List Group) */\n .list-group-item.active {\n background-color: var(--bs-primary) !important;\n border-color: var(--bs-primary) !important;\n }\n `}}}),n){let t=document.getElementById("bs-config-patch");t||(t=document.createElement("style"),t.id="bs-config-patch",document.head.appendChild(t)),t.innerHTML=n}let{bindDarkMode:i,darkMode:s}=t;const o=t=>{e.setAttribute("data-bs-theme",t?"dark":"light")};if(Array.isArray(i)&&(i={state:i[0],key:i[1]}),i&&i.state&&i.key){const{state:t,key:e}=i;t.__watch&&(t.__watch(e,o),o(t[e]))}else void 0!==s&&o(s)},_hexToRgb:t=>{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,n,i)=>e+e+n+n+i+i);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},_shadeColor:(t,e)=>{const n=go._hexToRgb(t);if(!n)return t;const i=t=>Math.round(t*(1-e)).toString(16).padStart(2,"0");return`#${i(n.r)}${i(n.g)}${i(n.b)}`}};"undefined"!=typeof globalThis&&(globalThis.bootstrap=mo,globalThis.Bootstrap=go),t.Bootstrap=go,t.default=go,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/package.json b/package.json index d3de009..21fde57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@apigo.cc/bootstrap", - "version": "1.0.10", + "version": "1.0.11", "type": "module", "main": "dist/bootstrap.js", "files": [ diff --git a/src/index.js b/src/index.js index 6891070..8afe439 100644 --- a/src/index.js +++ b/src/index.js @@ -44,6 +44,16 @@ export const Bootstrap = { --bs-btn-disabled-bg: var(--bs-${name}) !important; --bs-btn-disabled-border-color: var(--bs-${name}) !important; } + .btn-outline-${name} { + --bs-btn-color: var(--bs-${name}) !important; + --bs-btn-border-color: var(--bs-${name}) !important; + --bs-btn-hover-bg: var(--bs-${name}) !important; + --bs-btn-hover-border-color: var(--bs-${name}) !important; + --bs-btn-active-bg: ${activeColor} !important; + --bs-btn-active-border-color: ${activeColor} !important; + --bs-btn-disabled-color: var(--bs-${name}) !important; + --bs-btn-disabled-border-color: var(--bs-${name}) !important; + } .bg-${name} { background-color: var(--bs-${name}) !important; } .text-${name} { color: var(--bs-${name}) !important; } .border-${name} { border-color: var(--bs-${name}) !important; } diff --git a/test/bootstrap.spec.js b/test/bootstrap.spec.js index e91ebda..fe44260 100644 --- a/test/bootstrap.spec.js +++ b/test/bootstrap.spec.js @@ -39,16 +39,26 @@ test('bootstrap self-contained integration', async ({ page }) => { link.className = 'btn btn-link-primary' document.body.appendChild(link) + const outline = document.createElement('button') + outline.className = 'btn btn-outline-primary' + document.body.appendChild(outline) + const primaryStyle = getComputedStyle(primary) const linkStyle = getComputedStyle(link) + const outlineStyle = getComputedStyle(outline) const result = { base: primaryStyle.getPropertyValue('--bs-btn-bg').trim(), hover: primaryStyle.getPropertyValue('--bs-btn-hover-bg').trim(), link: linkStyle.getPropertyValue('--bs-btn-color').trim(), - linkHover: linkStyle.getPropertyValue('--bs-btn-hover-color').trim() + linkHover: linkStyle.getPropertyValue('--bs-btn-hover-color').trim(), + outline: outlineStyle.getPropertyValue('--bs-btn-color').trim(), + outlineBorder: outlineStyle.getPropertyValue('--bs-btn-border-color').trim(), + outlineHover: outlineStyle.getPropertyValue('--bs-btn-hover-bg').trim(), + outlineActive: outlineStyle.getPropertyValue('--bs-btn-active-bg').trim() } primary.remove() link.remove() + outline.remove() return result }) expect(buttonColors.base).toBe('#ff0000') @@ -56,4 +66,8 @@ test('bootstrap self-contained integration', async ({ page }) => { expect(buttonColors.hover).not.toBe(buttonColors.base) expect(buttonColors.link).toBe('#ff0000') expect(buttonColors.linkHover).toBe('#d90000') + expect(buttonColors.outline).toBe('#ff0000') + expect(buttonColors.outlineBorder).toBe('#ff0000') + expect(buttonColors.outlineHover).toBe('#ff0000') + expect(buttonColors.outlineActive).toBe('#cc0000') });