@baloise/ds-core 19.9.0 → 19.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/floating-ui.dom.js +151 -125
- package/components/index.js +1 -1
- package/components/svg.js +1595 -1325
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-79006350e3.system.entry.js → p-00d493e589.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-862bf2c3e6.entry.js → p-01b27feafd.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2333a469fa.entry.js → p-02323ca1fe.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c23854bd63.entry.js → p-0732a81f81.entry.js} +1 -1
- package/dist/baloise-design-system/{p-efd2551aca.entry.js → p-0974dcb139.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b9bbf796f3.system.entry.js → p-0c0190dc67.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-493e239429.entry.js → p-12d43e06d9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bd5655b6a8.entry.js → p-198c6e75ad.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1ee3f23f54.entry.js → p-1c913d4359.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a7503a0c9d.entry.js → p-1f0f2e599d.entry.js} +1 -1
- package/dist/baloise-design-system/{p-44137a3d17.system.entry.js → p-213c4d93f4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7f2e1e1be7.entry.js → p-239ed27774.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5c3f48e883.system.entry.js → p-25dce380f8.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e9095ec856.system.entry.js → p-29defa9270.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-586de1181e.entry.js → p-340cd7b9e8.entry.js} +1 -1
- package/dist/baloise-design-system/p-38d8f6459e.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-c637edb9ea.entry.js → p-3d9d33c487.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b75b727fbc.entry.js → p-3ec4feac2e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-772db94619.system.entry.js → p-3ff089ddd6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-Dn1vzM6-.js → p-4MIQMEtx.js} +1 -1
- package/dist/baloise-design-system/{p-0556bebe3a.system.entry.js → p-5ed691fea4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fb980109e2.system.entry.js → p-6620c99966.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-777471c320.entry.js +1 -0
- package/dist/baloise-design-system/{p-14ae6214c4.system.entry.js → p-78eb8b6cd9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0077e5a12f.entry.js → p-79d0e94ea1.entry.js} +1 -1
- package/dist/baloise-design-system/p-992840a30d.entry.js +1 -0
- package/dist/baloise-design-system/p-BFRjY4w3.js +1 -1
- package/dist/baloise-design-system/p-BRAmUyPx.system.js +1 -1
- package/dist/baloise-design-system/p-Bk7UdnZ5.system.js +1 -1
- package/dist/baloise-design-system/p-BmOE4zEk.system.js +1 -0
- package/dist/baloise-design-system/{p-TqRS9XF1.system.js → p-Bp0A6Ore.system.js} +1 -1
- package/dist/baloise-design-system/{p-DmVt6SeJ.js → p-BzAHSyRi.js} +1 -1
- package/dist/baloise-design-system/p-C8LDaK6Z.system.js +1 -0
- package/dist/baloise-design-system/p-CAb2C8az.js +1 -0
- package/dist/baloise-design-system/p-Ck7YRry-.system.js +2 -0
- package/dist/baloise-design-system/{p-BDYdAsv_.system.js → p-CkIgsCwS.system.js} +1 -1
- package/dist/baloise-design-system/p-Cr2H7Jt3.js +1 -0
- package/dist/baloise-design-system/p-DojUs2K8.js +2 -0
- package/dist/baloise-design-system/{p-CE3V5D8z.system.js → p-DvahsaGu.system.js} +1 -1
- package/dist/baloise-design-system/{p-bNRkwxp2.system.js → p-G8UK5F7H.system.js} +1 -1
- package/dist/baloise-design-system/p-P4eJh_wN.js +1 -0
- package/dist/baloise-design-system/{p-7cb15b231d.entry.js → p-a1482cbe4a.entry.js} +1 -1
- package/dist/baloise-design-system/p-a9d42c63a1.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-ee0b45ff30.system.entry.js → p-b1877d6778.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-393a31ad6e.system.entry.js → p-bc641f2029.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6191805e40.system.entry.js → p-d41ca5c096.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bb255885a4.system.entry.js → p-d5de2680ad.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fec5974e23.entry.js → p-dafa925d2c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3ed3bfc59a.system.entry.js → p-f22c5ab5ed.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-eb98a3713f.system.entry.js → p-f481d72c52.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8029d2f939.entry.js → p-f4c4d03e6e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c8491fda99.system.entry.js → p-fc8024a9d7.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a10bc9e5d8.entry.js → p-fc9a46b295.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a3558335f2.system.entry.js → p-fd5d4c0fd7.system.entry.js} +1 -1
- package/dist/cjs/bal-carousel_2.cjs.entry.js +5 -4
- package/dist/cjs/bal-date.cjs.entry.js +1 -1
- package/dist/cjs/bal-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/bal-field_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-footer.cjs.entry.js +1 -1
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-icon.cjs.entry.js +1 -1
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +5 -4
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-popup.cjs.entry.js +1 -1
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{breakpoints.decorator-DhiWnqha.js → breakpoints.decorator-Cc1aDi12.js} +1 -1
- package/dist/cjs/{breakpoints.subject-DPTVZ3As.js → breakpoints.subject-CEyIkleD.js} +1 -1
- package/dist/cjs/{floating-ui-DyN44UhF.js → floating-ui-BE1Qsw-b.js} +1 -1
- package/dist/cjs/{floating-ui.dom-BPU3HWKX.js → floating-ui.dom-DCg2YBDr.js} +151 -125
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-BzrcZo6Y.js +1 -1
- package/dist/cjs/svg-qEvvK3mS.js +1607 -0
- package/dist/cjs/{tokens.esm-DM_dMnsW.js → tokens.esm-CO4NpDkI.js} +1 -1
- package/dist/cjs/{window-resize.decorator-oyMA7gDI.js → window-resize.decorator-DiYHzl6q.js} +1 -1
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/bal-carousel_2.entry.js +5 -4
- package/dist/esm/bal-date.entry.js +1 -1
- package/dist/esm/bal-dropdown_3.entry.js +1 -1
- package/dist/esm/bal-field_5.entry.js +3 -3
- package/dist/esm/bal-footer.entry.js +1 -1
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-icon.entry.js +1 -1
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +5 -4
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-popup.entry.js +1 -1
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-segment_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +3 -3
- package/dist/esm/bal-tab-item_2.entry.js +3 -3
- package/dist/esm/bal-tooltip.entry.js +1 -1
- package/dist/esm/{breakpoints.decorator-C-DmFJbn.js → breakpoints.decorator-CFE2cXqN.js} +1 -1
- package/dist/esm/{breakpoints.subject-Iyftu-nV.js → breakpoints.subject-BtghxYYt.js} +1 -1
- package/dist/esm/{floating-ui-Bx04QSXP.js → floating-ui-gZ7E41T8.js} +1 -1
- package/dist/esm/{floating-ui.dom-DKxvaA1I.js → floating-ui.dom-Cr2H7Jt3.js} +151 -125
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-W3od-FM9.js +1 -1
- package/dist/esm/svg-DhNz-XmR.js +1605 -0
- package/dist/esm/{tokens.esm-C9EQ_6RZ.js → tokens.esm-DcKTia-G.js} +1 -1
- package/dist/esm/{window-resize.decorator-BU569j2_.js → window-resize.decorator-DJtj2dCF.js} +1 -1
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/bal-field_5.entry.js +1 -1
- package/dist/esm-es5/bal-footer.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -1
- package/dist/esm-es5/bal-icon.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-popup.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/bal-tooltip.entry.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-C-DmFJbn.js → breakpoints.decorator-CFE2cXqN.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-Iyftu-nV.js → breakpoints.subject-BtghxYYt.js} +1 -1
- package/dist/esm-es5/{floating-ui-Bx04QSXP.js → floating-ui-gZ7E41T8.js} +1 -1
- package/dist/esm-es5/floating-ui.dom-Cr2H7Jt3.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-W3od-FM9.js +1 -1
- package/dist/esm-es5/svg-DhNz-XmR.js +2 -0
- package/dist/esm-es5/{window-resize.decorator-BU569j2_.js → window-resize.decorator-DJtj2dCF.js} +1 -1
- package/dist/types/utils/svg.d.ts +1 -1
- package/package.json +9 -9
- package/dist/baloise-design-system/p-37641c340c.entry.js +0 -1
- package/dist/baloise-design-system/p-BIBFYhYa.system.js +0 -1
- package/dist/baloise-design-system/p-BS3tl84b.system.js +0 -3
- package/dist/baloise-design-system/p-CI2FR64u.js +0 -1
- package/dist/baloise-design-system/p-DKxvaA1I.js +0 -1
- package/dist/baloise-design-system/p-DUNB4kTY.js +0 -2
- package/dist/baloise-design-system/p-Dz-E2PRm.system.js +0 -1
- package/dist/baloise-design-system/p-Ere8qsaI.js +0 -1
- package/dist/baloise-design-system/p-a31aacd887.system.entry.js +0 -1
- package/dist/baloise-design-system/p-c1f871bb5b.system.entry.js +0 -1
- package/dist/baloise-design-system/p-dc45f7cf9c.entry.js +0 -1
- package/dist/cjs/svg-Bw61tXih.js +0 -1337
- package/dist/esm/svg-DUNB4kTY.js +0 -1335
- package/dist/esm-es5/floating-ui.dom-DKxvaA1I.js +0 -1
- package/dist/esm-es5/svg-DUNB4kTY.js +0 -2
- /package/dist/baloise-design-system/{p-C9EQ_6RZ.js → p-DcKTia-G.js} +0 -0
- /package/dist/baloise-design-system/{p-dEE6wNs_.system.js → p-q1IO5uRR.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-C9EQ_6RZ.js → tokens.esm-DcKTia-G.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as o,g as n,c as i}from"./p-BdVwMG9u.js";import{_ as r,a}from"./p-dfXERft2.js";import{B as s}from"./p-ByiN-QjD.js";import{B as c}from"./p-DOUIg6bI.js";import{p as l}from"./p-BG4j3FEv.js";import{b as p}from"./p-DmVt6SeJ.js";import{a as d,i as h}from"./p-BERg8BNc.js";import{L as b}from"./p-Ere8qsaI.js";import{L as u}from"./p-B-L34nz8.js";import{b as f}from"./p-B1u-Mq75.js";import{L as v}from"./p-D7ovid3w.js";import"./p-xbSOW78W.js";import"./p-BFTU3MAI.js";import"./p-Ba5qjFjW.js";import"./p-D7M-7v58.js";import"./p-MBsgW7uz.js";import"./p-C20cwFWy.js";import"./p-C9EQ_6RZ.js";const m=class{constructor(e){t(this,e),this.bodyScrollHandler=new c,this.componentId="bal-hint-"+_++,this.isActive=!1,this.innerCloseLabel="Close",this.isMobile=p.isMobile,this.small=!1,this.onPopupChange=t=>{this.isActive=t.detail,this.isMobile&&(this.isActive?this.bodyScrollHandler.disable():this.bodyScrollHandler.enable()),l(t)}}connectedCallback(){this.bodyScrollHandler.connect()}componentDidRender(){this.updateContent()}disconnectedCallback(){this.bodyScrollHandler.disconnect()}breakpointListener(t){const e=t.mobile;e!==this.isMobile&&(this.isActive=!1),this.isMobile=e}async configChanged(t){if(!this.closeLabel)switch(t.language){case"de":this.innerCloseLabel="Schliessen";break;case"fr":this.innerCloseLabel="Fermer";break;case"it":this.innerCloseLabel="Chiudere";break;case"nl":this.innerCloseLabel="Sluiten";break;default:this.innerCloseLabel="Close"}}async toggle(){this.isActive?this.dismiss():this.present()}async present(){this.popupElement&&this.popupElement.present(),this.isActive=!0}async dismiss(){this.popupElement&&this.popupElement.dismiss(),this.isActive=!1}updateContent(){this.hintContentEl&&this.slotWrapperEl&&(this.hintContentEl.innerHTML=this.slotWrapperEl.innerHTML)}render(){const t=s.block("hint"),n=t.element("icon"),i=t.element("content"),r=i.element("buttons"),a=()=>e("bal-icon",{class:Object.assign({},n.class()),"bal-popup":this.componentId,"data-testid":"bal-hint-trigger","aria-haspopup":"true",role:"button",name:"info-circle",tabindex:0,onKeyDown:t=>{(d(t)||h(t))&&(t.preventDefault(),this.toggle())}}),c=()=>e("div",{class:Object.assign({},i.class()),"data-testid":"bal-hint-content"},e("div",{ref:t=>this.hintContentEl=t}),e("bal-button-group",{class:Object.assign(Object.assign({},r.class()),r.modifier("is-hidden-desktop").class(this.small))},e("bal-button",{"data-testid":"bal-hint-close",color:"info",onClick:()=>this.dismiss()},this.closeLabel?this.closeLabel:this.innerCloseLabel)));return e(o,{class:Object.assign({},t.class())},e((()=>e("div",{class:Object.assign({},t.element("popup").class())},e(a,null),e("bal-popup",{id:this.componentId,placement:"right",closable:!0,ref:t=>this.popupElement=t,onBalChange:this.onPopupChange,variant:this.isMobile?"fullscreen":"popover",offset:this.isMobile?0:16},e("bal-popup-content",null,e(c,null))))),null),e("div",{ref:t=>this.slotWrapperEl=t,style:{display:"none"}},e("slot",null)))}get element(){return n(this)}};r([b(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],m.prototype,"breakpointListener",null),r([u(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",Promise)],m.prototype,"configChanged",null);let _=0;m.style="@media (hover: hover)and (pointer: fine){.bal-hint__icon:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-hint-content-background:var(--bal-color-grey-2);--bal-hint-content-border-color:var(--bal-color-grey-2);--bal-hint-icon-color-hover:var(--bal-color-light-blue-5)}.bal-hint{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block}.bal-hint__icon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;z-index:var(--bal-z-index-popup) !important}.bal-hint__icon:hover svg,.bal-hint__icon:hover g,.bal-hint__icon:hover path,.bal-hint__icon:hover circle{fill:var(--bal-hint-icon-color-hover)}.bal-hint .bal-popup__container{z-index:var(--bal-z-index-popup);background:var(--bal-hint-content-background);border:8px solid var(--bal-hint-content-border-color)}.bal-hint__content{width:auto;max-width:30rem;min-width:16.25rem;display:-ms-flexbox;display:flex;gap:1.5rem;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 768px){.bal-hint__content{padding:1.25rem;min-height:100%}.bal-hint__content>div{-ms-flex:1;flex:1}}.bal-hint__content__title{display:block;margin-bottom:1rem}.bal-hint__content__title__heading{font-family:var(--bal-title-font-family);font-weight:var(--bal-title-font-weight);font-size:var(--bal-text-size-x-large);line-height:var(--bal-line-height-x-large)}@media screen and (min-width: 769px),print{.bal-hint__content__title__heading{font-size:var(--bal-text-size-x-large-tablet);line-height:var(--bal-line-height-tablet-x-large)}}@media screen and (min-width: 1024px){.bal-hint__content__title__heading{font-size:var(--bal-text-size-x-large-desktop);line-height:var(--bal-line-height-desktop-x-large)}}@media screen and (min-width: 769px),print{.bal-hint__content__buttons--is-hidden-desktop{display:none !important}}.bal-hint__content__text__field{font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);line-height:var(--bal-text-line-height-text);font-size:var(--bal-text-size-normal)}.bal-hint__overlay__content{position:fixed;display:none;overflow:auto;top:0;left:0;right:0;bottom:0;z-index:var(--bal-z-index-popup)}.bal-hint__overlay__content--active{display:block}";const g=class{constructor(e){t(this,e)}render(){const t=s.block("hint").element("content").element("text"),n=t.element("field");return e(o,{key:"24898db6c3c51d19a7df6552a2e0f370c8812f95",class:Object.assign({},t.class())},e("p",{key:"2ff7501b81213d1a553f2a9a9c98df6d9577e5e8",class:Object.assign({},n.class())},e("slot",{key:"e2f5ecd78ad99fc53713576807011f39884ad7fb"})))}},y=class{constructor(e){t(this,e)}render(){const t=s.block("hint").element("content").element("title"),n=t.element("heading");return e(o,{key:"6304fd03629ecdbaeff48777da6e9950a02e02bf",class:Object.assign({},t.class())},e("h3",{key:"5cdfc4c2319f7b8b17f23d02aeae7cbc534134af",class:Object.assign({},n.class())},e("span",{key:"6e5ce498f0574fe356778d87fb98f59b446bd8e3"},e("slot",{key:"9604fad3ee38908e2a51ab295e7d17dad7b3d7fc"}))))}};var w="top",x="bottom",j="right",O="left",k="auto",z=[w,x,j,O],L="start",B="end",E="viewport",M="popper",C=z.reduce((function(t,e){return t.concat([e+"-"+L,e+"-"+B])}),[]),P=[].concat(z,[k]).reduce((function(t,e){return t.concat([e,e+"-"+L,e+"-"+B])}),[]),W=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function A(t){return t?(t.nodeName||"").toLowerCase():null}function F(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function S(t){return t instanceof F(t).Element||t instanceof Element}function D(t){return t instanceof F(t).HTMLElement||t instanceof HTMLElement}function R(t){return"undefined"!=typeof ShadowRoot&&(t instanceof F(t).ShadowRoot||t instanceof ShadowRoot)}function q(t){return t.split("-")[0]}var I=Math.max,T=Math.min,$=Math.round;function H(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function U(){return!/^((?!chrome|android).)*safari/i.test(H())}function N(t,e,o){void 0===e&&(e=!1),void 0===o&&(o=!1);var n=t.getBoundingClientRect(),i=1,r=1;e&&D(t)&&(i=t.offsetWidth>0&&$(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&$(n.height)/t.offsetHeight||1);var a=(S(t)?F(t):window).visualViewport,s=!U()&&o,c=(n.left+(s&&a?a.offsetLeft:0))/i,l=(n.top+(s&&a?a.offsetTop:0))/r,p=n.width/i,d=n.height/r;return{width:p,height:d,top:l,right:c+p,bottom:l+d,left:c,x:c,y:l}}function V(t){var e=N(t),o=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-o)<=1&&(o=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:n}}function G(t,e){var o=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(o&&R(o)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function K(t){return F(t).getComputedStyle(t)}function Q(t){return["table","td","th"].indexOf(A(t))>=0}function J(t){return((S(t)?t.ownerDocument:t.document)||window.document).documentElement}function X(t){return"html"===A(t)?t:t.assignedSlot||t.parentNode||(R(t)?t.host:null)||J(t)}function Z(t){return D(t)&&"fixed"!==K(t).position?t.offsetParent:null}function Y(t){for(var e=F(t),o=Z(t);o&&Q(o)&&"static"===K(o).position;)o=Z(o);return o&&("html"===A(o)||"body"===A(o)&&"static"===K(o).position)?e:o||function(t){var e=/firefox/i.test(H());if(/Trident/i.test(H())&&D(t)&&"fixed"===K(t).position)return null;var o=X(t);for(R(o)&&(o=o.host);D(o)&&["html","body"].indexOf(A(o))<0;){var n=K(o);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return o;o=o.parentNode}return null}(t)||e}function tt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function et(t,e,o){return I(t,T(e,o))}function ot(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function nt(t,e){return e.reduce((function(e,o){return e[o]=t,e}),{})}function it(t){return t.split("-")[1]}var rt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function at(t){var e,o=t.popper,n=t.popperRect,i=t.placement,r=t.variation,a=t.offsets,s=t.position,c=t.gpuAcceleration,l=t.adaptive,p=t.roundOffsets,d=t.isFixed,h=a.x,b=void 0===h?0:h,u=a.y,f=void 0===u?0:u,v="function"==typeof p?p({x:b,y:f}):{x:b,y:f};b=v.x,f=v.y;var m=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),g=O,y=w,k=window;if(l){var z=Y(o),L="clientHeight",E="clientWidth";z===F(o)&&"static"!==K(z=J(o)).position&&"absolute"===s&&(L="scrollHeight",E="scrollWidth"),(i===w||(i===O||i===j)&&r===B)&&(y=x,f-=(d&&z===k&&k.visualViewport?k.visualViewport.height:z[L])-n.height,f*=c?1:-1),i!==O&&(i!==w&&i!==x||r!==B)||(g=j,b-=(d&&z===k&&k.visualViewport?k.visualViewport.width:z[E])-n.width,b*=c?1:-1)}var M,C=Object.assign({position:s},l&&rt),P=!0===p?function(t,e){var o=t.y,n=e.devicePixelRatio||1;return{x:$(t.x*n)/n||0,y:$(o*n)/n||0}}({x:b,y:f},F(o)):{x:b,y:f};return b=P.x,f=P.y,Object.assign({},C,c?((M={})[y]=_?"0":"",M[g]=m?"0":"",M.transform=(k.devicePixelRatio||1)<=1?"translate("+b+"px, "+f+"px)":"translate3d("+b+"px, "+f+"px, 0)",M):((e={})[y]=_?f+"px":"",e[g]=m?b+"px":"",e.transform="",e))}var st={passive:!0},ct={left:"right",right:"left",bottom:"top",top:"bottom"};function lt(t){return t.replace(/left|right|bottom|top/g,(function(t){return ct[t]}))}var pt={start:"end",end:"start"};function dt(t){return t.replace(/start|end/g,(function(t){return pt[t]}))}function ht(t){var e=F(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bt(t){return N(J(t)).left+ht(t).scrollLeft}function ut(t){var e=K(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function ft(t){return["html","body","#document"].indexOf(A(t))>=0?t.ownerDocument.body:D(t)&&ut(t)?t:ft(X(t))}function vt(t,e){var o;void 0===e&&(e=[]);var n=ft(t),i=n===(null==(o=t.ownerDocument)?void 0:o.body),r=F(n),a=i?[r].concat(r.visualViewport||[],ut(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(vt(X(a)))}function mt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function _t(t,e,o){return e===E?mt(function(t,e){var o=F(t),n=J(t),i=o.visualViewport,r=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){r=i.width,a=i.height;var l=U();(l||!l&&"fixed"===e)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:r,height:a,x:s+bt(t),y:c}}(t,o)):S(e)?function(t,e){var o=N(t,!1,"fixed"===e);return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}(e,o):mt(function(t){var e,o=J(t),n=ht(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=I(o.scrollWidth,o.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=I(o.scrollHeight,o.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+bt(t),c=-n.scrollTop;return"rtl"===K(i||o).direction&&(s+=I(o.clientWidth,i?i.clientWidth:0)-r),{width:r,height:a,x:s,y:c}}(J(t)))}function gt(t){var e,o=t.reference,n=t.element,i=t.placement,r=i?q(i):null,a=i?it(i):null,s=o.x+o.width/2-n.width/2,c=o.y+o.height/2-n.height/2;switch(r){case w:e={x:s,y:o.y-n.height};break;case x:e={x:s,y:o.y+o.height};break;case j:e={x:o.x+o.width,y:c};break;case O:e={x:o.x-n.width,y:c};break;default:e={x:o.x,y:o.y}}var l=r?tt(r):null;if(null!=l){var p="y"===l?"height":"width";switch(a){case L:e[l]=e[l]-(o[p]/2-n[p]/2);break;case B:e[l]=e[l]+(o[p]/2-n[p]/2)}}return e}function yt(t,e){void 0===e&&(e={});var o=e.placement,n=void 0===o?t.placement:o,i=e.strategy,r=void 0===i?t.strategy:i,a=e.boundary,s=void 0===a?"clippingParents":a,c=e.rootBoundary,l=void 0===c?E:c,p=e.elementContext,d=void 0===p?M:p,h=e.altBoundary,b=void 0!==h&&h,u=e.padding,f=void 0===u?0:u,v=ot("number"!=typeof f?f:nt(f,z)),m=t.rects.popper,_=t.elements[b?d===M?"reference":M:d],g=function(t,e,o,n){var i="clippingParents"===e?function(t){var e=vt(X(t)),o=["absolute","fixed"].indexOf(K(t).position)>=0&&D(t)?Y(t):t;return S(o)?e.filter((function(t){return S(t)&&G(t,o)&&"body"!==A(t)})):[]}(t):[].concat(e),r=[].concat(i,[o]),a=r.reduce((function(e,o){var i=_t(t,o,n);return e.top=I(i.top,e.top),e.right=T(i.right,e.right),e.bottom=T(i.bottom,e.bottom),e.left=I(i.left,e.left),e}),_t(t,r[0],n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(S(_)?_:_.contextElement||J(t.elements.popper),s,l,r),y=N(t.elements.reference),O=gt({reference:y,element:m,placement:n}),k=mt(Object.assign({},m,O)),L=d===M?k:y,B={top:g.top-L.top+v.top,bottom:L.bottom-g.bottom+v.bottom,left:g.left-L.left+v.left,right:L.right-g.right+v.right},C=t.modifiersData.offset;if(d===M&&C){var P=C[n];Object.keys(B).forEach((function(t){var e=[j,x].indexOf(t)>=0?1:-1,o=[w,x].indexOf(t)>=0?"y":"x";B[t]+=P[o]*e}))}return B}function wt(t,e){void 0===e&&(e={});var o=e.boundary,n=e.rootBoundary,i=e.padding,r=e.flipVariations,a=e.allowedAutoPlacements,s=void 0===a?P:a,c=it(e.placement),l=c?r?C:C.filter((function(t){return it(t)===c})):z,p=l.filter((function(t){return s.indexOf(t)>=0}));0===p.length&&(p=l);var d=p.reduce((function(e,r){return e[r]=yt(t,{placement:r,boundary:o,rootBoundary:n,padding:i})[q(r)],e}),{});return Object.keys(d).sort((function(t,e){return d[t]-d[e]}))}var xt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,o=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=o.mainAxis,r=void 0===i||i,a=o.altAxis,s=void 0===a||a,c=o.fallbackPlacements,l=o.padding,p=o.boundary,d=o.rootBoundary,h=o.altBoundary,b=o.flipVariations,u=void 0===b||b,f=o.allowedAutoPlacements,v=e.options.placement,m=q(v),_=c||(m!==v&&u?function(t){if(q(t)===k)return[];var e=lt(t);return[dt(t),e,dt(e)]}(v):[lt(v)]),g=[v].concat(_).reduce((function(t,o){return t.concat(q(o)===k?wt(e,{placement:o,boundary:p,rootBoundary:d,padding:l,flipVariations:u,allowedAutoPlacements:f}):o)}),[]),y=e.rects.reference,z=e.rects.popper,B=new Map,E=!0,M=g[0],C=0;C<g.length;C++){var P=g[C],W=q(P),A=it(P)===L,F=[w,x].indexOf(W)>=0,S=F?"width":"height",D=yt(e,{placement:P,boundary:p,rootBoundary:d,altBoundary:h,padding:l}),R=F?A?j:O:A?x:w;y[S]>z[S]&&(R=lt(R));var I=lt(R),T=[];if(r&&T.push(D[W]<=0),s&&T.push(D[R]<=0,D[I]<=0),T.every((function(t){return t}))){M=P,E=!1;break}B.set(P,T)}if(E)for(var $=function(t){var e=g.find((function(e){var o=B.get(e);if(o)return o.slice(0,t).every((function(t){return t}))}));if(e)return M=e,"break"},H=u?3:1;H>0&&"break"!==$(H);H--);e.placement!==M&&(e.modifiersData[n]._skip=!0,e.placement=M,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function jt(t,e,o){return void 0===o&&(o={x:0,y:0}),{top:t.top-e.height-o.y,right:t.right-e.width+o.x,bottom:t.bottom-e.height+o.y,left:t.left-e.width-o.x}}function Ot(t){return[w,j,x,O].some((function(e){return t[e]>=0}))}function kt(t,e,o){void 0===o&&(o=!1);var n,i,r=D(e),a=D(e)&&function(t){var e=t.getBoundingClientRect(),o=$(e.width)/t.offsetWidth||1,n=$(e.height)/t.offsetHeight||1;return 1!==o||1!==n}(e),s=J(e),c=N(t,a,o),l={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(r||!r&&!o)&&(("body"!==A(e)||ut(s))&&(l=(n=e)!==F(n)&&D(n)?{scrollLeft:(i=n).scrollLeft,scrollTop:i.scrollTop}:ht(n)),D(e)?((p=N(e,!0)).x+=e.clientLeft,p.y+=e.clientTop):s&&(p.x=bt(s))),{x:c.left+l.scrollLeft-p.x,y:c.top+l.scrollTop-p.y,width:c.width,height:c.height}}function zt(t){var e=new Map,o=new Set,n=[];function i(t){o.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!o.has(t)){var n=e.get(t);n&&i(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){o.has(t.name)||i(t)})),n}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function Bt(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Et(t){void 0===t&&(t={});var e=t.defaultModifiers,o=void 0===e?[]:e,n=t.defaultOptions,i=void 0===n?Lt:n;return function(t,e,n){void 0===n&&(n=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Lt,i),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],l=!1,p={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,r),s.scrollParents={reference:S(t)?vt(t):t.contextElement?vt(t.contextElement):[],popper:vt(e)};var a,l,h=function(t){var e=zt(t);return W.reduce((function(t,o){return t.concat(e.filter((function(t){return t.phase===o})))}),[])}((a=[].concat(o,s.options.modifiers),l=a.reduce((function(t,e){var o=t[e.name];return t[e.name]=o?Object.assign({},o,e,{options:Object.assign({},o.options,e.options),data:Object.assign({},o.data,e.data)}):e,t}),{}),Object.keys(l).map((function(t){return l[t]}))));return s.orderedModifiers=h.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var e=t.options,o=t.effect;if("function"==typeof o){var n=o({state:s,name:t.name,instance:p,options:void 0===e?{}:e});c.push(n||function(){})}})),p.update()},forceUpdate:function(){if(!l){var t=s.elements,e=t.reference,o=t.popper;if(Bt(e,o)){s.rects={reference:kt(e,Y(o),"fixed"===s.options.strategy),popper:V(o)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var i=s.orderedModifiers[n],r=i.fn,a=i.options;"function"==typeof r&&(s=r({state:s,options:void 0===a?{}:a,name:i.name,instance:p})||s)}else s.reset=!1,n=-1}}},update:(r=function(){return new Promise((function(t){p.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(r())}))}))),a}),destroy:function(){d(),l=!0}};if(!Bt(t,e))return p;function d(){c.forEach((function(t){return t()})),c=[]}return p.setOptions(n).then((function(t){!l&&n.onFirstUpdate&&n.onFirstUpdate(t)})),p}}var Mt=Et({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,o=t.instance,n=t.options,i=n.scroll,r=void 0===i||i,a=n.resize,s=void 0===a||a,c=F(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&l.forEach((function(t){t.addEventListener("scroll",o.update,st)})),s&&c.addEventListener("resize",o.update,st),function(){r&&l.forEach((function(t){t.removeEventListener("scroll",o.update,st)})),s&&c.removeEventListener("resize",o.update,st)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=gt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,o=t.options,n=o.gpuAcceleration,i=void 0===n||n,r=o.adaptive,a=void 0===r||r,s=o.roundOffsets,c=void 0===s||s,l={placement:q(e.placement),variation:it(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,at(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,at(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var o=e.styles[t]||{},n=e.attributes[t]||{},i=e.elements[t];D(i)&&A(i)&&(Object.assign(i.style,o),Object.keys(n).forEach((function(t){var e=n[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,o={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,o.popper),e.styles=o,e.elements.arrow&&Object.assign(e.elements.arrow.style,o.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:o[t]).reduce((function(t,e){return t[e]="",t}),{});D(n)&&A(n)&&(Object.assign(n.style,r),Object.keys(i).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,o=t.name,n=t.options.offset,i=void 0===n?[0,0]:n,r=P.reduce((function(t,o){return t[o]=function(t,e,o){var n=q(t),i=[O,w].indexOf(n)>=0?-1:1,r="function"==typeof o?o(Object.assign({},e,{placement:t})):o,a=r[0],s=r[1];return a=a||0,s=(s||0)*i,[O,j].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(o,e.rects,i),t}),{}),a=r[e.placement],s=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=s),e.modifiersData[o]=r}},xt,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,o=t.options,n=t.name,i=o.mainAxis,r=void 0===i||i,a=o.altAxis,s=void 0!==a&&a,c=o.tether,l=void 0===c||c,p=o.tetherOffset,d=void 0===p?0:p,h=yt(e,{boundary:o.boundary,rootBoundary:o.rootBoundary,padding:o.padding,altBoundary:o.altBoundary}),b=q(e.placement),u=it(e.placement),f=!u,v=tt(b),m="x"===v?"y":"x",_=e.modifiersData.popperOffsets,g=e.rects.reference,y=e.rects.popper,k="function"==typeof d?d(Object.assign({},e.rects,{placement:e.placement})):d,z="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,E={x:0,y:0};if(_){if(r){var M,C="y"===v?w:O,P="y"===v?x:j,W="y"===v?"height":"width",A=_[v],F=A+h[C],S=A-h[P],D=l?-y[W]/2:0,R=u===L?g[W]:y[W],$=u===L?-y[W]:-g[W],H=e.elements.arrow,U=l&&H?V(H):{width:0,height:0},N=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=N[C],K=N[P],Q=et(0,g[W],U[W]),J=f?g[W]/2-D-Q-G-z.mainAxis:R-Q-G-z.mainAxis,X=f?-g[W]/2+D+Q+K+z.mainAxis:$+Q+K+z.mainAxis,Z=e.elements.arrow&&Y(e.elements.arrow),ot=null!=(M=null==B?void 0:B[v])?M:0,nt=A+X-ot,rt=et(l?T(F,A+J-ot-(Z?"y"===v?Z.clientTop||0:Z.clientLeft||0:0)):F,A,l?I(S,nt):S);_[v]=rt,E[v]=rt-A}if(s){var at,st=_[m],ct="y"===m?"height":"width",lt=st+h["x"===v?w:O],pt=st-h["x"===v?x:j],dt=-1!==[w,O].indexOf(b),ht=null!=(at=null==B?void 0:B[m])?at:0,bt=dt?lt:st-g[ct]-y[ct]-ht+z.altAxis,ut=dt?st+g[ct]+y[ct]-ht-z.altAxis:pt,ft=l&&dt?function(t,e,o){var n=et(t,e,o);return n>o?o:n}(bt,st,ut):et(l?bt:lt,st,l?ut:pt);_[m]=ft,E[m]=ft-st}e.modifiersData[n]=E}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,o=t.state,n=t.name,i=t.options,r=o.elements.arrow,a=o.modifiersData.popperOffsets,s=q(o.placement),c=tt(s),l=[O,j].indexOf(s)>=0?"height":"width";if(r&&a){var p=function(t,e){return ot("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:nt(t,z))}(i.padding,o),d=V(r),h="y"===c?w:O,b="y"===c?x:j,u=o.rects.reference[l]+o.rects.reference[c]-a[c]-o.rects.popper[l],f=a[c]-o.rects.reference[c],v=Y(r),m=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,_=m/2-d[l]/2+(u/2-f/2),g=et(p[h],_,m-d[l]-p[b]);o.modifiersData[n]=((e={})[c]=g,e.centerOffset=g-_,e)}},effect:function(t){var e=t.state,o=t.options.element,n=void 0===o?"[data-popper-arrow]":o;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&G(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,o=t.name,n=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,a=yt(e,{elementContext:"reference"}),s=yt(e,{altBoundary:!0}),c=jt(a,n),l=jt(s,i,r),p=Ot(c),d=Ot(l);e.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:p,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d})}}]});const Ct=class{constructor(e){t(this,e),this.balChange=i(this,"balChange"),this.balWillAnimate=i(this,"balWillAnimate"),this.balDidAnimate=i(this,"balDidAnimate"),this.balPopoverPrepare=i(this,"balPopoverPrepare"),this.popoverId="bal-po-"+Pt++,this.isTouch=p.isTouch,this.isInMainNav=!1,this.backdropHeight=0,this.autoTrigger=!1,this.hint=!1,this.hover=!1,this.arrow=!1,this.backdrop=!1,this.tooltip=!1,this.offsetX=0,this.offsetY=0,this.padding=0,this.position="bottom-start",this.active=!1,this.mobileTop=!1}createLogger(t){this.log=t}async activeChanged(t,e){!0===t&&t!==e?this.present({force:!0}):this.dismiss({force:!0})}componentWillLoad(){this.backdropHeight=this.getBackdropHeight(),this.triggerElement.setAttribute("aria-haspopup","true")}componentDidLoad(){if(this.isInMainNav=null!==this.footMobileNav,this.triggerElement&&this.menuElement){this.popperInstance=Mt(this.triggerElement,this.menuElement,{placement:this.tooltip?"bottom":this.position,modifiers:[this.modifierOffset,this.modifierPreventOverflow]});let t=[],e=[];this.autoTrigger&&(t=["click"]),this.tooltip&&(t=["mouseenter","focus"],e=["mouseleave","blur"]),t.forEach((t=>{this.triggerElement&&this.triggerElement.addEventListener(t,"click"===t?()=>this.toggle():()=>this.present())})),e.forEach((t=>{this.triggerElement&&this.triggerElement.addEventListener(t,(()=>this.dismiss()))}))}}componentDidRender(){this.popperInstance&&(this.popperInstance.setOptions((t=>Object.assign(Object.assign({},t),{placement:this.tooltip?"bottom":this.position,modifiers:[...t.modifiers.filter((t=>"offset"!==t.name&&"preventOverflow"!==t.name)),this.modifierOffset,this.modifierPreventOverflow]}))),this.updatePopper()),f.isSafari&&!this.isTouch&&(clearTimeout(this.componentDidRenderTimer),this.componentDidRenderTimer=setTimeout((()=>{var t;const e=null===(t=this.el)||void 0===t?void 0:t.clientWidth;this.el.style.maxWidth=e?`${e}px`:"initial"})))}handlePopoverPrepare(t){this.popoverId!==t.detail&&this.dismiss()}async clickOnOutside(t){var e;this.active&&(this.el.contains(t.target)||(this.active=!1),(null===(e=this.backdropElement)||void 0===e?void 0:e.isEqualNode(t.target))&&(this.active=!1))}handleKeyUp(t){!this.active||"Escape"!==t.key&&"Esc"!==t.key||(t.preventDefault(),this.dismiss())}async tabOutside(t){"Tab"===t.key&&!this.el.contains(document.activeElement)&&this.active&&await this.toggle()}breakpointListener(t){this.isTouch=t.touch,this.isInMainNav=null!==this.footMobileNav,this.backdropHeight=this.getBackdropHeight()}async present(t={force:!1}){var e,o;this.active&&!t.force||(null===(e=this.menuElement)||void 0===e||e.setAttribute("data-show",""),null===(o=this.menuElement)||void 0===o||o.setAttribute("aria-hidden","false"),this.menuInnerElement&&this.menuInnerElement.scrollTo(0,0),this.balPopoverPrepare.emit(this.popoverId),this.balWillAnimate.emit(this.active),this.active=!0,this.popperInstance.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:!0}]}))),this.updatePopper(),this.balChange.emit(this.active),this.balDidAnimate.emit(this.active))}async dismiss(t={force:!1}){var e,o;(this.active||t.force)&&(null===(e=this.menuElement)||void 0===e||e.removeAttribute("data-show"),null===(o=this.menuElement)||void 0===o||o.setAttribute("aria-hidden","true"),this.balWillAnimate.emit(this.active),this.active=!1,this.popperInstance.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:!1}]}))),this.updatePopper(),this.balChange.emit(this.active),this.balDidAnimate.emit(this.active))}async toggle(t={force:!1}){this.active?await this.dismiss(t):await this.present(t)}get footMobileNav(){return this.el.closest('[slot="meta-mobile-foot"]')}get modifierOffset(){return{name:"offset",options:{offset:[this.offsetX,this.offsetY+(this.tooltip||this.arrow?8:0)]}}}get modifierPreventOverflow(){return{name:"preventOverflow",options:{padding:this.arrow||this.tooltip?8:this.padding,altAxis:!0}}}get triggerElement(){return this.el.querySelector("[bal-popover-trigger]")}get menuElement(){return this.el.querySelector("bal-popover-content")}get menuInnerElement(){return this.el.querySelector(".bal-popover__content__inner")}getBackdropHeight(){return f.hasWindow?this.isInMainNav?(window.innerHeight-(this.isTouch?64:48))/16:window.innerHeight/16:0}updatePopper(){this.popperInstance.update()}render(){const t=s.block("popover");return e(o,{key:"f4b281b4ca30365ec4b279c3e219a0109edc173d","aria-presented":this.active?"true":null,"data-id":this.popoverId,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("active").class(this.active)),t.modifier("tooltip").class(this.tooltip)),t.modifier("arrow").class(this.arrow)),t.modifier("hint").class(this.hint)),t.modifier("backdrop").class(this.backdrop))},!this.mobileTop&&e("div",{key:"d40df31685649965a301ada5e1c7e7f2a629596c",ref:t=>{this.backdropElement=t},class:Object.assign({},t.element("backdrop").class(this.backdrop&&this.active)),style:{"--bal-popover-backdrop-height":`${this.backdropHeight}rem`}}),e("slot",{key:"04ec4d9a6c214d1c14a436906e80dc721349ab78"}))}get el(){return n(this)}static get watchers(){return{active:["activeChanged"]}}};r([v("bal-popover"),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],Ct.prototype,"createLogger",null),r([b(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],Ct.prototype,"breakpointListener",null);let Pt=0;Ct.style='.bal-popover__backdrop{bottom:0;left:0;position:absolute;right:0;top:0}:root{--bal-popover-backdrop-height:100vh;--bal-popover-content-height-top-nav:100vh;--bal-popover-backdrop-background:var(--bal-color-primary-6);--bal-popover-backdrop-opacity:.8;--bal-popover-content-shadow:var(--bal-shadow-normal);--bal-popover-content-background:var(--bal-color-white);--bal-popover-content-background-grey:var(--bal-color-grey-2);--bal-popover-tooltip-background:var(--bal-color-primary-6);--bal-popover-tooltip-color:var(--bal-color-white);--bal-popover-tooltip-font-family:var(--bal-font-family-text);--bal-popover-tooltip-font-size:var(--bal-text-size-small)}.bal-popover{display:block}@media screen and (max-width: 768px){.bal-popover .bal-popover__content{min-width:100vw !important}.bal-popover .bal-select__popover{min-width:100% !important}}.bal-popover--active .bal-popover__content{display:block}.bal-popover--backdrop [bal-popover-trigger]{z-index:calc(var(--bal-z-index-popup) - 1);position:relative}@media screen and (max-width: 768px){.bal-popover--hint .bal-popover__content{min-height:100vh}.bal-popover--hint .bal-popover__content .bal-popover__content__inner{min-height:100vh}}@media screen and (min-width: 769px),print{.bal-popover--hint .bal-popover__content{max-width:20rem}}@media screen and (min-width: 1024px){.bal-popover--hint .bal-popover__content{max-width:30rem}}.bal-popover__backdrop{z-index:calc(var(--bal-z-index-popup) - 2);position:fixed;background:var(--bal-popover-backdrop-background);opacity:var(--bal-popover-backdrop-opacity);height:var(--bal-popover-backdrop-height);width:100vw}.bal-popover__content{display:none;z-index:var(--bal-z-index-popup);-webkit-box-shadow:var(--bal-popover-content-shadow);box-shadow:var(--bal-popover-content-shadow);background:var(--bal-popover-content-background);min-width:16.25rem}.bal-popover__content[data-show]{display:block}.bal-popover__content--expanded{min-width:100%}.bal-popover__content--no-shadow{-webkit-box-shadow:none;box-shadow:none}.bal-popover__content--radius-normal{border-radius:var(--bal-radius-normal)}.bal-popover__content--radius-large{border-radius:var(--bal-radius-large)}.bal-popover__content--radius-none{border-radius:0}.bal-popover__content--radius-normal-bottom-none{border-radius:var(--bal-radius-normal);border-bottom-right-radius:0;border-bottom-left-radius:0}.bal-popover__content--radius-normal-top-none{border-radius:var(--bal-radius-normal);border-top-left-radius:0;border-top-right-radius:0}.bal-popover__content--radius-large-bottom-none{border-radius:var(--bal-radius-large);border-bottom-right-radius:0;border-bottom-left-radius:0}.bal-popover__content--radius-large-top-none{border-radius:var(--bal-radius-large);border-top-left-radius:0;border-top-right-radius:0}.bal-popover__content--on-top{border-top:1px solid var(--bal-color-grey-2);height:var(--bal-popover-content-height-top-nav);overflow-y:auto}.bal-popover__content--color-grey{background:var(--bal-popover-content-background-grey)}.bal-popover__content__inner{max-height:calc(100vh - 4.5rem);overflow:auto;padding:1rem}@media screen and (min-width: 769px),print{.bal-popover__content__inner{padding:1.5rem}}@media screen and (min-width: 1024px){.bal-popover__content__inner{max-height:calc(100vh - 8rem)}}.bal-popover__content--spaceless .bal-popover__content__inner{padding:0}.bal-popover__content [data-popper-arrow]{display:none}.bal-popover__content__arrow{visibility:hidden}.bal-popover__content__arrow [data-popper-arrow]{display:block}.bal-popover__content__arrow,.bal-popover__content__arrow:before{position:absolute;width:.5rem;height:.5rem;background:inherit}.bal-popover__content__arrow:before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}.bal-popover__content[data-popper-placement^=top]>.bal-popover__content__arrow{bottom:-0.25rem}.bal-popover__content[data-popper-placement^=bottom]>.bal-popover__content__arrow{top:-0.25rem}.bal-popover__content[data-popper-placement^=left]>.bal-popover__content__arrow{right:-0.25rem}.bal-popover__content[data-popper-placement^=right]>.bal-popover__content__arrow{left:-0.25rem}.bal-popover--arrow .bal-popover__content__arrow{display:block}.bal-popover--tooltip .bal-popover__content{min-width:unset;background:var(--bal-popover-tooltip-background)}.bal-popover--tooltip .bal-popover__content .bal-popover__content__inner{padding:var(--bal-space-x-small)}.bal-popover--tooltip .bal-popover__content .bal-popover__content__inner,.bal-popover--tooltip .bal-popover__content .bal-popover__content__inner p{color:var(--bal-popover-tooltip-color);font-family:var(--bal-popover-tooltip-font-family);font-size:var(--bal-popover-tooltip-font-size)}';const Wt=class{constructor(e){t(this,e),this.isTouch=p.isTouch,this.spaceless=!1,this.scrollable=0,this.contentWidth=0,this.contentMinWidth=0,this.color="white",this.expanded=!1,this.radius="normal",this.noShadow=!1,this.mobileTop=!1,this.contentHeightOnTop=0}breakpointListener(t){f.hasWindow&&(this.contentHeightOnTop=window.innerHeight-64)}get innerStyle(){let t={};return this.scrollable>0&&(t={"max-height":`${this.scrollable}px`,overflow:"auto"}),Object.assign({},t)}get contentStyle(){let t={},e={};const o={"--bal-popover-content-height-top-nav":this.contentHeightOnTop/16+"rem"};return this.contentWidth>0&&(t={"max-width":`${this.contentWidth}px`}),this.contentMinWidth>0&&(e={"min-width":`${this.contentMinWidth}px`}),Object.assign(Object.assign(Object.assign({},t),e),o)}componentWillLoad(){f.hasWindow&&(this.contentHeightOnTop=window.innerHeight-64)}render(){const t=s.block("popover").element("content");return e(o,{key:"bc08fb0e5736f9393c5396af4a84f1127b6e4c4e",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("expanded").class(this.expanded)),t.modifier("spaceless").class(this.spaceless)),t.modifier("no-shadow").class(this.noShadow)),t.modifier(`radius-${this.radius}`).class()),t.modifier(`color-${this.color}`).class()),t.modifier("on-top").class(this.mobileTop)),"data-testid":"bal-popover-content",role:"tooltip",style:this.contentStyle},e("div",{key:"f49ffa520c2e1cc95942973939eeff059900a9bc",class:Object.assign({},t.element("inner").class()),style:this.innerStyle},e("slot",{key:"3394b3dd89ce64a0d379e66b1ffb169e9f0401c4"})),e("div",{key:"5f75d67a77ae49667c3863b738bdc03d1dcb8121",class:Object.assign({},t.element("arrow").class()),"data-popper-arrow":!0}))}get el(){return n(this)}};r([b(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],Wt.prototype,"breakpointListener",null);export{m as bal_hint,g as bal_hint_text,y as bal_hint_title,Ct as bal_popover,Wt as bal_popover_content}
|
|
1
|
+
import{r as t,h as e,H as o,g as n,c as i}from"./p-BdVwMG9u.js";import{_ as r,a}from"./p-dfXERft2.js";import{B as s}from"./p-ByiN-QjD.js";import{B as c}from"./p-DOUIg6bI.js";import{p as l}from"./p-BG4j3FEv.js";import{b as p}from"./p-BzAHSyRi.js";import{a as d,i as h}from"./p-BERg8BNc.js";import{L as b}from"./p-P4eJh_wN.js";import{L as u}from"./p-B-L34nz8.js";import{b as f}from"./p-B1u-Mq75.js";import{L as v}from"./p-D7ovid3w.js";import"./p-xbSOW78W.js";import"./p-BFTU3MAI.js";import"./p-Ba5qjFjW.js";import"./p-D7M-7v58.js";import"./p-MBsgW7uz.js";import"./p-C20cwFWy.js";import"./p-DcKTia-G.js";const m=class{constructor(e){t(this,e),this.bodyScrollHandler=new c,this.componentId="bal-hint-"+_++,this.isActive=!1,this.innerCloseLabel="Close",this.isMobile=p.isMobile,this.small=!1,this.onPopupChange=t=>{this.isActive=t.detail,this.isMobile&&(this.isActive?this.bodyScrollHandler.disable():this.bodyScrollHandler.enable()),l(t)}}connectedCallback(){this.bodyScrollHandler.connect()}componentDidRender(){this.updateContent()}disconnectedCallback(){this.bodyScrollHandler.disconnect()}breakpointListener(t){const e=t.mobile;e!==this.isMobile&&(this.isActive=!1),this.isMobile=e}async configChanged(t){if(!this.closeLabel)switch(t.language){case"de":this.innerCloseLabel="Schliessen";break;case"fr":this.innerCloseLabel="Fermer";break;case"it":this.innerCloseLabel="Chiudere";break;case"nl":this.innerCloseLabel="Sluiten";break;default:this.innerCloseLabel="Close"}}async toggle(){this.isActive?this.dismiss():this.present()}async present(){this.popupElement&&this.popupElement.present(),this.isActive=!0}async dismiss(){this.popupElement&&this.popupElement.dismiss(),this.isActive=!1}updateContent(){this.hintContentEl&&this.slotWrapperEl&&(this.hintContentEl.innerHTML=this.slotWrapperEl.innerHTML)}render(){const t=s.block("hint"),n=t.element("icon"),i=t.element("content"),r=i.element("buttons"),a=()=>e("bal-icon",{class:Object.assign({},n.class()),"bal-popup":this.componentId,"data-testid":"bal-hint-trigger","aria-haspopup":"true",role:"button",name:"info-circle",tabindex:0,onKeyDown:t=>{(d(t)||h(t))&&(t.preventDefault(),this.toggle())}}),c=()=>e("div",{class:Object.assign({},i.class()),"data-testid":"bal-hint-content"},e("div",{ref:t=>this.hintContentEl=t}),e("bal-button-group",{class:Object.assign(Object.assign({},r.class()),r.modifier("is-hidden-desktop").class(this.small))},e("bal-button",{"data-testid":"bal-hint-close",color:"info",onClick:()=>this.dismiss()},this.closeLabel?this.closeLabel:this.innerCloseLabel)));return e(o,{class:Object.assign({},t.class())},e((()=>e("div",{class:Object.assign({},t.element("popup").class())},e(a,null),e("bal-popup",{id:this.componentId,placement:"right",closable:!0,ref:t=>this.popupElement=t,onBalChange:this.onPopupChange,variant:this.isMobile?"fullscreen":"popover",offset:this.isMobile?0:16},e("bal-popup-content",null,e(c,null))))),null),e("div",{ref:t=>this.slotWrapperEl=t,style:{display:"none"}},e("slot",null)))}get element(){return n(this)}};r([b(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],m.prototype,"breakpointListener",null),r([u(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",Promise)],m.prototype,"configChanged",null);let _=0;m.style="@media (hover: hover)and (pointer: fine){.bal-hint__icon:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-hint-content-background:var(--bal-color-grey-2);--bal-hint-content-border-color:var(--bal-color-grey-2);--bal-hint-icon-color-hover:var(--bal-color-light-blue-5)}.bal-hint{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block}.bal-hint__icon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;z-index:var(--bal-z-index-popup) !important}.bal-hint__icon:hover svg,.bal-hint__icon:hover g,.bal-hint__icon:hover path,.bal-hint__icon:hover circle{fill:var(--bal-hint-icon-color-hover)}.bal-hint .bal-popup__container{z-index:var(--bal-z-index-popup);background:var(--bal-hint-content-background);border:8px solid var(--bal-hint-content-border-color)}.bal-hint__content{width:auto;max-width:30rem;min-width:16.25rem;display:-ms-flexbox;display:flex;gap:1.5rem;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 768px){.bal-hint__content{padding:1.25rem;min-height:100%}.bal-hint__content>div{-ms-flex:1;flex:1}}.bal-hint__content__title{display:block;margin-bottom:1rem}.bal-hint__content__title__heading{font-family:var(--bal-title-font-family);font-weight:var(--bal-title-font-weight);font-size:var(--bal-text-size-x-large);line-height:var(--bal-line-height-x-large)}@media screen and (min-width: 769px),print{.bal-hint__content__title__heading{font-size:var(--bal-text-size-x-large-tablet);line-height:var(--bal-line-height-tablet-x-large)}}@media screen and (min-width: 1024px){.bal-hint__content__title__heading{font-size:var(--bal-text-size-x-large-desktop);line-height:var(--bal-line-height-desktop-x-large)}}@media screen and (min-width: 769px),print{.bal-hint__content__buttons--is-hidden-desktop{display:none !important}}.bal-hint__content__text__field{font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);line-height:var(--bal-text-line-height-text);font-size:var(--bal-text-size-normal)}.bal-hint__overlay__content{position:fixed;display:none;overflow:auto;top:0;left:0;right:0;bottom:0;z-index:var(--bal-z-index-popup)}.bal-hint__overlay__content--active{display:block}";const g=class{constructor(e){t(this,e)}render(){const t=s.block("hint").element("content").element("text"),n=t.element("field");return e(o,{key:"24898db6c3c51d19a7df6552a2e0f370c8812f95",class:Object.assign({},t.class())},e("p",{key:"2ff7501b81213d1a553f2a9a9c98df6d9577e5e8",class:Object.assign({},n.class())},e("slot",{key:"e2f5ecd78ad99fc53713576807011f39884ad7fb"})))}},y=class{constructor(e){t(this,e)}render(){const t=s.block("hint").element("content").element("title"),n=t.element("heading");return e(o,{key:"6304fd03629ecdbaeff48777da6e9950a02e02bf",class:Object.assign({},t.class())},e("h3",{key:"5cdfc4c2319f7b8b17f23d02aeae7cbc534134af",class:Object.assign({},n.class())},e("span",{key:"6e5ce498f0574fe356778d87fb98f59b446bd8e3"},e("slot",{key:"9604fad3ee38908e2a51ab295e7d17dad7b3d7fc"}))))}};var w="top",x="bottom",j="right",O="left",k="auto",z=[w,x,j,O],B="start",L="end",M="viewport",C="popper",E=z.reduce((function(t,e){return t.concat([e+"-"+B,e+"-"+L])}),[]),P=[].concat(z,[k]).reduce((function(t,e){return t.concat([e,e+"-"+B,e+"-"+L])}),[]),W=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function A(t){return t?(t.nodeName||"").toLowerCase():null}function F(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function S(t){return t instanceof F(t).Element||t instanceof Element}function D(t){return t instanceof F(t).HTMLElement||t instanceof HTMLElement}function R(t){return"undefined"!=typeof ShadowRoot&&(t instanceof F(t).ShadowRoot||t instanceof ShadowRoot)}function T(t){return t.split("-")[0]}var q=Math.max,I=Math.min,H=Math.round;function $(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function N(){return!/^((?!chrome|android).)*safari/i.test($())}function U(t,e,o){void 0===e&&(e=!1),void 0===o&&(o=!1);var n=t.getBoundingClientRect(),i=1,r=1;e&&D(t)&&(i=t.offsetWidth>0&&H(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&H(n.height)/t.offsetHeight||1);var a=(S(t)?F(t):window).visualViewport,s=!N()&&o,c=(n.left+(s&&a?a.offsetLeft:0))/i,l=(n.top+(s&&a?a.offsetTop:0))/r,p=n.width/i,d=n.height/r;return{width:p,height:d,top:l,right:c+p,bottom:l+d,left:c,x:c,y:l}}function G(t){var e=U(t),o=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-o)<=1&&(o=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:n}}function K(t,e){var o=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(o&&R(o)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function V(t){return F(t).getComputedStyle(t)}function J(t){return["table","td","th"].indexOf(A(t))>=0}function Q(t){return((S(t)?t.ownerDocument:t.document)||window.document).documentElement}function X(t){return"html"===A(t)?t:t.assignedSlot||t.parentNode||(R(t)?t.host:null)||Q(t)}function Y(t){return D(t)&&"fixed"!==V(t).position?t.offsetParent:null}function Z(t){for(var e=F(t),o=Y(t);o&&J(o)&&"static"===V(o).position;)o=Y(o);return o&&("html"===A(o)||"body"===A(o)&&"static"===V(o).position)?e:o||function(t){var e=/firefox/i.test($());if(/Trident/i.test($())&&D(t)&&"fixed"===V(t).position)return null;var o=X(t);for(R(o)&&(o=o.host);D(o)&&["html","body"].indexOf(A(o))<0;){var n=V(o);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return o;o=o.parentNode}return null}(t)||e}function tt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function et(t,e,o){return q(t,I(e,o))}function ot(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function nt(t,e){return e.reduce((function(e,o){return e[o]=t,e}),{})}function it(t){return t.split("-")[1]}var rt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function at(t){var e,o=t.popper,n=t.popperRect,i=t.placement,r=t.variation,a=t.offsets,s=t.position,c=t.gpuAcceleration,l=t.adaptive,p=t.roundOffsets,d=t.isFixed,h=a.x,b=void 0===h?0:h,u=a.y,f=void 0===u?0:u,v="function"==typeof p?p({x:b,y:f}):{x:b,y:f};b=v.x,f=v.y;var m=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),g=O,y=w,k=window;if(l){var z=Z(o),B="clientHeight",M="clientWidth";z===F(o)&&"static"!==V(z=Q(o)).position&&"absolute"===s&&(B="scrollHeight",M="scrollWidth"),(i===w||(i===O||i===j)&&r===L)&&(y=x,f-=(d&&z===k&&k.visualViewport?k.visualViewport.height:z[B])-n.height,f*=c?1:-1),i!==O&&(i!==w&&i!==x||r!==L)||(g=j,b-=(d&&z===k&&k.visualViewport?k.visualViewport.width:z[M])-n.width,b*=c?1:-1)}var C,E=Object.assign({position:s},l&&rt),P=!0===p?function(t,e){var o=t.y,n=e.devicePixelRatio||1;return{x:H(t.x*n)/n||0,y:H(o*n)/n||0}}({x:b,y:f},F(o)):{x:b,y:f};return b=P.x,f=P.y,Object.assign({},E,c?((C={})[y]=_?"0":"",C[g]=m?"0":"",C.transform=(k.devicePixelRatio||1)<=1?"translate("+b+"px, "+f+"px)":"translate3d("+b+"px, "+f+"px, 0)",C):((e={})[y]=_?f+"px":"",e[g]=m?b+"px":"",e.transform="",e))}var st={passive:!0},ct={left:"right",right:"left",bottom:"top",top:"bottom"};function lt(t){return t.replace(/left|right|bottom|top/g,(function(t){return ct[t]}))}var pt={start:"end",end:"start"};function dt(t){return t.replace(/start|end/g,(function(t){return pt[t]}))}function ht(t){var e=F(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bt(t){return U(Q(t)).left+ht(t).scrollLeft}function ut(t){var e=V(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function ft(t){return["html","body","#document"].indexOf(A(t))>=0?t.ownerDocument.body:D(t)&&ut(t)?t:ft(X(t))}function vt(t,e){var o;void 0===e&&(e=[]);var n=ft(t),i=n===(null==(o=t.ownerDocument)?void 0:o.body),r=F(n),a=i?[r].concat(r.visualViewport||[],ut(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(vt(X(a)))}function mt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function _t(t,e,o){return e===M?mt(function(t,e){var o=F(t),n=Q(t),i=o.visualViewport,r=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){r=i.width,a=i.height;var l=N();(l||!l&&"fixed"===e)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:r,height:a,x:s+bt(t),y:c}}(t,o)):S(e)?function(t,e){var o=U(t,!1,"fixed"===e);return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}(e,o):mt(function(t){var e,o=Q(t),n=ht(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(o.scrollWidth,o.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=q(o.scrollHeight,o.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+bt(t),c=-n.scrollTop;return"rtl"===V(i||o).direction&&(s+=q(o.clientWidth,i?i.clientWidth:0)-r),{width:r,height:a,x:s,y:c}}(Q(t)))}function gt(t){var e,o=t.reference,n=t.element,i=t.placement,r=i?T(i):null,a=i?it(i):null,s=o.x+o.width/2-n.width/2,c=o.y+o.height/2-n.height/2;switch(r){case w:e={x:s,y:o.y-n.height};break;case x:e={x:s,y:o.y+o.height};break;case j:e={x:o.x+o.width,y:c};break;case O:e={x:o.x-n.width,y:c};break;default:e={x:o.x,y:o.y}}var l=r?tt(r):null;if(null!=l){var p="y"===l?"height":"width";switch(a){case B:e[l]=e[l]-(o[p]/2-n[p]/2);break;case L:e[l]=e[l]+(o[p]/2-n[p]/2)}}return e}function yt(t,e){void 0===e&&(e={});var o=e.placement,n=void 0===o?t.placement:o,i=e.strategy,r=void 0===i?t.strategy:i,a=e.boundary,s=void 0===a?"clippingParents":a,c=e.rootBoundary,l=void 0===c?M:c,p=e.elementContext,d=void 0===p?C:p,h=e.altBoundary,b=void 0!==h&&h,u=e.padding,f=void 0===u?0:u,v=ot("number"!=typeof f?f:nt(f,z)),m=t.rects.popper,_=t.elements[b?d===C?"reference":C:d],g=function(t,e,o,n){var i="clippingParents"===e?function(t){var e=vt(X(t)),o=["absolute","fixed"].indexOf(V(t).position)>=0&&D(t)?Z(t):t;return S(o)?e.filter((function(t){return S(t)&&K(t,o)&&"body"!==A(t)})):[]}(t):[].concat(e),r=[].concat(i,[o]),a=r.reduce((function(e,o){var i=_t(t,o,n);return e.top=q(i.top,e.top),e.right=I(i.right,e.right),e.bottom=I(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),_t(t,r[0],n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(S(_)?_:_.contextElement||Q(t.elements.popper),s,l,r),y=U(t.elements.reference),O=gt({reference:y,element:m,placement:n}),k=mt(Object.assign({},m,O)),B=d===C?k:y,L={top:g.top-B.top+v.top,bottom:B.bottom-g.bottom+v.bottom,left:g.left-B.left+v.left,right:B.right-g.right+v.right},E=t.modifiersData.offset;if(d===C&&E){var P=E[n];Object.keys(L).forEach((function(t){var e=[j,x].indexOf(t)>=0?1:-1,o=[w,x].indexOf(t)>=0?"y":"x";L[t]+=P[o]*e}))}return L}function wt(t,e){void 0===e&&(e={});var o=e.boundary,n=e.rootBoundary,i=e.padding,r=e.flipVariations,a=e.allowedAutoPlacements,s=void 0===a?P:a,c=it(e.placement),l=c?r?E:E.filter((function(t){return it(t)===c})):z,p=l.filter((function(t){return s.indexOf(t)>=0}));0===p.length&&(p=l);var d=p.reduce((function(e,r){return e[r]=yt(t,{placement:r,boundary:o,rootBoundary:n,padding:i})[T(r)],e}),{});return Object.keys(d).sort((function(t,e){return d[t]-d[e]}))}var xt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,o=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=o.mainAxis,r=void 0===i||i,a=o.altAxis,s=void 0===a||a,c=o.fallbackPlacements,l=o.padding,p=o.boundary,d=o.rootBoundary,h=o.altBoundary,b=o.flipVariations,u=void 0===b||b,f=o.allowedAutoPlacements,v=e.options.placement,m=T(v),_=c||(m!==v&&u?function(t){if(T(t)===k)return[];var e=lt(t);return[dt(t),e,dt(e)]}(v):[lt(v)]),g=[v].concat(_).reduce((function(t,o){return t.concat(T(o)===k?wt(e,{placement:o,boundary:p,rootBoundary:d,padding:l,flipVariations:u,allowedAutoPlacements:f}):o)}),[]),y=e.rects.reference,z=e.rects.popper,L=new Map,M=!0,C=g[0],E=0;E<g.length;E++){var P=g[E],W=T(P),A=it(P)===B,F=[w,x].indexOf(W)>=0,S=F?"width":"height",D=yt(e,{placement:P,boundary:p,rootBoundary:d,altBoundary:h,padding:l}),R=F?A?j:O:A?x:w;y[S]>z[S]&&(R=lt(R));var q=lt(R),I=[];if(r&&I.push(D[W]<=0),s&&I.push(D[R]<=0,D[q]<=0),I.every((function(t){return t}))){C=P,M=!1;break}L.set(P,I)}if(M)for(var H=function(t){var e=g.find((function(e){var o=L.get(e);if(o)return o.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},$=u?3:1;$>0&&"break"!==H($);$--);e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function jt(t,e,o){return void 0===o&&(o={x:0,y:0}),{top:t.top-e.height-o.y,right:t.right-e.width+o.x,bottom:t.bottom-e.height+o.y,left:t.left-e.width-o.x}}function Ot(t){return[w,j,x,O].some((function(e){return t[e]>=0}))}function kt(t,e,o){void 0===o&&(o=!1);var n,i,r=D(e),a=D(e)&&function(t){var e=t.getBoundingClientRect(),o=H(e.width)/t.offsetWidth||1,n=H(e.height)/t.offsetHeight||1;return 1!==o||1!==n}(e),s=Q(e),c=U(t,a,o),l={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(r||!r&&!o)&&(("body"!==A(e)||ut(s))&&(l=(n=e)!==F(n)&&D(n)?{scrollLeft:(i=n).scrollLeft,scrollTop:i.scrollTop}:ht(n)),D(e)?((p=U(e,!0)).x+=e.clientLeft,p.y+=e.clientTop):s&&(p.x=bt(s))),{x:c.left+l.scrollLeft-p.x,y:c.top+l.scrollTop-p.y,width:c.width,height:c.height}}function zt(t){var e=new Map,o=new Set,n=[];function i(t){o.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!o.has(t)){var n=e.get(t);n&&i(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){o.has(t.name)||i(t)})),n}var Bt={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Mt(t){void 0===t&&(t={});var e=t.defaultModifiers,o=void 0===e?[]:e,n=t.defaultOptions,i=void 0===n?Bt:n;return function(t,e,n){void 0===n&&(n=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Bt,i),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],l=!1,p={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,r),s.scrollParents={reference:S(t)?vt(t):t.contextElement?vt(t.contextElement):[],popper:vt(e)};var a,l,h=function(t){var e=zt(t);return W.reduce((function(t,o){return t.concat(e.filter((function(t){return t.phase===o})))}),[])}((a=[].concat(o,s.options.modifiers),l=a.reduce((function(t,e){var o=t[e.name];return t[e.name]=o?Object.assign({},o,e,{options:Object.assign({},o.options,e.options),data:Object.assign({},o.data,e.data)}):e,t}),{}),Object.keys(l).map((function(t){return l[t]}))));return s.orderedModifiers=h.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var e=t.options,o=t.effect;if("function"==typeof o){var n=o({state:s,name:t.name,instance:p,options:void 0===e?{}:e});c.push(n||function(){})}})),p.update()},forceUpdate:function(){if(!l){var t=s.elements,e=t.reference,o=t.popper;if(Lt(e,o)){s.rects={reference:kt(e,Z(o),"fixed"===s.options.strategy),popper:G(o)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var i=s.orderedModifiers[n],r=i.fn,a=i.options;"function"==typeof r&&(s=r({state:s,options:void 0===a?{}:a,name:i.name,instance:p})||s)}else s.reset=!1,n=-1}}},update:(r=function(){return new Promise((function(t){p.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(r())}))}))),a}),destroy:function(){d(),l=!0}};if(!Lt(t,e))return p;function d(){c.forEach((function(t){return t()})),c=[]}return p.setOptions(n).then((function(t){!l&&n.onFirstUpdate&&n.onFirstUpdate(t)})),p}}var Ct=Mt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,o=t.instance,n=t.options,i=n.scroll,r=void 0===i||i,a=n.resize,s=void 0===a||a,c=F(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&l.forEach((function(t){t.addEventListener("scroll",o.update,st)})),s&&c.addEventListener("resize",o.update,st),function(){r&&l.forEach((function(t){t.removeEventListener("scroll",o.update,st)})),s&&c.removeEventListener("resize",o.update,st)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=gt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,o=t.options,n=o.gpuAcceleration,i=void 0===n||n,r=o.adaptive,a=void 0===r||r,s=o.roundOffsets,c=void 0===s||s,l={placement:T(e.placement),variation:it(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,at(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,at(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var o=e.styles[t]||{},n=e.attributes[t]||{},i=e.elements[t];D(i)&&A(i)&&(Object.assign(i.style,o),Object.keys(n).forEach((function(t){var e=n[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,o={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,o.popper),e.styles=o,e.elements.arrow&&Object.assign(e.elements.arrow.style,o.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:o[t]).reduce((function(t,e){return t[e]="",t}),{});D(n)&&A(n)&&(Object.assign(n.style,r),Object.keys(i).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,o=t.name,n=t.options.offset,i=void 0===n?[0,0]:n,r=P.reduce((function(t,o){return t[o]=function(t,e,o){var n=T(t),i=[O,w].indexOf(n)>=0?-1:1,r="function"==typeof o?o(Object.assign({},e,{placement:t})):o,a=r[0],s=r[1];return a=a||0,s=(s||0)*i,[O,j].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(o,e.rects,i),t}),{}),a=r[e.placement],s=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=s),e.modifiersData[o]=r}},xt,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,o=t.options,n=t.name,i=o.mainAxis,r=void 0===i||i,a=o.altAxis,s=void 0!==a&&a,c=o.tether,l=void 0===c||c,p=o.tetherOffset,d=void 0===p?0:p,h=yt(e,{boundary:o.boundary,rootBoundary:o.rootBoundary,padding:o.padding,altBoundary:o.altBoundary}),b=T(e.placement),u=it(e.placement),f=!u,v=tt(b),m="x"===v?"y":"x",_=e.modifiersData.popperOffsets,g=e.rects.reference,y=e.rects.popper,k="function"==typeof d?d(Object.assign({},e.rects,{placement:e.placement})):d,z="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),L=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(_){if(r){var C,E="y"===v?w:O,P="y"===v?x:j,W="y"===v?"height":"width",A=_[v],F=A+h[E],S=A-h[P],D=l?-y[W]/2:0,R=u===B?g[W]:y[W],H=u===B?-y[W]:-g[W],$=e.elements.arrow,N=l&&$?G($):{width:0,height:0},U=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=U[E],V=U[P],J=et(0,g[W],N[W]),Q=f?g[W]/2-D-J-K-z.mainAxis:R-J-K-z.mainAxis,X=f?-g[W]/2+D+J+V+z.mainAxis:H+J+V+z.mainAxis,Y=e.elements.arrow&&Z(e.elements.arrow),ot=null!=(C=null==L?void 0:L[v])?C:0,nt=A+X-ot,rt=et(l?I(F,A+Q-ot-(Y?"y"===v?Y.clientTop||0:Y.clientLeft||0:0)):F,A,l?q(S,nt):S);_[v]=rt,M[v]=rt-A}if(s){var at,st=_[m],ct="y"===m?"height":"width",lt=st+h["x"===v?w:O],pt=st-h["x"===v?x:j],dt=-1!==[w,O].indexOf(b),ht=null!=(at=null==L?void 0:L[m])?at:0,bt=dt?lt:st-g[ct]-y[ct]-ht+z.altAxis,ut=dt?st+g[ct]+y[ct]-ht-z.altAxis:pt,ft=l&&dt?function(t,e,o){var n=et(t,e,o);return n>o?o:n}(bt,st,ut):et(l?bt:lt,st,l?ut:pt);_[m]=ft,M[m]=ft-st}e.modifiersData[n]=M}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,o=t.state,n=t.name,i=t.options,r=o.elements.arrow,a=o.modifiersData.popperOffsets,s=T(o.placement),c=tt(s),l=[O,j].indexOf(s)>=0?"height":"width";if(r&&a){var p=function(t,e){return ot("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:nt(t,z))}(i.padding,o),d=G(r),h="y"===c?w:O,b="y"===c?x:j,u=o.rects.reference[l]+o.rects.reference[c]-a[c]-o.rects.popper[l],f=a[c]-o.rects.reference[c],v=Z(r),m=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,_=m/2-d[l]/2+(u/2-f/2),g=et(p[h],_,m-d[l]-p[b]);o.modifiersData[n]=((e={})[c]=g,e.centerOffset=g-_,e)}},effect:function(t){var e=t.state,o=t.options.element,n=void 0===o?"[data-popper-arrow]":o;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&K(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,o=t.name,n=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,a=yt(e,{elementContext:"reference"}),s=yt(e,{altBoundary:!0}),c=jt(a,n),l=jt(s,i,r),p=Ot(c),d=Ot(l);e.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:p,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d})}}]});const Et=class{constructor(e){t(this,e),this.balChange=i(this,"balChange"),this.balWillAnimate=i(this,"balWillAnimate"),this.balDidAnimate=i(this,"balDidAnimate"),this.balPopoverPrepare=i(this,"balPopoverPrepare"),this.popoverId="bal-po-"+Pt++,this.isTouch=p.isTouch,this.isInMainNav=!1,this.backdropHeight=0,this.autoTrigger=!1,this.hint=!1,this.hover=!1,this.arrow=!1,this.backdrop=!1,this.tooltip=!1,this.offsetX=0,this.offsetY=0,this.padding=0,this.position="bottom-start",this.active=!1,this.mobileTop=!1}createLogger(t){this.log=t}async activeChanged(t,e){!0===t&&t!==e?this.present({force:!0}):this.dismiss({force:!0})}componentWillLoad(){this.backdropHeight=this.getBackdropHeight(),this.triggerElement.setAttribute("aria-haspopup","true")}componentDidLoad(){if(this.isInMainNav=null!==this.footMobileNav,this.triggerElement&&this.menuElement){this.popperInstance=Ct(this.triggerElement,this.menuElement,{placement:this.tooltip?"bottom":this.position,modifiers:[this.modifierOffset,this.modifierPreventOverflow]});let t=[],e=[];this.autoTrigger&&(t=["click"]),this.tooltip&&(t=["mouseenter","focus"],e=["mouseleave","blur"]),t.forEach((t=>{this.triggerElement&&this.triggerElement.addEventListener(t,"click"===t?()=>this.toggle():()=>this.present())})),e.forEach((t=>{this.triggerElement&&this.triggerElement.addEventListener(t,(()=>this.dismiss()))}))}}componentDidRender(){this.popperInstance&&(this.popperInstance.setOptions((t=>Object.assign(Object.assign({},t),{placement:this.tooltip?"bottom":this.position,modifiers:[...t.modifiers.filter((t=>"offset"!==t.name&&"preventOverflow"!==t.name)),this.modifierOffset,this.modifierPreventOverflow]}))),this.updatePopper()),f.isSafari&&!this.isTouch&&(clearTimeout(this.componentDidRenderTimer),this.componentDidRenderTimer=setTimeout((()=>{var t;const e=null===(t=this.el)||void 0===t?void 0:t.clientWidth;this.el.style.maxWidth=e?`${e}px`:"initial"})))}handlePopoverPrepare(t){this.popoverId!==t.detail&&this.dismiss()}async clickOnOutside(t){var e;this.active&&(this.el.contains(t.target)||(this.active=!1),(null===(e=this.backdropElement)||void 0===e?void 0:e.isEqualNode(t.target))&&(this.active=!1))}handleKeyUp(t){!this.active||"Escape"!==t.key&&"Esc"!==t.key||(t.preventDefault(),this.dismiss())}async tabOutside(t){"Tab"===t.key&&!this.el.contains(document.activeElement)&&this.active&&await this.toggle()}breakpointListener(t){this.isTouch=t.touch,this.isInMainNav=null!==this.footMobileNav,this.backdropHeight=this.getBackdropHeight()}async present(t={force:!1}){var e,o;this.active&&!t.force||(null===(e=this.menuElement)||void 0===e||e.setAttribute("data-show",""),null===(o=this.menuElement)||void 0===o||o.setAttribute("aria-hidden","false"),this.menuInnerElement&&this.menuInnerElement.scrollTo(0,0),this.balPopoverPrepare.emit(this.popoverId),this.balWillAnimate.emit(this.active),this.active=!0,this.popperInstance.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:!0}]}))),this.updatePopper(),this.balChange.emit(this.active),this.balDidAnimate.emit(this.active))}async dismiss(t={force:!1}){var e,o;(this.active||t.force)&&(null===(e=this.menuElement)||void 0===e||e.removeAttribute("data-show"),null===(o=this.menuElement)||void 0===o||o.setAttribute("aria-hidden","true"),this.balWillAnimate.emit(this.active),this.active=!1,this.popperInstance.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:!1}]}))),this.updatePopper(),this.balChange.emit(this.active),this.balDidAnimate.emit(this.active))}async toggle(t={force:!1}){this.active?await this.dismiss(t):await this.present(t)}get footMobileNav(){return this.el.closest('[slot="meta-mobile-foot"]')}get modifierOffset(){return{name:"offset",options:{offset:[this.offsetX,this.offsetY+(this.tooltip||this.arrow?8:0)]}}}get modifierPreventOverflow(){return{name:"preventOverflow",options:{padding:this.arrow||this.tooltip?8:this.padding,altAxis:!0}}}get triggerElement(){return this.el.querySelector("[bal-popover-trigger]")}get menuElement(){return this.el.querySelector("bal-popover-content")}get menuInnerElement(){return this.el.querySelector(".bal-popover__content__inner")}getBackdropHeight(){return f.hasWindow?this.isInMainNav?(window.innerHeight-(this.isTouch?64:48))/16:window.innerHeight/16:0}updatePopper(){this.popperInstance.update()}render(){const t=s.block("popover");return e(o,{key:"f4b281b4ca30365ec4b279c3e219a0109edc173d","aria-presented":this.active?"true":null,"data-id":this.popoverId,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("active").class(this.active)),t.modifier("tooltip").class(this.tooltip)),t.modifier("arrow").class(this.arrow)),t.modifier("hint").class(this.hint)),t.modifier("backdrop").class(this.backdrop))},!this.mobileTop&&e("div",{key:"d40df31685649965a301ada5e1c7e7f2a629596c",ref:t=>{this.backdropElement=t},class:Object.assign({},t.element("backdrop").class(this.backdrop&&this.active)),style:{"--bal-popover-backdrop-height":`${this.backdropHeight}rem`}}),e("slot",{key:"04ec4d9a6c214d1c14a436906e80dc721349ab78"}))}get el(){return n(this)}static get watchers(){return{active:["activeChanged"]}}};r([v("bal-popover"),a("design:type",Function),a("design:paramtypes",[Function]),a("design:returntype",void 0)],Et.prototype,"createLogger",null),r([b(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],Et.prototype,"breakpointListener",null);let Pt=0;Et.style='.bal-popover__backdrop{bottom:0;left:0;position:absolute;right:0;top:0}:root{--bal-popover-backdrop-height:100vh;--bal-popover-content-height-top-nav:100vh;--bal-popover-backdrop-background:var(--bal-color-primary-6);--bal-popover-backdrop-opacity:.8;--bal-popover-content-shadow:var(--bal-shadow-normal);--bal-popover-content-background:var(--bal-color-white);--bal-popover-content-background-grey:var(--bal-color-grey-2);--bal-popover-tooltip-background:var(--bal-color-primary-6);--bal-popover-tooltip-color:var(--bal-color-white);--bal-popover-tooltip-font-family:var(--bal-font-family-text);--bal-popover-tooltip-font-size:var(--bal-text-size-small)}.bal-popover{display:block}@media screen and (max-width: 768px){.bal-popover .bal-popover__content{min-width:100vw !important}.bal-popover .bal-select__popover{min-width:100% !important}}.bal-popover--active .bal-popover__content{display:block}.bal-popover--backdrop [bal-popover-trigger]{z-index:calc(var(--bal-z-index-popup) - 1);position:relative}@media screen and (max-width: 768px){.bal-popover--hint .bal-popover__content{min-height:100vh}.bal-popover--hint .bal-popover__content .bal-popover__content__inner{min-height:100vh}}@media screen and (min-width: 769px),print{.bal-popover--hint .bal-popover__content{max-width:20rem}}@media screen and (min-width: 1024px){.bal-popover--hint .bal-popover__content{max-width:30rem}}.bal-popover__backdrop{z-index:calc(var(--bal-z-index-popup) - 2);position:fixed;background:var(--bal-popover-backdrop-background);opacity:var(--bal-popover-backdrop-opacity);height:var(--bal-popover-backdrop-height);width:100vw}.bal-popover__content{display:none;z-index:var(--bal-z-index-popup);-webkit-box-shadow:var(--bal-popover-content-shadow);box-shadow:var(--bal-popover-content-shadow);background:var(--bal-popover-content-background);min-width:16.25rem}.bal-popover__content[data-show]{display:block}.bal-popover__content--expanded{min-width:100%}.bal-popover__content--no-shadow{-webkit-box-shadow:none;box-shadow:none}.bal-popover__content--radius-normal{border-radius:var(--bal-radius-normal)}.bal-popover__content--radius-large{border-radius:var(--bal-radius-large)}.bal-popover__content--radius-none{border-radius:0}.bal-popover__content--radius-normal-bottom-none{border-radius:var(--bal-radius-normal);border-bottom-right-radius:0;border-bottom-left-radius:0}.bal-popover__content--radius-normal-top-none{border-radius:var(--bal-radius-normal);border-top-left-radius:0;border-top-right-radius:0}.bal-popover__content--radius-large-bottom-none{border-radius:var(--bal-radius-large);border-bottom-right-radius:0;border-bottom-left-radius:0}.bal-popover__content--radius-large-top-none{border-radius:var(--bal-radius-large);border-top-left-radius:0;border-top-right-radius:0}.bal-popover__content--on-top{border-top:1px solid var(--bal-color-grey-2);height:var(--bal-popover-content-height-top-nav);overflow-y:auto}.bal-popover__content--color-grey{background:var(--bal-popover-content-background-grey)}.bal-popover__content__inner{max-height:calc(100vh - 4.5rem);overflow:auto;padding:1rem}@media screen and (min-width: 769px),print{.bal-popover__content__inner{padding:1.5rem}}@media screen and (min-width: 1024px){.bal-popover__content__inner{max-height:calc(100vh - 8rem)}}.bal-popover__content--spaceless .bal-popover__content__inner{padding:0}.bal-popover__content [data-popper-arrow]{display:none}.bal-popover__content__arrow{visibility:hidden}.bal-popover__content__arrow [data-popper-arrow]{display:block}.bal-popover__content__arrow,.bal-popover__content__arrow:before{position:absolute;width:.5rem;height:.5rem;background:inherit}.bal-popover__content__arrow:before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}.bal-popover__content[data-popper-placement^=top]>.bal-popover__content__arrow{bottom:-0.25rem}.bal-popover__content[data-popper-placement^=bottom]>.bal-popover__content__arrow{top:-0.25rem}.bal-popover__content[data-popper-placement^=left]>.bal-popover__content__arrow{right:-0.25rem}.bal-popover__content[data-popper-placement^=right]>.bal-popover__content__arrow{left:-0.25rem}.bal-popover--arrow .bal-popover__content__arrow{display:block}.bal-popover--tooltip .bal-popover__content{min-width:unset;background:var(--bal-popover-tooltip-background)}.bal-popover--tooltip .bal-popover__content .bal-popover__content__inner{padding:var(--bal-space-x-small)}.bal-popover--tooltip .bal-popover__content .bal-popover__content__inner,.bal-popover--tooltip .bal-popover__content .bal-popover__content__inner p{color:var(--bal-popover-tooltip-color);font-family:var(--bal-popover-tooltip-font-family);font-size:var(--bal-popover-tooltip-font-size)}';const Wt=class{constructor(e){t(this,e),this.isTouch=p.isTouch,this.spaceless=!1,this.scrollable=0,this.contentWidth=0,this.contentMinWidth=0,this.color="white",this.expanded=!1,this.radius="normal",this.noShadow=!1,this.mobileTop=!1,this.contentHeightOnTop=0}breakpointListener(t){f.hasWindow&&(this.contentHeightOnTop=window.innerHeight-64)}get innerStyle(){let t={};return this.scrollable>0&&(t={"max-height":`${this.scrollable}px`,overflow:"auto"}),Object.assign({},t)}get contentStyle(){let t={},e={};const o={"--bal-popover-content-height-top-nav":this.contentHeightOnTop/16+"rem"};return this.contentWidth>0&&(t={"max-width":`${this.contentWidth}px`}),this.contentMinWidth>0&&(e={"min-width":`${this.contentMinWidth}px`}),Object.assign(Object.assign(Object.assign({},t),e),o)}componentWillLoad(){f.hasWindow&&(this.contentHeightOnTop=window.innerHeight-64)}render(){const t=s.block("popover").element("content");return e(o,{key:"bc08fb0e5736f9393c5396af4a84f1127b6e4c4e",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("expanded").class(this.expanded)),t.modifier("spaceless").class(this.spaceless)),t.modifier("no-shadow").class(this.noShadow)),t.modifier(`radius-${this.radius}`).class()),t.modifier(`color-${this.color}`).class()),t.modifier("on-top").class(this.mobileTop)),"data-testid":"bal-popover-content",role:"tooltip",style:this.contentStyle},e("div",{key:"f49ffa520c2e1cc95942973939eeff059900a9bc",class:Object.assign({},t.element("inner").class()),style:this.innerStyle},e("slot",{key:"3394b3dd89ce64a0d379e66b1ffb169e9f0401c4"})),e("div",{key:"5f75d67a77ae49667c3863b738bdc03d1dcb8121",class:Object.assign({},t.element("arrow").class()),"data-popper-arrow":!0}))}get el(){return n(this)}};r([b(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],Wt.prototype,"breakpointListener",null);export{m as bal_hint,g as bal_hint_text,y as bal_hint_title,Et as bal_popover,Wt as bal_popover_content}
|
package/dist/baloise-design-system/{p-c8491fda99.system.entry.js → p-fc8024a9d7.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,a,r,n){function t(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n["throw"](e))}catch(e){o(e)}}function s(e){e.done?r(e.value):t(e.value).then(i,l)}s((n=n.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,t,o,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=l(0),i["throw"]=l(1),i["return"]=l(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(a){return s([e,a])}}function s(l){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(r=0)),r)try{if(n=1,t&&(o=l[0]&2?t["return"]:l[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,l[1])).done)return o;if(t=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:r.label++;return{value:l[1],done:false};case 5:r.label++;t=l[1];l=[0];continue;case 7:l=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1];o=l;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(l);break}if(o[2])r.ops.pop();r.trys.pop();continue}l=a.call(e,r)}catch(e){l=[6,e];t=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-PNu_g_s6.system.js","./p-Cjiw70Dk.system.js","./p-CEOTg0oT.system.js","./p-BbAtjg9Y.system.js","./p-D1opIX9W.system.js","./p-4Y53iwfN.system.js","./p-BS3tl84b.system.js","./p-BM_oHMik.system.js","./p-ncoiCFQ1.system.js","./p-BpMXwP_q.system.js","./p-CpWDVANq.system.js","./p-Bzy18UgU.system.js","./p-lFDHYLJ4.system.js","./p-Dxz8zGB7.system.js","./p-Czl2AFQD.system.js","./p-D7_eHNTI.system.js"],(function(e){"use strict";var a,r,n,t,o,i,l,s,c,_,p,f,b,d,u;return{setters:[function(e){a=e.r;r=e.h;n=e.H},function(e){t=e._;o=e.a},function(e){i=e.l;l=e.a;s=e.L},function(e){c=e.B},function(e){_=e.r},function(e){p=e.L},function(e){f=e.s},function(e){b=e.e},function(e){d=e.d},function(e){u=e.L},null,null,null,null,null,null],execute:function(){var g={en:{name:"English"},fr:{name:"Français"},it:{name:"Italiano"},nl:{name:"Nederlands"},es:{name:"Español"},pt:{name:"Português"},sv:{name:"Svenska"},fi:{name:"Suomi"},de:{name:"Deutsch"},pl:{name:"Polski"}};var h=":root{--bal-footer-font-family:var(--bal-font-family-text);--bal-footer-background:var(--bal-color-primary);--bal-footer-color:var(--bal-color-text-white);--bal-footer-language-color:var(--bal-color-text-white);--bal-footer-language-color-hover:var(--bal-color-light-blue-2);--bal-footer-language-color-active:var(--bal-color-light-blue-3);--bal-footer-language-background:var(--bal-color-text-white);--bal-footer-language-background-hover:var(--bal-color-light-blue-2);--bal-footer-language-background-active:var(--bal-color-light-blue-3);--bal-footer-logo-image-max-height:64px}.bal-footer{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:static;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.bal-footer__slot{color:var(--bal-footer-color)}.bal-footer__inner{position:relative;font-family:var(--bal-footer-font-family);background-color:var(--bal-footer-background);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-large)}@media screen and (min-width: 769px),print{.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}@media screen and (min-width: 1024px){.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}.bal-footer__inner__wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--bal-space-large)}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}.bal-footer__inner__wrapper__header-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}.bal-footer__inner__wrapper__header-container__language{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__language__wrapper{display:-ms-flexbox;display:flex;gap:1rem;cursor:pointer}.bal-footer__inner__wrapper__header-container__language__wrapper svg,.bal-footer__inner__wrapper__header-container__language__wrapper g,.bal-footer__inner__wrapper__header-container__language__wrapper path,.bal-footer__inner__wrapper__header-container__language__wrapper circle{fill:var(--bal-footer-language-background) !important}.bal-footer__inner__wrapper__header-container__language__wrapper select{padding-left:2px;padding-right:2px;background:rgba(0,0,0,0);-webkit-appearance:none;border:none;color:var(--bal-footer-language-color);font-weight:var(--bal-font-weight-bold);font-family:var(--bal-font-family-title);cursor:pointer}.bal-footer__inner__wrapper__header-container__language__wrapper select option{background:var(--bal-color-white) !important;color:var(--bal-color-primary) !important;font-weight:var(--bal-font-weight-bold) !important;font-family:var(--bal-font-family-text) !important}.bal-footer__inner__wrapper__header-container__language__wrapper:hover svg,.bal-footer__inner__wrapper__header-container__language__wrapper:hover g,.bal-footer__inner__wrapper__header-container__language__wrapper:hover path,.bal-footer__inner__wrapper__header-container__language__wrapper:hover circle{fill:var(--bal-footer-language-background-hover) !important}.bal-footer__inner__wrapper__header-container__language__wrapper:hover select{color:var(--bal-footer-language-color-hover)}.bal-footer__inner__wrapper__header-container__language__wrapper:active svg,.bal-footer__inner__wrapper__header-container__language__wrapper:active g,.bal-footer__inner__wrapper__header-container__language__wrapper:active path,.bal-footer__inner__wrapper__header-container__language__wrapper:active circle{fill:var(--bal-footer-language-background-active) !important}.bal-footer__inner__wrapper__header-container__language__wrapper:active select{color:var(--bal-footer-language-color-active)}.bal-footer__inner__wrapper__header-container__logo{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__logo img{max-height:var(--bal-footer-logo-image-max-height)}.bal-footer__inner__wrapper__header-container__logo div{height:var(--bal-footer-logo-image-max-height);min-width:var(--bal-footer-logo-image-max-height)}.bal-footer__inner__wrapper__links-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width: 769px),print{.bal-footer__inner__wrapper__links-container{-ms-flex-direction:column;flex-direction:column}}@media screen and (min-width: 1024px){.bal-footer__inner__wrapper__links-container{-ms-flex-direction:row;flex-direction:row}}.bal-footer__inner__wrapper__links-container__legal-links{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop)}.bal-footer__inner__wrapper__links-container__legal-links a{font-size:var(--bal-text-size-small) !important}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__legal-links{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%;gap:var(--bal-space-normal)}}.bal-footer__inner__wrapper__links-container__social-media-links{-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop);padding:var(--bal-space-normal) var(--bal-space-normal) var(--bal-space-normal) 0}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large);-ms-flex-pack:center;justify-content:center;width:100%;padding:var(--bal-space-normal) 0 var(--bal-space-normal) 0}}";var m=e("bal_footer",function(){function e(e){a(this,e);this.logoSvgContent="";this.links=[];this.socialMediaLinks=[];this.language=d.language;this.region=d.region;this.allowedLanguages=d.allowedLanguages;this.logoHref="";this.logoSvg="";this.hideLinks=false;this.overrideLinks=undefined;this.showSocialMedia=false;this.hideLanguageSelection=false}e.prototype.createLogger=function(e){this.log=e};e.prototype.logoSvgChanged=function(){this.logoSvgContent=f(this.logoSvg)};e.prototype.connectedCallback=function(){this.updateFooterLinks();this.updateSocialMediaLinks();this.logoSvgChanged()};e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){if(this.language!==e.language||this.region!==e.region){this.language=e.language;this.region=e.region;this.allowedLanguages=e.allowedLanguages;this.updateFooterLinks();this.updateSocialMediaLinks()}return[2]}))}))};e.prototype.changeLanguage=function(e){b(e)};e.prototype.updateFooterLinks=function(){var e=this;if(this.overrideLinks){this.links=this.overrideLinks}else if(!this.hideLinks&&(this.region==="CH"||this.region==="DE")){var a=this.region;_((function(){i(new s(e.language),a).then((function(a){return e.links=a}))}))}};e.prototype.updateSocialMediaLinks=function(){var e=this;if(this.showSocialMedia&&(this.region==="CH"||this.region==="DE")){var a=this.region;_((function(){l(new s(e.language),a).then((function(a){return e.socialMediaLinks=a}))}))}};e.prototype.render=function(){var e=this;var a=c.block("footer");var t=a.element("slot");var o=a.element("inner");var i=o.element("wrapper");var l=i.element("container");var s=i.element("links-container");var _=i.element("header-container");var p=_.element("logo");var f=_.element("language");var b=f.element("wrapper");var d=s.element("legal-links");var u=s.element("social-media-links");return r(n,{key:"ca5dacc6c906754b6bb466c448be4f6bb5b38dff",class:Object.assign({},a.class())},r("footer",{key:"8d42cfff788350c5e5ae26f86b613fcd5144085d",class:Object.assign({},o.class())},r("div",{key:"a60281af0dcf73da3901cb605b49d35b3bb3e6ed",class:Object.assign({},i.class())},r("div",{key:"857d35746558b5b0a5ec79562b3f2c0e30037141",class:Object.assign(Object.assign({container:true},l.class()),_.class())},r("div",{key:"c1e5bae12ba5449888156244789fd79dbdc3a388",class:Object.assign({},p.class())},this.logoHref?r("img",{src:this.logoHref,alt:"Logo"}):this.logoSvgContent?r("div",{innerHTML:this.logoSvgContent}):r("bal-logo",{color:"white"})),r("div",{key:"de3b93d01ad75facf4219df8954016095aa143ab",class:Object.assign({},f.class()),style:{display:this.hideLanguageSelection||this.allowedLanguages.length<=1?"none":"flex"}},r("div",{key:"7be8f0588d5da5e436b72214c67542316d325481",class:Object.assign({},b.class())},r("bal-icon",{key:"935dfaa39b97f40cd946ce8c8a0a0f421b3876b6",class:Object.assign({},b.element("icon").class()),name:"web",color:"white"}),r("select",{key:"d8408623006a257fa422b0789bc1e021461f1b1e",class:Object.assign({},b.element("select").class()),onChange:function(a){return e.changeLanguage(a.target.value)},"data-testid":"bal-footer-language"},this.allowedLanguages.map((function(a){return r("option",{key:a,value:a,selected:a===e.language},a.toLocaleUpperCase()+" - "+g[a].name)})))))),r("div",{key:"422e8cae4fd1cd625afb3cc81bc7c0cfac99fe65",class:Object.assign({},t.class())},r("slot",{key:"b7c73e907ffbe0b64eb4608143774bcf7c56ff30"})),r("div",{key:"7bc64923fe79674a26e96f263785abf96dba1af6",class:Object.assign(Object.assign({container:true},l.class()),s.class())},r("div",{key:"5e5c86e58b3df89978657217ba145555786becfb",class:Object.assign({},u.class()),style:{display:!this.showSocialMedia?"none":"flex"}},this.socialMediaLinks.map((function(e){return r("a",{key:e.link,href:e.link,target:"_blank",class:{link:true,"is-inverted":true}},r("bal-icon",{name:e.label.toLowerCase()}))}))),r("div",{key:"610e34f952fd08cba92099a213371e45c5f7ebc6",class:Object.assign({},d.class()),style:{display:this.hideLinks?"none":"flex"}},this.links&&this.links.map((function(e){return r("a",{key:e.link,href:e.link,target:"_blank",class:{link:true,"is-light":true}},e.label)})))))))};Object.defineProperty(e,"watchers",{get:function(){return{logoSvg:["logoSvgChanged"]}},enumerable:false,configurable:true});return e}());t([p("bal-footer"),o("design:type",Function),o("design:paramtypes",[Function]),o("design:returntype",void 0)],m.prototype,"createLogger",null);t([u(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],m.prototype,"configChanged",null);m.style=h}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,a,r,n){function t(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n["throw"](e))}catch(e){o(e)}}function s(e){e.done?r(e.value):t(e.value).then(i,l)}s((n=n.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,t,o,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=l(0),i["throw"]=l(1),i["return"]=l(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(a){return s([e,a])}}function s(l){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(r=0)),r)try{if(n=1,t&&(o=l[0]&2?t["return"]:l[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,l[1])).done)return o;if(t=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:r.label++;return{value:l[1],done:false};case 5:r.label++;t=l[1];l=[0];continue;case 7:l=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1];o=l;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(l);break}if(o[2])r.ops.pop();r.trys.pop();continue}l=a.call(e,r)}catch(e){l=[6,e];t=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-PNu_g_s6.system.js","./p-Cjiw70Dk.system.js","./p-CEOTg0oT.system.js","./p-BbAtjg9Y.system.js","./p-D1opIX9W.system.js","./p-4Y53iwfN.system.js","./p-Ck7YRry-.system.js","./p-BM_oHMik.system.js","./p-ncoiCFQ1.system.js","./p-BpMXwP_q.system.js","./p-CpWDVANq.system.js","./p-Bzy18UgU.system.js","./p-lFDHYLJ4.system.js","./p-Dxz8zGB7.system.js","./p-Czl2AFQD.system.js","./p-D7_eHNTI.system.js"],(function(e){"use strict";var a,r,n,t,o,i,l,s,c,_,p,f,b,d,u;return{setters:[function(e){a=e.r;r=e.h;n=e.H},function(e){t=e._;o=e.a},function(e){i=e.l;l=e.a;s=e.L},function(e){c=e.B},function(e){_=e.r},function(e){p=e.L},function(e){f=e.s},function(e){b=e.e},function(e){d=e.d},function(e){u=e.L},null,null,null,null,null,null],execute:function(){var g={en:{name:"English"},fr:{name:"Français"},it:{name:"Italiano"},nl:{name:"Nederlands"},es:{name:"Español"},pt:{name:"Português"},sv:{name:"Svenska"},fi:{name:"Suomi"},de:{name:"Deutsch"},pl:{name:"Polski"}};var h=":root{--bal-footer-font-family:var(--bal-font-family-text);--bal-footer-background:var(--bal-color-primary);--bal-footer-color:var(--bal-color-text-white);--bal-footer-language-color:var(--bal-color-text-white);--bal-footer-language-color-hover:var(--bal-color-light-blue-2);--bal-footer-language-color-active:var(--bal-color-light-blue-3);--bal-footer-language-background:var(--bal-color-text-white);--bal-footer-language-background-hover:var(--bal-color-light-blue-2);--bal-footer-language-background-active:var(--bal-color-light-blue-3);--bal-footer-logo-image-max-height:64px}.bal-footer{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:static;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.bal-footer__slot{color:var(--bal-footer-color)}.bal-footer__inner{position:relative;font-family:var(--bal-footer-font-family);background-color:var(--bal-footer-background);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-large)}@media screen and (min-width: 769px),print{.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}@media screen and (min-width: 1024px){.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}.bal-footer__inner__wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--bal-space-large)}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}.bal-footer__inner__wrapper__header-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}.bal-footer__inner__wrapper__header-container__language{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__language__wrapper{display:-ms-flexbox;display:flex;gap:1rem;cursor:pointer}.bal-footer__inner__wrapper__header-container__language__wrapper svg,.bal-footer__inner__wrapper__header-container__language__wrapper g,.bal-footer__inner__wrapper__header-container__language__wrapper path,.bal-footer__inner__wrapper__header-container__language__wrapper circle{fill:var(--bal-footer-language-background) !important}.bal-footer__inner__wrapper__header-container__language__wrapper select{padding-left:2px;padding-right:2px;background:rgba(0,0,0,0);-webkit-appearance:none;border:none;color:var(--bal-footer-language-color);font-weight:var(--bal-font-weight-bold);font-family:var(--bal-font-family-title);cursor:pointer}.bal-footer__inner__wrapper__header-container__language__wrapper select option{background:var(--bal-color-white) !important;color:var(--bal-color-primary) !important;font-weight:var(--bal-font-weight-bold) !important;font-family:var(--bal-font-family-text) !important}.bal-footer__inner__wrapper__header-container__language__wrapper:hover svg,.bal-footer__inner__wrapper__header-container__language__wrapper:hover g,.bal-footer__inner__wrapper__header-container__language__wrapper:hover path,.bal-footer__inner__wrapper__header-container__language__wrapper:hover circle{fill:var(--bal-footer-language-background-hover) !important}.bal-footer__inner__wrapper__header-container__language__wrapper:hover select{color:var(--bal-footer-language-color-hover)}.bal-footer__inner__wrapper__header-container__language__wrapper:active svg,.bal-footer__inner__wrapper__header-container__language__wrapper:active g,.bal-footer__inner__wrapper__header-container__language__wrapper:active path,.bal-footer__inner__wrapper__header-container__language__wrapper:active circle{fill:var(--bal-footer-language-background-active) !important}.bal-footer__inner__wrapper__header-container__language__wrapper:active select{color:var(--bal-footer-language-color-active)}.bal-footer__inner__wrapper__header-container__logo{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__logo img{max-height:var(--bal-footer-logo-image-max-height)}.bal-footer__inner__wrapper__header-container__logo div{height:var(--bal-footer-logo-image-max-height);min-width:var(--bal-footer-logo-image-max-height)}.bal-footer__inner__wrapper__links-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width: 769px),print{.bal-footer__inner__wrapper__links-container{-ms-flex-direction:column;flex-direction:column}}@media screen and (min-width: 1024px){.bal-footer__inner__wrapper__links-container{-ms-flex-direction:row;flex-direction:row}}.bal-footer__inner__wrapper__links-container__legal-links{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop)}.bal-footer__inner__wrapper__links-container__legal-links a{font-size:var(--bal-text-size-small) !important}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__legal-links{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%;gap:var(--bal-space-normal)}}.bal-footer__inner__wrapper__links-container__social-media-links{-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop);padding:var(--bal-space-normal) var(--bal-space-normal) var(--bal-space-normal) 0}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large);-ms-flex-pack:center;justify-content:center;width:100%;padding:var(--bal-space-normal) 0 var(--bal-space-normal) 0}}";var m=e("bal_footer",function(){function e(e){a(this,e);this.logoSvgContent="";this.links=[];this.socialMediaLinks=[];this.language=d.language;this.region=d.region;this.allowedLanguages=d.allowedLanguages;this.logoHref="";this.logoSvg="";this.hideLinks=false;this.overrideLinks=undefined;this.showSocialMedia=false;this.hideLanguageSelection=false}e.prototype.createLogger=function(e){this.log=e};e.prototype.logoSvgChanged=function(){this.logoSvgContent=f(this.logoSvg)};e.prototype.connectedCallback=function(){this.updateFooterLinks();this.updateSocialMediaLinks();this.logoSvgChanged()};e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){if(this.language!==e.language||this.region!==e.region){this.language=e.language;this.region=e.region;this.allowedLanguages=e.allowedLanguages;this.updateFooterLinks();this.updateSocialMediaLinks()}return[2]}))}))};e.prototype.changeLanguage=function(e){b(e)};e.prototype.updateFooterLinks=function(){var e=this;if(this.overrideLinks){this.links=this.overrideLinks}else if(!this.hideLinks&&(this.region==="CH"||this.region==="DE")){var a=this.region;_((function(){i(new s(e.language),a).then((function(a){return e.links=a}))}))}};e.prototype.updateSocialMediaLinks=function(){var e=this;if(this.showSocialMedia&&(this.region==="CH"||this.region==="DE")){var a=this.region;_((function(){l(new s(e.language),a).then((function(a){return e.socialMediaLinks=a}))}))}};e.prototype.render=function(){var e=this;var a=c.block("footer");var t=a.element("slot");var o=a.element("inner");var i=o.element("wrapper");var l=i.element("container");var s=i.element("links-container");var _=i.element("header-container");var p=_.element("logo");var f=_.element("language");var b=f.element("wrapper");var d=s.element("legal-links");var u=s.element("social-media-links");return r(n,{key:"ca5dacc6c906754b6bb466c448be4f6bb5b38dff",class:Object.assign({},a.class())},r("footer",{key:"8d42cfff788350c5e5ae26f86b613fcd5144085d",class:Object.assign({},o.class())},r("div",{key:"a60281af0dcf73da3901cb605b49d35b3bb3e6ed",class:Object.assign({},i.class())},r("div",{key:"857d35746558b5b0a5ec79562b3f2c0e30037141",class:Object.assign(Object.assign({container:true},l.class()),_.class())},r("div",{key:"c1e5bae12ba5449888156244789fd79dbdc3a388",class:Object.assign({},p.class())},this.logoHref?r("img",{src:this.logoHref,alt:"Logo"}):this.logoSvgContent?r("div",{innerHTML:this.logoSvgContent}):r("bal-logo",{color:"white"})),r("div",{key:"de3b93d01ad75facf4219df8954016095aa143ab",class:Object.assign({},f.class()),style:{display:this.hideLanguageSelection||this.allowedLanguages.length<=1?"none":"flex"}},r("div",{key:"7be8f0588d5da5e436b72214c67542316d325481",class:Object.assign({},b.class())},r("bal-icon",{key:"935dfaa39b97f40cd946ce8c8a0a0f421b3876b6",class:Object.assign({},b.element("icon").class()),name:"web",color:"white"}),r("select",{key:"d8408623006a257fa422b0789bc1e021461f1b1e",class:Object.assign({},b.element("select").class()),onChange:function(a){return e.changeLanguage(a.target.value)},"data-testid":"bal-footer-language"},this.allowedLanguages.map((function(a){return r("option",{key:a,value:a,selected:a===e.language},a.toLocaleUpperCase()+" - "+g[a].name)})))))),r("div",{key:"422e8cae4fd1cd625afb3cc81bc7c0cfac99fe65",class:Object.assign({},t.class())},r("slot",{key:"b7c73e907ffbe0b64eb4608143774bcf7c56ff30"})),r("div",{key:"7bc64923fe79674a26e96f263785abf96dba1af6",class:Object.assign(Object.assign({container:true},l.class()),s.class())},r("div",{key:"5e5c86e58b3df89978657217ba145555786becfb",class:Object.assign({},u.class()),style:{display:!this.showSocialMedia?"none":"flex"}},this.socialMediaLinks.map((function(e){return r("a",{key:e.link,href:e.link,target:"_blank",class:{link:true,"is-inverted":true}},r("bal-icon",{name:e.label.toLowerCase()}))}))),r("div",{key:"610e34f952fd08cba92099a213371e45c5f7ebc6",class:Object.assign({},d.class()),style:{display:this.hideLinks?"none":"flex"}},this.links&&this.links.map((function(e){return r("a",{key:e.link,href:e.link,target:"_blank",class:{link:true,"is-light":true}},e.label)})))))))};Object.defineProperty(e,"watchers",{get:function(){return{logoSvg:["logoSvgChanged"]}},enumerable:false,configurable:true});return e}());t([p("bal-footer"),o("design:type",Function),o("design:paramtypes",[Function]),o("design:returntype",void 0)],m.prototype,"createLogger",null);t([u(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],m.prototype,"configChanged",null);m.style=h}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as o,r as t,c as e,H as r,g as a}from"./p-BdVwMG9u.js";import{_ as i,a as n}from"./p-dfXERft2.js";import{i as l}from"./p-C4sZQbkT.js";import{B as d}from"./p-ByiN-QjD.js";import{b as s}from"./p-B1u-Mq75.js";import{d as p}from"./p-FCLKfv6B.js";import{s as b}from"./p-CpDHeXfo.js";import{r as h,a as c,o as u,p as _,b as w,m}from"./p-Ba5qjFjW.js";import{L as v}from"./p-D7ovid3w.js";import{i as g}from"./p-xbSOW78W.js";import{a as f}from"./p-BAaDJIzy.js";import{F as y}from"./p-DqCbGYzv.js";import{b as x}from"./p-CI2FR64u.js";import{D as k}from"./p-BLp4ll3i.js";import{a as j}from"./p-DBsOHTWj.js";import{d as O}from"./p-CBkFUwrD.js";import{d as C,b as F,a as L,j as z,i as B}from"./p-BERg8BNc.js";import{L as S}from"./p-B-L34nz8.js";import{B as A,L as T}from"./p-CeRECGC7.js";import{i as D,s as I}from"./p-BG4j3FEv.js";import"./p-D7M-7v58.js";import"./p-BFTU3MAI.js";import"./p-BnVL_HEz.js";import"./p-C20cwFWy.js";class V{constructor(){this.handleAutoFill=async o=>{if(b(o),this.isAutoFillAllowed()){this.component.isAutoFilled=!0;const o=this.component.nativeEl.value,t=await this.parseAutoFillValueWithOptions(o);if(void 0===t)return void(this.component.isAutoFilled=!1);f(t,this.component.rawValue)||this.component.valueUtil.updateRawValueBySelection(t,!0)}}}connectedCallback(o){this.component=o}isAutoFillAllowed(){return!this.component.multiple}async parseAutoFillValueWithOptions(o){const t=await this.component.listEl.getOptions();for(let e=0;e<t.length;e++){const r=t[e];if(r.value===o||r.label===o)return[r.value]}}}const E={de:{clearable:"Löschen",open:"Öffnen",close:"Schließen"},en:{clearable:"clear",open:"Open",close:"Close"},fr:{clearable:"Effacer",open:"Ouvrir",close:"Fermer"},it:{clearable:"Cancellare",open:"Apri",close:"Chiudi"},nl:{clearable:"Wissen",open:"Open",close:"Sluiten"},es:{clearable:"Limpiar",open:"Abrir",close:"Cerrar"},pl:{clearable:"Wyczyść",open:"Otwórz",close:"Zamknij"},pt:{clearable:"Limpar",open:"Abrir",close:"Fechar"},sv:{clearable:"Rensa",open:"Öppna",close:"Stäng"},fi:{clearable:"Tyhjennä",open:"Avaa",close:"Sulje"}};class R{constructor(){this.handlePointerDown=()=>{this.component.isKeyboardMode=!1},this.handleKeydown=o=>{this.component.isKeyboardMode=y.includes(o.key)}}connectedCallback(o){this.component=o}handleFocus(o){this.component.hasFocus=!0,this.component.balFocus.emit(o)}handleBlur(o){this.component.isExpanded||(this.component.hasFocus=!1,h((()=>this.component.balBlur.emit(o))))}handleClick(o){if(!this.component.valueUtil.isDisabled()){if(this.component.chips&&o.target.closest("bal-close"))return;if(this.component.clearable&&o.target.closest(".bal-dropdown__clear"))return void this.component.valueUtil.updateRawValueBySelection([]);this.component.popupUtil.toggleList()}}handleOutsideClick(o){var t;this.component.isExpanded&&(this.component.el.contains(o.target)||(this.component.isExpanded=!1,null===(t=this.component.listEl)||void 0===t||t.resetFocus(),this.component.hasFocus=!1,h((()=>this.component.balBlur.emit(o)))))}}class W{connectedCallback(o){this.component=o}focusOptionByLabel(o,t={}){this.component.labelToFocus=(this.component.labelToFocus+o).trim(),this.component.labelToFocus.length>0&&(clearTimeout(this.keyHitTimeout),this.keyHitTimeout=setTimeout((()=>{var o;null===(o=this.component.listEl)||void 0===o||o.focusByLabel(this.component.labelToFocus,t)}),100),clearTimeout(this.timeout),this.timeout=setTimeout((async()=>{this.component.labelToFocus=""}),1e3))}}class q{connectedCallback(o){this.component=o,this.component.initialValue=this.component.value}componentDidRender(){this.component.selectEl&&this.component.selectEl.querySelectorAll("option").forEach((o=>{this.component.rawValue.includes(o.value)&&(o.selected=!0)}))}handle(o){const t=o.target;(null==t?void 0:t.contains(this.component.el))&&(this.resetHandlerTimer&&clearTimeout(this.resetHandlerTimer),this.resetHandlerTimer=setTimeout((()=>{const o=this.component.valueUtil.parseValueString(this.component.initialValue);this.component.valueUtil.updateRawValueBySelection(o)}),0))}}const H=({name:t,httpFormSubmit:e,multiple:r,required:a,disabled:i,rawValue:n,refSelectEl:l})=>{const s=d.block("dropdown");return e?o("select",{class:Object.assign({},s.element("root").element("select").class()),"aria-hidden":"true",name:t,multiple:r,required:a,disabled:i,tabindex:-1,ref:l},n.map((t=>o("option",{key:t,value:t,selected:!0},t)))):""},P=({size:t,theme:e,icon:r,language:a,loading:i,clearable:n,invalid:l,filled:s,expanded:p,disabled:b})=>{const h=d.block("dropdown");return i?o("bal-spinner",{class:Object.assign({},h.element("rear").class()),small:!0,variation:"circle",color:"white"}):n&&s&&!b?o("button",{title:E[a].clearable,type:"button",tabIndex:-1,class:Object.assign(Object.assign(Object.assign(Object.assign({},h.element("rear").class()),h.element("clear").class()),h.element("clear").modifier("invalid").class(l)),h.element("clear").modifier("theme-purple").class("purple"===e))},o("bal-icon",{class:Object.assign({},h.element("rear").class()),name:"purple"===e?"close":"close-circle",size:t,color:"purple"===e?"primary":"grey"})):o("bal-icon",{class:Object.assign({},h.element("rear").class()),name:r,size:t,turn:p,color:b?"grey":l?"danger":"primary"})},$=({inputId:t,httpFormSubmit:e,ariaForm:r,rawValue:a,autocomplete:i,required:n,disabled:l,readonly:s,placeholder:p,expanded:b,invalid:h,language:c,inputLabel:u,inheritedAttributes:_,refInputEl:w,onChange:m,onFocus:v,onBlur:g,onKeyDown:f})=>{const y=d.block("dropdown"),x=()=>o("input",Object.assign({id:r.controlId||`${t}-ctrl`,class:Object.assign({},y.element("root").element("input").class()),type:"text",size:1,inputmode:"none",tabindex:"0",autoComplete:i,value:a.join(","),required:n,disabled:l,readonly:s,placeholder:p,title:b?E[c].close:E[c].open,"aria-label":b?E[c].close:E[c].open,"aria-owns":`${t}-menu`,"aria-invalid":j(h),"aria-disabled":j(l||s),"aria-labelledby":r.labelId,"aria-describedby":r.messageId,"aria-haspopup":"listbox","data-native":!0,"data-label":u,"data-value":a.join(","),ref:o=>w(o),onChange:o=>m(o),onFocus:o=>v(o),onBlur:o=>g(o),onKeyDown:o=>f(o)},_));return e?o(x,null):o("form",{novalidate:!0},o(x,null))};class M{constructor(){this.updatePanelPosition=(o,t,e)=>()=>{o.computePosition(t,e,{placement:"bottom-start",middleware:[o.flip(),o.shift()]}).then((({x:o,y:t})=>{Object.assign(e.style,{left:`${o}px`,top:`${t}px`})}))}}connectedCallback(o){this.component=o}toggleList(){this.component.valueUtil.isDisabled()||(this.component.isExpanded?this.collapseList():this.expandList())}async expandList(){var o;if(this.component.panelEl){const o=await x.load();this.component.panelCleanup=o.autoUpdate(this.component.el,this.component.panelEl,this.updatePanelPosition(o,this.component.el,this.component.panelEl))}this.component.isExpanded=!0,await(null===(o=this.component.listEl)||void 0===o?void 0:o.focusSelected())}collapseList(){var o;this.component.isExpanded=!1,null===(o=this.component.listEl)||void 0===o||o.resetFocus(),this.component.panelCleanup&&this.component.panelCleanup()}}class G{connectedCallback(o){this.component=o}componentDidLoad(){setTimeout((()=>this.valueChanged(this.component.value,void 0)),0)}isDisabled(){return this.component.disabled||this.component.readonly}isFilled(){return this.component.rawValue&&this.component.rawValue.length>0}valueChanged(o,t){const e=typeof o;e!==typeof t&&this.updateRawValueByValueProp(o),"string"===e&&o!==t&&this.updateRawValueByValueProp(o),Array.isArray(o)&&Array.isArray(t)&&!f(o,t)&&this.updateRawValueByValueProp(o)}updateRawValueBySelection(o=[],t=!1){this.component.isAutoFilled=t,this.updateRawValue(o),this.component.balChange.emit(this.component.multiple?this.component.rawValue:this.component.rawValue[0])}parseValueString(o=[]){let t=[];return g(o)||""===o||(t=Array.isArray(o)?[...o.filter((o=>!g(o)))]:o.split("").includes(",")?[...o.split(",").filter((o=>o)).map((o=>o.trim()))]:[o]),t}updateRawValueByValueProp(o=[]){const t=this.parseValueString(o);this.updateRawValue(t)}async updateRawValue(o=[]){this.component.rawValue=o,this.component.listEl&&await this.component.listEl.updateSelected(this.component.rawValue),await this.updateInputContent()}removeOption(o){const t=this.component.rawValue.filter((t=>t!==o.value));this.updateRawValueBySelection(t)}async updateInputContent(){await c(),this.component.listEl&&(this.component.choices=await this.component.listEl.getSelectedOptions(this.component.rawValue),this.component.inputLabel=this.component.choices.map((o=>o.label.trim())).sort().join(","))}}const K=({inlineLabel:t,filled:e,chips:r,placeholder:a,choices:i,renderChip:n})=>{const l=d.block("dropdown");return e?r?o("div",{class:Object.assign({},l.element("root").element("content").element("chips").class())},i.map((o=>n(o)))):(t&&`${t}: `)+i.map((o=>o.label)).join(", "):a},N=class{constructor(o){t(this,o),this.balChange=e(this,"balChange"),this.balFocus=e(this,"balFocus"),this.balBlur=e(this,"balBlur"),this.inputId="bal-dropdown-"+U++,this.inheritedAttributes={},this.initialValue=[],this.nativeOptions=[],this.rawOptions=[],this.choices=[],this.rawValue=[],this.hasFocus=!1,this.isExpanded=!1,this.isAutoFilled=!1,this.isKeyboardMode=!1,this.inputLabel="",this.ariaForm=p,this.language=O.language,this.region=O.region,this.httpFormSubmit=O.httpFormSubmit,this.labelToFocus="",this.valueUtil=new G,this.eventsUtil=new R,this.popupUtil=new M,this.optionUtil=new k,this.formSubmitUtil=new q,this.focusUtil=new W,this.autoFillUtil=new V,this.autocomplete="off",this.name=this.inputId,this.placeholder="",this.inlineLabel="",this.icon="caret-down",this.size="",this.theme="",this.disabled=!1,this.readonly=!1,this.multiple=!1,this.chips=!1,this.clearable=!1,this.invalid=!1,this.required=!1,this.loading=!1,this.filter="includes",this.contentHeight=262,this.inverted=!1,this.options=[],this.value=[],this.hasConnected=!1,this.listenToOptionChange=o=>{this.optionUtil.listenToOptionChange(o)},this.listenOnClickOutside=o=>{this.eventsUtil.handleOutsideClick(o)},this.resetHandler=o=>{this.formSubmitUtil.handle(o)},this.handleAutoFill=async o=>{this.log("(handleAutoFill)",o,this.nativeEl.value),this.autoFillUtil.handleAutoFill(o)},this.handleKeyDown=o=>{var t,e,r,a,i;o&&o.key?this.isExpanded?C(o)?(b(o),null===(t=this.listEl)||void 0===t||t.focusNext()):F(o)?(b(o),null===(e=this.listEl)||void 0===e||e.focusPrevious()):"Home"===o.key||"PageUp"===o.key?(b(o),null===(r=this.listEl)||void 0===r||r.focusFirst()):"End"===o.key||"PageDown"===o.key?(b(o),null===(a=this.listEl)||void 0===a||a.focusLast()):L(o)?(b(o),null===(i=this.listEl)||void 0===i||i.selectByFocus()):"Tab"===o.key||z(o)?this.popupUtil.collapseList():1===o.key.length&&this.focusUtil.focusOptionByLabel(o.key):L(o)||B(o)?(b(o),this.popupUtil.expandList()):1===o.key.length&&this.focusUtil.focusOptionByLabel(o.key,{select:!0}):this.isExpanded&&this.popupUtil.collapseList()}}createLogger(o){this.log=o}async optionChanged(){this.optionUtil.optionChanged()}valueChanged(o,t){this.valueUtil.valueChanged(o,t)}connectedCallback(){this.hasConnected||(this.eventsUtil.connectedCallback(this),this.valueUtil.connectedCallback(this),this.popupUtil.connectedCallback(this),this.optionUtil.connectedCallback(this),this.formSubmitUtil.connectedCallback(this),this.focusUtil.connectedCallback(this),this.autoFillUtil.connectedCallback(this)),u(this.el,"balOptionChange",this.listenToOptionChange),s.hasDocument&&(u(document,"keydown",this.eventsUtil.handleKeydown),u(document,"touchstart",this.eventsUtil.handlePointerDown),u(document,"mousedown",this.eventsUtil.handlePointerDown),u(document,"click",this.listenOnClickOutside),u(document,"reset",this.resetHandler,{capture:!0})),this.hasConnected=!0}disconnectedCallback(){_(this.el,"balOptionChange",this.listenToOptionChange),s.hasDocument&&(_(document,"keydown",this.eventsUtil.handleKeydown),_(document,"touchstart",this.eventsUtil.handlePointerDown),_(document,"mousedown",this.eventsUtil.handlePointerDown),_(document,"click",this.listenOnClickOutside),_(document,"reset",this.resetHandler,{capture:!0}))}async componentWillRender(){this.inheritedAttributes=l(this.el,["tabindex","data-hj-allow"]),await this.optionUtil.componentWillRender()}componentDidRender(){this.formSubmitUtil.componentDidRender()}componentDidLoad(){this.valueUtil.componentDidLoad()}async configChanged(o){this.language=o.language,this.region=o.region,this.httpFormSubmit=o.httpFormSubmit}async setFocus(){this.nativeEl&&!this.valueUtil.isDisabled()&&(await w(),this.nativeEl.focus())}async getValue(){return this.rawValue}async clear(){this.valueUtil.updateRawValueBySelection([])}async open(){!this.valueUtil.isDisabled()&&this.panelEl&&await this.popupUtil.expandList()}async close(){!this.valueUtil.isDisabled()&&this.panelEl&&await this.popupUtil.collapseList()}async select(o){const t=this.valueUtil.parseValueString(o);this.valueUtil.updateRawValueBySelection(t)}async setAriaForm(o){this.ariaForm=Object.assign({},o)}render(){const t=d.block("dropdown"),e=this.valueUtil.isFilled(),a=""!==this.size,i=`size-${this.size}`,n=""!==this.theme,l=`theme-${this.theme}`,s="purple"===this.theme?this.hasFocus&&this.isKeyboardMode:this.hasFocus;return o(r,{key:"3fe05ba6190dabe5fb8c297f4809659f7c24aa74",class:Object.assign({},t.class()),tabindex:"-1",id:`${this.inputId}`},o("div",{key:"e0b038aa5b7ead381d271c5b7b04fd5bbaa3ea3b",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.element("root").class()),t.element("root").modifier("focused").class(s)),t.element("root").modifier("invalid").class(this.invalid)),t.element("root").modifier("disabled").class(this.valueUtil.isDisabled())),t.element("root").modifier("autofill").class(this.isAutoFilled)),t.element("root").modifier(i).class(a)),t.element("root").modifier(l).class(n)),t.element("root").modifier(l+"-filled").class(e&&n)),t.element("root").modifier(l+"-expanded").class(this.isExpanded&&n)),"data-testid":"bal-dropdown-trigger",onClick:o=>this.eventsUtil.handleClick(o)},o("span",{key:"a3499a9e2abcaa3b363385c475c3dcd91ed1a371",class:Object.assign(Object.assign(Object.assign(Object.assign({},t.element("root").element("content").class()),t.element("root").element("content").modifier("disabled").class(this.valueUtil.isDisabled())),t.element("root").element("content").modifier("placeholder").class(!this.valueUtil.isFilled())),t.element("root").element("content").modifier(i).class(a))},o(K,{key:"8ffc980c91386038c4ee9b9e6673a25a3609d674",filled:this.valueUtil.isFilled(),inlineLabel:this.inlineLabel,chips:this.chips,placeholder:this.placeholder,choices:this.choices,renderChip:t=>o("bal-tag",{key:t.value,"data-testid":"bal-dropdown-chip",size:"small",invalid:this.invalid,disabled:this.disabled||this.readonly,closable:!(this.disabled||this.readonly),onBalCloseClick:()=>this.valueUtil.removeOption(t)},t.label)})),o($,{key:"9a97fc39a821d5dcca32eba522ae29e4aa6eedc0",inputId:this.inputId,httpFormSubmit:this.httpFormSubmit,ariaForm:this.ariaForm,rawValue:this.rawValue,autocomplete:this.autocomplete,required:this.required,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,expanded:this.isExpanded,invalid:this.invalid,language:this.language,inputLabel:this.inputLabel,inheritedAttributes:this.inheritedAttributes,refInputEl:o=>this.nativeEl=o,onChange:o=>this.handleAutoFill(o),onFocus:o=>this.eventsUtil.handleFocus(o),onBlur:o=>this.eventsUtil.handleBlur(o),onKeyDown:o=>this.handleKeyDown(o)}),o(H,{key:"2a33a8ac7f336889197137fc741ed8a4a107fceb",name:this.name,httpFormSubmit:this.httpFormSubmit,multiple:this.multiple,required:this.required,disabled:this.valueUtil.isDisabled(),rawValue:this.rawValue,refSelectEl:o=>this.selectEl=o}),o(P,{key:"d0f6958fb47ad7f6d73d4f98482cb2102c344f20",icon:this.icon,size:this.size,theme:this.theme,language:this.language,loading:this.loading,clearable:this.clearable,invalid:this.invalid,expanded:this.isExpanded,filled:e,disabled:this.valueUtil.isDisabled()})),o("div",{key:"29e98d1f54ffb6ee913bd682d6531d45997fc1d0",id:`${this.inputId}-menu`,class:Object.assign(Object.assign({},t.element("list").class()),t.element("list").modifier("expanded").class(this.isExpanded)),ref:o=>this.panelEl=o},o("bal-option-list",{key:"4e6fa69f9d9859208f83dd7bc86c17fc75d5eb60",multiple:this.multiple,disabled:this.valueUtil.isDisabled(),filter:this.filter,required:this.required,contentHeight:this.contentHeight,ref:o=>this.listEl=o},o("slot",{key:"1c169dc692632671f62410b2dadcbbc10b0fe36a"}),this.optionUtil.hasPropOptions()?this.rawOptions.map((t=>o("bal-option",{key:t.value,value:t.value,label:t.label,disabled:t.disabled,multiline:t.multiline,invalid:t.invalid,hidden:t.hidden,selected:t.selected,focused:t.focused},t.label))):"")))}get el(){return a(this)}static get watchers(){return{options:["optionChanged"],value:["valueChanged"]}}};i([v("bal-dropdown"),n("design:type",Function),n("design:paramtypes",[Function]),n("design:returntype",void 0)],N.prototype,"createLogger",null),i([S(),n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",Promise)],N.prototype,"configChanged",null);let U=0;N.style=':root{--bal-dropdown-control-background:var(--bal-color-white);--bal-dropdown-control-background-hover:var(--bal-form-field-control-background-hover);--bal-dropdown-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-dropdown-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-dropdown-control-input-background:var(--bal-color-grey-1);--bal-dropdown-control-native-input-background:transparent;--bal-dropdown-control-native-input-background-hover:transparent;--bal-dropdown-control-input-inverted-footer-background:transparent;--bal-dropdown-control-input-inverted-footer-background-hover:transparent;--bal-dropdown-control-input-multiple-background:transparent;--bal-dropdown-control-input-multiple-background-read-only-selection:transparent;--bal-dropdown-control-input-option-background:transparent;--bal-dropdown-control-input-option-background-selected:var(--bal-color-primary-1);--bal-dropdown-control-input-option-background-focused:var(--bal-color-grey-3);--bal-dropdown-control-input-option-background-hover:var(--bal-color-grey-3);--bal-dropdown-control-border-radius:var(--bal-form-field-control-radius);--bal-dropdown-popover-border-color:var(--bal-color-grey-2);--bal-dropdown-control-border-color:var(--bal-form-field-control-border-color);--bal-dropdown-control-border-color-focused:var(--bal-color-primary);--bal-dropdown-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-dropdown-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-dropdown-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-dropdown-control-border-color-focus-within:var(--bal-color-primary);--bal-dropdown-option-border-top-color:var(--bal-color-grey-2);--bal-dropdown-popover-empty-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color-focused:var(--bal-color-primary);--bal-dropdown-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-dropdown-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-dropdown-option-content-label-text-color:var(--bal-form-field-control-color)}.bal-dropdown{display:block;position:relative;-ms-flex:1;flex:1;width:100%}.bal-dropdown__root{border-width:.125rem;border-style:solid;border-color:var(--bal-dropdown-control-border-color);border-radius:var(--bal-dropdown-control-border-radius);background:var(--bal-dropdown-control-background);font-weight:var(--bal-font-weight-regular);font-size:var(--bal-text-size-normal);font-family:var(--bal-font-family-text);color:var(--bal-dropdown-control-text-color);outline:none;-webkit-box-shadow:var(--bal-shadow-none);box-shadow:var(--bal-shadow-none);padding-right:1rem;height:auto;min-height:3rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:-ms-flexbox;display:flex;width:100%;text-align:left;gap:1rem;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-dropdown__root--autofill{background:#faffbd !important;background:light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important}.bal-dropdown__root>span{-ms-flex:1;flex:1;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bal-dropdown__root--focused{border-color:var(--bal-dropdown-control-border-color-focused)}.bal-dropdown__root--invalid{border-color:var(--bal-dropdown-control-border-color-invalid);background:var(--bal-dropdown-control-background-invalid)}.bal-dropdown__root--disabled{border-color:var(--bal-dropdown-control-border-color-disabled);background:var(--bal-dropdown-control-background-disabled)}.bal-dropdown__root__content--placeholder{color:var(--bal-form-field-control-placeholder-color)}.bal-dropdown__root__content--disabled{color:var(--bal-dropdown-input-text-color-disabled)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root:not(.bal-dropdown__root--disabled):not(.bal-dropdown__root--invalid):not(.bal-dropdown__root--theme-purple):not(.bal-dropdown__root--theme-purple-expanded):hover{background:var(--bal-dropdown-control-background-hover)}}.bal-dropdown__root__content__chips{--bal-tag-size-small-font-size:var(--bal-text-size-normal);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-xx-small);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-x-small)}.bal-dropdown__root__content__chips>bal-tag{z-index:1}.bal-dropdown__root__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:rgba(0,0,0,0);position:absolute;right:var(--bal-border-width-normal);left:var(--bal-border-width-normal);top:var(--bal-border-width-normal);bottom:var(--bal-border-width-normal);opacity:0;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));cursor:pointer}.bal-dropdown__root__input:disabled{cursor:default}.bal-dropdown__root__input:-webkit-autofill{opacity:1}.bal-dropdown__root__input:autofill{opacity:1}.bal-dropdown__root__input:-internal-autofill-selected{opacity:0}.bal-dropdown__root__select{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-dropdown__root--autofill .bal-dropdown__root__input{opacity:0}.bal-dropdown__list{display:none;visibility:hidden;opacity:0;width:100vw;position:absolute;top:0;left:0;will-change:left,top,opacity;background:var(--bal-color-white);border-radius:var(--bal-radius-normal);-webkit-box-shadow:var(--bal-shadow-normal);box-shadow:var(--bal-shadow-normal);z-index:var(--bal-z-index-popup)}@media screen and (min-width: 769px),print{.bal-dropdown__list{max-width:100vw;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:100%}}.bal-dropdown__list--expanded{display:block;visibility:visible;opacity:1}.bal-dropdown__native{bottom:0;left:0;position:absolute;opacity:0;pointer-events:none;width:100%}.bal-dropdown__clear{background:rgba(0,0,0,0);border:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}.bal-dropdown__rear{z-index:1}.bal-dropdown__root--size-small{min-height:2rem}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content--placeholder{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-background-grey-light)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-1)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-purple-2)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled),.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active{border:none;background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--focused.bal-dropdown__root--theme-purple:before{content:"";border-width:var(--bal-border-width-normal);border-style:solid;border-color:var(--bal-focus-shadow-end-color);position:absolute;background:rgba(0,0,0,0);border-radius:var(--bal-radius-normal);top:-0.25rem;bottom:-0.25rem;left:-0.25rem;right:-0.25rem}.bal-dropdown__root__content--size-small{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-bold)}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}';const Q=class{constructor(o){t(this,o),this.balOptionChange=e(this,"balOptionChange"),this.balOptionFocus=e(this,"balOptionFocus"),this.inputId="bal-option-"+X++,this.checkbox=!1,this.interactionState=A.DefaultState,this.label="",this.value="",this.disabled=!1,this.multiline=!1,this.invalid=!1,this.selected=!1,this.focused=!1,this.hidden=!1,this.onClick=o=>{const t=this.el.closest("bal-option-list");this.disabled||t&&t.disabled?b(o):t&&t.required&&!t.multiple?this.selected||this.select(!0):this.select(!this.selected)}}createLogger(o){this.log=o}componentWillRender(){if(this.el){const o=this.el.closest("bal-option-list");o&&(this.checkbox=!!o.multiple)}}listenToMouseEnter(){const{label:o,value:t,selected:e,disabled:r,hidden:a}=this;a||r||this.balOptionFocus.emit({label:o,value:t,selected:e})}elementStateListener(o){this.interactionChildElements.forEach((t=>{t.hovered=o.hovered,t.pressed=o.pressed}))}async select(o=!0){this.selected=o;const{label:t,value:e}=this;this.balOptionChange.emit({label:t,value:e,selected:o})}get interactionChildElements(){return Array.from(this.el.querySelectorAll("bal-check"))}render(){const t=d.block("option");return o(r,{key:"dca805aa021ad35c2ea4153008a8a5ba4f37931c",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("checkbox").class(this.checkbox)),t.modifier("focused").class(this.focused)),t.modifier("invalid").class(this.invalid)),t.modifier("selected").class(this.selected)),t.modifier("disabled").class(this.disabled)),t.modifier("hidden").class(this.hidden)),role:"option",id:this.inputId,"data-value":this.value,"data-label":this.label,"aria-label":this.label,"aria-hidden":j(this.hidden),"aria-selected":j(this.selected),"aria-checked":j(this.selected),"aria-disabled":j(this.disabled),"aria-invalid":j(this.invalid),tabIndex:-1,onClick:this.onClick},o("bal-stack",{key:"cfcf978a82159a6e7ad2dcddccdb40dd6b9f74a4",py:"small",space:"x-small"},this.checkbox?o("bal-check",{checked:this.selected,disabled:this.disabled,invalid:this.invalid,hovered:this.interactionState.hovered,pressed:this.interactionState.pressed,tabindex:-1}):"",o("div",{key:"e92a9c019432d29f6153371daca316c8136c75e9",class:Object.assign(Object.assign({},t.element("inner").class()),t.element("inner").modifier("multiline").class(this.multiline))},o("slot",{key:"639a99194ed6e86787e9eb2b3adc993161d58a07"})),this.selected&&!this.checkbox?o("bal-icon",{name:"check",size:"small",color:this.disabled?"grey":this.invalid?"danger":"primary"}):""))}get el(){return a(this)}};i([v("bal-option"),n("design:type",Function),n("design:paramtypes",[Function]),n("design:returntype",void 0)],Q.prototype,"createLogger",null),i([T(),n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],Q.prototype,"elementStateListener",null);let X=0;Q.style=":root{--bal-option-padding-x:var(--bal-space-small);--bal-option-min-height:1.5rem;--bal-option-background:var(--bal-color-white);--bal-option-background-hovered:var(--bal-color-grey-3);--bal-option-background-selected:var(--bal-color-primary-1);--bal-option-background-selected-hovered:#dddfeb;--bal-option-background-invalid:var(--bal-color-danger-1);--bal-option-background-invalid-hovered:#fbe0de;--bal-option-border-width:var(--bal-border-width-normal);--bal-option-border-color:var(--bal-color-grey-2);--bal-option-font-family:var(--bal-font-family-text);--bal-option-font-weight:var(--bal-font-weight-regular);--bal-option-line-height:1.125rem;--bal-option-text-hovered:var(--bal-color-text-primary-hovered);--bal-option-text-pressed:var(--bal-color-text-primary-pressed);--bal-option-text-disabled:var(--bal-color-text-grey-light)}.bal-option{font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block;list-style:none;cursor:pointer;border-bottom-width:var(--bal-option-border-width);border-bottom-color:var(--bal-option-border-color);border-bottom-style:solid;background:var(--bal-option-background);padding-left:var(--bal-option-padding-x);padding-right:var(--bal-option-padding-x);min-height:var(--bal-option-min-height)}.bal-option>bal-stack{min-height:var(--bal-option-min-height)}.bal-option:last-child{border-bottom:none}.bal-option::-moz-focus-inner{border:none}.bal-option--hidden{display:none;visibility:hidden}.bal-option__inner{font-family:var(--bal-option-font-family);font-weight:var(--bal-option-font-weight);line-height:var(--bal-option-line-height);word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-ms-flex:1;flex:1}.bal-option__inner--multiline{white-space:normal}.bal-option--focused{background:var(--bal-option-background-hovered)}@media (hover: hover)and (pointer: fine){.bal-option:hover{background:var(--bal-option-background-hovered);color:var(--bal-option-text-hovered)}}.bal-option:active{background:var(--bal-option-background-hovered);color:var(--bal-option-text-pressed)}.bal-option--selected{background:var(--bal-option-background-selected)}@media (hover: hover)and (pointer: fine){.bal-option--selected:hover{background:var(--bal-option-background-selected-hovered)}}.bal-option--selected:active{background:var(--bal-option-background-selected-hovered)}.bal-option--selected .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--selected.bal-option--focused{background:var(--bal-option-background-selected-hovered)}.bal-option--selected.bal-option--focused .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--invalid{background:var(--bal-option-background-invalid)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover{background:var(--bal-option-background-invalid-hovered)}}.bal-option--invalid:active{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid.bal-option--focused{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid .bal-option__inner{color:var(--bal-color-text-danger-hovered)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover .bal-option__inner{color:var(--bal-color-text-danger-hovered)}}.bal-option--invalid:active .bal-option__inner{color:var(--bal-color-text-danger-pressed)}.bal-option--disabled,.bal-option--disabled.bal-option--focused{background:var(--bal-option-background) !important;color:var(--bal-option-text-disabled) !important;cursor:default !important}.bal-option--disabled:hover,.bal-option--disabled.bal-option--focused:hover{background:var(--bal-option-background) !important}.bal-option{--bal-check-size:1.25rem}";const Z=class{constructor(o){t(this,o),this.inputId="bal-option-list-"+J++,this.inheritAttributes={},this.ariaForm=p,this.multiple=!1,this.disabled=!1,this.required=!1,this.focusIndex=-1,this.filter="includes",this.contentHeight=262}createLogger(o){this.log=o}contentHeightChanged(o){void 0===o?this.el.style.removeProperty("--bal-option-list-max-height"):this.el.style.setProperty("--bal-option-list-max-height",`${o}px`)}componentDidLoad(){this.contentHeightChanged(this.contentHeight)}componentWillRender(){this.inheritAttributes=l(this.el,["aria-multiselectable","aria-labelledby"])}listenToMouseEnter(o){const t=this.options,e=this.getOptionIndex(t,o.detail.value);void 0!==e&&this.updateFocus(t,e)}listenToOptionChange({detail:o}){this.multiple||this.options.filter((t=>t.value!==o.value)).forEach((o=>o.selected=!1))}async focusSelected(){const o=this.options,t=this.getSelectedOptionIndex(o);return t>0?(this.updateFocus(o,t),await c(),t):await this.focusFirst()}async focusFirst(){const o=this.options,t=this.getFirstOptionIndex(o);return this.updateFocus(o,t),this.updateScrollTopPosition(o[t]),await c(),t}async focusLast(){const o=this.options,t=this.getLastOptionIndex(o);return this.updateFocus(o,t),this.updateScrollBottomPosition(o[t]),await c(),t}async focusNext(){const o=this.options,t=this.getNextOptionIndex(o);return this.updateFocus(o,t),this.updateScrollBottomPosition(o[t]),await c(),t}async focusPrevious(){const o=this.options,t=this.getPreviousOptionIndex(o);return this.updateFocus(o,t),this.updateScrollTopPosition(o[t]),await c(),t}async focusByLabel(o,t){const e=this.options,r=this.getOptionIndexByLabel(e,o);this.updateFocus(e,r);const a=e[r];return this.updateScrollTopPosition(a),await c(),t.select&&await a.select(),r}async filterByContent(o){return this.filterOptions(this.allOptions,o),await c(),this.focusFirst()}async resetHidden(o=!1){this.options.forEach((t=>t.hidden=o)),await c(),this.resetFocus()}async resetSelected(o=!1){this.options.forEach((t=>t.selected=o)),await c()}async updateSelected(o){this.options.forEach((t=>t.selected=o.includes(t.value))),await c()}async resetFocus(){return this.updateFocus(this.options,-1),this.scrollTo(0),await c(),-1}async getSelectedValues(){return this.options.filter((o=>o.selected)).map((o=>o.value))}async getSelectedOptions(o){const t=this.options;return o&&o.length>0?t.filter((t=>o.includes(t.value))).map((o=>o)):t.filter((o=>o.selected)).map((o=>o))}async getValues(){return this.options.map((o=>o.value))}async getLabels(){return this.options.map((o=>o.label))}async getOptions(){return this.options.filter((o=>!o.disabled||!o.hidden))}async selectByFocus(){const o=this.options[this.focusIndex];o&&o.select(!this.multiple||!o.selected)}async setAriaForm(o){this.ariaForm=Object.assign({},o)}get options(){return Array.from(this.el.querySelectorAll("bal-option")).filter((o=>!o.hidden))}get allOptions(){return Array.from(this.el.querySelectorAll("bal-option"))}filterOptions(o,t){const e=[],r="includes"===this.filter?D:I;for(let a=0;a<o.length;a++){const i=o[a];r(i.textContent||"",t)?(e.push(i),i.hidden=!1):i.hidden=!0}return e}isOptionVisible(o){const t=this.el.scrollTop;return t<=o.offsetTop&&o.offsetTop+o.clientHeight<=t+this.el.clientHeight}updateScrollTopPosition(o){o&&(this.isOptionVisible(o)||this.scrollTo(this.getScrollTopForTopPosition(o)))}updateScrollBottomPosition(o){o&&(this.isOptionVisible(o)||this.scrollTo(this.getScrollTopForBottomPosition(o)))}getScrollTopForTopPosition(o){const t=o.offsetTop;return t<0?0:t}getScrollTopForBottomPosition(o){const t=o.offsetTop+o.clientHeight-this.el.clientHeight;return t<0?0:t}async scrollTo(o){null!=o&&(void 0!==this.focusRaf&&cancelAnimationFrame(this.focusRaf),this.focusRaf=m((async()=>{this.el.scrollTop=o})))}updateFocus(o,t){this.focusIndex=t;for(let e=0;e<o.length;e++)o[e].focused=e===t}getOptionIndex(o,t){for(let e=0;e<o.length;e++)if(o[e].value===t)return e}getSelectedOptionIndex(o){for(let t=0;t<o.length;t++){const e=o[t];if(e.selected&&!e.hidden)return t}return this.focusIndex}getFirstOptionIndex(o){for(let t=0;t<o.length;t++){const e=o[t];if(!e.disabled&&!e.hidden)return t}return this.focusIndex}getNextOptionIndex(o,t=this.focusIndex){if(t<0)return this.getFirstOptionIndex(o);let e=t;return t<this.getLength(o)&&(e=t+1,o[e].disabled)?this.getNextOptionIndex(o,e):e}getPreviousOptionIndex(o,t=this.focusIndex){const e=this.getFirstOptionIndex(o);if(t<=e)return e;let r=t;return r=t-1,o[r].disabled?this.getPreviousOptionIndex(o,r):r}getLastOptionIndex(o){for(let t=o.length-1;t>=0;t--)if(!o[t].disabled)return t;return this.focusIndex}getOptionIndexByLabel(o,t){if(void 0===t||""===t)return this.focusIndex;const e=o.find((o=>I(o.label||"",t)));return!g(e)&&e.id?o.indexOf(e):this.focusIndex}getLength(o){const t=o.map(((o,t)=>o.disabled?0:t));return Math.max(...t)}render(){const t=d.block("option-list"),e=this.labelledby||this.ariaForm.labelId;return o(r,{key:"bcb9ee55aefe68beac309225d1127524f327f9da",class:Object.assign({},t.class()),id:this.inputId},o("div",Object.assign({key:"ac14c8a5615c6497569ca0aa8436dda3924babf6",role:"listbox","aria-labelledby":e,"aria-disabled":j(this.disabled),class:Object.assign({},t.element("container").class())},this.inheritAttributes),o("slot",{key:"869656387e53fd832b45141cb3b5b89684e61727"})))}get el(){return a(this)}static get watchers(){return{contentHeight:["contentHeightChanged"]}}};i([v("bal-option-list"),n("design:type",Function),n("design:paramtypes",[Function]),n("design:returntype",void 0)],Z.prototype,"createLogger",null);let J=0;Z.style=".bal-option-list{display:block;position:relative;width:100%;list-style:none;margin:0;outline:0;max-height:var(--bal-option-list-max-height);border-radius:var(--bal-radius-normal);overflow:hidden auto}";export{N as bal_dropdown,Q as bal_option,Z as bal_option_list}
|
|
1
|
+
import{h as o,r as t,c as e,H as r,g as a}from"./p-BdVwMG9u.js";import{_ as i,a as n}from"./p-dfXERft2.js";import{i as l}from"./p-C4sZQbkT.js";import{B as d}from"./p-ByiN-QjD.js";import{b as s}from"./p-B1u-Mq75.js";import{d as p}from"./p-FCLKfv6B.js";import{s as b}from"./p-CpDHeXfo.js";import{r as h,a as c,o as u,p as _,b as w,m}from"./p-Ba5qjFjW.js";import{L as v}from"./p-D7ovid3w.js";import{i as g}from"./p-xbSOW78W.js";import{a as f}from"./p-BAaDJIzy.js";import{F as y}from"./p-DqCbGYzv.js";import{b as x}from"./p-CAb2C8az.js";import{D as k}from"./p-BLp4ll3i.js";import{a as j}from"./p-DBsOHTWj.js";import{d as O}from"./p-CBkFUwrD.js";import{d as C,b as F,a as L,j as z,i as B}from"./p-BERg8BNc.js";import{L as S}from"./p-B-L34nz8.js";import{B as A,L as T}from"./p-CeRECGC7.js";import{i as D,s as I}from"./p-BG4j3FEv.js";import"./p-D7M-7v58.js";import"./p-BFTU3MAI.js";import"./p-BnVL_HEz.js";import"./p-C20cwFWy.js";class V{constructor(){this.handleAutoFill=async o=>{if(b(o),this.isAutoFillAllowed()){this.component.isAutoFilled=!0;const o=this.component.nativeEl.value,t=await this.parseAutoFillValueWithOptions(o);if(void 0===t)return void(this.component.isAutoFilled=!1);f(t,this.component.rawValue)||this.component.valueUtil.updateRawValueBySelection(t,!0)}}}connectedCallback(o){this.component=o}isAutoFillAllowed(){return!this.component.multiple}async parseAutoFillValueWithOptions(o){const t=await this.component.listEl.getOptions();for(let e=0;e<t.length;e++){const r=t[e];if(r.value===o||r.label===o)return[r.value]}}}const E={de:{clearable:"Löschen",open:"Öffnen",close:"Schließen"},en:{clearable:"clear",open:"Open",close:"Close"},fr:{clearable:"Effacer",open:"Ouvrir",close:"Fermer"},it:{clearable:"Cancellare",open:"Apri",close:"Chiudi"},nl:{clearable:"Wissen",open:"Open",close:"Sluiten"},es:{clearable:"Limpiar",open:"Abrir",close:"Cerrar"},pl:{clearable:"Wyczyść",open:"Otwórz",close:"Zamknij"},pt:{clearable:"Limpar",open:"Abrir",close:"Fechar"},sv:{clearable:"Rensa",open:"Öppna",close:"Stäng"},fi:{clearable:"Tyhjennä",open:"Avaa",close:"Sulje"}};class R{constructor(){this.handlePointerDown=()=>{this.component.isKeyboardMode=!1},this.handleKeydown=o=>{this.component.isKeyboardMode=y.includes(o.key)}}connectedCallback(o){this.component=o}handleFocus(o){this.component.hasFocus=!0,this.component.balFocus.emit(o)}handleBlur(o){this.component.isExpanded||(this.component.hasFocus=!1,h((()=>this.component.balBlur.emit(o))))}handleClick(o){if(!this.component.valueUtil.isDisabled()){if(this.component.chips&&o.target.closest("bal-close"))return;if(this.component.clearable&&o.target.closest(".bal-dropdown__clear"))return void this.component.valueUtil.updateRawValueBySelection([]);this.component.popupUtil.toggleList()}}handleOutsideClick(o){var t;this.component.isExpanded&&(this.component.el.contains(o.target)||(this.component.isExpanded=!1,null===(t=this.component.listEl)||void 0===t||t.resetFocus(),this.component.hasFocus=!1,h((()=>this.component.balBlur.emit(o)))))}}class W{connectedCallback(o){this.component=o}focusOptionByLabel(o,t={}){this.component.labelToFocus=(this.component.labelToFocus+o).trim(),this.component.labelToFocus.length>0&&(clearTimeout(this.keyHitTimeout),this.keyHitTimeout=setTimeout((()=>{var o;null===(o=this.component.listEl)||void 0===o||o.focusByLabel(this.component.labelToFocus,t)}),100),clearTimeout(this.timeout),this.timeout=setTimeout((async()=>{this.component.labelToFocus=""}),1e3))}}class q{connectedCallback(o){this.component=o,this.component.initialValue=this.component.value}componentDidRender(){this.component.selectEl&&this.component.selectEl.querySelectorAll("option").forEach((o=>{this.component.rawValue.includes(o.value)&&(o.selected=!0)}))}handle(o){const t=o.target;(null==t?void 0:t.contains(this.component.el))&&(this.resetHandlerTimer&&clearTimeout(this.resetHandlerTimer),this.resetHandlerTimer=setTimeout((()=>{const o=this.component.valueUtil.parseValueString(this.component.initialValue);this.component.valueUtil.updateRawValueBySelection(o)}),0))}}const H=({name:t,httpFormSubmit:e,multiple:r,required:a,disabled:i,rawValue:n,refSelectEl:l})=>{const s=d.block("dropdown");return e?o("select",{class:Object.assign({},s.element("root").element("select").class()),"aria-hidden":"true",name:t,multiple:r,required:a,disabled:i,tabindex:-1,ref:l},n.map((t=>o("option",{key:t,value:t,selected:!0},t)))):""},P=({size:t,theme:e,icon:r,language:a,loading:i,clearable:n,invalid:l,filled:s,expanded:p,disabled:b})=>{const h=d.block("dropdown");return i?o("bal-spinner",{class:Object.assign({},h.element("rear").class()),small:!0,variation:"circle",color:"white"}):n&&s&&!b?o("button",{title:E[a].clearable,type:"button",tabIndex:-1,class:Object.assign(Object.assign(Object.assign(Object.assign({},h.element("rear").class()),h.element("clear").class()),h.element("clear").modifier("invalid").class(l)),h.element("clear").modifier("theme-purple").class("purple"===e))},o("bal-icon",{class:Object.assign({},h.element("rear").class()),name:"purple"===e?"close":"close-circle",size:t,color:"purple"===e?"primary":"grey"})):o("bal-icon",{class:Object.assign({},h.element("rear").class()),name:r,size:t,turn:p,color:b?"grey":l?"danger":"primary"})},$=({inputId:t,httpFormSubmit:e,ariaForm:r,rawValue:a,autocomplete:i,required:n,disabled:l,readonly:s,placeholder:p,expanded:b,invalid:h,language:c,inputLabel:u,inheritedAttributes:_,refInputEl:w,onChange:m,onFocus:v,onBlur:g,onKeyDown:f})=>{const y=d.block("dropdown"),x=()=>o("input",Object.assign({id:r.controlId||`${t}-ctrl`,class:Object.assign({},y.element("root").element("input").class()),type:"text",size:1,inputmode:"none",tabindex:"0",autoComplete:i,value:a.join(","),required:n,disabled:l,readonly:s,placeholder:p,title:b?E[c].close:E[c].open,"aria-label":b?E[c].close:E[c].open,"aria-owns":`${t}-menu`,"aria-invalid":j(h),"aria-disabled":j(l||s),"aria-labelledby":r.labelId,"aria-describedby":r.messageId,"aria-haspopup":"listbox","data-native":!0,"data-label":u,"data-value":a.join(","),ref:o=>w(o),onChange:o=>m(o),onFocus:o=>v(o),onBlur:o=>g(o),onKeyDown:o=>f(o)},_));return e?o(x,null):o("form",{novalidate:!0},o(x,null))};class M{constructor(){this.updatePanelPosition=(o,t,e)=>()=>{o.computePosition(t,e,{placement:"bottom-start",middleware:[o.flip(),o.shift()]}).then((({x:o,y:t})=>{Object.assign(e.style,{left:`${o}px`,top:`${t}px`})}))}}connectedCallback(o){this.component=o}toggleList(){this.component.valueUtil.isDisabled()||(this.component.isExpanded?this.collapseList():this.expandList())}async expandList(){var o;if(this.component.panelEl){const o=await x.load();this.component.panelCleanup=o.autoUpdate(this.component.el,this.component.panelEl,this.updatePanelPosition(o,this.component.el,this.component.panelEl))}this.component.isExpanded=!0,await(null===(o=this.component.listEl)||void 0===o?void 0:o.focusSelected())}collapseList(){var o;this.component.isExpanded=!1,null===(o=this.component.listEl)||void 0===o||o.resetFocus(),this.component.panelCleanup&&this.component.panelCleanup()}}class G{connectedCallback(o){this.component=o}componentDidLoad(){setTimeout((()=>this.valueChanged(this.component.value,void 0)),0)}isDisabled(){return this.component.disabled||this.component.readonly}isFilled(){return this.component.rawValue&&this.component.rawValue.length>0}valueChanged(o,t){const e=typeof o;e!==typeof t&&this.updateRawValueByValueProp(o),"string"===e&&o!==t&&this.updateRawValueByValueProp(o),Array.isArray(o)&&Array.isArray(t)&&!f(o,t)&&this.updateRawValueByValueProp(o)}updateRawValueBySelection(o=[],t=!1){this.component.isAutoFilled=t,this.updateRawValue(o),this.component.balChange.emit(this.component.multiple?this.component.rawValue:this.component.rawValue[0])}parseValueString(o=[]){let t=[];return g(o)||""===o||(t=Array.isArray(o)?[...o.filter((o=>!g(o)))]:o.split("").includes(",")?[...o.split(",").filter((o=>o)).map((o=>o.trim()))]:[o]),t}updateRawValueByValueProp(o=[]){const t=this.parseValueString(o);this.updateRawValue(t)}async updateRawValue(o=[]){this.component.rawValue=o,this.component.listEl&&await this.component.listEl.updateSelected(this.component.rawValue),await this.updateInputContent()}removeOption(o){const t=this.component.rawValue.filter((t=>t!==o.value));this.updateRawValueBySelection(t)}async updateInputContent(){await c(),this.component.listEl&&(this.component.choices=await this.component.listEl.getSelectedOptions(this.component.rawValue),this.component.inputLabel=this.component.choices.map((o=>o.label.trim())).sort().join(","))}}const K=({inlineLabel:t,filled:e,chips:r,placeholder:a,choices:i,renderChip:n})=>{const l=d.block("dropdown");return e?r?o("div",{class:Object.assign({},l.element("root").element("content").element("chips").class())},i.map((o=>n(o)))):(t&&`${t}: `)+i.map((o=>o.label)).join(", "):a},N=class{constructor(o){t(this,o),this.balChange=e(this,"balChange"),this.balFocus=e(this,"balFocus"),this.balBlur=e(this,"balBlur"),this.inputId="bal-dropdown-"+U++,this.inheritedAttributes={},this.initialValue=[],this.nativeOptions=[],this.rawOptions=[],this.choices=[],this.rawValue=[],this.hasFocus=!1,this.isExpanded=!1,this.isAutoFilled=!1,this.isKeyboardMode=!1,this.inputLabel="",this.ariaForm=p,this.language=O.language,this.region=O.region,this.httpFormSubmit=O.httpFormSubmit,this.labelToFocus="",this.valueUtil=new G,this.eventsUtil=new R,this.popupUtil=new M,this.optionUtil=new k,this.formSubmitUtil=new q,this.focusUtil=new W,this.autoFillUtil=new V,this.autocomplete="off",this.name=this.inputId,this.placeholder="",this.inlineLabel="",this.icon="caret-down",this.size="",this.theme="",this.disabled=!1,this.readonly=!1,this.multiple=!1,this.chips=!1,this.clearable=!1,this.invalid=!1,this.required=!1,this.loading=!1,this.filter="includes",this.contentHeight=262,this.inverted=!1,this.options=[],this.value=[],this.hasConnected=!1,this.listenToOptionChange=o=>{this.optionUtil.listenToOptionChange(o)},this.listenOnClickOutside=o=>{this.eventsUtil.handleOutsideClick(o)},this.resetHandler=o=>{this.formSubmitUtil.handle(o)},this.handleAutoFill=async o=>{this.log("(handleAutoFill)",o,this.nativeEl.value),this.autoFillUtil.handleAutoFill(o)},this.handleKeyDown=o=>{var t,e,r,a,i;o&&o.key?this.isExpanded?C(o)?(b(o),null===(t=this.listEl)||void 0===t||t.focusNext()):F(o)?(b(o),null===(e=this.listEl)||void 0===e||e.focusPrevious()):"Home"===o.key||"PageUp"===o.key?(b(o),null===(r=this.listEl)||void 0===r||r.focusFirst()):"End"===o.key||"PageDown"===o.key?(b(o),null===(a=this.listEl)||void 0===a||a.focusLast()):L(o)?(b(o),null===(i=this.listEl)||void 0===i||i.selectByFocus()):"Tab"===o.key||z(o)?this.popupUtil.collapseList():1===o.key.length&&this.focusUtil.focusOptionByLabel(o.key):L(o)||B(o)?(b(o),this.popupUtil.expandList()):1===o.key.length&&this.focusUtil.focusOptionByLabel(o.key,{select:!0}):this.isExpanded&&this.popupUtil.collapseList()}}createLogger(o){this.log=o}async optionChanged(){this.optionUtil.optionChanged()}valueChanged(o,t){this.valueUtil.valueChanged(o,t)}connectedCallback(){this.hasConnected||(this.eventsUtil.connectedCallback(this),this.valueUtil.connectedCallback(this),this.popupUtil.connectedCallback(this),this.optionUtil.connectedCallback(this),this.formSubmitUtil.connectedCallback(this),this.focusUtil.connectedCallback(this),this.autoFillUtil.connectedCallback(this)),u(this.el,"balOptionChange",this.listenToOptionChange),s.hasDocument&&(u(document,"keydown",this.eventsUtil.handleKeydown),u(document,"touchstart",this.eventsUtil.handlePointerDown),u(document,"mousedown",this.eventsUtil.handlePointerDown),u(document,"click",this.listenOnClickOutside),u(document,"reset",this.resetHandler,{capture:!0})),this.hasConnected=!0}disconnectedCallback(){_(this.el,"balOptionChange",this.listenToOptionChange),s.hasDocument&&(_(document,"keydown",this.eventsUtil.handleKeydown),_(document,"touchstart",this.eventsUtil.handlePointerDown),_(document,"mousedown",this.eventsUtil.handlePointerDown),_(document,"click",this.listenOnClickOutside),_(document,"reset",this.resetHandler,{capture:!0}))}async componentWillRender(){this.inheritedAttributes=l(this.el,["tabindex","data-hj-allow"]),await this.optionUtil.componentWillRender()}componentDidRender(){this.formSubmitUtil.componentDidRender()}componentDidLoad(){this.valueUtil.componentDidLoad()}async configChanged(o){this.language=o.language,this.region=o.region,this.httpFormSubmit=o.httpFormSubmit}async setFocus(){this.nativeEl&&!this.valueUtil.isDisabled()&&(await w(),this.nativeEl.focus())}async getValue(){return this.rawValue}async clear(){this.valueUtil.updateRawValueBySelection([])}async open(){!this.valueUtil.isDisabled()&&this.panelEl&&await this.popupUtil.expandList()}async close(){!this.valueUtil.isDisabled()&&this.panelEl&&await this.popupUtil.collapseList()}async select(o){const t=this.valueUtil.parseValueString(o);this.valueUtil.updateRawValueBySelection(t)}async setAriaForm(o){this.ariaForm=Object.assign({},o)}render(){const t=d.block("dropdown"),e=this.valueUtil.isFilled(),a=""!==this.size,i=`size-${this.size}`,n=""!==this.theme,l=`theme-${this.theme}`,s="purple"===this.theme?this.hasFocus&&this.isKeyboardMode:this.hasFocus;return o(r,{key:"3fe05ba6190dabe5fb8c297f4809659f7c24aa74",class:Object.assign({},t.class()),tabindex:"-1",id:`${this.inputId}`},o("div",{key:"e0b038aa5b7ead381d271c5b7b04fd5bbaa3ea3b",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.element("root").class()),t.element("root").modifier("focused").class(s)),t.element("root").modifier("invalid").class(this.invalid)),t.element("root").modifier("disabled").class(this.valueUtil.isDisabled())),t.element("root").modifier("autofill").class(this.isAutoFilled)),t.element("root").modifier(i).class(a)),t.element("root").modifier(l).class(n)),t.element("root").modifier(l+"-filled").class(e&&n)),t.element("root").modifier(l+"-expanded").class(this.isExpanded&&n)),"data-testid":"bal-dropdown-trigger",onClick:o=>this.eventsUtil.handleClick(o)},o("span",{key:"a3499a9e2abcaa3b363385c475c3dcd91ed1a371",class:Object.assign(Object.assign(Object.assign(Object.assign({},t.element("root").element("content").class()),t.element("root").element("content").modifier("disabled").class(this.valueUtil.isDisabled())),t.element("root").element("content").modifier("placeholder").class(!this.valueUtil.isFilled())),t.element("root").element("content").modifier(i).class(a))},o(K,{key:"8ffc980c91386038c4ee9b9e6673a25a3609d674",filled:this.valueUtil.isFilled(),inlineLabel:this.inlineLabel,chips:this.chips,placeholder:this.placeholder,choices:this.choices,renderChip:t=>o("bal-tag",{key:t.value,"data-testid":"bal-dropdown-chip",size:"small",invalid:this.invalid,disabled:this.disabled||this.readonly,closable:!(this.disabled||this.readonly),onBalCloseClick:()=>this.valueUtil.removeOption(t)},t.label)})),o($,{key:"9a97fc39a821d5dcca32eba522ae29e4aa6eedc0",inputId:this.inputId,httpFormSubmit:this.httpFormSubmit,ariaForm:this.ariaForm,rawValue:this.rawValue,autocomplete:this.autocomplete,required:this.required,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,expanded:this.isExpanded,invalid:this.invalid,language:this.language,inputLabel:this.inputLabel,inheritedAttributes:this.inheritedAttributes,refInputEl:o=>this.nativeEl=o,onChange:o=>this.handleAutoFill(o),onFocus:o=>this.eventsUtil.handleFocus(o),onBlur:o=>this.eventsUtil.handleBlur(o),onKeyDown:o=>this.handleKeyDown(o)}),o(H,{key:"2a33a8ac7f336889197137fc741ed8a4a107fceb",name:this.name,httpFormSubmit:this.httpFormSubmit,multiple:this.multiple,required:this.required,disabled:this.valueUtil.isDisabled(),rawValue:this.rawValue,refSelectEl:o=>this.selectEl=o}),o(P,{key:"d0f6958fb47ad7f6d73d4f98482cb2102c344f20",icon:this.icon,size:this.size,theme:this.theme,language:this.language,loading:this.loading,clearable:this.clearable,invalid:this.invalid,expanded:this.isExpanded,filled:e,disabled:this.valueUtil.isDisabled()})),o("div",{key:"29e98d1f54ffb6ee913bd682d6531d45997fc1d0",id:`${this.inputId}-menu`,class:Object.assign(Object.assign({},t.element("list").class()),t.element("list").modifier("expanded").class(this.isExpanded)),ref:o=>this.panelEl=o},o("bal-option-list",{key:"4e6fa69f9d9859208f83dd7bc86c17fc75d5eb60",multiple:this.multiple,disabled:this.valueUtil.isDisabled(),filter:this.filter,required:this.required,contentHeight:this.contentHeight,ref:o=>this.listEl=o},o("slot",{key:"1c169dc692632671f62410b2dadcbbc10b0fe36a"}),this.optionUtil.hasPropOptions()?this.rawOptions.map((t=>o("bal-option",{key:t.value,value:t.value,label:t.label,disabled:t.disabled,multiline:t.multiline,invalid:t.invalid,hidden:t.hidden,selected:t.selected,focused:t.focused},t.label))):"")))}get el(){return a(this)}static get watchers(){return{options:["optionChanged"],value:["valueChanged"]}}};i([v("bal-dropdown"),n("design:type",Function),n("design:paramtypes",[Function]),n("design:returntype",void 0)],N.prototype,"createLogger",null),i([S(),n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",Promise)],N.prototype,"configChanged",null);let U=0;N.style=':root{--bal-dropdown-control-background:var(--bal-color-white);--bal-dropdown-control-background-hover:var(--bal-form-field-control-background-hover);--bal-dropdown-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-dropdown-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-dropdown-control-input-background:var(--bal-color-grey-1);--bal-dropdown-control-native-input-background:transparent;--bal-dropdown-control-native-input-background-hover:transparent;--bal-dropdown-control-input-inverted-footer-background:transparent;--bal-dropdown-control-input-inverted-footer-background-hover:transparent;--bal-dropdown-control-input-multiple-background:transparent;--bal-dropdown-control-input-multiple-background-read-only-selection:transparent;--bal-dropdown-control-input-option-background:transparent;--bal-dropdown-control-input-option-background-selected:var(--bal-color-primary-1);--bal-dropdown-control-input-option-background-focused:var(--bal-color-grey-3);--bal-dropdown-control-input-option-background-hover:var(--bal-color-grey-3);--bal-dropdown-control-border-radius:var(--bal-form-field-control-radius);--bal-dropdown-popover-border-color:var(--bal-color-grey-2);--bal-dropdown-control-border-color:var(--bal-form-field-control-border-color);--bal-dropdown-control-border-color-focused:var(--bal-color-primary);--bal-dropdown-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-dropdown-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-dropdown-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-dropdown-control-border-color-focus-within:var(--bal-color-primary);--bal-dropdown-option-border-top-color:var(--bal-color-grey-2);--bal-dropdown-popover-empty-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color-focused:var(--bal-color-primary);--bal-dropdown-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-dropdown-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-dropdown-option-content-label-text-color:var(--bal-form-field-control-color)}.bal-dropdown{display:block;position:relative;-ms-flex:1;flex:1;width:100%}.bal-dropdown__root{border-width:.125rem;border-style:solid;border-color:var(--bal-dropdown-control-border-color);border-radius:var(--bal-dropdown-control-border-radius);background:var(--bal-dropdown-control-background);font-weight:var(--bal-font-weight-regular);font-size:var(--bal-text-size-normal);font-family:var(--bal-font-family-text);color:var(--bal-dropdown-control-text-color);outline:none;-webkit-box-shadow:var(--bal-shadow-none);box-shadow:var(--bal-shadow-none);padding-right:1rem;height:auto;min-height:3rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:-ms-flexbox;display:flex;width:100%;text-align:left;gap:1rem;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-dropdown__root--autofill{background:#faffbd !important;background:light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important}.bal-dropdown__root>span{-ms-flex:1;flex:1;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bal-dropdown__root--focused{border-color:var(--bal-dropdown-control-border-color-focused)}.bal-dropdown__root--invalid{border-color:var(--bal-dropdown-control-border-color-invalid);background:var(--bal-dropdown-control-background-invalid)}.bal-dropdown__root--disabled{border-color:var(--bal-dropdown-control-border-color-disabled);background:var(--bal-dropdown-control-background-disabled)}.bal-dropdown__root__content--placeholder{color:var(--bal-form-field-control-placeholder-color)}.bal-dropdown__root__content--disabled{color:var(--bal-dropdown-input-text-color-disabled)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root:not(.bal-dropdown__root--disabled):not(.bal-dropdown__root--invalid):not(.bal-dropdown__root--theme-purple):not(.bal-dropdown__root--theme-purple-expanded):hover{background:var(--bal-dropdown-control-background-hover)}}.bal-dropdown__root__content__chips{--bal-tag-size-small-font-size:var(--bal-text-size-normal);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-xx-small);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-x-small)}.bal-dropdown__root__content__chips>bal-tag{z-index:1}.bal-dropdown__root__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:rgba(0,0,0,0);position:absolute;right:var(--bal-border-width-normal);left:var(--bal-border-width-normal);top:var(--bal-border-width-normal);bottom:var(--bal-border-width-normal);opacity:0;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));cursor:pointer}.bal-dropdown__root__input:disabled{cursor:default}.bal-dropdown__root__input:-webkit-autofill{opacity:1}.bal-dropdown__root__input:autofill{opacity:1}.bal-dropdown__root__input:-internal-autofill-selected{opacity:0}.bal-dropdown__root__select{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-dropdown__root--autofill .bal-dropdown__root__input{opacity:0}.bal-dropdown__list{display:none;visibility:hidden;opacity:0;width:100vw;position:absolute;top:0;left:0;will-change:left,top,opacity;background:var(--bal-color-white);border-radius:var(--bal-radius-normal);-webkit-box-shadow:var(--bal-shadow-normal);box-shadow:var(--bal-shadow-normal);z-index:var(--bal-z-index-popup)}@media screen and (min-width: 769px),print{.bal-dropdown__list{max-width:100vw;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:100%}}.bal-dropdown__list--expanded{display:block;visibility:visible;opacity:1}.bal-dropdown__native{bottom:0;left:0;position:absolute;opacity:0;pointer-events:none;width:100%}.bal-dropdown__clear{background:rgba(0,0,0,0);border:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}.bal-dropdown__rear{z-index:1}.bal-dropdown__root--size-small{min-height:2rem}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content--placeholder{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-background-grey-light)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-1)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-purple-2)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled),.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active{border:none;background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--focused.bal-dropdown__root--theme-purple:before{content:"";border-width:var(--bal-border-width-normal);border-style:solid;border-color:var(--bal-focus-shadow-end-color);position:absolute;background:rgba(0,0,0,0);border-radius:var(--bal-radius-normal);top:-0.25rem;bottom:-0.25rem;left:-0.25rem;right:-0.25rem}.bal-dropdown__root__content--size-small{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-bold)}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}';const Q=class{constructor(o){t(this,o),this.balOptionChange=e(this,"balOptionChange"),this.balOptionFocus=e(this,"balOptionFocus"),this.inputId="bal-option-"+X++,this.checkbox=!1,this.interactionState=A.DefaultState,this.label="",this.value="",this.disabled=!1,this.multiline=!1,this.invalid=!1,this.selected=!1,this.focused=!1,this.hidden=!1,this.onClick=o=>{const t=this.el.closest("bal-option-list");this.disabled||t&&t.disabled?b(o):t&&t.required&&!t.multiple?this.selected||this.select(!0):this.select(!this.selected)}}createLogger(o){this.log=o}componentWillRender(){if(this.el){const o=this.el.closest("bal-option-list");o&&(this.checkbox=!!o.multiple)}}listenToMouseEnter(){const{label:o,value:t,selected:e,disabled:r,hidden:a}=this;a||r||this.balOptionFocus.emit({label:o,value:t,selected:e})}elementStateListener(o){this.interactionChildElements.forEach((t=>{t.hovered=o.hovered,t.pressed=o.pressed}))}async select(o=!0){this.selected=o;const{label:t,value:e}=this;this.balOptionChange.emit({label:t,value:e,selected:o})}get interactionChildElements(){return Array.from(this.el.querySelectorAll("bal-check"))}render(){const t=d.block("option");return o(r,{key:"dca805aa021ad35c2ea4153008a8a5ba4f37931c",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("checkbox").class(this.checkbox)),t.modifier("focused").class(this.focused)),t.modifier("invalid").class(this.invalid)),t.modifier("selected").class(this.selected)),t.modifier("disabled").class(this.disabled)),t.modifier("hidden").class(this.hidden)),role:"option",id:this.inputId,"data-value":this.value,"data-label":this.label,"aria-label":this.label,"aria-hidden":j(this.hidden),"aria-selected":j(this.selected),"aria-checked":j(this.selected),"aria-disabled":j(this.disabled),"aria-invalid":j(this.invalid),tabIndex:-1,onClick:this.onClick},o("bal-stack",{key:"cfcf978a82159a6e7ad2dcddccdb40dd6b9f74a4",py:"small",space:"x-small"},this.checkbox?o("bal-check",{checked:this.selected,disabled:this.disabled,invalid:this.invalid,hovered:this.interactionState.hovered,pressed:this.interactionState.pressed,tabindex:-1}):"",o("div",{key:"e92a9c019432d29f6153371daca316c8136c75e9",class:Object.assign(Object.assign({},t.element("inner").class()),t.element("inner").modifier("multiline").class(this.multiline))},o("slot",{key:"639a99194ed6e86787e9eb2b3adc993161d58a07"})),this.selected&&!this.checkbox?o("bal-icon",{name:"check",size:"small",color:this.disabled?"grey":this.invalid?"danger":"primary"}):""))}get el(){return a(this)}};i([v("bal-option"),n("design:type",Function),n("design:paramtypes",[Function]),n("design:returntype",void 0)],Q.prototype,"createLogger",null),i([T(),n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],Q.prototype,"elementStateListener",null);let X=0;Q.style=":root{--bal-option-padding-x:var(--bal-space-small);--bal-option-min-height:1.5rem;--bal-option-background:var(--bal-color-white);--bal-option-background-hovered:var(--bal-color-grey-3);--bal-option-background-selected:var(--bal-color-primary-1);--bal-option-background-selected-hovered:#dddfeb;--bal-option-background-invalid:var(--bal-color-danger-1);--bal-option-background-invalid-hovered:#fbe0de;--bal-option-border-width:var(--bal-border-width-normal);--bal-option-border-color:var(--bal-color-grey-2);--bal-option-font-family:var(--bal-font-family-text);--bal-option-font-weight:var(--bal-font-weight-regular);--bal-option-line-height:1.125rem;--bal-option-text-hovered:var(--bal-color-text-primary-hovered);--bal-option-text-pressed:var(--bal-color-text-primary-pressed);--bal-option-text-disabled:var(--bal-color-text-grey-light)}.bal-option{font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block;list-style:none;cursor:pointer;border-bottom-width:var(--bal-option-border-width);border-bottom-color:var(--bal-option-border-color);border-bottom-style:solid;background:var(--bal-option-background);padding-left:var(--bal-option-padding-x);padding-right:var(--bal-option-padding-x);min-height:var(--bal-option-min-height)}.bal-option>bal-stack{min-height:var(--bal-option-min-height)}.bal-option:last-child{border-bottom:none}.bal-option::-moz-focus-inner{border:none}.bal-option--hidden{display:none;visibility:hidden}.bal-option__inner{font-family:var(--bal-option-font-family);font-weight:var(--bal-option-font-weight);line-height:var(--bal-option-line-height);word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-ms-flex:1;flex:1}.bal-option__inner--multiline{white-space:normal}.bal-option--focused{background:var(--bal-option-background-hovered)}@media (hover: hover)and (pointer: fine){.bal-option:hover{background:var(--bal-option-background-hovered);color:var(--bal-option-text-hovered)}}.bal-option:active{background:var(--bal-option-background-hovered);color:var(--bal-option-text-pressed)}.bal-option--selected{background:var(--bal-option-background-selected)}@media (hover: hover)and (pointer: fine){.bal-option--selected:hover{background:var(--bal-option-background-selected-hovered)}}.bal-option--selected:active{background:var(--bal-option-background-selected-hovered)}.bal-option--selected .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--selected.bal-option--focused{background:var(--bal-option-background-selected-hovered)}.bal-option--selected.bal-option--focused .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--invalid{background:var(--bal-option-background-invalid)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover{background:var(--bal-option-background-invalid-hovered)}}.bal-option--invalid:active{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid.bal-option--focused{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid .bal-option__inner{color:var(--bal-color-text-danger-hovered)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover .bal-option__inner{color:var(--bal-color-text-danger-hovered)}}.bal-option--invalid:active .bal-option__inner{color:var(--bal-color-text-danger-pressed)}.bal-option--disabled,.bal-option--disabled.bal-option--focused{background:var(--bal-option-background) !important;color:var(--bal-option-text-disabled) !important;cursor:default !important}.bal-option--disabled:hover,.bal-option--disabled.bal-option--focused:hover{background:var(--bal-option-background) !important}.bal-option{--bal-check-size:1.25rem}";const Z=class{constructor(o){t(this,o),this.inputId="bal-option-list-"+J++,this.inheritAttributes={},this.ariaForm=p,this.multiple=!1,this.disabled=!1,this.required=!1,this.focusIndex=-1,this.filter="includes",this.contentHeight=262}createLogger(o){this.log=o}contentHeightChanged(o){void 0===o?this.el.style.removeProperty("--bal-option-list-max-height"):this.el.style.setProperty("--bal-option-list-max-height",`${o}px`)}componentDidLoad(){this.contentHeightChanged(this.contentHeight)}componentWillRender(){this.inheritAttributes=l(this.el,["aria-multiselectable","aria-labelledby"])}listenToMouseEnter(o){const t=this.options,e=this.getOptionIndex(t,o.detail.value);void 0!==e&&this.updateFocus(t,e)}listenToOptionChange({detail:o}){this.multiple||this.options.filter((t=>t.value!==o.value)).forEach((o=>o.selected=!1))}async focusSelected(){const o=this.options,t=this.getSelectedOptionIndex(o);return t>0?(this.updateFocus(o,t),await c(),t):await this.focusFirst()}async focusFirst(){const o=this.options,t=this.getFirstOptionIndex(o);return this.updateFocus(o,t),this.updateScrollTopPosition(o[t]),await c(),t}async focusLast(){const o=this.options,t=this.getLastOptionIndex(o);return this.updateFocus(o,t),this.updateScrollBottomPosition(o[t]),await c(),t}async focusNext(){const o=this.options,t=this.getNextOptionIndex(o);return this.updateFocus(o,t),this.updateScrollBottomPosition(o[t]),await c(),t}async focusPrevious(){const o=this.options,t=this.getPreviousOptionIndex(o);return this.updateFocus(o,t),this.updateScrollTopPosition(o[t]),await c(),t}async focusByLabel(o,t){const e=this.options,r=this.getOptionIndexByLabel(e,o);this.updateFocus(e,r);const a=e[r];return this.updateScrollTopPosition(a),await c(),t.select&&await a.select(),r}async filterByContent(o){return this.filterOptions(this.allOptions,o),await c(),this.focusFirst()}async resetHidden(o=!1){this.options.forEach((t=>t.hidden=o)),await c(),this.resetFocus()}async resetSelected(o=!1){this.options.forEach((t=>t.selected=o)),await c()}async updateSelected(o){this.options.forEach((t=>t.selected=o.includes(t.value))),await c()}async resetFocus(){return this.updateFocus(this.options,-1),this.scrollTo(0),await c(),-1}async getSelectedValues(){return this.options.filter((o=>o.selected)).map((o=>o.value))}async getSelectedOptions(o){const t=this.options;return o&&o.length>0?t.filter((t=>o.includes(t.value))).map((o=>o)):t.filter((o=>o.selected)).map((o=>o))}async getValues(){return this.options.map((o=>o.value))}async getLabels(){return this.options.map((o=>o.label))}async getOptions(){return this.options.filter((o=>!o.disabled||!o.hidden))}async selectByFocus(){const o=this.options[this.focusIndex];o&&o.select(!this.multiple||!o.selected)}async setAriaForm(o){this.ariaForm=Object.assign({},o)}get options(){return Array.from(this.el.querySelectorAll("bal-option")).filter((o=>!o.hidden))}get allOptions(){return Array.from(this.el.querySelectorAll("bal-option"))}filterOptions(o,t){const e=[],r="includes"===this.filter?D:I;for(let a=0;a<o.length;a++){const i=o[a];r(i.textContent||"",t)?(e.push(i),i.hidden=!1):i.hidden=!0}return e}isOptionVisible(o){const t=this.el.scrollTop;return t<=o.offsetTop&&o.offsetTop+o.clientHeight<=t+this.el.clientHeight}updateScrollTopPosition(o){o&&(this.isOptionVisible(o)||this.scrollTo(this.getScrollTopForTopPosition(o)))}updateScrollBottomPosition(o){o&&(this.isOptionVisible(o)||this.scrollTo(this.getScrollTopForBottomPosition(o)))}getScrollTopForTopPosition(o){const t=o.offsetTop;return t<0?0:t}getScrollTopForBottomPosition(o){const t=o.offsetTop+o.clientHeight-this.el.clientHeight;return t<0?0:t}async scrollTo(o){null!=o&&(void 0!==this.focusRaf&&cancelAnimationFrame(this.focusRaf),this.focusRaf=m((async()=>{this.el.scrollTop=o})))}updateFocus(o,t){this.focusIndex=t;for(let e=0;e<o.length;e++)o[e].focused=e===t}getOptionIndex(o,t){for(let e=0;e<o.length;e++)if(o[e].value===t)return e}getSelectedOptionIndex(o){for(let t=0;t<o.length;t++){const e=o[t];if(e.selected&&!e.hidden)return t}return this.focusIndex}getFirstOptionIndex(o){for(let t=0;t<o.length;t++){const e=o[t];if(!e.disabled&&!e.hidden)return t}return this.focusIndex}getNextOptionIndex(o,t=this.focusIndex){if(t<0)return this.getFirstOptionIndex(o);let e=t;return t<this.getLength(o)&&(e=t+1,o[e].disabled)?this.getNextOptionIndex(o,e):e}getPreviousOptionIndex(o,t=this.focusIndex){const e=this.getFirstOptionIndex(o);if(t<=e)return e;let r=t;return r=t-1,o[r].disabled?this.getPreviousOptionIndex(o,r):r}getLastOptionIndex(o){for(let t=o.length-1;t>=0;t--)if(!o[t].disabled)return t;return this.focusIndex}getOptionIndexByLabel(o,t){if(void 0===t||""===t)return this.focusIndex;const e=o.find((o=>I(o.label||"",t)));return!g(e)&&e.id?o.indexOf(e):this.focusIndex}getLength(o){const t=o.map(((o,t)=>o.disabled?0:t));return Math.max(...t)}render(){const t=d.block("option-list"),e=this.labelledby||this.ariaForm.labelId;return o(r,{key:"bcb9ee55aefe68beac309225d1127524f327f9da",class:Object.assign({},t.class()),id:this.inputId},o("div",Object.assign({key:"ac14c8a5615c6497569ca0aa8436dda3924babf6",role:"listbox","aria-labelledby":e,"aria-disabled":j(this.disabled),class:Object.assign({},t.element("container").class())},this.inheritAttributes),o("slot",{key:"869656387e53fd832b45141cb3b5b89684e61727"})))}get el(){return a(this)}static get watchers(){return{contentHeight:["contentHeightChanged"]}}};i([v("bal-option-list"),n("design:type",Function),n("design:paramtypes",[Function]),n("design:returntype",void 0)],Z.prototype,"createLogger",null);let J=0;Z.style=".bal-option-list{display:block;position:relative;width:100%;list-style:none;margin:0;outline:0;max-height:var(--bal-option-list-max-height);border-radius:var(--bal-radius-normal);overflow:hidden auto}";export{N as bal_dropdown,Q as bal_option,Z as bal_option_list}
|