@govtechsg/sgds-web-component 3.6.0 → 3.6.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/base/dropdown-element.d.ts +1 -1
- package/base/dropdown-element.js +3 -3
- package/base/dropdown-element.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +7 -7
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Checkbox/checkbox.js +1 -1
- package/components/Checkbox/index.umd.min.js +6 -6
- package/components/Checkbox/index.umd.min.js.map +1 -1
- package/components/Checkbox/sgds-checkbox.js +1 -1
- package/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +274 -260
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/ComboBox/sgds-combo-box-option.d.ts +0 -3
- package/components/ComboBox/sgds-combo-box-option.js +2 -20
- 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 +79 -24
- 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/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Footer/index.umd.min.js +1 -1
- package/components/Footer/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/Link/index.umd.min.js +9 -9
- package/components/Link/index.umd.min.js.map +1 -1
- package/components/Link/link.js +1 -1
- package/components/Mainnav/index.umd.min.js +1 -1
- package/components/Mainnav/index.umd.min.js.map +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/Radio/index.umd.min.js +6 -6
- package/components/Radio/index.umd.min.js.map +1 -1
- package/components/Radio/radio.js +1 -1
- package/components/Select/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Switch/index.umd.min.js +1 -1
- package/components/Switch/index.umd.min.js.map +1 -1
- package/components/Switch/switch.js +1 -1
- package/components/SystemBanner/index.umd.min.js +5 -1
- package/components/SystemBanner/index.umd.min.js.map +1 -1
- package/components/SystemBanner/sgds-system-banner.js +5 -1
- package/components/SystemBanner/sgds-system-banner.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 +33 -14
- package/components/index.umd.min.js.map +1 -1
- package/index.umd.min.js +33 -14
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/dropdown-element.cjs.js +3 -3
- package/react/base/dropdown-element.cjs.js.map +1 -1
- package/react/base/dropdown-element.js +3 -3
- package/react/base/dropdown-element.js.map +1 -1
- package/react/components/Checkbox/checkbox.cjs.js +1 -1
- package/react/components/Checkbox/checkbox.js +1 -1
- package/react/components/Checkbox/sgds-checkbox.cjs.js +1 -1
- package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.js +1 -1
- package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box-option.cjs.js +2 -20
- package/react/components/ComboBox/sgds-combo-box-option.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box-option.js +2 -20
- package/react/components/ComboBox/sgds-combo-box-option.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js +79 -24
- package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.js +79 -24
- package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/react/components/Link/link.cjs.js +1 -1
- package/react/components/Link/link.js +1 -1
- package/react/components/Radio/radio.cjs.js +1 -1
- package/react/components/Radio/radio.js +1 -1
- package/react/components/Switch/switch.cjs.js +1 -1
- package/react/components/Switch/switch.js +1 -1
- package/react/components/SystemBanner/sgds-system-banner.cjs.js +5 -1
- package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -1
- package/react/components/SystemBanner/sgds-system-banner.js +5 -1
- package/react/components/SystemBanner/sgds-system-banner.js.map +1 -1
- package/react/styles/form-check.cjs.js +1 -1
- package/react/styles/form-check.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-check.js +1 -1
- package/styles/form-text-control.js +1 -1
|
@@ -2064,7 +2064,7 @@ const qt=e=>e??ie;var Yt=Me`:host{cursor:pointer;display:inline-block}.alert-lin
|
|
|
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":Ht,"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([At("show")],Ki.prototype,"_handleShowChange",null),t([At("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`
|
|
2067
|
+
>`:this._renderBadge():ie}}Ki.styles=[...lt.styles,Kt],Ki.dependencies={"sgds-close-button":Ht,"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([At("show")],Ki.prototype,"_handleShowChange",null),t([At("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(!0))}}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(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),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"
|
|
@@ -2099,7 +2099,7 @@ const qt=e=>e??ie;var Yt=Me`:host{cursor:pointer;display:inline-block}.alert-lin
|
|
|
2099
2099
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2100
2100
|
</div>
|
|
2101
2101
|
</div>
|
|
2102
|
-
`}}ra.styles=[...lt.styles,na],ra.dependencies={"sgds-overflow-menu":oa},t([Je({type:String})],ra.prototype,"ariaLabel",void 0),t([it("slot")],ra.prototype,"defaultSlot",void 0);var la=Me`:host{--color-emphasis:var(--sgds-link-color-emphasis);display:inline-flex;vertical-align:middle}:host([tone=danger]),:host([variant=danger]){--color-emphasis:var(--sgds-danger-color-emphasis)}:host([tone=neutral]),:host([variant=neutral]){--color-emphasis:var(--sgds-color-default)}:host([tone=fixed-light]),:host([variant=light]){--color-emphasis:var(--sgds-color-fixed-light)}:host([variant=dark]) :host([tone=fixed-dark]){--color-emphasis:var(--sgds-color-fixed-dark)}:host([tone=danger]) .nav-link::slotted(a),:host([variant=danger]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-danger-color-default);color:var(--sgds-link-color-default,--sgds-danger-color-default)}:host([tone=danger]) .nav-link::slotted(a:focus),:host([tone=danger]) .nav-link::slotted(a:focus-visible),:host([tone=danger]) .nav-link::slotted(a:hover),:host([variant=danger]) .nav-link::slotted(a:focus),:host([variant=danger]) .nav-link::slotted(a:focus-visible),:host([variant=danger]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-danger-color-emphasis);color:var(--color-emphasis,--sgds-danger-color-emphasis)}:host([tone=neutral]) .nav-link::slotted(a),:host([variant=neutral]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default)}:host([tone=neutral]) .nav-link::slotted(a:focus),:host([tone=neutral]) .nav-link::slotted(a:focus-visible),:host([tone=neutral]) .nav-link::slotted(a:hover),:host([variant=neutral]) .nav-link::slotted(a:focus),:host([variant=neutral]) .nav-link::slotted(a:focus-visible),:host([variant=neutral]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-default);color:var(--color-emphasis,--sgds-color-default)}:host([tone=fixed-light]) .nav-link::slotted(a),:host([variant=light]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-color-fixed-light)}:host([tone=fixed-light]) .nav-link::slotted(a:focus),:host([tone=fixed-light]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-light]) .nav-link::slotted(a:hover),:host([variant=light]) .nav-link::slotted(a:focus),:host([variant=light]) .nav-link::slotted(a:focus-visible),:host([variant=light]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-light);color:var(--color-emphasis,--sgds-color-fixed-light)}:host([tone=fixed-dark]) .nav-link::slotted(a),:host([variant=dark]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-default,--sgds-color-fixed-dark)}:host([tone=fixed-dark]) .nav-link::slotted(a:focus),:host([tone=fixed-dark]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-dark]) .nav-link::slotted(a:hover),:host([variant=dark]) .nav-link::slotted(a:focus),:host([variant=dark]) .nav-link::slotted(a:focus-visible),:host([variant=dark]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-dark);color:var(--color-emphasis,--sgds-color-fixed-dark)}:host([size=md]) .nav-link::slotted(a){--text-underline-offset:3px;font-size:var(--sgds-font-size-2)!important;line-height:var(--sgds-line-height-24)!important}:host([size=lg]) .nav-link::slotted(a){--text-underline-offset:4px;font-size:var(--sgds-font-size-3)!important;line-height:var(--sgds-line-height-32)!important}:host([size=sm]) .nav-link::slotted(a){--text-underline-offset:2.8px;font-size:var(--sgds-font-size-1)!important;line-height:var(--sgds-line-height-20)!important}:host([size=xs]) .nav-link::slotted(a){--text-underline-offset:2.2px;font-size:var(--sgds-font-size-0)!important;line-height:var(--sgds-line-height-16)!important}.nav-link::slotted(a):after{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important}:host([size=xs]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-sm)!important;width:var(--sgds-icon-size-sm)!important}:host([size=sm]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-md)!important;width:var(--sgds-icon-size-md)!important}:host([size=md]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-lg)!important;width:var(--sgds-icon-size-lg)!important}:host([size=lg]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-xl)!important;width:var(--sgds-icon-size-xl)!important}::slotted(*){align-items:center;display:flex}.nav-link::slotted(a:focus-visible:not([disabled])){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link::slotted(a[disabled]){cursor:not-allowed;opacity:var(--sgds-opacity-50)}.nav-link::slotted(a){color:var(--sgds-link-color-default);cursor:pointer}:host(:not([active])) .nav-link::slotted(a:not(:hover)){text-decoration:underline solid transparent!important;text-underline-offset:0;transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible),.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){color:var(--color-emphasis)!important}.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){text-decoration-color:var(--color-emphasis)!important;text-underline-offset:var(--text-underline-offset);transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a[disabled]),:host([disabled]) .nav-link::slotted(a){text-decoration:none!important}@media (prefers-reduced-motion:reduce){.nav-link::slotted(a:hover),:host(:not([active])) .nav-link::slotted(a:not(:hover)),:host([active]) .nav-link::slotted(a){transition:none}}`;class da extends lt{constructor(){super(...arguments),this.size="md",this.variant="primary",this.tone="primary",this.active=!1,this.disabled=!1}_processAnchor(e){this.disabled&&e.setAttribute("disabled","true"),e.hasAttribute("disabled")?(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1")):e.setAttribute("tabindex","0")}_processIcon(e){const t={xs:"sm",sm:"md",md:"lg",lg:"xl"};e.querySelectorAll("sgds-icon").forEach((e=>{e.setAttribute("size",t[this.size]),e.classList.remove("icon-left","icon-right"),e.previousElementSibling||e.previousSibling||e.classList.add("icon-left"),e.nextElementSibling||e.nextSibling||e.classList.add("icon-right")}))}_handleSlotChange(e){const t=e.target.assignedElements().find((e=>"a"===e.tagName.toLowerCase()));t&&(this._processAnchor(t),this._processIcon(t))}firstUpdated(e){super.firstUpdated(e);const t=this.querySelector("a");t&&(this._processAnchor(t),this._processIcon(t))}render(){return ee`<slot class="nav-link " @slotchange=${this._handleSlotChange}></slot> `}}da.styles=[...lt.styles,la],t([Je({type:String,reflect:!0})],da.prototype,"size",void 0),t([Je({type:String,reflect:!0})],da.prototype,"variant",void 0),t([Je({type:String,reflect:!0})],da.prototype,"tone",void 0),t([Je({type:Boolean,reflect:!0})],da.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],da.prototype,"disabled",void 0);var ca=Me`:host{align-items:center;display:flex;gap:var(--sgds-gap-xs)}:host([active]) .nav-link::slotted(*){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default);pointer-events:none}:host([active]) .nav-link::slotted(:focus),:host([active]) .nav-link::slotted(:focus-visible),:host([active]) .nav-link::slotted(:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}.separator svg{display:block}:host(:last-of-type) .separator{display:none}`;class ha extends lt{constructor(){super(...arguments),this.active=!1}render(){return ee`
|
|
2102
|
+
`}}ra.styles=[...lt.styles,na],ra.dependencies={"sgds-overflow-menu":oa},t([Je({type:String})],ra.prototype,"ariaLabel",void 0),t([it("slot")],ra.prototype,"defaultSlot",void 0);var la=Me`:host{--color-emphasis:var(--sgds-link-color-emphasis);display:inline-flex;vertical-align:middle}:host([tone=danger]),:host([variant=danger]){--color-emphasis:var(--sgds-danger-color-emphasis)}:host([tone=neutral]),:host([variant=neutral]){--color-emphasis:var(--sgds-color-default)}:host([tone=fixed-light]),:host([variant=light]){--color-emphasis:var(--sgds-color-fixed-light)}:host([variant=dark]) :host([tone=fixed-dark]){--color-emphasis:var(--sgds-color-fixed-dark)}:host([tone=danger]) .nav-link::slotted(a),:host([variant=danger]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-danger-color-default);color:var(--sgds-link-color-default,--sgds-danger-color-default)}:host([tone=danger]) .nav-link::slotted(a:focus),:host([tone=danger]) .nav-link::slotted(a:focus-visible),:host([tone=danger]) .nav-link::slotted(a:hover),:host([variant=danger]) .nav-link::slotted(a:focus),:host([variant=danger]) .nav-link::slotted(a:focus-visible),:host([variant=danger]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-danger-color-emphasis);color:var(--color-emphasis,--sgds-danger-color-emphasis)}:host([tone=neutral]) .nav-link::slotted(a),:host([variant=neutral]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default)}:host([tone=neutral]) .nav-link::slotted(a:focus),:host([tone=neutral]) .nav-link::slotted(a:focus-visible),:host([tone=neutral]) .nav-link::slotted(a:hover),:host([variant=neutral]) .nav-link::slotted(a:focus),:host([variant=neutral]) .nav-link::slotted(a:focus-visible),:host([variant=neutral]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-default);color:var(--color-emphasis,--sgds-color-default)}:host([tone=fixed-light]) .nav-link::slotted(a),:host([variant=light]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-color-fixed-light)}:host([tone=fixed-light]) .nav-link::slotted(a:focus),:host([tone=fixed-light]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-light]) .nav-link::slotted(a:hover),:host([variant=light]) .nav-link::slotted(a:focus),:host([variant=light]) .nav-link::slotted(a:focus-visible),:host([variant=light]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-light);color:var(--color-emphasis,--sgds-color-fixed-light)}:host([tone=fixed-dark]) .nav-link::slotted(a),:host([variant=dark]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-default,--sgds-color-fixed-dark)}:host([tone=fixed-dark]) .nav-link::slotted(a:focus),:host([tone=fixed-dark]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-dark]) .nav-link::slotted(a:hover),:host([variant=dark]) .nav-link::slotted(a:focus),:host([variant=dark]) .nav-link::slotted(a:focus-visible),:host([variant=dark]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-dark);color:var(--color-emphasis,--sgds-color-fixed-dark)}:host([size=md]) .nav-link::slotted(a){--text-underline-offset:3px;font-size:var(--sgds-font-size-2)!important;line-height:var(--sgds-line-height-24)!important}:host([size=lg]) .nav-link::slotted(a){--text-underline-offset:4px;font-size:var(--sgds-font-size-3)!important;line-height:var(--sgds-line-height-32)!important}:host([size=sm]) .nav-link::slotted(a){--text-underline-offset:2.8px;font-size:var(--sgds-font-size-1)!important;line-height:var(--sgds-line-height-20)!important}:host([size=xs]) .nav-link::slotted(a){--text-underline-offset:2.2px;font-size:var(--sgds-font-size-0)!important;line-height:var(--sgds-line-height-16)!important}.nav-link::slotted(a):after{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important}:host([size=xs]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-sm)!important;width:var(--sgds-icon-size-sm)!important}:host([size=sm]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-md)!important;width:var(--sgds-icon-size-md)!important}:host([size=md]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-lg)!important;width:var(--sgds-icon-size-lg)!important}:host([size=lg]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-xl)!important;width:var(--sgds-icon-size-xl)!important}::slotted(*){align-items:center;display:flex}.nav-link::slotted(a:focus-visible:not([disabled])){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link::slotted(a[disabled]){cursor:not-allowed;opacity:var(--sgds-opacity-50)}.nav-link::slotted(a){color:var(--sgds-link-color-default)!important;cursor:pointer}:host(:not([active])) .nav-link::slotted(a:not(:hover)){text-decoration:underline solid transparent!important;text-underline-offset:0;transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible),.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){color:var(--color-emphasis)!important}.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){text-decoration-color:var(--color-emphasis)!important;text-underline-offset:var(--text-underline-offset);transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a[disabled]),:host([disabled]) .nav-link::slotted(a){text-decoration:none!important}@media (prefers-reduced-motion:reduce){.nav-link::slotted(a:hover),:host(:not([active])) .nav-link::slotted(a:not(:hover)),:host([active]) .nav-link::slotted(a){transition:none}}`;class da extends lt{constructor(){super(...arguments),this.size="md",this.variant="primary",this.tone="primary",this.active=!1,this.disabled=!1}_processAnchor(e){this.disabled&&e.setAttribute("disabled","true"),e.hasAttribute("disabled")?(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1")):e.setAttribute("tabindex","0")}_processIcon(e){const t={xs:"sm",sm:"md",md:"lg",lg:"xl"};e.querySelectorAll("sgds-icon").forEach((e=>{e.setAttribute("size",t[this.size]),e.classList.remove("icon-left","icon-right"),e.previousElementSibling||e.previousSibling||e.classList.add("icon-left"),e.nextElementSibling||e.nextSibling||e.classList.add("icon-right")}))}_handleSlotChange(e){const t=e.target.assignedElements().find((e=>"a"===e.tagName.toLowerCase()));t&&(this._processAnchor(t),this._processIcon(t))}firstUpdated(e){super.firstUpdated(e);const t=this.querySelector("a");t&&(this._processAnchor(t),this._processIcon(t))}render(){return ee`<slot class="nav-link " @slotchange=${this._handleSlotChange}></slot> `}}da.styles=[...lt.styles,la],t([Je({type:String,reflect:!0})],da.prototype,"size",void 0),t([Je({type:String,reflect:!0})],da.prototype,"variant",void 0),t([Je({type:String,reflect:!0})],da.prototype,"tone",void 0),t([Je({type:Boolean,reflect:!0})],da.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],da.prototype,"disabled",void 0);var ca=Me`:host{align-items:center;display:flex;gap:var(--sgds-gap-xs)}:host([active]) .nav-link::slotted(*){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default);pointer-events:none}:host([active]) .nav-link::slotted(:focus),:host([active]) .nav-link::slotted(:focus-visible),:host([active]) .nav-link::slotted(:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}.separator svg{display:block}:host(:last-of-type) .separator{display:none}`;class ha extends lt{constructor(){super(...arguments),this.active=!1}render(){return ee`
|
|
2103
2103
|
<sgds-link><slot class="nav-link"></slot></sgds-link>
|
|
2104
2104
|
<div class="separator">
|
|
2105
2105
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
@@ -2173,7 +2173,7 @@ const qt=e=>e??ie;var Yt=Me`:host{cursor:pointer;display:inline-block}.alert-lin
|
|
|
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)}`,Aa=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)}`,Da=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,Aa,Da,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)}`,Aa=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)}`,Da=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,Aa,Da,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]{--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: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]{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{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})}
|
|
@@ -2188,7 +2188,7 @@ class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==v
|
|
|
2188
2188
|
@change=${e=>this._handleChange(e)}
|
|
2189
2189
|
@keydown=${this._handleKeyDown}
|
|
2190
2190
|
@invalid=${e=>this._handleInvalid(e)}
|
|
2191
|
-
|
|
2191
|
+
?checked=${Ma(this.checked)}
|
|
2192
2192
|
.disabled=${this.disabled}
|
|
2193
2193
|
.required=${this.required}
|
|
2194
2194
|
@blur=${this._handleBlur}
|
|
@@ -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([At("value",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleValueChange",null),t([At("_isTouched",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleIsTouched",null),t([At("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([At("value",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleValueChange",null),t([At("_isTouched",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleIsTouched",null),t([At("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-color-subtle);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>
|
|
@@ -2264,21 +2264,21 @@ class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==v
|
|
|
2264
2264
|
${this._renderItemContent()}
|
|
2265
2265
|
</div>
|
|
2266
2266
|
`}}Ua.styles=[Na],t([Je({type:Boolean,reflect:!0})],Ua.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Ua.prototype,"disabled",void 0),t([Je({type:String,reflect:!0})],Ua.prototype,"value",void 0);class qa extends Ua{constructor(){super(...arguments),this.checkbox=!1,this._renderItemContent=()=>this.checkbox?ee`
|
|
2267
|
-
<sgds-checkbox
|
|
2267
|
+
<sgds-checkbox .checked=${this.active} .disabled=${this.disabled}>
|
|
2268
2268
|
<slot></slot>
|
|
2269
2269
|
</sgds-checkbox>
|
|
2270
2270
|
`:ee`
|
|
2271
|
-
<div class="normal-item-content"
|
|
2271
|
+
<div class="normal-item-content">
|
|
2272
2272
|
<slot></slot>
|
|
2273
2273
|
${this.active?ee` <sgds-icon name="check"></sgds-icon> `:ie}
|
|
2274
2274
|
</div>
|
|
2275
|
-
`}connectedCallback(){super.connectedCallback()
|
|
2275
|
+
`}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e);const t=this.closest("sgds-combo-box");(null==t?void 0:t.multiSelect)&&(this.checkbox=!0)}}qa.dependencies={"sgds-icon":Ot,"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()
|
|
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 e=>{if(!e.detail.isOutside){(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=>{if(e.hasAttribute("disabled"))return!1;e.addEventListener("click",(e=>{e.preventDefault();const t=e.target;return this.multiSelect&&t.active?this._handleItemUnselect(e):this._handleItemSelected(e),!1})),e.addEventListener("keydown",(e=>{if("Enter"===e.key){this.close="outside";e.target.click()}}))})),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:""),this.options.forEach((e=>e.active=i.includes(e.value)))}async _handleInputChange(e){const t=e.target;this.displayValue=t.value,this.emit("sgds-input",{detail:{displayValue:this.displayValue}});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]),this.value=this.selectedItems.map((e=>e.value)).join(";"),a.active=!0):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,21 @@ 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-label="Clear selections"
|
|
2328
|
+
role="button"
|
|
2329
|
+
></sgds-icon>
|
|
2330
|
+
`:ie}
|
|
2331
|
+
|
|
2332
|
+
<sgds-icon name=${this.menuIsOpen?"chevron-up":"chevron-down"} size="md"></sgds-icon>
|
|
2319
2333
|
</div>
|
|
2320
2334
|
`}render(){return ee`
|
|
2321
2335
|
<div
|
|
@@ -2325,6 +2339,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
2339
|
${this._renderLabel()}
|
|
2326
2340
|
<!-- The input -->
|
|
2327
2341
|
${this._renderInput()} ${this._renderFeedback()}
|
|
2342
|
+
|
|
2328
2343
|
<ul id=${this.dropdownMenuId} class="dropdown-menu" part="menu" tabindex="-1" ${vs(this.menuRef)}>
|
|
2329
2344
|
<slot id="default" @slotchange=${this._handleDefaultSlotChange}
|
|
2330
2345
|
><div class="empty-menu">No options</div></slot
|
|
@@ -2340,7 +2355,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
2355
|
class="visually-hidden"
|
|
2341
2356
|
?required=${this.required}
|
|
2342
2357
|
/>`: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":Ot,"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([At("value",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleValueChange",null),t([At("optionList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleOptionListChange",null),t([At("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",Ao="evening",Do="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?Ao:i>=12?$o:i>=4?Mo:Do,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/,An=/^([+-])(\d{2}):(\d{2})|Z/,Dn=/^([+-])(\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(Dn,e);default:return In(An,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(Dn,e);default:return In(An,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
|
|
2358
|
+
`}}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":Ot,"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([At("value",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleValueChange",null),t([At("optionList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleOptionListChange",null),t([At("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",Ao="evening",Do="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?Ao:i>=12?$o:i>=4?Mo:Do,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/,An=/^([+-])(\d{2}):(\d{2})|Z/,Dn=/^([+-])(\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(Dn,e);default:return In(An,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(Dn,e);default:return In(An,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
2359
|
key=${l}
|
|
2345
2360
|
data-date=${r}
|
|
2346
2361
|
data-day=${d}
|
|
@@ -3312,7 +3327,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3312
3327
|
<div id="announcer" role="region" aria-live="assertive" class="visually-hidden">${this.value}</div>
|
|
3313
3328
|
${this._renderFeedback()}
|
|
3314
3329
|
</div>
|
|
3315
|
-
`}}ad.styles=[...Ea.styles,Va,Nl,za,id],ad.dependencies={"sgds-input":Kr,"sgds-icon-button":lr},t([it("sgds-icon-button[ariaLabel^='increase by']")],ad.prototype,"plusBtn",void 0),t([it("sgds-icon-button[ariaLabel^='decrease by']")],ad.prototype,"minusBtn",void 0),t([Je({type:Number,reflect:!0})],ad.prototype,"value",void 0),t([Je({type:Number})],ad.prototype,"step",void 0),t([Je({type:Number})],ad.prototype,"min",void 0),t([Je({type:Number})],ad.prototype,"max",void 0),t([Je({type:String,reflect:!0})],ad.prototype,"hasFeedback",void 0),t([Je({type:String,reflect:!0})],ad.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],ad.prototype,"readonly",void 0),t([Ia()],ad.prototype,"defaultValue",void 0),t([at("sgds-input")],ad.prototype,"_sgdsInput",void 0);var od=Me`:host{outline:0}.form-check-input[type=radio]{border-radius:50%}.form-check-input
|
|
3330
|
+
`}}ad.styles=[...Ea.styles,Va,Nl,za,id],ad.dependencies={"sgds-input":Kr,"sgds-icon-button":lr},t([it("sgds-icon-button[ariaLabel^='increase by']")],ad.prototype,"plusBtn",void 0),t([it("sgds-icon-button[ariaLabel^='decrease by']")],ad.prototype,"minusBtn",void 0),t([Je({type:Number,reflect:!0})],ad.prototype,"value",void 0),t([Je({type:Number})],ad.prototype,"step",void 0),t([Je({type:Number})],ad.prototype,"min",void 0),t([Je({type:Number})],ad.prototype,"max",void 0),t([Je({type:String,reflect:!0})],ad.prototype,"hasFeedback",void 0),t([Je({type:String,reflect:!0})],ad.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],ad.prototype,"readonly",void 0),t([Ia()],ad.prototype,"defaultValue",void 0),t([at("sgds-input")],ad.prototype,"_sgdsInput",void 0);var od=Me`:host{outline:0}.form-check-input[type=radio]{border-radius:50%}.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg width="8" height="8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z" fill="%23fff"/></svg>')}.form-check-input[checked].is-invalid{background-color:var(--sgds-form-danger-surface-default)}`;class nd extends lt{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.invalid=!1,this.radioId=Xi("radio")}connectedCallback(){super.connectedCallback(),this.setInitialAttributes(),this.addEventListeners()}handleCheckedChange(){var e;this.checked&&(null===(e=this.input)||void 0===e||e.focus()),this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleBlur(){this.emit("sgds-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.emit("sgds-focus")}addEventListeners(){this.addEventListener("blur",(()=>this.handleBlur())),this.addEventListener("click",(()=>this.handleClick())),this.addEventListener("focus",(()=>this.handleFocus()))}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return ee`
|
|
3316
3331
|
<div class="form-check">
|
|
3317
3332
|
<input
|
|
3318
3333
|
class=${bt({"form-check-input":!0,"is-invalid":this.invalid})}
|
|
@@ -3515,7 +3530,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3515
3530
|
</div>
|
|
3516
3531
|
</div>
|
|
3517
3532
|
</nav>
|
|
3518
|
-
`}}Sd.styles=[...lt.styles,kd,_d],Sd.dependencies={"sgds-icon":Ot},t([Je({type:Boolean})],Sd.prototype,"hasActionsSlot",void 0),t([it("nav")],Sd.prototype,"nav",void 0),t([it(".subnav-nav")],Sd.prototype,"mobileNav",void 0),t([it(".header-container")],Sd.prototype,"headerContainer",void 0),t([it(".subnav-toggler")],Sd.prototype,"toggler",void 0),t([it(".subnav-nav-group")],Sd.prototype,"navGroup",void 0),t([it(".subnav-actions")],Sd.prototype,"mobileActions",void 0),t([et()],Sd.prototype,"isCollapsed",void 0),t([et()],Sd.prototype,"isMenuOpen",void 0),t([At("isMenuOpen",{waitUntilFirstUpdate:!0})],Sd.prototype,"handleOpenChange",null),t([At("isCollapsed",{waitUntilFirstUpdate:!0})],Sd.prototype,"handleCollapsedChange",null),Mt("subnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Mt("subnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var Md=Me`:host(:not([disabled])[active]:not([active=false])) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle);border-bottom:none}::slotted(*){--sgds-font-size-2:var(--sgds-font-size-1);--sgds-link-color-default:var(--sgds-color-default);box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:inline-block;font-size:var(--sgds-font-size-2,var(--sgds-font-size-1));padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-decoration:none!important;white-space:nowrap;width:100%}::slotted(*):after{height:var(--sgds-icon-size-md)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-md)!important}:host(:not([disabled])[active]:not([active=false])) ::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)}@media screen and (min-width:1024px){:host(:not([disabled])[active]:not([active=false])) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);background-color:inherit;border-bottom:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}::slotted(*){border-bottom:var(--sgds-border-width-2) solid transparent;padding:var(--sgds-padding-lg) var(--sgds-padding-none)}}`;class $d 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-subnav-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];this.active&&e.setAttribute("aria-current","true"),this.disabled&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}$d.styles=[...lt.styles,Md],t([Je({type:Boolean,reflect:!0})],$d.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],$d.prototype,"disabled",void 0),t([At("disabled")],$d.prototype,"_handleDisabled",null);var Ad=Me`input{margin:0}.form-check{align-items:center;display:flex;gap:var(--sgds-form-gap-lg)}.form-check-input{--sgds-switch-width:var(--sgds-form-width-xl);--sgds-switch-height:var(--sgds-form-height-md);--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M.5 12c0-6.627 5.373-12 12-12s12 5.373 12 12-5.373 12-12 12-12-5.373-12-12Z" fill="%23fff"/></svg>');appearance:none;background-color:var(--sgds-form-surface-subtle);background-image:var(--sgds-switch-bg-image);background-position:left var(--sgds-form-padding-inline-sm) center;background-repeat:no-repeat;background-size:var(--sgds-form-width-xs) var(--sgds-form-height-sm);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-form-border-radius-full);height:var(--sgds-switch-height);padding:0 var(--sgds-form-padding-inline-sm);transition:background-position .15s ease-in-out;width:var(--sgds-switch-width)}.form-check-input:focus,.form-check-input:focus-visible{background-color:var(--sgds-form-surface-emphasis)}.form-check-input:focus-visible{background-color:var(--sgds-form-surface-emphasis);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:0}.form-check-input:not([disabled]):hover{background-color:var(--sgds-form-surface-emphasis)}.form-check-input:checked,.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);background-position:right var(--sgds-form-padding-inline-sm) center}.form-check-input:not([disabled]):checked:focus,.form-check-input:not([disabled]):checked:hover,.form-check-input:not([disabled])[checked]:focus-visible,.form-check-input:not([disabled])[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([size=sm]) .form-check{font-size:var(--sgds-font-size-1)}:host([size=sm]) .form-check-input{--sgds-switch-width:var(--sgds-form-width-md);--sgds-switch-height:var(--sgds-form-height-sm);background-size:var(--sgds-form-width-2-xs) var(--sgds-form-height-2-xs)}:host([size=lg]) .form-check{font-size:var(--sgds-font-size-3)}:host([size=lg]) .form-check-input{--sgds-switch-width:var(--sgds-form-width-3-xl);--sgds-switch-height:var(--sgds-form-height-lg);background-size:var(--sgds-form-width-sm) var(--sgds-form-height-md)}@media (prefers-reduced-motion:reduce){.form-check .form-check-input{transition:none}}:host([icon]) .form-check-input:checked,:host([icon]) .form-check-input[checked]{--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16Zm8.94-21.778a.776.776 0 0 0-.424-.424.781.781 0 0 0-.854.17L13.261 20.372l-4.924-4.925a.783.783 0 1 0-1.108 1.108l5.478 5.478a.777.777 0 0 0 .692.217.787.787 0 0 0 .416-.217L24.77 11.076a.777.777 0 0 0 .17-.854Z" fill="%23fff"/></svg>')}:host([icon]) .form-check-input{--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16ZM10.164 9.416a.75.75 0 0 0-.53 1.28L14.937 16l-5.303 5.303a.75.75 0 0 0 1.06 1.061l5.304-5.303 5.303 5.303a.75.75 0 1 0 1.06-1.06L17.06 16l5.303-5.303a.75.75 0 0 0-1.06-1.061l-5.304 5.304-5.303-5.304a.75.75 0 0 0-.53-.22Z" fill="%23fff"/></svg>')}.d-none{display:none}`;class Dd extends lt{constructor(){super(...arguments),this.size="md",this.icon=!1,this.checked=!1,this.disabled=!1,this.hasDefaultSlot=!1,this.hasLeftLabelSlot=!1,this.defaultChecked=!1,this.hasSlotController=new Wi(this,"[default]","leftLabel"),this._inputId=Xi("switch")}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this.hasLeftLabelSlot||(this.hasLeftLabelSlot=this.hasSlotController.test("leftLabel"))}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(){this.checked=!this.checked,this.emit("sgds-change",{detail:{checked:this.checked}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleDisabledChange(){this.input.disabled=this.disabled}render(){const e=!this.hasDefaultSlot&&!this.hasLeftLabelSlot;return ee`
|
|
3533
|
+
`}}Sd.styles=[...lt.styles,kd,_d],Sd.dependencies={"sgds-icon":Ot},t([Je({type:Boolean})],Sd.prototype,"hasActionsSlot",void 0),t([it("nav")],Sd.prototype,"nav",void 0),t([it(".subnav-nav")],Sd.prototype,"mobileNav",void 0),t([it(".header-container")],Sd.prototype,"headerContainer",void 0),t([it(".subnav-toggler")],Sd.prototype,"toggler",void 0),t([it(".subnav-nav-group")],Sd.prototype,"navGroup",void 0),t([it(".subnav-actions")],Sd.prototype,"mobileActions",void 0),t([et()],Sd.prototype,"isCollapsed",void 0),t([et()],Sd.prototype,"isMenuOpen",void 0),t([At("isMenuOpen",{waitUntilFirstUpdate:!0})],Sd.prototype,"handleOpenChange",null),t([At("isCollapsed",{waitUntilFirstUpdate:!0})],Sd.prototype,"handleCollapsedChange",null),Mt("subnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Mt("subnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var Md=Me`:host(:not([disabled])[active]:not([active=false])) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle);border-bottom:none}::slotted(*){--sgds-font-size-2:var(--sgds-font-size-1);--sgds-link-color-default:var(--sgds-color-default);box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:inline-block;font-size:var(--sgds-font-size-2,var(--sgds-font-size-1));padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-decoration:none!important;white-space:nowrap;width:100%}::slotted(*):after{height:var(--sgds-icon-size-md)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-md)!important}:host(:not([disabled])[active]:not([active=false])) ::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)}@media screen and (min-width:1024px){:host(:not([disabled])[active]:not([active=false])) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);background-color:inherit;border-bottom:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}::slotted(*){border-bottom:var(--sgds-border-width-2) solid transparent;padding:var(--sgds-padding-lg) var(--sgds-padding-none)}}`;class $d 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-subnav-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];this.active&&e.setAttribute("aria-current","true"),this.disabled&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}$d.styles=[...lt.styles,Md],t([Je({type:Boolean,reflect:!0})],$d.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],$d.prototype,"disabled",void 0),t([At("disabled")],$d.prototype,"_handleDisabled",null);var Ad=Me`input{margin:0}.form-check{align-items:center;display:flex;gap:var(--sgds-form-gap-lg)}.form-check-input{--sgds-switch-width:var(--sgds-form-width-xl);--sgds-switch-height:var(--sgds-form-height-md);--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M.5 12c0-6.627 5.373-12 12-12s12 5.373 12 12-5.373 12-12 12-12-5.373-12-12Z" fill="%23fff"/></svg>');appearance:none;background-color:var(--sgds-form-surface-subtle);background-image:var(--sgds-switch-bg-image);background-position:left var(--sgds-form-padding-inline-sm) center;background-repeat:no-repeat;background-size:var(--sgds-form-width-xs) var(--sgds-form-height-sm);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-form-border-radius-full);height:var(--sgds-switch-height);padding:0 var(--sgds-form-padding-inline-sm);transition:background-position .15s ease-in-out;width:var(--sgds-switch-width)}.form-check-input:focus,.form-check-input:focus-visible{background-color:var(--sgds-form-surface-emphasis)}.form-check-input:focus-visible{background-color:var(--sgds-form-surface-emphasis);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:0}.form-check-input:not([disabled]):hover{background-color:var(--sgds-form-surface-emphasis)}.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);background-position:right var(--sgds-form-padding-inline-sm) center}.form-check-input:not([disabled])[checked]:focus-visible,.form-check-input:not([disabled])[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([size=sm]) .form-check{font-size:var(--sgds-font-size-1)}:host([size=sm]) .form-check-input{--sgds-switch-width:var(--sgds-form-width-md);--sgds-switch-height:var(--sgds-form-height-sm);background-size:var(--sgds-form-width-2-xs) var(--sgds-form-height-2-xs)}:host([size=lg]) .form-check{font-size:var(--sgds-font-size-3)}:host([size=lg]) .form-check-input{--sgds-switch-width:var(--sgds-form-width-3-xl);--sgds-switch-height:var(--sgds-form-height-lg);background-size:var(--sgds-form-width-sm) var(--sgds-form-height-md)}@media (prefers-reduced-motion:reduce){.form-check .form-check-input{transition:none}}:host([icon]) .form-check-input[checked]{--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16Zm8.94-21.778a.776.776 0 0 0-.424-.424.781.781 0 0 0-.854.17L13.261 20.372l-4.924-4.925a.783.783 0 1 0-1.108 1.108l5.478 5.478a.777.777 0 0 0 .692.217.787.787 0 0 0 .416-.217L24.77 11.076a.777.777 0 0 0 .17-.854Z" fill="%23fff"/></svg>')}:host([icon]) .form-check-input{--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16ZM10.164 9.416a.75.75 0 0 0-.53 1.28L14.937 16l-5.303 5.303a.75.75 0 0 0 1.06 1.061l5.304-5.303 5.303 5.303a.75.75 0 1 0 1.06-1.06L17.06 16l5.303-5.303a.75.75 0 0 0-1.06-1.061l-5.304 5.304-5.303-5.304a.75.75 0 0 0-.53-.22Z" fill="%23fff"/></svg>')}.d-none{display:none}`;class Dd extends lt{constructor(){super(...arguments),this.size="md",this.icon=!1,this.checked=!1,this.disabled=!1,this.hasDefaultSlot=!1,this.hasLeftLabelSlot=!1,this.defaultChecked=!1,this.hasSlotController=new Wi(this,"[default]","leftLabel"),this._inputId=Xi("switch")}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this.hasLeftLabelSlot||(this.hasLeftLabelSlot=this.hasSlotController.test("leftLabel"))}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(){this.checked=!this.checked,this.emit("sgds-change",{detail:{checked:this.checked}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleDisabledChange(){this.input.disabled=this.disabled}render(){const e=!this.hasDefaultSlot&&!this.hasLeftLabelSlot;return ee`
|
|
3519
3534
|
<div class="form-check">
|
|
3520
3535
|
<label
|
|
3521
3536
|
for="${this._inputId}"
|
|
@@ -3568,7 +3583,11 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3568
3583
|
></sgds-icon-button>
|
|
3569
3584
|
</div>`:ie}
|
|
3570
3585
|
${this.dismissible?ee`
|
|
3571
|
-
<sgds-close-button
|
|
3586
|
+
<sgds-close-button
|
|
3587
|
+
aria-label="close the alert"
|
|
3588
|
+
@click=${this.close}
|
|
3589
|
+
tone="fixed-light"
|
|
3590
|
+
></sgds-close-button>
|
|
3572
3591
|
`:ie}
|
|
3573
3592
|
</div>
|
|
3574
3593
|
`}}Ed.styles=[...lt.styles,Vd],Ed.dependencies={"sgds-close-button":Ht,"sgds-icon":Ot,"sgds-icon-button":lr},t([Je({type:Boolean,reflect:!0})],Ed.prototype,"show",void 0),t([Je({type:Boolean,reflect:!0})],Ed.prototype,"dismissible",void 0),t([ot({flatten:!0})],Ed.prototype,"bannerItem",void 0),t([it(".banner")],Ed.prototype,"banner",void 0),t([Dl({context:"system-banner-children-count-context"}),et()],Ed.prototype,"childCount",void 0),t([et()],Ed.prototype,"_intervalId",void 0),t([et()],Ed.prototype,"_currentIndex",void 0),t([At("show",{waitUntilFirstUpdate:!0})],Ed.prototype,"_handleShowChange",null),Mt("banner.item.next",{keyframes:[{opacity:0,transform:"translateY(-100%)"},{opacity:1,transform:"translateY(0)"}],options:{duration:500,easing:"cubic-bezier(0.45,0.05,0.55,0.95)"}}),Mt("banner.item.prev",{keyframes:[{opacity:0,transform:"translateY(100%)"},{opacity:1,transform:"translateY(0)"}],options:{duration:500,easing:"cubic-bezier(0.45,0.05,0.55,0.95)"}});var Id=Me`:host([density=compact]) .tab{font-size:var(--sgds-font-size-1);padding:var(--sgds-spacer-3) var(--sgds-spacer-5)}:host(:not([active])) .tab{cursor:pointer}:host([variant=solid]) .tab{background-color:var(--sgds-bg-translucent-subtle);border-radius:var(--sgds-border-radius-md)}:host([variant=solid][active]) .tab{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus,:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=solid]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent)}:host([disabled]) .tab{cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([variant=underlined][active]) .tab{color:var(--sgds-primary-color-default)}:host([variant=underlined][orientation=vertical]) .tab{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([variant=underlined][orientation=vertical][active]) .tab:after{background-color:var(--sgds-primary-surface-default);bottom:0;content:"";height:100%;position:absolute;right:-1px;width:var(--sgds-border-width-4)}:host([variant=underlined][orientation=horizontal]) .tab{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([variant=underlined][orientation=horizontal][active]) .tab:after{background-color:var(--sgds-primary-surface-default);bottom:-1px;content:"";height:var(--sgds-border-width-4);left:0;position:absolute;width:100%}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus,:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:0}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=underlined]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent-subtle)}.tab{align-items:center;color:var(--sgds-color-default);display:flex;gap:var(--sgds-spacer-3);padding:var(--sgds-spacer-4) var(--sgds-spacer-5);position:relative}.tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;let Bd=0;class Pd extends lt{constructor(){super(...arguments),this.attrId=++Bd,this.componentId=`sgds-tab-${this.attrId}`,this.panel="",this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tab")}focus(e){var t,s;null===(s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".tab"))||void 0===s||s.focus(e)}blur(){this.tab.blur()}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&(this.active=!1)}render(){return ee`
|