@genesislcap/foundation-rapid-cdn 15.3.0 → 15.3.2
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.
|
@@ -32,7 +32,7 @@ var Eo=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","a
|
|
|
32
32
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
33
33
|
PERFORMANCE OF THIS SOFTWARE.
|
|
34
34
|
***************************************************************************** */
|
|
35
|
-
function _d(e,t,i,c){var o,s=arguments.length,a=s<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,i):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,c);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}Qt.compose({baseName:"accordion-item",template:st,styles:Hd,collapsedIcon:'\n <svg\n width="20"\n height="20"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M16.22 3H3.78a.78.78 0 00-.78.78v12.44c0 .43.35.78.78.78h12.44c.43 0 .78-.35.78-.78V3.78a.78.78 0 00-.78-.78zM3.78 2h12.44C17.2 2 18 2.8 18 3.78v12.44c0 .98-.8 1.78-1.78 1.78H3.78C2.8 18 2 17.2 2 16.22V3.78C2 2.8 2.8 2 3.78 2zM11 9h3v2h-3v3H9v-3H6V9h3V6h2v3z"\n />\n </svg>\n ',expandedIcon:'\n <svg\n width="20"\n height="20"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M3.78 3h12.44c.43 0 .78.35.78.78v12.44c0 .43-.35.78-.78.78H3.78a.78.78 0 01-.78-.78V3.78c0-.43.35-.78.78-.78zm12.44-1H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.78-.8 1.78-1.78V3.78C18 2.8 17.2 2 16.22 2zM14 9H6v2h8V9z"\n />\n </svg>\n '}),Ai.compose({baseName:"accordion",template:Xt,styles:Dd});const Pd="box-shadow: 0 0 calc((var(--elevation) * 0.225px) + 2px) rgba(0, 0, 0, calc(.11 * (2 - var(--background-luminance, 1)))), 0 calc(var(--elevation) * 0.4px) calc((var(--elevation) * 0.9px)) rgba(0, 0, 0, calc(.13 * (2 - var(--background-luminance, 1))));",Vd=Me` ${Xa("inline-flex")} :host{font-family: ${nr};outline: none;font-size: ${br};line-height: ${yr};height: calc(${Fd} * 1px);min-width: calc(${Fd} * 1px);background-color: ${Jl};color: ${kd};border-radius: calc(${hr} * 1px);fill: currentcolor;cursor: pointer}.control{background: transparent;height: inherit;flex-grow: 1;box-sizing: border-box;display: inline-flex;justify-content: center;align-items: baseline;padding: 0 calc((10 + (${fr} * 2 * ${ur})) * 1px);white-space: nowrap;outline: none;text-decoration: none;border: calc(${gr} * 1px) solid transparent;color: inherit;border-radius: inherit;fill: inherit;cursor: inherit;font-weight: inherit;font-family: inherit;font-size: inherit;line-height: inherit}:host(:hover){background-color: ${ed}}:host(:active){background-color: ${td}}.control:${Ja}{border-color: ${Cd};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset}.control::-moz-focus-inner{border: 0}.start, .content, .end{align-self: center}.start, .end{display: flex}.control.icon-only{padding: 0;line-height: 0}::slotted(svg){${""} width: 16px;height: 16px;pointer-events: none}.start{margin-inline-end: 11px}.end{margin-inline-start: 11px}`.withBehaviors(Ka(Me` :host .control{background-color: ${Ei.ButtonFace};border-color: ${Ei.ButtonText};color: ${Ei.ButtonText};fill: currentColor}:host(:hover) .control{forced-color-adjust: none;background-color: ${Ei.Highlight};color: ${Ei.HighlightText}}.control:${Ja}{forced-color-adjust: none;background-color: ${Ei.Highlight};border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Ei.ButtonText} inset;color: ${Ei.HighlightText}}.control:hover, :host([appearance="outline"]) .control:hover{border-color: ${Ei.ButtonText}}:host([href]) .control{border-color: ${Ei.LinkText};color: ${Ei.LinkText}}:host([href]) .control:hover, :host([href]) .control:${Ja}{forced-color-adjust: none;background: ${Ei.ButtonFace};border-color: ${Ei.LinkText};box-shadow: 0 0 0 1px ${Ei.LinkText} inset;color: ${Ei.LinkText};fill: currentColor}`)),Bd=Me` :host([appearance="accent"]){background: ${Al};color: ${Fl}}:host([appearance="accent"]:hover){background: ${Ol};color: ${Hl}}:host([appearance="accent"]:active) .control:active{background: ${Tl};color: ${_l}}:host([appearance="accent"]) .control:${Ja}{box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset, 0 0 0 calc((${vr} + ${gr}) * 1px) ${xd} inset}`.withBehaviors(Ka(Me` :host([appearance="accent"]) .control{forced-color-adjust: none;background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([appearance="accent"]) .control:hover, :host([appearance="accent"]:active) .control:active{background: ${Ei.HighlightText};border-color: ${Ei.Highlight};color: ${Ei.Highlight}}:host([appearance="accent"]) .control:${Ja}{border-color: ${Ei.Highlight};box-shadow: 0 0 0 calc(${vr} * 1px) ${Ei.HighlightText} inset}:host([appearance="accent"][href]) .control{background: ${Ei.LinkText};color: ${Ei.HighlightText}}:host([appearance="accent"][href]) .control:hover{background: ${Ei.ButtonFace};border-color: ${Ei.LinkText};box-shadow: none;color: ${Ei.LinkText};fill: currentColor}:host([appearance="accent"][href]) .control:${Ja}{border-color: ${Ei.LinkText};box-shadow: 0 0 0 calc(${vr} * 1px) ${Ei.HighlightText} inset}`)),Ud=Me` :host([appearance="hypertext"]){font-size: inherit;line-height: inherit;height: auto;min-width: 0;background: transparent}:host([appearance="hypertext"]) .control{display: inline;padding: 0;border: none;box-shadow: none;border-radius: 0;line-height: 1}:host a.control:not(:link){background-color: transparent;cursor: default}:host([appearance="hypertext"]) .control:link, :host([appearance="hypertext"]) .control:visited{background: transparent;color: ${Yl};border-bottom: calc(${gr} * 1px) solid ${Yl}}:host([appearance="hypertext"]:hover), :host([appearance="hypertext"]) .control:hover{background: transparent;border-bottom-color: ${Kl}}:host([appearance="hypertext"]:active), :host([appearance="hypertext"]) .control:active{background: transparent;border-bottom-color: ${Zl}}:host([appearance="hypertext"]) .control:${Ja}{border-bottom: calc(${vr} * 1px) solid ${Cd};margin-bottom: calc(calc(${gr} - ${vr}) * 1px)}`.withBehaviors(Ka(Me` :host([appearance="hypertext"]:hover){background-color: ${Ei.ButtonFace};color: ${Ei.ButtonText}}:host([appearance="hypertext"][href]) .control:hover, :host([appearance="hypertext"][href]) .control:active, :host([appearance="hypertext"][href]) .control:${Ja}{color: ${Ei.LinkText};border-bottom-color: ${Ei.LinkText};box-shadow: none}`)),jd=Me` :host([appearance="lightweight"]){background: transparent;color: ${Yl}}:host([appearance="lightweight"]) .control{padding: 0;height: initial;border: none;box-shadow: none;border-radius: 0}:host([appearance="lightweight"]:hover){background: transparent;color: ${Kl}}:host([appearance="lightweight"]:active){background: transparent;color: ${Zl}}:host([appearance="lightweight"]) .content{position: relative}:host([appearance="lightweight"]) .content::before{content: "";display: block;height: calc(${gr} * 1px);position: absolute;top: calc(1em + 4px);width: 100%}:host([appearance="lightweight"]:hover) .content::before{background: ${Kl}}:host([appearance="lightweight"]:active) .content::before{background: ${Zl}}:host([appearance="lightweight"]) .control:${Ja} .content::before{background: ${kd};height: calc(${vr} * 1px)}`.withBehaviors(Ka(Me` :host([appearance="lightweight"]) .control:hover, :host([appearance="lightweight"]) .control:${Ja}{forced-color-adjust: none;background: ${Ei.ButtonFace};color: ${Ei.Highlight}}:host([appearance="lightweight"]) .control:hover .content::before, :host([appearance="lightweight"]) .control:${Ja} .content::before{background: ${Ei.Highlight}}:host([appearance="lightweight"][href]) .control:hover, :host([appearance="lightweight"][href]) .control:${Ja}{background: ${Ei.ButtonFace};box-shadow: none;color: ${Ei.LinkText}}:host([appearance="lightweight"][href]) .control:hover .content::before, :host([appearance="lightweight"][href]) .control:${Ja} .content::before{background: ${Ei.LinkText}}`)),qd=Me` :host([appearance="outline"]){background: transparent;border-color: ${Al}}:host([appearance="outline"]:hover){border-color: ${Ol}}:host([appearance="outline"]:active){border-color: ${Tl}}:host([appearance="outline"]) .control{border-color: inherit}:host([appearance="outline"]) .control:${Ja}{box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset;border-color: ${Cd}}`.withBehaviors(Ka(Me` :host([appearance="outline"]) .control{border-color: ${Ei.ButtonText}}:host([appearance="outline"]) .control:${Ja}{forced-color-adjust: none;background-color: ${Ei.Highlight};border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Ei.ButtonText} inset;color: ${Ei.HighlightText};fill: currentColor}:host([appearance="outline"][href]) .control{background: ${Ei.ButtonFace};border-color: ${Ei.LinkText};color: ${Ei.LinkText};fill: currentColor}:host([appearance="outline"][href]) .control:hover, :host([appearance="outline"][href]) .control:${Ja}{forced-color-adjust: none;border-color: ${Ei.LinkText};box-shadow: 0 0 0 1px ${Ei.LinkText} inset}`)),Gd=Me` :host([appearance="stealth"]){background: ${ld}}:host([appearance="stealth"]:hover){background: ${dd}}:host([appearance="stealth"]:active){background: ${hd}}`.withBehaviors(Ka(Me` :host([appearance="stealth"]), :host([appearance="stealth"]) .control{forced-color-adjust: none;background: ${Ei.ButtonFace};border-color: transparent;color: ${Ei.ButtonText};fill: currentColor}:host([appearance="stealth"]:hover) .control{background: ${Ei.Highlight};border-color: ${Ei.Highlight};color: ${Ei.HighlightText};fill: currentColor}:host([appearance="stealth"]:${Ja}) .control{background: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight};color: ${Ei.HighlightText};fill: currentColor}:host([appearance="stealth"][href]) .control{color: ${Ei.LinkText}}:host([appearance="stealth"][href]:hover) .control, :host([appearance="stealth"][href]:${Ja}) .control{background: ${Ei.LinkText};border-color: ${Ei.LinkText};color: ${Ei.HighlightText};fill: currentColor}:host([appearance="stealth"][href]:${Ja}) .control{forced-color-adjust: none;box-shadow: 0 0 0 1px ${Ei.LinkText}}`));class Wd{constructor(e,t){this.cache=new WeakMap,this.ltr=e,this.rtl=t}bind(e){this.attach(e)}unbind(e){const t=this.cache.get(e);t&&pr.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new Yd(this.ltr,this.rtl,e),i=pr.getValueFor(e);pr.subscribe(t),t.attach(i),this.cache.set(e,t)}}class Yd{constructor(e,t,i){this.ltr=e,this.rtl=t,this.source=i,this.attached=null}handleChange({target:e,token:t}){this.attach(t.getValueFor(e))}attach(e){this.attached!==this[e]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[e],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}function Kd(e,t){return new Za("appearance",e,t)}const Zd=(e,t)=>Me` ${Vd} `.withBehaviors(Kd("accent",Bd),Kd("hypertext",Ud),Kd("lightweight",jd),Kd("outline",qd),Kd("stealth",Gd));class Qd extends Ri{appearanceChanged(e,t){this.$fastController.isConnected&&(this.classList.remove(e),this.classList.add(t))}connectedCallback(){super.connectedCallback(),this.appearance||(this.appearance="neutral")}defaultSlottedContentChanged(e,t){const i=this.defaultSlottedContent.filter(e=>e.nodeType===Node.ELEMENT_NODE);1===i.length&&i[0]instanceof SVGElement?this.control.classList.add("icon-only"):this.control.classList.remove("icon-only")}}_d([de],Qd.prototype,"appearance",void 0),Qd.compose({baseName:"anchor",baseClass:Ri,template:Oi,styles:Zd,shadowOptions:{delegatesFocus:!0}});const Xd=(e,t)=>Me` :host{contain: layout;display: block}`;Hi.compose({baseName:"anchored-region",template:Di,styles:Xd});const Jd=(e,t)=>Me` ${Xa("flex")} :host{position: relative;height: var(--avatar-size, var(--avatar-size-default));max-width: var(--avatar-size, var(--avatar-size-default));--avatar-size-default: calc( ( (${rr} + ${ur}) * ${fr} + ((${fr} * 8) - 40) ) * 1px );--avatar-text-size: ${br};--avatar-text-ratio: ${fr}}.link{text-decoration: none;color: ${kd};display: flex;flex-direction: row;justify-content: center;align-items: center;min-width: 100%}.square{border-radius: calc(${hr} * 1px);min-width: 100%;overflow: hidden}.circle{border-radius: 100%;min-width: 100%;overflow: hidden}.backplate{position: relative;display: flex}.media, ::slotted(img){max-width: 100%;position: absolute;display: block}.content{font-size: calc( (var(--avatar-text-size) + var(--avatar-size, var(--avatar-size-default))) / var(--avatar-text-ratio) );line-height: var(--avatar-size, var(--avatar-size-default));display: block;min-height: var(--avatar-size, var(--avatar-size-default))}::slotted(${e.tagFor(Ki)}){position: absolute;display: block}`.withBehaviors(new Wd((e=>Me` ::slotted(${e.tagFor(Ki)}){right: 0}`)(e),(e=>Me` ::slotted(${e.tagFor(Ki)}){left: 0}`)(e)));class eh extends Wi{}_d([de({attribute:"src"})],eh.prototype,"imgSrc",void 0),_d([de],eh.prototype,"alt",void 0);const th=K` ${Ve(e=>e.imgSrc,K`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `;eh.compose({baseName:"avatar",baseClass:Wi,template:Gi,styles:Jd,media:th,shadowOptions:{delegatesFocus:!0}});const ih=(e,t)=>Me` ${Xa("inline-block")} :host{box-sizing: border-box;font-family: ${nr};font-size: ${zr};line-height: ${Cr}}.control{border-radius: calc(${hr} * 1px);padding: calc(((${fr} * 0.5) - ${gr}) * 1px) calc((${fr} - ${gr}) * 1px);color: ${Yl};font-weight: 600;border: calc(${gr} * 1px) solid transparent}.control[style]{font-weight: 400}:host([circular]) .control{border-radius: 100px;padding: 0 calc(${fr} * 1px);height: calc((${Fd} - (${fr} * 3)) * 1px);min-width: calc((${Fd} - (${fr} * 3)) * 1px);display: flex;align-items: center;justify-content: center;box-sizing: border-box}`;Ki.compose({baseName:"badge",template:Yi,styles:ih});const ch=(e,t)=>Me` ${Xa("inline-flex")} :host{background: transparent;box-sizing: border-box;font-family: ${nr};font-size: ${br};fill: currentColor;line-height: ${yr};min-width: calc(${Fd} * 1px);outline: none;color: ${kd}}.listitem{display: flex;align-items: center;width: max-content}.separator{margin: 0 6px;display: flex}.control{align-items: center;box-sizing: border-box;color: ${Yl};cursor: pointer;display: flex;fill: inherit;outline: none;text-decoration: none;white-space: nowrap}.control:hover{color: ${Kl}}.control:active{color: ${Zl}}.control .content{position: relative}.control .content::before{content: "";display: block;height: calc(${gr} * 1px);left: 0;position: absolute;right: 0;top: calc(1em + 4px);width: 100%}.control:hover .content::before{background: ${Kl}}.control:active .content::before{background: ${Zl}}.control:${Ja} .content::before{background: ${kd};height: calc(${vr} * 1px)}.control:not([href]){color: ${kd};cursor: default}.control:not([href]) .content::before{background: none}.start, .end{display: flex}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}.start{margin-inline-end: 6px}.end{margin-inline-start: 6px}`.withBehaviors(Ka(Me` .control:hover .content::before, .control:${Ja} .content::before{background: ${Ei.LinkText}}.start, .end{fill: ${Ei.ButtonText}}`));Qi.compose({baseName:"breadcrumb-item",template:Zi,styles:ch,separator:"/",shadowOptions:{delegatesFocus:!0}});const oh=(e,t)=>Me` ${Xa("inline-block")} :host{box-sizing: border-box;font-family: ${nr};font-size: ${br};line-height: ${yr}}.list{display: flex;flex-wrap: wrap}`;Ji.compose({baseName:"breadcrumb",template:Xi,styles:oh});const sh=(e,t)=>Me` :host([disabled]), :host([disabled]:hover), :host([disabled]:active){opacity: ${mr};background-color: ${Jl};cursor: ${Qa}}${Vd} `.withBehaviors(Ka(Me` :host([disabled]), :host([disabled]) .control, :host([disabled]:hover), :host([disabled]:active){forced-color-adjust: none;background-color: ${Ei.ButtonFace};border-color: ${Ei.GrayText};color: ${Ei.GrayText};cursor: ${Qa};opacity: 1}`),Kd("accent",Me` :host([appearance="accent"][disabled]), :host([appearance="accent"][disabled]:hover), :host([appearance="accent"][disabled]:active){background: ${Al}}${Bd} `.withBehaviors(Ka(Me` :host([appearance="accent"][disabled]) .control, :host([appearance="accent"][disabled]) .control:hover{background: ${Ei.ButtonFace};border-color: ${Ei.GrayText};color: ${Ei.GrayText}}`))),Kd("lightweight",Me` :host([appearance="lightweight"][disabled]:hover), :host([appearance="lightweight"][disabled]:active){background-color: transparent;color: ${Yl}}:host([appearance="lightweight"][disabled]) .content::before, :host([appearance="lightweight"][disabled]:hover) .content::before, :host([appearance="lightweight"][disabled]:active) .content::before{background: transparent}${jd} `.withBehaviors(Ka(Me` :host([appearance="lightweight"].disabled) .control{forced-color-adjust: none;color: ${Ei.GrayText}}:host([appearance="lightweight"].disabled) .control:hover .content::before{background: none}`))),Kd("outline",Me` :host([appearance="outline"][disabled]), :host([appearance="outline"][disabled]:hover), :host([appearance="outline"][disabled]:active){background: transparent;border-color: ${Al}}${qd} `.withBehaviors(Ka(Me` :host([appearance="outline"][disabled]) .control{border-color: ${Ei.GrayText}}`))),Kd("stealth",Me` :host([appearance="stealth"][disabled]), :host([appearance="stealth"][disabled]:hover), :host([appearance="stealth"][disabled]:active){background: ${ld}}${Gd} `.withBehaviors(Ka(Me` :host([appearance="stealth"][disabled]){background: ${Ei.ButtonFace}}:host([appearance="stealth"][disabled]) .control{background: ${Ei.ButtonFace};border-color: transparent;color: ${Ei.GrayText}}`))));class ah extends lc{constructor(){super(...arguments),this.appearance="neutral"}defaultSlottedContentChanged(e,t){const i=this.defaultSlottedContent.filter(e=>e.nodeType===Node.ELEMENT_NODE);1===i.length&&i[0]instanceof SVGElement?this.control.classList.add("icon-only"):this.control.classList.remove("icon-only")}}_d([de],ah.prototype,"appearance",void 0),ah.compose({baseName:"button",baseClass:lc,template:ec,styles:sh,shadowOptions:{delegatesFocus:!0}});const nh=Me` ${Xa("block")} :host{--cell-border: none;--cell-height: calc(${Fd} * 1px);--selected-day-outline: 1px solid ${Zl};--selected-day-color: ${Zl};--selected-day-background: ${Jl};--cell-padding: calc(${fr} * 1px);--disabled-day-opacity: ${mr};--inactive-day-opacity: ${mr};font-family: ${nr};font-size: ${br};line-height: ${yr};color: ${kd}}.title{font-size: ${Er};line-height: ${$r};padding: var(--cell-padding);text-align: center}.week-days, .week{display: grid;grid-template-columns: repeat(7, 1fr);border-left: var(--cell-border, none);border-bottom: none;padding: 0}.interact .week{grid-gap: calc(${fr} * 1px);margin-top: calc(${fr} * 1px)}.day, .week-day{border-bottom: var(--cell-border);border-right: var(--cell-border);padding: var(--cell-padding)}.week-day{text-align: center;border-radius: 0;border-top: var(--cell-border)}.day{box-sizing: border-box;vertical-align: top;outline-offset: -1px;line-height: var(--cell-line-height);white-space: normal}.interact .day{background: ${Jl};cursor: pointer}.day.inactive{background: var(--inactive-day-background);color: var(--inactive-day-color);opacity: var(--inactive-day-opacity);outline: var(--inactive-day-outline)}.day.disabled{background: var(--disabled-day-background);color: var(--disabled-day-color);cursor: ${Qa};opacity: var(--disabled-day-opacity);outline: var(--disabled-day-outline)}.day.selected{color: var(--selected-day-color);background: var(--selected-day-background);outline: var(--selected-day-outline)}.date{padding: var(--cell-padding);text-align: center}.interact .today, .today{color: ${_l};background: ${Zl}}.today.inactive .date{background: transparent;color: inherit;width: auto}`.withBehaviors(Ka(Me` :host{--selected-day-outline: 1px solid ${Ei.Highlight}}.day, .week-day{background: ${Ei.Canvas};color: ${Ei.CanvasText};fill: currentcolor}.day.selected{color: ${Ei.Highlight}}.today .date{background: ${Ei.Highlight};color: ${Ei.HighlightText}}`));uc.compose({baseName:"calendar",template:Tc,styles:nh,title:Nc});const rh=(e,t)=>Me` ${Xa("block")} :host{--elevation: 4;display: block;contain: content;height: var(--card-height, 100%);width: var(--card-width, 100%);box-sizing: border-box;background: ${El};border-radius: calc(${hr} * 1px);${Pd}}`.withBehaviors(Ka(Me` :host{forced-color-adjust: none;background: ${Ei.Canvas};box-shadow: 0 0 0 1px ${Ei.CanvasText}}`));class lh extends Ic{connectedCallback(){super.connectedCallback();const e=to(this);e&&El.setValueFor(this,t=>bd.getValueFor(t).evaluate(t,El.getValueFor(e)))}}lh.compose({baseName:"card",baseClass:Ic,template:Rc,styles:rh});const dh=(e,t)=>Me` ${Xa("inline-flex")} :host{align-items: center;outline: none;margin: calc(${fr} * 1px) 0;/* Chromium likes to select label text or the default slot when the checkbox is clicked. Maybe there is a better solution here? */ user-select: none}.control{position: relative;width: calc((${Fd} / 2 + ${fr}) * 1px);height: calc((${Fd} / 2 + ${fr}) * 1px);box-sizing: border-box;border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${$d};background: ${od};outline: none;cursor: pointer}.label{font-family: ${nr};color: ${kd};padding-inline-start: calc(${fr} * 2px + 2px);margin-inline-end: calc(${fr} * 2px + 2px);cursor: pointer;font-size: ${br};line-height: ${yr}}.label__hidden{display: none;visibility: hidden}.checked-indicator{width: 100%;height: 100%;display: block;fill: ${Fl};opacity: 0;pointer-events: none}.indeterminate-indicator{border-radius: calc(${hr} * 1px);background: ${Fl};position: absolute;top: 50%;left: 50%;width: 50%;height: 50%;transform: translate(-50%, -50%);opacity: 0}:host(:not([disabled])) .control:hover{background: ${sd};border-color: ${Nd}}:host(:not([disabled])) .control:active{background: ${ad};border-color: ${Ad}}:host(:${Ja}) .control{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}:host([aria-checked="true"]) .control{background: ${Al};border: calc(${gr} * 1px) solid ${Al}}:host([aria-checked="true"]:not([disabled])) .control:hover{background: ${Ol};border: calc(${gr} * 1px) solid ${Ol}}:host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator{fill: ${Hl}}:host([aria-checked="true"]:not([disabled])) .control:hover .indeterminate-indicator{background: ${Hl}}:host([aria-checked="true"]:not([disabled])) .control:active{background: ${Tl};border: calc(${gr} * 1px) solid ${Tl}}:host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator{fill: ${_l}}:host([aria-checked="true"]:not([disabled])) .control:active .indeterminate-indicator{background: ${_l}}:host([aria-checked="true"]:${Ja}:not([disabled])) .control{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([aria-checked="true"]:not(.indeterminate)) .checked-indicator, :host(.indeterminate) .indeterminate-indicator{opacity: 1}:host([disabled]){opacity: ${mr}}`.withBehaviors(Ka(Me` .control{forced-color-adjust: none;border-color: ${Ei.FieldText};background: ${Ei.Field}}.checked-indicator{fill: ${Ei.FieldText}}.indeterminate-indicator{background: ${Ei.FieldText}}:host(:not([disabled])) .control:hover, .control:active{border-color: ${Ei.Highlight};background: ${Ei.Field}}:host(:${Ja}) .control{box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([aria-checked="true"]:${Ja}:not([disabled])) .control{box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([aria-checked="true"]) .control{background: ${Ei.Highlight};border-color: ${Ei.Highlight}}:host([aria-checked="true"]:not([disabled])) .control:hover, .control:active{border-color: ${Ei.Highlight};background: ${Ei.HighlightText}}:host([aria-checked="true"]) .checked-indicator{fill: ${Ei.HighlightText}}:host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator{fill: ${Ei.Highlight}}:host([aria-checked="true"]) .indeterminate-indicator{background: ${Ei.HighlightText}}:host([aria-checked="true"]) .control:hover .indeterminate-indicator{background: ${Ei.Highlight}}:host([disabled]){opacity: 1}:host([disabled]) .control{forced-color-adjust: none;border-color: ${Ei.GrayText};background: ${Ei.Field}}:host([disabled]) .indeterminate-indicator, :host([aria-checked="true"][disabled]) .control:hover .indeterminate-indicator{forced-color-adjust: none;background: ${Ei.GrayText}}:host([disabled]) .checked-indicator, :host([aria-checked="true"][disabled]) .control:hover .checked-indicator{forced-color-adjust: none;fill: ${Ei.GrayText}}`));_c.compose({baseName:"checkbox",template:Dc,styles:dh,checkedIndicator:'\n <svg\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '});const hh=(e,t)=>{const i=e.tagFor(Vc),c=e.name===e.tagFor(es)?"":".listbox";return Me` ${c?"":Xa("inline-flex")} :host ${c}{background: ${El};border: calc(${gr} * 1px) solid ${$d};border-radius: calc(${hr} * 1px);box-sizing: border-box;flex-direction: column;padding: calc(${fr} * 1px) 0}${c?"":Me` :host(:focus-within:not([disabled])){border-color: ${Cd};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset}:host([disabled]) ::slotted(*){cursor: ${Qa};opacity: ${mr};pointer-events: none}`} ${c||":host([size])"}{max-height: calc( (var(--size) * ${Fd} + (${fr} * ${gr} * 2)) * 1px );overflow-y: auto}:host([size="0"]) ${c}{max-height: none}`.withBehaviors(Ka(Me` :host(:not([multiple]):${Ja}) ::slotted(${i}[aria-selected="true"]), :host([multiple]:${Ja}) ::slotted(${i}[aria-checked="true"]){border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc(${vr} * 1px) inset ${Ei.HighlightText}}:host(:not([multiple]):${Ja}) ::slotted(${i}[aria-selected="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText};fill: currentcolor}::slotted(${i}[aria-selected="true"]:not([aria-checked="true"])){background: ${Ei.Highlight};border-color: ${Ei.HighlightText};color: ${Ei.HighlightText}}`))},uh=(e,t)=>{const i=e.name===e.tagFor(Gs);return Me` ${Xa("inline-flex")} :host{--elevation: 14;background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};box-sizing: border-box;color: ${kd};font-family: ${nr};height: calc(${Fd} * 1px);position: relative;user-select: none;min-width: 250px;outline: none;vertical-align: top}${i?Me` :host(:not([aria-haspopup])){--elevation: 0;border: 0;height: auto;min-width: 0}`:""} ${hh(e)} :host .listbox{${Pd} border: none;display: flex;left: 0;position: absolute;width: 100%;z-index: 1}.control + .listbox{--stroke-size: calc(${fr} * ${gr} * 2);max-height: calc( (var(--listbox-max-height) * ${Fd} + var(--stroke-size)) * 1px )}${i?Me` :host(:not([aria-haspopup])) .listbox{left: auto;position: static;z-index: auto}`:""} .listbox[hidden]{display: none}.control{align-items: center;box-sizing: border-box;cursor: pointer;display: flex;font-size: ${br};font-family: inherit;line-height: ${yr};min-height: 100%;padding: 0 calc(${fr} * 2.25px);width: 100%}:host(:not([disabled]):hover){background: ${sd};border-color: ${Ol}}:host(:${Ja}){border-color: ${Cd}}:host(:not([size]):not([multiple]):not([open]):${Ja}), :host([multiple]:${Ja}), :host([size]:${Ja}){box-shadow: 0 0 0 calc(${vr} * 1px) ${Cd}}:host(:not([multiple]):not([size]):${Ja}) ::slotted(${e.tagFor(Vc)}[aria-selected="true"]:not([disabled])){box-shadow: 0 0 0 calc(${vr} * 1px) inset ${xd};border-color: ${Cd};background: ${Rl};color: ${Pl}}:host([disabled]){cursor: ${Qa};opacity: ${mr}}:host([disabled]) .control{cursor: ${Qa};user-select: none}:host([disabled]:hover){background: ${ld};color: ${kd};fill: currentcolor}:host(:not([disabled])) .control:active{background: ${ad};border-color: ${Tl};border-radius: calc(${hr} * 1px)}:host([open][position="above"]) .listbox{border-bottom-left-radius: 0;border-bottom-right-radius: 0;border-bottom: 0;bottom: calc(${Fd} * 1px)}:host([open][position="below"]) .listbox{border-top-left-radius: 0;border-top-right-radius: 0;border-top: 0;top: calc(${Fd} * 1px)}.selected-value{flex: 1 1 auto;font-family: inherit;min-width: calc(var(--listbox-scroll-width, 0) - (${fr} * 4) * 1px);overflow: hidden;text-align: start;text-overflow: ellipsis;white-space: nowrap}.indicator{flex: 0 0 auto;margin-inline-start: 1em}slot[name="listbox"]{display: none;width: 100%}:host([open]) slot[name="listbox"]{display: flex;position: absolute;${Pd}}.end{margin-inline-start: auto}.start, .end, .indicator, .select-indicator, ::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ fill: currentcolor;height: 1em;min-height: calc(${fr} * 4px);min-width: calc(${fr} * 4px);width: 1em}::slotted([role="option"]), ::slotted(option){flex: 0 0 auto}`.withBehaviors(Ka(Me` :host(:not([disabled]):hover), :host(:not([disabled]):active){border-color: ${Ei.Highlight}}:host(:not([disabled]):${Ja}){background-color: ${Ei.ButtonFace};box-shadow: 0 0 0 calc(${vr} * 1px) ${Ei.Highlight};color: ${Ei.ButtonText};fill: currentcolor;forced-color-adjust: none}:host(:not([disabled]):${Ja}) .listbox{background: ${Ei.ButtonFace}}:host([disabled]){border-color: ${Ei.GrayText};background-color: ${Ei.ButtonFace};color: ${Ei.GrayText};fill: currentcolor;opacity: 1;forced-color-adjust: none}:host([disabled]:hover){background: ${Ei.ButtonFace}}:host([disabled]) .control{color: ${Ei.GrayText};border-color: ${Ei.GrayText}}:host([disabled]) .control .select-indicator{fill: ${Ei.GrayText}}:host(:${Ja}) ::slotted([aria-selected="true"][role="option"]), :host(:${Ja}) ::slotted(option[aria-selected="true"]), :host(:${Ja}) ::slotted([aria-selected="true"][role="option"]:not([disabled])){background: ${Ei.Highlight};border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc(${vr} * 1px) inset ${Ei.HighlightText};color: ${Ei.HighlightText};fill: currentcolor}.start, .end, .indicator, .select-indicator, ::slotted(svg){color: ${Ei.ButtonText};fill: currentcolor}`))},fh=(e,t)=>Me` ${uh(e)} :host(:empty) .listbox{display: none}:host([disabled]) *, :host([disabled]){cursor: ${Qa};user-select: none}.selected-value{-webkit-appearance: none;background: transparent;border: none;color: inherit;font-size: ${br};line-height: ${yr};height: calc(100% - (${gr} * 1px));margin: auto 0;width: 100%}.selected-value:hover, .selected-value:${Ja}, .selected-value:disabled, .selected-value:active{outline: none}`;class ph extends Jc{maxHeightChanged(e,t){this.updateComputedStylesheet()}updateComputedStylesheet(){this.computedStylesheet&&this.$fastController.removeStyles(this.computedStylesheet);const e=Math.floor(this.maxHeight/Id.getValueFor(this)).toString();this.computedStylesheet=Me` :host{--listbox-max-height: ${e}}`,this.$fastController.addStyles(this.computedStylesheet)}}ph.compose({baseName:"combobox",baseClass:Jc,template:(e,t)=>K`<template aria-disabled="${e=>e.ariaDisabled}" autocomplete="${e=>e.autocomplete}" class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}" ?open="${e=>e.open}" tabindex="${e=>e.disabled?null:"0"}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${it(0,t)}<slot name="control"><input aria-activedescendant="${e=>e.open?e.ariaActiveDescendant:null}" aria-autocomplete="${e=>e.ariaAutoComplete}" aria-controls="${e=>e.ariaControls}" aria-disabled="${e=>e.ariaDisabled}" aria-expanded="${e=>e.ariaExpanded}" aria-haspopup="listbox" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${Fe("control")}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||""}</slot></div></slot>${tt(0,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${Fe("listbox")}><slot ${Qe({filter:Uc.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></div></template>`,styles:fh,shadowOptions:{delegatesFocus:!0},indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '});const mh=(e,t)=>Me` :host{display: flex;position: relative;flex-direction: column}`,gh=(e,t)=>Me` :host{display: grid;padding: 1px 0;box-sizing: border-box;width: 100%;border-bottom: calc(${gr} * 1px) solid ${Rd}}:host(.header){}:host(.sticky-header){background: ${Jl};position: sticky;top: 0}`,vh=(e,t)=>Me` :host{padding: calc(${fr} * 1px) calc(${fr} * 3px);color: ${kd};box-sizing: border-box;font-family: ${nr};font-size: ${br};line-height: ${yr};font-weight: 400;border: transparent calc(${vr} * 1px) solid;overflow: hidden;white-space: nowrap;border-radius: calc(${hr} * 1px)}:host(.column-header){font-weight: 600}:host(:${Ja}){border: ${Cd} calc(${vr} * 1px) solid;outline: none;color: ${kd}}`.withBehaviors(Ka(Me` :host{forced-color-adjust: none;border-color: transparent;background: ${Ei.Field};color: ${Ei.FieldText}}:host(:${Ja}){border-color: ${Ei.FieldText};box-shadow: 0 0 0 2px inset ${Ei.Field};color: ${Ei.FieldText}}`));kc.compose({baseName:"data-grid-cell",template:$c,styles:vh}),Lc.compose({baseName:"data-grid-row",template:Ec,styles:gh}),Mc.compose({baseName:"data-grid",template:xc,styles:mh});const bh={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=_n(e);return t?Un.create(t.r,t.g,t.b):null}},yh=Me` :host{background-color: ${El};color: ${kd}}`.withBehaviors(Ka(Me` :host{background-color: ${Ei.ButtonFace};box-shadow: 0 0 0 1px ${Ei.CanvasText};color: ${Ei.ButtonText}}`));function zh(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}class Ch extends Wt{constructor(){super(),this.noPaint=!1;const e={handleChange:this.noPaintChanged.bind(this)};v.getNotifier(this).subscribe(e,"fillColor"),v.getNotifier(this).subscribe(e,"baseLayerLuminance")}noPaintChanged(){this.noPaint||void 0===this.fillColor&&!this.baseLayerLuminance?this.$fastController.removeStyles(yh):this.$fastController.addStyles(yh)}}_d([de({attribute:"no-paint",mode:"boolean"})],Ch.prototype,"noPaint",void 0),_d([de({attribute:"fill-color",converter:bh}),zh(El)],Ch.prototype,"fillColor",void 0),_d([de({attribute:"accent-color",converter:bh,mode:"fromView"}),zh(pl)],Ch.prototype,"accentColor",void 0),_d([de({attribute:"neutral-color",converter:bh,mode:"fromView"}),zh(ul)],Ch.prototype,"neutralColor",void 0),_d([de({converter:re}),zh(ur)],Ch.prototype,"density",void 0),_d([de({attribute:"design-unit",converter:re}),zh(fr)],Ch.prototype,"designUnit",void 0),_d([de({attribute:"direction"}),zh(pr)],Ch.prototype,"direction",void 0),_d([de({attribute:"base-height-multiplier",converter:re}),zh(rr)],Ch.prototype,"baseHeightMultiplier",void 0),_d([de({attribute:"base-horizontal-spacing-multiplier",converter:re}),zh(lr)],Ch.prototype,"baseHorizontalSpacingMultiplier",void 0),_d([de({attribute:"control-corner-radius",converter:re}),zh(hr)],Ch.prototype,"controlCornerRadius",void 0),_d([de({attribute:"stroke-width",converter:re}),zh(gr)],Ch.prototype,"strokeWidth",void 0),_d([de({attribute:"focus-stroke-width",converter:re}),zh(vr)],Ch.prototype,"focusStrokeWidth",void 0),_d([de({attribute:"disabled-opacity",converter:re}),zh(mr)],Ch.prototype,"disabledOpacity",void 0),_d([de({attribute:"type-ramp-minus-2-font-size"}),zh(Lr)],Ch.prototype,"typeRampMinus2FontSize",void 0),_d([de({attribute:"type-ramp-minus-2-line-height"}),zh(xr)],Ch.prototype,"typeRampMinus2LineHeight",void 0),_d([de({attribute:"type-ramp-minus-1-font-size"}),zh(zr)],Ch.prototype,"typeRampMinus1FontSize",void 0),_d([de({attribute:"type-ramp-minus-1-line-height"}),zh(Cr)],Ch.prototype,"typeRampMinus1LineHeight",void 0),_d([de({attribute:"type-ramp-base-font-size"}),zh(br)],Ch.prototype,"typeRampBaseFontSize",void 0),_d([de({attribute:"type-ramp-base-line-height"}),zh(yr)],Ch.prototype,"typeRampBaseLineHeight",void 0),_d([de({attribute:"type-ramp-plus-1-font-size"}),zh(Mr)],Ch.prototype,"typeRampPlus1FontSize",void 0),_d([de({attribute:"type-ramp-plus-1-line-height"}),zh(wr)],Ch.prototype,"typeRampPlus1LineHeight",void 0),_d([de({attribute:"type-ramp-plus-2-font-size"}),zh(Sr)],Ch.prototype,"typeRampPlus2FontSize",void 0),_d([de({attribute:"type-ramp-plus-2-line-height"}),zh(kr)],Ch.prototype,"typeRampPlus2LineHeight",void 0),_d([de({attribute:"type-ramp-plus-3-font-size"}),zh(Er)],Ch.prototype,"typeRampPlus3FontSize",void 0),_d([de({attribute:"type-ramp-plus-3-line-height"}),zh($r)],Ch.prototype,"typeRampPlus3LineHeight",void 0),_d([de({attribute:"type-ramp-plus-4-font-size"}),zh(Nr)],Ch.prototype,"typeRampPlus4FontSize",void 0),_d([de({attribute:"type-ramp-plus-4-line-height"}),zh(Ar)],Ch.prototype,"typeRampPlus4LineHeight",void 0),_d([de({attribute:"type-ramp-plus-5-font-size"}),zh(Or)],Ch.prototype,"typeRampPlus5FontSize",void 0),_d([de({attribute:"type-ramp-plus-5-line-height"}),zh(Tr)],Ch.prototype,"typeRampPlus5LineHeight",void 0),_d([de({attribute:"type-ramp-plus-6-font-size"}),zh(Rr)],Ch.prototype,"typeRampPlus6FontSize",void 0),_d([de({attribute:"type-ramp-plus-6-line-height"}),zh(Ir)],Ch.prototype,"typeRampPlus6LineHeight",void 0),_d([de({attribute:"accent-fill-rest-delta",converter:re}),zh(Dr)],Ch.prototype,"accentFillRestDelta",void 0),_d([de({attribute:"accent-fill-hover-delta",converter:re}),zh(Fr)],Ch.prototype,"accentFillHoverDelta",void 0),_d([de({attribute:"accent-fill-active-delta",converter:re}),zh(Hr)],Ch.prototype,"accentFillActiveDelta",void 0),_d([de({attribute:"accent-fill-focus-delta",converter:re}),zh(_r)],Ch.prototype,"accentFillFocusDelta",void 0),_d([de({attribute:"accent-foreground-rest-delta",converter:re}),zh(Pr)],Ch.prototype,"accentForegroundRestDelta",void 0),_d([de({attribute:"accent-foreground-hover-delta",converter:re}),zh(Vr)],Ch.prototype,"accentForegroundHoverDelta",void 0),_d([de({attribute:"accent-foreground-active-delta",converter:re}),zh(Br)],Ch.prototype,"accentForegroundActiveDelta",void 0),_d([de({attribute:"accent-foreground-focus-delta",converter:re}),zh(Ur)],Ch.prototype,"accentForegroundFocusDelta",void 0),_d([de({attribute:"neutral-fill-rest-delta",converter:re}),zh(jr)],Ch.prototype,"neutralFillRestDelta",void 0),_d([de({attribute:"neutral-fill-hover-delta",converter:re}),zh(qr)],Ch.prototype,"neutralFillHoverDelta",void 0),_d([de({attribute:"neutral-fill-active-delta",converter:re}),zh(Gr)],Ch.prototype,"neutralFillActiveDelta",void 0),_d([de({attribute:"neutral-fill-focus-delta",converter:re}),zh(Wr)],Ch.prototype,"neutralFillFocusDelta",void 0),_d([de({attribute:"neutral-fill-input-rest-delta",converter:re}),zh(Yr)],Ch.prototype,"neutralFillInputRestDelta",void 0),_d([de({attribute:"neutral-fill-input-hover-delta",converter:re}),zh(Kr)],Ch.prototype,"neutralFillInputHoverDelta",void 0),_d([de({attribute:"neutral-fill-input-active-delta",converter:re}),zh(Zr)],Ch.prototype,"neutralFillInputActiveDelta",void 0),_d([de({attribute:"neutral-fill-input-focus-delta",converter:re}),zh(Qr)],Ch.prototype,"neutralFillInputFocusDelta",void 0),_d([de({attribute:"neutral-fill-stealth-rest-delta",converter:re}),zh(Xr)],Ch.prototype,"neutralFillStealthRestDelta",void 0),_d([de({attribute:"neutral-fill-stealth-hover-delta",converter:re}),zh(Jr)],Ch.prototype,"neutralFillStealthHoverDelta",void 0),_d([de({attribute:"neutral-fill-stealth-active-delta",converter:re}),zh(el)],Ch.prototype,"neutralFillStealthActiveDelta",void 0),_d([de({attribute:"neutral-fill-stealth-focus-delta",converter:re}),zh(tl)],Ch.prototype,"neutralFillStealthFocusDelta",void 0),_d([de({attribute:"neutral-fill-strong-hover-delta",converter:re}),zh(cl)],Ch.prototype,"neutralFillStrongHoverDelta",void 0),_d([de({attribute:"neutral-fill-strong-active-delta",converter:re}),zh(ol)],Ch.prototype,"neutralFillStrongActiveDelta",void 0),_d([de({attribute:"neutral-fill-strong-focus-delta",converter:re}),zh(sl)],Ch.prototype,"neutralFillStrongFocusDelta",void 0),_d([de({attribute:"base-layer-luminance",converter:re}),zh(dr)],Ch.prototype,"baseLayerLuminance",void 0),_d([de({attribute:"neutral-fill-layer-rest-delta",converter:re}),zh(al)],Ch.prototype,"neutralFillLayerRestDelta",void 0),_d([de({attribute:"neutral-stroke-divider-rest-delta",converter:re}),zh(hl)],Ch.prototype,"neutralStrokeDividerRestDelta",void 0),_d([de({attribute:"neutral-stroke-rest-delta",converter:re}),zh(nl)],Ch.prototype,"neutralStrokeRestDelta",void 0),_d([de({attribute:"neutral-stroke-hover-delta",converter:re}),zh(rl)],Ch.prototype,"neutralStrokeHoverDelta",void 0),_d([de({attribute:"neutral-stroke-active-delta",converter:re}),zh(ll)],Ch.prototype,"neutralStrokeActiveDelta",void 0),_d([de({attribute:"neutral-stroke-focus-delta",converter:re}),zh(dl)],Ch.prototype,"neutralStrokeFocusDelta",void 0);Ch.compose({baseName:"design-system-provider",template:(e,t)=>K`<slot></slot>`,styles:(e,t)=>Me` ${Xa("block")}`});Vo.compose({baseName:"dialog",template:(e,t)=>K`<div class="positioning-region" part="positioning-region">${Ve(e=>e.modal,K`<div class="overlay" part="overlay" role="presentation" @click="${e=>e.dismiss()}"></div>`)}<div role="dialog" tabindex="-1" class="control" part="control" aria-modal="${e=>e.modal}" aria-describedby="${e=>e.ariaDescribedby}" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" ${Fe("dialog")}><slot></slot></div></div>`,styles:(e,t)=>Me` :host([hidden]){display: none}:host{--elevation: 14;--dialog-height: 480px;--dialog-width: 640px;display: block}.overlay{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(0, 0, 0, 0.3);touch-action: none}.positioning-region{display: flex;justify-content: center;position: fixed;top: 0;bottom: 0;left: 0;right: 0;overflow: auto}.control{${Pd} margin-top: auto;margin-bottom: auto;width: var(--dialog-width);height: var(--dialog-height);background-color: ${El};z-index: 1;border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid transparent}`});const Lh=(e,t)=>Me` .disclosure{transition: height 0.35s}.disclosure .invoker::-webkit-details-marker{display: none}.disclosure .invoker{list-style-type: none}:host([appearance="accent"]) .invoker{background: ${Al};color: ${Fl};font-family: ${nr};font-size: ${br};border-radius: calc(${hr} * 1px);outline: none;cursor: pointer;margin: 16px 0;padding: 12px;max-width: max-content}:host([appearance="accent"]) .invoker:active{background: ${Tl};color: ${_l}}:host([appearance="accent"]) .invoker:hover{background: ${Ol};color: ${Hl}}:host([appearance="lightweight"]) .invoker{background: transparent;color: ${Yl};border-bottom: calc(${gr} * 1px) solid ${Yl};cursor: pointer;width: max-content;margin: 16px 0}:host([appearance="lightweight"]) .invoker:active{border-bottom-color: ${Zl}}:host([appearance="lightweight"]) .invoker:hover{border-bottom-color: ${Kl}}.disclosure[open] .invoker ~ *{animation: fadeIn 0.5s ease-in-out}@keyframes fadeIn{0%{opacity: 0}100%{opacity: 1}}`;class xh extends qo{constructor(){super(...arguments),this.height=0,this.totalHeight=0}connectedCallback(){super.connectedCallback(),this.appearance||(this.appearance="accent")}appearanceChanged(e,t){e!==t&&(this.classList.add(t),this.classList.remove(e))}onToggle(){super.onToggle(),this.details.style.setProperty("height",`${this.disclosureHeight}px`)}setup(){super.setup();const e=()=>this.details.getBoundingClientRect().height;this.show(),this.totalHeight=e(),this.hide(),this.height=e(),this.expanded&&this.show()}get disclosureHeight(){return this.expanded?this.totalHeight:this.height}}_d([de],xh.prototype,"appearance",void 0),xh.compose({baseName:"disclosure",baseClass:qo,template:jo,styles:Lh});const Mh=(e,t)=>Me` ${Xa("block")} :host{box-sizing: content-box;height: 0;margin: calc(${fr} * 1px) 0;border-top: calc(${gr} * 1px) solid ${Rd};border-left: none}:host([orientation="vertical"]){height: 100%;margin: 0 calc(${fr} * 1px);border-top: none;border-left: calc(${gr} * 1px) solid ${Rd}}`;Yo.compose({baseName:"divider",template:Go,styles:Mh});const wh=(e,t)=>Me` ${Xa("inline-flex")} :host{width: calc(${Fd} * 1px);height: calc(${Fd} * 1px);justify-content: center;align-items: center;margin: 0;position: relative;fill: currentcolor;color: ${Fl};background: transparent;outline: none;border: none;padding: 0}:host::before{content: "";background: ${Al};border: calc(${gr} * 1px) solid ${Al};border-radius: 50%;position: absolute;top: 0;right: 0;left: 0;bottom: 0;transition: all 0.1s ease-in-out}.next, .previous{position: relative;/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px;display: grid}:host([disabled]){opacity: ${mr};cursor: ${Qa};fill: currentcolor;color: ${kd};pointer-events: none}:host([disabled])::before, :host([disabled]:hover)::before, :host([disabled]:active)::before{background: ${ld};border-color: ${$d}}:host(:hover){color: ${Hl}}:host(:hover)::before{background: ${Ol};border-color: ${Ol}}:host(:active){color: ${_l}}:host(:active)::before{background: ${Tl};border-color: ${Tl}}:host(:${Ja}){outline: none}:host(:${Ja})::before{box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset, 0 0 0 calc((${vr} + ${gr}) * 1px) ${xd} inset;border-color: ${Cd}}:host::-moz-focus-inner{border: 0}`.withBehaviors(Ka(Me` :host{background: ${Ei.Canvas}}:host .next, :host .previous{color: ${Ei.ButtonText};fill: currentcolor}:host::before{background: ${Ei.Canvas};border-color: ${Ei.ButtonText}}:host(:hover)::before{forced-color-adjust: none;background: ${Ei.Highlight};border-color: ${Ei.ButtonText};opacity: 1}:host(:hover) .next, :host(:hover) .previous{forced-color-adjust: none;color: ${Ei.HighlightText};fill: currentcolor}:host([disabled]){opacity: 1}:host([disabled])::before, :host([disabled]:hover)::before, :host([disabled]) .next, :host([disabled]) .previous{forced-color-adjust: none;background: ${Ei.Canvas};border-color: ${Ei.GrayText};color: ${Ei.GrayText};fill: ${Ei.GrayText}}:host(:${Ja})::before{forced-color-adjust: none;border-color: ${Ei.Highlight};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Ei.Highlight} inset}`));Xo.compose({baseName:"flipper",template:Qo,styles:wh,next:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n ',previous:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M11.273 15.977L3.29 8 11.273.023l.704.704L4.71 8l7.266 7.273-.704.704z"\n />\n </svg>\n '});const Sh=Me` .scroll-prev{right: auto;left: 0}.scroll.scroll-next::before, .scroll-next .scroll-action{left: auto;right: 0}.scroll.scroll-next::before{background: linear-gradient(to right, transparent, var(--scroll-fade-next))}.scroll-next .scroll-action{transform: translate(50%, -50%)}`,kh=Me` .scroll.scroll-next{right: auto;left: 0}.scroll.scroll-next::before{background: linear-gradient(to right, var(--scroll-fade-next), transparent);left: auto;right: 0}.scroll.scroll-prev::before{background: linear-gradient(to right, transparent, var(--scroll-fade-previous))}.scroll-prev .scroll-action{left: auto;right: 0;transform: translate(50%, -50%)}`,Eh=Me` .scroll-area{position: relative}div.scroll-view{overflow-x: hidden}.scroll{bottom: 0;pointer-events: none;position: absolute;right: 0;top: 0;user-select: none;width: 100px}.scroll.disabled{display: none}.scroll::before, .scroll-action{left: 0;position: absolute}.scroll::before{background: linear-gradient(to right, var(--scroll-fade-previous), transparent);content: "";display: block;height: 100%;width: 100%}.scroll-action{pointer-events: auto;right: auto;top: 50%;transform: translate(-50%, -50%)}`.withBehaviors(new Wd(Sh,kh)),$h=(e,t)=>Me` ${Xa("block")} :host{--scroll-align: center;--scroll-item-spacing: 5px;contain: layout;position: relative}.scroll-view{overflow-x: auto;scrollbar-width: none}::-webkit-scrollbar{display: none}.content-container{align-items: var(--scroll-align);display: inline-flex;flex-wrap: nowrap;position: relative}.content-container ::slotted(*){margin-right: var(--scroll-item-spacing)}.content-container ::slotted(*:last-child){margin-right: 0}`;class Nh extends Fs{connectedCallback(){super.connectedCallback(),"mobile"!==this.view&&this.$fastController.addStyles(Eh)}}Nh.compose({baseName:"horizontal-scroll",baseClass:Fs,template:Hs,styles:$h,nextFlipper:e=>K`<${e.tagFor(Xo)}@click="${e=>e.scrollToNext()}" aria-hidden="${e=>e.flippersHiddenFromAT}"></${e.tagFor(Xo)}>`,previousFlipper:e=>K`<${e.tagFor(Xo)}@click="${e=>e.scrollToPrevious()}" direction="previous" aria-hidden="${e=>e.flippersHiddenFromAT}"></${e.tagFor(Xo)}>`});const Ah=(e,t)=>Me` ${Xa("inline-flex")} :host{align-items: center;font-family: ${nr};border-radius: calc(${hr} * 1px);border: calc(${vr} * 1px) solid transparent;box-sizing: border-box;background: ${ld};color: ${kd};cursor: pointer;flex: 0 0 auto;fill: currentcolor;font-size: ${br};height: calc(${Fd} * 1px);line-height: ${yr};margin: 0 calc((${fr} - ${vr}) * 1px);outline: none;overflow: hidden;padding: 0 1ch;user-select: none;white-space: nowrap}:host(:not([disabled]):not([aria-selected="true"]):hover){background: ${dd}}:host(:not([disabled]):not([aria-selected="true"]):active){background: ${hd}}:host([aria-selected="true"]){background: ${Al};color: ${Fl}}:host(:not([disabled])[aria-selected="true"]:hover){background: ${Ol};color: ${Hl}}:host(:not([disabled])[aria-selected="true"]:active){background: ${Tl};color: ${_l}}:host([disabled]){cursor: ${Qa};opacity: ${mr}}.content{grid-column-start: 2;justify-self: start;overflow: hidden;text-overflow: ellipsis}.start, .end, ::slotted(svg){display: flex}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ height: calc(${fr} * 4px);width: calc(${fr} * 4px)}::slotted([slot="end"]){margin-inline-start: 1ch}::slotted([slot="start"]){margin-inline-end: 1ch}:host([aria-checked="true"][aria-selected="false"]){border-color: ${Cd}}:host([aria-checked="true"][aria-selected="true"]){border-color: ${Cd};box-shadow: 0 0 0 calc(${vr} * 2 * 1px) inset ${xd}}`.withBehaviors(Ka(Me` :host{border-color: transparent;forced-color-adjust: none;color: ${Ei.ButtonText};fill: currentcolor}:host(:not([aria-selected="true"]):hover), :host([aria-selected="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([disabled]), :host([disabled][aria-selected="false"]:hover){background: ${Ei.Canvas};color: ${Ei.GrayText};fill: currentcolor;opacity: 1}:host([aria-checked="true"][aria-selected="false"]){background: ${Ei.ButtonFace};color: ${Ei.ButtonText};border-color: ${Ei.ButtonText}}:host([aria-checked="true"][aria-selected="true"]), :host([aria-checked="true"][aria-selected="true"]:hover){background: ${Ei.Highlight};color: ${Ei.HighlightText};border-color: ${Ei.ButtonText}}`));Vc.compose({baseName:"option",template:Jo,styles:Ah});class Oh extends es{sizeChanged(e,t){super.sizeChanged(e,t),this.updateComputedStylesheet()}updateComputedStylesheet(){this.computedStylesheet&&this.$fastController.removeStyles(this.computedStylesheet);const e=`${this.size}`;this.computedStylesheet=Me` :host{--size: ${e}}`,this.$fastController.addStyles(this.computedStylesheet)}}Oh.compose({baseName:"listbox",baseClass:es,template:ts,styles:hh});const Th=(e,t)=>Me` ${Xa("grid")} :host{contain: layout;overflow: visible;font-family: ${nr};outline: none;box-sizing: border-box;height: calc(${Fd} * 1px);grid-template-columns: minmax(42px, auto) 1fr minmax(42px, auto);grid-template-rows: auto;justify-items: center;align-items: center;padding: 0;margin: 0 calc(${fr} * 1px);white-space: nowrap;background: ${ld};color: ${kd};fill: currentcolor;cursor: pointer;font-size: ${br};line-height: ${yr};border-radius: calc(${hr} * 1px);border: calc(${vr} * 1px) solid transparent}:host(:hover){position: relative;z-index: 1}:host(.indent-0){grid-template-columns: auto 1fr minmax(42px, auto)}:host(.indent-0) .content{grid-column: 1;grid-row: 1;margin-inline-start: 10px}:host(.indent-0) .expand-collapse-glyph-container{grid-column: 5;grid-row: 1}:host(.indent-2){grid-template-columns: minmax(42px, auto) minmax(42px, auto) 1fr minmax(42px, auto) minmax(42px, auto)}:host(.indent-2) .content{grid-column: 3;grid-row: 1;margin-inline-start: 10px}:host(.indent-2) .expand-collapse-glyph-container{grid-column: 5;grid-row: 1}:host(.indent-2) .start{grid-column: 2}:host(.indent-2) .end{grid-column: 4}:host(:${Ja}){border-color: ${Cd};background: ${ud};color: ${kd}}:host(:hover){background: ${dd};color: ${kd}}:host(:active){background: ${hd}}:host([aria-checked="true"]), :host(.expanded){background: ${Jl};color: ${kd}}:host([disabled]){cursor: ${Qa};opacity: ${mr}}:host([disabled]:hover){color: ${kd};fill: currentcolor;background: ${ld}}:host([disabled]:hover) .start, :host([disabled]:hover) .end, :host([disabled]:hover)::slotted(svg){fill: ${kd}}.expand-collapse-glyph{/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px;fill: currentcolor}.content{grid-column-start: 2;justify-self: start;overflow: hidden;text-overflow: ellipsis}.start, .end{display: flex;justify-content: center}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}:host(:hover) .start, :host(:hover) .end, :host(:hover)::slotted(svg), :host(:active) .start, :host(:active) .end, :host(:active)::slotted(svg){fill: ${kd}}:host(.indent-0[aria-haspopup="menu"]){display: grid;grid-template-columns: minmax(42px, auto) auto 1fr minmax(42px, auto) minmax(42px, auto);align-items: center;min-height: 32px}:host(.indent-1[aria-haspopup="menu"]), :host(.indent-1[role="menuitemcheckbox"]), :host(.indent-1[role="menuitemradio"]){display: grid;grid-template-columns: minmax(42px, auto) auto 1fr minmax(42px, auto) minmax(42px, auto);align-items: center;min-height: 32px}:host(.indent-2:not([aria-haspopup="menu"])) .end{grid-column: 5}:host .input-container, :host .expand-collapse-glyph-container{display: none}:host([aria-haspopup="menu"]) .expand-collapse-glyph-container, :host([role="menuitemcheckbox"]) .input-container, :host([role="menuitemradio"]) .input-container{display: grid;margin-inline-end: 10px}:host([aria-haspopup="menu"]) .content, :host([role="menuitemcheckbox"]) .content, :host([role="menuitemradio"]) .content{grid-column-start: 3}:host([aria-haspopup="menu"].indent-0) .content{grid-column-start: 1}:host([aria-haspopup="menu"]) .end, :host([role="menuitemcheckbox"]) .end, :host([role="menuitemradio"]) .end{grid-column-start: 4}:host .expand-collapse, :host .checkbox, :host .radio{display: flex;align-items: center;justify-content: center;position: relative;width: 20px;height: 20px;box-sizing: border-box;outline: none;margin-inline-start: 10px}:host .checkbox, :host .radio{border: calc(${gr} * 1px) solid ${kd}}:host([aria-checked="true"]) .checkbox, :host([aria-checked="true"]) .radio{background: ${Al};border-color: ${Al}}:host .checkbox{border-radius: calc(${hr} * 1px)}:host .radio{border-radius: 999px}:host .checkbox-indicator, :host .radio-indicator, :host .expand-collapse-indicator, ::slotted([slot="checkbox-indicator"]), ::slotted([slot="radio-indicator"]), ::slotted([slot="expand-collapse-indicator"]){display: none}::slotted([slot="end"]:not(svg)){margin-inline-end: 10px;color: ${wd}}:host([aria-checked="true"]) .checkbox-indicator, :host([aria-checked="true"]) ::slotted([slot="checkbox-indicator"]){width: 100%;height: 100%;display: block;fill: ${Fl};pointer-events: none}:host([aria-checked="true"]) .radio-indicator{position: absolute;top: 4px;left: 4px;right: 4px;bottom: 4px;border-radius: 999px;display: block;background: ${Fl};pointer-events: none}:host([aria-checked="true"]) ::slotted([slot="radio-indicator"]){display: block;pointer-events: none}`.withBehaviors(Ka(Me` :host{border-color: transparent;color: ${Ei.ButtonText};forced-color-adjust: none}:host(:hover){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host(:hover) .start, :host(:hover) .end, :host(:hover)::slotted(svg), :host(:active) .start, :host(:active) .end, :host(:active)::slotted(svg){fill: ${Ei.HighlightText}}:host(.expanded){background: ${Ei.Highlight};border-color: ${Ei.Highlight};color: ${Ei.HighlightText}}:host(:${Ja}){background: ${Ei.Highlight};border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc(${vr} * 1px) inset ${Ei.HighlightText};color: ${Ei.HighlightText};fill: currentcolor}:host([disabled]), :host([disabled]:hover), :host([disabled]:hover) .start, :host([disabled]:hover) .end, :host([disabled]:hover)::slotted(svg){background: ${Ei.Canvas};color: ${Ei.GrayText};fill: currentcolor;opacity: 1}:host .expanded-toggle, :host .checkbox, :host .radio{border-color: ${Ei.ButtonText};background: ${Ei.HighlightText}}:host([checked="true"]) .checkbox, :host([checked="true"]) .radio{background: ${Ei.HighlightText};border-color: ${Ei.HighlightText}}:host(:hover) .expanded-toggle, :host(:hover) .checkbox, :host(:hover) .radio, :host(:${Ja}) .expanded-toggle, :host(:${Ja}) .checkbox, :host(:${Ja}) .radio, :host([checked="true"]:hover) .checkbox, :host([checked="true"]:hover) .radio, :host([checked="true"]:${Ja}) .checkbox, :host([checked="true"]:${Ja}) .radio{border-color: ${Ei.HighlightText}}:host([aria-checked="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([aria-checked="true"]) .checkbox-indicator, :host([aria-checked="true"]) ::slotted([slot="checkbox-indicator"]), :host([aria-checked="true"]) ::slotted([slot="radio-indicator"]){fill: ${Ei.Highlight}}:host([aria-checked="true"]) .radio-indicator{background: ${Ei.Highlight}}::slotted([slot="end"]:not(svg)){color: ${Ei.ButtonText}}:host(:hover) ::slotted([slot="end"]:not(svg)), :host(:${Ja}) ::slotted([slot="end"]:not(svg)){color: ${Ei.HighlightText}}`),new Wd(Me` .expand-collapse-glyph{transform: rotate(0deg)}`,Me` .expand-collapse-glyph{transform: rotate(180deg)}`));gs.compose({baseName:"menu-item",template:vs,styles:Th,checkboxIndicator:'\n <svg\n part="checkbox-indicator"\n class="checkbox-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',expandCollapseGlyph:'\n <svg\n viewBox="0 0 16 16"\n xmlns="http://www.w3.org/2000/svg"\n class="expand-collapse-glyph"\n part="expand-collapse-glyph"\n >\n <path\n d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"\n />\n </svg>\n ',radioIndicator:'\n <span part="radio-indicator" class="radio-indicator"></span>\n '});const Rh=(e,t)=>Me` ${Xa("block")} :host{--elevation: 11;background: ${El};border: calc(${gr} * 1px) solid transparent;${Pd} margin: 0;border-radius: calc(${hr} * 1px);padding: calc(${fr} * 1px) 0;max-width: 368px;min-width: 64px}:host([slot="submenu"]){width: max-content;margin: 0 calc(${fr} * 1px)}::slotted(hr){box-sizing: content-box;height: 0;margin: 0;border: none;border-top: calc(${gr} * 1px) solid ${Rd}}`.withBehaviors(Ka(Me` :host{background: ${Ei.Canvas};border-color: ${Ei.CanvasText}}`));class Ih extends ys{connectedCallback(){super.connectedCallback(),El.setValueFor(this,yl)}}Ih.compose({baseName:"menu",template:bs,styles:Rh});const Dh=(e,t)=>Me` ${Xa("inline-block")} :host{font-family: ${nr};outline: none;user-select: none}.root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 1px);align-items: baseline}.control{-webkit-appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - 4px);width: 100%;margin-top: auto;margin-bottom: auto;border: none;padding: 0 calc(${fr} * 2px + 1px);font-size: ${br};line-height: ${yr}}.control:hover, .control:${Ja}, .control:disabled, .control:active{outline: none}.controls{opacity: 0}.label{display: block;color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr};margin-bottom: 4px}.label__hidden{display: none;visibility: hidden}.start, .control, .controls, .end{align-self: center}.start, .end{margin: auto;fill: currentcolor}.step-up-glyph, .step-down-glyph{display: block;padding: 4px 10px;cursor: pointer}.step-up-glyph:before, .step-down-glyph:before{content: '';display: block;border: solid transparent 6px}.step-up-glyph:before{border-bottom-color: ${kd}}.step-down-glyph:before{border-top-color: ${kd}}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}.start{margin-inline-start: 11px}.end{margin-inline-end: 11px}:host(:hover:not([disabled])) .root{background: ${sd};border-color: ${Ol}}:host(:active:not([disabled])) .root{background: ${sd};border-color: ${Tl}}:host(:focus-within:not([disabled])) .root{border-color: ${Cd};box-shadow: 0 0 0 calc(${vr} * 1px) ${Cd} inset}:host(:hover:not([disabled])) .controls, :host(:focus-within:not([disabled])) .controls{opacity: 1}:host([appearance="filled"]) .root{background: ${Jl}}:host([appearance="filled"]:hover:not([disabled])) .root{background: ${ed}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([disabled]){opacity: ${mr}}:host([disabled]) .control{border-color: ${$d}}`.withBehaviors(Ka(Me` .root, :host([appearance="filled"]) .root{forced-color-adjust: none;background: ${Ei.Field};border-color: ${Ei.FieldText}}:host(:hover:not([disabled])) .root, :host([appearance="filled"]:hover:not([disabled])) .root, :host([appearance="filled"]:hover) .root{background: ${Ei.Field};border-color: ${Ei.Highlight}}.start, .end{fill: currentcolor}:host([disabled]){opacity: 1}:host([disabled]) .root, :host([appearance="filled"]:hover[disabled]) .root{border-color: ${Ei.GrayText};background: ${Ei.Field}}:host(:focus-within:enabled) .root{border-color: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight} inset}input::placeholder{color: ${Ei.GrayText}}`));class Fh extends ks{constructor(){super(...arguments),this.appearance="outline"}}_d([de],Fh.prototype,"appearance",void 0),Fh.compose({baseName:"number-field",baseClass:ks,styles:Dh,template:(e,t)=>K`<template class="${e=>e.readOnly?"readonly":""}"><label part="label" for="control" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Qe("defaultSlottedNodes")}></slot></label><div class="root" part="root">${it(0,t)}<input class="control" part="control" id="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" @keydown="${(e,t)=>e.handleKeyDown(t.event)}" @blur="${(e,t)=>e.handleBlur()}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" type="text" inputmode="numeric" min="${e=>e.min}" max="${e=>e.max}" step="${e=>e.step}" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.ariaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${Fe("control")}/>${Ve(e=>!e.hideStep&&!e.readOnly&&!e.disabled,K`<div class="controls" part="controls"><div class="step-up" part="step-up" @click="${e=>e.stepUp()}"><slot name="step-up-glyph">${t.stepUpGlyph||""}</slot></div><div class="step-down" part="step-down" @click="${e=>e.stepDown()}"><slot name="step-down-glyph">${t.stepDownGlyph||""}</slot></div></div>`)} ${tt(0,t)}</div></template>`,shadowOptions:{delegatesFocus:!0},stepDownGlyph:'\n <span class="step-down-glyph" part="step-down-glyph"></span>\n ',stepUpGlyph:'\n <span class="step-up-glyph" part="step-up-glyph"></span>\n '});hs.compose({baseName:"picker",template:(e,t)=>{const i=e.tagFor(Hi),c=e.tagFor(is),o=e.tagFor(ss),s=e.tagFor(ss),a=function(e){const t=e.tagFor(ns);return K`<${t}value="${e=>e}" :contentsTemplate="${(e,t)=>t.parent.listItemContentsTemplate}"></${t}>`}(e),n=function(e){const t=e.tagFor(os);return K`<${t}value="${e=>e}" :contentsTemplate="${(e,t)=>t.parent.menuOptionContentsTemplate}"></${t}>`}(e);return K`<template :selectedListTag="${()=>o}" :menuTag="${()=>c}" :defaultListItemTemplate="${a}" :defaultMenuOptionTemplate="${n}" @focusin="${(e,t)=>e.handleFocusIn(t.event)}" @focusout="${(e,t)=>e.handleFocusOut(t.event)}" @keydown="${(e,t)=>e.handleKeyDown(t.event)}" @pickeriteminvoked="${(e,t)=>e.handleItemInvoke(t.event)}" @pickeroptioninvoked="${(e,t)=>e.handleOptionInvoke(t.event)}"><slot name="list-region"></slot>${Ve(e=>e.flyoutOpen,K`<${i}class="region" part="region" auto-update-mode="${e=>e.menuConfig.autoUpdateMode}" fixed-placement="${e=>e.menuConfig.fixedPlacement}" vertical-positioning-mode="${e=>e.menuConfig.verticalPositioningMode}" vertical-default-position="${e=>e.menuConfig.verticalDefaultPosition}" vertical-scaling="${e=>e.menuConfig.verticalScaling}" vertical-inset="${e=>e.menuConfig.verticalInset}" vertical-viewport-lock="${e=>e.menuConfig.verticalViewportLock}" horizontal-positioning-mode="${e=>e.menuConfig.horizontalPositioningMode}" horizontal-default-position="${e=>e.menuConfig.horizontalDefaultPosition}" horizontal-scaling="${e=>e.menuConfig.horizontalScaling}" horizontal-inset="${e=>e.menuConfig.horizontalInset}" horizontal-viewport-lock="${e=>e.menuConfig.horizontalViewportLock}" @loaded="${(e,t)=>e.handleRegionLoaded(t.event)}" ${Fe("region")}>${Ve(e=>!e.showNoOptions&&!e.showLoading,K`<slot name="menu-region"></slot>`)} ${Ve(e=>e.showNoOptions&&!e.showLoading,K`<div class="no-options-display" part="no-options-display"><slot name="no-options-region">${e=>e.noSuggestionsText}</slot></div>`)} ${Ve(e=>e.showLoading,K`<div class="loading-display" part="loading-display"><slot name="loading-region"><${s}part="loading-progress" class="loading-progress slot="loading-region"></${s}>${e=>e.loadingText}</slot></div>`)}</${i}>`)}</template>`},styles:(e,t)=>Me` .region{z-index: 1000;overflow: hidden;display: flex;font-family: ${nr};font-size: ${br}}.loaded{opacity: 1;pointer-events: none}.loading-display, .no-options-display{background: ${El};width: 100%;min-height: calc(${Fd} * 1px);display: flex;flex-direction: column;align-items: center;justify-items: center;padding: calc(${fr} * 1px)}.loading-progress{width: 42px;height: 42px}.bottom{flex-direction: column}.top{flex-direction: column-reverse}`,shadowOptions:{}});(class extends is{connectedCallback(){El.setValueFor(this,yl),super.connectedCallback()}}).compose({baseName:"picker-menu",baseClass:is,template:(e,t)=>K`<template role="list" slot="menu-region"><div class="options-display" part="options-display"><div class="header-region" part="header-region"><slot name="header-region" ${Qe("headerElements")}></slot></div><slot ${Qe("menuElements")}></slot><div class="footer-region" part="footer-region"><slot name="footer-region" ${Qe("footerElements")}></slot></div><div role="alert" aria-live="polite" part="suggestions-available-alert" class="suggestions-available-alert">${e=>e.suggestionsAvailableText}</div></div></template>`,styles:(e,t)=>Me` :host{background: ${El};--elevation: 11;/* TODO: a mechanism to manage z-index across components https://github.com/microsoft/fast/issues/3813 */ z-index: 1000;display: flex;width: 100%;max-height: 100%;min-height: 58px;box-sizing: border-box;flex-direction: column;overflow-y: auto;overflow-x: hidden;pointer-events: auto;border-radius: calc(${hr} * 1px);padding: calc(${fr} * 1px) 0;border: calc(${gr} * 1px) solid transparent;${Pd}}.suggestions-available-alert{height: 0;opacity: 0;overflow: hidden}`.withBehaviors(Ka(Me` :host{background: ${Ei.Canvas};border-color: ${Ei.CanvasText}}`))}),os.compose({baseName:"picker-menu-option",template:(e,t)=>K`<template role="listitem" tabindex="-1" @click="${(e,t)=>e.handleClick(t.event)}"><slot></slot></template>`,styles:(e,t)=>Me` :host{display: flex;align-items: center;justify-items: center;font-family: ${nr};border-radius: calc(${hr} * 1px);border: calc(${vr} * 1px) solid transparent;box-sizing: border-box;background: ${ld};color: ${kd};cursor: pointer;fill: currentcolor;font-size: ${br};min-height: calc(${Fd} * 1px);line-height: ${yr};margin: 0 calc(${fr} * 1px);outline: none;overflow: hidden;padding: 0 calc(${fr} * 2.25px);user-select: none;white-space: nowrap}:host(:${Ja}[role="listitem"]){border-color: ${Cd};background: ${ud}}:host(:hover){background: ${dd}}:host(:active){background: ${hd}}:host([aria-selected="true"]){background: ${Al};color: ${Fl}}:host([aria-selected="true"]:hover){background: ${Ol};color: ${Hl}}:host([aria-selected="true"]:active){background: ${Tl};color: ${_l}}`.withBehaviors(Ka(Me` :host{border-color: transparent;forced-color-adjust: none;color: ${Ei.ButtonText};fill: currentcolor}:host(:not([aria-selected="true"]):hover), :host([aria-selected="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([disabled]), :host([disabled]:not([aria-selected="true"]):hover){background: ${Ei.Canvas};color: ${Ei.GrayText};fill: currentcolor;opacity: 1}`))}),ss.compose({baseName:"picker-list",template:(e,t)=>K`<template slot="list-region" role="list" class="picker-list"><slot></slot><slot name="input-region"></slot></template>`,styles:(e,t)=>Me` :host{display: flex;flex-direction: row;column-gap: calc(${fr} * 1px);row-gap: calc(${fr} * 1px);flex-wrap: wrap}::slotted([role="combobox"]){min-width: 260px;width: auto;box-sizing: border-box;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 1px);font-family: ${nr};outline: none;user-select: none;font-size: ${br};line-height: ${yr};padding: 0 calc(${fr} * 2px + 1px)}::slotted([role="combobox"]:active){{background: ${sd};border-color: ${Tl}}::slotted([role="combobox"]:focus-within){border-color: ${Cd};box-shadow: 0 0 0 1px ${Cd} inset}`.withBehaviors(Ka(Me` ::slotted([role="combobox"]:active){background: ${Ei.Field};border-color: ${Ei.Highlight}}::slotted([role="combobox"]:focus-within){border-color: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight} inset}::slotted(input:placeholder){color: ${Ei.GrayText}}`))}),ns.compose({baseName:"picker-list-item",template:(e,t)=>K`<template role="listitem" tabindex="0" @click="${(e,t)=>e.handleClick(t.event)}" @keydown="${(e,t)=>e.handleKeyDown(t.event)}"><slot></slot></template>`,styles:(e,t)=>Me` :host{display: flex;align-items: center;justify-items: center;font-family: ${nr};border-radius: calc(${hr} * 1px);border: calc(${vr} * 1px) solid transparent;box-sizing: border-box;background: ${ld};color: ${kd};cursor: pointer;fill: currentcolor;font-size: ${br};height: calc(${Fd} * 1px);line-height: ${yr};outline: none;overflow: hidden;padding: 0 calc(${fr} * 2.25px);user-select: none;white-space: nowrap}:host(:hover){background: ${dd}}:host(:active){background: ${hd}}:host(:${Ja}){background: ${ud};border-color: ${Cd}}:host([aria-selected="true"]){background: ${Al};color: ${_l}}`.withBehaviors(Ka(Me` :host{border-color: transparent;forced-color-adjust: none;color: ${Ei.ButtonText};fill: currentcolor}:host(:not([aria-selected="true"]):hover), :host([aria-selected="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([disabled]), :host([disabled]:not([aria-selected="true"]):hover){background: ${Ei.Canvas};color: ${Ei.GrayText};fill: currentcolor;opacity: 1}`))});const Hh=(e,t)=>Me` ${Xa("flex")} :host{align-items: center;outline: none;height: calc(${Fd} * 1px);width: calc(${Fd} * 1px);margin: calc(${Fd} * 1px) 0}.progress{height: 100%;width: 100%}.background{stroke: ${Jl};fill: none;stroke-width: 2px}.determinate{stroke: ${Yl};fill: none;stroke-width: 2px;stroke-linecap: round;transform-origin: 50% 50%;transform: rotate(-90deg);transition: all 0.2s ease-in-out}.indeterminate-indicator-1{stroke: ${Yl};fill: none;stroke-width: 2px;stroke-linecap: round;transform-origin: 50% 50%;transform: rotate(-90deg);transition: all 0.2s ease-in-out;animation: spin-infinite 2s linear infinite}:host([paused]) .indeterminate-indicator-1{animation-play-state: paused;stroke: ${Jl}}:host([paused]) .determinate{stroke: ${wd}}@keyframes spin-infinite{0%{stroke-dasharray: 0.01px 43.97px;transform: rotate(0deg)}50%{stroke-dasharray: 21.99px 21.99px;transform: rotate(450deg)}100%{stroke-dasharray: 0.01px 43.97px;transform: rotate(1080deg)}}`.withBehaviors(Ka(Me` .indeterminate-indicator-1, .determinate{stroke: ${Ei.FieldText}}.background{stroke: ${Ei.Field}}:host([paused]) .indeterminate-indicator-1{stroke: ${Ei.Field}}:host([paused]) .determinate{stroke: ${Ei.GrayText}}`));$s.compose({baseName:"progress-ring",template:Es,styles:Hh,indeterminateIndicator:'\n <svg class="progress" part="progress" viewBox="0 0 16 16">\n <circle\n class="background"\n part="background"\n cx="8px"\n cy="8px"\n r="7px"\n ></circle>\n <circle\n class="indeterminate-indicator-1"\n part="indeterminate-indicator-1"\n cx="8px"\n cy="8px"\n r="7px"\n ></circle>\n </svg>\n '});const _h=(e,t)=>Me` ${Xa("flex")} :host{align-items: center;outline: none;height: calc(${fr} * 1px);margin: calc(${fr} * 1px) 0}.progress{background-color: ${Jl};border-radius: calc(${fr} * 1px);width: 100%;height: 100%;display: flex;align-items: center;position: relative}.determinate{background-color: ${Yl};border-radius: calc(${fr} * 1px);height: 100%;transition: all 0.2s ease-in-out;display: flex}.indeterminate{height: 100%;border-radius: calc(${fr} * 1px);display: flex;width: 100%;position: relative;overflow: hidden}.indeterminate-indicator-1{position: absolute;opacity: 0;height: 100%;background-color: ${Yl};border-radius: calc(${fr} * 1px);animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);width: 40%;animation: indeterminate-1 2s infinite}.indeterminate-indicator-2{position: absolute;opacity: 0;height: 100%;background-color: ${Yl};border-radius: calc(${fr} * 1px);animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);width: 60%;animation: indeterminate-2 2s infinite}:host([paused]) .indeterminate-indicator-1, :host([paused]) .indeterminate-indicator-2{animation-play-state: paused;background-color: ${Jl}}:host([paused]) .determinate{background-color: ${wd}}@keyframes indeterminate-1{0%{opacity: 1;transform: translateX(-100%)}70%{opacity: 1;transform: translateX(300%)}70.01%{opacity: 0}100%{opacity: 0;transform: translateX(300%)}}@keyframes indeterminate-2{0%{opacity: 0;transform: translateX(-150%)}29.99%{opacity: 0}30%{opacity: 1;transform: translateX(-150%)}100%{transform: translateX(166.66%);opacity: 1}}`.withBehaviors(Ka(Me` .progress{forced-color-adjust: none;background-color: ${Ei.Field};box-shadow: 0 0 0 1px inset ${Ei.FieldText}}.determinate, .indeterminate-indicator-1, .indeterminate-indicator-2{forced-color-adjust: none;background-color: ${Ei.FieldText}}:host([paused]) .determinate, :host([paused]) .indeterminate-indicator-1, :host([paused]) .indeterminate-indicator-2{background-color: ${Ei.GrayText}}`));$s.compose({baseName:"progress",template:Ns,styles:_h,indeterminateIndicator1:'\n <span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>\n ',indeterminateIndicator2:'\n <span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>\n '});const Ph=(e,t)=>Me` ${Xa("flex")} :host{align-items: flex-start;margin: calc(${fr} * 1px) 0;flex-direction: column}.positioning-region{display: flex;flex-wrap: wrap}:host([orientation="vertical"]) .positioning-region{flex-direction: column}:host([orientation="horizontal"]) .positioning-region{flex-direction: row}`;Os.compose({baseName:"radio-group",template:As,styles:Ph});const Vh=(e,t)=>Me` ${Xa("inline-flex")} :host{--input-size: calc((${Fd} / 2) + ${fr});align-items: center;outline: none;margin: calc(${fr} * 1px) 0;/* Chromium likes to select label text or the default slot when the radio is clicked. Maybe there is a better solution here? */ user-select: none;position: relative;flex-direction: row;transition: all 0.2s ease-in-out}.control{position: relative;width: calc((${Fd} / 2 + ${fr}) * 1px);height: calc((${Fd} / 2 + ${fr}) * 1px);box-sizing: border-box;border-radius: 999px;border: calc(${gr} * 1px) solid ${$d};background: ${od};outline: none;cursor: pointer}.label{font-family: ${nr};color: ${kd};padding-inline-start: calc(${fr} * 2px + 2px);margin-inline-end: calc(${fr} * 2px + 2px);cursor: pointer;font-size: ${br};line-height: ${yr}}.label__hidden{display: none;visibility: hidden}.control, .checked-indicator{flex-shrink: 0}.checked-indicator{position: absolute;top: 5px;left: 5px;right: 5px;bottom: 5px;border-radius: 999px;display: inline-block;background: ${Fl};fill: ${Fl};opacity: 0;pointer-events: none}:host(:not([disabled])) .control:hover{background: ${sd};border-color: ${Nd}}:host(:not([disabled])) .control:active{background: ${ad};border-color: ${Ad}}:host(:${Ja}) .control{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}:host([aria-checked="true"]) .control{background: ${Al};border: calc(${gr} * 1px) solid ${Al}}:host([aria-checked="true"]:not([disabled])) .control:hover{background: ${Ol};border: calc(${gr} * 1px) solid ${Ol}}:host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator{background: ${Hl};fill: ${Hl}}:host([aria-checked="true"]:not([disabled])) .control:active{background: ${Tl};border: calc(${gr} * 1px) solid ${Tl}}:host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator{background: ${_l};fill: ${_l}}:host([aria-checked="true"]:${Ja}:not([disabled])) .control{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([aria-checked="true"]) .checked-indicator{opacity: 1}:host([disabled]){opacity: ${mr}}`.withBehaviors(Ka(Me` .control, :host([aria-checked="true"]:not([disabled])) .control{forced-color-adjust: none;border-color: ${Ei.FieldText};background: ${Ei.Field}}:host(:not([disabled])) .control:hover{border-color: ${Ei.Highlight};background: ${Ei.Field}}:host([aria-checked="true"]:not([disabled])) .control:hover, :host([aria-checked="true"]:not([disabled])) .control:active{border-color: ${Ei.Highlight};background: ${Ei.Highlight}}:host([aria-checked="true"]) .checked-indicator{background: ${Ei.Highlight};fill: ${Ei.Highlight}}:host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator, :host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator{background: ${Ei.HighlightText};fill: ${Ei.HighlightText}}:host(:${Ja}) .control{border-color: ${Ei.Highlight};box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([aria-checked="true"]:${Ja}:not([disabled])) .control{border-color: ${Ei.Highlight};box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([disabled]){forced-color-adjust: none;opacity: 1}:host([disabled]) .label{color: ${Ei.GrayText}}:host([disabled]) .control, :host([aria-checked="true"][disabled]) .control:hover, .control:active{background: ${Ei.Field};border-color: ${Ei.GrayText}}:host([disabled]) .checked-indicator, :host([aria-checked="true"][disabled]) .control:hover .checked-indicator{fill: ${Ei.GrayText};background: ${Ei.GrayText}}`));Ds.compose({baseName:"radio",template:Ts,styles:Vh,checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '});const Bh=yo.create("clear-button-hover").withDefault(e=>{const t=rd.getValueFor(e),i=Xl.getValueFor(e);return t.evaluate(e,i.evaluate(e).hover).hover}),Uh=yo.create("clear-button-active").withDefault(e=>{const t=rd.getValueFor(e),i=Xl.getValueFor(e);return t.evaluate(e,i.evaluate(e).hover).active});class jh extends Bs{constructor(){super(...arguments),this.appearance="outline"}}_d([de],jh.prototype,"appearance",void 0),jh.compose({baseName:"search",baseClass:Bs,template:(e,t)=>K`<template class=" ${e=>e.readOnly?"readonly":""}"><label part="label" for="control" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Qe({property:"defaultSlottedNodes",filter:_s})}></slot></label><div class="root" part="root" ${Fe("root")}>${it(0,t)}<div class="input-wrapper" part="input-wrapper"><input class="control" part="control" id="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" ?spellcheck="${e=>e.spellcheck}" :value="${e=>e.value}" type="search" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.ariaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${Fe("control")}/><slot name="close-button"><button class="clear-button ${e=>e.value?"":"clear-button__hidden"}" part="clear-button" tabindex="-1" @click=${e=>e.handleClearInput()}><slot name="close-glyph"><svg width="9" height="9" viewBox="0 0 9 9" xmlns="http://www.w3.org/2000/svg"><path d="M0.146447 0.146447C0.338683 -0.0478972 0.645911 -0.0270359 0.853553 0.146447L4.5 3.793L8.14645 0.146447C8.34171 -0.0488155 8.65829 -0.0488155 8.85355 0.146447C9.04882 0.341709 9.04882 0.658291 8.85355 0.853553L5.207 4.5L8.85355 8.14645C9.05934 8.35223 9.03129 8.67582 8.85355 8.85355C8.67582 9.03129 8.35409 9.02703 8.14645 8.85355L4.5 5.207L0.853553 8.85355C0.658291 9.04882 0.341709 9.04882 0.146447 8.85355C-0.0488155 8.65829 -0.0488155 8.34171 0.146447 8.14645L3.793 4.5L0.146447 0.853553C-0.0268697 0.680237 -0.0457894 0.34079 0.146447 0.146447Z" /></svg></slot></button></slot></div>${tt(0,t)}</div></template>`,styles:(e,t)=>Me` ${Xa("inline-block")} :host{font-family: ${nr};outline: none;user-select: none}.root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 1px);align-items: baseline}.control{-webkit-appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - 4px);width: 100%;margin-top: auto;margin-bottom: auto;border: none;padding: 0 calc(${fr} * 2px + 1px);font-size: ${br};line-height: ${yr}}.control::-webkit-search-cancel-button{-webkit-appearance: none}.control:hover, .control:${Ja}, .control:disabled, .control:active{outline: none}.clear-button{height: calc(100% - 2px);opacity: 0;margin: 1px;background: transparent;color: ${kd};fill: currentcolor;border: none;border-radius: calc(${hr} * 1px);min-width: calc(${Fd} * 1px);font-size: ${br};line-height: ${yr};outline: none;font-family: ${nr};padding: 0 calc((10 + (${fr} * 2 * ${ur})) * 1px)}.clear-button:hover{background: ${dd}}.clear-button:active{background: ${hd}}:host([appearance="filled"]) .clear-button:hover{background: ${Bh}}:host([appearance="filled"]) .clear-button:active{background: ${Uh}}.input-wrapper{display: flex;position: relative;width: 100%;height: 100%}.label{display: block;color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr};margin-bottom: 4px}.label__hidden{display: none;visibility: hidden}.input-wrapper, .start, .end{align-self: center}.start, .end{display: flex;margin: 1px;fill: currentcolor}::slotted([slot="end"]){height: 100%}.end{margin-inline-end: 1px;height: calc(100% - 2px)}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px;margin-inline-end: 11px;margin-inline-start: 11px;margin-top: auto;margin-bottom: auto}:host(:hover:not([disabled])) .root{background: ${sd};border-color: ${Ol}}:host(:active:not([disabled])) .root{background: ${sd};border-color: ${Tl}}:host(:focus-within:not([disabled])) .root{border-color: ${Cd};box-shadow: 0 0 0 1px ${Cd} inset}.clear-button__hidden{opacity: 0}:host(:hover:not([disabled], [readOnly])) .clear-button, :host(:active:not([disabled], [readOnly])) .clear-button, :host(:focus-within:not([disabled], [readOnly])) .clear-button{opacity: 1}:host(:hover:not([disabled], [readOnly])) .clear-button__hidden, :host(:active:not([disabled], [readOnly])) .clear-button__hidden, :host(:focus-within:not([disabled], [readOnly])) .clear-button__hidden{opacity: 0}:host([appearance="filled"]) .root{background: ${El}}:host([appearance="filled"]:hover:not([disabled])) .root{background: ${ed}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([disabled]){opacity: ${mr}}:host([disabled]) .control{border-color: ${$d}}`.withBehaviors(Ka(Me` .root, :host([appearance="filled"]) .root{forced-color-adjust: none;background: ${Ei.Field};border-color: ${Ei.FieldText}}:host(:hover:not([disabled])) .root, :host([appearance="filled"]:hover:not([disabled])) .root, :host([appearance="filled"]:hover) .root{background: ${Ei.Field};border-color: ${Ei.Highlight}}.start, .end{fill: currentcolor}:host([disabled]){opacity: 1}:host([disabled]) .root, :host([appearance="filled"]:hover[disabled]) .root{border-color: ${Ei.GrayText};background: ${Ei.Field}}:host(:focus-within:enabled) .root{border-color: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight} inset}input::placeholder{color: ${Ei.GrayText}}`)),shadowOptions:{delegatesFocus:!0}});class qh extends Gs{constructor(){super(...arguments),this.listboxScrollWidth=""}connectedCallback(){super.connectedCallback(),this.listbox&&El.setValueFor(this.listbox,yl)}get listboxMaxHeight(){return Math.floor(this.maxHeight/Id.getValueFor(this)).toString()}listboxScrollWidthChanged(){this.updateComputedStylesheet()}get selectSize(){var e;return`${null!==(e=this.size)&&void 0!==e?e:this.multiple?4:0}`}multipleChanged(e,t){super.multipleChanged(e,t),this.updateComputedStylesheet()}maxHeightChanged(e,t){this.collapsible&&this.updateComputedStylesheet()}setPositioning(){super.setPositioning(),this.updateComputedStylesheet()}sizeChanged(e,t){super.sizeChanged(e,t),this.updateComputedStylesheet(),this.collapsible?requestAnimationFrame(()=>{this.listbox.style.setProperty("display","flex"),this.listbox.style.setProperty("overflow","visible"),this.listbox.style.setProperty("visibility","hidden"),this.listbox.style.setProperty("width","auto"),this.listbox.hidden=!1,this.listboxScrollWidth=`${this.listbox.scrollWidth}`,this.listbox.hidden=!0,this.listbox.style.removeProperty("display"),this.listbox.style.removeProperty("overflow"),this.listbox.style.removeProperty("visibility"),this.listbox.style.removeProperty("width")}):this.listboxScrollWidth=""}updateComputedStylesheet(){this.computedStylesheet&&this.$fastController.removeStyles(this.computedStylesheet),this.computedStylesheet=Me` :host{--listbox-max-height: ${this.listboxMaxHeight};--listbox-scroll-width: ${this.listboxScrollWidth};--size: ${this.selectSize}}`,this.$fastController.addStyles(this.computedStylesheet)}}_d([b],qh.prototype,"listboxScrollWidth",void 0),qh.compose({baseName:"select",baseClass:Gs,template:Ys,styles:uh,indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '});const Gh=(e,t)=>Me` ${Xa("block")} :host{--skeleton-fill-default: #e1dfdd;overflow: hidden;width: 100%;position: relative;background-color: var(--skeleton-fill, var(--skeleton-fill-default));--skeleton-animation-gradient-default: linear-gradient( 270deg, var(--skeleton-fill, var(--skeleton-fill-default)) 0%, #f3f2f1 51.13%, var(--skeleton-fill, var(--skeleton-fill-default)) 100% );--skeleton-animation-timing-default: ease-in-out}:host([shape="rect"]){border-radius: calc(${hr} * 1px)}:host([shape="circle"]){border-radius: 100%;overflow: hidden}object{position: absolute;width: 100%;height: auto;z-index: 2}object img{width: 100%;height: auto}${Xa("block")} span.shimmer{position: absolute;width: 100%;height: 100%;background-image: var( --skeleton-animation-gradient, var(--skeleton-animation-gradient-default) );background-size: 0px 0px / 90% 100%;background-repeat: no-repeat;background-color: var(--skeleton-animation-fill, ${Jl});animation: shimmer 2s infinite;animation-timing-function: var( --skeleton-animation-timing, var(--skeleton-timing-default) );animation-direction: normal;z-index: 1}::slotted(svg){z-index: 2}::slotted(.pattern){width: 100%;height: 100%}@keyframes shimmer{0%{transform: translateX(-100%)}100%{transform: translateX(100%)}}`.withBehaviors(Ka(Me` :host{forced-color-adjust: none;background-color: ${Ei.ButtonFace};box-shadow: 0 0 0 1px ${Ei.ButtonText}}${Xa("block")} span.shimmer{display: none}`));Zs.compose({baseName:"skeleton",template:Ks,styles:Gh});const Wh=Me` :host{align-self: start;grid-row: 2;margin-top: -2px;height: calc((${Fd} / 2 + ${fr}) * 1px);width: auto}.container{grid-template-rows: auto auto;grid-template-columns: 0}.label{margin: 2px 0}`,Yh=Me` :host{justify-self: start;grid-column: 2;margin-left: 2px;height: auto;width: calc((${Fd} / 2 + ${fr}) * 1px)}.container{grid-template-columns: auto auto;grid-template-rows: 0;min-width: calc(var(--thumb-size) * 1px);height: calc(var(--thumb-size) * 1px)}.mark{transform: rotate(90deg);align-self: center}.label{margin-left: calc((${fr} / 2) * 3px);align-self: center}`,Kh=(e,t)=>Me` ${Xa("block")} :host{font-family: ${nr};color: ${kd};fill: currentcolor}.root{position: absolute;display: grid}.container{display: grid;justify-self: center}.label{justify-self: center;align-self: center;white-space: nowrap;max-width: 30px}.mark{width: calc((${fr} / 4) * 1px);height: calc(${Fd} * 0.25 * 1px);background: ${$d};justify-self: center}:host(.disabled){opacity: ${mr}}`.withBehaviors(Ka(Me` .mark{forced-color-adjust: none;background: ${Ei.FieldText}}:host(.disabled){forced-color-adjust: none;opacity: 1}:host(.disabled) .label{color: ${Ei.GrayText}}:host(.disabled) .mark{background: ${Ei.GrayText}}`));class Zh extends ea{sliderOrientationChanged(){this.sliderOrientation===Jt?(this.$fastController.addStyles(Wh),this.$fastController.removeStyles(Yh)):(this.$fastController.addStyles(Yh),this.$fastController.removeStyles(Wh))}}Zh.compose({baseName:"slider-label",baseClass:ea,template:Qs,styles:Kh});const Qh=Me` .track-start{left: 0}`,Xh=Me` .track-start{right: 0}`,Jh=(e,t)=>Me` :host([hidden]){display: none}${Xa("inline-grid")} :host{--thumb-size: calc(${Fd} * 0.5 - ${fr});--thumb-translate: calc(var(--thumb-size) * -0.5 + var(--track-width) / 2);--track-overhang: calc((${fr} / 2) * -1);--track-width: ${fr};--fast-slider-height: calc(var(--thumb-size) * 10);align-items: center;width: 100%;margin: calc(${fr} * 1px) 0;user-select: none;box-sizing: border-box;border-radius: calc(${hr} * 1px);outline: none;cursor: pointer}:host([orientation="horizontal"]) .positioning-region{position: relative;margin: 0 8px;display: grid;grid-template-rows: calc(var(--thumb-size) * 1px) 1fr}:host([orientation="vertical"]) .positioning-region{position: relative;margin: 0 8px;display: grid;height: 100%;grid-template-columns: calc(var(--thumb-size) * 1px) 1fr}:host(:${Ja}) .thumb-cursor{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}.thumb-container{position: absolute;height: calc(var(--thumb-size) * 1px);width: calc(var(--thumb-size) * 1px);transition: all 0.2s ease;color: ${kd};fill: currentcolor}.thumb-cursor{border: none;width: calc(var(--thumb-size) * 1px);height: calc(var(--thumb-size) * 1px);background: ${kd};border-radius: calc(${hr} * 1px)}.thumb-cursor:hover{background: ${kd};border-color: ${Nd}}.thumb-cursor:active{background: ${kd}}.track-start{background: ${Yl};position: absolute;height: 100%;left: 0;border-radius: calc(${hr} * 1px)}:host([orientation="horizontal"]) .thumb-container{transform: translateX(calc(var(--thumb-size) * 0.5px)) translateY(calc(var(--thumb-translate) * 1px))}:host([orientation="vertical"]) .thumb-container{transform: translateX(calc(var(--thumb-translate) * 1px)) translateY(calc(var(--thumb-size) * 0.5px))}:host([orientation="horizontal"]){min-width: calc(var(--thumb-size) * 1px)}:host([orientation="horizontal"]) .track{right: calc(var(--track-overhang) * 1px);left: calc(var(--track-overhang) * 1px);align-self: start;height: calc(var(--track-width) * 1px)}:host([orientation="vertical"]) .track{top: calc(var(--track-overhang) * 1px);bottom: calc(var(--track-overhang) * 1px);width: calc(var(--track-width) * 1px);height: 100%}.track{background: ${$d};position: absolute;border-radius: calc(${hr} * 1px)}:host([orientation="vertical"]){height: calc(var(--fast-slider-height) * 1px);min-height: calc(var(--thumb-size) * 1px);min-width: calc(${fr} * 20px)}:host([orientation="vertical"]) .track-start{height: auto;width: 100%;top: 0}:host([disabled]), :host([readonly]){cursor: ${Qa}}:host([disabled]){opacity: ${mr}}`.withBehaviors(new Wd(Qh,Xh),Ka(Me` .thumb-cursor{forced-color-adjust: none;border-color: ${Ei.FieldText};background: ${Ei.FieldText}}.thumb-cursor:hover, .thumb-cursor:active{background: ${Ei.Highlight}}.track{forced-color-adjust: none;background: ${Ei.FieldText}}:host(:${Ja}) .thumb-cursor{border-color: ${Ei.Highlight}}:host([disabled]){opacity: 1}:host([disabled]) .track, :host([disabled]) .thumb-cursor{forced-color-adjust: none;background: ${Ei.GrayText}}:host(:${Ja}) .thumb-cursor{background: ${Ei.Highlight};border-color: ${Ei.Highlight};box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}`));oa.compose({baseName:"slider",template:(e,t)=>K`<template role="slider" class="${e=>e.readOnly?"readonly":""} ${e=>e.orientation||Jt}" tabindex="${e=>e.disabled?null:0}" aria-valuetext="${e=>e.valueTextFormatter(e.value)}" aria-valuenow="${e=>e.value}" aria-valuemin="${e=>e.min}" aria-valuemax="${e=>e.max}" aria-disabled="${e=>!!e.disabled||void 0}" aria-readonly="${e=>!!e.readOnly||void 0}" aria-orientation="${e=>e.orientation}" class="${e=>e.orientation}"><div part="positioning-region" class="positioning-region"><div ${Fe("track")}part="track-container" class="track"><slot name="track"></slot><div part="track-start" class="track-start" style="${e=>e.position}"><slot name="track-start"></slot></div></div><slot></slot><div ${Fe("thumb")}part="thumb-container" class="thumb-container" style="${e=>e.position}"><slot name="thumb">${t.thumb||""}</slot></div></div></template>`,styles:Jh,thumb:'\n <div class="thumb-cursor"></div>\n '});const eu=(e,t)=>Me` :host([hidden]){display: none}${Xa("inline-flex")} :host{align-items: center;outline: none;font-family: ${nr};margin: calc(${fr} * 1px) 0;${""} user-select: none}:host([disabled]){opacity: ${mr}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .switch, :host([disabled]) .switch{cursor: ${Qa}}.switch{position: relative;outline: none;box-sizing: border-box;width: calc(${Fd} * 1px);height: calc((${Fd} / 2 + ${fr}) * 1px);background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${$d}}.switch:hover{background: ${sd};border-color: ${Nd};cursor: pointer}host([disabled]) .switch:hover, host([readonly]) .switch:hover{background: ${sd};border-color: ${Nd};cursor: ${Qa}}:host(:not([disabled])) .switch:active{background: ${ad};border-color: ${Ad}}:host(:${Ja}) .switch{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}.checked-indicator{position: absolute;top: 5px;bottom: 5px;background: ${kd};border-radius: calc(${hr} * 1px);transition: all 0.2s ease-in-out}.status-message{color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr}}:host([disabled]) .status-message, :host([readonly]) .status-message{cursor: ${Qa}}.label{color: ${kd};margin-inline-end: calc(${fr} * 2px + 2px);font-size: ${br};line-height: ${yr};cursor: pointer}.label__hidden{display: none;visibility: hidden}::slotted([slot="checked-message"]), ::slotted([slot="unchecked-message"]){margin-inline-start: calc(${fr} * 2px + 2px)}:host([aria-checked="true"]) .checked-indicator{background: ${Fl}}:host([aria-checked="true"]) .switch{background: ${Al};border-color: ${Al}}:host([aria-checked="true"]:not([disabled])) .switch:hover{background: ${Ol};border-color: ${Ol}}:host([aria-checked="true"]:not([disabled])) .switch:hover .checked-indicator{background: ${Hl}}:host([aria-checked="true"]:not([disabled])) .switch:active{background: ${Tl};border-color: ${Tl}}:host([aria-checked="true"]:not([disabled])) .switch:active .checked-indicator{background: ${_l}}:host([aria-checked="true"]:${Ja}:not([disabled])) .switch{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}.unchecked-message{display: block}.checked-message{display: none}:host([aria-checked="true"]) .unchecked-message{display: none}:host([aria-checked="true"]) .checked-message{display: block}`.withBehaviors(Ka(Me` .checked-indicator, :host(:not([disabled])) .switch:active .checked-indicator{forced-color-adjust: none;background: ${Ei.FieldText}}.switch{forced-color-adjust: none;background: ${Ei.Field};border-color: ${Ei.FieldText}}:host(:not([disabled])) .switch:hover{background: ${Ei.HighlightText};border-color: ${Ei.Highlight}}:host([aria-checked="true"]) .switch{background: ${Ei.Highlight};border-color: ${Ei.Highlight}}:host([aria-checked="true"]:not([disabled])) .switch:hover, :host(:not([disabled])) .switch:active{background: ${Ei.HighlightText};border-color: ${Ei.Highlight}}:host([aria-checked="true"]) .checked-indicator{background: ${Ei.HighlightText}}:host([aria-checked="true"]:not([disabled])) .switch:hover .checked-indicator{background: ${Ei.Highlight}}:host([disabled]){opacity: 1}:host(:${Ja}) .switch{border-color: ${Ei.Highlight};box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([aria-checked="true"]:${Ja}:not([disabled])) .switch{box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([disabled]) .checked-indicator{background: ${Ei.GrayText}}:host([disabled]) .switch{background: ${Ei.Field};border-color: ${Ei.GrayText}}`),new Wd(Me` .checked-indicator{left: 5px;right: calc(((${Fd} / 2) + 1) * 1px)}:host([aria-checked="true"]) .checked-indicator{left: calc(((${Fd} / 2) + 1) * 1px);right: 5px}`,Me` .checked-indicator{right: 5px;left: calc(((${Fd} / 2) + 1) * 1px)}:host([aria-checked="true"]) .checked-indicator{right: calc(((${Fd} / 2) + 1) * 1px);left: 5px}`));ra.compose({baseName:"switch",template:sa,styles:eu,switch:'\n <span class="checked-indicator" part="checked-indicator"></span>\n '});const tu=(e,t)=>Me` ${Xa("grid")} :host{box-sizing: border-box;font-family: ${nr};font-size: ${br};line-height: ${yr};color: ${kd};grid-template-columns: auto 1fr auto;grid-template-rows: auto 1fr}.tablist{display: grid;grid-template-rows: auto auto;grid-template-columns: auto;position: relative;width: max-content;align-self: end;padding: calc(${fr} * 4px) calc(${fr} * 4px) 0;box-sizing: border-box}.start, .end{align-self: center}.activeIndicator{grid-row: 2;grid-column: 1;width: 100%;height: 5px;justify-self: center;background: ${Al};margin-top: 10px;border-radius: calc(${hr} * 1px) calc(${hr} * 1px) 0 0}.activeIndicatorTransition{transition: transform 0.2s ease-in-out}.tabpanel{grid-row: 2;grid-column-start: 1;grid-column-end: 4;position: relative}:host([orientation="vertical"]){grid-template-rows: auto 1fr auto;grid-template-columns: auto 1fr}:host([orientation="vertical"]) .tablist{grid-row-start: 2;grid-row-end: 2;display: grid;grid-template-rows: auto;grid-template-columns: auto 1fr;position: relative;width: max-content;justify-self: end;align-self: flex-start;width: 100%;padding: 0 calc(${fr} * 4px) calc((${Fd} - ${fr}) * 1px) 0}:host([orientation="vertical"]) .tabpanel{grid-column: 2;grid-row-start: 1;grid-row-end: 4}:host([orientation="vertical"]) .end{grid-row: 3}:host([orientation="vertical"]) .activeIndicator{grid-column: 1;grid-row: 1;width: 5px;height: 100%;margin-inline-end: 10px;align-self: center;background: ${Al};margin-top: 0;border-radius: 0 calc(${hr} * 1px) calc(${hr} * 1px) 0}:host([orientation="vertical"]) .activeIndicatorTransition{transition: transform 0.2s linear}`.withBehaviors(Ka(Me` .activeIndicator, :host([orientation="vertical"]) .activeIndicator{forced-color-adjust: none;background: ${Ei.Highlight}}`)),iu=(e,t)=>Me` ${Xa("inline-flex")} :host{box-sizing: border-box;font-family: ${nr};font-size: ${br};line-height: ${yr};height: calc(${Fd} * 1px);padding: calc(${fr} * 5px) calc(${fr} * 4px);color: ${wd};fill: currentcolor;border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid transparent;align-items: center;justify-content: center;grid-row: 1;cursor: pointer}:host(:hover){color: ${kd};fill: currentcolor}:host(:active){color: ${kd};fill: currentcolor}:host([disabled]){cursor: ${Qa};opacity: ${mr}}:host([disabled]:hover){color: ${wd};background: ${ld}}:host([aria-selected="true"]){background: ${Jl};color: ${Yl};fill: currentcolor}:host([aria-selected="true"]:hover){background: ${ed};color: ${Kl};fill: currentcolor}:host([aria-selected="true"]:active){background: ${td};color: ${Zl};fill: currentcolor}:host(:${Ja}){outline: none;border: calc(${gr} * 1px) solid ${Cd};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd}}:host(:focus){outline: none}:host(.vertical){justify-content: end;grid-column: 2}:host(.vertical[aria-selected="true"]){z-index: 2}:host(.vertical:hover){color: ${kd}}:host(.vertical:active){color: ${kd}}:host(.vertical:hover[aria-selected="true"]){}`.withBehaviors(Ka(Me` :host{forced-color-adjust: none;border-color: transparent;color: ${Ei.ButtonText};fill: currentcolor}:host(:hover), :host(.vertical:hover), :host([aria-selected="true"]:hover){background: ${Ei.Highlight};color: ${Ei.HighlightText};fill: currentcolor}:host([aria-selected="true"]){background: ${Ei.HighlightText};color: ${Ei.Highlight};fill: currentcolor}:host(:${Ja}){border-color: ${Ei.ButtonText};box-shadow: none}:host([disabled]), :host([disabled]:hover){opacity: 1;color: ${Ei.GrayText};background: ${Ei.ButtonFace}}`));ua.compose({baseName:"tab",template:ha,styles:iu});const cu=(e,t)=>Me` ${Xa("block")} :host{box-sizing: border-box;font-size: ${br};line-height: ${yr};padding: 0 calc((6 + (${fr} * 2 * ${ur})) * 1px)}`;da.compose({baseName:"tab-panel",template:la,styles:cu}),ga.compose({baseName:"tabs",template:fa,styles:tu});const ou=(e,t)=>Me` ${Xa("inline-block")} :host{font-family: ${nr};outline: none;user-select: none}.control{box-sizing: border-box;position: relative;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 2px);font: inherit;font-size: ${br};line-height: ${yr};padding: calc(${fr} * 2px + 1px);width: 100%;resize: none}.control:hover:enabled{background: ${sd};border-color: ${Ol}}.control:active:enabled{background: ${ad};border-color: ${Tl}}.control:hover, .control:${Ja}, .control:disabled, .control:active{outline: none}:host(:focus-within) .control{border-color: ${Cd};box-shadow: 0 0 0 1px ${Cd} inset}:host([appearance="filled"]) .control{background: ${Jl}}:host([appearance="filled"]:hover:not([disabled])) .control{background: ${ed}}:host([resize="both"]) .control{resize: both}:host([resize="horizontal"]) .control{resize: horizontal}:host([resize="vertical"]) .control{resize: vertical}.label{display: block;color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr};margin-bottom: 4px}.label__hidden{display: none;visibility: hidden}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([disabled]){opacity: ${mr}}:host([disabled]) .control{border-color: ${$d}}:host([cols]){width: initial}:host([rows]) .control{height: initial}`.withBehaviors(Ka(Me` :host([disabled]){opacity: 1}`));class su extends za{constructor(){super(...arguments),this.appearance="outline"}}_d([de],su.prototype,"appearance",void 0),su.compose({baseName:"text-area",baseClass:za,template:Ca,styles:ou,shadowOptions:{delegatesFocus:!0}});const au=(e,t)=>Me` ${Xa("inline-block")} :host{font-family: ${nr};outline: none;user-select: none}.root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 1px);align-items: baseline}.control{-webkit-appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - 4px);width: 100%;margin-top: auto;margin-bottom: auto;border: none;padding: 0 calc(${fr} * 2px + 1px);font-size: ${br};line-height: ${yr}}.control:hover, .control:${Ja}, .control:disabled, .control:active{outline: none}.label{display: block;color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr};margin-bottom: 4px}.label__hidden{display: none;visibility: hidden}.start, .control, .end{align-self: center}.start, .end{display: flex;margin: auto;fill: currentcolor}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}.start{margin-inline-start: 11px}.end{margin-inline-end: 11px}:host(:hover:not([disabled])) .root{background: ${sd};border-color: ${Ol}}:host(:active:not([disabled])) .root{background: ${sd};border-color: ${Tl}}:host(:focus-within:not([disabled])) .root{border-color: ${Cd};box-shadow: 0 0 0 calc(${vr} * 1px) ${Cd} inset}:host([appearance="filled"]) .root{background: ${Jl}}:host([appearance="filled"]:hover:not([disabled])) .root{background: ${ed}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([disabled]){opacity: ${mr}}:host([disabled]) .control{border-color: ${$d}}`.withBehaviors(Ka(Me` .root, :host([appearance="filled"]) .root{forced-color-adjust: none;background: ${Ei.Field};border-color: ${Ei.FieldText}}:host(:hover:not([disabled])) .root, :host([appearance="filled"]:hover:not([disabled])) .root, :host([appearance="filled"]:hover) .root{background: ${Ei.Field};border-color: ${Ei.Highlight}}.start, .end{fill: currentcolor}:host([disabled]){opacity: 1}:host([disabled]) .root, :host([appearance="filled"]:hover[disabled]) .root{border-color: ${Ei.GrayText};background: ${Ei.Field}}:host(:focus-within:enabled) .root{border-color: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight} inset}input::placeholder{color: ${Ei.GrayText}}`));class nu extends xs{constructor(){super(...arguments),this.appearance="outline"}}_d([de],nu.prototype,"appearance",void 0),nu.compose({baseName:"text-field",baseClass:xs,template:(e,t)=>K`<template class=" ${e=>e.readOnly?"readonly":""}"><label part="label" for="control" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Qe({property:"defaultSlottedNodes",filter:_s})}></slot></label><div class="root" part="root">${it(0,t)}<input class="control" part="control" id="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" ?spellcheck="${e=>e.spellcheck}" :value="${e=>e.value}" type="${e=>e.type}" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.ariaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${Fe("control")}/>${tt(0,t)}</div></template>`,styles:au,shadowOptions:{delegatesFocus:!0}});const ru=(e,t)=>Me` ${Xa("inline-flex")} :host{--toolbar-item-gap: calc( (var(--design-unit) + calc(var(--density) + 2)) * 1px );background-color: ${El};border-radius: calc(${hr} * 1px);fill: currentcolor;padding: var(--toolbar-item-gap)}:host(${Ja}){outline: calc(${gr} * 1px) solid ${Od}}.positioning-region{align-items: flex-start;display: inline-flex;flex-flow: row wrap;justify-content: flex-start}:host([orientation="vertical"]) .positioning-region{flex-direction: column}::slotted(:not([slot])){flex: 0 0 auto;margin: 0 var(--toolbar-item-gap)}:host([orientation="vertical"]) ::slotted(:not([slot])){margin: var(--toolbar-item-gap) 0}.start, .end{display: flex;margin: auto;margin-inline: 0}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}`.withBehaviors(Ka(Me` :host(:${Ja}){box-shadow: 0 0 0 calc(${vr} * 1px) ${Ei.Highlight};color: ${Ei.ButtonText};forced-color-adjust: none}`));class lu extends Ma{connectedCallback(){super.connectedCallback();const e=to(this);e&&El.setValueFor(this,t=>bd.getValueFor(t).evaluate(t,El.getValueFor(e)))}}lu.compose({baseName:"toolbar",baseClass:Ma,template:La,styles:ru,shadowOptions:{delegatesFocus:!0}});const du=(e,t)=>{const i=e.tagFor(Hi);return Me` :host{contain: size;overflow: visible;height: 0;width: 0}.tooltip{box-sizing: border-box;border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Cd};box-shadow: 0 0 0 1px ${Cd} inset;background: ${Jl};color: ${kd};padding: 4px;height: fit-content;width: fit-content;font-family: ${nr};font-size: ${br};line-height: ${yr};white-space: nowrap;/* TODO: a mechanism to manage z-index across components https://github.com/microsoft/fast/issues/3813 */ z-index: 10000}${i}{display: flex;justify-content: center;align-items: center;overflow: visible;flex-direction: row}${i}.right, ${i}.left{flex-direction: column}${i}.top .tooltip{margin-bottom: 4px}${i}.bottom .tooltip{margin-top: 4px}${i}.left .tooltip{margin-right: 4px}${i}.right .tooltip{margin-left: 4px}${i}.top.left .tooltip, ${i}.top.right .tooltip{margin-bottom: 0px}${i}.bottom.left .tooltip, ${i}.bottom.right .tooltip{margin-top: 0px}${i}.top.left .tooltip, ${i}.bottom.left .tooltip{margin-right: 0px}${i}.top.right .tooltip, ${i}.bottom.right .tooltip{margin-left: 0px}`.withBehaviors(Ka(Me` :host([disabled]){opacity: 1}`))};Va.compose({baseName:"tooltip",template:Sa,styles:du});const hu=Me` .expand-collapse-glyph{transform: rotate(0deg)}:host(.nested) .expand-collapse-button{left: var(--expand-collapse-button-nested-width, calc(${Fd} * -1px))}:host([selected])::after{left: calc(${vr} * 1px)}:host([expanded]) > .positioning-region .expand-collapse-glyph{transform: rotate(45deg)}`,uu=Me` .expand-collapse-glyph{transform: rotate(180deg)}:host(.nested) .expand-collapse-button{right: var(--expand-collapse-button-nested-width, calc(${Fd} * -1px))}:host([selected])::after{right: calc(${vr} * 1px)}:host([expanded]) > .positioning-region .expand-collapse-glyph{transform: rotate(135deg)}`,fu=Se`((${rr} / 2) * ${fr}) + ((${fr} * ${ur}) / 2)`,pu=yo.create("tree-item-expand-collapse-hover").withDefault(e=>{const t=rd.getValueFor(e);return t.evaluate(e,t.evaluate(e).hover).hover}),mu=yo.create("tree-item-expand-collapse-selected-hover").withDefault(e=>{const t=Xl.getValueFor(e);return rd.getValueFor(e).evaluate(e,t.evaluate(e).rest).hover}),gu=(e,t)=>Me` /** * This animation exists because when tree item children are conditionally loaded * there is a visual bug where the DOM exists but styles have not yet been applied (essentially FOUC). * This subtle animation provides a ever so slight timing adjustment for loading that solves the issue. */ @keyframes treeItemLoading{0%{opacity: 0}100%{opacity: 1}}${Xa("block")} :host{contain: content;position: relative;outline: none;color: ${kd};background: ${ld};cursor: pointer;font-family: ${nr};--expand-collapse-button-size: calc(${Fd} * 1px);--tree-item-nested-width: 0}:host(:focus) > .positioning-region{outline: none}:host(:focus) .content-region{outline: none}:host(:${Ja}) .positioning-region{border: ${Cd} calc(${gr} * 1px) solid;border-radius: calc(${hr} * 1px);color: ${kd}}.positioning-region{display: flex;position: relative;box-sizing: border-box;background: ${ld};border: transparent calc(${gr} * 1px) solid;height: calc((${Fd} + 1) * 1px)}.positioning-region::before{content: "";display: block;width: var(--tree-item-nested-width);flex-shrink: 0}:host(:not([disabled])) .positioning-region:hover{background: ${dd}}:host(:not([disabled])) .positioning-region:active{background: ${hd}}.content-region{display: inline-flex;align-items: center;white-space: nowrap;width: 100%;height: calc(${Fd} * 1px);margin-inline-start: calc(${fr} * 2px + 8px);font-size: ${br};line-height: ${yr};font-weight: 400}.items{/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ font-size: calc(1em + (${fr} + 16) * 1px)}.expand-collapse-button{background: none;border: none;outline: none;/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: calc((${fu} + (${fr} * 2)) * 1px);height: calc((${fu} + (${fr} * 2)) * 1px);padding: 0;display: flex;justify-content: center;align-items: center;cursor: pointer;margin-left: 6px;margin-right: 6px}.expand-collapse-glyph{/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px;transition: transform 0.1s linear;pointer-events: none;fill: currentcolor}.start, .end{display: flex;fill: currentcolor}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}.start{/* TODO: horizontalSpacing https://github.com/microsoft/fast/issues/2766 */ margin-inline-end: calc(${fr} * 2px + 2px)}.end{/* TODO: horizontalSpacing https://github.com/microsoft/fast/issues/2766 */ margin-inline-start: calc(${fr} * 2px + 2px)}:host([expanded]) > .items{animation: treeItemLoading ease-in 10ms;animation-iteration-count: 1;animation-fill-mode: forwards}:host([disabled]) .content-region{opacity: ${mr};cursor: ${Qa}}:host(.nested) .content-region{position: relative;margin-inline-start: var(--expand-collapse-button-size)}:host(.nested) .expand-collapse-button{position: absolute}:host(.nested:not([disabled])) .expand-collapse-button:hover{background: ${pu}}:host([selected]) .positioning-region{background: ${Jl}}:host([selected]:not([disabled])) .positioning-region:hover{background: ${ed}}:host([selected]:not([disabled])) .positioning-region:active{background: ${td}}:host([selected]:not([disabled])) .expand-collapse-button:hover{background: ${mu}}:host([selected])::after{/* The background needs to be calculated based on the selected background state for this control. We currently have no way of changing that, so setting to accent-foreground-rest for the time being */ background: ${Yl};border-radius: calc(${hr} * 1px);content: "";display: block;position: absolute;top: calc((${Fd} / 4) * 1px);width: 3px;height: calc((${Fd} / 2) * 1px)}::slotted(${e.tagFor(ja)}){--tree-item-nested-width: 1em;--expand-collapse-button-nested-width: calc(${Fd} * -1px)}`.withBehaviors(new Wd(hu,uu),Ka(Me` :host{forced-color-adjust: none;border-color: transparent;background: ${Ei.Field};color: ${Ei.FieldText}}:host .content-region .expand-collapse-glyph{fill: ${Ei.FieldText}}:host .positioning-region:hover, :host([selected]) .positioning-region{background: ${Ei.Highlight}}:host .positioning-region:hover .content-region, :host([selected]) .positioning-region .content-region{color: ${Ei.HighlightText}}:host .positioning-region:hover .content-region .expand-collapse-glyph, :host .positioning-region:hover .content-region .start, :host .positioning-region:hover .content-region .end, :host([selected]) .content-region .expand-collapse-glyph, :host([selected]) .content-region .start, :host([selected]) .content-region .end{fill: ${Ei.HighlightText}}:host([selected])::after{background: ${Ei.Field}}:host(:${Ja}) .positioning-region{border-color: ${Ei.FieldText};box-shadow: 0 0 0 2px inset ${Ei.Field};color: ${Ei.FieldText}}:host([disabled]) .content-region, :host([disabled]) .positioning-region:hover .content-region{opacity: 1;color: ${Ei.GrayText}}:host([disabled]) .content-region .expand-collapse-glyph, :host([disabled]) .content-region .start, :host([disabled]) .content-region .end, :host([disabled]) .positioning-region:hover .content-region .expand-collapse-glyph, :host([disabled]) .positioning-region:hover .content-region .start, :host([disabled]) .positioning-region:hover .content-region .end{fill: ${Ei.GrayText}}:host([disabled]) .positioning-region:hover{background: ${Ei.Field}}.expand-collapse-glyph, .start, .end{fill: ${Ei.FieldText}}:host(.nested) .expand-collapse-button:hover{background: ${Ei.Field}}:host(.nested) .expand-collapse-button:hover .expand-collapse-glyph{fill: ${Ei.FieldText}}`));ja.compose({baseName:"tree-item",template:Ba,styles:gu,expandCollapseGlyph:'\n <svg\n viewBox="0 0 16 16"\n xmlns="http://www.w3.org/2000/svg"\n class="expand-collapse-glyph"\n >\n <path\n d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"\n />\n </svg>\n '});const vu=(e,t)=>Me` ${Xa("flex")} :host{flex-direction: column;align-items: stretch;min-width: fit-content;font-size: 0}:host:focus-visible{outline: none}`;Ga.compose({baseName:"tree-view",template:qa,styles:vu});const bu=(e,t)=>Me` ${Dd()}`;class yu extends Ai{}const zu={delegatesFocus:!0,mode:"open"},Cu={};yu.compose(Object.assign({baseName:"accordion",template:en,styles:bu,shadowOptions:zu},Cu));const Lu=(e,t)=>st(0,t),xu=(e,t)=>Me` ${Hd()} slot[name='collapsed-icon']{display: flex;stroke: var(--accent-foreground-rest);fill: none}slot[name='expanded-icon']{display: none;stroke: var(--accent-foreground-rest);fill: none}`;class Mu extends Qt{}const wu={delegatesFocus:!0,mode:"open"},Su={collapsedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="collapsed-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M9 5.44446V12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>',expandedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="expanded-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="minus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>'};Mu.compose(Object.assign({baseName:"accordion-item",template:Lu,styles:xu,shadowOptions:wu},Su));const ku=(e,t)=>Me` :host{--actions-opener-height-multiplier: 0.7px;--actions-opener-bg-color: 249 254 255;--menu-item-height-multiplier: 0.7px}.actions-container{align-items: center;display: flex;height: 100%;justify-content: right}.actions-menu{display: none;position: absolute;max-width: 350px;overflow-y: auto}.actions-vertical .actions-menu{padding: calc(var(--design-unit) * 1px);max-height: 175px;z-index: 100}.actions-menu:not(.hidden):hover{display: inline-flex}.hidden{display: none}.visible{display: inline-flex}.actions-opener{align-self: center;display: flex;height: calc( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) * var(--actions-opener-height-multiplier) )}svg{width: 100%;height: 100%;fill: #879ba6}.actions-opener:hover svg{fill: #fff}foundation-menu-item{display: flex;user-select: none}foundation-menu-item::part(content){margin-inline: 10px}foundation-menu-item[disabled]{pointer-events: none}.menu-item{flex: 1;max-height: calc( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) * var(--menu-item-height-multiplier) );min-height: 0}.actions-vertical .menu-item{flex: 1 1 auto;justify-content: center;margin: calc(var(--design-unit) * 1px)}.actions-vertical .visible, .actions-vertical .actions-menu:not(.hidden):hover{display: flex;flex-direction: column}`;var Eu=function(e,t){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},Eu(e,t)};function $u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}Eu(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var Nu=function(){return Nu=Object.assign||function(e){for(var t,i=1,c=arguments.length;i<c;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Nu.apply(this,arguments)};function Au(e,t){var i={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&t.indexOf(c)<0&&(i[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(c=Object.getOwnPropertySymbols(e);o<c.length;o++)t.indexOf(c[o])<0&&Object.prototype.propertyIsEnumerable.call(e,c[o])&&(i[c[o]]=e[c[o]])}return i}function Ou(e,t,i,c){var o,s=arguments.length,a=s<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,i):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,c);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function Tu(e,t){return function(i,c){t(i,c,e)}}function Ru(e,t,i,c){return new(i||(i=Promise))(function(o,s){function a(e){try{r(c.next(e))}catch(e){s(e)}}function n(e){try{r(c.throw(e))}catch(e){s(e)}}function r(e){e.done?o(e.value):function(e){return e instanceof i?e:new i(function(t){t(e)})}(e.value).then(a,n)}r((c=c.apply(e,t||[])).next())})}function Iu(e,t){var i,c,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=n(0),a.throw=n(1),a.return=n(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function n(n){return function(r){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,n[0]&&(s=0)),s;)try{if(i=1,c&&(o=2&n[0]?c.return:n[0]?c.throw||((o=c.return)&&o.call(c),0):c.next)&&!(o=o.call(c,n[1])).done)return o;switch(c=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,c=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){s.label=n[1];break}if(6===n[0]&&s.label<o[1]){s.label=o[1],o=n;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(n);break}o[2]&&s.ops.pop(),s.trys.pop();continue}n=t.call(e,s)}catch(e){n=[6,e],c=0}finally{i=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,r])}}}function Du(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],c=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&c>=e.length&&(e=void 0),{value:e&&e[c++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Fu(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var c,o,s=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(c=s.next()).done;)a.push(c.value)}catch(e){o={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a}function Hu(e,t,i){if(i||2===arguments.length)for(var c,o=0,s=t.length;o<s;o++)!c&&o in t||(c||(c=Array.prototype.slice.call(t,0,o)),c[o]=t[o]);return e.concat(c||Array.prototype.slice.call(t))}function _u(e){return this instanceof _u?(this.v=e,this):new _u(e)}function Pu(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,o=i.apply(e,t||[]),s=[];return c=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,l)}}),c[Symbol.asyncIterator]=function(){return this},c;function a(e,t){o[e]&&(c[e]=function(t){return new Promise(function(i,c){s.push([e,t,i,c])>1||n(e,t)})},t&&(c[e]=t(c[e])))}function n(e,t){try{!function(e){e.value instanceof _u?Promise.resolve(e.value.v).then(r,l):d(s[0][2],e)}(o[e](t))}catch(e){d(s[0][3],e)}}function r(e){n("next",e)}function l(e){n("throw",e)}function d(e,t){e(t),s.shift(),s.length&&n(s[0][0],s[0][1])}}function Vu(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=Du(e),t={},c("next"),c("throw"),c("return"),t[Symbol.asyncIterator]=function(){return this},t);function c(i){t[i]=e[i]&&function(t){return new Promise(function(c,o){(function(e,t,i,c){Promise.resolve(c).then(function(t){e({value:t,done:i})},t)})(c,o,(t=e[i](t)).done,t.value)})}}}function Bu(e,t,i,c){if("a"===i&&!c)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!c:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?c:"a"===i?c.call(e):c?c.value:t.get(e)}function Uu(e,t,i,c,o){if("m"===c)throw new TypeError("Private method is not writable");if("a"===c&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===c?o.call(e,i):o?o.value=i:t.set(e,i),i}"function"==typeof SuppressedError&&SuppressedError;const ju={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},qu={silent:{level:-1},fatal:{level:ju.fatal},error:{level:ju.error},warn:{level:ju.warn},log:{level:ju.log},info:{level:ju.info},success:{level:ju.success},fail:{level:ju.fail},ready:{level:ju.info},start:{level:ju.info},box:{level:ju.info},debug:{level:ju.debug},trace:{level:ju.trace},verbose:{level:ju.verbose}};function Gu(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&(!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e)))}function Wu(e,t,i=".",c){if(!Gu(t))return Wu(e,{},i,c);const o=Object.assign({},t);for(const t in e){if("__proto__"===t||"constructor"===t)continue;const s=e[t];null!=s&&(c&&c(o,t,s,i)||(Array.isArray(s)&&Array.isArray(o[t])?o[t]=[...s,...o[t]]:Gu(s)&&Gu(o[t])?o[t]=Wu(s,o[t],(i?`${i}.`:"")+t.toString(),c):o[t]=s))}return o}const Yu=(...e)=>e.reduce((e,t)=>Wu(e,t,"",Ku),{});var Ku;function Zu(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let Qu=!1;const Xu=[];class Ju{options;_lastLog;_mockFn;constructor(e={}){const t=e.types||qu;this.options=Yu({...e,defaults:{...e.defaults},level:ef(e.level,t),reporters:[...e.reporters||[]]},{types:qu,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const e in t){const i={type:e,...this.options.defaults,...t[e]};this[e]=this._wrapLogFn(i),this[e].raw=this._wrapLogFn(i,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=ef(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,t)}create(e){const t=new Ju({...this.options,...e});return this._mockFn&&t.mockTypes(this._mockFn),t}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){const t=this.options.reporters.indexOf(e);if(-1!==t)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this.options.types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this.options.types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){Qu=!0}resumeLogs(){Qu=!1;const e=Xu.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){const t=e||this.options.mockFn;if(this._mockFn=t,"function"==typeof t)for(const e in this.options.types)this[e]=t(e,this.options.types[e])||this[e],this[e].raw=this[e]}_wrapLogFn(e,t){return(...i)=>{if(!Qu)return this._logFn(e,i,t);Xu.push([this,e,i,t])}}_logFn(e,t,i){if((e.level||0)>this.level)return!1;const c={date:new Date,args:[],...e,level:ef(e.level,this.options.types)};!i&&1===t.length&&Zu(t[0])?Object.assign(c,t[0]):c.args=[...t],c.message&&(c.args.unshift(c.message),delete c.message),c.additional&&(Array.isArray(c.additional)||(c.additional=c.additional.split("\n")),c.args.push("\n"+c.additional.join("\n")),delete c.additional),c.type="string"==typeof c.type?c.type.toLowerCase():"log",c.tag="string"==typeof c.tag?c.tag:"";const o=(e=!1)=>{const t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){const e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=c,this._log(c))};clearTimeout(this._lastLog.timeout);const s=this._lastLog.time&&c.date?c.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=c.date,s<this.options.throttle)try{const e=JSON.stringify([c.type,c.tag,c.args]),t=this._lastLog.serialized===e;if(this._lastLog.serialized=e,t&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin))return void(this._lastLog.timeout=setTimeout(o,this.options.throttle))}catch{}o(!0)}_log(e){for(const t of this.options.reporters)t.log(e,{options:this.options})}}function ef(e,t={},i=3){return void 0===e?i:"number"==typeof e?e:t[e]&&void 0!==t[e].level?t[e].level:i}function tf(e={}){return new Ju(e)}Ju.prototype.add=Ju.prototype.addReporter,Ju.prototype.remove=Ju.prototype.removeReporter,Ju.prototype.clear=Ju.prototype.removeReporter,Ju.prototype.withScope=Ju.prototype.withTag,Ju.prototype.mock=Ju.prototype.mockTypes,Ju.prototype.pause=Ju.prototype.pauseLogs,Ju.prototype.resume=Ju.prototype.resumeLogs;class cf{options;defaultColor;levelColorMap;typeColorMap;constructor(e){this.options={...e},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(e){return e<1?console.__error||console.error:1===e?console.__warn||console.warn:console.__log||console.log}log(e){const t=this._getLogFn(e.level),i="log"===e.type?"":e.type,c=e.tag||"",o=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,s=`%c${[c,i].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${s}%c ${e.args[0]}`,o,"",...e.args.slice(1)):t(s,o,...e.args)}}function of(e={}){return tf({reporters:e.reporters||[new cf({})],prompt:(e,t={})=>"confirm"===t.type?Promise.resolve(confirm(e)):Promise.resolve(prompt(e)),...e})}of();const sf={level:ju.debug};function af(e,t=sf){const i=("undefined"!=typeof window?of:tf)().withTag(e);void 0!==(null==t?void 0:t.level)&&(i.level=t.level);const c=i;return c.deprecated=(e,t="Consult docs for better alternative.",i)=>{c.warn(`Deprecated symbol used '${e}'. ${t}`,""+(i?`Will be removed in version ${i}.`:""))},c}const nf=af("foundation-comms"),rf=new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)\b\/*$/,"i");var lf;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(lf||(lf={}));class df{trackEvent(e,t){nf.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const hf=mt.createInterface(e=>e.singleton(df));class uf extends BroadcastChannel{constructor(){super(...arguments),this.postMessage=(...e)=>{const[t,i]=e;super.postMessage({type:t,detail:i})},this.isMessageType=(e,t)=>{var i;return(null===(i=t.data)||void 0===i?void 0:i.type)===e}}}const ff=e=>{class t extends uf{constructor(){super(e)}}return mt.createInterface(e=>e.transient(t))};af("foundation-broadcast-channel");const pf=af("foundation-user"),mf={trackActionExclusions:[],trackPathExclusions:[""],setUser(e,t){if(e.isAuthenticated)throw new Error("User already set. If this is intentional, please call User.unset first.");return pf.debug("setUser",t),e.rawProperties=structuredClone(t),e.userKVs=t.userKVs,e.details=t.details,e.permission=t.permission,e.profile=t.profile,e.sourceRef=t.sourceRef,e.userName=t.userName,e.isAuthenticated=!0,e},unsetUser:e=>(pf.debug("unsetUser"),e.rawProperties=void 0,e.userKVs=void 0,e.details=void 0,e.permission=void 0,e.profile=void 0,e.sourceRef=void 0,e.userName=void 0,e.isAuthenticated=!1,e)},gf=mt.createInterface(e=>e.instance(mf)),vf=ff("genesis-user");const bf=()=>{let e=[];return{subscribe:t=>(e.push(t),()=>e=e.filter(e=>e!==t)),publish(t){e.forEach(e=>e(t))}}},yf=af("foundation-utils");function zf(e){const t=[],i=new Set;return function e(c){const o=Array.from(c.querySelectorAll("*"));t.push(...o),o.forEach(t=>{t.shadowRoot&&!i.has(t.shadowRoot)&&(i.add(t.shadowRoot),e(t.shadowRoot))})}(e),t}function Cf(e,t){let i=e;for(;i;){const e=i.tagName.toLowerCase();if(e.endsWith("-design-system-provider")){const t=e.split("-design-system-provider")[0];if(t)return yf.debug(`Found provider by ancestor search: ${e}, prefix: ${t}`),{element:i,prefix:t}}i=i.parentElement?i.parentElement:i.getRootNode&&i.getRootNode()instanceof ShadowRoot?i.getRootNode().host:null}const c=document.querySelectorAll('[class*="-design-system-provider"],[id*="-design-system-provider"]'),o=Array.from(c),s=zf(document).filter(e=>{var t;const i=null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase();return(null==i?void 0:i.endsWith("-design-system-provider"))||!1});if(o.push(...s),o.length>0){const e=o[0],t=e.tagName.toLowerCase(),i=t.split("-design-system-provider")[0];if(i)return yf.debug(`Found provider by document search: ${t}, prefix: ${i}`),{element:e,prefix:i}}return yf.debug(`No provider found. Falling back to ${t}.`),{element:null,prefix:t}}const Lf=["text-field","text-area","combobox"],xf=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Mf=e=>Lf.map(t=>`${e}-${t}`),wf={rapid:Mf("rapid"),zero:Mf("zero")};function Sf(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=wf[e])&&void 0!==t?t:[]}),c=t.filter(Boolean);return Array.from(new Set([...xf,...i,...c])).join(",")}const kf=new Map([["FAST-TEXT-AREA","input"],["FAST-TEXT-FIELD","input"],["FOUNDATION-TEXT-AREA","input"],["FOUNDATION-TEXT-FIELD","input"],["INPUT","input"],["ZERO-TEXT-FIELD","input"]]);function Ef(e){this.keyAttr||(this.target[this.targetName]=e)}function $f(e,t){this.keyAttr&&(this.updateTarget=Ef),this.originalBind.call(this,e,t),this.target.addEventListener(this.changeEvent,this.changeHandler)}function Nf(){this.originalUnbind.call(this),this.target.removeEventListener(this.changeEvent,this.changeHandler)}class Af extends D{constructor(e,t,i,c){super(e),this.keyAttr=c,this.conversionType=t,this.eventName=i}createBehavior(e){const t=super.createBehavior(e);return t.originalBind=t.bind,t.originalUnbind=t.unbind,t.keyAttr=this.keyAttr,t.bind=$f,t.unbind=Nf,t.changeEvent=function(e,t){var i;const c=e.tagName;return"default"===t?null!==(i=kf.get(c))&&void 0!==i?i:"change":t}(e,this.eventName),t.changeHandler=()=>{const e="boolean"===this.conversionType?t.target.checked:t.target.value;if(this.keyAttr){const i=t.bindingObserver.last,c=t.target[this.keyAttr];i.propertySource[i.propertyName][c]=this.convert(e)}else{const i=t.bindingObserver.last;i.propertySource[i.propertyName]=this.convert(e)}},t}convert(e){if(null==e)return e;switch(this.conversionType){case"time":const t=new Date(e).getTime();return isNaN(t)?void 0:t;case"number":return e.length?Number(e):void 0;case"string":return String(e);case"boolean":return Boolean(e);default:return e}}}function Of(e,t="string",i="default",c){return new Af(e,t,i,c)}function Tf(e,t,i){const c=e=>"function"==typeof e?e:()=>e,o=c(t),s=c(i);return(t,i)=>e(t,i)?o(t,i):s(t,i)}const Rf=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,If=e=>{const t=e.split(":");let i,c;2===t.length?[i,c]=t:c=e;const o=(e=>{if(Rf.test(e)){const t=atob(e),i=new Uint8Array(t.length);return[...t].forEach((e,c)=>{i[c]=t.charCodeAt(c)}),i.buffer}return e})(c);if("str"===i){return new TextDecoder("utf-8").decode(o)}return o},Df=e=>{const t=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const t=new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),"");return btoa(t)}return""})(e);return"string"==typeof e?`str:${t}`:e instanceof ArrayBuffer?`bin:${t}`:""},Ff=e=>((e,t)=>{if(!t)return!1;const i=`feature.${t}`.toLowerCase(),c=new URLSearchParams(e);for(const[e]of c.entries())if(e.toLowerCase()===i)return!0;return!1})(window.location.search,e);let Hf="webpack";try{"undefined"!=typeof BUILDER&&(Hf=BUILDER)}catch(dC){}let _f="/";try{"undefined"!=typeof PUBLIC_PATH&&(_f=PUBLIC_PATH.replace(/\/$/,""))}catch(e){}let Pf,Vf,Bf="gwf";try{"undefined"!=typeof SOCKET_EXT&&(Bf=SOCKET_EXT)}catch(e){}try{Pf=FORCE_HTTP}catch(e){}try{Vf=FORCE_HTTP_REQREP}catch(e){}const Uf=`${location.protocol.replace("http","ws")}//${location.host}${_f}/${Bf}/`;let jf,qf,Gf,Wf,Yf=`${"true"===Pf||Ff("forceHttp")?location.protocol:location.protocol.replace("http","ws")}//${location.host}/${Bf}/`;try{"undefined"!=typeof API_HOST&&(Yf=API_HOST)}catch(e){}try{jf=HTTP_CONFIG}catch(e){}try{qf=DEFAULT_ORGANISATION}catch(e){}try{Gf=DEFAULT_PASSWORD}catch(e){}try{Wf=DEFAULT_USER}catch(e){}let Kf="gwf/event-login-auth";"undefined"!=typeof GENX_LOGIN_URL&&(Kf=GENX_LOGIN_URL),"undefined"!=typeof GENX_LOGIN_REFRESH_URL&&GENX_LOGIN_REFRESH_URL;let Zf="gwf/event-login-details";"undefined"!=typeof GENX_LOGIN_DETAILS_URL&&(Zf=GENX_LOGIN_DETAILS_URL),"undefined"!=typeof GENX_LOGOUT_URL&&GENX_LOGOUT_URL,"undefined"!=typeof GENX_CHANGE_PASSWORD_URL&&GENX_CHANGE_PASSWORD_URL,"undefined"!=typeof GENX_FORGOT_PASSWORD_URL&&GENX_FORGOT_PASSWORD_URL,"undefined"!=typeof GENX_RESET_PASSWORD_URL&&GENX_RESET_PASSWORD_URL,"undefined"!=typeof GENX_SSO_LIST_URL&&GENX_SSO_LIST_URL,"undefined"!=typeof GENX_SSO_LOGIN_URL&&GENX_SSO_LOGIN_URL;let Qf="default";"undefined"!=typeof GENX_ENVIRONMENT_LEVEL&&(Qf=GENX_ENVIRONMENT_LEVEL),"undefined"!=typeof GENX_ACCEPT_TERMS_URL&&GENX_ACCEPT_TERMS_URL;class Xf{constructor(e){this.logger=e,this.map=new Map}set(e,t){this.logger(e,t),this.lastError=t,this.map=new Map(this.map.set(e,t))}get(e){return this.map.get(e)}has(e){return this.map.has(e)}delete(e){const t=this.map.get(e)===this.lastError,i=this.map.delete(e);return i&&(this.map=new Map(this.map),t&&(this.lastError=void 0)),i}clear(){this.lastError=void 0,this.map=new Map}get size(){return this.map.size}values(){return this.map.values()}get messages(){const e=this.size;if(!e)return"";const t=[];for(const{message:e}of this.map.values())t.push(e);return`${e} Error${e>1?"s":""} Occurred:\n${t.join("\n")}`}}Ou([b],Xf.prototype,"map",void 0),Ou([b],Xf.prototype,"lastError",void 0);function Jf(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,19).replace("T"," ")}function ep(e,t){return t?Jf(e):function(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,10)}(e)}const tp={k:1e3,m:1e6,b:1e9},ip=/^(.*?)([kmb])$/i;class cp{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),c=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>c.get(e)}parse(e){const t=e.trim().match(ip),i=t?tp[t[2].toLowerCase()]:1;return(e=(t?t[1]:e).trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e*i:NaN}hasSeparator(e){return this._separator.test(e)}}var op="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function sp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ap,np={exports:{}},rp=np.exports;
|
|
35
|
+
function _d(e,t,i,c){var o,s=arguments.length,a=s<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,i):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,c);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}Qt.compose({baseName:"accordion-item",template:st,styles:Hd,collapsedIcon:'\n <svg\n width="20"\n height="20"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M16.22 3H3.78a.78.78 0 00-.78.78v12.44c0 .43.35.78.78.78h12.44c.43 0 .78-.35.78-.78V3.78a.78.78 0 00-.78-.78zM3.78 2h12.44C17.2 2 18 2.8 18 3.78v12.44c0 .98-.8 1.78-1.78 1.78H3.78C2.8 18 2 17.2 2 16.22V3.78C2 2.8 2.8 2 3.78 2zM11 9h3v2h-3v3H9v-3H6V9h3V6h2v3z"\n />\n </svg>\n ',expandedIcon:'\n <svg\n width="20"\n height="20"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M3.78 3h12.44c.43 0 .78.35.78.78v12.44c0 .43-.35.78-.78.78H3.78a.78.78 0 01-.78-.78V3.78c0-.43.35-.78.78-.78zm12.44-1H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.78-.8 1.78-1.78V3.78C18 2.8 17.2 2 16.22 2zM14 9H6v2h8V9z"\n />\n </svg>\n '}),Ai.compose({baseName:"accordion",template:Xt,styles:Dd});const Pd="box-shadow: 0 0 calc((var(--elevation) * 0.225px) + 2px) rgba(0, 0, 0, calc(.11 * (2 - var(--background-luminance, 1)))), 0 calc(var(--elevation) * 0.4px) calc((var(--elevation) * 0.9px)) rgba(0, 0, 0, calc(.13 * (2 - var(--background-luminance, 1))));",Vd=Me` ${Xa("inline-flex")} :host{font-family: ${nr};outline: none;font-size: ${br};line-height: ${yr};height: calc(${Fd} * 1px);min-width: calc(${Fd} * 1px);background-color: ${Jl};color: ${kd};border-radius: calc(${hr} * 1px);fill: currentcolor;cursor: pointer}.control{background: transparent;height: inherit;flex-grow: 1;box-sizing: border-box;display: inline-flex;justify-content: center;align-items: baseline;padding: 0 calc((10 + (${fr} * 2 * ${ur})) * 1px);white-space: nowrap;outline: none;text-decoration: none;border: calc(${gr} * 1px) solid transparent;color: inherit;border-radius: inherit;fill: inherit;cursor: inherit;font-weight: inherit;font-family: inherit;font-size: inherit;line-height: inherit}:host(:hover){background-color: ${ed}}:host(:active){background-color: ${td}}.control:${Ja}{border-color: ${Cd};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset}.control::-moz-focus-inner{border: 0}.start, .content, .end{align-self: center}.start, .end{display: flex}.control.icon-only{padding: 0;line-height: 0}::slotted(svg){${""} width: 16px;height: 16px;pointer-events: none}.start{margin-inline-end: 11px}.end{margin-inline-start: 11px}`.withBehaviors(Ka(Me` :host .control{background-color: ${Ei.ButtonFace};border-color: ${Ei.ButtonText};color: ${Ei.ButtonText};fill: currentColor}:host(:hover) .control{forced-color-adjust: none;background-color: ${Ei.Highlight};color: ${Ei.HighlightText}}.control:${Ja}{forced-color-adjust: none;background-color: ${Ei.Highlight};border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Ei.ButtonText} inset;color: ${Ei.HighlightText}}.control:hover, :host([appearance="outline"]) .control:hover{border-color: ${Ei.ButtonText}}:host([href]) .control{border-color: ${Ei.LinkText};color: ${Ei.LinkText}}:host([href]) .control:hover, :host([href]) .control:${Ja}{forced-color-adjust: none;background: ${Ei.ButtonFace};border-color: ${Ei.LinkText};box-shadow: 0 0 0 1px ${Ei.LinkText} inset;color: ${Ei.LinkText};fill: currentColor}`)),Bd=Me` :host([appearance="accent"]){background: ${Al};color: ${Fl}}:host([appearance="accent"]:hover){background: ${Ol};color: ${Hl}}:host([appearance="accent"]:active) .control:active{background: ${Tl};color: ${_l}}:host([appearance="accent"]) .control:${Ja}{box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset, 0 0 0 calc((${vr} + ${gr}) * 1px) ${xd} inset}`.withBehaviors(Ka(Me` :host([appearance="accent"]) .control{forced-color-adjust: none;background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([appearance="accent"]) .control:hover, :host([appearance="accent"]:active) .control:active{background: ${Ei.HighlightText};border-color: ${Ei.Highlight};color: ${Ei.Highlight}}:host([appearance="accent"]) .control:${Ja}{border-color: ${Ei.Highlight};box-shadow: 0 0 0 calc(${vr} * 1px) ${Ei.HighlightText} inset}:host([appearance="accent"][href]) .control{background: ${Ei.LinkText};color: ${Ei.HighlightText}}:host([appearance="accent"][href]) .control:hover{background: ${Ei.ButtonFace};border-color: ${Ei.LinkText};box-shadow: none;color: ${Ei.LinkText};fill: currentColor}:host([appearance="accent"][href]) .control:${Ja}{border-color: ${Ei.LinkText};box-shadow: 0 0 0 calc(${vr} * 1px) ${Ei.HighlightText} inset}`)),Ud=Me` :host([appearance="hypertext"]){font-size: inherit;line-height: inherit;height: auto;min-width: 0;background: transparent}:host([appearance="hypertext"]) .control{display: inline;padding: 0;border: none;box-shadow: none;border-radius: 0;line-height: 1}:host a.control:not(:link){background-color: transparent;cursor: default}:host([appearance="hypertext"]) .control:link, :host([appearance="hypertext"]) .control:visited{background: transparent;color: ${Yl};border-bottom: calc(${gr} * 1px) solid ${Yl}}:host([appearance="hypertext"]:hover), :host([appearance="hypertext"]) .control:hover{background: transparent;border-bottom-color: ${Kl}}:host([appearance="hypertext"]:active), :host([appearance="hypertext"]) .control:active{background: transparent;border-bottom-color: ${Zl}}:host([appearance="hypertext"]) .control:${Ja}{border-bottom: calc(${vr} * 1px) solid ${Cd};margin-bottom: calc(calc(${gr} - ${vr}) * 1px)}`.withBehaviors(Ka(Me` :host([appearance="hypertext"]:hover){background-color: ${Ei.ButtonFace};color: ${Ei.ButtonText}}:host([appearance="hypertext"][href]) .control:hover, :host([appearance="hypertext"][href]) .control:active, :host([appearance="hypertext"][href]) .control:${Ja}{color: ${Ei.LinkText};border-bottom-color: ${Ei.LinkText};box-shadow: none}`)),jd=Me` :host([appearance="lightweight"]){background: transparent;color: ${Yl}}:host([appearance="lightweight"]) .control{padding: 0;height: initial;border: none;box-shadow: none;border-radius: 0}:host([appearance="lightweight"]:hover){background: transparent;color: ${Kl}}:host([appearance="lightweight"]:active){background: transparent;color: ${Zl}}:host([appearance="lightweight"]) .content{position: relative}:host([appearance="lightweight"]) .content::before{content: "";display: block;height: calc(${gr} * 1px);position: absolute;top: calc(1em + 4px);width: 100%}:host([appearance="lightweight"]:hover) .content::before{background: ${Kl}}:host([appearance="lightweight"]:active) .content::before{background: ${Zl}}:host([appearance="lightweight"]) .control:${Ja} .content::before{background: ${kd};height: calc(${vr} * 1px)}`.withBehaviors(Ka(Me` :host([appearance="lightweight"]) .control:hover, :host([appearance="lightweight"]) .control:${Ja}{forced-color-adjust: none;background: ${Ei.ButtonFace};color: ${Ei.Highlight}}:host([appearance="lightweight"]) .control:hover .content::before, :host([appearance="lightweight"]) .control:${Ja} .content::before{background: ${Ei.Highlight}}:host([appearance="lightweight"][href]) .control:hover, :host([appearance="lightweight"][href]) .control:${Ja}{background: ${Ei.ButtonFace};box-shadow: none;color: ${Ei.LinkText}}:host([appearance="lightweight"][href]) .control:hover .content::before, :host([appearance="lightweight"][href]) .control:${Ja} .content::before{background: ${Ei.LinkText}}`)),qd=Me` :host([appearance="outline"]){background: transparent;border-color: ${Al}}:host([appearance="outline"]:hover){border-color: ${Ol}}:host([appearance="outline"]:active){border-color: ${Tl}}:host([appearance="outline"]) .control{border-color: inherit}:host([appearance="outline"]) .control:${Ja}{box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset;border-color: ${Cd}}`.withBehaviors(Ka(Me` :host([appearance="outline"]) .control{border-color: ${Ei.ButtonText}}:host([appearance="outline"]) .control:${Ja}{forced-color-adjust: none;background-color: ${Ei.Highlight};border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Ei.ButtonText} inset;color: ${Ei.HighlightText};fill: currentColor}:host([appearance="outline"][href]) .control{background: ${Ei.ButtonFace};border-color: ${Ei.LinkText};color: ${Ei.LinkText};fill: currentColor}:host([appearance="outline"][href]) .control:hover, :host([appearance="outline"][href]) .control:${Ja}{forced-color-adjust: none;border-color: ${Ei.LinkText};box-shadow: 0 0 0 1px ${Ei.LinkText} inset}`)),Gd=Me` :host([appearance="stealth"]){background: ${ld}}:host([appearance="stealth"]:hover){background: ${dd}}:host([appearance="stealth"]:active){background: ${hd}}`.withBehaviors(Ka(Me` :host([appearance="stealth"]), :host([appearance="stealth"]) .control{forced-color-adjust: none;background: ${Ei.ButtonFace};border-color: transparent;color: ${Ei.ButtonText};fill: currentColor}:host([appearance="stealth"]:hover) .control{background: ${Ei.Highlight};border-color: ${Ei.Highlight};color: ${Ei.HighlightText};fill: currentColor}:host([appearance="stealth"]:${Ja}) .control{background: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight};color: ${Ei.HighlightText};fill: currentColor}:host([appearance="stealth"][href]) .control{color: ${Ei.LinkText}}:host([appearance="stealth"][href]:hover) .control, :host([appearance="stealth"][href]:${Ja}) .control{background: ${Ei.LinkText};border-color: ${Ei.LinkText};color: ${Ei.HighlightText};fill: currentColor}:host([appearance="stealth"][href]:${Ja}) .control{forced-color-adjust: none;box-shadow: 0 0 0 1px ${Ei.LinkText}}`));class Wd{constructor(e,t){this.cache=new WeakMap,this.ltr=e,this.rtl=t}bind(e){this.attach(e)}unbind(e){const t=this.cache.get(e);t&&pr.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new Yd(this.ltr,this.rtl,e),i=pr.getValueFor(e);pr.subscribe(t),t.attach(i),this.cache.set(e,t)}}class Yd{constructor(e,t,i){this.ltr=e,this.rtl=t,this.source=i,this.attached=null}handleChange({target:e,token:t}){this.attach(t.getValueFor(e))}attach(e){this.attached!==this[e]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[e],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}function Kd(e,t){return new Za("appearance",e,t)}const Zd=(e,t)=>Me` ${Vd} `.withBehaviors(Kd("accent",Bd),Kd("hypertext",Ud),Kd("lightweight",jd),Kd("outline",qd),Kd("stealth",Gd));class Qd extends Ri{appearanceChanged(e,t){this.$fastController.isConnected&&(this.classList.remove(e),this.classList.add(t))}connectedCallback(){super.connectedCallback(),this.appearance||(this.appearance="neutral")}defaultSlottedContentChanged(e,t){const i=this.defaultSlottedContent.filter(e=>e.nodeType===Node.ELEMENT_NODE);1===i.length&&i[0]instanceof SVGElement?this.control.classList.add("icon-only"):this.control.classList.remove("icon-only")}}_d([de],Qd.prototype,"appearance",void 0),Qd.compose({baseName:"anchor",baseClass:Ri,template:Oi,styles:Zd,shadowOptions:{delegatesFocus:!0}});const Xd=(e,t)=>Me` :host{contain: layout;display: block}`;Hi.compose({baseName:"anchored-region",template:Di,styles:Xd});const Jd=(e,t)=>Me` ${Xa("flex")} :host{position: relative;height: var(--avatar-size, var(--avatar-size-default));max-width: var(--avatar-size, var(--avatar-size-default));--avatar-size-default: calc( ( (${rr} + ${ur}) * ${fr} + ((${fr} * 8) - 40) ) * 1px );--avatar-text-size: ${br};--avatar-text-ratio: ${fr}}.link{text-decoration: none;color: ${kd};display: flex;flex-direction: row;justify-content: center;align-items: center;min-width: 100%}.square{border-radius: calc(${hr} * 1px);min-width: 100%;overflow: hidden}.circle{border-radius: 100%;min-width: 100%;overflow: hidden}.backplate{position: relative;display: flex}.media, ::slotted(img){max-width: 100%;position: absolute;display: block}.content{font-size: calc( (var(--avatar-text-size) + var(--avatar-size, var(--avatar-size-default))) / var(--avatar-text-ratio) );line-height: var(--avatar-size, var(--avatar-size-default));display: block;min-height: var(--avatar-size, var(--avatar-size-default))}::slotted(${e.tagFor(Ki)}){position: absolute;display: block}`.withBehaviors(new Wd((e=>Me` ::slotted(${e.tagFor(Ki)}){right: 0}`)(e),(e=>Me` ::slotted(${e.tagFor(Ki)}){left: 0}`)(e)));class eh extends Wi{}_d([de({attribute:"src"})],eh.prototype,"imgSrc",void 0),_d([de],eh.prototype,"alt",void 0);const th=K` ${Ve(e=>e.imgSrc,K`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `;eh.compose({baseName:"avatar",baseClass:Wi,template:Gi,styles:Jd,media:th,shadowOptions:{delegatesFocus:!0}});const ih=(e,t)=>Me` ${Xa("inline-block")} :host{box-sizing: border-box;font-family: ${nr};font-size: ${zr};line-height: ${Cr}}.control{border-radius: calc(${hr} * 1px);padding: calc(((${fr} * 0.5) - ${gr}) * 1px) calc((${fr} - ${gr}) * 1px);color: ${Yl};font-weight: 600;border: calc(${gr} * 1px) solid transparent}.control[style]{font-weight: 400}:host([circular]) .control{border-radius: 100px;padding: 0 calc(${fr} * 1px);height: calc((${Fd} - (${fr} * 3)) * 1px);min-width: calc((${Fd} - (${fr} * 3)) * 1px);display: flex;align-items: center;justify-content: center;box-sizing: border-box}`;Ki.compose({baseName:"badge",template:Yi,styles:ih});const ch=(e,t)=>Me` ${Xa("inline-flex")} :host{background: transparent;box-sizing: border-box;font-family: ${nr};font-size: ${br};fill: currentColor;line-height: ${yr};min-width: calc(${Fd} * 1px);outline: none;color: ${kd}}.listitem{display: flex;align-items: center;width: max-content}.separator{margin: 0 6px;display: flex}.control{align-items: center;box-sizing: border-box;color: ${Yl};cursor: pointer;display: flex;fill: inherit;outline: none;text-decoration: none;white-space: nowrap}.control:hover{color: ${Kl}}.control:active{color: ${Zl}}.control .content{position: relative}.control .content::before{content: "";display: block;height: calc(${gr} * 1px);left: 0;position: absolute;right: 0;top: calc(1em + 4px);width: 100%}.control:hover .content::before{background: ${Kl}}.control:active .content::before{background: ${Zl}}.control:${Ja} .content::before{background: ${kd};height: calc(${vr} * 1px)}.control:not([href]){color: ${kd};cursor: default}.control:not([href]) .content::before{background: none}.start, .end{display: flex}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}.start{margin-inline-end: 6px}.end{margin-inline-start: 6px}`.withBehaviors(Ka(Me` .control:hover .content::before, .control:${Ja} .content::before{background: ${Ei.LinkText}}.start, .end{fill: ${Ei.ButtonText}}`));Qi.compose({baseName:"breadcrumb-item",template:Zi,styles:ch,separator:"/",shadowOptions:{delegatesFocus:!0}});const oh=(e,t)=>Me` ${Xa("inline-block")} :host{box-sizing: border-box;font-family: ${nr};font-size: ${br};line-height: ${yr}}.list{display: flex;flex-wrap: wrap}`;Ji.compose({baseName:"breadcrumb",template:Xi,styles:oh});const sh=(e,t)=>Me` :host([disabled]), :host([disabled]:hover), :host([disabled]:active){opacity: ${mr};background-color: ${Jl};cursor: ${Qa}}${Vd} `.withBehaviors(Ka(Me` :host([disabled]), :host([disabled]) .control, :host([disabled]:hover), :host([disabled]:active){forced-color-adjust: none;background-color: ${Ei.ButtonFace};border-color: ${Ei.GrayText};color: ${Ei.GrayText};cursor: ${Qa};opacity: 1}`),Kd("accent",Me` :host([appearance="accent"][disabled]), :host([appearance="accent"][disabled]:hover), :host([appearance="accent"][disabled]:active){background: ${Al}}${Bd} `.withBehaviors(Ka(Me` :host([appearance="accent"][disabled]) .control, :host([appearance="accent"][disabled]) .control:hover{background: ${Ei.ButtonFace};border-color: ${Ei.GrayText};color: ${Ei.GrayText}}`))),Kd("lightweight",Me` :host([appearance="lightweight"][disabled]:hover), :host([appearance="lightweight"][disabled]:active){background-color: transparent;color: ${Yl}}:host([appearance="lightweight"][disabled]) .content::before, :host([appearance="lightweight"][disabled]:hover) .content::before, :host([appearance="lightweight"][disabled]:active) .content::before{background: transparent}${jd} `.withBehaviors(Ka(Me` :host([appearance="lightweight"].disabled) .control{forced-color-adjust: none;color: ${Ei.GrayText}}:host([appearance="lightweight"].disabled) .control:hover .content::before{background: none}`))),Kd("outline",Me` :host([appearance="outline"][disabled]), :host([appearance="outline"][disabled]:hover), :host([appearance="outline"][disabled]:active){background: transparent;border-color: ${Al}}${qd} `.withBehaviors(Ka(Me` :host([appearance="outline"][disabled]) .control{border-color: ${Ei.GrayText}}`))),Kd("stealth",Me` :host([appearance="stealth"][disabled]), :host([appearance="stealth"][disabled]:hover), :host([appearance="stealth"][disabled]:active){background: ${ld}}${Gd} `.withBehaviors(Ka(Me` :host([appearance="stealth"][disabled]){background: ${Ei.ButtonFace}}:host([appearance="stealth"][disabled]) .control{background: ${Ei.ButtonFace};border-color: transparent;color: ${Ei.GrayText}}`))));class ah extends lc{constructor(){super(...arguments),this.appearance="neutral"}defaultSlottedContentChanged(e,t){const i=this.defaultSlottedContent.filter(e=>e.nodeType===Node.ELEMENT_NODE);1===i.length&&i[0]instanceof SVGElement?this.control.classList.add("icon-only"):this.control.classList.remove("icon-only")}}_d([de],ah.prototype,"appearance",void 0),ah.compose({baseName:"button",baseClass:lc,template:ec,styles:sh,shadowOptions:{delegatesFocus:!0}});const nh=Me` ${Xa("block")} :host{--cell-border: none;--cell-height: calc(${Fd} * 1px);--selected-day-outline: 1px solid ${Zl};--selected-day-color: ${Zl};--selected-day-background: ${Jl};--cell-padding: calc(${fr} * 1px);--disabled-day-opacity: ${mr};--inactive-day-opacity: ${mr};font-family: ${nr};font-size: ${br};line-height: ${yr};color: ${kd}}.title{font-size: ${Er};line-height: ${$r};padding: var(--cell-padding);text-align: center}.week-days, .week{display: grid;grid-template-columns: repeat(7, 1fr);border-left: var(--cell-border, none);border-bottom: none;padding: 0}.interact .week{grid-gap: calc(${fr} * 1px);margin-top: calc(${fr} * 1px)}.day, .week-day{border-bottom: var(--cell-border);border-right: var(--cell-border);padding: var(--cell-padding)}.week-day{text-align: center;border-radius: 0;border-top: var(--cell-border)}.day{box-sizing: border-box;vertical-align: top;outline-offset: -1px;line-height: var(--cell-line-height);white-space: normal}.interact .day{background: ${Jl};cursor: pointer}.day.inactive{background: var(--inactive-day-background);color: var(--inactive-day-color);opacity: var(--inactive-day-opacity);outline: var(--inactive-day-outline)}.day.disabled{background: var(--disabled-day-background);color: var(--disabled-day-color);cursor: ${Qa};opacity: var(--disabled-day-opacity);outline: var(--disabled-day-outline)}.day.selected{color: var(--selected-day-color);background: var(--selected-day-background);outline: var(--selected-day-outline)}.date{padding: var(--cell-padding);text-align: center}.interact .today, .today{color: ${_l};background: ${Zl}}.today.inactive .date{background: transparent;color: inherit;width: auto}`.withBehaviors(Ka(Me` :host{--selected-day-outline: 1px solid ${Ei.Highlight}}.day, .week-day{background: ${Ei.Canvas};color: ${Ei.CanvasText};fill: currentcolor}.day.selected{color: ${Ei.Highlight}}.today .date{background: ${Ei.Highlight};color: ${Ei.HighlightText}}`));uc.compose({baseName:"calendar",template:Tc,styles:nh,title:Nc});const rh=(e,t)=>Me` ${Xa("block")} :host{--elevation: 4;display: block;contain: content;height: var(--card-height, 100%);width: var(--card-width, 100%);box-sizing: border-box;background: ${El};border-radius: calc(${hr} * 1px);${Pd}}`.withBehaviors(Ka(Me` :host{forced-color-adjust: none;background: ${Ei.Canvas};box-shadow: 0 0 0 1px ${Ei.CanvasText}}`));class lh extends Ic{connectedCallback(){super.connectedCallback();const e=to(this);e&&El.setValueFor(this,t=>bd.getValueFor(t).evaluate(t,El.getValueFor(e)))}}lh.compose({baseName:"card",baseClass:Ic,template:Rc,styles:rh});const dh=(e,t)=>Me` ${Xa("inline-flex")} :host{align-items: center;outline: none;margin: calc(${fr} * 1px) 0;/* Chromium likes to select label text or the default slot when the checkbox is clicked. Maybe there is a better solution here? */ user-select: none}.control{position: relative;width: calc((${Fd} / 2 + ${fr}) * 1px);height: calc((${Fd} / 2 + ${fr}) * 1px);box-sizing: border-box;border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${$d};background: ${od};outline: none;cursor: pointer}.label{font-family: ${nr};color: ${kd};padding-inline-start: calc(${fr} * 2px + 2px);margin-inline-end: calc(${fr} * 2px + 2px);cursor: pointer;font-size: ${br};line-height: ${yr}}.label__hidden{display: none;visibility: hidden}.checked-indicator{width: 100%;height: 100%;display: block;fill: ${Fl};opacity: 0;pointer-events: none}.indeterminate-indicator{border-radius: calc(${hr} * 1px);background: ${Fl};position: absolute;top: 50%;left: 50%;width: 50%;height: 50%;transform: translate(-50%, -50%);opacity: 0}:host(:not([disabled])) .control:hover{background: ${sd};border-color: ${Nd}}:host(:not([disabled])) .control:active{background: ${ad};border-color: ${Ad}}:host(:${Ja}) .control{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}:host([aria-checked="true"]) .control{background: ${Al};border: calc(${gr} * 1px) solid ${Al}}:host([aria-checked="true"]:not([disabled])) .control:hover{background: ${Ol};border: calc(${gr} * 1px) solid ${Ol}}:host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator{fill: ${Hl}}:host([aria-checked="true"]:not([disabled])) .control:hover .indeterminate-indicator{background: ${Hl}}:host([aria-checked="true"]:not([disabled])) .control:active{background: ${Tl};border: calc(${gr} * 1px) solid ${Tl}}:host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator{fill: ${_l}}:host([aria-checked="true"]:not([disabled])) .control:active .indeterminate-indicator{background: ${_l}}:host([aria-checked="true"]:${Ja}:not([disabled])) .control{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([aria-checked="true"]:not(.indeterminate)) .checked-indicator, :host(.indeterminate) .indeterminate-indicator{opacity: 1}:host([disabled]){opacity: ${mr}}`.withBehaviors(Ka(Me` .control{forced-color-adjust: none;border-color: ${Ei.FieldText};background: ${Ei.Field}}.checked-indicator{fill: ${Ei.FieldText}}.indeterminate-indicator{background: ${Ei.FieldText}}:host(:not([disabled])) .control:hover, .control:active{border-color: ${Ei.Highlight};background: ${Ei.Field}}:host(:${Ja}) .control{box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([aria-checked="true"]:${Ja}:not([disabled])) .control{box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([aria-checked="true"]) .control{background: ${Ei.Highlight};border-color: ${Ei.Highlight}}:host([aria-checked="true"]:not([disabled])) .control:hover, .control:active{border-color: ${Ei.Highlight};background: ${Ei.HighlightText}}:host([aria-checked="true"]) .checked-indicator{fill: ${Ei.HighlightText}}:host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator{fill: ${Ei.Highlight}}:host([aria-checked="true"]) .indeterminate-indicator{background: ${Ei.HighlightText}}:host([aria-checked="true"]) .control:hover .indeterminate-indicator{background: ${Ei.Highlight}}:host([disabled]){opacity: 1}:host([disabled]) .control{forced-color-adjust: none;border-color: ${Ei.GrayText};background: ${Ei.Field}}:host([disabled]) .indeterminate-indicator, :host([aria-checked="true"][disabled]) .control:hover .indeterminate-indicator{forced-color-adjust: none;background: ${Ei.GrayText}}:host([disabled]) .checked-indicator, :host([aria-checked="true"][disabled]) .control:hover .checked-indicator{forced-color-adjust: none;fill: ${Ei.GrayText}}`));_c.compose({baseName:"checkbox",template:Dc,styles:dh,checkedIndicator:'\n <svg\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '});const hh=(e,t)=>{const i=e.tagFor(Vc),c=e.name===e.tagFor(es)?"":".listbox";return Me` ${c?"":Xa("inline-flex")} :host ${c}{background: ${El};border: calc(${gr} * 1px) solid ${$d};border-radius: calc(${hr} * 1px);box-sizing: border-box;flex-direction: column;padding: calc(${fr} * 1px) 0}${c?"":Me` :host(:focus-within:not([disabled])){border-color: ${Cd};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset}:host([disabled]) ::slotted(*){cursor: ${Qa};opacity: ${mr};pointer-events: none}`} ${c||":host([size])"}{max-height: calc( (var(--size) * ${Fd} + (${fr} * ${gr} * 2)) * 1px );overflow-y: auto}:host([size="0"]) ${c}{max-height: none}`.withBehaviors(Ka(Me` :host(:not([multiple]):${Ja}) ::slotted(${i}[aria-selected="true"]), :host([multiple]:${Ja}) ::slotted(${i}[aria-checked="true"]){border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc(${vr} * 1px) inset ${Ei.HighlightText}}:host(:not([multiple]):${Ja}) ::slotted(${i}[aria-selected="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText};fill: currentcolor}::slotted(${i}[aria-selected="true"]:not([aria-checked="true"])){background: ${Ei.Highlight};border-color: ${Ei.HighlightText};color: ${Ei.HighlightText}}`))},uh=(e,t)=>{const i=e.name===e.tagFor(Gs);return Me` ${Xa("inline-flex")} :host{--elevation: 14;background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};box-sizing: border-box;color: ${kd};font-family: ${nr};height: calc(${Fd} * 1px);position: relative;user-select: none;min-width: 250px;outline: none;vertical-align: top}${i?Me` :host(:not([aria-haspopup])){--elevation: 0;border: 0;height: auto;min-width: 0}`:""} ${hh(e)} :host .listbox{${Pd} border: none;display: flex;left: 0;position: absolute;width: 100%;z-index: 1}.control + .listbox{--stroke-size: calc(${fr} * ${gr} * 2);max-height: calc( (var(--listbox-max-height) * ${Fd} + var(--stroke-size)) * 1px )}${i?Me` :host(:not([aria-haspopup])) .listbox{left: auto;position: static;z-index: auto}`:""} .listbox[hidden]{display: none}.control{align-items: center;box-sizing: border-box;cursor: pointer;display: flex;font-size: ${br};font-family: inherit;line-height: ${yr};min-height: 100%;padding: 0 calc(${fr} * 2.25px);width: 100%}:host(:not([disabled]):hover){background: ${sd};border-color: ${Ol}}:host(:${Ja}){border-color: ${Cd}}:host(:not([size]):not([multiple]):not([open]):${Ja}), :host([multiple]:${Ja}), :host([size]:${Ja}){box-shadow: 0 0 0 calc(${vr} * 1px) ${Cd}}:host(:not([multiple]):not([size]):${Ja}) ::slotted(${e.tagFor(Vc)}[aria-selected="true"]:not([disabled])){box-shadow: 0 0 0 calc(${vr} * 1px) inset ${xd};border-color: ${Cd};background: ${Rl};color: ${Pl}}:host([disabled]){cursor: ${Qa};opacity: ${mr}}:host([disabled]) .control{cursor: ${Qa};user-select: none}:host([disabled]:hover){background: ${ld};color: ${kd};fill: currentcolor}:host(:not([disabled])) .control:active{background: ${ad};border-color: ${Tl};border-radius: calc(${hr} * 1px)}:host([open][position="above"]) .listbox{border-bottom-left-radius: 0;border-bottom-right-radius: 0;border-bottom: 0;bottom: calc(${Fd} * 1px)}:host([open][position="below"]) .listbox{border-top-left-radius: 0;border-top-right-radius: 0;border-top: 0;top: calc(${Fd} * 1px)}.selected-value{flex: 1 1 auto;font-family: inherit;min-width: calc(var(--listbox-scroll-width, 0) - (${fr} * 4) * 1px);overflow: hidden;text-align: start;text-overflow: ellipsis;white-space: nowrap}.indicator{flex: 0 0 auto;margin-inline-start: 1em}slot[name="listbox"]{display: none;width: 100%}:host([open]) slot[name="listbox"]{display: flex;position: absolute;${Pd}}.end{margin-inline-start: auto}.start, .end, .indicator, .select-indicator, ::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ fill: currentcolor;height: 1em;min-height: calc(${fr} * 4px);min-width: calc(${fr} * 4px);width: 1em}::slotted([role="option"]), ::slotted(option){flex: 0 0 auto}`.withBehaviors(Ka(Me` :host(:not([disabled]):hover), :host(:not([disabled]):active){border-color: ${Ei.Highlight}}:host(:not([disabled]):${Ja}){background-color: ${Ei.ButtonFace};box-shadow: 0 0 0 calc(${vr} * 1px) ${Ei.Highlight};color: ${Ei.ButtonText};fill: currentcolor;forced-color-adjust: none}:host(:not([disabled]):${Ja}) .listbox{background: ${Ei.ButtonFace}}:host([disabled]){border-color: ${Ei.GrayText};background-color: ${Ei.ButtonFace};color: ${Ei.GrayText};fill: currentcolor;opacity: 1;forced-color-adjust: none}:host([disabled]:hover){background: ${Ei.ButtonFace}}:host([disabled]) .control{color: ${Ei.GrayText};border-color: ${Ei.GrayText}}:host([disabled]) .control .select-indicator{fill: ${Ei.GrayText}}:host(:${Ja}) ::slotted([aria-selected="true"][role="option"]), :host(:${Ja}) ::slotted(option[aria-selected="true"]), :host(:${Ja}) ::slotted([aria-selected="true"][role="option"]:not([disabled])){background: ${Ei.Highlight};border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc(${vr} * 1px) inset ${Ei.HighlightText};color: ${Ei.HighlightText};fill: currentcolor}.start, .end, .indicator, .select-indicator, ::slotted(svg){color: ${Ei.ButtonText};fill: currentcolor}`))},fh=(e,t)=>Me` ${uh(e)} :host(:empty) .listbox{display: none}:host([disabled]) *, :host([disabled]){cursor: ${Qa};user-select: none}.selected-value{-webkit-appearance: none;background: transparent;border: none;color: inherit;font-size: ${br};line-height: ${yr};height: calc(100% - (${gr} * 1px));margin: auto 0;width: 100%}.selected-value:hover, .selected-value:${Ja}, .selected-value:disabled, .selected-value:active{outline: none}`;class ph extends Jc{maxHeightChanged(e,t){this.updateComputedStylesheet()}updateComputedStylesheet(){this.computedStylesheet&&this.$fastController.removeStyles(this.computedStylesheet);const e=Math.floor(this.maxHeight/Id.getValueFor(this)).toString();this.computedStylesheet=Me` :host{--listbox-max-height: ${e}}`,this.$fastController.addStyles(this.computedStylesheet)}}ph.compose({baseName:"combobox",baseClass:Jc,template:(e,t)=>K`<template aria-disabled="${e=>e.ariaDisabled}" autocomplete="${e=>e.autocomplete}" class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}" ?open="${e=>e.open}" tabindex="${e=>e.disabled?null:"0"}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${it(0,t)}<slot name="control"><input aria-activedescendant="${e=>e.open?e.ariaActiveDescendant:null}" aria-autocomplete="${e=>e.ariaAutoComplete}" aria-controls="${e=>e.ariaControls}" aria-disabled="${e=>e.ariaDisabled}" aria-expanded="${e=>e.ariaExpanded}" aria-haspopup="listbox" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${Fe("control")}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||""}</slot></div></slot>${tt(0,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${Fe("listbox")}><slot ${Qe({filter:Uc.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></div></template>`,styles:fh,shadowOptions:{delegatesFocus:!0},indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '});const mh=(e,t)=>Me` :host{display: flex;position: relative;flex-direction: column}`,gh=(e,t)=>Me` :host{display: grid;padding: 1px 0;box-sizing: border-box;width: 100%;border-bottom: calc(${gr} * 1px) solid ${Rd}}:host(.header){}:host(.sticky-header){background: ${Jl};position: sticky;top: 0}`,vh=(e,t)=>Me` :host{padding: calc(${fr} * 1px) calc(${fr} * 3px);color: ${kd};box-sizing: border-box;font-family: ${nr};font-size: ${br};line-height: ${yr};font-weight: 400;border: transparent calc(${vr} * 1px) solid;overflow: hidden;white-space: nowrap;border-radius: calc(${hr} * 1px)}:host(.column-header){font-weight: 600}:host(:${Ja}){border: ${Cd} calc(${vr} * 1px) solid;outline: none;color: ${kd}}`.withBehaviors(Ka(Me` :host{forced-color-adjust: none;border-color: transparent;background: ${Ei.Field};color: ${Ei.FieldText}}:host(:${Ja}){border-color: ${Ei.FieldText};box-shadow: 0 0 0 2px inset ${Ei.Field};color: ${Ei.FieldText}}`));kc.compose({baseName:"data-grid-cell",template:$c,styles:vh}),Lc.compose({baseName:"data-grid-row",template:Ec,styles:gh}),Mc.compose({baseName:"data-grid",template:xc,styles:mh});const bh={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=_n(e);return t?Un.create(t.r,t.g,t.b):null}},yh=Me` :host{background-color: ${El};color: ${kd}}`.withBehaviors(Ka(Me` :host{background-color: ${Ei.ButtonFace};box-shadow: 0 0 0 1px ${Ei.CanvasText};color: ${Ei.ButtonText}}`));function zh(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}class Ch extends Wt{constructor(){super(),this.noPaint=!1;const e={handleChange:this.noPaintChanged.bind(this)};v.getNotifier(this).subscribe(e,"fillColor"),v.getNotifier(this).subscribe(e,"baseLayerLuminance")}noPaintChanged(){this.noPaint||void 0===this.fillColor&&!this.baseLayerLuminance?this.$fastController.removeStyles(yh):this.$fastController.addStyles(yh)}}_d([de({attribute:"no-paint",mode:"boolean"})],Ch.prototype,"noPaint",void 0),_d([de({attribute:"fill-color",converter:bh}),zh(El)],Ch.prototype,"fillColor",void 0),_d([de({attribute:"accent-color",converter:bh,mode:"fromView"}),zh(pl)],Ch.prototype,"accentColor",void 0),_d([de({attribute:"neutral-color",converter:bh,mode:"fromView"}),zh(ul)],Ch.prototype,"neutralColor",void 0),_d([de({converter:re}),zh(ur)],Ch.prototype,"density",void 0),_d([de({attribute:"design-unit",converter:re}),zh(fr)],Ch.prototype,"designUnit",void 0),_d([de({attribute:"direction"}),zh(pr)],Ch.prototype,"direction",void 0),_d([de({attribute:"base-height-multiplier",converter:re}),zh(rr)],Ch.prototype,"baseHeightMultiplier",void 0),_d([de({attribute:"base-horizontal-spacing-multiplier",converter:re}),zh(lr)],Ch.prototype,"baseHorizontalSpacingMultiplier",void 0),_d([de({attribute:"control-corner-radius",converter:re}),zh(hr)],Ch.prototype,"controlCornerRadius",void 0),_d([de({attribute:"stroke-width",converter:re}),zh(gr)],Ch.prototype,"strokeWidth",void 0),_d([de({attribute:"focus-stroke-width",converter:re}),zh(vr)],Ch.prototype,"focusStrokeWidth",void 0),_d([de({attribute:"disabled-opacity",converter:re}),zh(mr)],Ch.prototype,"disabledOpacity",void 0),_d([de({attribute:"type-ramp-minus-2-font-size"}),zh(Lr)],Ch.prototype,"typeRampMinus2FontSize",void 0),_d([de({attribute:"type-ramp-minus-2-line-height"}),zh(xr)],Ch.prototype,"typeRampMinus2LineHeight",void 0),_d([de({attribute:"type-ramp-minus-1-font-size"}),zh(zr)],Ch.prototype,"typeRampMinus1FontSize",void 0),_d([de({attribute:"type-ramp-minus-1-line-height"}),zh(Cr)],Ch.prototype,"typeRampMinus1LineHeight",void 0),_d([de({attribute:"type-ramp-base-font-size"}),zh(br)],Ch.prototype,"typeRampBaseFontSize",void 0),_d([de({attribute:"type-ramp-base-line-height"}),zh(yr)],Ch.prototype,"typeRampBaseLineHeight",void 0),_d([de({attribute:"type-ramp-plus-1-font-size"}),zh(Mr)],Ch.prototype,"typeRampPlus1FontSize",void 0),_d([de({attribute:"type-ramp-plus-1-line-height"}),zh(wr)],Ch.prototype,"typeRampPlus1LineHeight",void 0),_d([de({attribute:"type-ramp-plus-2-font-size"}),zh(Sr)],Ch.prototype,"typeRampPlus2FontSize",void 0),_d([de({attribute:"type-ramp-plus-2-line-height"}),zh(kr)],Ch.prototype,"typeRampPlus2LineHeight",void 0),_d([de({attribute:"type-ramp-plus-3-font-size"}),zh(Er)],Ch.prototype,"typeRampPlus3FontSize",void 0),_d([de({attribute:"type-ramp-plus-3-line-height"}),zh($r)],Ch.prototype,"typeRampPlus3LineHeight",void 0),_d([de({attribute:"type-ramp-plus-4-font-size"}),zh(Nr)],Ch.prototype,"typeRampPlus4FontSize",void 0),_d([de({attribute:"type-ramp-plus-4-line-height"}),zh(Ar)],Ch.prototype,"typeRampPlus4LineHeight",void 0),_d([de({attribute:"type-ramp-plus-5-font-size"}),zh(Or)],Ch.prototype,"typeRampPlus5FontSize",void 0),_d([de({attribute:"type-ramp-plus-5-line-height"}),zh(Tr)],Ch.prototype,"typeRampPlus5LineHeight",void 0),_d([de({attribute:"type-ramp-plus-6-font-size"}),zh(Rr)],Ch.prototype,"typeRampPlus6FontSize",void 0),_d([de({attribute:"type-ramp-plus-6-line-height"}),zh(Ir)],Ch.prototype,"typeRampPlus6LineHeight",void 0),_d([de({attribute:"accent-fill-rest-delta",converter:re}),zh(Dr)],Ch.prototype,"accentFillRestDelta",void 0),_d([de({attribute:"accent-fill-hover-delta",converter:re}),zh(Fr)],Ch.prototype,"accentFillHoverDelta",void 0),_d([de({attribute:"accent-fill-active-delta",converter:re}),zh(Hr)],Ch.prototype,"accentFillActiveDelta",void 0),_d([de({attribute:"accent-fill-focus-delta",converter:re}),zh(_r)],Ch.prototype,"accentFillFocusDelta",void 0),_d([de({attribute:"accent-foreground-rest-delta",converter:re}),zh(Pr)],Ch.prototype,"accentForegroundRestDelta",void 0),_d([de({attribute:"accent-foreground-hover-delta",converter:re}),zh(Vr)],Ch.prototype,"accentForegroundHoverDelta",void 0),_d([de({attribute:"accent-foreground-active-delta",converter:re}),zh(Br)],Ch.prototype,"accentForegroundActiveDelta",void 0),_d([de({attribute:"accent-foreground-focus-delta",converter:re}),zh(Ur)],Ch.prototype,"accentForegroundFocusDelta",void 0),_d([de({attribute:"neutral-fill-rest-delta",converter:re}),zh(jr)],Ch.prototype,"neutralFillRestDelta",void 0),_d([de({attribute:"neutral-fill-hover-delta",converter:re}),zh(qr)],Ch.prototype,"neutralFillHoverDelta",void 0),_d([de({attribute:"neutral-fill-active-delta",converter:re}),zh(Gr)],Ch.prototype,"neutralFillActiveDelta",void 0),_d([de({attribute:"neutral-fill-focus-delta",converter:re}),zh(Wr)],Ch.prototype,"neutralFillFocusDelta",void 0),_d([de({attribute:"neutral-fill-input-rest-delta",converter:re}),zh(Yr)],Ch.prototype,"neutralFillInputRestDelta",void 0),_d([de({attribute:"neutral-fill-input-hover-delta",converter:re}),zh(Kr)],Ch.prototype,"neutralFillInputHoverDelta",void 0),_d([de({attribute:"neutral-fill-input-active-delta",converter:re}),zh(Zr)],Ch.prototype,"neutralFillInputActiveDelta",void 0),_d([de({attribute:"neutral-fill-input-focus-delta",converter:re}),zh(Qr)],Ch.prototype,"neutralFillInputFocusDelta",void 0),_d([de({attribute:"neutral-fill-stealth-rest-delta",converter:re}),zh(Xr)],Ch.prototype,"neutralFillStealthRestDelta",void 0),_d([de({attribute:"neutral-fill-stealth-hover-delta",converter:re}),zh(Jr)],Ch.prototype,"neutralFillStealthHoverDelta",void 0),_d([de({attribute:"neutral-fill-stealth-active-delta",converter:re}),zh(el)],Ch.prototype,"neutralFillStealthActiveDelta",void 0),_d([de({attribute:"neutral-fill-stealth-focus-delta",converter:re}),zh(tl)],Ch.prototype,"neutralFillStealthFocusDelta",void 0),_d([de({attribute:"neutral-fill-strong-hover-delta",converter:re}),zh(cl)],Ch.prototype,"neutralFillStrongHoverDelta",void 0),_d([de({attribute:"neutral-fill-strong-active-delta",converter:re}),zh(ol)],Ch.prototype,"neutralFillStrongActiveDelta",void 0),_d([de({attribute:"neutral-fill-strong-focus-delta",converter:re}),zh(sl)],Ch.prototype,"neutralFillStrongFocusDelta",void 0),_d([de({attribute:"base-layer-luminance",converter:re}),zh(dr)],Ch.prototype,"baseLayerLuminance",void 0),_d([de({attribute:"neutral-fill-layer-rest-delta",converter:re}),zh(al)],Ch.prototype,"neutralFillLayerRestDelta",void 0),_d([de({attribute:"neutral-stroke-divider-rest-delta",converter:re}),zh(hl)],Ch.prototype,"neutralStrokeDividerRestDelta",void 0),_d([de({attribute:"neutral-stroke-rest-delta",converter:re}),zh(nl)],Ch.prototype,"neutralStrokeRestDelta",void 0),_d([de({attribute:"neutral-stroke-hover-delta",converter:re}),zh(rl)],Ch.prototype,"neutralStrokeHoverDelta",void 0),_d([de({attribute:"neutral-stroke-active-delta",converter:re}),zh(ll)],Ch.prototype,"neutralStrokeActiveDelta",void 0),_d([de({attribute:"neutral-stroke-focus-delta",converter:re}),zh(dl)],Ch.prototype,"neutralStrokeFocusDelta",void 0);Ch.compose({baseName:"design-system-provider",template:(e,t)=>K`<slot></slot>`,styles:(e,t)=>Me` ${Xa("block")}`});Vo.compose({baseName:"dialog",template:(e,t)=>K`<div class="positioning-region" part="positioning-region">${Ve(e=>e.modal,K`<div class="overlay" part="overlay" role="presentation" @click="${e=>e.dismiss()}"></div>`)}<div role="dialog" tabindex="-1" class="control" part="control" aria-modal="${e=>e.modal}" aria-describedby="${e=>e.ariaDescribedby}" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" ${Fe("dialog")}><slot></slot></div></div>`,styles:(e,t)=>Me` :host([hidden]){display: none}:host{--elevation: 14;--dialog-height: 480px;--dialog-width: 640px;display: block}.overlay{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(0, 0, 0, 0.3);touch-action: none}.positioning-region{display: flex;justify-content: center;position: fixed;top: 0;bottom: 0;left: 0;right: 0;overflow: auto}.control{${Pd} margin-top: auto;margin-bottom: auto;width: var(--dialog-width);height: var(--dialog-height);background-color: ${El};z-index: 1;border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid transparent}`});const Lh=(e,t)=>Me` .disclosure{transition: height 0.35s}.disclosure .invoker::-webkit-details-marker{display: none}.disclosure .invoker{list-style-type: none}:host([appearance="accent"]) .invoker{background: ${Al};color: ${Fl};font-family: ${nr};font-size: ${br};border-radius: calc(${hr} * 1px);outline: none;cursor: pointer;margin: 16px 0;padding: 12px;max-width: max-content}:host([appearance="accent"]) .invoker:active{background: ${Tl};color: ${_l}}:host([appearance="accent"]) .invoker:hover{background: ${Ol};color: ${Hl}}:host([appearance="lightweight"]) .invoker{background: transparent;color: ${Yl};border-bottom: calc(${gr} * 1px) solid ${Yl};cursor: pointer;width: max-content;margin: 16px 0}:host([appearance="lightweight"]) .invoker:active{border-bottom-color: ${Zl}}:host([appearance="lightweight"]) .invoker:hover{border-bottom-color: ${Kl}}.disclosure[open] .invoker ~ *{animation: fadeIn 0.5s ease-in-out}@keyframes fadeIn{0%{opacity: 0}100%{opacity: 1}}`;class xh extends qo{constructor(){super(...arguments),this.height=0,this.totalHeight=0}connectedCallback(){super.connectedCallback(),this.appearance||(this.appearance="accent")}appearanceChanged(e,t){e!==t&&(this.classList.add(t),this.classList.remove(e))}onToggle(){super.onToggle(),this.details.style.setProperty("height",`${this.disclosureHeight}px`)}setup(){super.setup();const e=()=>this.details.getBoundingClientRect().height;this.show(),this.totalHeight=e(),this.hide(),this.height=e(),this.expanded&&this.show()}get disclosureHeight(){return this.expanded?this.totalHeight:this.height}}_d([de],xh.prototype,"appearance",void 0),xh.compose({baseName:"disclosure",baseClass:qo,template:jo,styles:Lh});const Mh=(e,t)=>Me` ${Xa("block")} :host{box-sizing: content-box;height: 0;margin: calc(${fr} * 1px) 0;border-top: calc(${gr} * 1px) solid ${Rd};border-left: none}:host([orientation="vertical"]){height: 100%;margin: 0 calc(${fr} * 1px);border-top: none;border-left: calc(${gr} * 1px) solid ${Rd}}`;Yo.compose({baseName:"divider",template:Go,styles:Mh});const wh=(e,t)=>Me` ${Xa("inline-flex")} :host{width: calc(${Fd} * 1px);height: calc(${Fd} * 1px);justify-content: center;align-items: center;margin: 0;position: relative;fill: currentcolor;color: ${Fl};background: transparent;outline: none;border: none;padding: 0}:host::before{content: "";background: ${Al};border: calc(${gr} * 1px) solid ${Al};border-radius: 50%;position: absolute;top: 0;right: 0;left: 0;bottom: 0;transition: all 0.1s ease-in-out}.next, .previous{position: relative;/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px;display: grid}:host([disabled]){opacity: ${mr};cursor: ${Qa};fill: currentcolor;color: ${kd};pointer-events: none}:host([disabled])::before, :host([disabled]:hover)::before, :host([disabled]:active)::before{background: ${ld};border-color: ${$d}}:host(:hover){color: ${Hl}}:host(:hover)::before{background: ${Ol};border-color: ${Ol}}:host(:active){color: ${_l}}:host(:active)::before{background: ${Tl};border-color: ${Tl}}:host(:${Ja}){outline: none}:host(:${Ja})::before{box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd} inset, 0 0 0 calc((${vr} + ${gr}) * 1px) ${xd} inset;border-color: ${Cd}}:host::-moz-focus-inner{border: 0}`.withBehaviors(Ka(Me` :host{background: ${Ei.Canvas}}:host .next, :host .previous{color: ${Ei.ButtonText};fill: currentcolor}:host::before{background: ${Ei.Canvas};border-color: ${Ei.ButtonText}}:host(:hover)::before{forced-color-adjust: none;background: ${Ei.Highlight};border-color: ${Ei.ButtonText};opacity: 1}:host(:hover) .next, :host(:hover) .previous{forced-color-adjust: none;color: ${Ei.HighlightText};fill: currentcolor}:host([disabled]){opacity: 1}:host([disabled])::before, :host([disabled]:hover)::before, :host([disabled]) .next, :host([disabled]) .previous{forced-color-adjust: none;background: ${Ei.Canvas};border-color: ${Ei.GrayText};color: ${Ei.GrayText};fill: ${Ei.GrayText}}:host(:${Ja})::before{forced-color-adjust: none;border-color: ${Ei.Highlight};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Ei.Highlight} inset}`));Xo.compose({baseName:"flipper",template:Qo,styles:wh,next:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n ',previous:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M11.273 15.977L3.29 8 11.273.023l.704.704L4.71 8l7.266 7.273-.704.704z"\n />\n </svg>\n '});const Sh=Me` .scroll-prev{right: auto;left: 0}.scroll.scroll-next::before, .scroll-next .scroll-action{left: auto;right: 0}.scroll.scroll-next::before{background: linear-gradient(to right, transparent, var(--scroll-fade-next))}.scroll-next .scroll-action{transform: translate(50%, -50%)}`,kh=Me` .scroll.scroll-next{right: auto;left: 0}.scroll.scroll-next::before{background: linear-gradient(to right, var(--scroll-fade-next), transparent);left: auto;right: 0}.scroll.scroll-prev::before{background: linear-gradient(to right, transparent, var(--scroll-fade-previous))}.scroll-prev .scroll-action{left: auto;right: 0;transform: translate(50%, -50%)}`,Eh=Me` .scroll-area{position: relative}div.scroll-view{overflow-x: hidden}.scroll{bottom: 0;pointer-events: none;position: absolute;right: 0;top: 0;user-select: none;width: 100px}.scroll.disabled{display: none}.scroll::before, .scroll-action{left: 0;position: absolute}.scroll::before{background: linear-gradient(to right, var(--scroll-fade-previous), transparent);content: "";display: block;height: 100%;width: 100%}.scroll-action{pointer-events: auto;right: auto;top: 50%;transform: translate(-50%, -50%)}`.withBehaviors(new Wd(Sh,kh)),$h=(e,t)=>Me` ${Xa("block")} :host{--scroll-align: center;--scroll-item-spacing: 5px;contain: layout;position: relative}.scroll-view{overflow-x: auto;scrollbar-width: none}::-webkit-scrollbar{display: none}.content-container{align-items: var(--scroll-align);display: inline-flex;flex-wrap: nowrap;position: relative}.content-container ::slotted(*){margin-right: var(--scroll-item-spacing)}.content-container ::slotted(*:last-child){margin-right: 0}`;class Nh extends Fs{connectedCallback(){super.connectedCallback(),"mobile"!==this.view&&this.$fastController.addStyles(Eh)}}Nh.compose({baseName:"horizontal-scroll",baseClass:Fs,template:Hs,styles:$h,nextFlipper:e=>K`<${e.tagFor(Xo)}@click="${e=>e.scrollToNext()}" aria-hidden="${e=>e.flippersHiddenFromAT}"></${e.tagFor(Xo)}>`,previousFlipper:e=>K`<${e.tagFor(Xo)}@click="${e=>e.scrollToPrevious()}" direction="previous" aria-hidden="${e=>e.flippersHiddenFromAT}"></${e.tagFor(Xo)}>`});const Ah=(e,t)=>Me` ${Xa("inline-flex")} :host{align-items: center;font-family: ${nr};border-radius: calc(${hr} * 1px);border: calc(${vr} * 1px) solid transparent;box-sizing: border-box;background: ${ld};color: ${kd};cursor: pointer;flex: 0 0 auto;fill: currentcolor;font-size: ${br};height: calc(${Fd} * 1px);line-height: ${yr};margin: 0 calc((${fr} - ${vr}) * 1px);outline: none;overflow: hidden;padding: 0 1ch;user-select: none;white-space: nowrap}:host(:not([disabled]):not([aria-selected="true"]):hover){background: ${dd}}:host(:not([disabled]):not([aria-selected="true"]):active){background: ${hd}}:host([aria-selected="true"]){background: ${Al};color: ${Fl}}:host(:not([disabled])[aria-selected="true"]:hover){background: ${Ol};color: ${Hl}}:host(:not([disabled])[aria-selected="true"]:active){background: ${Tl};color: ${_l}}:host([disabled]){cursor: ${Qa};opacity: ${mr}}.content{grid-column-start: 2;justify-self: start;overflow: hidden;text-overflow: ellipsis}.start, .end, ::slotted(svg){display: flex}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ height: calc(${fr} * 4px);width: calc(${fr} * 4px)}::slotted([slot="end"]){margin-inline-start: 1ch}::slotted([slot="start"]){margin-inline-end: 1ch}:host([aria-checked="true"][aria-selected="false"]){border-color: ${Cd}}:host([aria-checked="true"][aria-selected="true"]){border-color: ${Cd};box-shadow: 0 0 0 calc(${vr} * 2 * 1px) inset ${xd}}`.withBehaviors(Ka(Me` :host{border-color: transparent;forced-color-adjust: none;color: ${Ei.ButtonText};fill: currentcolor}:host(:not([aria-selected="true"]):hover), :host([aria-selected="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([disabled]), :host([disabled][aria-selected="false"]:hover){background: ${Ei.Canvas};color: ${Ei.GrayText};fill: currentcolor;opacity: 1}:host([aria-checked="true"][aria-selected="false"]){background: ${Ei.ButtonFace};color: ${Ei.ButtonText};border-color: ${Ei.ButtonText}}:host([aria-checked="true"][aria-selected="true"]), :host([aria-checked="true"][aria-selected="true"]:hover){background: ${Ei.Highlight};color: ${Ei.HighlightText};border-color: ${Ei.ButtonText}}`));Vc.compose({baseName:"option",template:Jo,styles:Ah});class Oh extends es{sizeChanged(e,t){super.sizeChanged(e,t),this.updateComputedStylesheet()}updateComputedStylesheet(){this.computedStylesheet&&this.$fastController.removeStyles(this.computedStylesheet);const e=`${this.size}`;this.computedStylesheet=Me` :host{--size: ${e}}`,this.$fastController.addStyles(this.computedStylesheet)}}Oh.compose({baseName:"listbox",baseClass:es,template:ts,styles:hh});const Th=(e,t)=>Me` ${Xa("grid")} :host{contain: layout;overflow: visible;font-family: ${nr};outline: none;box-sizing: border-box;height: calc(${Fd} * 1px);grid-template-columns: minmax(42px, auto) 1fr minmax(42px, auto);grid-template-rows: auto;justify-items: center;align-items: center;padding: 0;margin: 0 calc(${fr} * 1px);white-space: nowrap;background: ${ld};color: ${kd};fill: currentcolor;cursor: pointer;font-size: ${br};line-height: ${yr};border-radius: calc(${hr} * 1px);border: calc(${vr} * 1px) solid transparent}:host(:hover){position: relative;z-index: 1}:host(.indent-0){grid-template-columns: auto 1fr minmax(42px, auto)}:host(.indent-0) .content{grid-column: 1;grid-row: 1;margin-inline-start: 10px}:host(.indent-0) .expand-collapse-glyph-container{grid-column: 5;grid-row: 1}:host(.indent-2){grid-template-columns: minmax(42px, auto) minmax(42px, auto) 1fr minmax(42px, auto) minmax(42px, auto)}:host(.indent-2) .content{grid-column: 3;grid-row: 1;margin-inline-start: 10px}:host(.indent-2) .expand-collapse-glyph-container{grid-column: 5;grid-row: 1}:host(.indent-2) .start{grid-column: 2}:host(.indent-2) .end{grid-column: 4}:host(:${Ja}){border-color: ${Cd};background: ${ud};color: ${kd}}:host(:hover){background: ${dd};color: ${kd}}:host(:active){background: ${hd}}:host([aria-checked="true"]), :host(.expanded){background: ${Jl};color: ${kd}}:host([disabled]){cursor: ${Qa};opacity: ${mr}}:host([disabled]:hover){color: ${kd};fill: currentcolor;background: ${ld}}:host([disabled]:hover) .start, :host([disabled]:hover) .end, :host([disabled]:hover)::slotted(svg){fill: ${kd}}.expand-collapse-glyph{/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px;fill: currentcolor}.content{grid-column-start: 2;justify-self: start;overflow: hidden;text-overflow: ellipsis}.start, .end{display: flex;justify-content: center}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}:host(:hover) .start, :host(:hover) .end, :host(:hover)::slotted(svg), :host(:active) .start, :host(:active) .end, :host(:active)::slotted(svg){fill: ${kd}}:host(.indent-0[aria-haspopup="menu"]){display: grid;grid-template-columns: minmax(42px, auto) auto 1fr minmax(42px, auto) minmax(42px, auto);align-items: center;min-height: 32px}:host(.indent-1[aria-haspopup="menu"]), :host(.indent-1[role="menuitemcheckbox"]), :host(.indent-1[role="menuitemradio"]){display: grid;grid-template-columns: minmax(42px, auto) auto 1fr minmax(42px, auto) minmax(42px, auto);align-items: center;min-height: 32px}:host(.indent-2:not([aria-haspopup="menu"])) .end{grid-column: 5}:host .input-container, :host .expand-collapse-glyph-container{display: none}:host([aria-haspopup="menu"]) .expand-collapse-glyph-container, :host([role="menuitemcheckbox"]) .input-container, :host([role="menuitemradio"]) .input-container{display: grid;margin-inline-end: 10px}:host([aria-haspopup="menu"]) .content, :host([role="menuitemcheckbox"]) .content, :host([role="menuitemradio"]) .content{grid-column-start: 3}:host([aria-haspopup="menu"].indent-0) .content{grid-column-start: 1}:host([aria-haspopup="menu"]) .end, :host([role="menuitemcheckbox"]) .end, :host([role="menuitemradio"]) .end{grid-column-start: 4}:host .expand-collapse, :host .checkbox, :host .radio{display: flex;align-items: center;justify-content: center;position: relative;width: 20px;height: 20px;box-sizing: border-box;outline: none;margin-inline-start: 10px}:host .checkbox, :host .radio{border: calc(${gr} * 1px) solid ${kd}}:host([aria-checked="true"]) .checkbox, :host([aria-checked="true"]) .radio{background: ${Al};border-color: ${Al}}:host .checkbox{border-radius: calc(${hr} * 1px)}:host .radio{border-radius: 999px}:host .checkbox-indicator, :host .radio-indicator, :host .expand-collapse-indicator, ::slotted([slot="checkbox-indicator"]), ::slotted([slot="radio-indicator"]), ::slotted([slot="expand-collapse-indicator"]){display: none}::slotted([slot="end"]:not(svg)){margin-inline-end: 10px;color: ${wd}}:host([aria-checked="true"]) .checkbox-indicator, :host([aria-checked="true"]) ::slotted([slot="checkbox-indicator"]){width: 100%;height: 100%;display: block;fill: ${Fl};pointer-events: none}:host([aria-checked="true"]) .radio-indicator{position: absolute;top: 4px;left: 4px;right: 4px;bottom: 4px;border-radius: 999px;display: block;background: ${Fl};pointer-events: none}:host([aria-checked="true"]) ::slotted([slot="radio-indicator"]){display: block;pointer-events: none}`.withBehaviors(Ka(Me` :host{border-color: transparent;color: ${Ei.ButtonText};forced-color-adjust: none}:host(:hover){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host(:hover) .start, :host(:hover) .end, :host(:hover)::slotted(svg), :host(:active) .start, :host(:active) .end, :host(:active)::slotted(svg){fill: ${Ei.HighlightText}}:host(.expanded){background: ${Ei.Highlight};border-color: ${Ei.Highlight};color: ${Ei.HighlightText}}:host(:${Ja}){background: ${Ei.Highlight};border-color: ${Ei.ButtonText};box-shadow: 0 0 0 calc(${vr} * 1px) inset ${Ei.HighlightText};color: ${Ei.HighlightText};fill: currentcolor}:host([disabled]), :host([disabled]:hover), :host([disabled]:hover) .start, :host([disabled]:hover) .end, :host([disabled]:hover)::slotted(svg){background: ${Ei.Canvas};color: ${Ei.GrayText};fill: currentcolor;opacity: 1}:host .expanded-toggle, :host .checkbox, :host .radio{border-color: ${Ei.ButtonText};background: ${Ei.HighlightText}}:host([checked="true"]) .checkbox, :host([checked="true"]) .radio{background: ${Ei.HighlightText};border-color: ${Ei.HighlightText}}:host(:hover) .expanded-toggle, :host(:hover) .checkbox, :host(:hover) .radio, :host(:${Ja}) .expanded-toggle, :host(:${Ja}) .checkbox, :host(:${Ja}) .radio, :host([checked="true"]:hover) .checkbox, :host([checked="true"]:hover) .radio, :host([checked="true"]:${Ja}) .checkbox, :host([checked="true"]:${Ja}) .radio{border-color: ${Ei.HighlightText}}:host([aria-checked="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([aria-checked="true"]) .checkbox-indicator, :host([aria-checked="true"]) ::slotted([slot="checkbox-indicator"]), :host([aria-checked="true"]) ::slotted([slot="radio-indicator"]){fill: ${Ei.Highlight}}:host([aria-checked="true"]) .radio-indicator{background: ${Ei.Highlight}}::slotted([slot="end"]:not(svg)){color: ${Ei.ButtonText}}:host(:hover) ::slotted([slot="end"]:not(svg)), :host(:${Ja}) ::slotted([slot="end"]:not(svg)){color: ${Ei.HighlightText}}`),new Wd(Me` .expand-collapse-glyph{transform: rotate(0deg)}`,Me` .expand-collapse-glyph{transform: rotate(180deg)}`));gs.compose({baseName:"menu-item",template:vs,styles:Th,checkboxIndicator:'\n <svg\n part="checkbox-indicator"\n class="checkbox-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',expandCollapseGlyph:'\n <svg\n viewBox="0 0 16 16"\n xmlns="http://www.w3.org/2000/svg"\n class="expand-collapse-glyph"\n part="expand-collapse-glyph"\n >\n <path\n d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"\n />\n </svg>\n ',radioIndicator:'\n <span part="radio-indicator" class="radio-indicator"></span>\n '});const Rh=(e,t)=>Me` ${Xa("block")} :host{--elevation: 11;background: ${El};border: calc(${gr} * 1px) solid transparent;${Pd} margin: 0;border-radius: calc(${hr} * 1px);padding: calc(${fr} * 1px) 0;max-width: 368px;min-width: 64px}:host([slot="submenu"]){width: max-content;margin: 0 calc(${fr} * 1px)}::slotted(hr){box-sizing: content-box;height: 0;margin: 0;border: none;border-top: calc(${gr} * 1px) solid ${Rd}}`.withBehaviors(Ka(Me` :host{background: ${Ei.Canvas};border-color: ${Ei.CanvasText}}`));class Ih extends ys{connectedCallback(){super.connectedCallback(),El.setValueFor(this,yl)}}Ih.compose({baseName:"menu",template:bs,styles:Rh});const Dh=(e,t)=>Me` ${Xa("inline-block")} :host{font-family: ${nr};outline: none;user-select: none}.root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 1px);align-items: baseline}.control{-webkit-appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - 4px);width: 100%;margin-top: auto;margin-bottom: auto;border: none;padding: 0 calc(${fr} * 2px + 1px);font-size: ${br};line-height: ${yr}}.control:hover, .control:${Ja}, .control:disabled, .control:active{outline: none}.controls{opacity: 0}.label{display: block;color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr};margin-bottom: 4px}.label__hidden{display: none;visibility: hidden}.start, .control, .controls, .end{align-self: center}.start, .end{margin: auto;fill: currentcolor}.step-up-glyph, .step-down-glyph{display: block;padding: 4px 10px;cursor: pointer}.step-up-glyph:before, .step-down-glyph:before{content: '';display: block;border: solid transparent 6px}.step-up-glyph:before{border-bottom-color: ${kd}}.step-down-glyph:before{border-top-color: ${kd}}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}.start{margin-inline-start: 11px}.end{margin-inline-end: 11px}:host(:hover:not([disabled])) .root{background: ${sd};border-color: ${Ol}}:host(:active:not([disabled])) .root{background: ${sd};border-color: ${Tl}}:host(:focus-within:not([disabled])) .root{border-color: ${Cd};box-shadow: 0 0 0 calc(${vr} * 1px) ${Cd} inset}:host(:hover:not([disabled])) .controls, :host(:focus-within:not([disabled])) .controls{opacity: 1}:host([appearance="filled"]) .root{background: ${Jl}}:host([appearance="filled"]:hover:not([disabled])) .root{background: ${ed}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([disabled]){opacity: ${mr}}:host([disabled]) .control{border-color: ${$d}}`.withBehaviors(Ka(Me` .root, :host([appearance="filled"]) .root{forced-color-adjust: none;background: ${Ei.Field};border-color: ${Ei.FieldText}}:host(:hover:not([disabled])) .root, :host([appearance="filled"]:hover:not([disabled])) .root, :host([appearance="filled"]:hover) .root{background: ${Ei.Field};border-color: ${Ei.Highlight}}.start, .end{fill: currentcolor}:host([disabled]){opacity: 1}:host([disabled]) .root, :host([appearance="filled"]:hover[disabled]) .root{border-color: ${Ei.GrayText};background: ${Ei.Field}}:host(:focus-within:enabled) .root{border-color: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight} inset}input::placeholder{color: ${Ei.GrayText}}`));class Fh extends ks{constructor(){super(...arguments),this.appearance="outline"}}_d([de],Fh.prototype,"appearance",void 0),Fh.compose({baseName:"number-field",baseClass:ks,styles:Dh,template:(e,t)=>K`<template class="${e=>e.readOnly?"readonly":""}"><label part="label" for="control" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Qe("defaultSlottedNodes")}></slot></label><div class="root" part="root">${it(0,t)}<input class="control" part="control" id="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" @keydown="${(e,t)=>e.handleKeyDown(t.event)}" @blur="${(e,t)=>e.handleBlur()}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" type="text" inputmode="numeric" min="${e=>e.min}" max="${e=>e.max}" step="${e=>e.step}" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.ariaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${Fe("control")}/>${Ve(e=>!e.hideStep&&!e.readOnly&&!e.disabled,K`<div class="controls" part="controls"><div class="step-up" part="step-up" @click="${e=>e.stepUp()}"><slot name="step-up-glyph">${t.stepUpGlyph||""}</slot></div><div class="step-down" part="step-down" @click="${e=>e.stepDown()}"><slot name="step-down-glyph">${t.stepDownGlyph||""}</slot></div></div>`)} ${tt(0,t)}</div></template>`,shadowOptions:{delegatesFocus:!0},stepDownGlyph:'\n <span class="step-down-glyph" part="step-down-glyph"></span>\n ',stepUpGlyph:'\n <span class="step-up-glyph" part="step-up-glyph"></span>\n '});hs.compose({baseName:"picker",template:(e,t)=>{const i=e.tagFor(Hi),c=e.tagFor(is),o=e.tagFor(ss),s=e.tagFor(ss),a=function(e){const t=e.tagFor(ns);return K`<${t}value="${e=>e}" :contentsTemplate="${(e,t)=>t.parent.listItemContentsTemplate}"></${t}>`}(e),n=function(e){const t=e.tagFor(os);return K`<${t}value="${e=>e}" :contentsTemplate="${(e,t)=>t.parent.menuOptionContentsTemplate}"></${t}>`}(e);return K`<template :selectedListTag="${()=>o}" :menuTag="${()=>c}" :defaultListItemTemplate="${a}" :defaultMenuOptionTemplate="${n}" @focusin="${(e,t)=>e.handleFocusIn(t.event)}" @focusout="${(e,t)=>e.handleFocusOut(t.event)}" @keydown="${(e,t)=>e.handleKeyDown(t.event)}" @pickeriteminvoked="${(e,t)=>e.handleItemInvoke(t.event)}" @pickeroptioninvoked="${(e,t)=>e.handleOptionInvoke(t.event)}"><slot name="list-region"></slot>${Ve(e=>e.flyoutOpen,K`<${i}class="region" part="region" auto-update-mode="${e=>e.menuConfig.autoUpdateMode}" fixed-placement="${e=>e.menuConfig.fixedPlacement}" vertical-positioning-mode="${e=>e.menuConfig.verticalPositioningMode}" vertical-default-position="${e=>e.menuConfig.verticalDefaultPosition}" vertical-scaling="${e=>e.menuConfig.verticalScaling}" vertical-inset="${e=>e.menuConfig.verticalInset}" vertical-viewport-lock="${e=>e.menuConfig.verticalViewportLock}" horizontal-positioning-mode="${e=>e.menuConfig.horizontalPositioningMode}" horizontal-default-position="${e=>e.menuConfig.horizontalDefaultPosition}" horizontal-scaling="${e=>e.menuConfig.horizontalScaling}" horizontal-inset="${e=>e.menuConfig.horizontalInset}" horizontal-viewport-lock="${e=>e.menuConfig.horizontalViewportLock}" @loaded="${(e,t)=>e.handleRegionLoaded(t.event)}" ${Fe("region")}>${Ve(e=>!e.showNoOptions&&!e.showLoading,K`<slot name="menu-region"></slot>`)} ${Ve(e=>e.showNoOptions&&!e.showLoading,K`<div class="no-options-display" part="no-options-display"><slot name="no-options-region">${e=>e.noSuggestionsText}</slot></div>`)} ${Ve(e=>e.showLoading,K`<div class="loading-display" part="loading-display"><slot name="loading-region"><${s}part="loading-progress" class="loading-progress slot="loading-region"></${s}>${e=>e.loadingText}</slot></div>`)}</${i}>`)}</template>`},styles:(e,t)=>Me` .region{z-index: 1000;overflow: hidden;display: flex;font-family: ${nr};font-size: ${br}}.loaded{opacity: 1;pointer-events: none}.loading-display, .no-options-display{background: ${El};width: 100%;min-height: calc(${Fd} * 1px);display: flex;flex-direction: column;align-items: center;justify-items: center;padding: calc(${fr} * 1px)}.loading-progress{width: 42px;height: 42px}.bottom{flex-direction: column}.top{flex-direction: column-reverse}`,shadowOptions:{}});(class extends is{connectedCallback(){El.setValueFor(this,yl),super.connectedCallback()}}).compose({baseName:"picker-menu",baseClass:is,template:(e,t)=>K`<template role="list" slot="menu-region"><div class="options-display" part="options-display"><div class="header-region" part="header-region"><slot name="header-region" ${Qe("headerElements")}></slot></div><slot ${Qe("menuElements")}></slot><div class="footer-region" part="footer-region"><slot name="footer-region" ${Qe("footerElements")}></slot></div><div role="alert" aria-live="polite" part="suggestions-available-alert" class="suggestions-available-alert">${e=>e.suggestionsAvailableText}</div></div></template>`,styles:(e,t)=>Me` :host{background: ${El};--elevation: 11;/* TODO: a mechanism to manage z-index across components https://github.com/microsoft/fast/issues/3813 */ z-index: 1000;display: flex;width: 100%;max-height: 100%;min-height: 58px;box-sizing: border-box;flex-direction: column;overflow-y: auto;overflow-x: hidden;pointer-events: auto;border-radius: calc(${hr} * 1px);padding: calc(${fr} * 1px) 0;border: calc(${gr} * 1px) solid transparent;${Pd}}.suggestions-available-alert{height: 0;opacity: 0;overflow: hidden}`.withBehaviors(Ka(Me` :host{background: ${Ei.Canvas};border-color: ${Ei.CanvasText}}`))}),os.compose({baseName:"picker-menu-option",template:(e,t)=>K`<template role="listitem" tabindex="-1" @click="${(e,t)=>e.handleClick(t.event)}"><slot></slot></template>`,styles:(e,t)=>Me` :host{display: flex;align-items: center;justify-items: center;font-family: ${nr};border-radius: calc(${hr} * 1px);border: calc(${vr} * 1px) solid transparent;box-sizing: border-box;background: ${ld};color: ${kd};cursor: pointer;fill: currentcolor;font-size: ${br};min-height: calc(${Fd} * 1px);line-height: ${yr};margin: 0 calc(${fr} * 1px);outline: none;overflow: hidden;padding: 0 calc(${fr} * 2.25px);user-select: none;white-space: nowrap}:host(:${Ja}[role="listitem"]){border-color: ${Cd};background: ${ud}}:host(:hover){background: ${dd}}:host(:active){background: ${hd}}:host([aria-selected="true"]){background: ${Al};color: ${Fl}}:host([aria-selected="true"]:hover){background: ${Ol};color: ${Hl}}:host([aria-selected="true"]:active){background: ${Tl};color: ${_l}}`.withBehaviors(Ka(Me` :host{border-color: transparent;forced-color-adjust: none;color: ${Ei.ButtonText};fill: currentcolor}:host(:not([aria-selected="true"]):hover), :host([aria-selected="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([disabled]), :host([disabled]:not([aria-selected="true"]):hover){background: ${Ei.Canvas};color: ${Ei.GrayText};fill: currentcolor;opacity: 1}`))}),ss.compose({baseName:"picker-list",template:(e,t)=>K`<template slot="list-region" role="list" class="picker-list"><slot></slot><slot name="input-region"></slot></template>`,styles:(e,t)=>Me` :host{display: flex;flex-direction: row;column-gap: calc(${fr} * 1px);row-gap: calc(${fr} * 1px);flex-wrap: wrap}::slotted([role="combobox"]){min-width: 260px;width: auto;box-sizing: border-box;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 1px);font-family: ${nr};outline: none;user-select: none;font-size: ${br};line-height: ${yr};padding: 0 calc(${fr} * 2px + 1px)}::slotted([role="combobox"]:active){{background: ${sd};border-color: ${Tl}}::slotted([role="combobox"]:focus-within){border-color: ${Cd};box-shadow: 0 0 0 1px ${Cd} inset}`.withBehaviors(Ka(Me` ::slotted([role="combobox"]:active){background: ${Ei.Field};border-color: ${Ei.Highlight}}::slotted([role="combobox"]:focus-within){border-color: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight} inset}::slotted(input:placeholder){color: ${Ei.GrayText}}`))}),ns.compose({baseName:"picker-list-item",template:(e,t)=>K`<template role="listitem" tabindex="0" @click="${(e,t)=>e.handleClick(t.event)}" @keydown="${(e,t)=>e.handleKeyDown(t.event)}"><slot></slot></template>`,styles:(e,t)=>Me` :host{display: flex;align-items: center;justify-items: center;font-family: ${nr};border-radius: calc(${hr} * 1px);border: calc(${vr} * 1px) solid transparent;box-sizing: border-box;background: ${ld};color: ${kd};cursor: pointer;fill: currentcolor;font-size: ${br};height: calc(${Fd} * 1px);line-height: ${yr};outline: none;overflow: hidden;padding: 0 calc(${fr} * 2.25px);user-select: none;white-space: nowrap}:host(:hover){background: ${dd}}:host(:active){background: ${hd}}:host(:${Ja}){background: ${ud};border-color: ${Cd}}:host([aria-selected="true"]){background: ${Al};color: ${_l}}`.withBehaviors(Ka(Me` :host{border-color: transparent;forced-color-adjust: none;color: ${Ei.ButtonText};fill: currentcolor}:host(:not([aria-selected="true"]):hover), :host([aria-selected="true"]){background: ${Ei.Highlight};color: ${Ei.HighlightText}}:host([disabled]), :host([disabled]:not([aria-selected="true"]):hover){background: ${Ei.Canvas};color: ${Ei.GrayText};fill: currentcolor;opacity: 1}`))});const Hh=(e,t)=>Me` ${Xa("flex")} :host{align-items: center;outline: none;height: calc(${Fd} * 1px);width: calc(${Fd} * 1px);margin: calc(${Fd} * 1px) 0}.progress{height: 100%;width: 100%}.background{stroke: ${Jl};fill: none;stroke-width: 2px}.determinate{stroke: ${Yl};fill: none;stroke-width: 2px;stroke-linecap: round;transform-origin: 50% 50%;transform: rotate(-90deg);transition: all 0.2s ease-in-out}.indeterminate-indicator-1{stroke: ${Yl};fill: none;stroke-width: 2px;stroke-linecap: round;transform-origin: 50% 50%;transform: rotate(-90deg);transition: all 0.2s ease-in-out;animation: spin-infinite 2s linear infinite}:host([paused]) .indeterminate-indicator-1{animation-play-state: paused;stroke: ${Jl}}:host([paused]) .determinate{stroke: ${wd}}@keyframes spin-infinite{0%{stroke-dasharray: 0.01px 43.97px;transform: rotate(0deg)}50%{stroke-dasharray: 21.99px 21.99px;transform: rotate(450deg)}100%{stroke-dasharray: 0.01px 43.97px;transform: rotate(1080deg)}}`.withBehaviors(Ka(Me` .indeterminate-indicator-1, .determinate{stroke: ${Ei.FieldText}}.background{stroke: ${Ei.Field}}:host([paused]) .indeterminate-indicator-1{stroke: ${Ei.Field}}:host([paused]) .determinate{stroke: ${Ei.GrayText}}`));$s.compose({baseName:"progress-ring",template:Es,styles:Hh,indeterminateIndicator:'\n <svg class="progress" part="progress" viewBox="0 0 16 16">\n <circle\n class="background"\n part="background"\n cx="8px"\n cy="8px"\n r="7px"\n ></circle>\n <circle\n class="indeterminate-indicator-1"\n part="indeterminate-indicator-1"\n cx="8px"\n cy="8px"\n r="7px"\n ></circle>\n </svg>\n '});const _h=(e,t)=>Me` ${Xa("flex")} :host{align-items: center;outline: none;height: calc(${fr} * 1px);margin: calc(${fr} * 1px) 0}.progress{background-color: ${Jl};border-radius: calc(${fr} * 1px);width: 100%;height: 100%;display: flex;align-items: center;position: relative}.determinate{background-color: ${Yl};border-radius: calc(${fr} * 1px);height: 100%;transition: all 0.2s ease-in-out;display: flex}.indeterminate{height: 100%;border-radius: calc(${fr} * 1px);display: flex;width: 100%;position: relative;overflow: hidden}.indeterminate-indicator-1{position: absolute;opacity: 0;height: 100%;background-color: ${Yl};border-radius: calc(${fr} * 1px);animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);width: 40%;animation: indeterminate-1 2s infinite}.indeterminate-indicator-2{position: absolute;opacity: 0;height: 100%;background-color: ${Yl};border-radius: calc(${fr} * 1px);animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);width: 60%;animation: indeterminate-2 2s infinite}:host([paused]) .indeterminate-indicator-1, :host([paused]) .indeterminate-indicator-2{animation-play-state: paused;background-color: ${Jl}}:host([paused]) .determinate{background-color: ${wd}}@keyframes indeterminate-1{0%{opacity: 1;transform: translateX(-100%)}70%{opacity: 1;transform: translateX(300%)}70.01%{opacity: 0}100%{opacity: 0;transform: translateX(300%)}}@keyframes indeterminate-2{0%{opacity: 0;transform: translateX(-150%)}29.99%{opacity: 0}30%{opacity: 1;transform: translateX(-150%)}100%{transform: translateX(166.66%);opacity: 1}}`.withBehaviors(Ka(Me` .progress{forced-color-adjust: none;background-color: ${Ei.Field};box-shadow: 0 0 0 1px inset ${Ei.FieldText}}.determinate, .indeterminate-indicator-1, .indeterminate-indicator-2{forced-color-adjust: none;background-color: ${Ei.FieldText}}:host([paused]) .determinate, :host([paused]) .indeterminate-indicator-1, :host([paused]) .indeterminate-indicator-2{background-color: ${Ei.GrayText}}`));$s.compose({baseName:"progress",template:Ns,styles:_h,indeterminateIndicator1:'\n <span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>\n ',indeterminateIndicator2:'\n <span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>\n '});const Ph=(e,t)=>Me` ${Xa("flex")} :host{align-items: flex-start;margin: calc(${fr} * 1px) 0;flex-direction: column}.positioning-region{display: flex;flex-wrap: wrap}:host([orientation="vertical"]) .positioning-region{flex-direction: column}:host([orientation="horizontal"]) .positioning-region{flex-direction: row}`;Os.compose({baseName:"radio-group",template:As,styles:Ph});const Vh=(e,t)=>Me` ${Xa("inline-flex")} :host{--input-size: calc((${Fd} / 2) + ${fr});align-items: center;outline: none;margin: calc(${fr} * 1px) 0;/* Chromium likes to select label text or the default slot when the radio is clicked. Maybe there is a better solution here? */ user-select: none;position: relative;flex-direction: row;transition: all 0.2s ease-in-out}.control{position: relative;width: calc((${Fd} / 2 + ${fr}) * 1px);height: calc((${Fd} / 2 + ${fr}) * 1px);box-sizing: border-box;border-radius: 999px;border: calc(${gr} * 1px) solid ${$d};background: ${od};outline: none;cursor: pointer}.label{font-family: ${nr};color: ${kd};padding-inline-start: calc(${fr} * 2px + 2px);margin-inline-end: calc(${fr} * 2px + 2px);cursor: pointer;font-size: ${br};line-height: ${yr}}.label__hidden{display: none;visibility: hidden}.control, .checked-indicator{flex-shrink: 0}.checked-indicator{position: absolute;top: 5px;left: 5px;right: 5px;bottom: 5px;border-radius: 999px;display: inline-block;background: ${Fl};fill: ${Fl};opacity: 0;pointer-events: none}:host(:not([disabled])) .control:hover{background: ${sd};border-color: ${Nd}}:host(:not([disabled])) .control:active{background: ${ad};border-color: ${Ad}}:host(:${Ja}) .control{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}:host([aria-checked="true"]) .control{background: ${Al};border: calc(${gr} * 1px) solid ${Al}}:host([aria-checked="true"]:not([disabled])) .control:hover{background: ${Ol};border: calc(${gr} * 1px) solid ${Ol}}:host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator{background: ${Hl};fill: ${Hl}}:host([aria-checked="true"]:not([disabled])) .control:active{background: ${Tl};border: calc(${gr} * 1px) solid ${Tl}}:host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator{background: ${_l};fill: ${_l}}:host([aria-checked="true"]:${Ja}:not([disabled])) .control{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([aria-checked="true"]) .checked-indicator{opacity: 1}:host([disabled]){opacity: ${mr}}`.withBehaviors(Ka(Me` .control, :host([aria-checked="true"]:not([disabled])) .control{forced-color-adjust: none;border-color: ${Ei.FieldText};background: ${Ei.Field}}:host(:not([disabled])) .control:hover{border-color: ${Ei.Highlight};background: ${Ei.Field}}:host([aria-checked="true"]:not([disabled])) .control:hover, :host([aria-checked="true"]:not([disabled])) .control:active{border-color: ${Ei.Highlight};background: ${Ei.Highlight}}:host([aria-checked="true"]) .checked-indicator{background: ${Ei.Highlight};fill: ${Ei.Highlight}}:host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator, :host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator{background: ${Ei.HighlightText};fill: ${Ei.HighlightText}}:host(:${Ja}) .control{border-color: ${Ei.Highlight};box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([aria-checked="true"]:${Ja}:not([disabled])) .control{border-color: ${Ei.Highlight};box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([disabled]){forced-color-adjust: none;opacity: 1}:host([disabled]) .label{color: ${Ei.GrayText}}:host([disabled]) .control, :host([aria-checked="true"][disabled]) .control:hover, .control:active{background: ${Ei.Field};border-color: ${Ei.GrayText}}:host([disabled]) .checked-indicator, :host([aria-checked="true"][disabled]) .control:hover .checked-indicator{fill: ${Ei.GrayText};background: ${Ei.GrayText}}`));Ds.compose({baseName:"radio",template:Ts,styles:Vh,checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '});const Bh=yo.create("clear-button-hover").withDefault(e=>{const t=rd.getValueFor(e),i=Xl.getValueFor(e);return t.evaluate(e,i.evaluate(e).hover).hover}),Uh=yo.create("clear-button-active").withDefault(e=>{const t=rd.getValueFor(e),i=Xl.getValueFor(e);return t.evaluate(e,i.evaluate(e).hover).active});class jh extends Bs{constructor(){super(...arguments),this.appearance="outline"}}_d([de],jh.prototype,"appearance",void 0),jh.compose({baseName:"search",baseClass:Bs,template:(e,t)=>K`<template class=" ${e=>e.readOnly?"readonly":""}"><label part="label" for="control" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Qe({property:"defaultSlottedNodes",filter:_s})}></slot></label><div class="root" part="root" ${Fe("root")}>${it(0,t)}<div class="input-wrapper" part="input-wrapper"><input class="control" part="control" id="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" ?spellcheck="${e=>e.spellcheck}" :value="${e=>e.value}" type="search" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.ariaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${Fe("control")}/><slot name="close-button"><button class="clear-button ${e=>e.value?"":"clear-button__hidden"}" part="clear-button" tabindex="-1" @click=${e=>e.handleClearInput()}><slot name="close-glyph"><svg width="9" height="9" viewBox="0 0 9 9" xmlns="http://www.w3.org/2000/svg"><path d="M0.146447 0.146447C0.338683 -0.0478972 0.645911 -0.0270359 0.853553 0.146447L4.5 3.793L8.14645 0.146447C8.34171 -0.0488155 8.65829 -0.0488155 8.85355 0.146447C9.04882 0.341709 9.04882 0.658291 8.85355 0.853553L5.207 4.5L8.85355 8.14645C9.05934 8.35223 9.03129 8.67582 8.85355 8.85355C8.67582 9.03129 8.35409 9.02703 8.14645 8.85355L4.5 5.207L0.853553 8.85355C0.658291 9.04882 0.341709 9.04882 0.146447 8.85355C-0.0488155 8.65829 -0.0488155 8.34171 0.146447 8.14645L3.793 4.5L0.146447 0.853553C-0.0268697 0.680237 -0.0457894 0.34079 0.146447 0.146447Z" /></svg></slot></button></slot></div>${tt(0,t)}</div></template>`,styles:(e,t)=>Me` ${Xa("inline-block")} :host{font-family: ${nr};outline: none;user-select: none}.root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 1px);align-items: baseline}.control{-webkit-appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - 4px);width: 100%;margin-top: auto;margin-bottom: auto;border: none;padding: 0 calc(${fr} * 2px + 1px);font-size: ${br};line-height: ${yr}}.control::-webkit-search-cancel-button{-webkit-appearance: none}.control:hover, .control:${Ja}, .control:disabled, .control:active{outline: none}.clear-button{height: calc(100% - 2px);opacity: 0;margin: 1px;background: transparent;color: ${kd};fill: currentcolor;border: none;border-radius: calc(${hr} * 1px);min-width: calc(${Fd} * 1px);font-size: ${br};line-height: ${yr};outline: none;font-family: ${nr};padding: 0 calc((10 + (${fr} * 2 * ${ur})) * 1px)}.clear-button:hover{background: ${dd}}.clear-button:active{background: ${hd}}:host([appearance="filled"]) .clear-button:hover{background: ${Bh}}:host([appearance="filled"]) .clear-button:active{background: ${Uh}}.input-wrapper{display: flex;position: relative;width: 100%;height: 100%}.label{display: block;color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr};margin-bottom: 4px}.label__hidden{display: none;visibility: hidden}.input-wrapper, .start, .end{align-self: center}.start, .end{display: flex;margin: 1px;fill: currentcolor}::slotted([slot="end"]){height: 100%}.end{margin-inline-end: 1px;height: calc(100% - 2px)}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px;margin-inline-end: 11px;margin-inline-start: 11px;margin-top: auto;margin-bottom: auto}:host(:hover:not([disabled])) .root{background: ${sd};border-color: ${Ol}}:host(:active:not([disabled])) .root{background: ${sd};border-color: ${Tl}}:host(:focus-within:not([disabled])) .root{border-color: ${Cd};box-shadow: 0 0 0 1px ${Cd} inset}.clear-button__hidden{opacity: 0}:host(:hover:not([disabled], [readOnly])) .clear-button, :host(:active:not([disabled], [readOnly])) .clear-button, :host(:focus-within:not([disabled], [readOnly])) .clear-button{opacity: 1}:host(:hover:not([disabled], [readOnly])) .clear-button__hidden, :host(:active:not([disabled], [readOnly])) .clear-button__hidden, :host(:focus-within:not([disabled], [readOnly])) .clear-button__hidden{opacity: 0}:host([appearance="filled"]) .root{background: ${El}}:host([appearance="filled"]:hover:not([disabled])) .root{background: ${ed}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([disabled]){opacity: ${mr}}:host([disabled]) .control{border-color: ${$d}}`.withBehaviors(Ka(Me` .root, :host([appearance="filled"]) .root{forced-color-adjust: none;background: ${Ei.Field};border-color: ${Ei.FieldText}}:host(:hover:not([disabled])) .root, :host([appearance="filled"]:hover:not([disabled])) .root, :host([appearance="filled"]:hover) .root{background: ${Ei.Field};border-color: ${Ei.Highlight}}.start, .end{fill: currentcolor}:host([disabled]){opacity: 1}:host([disabled]) .root, :host([appearance="filled"]:hover[disabled]) .root{border-color: ${Ei.GrayText};background: ${Ei.Field}}:host(:focus-within:enabled) .root{border-color: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight} inset}input::placeholder{color: ${Ei.GrayText}}`)),shadowOptions:{delegatesFocus:!0}});class qh extends Gs{constructor(){super(...arguments),this.listboxScrollWidth=""}connectedCallback(){super.connectedCallback(),this.listbox&&El.setValueFor(this.listbox,yl)}get listboxMaxHeight(){return Math.floor(this.maxHeight/Id.getValueFor(this)).toString()}listboxScrollWidthChanged(){this.updateComputedStylesheet()}get selectSize(){var e;return`${null!==(e=this.size)&&void 0!==e?e:this.multiple?4:0}`}multipleChanged(e,t){super.multipleChanged(e,t),this.updateComputedStylesheet()}maxHeightChanged(e,t){this.collapsible&&this.updateComputedStylesheet()}setPositioning(){super.setPositioning(),this.updateComputedStylesheet()}sizeChanged(e,t){super.sizeChanged(e,t),this.updateComputedStylesheet(),this.collapsible?requestAnimationFrame(()=>{this.listbox.style.setProperty("display","flex"),this.listbox.style.setProperty("overflow","visible"),this.listbox.style.setProperty("visibility","hidden"),this.listbox.style.setProperty("width","auto"),this.listbox.hidden=!1,this.listboxScrollWidth=`${this.listbox.scrollWidth}`,this.listbox.hidden=!0,this.listbox.style.removeProperty("display"),this.listbox.style.removeProperty("overflow"),this.listbox.style.removeProperty("visibility"),this.listbox.style.removeProperty("width")}):this.listboxScrollWidth=""}updateComputedStylesheet(){this.computedStylesheet&&this.$fastController.removeStyles(this.computedStylesheet),this.computedStylesheet=Me` :host{--listbox-max-height: ${this.listboxMaxHeight};--listbox-scroll-width: ${this.listboxScrollWidth};--size: ${this.selectSize}}`,this.$fastController.addStyles(this.computedStylesheet)}}_d([b],qh.prototype,"listboxScrollWidth",void 0),qh.compose({baseName:"select",baseClass:Gs,template:Ys,styles:uh,indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '});const Gh=(e,t)=>Me` ${Xa("block")} :host{--skeleton-fill-default: #e1dfdd;overflow: hidden;width: 100%;position: relative;background-color: var(--skeleton-fill, var(--skeleton-fill-default));--skeleton-animation-gradient-default: linear-gradient( 270deg, var(--skeleton-fill, var(--skeleton-fill-default)) 0%, #f3f2f1 51.13%, var(--skeleton-fill, var(--skeleton-fill-default)) 100% );--skeleton-animation-timing-default: ease-in-out}:host([shape="rect"]){border-radius: calc(${hr} * 1px)}:host([shape="circle"]){border-radius: 100%;overflow: hidden}object{position: absolute;width: 100%;height: auto;z-index: 2}object img{width: 100%;height: auto}${Xa("block")} span.shimmer{position: absolute;width: 100%;height: 100%;background-image: var( --skeleton-animation-gradient, var(--skeleton-animation-gradient-default) );background-size: 0px 0px / 90% 100%;background-repeat: no-repeat;background-color: var(--skeleton-animation-fill, ${Jl});animation: shimmer 2s infinite;animation-timing-function: var( --skeleton-animation-timing, var(--skeleton-timing-default) );animation-direction: normal;z-index: 1}::slotted(svg){z-index: 2}::slotted(.pattern){width: 100%;height: 100%}@keyframes shimmer{0%{transform: translateX(-100%)}100%{transform: translateX(100%)}}`.withBehaviors(Ka(Me` :host{forced-color-adjust: none;background-color: ${Ei.ButtonFace};box-shadow: 0 0 0 1px ${Ei.ButtonText}}${Xa("block")} span.shimmer{display: none}`));Zs.compose({baseName:"skeleton",template:Ks,styles:Gh});const Wh=Me` :host{align-self: start;grid-row: 2;margin-top: -2px;height: calc((${Fd} / 2 + ${fr}) * 1px);width: auto}.container{grid-template-rows: auto auto;grid-template-columns: 0}.label{margin: 2px 0}`,Yh=Me` :host{justify-self: start;grid-column: 2;margin-left: 2px;height: auto;width: calc((${Fd} / 2 + ${fr}) * 1px)}.container{grid-template-columns: auto auto;grid-template-rows: 0;min-width: calc(var(--thumb-size) * 1px);height: calc(var(--thumb-size) * 1px)}.mark{transform: rotate(90deg);align-self: center}.label{margin-left: calc((${fr} / 2) * 3px);align-self: center}`,Kh=(e,t)=>Me` ${Xa("block")} :host{font-family: ${nr};color: ${kd};fill: currentcolor}.root{position: absolute;display: grid}.container{display: grid;justify-self: center}.label{justify-self: center;align-self: center;white-space: nowrap;max-width: 30px}.mark{width: calc((${fr} / 4) * 1px);height: calc(${Fd} * 0.25 * 1px);background: ${$d};justify-self: center}:host(.disabled){opacity: ${mr}}`.withBehaviors(Ka(Me` .mark{forced-color-adjust: none;background: ${Ei.FieldText}}:host(.disabled){forced-color-adjust: none;opacity: 1}:host(.disabled) .label{color: ${Ei.GrayText}}:host(.disabled) .mark{background: ${Ei.GrayText}}`));class Zh extends ea{sliderOrientationChanged(){this.sliderOrientation===Jt?(this.$fastController.addStyles(Wh),this.$fastController.removeStyles(Yh)):(this.$fastController.addStyles(Yh),this.$fastController.removeStyles(Wh))}}Zh.compose({baseName:"slider-label",baseClass:ea,template:Qs,styles:Kh});const Qh=Me` .track-start{left: 0}`,Xh=Me` .track-start{right: 0}`,Jh=(e,t)=>Me` :host([hidden]){display: none}${Xa("inline-grid")} :host{--thumb-size: calc(${Fd} * 0.5 - ${fr});--thumb-translate: calc(var(--thumb-size) * -0.5 + var(--track-width) / 2);--track-overhang: calc((${fr} / 2) * -1);--track-width: ${fr};--fast-slider-height: calc(var(--thumb-size) * 10);align-items: center;width: 100%;margin: calc(${fr} * 1px) 0;user-select: none;box-sizing: border-box;border-radius: calc(${hr} * 1px);outline: none;cursor: pointer}:host([orientation="horizontal"]) .positioning-region{position: relative;margin: 0 8px;display: grid;grid-template-rows: calc(var(--thumb-size) * 1px) 1fr}:host([orientation="vertical"]) .positioning-region{position: relative;margin: 0 8px;display: grid;height: 100%;grid-template-columns: calc(var(--thumb-size) * 1px) 1fr}:host(:${Ja}) .thumb-cursor{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}.thumb-container{position: absolute;height: calc(var(--thumb-size) * 1px);width: calc(var(--thumb-size) * 1px);transition: all 0.2s ease;color: ${kd};fill: currentcolor}.thumb-cursor{border: none;width: calc(var(--thumb-size) * 1px);height: calc(var(--thumb-size) * 1px);background: ${kd};border-radius: calc(${hr} * 1px)}.thumb-cursor:hover{background: ${kd};border-color: ${Nd}}.thumb-cursor:active{background: ${kd}}.track-start{background: ${Yl};position: absolute;height: 100%;left: 0;border-radius: calc(${hr} * 1px)}:host([orientation="horizontal"]) .thumb-container{transform: translateX(calc(var(--thumb-size) * 0.5px)) translateY(calc(var(--thumb-translate) * 1px))}:host([orientation="vertical"]) .thumb-container{transform: translateX(calc(var(--thumb-translate) * 1px)) translateY(calc(var(--thumb-size) * 0.5px))}:host([orientation="horizontal"]){min-width: calc(var(--thumb-size) * 1px)}:host([orientation="horizontal"]) .track{right: calc(var(--track-overhang) * 1px);left: calc(var(--track-overhang) * 1px);align-self: start;height: calc(var(--track-width) * 1px)}:host([orientation="vertical"]) .track{top: calc(var(--track-overhang) * 1px);bottom: calc(var(--track-overhang) * 1px);width: calc(var(--track-width) * 1px);height: 100%}.track{background: ${$d};position: absolute;border-radius: calc(${hr} * 1px)}:host([orientation="vertical"]){height: calc(var(--fast-slider-height) * 1px);min-height: calc(var(--thumb-size) * 1px);min-width: calc(${fr} * 20px)}:host([orientation="vertical"]) .track-start{height: auto;width: 100%;top: 0}:host([disabled]), :host([readonly]){cursor: ${Qa}}:host([disabled]){opacity: ${mr}}`.withBehaviors(new Wd(Qh,Xh),Ka(Me` .thumb-cursor{forced-color-adjust: none;border-color: ${Ei.FieldText};background: ${Ei.FieldText}}.thumb-cursor:hover, .thumb-cursor:active{background: ${Ei.Highlight}}.track{forced-color-adjust: none;background: ${Ei.FieldText}}:host(:${Ja}) .thumb-cursor{border-color: ${Ei.Highlight}}:host([disabled]){opacity: 1}:host([disabled]) .track, :host([disabled]) .thumb-cursor{forced-color-adjust: none;background: ${Ei.GrayText}}:host(:${Ja}) .thumb-cursor{background: ${Ei.Highlight};border-color: ${Ei.Highlight};box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}`));oa.compose({baseName:"slider",template:(e,t)=>K`<template role="slider" class="${e=>e.readOnly?"readonly":""} ${e=>e.orientation||Jt}" tabindex="${e=>e.disabled?null:0}" aria-valuetext="${e=>e.valueTextFormatter(e.value)}" aria-valuenow="${e=>e.value}" aria-valuemin="${e=>e.min}" aria-valuemax="${e=>e.max}" aria-disabled="${e=>!!e.disabled||void 0}" aria-readonly="${e=>!!e.readOnly||void 0}" aria-orientation="${e=>e.orientation}" class="${e=>e.orientation}"><div part="positioning-region" class="positioning-region"><div ${Fe("track")}part="track-container" class="track"><slot name="track"></slot><div part="track-start" class="track-start" style="${e=>e.position}"><slot name="track-start"></slot></div></div><slot></slot><div ${Fe("thumb")}part="thumb-container" class="thumb-container" style="${e=>e.position}"><slot name="thumb">${t.thumb||""}</slot></div></div></template>`,styles:Jh,thumb:'\n <div class="thumb-cursor"></div>\n '});const eu=(e,t)=>Me` :host([hidden]){display: none}${Xa("inline-flex")} :host{align-items: center;outline: none;font-family: ${nr};margin: calc(${fr} * 1px) 0;${""} user-select: none}:host([disabled]){opacity: ${mr}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .switch, :host([disabled]) .switch{cursor: ${Qa}}.switch{position: relative;outline: none;box-sizing: border-box;width: calc(${Fd} * 1px);height: calc((${Fd} / 2 + ${fr}) * 1px);background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${$d}}.switch:hover{background: ${sd};border-color: ${Nd};cursor: pointer}host([disabled]) .switch:hover, host([readonly]) .switch:hover{background: ${sd};border-color: ${Nd};cursor: ${Qa}}:host(:not([disabled])) .switch:active{background: ${ad};border-color: ${Ad}}:host(:${Ja}) .switch{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}.checked-indicator{position: absolute;top: 5px;bottom: 5px;background: ${kd};border-radius: calc(${hr} * 1px);transition: all 0.2s ease-in-out}.status-message{color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr}}:host([disabled]) .status-message, :host([readonly]) .status-message{cursor: ${Qa}}.label{color: ${kd};margin-inline-end: calc(${fr} * 2px + 2px);font-size: ${br};line-height: ${yr};cursor: pointer}.label__hidden{display: none;visibility: hidden}::slotted([slot="checked-message"]), ::slotted([slot="unchecked-message"]){margin-inline-start: calc(${fr} * 2px + 2px)}:host([aria-checked="true"]) .checked-indicator{background: ${Fl}}:host([aria-checked="true"]) .switch{background: ${Al};border-color: ${Al}}:host([aria-checked="true"]:not([disabled])) .switch:hover{background: ${Ol};border-color: ${Ol}}:host([aria-checked="true"]:not([disabled])) .switch:hover .checked-indicator{background: ${Hl}}:host([aria-checked="true"]:not([disabled])) .switch:active{background: ${Tl};border-color: ${Tl}}:host([aria-checked="true"]:not([disabled])) .switch:active .checked-indicator{background: ${_l}}:host([aria-checked="true"]:${Ja}:not([disabled])) .switch{box-shadow: 0 0 0 2px ${El}, 0 0 0 4px ${Cd}}.unchecked-message{display: block}.checked-message{display: none}:host([aria-checked="true"]) .unchecked-message{display: none}:host([aria-checked="true"]) .checked-message{display: block}`.withBehaviors(Ka(Me` .checked-indicator, :host(:not([disabled])) .switch:active .checked-indicator{forced-color-adjust: none;background: ${Ei.FieldText}}.switch{forced-color-adjust: none;background: ${Ei.Field};border-color: ${Ei.FieldText}}:host(:not([disabled])) .switch:hover{background: ${Ei.HighlightText};border-color: ${Ei.Highlight}}:host([aria-checked="true"]) .switch{background: ${Ei.Highlight};border-color: ${Ei.Highlight}}:host([aria-checked="true"]:not([disabled])) .switch:hover, :host(:not([disabled])) .switch:active{background: ${Ei.HighlightText};border-color: ${Ei.Highlight}}:host([aria-checked="true"]) .checked-indicator{background: ${Ei.HighlightText}}:host([aria-checked="true"]:not([disabled])) .switch:hover .checked-indicator{background: ${Ei.Highlight}}:host([disabled]){opacity: 1}:host(:${Ja}) .switch{border-color: ${Ei.Highlight};box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([aria-checked="true"]:${Ja}:not([disabled])) .switch{box-shadow: 0 0 0 2px ${Ei.Field}, 0 0 0 4px ${Ei.FieldText}}:host([disabled]) .checked-indicator{background: ${Ei.GrayText}}:host([disabled]) .switch{background: ${Ei.Field};border-color: ${Ei.GrayText}}`),new Wd(Me` .checked-indicator{left: 5px;right: calc(((${Fd} / 2) + 1) * 1px)}:host([aria-checked="true"]) .checked-indicator{left: calc(((${Fd} / 2) + 1) * 1px);right: 5px}`,Me` .checked-indicator{right: 5px;left: calc(((${Fd} / 2) + 1) * 1px)}:host([aria-checked="true"]) .checked-indicator{right: calc(((${Fd} / 2) + 1) * 1px);left: 5px}`));ra.compose({baseName:"switch",template:sa,styles:eu,switch:'\n <span class="checked-indicator" part="checked-indicator"></span>\n '});const tu=(e,t)=>Me` ${Xa("grid")} :host{box-sizing: border-box;font-family: ${nr};font-size: ${br};line-height: ${yr};color: ${kd};grid-template-columns: auto 1fr auto;grid-template-rows: auto 1fr}.tablist{display: grid;grid-template-rows: auto auto;grid-template-columns: auto;position: relative;width: max-content;align-self: end;padding: calc(${fr} * 4px) calc(${fr} * 4px) 0;box-sizing: border-box}.start, .end{align-self: center}.activeIndicator{grid-row: 2;grid-column: 1;width: 100%;height: 5px;justify-self: center;background: ${Al};margin-top: 10px;border-radius: calc(${hr} * 1px) calc(${hr} * 1px) 0 0}.activeIndicatorTransition{transition: transform 0.2s ease-in-out}.tabpanel{grid-row: 2;grid-column-start: 1;grid-column-end: 4;position: relative}:host([orientation="vertical"]){grid-template-rows: auto 1fr auto;grid-template-columns: auto 1fr}:host([orientation="vertical"]) .tablist{grid-row-start: 2;grid-row-end: 2;display: grid;grid-template-rows: auto;grid-template-columns: auto 1fr;position: relative;width: max-content;justify-self: end;align-self: flex-start;width: 100%;padding: 0 calc(${fr} * 4px) calc((${Fd} - ${fr}) * 1px) 0}:host([orientation="vertical"]) .tabpanel{grid-column: 2;grid-row-start: 1;grid-row-end: 4}:host([orientation="vertical"]) .end{grid-row: 3}:host([orientation="vertical"]) .activeIndicator{grid-column: 1;grid-row: 1;width: 5px;height: 100%;margin-inline-end: 10px;align-self: center;background: ${Al};margin-top: 0;border-radius: 0 calc(${hr} * 1px) calc(${hr} * 1px) 0}:host([orientation="vertical"]) .activeIndicatorTransition{transition: transform 0.2s linear}`.withBehaviors(Ka(Me` .activeIndicator, :host([orientation="vertical"]) .activeIndicator{forced-color-adjust: none;background: ${Ei.Highlight}}`)),iu=(e,t)=>Me` ${Xa("inline-flex")} :host{box-sizing: border-box;font-family: ${nr};font-size: ${br};line-height: ${yr};height: calc(${Fd} * 1px);padding: calc(${fr} * 5px) calc(${fr} * 4px);color: ${wd};fill: currentcolor;border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid transparent;align-items: center;justify-content: center;grid-row: 1;cursor: pointer}:host(:hover){color: ${kd};fill: currentcolor}:host(:active){color: ${kd};fill: currentcolor}:host([disabled]){cursor: ${Qa};opacity: ${mr}}:host([disabled]:hover){color: ${wd};background: ${ld}}:host([aria-selected="true"]){background: ${Jl};color: ${Yl};fill: currentcolor}:host([aria-selected="true"]:hover){background: ${ed};color: ${Kl};fill: currentcolor}:host([aria-selected="true"]:active){background: ${td};color: ${Zl};fill: currentcolor}:host(:${Ja}){outline: none;border: calc(${gr} * 1px) solid ${Cd};box-shadow: 0 0 0 calc((${vr} - ${gr}) * 1px) ${Cd}}:host(:focus){outline: none}:host(.vertical){justify-content: end;grid-column: 2}:host(.vertical[aria-selected="true"]){z-index: 2}:host(.vertical:hover){color: ${kd}}:host(.vertical:active){color: ${kd}}:host(.vertical:hover[aria-selected="true"]){}`.withBehaviors(Ka(Me` :host{forced-color-adjust: none;border-color: transparent;color: ${Ei.ButtonText};fill: currentcolor}:host(:hover), :host(.vertical:hover), :host([aria-selected="true"]:hover){background: ${Ei.Highlight};color: ${Ei.HighlightText};fill: currentcolor}:host([aria-selected="true"]){background: ${Ei.HighlightText};color: ${Ei.Highlight};fill: currentcolor}:host(:${Ja}){border-color: ${Ei.ButtonText};box-shadow: none}:host([disabled]), :host([disabled]:hover){opacity: 1;color: ${Ei.GrayText};background: ${Ei.ButtonFace}}`));ua.compose({baseName:"tab",template:ha,styles:iu});const cu=(e,t)=>Me` ${Xa("block")} :host{box-sizing: border-box;font-size: ${br};line-height: ${yr};padding: 0 calc((6 + (${fr} * 2 * ${ur})) * 1px)}`;da.compose({baseName:"tab-panel",template:la,styles:cu}),ga.compose({baseName:"tabs",template:fa,styles:tu});const ou=(e,t)=>Me` ${Xa("inline-block")} :host{font-family: ${nr};outline: none;user-select: none}.control{box-sizing: border-box;position: relative;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 2px);font: inherit;font-size: ${br};line-height: ${yr};padding: calc(${fr} * 2px + 1px);width: 100%;resize: none}.control:hover:enabled{background: ${sd};border-color: ${Ol}}.control:active:enabled{background: ${ad};border-color: ${Tl}}.control:hover, .control:${Ja}, .control:disabled, .control:active{outline: none}:host(:focus-within) .control{border-color: ${Cd};box-shadow: 0 0 0 1px ${Cd} inset}:host([appearance="filled"]) .control{background: ${Jl}}:host([appearance="filled"]:hover:not([disabled])) .control{background: ${ed}}:host([resize="both"]) .control{resize: both}:host([resize="horizontal"]) .control{resize: horizontal}:host([resize="vertical"]) .control{resize: vertical}.label{display: block;color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr};margin-bottom: 4px}.label__hidden{display: none;visibility: hidden}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([disabled]){opacity: ${mr}}:host([disabled]) .control{border-color: ${$d}}:host([cols]){width: initial}:host([rows]) .control{height: initial}`.withBehaviors(Ka(Me` :host([disabled]){opacity: 1}`));class su extends za{constructor(){super(...arguments),this.appearance="outline"}}_d([de],su.prototype,"appearance",void 0),su.compose({baseName:"text-area",baseClass:za,template:Ca,styles:ou,shadowOptions:{delegatesFocus:!0}});const au=(e,t)=>Me` ${Xa("inline-block")} :host{font-family: ${nr};outline: none;user-select: none}.root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;color: ${kd};background: ${od};border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Al};height: calc(${Fd} * 1px);align-items: baseline}.control{-webkit-appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - 4px);width: 100%;margin-top: auto;margin-bottom: auto;border: none;padding: 0 calc(${fr} * 2px + 1px);font-size: ${br};line-height: ${yr}}.control:hover, .control:${Ja}, .control:disabled, .control:active{outline: none}.label{display: block;color: ${kd};cursor: pointer;font-size: ${br};line-height: ${yr};margin-bottom: 4px}.label__hidden{display: none;visibility: hidden}.start, .control, .end{align-self: center}.start, .end{display: flex;margin: auto;fill: currentcolor}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}.start{margin-inline-start: 11px}.end{margin-inline-end: 11px}:host(:hover:not([disabled])) .root{background: ${sd};border-color: ${Ol}}:host(:active:not([disabled])) .root{background: ${sd};border-color: ${Tl}}:host(:focus-within:not([disabled])) .root{border-color: ${Cd};box-shadow: 0 0 0 calc(${vr} * 1px) ${Cd} inset}:host([appearance="filled"]) .root{background: ${Jl}}:host([appearance="filled"]:hover:not([disabled])) .root{background: ${ed}}:host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control{cursor: ${Qa}}:host([disabled]){opacity: ${mr}}:host([disabled]) .control{border-color: ${$d}}`.withBehaviors(Ka(Me` .root, :host([appearance="filled"]) .root{forced-color-adjust: none;background: ${Ei.Field};border-color: ${Ei.FieldText}}:host(:hover:not([disabled])) .root, :host([appearance="filled"]:hover:not([disabled])) .root, :host([appearance="filled"]:hover) .root{background: ${Ei.Field};border-color: ${Ei.Highlight}}.start, .end{fill: currentcolor}:host([disabled]){opacity: 1}:host([disabled]) .root, :host([appearance="filled"]:hover[disabled]) .root{border-color: ${Ei.GrayText};background: ${Ei.Field}}:host(:focus-within:enabled) .root{border-color: ${Ei.Highlight};box-shadow: 0 0 0 1px ${Ei.Highlight} inset}input::placeholder{color: ${Ei.GrayText}}`));class nu extends xs{constructor(){super(...arguments),this.appearance="outline"}}_d([de],nu.prototype,"appearance",void 0),nu.compose({baseName:"text-field",baseClass:xs,template:(e,t)=>K`<template class=" ${e=>e.readOnly?"readonly":""}"><label part="label" for="control" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Qe({property:"defaultSlottedNodes",filter:_s})}></slot></label><div class="root" part="root">${it(0,t)}<input class="control" part="control" id="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" ?spellcheck="${e=>e.spellcheck}" :value="${e=>e.value}" type="${e=>e.type}" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.ariaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${Fe("control")}/>${tt(0,t)}</div></template>`,styles:au,shadowOptions:{delegatesFocus:!0}});const ru=(e,t)=>Me` ${Xa("inline-flex")} :host{--toolbar-item-gap: calc( (var(--design-unit) + calc(var(--density) + 2)) * 1px );background-color: ${El};border-radius: calc(${hr} * 1px);fill: currentcolor;padding: var(--toolbar-item-gap)}:host(${Ja}){outline: calc(${gr} * 1px) solid ${Od}}.positioning-region{align-items: flex-start;display: inline-flex;flex-flow: row wrap;justify-content: flex-start}:host([orientation="vertical"]) .positioning-region{flex-direction: column}::slotted(:not([slot])){flex: 0 0 auto;margin: 0 var(--toolbar-item-gap)}:host([orientation="vertical"]) ::slotted(:not([slot])){margin: var(--toolbar-item-gap) 0}.start, .end{display: flex;margin: auto;margin-inline: 0}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}`.withBehaviors(Ka(Me` :host(:${Ja}){box-shadow: 0 0 0 calc(${vr} * 1px) ${Ei.Highlight};color: ${Ei.ButtonText};forced-color-adjust: none}`));class lu extends Ma{connectedCallback(){super.connectedCallback();const e=to(this);e&&El.setValueFor(this,t=>bd.getValueFor(t).evaluate(t,El.getValueFor(e)))}}lu.compose({baseName:"toolbar",baseClass:Ma,template:La,styles:ru,shadowOptions:{delegatesFocus:!0}});const du=(e,t)=>{const i=e.tagFor(Hi);return Me` :host{contain: size;overflow: visible;height: 0;width: 0}.tooltip{box-sizing: border-box;border-radius: calc(${hr} * 1px);border: calc(${gr} * 1px) solid ${Cd};box-shadow: 0 0 0 1px ${Cd} inset;background: ${Jl};color: ${kd};padding: 4px;height: fit-content;width: fit-content;font-family: ${nr};font-size: ${br};line-height: ${yr};white-space: nowrap;/* TODO: a mechanism to manage z-index across components https://github.com/microsoft/fast/issues/3813 */ z-index: 10000}${i}{display: flex;justify-content: center;align-items: center;overflow: visible;flex-direction: row}${i}.right, ${i}.left{flex-direction: column}${i}.top .tooltip{margin-bottom: 4px}${i}.bottom .tooltip{margin-top: 4px}${i}.left .tooltip{margin-right: 4px}${i}.right .tooltip{margin-left: 4px}${i}.top.left .tooltip, ${i}.top.right .tooltip{margin-bottom: 0px}${i}.bottom.left .tooltip, ${i}.bottom.right .tooltip{margin-top: 0px}${i}.top.left .tooltip, ${i}.bottom.left .tooltip{margin-right: 0px}${i}.top.right .tooltip, ${i}.bottom.right .tooltip{margin-left: 0px}`.withBehaviors(Ka(Me` :host([disabled]){opacity: 1}`))};Va.compose({baseName:"tooltip",template:Sa,styles:du});const hu=Me` .expand-collapse-glyph{transform: rotate(0deg)}:host(.nested) .expand-collapse-button{left: var(--expand-collapse-button-nested-width, calc(${Fd} * -1px))}:host([selected])::after{left: calc(${vr} * 1px)}:host([expanded]) > .positioning-region .expand-collapse-glyph{transform: rotate(45deg)}`,uu=Me` .expand-collapse-glyph{transform: rotate(180deg)}:host(.nested) .expand-collapse-button{right: var(--expand-collapse-button-nested-width, calc(${Fd} * -1px))}:host([selected])::after{right: calc(${vr} * 1px)}:host([expanded]) > .positioning-region .expand-collapse-glyph{transform: rotate(135deg)}`,fu=Se`((${rr} / 2) * ${fr}) + ((${fr} * ${ur}) / 2)`,pu=yo.create("tree-item-expand-collapse-hover").withDefault(e=>{const t=rd.getValueFor(e);return t.evaluate(e,t.evaluate(e).hover).hover}),mu=yo.create("tree-item-expand-collapse-selected-hover").withDefault(e=>{const t=Xl.getValueFor(e);return rd.getValueFor(e).evaluate(e,t.evaluate(e).rest).hover}),gu=(e,t)=>Me` /** * This animation exists because when tree item children are conditionally loaded * there is a visual bug where the DOM exists but styles have not yet been applied (essentially FOUC). * This subtle animation provides a ever so slight timing adjustment for loading that solves the issue. */ @keyframes treeItemLoading{0%{opacity: 0}100%{opacity: 1}}${Xa("block")} :host{contain: content;position: relative;outline: none;color: ${kd};background: ${ld};cursor: pointer;font-family: ${nr};--expand-collapse-button-size: calc(${Fd} * 1px);--tree-item-nested-width: 0}:host(:focus) > .positioning-region{outline: none}:host(:focus) .content-region{outline: none}:host(:${Ja}) .positioning-region{border: ${Cd} calc(${gr} * 1px) solid;border-radius: calc(${hr} * 1px);color: ${kd}}.positioning-region{display: flex;position: relative;box-sizing: border-box;background: ${ld};border: transparent calc(${gr} * 1px) solid;height: calc((${Fd} + 1) * 1px)}.positioning-region::before{content: "";display: block;width: var(--tree-item-nested-width);flex-shrink: 0}:host(:not([disabled])) .positioning-region:hover{background: ${dd}}:host(:not([disabled])) .positioning-region:active{background: ${hd}}.content-region{display: inline-flex;align-items: center;white-space: nowrap;width: 100%;height: calc(${Fd} * 1px);margin-inline-start: calc(${fr} * 2px + 8px);font-size: ${br};line-height: ${yr};font-weight: 400}.items{/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ font-size: calc(1em + (${fr} + 16) * 1px)}.expand-collapse-button{background: none;border: none;outline: none;/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: calc((${fu} + (${fr} * 2)) * 1px);height: calc((${fu} + (${fr} * 2)) * 1px);padding: 0;display: flex;justify-content: center;align-items: center;cursor: pointer;margin-left: 6px;margin-right: 6px}.expand-collapse-glyph{/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px;transition: transform 0.1s linear;pointer-events: none;fill: currentcolor}.start, .end{display: flex;fill: currentcolor}::slotted(svg){/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px;height: 16px}.start{/* TODO: horizontalSpacing https://github.com/microsoft/fast/issues/2766 */ margin-inline-end: calc(${fr} * 2px + 2px)}.end{/* TODO: horizontalSpacing https://github.com/microsoft/fast/issues/2766 */ margin-inline-start: calc(${fr} * 2px + 2px)}:host([expanded]) > .items{animation: treeItemLoading ease-in 10ms;animation-iteration-count: 1;animation-fill-mode: forwards}:host([disabled]) .content-region{opacity: ${mr};cursor: ${Qa}}:host(.nested) .content-region{position: relative;margin-inline-start: var(--expand-collapse-button-size)}:host(.nested) .expand-collapse-button{position: absolute}:host(.nested:not([disabled])) .expand-collapse-button:hover{background: ${pu}}:host([selected]) .positioning-region{background: ${Jl}}:host([selected]:not([disabled])) .positioning-region:hover{background: ${ed}}:host([selected]:not([disabled])) .positioning-region:active{background: ${td}}:host([selected]:not([disabled])) .expand-collapse-button:hover{background: ${mu}}:host([selected])::after{/* The background needs to be calculated based on the selected background state for this control. We currently have no way of changing that, so setting to accent-foreground-rest for the time being */ background: ${Yl};border-radius: calc(${hr} * 1px);content: "";display: block;position: absolute;top: calc((${Fd} / 4) * 1px);width: 3px;height: calc((${Fd} / 2) * 1px)}::slotted(${e.tagFor(ja)}){--tree-item-nested-width: 1em;--expand-collapse-button-nested-width: calc(${Fd} * -1px)}`.withBehaviors(new Wd(hu,uu),Ka(Me` :host{forced-color-adjust: none;border-color: transparent;background: ${Ei.Field};color: ${Ei.FieldText}}:host .content-region .expand-collapse-glyph{fill: ${Ei.FieldText}}:host .positioning-region:hover, :host([selected]) .positioning-region{background: ${Ei.Highlight}}:host .positioning-region:hover .content-region, :host([selected]) .positioning-region .content-region{color: ${Ei.HighlightText}}:host .positioning-region:hover .content-region .expand-collapse-glyph, :host .positioning-region:hover .content-region .start, :host .positioning-region:hover .content-region .end, :host([selected]) .content-region .expand-collapse-glyph, :host([selected]) .content-region .start, :host([selected]) .content-region .end{fill: ${Ei.HighlightText}}:host([selected])::after{background: ${Ei.Field}}:host(:${Ja}) .positioning-region{border-color: ${Ei.FieldText};box-shadow: 0 0 0 2px inset ${Ei.Field};color: ${Ei.FieldText}}:host([disabled]) .content-region, :host([disabled]) .positioning-region:hover .content-region{opacity: 1;color: ${Ei.GrayText}}:host([disabled]) .content-region .expand-collapse-glyph, :host([disabled]) .content-region .start, :host([disabled]) .content-region .end, :host([disabled]) .positioning-region:hover .content-region .expand-collapse-glyph, :host([disabled]) .positioning-region:hover .content-region .start, :host([disabled]) .positioning-region:hover .content-region .end{fill: ${Ei.GrayText}}:host([disabled]) .positioning-region:hover{background: ${Ei.Field}}.expand-collapse-glyph, .start, .end{fill: ${Ei.FieldText}}:host(.nested) .expand-collapse-button:hover{background: ${Ei.Field}}:host(.nested) .expand-collapse-button:hover .expand-collapse-glyph{fill: ${Ei.FieldText}}`));ja.compose({baseName:"tree-item",template:Ba,styles:gu,expandCollapseGlyph:'\n <svg\n viewBox="0 0 16 16"\n xmlns="http://www.w3.org/2000/svg"\n class="expand-collapse-glyph"\n >\n <path\n d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"\n />\n </svg>\n '});const vu=(e,t)=>Me` ${Xa("flex")} :host{flex-direction: column;align-items: stretch;min-width: fit-content;font-size: 0}:host:focus-visible{outline: none}`;Ga.compose({baseName:"tree-view",template:qa,styles:vu});const bu=(e,t)=>Me` ${Dd()}`;class yu extends Ai{}const zu={delegatesFocus:!0,mode:"open"},Cu={};yu.compose(Object.assign({baseName:"accordion",template:en,styles:bu,shadowOptions:zu},Cu));const Lu=(e,t)=>st(0,t),xu=(e,t)=>Me` ${Hd()} slot[name='collapsed-icon']{display: flex;stroke: var(--accent-foreground-rest);fill: none}slot[name='expanded-icon']{display: none;stroke: var(--accent-foreground-rest);fill: none}`;class Mu extends Qt{}const wu={delegatesFocus:!0,mode:"open"},Su={collapsedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="collapsed-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M9 5.44446V12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>',expandedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="expanded-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="minus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>'};Mu.compose(Object.assign({baseName:"accordion-item",template:Lu,styles:xu,shadowOptions:wu},Su));const ku=(e,t)=>Me` :host{--actions-opener-height-multiplier: 0.7px;--actions-opener-bg-color: 249 254 255;--menu-item-height-multiplier: 0.7px}.actions-container{align-items: center;display: flex;height: 100%;justify-content: right}.actions-menu{display: none;position: absolute;max-width: 350px;overflow-y: auto;margin: 0}.actions-vertical .actions-menu{padding: calc(var(--design-unit) * 1px);max-height: 175px;z-index: 100}.actions-menu:not(.hidden):hover{display: inline-flex}.hidden{display: none}.visible{display: inline-flex}.actions-opener{align-self: center;display: flex;height: calc( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) * var(--actions-opener-height-multiplier) )}svg{width: 100%;height: 100%;fill: #879ba6}.actions-opener:hover svg{fill: #fff}foundation-menu-item{display: flex;user-select: none}foundation-menu-item::part(content){margin-inline: 10px}foundation-menu-item[disabled]{pointer-events: none}.menu-item{flex: 1;max-height: calc( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) * var(--menu-item-height-multiplier) );min-height: 0}.actions-vertical .menu-item{flex: 1 1 auto;justify-content: center;margin: calc(var(--design-unit) * 1px)}.actions-vertical .visible, .actions-vertical .actions-menu:not(.hidden):hover{display: flex;flex-direction: column}`;var Eu=function(e,t){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},Eu(e,t)};function $u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}Eu(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var Nu=function(){return Nu=Object.assign||function(e){for(var t,i=1,c=arguments.length;i<c;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Nu.apply(this,arguments)};function Au(e,t){var i={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&t.indexOf(c)<0&&(i[c]=e[c]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(c=Object.getOwnPropertySymbols(e);o<c.length;o++)t.indexOf(c[o])<0&&Object.prototype.propertyIsEnumerable.call(e,c[o])&&(i[c[o]]=e[c[o]])}return i}function Ou(e,t,i,c){var o,s=arguments.length,a=s<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,i):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,c);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}function Tu(e,t){return function(i,c){t(i,c,e)}}function Ru(e,t,i,c){return new(i||(i=Promise))(function(o,s){function a(e){try{r(c.next(e))}catch(e){s(e)}}function n(e){try{r(c.throw(e))}catch(e){s(e)}}function r(e){e.done?o(e.value):function(e){return e instanceof i?e:new i(function(t){t(e)})}(e.value).then(a,n)}r((c=c.apply(e,t||[])).next())})}function Iu(e,t){var i,c,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=n(0),a.throw=n(1),a.return=n(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function n(n){return function(r){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,n[0]&&(s=0)),s;)try{if(i=1,c&&(o=2&n[0]?c.return:n[0]?c.throw||((o=c.return)&&o.call(c),0):c.next)&&!(o=o.call(c,n[1])).done)return o;switch(c=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,c=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){s.label=n[1];break}if(6===n[0]&&s.label<o[1]){s.label=o[1],o=n;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(n);break}o[2]&&s.ops.pop(),s.trys.pop();continue}n=t.call(e,s)}catch(e){n=[6,e],c=0}finally{i=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,r])}}}function Du(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],c=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&c>=e.length&&(e=void 0),{value:e&&e[c++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Fu(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var c,o,s=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(c=s.next()).done;)a.push(c.value)}catch(e){o={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a}function Hu(e,t,i){if(i||2===arguments.length)for(var c,o=0,s=t.length;o<s;o++)!c&&o in t||(c||(c=Array.prototype.slice.call(t,0,o)),c[o]=t[o]);return e.concat(c||Array.prototype.slice.call(t))}function _u(e){return this instanceof _u?(this.v=e,this):new _u(e)}function Pu(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,o=i.apply(e,t||[]),s=[];return c=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,l)}}),c[Symbol.asyncIterator]=function(){return this},c;function a(e,t){o[e]&&(c[e]=function(t){return new Promise(function(i,c){s.push([e,t,i,c])>1||n(e,t)})},t&&(c[e]=t(c[e])))}function n(e,t){try{!function(e){e.value instanceof _u?Promise.resolve(e.value.v).then(r,l):d(s[0][2],e)}(o[e](t))}catch(e){d(s[0][3],e)}}function r(e){n("next",e)}function l(e){n("throw",e)}function d(e,t){e(t),s.shift(),s.length&&n(s[0][0],s[0][1])}}function Vu(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=Du(e),t={},c("next"),c("throw"),c("return"),t[Symbol.asyncIterator]=function(){return this},t);function c(i){t[i]=e[i]&&function(t){return new Promise(function(c,o){(function(e,t,i,c){Promise.resolve(c).then(function(t){e({value:t,done:i})},t)})(c,o,(t=e[i](t)).done,t.value)})}}}function Bu(e,t,i,c){if("a"===i&&!c)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!c:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?c:"a"===i?c.call(e):c?c.value:t.get(e)}function Uu(e,t,i,c,o){if("m"===c)throw new TypeError("Private method is not writable");if("a"===c&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===c?o.call(e,i):o?o.value=i:t.set(e,i),i}"function"==typeof SuppressedError&&SuppressedError;const ju={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},qu={silent:{level:-1},fatal:{level:ju.fatal},error:{level:ju.error},warn:{level:ju.warn},log:{level:ju.log},info:{level:ju.info},success:{level:ju.success},fail:{level:ju.fail},ready:{level:ju.info},start:{level:ju.info},box:{level:ju.info},debug:{level:ju.debug},trace:{level:ju.trace},verbose:{level:ju.verbose}};function Gu(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&(!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e)))}function Wu(e,t,i=".",c){if(!Gu(t))return Wu(e,{},i,c);const o=Object.assign({},t);for(const t in e){if("__proto__"===t||"constructor"===t)continue;const s=e[t];null!=s&&(c&&c(o,t,s,i)||(Array.isArray(s)&&Array.isArray(o[t])?o[t]=[...s,...o[t]]:Gu(s)&&Gu(o[t])?o[t]=Wu(s,o[t],(i?`${i}.`:"")+t.toString(),c):o[t]=s))}return o}const Yu=(...e)=>e.reduce((e,t)=>Wu(e,t,"",Ku),{});var Ku;function Zu(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let Qu=!1;const Xu=[];class Ju{options;_lastLog;_mockFn;constructor(e={}){const t=e.types||qu;this.options=Yu({...e,defaults:{...e.defaults},level:ef(e.level,t),reporters:[...e.reporters||[]]},{types:qu,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const e in t){const i={type:e,...this.options.defaults,...t[e]};this[e]=this._wrapLogFn(i),this[e].raw=this._wrapLogFn(i,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=ef(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,t)}create(e){const t=new Ju({...this.options,...e});return this._mockFn&&t.mockTypes(this._mockFn),t}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){const t=this.options.reporters.indexOf(e);if(-1!==t)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this.options.types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this.options.types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){Qu=!0}resumeLogs(){Qu=!1;const e=Xu.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){const t=e||this.options.mockFn;if(this._mockFn=t,"function"==typeof t)for(const e in this.options.types)this[e]=t(e,this.options.types[e])||this[e],this[e].raw=this[e]}_wrapLogFn(e,t){return(...i)=>{if(!Qu)return this._logFn(e,i,t);Xu.push([this,e,i,t])}}_logFn(e,t,i){if((e.level||0)>this.level)return!1;const c={date:new Date,args:[],...e,level:ef(e.level,this.options.types)};!i&&1===t.length&&Zu(t[0])?Object.assign(c,t[0]):c.args=[...t],c.message&&(c.args.unshift(c.message),delete c.message),c.additional&&(Array.isArray(c.additional)||(c.additional=c.additional.split("\n")),c.args.push("\n"+c.additional.join("\n")),delete c.additional),c.type="string"==typeof c.type?c.type.toLowerCase():"log",c.tag="string"==typeof c.tag?c.tag:"";const o=(e=!1)=>{const t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){const e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=c,this._log(c))};clearTimeout(this._lastLog.timeout);const s=this._lastLog.time&&c.date?c.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=c.date,s<this.options.throttle)try{const e=JSON.stringify([c.type,c.tag,c.args]),t=this._lastLog.serialized===e;if(this._lastLog.serialized=e,t&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin))return void(this._lastLog.timeout=setTimeout(o,this.options.throttle))}catch{}o(!0)}_log(e){for(const t of this.options.reporters)t.log(e,{options:this.options})}}function ef(e,t={},i=3){return void 0===e?i:"number"==typeof e?e:t[e]&&void 0!==t[e].level?t[e].level:i}function tf(e={}){return new Ju(e)}Ju.prototype.add=Ju.prototype.addReporter,Ju.prototype.remove=Ju.prototype.removeReporter,Ju.prototype.clear=Ju.prototype.removeReporter,Ju.prototype.withScope=Ju.prototype.withTag,Ju.prototype.mock=Ju.prototype.mockTypes,Ju.prototype.pause=Ju.prototype.pauseLogs,Ju.prototype.resume=Ju.prototype.resumeLogs;class cf{options;defaultColor;levelColorMap;typeColorMap;constructor(e){this.options={...e},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(e){return e<1?console.__error||console.error:1===e?console.__warn||console.warn:console.__log||console.log}log(e){const t=this._getLogFn(e.level),i="log"===e.type?"":e.type,c=e.tag||"",o=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,s=`%c${[c,i].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${s}%c ${e.args[0]}`,o,"",...e.args.slice(1)):t(s,o,...e.args)}}function of(e={}){return tf({reporters:e.reporters||[new cf({})],prompt:(e,t={})=>"confirm"===t.type?Promise.resolve(confirm(e)):Promise.resolve(prompt(e)),...e})}of();const sf={level:ju.debug};function af(e,t=sf){const i=("undefined"!=typeof window?of:tf)().withTag(e);void 0!==(null==t?void 0:t.level)&&(i.level=t.level);const c=i;return c.deprecated=(e,t="Consult docs for better alternative.",i)=>{c.warn(`Deprecated symbol used '${e}'. ${t}`,""+(i?`Will be removed in version ${i}.`:""))},c}const nf=af("foundation-comms"),rf=new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)\b\/*$/,"i");var lf;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(lf||(lf={}));class df{trackEvent(e,t){nf.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const hf=mt.createInterface(e=>e.singleton(df));class uf extends BroadcastChannel{constructor(){super(...arguments),this.postMessage=(...e)=>{const[t,i]=e;super.postMessage({type:t,detail:i})},this.isMessageType=(e,t)=>{var i;return(null===(i=t.data)||void 0===i?void 0:i.type)===e}}}const ff=e=>{class t extends uf{constructor(){super(e)}}return mt.createInterface(e=>e.transient(t))};af("foundation-broadcast-channel");const pf=af("foundation-user"),mf={trackActionExclusions:[],trackPathExclusions:[""],setUser(e,t){if(e.isAuthenticated)throw new Error("User already set. If this is intentional, please call User.unset first.");return pf.debug("setUser",t),e.rawProperties=structuredClone(t),e.userKVs=t.userKVs,e.details=t.details,e.permission=t.permission,e.profile=t.profile,e.sourceRef=t.sourceRef,e.userName=t.userName,e.isAuthenticated=!0,e},unsetUser:e=>(pf.debug("unsetUser"),e.rawProperties=void 0,e.userKVs=void 0,e.details=void 0,e.permission=void 0,e.profile=void 0,e.sourceRef=void 0,e.userName=void 0,e.isAuthenticated=!1,e)},gf=mt.createInterface(e=>e.instance(mf)),vf=ff("genesis-user");const bf=()=>{let e=[];return{subscribe:t=>(e.push(t),()=>e=e.filter(e=>e!==t)),publish(t){e.forEach(e=>e(t))}}},yf=af("foundation-utils");function zf(e){const t=[],i=new Set;return function e(c){const o=Array.from(c.querySelectorAll("*"));t.push(...o),o.forEach(t=>{t.shadowRoot&&!i.has(t.shadowRoot)&&(i.add(t.shadowRoot),e(t.shadowRoot))})}(e),t}function Cf(e,t){let i=e;for(;i;){const e=i.tagName.toLowerCase();if(e.endsWith("-design-system-provider")){const t=e.split("-design-system-provider")[0];if(t)return yf.debug(`Found provider by ancestor search: ${e}, prefix: ${t}`),{element:i,prefix:t}}i=i.parentElement?i.parentElement:i.getRootNode&&i.getRootNode()instanceof ShadowRoot?i.getRootNode().host:null}const c=document.querySelectorAll('[class*="-design-system-provider"],[id*="-design-system-provider"]'),o=Array.from(c),s=zf(document).filter(e=>{var t;const i=null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase();return(null==i?void 0:i.endsWith("-design-system-provider"))||!1});if(o.push(...s),o.length>0){const e=o[0],t=e.tagName.toLowerCase(),i=t.split("-design-system-provider")[0];if(i)return yf.debug(`Found provider by document search: ${t}, prefix: ${i}`),{element:e,prefix:i}}return yf.debug(`No provider found. Falling back to ${t}.`),{element:null,prefix:t}}const Lf=["text-field","text-area","combobox"],xf=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Mf=e=>Lf.map(t=>`${e}-${t}`),wf={rapid:Mf("rapid"),zero:Mf("zero")};function Sf(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=wf[e])&&void 0!==t?t:[]}),c=t.filter(Boolean);return Array.from(new Set([...xf,...i,...c])).join(",")}const kf=new Map([["FAST-TEXT-AREA","input"],["FAST-TEXT-FIELD","input"],["FOUNDATION-TEXT-AREA","input"],["FOUNDATION-TEXT-FIELD","input"],["INPUT","input"],["ZERO-TEXT-FIELD","input"]]);function Ef(e){this.keyAttr||(this.target[this.targetName]=e)}function $f(e,t){this.keyAttr&&(this.updateTarget=Ef),this.originalBind.call(this,e,t),this.target.addEventListener(this.changeEvent,this.changeHandler)}function Nf(){this.originalUnbind.call(this),this.target.removeEventListener(this.changeEvent,this.changeHandler)}class Af extends D{constructor(e,t,i,c){super(e),this.keyAttr=c,this.conversionType=t,this.eventName=i}createBehavior(e){const t=super.createBehavior(e);return t.originalBind=t.bind,t.originalUnbind=t.unbind,t.keyAttr=this.keyAttr,t.bind=$f,t.unbind=Nf,t.changeEvent=function(e,t){var i;const c=e.tagName;return"default"===t?null!==(i=kf.get(c))&&void 0!==i?i:"change":t}(e,this.eventName),t.changeHandler=()=>{const e="boolean"===this.conversionType?t.target.checked:t.target.value;if(this.keyAttr){const i=t.bindingObserver.last,c=t.target[this.keyAttr];i.propertySource[i.propertyName][c]=this.convert(e)}else{const i=t.bindingObserver.last;i.propertySource[i.propertyName]=this.convert(e)}},t}convert(e){if(null==e)return e;switch(this.conversionType){case"time":const t=new Date(e).getTime();return isNaN(t)?void 0:t;case"number":return e.length?Number(e):void 0;case"string":return String(e);case"boolean":return Boolean(e);default:return e}}}function Of(e,t="string",i="default",c){return new Af(e,t,i,c)}function Tf(e,t,i){const c=e=>"function"==typeof e?e:()=>e,o=c(t),s=c(i);return(t,i)=>e(t,i)?o(t,i):s(t,i)}const Rf=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,If=e=>{const t=e.split(":");let i,c;2===t.length?[i,c]=t:c=e;const o=(e=>{if(Rf.test(e)){const t=atob(e),i=new Uint8Array(t.length);return[...t].forEach((e,c)=>{i[c]=t.charCodeAt(c)}),i.buffer}return e})(c);if("str"===i){return new TextDecoder("utf-8").decode(o)}return o},Df=e=>{const t=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const t=new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),"");return btoa(t)}return""})(e);return"string"==typeof e?`str:${t}`:e instanceof ArrayBuffer?`bin:${t}`:""},Ff=e=>((e,t)=>{if(!t)return!1;const i=`feature.${t}`.toLowerCase(),c=new URLSearchParams(e);for(const[e]of c.entries())if(e.toLowerCase()===i)return!0;return!1})(window.location.search,e);let Hf="webpack";try{"undefined"!=typeof BUILDER&&(Hf=BUILDER)}catch(dC){}let _f="/";try{"undefined"!=typeof PUBLIC_PATH&&(_f=PUBLIC_PATH.replace(/\/$/,""))}catch(e){}let Pf,Vf,Bf="gwf";try{"undefined"!=typeof SOCKET_EXT&&(Bf=SOCKET_EXT)}catch(e){}try{Pf=FORCE_HTTP}catch(e){}try{Vf=FORCE_HTTP_REQREP}catch(e){}const Uf=`${location.protocol.replace("http","ws")}//${location.host}${_f}/${Bf}/`;let jf,qf,Gf,Wf,Yf=`${"true"===Pf||Ff("forceHttp")?location.protocol:location.protocol.replace("http","ws")}//${location.host}/${Bf}/`;try{"undefined"!=typeof API_HOST&&(Yf=API_HOST)}catch(e){}try{jf=HTTP_CONFIG}catch(e){}try{qf=DEFAULT_ORGANISATION}catch(e){}try{Gf=DEFAULT_PASSWORD}catch(e){}try{Wf=DEFAULT_USER}catch(e){}let Kf="gwf/event-login-auth";"undefined"!=typeof GENX_LOGIN_URL&&(Kf=GENX_LOGIN_URL),"undefined"!=typeof GENX_LOGIN_REFRESH_URL&&GENX_LOGIN_REFRESH_URL;let Zf="gwf/event-login-details";"undefined"!=typeof GENX_LOGIN_DETAILS_URL&&(Zf=GENX_LOGIN_DETAILS_URL),"undefined"!=typeof GENX_LOGOUT_URL&&GENX_LOGOUT_URL,"undefined"!=typeof GENX_CHANGE_PASSWORD_URL&&GENX_CHANGE_PASSWORD_URL,"undefined"!=typeof GENX_FORGOT_PASSWORD_URL&&GENX_FORGOT_PASSWORD_URL,"undefined"!=typeof GENX_RESET_PASSWORD_URL&&GENX_RESET_PASSWORD_URL,"undefined"!=typeof GENX_SSO_LIST_URL&&GENX_SSO_LIST_URL,"undefined"!=typeof GENX_SSO_LOGIN_URL&&GENX_SSO_LOGIN_URL;let Qf="default";"undefined"!=typeof GENX_ENVIRONMENT_LEVEL&&(Qf=GENX_ENVIRONMENT_LEVEL),"undefined"!=typeof GENX_ACCEPT_TERMS_URL&&GENX_ACCEPT_TERMS_URL;class Xf{constructor(e){this.logger=e,this.map=new Map}set(e,t){this.logger(e,t),this.lastError=t,this.map=new Map(this.map.set(e,t))}get(e){return this.map.get(e)}has(e){return this.map.has(e)}delete(e){const t=this.map.get(e)===this.lastError,i=this.map.delete(e);return i&&(this.map=new Map(this.map),t&&(this.lastError=void 0)),i}clear(){this.lastError=void 0,this.map=new Map}get size(){return this.map.size}values(){return this.map.values()}get messages(){const e=this.size;if(!e)return"";const t=[];for(const{message:e}of this.map.values())t.push(e);return`${e} Error${e>1?"s":""} Occurred:\n${t.join("\n")}`}}Ou([b],Xf.prototype,"map",void 0),Ou([b],Xf.prototype,"lastError",void 0);function Jf(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,19).replace("T"," ")}function ep(e,t){return t?Jf(e):function(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,10)}(e)}const tp={k:1e3,m:1e6,b:1e9},ip=/^(.*?)([kmb])$/i;class cp{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),c=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>c.get(e)}parse(e){const t=e.trim().match(ip),i=t?tp[t[2].toLowerCase()]:1;return(e=(t?t[1]:e).trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e*i:NaN}hasSeparator(e){return this._separator.test(e)}}var op="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function sp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ap,np={exports:{}},rp=np.exports;
|
|
36
36
|
/*! @preserve
|
|
37
37
|
* numeral.js
|
|
38
38
|
* version : 2.0.6
|
|
@@ -54,7 +54,7 @@ function _d(e,t,i,c){var o,s=arguments.length,a=s<3?t:null===c?c=Object.getOwnPr
|
|
|
54
54
|
Continue Session </${e}-button><${e}-button appearance="outline" @click=${e=>e.handleLogout()}class="logout-button">
|
|
55
55
|
Logout Now </${e}-button></div></div></${e}-card></div>`)(Cf(e,"rapid").prefix)} `,styles:Me` .inactivity-overlay{position: fixed;inset: 0;width: 100vw;height: 100vh;background-color: rgba(0, 0, 0, 0.6);display: flex;align-items: center;justify-content: center;z-index: 9999;backdrop-filter: blur(2px)}.dialog-card{height: 260px;max-height: 260px;max-width: 520px;width: 92%}.card-body{padding: 24px;box-sizing: border-box}.dialog-header{display: flex;align-items: center;gap: 12px;margin-bottom: 16px}.warning-icon{color: var(--accent-fill-rest);font-size: 24px}.dialog-header h2{margin: 0;color: var(--neutral-foreground-rest);font-size: 20px;font-weight: 600}.dialog-content{margin-bottom: 24px}.dialog-content p{margin: 0 0 12px 0;color: var(--neutral-foreground-rest);line-height: 1.5}.dialog-content p:last-child{margin-bottom: 0}.dialog-content strong{color: var(--accent-foreground-rest);font-weight: 600}.dialog-actions{display: flex;gap: 12px;justify-content: flex-end}.continue-button{min-width: 140px}.logout-button{min-width: 120px}@media (max-width: 480px){.card-body{padding: 20px}.dialog-actions{flex-direction: column}.continue-button, .logout-button{width: 100%}}`})],eb);class tb{constructor(){this.pathHistory=[],this.actionHistory=[],this.isAuthenticated=!1,this.authenticationChangeListeners=bf()}set(e){return this.config.setUser(this,e)}unset(){return this.config.unsetUser(this)}get isAnonymous(){return!this.isAuthenticated}isAdmin(){return this.hasProfile("ADMIN")}isBanned(){return this.hasProfile("BANNED")}hasPermission(e){return this.hasKey(this.permission,e)}hasProfile(e){return this.hasKey(this.profile,e)}trackPath(){const{pathname:e,search:t,hash:i}=location,c=`${`${"/"!==e?e:""}`}${t}${i}`;if(!this.config.trackPathExclusions.includes(c))return this.pathHistory.push(c),c}clearPaths(){this.pathHistory=[]}lastPath(){const e=this.pathHistory.length;return e>0?this.pathHistory[e-1]:void 0}trackAction(e){this.config.trackActionExclusions.includes(e)||this.actionHistory.push(e)}clearActions(){this.actionHistory=[]}lastAction(){const e=this.actionHistory.length;return e>0?this.actionHistory[e-1]:void 0}clearTrackingHistory(){this.clearPaths(),this.clearActions()}hasKey(e,t){return!!(e&&e.length&&t)&&(Array.isArray(t)||(t=[t]),t.some(t=>e.includes(t)))}addAuthenticationChangeListener(e){var t;return null===(t=this.authenticationChangeListeners)||void 0===t?void 0:t.subscribe(e)}isAuthenticatedChanged(){var e;null===(e=this.authenticationChangeListeners)||void 0===e||e.publish(new CustomEvent("user-authentication-change",{detail:this.isAuthenticated}));const t=mt.getOrCreateDOMContainer().get(vf);t.postMessage("user-authentication-change",this.isAuthenticated),t.close()}userNameChanged(){v.notify(this,"username")}get username(){return v.track(this,"username"),this.userName}permissionChanged(){v.notify(this,"permissions")}get permissions(){return v.track(this,"permissions"),this.permission}profileChanged(){v.notify(this,"profiles")}get profiles(){return v.track(this,"profiles"),this.profile}hasAdminProfile(){return this.isAdmin()}}Ou([gf],tb.prototype,"config",void 0),Ou([b],tb.prototype,"pathHistory",void 0),Ou([b],tb.prototype,"actionHistory",void 0),Ou([b],tb.prototype,"isAuthenticated",void 0),Ou([b],tb.prototype,"userKVs",void 0),Ou([b],tb.prototype,"details",void 0),Ou([b],tb.prototype,"permission",void 0),Ou([b],tb.prototype,"profile",void 0),Ou([b],tb.prototype,"sourceRef",void 0),Ou([b],tb.prototype,"userName",void 0),Ou([b],tb.prototype,"rawProperties",void 0);const ib=mt.createInterface(e=>e.singleton(tb));class cb{constructor(){this.cachedMetadata=new Map,this.cachedJsonSchema=new Map,this.cachedResources=null,this.cachedRequests=new Map}getMetadataFor(e){return this.cachedMetadata.get(e)}getJsonSchemaFor(e){return this.cachedJsonSchema.get(e)}getResources(){return this.cachedResources}hasMetadataFor(e){return this.cachedMetadata.has(e)}hasJsonSchemaFor(e){return this.cachedJsonSchema.has(e)}hasResources(){return null!==this.cachedResources}setMetadataFor(e,t){this.cachedMetadata.set(e,t)}setJsonSchemaFor(e,t){this.cachedJsonSchema.set(e,t)}setResources(e){this.cachedResources=e}getRequestFor(e){return this.cachedRequests.get(e)}hasRequestFor(e){return this.cachedRequests.has(e)}setRequestFor(e,t){this.cachedRequests.set(e,t)}}const ob=mt.createInterface(e=>e.singleton(cb));var sb;!function(e){e.STRING="STRING",e.NUMBER="NUMBER",e.BOOLEAN="BOOLEAN",e.ENUM="ENUM",e.DATE="DATE",e.DATETIME="DATETIME",e.CUSTOM="CUSTOM",e.NANO_TIMESTAMP="NANO_TIMESTAMP"}(sb||(sb={}));const ab={STRING:sb.STRING,ENUM:sb.ENUM,BOOLEAN:sb.BOOLEAN,INT:sb.NUMBER,LONG:sb.NUMBER,DOUBLE:sb.NUMBER,BIGDECIMAL:sb.NUMBER,DATE:sb.DATE,DATETIME:sb.DATETIME,NANO_TIMESTAMP:sb.NANO_TIMESTAMP};var nb;!function(e){e.DATASERVER="DATASERVER",e.EVENT_HANDLER="EVENT_HANDLER",e.REQUEST_SERVER="REQUEST_SERVER"}(nb||(nb={}));const rb="datasource-status-changed",lb=e=>e?e.map(e=>{const t={name:e.NAME,type:ab[e.TYPE]||sb.STRING};if(e.TYPE===sb.ENUM&&e.VALID_VALUES)try{t.enumOptions=Array.isArray(e.VALID_VALUES)?e.VALID_VALUES:e.VALID_VALUES.split("|")}catch(e){nf.error(e),t.enumOptions=[]}return t}):null,db=e=>{var t;const i=null==e?void 0:e.TYPE;if(i===nb.DATASERVER)return e.FIELD||[];if(i===nb.REQUEST_SERVER)return e.REPLY_FIELD||(null===(t=e.REPLY)||void 0===t?void 0:t.FIELD)||[];throw new Error(`Unsupported resource type: ${i}`)};class hb{constructor(){this.streamListeners=bf(),this.streamCompleteListeners=bf(),this.streamErrorListeners=bf(),this.commitListeners=bf(),this.metadataListeners=bf(),this.commitResponseListeners=bf()}addStreamListener(e,t,i){var c,o,s;const a=null===(c=this.streamListeners)||void 0===c?void 0:c.subscribe(e),n=null===(o=this.streamCompleteListeners)||void 0===o?void 0:o.subscribe(t),r=null===(s=this.streamErrorListeners)||void 0===s?void 0:s.subscribe(i);return()=>{a(),n(),r()}}onStreamEvent(e,t,i,c){var o;null===(o=this.streamListeners)||void 0===o||o.publish(new CustomEvent("connect-stream-event",{detail:{functions:c,message:t,resourceName:e,stream:i}}))}onStreamErrorEvent(e,t,i){var c;null===(c=this.streamErrorListeners)||void 0===c||c.publish(new CustomEvent("connect-stream-error-event",{detail:{resourceName:e,stream:t,error:i}}))}onStreamCompleteEvent(e,t){var i;null===(i=this.streamCompleteListeners)||void 0===i||i.publish(new CustomEvent("connect-stream-complete-event",{detail:{resourceName:e,stream:t}}))}addCommitListener(e){var t;return null===(t=this.commitListeners)||void 0===t?void 0:t.subscribe(e)}onCommitEvent(e,t){var i;null===(i=this.commitListeners)||void 0===i||i.publish(new CustomEvent("connect-commit-event",{detail:{eventName:e,message:t}}))}addMetadataListener(e){var t;return null===(t=this.metadataListeners)||void 0===t?void 0:t.subscribe(e)}onMetadataEvent(e,t,i){var c;null===(c=this.metadataListeners)||void 0===c||c.publish(new CustomEvent("connect-metadata-event",{detail:{resourceName:e,message:t,error:i}}))}addCommitResponseListener(e){var t;return null===(t=this.commitResponseListeners)||void 0===t?void 0:t.subscribe(e)}onCommitResponseEvent(e,t){var i;null===(i=this.commitResponseListeners)||void 0===i||i.publish(new CustomEvent("connect-commit-response-event",{detail:{eventName:e,response:t}}))}}const ub=mt.createInterface(e=>e.singleton(hb)),fb=mt.createInterface(e=>e.aliasTo(ub)),pb={connect:{alwaysOn:!1,enableHeartbeat:!0,enableHeartbeatLogging:!1,heartbeatInterval:1e4,verboseHeartbeat:!1,enableMessageLogging:!1},reconnect:{reconnectAttempts:10,reconnectInterval:1e4,reconnectStreams:!0},isWebSocketExpression:rf},mb=mt.createInterface(e=>e.instance(pb));var gb={ACCEPTED:202,BAD_GATEWAY:502,BAD_REQUEST:400,CONFLICT:409,CONTINUE:100,CREATED:201,EXPECTATION_FAILED:417,FORBIDDEN:403,GATEWAY_TIMEOUT:504,GONE:410,HTTP_VERSION_NOT_SUPPORTED:505,IM_A_TEAPOT:418,INSUFFICIENT_SPACE_ON_RESOURCE:419,INSUFFICIENT_STORAGE:507,INTERNAL_SERVER_ERROR:500,LENGTH_REQUIRED:411,LOCKED:423,METHOD_FAILURE:420,METHOD_NOT_ALLOWED:405,MOVED_PERMANENTLY:301,MOVED_TEMPORARILY:302,MULTI_STATUS:207,MULTIPLE_CHOICES:300,NETWORK_AUTHENTICATION_REQUIRED:511,NO_CONTENT:204,NON_AUTHORITATIVE_INFORMATION:203,NOT_ACCEPTABLE:406,NOT_FOUND:404,NOT_IMPLEMENTED:501,NOT_MODIFIED:304,OK:200,PARTIAL_CONTENT:206,PAYMENT_REQUIRED:402,PERMANENT_REDIRECT:308,PRECONDITION_FAILED:412,PRECONDITION_REQUIRED:428,PROCESSING:102,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_HEADER_FIELDS_TOO_LARGE:431,REQUEST_TIMEOUT:408,REQUEST_TOO_LONG:413,REQUEST_URI_TOO_LONG:414,REQUESTED_RANGE_NOT_SATISFIABLE:416,RESET_CONTENT:205,SEE_OTHER:303,SERVICE_UNAVAILABLE:503,SWITCHING_PROTOCOLS:101,TEMPORARY_REDIRECT:307,TOO_MANY_REQUESTS:429,UNAUTHORIZED:401,UNPROCESSABLE_ENTITY:422,UNSUPPORTED_MEDIA_TYPE:415,USE_PROXY:305},vb={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",103:"Early Hints",426:"Upgrade Required",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"},bb={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Early Hints":103,"Upgrade Required":426,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421};var yb,zb,Cb=function(e){var t=vb[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t};!function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.EARLY_HINTS=103]="EARLY_HINTS",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"}(yb||(yb={})),function(e){e.ACCEPTED="Accepted",e.BAD_GATEWAY="Bad Gateway",e.BAD_REQUEST="Bad Request",e.CONFLICT="Conflict",e.CONTINUE="Continue",e.CREATED="Created",e.EXPECTATION_FAILED="Expectation Failed",e.FAILED_DEPENDENCY="Failed Dependency",e.FORBIDDEN="Forbidden",e.GATEWAY_TIMEOUT="Gateway Timeout",e.GONE="Gone",e.HTTP_VERSION_NOT_SUPPORTED="HTTP Version Not Supported",e.IM_A_TEAPOT="I'm a teapot",e.INSUFFICIENT_SPACE_ON_RESOURCE="Insufficient Space on Resource",e.INSUFFICIENT_STORAGE="Insufficient Storage",e.INTERNAL_SERVER_ERROR="Internal Server Error",e.LENGTH_REQUIRED="Length Required",e.LOCKED="Locked",e.METHOD_FAILURE="Method Failure",e.METHOD_NOT_ALLOWED="Method Not Allowed",e.MOVED_PERMANENTLY="Moved Permanently",e.MOVED_TEMPORARILY="Moved Temporarily",e.MULTI_STATUS="Multi-Status",e.MULTIPLE_CHOICES="Multiple Choices",e.NETWORK_AUTHENTICATION_REQUIRED="Network Authentication Required",e.NO_CONTENT="No Content",e.NON_AUTHORITATIVE_INFORMATION="Non Authoritative Information",e.NOT_ACCEPTABLE="Not Acceptable",e.NOT_FOUND="Not Found",e.NOT_IMPLEMENTED="Not Implemented",e.NOT_MODIFIED="Not Modified",e.OK="OK",e.PARTIAL_CONTENT="Partial Content",e.PAYMENT_REQUIRED="Payment Required",e.PERMANENT_REDIRECT="Permanent Redirect",e.PRECONDITION_FAILED="Precondition Failed",e.PRECONDITION_REQUIRED="Precondition Required",e.PROCESSING="Processing",e.EARLY_HINTS="Early Hints",e.UPGRADE_REQUIRED="Upgrade Required",e.PROXY_AUTHENTICATION_REQUIRED="Proxy Authentication Required",e.REQUEST_HEADER_FIELDS_TOO_LARGE="Request Header Fields Too Large",e.REQUEST_TIMEOUT="Request Timeout",e.REQUEST_TOO_LONG="Request Entity Too Large",e.REQUEST_URI_TOO_LONG="Request-URI Too Long",e.REQUESTED_RANGE_NOT_SATISFIABLE="Requested Range Not Satisfiable",e.RESET_CONTENT="Reset Content",e.SEE_OTHER="See Other",e.SERVICE_UNAVAILABLE="Service Unavailable",e.SWITCHING_PROTOCOLS="Switching Protocols",e.TEMPORARY_REDIRECT="Temporary Redirect",e.TOO_MANY_REQUESTS="Too Many Requests",e.UNAUTHORIZED="Unauthorized",e.UNAVAILABLE_FOR_LEGAL_REASONS="Unavailable For Legal Reasons",e.UNPROCESSABLE_ENTITY="Unprocessable Entity",e.UNSUPPORTED_MEDIA_TYPE="Unsupported Media Type",e.USE_PROXY="Use Proxy",e.MISDIRECTED_REQUEST="Misdirected Request"}(zb||(zb={}));var Lb=this&&this.__assign||function(){return Lb=Object.assign||function(e){for(var t,i=1,c=arguments.length;i<c;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Lb.apply(this,arguments)};Lb(Lb({},gb),{getStatusCode:function(e){var t=bb[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t},getStatusText:Cb});class xb{constructor(){this.storageKeyPrefix="",this.returnUrl=this.getSessionStorageItem("returnUrl")||""}deleteUserFromSessionStorage(){["authToken","refreshToken","sessionId","ssoToken"].forEach(e=>this.removeSessionStorageItem(e)),this.removeLocalStorageItem("refreshToken")}setStorageKeyPrefix(e){this.storageKeyPrefix=`${e.replace(/\s/g,"")}/`}setAuthResult(e){var t;this.setSessionStorageItem("authToken",e.SESSION_AUTH_TOKEN),this.setSessionStorageItem("refreshToken",e.REFRESH_AUTH_TOKEN),this.setSessionStorageItem("username",e.USER_NAME),this.setSessionStorageItem("sessionId",e.SESSION_ID),(null===(t=e.DETAILS)||void 0===t?void 0:t.MFA_CODE)&&this.setSessionStorageItem("mfaToken",e.DETAILS.MFA_CODE)}captureReturnUrl(){const{pathname:e,search:t,hash:i}=location;if(e&&(e.includes("/login")||e.includes("/auth")))return;const c=`${"/"!==e?e:""}`;this.returnUrl=`${c}${t}${i}`,this.setSessionStorageItem("returnUrl",this.returnUrl)}setItem(e,t,i){"local"===i?localStorage.setItem(this.storageKeyPrefix+e,t):sessionStorage.setItem(this.storageKeyPrefix+e,t)}getItem(e,t){return"local"===t?localStorage.getItem(this.storageKeyPrefix+e):sessionStorage.getItem(this.storageKeyPrefix+e)}removeItem(e,t){"local"===t?localStorage.removeItem(this.storageKeyPrefix+e):sessionStorage.removeItem(this.storageKeyPrefix+e)}setLocalStorageItem(e,t){this.setItem(e,t,"local")}setSessionStorageItem(e,t){this.setItem(e,t,"session")}getLocalStorageItem(e){return this.getItem(e,"local")}getSessionStorageItem(e){return this.getItem(e,"session")}removeLocalStorageItem(e){this.removeItem(e,"local")}removeSessionStorageItem(e){this.removeItem(e,"session")}}const Mb=mt.createInterface(e=>e.singleton(xb));let wb=class{constructor(e){this.serializer=e}get(e,t){return Ru(this,void 0,void 0,function*(){const i=yield fetch(e,Object.assign(Object.assign({credentials:"include",headers:{"Content-type":"application/json; charset=UTF-8"}},t),{method:"GET"}));return this.handleResponse(i,t)})}post(e,t){return Ru(this,void 0,void 0,function*(){const i=yield fetch(e,Object.assign(Object.assign({credentials:"include",headers:{"Content-type":"application/json; charset=UTF-8"}},t),{method:"POST"}));return this.handleResponse(i,t)})}handleResponse(e,t){return Ru(this,void 0,void 0,function*(){var i;if(e.redirected)return window.location.href=e.url,new Promise(()=>{});if(null===(i=t.onResponse)||void 0===i||i.call(t,e),304===e.status)return;if(!e.ok)throw function(e){const t=new Error(`HTTP error: ${e.status} ${e.statusText}`);return t.status=e.status,t.message=e.statusText,t}(e);return(t.serializer||this.serializer).deserialize(e)})}};wb=Ou([Tu(0,xm)],wb);const Sb=mt.createInterface(e=>e.singleton(wb)),kb={polling:Object.assign({POLLING_MAP:{EVENT_AMEND_USER:{TEMP_FREQUENCY:500,AMOUNT_OF_POLLS:5,QUERIES:["ALL_USERS"]}},POLLING_INTERVAL_MAP:{ALL_TRADES:5e3,ALL_USERS:5e3,ALL_PROCESSES_STATUS:1e4},POLLING_FREQUENCY:5e3},jf&&jf.length?JSON.parse(jf):{})},Eb=mt.createInterface(e=>e.instance(kb));var $b,Nb,Ab,Ob;!function(e){e.BASIC="BASIC",e.SSO="SSO",e.JWT="JWT",e.REFRESH="REFRESH"}($b||($b={}));class Tb extends Error{constructor(e,t,i="Auth Failed \n"){super(i),this.sent=e,this.received=t,Object.setPrototypeOf(this,Tb.prototype)}isIgnorableError(){var e,t,i,c,o,s,a,n;return!!(null===(c=null===(i=null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)||void 0===i?void 0:i.toLowerCase())||void 0===c?void 0:c.includes("request needs the user to be logged"))||!!(null===(n=null===(a=null===(s=null===(o=this.received)||void 0===o?void 0:o.DETAILS)||void 0===s?void 0:s.ERROR)||void 0===a?void 0:a.toLowerCase())||void 0===n?void 0:n.includes("is not logged in"))}getMessageError(){var e,t;return Array.isArray(null===(e=this.received)||void 0===e?void 0:e.ERROR)?null===(t=this.received)||void 0===t?void 0:t.ERROR.map(e=>this.errorDetailFormatter(e)).join("\n"):""}getDetailsError(){var e,t,i,c;return Array.isArray(null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)?null===(c=null===(i=this.received)||void 0===i?void 0:i.DETAILS)||void 0===c?void 0:c.ERROR.map(e=>this.errorDetailFormatter(e)).join("\n"):""}hasPasswordExpiredError(){return this.hasErrorCode("PASSWORD_EXPIRED")}hasMFAError(){return this.hasErrorCode("MFA_REQUIRED")||this.hasErrorCode("MFA_FAILED")}requiresTermsAndConditions(){return this.hasErrorCode("TERMS_ACCEPTANCE_REQUIRED")}hasErrorCode(e){var t,i;return!!Array.isArray(null===(t=this.received)||void 0===t?void 0:t.ERROR)&&(null===(i=this.received)||void 0===i?void 0:i.ERROR.some(t=>t.CODE===e))}errorDetailFormatter(e){return`\n ${e.CODE}: \n ${e.TEXT}`}}!function(e){e.LOGON_ACK="LOGON_ACK",e.LOGON_NACK="LOGON_NACK",e.LOGOFF_ACK="LOGOFF_ACK",e.LOGOFF_NACK="LOGOFF_NACK",e.HEARTBEAT_PING="HEARTBEAT_PING",e.HEARTBEAT_PONG="HEARTBEAT_PONG",e.MORE_ROWS="MORE_ROWS",e.MORE_COLUMNS="MORE_COLUMNS",e.MORE_COLUMNS_ACK="MORE_COLUMNS_ACK",e.MSG_ACK="MSG_ACK",e.MSG_NACK="MSG_NACK",e.LOGOUT_ACK="LOGOUT_ACK",e.LOGOUT_NACK="LOGOUT_NACK",e.QUERY_UPDATE="QUERY_UPDATE"}(Nb||(Nb={})),function(e){e.EVENT_LOGIN_AUTH="EVENT_LOGIN_AUTH",e.EVENT_LOGIN_AUTH_ACK="EVENT_LOGIN_AUTH_ACK",e.EVENT_LOGIN_AUTH_NACK="EVENT_LOGIN_AUTH_NACK",e.EVENT_LOGOUT="EVENT_LOGOUT",e.DATA_LOGON="DATA_LOGON",e.DATA_LOGOFF="DATA_LOGOFF",e.META_REQUEST="META_REQUEST",e.JSON_SCHEMA_REQUEST="JSON_SCHEMA_REQUEST",e.RESOURCES_REQUEST="RESOURCES_REQUEST",e.RESOURCES_REQUEST_ACK="RESOURCES_REQUEST_ACK",e.RESOURCES_REQUEST_NACK="RESOURCES_REQUEST_NACK",e.EVENT_CHANGE_USER_PASSWORD="EVENT_CHANGE_USER_PASSWORD",e.EVENT_SELF_SERVICE_PASSWORD_RESET="EVENT_SELF_SERVICE_PASSWORD_RESET",e.EVENT_PASSWORD_RESET_ACTION="EVENT_PASSWORD_RESET_ACTION"}(Ab||(Ab={})),function(e){e.SESSION_NOT_FOUND="SESSION_NOT_FOUND",e.UNKNOWN_MESSAGE_TYPE="UNKNOWN_MESSAGE_TYPE"}(Ob||(Ob={}));const Rb=e=>Array.isArray(e)?e.map(Rb):e&&"object"==typeof e&&e.constructor===Object?Object.keys(e).sort().reduce((t,i)=>(t[i]=Rb(e[i]),t),{}):e;function Ib(e,t){return`${e}::${JSON.stringify(Rb(null!=t?t:{}))}`}const Db=(e,t)=>!!Array.isArray(null==e?void 0:e.ERROR)&&(null==e?void 0:e.ERROR.some(e=>{var i,c;return(null===(i=e.CODE)||void 0===i?void 0:i.includes(`${t}`))||(null===(c=e.STATUS_CODE)||void 0===c?void 0:c.includes(`${t}`))}));let Fb=class{constructor(e,t){this.session=e,this.uuid=t}createLoginMessage(e){let t;switch(e.type){case $b.BASIC:t={USER_NAME:e.username,PASSWORD:e.password,MFA_CODE:e.mfaToken};break;case $b.REFRESH:t={USER_NAME:e.username,REFRESH_AUTH_TOKEN:e.refreshToken,MFA_CODE:e.mfaToken};break;case $b.SSO:t={SSO_TOKEN:e.ssoToken};break;case $b.JWT:t={JWT:e.jwt,DOMAIN:e.domain}}return{DETAILS:t,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Ab.EVENT_LOGIN_AUTH}}createLogoutMessage(e){var t,i;return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Ab.EVENT_LOGOUT,SESSION_AUTH_TOKEN:null!==(t=e.authToken)&&void 0!==t?t:this.session.getSessionStorageItem("authToken"),SESSION_ID:null!==(i=e.sessionId)&&void 0!==i?i:this.session.getSessionStorageItem("sessionId")}}createDataLogonMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Ab.DATA_LOGON,DETAILS:Object.assign({DATASOURCE_NAME:e},t),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createDataLogoffMessage(e){return{SOURCE_REF:e,MESSAGE_TYPE:Ab.DATA_LOGOFF,SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createRequestMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e.startsWith("REQ_")?e:`REQ_${e}`},t)}createResourcesMessage(e){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:Ab.RESOURCES_REQUEST},e)}createMetaRequestMessage(e,t=Ab.META_REQUEST){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:t,DETAILS:{FEATURE:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createCommitMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e},t)}createRefreshTokenMessage(){return{SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:Ab.EVENT_LOGIN_AUTH,DETAILS:{REFRESH_AUTH_TOKEN:this.session.getSessionStorageItem("refreshToken"),MFA_CODE:this.session.getSessionStorageItem("mfaToken")}}}createChangePasswordMessage(e,t,i){return{USER_NAME:e,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Ab.EVENT_CHANGE_USER_PASSWORD,DETAILS:{OLD_PASSWORD:t,NEW_PASSWORD:i}}}createForgotPasswordMessage(e,t,i=e){return{USER_NAME:i,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Ab.EVENT_SELF_SERVICE_PASSWORD_RESET,DETAILS:{USER_NAME:e,RETURN_URL:t}}}createForgotPasswordTokenMessage(e,t,i,c=e){return{USER_NAME:c,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Ab.EVENT_PASSWORD_RESET_ACTION,DETAILS:{USER_NAME:e,RESET_TOKEN:t,NEW_PASSWORD:i}}}createMoreRowsMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Nb.MORE_ROWS,DETAILS:{SOURCE_REF:e,VIEW_NUMBER:t},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createMoreColumnsMessage(e){return Object.assign(Object.assign({},this.createMoreRowsMessage(e)),{MESSAGE_TYPE:Nb.MORE_COLUMNS})}createHTTPHeadersFromMessage(e,t="application/json; charset=UTF-8"){const i={"Content-type":t};return e.SOURCE_REF&&(i["source-ref"]=e.SOURCE_REF,i.SOURCE_REF=e.SOURCE_REF),e.SESSION_AUTH_TOKEN&&(i["SESSION-AUTH-TOKEN"]=e.SESSION_AUTH_TOKEN),e.MESSAGE_TYPE===Ab.EVENT_LOGOUT&&(i["SESSION-ID"]=e.SESSION_ID),i}createHeartbeatPingMessage(e=!1){return{MESSAGE_TYPE:Nb.HEARTBEAT_PING,SOURCE_REF:this.uuid.createId(),VERBOSE:e,DETAILS:{},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}};Fb=Ou([Tu(0,Mb),Tu(1,Jv)],Fb);const Hb=mt.createInterface(e=>e.singleton(Fb));var _b;let Pb=_b=class{constructor(e,t){this.http=e,this.messageBuilder=t}toHttpHost(e){if(!e)return"";let t=e;return t.startsWith("ws")&&(t=t.replace("ws","http")),t.endsWith("/")||(t=t.concat("/")),t}post(e,t){return this.http.post(_b.getUrl(e,t),{body:_b.getBody(t),headers:this.messageBuilder.createHTTPHeadersFromMessage(t)})}get(e,t){return this.http.get(_b.getUrl(e,t),{headers:this.messageBuilder.createHTTPHeadersFromMessage(t)})}requestServer(e,t){let i=_b.getUrl(e,t);const c=[];return t.REQUEST&&Object.keys(t.REQUEST).length>0&&Object.keys(t.REQUEST).forEach(e=>{const i=t.REQUEST[e];null==i||Number.isNaN(i)||c.push(`REQUEST.${e}=${encodeURIComponent(String(i))}`)}),t.DETAILS&&Object.keys(t.DETAILS).forEach(e=>{const i=t.DETAILS[e];null==i||Number.isNaN(i)||c.push(`${e}=${encodeURIComponent(String(i))}`)}),c.length>0&&(i=`${i}?${c.join("&")}`),nf.debug(`HTTP transport - REQUEST_SERVER GET URL: ${i}`),this.http.get(i,{headers:this.messageBuilder.createHTTPHeadersFromMessage(t)})}static getBody(e){return JSON.stringify(e)}static getUrl(e,t){const i=t.MESSAGE_TYPE;let c=t.MESSAGE_TYPE.replace(/_/g,"-").toLowerCase();return i===Ab.DATA_LOGON&&(c=t.DETAILS.DATASOURCE_NAME.replace(/_/g,"-").toLowerCase()),`${e}${c}`}};Pb=_b=Ou([Tu(0,Sb),Tu(1,Hb)],Pb);const Vb=mt.createInterface(e=>e.singleton(Pb));function Bb(e,t,i){const c=e=>"function"==typeof e?e:()=>e,o=c(t),s=c(i);return(t,i)=>e(t,i)?o(t,i):s(t,i)}class Ub{constructor(e){this.path=e}}const jb=new Set,qb=Object.freeze({register(e){jb.add(e)},unregister(e){jb.delete(e)}}),Gb=/^([a-z][a-z0-9+\-.]*:)?\/\//i,Wb=Object.freeze({path:Object.freeze({get current(){return location.pathname+location.search},generateRoute(e,t,i={}){return Ru(this,void 0,void 0,function*(){let c="config"in e?e:xy.find(e);for(;null!==c;){const e=yield c.config.generateRouteFromPath(t,i);if(null!==e)return e;c=c.parent}return null})},push(e,t=!0){e&&Gb.test(e)?location.href=e:(history.pushState({},document.title,e),t&&Wb.path.trigger(e))},replace(e,t=!0){e&&Gb.test(e)?location.href=e:(history.replaceState({},document.title,e),t&&Wb.path.trigger(e))},trigger(e){const t=new Ub(e);for(const e of jb)e.enqueue(t)}}),name:Object.freeze({generateRoute(e,t,i={}){return Ru(this,void 0,void 0,function*(){let c="config"in e?e:xy.find(e);for(;null!==c;){const e=yield c.config.generateRouteFromName(t,i);if(null!==e)return e;c=c.parent}return null})},push(e,t,i={},c=!0){return Ru(this,void 0,void 0,function*(){const o=yield Wb.name.generateRoute(e,t,i);null!==o&&Wb.path.push(o,c)})},replace(e,t,i={},c=!0){return Ru(this,void 0,void 0,function*(){const o=yield Wb.name.generateRoute(e,t,i);null!==o&&Wb.path.replace(o,c)})},trigger(e,t,i={}){return Ru(this,void 0,void 0,function*(){const c=yield Wb.name.generateRoute(e,t,i);null!==c&&Wb.path.trigger(c)})}})});class Yb{constructor(){this.queue=[],this.promise=null,this.resolve=null}connect(){this.enqueue(new Ub(Wb.path.current)),window.addEventListener("popstate",this),qb.register(this)}disconnect(){this.queue=[],this.promise=null,this.resolve=null,window.removeEventListener("popstate",this),qb.unregister(this)}receive(){return null!==this.promise||(this.promise=new Promise(e=>this.resolve=e),Promise.resolve().then(()=>this.tryDequeue())),this.promise}enqueue(e){this.queue.push(e),this.tryDequeue()}tryDequeue(){if(null===this.resolve||0===this.queue.length)return;const e=this.queue[this.queue.length-1],t=this.resolve;this.queue.length=0,this.promise=null,this.resolve=null,t(e)}handleEvent(e){this.enqueue(new Ub(Wb.path.current))}}const Kb=encodeURIComponent,Zb=e=>Kb(e).replace("%24","$");function Qb(e,t,i){let c=[];if(null==t)return c;if(Array.isArray(t))for(let o=0,s=t.length;o<s;o++)if(i)c.push(`${Zb(e)}=${Kb(t[o])}`);else{const i=e+"["+("object"==typeof t[o]&&null!==t[o]?o:"")+"]";c=c.concat(Qb(i,t[o]))}else if("object"!=typeof t||i)c.push(`${Zb(e)}=${Kb(t)}`);else for(const i in t)c=c.concat(Qb(e+"["+i+"]",t[i]));return c}function Xb(e,t){return Array.isArray(e)?(e.push(t),e):void 0!==e?[e,t]:t}function Jb(e,t,i){let c=e;const o=t.length-1;for(let e=0;e<=o;e++){const s=""===t[e]?c.length:t[e];if(e<o){const i=c[s]&&"object"!=typeof c[s]?[c[s]]:c[s];c=c[s]=i||(isNaN(t[e+1])?{}:[])}else c=c[s]=i}}const ey=Object.freeze({get current(){return location.search},build(e,t){let i=[];const c=Object.keys(e||{}).sort();for(let o=0,s=c.length;o<s;o++){const s=c[o];i=i.concat(Qb(s,e[s],t))}return 0===i.length?"":i.join("&")},separate(e){const t=e.indexOf("?");let i="";return-1!==t&&(i=e.substr(t+1,e.length),e=e.substr(0,t)),{path:e,queryString:i}},parse(e){const t={};if(!e||"string"!=typeof e)return t;let i=e;"?"===i.charAt(0)&&(i=i.substr(1));const c=i.replace(/\+/g," ").split("&");for(let e=0;e<c.length;e++){const i=c[e].split("="),o=decodeURIComponent(i[0]);if(!o)continue;let s=o.split("]["),a=s.length-1;if(/\[/.test(s[0])&&/\]$/.test(s[a])?(s[a]=s[a].replace(/\]$/,""),s=s.shift().split("[").concat(s),a=s.length-1):a=0,i.length>=2){const e=i[1]?decodeURIComponent(i[1]):"";a?Jb(t,s,e):t[o]=Xb(t[o],e)}else t[o]=!0}return t}}),ty=e=>e;class iy{constructor(e,t,i){this.path=e,this.name=t,this.caseSensitive=i}}class cy{constructor(e,t,i,c){this.route=e,this.paramNames=t,this.paramTypes=i,this.settings=c}get path(){return this.route.path}}class oy{constructor(e,t,i,c){this.endpoint=e,this.params=t,this.typedParams=i,this.queryParams=c,this.allParams=Object.assign(Object.assign({},t),c),this.allTypedParams=Object.assign(Object.assign({},i),c)}get settings(){return this.endpoint.settings}}class sy{constructor(e,t,i,c){var o;this.chars=e,this.states=t,this.skippedStates=i,this.result=c,this.head=t[t.length-1],this.endpoint=null===(o=this.head)||void 0===o?void 0:o.endpoint}advance(e){const{chars:t,states:i,skippedStates:c,result:o}=this;let s=null,a=0;const n=i[i.length-1];function r(l,d){if(l.isMatch(e)&&(1===++a?s=l:o.add(new sy(t.concat(e),i.concat(l),null===d?c:c.concat(d),o))),null===n.segment&&l.isOptional&&null!==l.nextStates){if(l.nextStates.length>1)throw new Error(`${l.nextStates.length} nextStates`);const e=l.nextStates[0];if(!e.isSeparator)throw new Error("Not a separator");if(null!==e.nextStates)for(const t of e.nextStates)r(t,l)}}if(n.isDynamic&&r(n,null),null!==n.nextStates)for(const e of n.nextStates)r(e,null);null!==s&&(i.push(this.head=s),t.push(e),null!==s.endpoint&&(this.endpoint=s.endpoint)),0===a&&o.remove(this)}finalize(){!function e(t,i){const c=i.nextStates;if(null!==c)if(1===c.length&&null===c[0].segment)e(t,c[0]);else for(const i of c)if(i.isOptional&&null!==i.endpoint){if(t.push(i),null!==i.nextStates)for(const c of i.nextStates)e(t,c);break}}(this.skippedStates,this.head)}getParams(){const{states:e,chars:t,endpoint:i}=this,c={};for(const e of i.paramNames)c[e]=void 0;for(let i=0,o=e.length;i<o;++i){const o=e[i];if(o.isDynamic){const e=o.segment.name;void 0===c[e]?c[e]=t[i]:c[e]+=t[i]}}return c}compareTo(e){const t=this.states,i=e.states;for(let e=0,c=0,o=Math.max(t.length,i.length);e<o;++e){let o=t[e];if(void 0===o)return 1;let s=i[c];if(void 0===s)return-1;let a=o.segment,n=s.segment;if(null===a){if(null===n){++c;continue}if(void 0===(o=t[++e]))return 1;a=o.segment}else if(null===n){if(void 0===(s=i[++c]))return-1;n=s.segment}if(a.kind<n.kind)return 1;if(a.kind>n.kind)return-1;++c}const c=this.skippedStates,o=e.skippedStates,s=c.length,a=o.length;if(s<a)return 1;if(s>a)return-1;for(let e=0;e<s;++e){const t=c[e],i=o[e];if(t.length<i.length)return 1;if(t.length>i.length)return-1}return 0}}function ay(e){return null!==e.head.endpoint}function ny(e,t){return e.compareTo(t)}class ry{constructor(e){this.candidates=[],this.candidates=[new sy([""],[e],[],this)]}get isEmpty(){return 0===this.candidates.length}getSolution(){const e=this.candidates.filter(ay);if(0===e.length)return null;for(const t of e)t.finalize();return e.sort(ny),e[0]}add(e){this.candidates.push(e)}remove(e){this.candidates.splice(this.candidates.indexOf(e),1)}advance(e){const t=this.candidates.slice();for(const i of t)i.advance(e)}}class ly{constructor(){this.names=new Map,this.paths=new Map,this.rootState=new dy(null,null,"")}add(e,t){if(e instanceof Array)for(const i of e)this.$add(i,t);else this.$add(e,t)}$add(e,t){const i=e.path,c=new iy(e.path,e.name||"",!0===e.caseSensitive),o=""===i?[""]:i.split("/").filter(hy),s=[],a=[];let n=this.rootState;const r=[];for(const e of o)switch(n=n.append(null,"/"),e.charAt(0)){case"{":{const t=e.slice(1,-1).split(":").map(e=>e.trim());2===t.length?a.push(t[1]):a.push("string");const i=t[0].endsWith("?"),c=i?t[0].slice(0,-1):t[0];s.push(c);const o=new fy(c,i);r.push(o),n=o.appendTo(n);break}case"*":{const t=e.slice(1);s.push(t),a.push("string");const i=new py(t);r.push(i),n=i.appendTo(n);break}default:{const t=new uy(e,c.caseSensitive);r.push(t),n=t.appendTo(n);break}}const l=new cy(c,s,a,t||null);n.setEndpoint(l),this.paths.set(i,r),e.name&&this.names.set(e.name,r)}recognize(e,t={}){return Ru(this,void 0,void 0,function*(){const i=ey.separate(e),c=ey.parse(i.queryString);(e=decodeURI(i.path)).startsWith("/")||(e=`/${e}`),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1));const o=new ry(this.rootState);for(let t=0,i=e.length;t<i;++t){const i=e.charAt(t);if(o.advance(i),o.isEmpty)return null}const s=o.getSolution();if(null===s)return null;const{endpoint:a}=s,n=a.paramNames,r=a.paramTypes,l=s.getParams(),d={};for(let e=0,i=n.length;e<i;++e){const i=n[e],c=t[r[e]]||ty,o=l[i],s=yield c(o);d[i]=s}return new oy(a,l,d,c)})}generateFromName(e,t){return this.generate(this.names.get(e),t)}generateFromPath(e,t){return this.generate(this.paths.get(e),t)}generate(e,t){if(!e)return null;const i=Object.assign({},t),c={};let o="";for(let t=0,s=e.length;t<s;t++){const s=e[t],a=s.generate(i,c);if(null==a){if(s instanceof fy&&!s.optional)throw new Error(`A value is required for route parameter '${s.name}'.`)}else o+="/",o+=a}"/"!==o.charAt(0)&&(o="/"+o);for(const e in c)delete i[e];const s=ey.build(i);return o+=s?`?${s}`:"",o}}class dy{constructor(e,t,i){switch(this.prevState=e,this.segment=t,this.value=i,this.nextStates=null,this.endpoint=null,null==t?void 0:t.kind){case 2:this.length=e.length+1,this.isSeparator=!1,this.isDynamic=!0,this.isOptional=t.optional;break;case 1:this.length=e.length+1,this.isSeparator=!1,this.isDynamic=!0,this.isOptional=!1;break;case 3:this.length=e.length+1,this.isSeparator=!1,this.isDynamic=!1,this.isOptional=!1;break;case void 0:this.length=null===e?0:e.length,this.isSeparator=!0,this.isDynamic=!1,this.isOptional=!1}}append(e,t){let i,c=this.nextStates;return null===c?(i=void 0,c=this.nextStates=[]):i=null===e?c.find(e=>e.value===t):c.find(t=>{var i;return null===(i=t.segment)||void 0===i?void 0:i.equals(e)}),void 0===i&&c.push(i=new dy(this,e,t)),i}setEndpoint(e){if(null!==this.endpoint)throw new Error(`Cannot add ambiguous route. The pattern '${e.route.path}' clashes with '${this.endpoint.route.path}'`);this.endpoint=e,this.isOptional&&(this.prevState.setEndpoint(e),this.prevState.isSeparator&&null!==this.prevState.prevState&&this.prevState.prevState.setEndpoint(e))}isMatch(e){const t=this.segment;switch(null==t?void 0:t.kind){case 2:return!this.value.includes(e);case 1:return!0;case 3:case void 0:return this.value.includes(e)}}}function hy(e){return e.length>0}class uy{constructor(e,t){this.value=e,this.caseSensitive=t}get kind(){return 3}appendTo(e){const{value:t,value:{length:i}}=this;if(this.caseSensitive)for(let c=0;c<i;++c)e=e.append(this,t.charAt(c));else for(let c=0;c<i;++c){const i=t.charAt(c);e=e.append(this,i.toUpperCase()+i.toLowerCase())}return e}generate(){return this.value}equals(e){return 3===e.kind&&e.caseSensitive===this.caseSensitive&&e.value===this.value}}class fy{constructor(e,t){this.name=e,this.optional=t}get kind(){return 2}appendTo(e){return e=e.append(this,"/")}generate(e,t){return t[this.name]=!0,e[this.name]}equals(e){return 2===e.kind&&e.optional===this.optional&&e.name===this.name}}class py{constructor(e){this.name=e}get kind(){return 1}appendTo(e){return e=e.append(this,"")}generate(e,t){return t[this.name]=!0,e[this.name]}equals(e){return 1===e.kind&&e.name===this.name}}const my="fast-child-route";function gy(e,t){return"command"in t?t.command:"redirect"in t?new Iy(t.redirect):_y.fromDefinition(e,t)}const vy=e=>{if(null==e)return!1;switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;default:return!1}},by={number:e=>void 0===e?NaN:parseFloat(e),float:e=>void 0===e?NaN:parseFloat(e),int:e=>void 0===e?NaN:parseInt(e),integer:e=>void 0===e?NaN:parseInt(e),Date:e=>void 0===e?new Date(Date.now()):new Date(e),boolean:vy,bool:vy};class yy{constructor(e){this.owner=e,this._recognizer=null,this.pathToCommand=new Map,this.fallbackCommand=null,this.fallbackSettings=null,this.converters={}}get recognizer(){return null===this._recognizer&&(this._recognizer=this.owner.createRouteRecognizer()),this._recognizer}ignore(e){"string"==typeof e&&(e={path:e}),this.pathToCommand.set(e.path,new Ry),this.recognizer.add(e,e.settings)}map(...e){for(const t of e){if("children"in t){const e=this.owner.createTitleBuilder(),i=t.children.map(i=>{const c=Object.assign(Object.assign(Object.assign({},t),i),{path:`${t.path}/${i.path}`});if("title"in t||"title"in i){const o=t.title||"",s=i.title||"";c.title=e.joinTitles(o,s)}if("name"in i){const e=t.name?t.name+"/":"";c.name=e+i.name}return c.children===t.children&&delete c.children,c});this.map(...i);continue}let e;if(e="command"in t?t.command:"redirect"in t?new Iy(t.redirect):_y.fromDefinition(this.owner,t),this.pathToCommand.set(t.path,e),this.recognizer.add(t,t.settings),"childRouters"in t&&t.childRouters){const i=Object.assign(Object.assign({},t),{path:t.path+`/*${my}`});this.pathToCommand.set(i.path,e),this.recognizer.add(i,i.settings)}}}fallback(e){const t=this.owner;this.fallbackCommand="function"==typeof e?{createContributor(i,c){return Ru(this,void 0,void 0,function*(){const o=yield e();return gy(t,o).createContributor(i,c)})}}:gy(t,e)}converter(e,t){let i;i="convert"in t?t.convert.bind(t):t.prototype&&"convert"in t.prototype?e=>this.owner.construct(t).convert(e):t,this.converters[e]=i}recognize(e){return Ru(this,void 0,void 0,function*(){const t=yield this.recognizer.recognize(e,this.aggregateConverters());if(null!==t)return{route:t,command:this.pathToCommand.get(t.endpoint.path)};if(null!==this.fallbackCommand){const t=ey.separate(e),i=ey.parse(t.queryString);return{route:new oy(new cy(new iy("*","",!1),[],[],this.fallbackSettings),{},{},i),command:this.fallbackCommand}}return null})}generateFromName(e,t){return this.recognizer.generateFromName(e,t)}generateFromPath(e,t){return this.recognizer.generateFromPath(e,t)}aggregateConverters(){return null===this.owner.parent?Object.assign(Object.assign({},by),this.converters):Object.assign(Object.assign({},this.owner.parent.routes.aggregateConverters()),this.converters)}}const zy="$router";function Cy(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}function Ly(e){let t=e;for(;t=Cy(t);)if(zy in t)return t[zy];return null}const xy=Object.freeze({getOrCreateFor(e){const t=e[zy];return void 0!==t?t:e[zy]=new My(e)},find:e=>e[zy]||Ly(e),from(e){class t extends e{constructor(){super(),xy.getOrCreateFor(this)}get config(){return this[zy].config}set config(e){this[zy].config=e}}const i=t.prototype;if("connectedCallback"in i){const e=i.connectedCallback;i.connectedCallback=function(){e.call(this),this[zy].connect()}}else i.connectedCallback=function(){this[zy].connect()};if("disconnectedCallback"in i){const e=i.disconnectedCallback;i.disconnectedCallback=function(){e.call(this),this[zy].disconnect()}}else i.disconnectedCallback=function(){this[zy].disconnect()};return t}});class My{constructor(e){this.host=e,this.parentRouter=void 0,this.contributors=new Set,this.navigationQueue=null,this.linkHandler=null,this.newView=null,this.newRoute=null,this.childCommandContributor=null,this.childRoute=null,this.isConnected=!1,this.routerConfig=null,this.view=null,this.route=null,this.onNavigationMessage=e=>Ru(this,void 0,void 0,function*(){const t=this.config.createNavigationProcess();yield t.run(this,e),this.navigationQueue.receive().then(this.onNavigationMessage)}),e[zy]=this}get config(){return this.routerConfig}set config(e){this.routerConfig=e,this.tryConnect()}get parent(){if(void 0===this.parentRouter){if(!this.isConnected)return null;this.parentRouter=Ly(this.host)}return this.parentRouter||null}get level(){return null===this.parent?0:this.parent.level+1}shouldRender(e){var t;if(this.route&&this.route.endpoint.path===e.endpoint.path){const i=null==e?void 0:e.allParams,c=null===(t=this.route)||void 0===t?void 0:t.allParams;if(JSON.stringify(c)===JSON.stringify(i))return!1}return!0}beginRender(e,t){return Ru(this,void 0,void 0,function*(){return this.newRoute=e,this.newView=yield t.createView(),this.newView.bind(e.allTypedParams,wy.create(this)),this.newView.appendTo(this.host),yield t.transition.begin(this.host,this.view,this.newView),{commit:this.renderOperationCommit.bind(this,t.layout,t.transition),rollback:this.renderOperationRollback.bind(this,t.transition)}})}connect(){this.isConnected=!0,this.tryConnect()}disconnect(){null===this.parent?(null!==this.navigationQueue&&(this.navigationQueue.disconnect(),this.navigationQueue=null),null!==this.linkHandler&&(this.linkHandler.disconnect(),this.linkHandler=null)):this.parent.removeContributor(this),this.isConnected=!1,this.parentRouter=void 0}addContributor(e){this.contributors.add(e)}removeContributor(e){this.contributors.delete(e)}tryConnect(){null!==this.config&&this.isConnected&&(null===this.parent?(null!==this.navigationQueue&&this.navigationQueue.disconnect(),this.navigationQueue=this.config.createNavigationQueue(),this.navigationQueue.connect(),this.navigationQueue.receive().then(this.onNavigationMessage),null!==this.linkHandler&&this.linkHandler.disconnect(),this.linkHandler=this.config.createLinkHandler(),this.linkHandler.connect()):(this.config.parent=this.parent.config,this.parent.addContributor(this)))}renderOperationCommit(e,t){return Ru(this,void 0,void 0,function*(){yield e.beforeCommit(this.host),yield t.commit(this.host,this.view,this.newView),yield e.afterCommit(this.host),null!==this.view&&this.view.dispose(),this.route=this.newRoute,this.view=this.newView,this.newRoute=null,this.newView=null})}renderOperationRollback(e){return Ru(this,void 0,void 0,function*(){null!==this.newView&&(yield e.rollback(this.host,this.view,this.newView),this.newView.dispose(),this.newRoute=null,this.newView=null)})}navigate(e){return Ru(this,void 0,void 0,function*(){yield this.tunnel(e)})}leave(e){return Ru(this,void 0,void 0,function*(){if(yield this.tunnel(e),!e.canceled){const t=this.contributors;this.contributors=new Set,e.onCancel(()=>this.contributors=t)}})}construct(e){return Ru(this,void 0,void 0,function*(){if(null!==this.parent){const t=e.route.allParams[my]||"",i=yield this.config.recognizeRoute(t);if(null===i){return this.config.createEventSink().onUnhandledNavigationMessage(this,new Ub(t)),void e.cancel()}this.childRoute=i.route,this.childCommandContributor=yield i.command.createContributor(this,i.route)}yield this.tunnel(e)})}enter(e){return Ru(this,void 0,void 0,function*(){yield this.tunnel(e)})}commit(e){return Ru(this,void 0,void 0,function*(){yield this.tunnel(e)})}tunnel(e){return Ru(this,void 0,void 0,function*(){const t=this.childRoute,i=this.childCommandContributor;if(t&&i&&(yield e.evaluateContributor(i,t,this)),e.canceled)return;const c=[...this.config.findContributors(e.name),...Array.from(this.contributors)];for(const t of c)if(yield e.evaluateContributor(t,void 0,this),e.canceled)return})}}const wy=Object.freeze({create:e=>Object.create(L,{router:{value:e}})}),Sy=Object.freeze({default:Object.freeze({begin(e,t,i){return Ru(this,void 0,void 0,function*(){})},rollback(e,t,i){return Ru(this,void 0,void 0,function*(){})},commit(e,t,i){return Ru(this,void 0,void 0,function*(){})}})});class ky{constructor(e=null,t=null,i=!0){this.template=e,this.runBeforeCommit=i,this.styles=null==t?null:Array.isArray(t)?Z.create(t):t instanceof Z?t:Z.create([t])}beforeCommit(e){return Ru(this,void 0,void 0,function*(){this.runBeforeCommit&&this.apply(e)})}afterCommit(e){return Ru(this,void 0,void 0,function*(){this.runBeforeCommit||this.apply(e)})}apply(e){e instanceof ze&&(e.$fastController.template!==this.template&&(e.$fastController.template=this.template),e.$fastController.styles!==this.styles&&(e.$fastController.styles=this.styles))}}const Ey=Object.freeze({default:new ky(K`<slot></slot>`)});function $y(e,t){return t in e}const Ny={lifecycle:!0,parameters:!0};class Ay extends x{constructor(e){super(),this.options=e}createPlaceholder(e){return p.createCustomAttributePlaceholder("fast-navigation-contributor",e)}createBehavior(e){return new Oy(e,this.options)}}class Oy{constructor(e,t){this.contributor=e,this.options=t,this.router=null}bind(e,t){if(this.options.lifecycle&&(this.router=t.router||xy.find(this.contributor),this.router.addContributor(this.contributor)),this.options.parameters){const t=this.contributor,i=e;for(const e in i)t[e]=i[e]}}unbind(e){null!==this.router&&this.router.removeContributor(this.contributor)}}function Ty(e){return new Ay(Object.assign({},Ny,e))}class Ry{createContributor(){return Ru(this,void 0,void 0,function*(){return{navigate(e){return Ru(this,void 0,void 0,function*(){e.cancel()})}}})}}class Iy{constructor(e){this.redirect=e}createContributor(){return Ru(this,void 0,void 0,function*(){const e=this.redirect;return{navigate(t){return Ru(this,void 0,void 0,function*(){const i=t.router.config,c=(yield i.generateRouteFromName(e,t.route.allParams))||(yield i.generateRouteFromPath(e,t.route.allParams));if(null===c)throw new Error(`Invalid redirect. Name or path not found: ${e}`);t.cancel(()=>Ru(this,void 0,void 0,function*(){return Wb.path.replace(c)}))})}}})}}function Dy(e){return K`<${e} ${Ty()}></${e}>`}function Fy(e){const t=document.createDocumentFragment();t.appendChild(e);const i=new G(t,[Ty().createBehavior(e)]);return{create:()=>i}}class Hy{constructor(e,t,i){this.router=e,this.route=t,this.command=i}construct(e){return Ru(this,void 0,void 0,function*(){this.router.shouldRender(this.route)?(this.operation=yield this.router.beginRender(this.route,this.command),e.onCancel(()=>this.operation.rollback())):e.cancel()})}commit(e){return Ru(this,void 0,void 0,function*(){yield this.operation.commit(),this.command.title&&e.setTitle(this.command.title)})}}class _y{constructor(e,t){this.owner=e,this.createView=t,this._layout=null,this._transition=null,this.title=""}get transition(){return this._transition||this.owner.defaultTransition}set transition(e){this._transition=e}get layout(){return this._layout||this.owner.defaultLayout}set layout(e){this._layout=e}createContributor(e,t){return Ru(this,void 0,void 0,function*(){return new Hy(e,t,this)})}static fromDefinition(e,t){let i;i="template"in t?()=>Ru(this,void 0,void 0,function*(){let e=t.template;return"function"==typeof e&&(e=yield e()),e.create()}):()=>Ru(this,void 0,void 0,function*(){let e=t.element,i=null;if(t.factory)i=t.factory;else if("function"==typeof e){let t=pe.forType(e);if(t)i=Dy(t.name);else if(e=yield e(),"string"==typeof e)i=Dy(e);else if(e instanceof HTMLElement)i=Fy(e);else{if(t=pe.forType(e),!t)throw new Error("Invalid value for element in route config.");i=Dy(t.name)}}else e instanceof HTMLElement?t.factory=i=Fy(e):t.factory=i=Dy(e);return i.create()});const c=new _y(e,i);return t.layout&&(t.layout instanceof W?c.layout=new ky(t.layout):c.layout=t.layout),t.transition&&(c.transition=t.transition),t.title&&(c.title=t.title),c}}class Py{constructor(){this.handler=e=>{const{shouldHandleEvent:t,href:i}=this.getEventInfo(e);t&&(e.preventDefault(),Wb.path.push(i))}}connect(){window.addEventListener("click",this.handler,!0)}disconnect(){window.removeEventListener("click",this.handler)}getEventInfo(e){const t={shouldHandleEvent:!1,href:null,anchor:null},i=this.findClosestAnchor(e);if(!i||!this.targetIsThisWindow(i))return t;if(i.hasAttribute("download")||i.hasAttribute("router-ignore")||i.hasAttribute("data-router-ignore"))return t;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return t;const c=i.getAttribute("href");t.anchor=i,t.href=c;const o=1===e.which,s=c&&!("#"===c.charAt(0)||/^[a-z]+:/i.test(c));return t.shouldHandleEvent=o&&!!s,t}findClosestAnchor(e){const t=e.composedPath();for(let e=0,i=t.length;e<i;++e){const i=t[e];if("A"===i.tagName)return i}return e.target}targetIsThisWindow(e){const t=e.getAttribute("target");return!t||t===window.name||"_self"===t}}class Vy{constructor(e,t,i,c,o){this.name=e,this.commitActions=c,this.cancelActions=o,this.routes=[],this.routers=[],this.canceled=!1,this.titles=[],this.routes.push(t),this.routers.push(i)}get route(){return this.routes[this.routes.length-1]}get router(){return this.routers[this.routers.length-1]}cancel(e){this.canceled=!0,e&&this.cancelActions.push(e)}onCommit(e){this.commitActions.push(e)}onCancel(e){this.cancelActions.push(e)}setTitle(e){const t=this.router.level;for(;this.titles.length<t+1;)this.titles.push([]);this.titles[t].push(e)}evaluateContributor(e,t=this.route,i=this.router){return Ru(this,void 0,void 0,function*(){$y(e,this.name)&&(this.routes.push(t),this.routers.push(i),yield e[this.name](this),this.routes.pop(),this.routers.pop())})}}class By{constructor(){this.phases=["navigate","leave","construct","enter","commit"]}run(e,t){return Ru(this,void 0,void 0,function*(){const i=e.config.createEventSink(),c=yield e.config.recognizeRoute(t.path);if(null===c)return void i.onUnhandledNavigationMessage(e,t);const o=c.route,s=c.command;i.onNavigationBegin(e,o,s);const a=[],n=[];let r=a;const l=[yield s.createContributor(e,o),e,this];for(const t of this.phases){const c=new Vy(t,o,e,a,n);if(i.onPhaseBegin(c),c.canceled)r=n;else for(const e of l)if(yield c.evaluateContributor(e),c.canceled){r=n;break}if(i.onPhaseEnd(c),c.canceled)break}yield Promise.all(r.map(e=>e())).then(()=>i.onNavigationEnd(e,o,s))})}commit(e){const t=e.router.config.createTitleBuilder();document.title=t.buildTitle(e.router.config.title,e.titles)}}class Uy{constructor(e=" - ",t=":"){this.segmentSeparator=e,this.fragmentSeparator=t}joinTitles(e,t){return""===e?t:""===t?e:`${e}${this.segmentSeparator}${t}`}buildTitle(e,t){let i=e;for(const e of t){i&&(i+=this.segmentSeparator);let t="";for(const i of e)t&&(t+=this.fragmentSeparator),t+=i;i+=t}return i}}class jy{onUnhandledNavigationMessage(e,t){}onNavigationBegin(e,t,i){}onPhaseBegin(e){}onPhaseEnd(e){}onNavigationEnd(e,t,i){}}class qy{constructor(){this.isConfigured=!1,this.routes=new yy(this),this.contributors=[],this.defaultLayout=Ey.default,this.defaultTransition=Sy.default,this.title="",this.parent=null}createNavigationQueue(){return this.construct(Yb)}createLinkHandler(){return this.construct(Py)}createNavigationProcess(){return new By}createEventSink(){return this.construct(jy)}createTitleBuilder(){return this.construct(Uy)}createRouteRecognizer(){return this.construct(ly)}construct(e){return null!==this.parent?this.parent.construct(e):new e}recognizeRoute(e){return Ru(this,void 0,void 0,function*(){return yield this.ensureConfigured(),this.routes.recognize(e)})}generateRouteFromName(e,t){return Ru(this,void 0,void 0,function*(){return yield this.ensureConfigured(),this.routes.generateFromName(e,t)})}generateRouteFromPath(e,t){return Ru(this,void 0,void 0,function*(){return yield this.ensureConfigured(),this.routes.generateFromPath(e,t)})}findContributors(e){return this.contributors.filter(t=>$y(t,e))}cached(e){let t=null;return()=>Ru(this,void 0,void 0,function*(){return null===t&&(t=new e),t})}ensureConfigured(){return Ru(this,void 0,void 0,function*(){this.isConfigured||(yield this.configure(),this.isConfigured=!0)})}}let Gy=class extends(xy.from(ze)){};Gy=Ou([Ce("fast-router")],Gy);const Wy=[];setTimeout(()=>{Wy.length&&console.warn(`${Wy.length} attribute deprecation notice(s):\n ${Wy.join("\n")}`)},5e3);const Yy="reauthActionLock";var Ky;function Zy(){return Ru(this,arguments,void 0,function*(e={}){const{reloadOnFailure:t=!0}=e;if(function(){const e=parseInt(localStorage.getItem(Yy)||"0");Date.now()-e>3e4&&localStorage.removeItem(Yy)}(),localStorage.getItem(Yy)||(localStorage.setItem(Yy,Date.now().toString()),0))return Ky.HANDLED_BY_OTHER_TAB;try{if(yield function(){return Ru(this,void 0,void 0,function*(){const e=yield fetch(Zf,{credentials:"include"});return"EVENT_LOGIN_DETAILS_ACK"===(yield e.json()).MESSAGE_TYPE})}())return Ky.ALREADY_VALID;return(yield function(){return Ru(this,void 0,void 0,function*(){const e=mt.getOrCreateDOMContainer().get(Sb);return"EVENT_LOGIN_AUTH_ACK"===(yield e.post(Kf,{body:JSON.stringify({DETAILS:{},MESSAGE_TYPE:"EVENT_LOGIN_AUTH"})})).MESSAGE_TYPE})}())?Ky.SUCCESS:(t&&window.location.reload(),Ky.FAILED)}finally{localStorage.removeItem(Yy)}})}!function(e){e.SUCCESS="SUCCESS",e.FAILED="FAILED",e.HANDLED_BY_OTHER_TAB="HANDLED_BY_OTHER_TAB",e.ALREADY_VALID="ALREADY_VALID"}(Ky||(Ky={}));const Qy=(e,t)=>((null==t?void 0:t.ROW)&&e&&e.length>0?t.ROW.forEach(t=>{const i=t;if(i&&i.DETAILS){const c=i.DETAILS.ROW_REF,o=i.DETAILS.OPERATION;"INSERT"===o&&(e.find(e=>{var t;return(null===(t=e.DETAILS)||void 0===t?void 0:t.ROW_REF)===c})||e.unshift(i)),"DELETE"===o&&(e=e.filter(e=>{var i,c;return(null===(i=t.DETAILS)||void 0===i?void 0:i.ROW_REF)!==(null===(c=e.DETAILS)||void 0===c?void 0:c.ROW_REF)})),"MODIFY"===o&&(e=e.map(e=>{var t;return(null===(t=e.DETAILS)||void 0===t?void 0:t.ROW_REF)===c?Object.assign(Object.assign({},e),i):e}))}}):!t||e&&0!==e.length||(e=[...new Set(t.ROW)]),e);var Xy;let Jy=Xy=class{get isConnected(){return this._isConnected}set isConnected(e){this._isConnected=e,this.isConnectedSubject.next(this._isConnected)}constructor(e,t,i,c,o,s,a){var n;this.http=e,this.messageBuilder=t,this.session=i,this.metaCache=c,this.serializer=o,this.config=s,this.transport=a,this.isWorking=!1,this._isConnected=!1,this.isConnectedSubject=new og(this._isConnected),this.isConnected$=null===(n=this.isConnectedSubject)||void 0===n?void 0:n.asObservable(),this.ongoingTurbo={},this.streams=new Map,this.inFlightRequests=new Map,this.ongoingRefresh=null}handleSessionRefresh(){return this.ongoingRefresh||(this.ongoingRefresh=(()=>Ru(this,void 0,void 0,function*(){const e=this.host;this.disconnect();let t=yield Zy();return t===Ky.HANDLED_BY_OTHER_TAB&&(yield new Promise(e=>{setTimeout(e,Xy.REAUTH_WAIT_MS)}),t=yield Zy()),(t===Ky.SUCCESS||t===Ky.ALREADY_VALID)&&(this.connect(e),!0)}))().finally(()=>{this.ongoingRefresh=null})),this.ongoingRefresh}checkHost(){return Ru(this,void 0,void 0,function*(){try{return this.getMessage({MESSAGE_TYPE:Nb.HEARTBEAT_PING,SOURCE_REF:"host check"}).then(e=>e.MESSAGE_TYPE===Nb.HEARTBEAT_PONG)}catch(e){return nf.error(e),!1}})}send(e,t){return Ru(this,void 0,void 0,function*(){if(this.ongoingRefresh){if(!(yield this.ongoingRefresh))throw new Error("Cannot send message: session refresh failed")}return this.transport.post(this.host,e)})}httpMode(){return!0}setValidSession(e){nf.deprecated("setValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}connect(e){return Ru(this,void 0,void 0,function*(){return this.host=this.transport.toHttpHost(e),this.checkHost().then(e=>(this.isConnected=e,this.session.setSessionStorageItem("hostUrl",this.host),e))})}disconnect(){this.isConnected=!1,this.streams.clear(),this.ongoingTurbo={},this.host=void 0}snapshot(e,t){return Ru(this,void 0,void 0,function*(){const i=this.messageBuilder.createDataLogonMessage(e,t);return nf.debug(`HTTP MODE - ${i.MESSAGE_TYPE} (snapshot) message created -> `,i),this.send(i).then(e=>(this.dataLogoff(i.SOURCE_REF).catch(e=>nf.error(e)),e))})}stream(e,t,i,c){var o,s;const a=this.messageBuilder.createDataLogonMessage(e,c);nf.debug(`HTTP MODE - ${a.MESSAGE_TYPE} (stream) message created -> `,a);const n=a.SOURCE_REF,r=(null===(s=null===(o=this.config.polling)||void 0===o?void 0:o.POLLING_INTERVAL_MAP)||void 0===s?void 0:s[e])||this.config.polling.POLLING_FREQUENCY;this.streams.set(n,{SOURCE_REF:n,POLLING_FREQUENCY:new og(r),RESOURCE_NAME:e});const l=this.streams.get(n).POLLING_FREQUENCY,d=hv(Zg(this.send(a)),l.pipe(fv(()=>"visible"===document.visibilityState)).pipe(gv(e=>{return void 0===(t=e)&&(t=0),void 0===i&&(i=xg),t<0&&(t=0),uv(t,t,i);var t,i})).pipe(gv(()=>Zg(this.getMessage(a))))).pipe(vv(()=>this.streams.has(n)),function(e){var t;void 0===e&&(e=1/0);var i=(t=e&&"object"==typeof e?e:{count:e}).count,c=void 0===i?1/0:i,o=t.delay,s=t.resetOnSuccess,a=void 0!==s&&s;return c<=0?qm:Km(function(e,t){var i,s=0,n=function(){var r=!1;i=e.subscribe(Zm(t,function(e){a&&(s=0),t.next(e)},void 0,function(e){if(s++<c){var a=function(){i?(i.unsubscribe(),i=null,n()):r=!0};if(null!=o){var l="number"==typeof o?uv(o):Ug(o(e,s)),d=Zm(t,function(){d.unsubscribe(),a()},function(){t.complete()});l.subscribe(d)}else a()}else t.error(e)})),r&&(i.unsubscribe(),i=null,n())};n()})}({count:Xy.MAX_RETRIES,delay:(e,t)=>{const i=e;nf.error(`Retry ${t}/${Xy.MAX_RETRIES}:`,i.status,i);if(!(0===i.status||i.status&&i.status>=yb.BAD_REQUEST&&i.status<yb.INTERNAL_SERVER_ERROR))throw e;return i.status===yb.NOT_FOUND&&this.streams.delete(n),i.status===yb.UNAUTHORIZED?Zg(this.handleSessionRefresh()):uv(Xy.RETRY_DELAY_MS)}}),(h=()=>{nf.debug(`Terminating stream for ${e} - ${n}`),this.dataLogoff(n)},Km(function(e,t){try{e.subscribe(t)}finally{t.add(h)}})));var h;return this.streams.get(n).STREAM=d,d}streamState(e,t=()=>{},i=()=>{},c,o=[]){return this.stream(e,t,i,c).pipe(pv(Qy,o))}streamWithoutAutoTeardown(e,t,i,c){return nf.deprecated("streamWithoutAutoTeardown","Please use 'stream' api instead.","15.0.0"),this.stream(e,t,i,c)}getMessage(e){return Ru(this,void 0,void 0,function*(){if(this.ongoingRefresh){if(!(yield this.ongoingRefresh))throw new Error("Cannot get message: session refresh failed")}return this.transport.get(this.host,e)})}getMoreRows(e){return Ru(this,void 0,void 0,function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return nf.debug(`HTTP MODE - ${t.MESSAGE_TYPE} message created -> `,t),this.send(t)})}getMoreColumns(e){return Ru(this,void 0,void 0,function*(){const t=this.messageBuilder.createMoreColumnsMessage(e);return this.send(t)})}dataLogoff(e){return Ru(this,void 0,void 0,function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return this.send(t).then(t=>(this.streams.has(e)&&(nf.debug(`Removing stream ${e}`),this.streams.delete(e)),t))})}getMetadata(e){return Ru(this,arguments,void 0,function*(e,t=!0){if(t&&this.metaCache.hasMetadataFor(e))return nf.debug(`HTTP MODE - Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const i=this.messageBuilder.createMetaRequestMessage(e);nf.debug(`HTTP MODE - ${i.MESSAGE_TYPE} (metadata) message created -> `,i);const c=yield this.send(i).then(e=>e.DETAILS);return Object.keys(c).length&&this.metaCache.setMetadataFor(e,c),c})}getJSONSchema(e){return Ru(this,void 0,void 0,function*(){const t=this.messageBuilder.createMetaRequestMessage(e,Ab.JSON_SCHEMA_REQUEST);return nf.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.send(t)})}request(e,t){return Ru(this,arguments,void 0,function*(e,t,i=!1){const c=Ib(e,t);if(i&&this.metaCache.hasRequestFor(c))return nf.debug(`HTTP MODE - Cached request response retrieved for ${c}`),this.metaCache.getRequestFor(c);const o=this.inFlightRequests.get(c);if(o)return nf.debug(`HTTP MODE - In-flight request collapsed for ${c}`),o;const s=this.messageBuilder.createRequestMessage(e,t);nf.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (request server) message created -> `,s);const a=this.transport.requestServer(this.host,s).finally(()=>{this.inFlightRequests.delete(c)});this.inFlightRequests.set(c,a);const n=yield a;return i&&n&&this.metaCache.setRequestFor(c,n),n})}getAvailableResources(e){return Ru(this,arguments,void 0,function*(e,t=!0){if(t&&this.metaCache.hasResources())return nf.debug("HTTP MODE - Cached resources retrieved"),this.metaCache.getResources();const i=this.messageBuilder.createResourcesMessage(e);nf.debug(`HTTP MODE! - ${i.MESSAGE_TYPE} (getResources) message created -> `,i);const c=yield this.send(i);return this.metaCache.setResources(c),c})}commitEvent(e,t){return Ru(this,void 0,void 0,function*(){const i=this.messageBuilder.createCommitMessage(e,t);return nf.debug(`HTTP MODE! - ${i.MESSAGE_TYPE} (commit) message created -> `,i),this.send(i).then(t=>(this.maybeTurbo(e,t),t))})}maybeTurbo(e,t){var i;if(!(null===(i=null==t?void 0:t.MESSAGE_TYPE)||void 0===i?void 0:i.endsWith("_ACK")))return;if(this.ongoingTurbo[e])return void nf.debug(`${e} polling frequency is already accelerated.`);const c=this.config.polling.POLLING_MAP[e];if(!(null==c?void 0:c.TEMP_FREQUENCY)||!c.AMOUNT_OF_POLLS)return;const o=c.TEMP_FREQUENCY,s=o*c.AMOUNT_OF_POLLS,a=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP)),n=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP));for(const e of c.QUERIES)n[e]=o,a[e]||(a[e]=this.config.polling.POLLING_FREQUENCY);nf.debug(`${e} TRIGGERED -> ENFORCING TURBO | FREQUENCY=${o}ms DURATION=${s}`),this.ongoingTurbo[e]=!0,this.updateIntervals({polling:{POLLING_INTERVAL_MAP:n}}),setTimeout(()=>{nf.debug(`RESTORED ORIGINAL POLLING INTERVALS FOR ${e}`),this.updateIntervals({polling:{POLLING_INTERVAL_MAP:a}}),this.ongoingTurbo[e]=!1},s)}updateIntervals(e){const{POLLING_INTERVAL_MAP:t}=e.polling;t&&(this.config.polling.POLLING_INTERVAL_MAP=t,this.handlePollingIntervalMapUpdate(t))}handlePollingIntervalMapUpdate(e){if(e)for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t];this.config.polling.POLLING_INTERVAL_MAP[t]=i,nf.debug(`Setting polling frequency for ${t} = ${i}`),[...this.streams.values()].filter(e=>e.RESOURCE_NAME===t).forEach(e=>{var t;return null===(t=null==e?void 0:e.POLLING_FREQUENCY)||void 0===t?void 0:t.next(i)})}}};Jy.REAUTH_WAIT_MS=5e3,Jy.RETRY_DELAY_MS=1e3,Jy.MAX_RETRIES=3,Ou([b],Jy.prototype,"host",void 0),Ou([b],Jy.prototype,"isWorking",void 0),Ou([b],Jy.prototype,"_isConnected",void 0),Ou([y],Jy.prototype,"isConnected",null),Jy=Xy=Ou([Tu(0,Sb),Tu(1,Hb),Tu(2,Mb),Tu(3,ob),Tu(4,xm),Tu(5,Eb),Tu(6,Vb)],Jy);const ez=mt.createInterface(e=>e.singleton(Jy));var tz={url:"",deserializer:function(e){return JSON.parse(e.data)},serializer:function(e){return JSON.stringify(e)}},iz=function(e){function t(t,i){var c=e.call(this)||this;if(c._socket=null,t instanceof Gm)c.destination=i,c.source=t;else{var o=c._config=Nu({},tz);if(c._output=new ig,"string"==typeof t)o.url=t;else for(var s in t)t.hasOwnProperty(s)&&(o[s]=t[s]);if(!o.WebSocketCtor&&WebSocket)o.WebSocketCtor=WebSocket;else if(!o.WebSocketCtor)throw new Error("no WebSocket constructor can be found");c.destination=new ag}return c}return $u(t,e),t.prototype.lift=function(e){var i=new t(this._config,this.destination);return i.operator=e,i.source=this,i},t.prototype._resetState=function(){this._socket=null,this.source||(this.destination=new ag),this._output=new ig},t.prototype.multiplex=function(e,t,i){var c=this;return new Gm(function(o){try{c.next(e())}catch(e){o.error(e)}var s=c.subscribe({next:function(e){try{i(e)&&o.next(e)}catch(e){o.error(e)}},error:function(e){return o.error(e)},complete:function(){return o.complete()}});return function(){try{c.next(t())}catch(e){o.error(e)}s.unsubscribe()}})},t.prototype._connectSocket=function(){var e=this,t=this._config,i=t.WebSocketCtor,c=t.protocol,o=t.url,s=t.binaryType,a=this._output,n=null;try{n=c?new i(o,c):new i(o),this._socket=n,s&&(this._socket.binaryType=s)}catch(e){return void a.error(e)}var r=new Em(function(){e._socket=null,n&&1===n.readyState&&n.close()});n.onopen=function(t){if(!e._socket)return n.close(),void e._resetState();var i=e._config.openObserver;i&&i.next(t);var c=e.destination;e.destination=Fm.create(function(t){if(1===n.readyState)try{var i=e._config.serializer;n.send(i(t))}catch(t){e.destination.error(t)}},function(t){var i=e._config.closingObserver;i&&i.next(void 0),t&&t.code?n.close(t.code,t.reason):a.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),e._resetState()},function(){var t=e._config.closingObserver;t&&t.next(void 0),n.close(),e._resetState()}),c&&c instanceof ag&&r.add(c.subscribe(e.destination))},n.onerror=function(t){e._resetState(),a.error(t)},n.onclose=function(t){n===e._socket&&e._resetState();var i=e._config.closeObserver;i&&i.next(t),t.wasClean?a.complete():a.error(t)},n.onmessage=function(t){try{var i=e._config.deserializer;a.next(i(t))}catch(e){a.error(e)}}},t.prototype._subscribe=function(e){var t=this,i=this.source;return i?i.subscribe(e):(this._socket||this._connectSocket(),this._output.subscribe(e),e.add(function(){var e=t._socket;0===t._output.observers.length&&(!e||1!==e.readyState&&0!==e.readyState||e.close(),t._resetState())}),e)},t.prototype.unsubscribe=function(){var t=this._socket;!t||1!==t.readyState&&0!==t.readyState||t.close(),this._resetState(),e.prototype.unsubscribe.call(this)},t}(cg);const cz=1e4,oz=6e4;var sz;!function(e){e.Linear="linear",e.Exponential="exponential"}(sz||(sz={}));const az=(e,t)=>{const{reconnectInterval:i=cz}=e,c=i>oz?oz:i,o=Math.round(Math.log2(oz/c));return c*Math.pow(2,t%o)},nz=e=>{const{reconnectInterval:t=cz}=e;return t>oz?oz:t};class rz{constructor(){this.isConfigured=!1,this.isConnecting=!1,this.isConnected=!1,this.isReconnecting=!1,this.reconnectionLimitReached=!1,this.isConnectedSubject=new og(this.isConnected)}get hasValidSession(){return this.user.isAuthenticated}get isDisconnected(){return!this.isConnected}get isDisconnectedByServer(){return void 0!==this.closedClean&&!this.closedClean}isConnectedChanged(){var e;this.isConnected&&this.resetClosedState(),this.isConnecting=!1,this.isReconnecting=!1,null===(e=this.isConnectedSubject)||void 0===e||e.next(this.isConnected)}isReconnectingChanged(){this.isReconnecting&&(this.reconnectionLimitReached=!1)}resetClosedState(){this.closedCode=void 0,this.closedReason=void 0,this.closedClean=void 0}serialize(){return{isConfigured:this.isConfigured,isConnecting:this.isConnecting,isConnected:this.isConnected,isDisconnected:this.isDisconnected,isDisconnectedByServer:this.isDisconnectedByServer,isReconnecting:this.isReconnecting,reconnectionLimitReached:this.reconnectionLimitReached,hasValidSession:this.hasValidSession,closedCode:this.closedCode,closedReason:this.closedReason,closedClean:this.closedClean}}onClose(e){this.isConnected=!1,this.closedCode=e.code,this.closedReason=e.reason,this.closedClean=e.wasClean}}Ou([b],rz.prototype,"isConfigured",void 0),Ou([b],rz.prototype,"isConnecting",void 0),Ou([b],rz.prototype,"isConnected",void 0),Ou([b],rz.prototype,"isReconnecting",void 0),Ou([b],rz.prototype,"reconnectionLimitReached",void 0),Ou([b],rz.prototype,"closedCode",void 0),Ou([b],rz.prototype,"closedReason",void 0),Ou([b],rz.prototype,"closedClean",void 0),Ou([ib],rz.prototype,"user",void 0);const lz=mt.createInterface(e=>e.singleton(rz));class dz{constructor(e){this.interval=e}get workerScript(){return`\n const startTime = Date.now();\n setInterval(function() {\n self.postMessage(Date.now() - startTime);\n }, ${this.interval});\n `}start(e){this.stop(),this.runWorker(e)}stop(){this.worker&&(this.worker.terminate(),delete this.worker)}runWorker(e){this.worker||(this.worker=new Worker(URL.createObjectURL(new Blob([this.workerScript],{type:"text/javascript"}))),this.worker.onmessage=t=>e(t.data))}}class hz extends ig{constructor(){super()}}class uz{constructor(e,t,i,c){this._message=e,this._onMessage=t,this._onError=i,this._isSubscription=c}get sentMessage(){return this._message}get onReceivedMessage(){return this._onMessage}get onReceivedError(){return this._onError}get isSubscription(){return this._isSubscription}}let fz=class{get isConfigured(){return this.status.isConfigured}get isConnecting(){return this.status.isConnecting}get isConnected(){return this.status.isConnected}get isConnectedSubject(){return this.status.isConnectedSubject}get isDisconnected(){return this.status.isDisconnected}get isDisconnectedByServer(){return this.status.isDisconnectedByServer}get isReconnecting(){return this.status.isReconnecting}get hasValidSession(){return nf.deprecated("get hasValidSession","Use `User.isAuthenticated` from `@genesislcap/foundation-user` instead.","15.0.0"),this.user.isAuthenticated}set hasValidSession(e){nf.deprecated("set hasValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}get host(){var e;return null!==(e=this.url)&&void 0!==e?e:Uf}constructor(e,t,i,c,o,s,a){this.messageBuilder=e,this.session=t,this.serializer=i,this.uuid=c,this.status=o,this.user=s,this.config=a,this.defaultInterval=1e4,this.secondsMultiplier=1e3,this.heartbeatIsEnabled=!0,this.heartbeatInterval=this.defaultInterval,this.socketMessages=()=>this.wsMessages}get heartbeatLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeatLogging)&&void 0!==t&&t}get messageLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableMessageLogging)&&void 0!==t&&t}connect(e=Uf,t,i){var c;return this.url=e,this.connectOptions=null!=t?t:this.config.connect,this.reconnectOptions=null!=i?i:this.config.reconnect,(null===(c=this.config.isWebSocketExpression)||void 0===c?void 0:c.test(this.host))?new Promise(e=>{var t,i,c,o;nf.info(`${this.isReconnecting?"Reconnecting":"Connecting"} to ${this.url}`),this.status.isConnecting=!this.isReconnecting;(!this.isReconnecting||!(null===(t=this.reconnectOptions)||void 0===t?void 0:t.reconnectStreams))&&this.cleanMessages(),null===(i=this.socketSubscription)||void 0===i||i.unsubscribe(),this.websocket=new iz({url:this.url,openObserver:{next:()=>{this.session.setSessionStorageItem("hostUrl",this.url),this.status.isConnected=!0,this.prepareHeartbeat(),nf.info("WebSocket connection is now open"),e(this.isConnected)}},closeObserver:{next:t=>{this.status.onClose(t),this.isDisconnectedByServer&&nf.info(`WebSocket connection was closed due an error - Code: ${t.code} ${t.reason?" | Reason: "+t.reason:""}`),e(this.isConnected)}},serializer:e=>this.serializer.serialize(e),deserializer:e=>this.serializer.deserialize(e)});this.socketSubscription=this.websocket.subscribe(null!==(o=null===(c=this.connectOptions)||void 0===c?void 0:c.connectObserver)&&void 0!==o?o:{next:e=>Ru(this,void 0,void 0,function*(){var t;const i=`Response Message received for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,nf.info,i);const{SOURCE_REF:c,MESSAGE_TYPE:o}=e,s=this.getMessageHandler(c,o);if(!s)return void(e.MESSAGE_TYPE===Nb.MSG_NACK&&e.ERROR&&e.ERROR.forEach(t=>{nf.error(`MessageType: ${e.MESSAGE_TYPE} | Error Details:`,t)}));let a=!1;switch(e.MESSAGE_TYPE){case Ab.EVENT_LOGIN_AUTH_ACK:{const i=e.DETAILS;i.HEARTBEAT_INTERVAL_SECS&&void 0===(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatInterval)&&(this.heartbeatInterval=i.HEARTBEAT_INTERVAL_SECS*this.secondsMultiplier,this.prepareHeartbeat());break}case Nb.LOGOUT_ACK:return s.onReceivedMessage.call(this,e),void this.cleanMessages();case Nb.LOGON_ACK:return;case Nb.LOGOFF_ACK:break;case Nb.QUERY_UPDATE:s.isSubscription||this.sendDataLogoff(c);break;case Nb.MSG_NACK:case Nb.LOGON_NACK:a=!0}a?s.onReceivedError.call(this,{receivedMessage:e,sentMessage:s.sentMessage}):s.onReceivedMessage.call(this,e),this.wsMessages.next(e),s.isSubscription||this.removeMessageHandler(c)}),error:e=>{nf.debug("Error found: ",e),this.reconnect()},complete:()=>{var e;this.isDisconnectedByServer&&(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)?this.reconnect():nf.info("Connection is now closed")}}),this.status.isConfigured=!0}):(nf.error(`Specified host (${this.host}) is not valid WebSocket url. Connection will not proceed.`),void nf.warn("Make sure the host url starts with wss:// or ws://"))}handleExpiredSession(){return Ru(this,void 0,void 0,function*(){if(this.session.getSessionStorageItem("refreshToken")){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.send(e);this.session.setAuthResult(t),this.updateSessionAndSubscriptions(t)}else yield this.handleCookieBasedReauth()})}handleCookieBasedReauth(){return Ru(this,void 0,void 0,function*(){const e=yield Zy();e!==Ky.HANDLED_BY_OTHER_TAB?e!==Ky.FAILED&&(yield this.connect()):function(e){const t=i=>{i.key===Yy&&null===i.newValue&&(e(),window.removeEventListener("storage",t))};window.addEventListener("storage",t)}(()=>this.connect())})}updateSessionAndSubscriptions(e){(null==e?void 0:e.MESSAGE_TYPE)===Ab.EVENT_LOGIN_AUTH_ACK&&this.wsMessageHandlers.forEach(t=>{t.isSubscription&&(t.sentMessage.SESSION_AUTH_TOKEN=e.SESSION_AUTH_TOKEN,this.websocket.next(t.sentMessage))})}prepareHeartbeat(){var e,t,i,c;this.heartbeatTicker&&this.heartbeatTicker.stop();const o=()=>Ru(this,void 0,void 0,function*(){var e,t,i;if(!this.isConnected)return;const c=this.messageBuilder.createHeartbeatPingMessage(null===(e=this.connectOptions)||void 0===e?void 0:e.verboseHeartbeat);(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatPingCallback)&&this.connectOptions.heartbeatPingCallback(c);const o=yield this.send(c);this.user.isAuthenticated&&!o.IS_AUTHENTICATED&&this.handleExpiredSession(),(null===(i=this.connectOptions)||void 0===i?void 0:i.heartbeatPongCallback)&&this.connectOptions.heartbeatPongCallback(o),this.heartbeatIsEnabled=o.MESSAGE_TYPE===Nb.HEARTBEAT_PONG&&o.SOURCE_REF===c.SOURCE_REF});if(null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeat)&&void 0!==t?t:this.heartbeatIsEnabled){const e=null!==(c=null===(i=this.connectOptions)||void 0===i?void 0:i.heartbeatInterval)&&void 0!==c?c:this.heartbeatInterval;this.heartbeatTicker=new dz(e),this.heartbeatTicker.start(()=>{this.websocket&&this.isConnected&&(o(),this.heartbeatLoggingIsEnabled&&nf.debug(`Sending a heartbeat ping every ${e} ms`))})}}reconnect(){var e,t,i,c,o;const s=!(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)&&!1===(null===(t=this.connectOptions)||void 0===t?void 0:t.enableHeartbeat);if(this.isReconnecting||s)return;this.status.isReconnecting=!0;const a=(null===(i=this.reconnectOptions)||void 0===i?void 0:i.reconnectStrategy)===sz.Exponential?az:nz,n=this.isConnectedSubject.asObservable().pipe(gv(e=>e?Qg(-1):((e,t)=>new Gm(i=>{let c,o=0;return function s(){i.next(o),clearTimeout(c),c=setTimeout(s,t(e,o)),o+=1}(),()=>{clearTimeout(c)}}))(this.reconnectOptions,a).pipe(lv(e=>{var t,i,c;let o;return o=(null===(t=this.connectOptions)||void 0===t?void 0:t.alwaysOn)?e+1:null!==(c=null===(i=this.reconnectOptions)||void 0===i?void 0:i.reconnectAttempts)&&void 0!==c?c:10,e<o?Qg(e):(this.status.reconnectionLimitReached=!0,Xg(()=>new Error(`Max reconnect attempts ${o} reached.`)))}))),vv(()=>this.websocket&&!this.isConnected));n.subscribe(null!==(o=null===(c=this.reconnectOptions)||void 0===c?void 0:c.reconnectObserver)&&void 0!==o?o:{next:e=>{nf.debug(`Attempt no. ${e+1} to reconnect`),this.websocket.complete(),this.connect(this.url,this.connectOptions,this.reconnectOptions)},error:e=>{var t;nf.debug(e),null===(t=this.socketSubscription)||void 0===t||t.unsubscribe(),this.status.isReconnecting=!1},complete:()=>{nf.info(this.isConnected?"Reconnected":"Disconnected"),this.status.isReconnecting=!1,this.wsMessageHandlers.forEach(e=>{e.isSubscription&&this.websocket.next(e.sentMessage)})}})}reset(){this.status.isConnected=!1,this.status.isConfigured=!1,this.websocket&&this.websocket.complete(),this.websocket=null,this.cleanMessages()}cleanMessages(){this.wsMessages&&this.wsMessages.complete(),this.wsMessages=new hz,this.wsMessageHandlers=new Map}send(e,t=!0){if(!this.isConnected)return Promise.reject(new Error("WebSocket connection is closed"));const i=`Sending Message for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,nf.info,i),new Promise((i,c)=>{const o=e=>{i(e)},s=e=>{c(e)};t&&this.setMessageHandler(e,o,s),this.websocket.next(e)})}sendForStream(e,t,i,c){if(!this.isConnected)return Xg(()=>new Error("WebSocket connection is closed"));const o=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,nf.info,o),this.setMessageHandler(e,t,i,!0),p.queueUpdate(()=>this.websocket.next(e)),new Gm(t=>{const i=this.wsMessages.pipe(fv(t=>t.SOURCE_REF===e.SOURCE_REF)).subscribe({next:e=>{t.next(e)},error:e=>{t.error(e)},complete:()=>{t.complete()}});return()=>{i.unsubscribe(),this.sendDataLogoff(e.SOURCE_REF),this.removeMessageHandler(e.SOURCE_REF),c&&c()}})}sendForStreamWithoutTeardown(e,t,i){if(!this.isConnected)return Xg(()=>new Error("WebSocket connection is closed"));const c=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,nf.info,c),this.setMessageHandler(e,t,i,!0),this.websocket.next(e),this.wsMessages.pipe(fv(t=>t.SOURCE_REF===e.SOURCE_REF))}setMessageHandler(e,t,i,c=!1){const o=`Setting Message Handler for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,nf.debug,o),this.wsMessageHandlers.set(e.SOURCE_REF,new uz(e,t,i,c))}sendDataLogoff(e){this.send(this.messageBuilder.createDataLogoffMessage(e),!1)}removeMessageHandler(e){this.wsMessageHandlers.delete(e)}getMessageHandler(e,t){const i=`Getting Message Handler for SourceRef: ${e} | MessageType: ${t}`;return this.logMessageTypeFlow(t,nf.debug,i),this.wsMessageHandlers.get(e)}logMessageTypeFlow(e,t,i){switch(e){case Ab.DATA_LOGOFF:t(i);break;case Nb.HEARTBEAT_PING:case Nb.HEARTBEAT_PONG:this.heartbeatLoggingIsEnabled&&t(i);break;default:this.messageLoggingIsEnabled&&t(i)}}};Ou([b],fz.prototype,"websocket",void 0),Ou([b],fz.prototype,"wsMessages",void 0),Ou([b],fz.prototype,"wsMessageHandlers",void 0),Ou([Sb],fz.prototype,"http",void 0),Ou([b],fz.prototype,"heartbeatIsEnabled",void 0),fz=Ou([Tu(0,Hb),Tu(1,Mb),Tu(2,xm),Tu(3,Jv),Tu(4,lz),Tu(5,ib),Tu(6,mb)],fz);const pz=mt.createInterface(e=>e.singleton(fz));let mz=class{get isConnected(){return this.socket.isConnected}get isConnectedSubject(){return this.socket.isConnectedSubject}get isConnected$(){var e;return null===(e=this.socket.isConnectedSubject)||void 0===e?void 0:e.asObservable()}get host(){return this.socket.host}constructor(e,t,i,c,o,s){this.socket=e,this.messageBuilder=t,this.metaCache=i,this.events=c,this.config=o,this.transport=s,this.isWorking=!1,this.inFlightRequests=new Map}httpMode(){return!1}get useHttpReqRep(){return"true"===Vf||Ff("forceHttpReqRep")}get httpHost(){return this.transport.toHttpHost(this.socket.host)}sendReqRep(e){return this.useHttpReqRep?this.transport.post(this.httpHost,e):this.socket.send(e)}setValidSession(e){nf.deprecated("setValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}send(e,t){return this.socket.send(e,t)}connect(){return Ru(this,arguments,void 0,function*(e=Uf){return this.socket.reset(),this.socket.connect(e,this.config.connect,this.config.reconnect)})}disconnect(){this.socket.reset()}snapshot(e,t){return Ru(this,void 0,void 0,function*(){const i=this.messageBuilder.createDataLogonMessage(e,t);return nf.debug(`${i.MESSAGE_TYPE} (snapshot) message created -> `,i),this.socket.send(i)})}stream(e,t,i,c){const o=this.messageBuilder.createDataLogonMessage(e,c);nf.debug(`${o.MESSAGE_TYPE} (stream) message created -> `,o);const s=performance.now();let a=null;const n=this.socket.sendForStream(o,(...i)=>{null===a&&(a=performance.now(),nf.debug(`[stream:${e}] time to initial response: ${(a-s).toFixed(2)}ms`)),t(...i)},t=>{i(t),this.events.onStreamErrorEvent(e,n,t)},()=>{this.events.onStreamCompleteEvent(e,n)});return this.events.onStreamEvent(e,o,n,{onMessage:t,onError:i}),n}streamState(e,t=()=>{},i=()=>{},c,o=[]){return this.stream(e,t,i,c).pipe(pv(Qy,o))}streamWithoutAutoTeardown(e,t,i,c){nf.deprecated("streamWithoutAutoTeardown","Please use 'stream' api instead.","15.0.0");const o=this.messageBuilder.createDataLogonMessage(e,c);nf.debug(`${o.MESSAGE_TYPE} (stream without auto-teardown) message created -> `,o);const s=this.socket.sendForStreamWithoutTeardown(o,t,t=>{i(t),this.events.onStreamErrorEvent(e,s,t)});return this.events.onStreamEvent(e,o,s,{onMessage:t,onError:i}),s}getMoreRows(e,t){return Ru(this,void 0,void 0,function*(){const i=this.messageBuilder.createMoreRowsMessage(e,t);return nf.debug(`${i.MESSAGE_TYPE} message created -> `,i),this.socket.send(i,!1)})}getMoreColumns(e){return Ru(this,void 0,void 0,function*(){const t=this.messageBuilder.createMoreColumnsMessage(e);return this.socket.send(t)})}dataLogoff(e){return Ru(this,void 0,void 0,function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return nf.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t)})}getMetadata(e){return Ru(this,arguments,void 0,function*(e,t=!0){var i;if(t&&this.metaCache.hasMetadataFor(e))return nf.debug(`Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const c=this.messageBuilder.createMetaRequestMessage(e);let o,s;nf.debug(`${c.MESSAGE_TYPE} (metadata) message created -> `,c);try{this.isWorking=!0;const t=yield this.sendReqRep(c);o=null!==(i=null==t?void 0:t.DETAILS)&&void 0!==i?i:{},Object.keys(o).length&&this.metaCache.setMetadataFor(e,o)}catch(e){throw s=e,nf.error(e),e instanceof Error?e:new Error(String(e))}finally{this.events.onMetadataEvent(e,c,s),this.isWorking=!1}return o})}getJSONSchema(e){return Ru(this,arguments,void 0,function*(e,t=!0){var i;if(t&&this.metaCache.hasJsonSchemaFor(e))return nf.debug(`Cached JsonSchema retrieved for ${e}`),this.metaCache.getJsonSchemaFor(e);const c=this.messageBuilder.createMetaRequestMessage(e,Ab.JSON_SCHEMA_REQUEST);let o;nf.debug(`${c.MESSAGE_TYPE} (json schema) message created -> `,c);try{this.isWorking=!0,o=null!==(i=yield this.sendReqRep(c))&&void 0!==i?i:{},Object.keys(o).length&&this.metaCache.setJsonSchemaFor(e,o)}catch(e){nf.error(e)}finally{this.isWorking=!1}return o})}request(e,t){return Ru(this,arguments,void 0,function*(e,t,i=!1){const c=Ib(e,t);if(i&&this.metaCache.hasRequestFor(c))return nf.debug(`Cached request response retrieved for ${c}`),this.metaCache.getRequestFor(c);const o=this.inFlightRequests.get(c);if(o)return nf.debug(`In-flight request collapsed for ${c}`),o;const s=this.messageBuilder.createRequestMessage(e,t);nf.debug(`${s.MESSAGE_TYPE} (request server) message created -> `,s);const a=(this.useHttpReqRep?this.transport.requestServer(this.httpHost,s):this.socket.send(s)).finally(()=>{this.inFlightRequests.delete(c)});this.inFlightRequests.set(c,a);const n=yield a;return i&&n&&this.metaCache.setRequestFor(c,n),n})}getAvailableResources(e){return Ru(this,arguments,void 0,function*(e,t=!0){if(t&&this.metaCache.hasResources())return nf.debug("Cached resources retrieved"),this.metaCache.getResources();const i=this.messageBuilder.createResourcesMessage(e);nf.debug(`${i.MESSAGE_TYPE} (resources) message created -> `,i);const c=yield this.sendReqRep(i);return this.metaCache.setResources(c),c})}commitEvent(e,t){return Ru(this,void 0,void 0,function*(){const i=this.messageBuilder.createCommitMessage(e,t);nf.debug(`${i.MESSAGE_TYPE} (commit) message created -> `,i);const c=this.sendReqRep(i);return this.events.onCommitEvent(e,i),c.then(t=>(this.events.onCommitResponseEvent(e,t),t))})}};Ou([b],mz.prototype,"isWorking",void 0),mz=Ou([Tu(0,pz),Tu(1,Hb),Tu(2,ob),Tu(3,fb),Tu(4,mb),Tu(5,Vb)],mz);const gz="true"===Pf||Ff("forceHttp"),vz=mt.createInterface(e=>e.singleton(mz)),bz=mt.createInterface(e=>gz?e.aliasTo(ez):e.aliasTo(vz));class yz{serialize(e){return nf.deprecated("serialize","Use `serialize` from `JSONSerializer` from `@genesislcap/foundation-utils` instead."),JSON.stringify(e)}deserialize(e){return nf.deprecated("deserialize","Use `deserialize` from `JSONSerializer` from `@genesislcap/foundation-utils` instead."),e?"string"==typeof e?JSON.parse(e):e.data?JSON.parse(e.data):e.text().then(e=>JSON.parse(e)):Promise.resolve({})}}
|
|
56
56
|
/*! js-cookie v3.0.7 | MIT */
|
|
57
|
-
function zz(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var c in i)"__proto__"!==c&&(e[c]=i[c])}return e}mt.createInterface(e=>e.singleton(yz));var Cz={read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};var Lz=function e(t,i){function c(e,c,o){if("undefined"!=typeof document){"number"==typeof(o=zz({},i,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in o)o[a]&&(s+="; "+a,!0!==o[a]&&(s+="="+o[a].split(";")[0]));return document.cookie=e+"="+t.write(c,e)+s}}return Object.create({set:c,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var i=document.cookie?document.cookie.split("; "):[],c={},o=0;o<i.length;o++){var s=i[o].split("="),a=s.slice(1).join("=");try{var n=decodeURIComponent(s[0]);if(n in c||(c[n]=t.read(a,n)),e===n)break}catch{}}return e?c[e]:c}},remove:function(e,t){c(e,"",zz({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,zz({},this.attributes,t))},withConverter:function(t){return e(zz({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}(Cz,{path:"/"});const xz=mt.createInterface();function Mz(){return(null===navigator||void 0===navigator?void 0:navigator.credentials)?"PasswordCredential"in window||(nf.warn("PasswordCredential not available in this browser."),!1):(nf.warn("CredentialsContainer not available in this browser."),!1)}const wz=":";function Sz(e="",t=wz,i){return e.split(t,i).map(e=>e.trim()).filter(e=>""!==e)}function kz(e,t=wz){const i="string"==typeof e&&e.trim();return!!i&&i.includes(t)}function Ez(e,t=wz){return"string"==typeof e&&e.trim()?(e.match(new RegExp(t,"g"))||[]).length:0}function $z(e,t=wz){for(const i of e)if(kz(i,t))return i;return e.find(e=>"string"==typeof e&&""!==e.trim())}function Nz(e,t,i){const c="string"==typeof e&&e.trim();return!c||i&&!c.includes(i)||Ez(c)>1?i&&t&&i!==t?`${t}:${i}`:t||i:c}function Az(e="credential"){nf.warn(`Unable to migrate legacy ${e} to latest format. Please remove from your browser.`)}const Oz={password:!0,mediation:"optional"},Tz={cookie:{path:"/",name:"credentials",expires:7300,storePasswords:!1}};let Rz=class{constructor(e,t=Tz){this.session=e,this.config=t}createBasicCredentials(e){return{type:$b.BASIC,username:e.username,password:e.password,mfaToken:this.getMFAToken()}}createRefreshCredentials(e){var t,i,c;return{type:$b.REFRESH,username:null!==(t=null==e?void 0:e.username)&&void 0!==t?t:this.getUsername(),refreshToken:null!==(i=null==e?void 0:e.refreshToken)&&void 0!==i?i:this.getRefreshToken(),mfaToken:null!==(c=null==e?void 0:e.mfaToken)&&void 0!==c?c:this.getMFAToken()}}createSSOCredentials(e){var t;return{type:$b.SSO,ssoToken:null!==(t=null==e?void 0:e.ssoToken)&&void 0!==t?t:this.getSSOToken()}}validateBasicCredentials(e){return e&&!!e.username&&!!e.password}validateRefreshCredentials(e){return e&&!!e.refreshToken&&!!e.username}validateSSOCredentials(e){return e&&!!e.ssoToken}validateUserCredentialData(e,t){const i=e&&!!e.id&&!!e.name&&!e.name.includes(wz)&&Ez(e.id)<=1;return t?i&&!!e.password:i}normaliseLegacyCredentialData(e,t){if(this.validateUserCredentialData(e,!0))return[e,!0];if(this.validateUserCredentialData(t))return[t,!1];if(e)try{const t=e,[i]=Sz(t.name||t.id),[c,o]=Sz($z([t.id,t.name]));return[{id:Nz(t.id||t.name,i,o),name:i,password:t.password||""},!0]}catch(e){Az("PasswordCredential")}if(t)try{const e=t,[i]=Sz(e.name||e.username||e.organisation),[c,o]=Sz($z([e.organisation||e.username||e.name]));return[{id:Nz(e.id||e.username||e.name,i,o),name:i,password:e.password||""},!1]}catch(e){Az("cookie")}return[void 0,!1]}storeCredentialsInContainer(e){return Ru(this,void 0,void 0,function*(){if(!Mz())return;const t=new PasswordCredential(e);return nf.debug("Storing credentials in CredentialsContainer"),navigator.credentials.store(t)})}getCredentialsFromContainer(){return Ru(this,arguments,void 0,function*(e=Oz){if(Mz())return nf.debug("Getting credentials from CredentialsContainer"),yield navigator.credentials.get(e)})}storeCredentialsInCookie(e){const t=Au(e,["password"]),i=this.config.cookie.storePasswords?e:t;return nf.debug("Storing credentials in cookie"),!!Lz.set(this.config.cookie.name,JSON.stringify(i),{expires:this.config.cookie.expires,domain:location.hostname,path:this.config.cookie.path,secure:!0})}getCredentialsFromCookie(){nf.debug("Getting credentials from cookie");const e=Lz.get(this.config.cookie.name);return e?JSON.parse(e):void 0}storeCredentials(e){return Ru(this,void 0,void 0,function*(){if(Mz()){const t=yield this.storeCredentialsInContainer(e);return Promise.resolve(!!t)}return Promise.resolve(this.storeCredentialsInCookie(e))})}getCredentials(e){return Ru(this,void 0,void 0,function*(){return Mz()?this.getCredentialsFromContainer(e):Promise.resolve(this.getCredentialsFromCookie())})}getSSOToken(){return this.session.getSessionStorageItem("ssoToken")}getUsername(){return this.session.getSessionStorageItem("username")||this.session.getLocalStorageItem("username")}getRefreshToken(){return this.session.getSessionStorageItem("refreshToken")||this.session.getLocalStorageItem("refreshToken")}getMFAToken(){return this.session.getSessionStorageItem("mfaToken")}removeCookie(){Lz.remove(this.config.cookie.name,{domain:location.hostname,path:this.config.cookie.path})}removeSSOToken(){this.session.removeSessionStorageItem("ssoToken")}removeUsername(){this.session.removeSessionStorageItem("username"),this.session.removeLocalStorageItem("username")}removeRefreshToken(){this.session.removeSessionStorageItem("refreshToken"),this.session.removeLocalStorageItem("refreshToken")}removeMFAToken(){this.session.removeSessionStorageItem("mfaToken")}removeAll(){this.removeCookie(),this.removeSSOToken(),this.removeUsername(),this.removeRefreshToken(),this.removeMFAToken()}preventSilentAccess(){return Mz()&&navigator.credentials.preventSilentAccess()}};Rz=Ou([Tu(0,Mb),Tu(1,yt(xz))],Rz);const Iz=mt.createInterface(e=>e.singleton(Rz)),Dz=e=>Array.isArray(e)?e.map(e=>null!=e?e:""):[],Fz=e=>{try{if("EVENT_LOGIN_AUTH_ACK"===(null==e?void 0:e.MESSAGE_TYPE)){const{DETAILS:c}=e,o={messageType:e.MESSAGE_TYPE,sourceRef:e.SOURCE_REF,userName:e.USER_NAME,updateQueue:e.UPDATE_QUEUE,zeroMqProxyModeEnabled:e.ZERO_MQ_PROXY_MODE_ENABLED,zeroMqProxyInboundPort:e.ZERO_MQ_PROXY_INBOUND_PORT,zeroMqProxyOutboundPort:e.ZERO_MQ_PROXY_OUTBOUND_PORT,userKVs:e.USER,details:c?{system:(i=c.SYSTEM,i?{date:i.DATE}:null),heartbeatIntervalSecs:c.HEARTBEAT_INTERVAL_SECS,failedLoginAttempts:c.FAILED_LOGIN_ATTEMPTS,rejectedLoginAttempts:c.REJECTED_LOGIN_ATTEMPTS,lastLoginDatetime:c.LAST_LOGIN_DATETIME,daysToPasswordExpiry:c.DAYS_TO_PASSWORD_EXPIRY,product:(t=c.PRODUCT,t?t.map(e=>({name:e.NAME,version:e.VERSION})):[])}:null,permission:Dz(e.PERMISSION),profile:Dz(e.PROFILE)};return o}throw new Error("No Entity mapping implementation for provided DTO")}catch(e){throw nf.error(e),e}var t,i};let Hz=class{loggedUserResultChanged(){var e;null===(e=this.isLoggedInSubject)||void 0===e||e.next(this.isLoggedIn)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}get isLoggedIn(){return this.currentUser.isAuthenticated}constructor(e,t,i,c,o){this.session=e,this.connect=t,this.messageBuilder=i,this.credentialManager=c,this.currentUser=o,this.isWorking=!1,this.isLoggedInSubject=new og(this.isLoggedIn),this.currentUser.addAuthenticationChangeListener(e=>{var t;null===(t=this.isLoggedInSubject)||void 0===t||t.next(e.detail)})}login(e){return Ru(this,void 0,void 0,function*(){var t;this.isWorking=!0;try{const i=this.messageBuilder.createLoginMessage(e),c=yield this.connect.send(i);if(!c||c.ERROR||(null===(t=c.DETAILS)||void 0===t?void 0:t.ERROR))throw new Tb(i,c);this.applyAuthResults({authToken:c.SESSION_AUTH_TOKEN,refreshToken:c.REFRESH_AUTH_TOKEN,profiles:c.PROFILE,username:c.USER_NAME,permissions:c.PERMISSION,sessionId:c.SESSION_ID}),this.currentUser.set(Fz(c)),this.session.setAuthResult(c),nf.debug("Login Authentication Result:",c)}catch(e){if(nf.error("Login Authentication Error:",e),!(e instanceof Tb&&e.isIgnorableError()))throw this.removeAuthResults(),this.currentUser.unset(),e;nf.warn("Ignoring authentication error as it is a known edge case.")}finally{this.isWorking=!1}return this.loggedUserResult})}logout(){return Ru(this,void 0,void 0,function*(){var e;this.isWorking=!0;let t={success:!1};try{const i=this.messageBuilder.createLogoutMessage(this.loggedUserResult);this.session.deleteUserFromSessionStorage();const{CODE:c,DETAILS:o,ERROR:s,MESSAGE_TYPE:a,OIDC_LOGOUT_URL:n}=yield this.connect.send(i),r=null!==(e=null==o?void 0:o.ERROR)&&void 0!==e?e:s,l=a===Nb.LOGOUT_NACK;l&&nf.warn("Unexpected Logout NACK received during logout.",r),t={success:a===Nb.LOGOUT_ACK||c===Ob.SESSION_NOT_FOUND||!l,error:r},n&&window.open(n,"_self")}catch(e){const i=new Tb(e.sentMessage,e.receivedMessage);if(nf.error("Logout Authentication Error:",i),!i.isIgnorableError())throw e;nf.warn("Ignoring authentication error as it is a known edge case."),t.success=!0}finally{this.removeAuthResults(),this.currentUser.unset(),this.isWorking=!1}return t})}reAuthFromSession(){return Ru(this,void 0,void 0,function*(){const e=yield this.ensureConnection(),t=this.credentialManager.createRefreshCredentials();if(e&&this.credentialManager.validateRefreshCredentials(t)){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.connect.send(e);if((null==t?void 0:t.MESSAGE_TYPE)===Ab.EVENT_LOGIN_AUTH_ACK)return this.session.setAuthResult(t),this.currentUser.set(Fz(t)),this.applyAuthResults(this.getLoggedUserFromMessage(t)),!0}return this.session.deleteUserFromSessionStorage(),this.currentUser.unset(),!1})}ensureConnection(){return Ru(this,void 0,void 0,function*(){if(this.connect.isConnected)return!0;const e=this.session.getSessionStorageItem("hostUrl");return!!e&&this.connect.connect(e)})}getLoggedUserFromMessage(e){const t=e.USER_NAME,i=e.SESSION_AUTH_TOKEN,c=e.REFRESH_AUTH_TOKEN;return t&&i&&c?{username:t,authToken:i,refreshToken:c,profiles:e.PROFILE,permissions:e.PERMISSION,sessionId:e.SESSION_ID}:null}applyAuthResults(e){e?this.loggedUserResult={authToken:e.authToken,refreshToken:e.refreshToken,profiles:e.profiles,username:e.username,permissions:e.permissions,sessionId:e.sessionId}:this.removeAuthResults()}removeAuthResults(){this.loggedUserResult=null}};Ou([b],Hz.prototype,"isWorking",void 0),Ou([b],Hz.prototype,"loggedUserResult",void 0),Hz=Ou([Tu(0,Mb),Tu(1,bz),Tu(2,Hb),Tu(3,Iz),Tu(4,ib)],Hz);const _z=mt.createInterface(e=>e.singleton(Hz));function Pz(e,t){const i=new Date(e),c=i.getUTCFullYear(),o=String(i.getUTCMonth()+1).padStart(2,"0"),s=String(i.getUTCDate()).padStart(2,"0");if(t)return`${c}${o}${s}`;return`${c}${o}${s}-${String(i.getUTCHours()).padStart(2,"0")}:${String(i.getUTCMinutes()).padStart(2,"0")}`}function Vz(e,t="ROW_REF"){const i=e=>{var i;const c=null!==(i=e.DETAILS[t])&&void 0!==i?i:e[t],o=Object.assign(Object.assign({},e),{[t]:c});return delete o.DETAILS,o},c=[],o=[],s=[];for(const t of e.ROW)if(t.DETAILS)switch(t.DETAILS.OPERATION){case"INSERT":c.push(i(t));break;case"MODIFY":s.push(i(t));break;case"DELETE":o.push(i(t));break;default:nf.error(`Unsupported operation type: '${t.DETAILS.OPERATION}'`)}return{inserts:c,deletes:o,updates:s,SOURCE_REF:e.SOURCE_REF}}class Bz{}Bz.MAX_ROWS_250=250,Bz.MAX_VIEW_1000=1e3,Bz.REQ_REP_POLLING_INTERVAL_MS=1e4,Bz.DATASERVER_ROW_ID="ROW_REF",Bz.REQUEST_SERVER_ROW_ID="RECORD_ID",Bz.DEFAULT_PAGINATION_PAGE_SIZE=25,Bz.DEFAULT_REQ_REP_OFFSET=0;const Uz={options:{criteria:"",isSnapshot:!1,maxRows:Bz.MAX_ROWS_250,maxView:Bz.MAX_VIEW_1000,pollingInterval:Bz.REQ_REP_POLLING_INTERVAL_MS,movingView:!1,orderBy:"",resourceName:"",reverse:!1,pollTriggerEvents:[]},criteriaToFields:function(e){if(!e)return{};const t=e.split("&&").map(e=>e.trim()),i={};return t.forEach(e=>{if(e)if(e.startsWith("Expr"))!function(e,t){const i=e.match(/Expr\.(\w+)\(/);if(i)switch(i[1]){case"dateIsToday":{const i=/Expr\.dateIsToday\((\w+)\)/,c=e.match(i);if(c){const[,e]=c,i=new Date;t[`${e}_FROM`]=`${i.toISOString().replace(/-/g,"").split("T")[0]}-00:00`,i.setDate(i.getDate()+1),t[`${e}_TO`]=`${i.toISOString().replace(/-/g,"").split("T")[0]}-00:00`}break}case"dateTimeIsGreaterEqual":{const i=/Expr\.dateTimeIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[`${e}_FROM`]=i}break}case"dateTimeIsLessEqual":{const i=/Expr\.dateTimeIsLessEqual\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[`${e}_TO`]=i}break}case"dateIsGreaterEqual":{const i=/Expr\.dateIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[`${e}_FROM`]=i}break}case"dateIsLessEqual":{const i=/Expr\.dateIsLessEqual\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[`${e}_TO`]=i}break}case"containsIgnoreCase":{const i=/Expr\.containsIgnoreCase\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[e]=`*${i}*`}break}}}(e,i);else if(/[A-Z_]+\s*(>=|<=)\s*\d+/.test(e)){const t=e.match(/([A-Z_]+)\s*>=\s*(\d+)/);if(t){const[,e,c]=t,o=parseInt(c,10),s=e.toUpperCase(),a=s.includes("DATE")&&!s.includes("DATETIME");i[`${e}_FROM`]=Pz(o,a)}const c=e.match(/([A-Z_]+)\s*<=\s*(\d+)/);if(c){const[,e,t]=c,o=parseInt(t,10),s=e.toUpperCase(),a=s.includes("DATE")&&!s.includes("DATETIME");i[`${e}_TO`]=Pz(o,a)}}else!function(e,t){const i=e.substr(0,e.indexOf("=")).trim().replace(/["']/g,""),c=e.substr(e.lastIndexOf("=")+1,e.length).trim().replace(/["']/g,"");t[i]=c}(e,i)}),i},dataServerResultFilter:Vz},jz=mt.createInterface(e=>e.instance(Uz)),qz=e=>{class t extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var t;const i=void 0!==this.data;this.resourceName||i||nf.warn("Target classes must have a resourceName or data property to use the DatasourceEventHandler mixin.");const c=e.detail;if(c.name===this.resourceName){const e=null!==(t=this.datasourceStatus)&&void 0!==t?t:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==c.isInitialized||c.metadataRequired&&e.hasMetadata!==c.hasMetadata)&&(this.datasourceStatus=c)}})}datasourceStatusChanged(e,t){nf.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(rb,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(rb,this.onDatasourceStatusChanged,{capture:!0})}}return Ou([b],t.prototype,"datasourceStatus",void 0),t},Gz={throwWhenUnavailable:!0,throwWhenUnknown:!1},Wz=mt.createInterface(e=>e.instance(Gz)),Yz=ff("genesis-resources");let Kz=class{constructor(e,t){this.connect=e,this.config=t}isValidResource(e){return Ru(this,void 0,void 0,function*(){if(!(e=null==e?void 0:e.trim()))return!1;yield this.fetchResources();return!!this.resources.find(t=>t.RESOURCE_NAME===e)})}getResourceTypeFor(e){return Ru(this,void 0,void 0,function*(){yield this.fetchResources();const t=this.resources.find(t=>t.RESOURCE_NAME===e);if(t)return t.RESOURCE_TYPE;const i=`${e} resource does not exist.`;if(nf.error(i),this.config.throwWhenUnknown)throw new Error(i)})}getAllResources(){return Ru(this,void 0,void 0,function*(){return this.resources||(yield this.fetchResources()),this.resources})}destroy(){this.resources=void 0,this.resourcesPromise=void 0}fetchResources(){return Ru(this,void 0,void 0,function*(){var e;if(this.resources)return Promise.resolve();if(this.resourcesPromise)yield this.resourcesPromise;else{this.resourcesPromise=this.connect.getAvailableResources();const t=yield this.resourcesPromise;if(this.resources=null==t?void 0:t.RESOURCES,!(null===(e=this.resources)||void 0===e?void 0:e.length)){const e="Genesis resources unavailable.";if(nf.error(e),this.config.throwWhenUnavailable)throw new Error(e)}this.postLoadedMessage(),this.resourcesPromise=void 0}})}postLoadedMessage(){const e=mt.getOrCreateDOMContainer().get(Yz);e.postMessage("resources-loaded",this.resources),e.close()}};Kz=Ou([Tu(0,bz),Tu(1,Wz)],Kz);const Zz=mt.createInterface(e=>e.singleton(Kz));let Qz=class{get initialized(){var e;return!!(null===(e=this.status)||void 0===e?void 0:e.isInitialized)}constructor(e,t,i,c,o){this.connect=e,this.auth=t,this.resources=i,this.config=c,this.connectEvents=o,this.fetchMetadataRequired=!0,this.startStreamRequired=!0,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.criteriaOnlyRequest=!1,this.loadMoreCount=0,this.readOnly=!0,this._allParams=null,this.pollTrigger$=new ig}triggerPoll(){this.pollTrigger$.next()}validResourceName(e){return nf.deprecated("Datasource.validResourceName","Use `GenesisResources.isValidResource` instead."),!!e&&!!e.trim().length}init(e){return Ru(this,arguments,void 0,function*(e,t=this.fetchMetadataRequired,i=this.startStreamRequired){this.fetchMetadataRequired=t,this.options=Object.assign(Object.assign({},this.config.options),e),this.invalidateCache();const c=this.options.resourceName;if(!(this.connect.isConnected||(yield this.connect.connect())))return nf.error(`Unable to connect to ${this.connect.host} to get ${c} datasource`),this.reportStatus(),!1;return(yield this.resources.isValidResource(c))?(this.resourceType=yield this.resources.getResourceTypeFor(c),this.resourceType?(this.fetchMetadataRequired&&(yield this.fetchAndApplyMetadata(this.options.resourceName),this._allParams=null),nf.debug(`Initializing ${c} datasource from ${this.connect.host}`),!this.options.isSnapshot&&i&&(this.pollTrigger$=new ig,this.stream=yield this.createStream()),nf.debug(`${c} datasource initialization ${this.initialized?"was successful.":"has failed."}`),this.reportStatus(),this.initialized):(nf.error(`Unable to get the resource type for ${c} datasource from ${this.connect.host}`),this.reportStatus(),!1)):(nf.error(`${c} datasource does not exist on ${this.connect.host}`),this.reportStatus(),!1)})}startStream(){return Ru(this,void 0,void 0,function*(){this.options.isSnapshot||void 0!==this.stream||(this.stream=yield this.createStream())})}destroy(){var e,t;nf.debug("Datasource.destroy",null===(e=this.options)||void 0===e?void 0:e.resourceName),this.commitResponseUnsubscribe&&(this.commitResponseUnsubscribe(),this.commitResponseUnsubscribe=void 0),null===(t=this.pollTrigger$)||void 0===t||t.complete(),this.status=void 0,this.fetchMetadataRequired=!0,this.options={},this.resourceType=void 0,this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.criteriaOnlyRequest=!1,this.loadMoreCount=0,this.stream=void 0}get allResourceParams(){var e;if(this._allParams)return this._allParams;let t;if(this.options.orderBy)if(this.criteriaOnlyRequest||(null===(e=this.availableIndexes)||void 0===e?void 0:e.findIndex(e=>e.NAME===this.options.orderBy))>-1)t=this.options.orderBy;else{const e=this.availableIndexes.map(e=>e.NAME);nf.warn("Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:",e)}return this._allParams={CRITERIA_MATCH:this.options.criteria,MAX_ROWS:this.options.maxRows,ORDER_BY:t,VIEW_NUMBER:this.options.viewNumber,FIELDS:this.options.fields,MAX_VIEW:this.options.maxView,MOVING_VIEW:this.options.movingView,REVERSE:this.options.reverse,DISABLE_POLLING:this.options.disablePolling,OFFSET:this.options.offset,POLLING_INTERVAL:this.options.pollingInterval,REQUEST:this.options.request},nf.debug("Getting configured params:",this._allParams),this._allParams}get dataserverOnlyParams(){return{CRITERIA_MATCH:this.allResourceParams.CRITERIA_MATCH,MAX_ROWS:this.allResourceParams.MAX_ROWS,VIEW_NUMBER:this.allResourceParams.VIEW_NUMBER,FIELDS:this.allResourceParams.FIELDS,MAX_VIEW:this.allResourceParams.MAX_VIEW,MOVING_VIEW:this.allResourceParams.MOVING_VIEW,ORDER_BY:this.allResourceParams.ORDER_BY,REVERSE:this.allResourceParams.REVERSE}}get requestOnlyParams(){const e=this.allResourceParams,{REQUEST:t}=e,i=Au(e,["REQUEST"]);return{DETAILS:{CRITERIA_MATCH:this.options.requestAutoSetup?void 0:i.CRITERIA_MATCH,MAX_ROWS:i.MAX_ROWS,OFFSET:i.OFFSET,ORDER_BY:i.ORDER_BY,VIEW_NUMBER:i.VIEW_NUMBER},REQUEST:this.criteriaOnlyRequest?{}:null!=t?t:this.buildRequestFields()}}buildRequestFields(){if(!this.options.requestAutoSetup)return{};const e=Object.fromEntries(this.requestFields.map(e=>[e.NAME,"*"])),t=this.options.criteria?this.config.criteriaToFields(this.options.criteria):{};return Object.assign(Object.assign({},e),t)}updateLoadMoreCount(e){this.loadMoreCount=e}snapshot(e){return Ru(this,void 0,void 0,function*(){switch(nf.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`),this.resourceType){case nb.DATASERVER:return this.connect.snapshot(this.options.resourceName,Object.assign(Object.assign({},this.dataserverOnlyParams),e));case nb.REQUEST_SERVER:return this.connect.request(this.options.resourceName,Object.assign(Object.assign({},this.requestOnlyParams),e));default:throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`)}})}snapshotFiltered(){return Ru(this,arguments,void 0,function*(e="ROW_REF"){const t=yield this.snapshot();return Array.isArray(t)?t:t.REPLY?t.REPLY:t.ROW?this.config.dataServerResultFilter(t,e).inserts:void 0})}createStream(){return Ru(this,void 0,void 0,function*(){if(![nb.DATASERVER,nb.REQUEST_SERVER].includes(this.resourceType))throw new Error(`Streaming not supported for selected resource type: ${this.resourceType}`);return this.resourceType===nb.DATASERVER?this.createDataserverStream():(nf.debug(`Creating fake stream by polling ${this.options.resourceName} REQUEST_SERVER`),this.createReqRepStream())})}createDataserverStream(){return Ru(this,void 0,void 0,function*(){return this.connect.stream(this.options.resourceName,e=>{},e=>nf.error(e),this.dataserverOnlyParams)})}createReqRepStream(){this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener(e=>{var t;const{eventName:i,response:c}=e.detail;this.options.pollTriggerEvents&&this.options.pollTriggerEvents.includes(i)&&(null===(t=c.MESSAGE_TYPE)||void 0===t?void 0:t.endsWith("_ACK"))&&(nf.debug(`Received commit response for ${i}, triggering poll.`),this.triggerPoll())});const e=this.allResourceParams.DISABLE_POLLING?void 0:this.allResourceParams.POLLING_INTERVAL,t=()=>{const e=this.requestOnlyParams;if(this.resourceType===nb.REQUEST_SERVER&&this.loadMoreCount>0){const t=25,i=(this.options.maxRows||t)*(this.loadMoreCount+1);e.DETAILS.MAX_ROWS=i}return nv([this.connect.isConnected$,this.auth.isLoggedIn$]).pipe(vv(()=>this.connect.isConnected&&this.auth.isLoggedIn),gv(()=>Zg(this.snapshot(e))))};return e?this.pollTrigger$.pipe(mv(0),gv(()=>uv(0,e).pipe(gv(t)))):this.pollTrigger$.pipe(mv(0),gv(t))}fetchAndApplyMetadata(e){return Ru(this,void 0,void 0,function*(){var t,i,c,o;try{nf.debug(`Requesting metadata for ${this.options.resourceName} Datasource`);const e=yield this.connect.getMetadata(this.options.resourceName);e&&(this.availableIndexes=null!==(t=e.INDEXES)&&void 0!==t?t:[],this.availableSortableFields=null!==(i=e.SORTABLE_FIELDS)&&void 0!==i?i:[],this.availableCriteriaFields=null!==(c=e.CRITERIA_FIELDS)&&void 0!==c?c:[],this.originalFieldDef=db(e),this.fieldMetadata=lb(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.criteriaOnlyRequest=e.CRITERIA_ONLY_REQUEST||!1,this.fetchMetadataRequired=!1),this.status=this.normaliseStatus({isInitialized:!0,metadataRequired:!0,hasMetadata:(null===(o=this.fieldMetadata)||void 0===o?void 0:o.length)>0})}catch(t){nf.error(`Metadata Fetch failed for ${e}:`,t),this.status=this.normaliseStatus({isInitialized:!1,metadataRequired:!0,hasMetadata:!1})}})}reportStatus(e={}){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseStatus(e),nf.debug(`Dispatching '${rb}'`,this.status),null==i||i.dispatchEvent(new CustomEvent(rb,{detail:this.status,bubbles:i!==document,composed:!0}))}normaliseStatus(e){var t,i,c,o,s;const a=null!==(t=e.isInitialized)&&void 0!==t?t:this.initialized,n=null!==(i=e.metadataRequired)&&void 0!==i?i:this.fetchMetadataRequired,r=null!==(c=e.hasMetadata)&&void 0!==c?c:(null===(o=this.fieldMetadata)||void 0===o?void 0:o.length)>0;return{name:null===(s=this.options)||void 0===s?void 0:s.resourceName,type:this.resourceType,isInitialized:a,metadataRequired:n,hasMetadata:r}}invalidateCache(){this._allParams=null}};Ou([b],Qz.prototype,"status",void 0),Ou([b],Qz.prototype,"fetchMetadataRequired",void 0),Ou([b],Qz.prototype,"startStreamRequired",void 0),Ou([b],Qz.prototype,"originalFieldDef",void 0),Ou([b],Qz.prototype,"fieldMetadata",void 0),Ou([b],Qz.prototype,"requestFields",void 0),Ou([b],Qz.prototype,"customRequestFields",void 0),Ou([b],Qz.prototype,"availableIndexes",void 0),Ou([b],Qz.prototype,"availableSortableFields",void 0),Ou([b],Qz.prototype,"availableCriteriaFields",void 0),Ou([b],Qz.prototype,"criteriaOnlyRequest",void 0),Ou([b],Qz.prototype,"loadMoreCount",void 0),Ou([b],Qz.prototype,"readOnly",void 0),Ou([b],Qz.prototype,"stream",void 0),Qz=Ou([Tu(0,bz),Tu(1,_z),Tu(2,Zz),Tu(3,jz),Tu(4,ub)],Qz);const Xz=mt.createInterface(e=>e.transient(Qz));class Jz extends Qz{constructor(){super(...arguments),this.entityCache=[],this.entityMap=new Map,this.rowId="ROW_REF",this.initialize=e=>Ru(this,void 0,void 0,function*(){return this.disconnect(),this.options=Object.assign({},e.options),this.mapper=e.mapper,this.initialized=yield this.init(this.options,e.fetchMeta),this.initialized?(this.subscription=this.stream.subscribe(e=>{this.sourceRef=e.SOURCE_REF,this.subscriptionLoggedOff=e.MESSAGE_TYPE===Nb.LOGOFF_ACK;const t=e.ROW;!this.subscriptionLoggedOff&&t&&this.updateCache(this.config.dataServerResultFilter(e,this.rowId))}),!0):(nf.debug(`EntityDatasource init failed for ${this.options.resourceName}`),!1)}),this.disconnect=()=>{var e;null===(e=this.subscription)||void 0===e||e.unsubscribe(),this.entityCache=[]}}get initialized(){return this._initialized}set initialized(e){this._initialized=e}get cache(){if(!this.initialized)throw new Error("Please initialize EntityDatasource before querying.");return this.entityCache}get isEmpty(){return 0===this.entityCache.length}updateCache(e){var t;this.isEmpty,null===(t=e.deletes)||void 0===t||t.forEach(e=>{const t=e[this.rowId];this.entityMap.delete(t)}),this.processRowDataUpdate(e.inserts,!0),this.processRowDataUpdate(e.updates);this.entityCache=[{}].map(e=>this.mapper.fromDTO(e))}processRowDataUpdate(e,t=!1){e.forEach(e=>{const i=e[this.rowId],c=this.entityMap.get(i);if(c&&t)throw new Error("Existing entity found in map while inserting.");const o=this.mapper.fromDTO(e),s=c?Object.assign(Object.assign({},c),o):o;this.entityMap.set(i,s)})}}function eC(e,t=";"){return e?e.split(t).map(e=>e.trim()).sort((e,t)=>e.localeCompare(t)).join(t):e}mt.createInterface(e=>e.transient(Jz));const tC="system-health-changed",iC={windowEvents:["online","offline","pageshow"],documentEvents:["visibilitychange"],genesisConnectEvents:["stream","commit"],ignoredGenesisResources:[],startDelay:5e3,checkInterval:1e4,checkTimeout:3e3,resourceChecks:e=>Ru(void 0,void 0,void 0,function*(){const t=mt.getOrCreateDOMContainer().get(bz),i=yield t.getMoreColumns(e),c=Date.now(),o=i;return{isConnected:i.MESSAGE_TYPE===Nb.MORE_COLUMNS_ACK,lastUpdated:c,lastMessage:o}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:c}=t;mt.getOrCreateDOMContainer().get(pz).sendForStream(e,i,c)}},cC=mt.createInterface(e=>e.instance(iC));var oC,sC={exports:{}};var aC,nC,rC=(oC||(oC=1,function(e){e.exports=function(e){var t={};function i(c){if(t[c])return t[c].exports;var o=t[c]={i:c,l:!1,exports:{}};return e[c].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,c){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(i.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(c,o,function(t){return e[t]}.bind(null,o));return c},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){t.__esModule=!0,t.default=void 0;var c=i(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});t.push(0);var i=t[0],c=t[1];if(10===i)switch(c){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(i){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,i,c){void 0===c&&(c=!1);var o=e.getVersionPrecision(t),s=e.getVersionPrecision(i),a=Math.max(o,s),n=0,r=e.map([t,i],function(t){var i=a-e.getVersionPrecision(t),c=t+new Array(i+1).join(".0");return e.map(c.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(c&&(n=a-Math.min(o,s)),a-=1;a>=n;){if(r[0][a]>r[1][a])return 1;if(r[0][a]===r[1][a]){if(a===n)return 0;a-=1}else if(r[0][a]<r[1][a])return-1}},e.map=function(e,t){var i,c=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)c.push(t(e[i]));return c},e.find=function(e,t){var i,c;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,c=e.length;i<c;i+=1){var o=e[i];if(t(o,i))return o}},e.assign=function(e){for(var t,i,c=e,o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var n=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){c[t]=e[t]})};for(t=0,i=s.length;t<i;t+=1)n();return e},e.getBrowserAlias=function(e){return c.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return c.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,i){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(91))&&c.__esModule?c:{default:c},s=i(18);function a(e,t){for(var i=0;i<t.length;i++){var c=t[i];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}var n=function(){function e(){}var t,i,c;return e.getParser=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new o.default(e,t,i)},e.parse=function(e,t){return void 0===t&&(t=null),new o.default(e,t).getResult()},t=e,c=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(i=null)&&a(t.prototype,i),c&&a(t,c),e}();t.default=n,e.exports=t.default},91:function(e,t,i){t.__esModule=!0,t.default=void 0;var c=r(i(92)),o=r(i(93)),s=r(i(94)),a=r(i(95)),n=r(i(17));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var c=!1;"boolean"==typeof t?(c=t,this._hints=i):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==c&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),i=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return i?i.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=n.default.find(c.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=n.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=n.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=n.default.find(a.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return n.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,i={},c=0,o={},s=0;if(Object.keys(e).forEach(function(t){var a=e[t];"string"==typeof a?(o[t]=a,s+=1):"object"==typeof a&&(i[t]=a,c+=1)}),c>0){var a=Object.keys(i),r=n.default.find(a,function(e){return t.isOS(e)});if(r){var l=this.satisfies(i[r]);if(void 0!==l)return l}var d=n.default.find(a,function(e){return t.isPlatform(e)});if(d){var h=this.satisfies(i[d]);if(void 0!==h)return h}}if(s>0){var u=Object.keys(o),f=n.default.find(u,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(o[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var i=this.getBrowserName().toLowerCase(),c=e.toLowerCase(),o=n.default.getBrowserTypeByAlias(c);return t&&o&&(c=o.toLowerCase()),c===i},t.compareVersion=function(e){var t=[0],i=e,c=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(c=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(c=!0,i=e.substr(1)),t.indexOf(n.default.compareVersions(o,i,c))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=l,e.exports=t.default},92:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(17))&&c.__esModule?c:{default:c},s=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},i=o.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},i=o.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},i=o.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},i=o.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},i=o.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},i=o.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},i=o.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},i=o.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},i=o.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},i=o.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},i=o.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},i=o.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},i=o.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},i=o.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},i=o.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},i=o.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},i=o.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},i=o.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},i=o.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},i=o.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},i=o.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},i=o.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),c=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),s=o.default.getFirstMatch(/se ([\d.]+)x/i,e),a=i||c||s;return a&&(t.version=a),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var i={name:"DuckDuckGo"};if(t){var c=t.getBrandVersion("DuckDuckGo");if(c)return i.version=c,i}var s=o.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return s&&(i.version=s),i}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var i={name:"Brave"};if(t){var c=t.getBrandVersion("Brave");if(c)return i.version=c,i}return i}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(17))&&c.__esModule?c:{default:c},s=i(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=o.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},i=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=o.default.getMacOSVersionName(t),c={name:s.OS_MAP.MacOS,version:t};return i&&(c.versionName=i),c}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=o.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=o.default.getAndroidVersionName(t),c={name:s.OS_MAP.Android,version:t};return i&&(c.versionName=i),c}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:s.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(17))&&c.__esModule?c:{default:c},s=i(18),a=[{test:[/googlebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=o.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),i={type:s.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(i.model=t),i}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(17))&&c.__esModule?c:{default:c},s=i(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},i=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},i=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},i=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},i=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=a,e.exports=t.default}})}(sC)),sC.exports),lC=sp(rC);var dC,hC=function(){if(nC)return aC;nC=1,aC=s,s.default=s,s.stable=l,s.stableStringify=l;var e="[...]",t="[Circular]",i=[],c=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,s,a){var r;void 0===a&&(a=o()),n(e,"",0,[],void 0,0,a);try{r=0===c.length?JSON.stringify(e,t,s):JSON.stringify(e,h(t),s)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var l=i.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return r}function a(e,t,o,s){var a=Object.getOwnPropertyDescriptor(s,o);void 0!==a.get?a.configurable?(Object.defineProperty(s,o,{value:e}),i.push([s,o,t,a])):c.push([t,o,e]):(s[o]=e,i.push([s,o,t]))}function n(i,c,o,s,r,l,d){var h;if(l+=1,"object"==typeof i&&null!==i){for(h=0;h<s.length;h++)if(s[h]===i)return void a(t,i,c,r);if(void 0!==d.depthLimit&&l>d.depthLimit)return void a(e,i,c,r);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void a(e,i,c,r);if(s.push(i),Array.isArray(i))for(h=0;h<i.length;h++)n(i[h],h,h,s,i,l,d);else{var u=Object.keys(i);for(h=0;h<u.length;h++){var f=u[h];n(i[f],f,h,s,i,l,d)}}s.pop()}}function r(e,t){return e<t?-1:e>t?1:0}function l(e,t,s,a){void 0===a&&(a=o());var n,r=d(e,"",0,[],void 0,0,a)||e;try{n=0===c.length?JSON.stringify(r,t,s):JSON.stringify(r,h(t),s)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var l=i.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return n}function d(c,o,s,n,l,h,u){var f;if(h+=1,"object"==typeof c&&null!==c){for(f=0;f<n.length;f++)if(n[f]===c)return void a(t,c,o,l);try{if("function"==typeof c.toJSON)return}catch(e){return}if(void 0!==u.depthLimit&&h>u.depthLimit)return void a(e,c,o,l);if(void 0!==u.edgesLimit&&s+1>u.edgesLimit)return void a(e,c,o,l);if(n.push(c),Array.isArray(c))for(f=0;f<c.length;f++)d(c[f],f,f,n,c,h,u);else{var p={},m=Object.keys(c).sort(r);for(f=0;f<m.length;f++){var g=m[f];d(c[g],g,f,n,c,h,u),p[g]=c[g]}if(void 0===l)return p;i.push([l,o,c]),l[o]=p}n.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(c.length>0)for(var o=0;o<c.length;o++){var s=c[o];if(s[1]===t&&s[0]===i){i=s[2],c.splice(o,1);break}}return e.call(this,t,i)}}return aC}(),uC=sp(hC);const fC=af("network-monitor",{level:ju.info}),pC=Date.now(),mC=(null===(dC=window.navigator)||void 0===dC?void 0:dC.userAgent)?lC.parse(window.navigator.userAgent):void 0,gC=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:uC(e,void 0,2,t);class vC{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>Ru(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;fC.info("Run health checks, triggered by",gC(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const c=yield this.isOnlineCheck();c?fC.debug(`Network connected at ${i}`):fC.warn(`Network disconnected at ${i}`);const o=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),c),s=this.preFlightSocketChecks(o);if(s||fC.debug("Socket pre-flight checks failed"),!c||!s){fC.debug("Aborting remaining health checks");const e=[...this.resources].reduce((e,[t,i])=>{const o=e[i.resourceName];return o?(o.sourceRef=[...o.sourceRef,i.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[i.resourceName]:this.normaliseResourceHealth({name:i.resourceName,sourceRef:[i.message.SOURCE_REF],isConnected:i.isConnected,lastUpdated:i.lastUpdated},c)})},{});return this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:c,resources:e,resourcesAllConnected:!1,socket:o}),void(this.isRunningChecks=!1)}let a=!0;const n=[];this.resources.forEach((e,t)=>{const{resourceName:c,message:o,functions:s}=e,{resourceChecks:r=this.config.resourceChecks,resourceDataLogon:l=this.config.resourceDataLogon}=s,{SOURCE_REF:d}=o;let h,u,f,p,m,g=!1;n.push((()=>Ru(this,void 0,void 0,function*(){var o,s,n;try{fC.debug(`Running health check against ${c}`);const e=yield Promise.race([r(d,t),(s=this.config.checkTimeout,n=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(n())},s)}))]);g=e.isConnected,h=e.lastUpdated,u=e.lastMessage,p=e.timeout}catch(e){g=!1,h=this.getNowTimestamp(),f=e,u=null!==(o=null==e?void 0:e.receivedMessage)&&void 0!==o?o:e}return m=(null==u?void 0:u.MESSAGE_TYPE)===Nb.MSG_NACK||Db(u,yb.NOT_FOUND),i=this.getFormattedTimestamp(null!=h?h:this.getNowTimestamp()),g?fC.debug(`${c} is healthy at ${i}`):fC.warn(`${c} is not healthy at ${i}`),u&&fC.debug(`${c} messaged at ${i}`,gC(u)),f&&fC.error(`${c} errored at ${i}`,gC(f)),p&&fC.warn(`${c} timed out at ${i}`),m&&(fC.error(`${c} issue, re-attempting data logon at ${i}`),l(e)),a&&(a=g),{name:c,sourceRef:[d],isConnected:g,lastUpdated:h,lastError:f}}))())});const r=(yield Promise.allSettled(n)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return fC.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});fC.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:c,resources:r,resourcesAllConnected:a,socket:o}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(fC.level=this.config.logLevel)}create(){this.resources?fC.warn("NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first."):(this.addListeners(),this.resources=new Map,setTimeout(()=>{this.isReady=!0,this.synchroniseCheckInterval(),this.runAllChecks("NetworkMonitor.create()")},this.config.startDelay))}destroy(){this.removeListeners(),clearInterval(this.internalId),this.resources.clear(),this.resources=void 0,this.status=void 0,this.isReady=void 0}isOnlineCheck(){return Promise.resolve(navigator.onLine)}addResource(e,t){this.resources||this.create(),this.resources.set(e,t)}removeResource(e){this.resources.delete(e)}addListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes("stream")&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{const{functions:t,message:i,resourceName:c,stream:o}=e;this.config.ignoredGenesisResources.includes(c)||this.addResource(o,{functions:t,message:i,resourceName:c})},({detail:e})=>{const{resourceName:t,stream:i}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(i)},({detail:e})=>{var t;const{resourceName:i,stream:c,error:o}=e,s=null!==(t=o.receivedMessage)&&void 0!==t?t:o;let a="";Db(s,yb.NOT_FOUND)?a="Please check the resource is running.":Db(s,yb.FORBIDDEN)&&(a="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(c)),fC.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,a,o)})),this.config.genesisConnectEvents.includes("commit")&&this.unsubscribableObservers.push(this.connectEvents.addCommitListener(e=>{this.config.ignoredGenesisResources.includes(e.detail.eventName)||this.runAllChecks(e)})),this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({detail:e})=>{const{resourceName:t,error:i}=e;i&&fC.error(`${t} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,"Please check the resource is running.",i)}))}removeListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.removeEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.removeEventListener(e,this.runAllChecks)),this.unsubscribableObservers.forEach(e=>e()),this.unsubscribableObservers.length=0}reportSystemHealth(e){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseEventDetail(e);(this.status.isHealthy?fC.debug:fC.warn)("Emitting 'system-health-changed' event",gC(this.status)),null==i||i.dispatchEvent(new CustomEvent(tC,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(fC.debug("Network monitoring no longer required. Please check your network and reload your application."),this.destroy())}reportStabilityToGenesis(e){return Ru(this,void 0,void 0,function*(){return fC.debug("User requested report stability to Genesis."),fC.info("Please attach this data to your Genesis Support request: \n",JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){var i;const c=!!t&&e.isConnected,o=null!==(i=e.lastUpdated)&&void 0!==i?i:this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:c,lastUpdated:o})}normaliseSerializedSocketStatus(e,t=!0){const i=!!t&&e.isConnected,c=!i;return Object.assign(Object.assign({},e),{isConnected:i,isDisconnected:c})}normaliseEventDetail(e){var t,i,c,o;const s=!!((null===(t=e.socket)||void 0===t?void 0:t.isConfigured)?e.isOnline&&(null===(i=e.socket)||void 0===i?void 0:i.isConnected)&&e.resourcesAllConnected:e.isOnline),a=null!==(c=e.lastUpdated)&&void 0!==c?c:this.getNowTimestamp(),n=null!==(o=e.nextUpdate)&&void 0!==o?o:this.getNextTimestamp(),r=e.isAuthenticated&&this.user?this.user.username:void 0,l=Object.assign(Object.assign({},e),{browserInformation:mC,username:r,isHealthy:s,lastUpdated:a,nextUpdate:n,firstUpdated:pC,runAllChecks:()=>{fC.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(l)});return l}preFlightSocketChecks(e){if(!e.isConfigured)return fC.debug("Socket not configured"),!1;if(e.isReconnecting)return fC.debug("Socket reconnecting"),!1;if(e.isConnecting)return fC.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return fC.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&fC.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return fC.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return Jf(e)}getNowTimestamp(){return Date.now()}getNextTimestamp(){return new Date(Date.now()+this.config.checkInterval).getTime()}synchroniseCheckInterval(){clearInterval(this.internalId),this.internalId=setInterval(()=>this.runAllChecks("check interval"),this.config.checkInterval)}}Ou([cC],vC.prototype,"config",void 0),Ou([lz],vC.prototype,"socketStatus",void 0),Ou([ub],vC.prototype,"connectEvents",void 0),Ou([ib],vC.prototype,"user",void 0),Ou([b],vC.prototype,"status",void 0);const bC=mt.createInterface(e=>e.singleton(vC)),yC={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},zC=mt.createInterface();var CC,LC;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(CC||(CC={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(LC||(LC={}));let xC=class{constructor(e,t,i=yC){this.connect=e,this.user=t,this.kvStorageConfig=i}delete(e){return Ru(this,void 0,void 0,function*(){const t={DETAILS:{KEYS:e}},i=yield this.connect.commitEvent(LC.EVENT_KEY_VALUE_DELETE,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}get(e){return Ru(this,void 0,void 0,function*(){var t;const i={REQUEST:{USER_NAME:null!==(t=this.kvStorageConfig.authEmail)&&void 0!==t?t:this.user.userName,KEY:e}},c=yield this.connect.request(CC.REQ_KEY_VALUE_READ,i);if(c&&c.REPLY&&c.REPLY.length>0){const t=c.REPLY.map(e=>{const t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let t=If(e);return"string"==typeof t&&t.startsWith("str:")&&(t=If(t)),"string"==typeof t&&t.startsWith("bin:")&&(t=If(t)),t}list(){return Ru(this,void 0,void 0,function*(){var e;const t={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},i=yield this.connect.request(CC.REQ_KEY_VALUE_LIST,t);if(i&&i.REPLY&&i.REPLY.length>0){return i.REPLY.map(e=>e.KEY)}return[]})}put(e){return Ru(this,void 0,void 0,function*(){const t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?Df(e.value):e.value}))}},i=yield this.connect.commitEvent(LC.EVENT_KEY_VALUE_PUT,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}};xC=Ou([Tu(0,bz),Tu(1,ib),Tu(2,yt(zC))],xC),mt.createInterface(e=>e.singleton(xC));class MC{constructor(){this.isWorking=!1,this.loggedUserResult=null,this.currentUser=null,this.isLoggedIn=!1,this.isLoggedInSubject=new og(!1)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}login(e){return Ru(this,void 0,void 0,function*(){return Promise.resolve(this.nextLoginResult)})}logout(){return Ru(this,void 0,void 0,function*(){return Promise.resolve(this.nextLogoutResult)})}reAuthFromSession(){return Ru(this,void 0,void 0,function*(){return Promise.resolve(this.nextReAuthResult)})}setTestUser(e={}){this.currentUser=new tb,this.currentUser.set(Object.assign({userName:"JaneDee",profile:["USER"],permission:["CreateRules"]},e)),this.isLoggedIn=!0,this.isLoggedInSubject.next(!0)}resetTestUser(){this.currentUser=null,this.isLoggedIn=!1,this.isLoggedInSubject.next(!1)}}Ou([b],MC.prototype,"isWorking",void 0),Ou([b],MC.prototype,"loggedUserResult",void 0),Ou([b],MC.prototype,"currentUser",void 0),Ou([b],MC.prototype,"isLoggedIn",void 0);class wC{constructor(){this.fetchMetadataRequired=!0,this.fetchingMetadata=!1,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.criteriaOnlyRequest=!1}init(e,t){return Promise.resolve(this.initialized)}startStream(){return Promise.resolve()}setMetadata(e){var t,i,c;this.availableIndexes=null!==(t=e.INDEXES)&&void 0!==t?t:[],this.availableSortableFields=null!==(i=e.SORTABLE_FIELDS)&&void 0!==i?i:[],this.availableCriteriaFields=null!==(c=e.CRITERIA_FIELDS)&&void 0!==c?c:[],this.originalFieldDef=db(e),this.fieldMetadata=lb(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.fetchMetadataRequired=!1}unsetMedata(){this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.fetchMetadataRequired=!0}setStream(e){this.stream=Zg(Promise.resolve(e))}unsetStream(){this.stream=void 0}deinit(){}destroy(){}validResourceName(e){return!!e&&!!e.trim().length}getMetadata(e){return Promise.resolve(this.fieldMetadata)}snapshot(e){return Promise.resolve(null)}snapshotFiltered(e){return Promise.resolve(null)}updateData(e){return Promise.resolve()}dataHandler(e){return[]}addView(e){}dropView(e){}setFilter(e,t,i){return Promise.resolve()}clearFilter(e){return Promise.resolve()}createItem(e){return Promise.resolve("")}deleteItem(e){return Promise.resolve()}updateItem(e,t){return Promise.resolve()}get dataserverOnlyParams(){return{}}get requestOnlyParams(){return{}}updateLoadMoreCount(e){}}Ou([b],wC.prototype,"status",void 0),Ou([b],wC.prototype,"fetchMetadataRequired",void 0),Ou([b],wC.prototype,"originalFieldDef",void 0),Ou([b],wC.prototype,"fieldMetadata",void 0),Ou([b],wC.prototype,"requestFields",void 0),Ou([b],wC.prototype,"customRequestFields",void 0),Ou([b],wC.prototype,"availableIndexes",void 0),Ou([b],wC.prototype,"availableSortableFields",void 0),Ou([b],wC.prototype,"availableCriteriaFields",void 0),Ou([b],wC.prototype,"criteriaOnlyRequest",void 0),mt.createInterface(e=>e.aliasTo(ib));const SC=af("foundation-ui");class kC extends(qz(Wt)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=Bz.MAX_ROWS_250,this.maxView=Bz.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new og(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==eC(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(this[t]=e[t])})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){var e;return this.rowId?this.rowId:(null===(e=this.datasource)||void 0===e?void 0:e.resourceType)===nb.REQUEST_SERVER?Bz.REQUEST_SERVER_ROW_ID:Bz.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return Ru(this,arguments,void 0,function*(e=!0){var t,i;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.fetchGeneration+=1;const c=this.fetchGeneration,o=()=>c!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const s=e||!this.datasource.initialized;s||(this.connect.dataLogoff(this.sourceRef),this.clearData()),this.sourceRef=void 0;const a=yield this.datasource.init(this.datasourceOptions(),s);if(!o())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshot();if(o())return;const t=this.filterSnapshotResult(e);return this.updateRequestPagingState(e,null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0,this.initialRequestOffset()),void this.syncComponentData(t)}SC.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(o())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF,"boolean"==typeof e.MORE_ROWS&&(this.moreRowsAvailable=e.MORE_ROWS);const t=e.MESSAGE_TYPE;if(t&&t===Nb.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=Vz(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return Ru(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}canRequestMoreRows(){if(!this.isConnected||!this.datasource||!this.moreRowsAvailable)return!1;switch(this.datasource.resourceType){case nb.REQUEST_SERVER:return!0;case nb.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return Ru(this,void 0,void 0,function*(){var e;if(this.canRequestMoreRows())try{if(this.datasource.resourceType===nb.DATASERVER)return void(yield this.connect.getMoreRows(this.sourceRef));const t=this.fetchGeneration,i=this.nextRequestOffset;this.moreRowsAvailable=!1;const c=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS),{OFFSET:i})});if(t!==this.fetchGeneration)return;const o=Array.isArray(null==c?void 0:c.REPLY)?c.REPLY:[];this.updateRequestPagingState(c,o.length,i),o.length>0&&this.handleStreamInserts(o)}catch(e){throw this.moreRowsAvailable=!0,this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:"error",loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e)return Array.isArray(e)?e:e.REPLY?e.REPLY:e.ROW?Vz(e).inserts:void 0}updateRequestPagingState(e,t,i){if(Array.isArray(e)||!e)return void(this.moreRowsAvailable=!1);const c=e,o=Number(this.maxRows)||0;this.moreRowsAvailable="boolean"==typeof c.MORE_ROWS?c.MORE_ROWS:t>0&&o>0&&t>=o,this.nextRequestOffset="number"==typeof c.NEXT_OFFSET&&c.NEXT_OFFSET>0?c.NEXT_OFFSET:i+t}initialRequestOffset(){var e,t;return Number(null===(t=null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.OFFSET)||0}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh)return null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),void this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));this.handleStreamInserts(e.REPLY);const c=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(c)}applyDataserverData(e){var t,i,c,o;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(c=e.deletes)||void 0===c?void 0:c.length)>0&&this.handleStreamDeletes(e.deletes),(null===(o=e.updates)||void 0===o?void 0:o.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;return eC(((null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[]).join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:i,loggerArgs:c=[]}=e;t&&SC[i](t,...c)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===sb.DATE||t===sb.DATETIME?ep(e,t===sb.DATETIME):e}}Ou([bz],kC.prototype,"connect",void 0),Ou([Xz],kC.prototype,"datasource",void 0),Ou([de({mode:"boolean"})],kC.prototype,"withGridInit",void 0),Ou([de],kC.prototype,"criteria",void 0),Ou([b],kC.prototype,"data",void 0),Ou([de],kC.prototype,"fields",void 0),Ou([de({mode:"boolean"})],kC.prototype,"isSnapshot",void 0),Ou([de],kC.prototype,"maxRows",void 0),Ou([de],kC.prototype,"maxView",void 0),Ou([de],kC.prototype,"orderBy",void 0),Ou([de],kC.prototype,"request",void 0),Ou([de],kC.prototype,"resourceName",void 0),Ou([de({mode:"boolean"})],kC.prototype,"reverse",void 0),Ou([de],kC.prototype,"rowId",void 0),Ou([de({mode:"boolean",attribute:"with-timestamp-formatting"})],kC.prototype,"withTimestampFormatting",void 0);const EC=(e,t)=>!e.composedPath().includes(t),$C=(e,t)=>e.composedPath().includes(t),NC=e=>e.tagName.toLowerCase().split("-")[0];const AC=af("foundation-criteria");var OC;!function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(OC||(OC={}));class TC{constructor(e){this.$$operator=e}static And(){return new TC(OC.AND)}static Or(){return new TC(OC.OR)}static Not(){return new TC(OC.NOT)}static GreaterThan(){return new TC(OC.GT)}static GreaterThanOrEqual(){return new TC(OC.GE)}static LessThan(){return new TC(OC.LT)}static LessThanOrEqual(){return new TC(OC.LE)}static NotEqual(){return new TC(OC.NE)}static Equal(){return new TC(OC.EQ)}get operator(){return this.$$operator}}const RC=e=>{const{value:t}=e;return e.valueGetter?e.valueGetter(t):"function"==typeof t?t(e):Array.isArray(t)?t.join(","):"string"==typeof t?`"${t}"`:t},IC=e=>t=>`${t.field} ${e} ${RC(t)}`,DC={AND:e=>IC(OC.AND)(e),OR:e=>IC(OC.OR)(e),NOT:e=>IC(OC.NOT)(e),GT:e=>IC(OC.GT)(e),GE:e=>IC(OC.GE)(e),LT:e=>IC(OC.LT)(e),LE:e=>IC(OC.LE)(e),NE:e=>IC(OC.NE)(e),EQ:e=>IC(OC.EQ)(e),equals:e=>`${e.field}.equals(${RC(e)})`,equalsIgnoreCase:e=>`${e.field}.equalsIgnoreCase(${RC(e)})`,contains:e=>`Expr.contains(${e.field}, ${RC(e)})`,fieldContains:e=>`${e.field}.contains(${RC(e)})`,containsIgnoreCase:e=>`Expr.containsIgnoreCase(${e.field}, ${RC(e)})`,startsWith:e=>`${e.field}.startsWith(${RC(e)})`,endsWith:e=>`${e.field}.endsWith(${RC(e)})`,dateIsToday:e=>`Expr.dateIsToday(${e.field})`,dateIsEqual:e=>`Expr.dateIsEqual(${e.field}, ${RC(e)})`,dateIsGreaterEqual:e=>`Expr.dateIsGreaterEqual(${e.field}, ${RC(e)})`,dateIsLessEqual:e=>`Expr.dateIsLessEqual(${e.field}, ${RC(e)})`,dateTimeIsGreaterEqual:e=>`Expr.dateTimeIsGreaterEqual(${e.field}, ${RC(e)})`,dateTimeIsLessEqual:e=>`Expr.dateTimeIsLessEqual(${e.field}, ${RC(e)})`},FC=e=>Array.isArray(e)?e:[e],HC="default";class _C{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,TC.And()),this.Or=(e,t={})=>this.withExpression(e,t,TC.Or()),this.Not=(e,t={})=>this.withExpression(e,t,TC.Not())}withExpression(e,t={},i=TC.And()){const{condition:c,join:o,groupName:s}=t,a=(e,t=HC)=>{var s;const a=null!==(s=this.expressions[t])&&void 0!==s?s:[];this.expressions[t]=[...a,{join:i||o,condition:c,expression:e}]};if(Array.isArray(e))if(o){const t=e.filter(e=>{const t=e instanceof TC;return t&&AC.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t});if(s)t.forEach(e=>{a(e,s)});else{const e=(n=o,t.flat().flatMap((e,t,i)=>i.length-1!==t?[e,n]:e));a(e,HC)}}else a(e,HC);else a(e,"string"==typeof e?HC:e.group);var n;return this}build(e){const t=Object.entries(this.expressions).reduce((e,[t,i])=>Object.assign(Object.assign({},e),{[t]:`(${i.filter(({condition:e})=>!e||e()).map(({expression:e,join:t},i,c)=>this.parseExpression(e,c[i-1],t)).join("")})`}),{});return e?e(t):`(${Object.values(t).join(" && ")})`}reset(){this.expressions={}}parseExpression(e,t,i){const c=[];return i&&t&&c.push(` ${i.operator} `),"string"==typeof e?c.push(e):Array.isArray(e)?(e.forEach((e,t,i)=>{if(e instanceof TC){if(i[t-1]instanceof TC)throw new Error("Adjacent Join operations detected")}}),c.push(`(${e.map(e=>this.parseExpression(e,void 0)).join("")})`)):e instanceof TC?c.push(` ${e.operator} `):e&&c.push(e.serialiser(e)),c.join("")}}class PC{constructor(e){this.serialiser=DC.EQ,this.build=()=>{if(!this.field)throw new Error("Missing required param 'field'");if(void 0===this.value)throw new Error("Missing required param 'value'");if(!this.serialiser)throw new Error("Missing required param 'serialise'");return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}}let VC=class extends ze{constructor(){super(...arguments),this.criteriaOptions=[],this.createCriteria=e=>{const t=new _C,{field:i,serialiser:c,value:o}=e;return Array.isArray(i)||Array.isArray(o)?t.And(FC(o).map(e=>FC(i).map(t=>(new PC).withField(t).withValue(e).withSerialiser(c).build())),{join:TC.Or()}):t.And((new PC).withField(i).withValue(o).withSerialiser(c).build()),t}}valueChanged(){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}selectedLabelChanged(){const e=this.criteriaOptions.find(e=>e.label===this.selectedLabel);this.value=e?this.createCriteria(e).build():""}itemClickHandler(e){this.selectedLabel===e&&(this.selectedLabel=void 0)}};function BC(e,t){var i;const c=new _C;c.withExpression((new PC).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(DC.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${c.build()}`:e.criteria=c.build()}Ou([b],VC.prototype,"criteriaOptions",void 0),Ou([b],VC.prototype,"prefix",void 0),Ou([b],VC.prototype,"value",void 0),Ou([b],VC.prototype,"selectedLabel",void 0),VC=Ou([Ce({name:"criteria-segmented-control",template:((e="rapid")=>K`<${e}-segmented-control :value="${Of(e=>e.selectedLabel)}"><slot name="label" slot='label'></slot>${We(e=>e.criteriaOptions,K`<${e}-segmented-item @click=${(e,t)=>t.parent.itemClickHandler(e.label)}value=${e=>e.label}>${e=>e.label}</${e}-segmented-item>`)}</${e}-segmented-control>`)(),styles:Me``})],VC);const UC=(e,t,i)=>K`<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>`,jC=e=>K`<${e}-button id="actiosnMenuTrigger" class="actions-opener${e=>e.open?" opened":""}" appearance="${e=>e.buttonAppearance}" part="actions-opener" @click=${e=>e.toggleActionsMenuVisibility()}>${e=>e.open?"✖":K` ${e.name} `}</${e}-button><${e}-menu ${Fe("actionsMenu")}class="actions-menu ${e=>e.classNames}" part="actions-menu">${We(e=>e.allActions,K` ${Ve((e,t)=>e.isDisabled&&e.isDisabled(t.parent.rowData),K`<${e}-menu-item class="menu-item" tabindex="${(e,t)=>t.index}" disabled style=${(e,t)=>t.parent.hideDisabled?"display:none":""}>${(e,t)=>t.parent.getLabel(e.name)}</${e}-menu-item>`)} ${Ve((e,t)=>!e.isDisabled||!e.isDisabled(t.parent.rowData),K`<${e}-menu-item class="menu-item" tabindex="${(e,t)=>t.index}" @click=${(e,t)=>t.parent.onActionMenuItemClick(e.callback)}style="${e=>e.color?`color: ${e.color};`:""}">${(e,t)=>t.parent.getLabel(e.name)}</${e}-menu-item>`)} `,{positioning:!0})}</${e}-menu>`,qC=K`<div class="actions-container${e=>e.isVertical?" actions-vertical":""}" part="actions-container">${e=>e.getTemplate(NC(e))}</div>`;class GC extends Wt{constructor(){super(...arguments),this.isVertical=!1,this.addDefaultActions=!0,this.autoCloseOnAction=!0,this.name="Actions",this.open=!1,this.hideDisabled=!1,this.hideMenuSingleOption=!1}definitionChanged(e,t){var i;this.actions=null!==(i=null==t?void 0:t.actions)&&void 0!==i?i:[],delete this.definition.actions,t.buttonText&&(this.name=t.buttonText,delete this.definition.customButtonText),t.isVertical&&(this.isVertical=t.isVertical,delete this.definition.isVertical),t.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance),t.hideMenuSingleOption&&(this.hideMenuSingleOption=t.hideMenuSingleOption,delete this.definition.hideMenuSingleOption)}openChanged(){this.classNames=ti(["visible",this.open],["hidden",!this.open])}toggleActionsMenuVisibility(){this.open=!this.open}onActionMenuItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}get allActions(){var e;const t=[{name:"✖",callback:()=>this.open=!1}];return this.addDefaultActions?[...null!==(e=this.actions)&&void 0!==e?e:[],...t]:this.actions}get rowData(){if(!this.definition)return;const{node:e,data:t}=this.definition;return(null==e?void 0:e.data)||t}getLabel(e){return"function"==typeof e?e(this.rowData):e}getTemplate(e){if(!this.hideMenuSingleOption)return jC(e);const t=this.actions.filter(e=>!e.isDisabled||!e.isDisabled(this.rowData));return this.singleOption=null,0!==t.length?1===t.length?(this.singleOption=t[0],(e=>K`<${e}-button appearance="${e=>e.buttonAppearance}" part="actions-opener" class="actions-opener" @click=${e=>null==e?void 0:e.singleOption.callback(e.rowData)}?disabled=${e=>(null==e?void 0:e.singleOption.isDisabled)&&(null==e?void 0:e.singleOption.isDisabled(e.rowData))}>${e=>e.getLabel(null==e?void 0:e.singleOption.name)}</${e}-button>`)(e)):jC(e):void 0}}Ou([b],GC.prototype,"actions",void 0),Ou([de({attribute:"is-vertical",mode:"boolean"})],GC.prototype,"isVertical",void 0),Ou([de({attribute:"add-default-actions",mode:"boolean"})],GC.prototype,"addDefaultActions",void 0),Ou([de({attribute:"auto-close-on-action",mode:"boolean"})],GC.prototype,"autoCloseOnAction",void 0),Ou([b],GC.prototype,"classNames",void 0),Ou([b],GC.prototype,"definition",void 0),Ou([de],GC.prototype,"name",void 0),Ou([de({attribute:"open",mode:"boolean"})],GC.prototype,"open",void 0),Ou([de],GC.prototype,"buttonAppearance",void 0),Ou([de({attribute:"hide-disabled",mode:"boolean"})],GC.prototype,"hideDisabled",void 0),Ou([de({attribute:"hide-menu-single-option",mode:"boolean"})],GC.prototype,"hideMenuSingleOption",void 0),Ou([b],GC.prototype,"singleOption",void 0),GC.compose({baseName:"actions-menu",styles:(e,t)=>Me` ${ku()}`,template:qC});let WC=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(WC="true"===GENX_ENABLE_AI)}catch(dC){}const YC=()=>WC||Ff("ai");function KC(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}af("foundation-ai");class ZC{getStatus(){return Ru(this,void 0,void 0,function*(){return{provider:"none",model:""}})}interpretCriteria(e,t){return Ru(this,void 0,void 0,function*(){return null})}}class QC{constructor(){this.noopProvider=new ZC}get(e){return e===QC.DEFAULT_NAME?this.noopProvider:void 0}default(){return this.noopProvider}defaultName(){return QC.DEFAULT_NAME}names(){return[QC.DEFAULT_NAME]}getStatus(e){return Ru(this,void 0,void 0,function*(){var t,i,c;return void 0!==e&&e!==QC.DEFAULT_NAME?null:null!==(c=yield null===(i=(t=this.noopProvider).getStatus)||void 0===i?void 0:i.call(t))&&void 0!==c?c:null})}listStatuses(){return Ru(this,void 0,void 0,function*(){var e,t,i;const c=null!==(i=yield null===(t=(e=this.noopProvider).getStatus)||void 0===t?void 0:t.call(e))&&void 0!==i?i:null;return[{name:QC.DEFAULT_NAME,isDefault:!0,status:c}]})}}QC.DEFAULT_NAME="default";const XC=mt.createInterface(e=>e.singleton(QC)),JC=Me` :host{display: block;width: 800px}.ai-criteria-search{display: flex;flex-direction: column;gap: calc(${fr} * 2px)}.ai-criteria-search-row{display: flex;flex-direction: row;gap: calc(${fr} * 2px);align-items: center}.criteria-input{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);flex: 1;min-width: 0}.criteria-chips-inline{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);flex: 1;min-width: 0;display: flex;align-items: center;gap: calc(${fr} * 1px);overflow-x: auto;padding: 0 calc(${fr} * 2px);background: var(--neutral-fill-input-rest);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px);scrollbar-width: none}.criteria-chips-inline::-webkit-scrollbar{display: none}.mic-icon{color: var(--neutral-foreground-rest);fill: currentColor}.criteria-toggle-button, .criteria-clear-button{flex-shrink: 0}.criteria-chip{display: inline-flex;align-items: center;flex-shrink: 0;gap: calc(${fr} * 1px);padding: calc(${fr} * 0.5px) calc(${fr} * 2px);background: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(${fr} * 4px);font-size: var(--type-ramp-minus-1-font-size);color: var(--neutral-foreground-rest);white-space: nowrap}.criteria-chip-field{font-weight: 600}.criteria-chip-operator{color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));font-style: italic}.criteria-chip-remove{display: inline-flex;align-items: center;justify-content: center;width: 14px;height: 14px;padding: 0;margin-left: calc(${fr} * 0.5px);background: none;border: none;cursor: pointer;color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));font-size: 10px;border-radius: 50%;line-height: 1}.criteria-chip-remove:hover{background: var(--neutral-fill-hover);color: var(--neutral-foreground-rest)}`,eL=K` ${e=>(e=>K` ${Ve(()=>YC(),K`<div class="ai-criteria-search"><div class="ai-criteria-search-row">${Ve(e=>!e.showingChips,K`<${e}-text-area ${Fe("textAreaRef")}class="criteria-input" placeholder="${e=>e.placeholder}" ?disabled=${e=>e.disabled||e.isInterpreting}:value=${Of(e=>e.inputValue,"string","input")}@blur=${e=>e.handleBlur()}rows="1"></${e}-text-area>`)} ${Ve(e=>e.showingChips,K`<div class="criteria-chips-inline">${We(e=>e.criteriaChips,K`<span class="criteria-chip"><span class="criteria-chip-field">${e=>e.fieldLabel}</span><span class="criteria-chip-operator">${e=>e.operatorLabel}</span>${Ve(e=>!!e.valueLabel,K`<span class="criteria-chip-value">${e=>e.valueLabel}</span>`)}<button class="criteria-chip-remove" aria-label="Remove filter" @click=${(e,t)=>t.parent.removeChip(e.groupIndex,e.clauseIndex)}>
|
|
57
|
+
function zz(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var c in i)"__proto__"!==c&&(e[c]=i[c])}return e}mt.createInterface(e=>e.singleton(yz));var Cz={read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};var Lz=function e(t,i){function c(e,c,o){if("undefined"!=typeof document){"number"==typeof(o=zz({},i,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in o)o[a]&&(s+="; "+a,!0!==o[a]&&(s+="="+o[a].split(";")[0]));return document.cookie=e+"="+t.write(c,e)+s}}return Object.create({set:c,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var i=document.cookie?document.cookie.split("; "):[],c={},o=0;o<i.length;o++){var s=i[o].split("="),a=s.slice(1).join("=");try{var n=decodeURIComponent(s[0]);if(n in c||(c[n]=t.read(a,n)),e===n)break}catch{}}return e?c[e]:c}},remove:function(e,t){c(e,"",zz({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,zz({},this.attributes,t))},withConverter:function(t){return e(zz({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}(Cz,{path:"/"});const xz=mt.createInterface();function Mz(){return(null===navigator||void 0===navigator?void 0:navigator.credentials)?"PasswordCredential"in window||(nf.warn("PasswordCredential not available in this browser."),!1):(nf.warn("CredentialsContainer not available in this browser."),!1)}const wz=":";function Sz(e="",t=wz,i){return e.split(t,i).map(e=>e.trim()).filter(e=>""!==e)}function kz(e,t=wz){const i="string"==typeof e&&e.trim();return!!i&&i.includes(t)}function Ez(e,t=wz){return"string"==typeof e&&e.trim()?(e.match(new RegExp(t,"g"))||[]).length:0}function $z(e,t=wz){for(const i of e)if(kz(i,t))return i;return e.find(e=>"string"==typeof e&&""!==e.trim())}function Nz(e,t,i){const c="string"==typeof e&&e.trim();return!c||i&&!c.includes(i)||Ez(c)>1?i&&t&&i!==t?`${t}:${i}`:t||i:c}function Az(e="credential"){nf.warn(`Unable to migrate legacy ${e} to latest format. Please remove from your browser.`)}const Oz={password:!0,mediation:"optional"},Tz={cookie:{path:"/",name:"credentials",expires:7300,storePasswords:!1}};let Rz=class{constructor(e,t=Tz){this.session=e,this.config=t}createBasicCredentials(e){return{type:$b.BASIC,username:e.username,password:e.password,mfaToken:this.getMFAToken()}}createRefreshCredentials(e){var t,i,c;return{type:$b.REFRESH,username:null!==(t=null==e?void 0:e.username)&&void 0!==t?t:this.getUsername(),refreshToken:null!==(i=null==e?void 0:e.refreshToken)&&void 0!==i?i:this.getRefreshToken(),mfaToken:null!==(c=null==e?void 0:e.mfaToken)&&void 0!==c?c:this.getMFAToken()}}createSSOCredentials(e){var t;return{type:$b.SSO,ssoToken:null!==(t=null==e?void 0:e.ssoToken)&&void 0!==t?t:this.getSSOToken()}}validateBasicCredentials(e){return e&&!!e.username&&!!e.password}validateRefreshCredentials(e){return e&&!!e.refreshToken&&!!e.username}validateSSOCredentials(e){return e&&!!e.ssoToken}validateUserCredentialData(e,t){const i=e&&!!e.id&&!!e.name&&!e.name.includes(wz)&&Ez(e.id)<=1;return t?i&&!!e.password:i}normaliseLegacyCredentialData(e,t){if(this.validateUserCredentialData(e,!0))return[e,!0];if(this.validateUserCredentialData(t))return[t,!1];if(e)try{const t=e,[i]=Sz(t.name||t.id),[c,o]=Sz($z([t.id,t.name]));return[{id:Nz(t.id||t.name,i,o),name:i,password:t.password||""},!0]}catch(e){Az("PasswordCredential")}if(t)try{const e=t,[i]=Sz(e.name||e.username||e.organisation),[c,o]=Sz($z([e.organisation||e.username||e.name]));return[{id:Nz(e.id||e.username||e.name,i,o),name:i,password:e.password||""},!1]}catch(e){Az("cookie")}return[void 0,!1]}storeCredentialsInContainer(e){return Ru(this,void 0,void 0,function*(){if(!Mz())return;const t=new PasswordCredential(e);return nf.debug("Storing credentials in CredentialsContainer"),navigator.credentials.store(t)})}getCredentialsFromContainer(){return Ru(this,arguments,void 0,function*(e=Oz){if(Mz())return nf.debug("Getting credentials from CredentialsContainer"),yield navigator.credentials.get(e)})}storeCredentialsInCookie(e){const t=Au(e,["password"]),i=this.config.cookie.storePasswords?e:t;return nf.debug("Storing credentials in cookie"),!!Lz.set(this.config.cookie.name,JSON.stringify(i),{expires:this.config.cookie.expires,domain:location.hostname,path:this.config.cookie.path,secure:!0})}getCredentialsFromCookie(){nf.debug("Getting credentials from cookie");const e=Lz.get(this.config.cookie.name);return e?JSON.parse(e):void 0}storeCredentials(e){return Ru(this,void 0,void 0,function*(){if(Mz()){const t=yield this.storeCredentialsInContainer(e);return Promise.resolve(!!t)}return Promise.resolve(this.storeCredentialsInCookie(e))})}getCredentials(e){return Ru(this,void 0,void 0,function*(){return Mz()?this.getCredentialsFromContainer(e):Promise.resolve(this.getCredentialsFromCookie())})}getSSOToken(){return this.session.getSessionStorageItem("ssoToken")}getUsername(){return this.session.getSessionStorageItem("username")||this.session.getLocalStorageItem("username")}getRefreshToken(){return this.session.getSessionStorageItem("refreshToken")||this.session.getLocalStorageItem("refreshToken")}getMFAToken(){return this.session.getSessionStorageItem("mfaToken")}removeCookie(){Lz.remove(this.config.cookie.name,{domain:location.hostname,path:this.config.cookie.path})}removeSSOToken(){this.session.removeSessionStorageItem("ssoToken")}removeUsername(){this.session.removeSessionStorageItem("username"),this.session.removeLocalStorageItem("username")}removeRefreshToken(){this.session.removeSessionStorageItem("refreshToken"),this.session.removeLocalStorageItem("refreshToken")}removeMFAToken(){this.session.removeSessionStorageItem("mfaToken")}removeAll(){this.removeCookie(),this.removeSSOToken(),this.removeUsername(),this.removeRefreshToken(),this.removeMFAToken()}preventSilentAccess(){return Mz()&&navigator.credentials.preventSilentAccess()}};Rz=Ou([Tu(0,Mb),Tu(1,yt(xz))],Rz);const Iz=mt.createInterface(e=>e.singleton(Rz)),Dz=e=>Array.isArray(e)?e.map(e=>null!=e?e:""):[],Fz=e=>{try{if("EVENT_LOGIN_AUTH_ACK"===(null==e?void 0:e.MESSAGE_TYPE)){const{DETAILS:c}=e,o={messageType:e.MESSAGE_TYPE,sourceRef:e.SOURCE_REF,userName:e.USER_NAME,updateQueue:e.UPDATE_QUEUE,zeroMqProxyModeEnabled:e.ZERO_MQ_PROXY_MODE_ENABLED,zeroMqProxyInboundPort:e.ZERO_MQ_PROXY_INBOUND_PORT,zeroMqProxyOutboundPort:e.ZERO_MQ_PROXY_OUTBOUND_PORT,userKVs:e.USER,details:c?{system:(i=c.SYSTEM,i?{date:i.DATE}:null),heartbeatIntervalSecs:c.HEARTBEAT_INTERVAL_SECS,failedLoginAttempts:c.FAILED_LOGIN_ATTEMPTS,rejectedLoginAttempts:c.REJECTED_LOGIN_ATTEMPTS,lastLoginDatetime:c.LAST_LOGIN_DATETIME,daysToPasswordExpiry:c.DAYS_TO_PASSWORD_EXPIRY,product:(t=c.PRODUCT,t?t.map(e=>({name:e.NAME,version:e.VERSION})):[])}:null,permission:Dz(e.PERMISSION),profile:Dz(e.PROFILE)};return o}throw new Error("No Entity mapping implementation for provided DTO")}catch(e){throw nf.error(e),e}var t,i};let Hz=class{loggedUserResultChanged(){var e;null===(e=this.isLoggedInSubject)||void 0===e||e.next(this.isLoggedIn)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}get isLoggedIn(){return this.currentUser.isAuthenticated}constructor(e,t,i,c,o){this.session=e,this.connect=t,this.messageBuilder=i,this.credentialManager=c,this.currentUser=o,this.isWorking=!1,this.isLoggedInSubject=new og(this.isLoggedIn),this.currentUser.addAuthenticationChangeListener(e=>{var t;null===(t=this.isLoggedInSubject)||void 0===t||t.next(e.detail)})}login(e){return Ru(this,void 0,void 0,function*(){var t;this.isWorking=!0;try{const i=this.messageBuilder.createLoginMessage(e),c=yield this.connect.send(i);if(!c||c.ERROR||(null===(t=c.DETAILS)||void 0===t?void 0:t.ERROR))throw new Tb(i,c);this.applyAuthResults({authToken:c.SESSION_AUTH_TOKEN,refreshToken:c.REFRESH_AUTH_TOKEN,profiles:c.PROFILE,username:c.USER_NAME,permissions:c.PERMISSION,sessionId:c.SESSION_ID}),this.currentUser.set(Fz(c)),this.session.setAuthResult(c),nf.debug("Login Authentication Result:",c)}catch(e){if(nf.error("Login Authentication Error:",e),!(e instanceof Tb&&e.isIgnorableError()))throw this.removeAuthResults(),this.currentUser.unset(),e;nf.warn("Ignoring authentication error as it is a known edge case.")}finally{this.isWorking=!1}return this.loggedUserResult})}logout(){return Ru(this,void 0,void 0,function*(){var e;this.isWorking=!0;let t={success:!1};try{const i=this.messageBuilder.createLogoutMessage(this.loggedUserResult);this.session.deleteUserFromSessionStorage();const{CODE:c,DETAILS:o,ERROR:s,MESSAGE_TYPE:a,OIDC_LOGOUT_URL:n}=yield this.connect.send(i),r=null!==(e=null==o?void 0:o.ERROR)&&void 0!==e?e:s,l=a===Nb.LOGOUT_NACK;l&&nf.warn("Unexpected Logout NACK received during logout.",r),t={success:a===Nb.LOGOUT_ACK||c===Ob.SESSION_NOT_FOUND||!l,error:r},n&&window.open(n,"_self")}catch(e){const i=new Tb(e.sentMessage,e.receivedMessage);if(nf.error("Logout Authentication Error:",i),!i.isIgnorableError())throw e;nf.warn("Ignoring authentication error as it is a known edge case."),t.success=!0}finally{this.removeAuthResults(),this.currentUser.unset(),this.isWorking=!1}return t})}reAuthFromSession(){return Ru(this,void 0,void 0,function*(){const e=yield this.ensureConnection(),t=this.credentialManager.createRefreshCredentials();if(e&&this.credentialManager.validateRefreshCredentials(t)){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.connect.send(e);if((null==t?void 0:t.MESSAGE_TYPE)===Ab.EVENT_LOGIN_AUTH_ACK)return this.session.setAuthResult(t),this.currentUser.set(Fz(t)),this.applyAuthResults(this.getLoggedUserFromMessage(t)),!0}return this.session.deleteUserFromSessionStorage(),this.currentUser.unset(),!1})}ensureConnection(){return Ru(this,void 0,void 0,function*(){if(this.connect.isConnected)return!0;const e=this.session.getSessionStorageItem("hostUrl");return!!e&&this.connect.connect(e)})}getLoggedUserFromMessage(e){const t=e.USER_NAME,i=e.SESSION_AUTH_TOKEN,c=e.REFRESH_AUTH_TOKEN;return t&&i&&c?{username:t,authToken:i,refreshToken:c,profiles:e.PROFILE,permissions:e.PERMISSION,sessionId:e.SESSION_ID}:null}applyAuthResults(e){e?this.loggedUserResult={authToken:e.authToken,refreshToken:e.refreshToken,profiles:e.profiles,username:e.username,permissions:e.permissions,sessionId:e.sessionId}:this.removeAuthResults()}removeAuthResults(){this.loggedUserResult=null}};Ou([b],Hz.prototype,"isWorking",void 0),Ou([b],Hz.prototype,"loggedUserResult",void 0),Hz=Ou([Tu(0,Mb),Tu(1,bz),Tu(2,Hb),Tu(3,Iz),Tu(4,ib)],Hz);const _z=mt.createInterface(e=>e.singleton(Hz));function Pz(e,t){const i=new Date(e),c=i.getUTCFullYear(),o=String(i.getUTCMonth()+1).padStart(2,"0"),s=String(i.getUTCDate()).padStart(2,"0");if(t)return`${c}${o}${s}`;return`${c}${o}${s}-${String(i.getUTCHours()).padStart(2,"0")}:${String(i.getUTCMinutes()).padStart(2,"0")}`}function Vz(e,t="ROW_REF"){const i=e=>{var i;const c=null!==(i=e.DETAILS[t])&&void 0!==i?i:e[t],o=Object.assign(Object.assign({},e),{[t]:c});return delete o.DETAILS,o},c=[],o=[],s=[];for(const t of e.ROW)if(t.DETAILS)switch(t.DETAILS.OPERATION){case"INSERT":c.push(i(t));break;case"MODIFY":s.push(i(t));break;case"DELETE":o.push(i(t));break;default:nf.error(`Unsupported operation type: '${t.DETAILS.OPERATION}'`)}return{inserts:c,deletes:o,updates:s,SOURCE_REF:e.SOURCE_REF}}class Bz{}Bz.MAX_ROWS_250=250,Bz.MAX_VIEW_1000=1e3,Bz.REQ_REP_POLLING_INTERVAL_MS=1e4,Bz.DATASERVER_ROW_ID="ROW_REF",Bz.REQUEST_SERVER_ROW_ID="RECORD_ID",Bz.DEFAULT_PAGINATION_PAGE_SIZE=25,Bz.DEFAULT_REQ_REP_OFFSET=0;const Uz={options:{criteria:"",isSnapshot:!1,maxRows:Bz.MAX_ROWS_250,maxView:Bz.MAX_VIEW_1000,pollingInterval:Bz.REQ_REP_POLLING_INTERVAL_MS,movingView:!1,orderBy:"",resourceName:"",reverse:!1,pollTriggerEvents:[]},criteriaToFields:function(e){if(!e)return{};const t=e.split("&&").map(e=>e.trim()),i={};return t.forEach(e=>{if(e)if(e.startsWith("Expr"))!function(e,t){const i=e.match(/Expr\.(\w+)\(/);if(i)switch(i[1]){case"dateIsToday":{const i=/Expr\.dateIsToday\((\w+)\)/,c=e.match(i);if(c){const[,e]=c,i=new Date;t[`${e}_FROM`]=`${i.toISOString().replace(/-/g,"").split("T")[0]}-00:00`,i.setDate(i.getDate()+1),t[`${e}_TO`]=`${i.toISOString().replace(/-/g,"").split("T")[0]}-00:00`}break}case"dateTimeIsGreaterEqual":{const i=/Expr\.dateTimeIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[`${e}_FROM`]=i}break}case"dateTimeIsLessEqual":{const i=/Expr\.dateTimeIsLessEqual\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[`${e}_TO`]=i}break}case"dateIsGreaterEqual":{const i=/Expr\.dateIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[`${e}_FROM`]=i}break}case"dateIsLessEqual":{const i=/Expr\.dateIsLessEqual\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[`${e}_TO`]=i}break}case"containsIgnoreCase":{const i=/Expr\.containsIgnoreCase\((\w+), ?['"](.+)['"]\)/,c=e.match(i);if(c){const[,e,i]=c;t[e]=`*${i}*`}break}}}(e,i);else if(/[A-Z_]+\s*(>=|<=)\s*\d+/.test(e)){const t=e.match(/([A-Z_]+)\s*>=\s*(\d+)/);if(t){const[,e,c]=t,o=parseInt(c,10),s=e.toUpperCase(),a=s.includes("DATE")&&!s.includes("DATETIME");i[`${e}_FROM`]=Pz(o,a)}const c=e.match(/([A-Z_]+)\s*<=\s*(\d+)/);if(c){const[,e,t]=c,o=parseInt(t,10),s=e.toUpperCase(),a=s.includes("DATE")&&!s.includes("DATETIME");i[`${e}_TO`]=Pz(o,a)}}else!function(e,t){const i=e.substr(0,e.indexOf("=")).trim().replace(/["']/g,""),c=e.substr(e.lastIndexOf("=")+1,e.length).trim().replace(/["']/g,"");t[i]=c}(e,i)}),i},dataServerResultFilter:Vz},jz=mt.createInterface(e=>e.instance(Uz)),qz=e=>{class t extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var t;const i=void 0!==this.data;this.resourceName||i||nf.warn("Target classes must have a resourceName or data property to use the DatasourceEventHandler mixin.");const c=e.detail;if(c.name===this.resourceName){const e=null!==(t=this.datasourceStatus)&&void 0!==t?t:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==c.isInitialized||c.metadataRequired&&e.hasMetadata!==c.hasMetadata)&&(this.datasourceStatus=c)}})}datasourceStatusChanged(e,t){nf.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(rb,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(rb,this.onDatasourceStatusChanged,{capture:!0})}}return Ou([b],t.prototype,"datasourceStatus",void 0),t},Gz={throwWhenUnavailable:!0,throwWhenUnknown:!1},Wz=mt.createInterface(e=>e.instance(Gz)),Yz=ff("genesis-resources");let Kz=class{constructor(e,t){this.connect=e,this.config=t}isValidResource(e){return Ru(this,void 0,void 0,function*(){if(!(e=null==e?void 0:e.trim()))return!1;yield this.fetchResources();return!!this.resources.find(t=>t.RESOURCE_NAME===e)})}getResourceTypeFor(e){return Ru(this,void 0,void 0,function*(){yield this.fetchResources();const t=this.resources.find(t=>t.RESOURCE_NAME===e);if(t)return t.RESOURCE_TYPE;const i=`${e} resource does not exist.`;if(nf.error(i),this.config.throwWhenUnknown)throw new Error(i)})}getAllResources(){return Ru(this,void 0,void 0,function*(){return this.resources||(yield this.fetchResources()),this.resources})}destroy(){this.resources=void 0,this.resourcesPromise=void 0}fetchResources(){return Ru(this,void 0,void 0,function*(){var e;if(this.resources)return Promise.resolve();if(this.resourcesPromise)yield this.resourcesPromise;else{this.resourcesPromise=this.connect.getAvailableResources();const t=yield this.resourcesPromise;if(this.resources=null==t?void 0:t.RESOURCES,!(null===(e=this.resources)||void 0===e?void 0:e.length)){const e="Genesis resources unavailable.";if(nf.error(e),this.config.throwWhenUnavailable)throw new Error(e)}this.postLoadedMessage(),this.resourcesPromise=void 0}})}postLoadedMessage(){const e=mt.getOrCreateDOMContainer().get(Yz);e.postMessage("resources-loaded",this.resources),e.close()}};Kz=Ou([Tu(0,bz),Tu(1,Wz)],Kz);const Zz=mt.createInterface(e=>e.singleton(Kz));let Qz=class{get initialized(){var e;return!!(null===(e=this.status)||void 0===e?void 0:e.isInitialized)}constructor(e,t,i,c,o){this.connect=e,this.auth=t,this.resources=i,this.config=c,this.connectEvents=o,this.fetchMetadataRequired=!0,this.startStreamRequired=!0,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.criteriaOnlyRequest=!1,this.loadMoreCount=0,this.readOnly=!0,this._allParams=null,this.pollTrigger$=new ig}triggerPoll(){this.pollTrigger$.next()}validResourceName(e){return nf.deprecated("Datasource.validResourceName","Use `GenesisResources.isValidResource` instead."),!!e&&!!e.trim().length}init(e){return Ru(this,arguments,void 0,function*(e,t=this.fetchMetadataRequired,i=this.startStreamRequired){this.fetchMetadataRequired=t,this.options=Object.assign(Object.assign({},this.config.options),e),this.invalidateCache();const c=this.options.resourceName;if(!(this.connect.isConnected||(yield this.connect.connect())))return nf.error(`Unable to connect to ${this.connect.host} to get ${c} datasource`),this.reportStatus(),!1;return(yield this.resources.isValidResource(c))?(this.resourceType=yield this.resources.getResourceTypeFor(c),this.resourceType?(this.fetchMetadataRequired&&(yield this.fetchAndApplyMetadata(this.options.resourceName),this._allParams=null),nf.debug(`Initializing ${c} datasource from ${this.connect.host}`),!this.options.isSnapshot&&i&&(this.pollTrigger$=new ig,this.stream=yield this.createStream()),nf.debug(`${c} datasource initialization ${this.initialized?"was successful.":"has failed."}`),this.reportStatus(),this.initialized):(nf.error(`Unable to get the resource type for ${c} datasource from ${this.connect.host}`),this.reportStatus(),!1)):(nf.error(`${c} datasource does not exist on ${this.connect.host}`),this.reportStatus(),!1)})}startStream(){return Ru(this,void 0,void 0,function*(){this.options.isSnapshot||void 0!==this.stream||(this.stream=yield this.createStream())})}destroy(){var e,t;nf.debug("Datasource.destroy",null===(e=this.options)||void 0===e?void 0:e.resourceName),this.commitResponseUnsubscribe&&(this.commitResponseUnsubscribe(),this.commitResponseUnsubscribe=void 0),null===(t=this.pollTrigger$)||void 0===t||t.complete(),this.status=void 0,this.fetchMetadataRequired=!0,this.options={},this.resourceType=void 0,this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.criteriaOnlyRequest=!1,this.loadMoreCount=0,this.stream=void 0}get allResourceParams(){var e;if(this._allParams)return this._allParams;let t;if(this.options.orderBy)if(this.criteriaOnlyRequest||(null===(e=this.availableIndexes)||void 0===e?void 0:e.findIndex(e=>e.NAME===this.options.orderBy))>-1)t=this.options.orderBy;else{const e=this.availableIndexes.map(e=>e.NAME);nf.warn("Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:",e)}return this._allParams={CRITERIA_MATCH:this.options.criteria,MAX_ROWS:this.options.maxRows,ORDER_BY:t,VIEW_NUMBER:this.options.viewNumber,FIELDS:this.options.fields,MAX_VIEW:this.options.maxView,MOVING_VIEW:this.options.movingView,REVERSE:this.options.reverse,DISABLE_POLLING:this.options.disablePolling,OFFSET:this.options.offset,POLLING_INTERVAL:this.options.pollingInterval,REQUEST:this.options.request},nf.debug("Getting configured params:",this._allParams),this._allParams}get dataserverOnlyParams(){return{CRITERIA_MATCH:this.allResourceParams.CRITERIA_MATCH,MAX_ROWS:this.allResourceParams.MAX_ROWS,VIEW_NUMBER:this.allResourceParams.VIEW_NUMBER,FIELDS:this.allResourceParams.FIELDS,MAX_VIEW:this.allResourceParams.MAX_VIEW,MOVING_VIEW:this.allResourceParams.MOVING_VIEW,ORDER_BY:this.allResourceParams.ORDER_BY,REVERSE:this.allResourceParams.REVERSE}}get requestOnlyParams(){const e=this.allResourceParams,{REQUEST:t}=e,i=Au(e,["REQUEST"]);return{DETAILS:{CRITERIA_MATCH:this.options.requestAutoSetup?void 0:i.CRITERIA_MATCH,MAX_ROWS:i.MAX_ROWS,OFFSET:i.OFFSET,ORDER_BY:i.ORDER_BY,VIEW_NUMBER:i.VIEW_NUMBER},REQUEST:this.criteriaOnlyRequest?{}:null!=t?t:this.buildRequestFields()}}buildRequestFields(){if(!this.options.requestAutoSetup)return{};const e=Object.fromEntries(this.requestFields.map(e=>[e.NAME,"*"])),t=this.options.criteria?this.config.criteriaToFields(this.options.criteria):{};return Object.assign(Object.assign({},e),t)}updateLoadMoreCount(e){this.loadMoreCount=e}snapshot(e){return Ru(this,void 0,void 0,function*(){switch(nf.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`),this.resourceType){case nb.DATASERVER:return this.connect.snapshot(this.options.resourceName,Object.assign(Object.assign({},this.dataserverOnlyParams),e));case nb.REQUEST_SERVER:return this.connect.request(this.options.resourceName,Object.assign(Object.assign({},this.requestOnlyParams),e));default:throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`)}})}snapshotFiltered(){return Ru(this,arguments,void 0,function*(e="ROW_REF"){const t=yield this.snapshot();return Array.isArray(t)?t:t.REPLY?t.REPLY:t.ROW?this.config.dataServerResultFilter(t,e).inserts:void 0})}createStream(){return Ru(this,void 0,void 0,function*(){if(![nb.DATASERVER,nb.REQUEST_SERVER].includes(this.resourceType))throw new Error(`Streaming not supported for selected resource type: ${this.resourceType}`);return this.resourceType===nb.DATASERVER?this.createDataserverStream():(nf.debug(`Creating fake stream by polling ${this.options.resourceName} REQUEST_SERVER`),this.createReqRepStream())})}createDataserverStream(){return Ru(this,void 0,void 0,function*(){return this.connect.stream(this.options.resourceName,e=>{},e=>nf.error(e),this.dataserverOnlyParams)})}createReqRepStream(){this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener(e=>{var t;const{eventName:i,response:c}=e.detail;this.options.pollTriggerEvents&&this.options.pollTriggerEvents.includes(i)&&(null===(t=c.MESSAGE_TYPE)||void 0===t?void 0:t.endsWith("_ACK"))&&(nf.debug(`Received commit response for ${i}, triggering poll.`),this.triggerPoll())});const e=this.allResourceParams.DISABLE_POLLING?void 0:this.allResourceParams.POLLING_INTERVAL,t=()=>{const e=this.requestOnlyParams;if(this.resourceType===nb.REQUEST_SERVER&&this.loadMoreCount>0){const t=25,i=(this.options.maxRows||t)*(this.loadMoreCount+1);e.DETAILS.MAX_ROWS=i}return nv([this.connect.isConnected$,this.auth.isLoggedIn$]).pipe(vv(()=>this.connect.isConnected&&this.auth.isLoggedIn),gv(()=>Zg(this.snapshot(e))))};return e?this.pollTrigger$.pipe(mv(0),gv(()=>uv(0,e).pipe(gv(t)))):this.pollTrigger$.pipe(mv(0),gv(t))}fetchAndApplyMetadata(e){return Ru(this,void 0,void 0,function*(){var t,i,c,o;try{nf.debug(`Requesting metadata for ${this.options.resourceName} Datasource`);const e=yield this.connect.getMetadata(this.options.resourceName);e&&(this.availableIndexes=null!==(t=e.INDEXES)&&void 0!==t?t:[],this.availableSortableFields=null!==(i=e.SORTABLE_FIELDS)&&void 0!==i?i:[],this.availableCriteriaFields=null!==(c=e.CRITERIA_FIELDS)&&void 0!==c?c:[],this.originalFieldDef=db(e),this.fieldMetadata=lb(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.criteriaOnlyRequest=e.CRITERIA_ONLY_REQUEST||!1,this.fetchMetadataRequired=!1),this.status=this.normaliseStatus({isInitialized:!0,metadataRequired:!0,hasMetadata:(null===(o=this.fieldMetadata)||void 0===o?void 0:o.length)>0})}catch(t){nf.error(`Metadata Fetch failed for ${e}:`,t),this.status=this.normaliseStatus({isInitialized:!1,metadataRequired:!0,hasMetadata:!1})}})}reportStatus(e={}){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseStatus(e),nf.debug(`Dispatching '${rb}'`,this.status),null==i||i.dispatchEvent(new CustomEvent(rb,{detail:this.status,bubbles:i!==document,composed:!0}))}normaliseStatus(e){var t,i,c,o,s;const a=null!==(t=e.isInitialized)&&void 0!==t?t:this.initialized,n=null!==(i=e.metadataRequired)&&void 0!==i?i:this.fetchMetadataRequired,r=null!==(c=e.hasMetadata)&&void 0!==c?c:(null===(o=this.fieldMetadata)||void 0===o?void 0:o.length)>0;return{name:null===(s=this.options)||void 0===s?void 0:s.resourceName,type:this.resourceType,isInitialized:a,metadataRequired:n,hasMetadata:r}}invalidateCache(){this._allParams=null}};Ou([b],Qz.prototype,"status",void 0),Ou([b],Qz.prototype,"fetchMetadataRequired",void 0),Ou([b],Qz.prototype,"startStreamRequired",void 0),Ou([b],Qz.prototype,"originalFieldDef",void 0),Ou([b],Qz.prototype,"fieldMetadata",void 0),Ou([b],Qz.prototype,"requestFields",void 0),Ou([b],Qz.prototype,"customRequestFields",void 0),Ou([b],Qz.prototype,"availableIndexes",void 0),Ou([b],Qz.prototype,"availableSortableFields",void 0),Ou([b],Qz.prototype,"availableCriteriaFields",void 0),Ou([b],Qz.prototype,"criteriaOnlyRequest",void 0),Ou([b],Qz.prototype,"loadMoreCount",void 0),Ou([b],Qz.prototype,"readOnly",void 0),Ou([b],Qz.prototype,"stream",void 0),Qz=Ou([Tu(0,bz),Tu(1,_z),Tu(2,Zz),Tu(3,jz),Tu(4,ub)],Qz);const Xz=mt.createInterface(e=>e.transient(Qz));class Jz extends Qz{constructor(){super(...arguments),this.entityCache=[],this.entityMap=new Map,this.rowId="ROW_REF",this.initialize=e=>Ru(this,void 0,void 0,function*(){return this.disconnect(),this.options=Object.assign({},e.options),this.mapper=e.mapper,this.initialized=yield this.init(this.options,e.fetchMeta),this.initialized?(this.subscription=this.stream.subscribe(e=>{this.sourceRef=e.SOURCE_REF,this.subscriptionLoggedOff=e.MESSAGE_TYPE===Nb.LOGOFF_ACK;const t=e.ROW;!this.subscriptionLoggedOff&&t&&this.updateCache(this.config.dataServerResultFilter(e,this.rowId))}),!0):(nf.debug(`EntityDatasource init failed for ${this.options.resourceName}`),!1)}),this.disconnect=()=>{var e;null===(e=this.subscription)||void 0===e||e.unsubscribe(),this.entityCache=[]}}get initialized(){return this._initialized}set initialized(e){this._initialized=e}get cache(){if(!this.initialized)throw new Error("Please initialize EntityDatasource before querying.");return this.entityCache}get isEmpty(){return 0===this.entityCache.length}updateCache(e){var t;this.isEmpty,null===(t=e.deletes)||void 0===t||t.forEach(e=>{const t=e[this.rowId];this.entityMap.delete(t)}),this.processRowDataUpdate(e.inserts,!0),this.processRowDataUpdate(e.updates);this.entityCache=[{}].map(e=>this.mapper.fromDTO(e))}processRowDataUpdate(e,t=!1){e.forEach(e=>{const i=e[this.rowId],c=this.entityMap.get(i);if(c&&t)throw new Error("Existing entity found in map while inserting.");const o=this.mapper.fromDTO(e),s=c?Object.assign(Object.assign({},c),o):o;this.entityMap.set(i,s)})}}function eC(e,t=";"){return e?e.split(t).map(e=>e.trim()).sort((e,t)=>e.localeCompare(t)).join(t):e}mt.createInterface(e=>e.transient(Jz));const tC="system-health-changed",iC={windowEvents:["online","offline","pageshow"],documentEvents:["visibilitychange"],genesisConnectEvents:["stream","commit"],ignoredGenesisResources:[],startDelay:5e3,checkInterval:1e4,checkTimeout:3e3,resourceChecks:e=>Ru(void 0,void 0,void 0,function*(){const t=mt.getOrCreateDOMContainer().get(bz),i=yield t.getMoreColumns(e),c=Date.now(),o=i;return{isConnected:i.MESSAGE_TYPE===Nb.MORE_COLUMNS_ACK,lastUpdated:c,lastMessage:o}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:c}=t;mt.getOrCreateDOMContainer().get(pz).sendForStream(e,i,c)}},cC=mt.createInterface(e=>e.instance(iC));var oC,sC={exports:{}};var aC,nC,rC=(oC||(oC=1,function(e){e.exports=function(e){var t={};function i(c){if(t[c])return t[c].exports;var o=t[c]={i:c,l:!1,exports:{}};return e[c].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,c){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(i.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(c,o,function(t){return e[t]}.bind(null,o));return c},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){t.__esModule=!0,t.default=void 0;var c=i(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});t.push(0);var i=t[0],c=t[1];if(10===i)switch(c){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(i){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,i,c){void 0===c&&(c=!1);var o=e.getVersionPrecision(t),s=e.getVersionPrecision(i),a=Math.max(o,s),n=0,r=e.map([t,i],function(t){var i=a-e.getVersionPrecision(t),c=t+new Array(i+1).join(".0");return e.map(c.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(c&&(n=a-Math.min(o,s)),a-=1;a>=n;){if(r[0][a]>r[1][a])return 1;if(r[0][a]===r[1][a]){if(a===n)return 0;a-=1}else if(r[0][a]<r[1][a])return-1}},e.map=function(e,t){var i,c=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)c.push(t(e[i]));return c},e.find=function(e,t){var i,c;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,c=e.length;i<c;i+=1){var o=e[i];if(t(o,i))return o}},e.assign=function(e){for(var t,i,c=e,o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var n=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){c[t]=e[t]})};for(t=0,i=s.length;t<i;t+=1)n();return e},e.getBrowserAlias=function(e){return c.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return c.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,i){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(91))&&c.__esModule?c:{default:c},s=i(18);function a(e,t){for(var i=0;i<t.length;i++){var c=t[i];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}var n=function(){function e(){}var t,i,c;return e.getParser=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new o.default(e,t,i)},e.parse=function(e,t){return void 0===t&&(t=null),new o.default(e,t).getResult()},t=e,c=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(i=null)&&a(t.prototype,i),c&&a(t,c),e}();t.default=n,e.exports=t.default},91:function(e,t,i){t.__esModule=!0,t.default=void 0;var c=r(i(92)),o=r(i(93)),s=r(i(94)),a=r(i(95)),n=r(i(17));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var c=!1;"boolean"==typeof t?(c=t,this._hints=i):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==c&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),i=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return i?i.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=n.default.find(c.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=n.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=n.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=n.default.find(a.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return n.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,i={},c=0,o={},s=0;if(Object.keys(e).forEach(function(t){var a=e[t];"string"==typeof a?(o[t]=a,s+=1):"object"==typeof a&&(i[t]=a,c+=1)}),c>0){var a=Object.keys(i),r=n.default.find(a,function(e){return t.isOS(e)});if(r){var l=this.satisfies(i[r]);if(void 0!==l)return l}var d=n.default.find(a,function(e){return t.isPlatform(e)});if(d){var h=this.satisfies(i[d]);if(void 0!==h)return h}}if(s>0){var u=Object.keys(o),f=n.default.find(u,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(o[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var i=this.getBrowserName().toLowerCase(),c=e.toLowerCase(),o=n.default.getBrowserTypeByAlias(c);return t&&o&&(c=o.toLowerCase()),c===i},t.compareVersion=function(e){var t=[0],i=e,c=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(c=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(c=!0,i=e.substr(1)),t.indexOf(n.default.compareVersions(o,i,c))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=l,e.exports=t.default},92:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(17))&&c.__esModule?c:{default:c},s=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},i=o.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},i=o.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},i=o.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},i=o.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},i=o.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},i=o.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},i=o.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},i=o.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},i=o.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},i=o.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},i=o.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},i=o.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},i=o.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},i=o.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},i=o.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},i=o.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},i=o.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},i=o.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},i=o.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},i=o.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=o.default.getFirstMatch(s,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},i=o.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},i=o.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),c=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),s=o.default.getFirstMatch(/se ([\d.]+)x/i,e),a=i||c||s;return a&&(t.version=a),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var i={name:"DuckDuckGo"};if(t){var c=t.getBrandVersion("DuckDuckGo");if(c)return i.version=c,i}var s=o.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return s&&(i.version=s),i}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var i={name:"Brave"};if(t){var c=t.getBrandVersion("Brave");if(c)return i.version=c,i}return i}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=o.default.getFirstMatch(s,e);return i&&(t.version=i),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(17))&&c.__esModule?c:{default:c},s=i(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=o.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},i=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=o.default.getMacOSVersionName(t),c={name:s.OS_MAP.MacOS,version:t};return i&&(c.versionName=i),c}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=o.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=o.default.getAndroidVersionName(t),c={name:s.OS_MAP.Android,version:t};return i&&(c.versionName=i),c}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:s.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(17))&&c.__esModule?c:{default:c},s=i(18),a=[{test:[/googlebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=o.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),i={type:s.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(i.model=t),i}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,i){t.__esModule=!0,t.default=void 0;var c,o=(c=i(17))&&c.__esModule?c:{default:c},s=i(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},i=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},i=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},i=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},i=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=a,e.exports=t.default}})}(sC)),sC.exports),lC=sp(rC);var dC,hC=function(){if(nC)return aC;nC=1,aC=s,s.default=s,s.stable=l,s.stableStringify=l;var e="[...]",t="[Circular]",i=[],c=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,s,a){var r;void 0===a&&(a=o()),n(e,"",0,[],void 0,0,a);try{r=0===c.length?JSON.stringify(e,t,s):JSON.stringify(e,h(t),s)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var l=i.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return r}function a(e,t,o,s){var a=Object.getOwnPropertyDescriptor(s,o);void 0!==a.get?a.configurable?(Object.defineProperty(s,o,{value:e}),i.push([s,o,t,a])):c.push([t,o,e]):(s[o]=e,i.push([s,o,t]))}function n(i,c,o,s,r,l,d){var h;if(l+=1,"object"==typeof i&&null!==i){for(h=0;h<s.length;h++)if(s[h]===i)return void a(t,i,c,r);if(void 0!==d.depthLimit&&l>d.depthLimit)return void a(e,i,c,r);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void a(e,i,c,r);if(s.push(i),Array.isArray(i))for(h=0;h<i.length;h++)n(i[h],h,h,s,i,l,d);else{var u=Object.keys(i);for(h=0;h<u.length;h++){var f=u[h];n(i[f],f,h,s,i,l,d)}}s.pop()}}function r(e,t){return e<t?-1:e>t?1:0}function l(e,t,s,a){void 0===a&&(a=o());var n,r=d(e,"",0,[],void 0,0,a)||e;try{n=0===c.length?JSON.stringify(r,t,s):JSON.stringify(r,h(t),s)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var l=i.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return n}function d(c,o,s,n,l,h,u){var f;if(h+=1,"object"==typeof c&&null!==c){for(f=0;f<n.length;f++)if(n[f]===c)return void a(t,c,o,l);try{if("function"==typeof c.toJSON)return}catch(e){return}if(void 0!==u.depthLimit&&h>u.depthLimit)return void a(e,c,o,l);if(void 0!==u.edgesLimit&&s+1>u.edgesLimit)return void a(e,c,o,l);if(n.push(c),Array.isArray(c))for(f=0;f<c.length;f++)d(c[f],f,f,n,c,h,u);else{var p={},m=Object.keys(c).sort(r);for(f=0;f<m.length;f++){var g=m[f];d(c[g],g,f,n,c,h,u),p[g]=c[g]}if(void 0===l)return p;i.push([l,o,c]),l[o]=p}n.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(c.length>0)for(var o=0;o<c.length;o++){var s=c[o];if(s[1]===t&&s[0]===i){i=s[2],c.splice(o,1);break}}return e.call(this,t,i)}}return aC}(),uC=sp(hC);const fC=af("network-monitor",{level:ju.info}),pC=Date.now(),mC=(null===(dC=window.navigator)||void 0===dC?void 0:dC.userAgent)?lC.parse(window.navigator.userAgent):void 0,gC=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:uC(e,void 0,2,t);class vC{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>Ru(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;fC.info("Run health checks, triggered by",gC(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const c=yield this.isOnlineCheck();c?fC.debug(`Network connected at ${i}`):fC.warn(`Network disconnected at ${i}`);const o=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),c),s=this.preFlightSocketChecks(o);if(s||fC.debug("Socket pre-flight checks failed"),!c||!s){fC.debug("Aborting remaining health checks");const e=[...this.resources].reduce((e,[t,i])=>{const o=e[i.resourceName];return o?(o.sourceRef=[...o.sourceRef,i.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[i.resourceName]:this.normaliseResourceHealth({name:i.resourceName,sourceRef:[i.message.SOURCE_REF],isConnected:i.isConnected,lastUpdated:i.lastUpdated},c)})},{});return this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:c,resources:e,resourcesAllConnected:!1,socket:o}),void(this.isRunningChecks=!1)}let a=!0;const n=[];this.resources.forEach((e,t)=>{const{resourceName:c,message:o,functions:s}=e,{resourceChecks:r=this.config.resourceChecks,resourceDataLogon:l=this.config.resourceDataLogon}=s,{SOURCE_REF:d}=o;let h,u,f,p,m,g=!1;n.push((()=>Ru(this,void 0,void 0,function*(){var o,s,n;try{fC.debug(`Running health check against ${c}`);const e=yield Promise.race([r(d,t),(s=this.config.checkTimeout,n=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(n())},s)}))]);g=e.isConnected,h=e.lastUpdated,u=e.lastMessage,p=e.timeout}catch(e){g=!1,h=this.getNowTimestamp(),f=e,u=null!==(o=null==e?void 0:e.receivedMessage)&&void 0!==o?o:e}return m=(null==u?void 0:u.MESSAGE_TYPE)===Nb.MSG_NACK||Db(u,yb.NOT_FOUND),i=this.getFormattedTimestamp(null!=h?h:this.getNowTimestamp()),g?fC.debug(`${c} is healthy at ${i}`):fC.warn(`${c} is not healthy at ${i}`),u&&fC.debug(`${c} messaged at ${i}`,gC(u)),f&&fC.error(`${c} errored at ${i}`,gC(f)),p&&fC.warn(`${c} timed out at ${i}`),m&&(fC.error(`${c} issue, re-attempting data logon at ${i}`),l(e)),a&&(a=g),{name:c,sourceRef:[d],isConnected:g,lastUpdated:h,lastError:f}}))())});const r=(yield Promise.allSettled(n)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return fC.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});fC.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:c,resources:r,resourcesAllConnected:a,socket:o}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(fC.level=this.config.logLevel)}create(){this.resources?fC.warn("NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first."):(this.addListeners(),this.resources=new Map,setTimeout(()=>{this.isReady=!0,this.synchroniseCheckInterval(),this.runAllChecks("NetworkMonitor.create()")},this.config.startDelay))}destroy(){this.removeListeners(),clearInterval(this.internalId),this.resources.clear(),this.resources=void 0,this.status=void 0,this.isReady=void 0}isOnlineCheck(){return Promise.resolve(navigator.onLine)}addResource(e,t){this.resources||this.create(),this.resources.set(e,t)}removeResource(e){this.resources.delete(e)}addListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes("stream")&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{const{functions:t,message:i,resourceName:c,stream:o}=e;this.config.ignoredGenesisResources.includes(c)||this.addResource(o,{functions:t,message:i,resourceName:c})},({detail:e})=>{const{resourceName:t,stream:i}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(i)},({detail:e})=>{var t;const{resourceName:i,stream:c,error:o}=e,s=null!==(t=o.receivedMessage)&&void 0!==t?t:o;let a="";Db(s,yb.NOT_FOUND)?a="Please check the resource is running.":Db(s,yb.FORBIDDEN)&&(a="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(c)),fC.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,a,o)})),this.config.genesisConnectEvents.includes("commit")&&this.unsubscribableObservers.push(this.connectEvents.addCommitListener(e=>{this.config.ignoredGenesisResources.includes(e.detail.eventName)||this.runAllChecks(e)})),this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({detail:e})=>{const{resourceName:t,error:i}=e;i&&fC.error(`${t} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,"Please check the resource is running.",i)}))}removeListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.removeEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.removeEventListener(e,this.runAllChecks)),this.unsubscribableObservers.forEach(e=>e()),this.unsubscribableObservers.length=0}reportSystemHealth(e){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseEventDetail(e);(this.status.isHealthy?fC.debug:fC.warn)("Emitting 'system-health-changed' event",gC(this.status)),null==i||i.dispatchEvent(new CustomEvent(tC,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(fC.debug("Network monitoring no longer required. Please check your network and reload your application."),this.destroy())}reportStabilityToGenesis(e){return Ru(this,void 0,void 0,function*(){return fC.debug("User requested report stability to Genesis."),fC.info("Please attach this data to your Genesis Support request: \n",JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){var i;const c=!!t&&e.isConnected,o=null!==(i=e.lastUpdated)&&void 0!==i?i:this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:c,lastUpdated:o})}normaliseSerializedSocketStatus(e,t=!0){const i=!!t&&e.isConnected,c=!i;return Object.assign(Object.assign({},e),{isConnected:i,isDisconnected:c})}normaliseEventDetail(e){var t,i,c,o;const s=!!((null===(t=e.socket)||void 0===t?void 0:t.isConfigured)?e.isOnline&&(null===(i=e.socket)||void 0===i?void 0:i.isConnected)&&e.resourcesAllConnected:e.isOnline),a=null!==(c=e.lastUpdated)&&void 0!==c?c:this.getNowTimestamp(),n=null!==(o=e.nextUpdate)&&void 0!==o?o:this.getNextTimestamp(),r=e.isAuthenticated&&this.user?this.user.username:void 0,l=Object.assign(Object.assign({},e),{browserInformation:mC,username:r,isHealthy:s,lastUpdated:a,nextUpdate:n,firstUpdated:pC,runAllChecks:()=>{fC.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(l)});return l}preFlightSocketChecks(e){if(!e.isConfigured)return fC.debug("Socket not configured"),!1;if(e.isReconnecting)return fC.debug("Socket reconnecting"),!1;if(e.isConnecting)return fC.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return fC.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&fC.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return fC.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return Jf(e)}getNowTimestamp(){return Date.now()}getNextTimestamp(){return new Date(Date.now()+this.config.checkInterval).getTime()}synchroniseCheckInterval(){clearInterval(this.internalId),this.internalId=setInterval(()=>this.runAllChecks("check interval"),this.config.checkInterval)}}Ou([cC],vC.prototype,"config",void 0),Ou([lz],vC.prototype,"socketStatus",void 0),Ou([ub],vC.prototype,"connectEvents",void 0),Ou([ib],vC.prototype,"user",void 0),Ou([b],vC.prototype,"status",void 0);const bC=mt.createInterface(e=>e.singleton(vC)),yC={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},zC=mt.createInterface();var CC,LC;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(CC||(CC={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(LC||(LC={}));let xC=class{constructor(e,t,i=yC){this.connect=e,this.user=t,this.kvStorageConfig=i}delete(e){return Ru(this,void 0,void 0,function*(){const t={DETAILS:{KEYS:e}},i=yield this.connect.commitEvent(LC.EVENT_KEY_VALUE_DELETE,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}get(e){return Ru(this,void 0,void 0,function*(){var t;const i={REQUEST:{USER_NAME:null!==(t=this.kvStorageConfig.authEmail)&&void 0!==t?t:this.user.userName,KEY:e}},c=yield this.connect.request(CC.REQ_KEY_VALUE_READ,i);if(c&&c.REPLY&&c.REPLY.length>0){const t=c.REPLY.map(e=>{const t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let t=If(e);return"string"==typeof t&&t.startsWith("str:")&&(t=If(t)),"string"==typeof t&&t.startsWith("bin:")&&(t=If(t)),t}list(){return Ru(this,void 0,void 0,function*(){var e;const t={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},i=yield this.connect.request(CC.REQ_KEY_VALUE_LIST,t);if(i&&i.REPLY&&i.REPLY.length>0){return i.REPLY.map(e=>e.KEY)}return[]})}put(e){return Ru(this,void 0,void 0,function*(){const t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?Df(e.value):e.value}))}},i=yield this.connect.commitEvent(LC.EVENT_KEY_VALUE_PUT,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}};xC=Ou([Tu(0,bz),Tu(1,ib),Tu(2,yt(zC))],xC),mt.createInterface(e=>e.singleton(xC));class MC{constructor(){this.isWorking=!1,this.loggedUserResult=null,this.currentUser=null,this.isLoggedIn=!1,this.isLoggedInSubject=new og(!1)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}login(e){return Ru(this,void 0,void 0,function*(){return Promise.resolve(this.nextLoginResult)})}logout(){return Ru(this,void 0,void 0,function*(){return Promise.resolve(this.nextLogoutResult)})}reAuthFromSession(){return Ru(this,void 0,void 0,function*(){return Promise.resolve(this.nextReAuthResult)})}setTestUser(e={}){this.currentUser=new tb,this.currentUser.set(Object.assign({userName:"JaneDee",profile:["USER"],permission:["CreateRules"]},e)),this.isLoggedIn=!0,this.isLoggedInSubject.next(!0)}resetTestUser(){this.currentUser=null,this.isLoggedIn=!1,this.isLoggedInSubject.next(!1)}}Ou([b],MC.prototype,"isWorking",void 0),Ou([b],MC.prototype,"loggedUserResult",void 0),Ou([b],MC.prototype,"currentUser",void 0),Ou([b],MC.prototype,"isLoggedIn",void 0);class wC{constructor(){this.fetchMetadataRequired=!0,this.fetchingMetadata=!1,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.criteriaOnlyRequest=!1}init(e,t){return Promise.resolve(this.initialized)}startStream(){return Promise.resolve()}setMetadata(e){var t,i,c;this.availableIndexes=null!==(t=e.INDEXES)&&void 0!==t?t:[],this.availableSortableFields=null!==(i=e.SORTABLE_FIELDS)&&void 0!==i?i:[],this.availableCriteriaFields=null!==(c=e.CRITERIA_FIELDS)&&void 0!==c?c:[],this.originalFieldDef=db(e),this.fieldMetadata=lb(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.fetchMetadataRequired=!1}unsetMedata(){this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.fetchMetadataRequired=!0}setStream(e){this.stream=Zg(Promise.resolve(e))}unsetStream(){this.stream=void 0}deinit(){}destroy(){}validResourceName(e){return!!e&&!!e.trim().length}getMetadata(e){return Promise.resolve(this.fieldMetadata)}snapshot(e){return Promise.resolve(null)}snapshotFiltered(e){return Promise.resolve(null)}updateData(e){return Promise.resolve()}dataHandler(e){return[]}addView(e){}dropView(e){}setFilter(e,t,i){return Promise.resolve()}clearFilter(e){return Promise.resolve()}createItem(e){return Promise.resolve("")}deleteItem(e){return Promise.resolve()}updateItem(e,t){return Promise.resolve()}get dataserverOnlyParams(){return{}}get requestOnlyParams(){return{}}updateLoadMoreCount(e){}}Ou([b],wC.prototype,"status",void 0),Ou([b],wC.prototype,"fetchMetadataRequired",void 0),Ou([b],wC.prototype,"originalFieldDef",void 0),Ou([b],wC.prototype,"fieldMetadata",void 0),Ou([b],wC.prototype,"requestFields",void 0),Ou([b],wC.prototype,"customRequestFields",void 0),Ou([b],wC.prototype,"availableIndexes",void 0),Ou([b],wC.prototype,"availableSortableFields",void 0),Ou([b],wC.prototype,"availableCriteriaFields",void 0),Ou([b],wC.prototype,"criteriaOnlyRequest",void 0),mt.createInterface(e=>e.aliasTo(ib));const SC=af("foundation-ui");class kC extends(qz(Wt)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=Bz.MAX_ROWS_250,this.maxView=Bz.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new og(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==eC(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(this[t]=e[t])})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){var e;return this.rowId?this.rowId:(null===(e=this.datasource)||void 0===e?void 0:e.resourceType)===nb.REQUEST_SERVER?Bz.REQUEST_SERVER_ROW_ID:Bz.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return Ru(this,arguments,void 0,function*(e=!0){var t,i;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.fetchGeneration+=1;const c=this.fetchGeneration,o=()=>c!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const s=e||!this.datasource.initialized;s||(this.connect.dataLogoff(this.sourceRef),this.clearData()),this.sourceRef=void 0;const a=yield this.datasource.init(this.datasourceOptions(),s);if(!o())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshot();if(o())return;const t=this.filterSnapshotResult(e);return this.updateRequestPagingState(e,null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0,this.initialRequestOffset()),void this.syncComponentData(t)}SC.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(o())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF,"boolean"==typeof e.MORE_ROWS&&(this.moreRowsAvailable=e.MORE_ROWS);const t=e.MESSAGE_TYPE;if(t&&t===Nb.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=Vz(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return Ru(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}canRequestMoreRows(){if(!this.isConnected||!this.datasource||!this.moreRowsAvailable)return!1;switch(this.datasource.resourceType){case nb.REQUEST_SERVER:return!0;case nb.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return Ru(this,void 0,void 0,function*(){var e;if(this.canRequestMoreRows())try{if(this.datasource.resourceType===nb.DATASERVER)return void(yield this.connect.getMoreRows(this.sourceRef));const t=this.fetchGeneration,i=this.nextRequestOffset;this.moreRowsAvailable=!1;const c=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS),{OFFSET:i})});if(t!==this.fetchGeneration)return;const o=Array.isArray(null==c?void 0:c.REPLY)?c.REPLY:[];this.updateRequestPagingState(c,o.length,i),o.length>0&&this.handleStreamInserts(o)}catch(e){throw this.moreRowsAvailable=!0,this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:"error",loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e)return Array.isArray(e)?e:e.REPLY?e.REPLY:e.ROW?Vz(e).inserts:void 0}updateRequestPagingState(e,t,i){if(Array.isArray(e)||!e)return void(this.moreRowsAvailable=!1);const c=e,o=Number(this.maxRows)||0;this.moreRowsAvailable="boolean"==typeof c.MORE_ROWS?c.MORE_ROWS:t>0&&o>0&&t>=o,this.nextRequestOffset="number"==typeof c.NEXT_OFFSET&&c.NEXT_OFFSET>0?c.NEXT_OFFSET:i+t}initialRequestOffset(){var e,t;return Number(null===(t=null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.OFFSET)||0}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh)return null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),void this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));this.handleStreamInserts(e.REPLY);const c=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(c)}applyDataserverData(e){var t,i,c,o;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(c=e.deletes)||void 0===c?void 0:c.length)>0&&this.handleStreamDeletes(e.deletes),(null===(o=e.updates)||void 0===o?void 0:o.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;return eC(((null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[]).join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:i,loggerArgs:c=[]}=e;t&&SC[i](t,...c)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===sb.DATE||t===sb.DATETIME?ep(e,t===sb.DATETIME):e}}Ou([bz],kC.prototype,"connect",void 0),Ou([Xz],kC.prototype,"datasource",void 0),Ou([de({mode:"boolean"})],kC.prototype,"withGridInit",void 0),Ou([de],kC.prototype,"criteria",void 0),Ou([b],kC.prototype,"data",void 0),Ou([de],kC.prototype,"fields",void 0),Ou([de({mode:"boolean"})],kC.prototype,"isSnapshot",void 0),Ou([de],kC.prototype,"maxRows",void 0),Ou([de],kC.prototype,"maxView",void 0),Ou([de],kC.prototype,"orderBy",void 0),Ou([de],kC.prototype,"request",void 0),Ou([de],kC.prototype,"resourceName",void 0),Ou([de({mode:"boolean"})],kC.prototype,"reverse",void 0),Ou([de],kC.prototype,"rowId",void 0),Ou([de({mode:"boolean",attribute:"with-timestamp-formatting"})],kC.prototype,"withTimestampFormatting",void 0);const EC=(e,t)=>!e.composedPath().includes(t),$C=(e,t)=>e.composedPath().includes(t),NC=e=>e.tagName.toLowerCase().split("-")[0];const AC=af("foundation-criteria");var OC;!function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(OC||(OC={}));class TC{constructor(e){this.$$operator=e}static And(){return new TC(OC.AND)}static Or(){return new TC(OC.OR)}static Not(){return new TC(OC.NOT)}static GreaterThan(){return new TC(OC.GT)}static GreaterThanOrEqual(){return new TC(OC.GE)}static LessThan(){return new TC(OC.LT)}static LessThanOrEqual(){return new TC(OC.LE)}static NotEqual(){return new TC(OC.NE)}static Equal(){return new TC(OC.EQ)}get operator(){return this.$$operator}}const RC=e=>{const{value:t}=e;return e.valueGetter?e.valueGetter(t):"function"==typeof t?t(e):Array.isArray(t)?t.join(","):"string"==typeof t?`"${t}"`:t},IC=e=>t=>`${t.field} ${e} ${RC(t)}`,DC={AND:e=>IC(OC.AND)(e),OR:e=>IC(OC.OR)(e),NOT:e=>IC(OC.NOT)(e),GT:e=>IC(OC.GT)(e),GE:e=>IC(OC.GE)(e),LT:e=>IC(OC.LT)(e),LE:e=>IC(OC.LE)(e),NE:e=>IC(OC.NE)(e),EQ:e=>IC(OC.EQ)(e),equals:e=>`${e.field}.equals(${RC(e)})`,equalsIgnoreCase:e=>`${e.field}.equalsIgnoreCase(${RC(e)})`,contains:e=>`Expr.contains(${e.field}, ${RC(e)})`,fieldContains:e=>`${e.field}.contains(${RC(e)})`,containsIgnoreCase:e=>`Expr.containsIgnoreCase(${e.field}, ${RC(e)})`,startsWith:e=>`${e.field}.startsWith(${RC(e)})`,endsWith:e=>`${e.field}.endsWith(${RC(e)})`,dateIsToday:e=>`Expr.dateIsToday(${e.field})`,dateIsEqual:e=>`Expr.dateIsEqual(${e.field}, ${RC(e)})`,dateIsGreaterEqual:e=>`Expr.dateIsGreaterEqual(${e.field}, ${RC(e)})`,dateIsLessEqual:e=>`Expr.dateIsLessEqual(${e.field}, ${RC(e)})`,dateTimeIsGreaterEqual:e=>`Expr.dateTimeIsGreaterEqual(${e.field}, ${RC(e)})`,dateTimeIsLessEqual:e=>`Expr.dateTimeIsLessEqual(${e.field}, ${RC(e)})`},FC=e=>Array.isArray(e)?e:[e],HC="default";class _C{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,TC.And()),this.Or=(e,t={})=>this.withExpression(e,t,TC.Or()),this.Not=(e,t={})=>this.withExpression(e,t,TC.Not())}withExpression(e,t={},i=TC.And()){const{condition:c,join:o,groupName:s}=t,a=(e,t=HC)=>{var s;const a=null!==(s=this.expressions[t])&&void 0!==s?s:[];this.expressions[t]=[...a,{join:i||o,condition:c,expression:e}]};if(Array.isArray(e))if(o){const t=e.filter(e=>{const t=e instanceof TC;return t&&AC.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t});if(s)t.forEach(e=>{a(e,s)});else{const e=(n=o,t.flat().flatMap((e,t,i)=>i.length-1!==t?[e,n]:e));a(e,HC)}}else a(e,HC);else a(e,"string"==typeof e?HC:e.group);var n;return this}build(e){const t=Object.entries(this.expressions).reduce((e,[t,i])=>Object.assign(Object.assign({},e),{[t]:`(${i.filter(({condition:e})=>!e||e()).map(({expression:e,join:t},i,c)=>this.parseExpression(e,c[i-1],t)).join("")})`}),{});return e?e(t):`(${Object.values(t).join(" && ")})`}reset(){this.expressions={}}parseExpression(e,t,i){const c=[];return i&&t&&c.push(` ${i.operator} `),"string"==typeof e?c.push(e):Array.isArray(e)?(e.forEach((e,t,i)=>{if(e instanceof TC){if(i[t-1]instanceof TC)throw new Error("Adjacent Join operations detected")}}),c.push(`(${e.map(e=>this.parseExpression(e,void 0)).join("")})`)):e instanceof TC?c.push(` ${e.operator} `):e&&c.push(e.serialiser(e)),c.join("")}}class PC{constructor(e){this.serialiser=DC.EQ,this.build=()=>{if(!this.field)throw new Error("Missing required param 'field'");if(void 0===this.value)throw new Error("Missing required param 'value'");if(!this.serialiser)throw new Error("Missing required param 'serialise'");return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}}let VC=class extends ze{constructor(){super(...arguments),this.criteriaOptions=[],this.createCriteria=e=>{const t=new _C,{field:i,serialiser:c,value:o}=e;return Array.isArray(i)||Array.isArray(o)?t.And(FC(o).map(e=>FC(i).map(t=>(new PC).withField(t).withValue(e).withSerialiser(c).build())),{join:TC.Or()}):t.And((new PC).withField(i).withValue(o).withSerialiser(c).build()),t}}valueChanged(){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}selectedLabelChanged(){const e=this.criteriaOptions.find(e=>e.label===this.selectedLabel);this.value=e?this.createCriteria(e).build():""}itemClickHandler(e){this.selectedLabel===e&&(this.selectedLabel=void 0)}};function BC(e,t){var i;const c=new _C;c.withExpression((new PC).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(DC.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${c.build()}`:e.criteria=c.build()}Ou([b],VC.prototype,"criteriaOptions",void 0),Ou([b],VC.prototype,"prefix",void 0),Ou([b],VC.prototype,"value",void 0),Ou([b],VC.prototype,"selectedLabel",void 0),VC=Ou([Ce({name:"criteria-segmented-control",template:((e="rapid")=>K`<${e}-segmented-control :value="${Of(e=>e.selectedLabel)}"><slot name="label" slot='label'></slot>${We(e=>e.criteriaOptions,K`<${e}-segmented-item @click=${(e,t)=>t.parent.itemClickHandler(e.label)}value=${e=>e.label}>${e=>e.label}</${e}-segmented-item>`)}</${e}-segmented-control>`)(),styles:Me``})],VC);const UC=(e,t,i)=>K`<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>`,jC=e=>K`<${e}-button ${Fe("actionsOpener")}id="actiosnMenuTrigger" class="actions-opener${e=>e.open?" opened":""}" appearance="${e=>e.buttonAppearance}" part="actions-opener" @click=${e=>e.toggleActionsMenuVisibility()}>${e=>e.open?"✖":K` ${e.name} `}</${e}-button><${e}-menu ${Fe("actionsMenu")}popover="manual" class="actions-menu ${e=>e.classNames}" part="actions-menu">${We(e=>e.allActions,K` ${Ve((e,t)=>e.isDisabled&&e.isDisabled(t.parent.rowData),K`<${e}-menu-item class="menu-item" tabindex="${(e,t)=>t.index}" disabled style=${(e,t)=>t.parent.hideDisabled?"display:none":""}>${(e,t)=>t.parent.getLabel(e.name)}</${e}-menu-item>`)} ${Ve((e,t)=>!e.isDisabled||!e.isDisabled(t.parent.rowData),K`<${e}-menu-item class="menu-item" tabindex="${(e,t)=>t.index}" @click=${(e,t)=>t.parent.onActionMenuItemClick(e.callback)}style="${e=>e.color?`color: ${e.color};`:""}">${(e,t)=>t.parent.getLabel(e.name)}</${e}-menu-item>`)} `,{positioning:!0})}</${e}-menu>`,qC=K`<div class="actions-container${e=>e.isVertical?" actions-vertical":""}" part="actions-container">${e=>e.getTemplate(NC(e))}</div>`;class GC extends Wt{constructor(){super(...arguments),this.isVertical=!1,this.addDefaultActions=!0,this.autoCloseOnAction=!0,this.name="Actions",this.open=!1,this.hideDisabled=!1,this.hideMenuSingleOption=!1}disconnectedCallback(){var e;(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover(),super.disconnectedCallback()}updateMenuPosition(){const e=this.actionsOpener.getBoundingClientRect();this.actionsMenu.style.position="fixed",this.actionsMenu.style.top=`${e.top}px`,this.actionsMenu.style.left="auto",this.actionsMenu.style.right=window.innerWidth-e.right+"px"}definitionChanged(e,t){var i;this.actions=null!==(i=null==t?void 0:t.actions)&&void 0!==i?i:[],delete this.definition.actions,t.buttonText&&(this.name=t.buttonText,delete this.definition.customButtonText),t.isVertical&&(this.isVertical=t.isVertical,delete this.definition.isVertical),t.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance),t.hideMenuSingleOption&&(this.hideMenuSingleOption=t.hideMenuSingleOption,delete this.definition.hideMenuSingleOption)}openChanged(){var e;this.classNames=ti(["visible",this.open],["hidden",!this.open]),this.open?(this.updateMenuPosition(),this.actionsMenu.showPopover()):(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover()}toggleActionsMenuVisibility(){this.open=!this.open}onActionMenuItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}get allActions(){var e;const t=[{name:"✖",callback:()=>this.open=!1}];return this.addDefaultActions?[...null!==(e=this.actions)&&void 0!==e?e:[],...t]:this.actions}get rowData(){if(!this.definition)return;const{node:e,data:t}=this.definition;return(null==e?void 0:e.data)||t}getLabel(e){return"function"==typeof e?e(this.rowData):e}getTemplate(e){if(!this.hideMenuSingleOption)return jC(e);const t=this.actions.filter(e=>!e.isDisabled||!e.isDisabled(this.rowData));return this.singleOption=null,0!==t.length?1===t.length?(this.singleOption=t[0],(e=>K`<${e}-button appearance="${e=>e.buttonAppearance}" part="actions-opener" class="actions-opener" @click=${e=>null==e?void 0:e.singleOption.callback(e.rowData)}?disabled=${e=>(null==e?void 0:e.singleOption.isDisabled)&&(null==e?void 0:e.singleOption.isDisabled(e.rowData))}>${e=>e.getLabel(null==e?void 0:e.singleOption.name)}</${e}-button>`)(e)):jC(e):void 0}}Ou([b],GC.prototype,"actions",void 0),Ou([de({attribute:"is-vertical",mode:"boolean"})],GC.prototype,"isVertical",void 0),Ou([de({attribute:"add-default-actions",mode:"boolean"})],GC.prototype,"addDefaultActions",void 0),Ou([de({attribute:"auto-close-on-action",mode:"boolean"})],GC.prototype,"autoCloseOnAction",void 0),Ou([b],GC.prototype,"classNames",void 0),Ou([b],GC.prototype,"definition",void 0),Ou([de],GC.prototype,"name",void 0),Ou([de({attribute:"open",mode:"boolean"})],GC.prototype,"open",void 0),Ou([de],GC.prototype,"buttonAppearance",void 0),Ou([de({attribute:"hide-disabled",mode:"boolean"})],GC.prototype,"hideDisabled",void 0),Ou([de({attribute:"hide-menu-single-option",mode:"boolean"})],GC.prototype,"hideMenuSingleOption",void 0),Ou([b],GC.prototype,"singleOption",void 0),GC.compose({baseName:"actions-menu",styles:(e,t)=>Me` ${ku()}`,template:qC});let WC=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(WC="true"===GENX_ENABLE_AI)}catch(dC){}const YC=()=>WC||Ff("ai");function KC(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}af("foundation-ai");class ZC{getStatus(){return Ru(this,void 0,void 0,function*(){return{provider:"none",model:""}})}interpretCriteria(e,t){return Ru(this,void 0,void 0,function*(){return null})}}class QC{constructor(){this.noopProvider=new ZC}get(e){return e===QC.DEFAULT_NAME?this.noopProvider:void 0}default(){return this.noopProvider}defaultName(){return QC.DEFAULT_NAME}names(){return[QC.DEFAULT_NAME]}getStatus(e){return Ru(this,void 0,void 0,function*(){var t,i,c;return void 0!==e&&e!==QC.DEFAULT_NAME?null:null!==(c=yield null===(i=(t=this.noopProvider).getStatus)||void 0===i?void 0:i.call(t))&&void 0!==c?c:null})}listStatuses(){return Ru(this,void 0,void 0,function*(){var e,t,i;const c=null!==(i=yield null===(t=(e=this.noopProvider).getStatus)||void 0===t?void 0:t.call(e))&&void 0!==i?i:null;return[{name:QC.DEFAULT_NAME,isDefault:!0,status:c}]})}}QC.DEFAULT_NAME="default";const XC=mt.createInterface(e=>e.singleton(QC)),JC=Me` :host{display: block;width: 800px}.ai-criteria-search{display: flex;flex-direction: column;gap: calc(${fr} * 2px)}.ai-criteria-search-row{display: flex;flex-direction: row;gap: calc(${fr} * 2px);align-items: center}.criteria-input{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);flex: 1;min-width: 0}.criteria-chips-inline{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);flex: 1;min-width: 0;display: flex;align-items: center;gap: calc(${fr} * 1px);overflow-x: auto;padding: 0 calc(${fr} * 2px);background: var(--neutral-fill-input-rest);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px);scrollbar-width: none}.criteria-chips-inline::-webkit-scrollbar{display: none}.mic-icon{color: var(--neutral-foreground-rest);fill: currentColor}.criteria-toggle-button, .criteria-clear-button{flex-shrink: 0}.criteria-chip{display: inline-flex;align-items: center;flex-shrink: 0;gap: calc(${fr} * 1px);padding: calc(${fr} * 0.5px) calc(${fr} * 2px);background: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(${fr} * 4px);font-size: var(--type-ramp-minus-1-font-size);color: var(--neutral-foreground-rest);white-space: nowrap}.criteria-chip-field{font-weight: 600}.criteria-chip-operator{color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));font-style: italic}.criteria-chip-remove{display: inline-flex;align-items: center;justify-content: center;width: 14px;height: 14px;padding: 0;margin-left: calc(${fr} * 0.5px);background: none;border: none;cursor: pointer;color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));font-size: 10px;border-radius: 50%;line-height: 1}.criteria-chip-remove:hover{background: var(--neutral-fill-hover);color: var(--neutral-foreground-rest)}`,eL=K` ${e=>(e=>K` ${Ve(()=>YC(),K`<div class="ai-criteria-search"><div class="ai-criteria-search-row">${Ve(e=>!e.showingChips,K`<${e}-text-area ${Fe("textAreaRef")}class="criteria-input" placeholder="${e=>e.placeholder}" ?disabled=${e=>e.disabled||e.isInterpreting}:value=${Of(e=>e.inputValue,"string","input")}@blur=${e=>e.handleBlur()}rows="1"></${e}-text-area>`)} ${Ve(e=>e.showingChips,K`<div class="criteria-chips-inline">${We(e=>e.criteriaChips,K`<span class="criteria-chip"><span class="criteria-chip-field">${e=>e.fieldLabel}</span><span class="criteria-chip-operator">${e=>e.operatorLabel}</span>${Ve(e=>!!e.valueLabel,K`<span class="criteria-chip-value">${e=>e.valueLabel}</span>`)}<button class="criteria-chip-remove" aria-label="Remove filter" @click=${(e,t)=>t.parent.removeChip(e.groupIndex,e.clauseIndex)}>
|
|
58
58
|
✕
|
|
59
59
|
</button></span>`)}</div>`)}<${e}-button class="criteria-toggle-button" appearance="outline" title=${e=>e.showingChips?"Add more criteria":"View active filters"}?disabled=${e=>0===e.activeGroups.length||e.isInterpreting}@click=${e=>e.toggleCriteriaView()}><${e}-icon name="pen" size="sm"></${e}-icon></${e}-button><${e}-button class="criteria-clear-button" appearance="outline" title="Clear all filters" ?disabled=${e=>0===e.activeGroups.length||e.isInterpreting}@click=${e=>e.clearChips()}><${e}-icon name="trash-alt" size="sm"></${e}-icon></${e}-button>${Ve(e=>e.speechAvailable,K`<${e}-button class="mic-button" appearance="${e=>e.isRecording?"accent":"outline"}" ?disabled=${e=>e.disabled||e.isInterpreting}@click=${e=>e.toggleSpeechInput()}title=${e=>e.isRecording?"Stop recording":"Start voice input"}><${e}-icon class="mic-icon" name="microphone" size="lg" variant="solid"></${e}-icon></${e}-button>`)}</div></div>`)} `)(NC(e))} `,tL={contains:DC.containsIgnoreCase,equals:DC.EQ,startsWith:DC.startsWith,endsWith:DC.endsWith,greaterThan:DC.GT,lessThan:DC.LT,greaterThanOrEqual:DC.GE,lessThanOrEqual:DC.LE,notEqual:DC.NE,dateIsToday:DC.dateIsToday,dateIsAfter:DC.dateIsGreaterEqual,dateIsGreaterEqual:DC.dateIsGreaterEqual,dateIsBefore:DC.dateIsLessEqual,dateIsLessEqual:DC.dateIsLessEqual,dateIsEqual:DC.dateIsEqual,dateTimeIsAfter:DC.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:DC.dateTimeIsGreaterEqual,dateTimeIsBefore:DC.dateTimeIsLessEqual,dateTimeIsLessEqual:DC.dateTimeIsLessEqual};function iL(e){var t,i;const c=null!==(t=tL[e.operator])&&void 0!==t?t:DC.containsIgnoreCase;return(new PC).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(c).withGroup("default").build()}function cL(e,t){return 1===e.length?e[0]:e.reduce((e,i,c)=>0===c?[i]:[...e,t,i],[])}function oL(e){var t;const i=new _C;let c=!1;for(const o of e){if(!(null===(t=o.clauses)||void 0===t?void 0:t.length))continue;const e=o.clauses.map(iL),s="or"===o.logic?TC.Or():TC.And(),a=cL(e,s),n=e.length>1?{join:s}:{};o.negated?i.And([TC.Not(),a]):i.And(1===e.length?e[0]:e,n),c=!0}return c?i.build():""}const sL=["contains","equals","startsWith","endsWith","notEqual"],aL=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],nL=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],rL=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],lL={contains:"contains",equals:"=",startsWith:"starts with",endsWith:"ends with",notEqual:"≠",greaterThan:">",lessThan:"<",greaterThanOrEqual:"≥",lessThanOrEqual:"≤",dateIsToday:"is today",dateIsAfter:"after",dateIsBefore:"before",dateIsEqual:"=",dateIsGreaterEqual:"≥",dateIsLessEqual:"≤",dateTimeIsAfter:"after",dateTimeIsBefore:"before",dateTimeIsGreaterEqual:"≥",dateTimeIsLessEqual:"≤"},dL=new Set(["DATE","LOCALDATE"]),hL=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),uL=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function fL(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function pL(e){const t=fL(e);return dL.has(t)?nL:hL.has(t)?rL:uL.has(t)?aL:sL}function mL(e){return uL.has(fL(e))}function gL(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function vL(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function bL(e,t){const i=[],c=[],o=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>o.set(e,void 0)):t.forEach(e=>o.set(e.NAME,e))}for(const t of e){const{field:e,operator:s,value:a}=t;if(!e||"string"!=typeof e){c.push({field:String(e),message:"Field name is required"});continue}const n=o.get(e),r=n&&"TYPE"in n?n.TYPE:"STRING";pL(r).includes(s)?!nL.includes(s)&&!rL.includes(s)||"dateIsToday"===s||gL(a)?mL(r)&&aL.includes(s)&&!vL(a)?c.push({field:e,operator:s,value:a,message:"Invalid numeric value"}):o.size>0&&!o.has(e)?c.push({field:e,operator:s,value:a,message:`Unknown field '${e}'`}):i.push(t):c.push({field:e,operator:s,value:a,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):c.push({field:e,operator:s,value:a,message:`Operator '${s}' is not allowed for field type ${r}`})}return{valid:i,invalid:c}}const yL=af("foundation-notifications");let zL=null;const CL=new Map,LL=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},xL=e=>{var t;return(null==e?void 0:e.logLevel)||(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.logLevel)||ju.debug},ML=e=>{yL.log({message:LL(e),level:xL(e)})},wL=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(CL.has(e))i=CL.get(e);else{const t=zf(document).find(t=>t.id===e);t&&(i=t,CL.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:c}=Cf(document.body,"rapid");if(t)t.appendChild(i),zL=t;else if(zL)zL.appendChild(i);else{const e=document.createElement(`${c}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),zL=e}}return i},SL=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e};var kL,EL,$L;!function(e){e.NOTIFICATION_EVENT="notification-event"}(kL||(kL={})),function(e){e.Top="top",e.Bottom="bottom"}(EL||(EL={})),function(e){e.Left="left",e.Right="right"}($L||($L={}));const NL="12px";const AL=(e,t,i)=>{var c,o,s,a,n,r,l,d,h,u,f,p,m,g,v,b,y,z,C;ML(e);const L=t.split("-")[0],x=(null===(o=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.toast)||void 0===o?void 0:o.position)||"top-right",M=null!==(s=null!=i?i:(e=>zf(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))(x))&&void 0!==s?s:wL("notify-container");M&&"notify-container"!==M.tagName.toLowerCase()&&function(e,t){var i,c;switch(t.style.position="fixed",null===(c=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===c?void 0:c.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,M);const w=document.createElement(`${L}-toast`),S=document.createElement("div");S.setAttribute("slot","top"),S.textContent=e.title;const k=document.createElement("div");k.setAttribute("slot","content"),k.textContent=(null==e?void 0:e.body)||"";const E=document.createElement("div");let $;E.setAttribute("slot","date"),E.textContent=(null===(a=null==e?void 0:e.createdAt)||void 0===a?void 0:a.toLocaleTimeString())||"",(null===(r=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.toast)||void 0===r?void 0:r.buttons)&&(null===(h=null===(d=null===(l=null==e?void 0:e.config)||void 0===l?void 0:l.toast)||void 0===d?void 0:d.buttons)||void 0===h?void 0:h.length)&&($=document.createElement("div"),$.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${L}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:c}=e.config.toast;if(t.action)return t.action({details:c,buttonElement:i,toastElement:w})}),t.appearance&&i.setAttribute("appearance",t.appearance),$.appendChild(i)})),w.setAttribute("notify",(null===(f=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.toast)||void 0===f?void 0:f.type)||""),e.iconName&&w.setAttribute("notification-icon",e.iconName),(null===(m=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.toast)||void 0===m?void 0:m.autoClose)&&w.setAttribute("auto-close",`${null===(v=null===(g=null==e?void 0:e.config)||void 0===g?void 0:g.toast)||void 0===v?void 0:v.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&w.setAttribute("close-timeout",`${null===(C=null===(z=null==e?void 0:e.config)||void 0===z?void 0:z.toast)||void 0===C?void 0:C.closeTimeout}`),w.appendChild(S),w.appendChild(k),w.appendChild(E),$&&w.appendChild($),M.prepend(w)},OL=(e,t,i)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let c={title:e.title,body:e.body,iconName:e.iconName},o={};e.createdAt&&(c=Object.assign({createdAt:e.createdAt},c)),null!=e.logLevel&&(c=Object.assign({logLevel:e.logLevel},c)),e.toast&&(o=Object.assign({toast:e.toast},o),c=Object.assign({config:o},c)),AL(c,t,i)},TL=Me` :host{position: fixed;z-index: 9999;display: flex;flex-direction: column;gap: 4px;box-sizing: border-box;pointer-events: none;/* Allow clicks to pass through empty space */ width: 415px}.toast-container{padding: 0 8px 12px 12px;position: relative}/* Expanded / List State: Allow scrolling if too many items */ :host(:not([stack-collapsed])){max-height: calc(100% - var(--nav-height));overflow: hidden;pointer-events: auto;/* Enable pointer events for scrolling */ slot{display: block;height: calc(100vh - var(--nav-height) - 54px);position: relative}.toast-container{flex: 1;height: 100%;overflow-y: auto;overflow-x: hidden;scrollbar-color: var(--neutral-layer-3) transparent;&:hover{scrollbar-color: var(--neutral-layer-4) transparent}}}.header{display: flex;gap: 12px;pointer-events: none;margin: 5px 24px;justify-content: space-between;visibility: hidden;align-items: center;box-sizing: border-box;.header-title{text-shadow: 0 0 10px #000}.notification-header-buttons{display: flex;gap: 4px;rapid-icon{color: var(--neutral-foreground-hint);margin-left: 4px;display: inline-flex;font-size: 14px;&.chevron-up.collapse{transform: rotate(180deg);transition: transform 0.3s ease}}}--base-height-multiplier: 8;*[appearance='neutral']{font-size: 11px;cursor: pointer;background: var(--neutral-fill-rest)}}.header.visible{visibility: visible;pointer-events: auto;/* Enable clicks on header buttons */}:host([position$='left']) .header{justify-content: space-between}:host([position^='bottom']) .header{margin-bottom: 0;margin-top: 4px}/* Ensure children (toasts) are clickable */ ::slotted(*){pointer-events: auto}:host([position='top-right']){top: var(--nav-height, 0);right: 0}:host([position='top-left']){top: var(--nav-height, 0);left: 0}:host([position='bottom-right']){bottom: 0;right: 0;flex-direction: column-reverse}:host([position='bottom-left']){bottom: 0;left: 0;flex-direction: column-reverse}/* Stacked / Collapsed State */ :host([stack-collapsed]){height: min-content;/* Host allows pointer events so they can reach the slot */ pointer-events: auto;cursor: pointer}/* Apply the grid layout to the slot itself so it acts as the container and click target */ :host([stack-collapsed]) slot{display: grid;grid-template-columns: auto;grid-template-rows: auto;align-items: end;/* Default to bottom-up stacking */ justify-items: center;/* The slot catches the click */ pointer-events: auto}/* Rotate when the collapse class is present */ :host([stack-collapsed][position^='top']) slot{align-items: start}:host([stack-collapsed][position$='right']) slot{justify-items: end}:host([stack-collapsed][position$='left']) slot{justify-items: start}:host([stack-collapsed]) ::slotted(*){grid-area: 1 / 1;transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;opacity: 0%;pointer-events: none !important;/* Disable interaction with toasts in collapsed state */ transform: scale(0.9);top: 0 !important}/* Show and offset the top 3 items in the stack */ :host([stack-collapsed]) ::slotted([data-stack-index='0']){opacity: 100%;pointer-events: auto;transform: translateY(0) scale(1);z-index: 3;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='1']){opacity: 100%;transform: translateY(var(--stack-offset-y, 8px)) scale(0.95);z-index: 2;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='2']){opacity: 100%;transform: translateY(var(--stack-offset-y-2, 16px)) scale(0.9);z-index: 1;position: relative !important}/* Adjust offset direction based on position */ :host([stack-collapsed][position^='top']){--stack-offset-y: 8px;--stack-offset-y-2: 16px}:host([stack-collapsed][position^='bottom']){--stack-offset-y: -8px;--stack-offset-y-2: -16px}`,RL=K` ${Ve(e=>e.allowCloseAll||e.allowManualCollapse,K` ${e=>(e=>K`<div class="header ${e=>ti(["visible",e.slottedNodes.length>1])}">${Ve(e=>e.showCount,K`<span class="header-title">${e=>e.slottedNodes.length}Notifications</span>`)}<div class="notification-header-buttons">${Ve(e=>e.allowManualCollapse,K`<${e}-button @click=${e=>e.handleToggleCollapse()}>${e=>e.stackCollapsed?"Expand":"Collapse"}<${e}-icon class="chevron-up ${e=>ti(["collapse",e.stackCollapsed])}" name="chevron-up"></${e}-icon></${e}-button>`)} ${Ve(e=>e.allowCloseAll,K`<${e}-button @click=${e=>e.handleCloseAll()}>
|
|
60
60
|
Close All <${e}-icon name="xmark"></${e}-icon></${e}-button>`)}</div></div>`)(e.designSystemPrefix)} `)}<div class="toast-container"><slot ${Qe("slottedNodes")}@click="${e=>e.handleContainerClick()}"></slot></div>`;let IL=class extends ze{constructor(){super(...arguments),this.position="top-right",this.stackThreshold=5,this.allowManualCollapse=!0,this.allowCloseAll=!0,this.designSystemPrefix="rapid",this.showCount=!0,this.stackCollapsed=!1,this.notificationInterval=0,this.manuallyExpanded=!1,this.pendingQueue=[],this.queueTimer=null,this.queuedNodes=new Set,this.mutationObserver=null,this.knownNodes=new Set,this.peekingNode=null,this.peekTimer=null,this.routeSubscriber={handleChange:()=>this.checkRoute(vp.shared.pathName)},this.slottedNodes=[]}connectedCallback(){super.connectedCallback(),"bottom-left"!==this.position&&"bottom-right"!==this.position||yL.error("NotifyContainer doesn't currently support bottom corner placements"),v.getNotifier(vp.shared).subscribe(this.routeSubscriber,"pathName"),this.checkRoute(vp.shared.pathName),this.mutationObserver=new MutationObserver(e=>this.handleMutation(e)),this.mutationObserver.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),v.getNotifier(vp.shared).unsubscribe(this.routeSubscriber,"pathName"),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null}checkRoute(e){(e.includes("/login")||e.includes("/logout"))&&(this.pendingQueue=[],this.queuedNodes.clear(),clearTimeout(this.queueTimer),this.queueTimer=null,this.handleCloseAll())}slottedNodesChanged(){if(!this.manuallyExpanded&&!this.stackCollapsed&&this.slottedNodes.length>this.stackThreshold&&(this.stackCollapsed=!0),this.stackCollapsed&&this.slottedNodes.length<=1&&(this.stackCollapsed=!1,this.manuallyExpanded=!1,this.cancelPeek()),this.stackCollapsed){const e=this.slottedNodes.filter(e=>e instanceof HTMLElement&&!this.knownNodes.has(e)).shift();e&&this.maybePeek(e)}this.knownNodes=new Set(this.slottedNodes),this.applySort()}handleContainerClick(){this.stackCollapsed&&(this.stackCollapsed=!1,this.manuallyExpanded=!0,this.cancelPeek())}handleToggleCollapse(){this.stackCollapsed=!this.stackCollapsed,this.manuallyExpanded=!this.stackCollapsed,this.stackCollapsed||this.cancelPeek()}handleCloseAll(){for(this.cancelPeek();this.firstChild;)this.removeChild(this.firstChild);this.stackCollapsed=!1,this.manuallyExpanded=!1}notificationIntervalChanged(e,t){!t&&this.pendingQueue&&this.flushQueue()}handleMutation(e){this.notificationInterval&&(e.forEach(e=>{e.addedNodes.forEach(e=>{e instanceof HTMLElement&&(this.queuedNodes.has(e)?this.queuedNodes.delete(e):(this.removeChild(e),this.pendingQueue.push(e)))})}),this.queueTimer||this.processQueue())}processQueue(){if(!this.pendingQueue.length)return void(this.queueTimer=null);const e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e),this.queueTimer=setTimeout(()=>{this.queueTimer=null,this.processQueue()},this.notificationInterval)}flushQueue(){for(clearTimeout(this.queueTimer),this.queueTimer=null;this.pendingQueue.length;){const e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e)}}sortFnChanged(){this.applySort()}applySort(){const e=this.slottedNodes.filter(e=>e instanceof HTMLElement);if(!e.length)return;const t=this.sortFn&&e.length>1?[...e].sort(this.sortFn):e;this.peekingNode&&t.includes(this.peekingNode)?this.handlePosition([this.peekingNode,...t.filter(e=>e!==this.peekingNode)]):this.handlePosition(t)}maybePeek(e){const t=this.slottedNodes.filter(e=>e instanceof HTMLElement);if(0===(this.sortFn&&t.length>1?[...t].sort(this.sortFn):t).indexOf(e))return;this.cancelPeek(),this.peekingNode=e;const i=this.notificationInterval?this.notificationInterval/2:1500;this.peekTimer=setTimeout(()=>{this.peekingNode=null,this.peekTimer=null,this.applySort()},i)}cancelPeek(){clearTimeout(this.peekTimer),this.peekTimer=null,this.peekingNode=null}handlePosition(e){if(!e.length)return;e.forEach((t,i)=>{t.style.position="absolute",t.style.transition="all 0.3s ease-in",t.style.right="0px",t.style.zIndex=(e.length-i).toString(),t.dataset.stackIndex=i.toString()});const t=e.map(e=>e.offsetHeight);e.reduce((e,i,c)=>(i.style.top=`${e}px`,e+t[c]),0)}};Ou([de],IL.prototype,"position",void 0),Ou([de({attribute:"stack-threshold"})],IL.prototype,"stackThreshold",void 0),Ou([de({attribute:"allow-manual-collapse",mode:"boolean"})],IL.prototype,"allowManualCollapse",void 0),Ou([de({attribute:"allow-close-all",mode:"boolean"})],IL.prototype,"allowCloseAll",void 0),Ou([de({attribute:"design-system-prefix"})],IL.prototype,"designSystemPrefix",void 0),Ou([de({attribute:"show-count",mode:"boolean"})],IL.prototype,"showCount",void 0),Ou([de({attribute:"stack-collapsed",mode:"boolean"})],IL.prototype,"stackCollapsed",void 0),Ou([de({attribute:"notification-interval"})],IL.prototype,"notificationInterval",void 0),Ou([b],IL.prototype,"sortFn",void 0),Ou([b],IL.prototype,"slottedNodes",void 0),IL=Ou([Ce({name:"notify-container",template:RL,styles:TL})],IL);const DL={alert:e=>{ML(e),alert(LL(e))},toast:AL,dialog:(e,t,i)=>{ML(e);const c=t.split("-")[0],o=document.createElement(`${c}-dialog`),s=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):wL("dialog-container");s.appendChild(o),o.notification=e,o.show()},snackbar:(e,t)=>{var i,c,o,s,a,n;ML(e);const r=t.split("-")[0],l=document.createElement(`${r}-snackbar`),d=null!==(o=null===(c=null===(i=e.config)||void 0===i?void 0:i.snackbar)||void 0===c?void 0:c.verticalEdge)&&void 0!==o?o:EL.Bottom,h=null!==(n=null===(a=null===(s=e.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.horizontalEdge)&&void 0!==n?n:$L.Left,u=wL(`snack-container-${d}-${h}`);u&&((e,t,i)=>{e.style.position="fixed",e.style.top=t===EL.Top?NL:"",e.style.bottom=t===EL.Bottom?NL:"",e.style.left=i===$L.Left?NL:"",e.style.right=i===$L.Right?NL:""})(u,d,h),u.appendChild(l),l.notification=e},banner:(e,t,i)=>{var c;ML(e);const o=t.split("-")[0],s=document.createElement(`${o}-banner`),a=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const c=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(c)return c.style.position="relative",c;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return SL()})(i);(null===(c=null==a?void 0:a.children)||void 0===c?void 0:c.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.notification=e}},FL=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(c=>{DL[c]&&DL[c](e,t,i)})};function HL(e,t,i){(null==t?void 0:t.trim())&&FL({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class _L extends Wt{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return KC()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var c,o;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(c=lL[e.operator])&&void 0!==c?c:e.operator,valueLabel:"dateIsToday"===e.operator?"":String(null!==(o=e.value)&&void 0!==o?o:"")}}))}getFieldLabel(e){var t,i;if(!Array.isArray(this.fieldMetadata)||0===this.fieldMetadata.length)return e;if("string"==typeof this.fieldMetadata[0])return e;const c=this.fieldMetadata.find(t=>t.NAME===e);return null!==(i=null!==(t=null==c?void 0:c.UI_LABEL)&&void 0!==t?t:null==c?void 0:c.NAME)&&void 0!==i?i:e}toggleCriteriaView(){this.showingChips?(this.inputValue="",this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var i;const c=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));null===(i=c[e])||void 0===i||i.clauses.splice(t,1);const o=c.filter(e=>e.clauses.length>0);if(this.activeGroups=o,0===o.length)this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null);else{const e=oL(o);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null)}handleSubmit(){return Ru(this,void 0,void 0,function*(){var e,t,i;const c=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(!c||this.isInterpreting)return;const o=null===(t=this.providerRegistry)||void 0===t?void 0:t.default();if(null==o?void 0:o.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield o.interpretCriteria(c,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return HL("AI criteria search","AI could not interpret the criteria",NC(this)),void(this.isInterpreting=!1);const{valid:a,invalid:n}=function(e,t){var i;const c=[],o=[];for(const s of e){if(!(null==s?void 0:s.clauses)||!Array.isArray(s.clauses)){o.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:a}=bL(s.clauses,t);o.push(...a),e.length>0&&c.push({logic:null!==(i=s.logic)&&void 0!==i?i:"and",negated:s.negated,clauses:e})}return{valid:c,invalid:o}}(t.groups,this.fieldMetadata);if(n.length>0&&(HL("Criteria validation error",0===(s=n).length?"":1===s.length?s[0].message:s.map(e=>e.message).join("; "),NC(this)),this.$emit("validation-errors",n)),a.length>0){const e=[...this.activeGroups,...a],t=oL(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){HL("AI criteria search",e instanceof Error?e.message:"Interpretation failed",NC(this))}finally{this.isInterpreting=!1}var s}else HL("AI criteria search","AI provider not configured",NC(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!KC())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let c="";return i.onresult=t=>{let i="",o="";for(let e=t.resultIndex;e<t.results.length;e+=1){const c=t.results[e][0].transcript;t.results[e].isFinal?o+=c:i+=c}o?(c+=o,e(c,!0)):i&&e(c+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}Ou([XC],_L.prototype,"providerRegistry",void 0),Ou([de],_L.prototype,"placeholder",void 0),Ou([de({mode:"boolean"})],_L.prototype,"disabled",void 0),Ou([b],_L.prototype,"inputValue",void 0),Ou([b],_L.prototype,"isInterpreting",void 0),Ou([b],_L.prototype,"lastValidCriteria",void 0),Ou([b],_L.prototype,"activeGroups",void 0),Ou([b],_L.prototype,"showingChips",void 0),Ou([b],_L.prototype,"fieldMetadata",void 0),Ou([b],_L.prototype,"isRecording",void 0),Ou([y],_L.prototype,"speechAvailable",null),Ou([y],_L.prototype,"criteriaChips",null);const PL=void 0,VL={};_L.compose(Object.assign({baseName:"ai-criteria-search",template:eL,styles:JC,shadowOptions:PL},VL));const BL=(e,t)=>Me` :host{display: flex;justify-content: center;align-items: center;width: 100%;margin: calc(var(--design-unit) * 2px) 0;position: relative;/* Same as connection indicator */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--red: 187 30 16;--trafic-light-red: rgb(var(--red));--amber: 230 160 20;--trafic-light-amber: rgb(var(--amber))}.ai-indicator-container{display: flex;flex-direction: column;align-items: center;position: relative}.ai-indicator-badge{display: inline-flex;align-items: center;gap: calc(var(--design-unit) * 1.4px);font-size: 12px;line-height: 1;font-weight: 600;text-transform: uppercase;height: calc(var(--design-unit) * 6px);padding: calc(var(--design-unit) * 0.5px) calc(var(--design-unit) * 2px);border-radius: calc(var(--design-unit) * 1px);cursor: pointer;color: #fff}.ai-indicator-badge:hover{opacity: 90%}.ai-indicator-badge.green{background: var(--trafic-light-green)}.ai-indicator-badge.amber{background: var(--trafic-light-amber)}.ai-indicator-badge.red{background: var(--trafic-light-red)}.ai-indicator-badge .ai-indicator-icon{flex-shrink: 0;color: inherit}.ai-indicator-badge.pulsing{animation: ai-indicator-pulse 1.5s ease-in-out infinite}@keyframes ai-indicator-pulse{0%, 100%{opacity: 100%}50%{opacity: 50%}}.ai-indicator-dropdown{position: absolute;top: 100%;right: 0;margin-top: calc(var(--design-unit) * 2px);min-width: 200px;padding: calc(var(--design-unit) * 4px);background: var(--neutral-layer-floating, #fff);border: 1px solid var(--neutral-stroke-rest, #e0e0e0);border-radius: calc(var(--design-unit) * 2px);box-shadow: 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * 4px) rgb(0 0 0 / 12%);z-index: 1000}.ai-indicator-info{display: flex;flex-direction: column;gap: 0;margin: 0;padding: 0}.ai-indicator-info .info-row{display: grid;grid-template-columns: 72px 1fr;gap: calc(var(--design-unit) * 4px);align-items: baseline;padding: calc(var(--design-unit) * 1.5px) 0;border-bottom: 1px solid var(--neutral-stroke-subtle, #eee)}.ai-indicator-info .info-row:last-child{border-bottom: none}.ai-indicator-info .info-label{margin: 0;font-size: var(--type-ramp-base-font-size);font-weight: 500;color: var(--neutral-foreground-hint, #666)}.ai-indicator-info .info-value{margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest, #333);text-transform: capitalize;word-break: break-word}.install-button{margin-top: calc(var(--design-unit) * 3px);width: 100%}`,UL=K` ${e=>(e=>K` ${Ve(()=>YC(),K`<div class="ai-indicator-container" part="ai-indicator-container"><div class=${e=>ti("ai-indicator-badge",["green","available"===e.state||"server"===e.state],["amber","downloading"===e.state||"downloadable"===e.state],["red","unavailable"===e.state||"none"===e.state],["pulsing","downloading"===e.state||e.isInstalling])}data-test-id="ai-indicator-badge" part="ai-indicator-badge" role="button" tabindex="0" aria-label="AI status" aria-haspopup="true" aria-expanded="${e=>e.open}" @click=${e=>e.toggleDropdown()}@keydown=${(e,t)=>{const i=t.event;"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),e.toggleDropdown())}}><${e}-icon class="ai-indicator-icon" name="wand-magic-sparkles" size="xs" variant="solid" part="ai-indicator-icon"></${e}-icon><span class="ai-indicator-text" data-test-id="ai-indicator-text" part="ai-indicator-text">AI</span></div>${Ve(e=>e.open,K`<div class="ai-indicator-dropdown" part="ai-indicator-dropdown"><dl class="ai-indicator-info"><div class="info-row"><dt class="info-label">Provider</dt><dd class="info-value">${e=>{var t,i;return null!==(i=null===(t=e.status)||void 0===t?void 0:t.provider)&&void 0!==i?i:"none"}}</dd></div><div class="info-row"><dt class="info-label">Model</dt><dd class="info-value">${e=>{var t;return(null===(t=e.status)||void 0===t?void 0:t.model)||"—"}}</dd></div>${Ve(e=>e.chromeStatusLabel,K`<div class="info-row"><dt class="info-label">Status</dt><dd class="info-value">${e=>e.chromeStatusLabel}</dd></div>`)}</dl>${Ve(e=>e.canInstall,K`<${e}-button class="install-button" appearance="accent" @click=${(e,t)=>{t.event.preventDefault(),e.onInstall()}}>
|