@govtechsg/sgds-web-component 3.5.6 → 3.5.7-rc.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.
- package/Masthead/index.js +1 -1
- package/components/Breadcrumb/index.umd.min.js +1 -1
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Checkbox/checkbox.js +1 -1
- package/components/Checkbox/index.umd.min.js +1 -1
- package/components/Checkbox/index.umd.min.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +271 -258
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/ComboBox/sgds-combo-box-option.js +6 -0
- package/components/ComboBox/sgds-combo-box-option.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.d.ts +4 -0
- package/components/ComboBox/sgds-combo-box.js +51 -2
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +2 -2
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/DescriptionList/description-list.js +1 -1
- package/components/DescriptionList/index.umd.min.js +8 -8
- package/components/DescriptionList/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/IconList/icon-list.js +1 -1
- package/components/IconList/index.umd.min.js +1 -1
- package/components/IconList/index.umd.min.js.map +1 -1
- package/components/Input/index.umd.min.js +1 -1
- package/components/Input/index.umd.min.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +2 -2
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Masthead/index.umd.min.js +1 -1
- package/components/Masthead/masthead.js +1 -1
- package/components/OverflowMenu/index.umd.min.js +1 -1
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/QuantityToggle/index.umd.min.js +1 -1
- package/components/QuantityToggle/index.umd.min.js.map +1 -1
- package/components/Select/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Textarea/index.umd.min.js +1 -1
- package/components/Textarea/index.umd.min.js.map +1 -1
- package/components/index.umd.min.js +25 -11
- package/components/index.umd.min.js.map +1 -1
- package/index.umd.min.js +25 -11
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/Checkbox/checkbox.cjs.js +1 -1
- package/react/components/Checkbox/checkbox.js +1 -1
- package/react/components/ComboBox/sgds-combo-box-option.cjs.js +6 -0
- package/react/components/ComboBox/sgds-combo-box-option.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box-option.js +6 -0
- package/react/components/ComboBox/sgds-combo-box-option.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js +51 -2
- package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.js +51 -2
- package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/react/components/DescriptionList/description-list.cjs.js +1 -1
- package/react/components/DescriptionList/description-list.js +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/IconList/icon-list.cjs.js +1 -1
- package/react/components/IconList/icon-list.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Masthead/masthead.cjs.js +1 -1
- package/react/components/Masthead/masthead.js +1 -1
- package/react/styles/form-text-control.cjs.js +1 -1
- package/react/styles/form-text-control.js +1 -1
- package/styles/form-text-control.js +1 -1
|
@@ -2064,7 +2064,7 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2064
2064
|
></sgds-close-button>`:ie}
|
|
2065
2065
|
</div>`}render(){return this.dismissible&&this.show||!this.dismissible?this.truncated?ee`<sgds-tooltip content=${this.text} @sgds-hide=${e=>e.stopPropagation()}
|
|
2066
2066
|
>${this._renderBadge()}</sgds-tooltip
|
|
2067
|
-
>`:this._renderBadge():ie}}Ki.styles=[...lt.styles,Kt],Ki.dependencies={"sgds-close-button":zt,"sgds-tooltip":ji},t([Je({type:Boolean,reflect:!0})],Ki.prototype,"show",void 0),t([Je({reflect:!0})],Ki.prototype,"variant",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"outlined",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"dismissible",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"fullWidth",void 0),t([et()],Ki.prototype,"truncated",void 0),t([et()],Ki.prototype,"text",void 0),t([Dt("show")],Ki.prototype,"_handleShowChange",null),t([Dt("text")],Ki.prototype,"_handleTruncation",null);var Gi=Me`:host([size=sm]) .overflow-btn{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.overflow-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;border-radius:var(--sgds-border-radius-sm);cursor:pointer;display:flex;height:var(--sgds-dimension-32);justify-content:center;padding:0;position:relative;width:var(--sgds-dimension-32)}.overflow-btn:hover{background-color:var(--sgds-bg-translucent-subtle)}.overflow-btn:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;function Xi(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Qi extends lt{constructor(){super(...arguments),this.myDropdown=us(),this.dropdownMenuId=Xi("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=us(),this._handleKeyboardMenuEvent=e=>{if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}},this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu())}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Hi(this.myDropdown.value,this.menuRef.value,(()=>this.updateFloatingPosition()))))}async hideMenu(){this.menuIsOpen&&(this.emit("sgds-hide"),this.menuIsOpen=!1,setTimeout((()=>this.emit("sgds-after-hide")),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}mergeMiddleware(e,t){const s=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},i=t.map(s),a=e.map((e=>{const a=s(e),o=i.indexOf(a);return-1!==o?t[o]:e})).concat(t.filter((t=>!e.some((e=>s(e)===s(t))))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[zi(8),this.noFlip?void 0:Oi(),Ri()].filter(Boolean);let s=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(s=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:s}),{x:a,y:o,strategy:n,placement:r}=await qi(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:n,left:`${a}px`,top:`${o}px`})}}t([Je({type:Boolean,state:!0})],Qi.prototype,"noFlip",void 0),t([Je({type:Boolean,reflect:!0,state:!0})],Qi.prototype,"menuAlignRight",void 0),t([Je({type:String,reflect:!0,state:!0})],Qi.prototype,"drop",void 0),t([Je({type:Object})],Qi.prototype,"floatingOpts",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"menuIsOpen",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"readonly",void 0);class Ji extends Qi{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),s=t.indexOf(e.target);this.nextDropdownItemNo=s+1,this.prevDropdownItemNo=s<=0?t.length-1:s-1;e.target.disabled||(this.emit("sgds-select"),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach((e=>{var t;const s=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");s&&s.removeAttribute("tabindex")}))}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter((e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden")))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter((e=>!e.disabled&&!e.hidden))}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const s=(e%t.length+t.length)%t.length,i=t[s];this.emit("i-sgds-option-focus",{detail:{option:i}}),this.nextDropdownItemNo=(s+1)%t.length,this.prevDropdownItemNo=(s-1+t.length)%t.length,t.forEach((e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===i?"0":"-1"),e===i&&t.focus()}))}}Ji.styles=Qi.styles,t([it("ul.dropdown-menu")],Ji.prototype,"menu",void 0),t([et()],Ji.prototype,"nextDropdownItemNo",void 0),t([et()],Ji.prototype,"prevDropdownItemNo",void 0),t([Je({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var ea=Me`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:
|
|
2067
|
+
>`:this._renderBadge():ie}}Ki.styles=[...lt.styles,Kt],Ki.dependencies={"sgds-close-button":zt,"sgds-tooltip":ji},t([Je({type:Boolean,reflect:!0})],Ki.prototype,"show",void 0),t([Je({reflect:!0})],Ki.prototype,"variant",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"outlined",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"dismissible",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"fullWidth",void 0),t([et()],Ki.prototype,"truncated",void 0),t([et()],Ki.prototype,"text",void 0),t([Dt("show")],Ki.prototype,"_handleShowChange",null),t([Dt("text")],Ki.prototype,"_handleTruncation",null);var Gi=Me`:host([size=sm]) .overflow-btn{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.overflow-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;border-radius:var(--sgds-border-radius-sm);cursor:pointer;display:flex;height:var(--sgds-dimension-32);justify-content:center;padding:0;position:relative;width:var(--sgds-dimension-32)}.overflow-btn:hover{background-color:var(--sgds-bg-translucent-subtle)}.overflow-btn:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;function Xi(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Qi extends lt{constructor(){super(...arguments),this.myDropdown=us(),this.dropdownMenuId=Xi("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=us(),this._handleKeyboardMenuEvent=e=>{if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}},this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu())}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Hi(this.myDropdown.value,this.menuRef.value,(()=>this.updateFloatingPosition()))))}async hideMenu(){this.menuIsOpen&&(this.emit("sgds-hide"),this.menuIsOpen=!1,setTimeout((()=>this.emit("sgds-after-hide")),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}mergeMiddleware(e,t){const s=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},i=t.map(s),a=e.map((e=>{const a=s(e),o=i.indexOf(a);return-1!==o?t[o]:e})).concat(t.filter((t=>!e.some((e=>s(e)===s(t))))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[zi(8),this.noFlip?void 0:Oi(),Ri()].filter(Boolean);let s=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(s=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:s}),{x:a,y:o,strategy:n,placement:r}=await qi(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:n,left:`${a}px`,top:`${o}px`})}}t([Je({type:Boolean,state:!0})],Qi.prototype,"noFlip",void 0),t([Je({type:Boolean,reflect:!0,state:!0})],Qi.prototype,"menuAlignRight",void 0),t([Je({type:String,reflect:!0,state:!0})],Qi.prototype,"drop",void 0),t([Je({type:Object})],Qi.prototype,"floatingOpts",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"menuIsOpen",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"readonly",void 0);class Ji extends Qi{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),s=t.indexOf(e.target);this.nextDropdownItemNo=s+1,this.prevDropdownItemNo=s<=0?t.length-1:s-1;e.target.disabled||(this.emit("sgds-select"),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach((e=>{var t;const s=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");s&&s.removeAttribute("tabindex")}))}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter((e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden")))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter((e=>!e.disabled&&!e.hidden))}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const s=(e%t.length+t.length)%t.length,i=t[s];this.emit("i-sgds-option-focus",{detail:{option:i}}),this.nextDropdownItemNo=(s+1)%t.length,this.prevDropdownItemNo=(s-1+t.length)%t.length,t.forEach((e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===i?"0":"-1"),e===i&&t.focus()}))}}Ji.styles=Qi.styles,t([it("ul.dropdown-menu")],Ji.prototype,"menu",void 0),t([et()],Ji.prototype,"nextDropdownItemNo",void 0),t([et()],Ji.prototype,"prevDropdownItemNo",void 0),t([Je({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var ea=Me`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,ta=Me`.dropdown{display:flex;height:inherit;position:relative}`;class sa extends Ji{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=vs()}async _handleClick(){this.disabled||this.toggleMenu()}_handleCloseMenu(){const e=this._toggler[0];null==e||e.focus()}async connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._handleCloseMenu)}async disconnectedCallback(){this.removeEventListener("sgds-hide",this._handleCloseMenu)}async firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&await this.showMenu(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return ee`
|
|
2068
2068
|
<div class="dropdown">
|
|
2069
2069
|
<div
|
|
2070
2070
|
class="toggler-container"
|
|
@@ -2173,7 +2173,7 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2173
2173
|
* Copyright 2020 Google LLC
|
|
2174
2174
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2175
2175
|
*/
|
|
2176
|
-
class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==vt)throw new Error("The `live` directive is not allowed on child or event bindings");if(!Qt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===gt){if(t===s[i])return se}else if(e.type===vt){if(!!t===s.hasAttribute(i))return se}else if(e.type===ut&&s.getAttribute(i)===String(t))return se;return is(e),t}});var $a=Me`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,Da=Me`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Aa=Me`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Va=Me`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class Ea extends lt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Xi("input"),this._labelId=Xi("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Ea.styles=[...lt.styles,$a,Da,Aa,Va],t([Je({reflect:!0})],Ea.prototype,"label",void 0),t([Je({reflect:!0})],Ea.prototype,"hintText",void 0),t([Je({reflect:!0})],Ea.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Ea.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],Ea.prototype,"invalid",void 0);const Ia=(e="value")=>(t,s)=>{const i=t.constructor,a=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,o,n){var r;const l=i.getPropertyOptions(e);if(t===("string"==typeof l.attribute?l.attribute:e).toLowerCase()){const t=l.converter||Re,i=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:Re.fromAttribute)(n,l.type);this[e]!==i&&(this[s]=i)}a.call(this,t,o,n)}};class Ba{constructor(e,t){(this.host=e).addController(this),this._internals=this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",(e=>this.handleInvalid(e)))}hostDisconnected(){this.host.removeEventListener("invalid",(e=>this.handleInvalid(e)))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,s){return this._internals.setValidity(e,t,s)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const s in t)t[s]&&(this.validationError=s.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const Pa=e=>{class s extends e{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Ba(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1)}_mixinValidate(e){this.inputValidationController.validateInput(e)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(e,t,s){return this.inputValidationController.setValidity(e,t,s)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return s.formAssociated=!0,t([at("sgds-input")],s.prototype,"sgdsInput",void 0),t([at("sgds-datepicker-input")],s.prototype,"sgdsDatepickerInput",void 0),s};var Ta=Me`.form-check-input[type=checkbox]{border-radius:var(--sgds-form-border-radius-md)}.form-check-input:checked,.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path d="M14.347 3.979a.522.522 0 0 1 0 .739L7.043 12.02a.521.521 0 0 1-.738 0L2.653 8.369a.522.522 0 1 1 .739-.738l3.282 3.283 6.934-6.935a.52.52 0 0 1 .739 0Z" fill="%23fff"/></svg>')}.form-check-input:indeterminate,.form-check-input[indeterminate]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5Z" fill="%23fff"/></svg>');background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:indeterminate:focus,.form-check-input:indeterminate:hover,.form-check-input[indeterminate]:focus-visible,.form-check-input[indeterminate]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}.form-check-input:checked.is-invalid,.form-check-input:indeterminate.is-invalid,.form-check-input[checked].is-invalid,.form-check-input[indeterminate].is-invalid{background-color:var(--sgds-form-danger-surface-default)}.form-check-label{flex:1}`,La=Me`input{margin:0}.form-check{display:flex;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.form-check-input{appearance:none;background-color:var(--sgds-form-surface-default);background-image:var(--sgds-radio-bg-image);background-position:50%;background-repeat:no-repeat;background-size:auto;border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);height:var(--sgds-form-height-sm);width:var(--sgds-form-width-xs)}.form-check-input:checked,.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):not([aria-checked=true]):not(:focus-visible):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):checked:focus-visible,.form-check-input:not([disabled]):not(.is-invalid):checked:hover,.form-check-input:not([disabled]):not(.is-invalid)[checked]:focus-visible,.form-check-input:not([disabled]):not(.is-invalid)[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-check-input:not([disabled]).is-invalid{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-check-input:not([disabled]).is-invalid:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Fa extends(Pa(Ea)){constructor(){super(...arguments),this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.invalidFeedback="",this._isTouched=!1}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(e){this.indeterminate&&(this.indeterminate=!this.indeterminate),this.checked=!this.checked,super._mixinHandleChange(e),this.emit("sgds-change",{detail:{checked:this.checked,value:this.value}}),this.checked?this.emit("sgds-check",{detail:{value:this.value}}):this.emit("sgds-uncheck",{detail:{value:this.value}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleDisabledChange(){this.setInvalid(!1)}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_mixinResetFormControl(){this._isTouched=!1,this.checked=this.input.checked=this.defaultChecked,this.input.dispatchEvent(new InputEvent("reset")),this._mixinResetValidity(this.input)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}firstUpdated(e){super.firstUpdated(e),this.checked&&this.emit("sgds-check",{detail:{value:this.value}})}render(){const e="both"===this.hasFeedback||"style"===this.hasFeedback,t="both"===this.hasFeedback||"text"===this.hasFeedback;return ee`
|
|
2176
|
+
class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==vt)throw new Error("The `live` directive is not allowed on child or event bindings");if(!Qt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===gt){if(t===s[i])return se}else if(e.type===vt){if(!!t===s.hasAttribute(i))return se}else if(e.type===ut&&s.getAttribute(i)===String(t))return se;return is(e),t}});var $a=Me`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,Da=Me`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Aa=Me`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Va=Me`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class Ea extends lt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Xi("input"),this._labelId=Xi("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Ea.styles=[...lt.styles,$a,Da,Aa,Va],t([Je({reflect:!0})],Ea.prototype,"label",void 0),t([Je({reflect:!0})],Ea.prototype,"hintText",void 0),t([Je({reflect:!0})],Ea.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Ea.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],Ea.prototype,"invalid",void 0);const Ia=(e="value")=>(t,s)=>{const i=t.constructor,a=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,o,n){var r;const l=i.getPropertyOptions(e);if(t===("string"==typeof l.attribute?l.attribute:e).toLowerCase()){const t=l.converter||Re,i=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:Re.fromAttribute)(n,l.type);this[e]!==i&&(this[s]=i)}a.call(this,t,o,n)}};class Ba{constructor(e,t){(this.host=e).addController(this),this._internals=this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",(e=>this.handleInvalid(e)))}hostDisconnected(){this.host.removeEventListener("invalid",(e=>this.handleInvalid(e)))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,s){return this._internals.setValidity(e,t,s)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const s in t)t[s]&&(this.validationError=s.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const Pa=e=>{class s extends e{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Ba(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1)}_mixinValidate(e){this.inputValidationController.validateInput(e)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(e,t,s){return this.inputValidationController.setValidity(e,t,s)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return s.formAssociated=!0,t([at("sgds-input")],s.prototype,"sgdsInput",void 0),t([at("sgds-datepicker-input")],s.prototype,"sgdsDatepickerInput",void 0),s};var Ta=Me`.form-check-input[type=checkbox]{border-radius:var(--sgds-form-border-radius-md)}.form-check-input:checked,.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path d="M14.347 3.979a.522.522 0 0 1 0 .739L7.043 12.02a.521.521 0 0 1-.738 0L2.653 8.369a.522.522 0 1 1 .739-.738l3.282 3.283 6.934-6.935a.52.52 0 0 1 .739 0Z" fill="%23fff"/></svg>')}.form-check-input:indeterminate,.form-check-input[indeterminate]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5Z" fill="%23fff"/></svg>');background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:indeterminate:focus,.form-check-input:indeterminate:hover,.form-check-input[indeterminate]:focus-visible,.form-check-input[indeterminate]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}.form-check-input:checked.is-invalid,.form-check-input:indeterminate.is-invalid,.form-check-input[checked].is-invalid,.form-check-input[indeterminate].is-invalid{background-color:var(--sgds-form-danger-surface-default)}.form-check-label{flex:1}.form-check{margin:var(--sgds-form-padding-inline-sm) 0;padding:0}`,La=Me`input{margin:0}.form-check{display:flex;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.form-check-input{appearance:none;background-color:var(--sgds-form-surface-default);background-image:var(--sgds-radio-bg-image);background-position:50%;background-repeat:no-repeat;background-size:auto;border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);height:var(--sgds-form-height-sm);width:var(--sgds-form-width-xs)}.form-check-input:checked,.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):not([aria-checked=true]):not(:focus-visible):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):checked:focus-visible,.form-check-input:not([disabled]):not(.is-invalid):checked:hover,.form-check-input:not([disabled]):not(.is-invalid)[checked]:focus-visible,.form-check-input:not([disabled]):not(.is-invalid)[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-check-input:not([disabled]).is-invalid{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-check-input:not([disabled]).is-invalid:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Fa extends(Pa(Ea)){constructor(){super(...arguments),this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.invalidFeedback="",this._isTouched=!1}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(e){this.indeterminate&&(this.indeterminate=!this.indeterminate),this.checked=!this.checked,super._mixinHandleChange(e),this.emit("sgds-change",{detail:{checked:this.checked,value:this.value}}),this.checked?this.emit("sgds-check",{detail:{value:this.value}}):this.emit("sgds-uncheck",{detail:{value:this.value}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleDisabledChange(){this.setInvalid(!1)}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_mixinResetFormControl(){this._isTouched=!1,this.checked=this.input.checked=this.defaultChecked,this.input.dispatchEvent(new InputEvent("reset")),this._mixinResetValidity(this.input)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}firstUpdated(e){super.firstUpdated(e),this.checked&&this.emit("sgds-check",{detail:{value:this.value}})}render(){const e="both"===this.hasFeedback||"style"===this.hasFeedback,t="both"===this.hasFeedback||"text"===this.hasFeedback;return ee`
|
|
2177
2177
|
<div class="form-check">
|
|
2178
2178
|
<input
|
|
2179
2179
|
class=${bt({"form-check-input":!0,"is-invalid":e&&this.invalid})}
|
|
@@ -2245,7 +2245,7 @@ class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==v
|
|
|
2245
2245
|
</div>
|
|
2246
2246
|
`:ie}
|
|
2247
2247
|
</fieldset>
|
|
2248
|
-
`}}Ha.styles=[...Ea.styles,Za],t([Je({reflect:!0})],Ha.prototype,"label",void 0),t([Je({type:String,reflect:!0})],Ha.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Ha.prototype,"hasFeedback",void 0),t([Je({reflect:!0})],Ha.prototype,"hintText",void 0),t([Je({type:Boolean,reflect:!0})],Ha.prototype,"required",void 0),t([Je({reflect:!0})],Ha.prototype,"value",void 0),t([et()],Ha.prototype,"_isTouched",void 0),t([Ia()],Ha.prototype,"defaultValue",void 0),t([et()],Ha.prototype,"_blurredCheckboxes",void 0),t([et()],Ha.prototype,"formEvent",void 0),t([ot()],Ha.prototype,"_checkboxes",void 0),t([Dt("value",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleValueChange",null),t([Dt("_isTouched",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleIsTouched",null),t([Dt("invalid",{waitUntilFirstUpdate:!0})],Ha.prototype,"_updateInvalid",null);var za=Me`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-2);line-height:var(--sgds-line-height-24);outline:none;padding:0}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Ra extends(Pa(Ji)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Xi("input"),this._labelId=Xi("label"),this.floatingOpts={middleware:[Ni({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",(async()=>{this.invalid=!this.menuIsOpen&&!this._mixinReportValidity()}))}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?ee` <div class="invalid-feedback-container">
|
|
2248
|
+
`}}Ha.styles=[...Ea.styles,Za],t([Je({reflect:!0})],Ha.prototype,"label",void 0),t([Je({type:String,reflect:!0})],Ha.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Ha.prototype,"hasFeedback",void 0),t([Je({reflect:!0})],Ha.prototype,"hintText",void 0),t([Je({type:Boolean,reflect:!0})],Ha.prototype,"required",void 0),t([Je({reflect:!0})],Ha.prototype,"value",void 0),t([et()],Ha.prototype,"_isTouched",void 0),t([Ia()],Ha.prototype,"defaultValue",void 0),t([et()],Ha.prototype,"_blurredCheckboxes",void 0),t([et()],Ha.prototype,"formEvent",void 0),t([ot()],Ha.prototype,"_checkboxes",void 0),t([Dt("value",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleValueChange",null),t([Dt("_isTouched",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleIsTouched",null),t([Dt("invalid",{waitUntilFirstUpdate:!0})],Ha.prototype,"_updateInvalid",null);var za=Me`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-2);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-neutral-color-default);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Ra extends(Pa(Ji)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Xi("input"),this._labelId=Xi("label"),this.floatingOpts={middleware:[Ni({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",(async()=>{this.invalid=!this.menuIsOpen&&!this._mixinReportValidity()}))}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?ee` <div class="invalid-feedback-container">
|
|
2249
2249
|
<slot name="invalidIcon">
|
|
2250
2250
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
2251
2251
|
</slot>
|
|
@@ -2272,13 +2272,13 @@ class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==v
|
|
|
2272
2272
|
<slot></slot>
|
|
2273
2273
|
${this.active?ee` <sgds-icon name="check"></sgds-icon> `:ie}
|
|
2274
2274
|
</div>
|
|
2275
|
-
`}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",(e=>{"Enter"===e.key&&(this.checkbox?this._handleCheckboxClick():this._handleNonCheckboxClick())}))}firstUpdated(e){super.firstUpdated(e);const t=this.closest("sgds-combo-box");(null==t?void 0:t.multiSelect)&&(this.checkbox=!0)}_handleNonCheckboxClick(){this.checkbox||this.emit("i-sgds-select")}_handleCheckboxClick(){this.shadowRoot.querySelector("sgds-checkbox").click()}_handleCheckboxChange(e){const t=e.target;this.active=t.checked,this.active?this.emit("i-sgds-select"):this.emit("i-sgds-unselect")}}qa.dependencies={"sgds-icon":Nt,"sgds-checkbox":Fa},t([Je({type:Boolean,reflect:!0})],qa.prototype,"checkbox",void 0);
|
|
2275
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",(e=>{"Enter"===e.key&&(this.checkbox?this._handleCheckboxClick():this._handleNonCheckboxClick())})),this.shadowRoot.addEventListener("click",(e=>{e.target.classList.contains("dropdown-item")&&this._handleCheckboxClick()}))}firstUpdated(e){super.firstUpdated(e);const t=this.closest("sgds-combo-box");(null==t?void 0:t.multiSelect)&&(this.checkbox=!0)}_handleNonCheckboxClick(){this.checkbox||this.emit("i-sgds-select")}_handleCheckboxClick(){this.shadowRoot.querySelector("sgds-checkbox").click()}_handleCheckboxChange(e){const t=e.target;this.active=t.checked,this.active?this.emit("i-sgds-select"):this.emit("i-sgds-unselect")}}qa.dependencies={"sgds-icon":Nt,"sgds-checkbox":Fa},t([Je({type:Boolean,reflect:!0})],qa.prototype,"checkbox",void 0);
|
|
2276
2276
|
/**
|
|
2277
2277
|
* @license
|
|
2278
2278
|
* Copyright 2017 Google LLC
|
|
2279
2279
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2280
2280
|
*/
|
|
2281
|
-
const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};const ja=mt(class extends ft{constructor(e){if(super(e),e.type!==pt)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,s){let i;void 0===s?s=t:void 0!==t&&(i=t);const a=[],o=[];let n=0;for(const t of e)a[n]=i?i(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:a}}render(e,t,s){return this._getValuesAndKeys(e,t,s).values}update(e,[t,s,i]){const a=e._$committedValue;const{values:o,keys:n}=this._getValuesAndKeys(t,s,i);if(!Array.isArray(a))return this._itemKeys=n,o;const r=this._itemKeys??=[],l=[];let d,c,h=0,u=a.length-1,p=0,g=o.length-1;for(;h<=u&&p<=g;)if(null===a[h])h++;else if(null===a[u])u--;else if(r[h]===n[p])l[p]=ts(a[h],o[p]),h++,p++;else if(r[u]===n[g])l[g]=ts(a[u],o[g]),u--,g--;else if(r[h]===n[g])l[g]=ts(a[h],o[g]),es(e,l[g+1],a[h]),h++,g--;else if(r[u]===n[p])l[p]=ts(a[u],o[p]),es(e,a[h],a[u]),u--,p++;else if(void 0===d&&(d=Ya(n,p,g),c=Ya(r,h,u)),d.has(r[h]))if(d.has(r[u])){const t=c.get(n[p]),s=void 0!==t?a[t]:null;if(null===s){const t=es(e,a[h]);ts(t,o[p]),l[p]=t}else l[p]=ts(s,o[p]),es(e,a[h],s),a[t]=null;p++}else as(a[u]),u--;else as(a[h]),h++;for(;p<=g;){const t=es(e,l[g+1]);ts(t,o[p]),l[p++]=t}for(;h<=u;){const e=a[h++];null!==e&&as(e)}return this._itemKeys=n,is(e,l),se}});class Wa extends Ra{constructor(){super(...arguments),this.multiSelect=!1,this.badgeFullWidth=!1,this.filterFunction=(e,t)=>t.label.toLowerCase().startsWith(e.toLowerCase()),this.optionList=[],this.emptyMenu=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",(async()=>{(await this._input).focus(),this.options.forEach((e=>e.removeAttribute("hidden"))),this.emptyMenu=!1}))}async firstUpdated(e){super.firstUpdated(e),this.menuList.forEach((e=>{const t=document.createElement("sgds-combo-box-option");t.innerText=e.label,t.value=e.value,t.checkbox=this.multiSelect,t.active=this.value.includes(e.value),this.appendChild(t)})),this._setupValidation(this.menuList),this.menuIsOpen&&!this.readonly&&this.showMenu()}async _handleDefaultSlotChange(e){const t=e.target.assignedElements({flatten:!0});t.forEach((e=>{e.addEventListener("i-sgds-select",(t=>{e.hasAttribute("disabled")||this._handleItemSelected(t)})),this.value.includes(e.getAttribute("value"))&&e.setAttribute("active","true"),this.multiSelect&&e.addEventListener("i-sgds-unselect",(e=>{e.target.disabled||this._handleItemUnselect(e)}))})),await this.updateComplete,this.optionList=await this._getMenuListFromOptions(t),this._setupValidation(this.optionList)}async _setupValidation(e){var t;if(this.value&&e.length>0){const s=this.value.split(";"),i=e.filter((({value:e})=>s.includes(e)));this.selectedItems=[...i,...this.selectedItems],this.multiSelect||(this.displayValue=null===(t=i[0])||void 0===t?void 0:t.label),this.multiSelect?this.input=await this._multiSelectInput:this.input=await this._input,this._mixinValidate(this.input)}}async _handleValueChange(){this.emit("sgds-change"),this.options.forEach((e=>e.removeAttribute("hidden"))),this.value&&this.emit("sgds-select");const e=await this._input;this._mixinSetFormValue(),this.multiSelect?this._mixinValidate(this.input):this._mixinValidate(e);this.selectedItems.map((e=>e.value)).join(";")!==this.value&&this._updateValueAndDisplayValue(this.optionList),(this._isTouched||""!==this.value)&&(this.invalid=!this._mixinReportValidity())}_handleOptionListChange(){this._updateValueAndDisplayValue(this.optionList)}_handleMenuListChange(){const e=this.menuList.map((e=>{const t=document.createElement("sgds-combo-box-option");return t.innerText=e.label,t.value=e.value,t.checkbox=this.multiSelect,t.active=this.value.includes(e.value),t}));this.replaceChildren(...e)}_updateValueAndDisplayValue(e){var t,s;const i=this.value.split(";"),a=e.filter((({value:e})=>i.includes(e)));this.selectedItems=[...a];const o=a.map((e=>e.value)).join(";");o!==this.value&&(this.value=o),this.multiSelect||(this.displayValue=null!==(s=null===(t=a[0])||void 0===t?void 0:t.label)&&void 0!==s?s:"")}async _handleInputChange(e){this.emit("sgds-input");const t=e.target;this.displayValue=t.value;const s=this.options.map((e=>({value:e.value,label:e.textContent.trim()})));this.filteredList=s.filter((e=>this.filterFunction(this.displayValue,e))),""!==this.displayValue||this.multiSelect||(this.selectedItems=[],this.value=this.selectedItems.join(";"),this.options.forEach((e=>e.active=!1))),this.invalid=!1,this.showMenu(),this.emptyMenu=0===this.filteredList.length;const i=this.filteredList.map((e=>e.value));this.options.forEach((e=>{i.includes(e.value)?e.hidden=!1:e.hidden=!0})),""===this.displayValue&&(this.options.forEach((e=>e.hidden=!1)),await this.updateComplete)}async _handleItemSelected(e){var t,s,i;const a=e.target,o=null!==(s=null===(t=a.textContent)||void 0===t?void 0:t.trim())&&void 0!==s?s:"",n=null!==(i=a.getAttribute("value"))&&void 0!==i?i:o,r=this.filteredList.find((e=>e.value.toString()===n))||{label:o,value:n};this.multiSelect?(this.selectedItems.some((e=>e.value===r.value))||(this.selectedItems=[...this.selectedItems,r],setTimeout((()=>this.displayValue=""))),this.hideMenu(),this.value=this.selectedItems.map((e=>e.value)).join(";")):0!==this.selectedItems.length&&this.selectedItems[0].value===r.value||(this.options.forEach((e=>e.active=!1)),a.active=!0,this.selectedItems=[r],this.value=r.value.toString(),this.displayValue=r.label,this.hideMenu())}_handleItemUnselect(e){var t,s,i;const a=e.target;a.removeAttribute("active");const o=null!==(s=null===(t=a.textContent)||void 0===t?void 0:t.trim())&&void 0!==s?s:"",n=null!==(i=a.getAttribute("value"))&&void 0!==i?i:o,r=this.filteredList.find((e=>e.value.toString()===n))||{label:o,value:n};this.selectedItems=this.selectedItems.filter((e=>e.value!==r.value)),this.value=this.selectedItems.map((e=>e.value)).join(";")}async _handleBadgeDismissed(e,t){var s;e.preventDefault();const i=t.value;null===(s=this.options)||void 0===s||s.forEach((e=>e.value===i?e.active=!1:null)),this.selectedItems=this.selectedItems.filter((e=>e.value!==t.value)),this.value=this.selectedItems.map((e=>e.value)).join(";")}async _handleMultiSelectKeyDown(e){var t;if(this.multiSelect&&"Backspace"===e.key&&this.multiSelect&&""===this.displayValue.trim()&&this.selectedItems.length>0){const e=this.selectedItems[this.selectedItems.length-1].value;null===(t=this.options)||void 0===t||t.forEach((t=>t.value===e?t.active=!1:null)),this.selectedItems=this.selectedItems.slice(0,-1),this.value=this.selectedItems.map((e=>e.value)).join(";")}}_handleFocus(){this.emit("sgds-focus")}async _handleInputBlur(e){if(e.preventDefault(),this.emit("sgds-blur"),this.multiSelect){this.selectedItems.filter((({label:e})=>this.displayValue===e)).length<=0&&(this.displayValue="")}else this.selectedItems.length>0?this.displayValue=this.selectedItems[0].label:this.displayValue=""}async _mixinResetFormControl(){if(this.value=this.defaultValue,this.multiSelect){const e=this.value.split(";");this.options.forEach((t=>{t.active=e.includes(t.value)}));const t=this.options.filter((t=>e.includes(t.value)));this.selectedItems=t.map((e=>({value:e.value,label:e.textContent.trim()}))),this._mixinResetValidity(await this._multiSelectInput)}else{this.options.forEach((e=>{e.active=e.value===this.value}));const e=this.options.filter((e=>e.value===this.value));e.length<=0?this.displayValue="":this.displayValue=e[0].textContent.trim(),this._mixinResetValidity(await this._input)}}_renderInput(){const e=this.hasFeedback;return ee`
|
|
2281
|
+
const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};const ja=mt(class extends ft{constructor(e){if(super(e),e.type!==pt)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,s){let i;void 0===s?s=t:void 0!==t&&(i=t);const a=[],o=[];let n=0;for(const t of e)a[n]=i?i(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:a}}render(e,t,s){return this._getValuesAndKeys(e,t,s).values}update(e,[t,s,i]){const a=e._$committedValue;const{values:o,keys:n}=this._getValuesAndKeys(t,s,i);if(!Array.isArray(a))return this._itemKeys=n,o;const r=this._itemKeys??=[],l=[];let d,c,h=0,u=a.length-1,p=0,g=o.length-1;for(;h<=u&&p<=g;)if(null===a[h])h++;else if(null===a[u])u--;else if(r[h]===n[p])l[p]=ts(a[h],o[p]),h++,p++;else if(r[u]===n[g])l[g]=ts(a[u],o[g]),u--,g--;else if(r[h]===n[g])l[g]=ts(a[h],o[g]),es(e,l[g+1],a[h]),h++,g--;else if(r[u]===n[p])l[p]=ts(a[u],o[p]),es(e,a[h],a[u]),u--,p++;else if(void 0===d&&(d=Ya(n,p,g),c=Ya(r,h,u)),d.has(r[h]))if(d.has(r[u])){const t=c.get(n[p]),s=void 0!==t?a[t]:null;if(null===s){const t=es(e,a[h]);ts(t,o[p]),l[p]=t}else l[p]=ts(s,o[p]),es(e,a[h],s),a[t]=null;p++}else as(a[u]),u--;else as(a[h]),h++;for(;p<=g;){const t=es(e,l[g+1]);ts(t,o[p]),l[p++]=t}for(;h<=u;){const e=a[h++];null!==e&&as(e)}return this._itemKeys=n,is(e,l),se}});class Wa extends Ra{constructor(){super(...arguments),this.multiSelect=!1,this.badgeFullWidth=!1,this.clearable=!1,this.filterFunction=(e,t)=>t.label.toLowerCase().startsWith(e.toLowerCase()),this.optionList=[],this.emptyMenu=!1,this.isFocused=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",(async()=>{this.isFocused=!0})),this.addEventListener("blur",(async()=>{this.isFocused=!1})),this.addEventListener("keydown",(e=>{var t,s;"Enter"===e.key&&(null===(s=null===(t=e.target.shadowRoot)||void 0===t?void 0:t.querySelector(".form-clearable"))||void 0===s?void 0:s.matches(":focus"))&&this._handleClear()})),this.addEventListener("sgds-hide",(async()=>{(await this._input).focus(),this.options.forEach((e=>e.removeAttribute("hidden"))),this.emptyMenu=!1}))}async firstUpdated(e){super.firstUpdated(e),this.menuList.forEach((e=>{const t=document.createElement("sgds-combo-box-option");t.innerText=e.label,t.value=e.value,t.checkbox=this.multiSelect,t.active=this.value.includes(e.value),this.appendChild(t)})),this._setupValidation(this.menuList),this.menuIsOpen&&!this.readonly&&this.showMenu()}async _handleDefaultSlotChange(e){const t=e.target.assignedElements({flatten:!0});t.forEach((e=>{e.addEventListener("i-sgds-select",(t=>{e.hasAttribute("disabled")||this._handleItemSelected(t)})),this.value.includes(e.getAttribute("value"))&&e.setAttribute("active","true"),this.multiSelect&&e.addEventListener("i-sgds-unselect",(e=>{e.target.disabled||this._handleItemUnselect(e)}))})),await this.updateComplete,this.optionList=await this._getMenuListFromOptions(t),this._setupValidation(this.optionList)}async _setupValidation(e){var t;if(this.value&&e.length>0){const s=this.value.split(";"),i=e.filter((({value:e})=>s.includes(e)));this.selectedItems=[...i,...this.selectedItems],this.multiSelect||(this.displayValue=null===(t=i[0])||void 0===t?void 0:t.label),this.multiSelect?this.input=await this._multiSelectInput:this.input=await this._input,this._mixinValidate(this.input)}}async _handleValueChange(){this.emit("sgds-change"),this.options.forEach((e=>e.removeAttribute("hidden"))),this.value&&this.emit("sgds-select");const e=await this._input;this._mixinSetFormValue(),this.multiSelect?this._mixinValidate(this.input):this._mixinValidate(e);this.selectedItems.map((e=>e.value)).join(";")!==this.value&&this._updateValueAndDisplayValue(this.optionList),(this._isTouched||""!==this.value)&&(this.invalid=!this._mixinReportValidity())}_handleOptionListChange(){this._updateValueAndDisplayValue(this.optionList)}_handleMenuListChange(){const e=this.menuList.map((e=>{const t=document.createElement("sgds-combo-box-option");return t.innerText=e.label,t.value=e.value,t.checkbox=this.multiSelect,t.active=this.value.includes(e.value),t}));this.replaceChildren(...e)}_updateValueAndDisplayValue(e){var t,s;const i=this.value.split(";"),a=e.filter((({value:e})=>i.includes(e)));this.selectedItems=[...a];const o=a.map((e=>e.value)).join(";");o!==this.value&&(this.value=o),this.multiSelect||(this.displayValue=null!==(s=null===(t=a[0])||void 0===t?void 0:t.label)&&void 0!==s?s:"")}async _handleInputChange(e){this.emit("sgds-input");const t=e.target;this.displayValue=t.value;const s=this.options.map((e=>({value:e.value,label:e.textContent.trim()})));this.filteredList=s.filter((e=>this.filterFunction(this.displayValue,e))),""!==this.displayValue||this.multiSelect||(this.selectedItems=[],this.value=this.selectedItems.join(";"),this.options.forEach((e=>e.active=!1))),this.invalid=!1,this.showMenu(),this.emptyMenu=0===this.filteredList.length;const i=this.filteredList.map((e=>e.value));this.options.forEach((e=>{i.includes(e.value)?e.hidden=!1:e.hidden=!0})),""===this.displayValue&&(this.options.forEach((e=>e.hidden=!1)),await this.updateComplete)}async _handleItemSelected(e){var t,s,i;const a=e.target,o=null!==(s=null===(t=a.textContent)||void 0===t?void 0:t.trim())&&void 0!==s?s:"",n=null!==(i=a.getAttribute("value"))&&void 0!==i?i:o,r=this.filteredList.find((e=>e.value.toString()===n))||{label:o,value:n};this.multiSelect?(this.selectedItems.some((e=>e.value===r.value))||(this.selectedItems=[...this.selectedItems,r],setTimeout((()=>this.displayValue=""))),this.hideMenu(),this.value=this.selectedItems.map((e=>e.value)).join(";")):0!==this.selectedItems.length&&this.selectedItems[0].value===r.value||(this.options.forEach((e=>e.active=!1)),a.active=!0,this.selectedItems=[r],this.value=r.value.toString(),this.displayValue=r.label,this.hideMenu())}_handleItemUnselect(e){var t,s,i;const a=e.target;a.removeAttribute("active");const o=null!==(s=null===(t=a.textContent)||void 0===t?void 0:t.trim())&&void 0!==s?s:"",n=null!==(i=a.getAttribute("value"))&&void 0!==i?i:o,r=this.filteredList.find((e=>e.value.toString()===n))||{label:o,value:n};this.selectedItems=this.selectedItems.filter((e=>e.value!==r.value)),this.value=this.selectedItems.map((e=>e.value)).join(";")}async _handleBadgeDismissed(e,t){var s;e.preventDefault();const i=t.value;null===(s=this.options)||void 0===s||s.forEach((e=>e.value===i?e.active=!1:null)),this.selectedItems=this.selectedItems.filter((e=>e.value!==t.value)),this.value=this.selectedItems.map((e=>e.value)).join(";")}async _handleMultiSelectKeyDown(e){var t;if(this.multiSelect&&"Backspace"===e.key&&this.multiSelect&&""===this.displayValue.trim()&&this.selectedItems.length>0){const e=this.selectedItems[this.selectedItems.length-1].value;null===(t=this.options)||void 0===t||t.forEach((t=>t.value===e?t.active=!1:null)),this.selectedItems=this.selectedItems.slice(0,-1),this.value=this.selectedItems.map((e=>e.value)).join(";")}}_handleFocus(){this.emit("sgds-focus")}async _handleInputBlur(e){if(e.preventDefault(),this.emit("sgds-blur"),this.multiSelect){this.selectedItems.filter((({label:e})=>this.displayValue===e)).length<=0&&(this.displayValue="")}else this.selectedItems.length>0?this.displayValue=this.selectedItems[0].label:this.displayValue=""}async _handleClear(){var e;this.value="",null===(e=this.options)||void 0===e||e.forEach((e=>e.active=!1));(await this._input).focus(),this.showMenu()}async _mixinResetFormControl(){if(this.value=this.defaultValue,this.multiSelect){const e=this.value.split(";");this.options.forEach((t=>{t.active=e.includes(t.value)}));const t=this.options.filter((t=>e.includes(t.value)));this.selectedItems=t.map((e=>({value:e.value,label:e.textContent.trim()}))),this._mixinResetValidity(await this._multiSelectInput)}else{this.options.forEach((e=>{e.active=e.value===this.value}));const e=this.options.filter((e=>e.value===this.value));e.length<=0?this.displayValue="":this.displayValue=e[0].textContent.trim(),this._mixinResetValidity(await this._input)}}_renderInput(){const e=this.hasFeedback,t=(this.isFocused||this.menuIsOpen)&&""!==this.value&&this.clearable;return ee`
|
|
2282
2282
|
<div
|
|
2283
2283
|
${vs(this.myDropdown)}
|
|
2284
2284
|
class="form-control-group ${bt({disabled:this.disabled,readonly:this.readonly,"is-invalid":this.invalid&&e})}"
|
|
@@ -2315,7 +2315,20 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2315
2315
|
aria-labelledby="${this._labelId} ${this._controlId}Help ${this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:""}"
|
|
2316
2316
|
/>
|
|
2317
2317
|
</div>
|
|
2318
|
-
|
|
2318
|
+
|
|
2319
|
+
${t?ee`
|
|
2320
|
+
<sgds-icon
|
|
2321
|
+
id=${`${this._controlId}-combobox-clear-button`}
|
|
2322
|
+
tabindex="0"
|
|
2323
|
+
class="form-clearable"
|
|
2324
|
+
name="xcircle-fill"
|
|
2325
|
+
size="md"
|
|
2326
|
+
@click=${this._handleClear}
|
|
2327
|
+
aria-hidden=${t?"false":"true"}
|
|
2328
|
+
></sgds-icon>
|
|
2329
|
+
`:ie}
|
|
2330
|
+
|
|
2331
|
+
<sgds-icon name=${this.menuIsOpen?"chevron-up":"chevron-down"} size="md"></sgds-icon>
|
|
2319
2332
|
</div>
|
|
2320
2333
|
`}render(){return ee`
|
|
2321
2334
|
<div
|
|
@@ -2325,6 +2338,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2325
2338
|
${this._renderLabel()}
|
|
2326
2339
|
<!-- The input -->
|
|
2327
2340
|
${this._renderInput()} ${this._renderFeedback()}
|
|
2341
|
+
|
|
2328
2342
|
<ul id=${this.dropdownMenuId} class="dropdown-menu" part="menu" tabindex="-1" ${vs(this.menuRef)}>
|
|
2329
2343
|
<slot id="default" @slotchange=${this._handleDefaultSlotChange}
|
|
2330
2344
|
><div class="empty-menu">No options</div></slot
|
|
@@ -2340,7 +2354,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2340
2354
|
class="visually-hidden"
|
|
2341
2355
|
?required=${this.required}
|
|
2342
2356
|
/>`:ie}
|
|
2343
|
-
`}}function Ka(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Ga(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Xa(e,t){const s=Ka(e);return isNaN(t)?Ga(e,NaN):t?(s.setDate(s.getDate()+t),s):s}Wa.styles=[...Ra.styles,za,Oa],Wa.dependencies={"sgds-combo-box-option":qa,"sgds-icon":Nt,"sgds-badge":Ki},t([Je({type:Boolean,reflect:!0})],Wa.prototype,"multiSelect",void 0),t([Je({type:Boolean,reflect:!0})],Wa.prototype,"badgeFullWidth",void 0),t([Je()],Wa.prototype,"filterFunction",void 0),t([at("input#multi-select-input-tracker")],Wa.prototype,"_multiSelectInput",void 0),t([ot({flatten:!0,selector:"sgds-combo-box-option"})],Wa.prototype,"options",void 0),t([et()],Wa.prototype,"optionList",void 0),t([et()],Wa.prototype,"emptyMenu",void 0),t([Dt("value",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleValueChange",null),t([Dt("optionList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleOptionListChange",null),t([Dt("menuList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleMenuListChange",null);const Qa=6048e5,Ja=864e5;let eo={};function to(){return eo}function so(e,t){const s=to(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,a=Ka(e),o=a.getDay(),n=(o<i?7:0)+o-i;return a.setDate(a.getDate()-n),a.setHours(0,0,0,0),a}function io(e){return so(e,{weekStartsOn:1})}function ao(e){const t=Ka(e),s=t.getFullYear(),i=Ga(e,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const a=io(i),o=Ga(e,0);o.setFullYear(s,0,4),o.setHours(0,0,0,0);const n=io(o);return t.getTime()>=a.getTime()?s+1:t.getTime()>=n.getTime()?s:s-1}function oo(e){const t=Ka(e);return t.setHours(0,0,0,0),t}function no(e){const t=Ka(e),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),+e-+s}function ro(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const s=Ka(e);return!isNaN(Number(s))}function lo(e){const t=Ka(e);return+function(e){const t=Ka(e);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=Ka(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}(t)}const co={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ho(e){return(t={})=>{const s=t.width?String(t.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const uo={date:ho({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ho({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ho({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},po={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function go(e){return(t,s)=>{let i;if("formatting"===(s?.context?String(s.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=s?.width?String(s.width):t;i=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=s?.width?String(s.width):e.defaultWidth;i=e.values[a]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}function vo(e){return(t,s={})=>{const i=s.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const n=o[0],r=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?function(e,t){for(let s=0;s<e.length;s++)if(t(e[s]))return s;return}(r,(e=>e.test(n))):function(e,t){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return s;return}(r,(e=>e.test(n)));let d;d=e.valueCallback?e.valueCallback(l):l,d=s.valueCallback?s.valueCallback(d):d;return{value:d,rest:t.slice(n.length)}}}var mo;const fo={code:"en-US",formatDistance:(e,t,s)=>{let i;const a=co[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),s?.addSuffix?s.comparison&&s.comparison>0?"in "+i:i+" ago":i},formatLong:uo,formatRelative:(e,t,s,i)=>po[e],localize:{ordinalNumber:(e,t)=>{const s=Number(e),i=s%100;if(i>20||i<10)switch(i%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},era:go({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:go({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:go({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:go({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:go({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(mo={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const s=e.match(mo.matchPattern);if(!s)return null;const i=s[0],a=e.match(mo.parsePattern);if(!a)return null;let o=mo.valueCallback?mo.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(i.length)}}),era:vo({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:vo({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vo({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:vo({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:vo({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function bo(e){const t=Ka(e),s=function(e,t){const s=oo(e),i=oo(t),a=+s-no(s),o=+i-no(i);return Math.round((a-o)/Ja)}(t,function(e){const t=Ka(e),s=Ga(e,0);return s.setFullYear(t.getFullYear(),0,1),s.setHours(0,0,0,0),s}(t));return s+1}function wo(e){const t=Ka(e),s=+io(t)-+function(e){const t=ao(e),s=Ga(e,0);return s.setFullYear(t,0,4),s.setHours(0,0,0,0),io(s)}(t);return Math.round(s/Qa)+1}function yo(e,t){const s=Ka(e),i=s.getFullYear(),a=to(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,n=Ga(e,0);n.setFullYear(i+1,0,o),n.setHours(0,0,0,0);const r=so(n,t),l=Ga(e,0);l.setFullYear(i,0,o),l.setHours(0,0,0,0);const d=so(l,t);return s.getTime()>=r.getTime()?i+1:s.getTime()>=d.getTime()?i:i-1}function xo(e,t){const s=Ka(e),i=+so(s,t)-+function(e,t){const s=to(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=yo(e,t),o=Ga(e,0);return o.setFullYear(a,0,i),o.setHours(0,0,0,0),so(o,t)}(s,t);return Math.round(i/Qa)+1}function ko(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const _o={y(e,t){const s=e.getFullYear(),i=s>0?s:1-s;return ko("yy"===t?i%100:i,t.length)},M(e,t){const s=e.getMonth();return"M"===t?String(s+1):ko(s+1,2)},d:(e,t)=>ko(e.getDate(),t.length),a(e,t){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];default:return"am"===s?"a.m.":"p.m."}},h:(e,t)=>ko(e.getHours()%12||12,t.length),H:(e,t)=>ko(e.getHours(),t.length),m:(e,t)=>ko(e.getMinutes(),t.length),s:(e,t)=>ko(e.getSeconds(),t.length),S(e,t){const s=t.length,i=e.getMilliseconds();return ko(Math.trunc(i*Math.pow(10,s-3)),t.length)}},Co="midnight",So="noon",Mo="morning",$o="afternoon",Do="evening",Ao="night",Vo={G:function(e,t,s){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"});case"GGGGG":return s.era(i,{width:"narrow"});default:return s.era(i,{width:"wide"})}},y:function(e,t,s){if("yo"===t){const t=e.getFullYear(),i=t>0?t:1-t;return s.ordinalNumber(i,{unit:"year"})}return _o.y(e,t)},Y:function(e,t,s,i){const a=yo(e,i),o=a>0?a:1-a;if("YY"===t){return ko(o%100,2)}return"Yo"===t?s.ordinalNumber(o,{unit:"year"}):ko(o,t.length)},R:function(e,t){return ko(ao(e),t.length)},u:function(e,t){return ko(e.getFullYear(),t.length)},Q:function(e,t,s){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ko(i,2);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});default:return s.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,s){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ko(i,2);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});default:return s.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,s){const i=e.getMonth();switch(t){case"M":case"MM":return _o.M(e,t);case"Mo":return s.ordinalNumber(i+1,{unit:"month"});case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});default:return s.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,s){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return ko(i+1,2);case"Lo":return s.ordinalNumber(i+1,{unit:"month"});case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});default:return s.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,s,i){const a=xo(e,i);return"wo"===t?s.ordinalNumber(a,{unit:"week"}):ko(a,t.length)},I:function(e,t,s){const i=wo(e);return"Io"===t?s.ordinalNumber(i,{unit:"week"}):ko(i,t.length)},d:function(e,t,s){return"do"===t?s.ordinalNumber(e.getDate(),{unit:"date"}):_o.d(e,t)},D:function(e,t,s){const i=bo(e);return"Do"===t?s.ordinalNumber(i,{unit:"dayOfYear"}):ko(i,t.length)},E:function(e,t,s){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,s,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ko(o,2);case"eo":return s.ordinalNumber(o,{unit:"day"});case"eee":return s.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(a,{width:"short",context:"formatting"});default:return s.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,s,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ko(o,t.length);case"co":return s.ordinalNumber(o,{unit:"day"});case"ccc":return s.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(a,{width:"narrow",context:"standalone"});case"cccccc":return s.day(a,{width:"short",context:"standalone"});default:return s.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,s){const i=e.getDay(),a=0===i?7:i;switch(t){case"i":return String(a);case"ii":return ko(a,t.length);case"io":return s.ordinalNumber(a,{unit:"day"});case"iii":return s.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,s){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,s){const i=e.getHours();let a;switch(a=12===i?So:0===i?Co:i/12>=1?"pm":"am",t){case"b":case"bb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(a,{width:"narrow",context:"formatting"});default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,s){const i=e.getHours();let a;switch(a=i>=17?Do:i>=12?$o:i>=4?Mo:Ao,t){case"B":case"BB":case"BBB":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(a,{width:"narrow",context:"formatting"});default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,s){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),s.ordinalNumber(t,{unit:"hour"})}return _o.h(e,t)},H:function(e,t,s){return"Ho"===t?s.ordinalNumber(e.getHours(),{unit:"hour"}):_o.H(e,t)},K:function(e,t,s){const i=e.getHours()%12;return"Ko"===t?s.ordinalNumber(i,{unit:"hour"}):ko(i,t.length)},k:function(e,t,s){let i=e.getHours();return 0===i&&(i=24),"ko"===t?s.ordinalNumber(i,{unit:"hour"}):ko(i,t.length)},m:function(e,t,s){return"mo"===t?s.ordinalNumber(e.getMinutes(),{unit:"minute"}):_o.m(e,t)},s:function(e,t,s){return"so"===t?s.ordinalNumber(e.getSeconds(),{unit:"second"}):_o.s(e,t)},S:function(e,t){return _o.S(e,t)},X:function(e,t,s){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Io(i);case"XXXX":case"XX":return Bo(i);default:return Bo(i,":")}},x:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"x":return Io(i);case"xxxx":case"xx":return Bo(i);default:return Bo(i,":")}},O:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Eo(i,":");default:return"GMT"+Bo(i,":")}},z:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Eo(i,":");default:return"GMT"+Bo(i,":")}},t:function(e,t,s){return ko(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,s){return ko(e.getTime(),t.length)}};function Eo(e,t=""){const s=e>0?"-":"+",i=Math.abs(e),a=Math.trunc(i/60),o=i%60;return 0===o?s+String(a):s+String(a)+t+ko(o,2)}function Io(e,t){if(e%60==0){return(e>0?"-":"+")+ko(Math.abs(e)/60,2)}return Bo(e,t)}function Bo(e,t=""){const s=e>0?"-":"+",i=Math.abs(e);return s+ko(Math.trunc(i/60),2)+t+ko(i%60,2)}const Po=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},To=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Lo={p:To,P:(e,t)=>{const s=e.match(/(P+)(p+)?/)||[],i=s[1],a=s[2];if(!a)return Po(e,t);let o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Po(i,t)).replace("{{time}}",To(a,t))}},Fo=/^D+$/,Zo=/^Y+$/,Ho=["D","DD","YY","YYYY"];function zo(e){return Fo.test(e)}function Ro(e){return Zo.test(e)}function Oo(e,t,s){const i=function(e,t,s){const i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,s);if(console.warn(i),Ho.includes(e))throw new RangeError(i)}const No=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Uo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qo=/^'([^]*?)'?$/,Yo=/''/g,jo=/[a-zA-Z]/;function Wo(e,t,s){const i=to(),a=s?.locale??i.locale??fo,o=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,n=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Ka(e);if(!ro(r))throw new RangeError("Invalid time value");let l=t.match(Uo).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Lo[t])(e,a.formatLong)}return e})).join("").match(No).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ko(e)};if(Vo[t])return{isToken:!0,value:e};if(t.match(jo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(r,l));const d={firstWeekContainsDate:o,weekStartsOn:n,locale:a};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(!s?.useAdditionalWeekYearTokens&&Ro(o)||!s?.useAdditionalDayOfYearTokens&&zo(o))&&Oo(o,t,String(e));return(0,Vo[o[0]])(r,o,a.localize,d)})).join("")}function Ko(e){const t=e.match(qo);return t?t[1].replace(Yo,"'"):e}function Go(e){const t=Ka(e),s=t.getFullYear(),i=t.getMonth(),a=Ga(e,0);return a.setFullYear(s,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Xo(e){const t=Ka(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(0,0,0,0),t}function Qo(e,t){const s=Ka(e),i=Ka(t);return s.getTime()>i.getTime()}function Jo(e,t){return+Ka(e)<+Ka(t)}function en(e,t){return+Ka(e)==+Ka(t)}class tn{subPriority=0;validate(e,t){return!0}}class sn extends tn{constructor(e,t,s,i,a){super(),this.value=e,this.validateValue=t,this.setValue=s,this.priority=i,a&&(this.subPriority=a)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,s){return this.setValue(e,t,this.value,s)}}class an extends tn{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:Ga(e,function(e,t){const s=t instanceof Date?Ga(t,0):new t(0);return s.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),s.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),s}(e,Date))}}class on{run(e,t,s,i){const a=this.parse(e,t,s,i);return a?{setter:new sn(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,s){return!0}}const nn=/^(1[0-2]|0?\d)/,rn=/^(3[0-1]|[0-2]?\d)/,ln=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,dn=/^(5[0-3]|[0-4]?\d)/,cn=/^(2[0-3]|[0-1]?\d)/,hn=/^(2[0-4]|[0-1]?\d)/,un=/^(1[0-1]|0?\d)/,pn=/^(1[0-2]|0?\d)/,gn=/^[0-5]?\d/,vn=/^[0-5]?\d/,mn=/^\d/,fn=/^\d{1,2}/,bn=/^\d{1,3}/,wn=/^\d{1,4}/,yn=/^-?\d+/,xn=/^-?\d/,kn=/^-?\d{1,2}/,_n=/^-?\d{1,3}/,Cn=/^-?\d{1,4}/,Sn=/^([+-])(\d{2})(\d{2})?|Z/,Mn=/^([+-])(\d{2})(\d{2})|Z/,$n=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Dn=/^([+-])(\d{2}):(\d{2})|Z/,An=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Vn(e,t){return e?{value:t(e.value),rest:e.rest}:e}function En(e,t){const s=t.match(e);return s?{value:parseInt(s[0],10),rest:t.slice(s[0].length)}:null}function In(e,t){const s=t.match(e);if(!s)return null;if("Z"===s[0])return{value:0,rest:t.slice(1)};return{value:("+"===s[1]?1:-1)*(36e5*(s[2]?parseInt(s[2],10):0)+6e4*(s[3]?parseInt(s[3],10):0)+1e3*(s[5]?parseInt(s[5],10):0)),rest:t.slice(s[0].length)}}function Bn(e){return En(yn,e)}function Pn(e,t){switch(e){case 1:return En(mn,t);case 2:return En(fn,t);case 3:return En(bn,t);case 4:return En(wn,t);default:return En(new RegExp("^\\d{1,"+e+"}"),t)}}function Tn(e,t){switch(e){case 1:return En(xn,t);case 2:return En(kn,t);case 3:return En(_n,t);case 4:return En(Cn,t);default:return En(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Ln(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Fn(e,t){const s=t>0,i=s?t:1-t;let a;if(i<=50)a=e||100;else{const t=i+50;a=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return s?a:1-a}function Zn(e){return e%400==0||e%4==0&&e%100!=0}const Hn=[31,28,31,30,31,30,31,31,30,31,30,31],zn=[31,29,31,30,31,30,31,31,30,31,30,31];function Rn(e,t,s){const i=to(),a=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=Ka(e),n=o.getDay(),r=7-a;return Xa(o,t<0||t>6?t-(n+r)%7:((t%7+7)%7+r)%7-(n+r)%7)}function On(e,t){const s=Ka(e),i=function(e){let t=Ka(e).getDay();return 0===t&&(t=7),t}(s);return Xa(s,t-i)}const Nn={G:new class extends on{priority=140;parse(e,t,s){switch(t){case"G":case"GG":case"GGG":return s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"});case"GGGGG":return s.era(e,{width:"narrow"});default:return s.era(e,{width:"wide"})||s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"})}}set(e,t,s){return t.era=s,e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends on{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Vn(Pn(4,e),i);case"yo":return Vn(s.ordinalNumber(e,{unit:"year"}),i);default:return Vn(Pn(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s){const i=e.getFullYear();if(s.isTwoDigitYear){const t=Fn(s.year,i);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const a="era"in t&&1!==t.era?1-s.year:s.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}},Y:new class extends on{priority=130;parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Vn(Pn(4,e),i);case"Yo":return Vn(s.ordinalNumber(e,{unit:"year"}),i);default:return Vn(Pn(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s,i){const a=yo(e,i);if(s.isTwoDigitYear){const t=Fn(s.year,a);return e.setFullYear(t,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),so(e,i)}const o="era"in t&&1!==t.era?1-s.year:s.year;return e.setFullYear(o,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),so(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends on{priority=130;parse(e,t){return Tn("R"===t?4:t.length,e)}set(e,t,s){const i=Ga(e,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),io(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends on{priority=130;parse(e,t){return Tn("u"===t?4:t.length,e)}set(e,t,s){return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends on{priority=120;parse(e,t,s){switch(t){case"Q":case"QQ":return Pn(t.length,e);case"Qo":return s.ordinalNumber(e,{unit:"quarter"});case"QQQ":return s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(e,{width:"narrow",context:"formatting"});default:return s.quarter(e,{width:"wide",context:"formatting"})||s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,s){return e.setMonth(3*(s-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends on{priority=120;parse(e,t,s){switch(t){case"q":case"qq":return Pn(t.length,e);case"qo":return s.ordinalNumber(e,{unit:"quarter"});case"qqq":return s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(e,{width:"narrow",context:"standalone"});default:return s.quarter(e,{width:"wide",context:"standalone"})||s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,s){return e.setMonth(3*(s-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends on{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"M":return Vn(En(nn,e),i);case"MM":return Vn(Pn(2,e),i);case"Mo":return Vn(s.ordinalNumber(e,{unit:"month"}),i);case"MMM":return s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(e,{width:"narrow",context:"formatting"});default:return s.month(e,{width:"wide",context:"formatting"})||s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}},L:new class extends on{priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"L":return Vn(En(nn,e),i);case"LL":return Vn(Pn(2,e),i);case"Lo":return Vn(s.ordinalNumber(e,{unit:"month"}),i);case"LLL":return s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(e,{width:"narrow",context:"standalone"});default:return s.month(e,{width:"wide",context:"standalone"})||s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends on{priority=100;parse(e,t,s){switch(t){case"w":return En(dn,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s,i){return so(function(e,t,s){const i=Ka(e),a=xo(i,s)-t;return i.setDate(i.getDate()-7*a),i}(e,s,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends on{priority=100;parse(e,t,s){switch(t){case"I":return En(dn,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s){return io(function(e,t){const s=Ka(e),i=wo(s)-t;return s.setDate(s.getDate()-7*i),s}(e,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends on{priority=90;subPriority=1;parse(e,t,s){switch(t){case"d":return En(rn,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return Pn(t.length,e)}}validate(e,t){const s=Zn(e.getFullYear()),i=e.getMonth();return s?t>=1&&t<=zn[i]:t>=1&&t<=Hn[i]}set(e,t,s){return e.setDate(s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends on{priority=90;subpriority=1;parse(e,t,s){switch(t){case"D":case"DD":return En(ln,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return Pn(t.length,e)}}validate(e,t){return Zn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,s){return e.setMonth(0,s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends on{priority=90;parse(e,t,s){switch(t){case"E":case"EE":case"EEE":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends on{priority=90;parse(e,t,s,i){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Vn(Pn(t.length,e),a);case"eo":return Vn(s.ordinalNumber(e,{unit:"day"}),a);case"eee":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeeee":return s.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends on{priority=90;parse(e,t,s,i){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Vn(Pn(t.length,e),a);case"co":return Vn(s.ordinalNumber(e,{unit:"day"}),a);case"ccc":return s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"ccccc":return s.day(e,{width:"narrow",context:"standalone"});case"cccccc":return s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});default:return s.day(e,{width:"wide",context:"standalone"})||s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends on{priority=90;parse(e,t,s){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return Pn(t.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return Vn(s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return Vn(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Vn(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);default:return Vn(s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,t){return t>=1&&t<=7}set(e,t,s){return(e=On(e,s)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends on{priority=80;parse(e,t,s){switch(t){case"a":case"aa":case"aaa":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends on{priority=80;parse(e,t,s){switch(t){case"b":case"bb":case"bbb":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends on{priority=80;parse(e,t,s){switch(t){case"B":case"BB":case"BBB":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends on{priority=70;parse(e,t,s){switch(t){case"h":return En(pn,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,s){const i=e.getHours()>=12;return i&&s<12?e.setHours(s+12,0,0,0):i||12!==s?e.setHours(s,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends on{priority=70;parse(e,t,s){switch(t){case"H":return En(cn,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,s){return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends on{priority=70;parse(e,t,s){switch(t){case"K":return En(un,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.getHours()>=12&&s<12?e.setHours(s+12,0,0,0):e.setHours(s,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends on{priority=70;parse(e,t,s){switch(t){case"k":return En(hn,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,s){const i=s<=24?s%24:s;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends on{priority=60;parse(e,t,s){switch(t){case"m":return En(gn,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,s){return e.setMinutes(s,0,0),e}incompatibleTokens=["t","T"]},s:new class extends on{priority=50;parse(e,t,s){switch(t){case"s":return En(vn,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,s){return e.setSeconds(s,0),e}incompatibleTokens=["t","T"]},S:new class extends on{priority=30;parse(e,t){return Vn(Pn(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,s){return e.setMilliseconds(s),e}incompatibleTokens=["t","T"]},X:new class extends on{priority=10;parse(e,t){switch(t){case"X":return In(Sn,e);case"XX":return In(Mn,e);case"XXXX":return In($n,e);case"XXXXX":return In(An,e);default:return In(Dn,e)}}set(e,t,s){return t.timestampIsSet?e:Ga(e,e.getTime()-no(e)-s)}incompatibleTokens=["t","T","x"]},x:new class extends on{priority=10;parse(e,t){switch(t){case"x":return In(Sn,e);case"xx":return In(Mn,e);case"xxxx":return In($n,e);case"xxxxx":return In(An,e);default:return In(Dn,e)}}set(e,t,s){return t.timestampIsSet?e:Ga(e,e.getTime()-no(e)-s)}incompatibleTokens=["t","T","X"]},t:new class extends on{priority=40;parse(e){return Bn(e)}set(e,t,s){return[Ga(e,1e3*s),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends on{priority=20;parse(e){return Bn(e)}set(e,t,s){return[Ga(e,s),{timestampIsSet:!0}]}incompatibleTokens="*"}},Un=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yn=/^'([^]*?)'?$/,jn=/''/g,Wn=/\S/,Kn=/[a-zA-Z]/;function Gn(e,t,s,i){const a=Object.assign({},to()),o=i?.locale??a.locale??fo,n=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,r=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(""===t)return""===e?Ka(s):Ga(s,NaN);const l={firstWeekContainsDate:n,weekStartsOn:r,locale:o},d=[new an],c=t.match(qn).map((e=>{const t=e[0];if(t in Lo){return(0,Lo[t])(e,o.formatLong)}return e})).join("").match(Un),h=[];for(let a of c){!i?.useAdditionalWeekYearTokens&&Ro(a)&&Oo(a,t,e),!i?.useAdditionalDayOfYearTokens&&zo(a)&&Oo(a,t,e);const n=a[0],r=Nn[n];if(r){const{incompatibleTokens:t}=r;if(Array.isArray(t)){const e=h.find((e=>t.includes(e.token)||e.token===n));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${a}\` at the same time`)}else if("*"===r.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${a}\` and any other token at the same time`);h.push({token:n,fullToken:a});const i=r.run(e,a,o.match,l);if(!i)return Ga(s,NaN);d.push(i.setter),e=i.rest}else{if(n.match(Kn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===a?a="'":"'"===n&&(a=a.match(Yn)[1].replace(jn,"'")),0!==e.indexOf(a))return Ga(s,NaN);e=e.slice(a.length)}}if(e.length>0&&Wn.test(e))return Ga(s,NaN);const u=d.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,s)=>s.indexOf(e)===t)).map((e=>d.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let p=Ka(s);if(isNaN(p.getTime()))return Ga(s,NaN);const g={};for(const e of u){if(!e.validate(p,l))return Ga(s,NaN);const t=e.set(p,g,l);Array.isArray(t)?(p=t[0],Object.assign(g,t[1])):p=t}return Ga(s,p)}const Xn={"DD/MM/YYYY":{imPattern:"`dd{/}`mm{/}`yyyy",imRangePattern:"`dd{/}`mm{/}`yyyy - `DD{/}`MM{/}`YYYY",fnsPattern:"dd/MM/yyyy"},"MM/DD/YYYY":{imPattern:"`mm{/}`dd{/}`yyyy",imRangePattern:"`mm{/}`dd{/}`yyyy - `MM{/}`DD{/}`YYYY",fnsPattern:"MM/dd/yyyy"},"YYYY/MM/DD":{imPattern:"`yyyy{/}`mm{/}`dd",imRangePattern:"`yyyy{/}`mm{/}`dd - `YYYY{/}`MM{/}`DD",fnsPattern:"yyyy/MM/dd"}},Qn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=Go(a);return lo(e)&&o<i?Xo(a):new Date(s,t+1,i)},Jn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t-1),o=Go(a);return lo(e)&&o<i?Xo(a):new Date(s,t-1,i)},er=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var tr=Me`.datepicker-body{color:var(--sgds-form-color-default);display:flex;justify-content:center}table{border-collapse:collapse;text-align:center}.monthpicker,.yearpicker{display:grid;grid-template-columns:repeat(3,6rem);grid-template-rows:repeat(4,2.5rem)}button.month,button.year{background-color:transparent;border:0;border-radius:var(--sgds-form-border-radius-sm);line-height:var(--sgds-line-height-20);padding:0;position:relative}button.month.active:not(.selected-ends),button.year.active:not(.selected-ends),td[data-day].active:not(.selected-ends){background-color:var(--sgds-primary-surface-translucent);border-radius:0;cursor:pointer}button.month:hover:not(.active),button.year:hover:not(.active),td[data-day]:hover:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle);cursor:pointer}button.month:focus:not(.active),button.year:focus:not(.active),td[data-day]:focus:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle)}button.month:focus-visible,button.year:focus-visible,td[data-day]:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}button.month.active:not(.selected-ends):focus,button.year.active:not(.selected-ends):focus,td[data-day].active:not(.selected-ends):focus{border-radius:var(--sgds-form-border-radius-sm)}button.year.active{background-color:var(--sgds-primary-surface-translucent);cursor:pointer}td,th{border-radius:var(--sgds-form-border-radius-sm);height:var(--sgds-form-height-lg);line-height:var(--sgds-line-height-20);padding:0;position:relative;width:var(--sgds-form-width-md)}th{font-weight:var(--sgds-font-weight-semibold)}td[data-day]{cursor:pointer}button.month.active.selected-ends,button.year.active.selected-ends,td[data-day].active.selected-ends{background-color:var(--sgds-form-primary-surface-default);color:var(--sgds-form-color-fixed-light)}button.month.active.selected-ends:focus,button.month.active.selected-ends:hover,button.year.active.selected-ends:focus,button.year.active.selected-ends:hover,td[data-day].active.selected-ends:focus,td[data-day].active.selected-ends:hover{background-color:var(--sgds-form-primary-surface-emphasis)}td[data-day].disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.today{align-items:center;display:flex;flex-direction:column;justify-content:center}.today:after{background-color:var(--sgds-form-primary-surface-default);bottom:6px;content:".";line-height:4px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;position:absolute;width:4px}.today.active.selected-ends:after{background-color:var(--sgds-form-color-inverse)}`;const sr=new Date,ir={ArrowUp:{days:-7,months:-3,years:-3},ArrowDown:{days:7,months:3,years:3},ArrowRight:{days:1,months:1,years:1},ArrowLeft:{days:-1,months:-1,years:-1}};class ar extends lt{constructor(){super(...arguments),this.selectedDate=[],this.mode="single"}focusOnCalendar(e){e.blur(),this._focusOnCalendarCell()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyPress),this.addEventListener("blur",(e=>e.stopPropagation()))}updated(){3===this.focusedTabIndex&&this._focusOnCalendarCell()}_updateFocusedDate(){this.focusedDate=er(this.displayDate),this.focusedDate.getFullYear()<1900&&this.focusedDate.setFullYear(1900)}_setFocusedDate(e){const t=this.focusedDate.getDate(),s=this.focusedDate.getMonth(),i=this.focusedDate.getFullYear();switch(this.view){case"days":{const a=er(new Date(i,s,t+e));(Qo(a,new Date(0,0,1,12))||en(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=er(new Date(i,s+e,t));(Qo(a,new Date(0,0,1,12))||en(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=er(new Date(i+e,s,t));a.getFullYear()>=1900&&(this.focusedDate=a);break}}}_handleEnterDateKeyboard(e){const t=e.composedPath()[0];if(!t.classList.contains("disabled"))switch(this.view){case"days":this._onClickDay(e);break;case"months":{const{month:e}=t.dataset;this._onClickMonth(parseInt(e));break}case"years":{const{year:e}=t.dataset;this._onClickYear(parseInt(e))}}}_handleKeyPress(e){if("Enter"===e.key)return e.preventDefault(),void this._handleEnterDateKeyboard(e);if("Tab"!==e.key){if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=ir[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}else{const e=this._getFocusedTarget();3!==this.focusedTabIndex&&e.blur()}}_generateIncrementDates(){const e=er(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=er(this.selectedDate[1]),s=[];if(e.getTime()<t.getTime())for(let i=e;i<=t;i.setDate(i.getDate()+1))s.push(new Date(i));else for(let i=t;i<=e;i.setDate(i.getDate()+1))s.push(new Date(i));return s}_onClickDay(e){const{day:t,date:s}=e.composedPath()[0].dataset,i=new Date(this.displayDate);if(i.setDate(parseInt(t)),"click"===e.type&&(this.focusedDate=er(new Date(s))),"single"===this.mode)this.selectedDate=[i],this.emit("sgds-selectdates",{detail:this.selectedDate});else if("range"===this.mode){const e=[...this.selectedDate];0!==e.length&&2!==e.length||(e.length=0),e.push(i),this.selectedDate=e,this.emit("sgds-selectdates",{detail:this.selectedDate})}const a=this.minDate?er(new Date(this.minDate)):null,o=this.maxDate?er(new Date(this.maxDate)):null,n=er(i);(a&&n<a||o&&n>o)&&(e.stopPropagation(),e.preventDefault())}_onClickMonth(e,t=this.focusedDate.getFullYear()){const s=new Date(this.displayDate);this.view="days",s.setMonth(e),s.setFullYear(t),this.displayDate=s,this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectmonth",{detail:this.displayDate})}_onClickYear(e){const t=new Date(this.displayDate);t.setFullYear(e),this.displayDate=t,this.view="months",this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectyear",{detail:this.displayDate})}_getFocusedTarget(){const e={days:`td[data-date="${this.focusedDate.toISOString()}"]`,months:`button[data-month="${this.focusedDate.getMonth()}"][data-year="${this.focusedDate.getFullYear()}"]`,years:`button[data-year="${this.focusedDate.getFullYear()}"]`}[this.view];return this.shadowRoot.querySelector(`${e}`)}_blurCalendarCell(){const e=this._getFocusedTarget();e.setAttribute("tabindex","-1"),e.blur()}_focusOnCalendarCell(){const e=this._getFocusedTarget();e?(e.setAttribute("tabindex","3"),e.focus(),this.emit("sgds-update-focus",{detail:this.focusedDate})):this.emit("sgds-change-calendar",{detail:this.focusedDate})}_generateDays(){const e=this.selectedDate.map((e=>er(e))),t=this._generateIncrementDates(),s=this.minDate?er(new Date(this.minDate)):null,i=this.maxDate?er(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=ar.daysInMonth[o];1===o&&(a%4==0&&a%100!=0||a%400==0)&&(r=29);const l=[];let d=1;for(let c=0;c<9;c++){const h=[];for(let l=0;l<=6;l++)if(d<=r&&(c>0||l>=n)){const n=new Date(a,o,d,12,0,0,0),r=n.toISOString(),c=s&&Date.parse(r)<Date.parse(s.toISOString()),u=i&&Date.parse(r)>Date.parse(i.toISOString()),p=c||u?void 0:this._onClickDay,g=sr.getMonth()===this.displayDate.getMonth(),v=sr.getFullYear()===this.displayDate.getFullYear(),m=sr.getDate()===d,f=e.length>0&&t.some((e=>Date.parse(r)===Date.parse(e.toISOString()))),b=e.length>0&&t[0].toISOString()===r,w=e.length>1&&t[t.length-1].toISOString()===r,y=""+(m&&g&&v?"Today's date, ":"")+Wo(n,"PPPP");h.push(ee`<td
|
|
2357
|
+
`}}function Ka(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Ga(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Xa(e,t){const s=Ka(e);return isNaN(t)?Ga(e,NaN):t?(s.setDate(s.getDate()+t),s):s}Wa.styles=[...Ra.styles,za,Oa],Wa.dependencies={"sgds-combo-box-option":qa,"sgds-icon":Nt,"sgds-badge":Ki},t([Je({type:Boolean,reflect:!0})],Wa.prototype,"multiSelect",void 0),t([Je({type:Boolean,reflect:!0})],Wa.prototype,"badgeFullWidth",void 0),t([Je({type:Boolean,reflect:!0})],Wa.prototype,"clearable",void 0),t([Je()],Wa.prototype,"filterFunction",void 0),t([at("input#multi-select-input-tracker")],Wa.prototype,"_multiSelectInput",void 0),t([ot({flatten:!0,selector:"sgds-combo-box-option"})],Wa.prototype,"options",void 0),t([et()],Wa.prototype,"optionList",void 0),t([et()],Wa.prototype,"emptyMenu",void 0),t([et()],Wa.prototype,"isFocused",void 0),t([Dt("value",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleValueChange",null),t([Dt("optionList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleOptionListChange",null),t([Dt("menuList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleMenuListChange",null);const Qa=6048e5,Ja=864e5;let eo={};function to(){return eo}function so(e,t){const s=to(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,a=Ka(e),o=a.getDay(),n=(o<i?7:0)+o-i;return a.setDate(a.getDate()-n),a.setHours(0,0,0,0),a}function io(e){return so(e,{weekStartsOn:1})}function ao(e){const t=Ka(e),s=t.getFullYear(),i=Ga(e,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const a=io(i),o=Ga(e,0);o.setFullYear(s,0,4),o.setHours(0,0,0,0);const n=io(o);return t.getTime()>=a.getTime()?s+1:t.getTime()>=n.getTime()?s:s-1}function oo(e){const t=Ka(e);return t.setHours(0,0,0,0),t}function no(e){const t=Ka(e),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),+e-+s}function ro(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const s=Ka(e);return!isNaN(Number(s))}function lo(e){const t=Ka(e);return+function(e){const t=Ka(e);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=Ka(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}(t)}const co={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ho(e){return(t={})=>{const s=t.width?String(t.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const uo={date:ho({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ho({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ho({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},po={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function go(e){return(t,s)=>{let i;if("formatting"===(s?.context?String(s.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=s?.width?String(s.width):t;i=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=s?.width?String(s.width):e.defaultWidth;i=e.values[a]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}function vo(e){return(t,s={})=>{const i=s.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const n=o[0],r=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?function(e,t){for(let s=0;s<e.length;s++)if(t(e[s]))return s;return}(r,(e=>e.test(n))):function(e,t){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return s;return}(r,(e=>e.test(n)));let d;d=e.valueCallback?e.valueCallback(l):l,d=s.valueCallback?s.valueCallback(d):d;return{value:d,rest:t.slice(n.length)}}}var mo;const fo={code:"en-US",formatDistance:(e,t,s)=>{let i;const a=co[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),s?.addSuffix?s.comparison&&s.comparison>0?"in "+i:i+" ago":i},formatLong:uo,formatRelative:(e,t,s,i)=>po[e],localize:{ordinalNumber:(e,t)=>{const s=Number(e),i=s%100;if(i>20||i<10)switch(i%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},era:go({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:go({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:go({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:go({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:go({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(mo={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const s=e.match(mo.matchPattern);if(!s)return null;const i=s[0],a=e.match(mo.parsePattern);if(!a)return null;let o=mo.valueCallback?mo.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(i.length)}}),era:vo({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:vo({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vo({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:vo({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:vo({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function bo(e){const t=Ka(e),s=function(e,t){const s=oo(e),i=oo(t),a=+s-no(s),o=+i-no(i);return Math.round((a-o)/Ja)}(t,function(e){const t=Ka(e),s=Ga(e,0);return s.setFullYear(t.getFullYear(),0,1),s.setHours(0,0,0,0),s}(t));return s+1}function wo(e){const t=Ka(e),s=+io(t)-+function(e){const t=ao(e),s=Ga(e,0);return s.setFullYear(t,0,4),s.setHours(0,0,0,0),io(s)}(t);return Math.round(s/Qa)+1}function yo(e,t){const s=Ka(e),i=s.getFullYear(),a=to(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,n=Ga(e,0);n.setFullYear(i+1,0,o),n.setHours(0,0,0,0);const r=so(n,t),l=Ga(e,0);l.setFullYear(i,0,o),l.setHours(0,0,0,0);const d=so(l,t);return s.getTime()>=r.getTime()?i+1:s.getTime()>=d.getTime()?i:i-1}function xo(e,t){const s=Ka(e),i=+so(s,t)-+function(e,t){const s=to(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=yo(e,t),o=Ga(e,0);return o.setFullYear(a,0,i),o.setHours(0,0,0,0),so(o,t)}(s,t);return Math.round(i/Qa)+1}function ko(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const _o={y(e,t){const s=e.getFullYear(),i=s>0?s:1-s;return ko("yy"===t?i%100:i,t.length)},M(e,t){const s=e.getMonth();return"M"===t?String(s+1):ko(s+1,2)},d:(e,t)=>ko(e.getDate(),t.length),a(e,t){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];default:return"am"===s?"a.m.":"p.m."}},h:(e,t)=>ko(e.getHours()%12||12,t.length),H:(e,t)=>ko(e.getHours(),t.length),m:(e,t)=>ko(e.getMinutes(),t.length),s:(e,t)=>ko(e.getSeconds(),t.length),S(e,t){const s=t.length,i=e.getMilliseconds();return ko(Math.trunc(i*Math.pow(10,s-3)),t.length)}},Co="midnight",So="noon",Mo="morning",$o="afternoon",Do="evening",Ao="night",Vo={G:function(e,t,s){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"});case"GGGGG":return s.era(i,{width:"narrow"});default:return s.era(i,{width:"wide"})}},y:function(e,t,s){if("yo"===t){const t=e.getFullYear(),i=t>0?t:1-t;return s.ordinalNumber(i,{unit:"year"})}return _o.y(e,t)},Y:function(e,t,s,i){const a=yo(e,i),o=a>0?a:1-a;if("YY"===t){return ko(o%100,2)}return"Yo"===t?s.ordinalNumber(o,{unit:"year"}):ko(o,t.length)},R:function(e,t){return ko(ao(e),t.length)},u:function(e,t){return ko(e.getFullYear(),t.length)},Q:function(e,t,s){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ko(i,2);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});default:return s.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,s){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ko(i,2);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});default:return s.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,s){const i=e.getMonth();switch(t){case"M":case"MM":return _o.M(e,t);case"Mo":return s.ordinalNumber(i+1,{unit:"month"});case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});default:return s.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,s){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return ko(i+1,2);case"Lo":return s.ordinalNumber(i+1,{unit:"month"});case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});default:return s.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,s,i){const a=xo(e,i);return"wo"===t?s.ordinalNumber(a,{unit:"week"}):ko(a,t.length)},I:function(e,t,s){const i=wo(e);return"Io"===t?s.ordinalNumber(i,{unit:"week"}):ko(i,t.length)},d:function(e,t,s){return"do"===t?s.ordinalNumber(e.getDate(),{unit:"date"}):_o.d(e,t)},D:function(e,t,s){const i=bo(e);return"Do"===t?s.ordinalNumber(i,{unit:"dayOfYear"}):ko(i,t.length)},E:function(e,t,s){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,s,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ko(o,2);case"eo":return s.ordinalNumber(o,{unit:"day"});case"eee":return s.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(a,{width:"short",context:"formatting"});default:return s.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,s,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ko(o,t.length);case"co":return s.ordinalNumber(o,{unit:"day"});case"ccc":return s.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(a,{width:"narrow",context:"standalone"});case"cccccc":return s.day(a,{width:"short",context:"standalone"});default:return s.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,s){const i=e.getDay(),a=0===i?7:i;switch(t){case"i":return String(a);case"ii":return ko(a,t.length);case"io":return s.ordinalNumber(a,{unit:"day"});case"iii":return s.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,s){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,s){const i=e.getHours();let a;switch(a=12===i?So:0===i?Co:i/12>=1?"pm":"am",t){case"b":case"bb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(a,{width:"narrow",context:"formatting"});default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,s){const i=e.getHours();let a;switch(a=i>=17?Do:i>=12?$o:i>=4?Mo:Ao,t){case"B":case"BB":case"BBB":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(a,{width:"narrow",context:"formatting"});default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,s){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),s.ordinalNumber(t,{unit:"hour"})}return _o.h(e,t)},H:function(e,t,s){return"Ho"===t?s.ordinalNumber(e.getHours(),{unit:"hour"}):_o.H(e,t)},K:function(e,t,s){const i=e.getHours()%12;return"Ko"===t?s.ordinalNumber(i,{unit:"hour"}):ko(i,t.length)},k:function(e,t,s){let i=e.getHours();return 0===i&&(i=24),"ko"===t?s.ordinalNumber(i,{unit:"hour"}):ko(i,t.length)},m:function(e,t,s){return"mo"===t?s.ordinalNumber(e.getMinutes(),{unit:"minute"}):_o.m(e,t)},s:function(e,t,s){return"so"===t?s.ordinalNumber(e.getSeconds(),{unit:"second"}):_o.s(e,t)},S:function(e,t){return _o.S(e,t)},X:function(e,t,s){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Io(i);case"XXXX":case"XX":return Bo(i);default:return Bo(i,":")}},x:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"x":return Io(i);case"xxxx":case"xx":return Bo(i);default:return Bo(i,":")}},O:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Eo(i,":");default:return"GMT"+Bo(i,":")}},z:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Eo(i,":");default:return"GMT"+Bo(i,":")}},t:function(e,t,s){return ko(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,s){return ko(e.getTime(),t.length)}};function Eo(e,t=""){const s=e>0?"-":"+",i=Math.abs(e),a=Math.trunc(i/60),o=i%60;return 0===o?s+String(a):s+String(a)+t+ko(o,2)}function Io(e,t){if(e%60==0){return(e>0?"-":"+")+ko(Math.abs(e)/60,2)}return Bo(e,t)}function Bo(e,t=""){const s=e>0?"-":"+",i=Math.abs(e);return s+ko(Math.trunc(i/60),2)+t+ko(i%60,2)}const Po=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},To=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Lo={p:To,P:(e,t)=>{const s=e.match(/(P+)(p+)?/)||[],i=s[1],a=s[2];if(!a)return Po(e,t);let o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Po(i,t)).replace("{{time}}",To(a,t))}},Fo=/^D+$/,Zo=/^Y+$/,Ho=["D","DD","YY","YYYY"];function zo(e){return Fo.test(e)}function Ro(e){return Zo.test(e)}function Oo(e,t,s){const i=function(e,t,s){const i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,s);if(console.warn(i),Ho.includes(e))throw new RangeError(i)}const No=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Uo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qo=/^'([^]*?)'?$/,Yo=/''/g,jo=/[a-zA-Z]/;function Wo(e,t,s){const i=to(),a=s?.locale??i.locale??fo,o=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,n=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Ka(e);if(!ro(r))throw new RangeError("Invalid time value");let l=t.match(Uo).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Lo[t])(e,a.formatLong)}return e})).join("").match(No).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ko(e)};if(Vo[t])return{isToken:!0,value:e};if(t.match(jo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(r,l));const d={firstWeekContainsDate:o,weekStartsOn:n,locale:a};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(!s?.useAdditionalWeekYearTokens&&Ro(o)||!s?.useAdditionalDayOfYearTokens&&zo(o))&&Oo(o,t,String(e));return(0,Vo[o[0]])(r,o,a.localize,d)})).join("")}function Ko(e){const t=e.match(qo);return t?t[1].replace(Yo,"'"):e}function Go(e){const t=Ka(e),s=t.getFullYear(),i=t.getMonth(),a=Ga(e,0);return a.setFullYear(s,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Xo(e){const t=Ka(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(0,0,0,0),t}function Qo(e,t){const s=Ka(e),i=Ka(t);return s.getTime()>i.getTime()}function Jo(e,t){return+Ka(e)<+Ka(t)}function en(e,t){return+Ka(e)==+Ka(t)}class tn{subPriority=0;validate(e,t){return!0}}class sn extends tn{constructor(e,t,s,i,a){super(),this.value=e,this.validateValue=t,this.setValue=s,this.priority=i,a&&(this.subPriority=a)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,s){return this.setValue(e,t,this.value,s)}}class an extends tn{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:Ga(e,function(e,t){const s=t instanceof Date?Ga(t,0):new t(0);return s.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),s.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),s}(e,Date))}}class on{run(e,t,s,i){const a=this.parse(e,t,s,i);return a?{setter:new sn(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,s){return!0}}const nn=/^(1[0-2]|0?\d)/,rn=/^(3[0-1]|[0-2]?\d)/,ln=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,dn=/^(5[0-3]|[0-4]?\d)/,cn=/^(2[0-3]|[0-1]?\d)/,hn=/^(2[0-4]|[0-1]?\d)/,un=/^(1[0-1]|0?\d)/,pn=/^(1[0-2]|0?\d)/,gn=/^[0-5]?\d/,vn=/^[0-5]?\d/,mn=/^\d/,fn=/^\d{1,2}/,bn=/^\d{1,3}/,wn=/^\d{1,4}/,yn=/^-?\d+/,xn=/^-?\d/,kn=/^-?\d{1,2}/,_n=/^-?\d{1,3}/,Cn=/^-?\d{1,4}/,Sn=/^([+-])(\d{2})(\d{2})?|Z/,Mn=/^([+-])(\d{2})(\d{2})|Z/,$n=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Dn=/^([+-])(\d{2}):(\d{2})|Z/,An=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Vn(e,t){return e?{value:t(e.value),rest:e.rest}:e}function En(e,t){const s=t.match(e);return s?{value:parseInt(s[0],10),rest:t.slice(s[0].length)}:null}function In(e,t){const s=t.match(e);if(!s)return null;if("Z"===s[0])return{value:0,rest:t.slice(1)};return{value:("+"===s[1]?1:-1)*(36e5*(s[2]?parseInt(s[2],10):0)+6e4*(s[3]?parseInt(s[3],10):0)+1e3*(s[5]?parseInt(s[5],10):0)),rest:t.slice(s[0].length)}}function Bn(e){return En(yn,e)}function Pn(e,t){switch(e){case 1:return En(mn,t);case 2:return En(fn,t);case 3:return En(bn,t);case 4:return En(wn,t);default:return En(new RegExp("^\\d{1,"+e+"}"),t)}}function Tn(e,t){switch(e){case 1:return En(xn,t);case 2:return En(kn,t);case 3:return En(_n,t);case 4:return En(Cn,t);default:return En(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Ln(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Fn(e,t){const s=t>0,i=s?t:1-t;let a;if(i<=50)a=e||100;else{const t=i+50;a=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return s?a:1-a}function Zn(e){return e%400==0||e%4==0&&e%100!=0}const Hn=[31,28,31,30,31,30,31,31,30,31,30,31],zn=[31,29,31,30,31,30,31,31,30,31,30,31];function Rn(e,t,s){const i=to(),a=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=Ka(e),n=o.getDay(),r=7-a;return Xa(o,t<0||t>6?t-(n+r)%7:((t%7+7)%7+r)%7-(n+r)%7)}function On(e,t){const s=Ka(e),i=function(e){let t=Ka(e).getDay();return 0===t&&(t=7),t}(s);return Xa(s,t-i)}const Nn={G:new class extends on{priority=140;parse(e,t,s){switch(t){case"G":case"GG":case"GGG":return s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"});case"GGGGG":return s.era(e,{width:"narrow"});default:return s.era(e,{width:"wide"})||s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"})}}set(e,t,s){return t.era=s,e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends on{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Vn(Pn(4,e),i);case"yo":return Vn(s.ordinalNumber(e,{unit:"year"}),i);default:return Vn(Pn(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s){const i=e.getFullYear();if(s.isTwoDigitYear){const t=Fn(s.year,i);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const a="era"in t&&1!==t.era?1-s.year:s.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}},Y:new class extends on{priority=130;parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Vn(Pn(4,e),i);case"Yo":return Vn(s.ordinalNumber(e,{unit:"year"}),i);default:return Vn(Pn(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s,i){const a=yo(e,i);if(s.isTwoDigitYear){const t=Fn(s.year,a);return e.setFullYear(t,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),so(e,i)}const o="era"in t&&1!==t.era?1-s.year:s.year;return e.setFullYear(o,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),so(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends on{priority=130;parse(e,t){return Tn("R"===t?4:t.length,e)}set(e,t,s){const i=Ga(e,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),io(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends on{priority=130;parse(e,t){return Tn("u"===t?4:t.length,e)}set(e,t,s){return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends on{priority=120;parse(e,t,s){switch(t){case"Q":case"QQ":return Pn(t.length,e);case"Qo":return s.ordinalNumber(e,{unit:"quarter"});case"QQQ":return s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(e,{width:"narrow",context:"formatting"});default:return s.quarter(e,{width:"wide",context:"formatting"})||s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,s){return e.setMonth(3*(s-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends on{priority=120;parse(e,t,s){switch(t){case"q":case"qq":return Pn(t.length,e);case"qo":return s.ordinalNumber(e,{unit:"quarter"});case"qqq":return s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(e,{width:"narrow",context:"standalone"});default:return s.quarter(e,{width:"wide",context:"standalone"})||s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,s){return e.setMonth(3*(s-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends on{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"M":return Vn(En(nn,e),i);case"MM":return Vn(Pn(2,e),i);case"Mo":return Vn(s.ordinalNumber(e,{unit:"month"}),i);case"MMM":return s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(e,{width:"narrow",context:"formatting"});default:return s.month(e,{width:"wide",context:"formatting"})||s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}},L:new class extends on{priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"L":return Vn(En(nn,e),i);case"LL":return Vn(Pn(2,e),i);case"Lo":return Vn(s.ordinalNumber(e,{unit:"month"}),i);case"LLL":return s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(e,{width:"narrow",context:"standalone"});default:return s.month(e,{width:"wide",context:"standalone"})||s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends on{priority=100;parse(e,t,s){switch(t){case"w":return En(dn,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s,i){return so(function(e,t,s){const i=Ka(e),a=xo(i,s)-t;return i.setDate(i.getDate()-7*a),i}(e,s,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends on{priority=100;parse(e,t,s){switch(t){case"I":return En(dn,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s){return io(function(e,t){const s=Ka(e),i=wo(s)-t;return s.setDate(s.getDate()-7*i),s}(e,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends on{priority=90;subPriority=1;parse(e,t,s){switch(t){case"d":return En(rn,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return Pn(t.length,e)}}validate(e,t){const s=Zn(e.getFullYear()),i=e.getMonth();return s?t>=1&&t<=zn[i]:t>=1&&t<=Hn[i]}set(e,t,s){return e.setDate(s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends on{priority=90;subpriority=1;parse(e,t,s){switch(t){case"D":case"DD":return En(ln,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return Pn(t.length,e)}}validate(e,t){return Zn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,s){return e.setMonth(0,s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends on{priority=90;parse(e,t,s){switch(t){case"E":case"EE":case"EEE":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends on{priority=90;parse(e,t,s,i){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Vn(Pn(t.length,e),a);case"eo":return Vn(s.ordinalNumber(e,{unit:"day"}),a);case"eee":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeeee":return s.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends on{priority=90;parse(e,t,s,i){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Vn(Pn(t.length,e),a);case"co":return Vn(s.ordinalNumber(e,{unit:"day"}),a);case"ccc":return s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"ccccc":return s.day(e,{width:"narrow",context:"standalone"});case"cccccc":return s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});default:return s.day(e,{width:"wide",context:"standalone"})||s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends on{priority=90;parse(e,t,s){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return Pn(t.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return Vn(s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return Vn(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Vn(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);default:return Vn(s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,t){return t>=1&&t<=7}set(e,t,s){return(e=On(e,s)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends on{priority=80;parse(e,t,s){switch(t){case"a":case"aa":case"aaa":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends on{priority=80;parse(e,t,s){switch(t){case"b":case"bb":case"bbb":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends on{priority=80;parse(e,t,s){switch(t){case"B":case"BB":case"BBB":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends on{priority=70;parse(e,t,s){switch(t){case"h":return En(pn,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,s){const i=e.getHours()>=12;return i&&s<12?e.setHours(s+12,0,0,0):i||12!==s?e.setHours(s,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends on{priority=70;parse(e,t,s){switch(t){case"H":return En(cn,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,s){return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends on{priority=70;parse(e,t,s){switch(t){case"K":return En(un,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.getHours()>=12&&s<12?e.setHours(s+12,0,0,0):e.setHours(s,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends on{priority=70;parse(e,t,s){switch(t){case"k":return En(hn,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,s){const i=s<=24?s%24:s;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends on{priority=60;parse(e,t,s){switch(t){case"m":return En(gn,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,s){return e.setMinutes(s,0,0),e}incompatibleTokens=["t","T"]},s:new class extends on{priority=50;parse(e,t,s){switch(t){case"s":return En(vn,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,s){return e.setSeconds(s,0),e}incompatibleTokens=["t","T"]},S:new class extends on{priority=30;parse(e,t){return Vn(Pn(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,s){return e.setMilliseconds(s),e}incompatibleTokens=["t","T"]},X:new class extends on{priority=10;parse(e,t){switch(t){case"X":return In(Sn,e);case"XX":return In(Mn,e);case"XXXX":return In($n,e);case"XXXXX":return In(An,e);default:return In(Dn,e)}}set(e,t,s){return t.timestampIsSet?e:Ga(e,e.getTime()-no(e)-s)}incompatibleTokens=["t","T","x"]},x:new class extends on{priority=10;parse(e,t){switch(t){case"x":return In(Sn,e);case"xx":return In(Mn,e);case"xxxx":return In($n,e);case"xxxxx":return In(An,e);default:return In(Dn,e)}}set(e,t,s){return t.timestampIsSet?e:Ga(e,e.getTime()-no(e)-s)}incompatibleTokens=["t","T","X"]},t:new class extends on{priority=40;parse(e){return Bn(e)}set(e,t,s){return[Ga(e,1e3*s),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends on{priority=20;parse(e){return Bn(e)}set(e,t,s){return[Ga(e,s),{timestampIsSet:!0}]}incompatibleTokens="*"}},Un=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yn=/^'([^]*?)'?$/,jn=/''/g,Wn=/\S/,Kn=/[a-zA-Z]/;function Gn(e,t,s,i){const a=Object.assign({},to()),o=i?.locale??a.locale??fo,n=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,r=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(""===t)return""===e?Ka(s):Ga(s,NaN);const l={firstWeekContainsDate:n,weekStartsOn:r,locale:o},d=[new an],c=t.match(qn).map((e=>{const t=e[0];if(t in Lo){return(0,Lo[t])(e,o.formatLong)}return e})).join("").match(Un),h=[];for(let a of c){!i?.useAdditionalWeekYearTokens&&Ro(a)&&Oo(a,t,e),!i?.useAdditionalDayOfYearTokens&&zo(a)&&Oo(a,t,e);const n=a[0],r=Nn[n];if(r){const{incompatibleTokens:t}=r;if(Array.isArray(t)){const e=h.find((e=>t.includes(e.token)||e.token===n));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${a}\` at the same time`)}else if("*"===r.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${a}\` and any other token at the same time`);h.push({token:n,fullToken:a});const i=r.run(e,a,o.match,l);if(!i)return Ga(s,NaN);d.push(i.setter),e=i.rest}else{if(n.match(Kn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===a?a="'":"'"===n&&(a=a.match(Yn)[1].replace(jn,"'")),0!==e.indexOf(a))return Ga(s,NaN);e=e.slice(a.length)}}if(e.length>0&&Wn.test(e))return Ga(s,NaN);const u=d.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,s)=>s.indexOf(e)===t)).map((e=>d.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let p=Ka(s);if(isNaN(p.getTime()))return Ga(s,NaN);const g={};for(const e of u){if(!e.validate(p,l))return Ga(s,NaN);const t=e.set(p,g,l);Array.isArray(t)?(p=t[0],Object.assign(g,t[1])):p=t}return Ga(s,p)}const Xn={"DD/MM/YYYY":{imPattern:"`dd{/}`mm{/}`yyyy",imRangePattern:"`dd{/}`mm{/}`yyyy - `DD{/}`MM{/}`YYYY",fnsPattern:"dd/MM/yyyy"},"MM/DD/YYYY":{imPattern:"`mm{/}`dd{/}`yyyy",imRangePattern:"`mm{/}`dd{/}`yyyy - `MM{/}`DD{/}`YYYY",fnsPattern:"MM/dd/yyyy"},"YYYY/MM/DD":{imPattern:"`yyyy{/}`mm{/}`dd",imRangePattern:"`yyyy{/}`mm{/}`dd - `YYYY{/}`MM{/}`DD",fnsPattern:"yyyy/MM/dd"}},Qn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=Go(a);return lo(e)&&o<i?Xo(a):new Date(s,t+1,i)},Jn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t-1),o=Go(a);return lo(e)&&o<i?Xo(a):new Date(s,t-1,i)},er=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var tr=Me`.datepicker-body{color:var(--sgds-form-color-default);display:flex;justify-content:center}table{border-collapse:collapse;text-align:center}.monthpicker,.yearpicker{display:grid;grid-template-columns:repeat(3,6rem);grid-template-rows:repeat(4,2.5rem)}button.month,button.year{background-color:transparent;border:0;border-radius:var(--sgds-form-border-radius-sm);line-height:var(--sgds-line-height-20);padding:0;position:relative}button.month.active:not(.selected-ends),button.year.active:not(.selected-ends),td[data-day].active:not(.selected-ends){background-color:var(--sgds-primary-surface-translucent);border-radius:0;cursor:pointer}button.month:hover:not(.active),button.year:hover:not(.active),td[data-day]:hover:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle);cursor:pointer}button.month:focus:not(.active),button.year:focus:not(.active),td[data-day]:focus:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle)}button.month:focus-visible,button.year:focus-visible,td[data-day]:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}button.month.active:not(.selected-ends):focus,button.year.active:not(.selected-ends):focus,td[data-day].active:not(.selected-ends):focus{border-radius:var(--sgds-form-border-radius-sm)}button.year.active{background-color:var(--sgds-primary-surface-translucent);cursor:pointer}td,th{border-radius:var(--sgds-form-border-radius-sm);height:var(--sgds-form-height-lg);line-height:var(--sgds-line-height-20);padding:0;position:relative;width:var(--sgds-form-width-md)}th{font-weight:var(--sgds-font-weight-semibold)}td[data-day]{cursor:pointer}button.month.active.selected-ends,button.year.active.selected-ends,td[data-day].active.selected-ends{background-color:var(--sgds-form-primary-surface-default);color:var(--sgds-form-color-fixed-light)}button.month.active.selected-ends:focus,button.month.active.selected-ends:hover,button.year.active.selected-ends:focus,button.year.active.selected-ends:hover,td[data-day].active.selected-ends:focus,td[data-day].active.selected-ends:hover{background-color:var(--sgds-form-primary-surface-emphasis)}td[data-day].disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.today{align-items:center;display:flex;flex-direction:column;justify-content:center}.today:after{background-color:var(--sgds-form-primary-surface-default);bottom:6px;content:".";line-height:4px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;position:absolute;width:4px}.today.active.selected-ends:after{background-color:var(--sgds-form-color-inverse)}`;const sr=new Date,ir={ArrowUp:{days:-7,months:-3,years:-3},ArrowDown:{days:7,months:3,years:3},ArrowRight:{days:1,months:1,years:1},ArrowLeft:{days:-1,months:-1,years:-1}};class ar extends lt{constructor(){super(...arguments),this.selectedDate=[],this.mode="single"}focusOnCalendar(e){e.blur(),this._focusOnCalendarCell()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyPress),this.addEventListener("blur",(e=>e.stopPropagation()))}updated(){3===this.focusedTabIndex&&this._focusOnCalendarCell()}_updateFocusedDate(){this.focusedDate=er(this.displayDate),this.focusedDate.getFullYear()<1900&&this.focusedDate.setFullYear(1900)}_setFocusedDate(e){const t=this.focusedDate.getDate(),s=this.focusedDate.getMonth(),i=this.focusedDate.getFullYear();switch(this.view){case"days":{const a=er(new Date(i,s,t+e));(Qo(a,new Date(0,0,1,12))||en(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=er(new Date(i,s+e,t));(Qo(a,new Date(0,0,1,12))||en(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=er(new Date(i+e,s,t));a.getFullYear()>=1900&&(this.focusedDate=a);break}}}_handleEnterDateKeyboard(e){const t=e.composedPath()[0];if(!t.classList.contains("disabled"))switch(this.view){case"days":this._onClickDay(e);break;case"months":{const{month:e}=t.dataset;this._onClickMonth(parseInt(e));break}case"years":{const{year:e}=t.dataset;this._onClickYear(parseInt(e))}}}_handleKeyPress(e){if("Enter"===e.key)return e.preventDefault(),void this._handleEnterDateKeyboard(e);if("Tab"!==e.key){if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=ir[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}else{const e=this._getFocusedTarget();3!==this.focusedTabIndex&&e.blur()}}_generateIncrementDates(){const e=er(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=er(this.selectedDate[1]),s=[];if(e.getTime()<t.getTime())for(let i=e;i<=t;i.setDate(i.getDate()+1))s.push(new Date(i));else for(let i=t;i<=e;i.setDate(i.getDate()+1))s.push(new Date(i));return s}_onClickDay(e){const{day:t,date:s}=e.composedPath()[0].dataset,i=new Date(this.displayDate);if(i.setDate(parseInt(t)),"click"===e.type&&(this.focusedDate=er(new Date(s))),"single"===this.mode)this.selectedDate=[i],this.emit("sgds-selectdates",{detail:this.selectedDate});else if("range"===this.mode){const e=[...this.selectedDate];0!==e.length&&2!==e.length||(e.length=0),e.push(i),this.selectedDate=e,this.emit("sgds-selectdates",{detail:this.selectedDate})}const a=this.minDate?er(new Date(this.minDate)):null,o=this.maxDate?er(new Date(this.maxDate)):null,n=er(i);(a&&n<a||o&&n>o)&&(e.stopPropagation(),e.preventDefault())}_onClickMonth(e,t=this.focusedDate.getFullYear()){const s=new Date(this.displayDate);this.view="days",s.setMonth(e),s.setFullYear(t),this.displayDate=s,this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectmonth",{detail:this.displayDate})}_onClickYear(e){const t=new Date(this.displayDate);t.setFullYear(e),this.displayDate=t,this.view="months",this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectyear",{detail:this.displayDate})}_getFocusedTarget(){const e={days:`td[data-date="${this.focusedDate.toISOString()}"]`,months:`button[data-month="${this.focusedDate.getMonth()}"][data-year="${this.focusedDate.getFullYear()}"]`,years:`button[data-year="${this.focusedDate.getFullYear()}"]`}[this.view];return this.shadowRoot.querySelector(`${e}`)}_blurCalendarCell(){const e=this._getFocusedTarget();e.setAttribute("tabindex","-1"),e.blur()}_focusOnCalendarCell(){const e=this._getFocusedTarget();e?(e.setAttribute("tabindex","3"),e.focus(),this.emit("sgds-update-focus",{detail:this.focusedDate})):this.emit("sgds-change-calendar",{detail:this.focusedDate})}_generateDays(){const e=this.selectedDate.map((e=>er(e))),t=this._generateIncrementDates(),s=this.minDate?er(new Date(this.minDate)):null,i=this.maxDate?er(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=ar.daysInMonth[o];1===o&&(a%4==0&&a%100!=0||a%400==0)&&(r=29);const l=[];let d=1;for(let c=0;c<9;c++){const h=[];for(let l=0;l<=6;l++)if(d<=r&&(c>0||l>=n)){const n=new Date(a,o,d,12,0,0,0),r=n.toISOString(),c=s&&Date.parse(r)<Date.parse(s.toISOString()),u=i&&Date.parse(r)>Date.parse(i.toISOString()),p=c||u?void 0:this._onClickDay,g=sr.getMonth()===this.displayDate.getMonth(),v=sr.getFullYear()===this.displayDate.getFullYear(),m=sr.getDate()===d,f=e.length>0&&t.some((e=>Date.parse(r)===Date.parse(e.toISOString()))),b=e.length>0&&t[0].toISOString()===r,w=e.length>1&&t[t.length-1].toISOString()===r,y=""+(m&&g&&v?"Today's date, ":"")+Wo(n,"PPPP");h.push(ee`<td
|
|
2344
2358
|
key=${l}
|
|
2345
2359
|
data-date=${r}
|
|
2346
2360
|
data-day=${d}
|
|
@@ -2610,7 +2624,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2610
2624
|
></sgds-datepicker-calendar>
|
|
2611
2625
|
</ul>
|
|
2612
2626
|
</div>
|
|
2613
|
-
`}}Jr.styles=[...Qi.styles,ea,Qr],Jr.dependencies={"sgds-datepicker-input":Xr,"sgds-datepicker-calendar":ar,"sgds-datepicker-header":cr,"sgds-button":ma,"sgds-icon-button":lr},t([Je({type:Boolean,reflect:!0})],Jr.prototype,"required",void 0),t([Je({reflect:!0})],Jr.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Jr.prototype,"disabled",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"value",void 0),t([Je({type:Array,reflect:!0})],Jr.prototype,"initialValue",void 0),t([Je({type:String})],Jr.prototype,"minDate",void 0),t([Je({type:String})],Jr.prototype,"maxDate",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"mode",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Jr.prototype,"hasFeedback",void 0),t([Je({reflect:!0})],Jr.prototype,"label",void 0),t([Je({reflect:!0})],Jr.prototype,"hintText",void 0),t([Je({type:Boolean,reflect:!0,state:!1})],Jr.prototype,"noFlip",void 0),t([Je({type:String,reflect:!0,state:!1})],Jr.prototype,"drop",void 0),t([Je({attribute:!1})],Jr.prototype,"displayDate",void 0),t([Ia()],Jr.prototype,"defaultValue",void 0),t([et()],Jr.prototype,"invalid",void 0),t([et()],Jr.prototype,"view",void 0),t([et()],Jr.prototype,"selectedDateRange",void 0),t([et()],Jr.prototype,"focusedDate",void 0),t([et()],Jr.prototype,"focusedTabIndex",void 0),t([at("sgds-datepicker-calendar")],Jr.prototype,"calendar",void 0),t([at("sgds-datepicker-input")],Jr.prototype,"datepickerInputAsync",void 0),t([it("sgds-datepicker-input")],Jr.prototype,"datepickerInput",void 0),t([Dt("value",{waitUntilFirstUpdate:!0})],Jr.prototype,"_handleValueChange",null);var el=Me`:host([bordered][islastchild]) .container:last-child{border-bottom:none}
|
|
2627
|
+
`}}Jr.styles=[...Qi.styles,ea,Qr],Jr.dependencies={"sgds-datepicker-input":Xr,"sgds-datepicker-calendar":ar,"sgds-datepicker-header":cr,"sgds-button":ma,"sgds-icon-button":lr},t([Je({type:Boolean,reflect:!0})],Jr.prototype,"required",void 0),t([Je({reflect:!0})],Jr.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Jr.prototype,"disabled",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"value",void 0),t([Je({type:Array,reflect:!0})],Jr.prototype,"initialValue",void 0),t([Je({type:String})],Jr.prototype,"minDate",void 0),t([Je({type:String})],Jr.prototype,"maxDate",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"mode",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Jr.prototype,"hasFeedback",void 0),t([Je({reflect:!0})],Jr.prototype,"label",void 0),t([Je({reflect:!0})],Jr.prototype,"hintText",void 0),t([Je({type:Boolean,reflect:!0,state:!1})],Jr.prototype,"noFlip",void 0),t([Je({type:String,reflect:!0,state:!1})],Jr.prototype,"drop",void 0),t([Je({attribute:!1})],Jr.prototype,"displayDate",void 0),t([Ia()],Jr.prototype,"defaultValue",void 0),t([et()],Jr.prototype,"invalid",void 0),t([et()],Jr.prototype,"view",void 0),t([et()],Jr.prototype,"selectedDateRange",void 0),t([et()],Jr.prototype,"focusedDate",void 0),t([et()],Jr.prototype,"focusedTabIndex",void 0),t([at("sgds-datepicker-calendar")],Jr.prototype,"calendar",void 0),t([at("sgds-datepicker-input")],Jr.prototype,"datepickerInputAsync",void 0),t([it("sgds-datepicker-input")],Jr.prototype,"datepickerInput",void 0),t([Dt("value",{waitUntilFirstUpdate:!0})],Jr.prototype,"_handleValueChange",null);var el=Me`:host([bordered][islastchild]) .container:last-child{border-bottom:none}.container{align-items:flex-start;border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:flex;flex-direction:column;gap:var(--sgds-gap-xs);justify-content:flex-start;padding:var(--sgds-padding-lg) var(--sgds-padding-xl)}.data-container,.label-container{flex:1}.label-container{max-width:var(--sgds-dimension-280)}.label{color:var(--sgds-color-default);font-weight:var(--sgds-font-weight-semibold)}.data,.label{font-size:var(--sgds-font-size-2)}.data{color:var(--sgds-color-subtle);font-weight:var(--sgds-font-weight-regular);margin:0}@media (min-width:512px){:host(:not([stacked])) .container{flex-direction:row}}`;let tl=0;class sl extends lt{constructor(){super(...arguments),this.attrId=++tl,this.componentId=`sgds-description-list-${this.attrId}`,this.stacked=!1,this.bordered=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","listitem")}render(){return ee`
|
|
2614
2628
|
<div class="container">
|
|
2615
2629
|
<div class="label-container">
|
|
2616
2630
|
<span class="label">
|
|
@@ -2787,7 +2801,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2787
2801
|
</slot>
|
|
2788
2802
|
</div>
|
|
2789
2803
|
</${e}>
|
|
2790
|
-
`}}wl.styles=[..._a.styles,bl],t([nt({slot:"icon",flatten:!0})],wl.prototype,"_iconNode",void 0),t([nt({slot:"upper",flatten:!0})],wl.prototype,"_upperNode",void 0),t([ot({slot:"footer"})],wl.prototype,"footerNode",void 0),t([ot({slot:"link"})],wl.prototype,"linkNode",void 0),t([Je({type:Boolean,reflect:!0})],wl.prototype,"noPadding",void 0);var yl=Me`slot{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot::slotted(*){align-items:flex-start;display:flex;gap:var(--sgds-gap-xs)}.sm{font-size:var(--sgds-font-size-1)}.lg{font-size:var(--sgds-font-size-3)}`;class xl extends lt{constructor(){super(...arguments),this.role="list",this.size="md"}render(){return ee`
|
|
2804
|
+
`}}wl.styles=[..._a.styles,bl],t([nt({slot:"icon",flatten:!0})],wl.prototype,"_iconNode",void 0),t([nt({slot:"upper",flatten:!0})],wl.prototype,"_upperNode",void 0),t([ot({slot:"footer"})],wl.prototype,"footerNode",void 0),t([ot({slot:"link"})],wl.prototype,"linkNode",void 0),t([Je({type:Boolean,reflect:!0})],wl.prototype,"noPadding",void 0);var yl=Me`slot{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot::slotted(*){align-items:flex-start;display:flex;gap:var(--sgds-gap-xs)}.sm{font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20)}.lg{font-size:var(--sgds-font-size-3);line-height:var(--sgds-line-height-32)}`;class xl extends lt{constructor(){super(...arguments),this.role="list",this.size="md"}render(){return ee`
|
|
2791
2805
|
<div class=${bt({[this.size]:this.size})}>
|
|
2792
2806
|
<slot></slot>
|
|
2793
2807
|
</div>
|
|
@@ -2855,7 +2869,7 @@ class Sl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2855
2869
|
* @license
|
|
2856
2870
|
* Copyright 2022 Google LLC
|
|
2857
2871
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2858
|
-
*/function Vl({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer((function(){new Sl(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})})):s.constructor.addInitializer((s=>{new Sl(s,{context:e,callback:e=>{s[i]=e},subscribe:t})}))}}const El=1024,Il="mainnav-context",Bl="mainnav-expanded-context";var Pl=Me`:host{position:relative;z-index:1200}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);justify-content:space-between;margin:auto;max-width:var(--sgds-mainnav-max-width);min-height:80px;padding:0 var(--sgds-mainnav-padding-x);position:relative;width:100%}@media screen and (max-width:
|
|
2872
|
+
*/function Vl({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer((function(){new Sl(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})})):s.constructor.addInitializer((s=>{new Sl(s,{context:e,callback:e=>{s[i]=e},subscribe:t})}))}}const El=1024,Il="mainnav-context",Bl="mainnav-expanded-context";var Pl=Me`:host{position:relative;z-index:1200}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);justify-content:space-between;margin:auto;max-width:var(--sgds-mainnav-max-width);min-height:80px;padding:0 var(--sgds-mainnav-padding-x);position:relative;width:100%}@media screen and (max-width:767px){.navbar{padding:0 var(--sgds-mainnav-mobile-padding-x)}}.navbar-brand{align-items:center;display:flex;text-decoration:none;white-space:nowrap}.navbar-brand:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.navbar-nav{display:flex;flex-direction:column;height:100%;margin-bottom:0;margin-top:0;width:100%}nav>.navbar-body .navbar-nav{height:100dvh}nav>.navbar-body{background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08);padding:var(--sgds-padding-md) 0;position:absolute;transition:transform .2s ease-in-out;width:100%;z-index:2000}nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}@media screen and (max-width:767px){nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}.navbar-collapse{align-items:center;flex-basis:100%;flex-grow:1}.navbar-toggler{align-self:center}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-nav-scroll{overflow-y:auto}@media (min-width:512px){.navbar-expand-sm{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:1024px){.navbar-expand-lg{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1280px){.navbar-expand-xl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .nav-link{padding-left:var(--mainnav-nav-link-padding-x);padding-right:var(--mainnav-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1440px){.navbar-expand-xxl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}slot[name=non-collapsible]{align-items:center;display:flex;gap:var(--sgds-spacer-4);margin-left:auto}.slot-end{align-items:stretch;display:flex;gap:var(--sgds-gap-xs);margin-left:auto}.slot-end::slotted(:not([name$=-mainnav-item]):not([name$=-mainnav-dropdown])){align-self:center}`;const Tl={sm:512,md:768,lg:El,xl:1280,xxl:1440,never:1/0,always:-1};class Ll extends lt{constructor(){super(...arguments),this._breakpointReached=!1,this.expanded=!1,this.expanding=!1,this.brandHref="",this.collapseId=Xi("mainnav","collapse"),this.expand="lg",this.breakpointReached=!1,this._handleMobileNavBound=this._handleMobileNav.bind(this)}get defaultSlotItems(){return[...this.defaultNodes||[]].filter((e=>void 0!==e.tagName))}get endSlotItems(){return[...this.endNodes||[]].filter((e=>void 0!==e.tagName))}connectedCallback(){super.connectedCallback(),this._handleResize(),window.addEventListener("click",(e=>this._handleClickOutOfElement(e,this.body))),window.addEventListener("resize",this._handleResize.bind(this))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("click",(e=>this._handleClickOutOfElement(e,this.body))),window.removeEventListener("resize",this._handleResize.bind(this))}firstUpdated(e){super.firstUpdated(e),this.breakpointReached&&this.body&&(this.expanded=!1,this.body.hidden=!0,this._handleMobileNav(),this._breakpointReached=!0);[...this.defaultSlotItems,...this.endSlotItems].forEach((e=>{e.setAttribute("expand",this.expand)}))}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.header)||this.hide()}_handleSummaryClick(){this.expanded?this.hide():(document.querySelector("body").style.overflow="hidden",this.show())}_handleResize(){const e=window.innerWidth<Tl[this.expand];e!==this.breakpointReached?this.requestUpdate():(this.body&&(this.body.hidden=!0),this.expanding=!1),e?(this._handleMobileNav(),this._breakpointReached||(this._breakpointReached=!0,window.addEventListener("scrollend",this._handleMobileNavBound))):(this._handleDesktopNav(),this._breakpointReached=!1,window.removeEventListener("scrollend",this._handleMobileNavBound))}async _handleMobileNav(){if(!this.nav)return;this.nav.appendChild(this.body),await customElements.whenDefined("sgds-masthead");const{bottom:e}=this.nav.getBoundingClientRect(),t=parseFloat(getComputedStyle(this.body).paddingTop)+parseFloat(getComputedStyle(this.body).paddingBottom);this.navScroll.style.maxHeight=`calc(100dvh - ${e}px - ${t}px)`}_handleDesktopNav(){var e;null===(e=this.navbar)||void 0===e||e.insertBefore(this.body,this.nonCollapsibleSlot)}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!1);await kt(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=St(this,"mainnav.show");await wt(this.body,xt(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!0);await kt(this.body);const{keyframes:e,options:t}=St(this,"mainnav.hide");await wt(this.body,xt(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}async handleOpenChange(){this.expanding?(await this._animateToShow(),this.expanded=!0):(this.header.focus(),await this._animateToHide(),this.expanded=!1)}async show(){if(!this.expanded)return this.expanding=!0,$t(this,"sgds-after-show")}async hide(){if(this.expanded)return this.expanding=!1,document.querySelector("body").style.removeProperty("overflow"),$t(this,"sgds-after-hide")}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach((e=>{e.setAttribute("name",e.tagName.toLowerCase())}))}render(){return this.breakpointReached=window.innerWidth<Tl[this.expand],ee`
|
|
2859
2873
|
<nav>
|
|
2860
2874
|
<div class="navbar ${this._expandClass()}">
|
|
2861
2875
|
<a class="navbar-brand" href=${this.brandHref} aria-label="brand-link">
|
|
@@ -2919,7 +2933,7 @@ class Sl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2919
2933
|
<sgds-icon name="chevron-down"></sgds-icon>
|
|
2920
2934
|
</a>
|
|
2921
2935
|
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
|
|
2922
|
-
</sgds-dropdown>`;return this._breakpointReached?e:t}}Hl.styles=[...lt.styles,ta,ea,Fl],Hl.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":Nt},t([Vl({context:Il,subscribe:!0}),et()],Hl.prototype,"_breakpointReached",void 0),t([Vl({context:Bl,subscribe:!0}),et()],Hl.prototype,"expanded",void 0),t([it(".nav-link")],Hl.prototype,"navLink",void 0),t([it(".dropdown-items")],Hl.prototype,"dropdownItems",void 0),t([it(".dropdown-items a")],Hl.prototype,"menuHeaderButton",void 0),t([it(".dropdown-items span")],Hl.prototype,"menuHeaderText",void 0),t([Je({type:Boolean})],Hl.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Hl.prototype,"disabled",void 0),t([ot({slot:"toggler"})],Hl.prototype,"togglerNodes",void 0),t([ot()],Hl.prototype,"defaultNodes",void 0);var zl=Me`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:flex;height:auto!important;min-height:100%;padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x);text-decoration:none!important;text-decoration:none}@media screen and (max-width:767px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default));outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Rl extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter((e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase()));if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}}))}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",(e=>{e.target.closest("sgds-mainnav").hide()}))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}Rl.styles=[...lt.styles,zl],t([Je({type:Boolean,reflect:!0})],Rl.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Rl.prototype,"disabled",void 0),t([Dt("disabled")],Rl.prototype,"_handleDisabled",null);var Ol=Me`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:var(--sgds-icon-size-sm)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-sm)!important}a:hover{color:#0022b9}.sgds-masthead{font-family:Inter,system-ui,sans-serif;font-size:.75rem;line-height:1rem}.banner{background-color:light-dark(#f3f3f3,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-padding-x,2rem);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .25rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0269d0,#60aaf4);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0151a0,#96c7f7)}.panel{background-color:light-dark(oklch(from #0e0e0e l c h/.1),oklch(from #fff l c h/.1))}.sgds-masthead .sgds-masthead-content{display:none;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content.show{display:block}.content-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#525252,#a5a5a5)}.banner-icon,.banner-icon-inline{height:16px;width:16px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#1a1a1a,#f3f3f3)}a.trusted-websites-link{color:light-dark(#0269d0,#60aaf4);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0151a0,#96c7f7)}.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus-visible{outline:4px solid #60aaf4}@media screen and (max-width:768px){.container{padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem)}.sgds-masthead-content .content-grid{gap:1rem;grid-template-columns:1fr}}`,Nl=Me`svg{vertical-align:middle}`;class Ul extends lt{constructor(){super(...arguments),this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
2936
|
+
</sgds-dropdown>`;return this._breakpointReached?e:t}}Hl.styles=[...lt.styles,ta,ea,Fl],Hl.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":Nt},t([Vl({context:Il,subscribe:!0}),et()],Hl.prototype,"_breakpointReached",void 0),t([Vl({context:Bl,subscribe:!0}),et()],Hl.prototype,"expanded",void 0),t([it(".nav-link")],Hl.prototype,"navLink",void 0),t([it(".dropdown-items")],Hl.prototype,"dropdownItems",void 0),t([it(".dropdown-items a")],Hl.prototype,"menuHeaderButton",void 0),t([it(".dropdown-items span")],Hl.prototype,"menuHeaderText",void 0),t([Je({type:Boolean})],Hl.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Hl.prototype,"disabled",void 0),t([ot({slot:"toggler"})],Hl.prototype,"togglerNodes",void 0),t([ot()],Hl.prototype,"defaultNodes",void 0);var zl=Me`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:flex;height:auto!important;min-height:100%;padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x);text-decoration:none!important;text-decoration:none}@media screen and (max-width:767px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default));outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Rl extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter((e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase()));if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}}))}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",(e=>{e.target.closest("sgds-mainnav").hide()}))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}Rl.styles=[...lt.styles,zl],t([Je({type:Boolean,reflect:!0})],Rl.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Rl.prototype,"disabled",void 0),t([Dt("disabled")],Rl.prototype,"_handleDisabled",null);var Ol=Me`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:var(--sgds-icon-size-sm)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-sm)!important}a:hover{color:#0022b9}.sgds-masthead{font-family:Inter,system-ui,sans-serif;font-size:.75rem;line-height:1rem}.banner{background-color:light-dark(#f3f3f3,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-padding-x,2rem);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .25rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0269d0,#60aaf4);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0151a0,#96c7f7)}.panel{background-color:light-dark(oklch(from #0e0e0e l c h/.1),oklch(from #fff l c h/.1))}.sgds-masthead .sgds-masthead-content{display:none;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content.show{display:block}.content-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#525252,#a5a5a5)}.banner-icon,.banner-icon-inline{height:16px;width:16px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#1a1a1a,#f3f3f3)}a.trusted-websites-link{color:light-dark(#0269d0,#60aaf4);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0151a0,#96c7f7)}.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus-visible{outline:4px solid #60aaf4}@media screen and (max-width:767px){.container{padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem)}.sgds-masthead-content .content-grid{gap:1rem;grid-template-columns:1fr}}`,Nl=Me`svg{vertical-align:middle}`;class Ul extends lt{constructor(){super(...arguments),this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
2923
2937
|
<div
|
|
2924
2938
|
id="sgds-masthead"
|
|
2925
2939
|
class="sgds-masthead"
|