@govtechsg/sgds-web-component 3.27.0-rc.3 → 3.27.0
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-list-element.js +2 -9
- package/base/dropdown-list-element.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +5 -5
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +1 -1
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/DataTable/data-table.js +1 -1
- package/components/DataTable/index.umd.min.js +49 -42
- package/components/DataTable/index.umd.min.js.map +1 -1
- package/components/DataTable/sgds-data-table-cell.d.ts +2 -2
- package/components/DataTable/sgds-data-table-cell.js.map +1 -1
- package/components/DataTable/sgds-data-table-head.d.ts +2 -2
- package/components/DataTable/sgds-data-table-head.js.map +1 -1
- package/components/DataTable/sgds-data-table-row.d.ts +0 -3
- package/components/DataTable/sgds-data-table-row.js +0 -13
- package/components/DataTable/sgds-data-table-row.js.map +1 -1
- package/components/DataTable/sgds-data-table.d.ts +7 -4
- package/components/DataTable/sgds-data-table.js +49 -38
- package/components/DataTable/sgds-data-table.js.map +1 -1
- package/components/DataTable/types.d.ts +7 -0
- package/components/Datepicker/index.umd.min.js +1 -1
- package/components/Dropdown/dropdown-item.js +1 -1
- package/components/Dropdown/index.umd.min.js +5 -5
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Dropdown/sgds-dropdown-item.d.ts +0 -2
- package/components/Dropdown/sgds-dropdown-item.js +2 -8
- package/components/Dropdown/sgds-dropdown-item.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/Footer/sgds-footer.js +1 -1
- package/components/Footer/sgds-footer.js.map +1 -1
- package/components/Input/index.umd.min.js +1 -1
- package/components/Mainnav/index.d.ts +0 -2
- package/components/Mainnav/index.js +0 -2
- package/components/Mainnav/index.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +285 -338
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/Mainnav/mainnav-dropdown.js +1 -1
- package/components/Mainnav/mainnav-item.js +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Mainnav/sgds-mainnav.d.ts +51 -8
- package/components/Mainnav/sgds-mainnav.js +238 -40
- package/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/components/OverflowMenu/index.umd.min.js +5 -5
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/QuantityToggle/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js +21 -21
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Tab/index.umd.min.js +1 -1
- package/components/Tab/index.umd.min.js.map +1 -1
- package/components/Tab/tab-panel.js +1 -1
- package/components/Textarea/index.umd.min.js +1 -1
- package/components/index.d.ts +0 -3
- package/components/index.js +0 -3
- package/components/index.js.map +1 -1
- package/components/index.umd.min.js +587 -665
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +5 -8
- package/custom-elements.json +15246 -17418
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/index.umd.min.js +353 -441
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/dropdown-list-element.cjs.js +2 -9
- package/react/base/dropdown-list-element.cjs.js.map +1 -1
- package/react/base/dropdown-list-element.js +2 -9
- package/react/base/dropdown-list-element.js.map +1 -1
- package/react/components/DataTable/data-table.cjs.js +1 -1
- package/react/components/DataTable/data-table.js +1 -1
- package/react/components/DataTable/sgds-data-table-cell.cjs.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-cell.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-head.cjs.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-head.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-row.cjs.js +0 -13
- package/react/components/DataTable/sgds-data-table-row.cjs.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-row.js +0 -13
- package/react/components/DataTable/sgds-data-table-row.js.map +1 -1
- package/react/components/DataTable/sgds-data-table.cjs.js +49 -38
- package/react/components/DataTable/sgds-data-table.cjs.js.map +1 -1
- package/react/components/DataTable/sgds-data-table.js +49 -38
- package/react/components/DataTable/sgds-data-table.js.map +1 -1
- package/react/components/Dropdown/dropdown-item.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-item.js +1 -1
- package/react/components/Dropdown/sgds-dropdown-item.cjs.js +2 -8
- package/react/components/Dropdown/sgds-dropdown-item.cjs.js.map +1 -1
- package/react/components/Dropdown/sgds-dropdown-item.js +2 -8
- package/react/components/Dropdown/sgds-dropdown-item.js.map +1 -1
- package/react/components/Footer/sgds-footer.cjs.js +1 -1
- package/react/components/Footer/sgds-footer.cjs.js.map +1 -1
- package/react/components/Footer/sgds-footer.js +1 -1
- package/react/components/Footer/sgds-footer.js.map +1 -1
- package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-dropdown.js +1 -1
- package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-item.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Mainnav/sgds-mainnav.cjs.js +237 -39
- package/react/components/Mainnav/sgds-mainnav.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav.js +238 -40
- package/react/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/react/components/Tab/tab-panel.cjs.js +1 -1
- package/react/components/Tab/tab-panel.js +1 -1
- package/react/index.cjs.js +146 -152
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +5 -8
- package/react/index.js +5 -8
- package/react/index.js.map +1 -1
- package/react/styles/form-text-control.cjs.js +1 -1
- package/react/styles/form-text-control.js +1 -1
- package/styles/form-text-control.js +1 -1
- package/themes/blue.css +11 -11
- package/themes/cyan.css +10 -10
- package/themes/day.css +1 -1
- package/themes/gt/blue.css +11 -11
- package/themes/gt/cyan.css +10 -10
- package/themes/gt/magenta.css +11 -11
- package/themes/gt/pink.css +11 -11
- package/themes/gt/purple.css +11 -11
- package/themes/gt/red.css +11 -11
- package/themes/magenta.css +11 -11
- package/themes/pink.css +11 -11
- package/themes/purple.css +11 -11
- package/themes/red.css +11 -11
- package/themes/root.css +0 -5
- package/types/react.d.ts +97 -148
- package/base/nav-element.d.ts +0 -64
- package/base/nav-element.js +0 -263
- package/base/nav-element.js.map +0 -1
- package/base/nav-profile-element.d.ts +0 -47
- package/base/nav-profile-element.js +0 -191
- package/base/nav-profile-element.js.map +0 -1
- package/base/nav-profile.js +0 -6
- package/base/nav-profile.js.map +0 -1
- package/components/Appnav/appnav-context.d.ts +0 -6
- package/components/Appnav/appnav-context.js +0 -7
- package/components/Appnav/appnav-context.js.map +0 -1
- package/components/Appnav/appnav.js +0 -6
- package/components/Appnav/appnav.js.map +0 -1
- package/components/Appnav/index.d.ts +0 -9
- package/components/Appnav/index.js +0 -8
- package/components/Appnav/index.js.map +0 -1
- package/components/Appnav/index.umd.min.js +0 -2535
- package/components/Appnav/index.umd.min.js.map +0 -1
- package/components/Appnav/sgds-appnav-profile.d.ts +0 -17
- package/components/Appnav/sgds-appnav-profile.js +0 -31
- package/components/Appnav/sgds-appnav-profile.js.map +0 -1
- package/components/Appnav/sgds-appnav.d.ts +0 -44
- package/components/Appnav/sgds-appnav.js +0 -183
- package/components/Appnav/sgds-appnav.js.map +0 -1
- package/components/Mainnav/sgds-mainnav-profile.d.ts +0 -15
- package/components/Mainnav/sgds-mainnav-profile.js +0 -29
- package/components/Mainnav/sgds-mainnav-profile.js.map +0 -1
- package/react/appnav/index.cjs.js +0 -45
- package/react/appnav/index.cjs.js.map +0 -1
- package/react/appnav/index.d.ts +0 -4
- package/react/appnav/index.js +0 -21
- package/react/appnav/index.js.map +0 -1
- package/react/appnav-profile/index.cjs.js +0 -40
- package/react/appnav-profile/index.cjs.js.map +0 -1
- package/react/appnav-profile/index.d.ts +0 -4
- package/react/appnav-profile/index.js +0 -16
- package/react/appnav-profile/index.js.map +0 -1
- package/react/base/nav-element.cjs.js +0 -268
- package/react/base/nav-element.cjs.js.map +0 -1
- package/react/base/nav-element.js +0 -264
- package/react/base/nav-element.js.map +0 -1
- package/react/base/nav-profile-element.cjs.js +0 -196
- package/react/base/nav-profile-element.cjs.js.map +0 -1
- package/react/base/nav-profile-element.js +0 -192
- package/react/base/nav-profile-element.js.map +0 -1
- package/react/base/nav-profile.cjs.js +0 -11
- package/react/base/nav-profile.cjs.js.map +0 -1
- package/react/base/nav-profile.js +0 -7
- package/react/base/nav-profile.js.map +0 -1
- package/react/components/Appnav/appnav-context.cjs.js +0 -13
- package/react/components/Appnav/appnav-context.cjs.js.map +0 -1
- package/react/components/Appnav/appnav-context.js +0 -8
- package/react/components/Appnav/appnav-context.js.map +0 -1
- package/react/components/Appnav/appnav.cjs.js +0 -11
- package/react/components/Appnav/appnav.cjs.js.map +0 -1
- package/react/components/Appnav/appnav.js +0 -7
- package/react/components/Appnav/appnav.js.map +0 -1
- package/react/components/Appnav/sgds-appnav-profile.cjs.js +0 -37
- package/react/components/Appnav/sgds-appnav-profile.cjs.js.map +0 -1
- package/react/components/Appnav/sgds-appnav-profile.js +0 -32
- package/react/components/Appnav/sgds-appnav-profile.js.map +0 -1
- package/react/components/Appnav/sgds-appnav.cjs.js +0 -189
- package/react/components/Appnav/sgds-appnav.cjs.js.map +0 -1
- package/react/components/Appnav/sgds-appnav.js +0 -184
- package/react/components/Appnav/sgds-appnav.js.map +0 -1
- package/react/components/Mainnav/sgds-mainnav-profile.cjs.js +0 -35
- package/react/components/Mainnav/sgds-mainnav-profile.cjs.js.map +0 -1
- package/react/components/Mainnav/sgds-mainnav-profile.js +0 -30
- package/react/components/Mainnav/sgds-mainnav-profile.js.map +0 -1
- package/react/mainnav-profile/index.cjs.js +0 -40
- package/react/mainnav-profile/index.cjs.js.map +0 -1
- package/react/mainnav-profile/index.d.ts +0 -4
- package/react/mainnav-profile/index.js +0 -16
- package/react/mainnav-profile/index.js.map +0 -1
|
@@ -244,7 +244,7 @@ const me={attribute:!0,type:String,converter:H,reflect:!1,hasChanged:k},_e=(e=me
|
|
|
244
244
|
>
|
|
245
245
|
</sgds-icon-button>
|
|
246
246
|
</div>
|
|
247
|
-
`}}ri.styles=[ni],ri.dependencies={"sgds-icon":Xl,"sgds-icon-button":ii,"sgds-button":Rl},e([be({attribute:!1})],ri.prototype,"displayDate",void 0),e([be({attribute:!1})],ri.prototype,"focusedDate",void 0),e([be({attribute:!1})],ri.prototype,"selectedDate",void 0),e([be()],ri.prototype,"view",void 0),e([be()],ri.prototype,"focusedTabIndex",void 0),e([kl("focusedTabIndex",{waitUntilFirstUpdate:!0})],ri.prototype,"_handleFocusedTabIndexChange",null);const oi=["January","February","March","April","May","June","July","August","September","October","November","December"];class ai{constructor(e,t){this.listeners=new Map,this.input=e,this.placeholderStr=this._buildPlaceholder(t.pattern),this._state=this.placeholderStr,this.listeners.set("accept",[]),this.listeners.set("complete",[]);const l={value:"",isComplete:!1};Object.defineProperties(l,{value:{get:()=>this._state,enumerable:!0},isComplete:{get:()=>this._state.length>0&&!/[DMY]/.test(this._state),enumerable:!0}}),this.masked=l,this.input.value&&this.input.value.length===this._state.length&&!/[DMY]/.test(this.input.value)?this._state=this.input.value:this.input.value=this._state,this._boundHandleBeforeInput=this._handleBeforeInput.bind(this),this._boundHandleInput=this._handleInput.bind(this),this._boundHandleKeydown=this._handleKeydown.bind(this),this._boundHandleFocus=this._handleFocus.bind(this),this._boundHandleBlur=this._handleBlur.bind(this),this._valueAtFocus=this._state,this.input.addEventListener("beforeinput",this._boundHandleBeforeInput),this.input.addEventListener("input",this._boundHandleInput),this.input.addEventListener("keydown",this._boundHandleKeydown),this.input.addEventListener("focus",this._boundHandleFocus),this.input.addEventListener("blur",this._boundHandleBlur)}get value(){return this._state}set value(e){this._state=e&&""!==e?e:this.placeholderStr,this.input.value=this._state,this._emit("accept")}on(e,t){var l;null===(l=this.listeners.get(e))||void 0===l||l.push(t)}updateValue(){this._state=this.input.value}destroy(){this.input.removeEventListener("beforeinput",this._boundHandleBeforeInput),this.input.removeEventListener("input",this._boundHandleInput),this.input.removeEventListener("keydown",this._boundHandleKeydown),this.input.removeEventListener("focus",this._boundHandleFocus),this.input.removeEventListener("blur",this._boundHandleBlur),this.listeners.clear()}_handleFocus(){this._valueAtFocus=this._state}_handleBlur(){this._state!==this._valueAtFocus&&this.input.dispatchEvent(new Event("change",{bubbles:!0}))}_buildPlaceholder(e){return e.replace(/`/g,"").replace(/\{(\/)\}/g,"$1").replace(/d/g,"D").replace(/m/g,"M").replace(/y/g,"Y")}_getDigitPositions(){const e=[];for(let t=0;t<this.placeholderStr.length;t++){const l=this.placeholderStr[t];"D"!==l&&"M"!==l&&"Y"!==l||e.push(t)}return e}_handleBeforeInput(e){e.preventDefault()}_handleInput(){this.input.value!==this._state&&(this.input.value=this._state)}_handleKeydown(e){"Backspace"===e.key?(e.preventDefault(),this._backspace()):"Delete"===e.key?(e.preventDefault(),this._deleteForward()):1===e.key.length&&/\d/.test(e.key)&&(e.preventDefault(),this._insertDigit(e.key))}_insertDigit(e){const t=this._getDigitPositions(),l=this._state.split("");let i=-1;for(const e of t)if(/[DMY]/.test(l[e])){i=e;break}if(-1===i)return;l[i]=e,this._state=l.join(""),this.input.value=this._state;const n=this._findNextInputPos(i);this.input.setSelectionRange(n,n),this._emit("accept"),this.masked.isComplete&&this._emit("complete")}_backspace(){var e;const t=null!==(e=this.input.selectionStart)&&void 0!==e?e:this._state.length,l=this._state.split("");let i=t-1;for(;i>=0&&!/\d/.test(l[i]);)i--;i>=0&&(l[i]=this.placeholderStr[i],this._state=l.join(""),this.input.value=this._state,this.input.setSelectionRange(i,i),this._emit("accept"))}_deleteForward(){var e;const t=null!==(e=this.input.selectionStart)&&void 0!==e?e:0,l=this._state.split("");let i=t;for(;i<l.length&&!/\d/.test(l[i]);)i++;i<l.length&&(l[i]=this.placeholderStr[i],this._state=l.join(""),this.input.value=this._state,this.input.setSelectionRange(t,t),this._emit("accept"))}_findNextInputPos(e){for(let t=e+1;t<this._state.length;t++)if(/[DMY]/.test(this._state[t]))return t;return this._state.length}_emit(e){const t=this.listeners.get(e);if(t)for(const e of t)e()}}var si=p`.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-label-sm);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,ci=p`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs)}.form-text.disabled{opacity:var(--sgds-opacity-40)}`,di=p`.form-label{color:var(--sgds-form-color-default);font-weight:var(--sgds-font-weight-semibold);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-40)}.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}`,hi=p`.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 ui extends gl{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=wl("input"),this._labelId=wl("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}ui.styles=[...gl.styles,si,ci,di,hi],e([be({reflect:!0})],ui.prototype,"label",void 0),e([be({reflect:!0})],ui.prototype,"hintText",void 0),e([be({reflect:!0})],ui.prototype,"name",void 0),e([be({type:Boolean,reflect:!0})],ui.prototype,"disabled",void 0),e([be({type:Boolean,reflect:!0})],ui.prototype,"invalid",void 0);var vi=p`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.m-width-160{min-width:var(--sgds-dimension-160)}.m-width-256{min-width:var(--sgds-dimension-256)}.form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)}.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-xl);height:var(--sgds-dimension-48);justify-content:center;overflow:hidden;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-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-label-md);line-height:var(--sgds-line-height-xs);min-width:0;outline:none;padding:0;width:100%}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}.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-40)}.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)}`;const fi=(e="value")=>(t,l)=>{const i=t.constructor,n=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,r,o){var a;const s=i.getPropertyOptions(e);if(t===("string"==typeof s.attribute?s.attribute:e).toLowerCase()){const t=s.converter||H,i=("function"==typeof t?t:null!==(a=null==t?void 0:t.fromAttribute)&&void 0!==a?a:H.fromAttribute)(o,s.type);this[e]!==i&&(this[l]=i)}n.call(this,t,r,o)}};class pi{constructor(e,t){(this.host=e).addController(this),this._internals=e._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,l){return this._internals.setValidity(e,t,l)}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 l in t)t[l]&&(this.validationError=l.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const gi=t=>{class l extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new pi(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),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._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this._isTouched&&(this._isTouched=!1),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,l){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,l)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return l.formAssociated=!0,e([Ce("sgds-input")],l.prototype,"sgdsInput",void 0),e([Ce("sgds-datepicker-input")],l.prototype,"sgdsDatepickerInput",void 0),l};var wi=p`:host{--input-border-radius:var(--sgds-form-border-radius-md);--input-min-width:var(--sgds-dimension-160)}.form-control-container{min-width:var(--input-min-width)}:host(.quantity-toggle) input::-webkit-inner-spin-button{appearance:none;margin:0}:host(.quantity-toggle) input{text-align:center}.form-control-prefix,.form-control-suffix{align-items:center;color:var(--sgds-form-color-subtle);display:flex;flex-shrink:0;font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-xs);height:100%;justify-content:center}.form-control-prefix{border-right:var(--sgds-form-border-width-default) solid var(--sgds-border-color-muted);padding-right:var(--sgds-form-padding-x)}.form-control-suffix{border-left:var(--sgds-form-border-width-default) solid var(--sgds-border-color-muted);padding-left:var(--sgds-form-padding-x)}.form-control-group.quantity-toggle{padding:0}sgds-icon[role=button]{cursor:pointer}sgds-icon[role=button]:focus,sgds-icon[role=button]:focus-visible{outline:var(--sgds-form-outline-focus)}.form-control-row{align-items:center;display:flex;gap:var(--sgds-gap-sm)}`;class mi extends(gi(ui)){constructor(){super(...arguments),this.type="text",this.placeholder="placeholder",this.autofocus=!1,this.readonly=!1,this.autocomplete="on",this.defaultValue="",this.valid=!1,this.loading=!1,this.required=!1,this.noValidate=!1,this.value="",this._isTouched=!1,this._showPassword=!1}focus(e){this.input.focus(e)}blur(){this.input.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}setValidity(e,t,l){return this._mixinSetValidity(e,t,l)}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleClick(){this.focus()}_handleChange(e){this.value=this.input.value;this.emit("sgds-change",{cancelable:!0}).defaultPrevented||super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value;this.emit("sgds-input",{cancelable:!0}).defaultPrevented||super._mixinHandleInputChange(e)}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_renderInput(){const e="both"===this.hasFeedback||"style"===this.hasFeedback,t="both"===this.hasFeedback||"text"===this.hasFeedback,l=[this.hintText?`${this._controlId}Help`:"",this.invalid&&t?`${this._controlId}-invalid`:""].filter(Boolean).join(" ")||void 0;return Bl`
|
|
247
|
+
`}}ri.styles=[ni],ri.dependencies={"sgds-icon":Xl,"sgds-icon-button":ii,"sgds-button":Rl},e([be({attribute:!1})],ri.prototype,"displayDate",void 0),e([be({attribute:!1})],ri.prototype,"focusedDate",void 0),e([be({attribute:!1})],ri.prototype,"selectedDate",void 0),e([be()],ri.prototype,"view",void 0),e([be()],ri.prototype,"focusedTabIndex",void 0),e([kl("focusedTabIndex",{waitUntilFirstUpdate:!0})],ri.prototype,"_handleFocusedTabIndexChange",null);const oi=["January","February","March","April","May","June","July","August","September","October","November","December"];class ai{constructor(e,t){this.listeners=new Map,this.input=e,this.placeholderStr=this._buildPlaceholder(t.pattern),this._state=this.placeholderStr,this.listeners.set("accept",[]),this.listeners.set("complete",[]);const l={value:"",isComplete:!1};Object.defineProperties(l,{value:{get:()=>this._state,enumerable:!0},isComplete:{get:()=>this._state.length>0&&!/[DMY]/.test(this._state),enumerable:!0}}),this.masked=l,this.input.value&&this.input.value.length===this._state.length&&!/[DMY]/.test(this.input.value)?this._state=this.input.value:this.input.value=this._state,this._boundHandleBeforeInput=this._handleBeforeInput.bind(this),this._boundHandleInput=this._handleInput.bind(this),this._boundHandleKeydown=this._handleKeydown.bind(this),this._boundHandleFocus=this._handleFocus.bind(this),this._boundHandleBlur=this._handleBlur.bind(this),this._valueAtFocus=this._state,this.input.addEventListener("beforeinput",this._boundHandleBeforeInput),this.input.addEventListener("input",this._boundHandleInput),this.input.addEventListener("keydown",this._boundHandleKeydown),this.input.addEventListener("focus",this._boundHandleFocus),this.input.addEventListener("blur",this._boundHandleBlur)}get value(){return this._state}set value(e){this._state=e&&""!==e?e:this.placeholderStr,this.input.value=this._state,this._emit("accept")}on(e,t){var l;null===(l=this.listeners.get(e))||void 0===l||l.push(t)}updateValue(){this._state=this.input.value}destroy(){this.input.removeEventListener("beforeinput",this._boundHandleBeforeInput),this.input.removeEventListener("input",this._boundHandleInput),this.input.removeEventListener("keydown",this._boundHandleKeydown),this.input.removeEventListener("focus",this._boundHandleFocus),this.input.removeEventListener("blur",this._boundHandleBlur),this.listeners.clear()}_handleFocus(){this._valueAtFocus=this._state}_handleBlur(){this._state!==this._valueAtFocus&&this.input.dispatchEvent(new Event("change",{bubbles:!0}))}_buildPlaceholder(e){return e.replace(/`/g,"").replace(/\{(\/)\}/g,"$1").replace(/d/g,"D").replace(/m/g,"M").replace(/y/g,"Y")}_getDigitPositions(){const e=[];for(let t=0;t<this.placeholderStr.length;t++){const l=this.placeholderStr[t];"D"!==l&&"M"!==l&&"Y"!==l||e.push(t)}return e}_handleBeforeInput(e){e.preventDefault()}_handleInput(){this.input.value!==this._state&&(this.input.value=this._state)}_handleKeydown(e){"Backspace"===e.key?(e.preventDefault(),this._backspace()):"Delete"===e.key?(e.preventDefault(),this._deleteForward()):1===e.key.length&&/\d/.test(e.key)&&(e.preventDefault(),this._insertDigit(e.key))}_insertDigit(e){const t=this._getDigitPositions(),l=this._state.split("");let i=-1;for(const e of t)if(/[DMY]/.test(l[e])){i=e;break}if(-1===i)return;l[i]=e,this._state=l.join(""),this.input.value=this._state;const n=this._findNextInputPos(i);this.input.setSelectionRange(n,n),this._emit("accept"),this.masked.isComplete&&this._emit("complete")}_backspace(){var e;const t=null!==(e=this.input.selectionStart)&&void 0!==e?e:this._state.length,l=this._state.split("");let i=t-1;for(;i>=0&&!/\d/.test(l[i]);)i--;i>=0&&(l[i]=this.placeholderStr[i],this._state=l.join(""),this.input.value=this._state,this.input.setSelectionRange(i,i),this._emit("accept"))}_deleteForward(){var e;const t=null!==(e=this.input.selectionStart)&&void 0!==e?e:0,l=this._state.split("");let i=t;for(;i<l.length&&!/\d/.test(l[i]);)i++;i<l.length&&(l[i]=this.placeholderStr[i],this._state=l.join(""),this.input.value=this._state,this.input.setSelectionRange(t,t),this._emit("accept"))}_findNextInputPos(e){for(let t=e+1;t<this._state.length;t++)if(/[DMY]/.test(this._state[t]))return t;return this._state.length}_emit(e){const t=this.listeners.get(e);if(t)for(const e of t)e()}}var si=p`.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-label-sm);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,ci=p`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs)}.form-text.disabled{opacity:var(--sgds-opacity-40)}`,di=p`.form-label{color:var(--sgds-form-color-default);font-weight:var(--sgds-font-weight-semibold);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-40)}.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}`,hi=p`.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 ui extends gl{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=wl("input"),this._labelId=wl("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}ui.styles=[...gl.styles,si,ci,di,hi],e([be({reflect:!0})],ui.prototype,"label",void 0),e([be({reflect:!0})],ui.prototype,"hintText",void 0),e([be({reflect:!0})],ui.prototype,"name",void 0),e([be({type:Boolean,reflect:!0})],ui.prototype,"disabled",void 0),e([be({type:Boolean,reflect:!0})],ui.prototype,"invalid",void 0);var vi=p`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.m-width-160{min-width:var(--sgds-dimension-160)}.m-width-256{min-width:var(--sgds-dimension-256)}.form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)}.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;overflow:hidden;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-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-label-md);line-height:var(--sgds-line-height-xs);min-width:0;outline:none;padding:0;width:100%}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}.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-40)}.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)}`;const fi=(e="value")=>(t,l)=>{const i=t.constructor,n=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,r,o){var a;const s=i.getPropertyOptions(e);if(t===("string"==typeof s.attribute?s.attribute:e).toLowerCase()){const t=s.converter||H,i=("function"==typeof t?t:null!==(a=null==t?void 0:t.fromAttribute)&&void 0!==a?a:H.fromAttribute)(o,s.type);this[e]!==i&&(this[l]=i)}n.call(this,t,r,o)}};class pi{constructor(e,t){(this.host=e).addController(this),this._internals=e._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,l){return this._internals.setValidity(e,t,l)}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 l in t)t[l]&&(this.validationError=l.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const gi=t=>{class l extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new pi(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),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._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this._isTouched&&(this._isTouched=!1),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,l){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,l)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return l.formAssociated=!0,e([Ce("sgds-input")],l.prototype,"sgdsInput",void 0),e([Ce("sgds-datepicker-input")],l.prototype,"sgdsDatepickerInput",void 0),l};var wi=p`:host{--input-border-radius:var(--sgds-form-border-radius-md);--input-min-width:var(--sgds-dimension-160)}.form-control-container{min-width:var(--input-min-width)}:host(.quantity-toggle) input::-webkit-inner-spin-button{appearance:none;margin:0}:host(.quantity-toggle) input{text-align:center}.form-control-prefix,.form-control-suffix{align-items:center;color:var(--sgds-form-color-subtle);display:flex;flex-shrink:0;font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-xs);height:100%;justify-content:center}.form-control-prefix{border-right:var(--sgds-form-border-width-default) solid var(--sgds-border-color-muted);padding-right:var(--sgds-form-padding-x)}.form-control-suffix{border-left:var(--sgds-form-border-width-default) solid var(--sgds-border-color-muted);padding-left:var(--sgds-form-padding-x)}.form-control-group.quantity-toggle{padding:0}sgds-icon[role=button]{cursor:pointer}sgds-icon[role=button]:focus,sgds-icon[role=button]:focus-visible{outline:var(--sgds-form-outline-focus)}.form-control-row{align-items:center;display:flex;gap:var(--sgds-gap-sm)}`;class mi extends(gi(ui)){constructor(){super(...arguments),this.type="text",this.placeholder="placeholder",this.autofocus=!1,this.readonly=!1,this.autocomplete="on",this.defaultValue="",this.valid=!1,this.loading=!1,this.required=!1,this.noValidate=!1,this.value="",this._isTouched=!1,this._showPassword=!1}focus(e){this.input.focus(e)}blur(){this.input.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}setValidity(e,t,l){return this._mixinSetValidity(e,t,l)}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleClick(){this.focus()}_handleChange(e){this.value=this.input.value;this.emit("sgds-change",{cancelable:!0}).defaultPrevented||super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value;this.emit("sgds-input",{cancelable:!0}).defaultPrevented||super._mixinHandleInputChange(e)}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_renderInput(){const e="both"===this.hasFeedback||"style"===this.hasFeedback,t="both"===this.hasFeedback||"text"===this.hasFeedback,l=[this.hintText?`${this._controlId}Help`:"",this.invalid&&t?`${this._controlId}-invalid`:""].filter(Boolean).join(" ")||void 0;return Bl`
|
|
248
248
|
<div
|
|
249
249
|
class="form-control-group ${Al({disabled:this.disabled,readonly:this.readonly,"is-invalid":this.invalid&&e})}"
|
|
250
250
|
@click=${this._handleClick}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
|
-
var css_248z = css`:host([disabled]){cursor:not-allowed}.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.dropdown-item.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-40);pointer-events:none}
|
|
3
|
+
var css_248z = css`:host([disabled]){cursor:not-allowed}.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.dropdown-item.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-40);pointer-events:none}::slotted(*){color:inherit!important;display:flex;gap:var(--sgds-gap-sm);text-decoration:none!important}::slotted(a),::slotted(sgds-checkbox){flex:1;margin:calc(var(--sgds-padding-sm)*-1) calc(var(--sgds-padding-lg)*-1);padding:var(--sgds-padding-sm) var(--sgds-padding-lg)}.dropdown-item.mainnav-dropdown-link{padding:var(--sgds-padding-none)}.dropdown-item.mainnav-dropdown-link ::slotted(*){box-sizing:border-box;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}@media screen and (min-width:1024px){.dropdown-item.mainnav-dropdown-link ::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;
|
|
4
4
|
|
|
5
5
|
export { css_248z as default };
|
|
6
6
|
//# sourceMappingURL=dropdown-item.js.map
|
|
@@ -67,7 +67,7 @@ function fe(e){return(t,l)=>{const{slot:o,selector:r}=e??{},n="slot"+(o?`[name=$
|
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2020 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/const He=()=>new Ae;class Ae{}const Ve=new WeakMap,Oe=ge(class extends ye{render(e){return F}update(e,[t]){const l=t!==this.G;return l&&void 0!==this.G&&this.rt(void 0),(l||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),F}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let l=Ve.get(t);void 0===l&&(l=new WeakMap,Ve.set(t,l)),void 0!==l.get(this.G)&&this.G.call(this.ht,void 0),l.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?Ve.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Pe=Math.min,ze=Math.max,Be=Math.round,je=Math.floor,$e=e=>({x:e,y:e}),Le={left:"right",right:"left",bottom:"top",top:"bottom"},Ee={start:"end",end:"start"};function Se(e,t,l){return ze(e,Pe(t,l))}function ke(e,t){return"function"==typeof e?e(t):e}function Re(e){return e.split("-")[0]}function Ue(e){return e.split("-")[1]}function Te(e){return"x"===e?"y":"x"}function De(e){return"y"===e?"height":"width"}const Ie=new Set(["top","bottom"]);function Ne(e){return Ie.has(Re(e))?"y":"x"}function Fe(e){return Te(Ne(e))}function qe(e,t,l){void 0===l&&(l=!1);const o=Ue(e),r=Fe(e),n=De(r);let c="x"===r?o===(l?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[n]>t.floating[n]&&(c=Qe(c)),[c,Qe(c)]}function We(e){return e.replace(/start|end/g,e=>Ee[e])}const Ge=["left","right"],Ke=["right","left"],Ye=["top","bottom"],Je=["bottom","top"];function Xe(e,t,l,o){const r=Ue(e);let n=function(e,t,l){switch(e){case"top":case"bottom":return l?t?Ke:Ge:t?Ge:Ke;case"left":case"right":return t?Ye:Je;default:return[]}}(Re(e),"start"===l,o);return r&&(n=n.map(e=>e+"-"+r),t&&(n=n.concat(n.map(We)))),n}function Qe(e){return e.replace(/left|right|bottom|top/g,e=>Le[e])}function et(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:l,width:o,height:r}=e;return{width:o,height:r,top:l,left:t,right:t+o,bottom:l+r,x:t,y:l}}function lt(e,t,l){let{reference:o,floating:r}=e;const n=Ne(t),c=Fe(t),i=De(c),a=Re(t),s="y"===n,h=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,u=o[i]/2-r[i]/2;let v;switch(a){case"top":v={x:h,y:o.y-r.height};break;case"bottom":v={x:h,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:d};break;case"left":v={x:o.x-r.width,y:d};break;default:v={x:o.x,y:o.y}}switch(Ue(t)){case"start":v[c]-=u*(l&&s?-1:1);break;case"end":v[c]+=u*(l&&s?-1:1)}return v}async function ot(e,t){var l;void 0===t&&(t={});const{x:o,y:r,platform:n,rects:c,elements:i,strategy:a}=e,{boundary:s="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:u=!1,padding:v=0}=ke(t,e),f=et(v),p=i[u?"floating"===d?"reference":"floating":d],w=tt(await n.getClippingRect({element:null==(l=await(null==n.isElement?void 0:n.isElement(p)))||l?p:p.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(i.floating)),boundary:s,rootBoundary:h,strategy:a})),g="floating"===d?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(i.floating)),_=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},Z=tt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:g,offsetParent:m,strategy:a}):g);return{top:(w.top-Z.top+f.top)/_.y,bottom:(Z.bottom-w.bottom+f.bottom)/_.y,left:(w.left-Z.left+f.left)/_.x,right:(Z.right-w.right+f.right)/_.x}}const rt=new Set(["left","top"]);function nt(){return"undefined"!=typeof window}function ct(e){return st(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function at(e){var t;return null==(t=(st(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function st(e){return!!nt()&&(e instanceof Node||e instanceof it(e).Node)}function ht(e){return!!nt()&&(e instanceof Element||e instanceof it(e).Element)}function dt(e){return!!nt()&&(e instanceof HTMLElement||e instanceof it(e).HTMLElement)}function ut(e){return!(!nt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof it(e).ShadowRoot)}const vt=new Set(["inline","contents"]);function ft(e){const{overflow:t,overflowX:l,overflowY:o,display:r}=Ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+l)&&!vt.has(r)}const pt=new Set(["table","td","th"]);function wt(e){return pt.has(ct(e))}const gt=[":popover-open",":modal"];function mt(e){return gt.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const _t=["transform","translate","scale","rotate","perspective"],Zt=["transform","translate","scale","rotate","perspective","filter"],xt=["paint","layout","strict","content"];function Ct(e){const t=bt(),l=ht(e)?Ht(e):e;return _t.some(e=>!!l[e]&&"none"!==l[e])||!!l.containerType&&"normal"!==l.containerType||!t&&!!l.backdropFilter&&"none"!==l.backdropFilter||!t&&!!l.filter&&"none"!==l.filter||Zt.some(e=>(l.willChange||"").includes(e))||xt.some(e=>(l.contain||"").includes(e))}function bt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Mt=new Set(["html","body","#document"]);function yt(e){return Mt.has(ct(e))}function Ht(e){return it(e).getComputedStyle(e)}function At(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vt(e){if("html"===ct(e))return e;const t=e.assignedSlot||e.parentNode||ut(e)&&e.host||at(e);return ut(t)?t.host:t}function Ot(e){const t=Vt(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:dt(t)&&ft(t)?t:Ot(t)}function Pt(e,t,l){var o;void 0===t&&(t=[]),void 0===l&&(l=!0);const r=Ot(e),n=r===(null==(o=e.ownerDocument)?void 0:o.body),c=it(r);if(n){const e=zt(c);return t.concat(c,c.visualViewport||[],ft(r)?r:[],e&&l?Pt(e):[])}return t.concat(r,Pt(r,[],l))}function zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bt(e){const t=Ht(e);let l=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=dt(e),n=r?e.offsetWidth:l,c=r?e.offsetHeight:o,i=Be(l)!==n||Be(o)!==c;return i&&(l=n,o=c),{width:l,height:o,$:i}}function jt(e){return ht(e)?e:e.contextElement}function $t(e){const t=jt(e);if(!dt(t))return $e(1);const l=t.getBoundingClientRect(),{width:o,height:r,$:n}=Bt(t);let c=(n?Be(l.width):l.width)/o,i=(n?Be(l.height):l.height)/r;return c&&Number.isFinite(c)||(c=1),i&&Number.isFinite(i)||(i=1),{x:c,y:i}}const Lt=$e(0);function Et(e){const t=it(e);return bt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Lt}function St(e,t,l,o){void 0===t&&(t=!1),void 0===l&&(l=!1);const r=e.getBoundingClientRect(),n=jt(e);let c=$e(1);t&&(o?ht(o)&&(c=$t(o)):c=$t(e));const i=function(e,t,l){return void 0===t&&(t=!1),!(!l||t&&l!==it(e))&&t}(n,l,o)?Et(n):$e(0);let a=(r.left+i.x)/c.x,s=(r.top+i.y)/c.y,h=r.width/c.x,d=r.height/c.y;if(n){const e=it(n),t=o&&ht(o)?it(o):o;let l=e,r=zt(l);for(;r&&o&&t!==l;){const e=$t(r),t=r.getBoundingClientRect(),o=Ht(r),n=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,c=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;a*=e.x,s*=e.y,h*=e.x,d*=e.y,a+=n,s+=c,l=it(r),r=zt(l)}}return tt({width:h,height:d,x:a,y:s})}function kt(e,t){const l=At(e).scrollLeft;return t?t.left+l:St(at(e)).left+l}function Rt(e,t){const l=e.getBoundingClientRect();return{x:l.left+t.scrollLeft-kt(e,l),y:l.top+t.scrollTop}}const Ut=new Set(["absolute","fixed"]);function Tt(e,t,l){let o;if("viewport"===t)o=function(e,t){const l=it(e),o=at(e),r=l.visualViewport;let n=o.clientWidth,c=o.clientHeight,i=0,a=0;if(r){n=r.width,c=r.height;const e=bt();(!e||e&&"fixed"===t)&&(i=r.offsetLeft,a=r.offsetTop)}const s=kt(o);if(s<=0){const e=o.ownerDocument,t=e.body,l=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,c=Math.abs(o.clientWidth-t.clientWidth-r);c<=25&&(n-=c)}else s<=25&&(n+=s);return{width:n,height:c,x:i,y:a}}(e,l);else if("document"===t)o=function(e){const t=at(e),l=At(e),o=e.ownerDocument.body,r=ze(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=ze(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-l.scrollLeft+kt(e);const i=-l.scrollTop;return"rtl"===Ht(o).direction&&(c+=ze(t.clientWidth,o.clientWidth)-r),{width:r,height:n,x:c,y:i}}(at(e));else if(ht(t))o=function(e,t){const l=St(e,!0,"fixed"===t),o=l.top+e.clientTop,r=l.left+e.clientLeft,n=dt(e)?$t(e):$e(1);return{width:e.clientWidth*n.x,height:e.clientHeight*n.y,x:r*n.x,y:o*n.y}}(t,l);else{const l=Et(e);o={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return tt(o)}function Dt(e,t){const l=Vt(e);return!(l===t||!ht(l)||yt(l))&&("fixed"===Ht(l).position||Dt(l,t))}function It(e,t,l){const o=dt(t),r=at(t),n="fixed"===l,c=St(e,!0,n,t);let i={scrollLeft:0,scrollTop:0};const a=$e(0);function s(){a.x=kt(r)}if(o||!o&&!n)if(("body"!==ct(t)||ft(r))&&(i=At(t)),o){const e=St(t,!0,n,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&s();n&&!o&&r&&s();const h=!r||o||n?$e(0):Rt(r,i);return{x:c.left+i.scrollLeft-a.x-h.x,y:c.top+i.scrollTop-a.y-h.y,width:c.width,height:c.height}}function Nt(e){return"static"===Ht(e).position}function Ft(e,t){if(!dt(e)||"fixed"===Ht(e).position)return null;if(t)return t(e);let l=e.offsetParent;return at(e)===l&&(l=l.ownerDocument.body),l}function qt(e,t){const l=it(e);if(mt(e))return l;if(!dt(e)){let t=Vt(e);for(;t&&!yt(t);){if(ht(t)&&!Nt(t))return t;t=Vt(t)}return l}let o=Ft(e,t);for(;o&&wt(o)&&Nt(o);)o=Ft(o,t);return o&&yt(o)&&Nt(o)&&!Ct(o)?l:o||function(e){let t=Vt(e);for(;dt(t)&&!yt(t);){if(Ct(t))return t;if(mt(t))return null;t=Vt(t)}return null}(e)||l}const Wt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:l,offsetParent:o,strategy:r}=e;const n="fixed"===r,c=at(o),i=!!t&&mt(t.floating);if(o===c||i&&n)return l;let a={scrollLeft:0,scrollTop:0},s=$e(1);const h=$e(0),d=dt(o);if((d||!d&&!n)&&(("body"!==ct(o)||ft(c))&&(a=At(o)),dt(o))){const e=St(o);s=$t(o),h.x=e.x+o.clientLeft,h.y=e.y+o.clientTop}const u=!c||d||n?$e(0):Rt(c,a);return{width:l.width*s.x,height:l.height*s.y,x:l.x*s.x-a.scrollLeft*s.x+h.x+u.x,y:l.y*s.y-a.scrollTop*s.y+h.y+u.y}},getDocumentElement:at,getClippingRect:function(e){let{element:t,boundary:l,rootBoundary:o,strategy:r}=e;const n=[..."clippingAncestors"===l?mt(t)?[]:function(e,t){const l=t.get(e);if(l)return l;let o=Pt(e,[],!1).filter(e=>ht(e)&&"body"!==ct(e)),r=null;const n="fixed"===Ht(e).position;let c=n?Vt(e):e;for(;ht(c)&&!yt(c);){const t=Ht(c),l=Ct(c);l||"fixed"!==t.position||(r=null),(n?!l&&!r:!l&&"static"===t.position&&r&&Ut.has(r.position)||ft(c)&&!l&&Dt(e,c))?o=o.filter(e=>e!==c):r=t,c=Vt(c)}return t.set(e,o),o}(t,this._c):[].concat(l),o],c=n[0],i=n.reduce((e,l)=>{const o=Tt(t,l,r);return e.top=ze(o.top,e.top),e.right=Pe(o.right,e.right),e.bottom=Pe(o.bottom,e.bottom),e.left=ze(o.left,e.left),e},Tt(t,c,r));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:qt,getElementRects:async function(e){const t=this.getOffsetParent||qt,l=this.getDimensions,o=await l(e.floating);return{reference:It(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:l}=Bt(e);return{width:t,height:l}},getScale:$t,isElement:ht,isRTL:function(e){return"rtl"===Ht(e).direction}};function Gt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kt(e,t,l,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,s=jt(e),h=r||n?[...s?Pt(s):[],...Pt(t)]:[];h.forEach(e=>{r&&e.addEventListener("scroll",l,{passive:!0}),n&&e.addEventListener("resize",l)});const d=s&&i?function(e,t){let l,o=null;const r=at(e);function n(){var e;clearTimeout(l),null==(e=o)||e.disconnect(),o=null}return function c(i,a){void 0===i&&(i=!1),void 0===a&&(a=1),n();const s=e.getBoundingClientRect(),{left:h,top:d,width:u,height:v}=s;if(i||t(),!u||!v)return;const f={rootMargin:-je(d)+"px "+-je(r.clientWidth-(h+u))+"px "+-je(r.clientHeight-(d+v))+"px "+-je(h)+"px",threshold:ze(0,Pe(1,a))||1};let p=!0;function w(t){const o=t[0].intersectionRatio;if(o!==a){if(!p)return c();o?c(!1,o):l=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==o||Gt(s,e.getBoundingClientRect())||c(),p=!1}try{o=new IntersectionObserver(w,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(w,f)}o.observe(e)}(!0),n}(s,l):null;let u,v=-1,f=null;c&&(f=new ResizeObserver(e=>{let[o]=e;o&&o.target===s&&f&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),l()}),s&&!a&&f.observe(s),f.observe(t));let p=a?St(e):null;return a&&function t(){const o=St(e);p&&!Gt(p,o)&&l();p=o,u=requestAnimationFrame(t)}(),l(),()=>{var e;h.forEach(e=>{r&&e.removeEventListener("scroll",l),n&&e.removeEventListener("resize",l)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,a&&cancelAnimationFrame(u)}}const Yt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var l,o;const{x:r,y:n,placement:c,middlewareData:i}=t,a=await async function(e,t){const{placement:l,platform:o,elements:r}=e,n=await(null==o.isRTL?void 0:o.isRTL(r.floating)),c=Re(l),i=Ue(l),a="y"===Ne(l),s=rt.has(c)?-1:1,h=n&&a?-1:1,d=ke(t,e);let{mainAxis:u,crossAxis:v,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&"number"==typeof f&&(v="end"===i?-1*f:f),a?{x:v*h,y:u*s}:{x:u*s,y:v*h}}(t,e);return c===(null==(l=i.offset)?void 0:l.placement)&&null!=(o=i.arrow)&&o.alignmentOffset?{}:{x:r+a.x,y:n+a.y,data:{...a,placement:c}}}}},Jt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:l,y:o,placement:r}=t,{mainAxis:n=!0,crossAxis:c=!1,limiter:i={fn:e=>{let{x:t,y:l}=e;return{x:t,y:l}}},...a}=ke(e,t),s={x:l,y:o},h=await ot(t,a),d=Ne(Re(r)),u=Te(d);let v=s[u],f=s[d];if(n){const e="y"===u?"bottom":"right";v=Se(v+h["y"===u?"top":"left"],v,v-h[e])}if(c){const e="y"===d?"bottom":"right";f=Se(f+h["y"===d?"top":"left"],f,f-h[e])}const p=i.fn({...t,[u]:v,[d]:f});return{...p,data:{x:p.x-l,y:p.y-o,enabled:{[u]:n,[d]:c}}}}}},Xt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var l,o;const{placement:r,middlewareData:n,rects:c,initialPlacement:i,platform:a,elements:s}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:p=!0,...w}=ke(e,t);if(null!=(l=n.arrow)&&l.alignmentOffset)return{};const g=Re(r),m=Ne(i),_=Re(i)===i,Z=await(null==a.isRTL?void 0:a.isRTL(s.floating)),x=u||(_||!p?[Qe(i)]:function(e){const t=Qe(e);return[We(e),t,We(t)]}(i)),C="none"!==f;!u&&C&&x.push(...Xe(i,p,f,Z));const b=[i,...x],M=await ot(t,w),y=[];let H=(null==(o=n.flip)?void 0:o.overflows)||[];if(h&&y.push(M[g]),d){const e=qe(r,c,Z);y.push(M[e[0]],M[e[1]])}if(H=[...H,{placement:r,overflows:y}],!y.every(e=>e<=0)){var A,V;const e=((null==(A=n.flip)?void 0:A.index)||0)+1,t=b[e];if(t){if(!("alignment"===d&&m!==Ne(t))||H.every(e=>Ne(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:H},reset:{placement:t}}}let l=null==(V=H.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:V.placement;if(!l)switch(v){case"bestFit":{var O;const e=null==(O=H.filter(e=>{if(C){const t=Ne(e.placement);return t===m||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:O[0];e&&(l=e);break}case"initialPlacement":l=i}if(r!==l)return{reset:{placement:l}}}return{}}}},Qt=(e,t,l)=>{const o=new Map,r={platform:Wt,...l},n={...r.platform,_c:o};return(async(e,t,l)=>{const{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:c}=l,i=n.filter(Boolean),a=await(null==c.isRTL?void 0:c.isRTL(t));let s=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:d}=lt(s,o,a),u=o,v={},f=0;for(let l=0;l<i.length;l++){const{name:n,fn:p}=i[l],{x:w,y:g,data:m,reset:_}=await p({x:h,y:d,initialPlacement:o,placement:u,strategy:r,middlewareData:v,rects:s,platform:c,elements:{reference:e,floating:t}});h=null!=w?w:h,d=null!=g?g:d,v={...v,[n]:{...v[n],...m}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(u=_.placement),_.rects&&(s=!0===_.rects?await c.getElementRects({reference:e,floating:t,strategy:r}):_.rects),({x:h,y:d}=lt(s,u,a))),l=-1)}return{x:h,y:d,placement:u,strategy:r,middlewareData:v}})(e,t,{...r,platform:n})};var el=c`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;color:var(--sgds-body-color-default,#1a1a1a);display:block;font-family:var(--sgds-font-family-brand,"Inter",system-ui,sans-serif);font-size:var(--sgds-font-size-body-md,1rem);font-weight:var(--sgds-font-weight-regular,400);line-height:var(--sgds-line-height-xs,24px);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.1ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class tl extends ie{emit(e,t){const l=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(l),l}static define(e,t=this,l={}){if(customElements.get(e));else try{customElements.define(e,t,l)}catch(o){customElements.define(e,class extends t{},l)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}function ll(e,t,l){return new Promise(o=>{if((null==l?void 0:l.duration)===1/0)throw new Error("Promise-based animations must be finite.");const r=e.animate(t,Object.assign(Object.assign({},l),{duration:ol()?0:null==l?void 0:l.duration}));r.addEventListener("cancel",o,{once:!0}),r.addEventListener("finish",o,{once:!0})})}function ol(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}tl.styles=[el],tl.dependencies={},e([de({type:Boolean,reflect:!0})],tl.prototype,"ssr",void 0);const rl=new Map,nl=new WeakMap;function cl(e,t){const l=nl.get(e);if(null==l?void 0:l[t])return l[t];const o=rl.get(t);return o||{keyframes:[],options:{duration:0}}}function il(e,t){rl.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}class al extends tl{constructor(){super(...arguments),this.myDropdown=He(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("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=He(),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&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){if(!this.disabled&&!this.menuIsOpen){if(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this._startAutoUpdate(),this.menuRef.value){const e=(this.menuRef.value.getAttribute("data-placement")||"").startsWith("top")?"4px":"-4px",{options:t}=cl(this,"dropdown.show");await ll(this.menuRef.value,[{opacity:0,transform:`translateY(${e})`},{opacity:1,transform:"translateY(0)"}],t)}this.emit("sgds-after-show")}}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Kt(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}async hideMenu(e){if(this.menuIsOpen){if(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuRef.value){const e=(this.menuRef.value.getAttribute("data-placement")||"").startsWith("top")?"4px":"-4px",{options:t}=cl(this,"dropdown.hide");await ll(this.menuRef.value,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:`translateY(${e})`}],t)}this.menuIsOpen=!1,this.emit("sgds-after-hide"),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const l=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)},o=t.map(l),r=e.map(e=>{const r=l(e),n=o.indexOf(r);return-1!==n?t[n]:e}).concat(t.filter(t=>!e.some(e=>l(e)===l(t))));return r}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=[Yt(8),this.noFlip?void 0:Xt(),Jt()].filter(Boolean);let l=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(l=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const o=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:l}),{x:r,y:n,strategy:c,placement:i}=await Qt(this.myDropdown.value,this.menuRef.value,o);this.menuRef.value.setAttribute("data-placement",i),Object.assign(this.menuRef.value.style,{position:c,left:`${r}px`,top:`${n}px`})}}e([de({type:Boolean,state:!0})],al.prototype,"noFlip",void 0),e([de({type:Boolean,reflect:!0,state:!0})],al.prototype,"menuAlignRight",void 0),e([de({type:String,reflect:!0,state:!0})],al.prototype,"drop",void 0),e([de({type:Object})],al.prototype,"floatingOpts",void 0),e([de({type:Boolean,reflect:!0})],al.prototype,"menuIsOpen",void 0),e([de({type:Boolean,reflect:!0})],al.prototype,"disabled",void 0),e([de({type:Boolean,reflect:!0})],al.prototype,"readonly",void 0),il("dropdown.show",{keyframes:[],options:{duration:200,easing:"cubic-bezier(0.1, 0, 0.5, 0)"}}),il("dropdown.hide",{keyframes:[],options:{duration:200,easing:"cubic-bezier(0.15, 0.6, 0.6, 1)"}});class sl extends al{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(),l=t.find(t=>e.composedPath().includes(t));if(!l)return;const o=t.indexOf(l);this.nextDropdownItemNo=o+1,this.prevDropdownItemNo=o<=0?t.length-1:o-1,l.disabled||(this.emit("sgds-select",{detail:{item:l}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const l=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");l&&l.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"Escape":this.menuIsOpen&&(e.preventDefault(),this.hideMenu());break;case"Enter":t.find(t=>e.composedPath().includes(t))&&this.handleSelectSlot(e);break}}_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=>"menuitem"===e.getAttribute("role")&&!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&&!e.readonly)}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const l=(e%t.length+t.length)%t.length,o=t[l];this.emit("i-sgds-option-focus",{detail:{option:o}}),this.nextDropdownItemNo=(l+1)%t.length,this.prevDropdownItemNo=(l-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===o?"0":"-1"),e===o&&t.focus()})}}function hl(e,t){const l=Object.assign({waitUntilFirstUpdate:!1},t);return(t,o)=>{const{update:r}=t;if(e in t){const n=e;t.update=function(e){if(e.has(n)){const t=e.get(n),r=this[n];t!==r&&(l.waitUntilFirstUpdate&&!this.hasUpdated||this[o](t,r))}r.call(this,e)}}}}sl.styles=al.styles,e([function(e,t){return(l,o,r)=>{const n=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof o?l:r??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return ve(l,o,{get(){let l=e.call(this);return void 0===l&&(l=n(this),(null!==l||this.hasUpdated)&&t.call(this,l)),l}})}return ve(l,o,{get(){return n(this)}})}}("ul.dropdown-menu")],sl.prototype,"menu",void 0),e([ue()],sl.prototype,"nextDropdownItemNo",void 0),e([ue()],sl.prototype,"prevDropdownItemNo",void 0),e([de({type:Boolean,reflect:!0})],sl.prototype,"hidden",void 0);var dl=c`:host([menuisopen]:not([disabled]):not([readonly])) .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-192);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:var(--sgds-z-index-floating)}.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%}`,ul=c`.dropdown{display:flex;height:inherit;position:relative}.dropdown-menu{max-width:var(--sgds-dimension-320)}.toggler-container{flex:1;pointer-events:none}.toggler-container ::slotted(*){pointer-events:auto}`;class vl extends sl{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.close="default",this.menuRef=Oe()}async _handleClick(e){if(this.disabled)return;const t=this._toggler[0];if(!t)return void this.toggleMenu();if(e.composedPath().includes(t))return void this.toggleMenu();if(!this.menuIsOpen)return;const l=this.menuRef.value;l&&e.composedPath().includes(l)||this.hideMenu()}_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.updateFloatingPosition(),this._handleDisabled()}_handleTogglerSlotChange(e){const t=e.target.assignedElements({flatten:!0})[0];t&&(t.setAttribute("aria-haspopup","menu"),t.setAttribute("aria-expanded",String(this.menuIsOpen)))}_handleMenuIsOpenChange(){const e=this._toggler[0];e&&e.setAttribute("aria-expanded",String(this.menuIsOpen))}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return I`
|
|
70
|
+
*/const He=()=>new Ae;class Ae{}const Ve=new WeakMap,Oe=ge(class extends ye{render(e){return F}update(e,[t]){const l=t!==this.G;return l&&void 0!==this.G&&this.rt(void 0),(l||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),F}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let l=Ve.get(t);void 0===l&&(l=new WeakMap,Ve.set(t,l)),void 0!==l.get(this.G)&&this.G.call(this.ht,void 0),l.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?Ve.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Pe=Math.min,ze=Math.max,Be=Math.round,je=Math.floor,$e=e=>({x:e,y:e}),Le={left:"right",right:"left",bottom:"top",top:"bottom"},Ee={start:"end",end:"start"};function Se(e,t,l){return ze(e,Pe(t,l))}function ke(e,t){return"function"==typeof e?e(t):e}function Re(e){return e.split("-")[0]}function Ue(e){return e.split("-")[1]}function Te(e){return"x"===e?"y":"x"}function De(e){return"y"===e?"height":"width"}const Ie=new Set(["top","bottom"]);function Ne(e){return Ie.has(Re(e))?"y":"x"}function Fe(e){return Te(Ne(e))}function qe(e,t,l){void 0===l&&(l=!1);const o=Ue(e),r=Fe(e),n=De(r);let c="x"===r?o===(l?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[n]>t.floating[n]&&(c=Qe(c)),[c,Qe(c)]}function We(e){return e.replace(/start|end/g,e=>Ee[e])}const Ge=["left","right"],Ke=["right","left"],Ye=["top","bottom"],Je=["bottom","top"];function Xe(e,t,l,o){const r=Ue(e);let n=function(e,t,l){switch(e){case"top":case"bottom":return l?t?Ke:Ge:t?Ge:Ke;case"left":case"right":return t?Ye:Je;default:return[]}}(Re(e),"start"===l,o);return r&&(n=n.map(e=>e+"-"+r),t&&(n=n.concat(n.map(We)))),n}function Qe(e){return e.replace(/left|right|bottom|top/g,e=>Le[e])}function et(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:l,width:o,height:r}=e;return{width:o,height:r,top:l,left:t,right:t+o,bottom:l+r,x:t,y:l}}function lt(e,t,l){let{reference:o,floating:r}=e;const n=Ne(t),c=Fe(t),i=De(c),a=Re(t),s="y"===n,h=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,u=o[i]/2-r[i]/2;let v;switch(a){case"top":v={x:h,y:o.y-r.height};break;case"bottom":v={x:h,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:d};break;case"left":v={x:o.x-r.width,y:d};break;default:v={x:o.x,y:o.y}}switch(Ue(t)){case"start":v[c]-=u*(l&&s?-1:1);break;case"end":v[c]+=u*(l&&s?-1:1)}return v}async function ot(e,t){var l;void 0===t&&(t={});const{x:o,y:r,platform:n,rects:c,elements:i,strategy:a}=e,{boundary:s="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:u=!1,padding:v=0}=ke(t,e),f=et(v),p=i[u?"floating"===d?"reference":"floating":d],w=tt(await n.getClippingRect({element:null==(l=await(null==n.isElement?void 0:n.isElement(p)))||l?p:p.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(i.floating)),boundary:s,rootBoundary:h,strategy:a})),g="floating"===d?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(i.floating)),_=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},Z=tt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:g,offsetParent:m,strategy:a}):g);return{top:(w.top-Z.top+f.top)/_.y,bottom:(Z.bottom-w.bottom+f.bottom)/_.y,left:(w.left-Z.left+f.left)/_.x,right:(Z.right-w.right+f.right)/_.x}}const rt=new Set(["left","top"]);function nt(){return"undefined"!=typeof window}function ct(e){return st(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function at(e){var t;return null==(t=(st(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function st(e){return!!nt()&&(e instanceof Node||e instanceof it(e).Node)}function ht(e){return!!nt()&&(e instanceof Element||e instanceof it(e).Element)}function dt(e){return!!nt()&&(e instanceof HTMLElement||e instanceof it(e).HTMLElement)}function ut(e){return!(!nt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof it(e).ShadowRoot)}const vt=new Set(["inline","contents"]);function ft(e){const{overflow:t,overflowX:l,overflowY:o,display:r}=Ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+l)&&!vt.has(r)}const pt=new Set(["table","td","th"]);function wt(e){return pt.has(ct(e))}const gt=[":popover-open",":modal"];function mt(e){return gt.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const _t=["transform","translate","scale","rotate","perspective"],Zt=["transform","translate","scale","rotate","perspective","filter"],xt=["paint","layout","strict","content"];function Ct(e){const t=bt(),l=ht(e)?Ht(e):e;return _t.some(e=>!!l[e]&&"none"!==l[e])||!!l.containerType&&"normal"!==l.containerType||!t&&!!l.backdropFilter&&"none"!==l.backdropFilter||!t&&!!l.filter&&"none"!==l.filter||Zt.some(e=>(l.willChange||"").includes(e))||xt.some(e=>(l.contain||"").includes(e))}function bt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Mt=new Set(["html","body","#document"]);function yt(e){return Mt.has(ct(e))}function Ht(e){return it(e).getComputedStyle(e)}function At(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vt(e){if("html"===ct(e))return e;const t=e.assignedSlot||e.parentNode||ut(e)&&e.host||at(e);return ut(t)?t.host:t}function Ot(e){const t=Vt(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:dt(t)&&ft(t)?t:Ot(t)}function Pt(e,t,l){var o;void 0===t&&(t=[]),void 0===l&&(l=!0);const r=Ot(e),n=r===(null==(o=e.ownerDocument)?void 0:o.body),c=it(r);if(n){const e=zt(c);return t.concat(c,c.visualViewport||[],ft(r)?r:[],e&&l?Pt(e):[])}return t.concat(r,Pt(r,[],l))}function zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bt(e){const t=Ht(e);let l=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=dt(e),n=r?e.offsetWidth:l,c=r?e.offsetHeight:o,i=Be(l)!==n||Be(o)!==c;return i&&(l=n,o=c),{width:l,height:o,$:i}}function jt(e){return ht(e)?e:e.contextElement}function $t(e){const t=jt(e);if(!dt(t))return $e(1);const l=t.getBoundingClientRect(),{width:o,height:r,$:n}=Bt(t);let c=(n?Be(l.width):l.width)/o,i=(n?Be(l.height):l.height)/r;return c&&Number.isFinite(c)||(c=1),i&&Number.isFinite(i)||(i=1),{x:c,y:i}}const Lt=$e(0);function Et(e){const t=it(e);return bt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Lt}function St(e,t,l,o){void 0===t&&(t=!1),void 0===l&&(l=!1);const r=e.getBoundingClientRect(),n=jt(e);let c=$e(1);t&&(o?ht(o)&&(c=$t(o)):c=$t(e));const i=function(e,t,l){return void 0===t&&(t=!1),!(!l||t&&l!==it(e))&&t}(n,l,o)?Et(n):$e(0);let a=(r.left+i.x)/c.x,s=(r.top+i.y)/c.y,h=r.width/c.x,d=r.height/c.y;if(n){const e=it(n),t=o&&ht(o)?it(o):o;let l=e,r=zt(l);for(;r&&o&&t!==l;){const e=$t(r),t=r.getBoundingClientRect(),o=Ht(r),n=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,c=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;a*=e.x,s*=e.y,h*=e.x,d*=e.y,a+=n,s+=c,l=it(r),r=zt(l)}}return tt({width:h,height:d,x:a,y:s})}function kt(e,t){const l=At(e).scrollLeft;return t?t.left+l:St(at(e)).left+l}function Rt(e,t){const l=e.getBoundingClientRect();return{x:l.left+t.scrollLeft-kt(e,l),y:l.top+t.scrollTop}}const Ut=new Set(["absolute","fixed"]);function Tt(e,t,l){let o;if("viewport"===t)o=function(e,t){const l=it(e),o=at(e),r=l.visualViewport;let n=o.clientWidth,c=o.clientHeight,i=0,a=0;if(r){n=r.width,c=r.height;const e=bt();(!e||e&&"fixed"===t)&&(i=r.offsetLeft,a=r.offsetTop)}const s=kt(o);if(s<=0){const e=o.ownerDocument,t=e.body,l=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,c=Math.abs(o.clientWidth-t.clientWidth-r);c<=25&&(n-=c)}else s<=25&&(n+=s);return{width:n,height:c,x:i,y:a}}(e,l);else if("document"===t)o=function(e){const t=at(e),l=At(e),o=e.ownerDocument.body,r=ze(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=ze(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-l.scrollLeft+kt(e);const i=-l.scrollTop;return"rtl"===Ht(o).direction&&(c+=ze(t.clientWidth,o.clientWidth)-r),{width:r,height:n,x:c,y:i}}(at(e));else if(ht(t))o=function(e,t){const l=St(e,!0,"fixed"===t),o=l.top+e.clientTop,r=l.left+e.clientLeft,n=dt(e)?$t(e):$e(1);return{width:e.clientWidth*n.x,height:e.clientHeight*n.y,x:r*n.x,y:o*n.y}}(t,l);else{const l=Et(e);o={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return tt(o)}function Dt(e,t){const l=Vt(e);return!(l===t||!ht(l)||yt(l))&&("fixed"===Ht(l).position||Dt(l,t))}function It(e,t,l){const o=dt(t),r=at(t),n="fixed"===l,c=St(e,!0,n,t);let i={scrollLeft:0,scrollTop:0};const a=$e(0);function s(){a.x=kt(r)}if(o||!o&&!n)if(("body"!==ct(t)||ft(r))&&(i=At(t)),o){const e=St(t,!0,n,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&s();n&&!o&&r&&s();const h=!r||o||n?$e(0):Rt(r,i);return{x:c.left+i.scrollLeft-a.x-h.x,y:c.top+i.scrollTop-a.y-h.y,width:c.width,height:c.height}}function Nt(e){return"static"===Ht(e).position}function Ft(e,t){if(!dt(e)||"fixed"===Ht(e).position)return null;if(t)return t(e);let l=e.offsetParent;return at(e)===l&&(l=l.ownerDocument.body),l}function qt(e,t){const l=it(e);if(mt(e))return l;if(!dt(e)){let t=Vt(e);for(;t&&!yt(t);){if(ht(t)&&!Nt(t))return t;t=Vt(t)}return l}let o=Ft(e,t);for(;o&&wt(o)&&Nt(o);)o=Ft(o,t);return o&&yt(o)&&Nt(o)&&!Ct(o)?l:o||function(e){let t=Vt(e);for(;dt(t)&&!yt(t);){if(Ct(t))return t;if(mt(t))return null;t=Vt(t)}return null}(e)||l}const Wt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:l,offsetParent:o,strategy:r}=e;const n="fixed"===r,c=at(o),i=!!t&&mt(t.floating);if(o===c||i&&n)return l;let a={scrollLeft:0,scrollTop:0},s=$e(1);const h=$e(0),d=dt(o);if((d||!d&&!n)&&(("body"!==ct(o)||ft(c))&&(a=At(o)),dt(o))){const e=St(o);s=$t(o),h.x=e.x+o.clientLeft,h.y=e.y+o.clientTop}const u=!c||d||n?$e(0):Rt(c,a);return{width:l.width*s.x,height:l.height*s.y,x:l.x*s.x-a.scrollLeft*s.x+h.x+u.x,y:l.y*s.y-a.scrollTop*s.y+h.y+u.y}},getDocumentElement:at,getClippingRect:function(e){let{element:t,boundary:l,rootBoundary:o,strategy:r}=e;const n=[..."clippingAncestors"===l?mt(t)?[]:function(e,t){const l=t.get(e);if(l)return l;let o=Pt(e,[],!1).filter(e=>ht(e)&&"body"!==ct(e)),r=null;const n="fixed"===Ht(e).position;let c=n?Vt(e):e;for(;ht(c)&&!yt(c);){const t=Ht(c),l=Ct(c);l||"fixed"!==t.position||(r=null),(n?!l&&!r:!l&&"static"===t.position&&r&&Ut.has(r.position)||ft(c)&&!l&&Dt(e,c))?o=o.filter(e=>e!==c):r=t,c=Vt(c)}return t.set(e,o),o}(t,this._c):[].concat(l),o],c=n[0],i=n.reduce((e,l)=>{const o=Tt(t,l,r);return e.top=ze(o.top,e.top),e.right=Pe(o.right,e.right),e.bottom=Pe(o.bottom,e.bottom),e.left=ze(o.left,e.left),e},Tt(t,c,r));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:qt,getElementRects:async function(e){const t=this.getOffsetParent||qt,l=this.getDimensions,o=await l(e.floating);return{reference:It(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:l}=Bt(e);return{width:t,height:l}},getScale:$t,isElement:ht,isRTL:function(e){return"rtl"===Ht(e).direction}};function Gt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kt(e,t,l,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,s=jt(e),h=r||n?[...s?Pt(s):[],...Pt(t)]:[];h.forEach(e=>{r&&e.addEventListener("scroll",l,{passive:!0}),n&&e.addEventListener("resize",l)});const d=s&&i?function(e,t){let l,o=null;const r=at(e);function n(){var e;clearTimeout(l),null==(e=o)||e.disconnect(),o=null}return function c(i,a){void 0===i&&(i=!1),void 0===a&&(a=1),n();const s=e.getBoundingClientRect(),{left:h,top:d,width:u,height:v}=s;if(i||t(),!u||!v)return;const f={rootMargin:-je(d)+"px "+-je(r.clientWidth-(h+u))+"px "+-je(r.clientHeight-(d+v))+"px "+-je(h)+"px",threshold:ze(0,Pe(1,a))||1};let p=!0;function w(t){const o=t[0].intersectionRatio;if(o!==a){if(!p)return c();o?c(!1,o):l=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==o||Gt(s,e.getBoundingClientRect())||c(),p=!1}try{o=new IntersectionObserver(w,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(w,f)}o.observe(e)}(!0),n}(s,l):null;let u,v=-1,f=null;c&&(f=new ResizeObserver(e=>{let[o]=e;o&&o.target===s&&f&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),l()}),s&&!a&&f.observe(s),f.observe(t));let p=a?St(e):null;return a&&function t(){const o=St(e);p&&!Gt(p,o)&&l();p=o,u=requestAnimationFrame(t)}(),l(),()=>{var e;h.forEach(e=>{r&&e.removeEventListener("scroll",l),n&&e.removeEventListener("resize",l)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,a&&cancelAnimationFrame(u)}}const Yt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var l,o;const{x:r,y:n,placement:c,middlewareData:i}=t,a=await async function(e,t){const{placement:l,platform:o,elements:r}=e,n=await(null==o.isRTL?void 0:o.isRTL(r.floating)),c=Re(l),i=Ue(l),a="y"===Ne(l),s=rt.has(c)?-1:1,h=n&&a?-1:1,d=ke(t,e);let{mainAxis:u,crossAxis:v,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&"number"==typeof f&&(v="end"===i?-1*f:f),a?{x:v*h,y:u*s}:{x:u*s,y:v*h}}(t,e);return c===(null==(l=i.offset)?void 0:l.placement)&&null!=(o=i.arrow)&&o.alignmentOffset?{}:{x:r+a.x,y:n+a.y,data:{...a,placement:c}}}}},Jt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:l,y:o,placement:r}=t,{mainAxis:n=!0,crossAxis:c=!1,limiter:i={fn:e=>{let{x:t,y:l}=e;return{x:t,y:l}}},...a}=ke(e,t),s={x:l,y:o},h=await ot(t,a),d=Ne(Re(r)),u=Te(d);let v=s[u],f=s[d];if(n){const e="y"===u?"bottom":"right";v=Se(v+h["y"===u?"top":"left"],v,v-h[e])}if(c){const e="y"===d?"bottom":"right";f=Se(f+h["y"===d?"top":"left"],f,f-h[e])}const p=i.fn({...t,[u]:v,[d]:f});return{...p,data:{x:p.x-l,y:p.y-o,enabled:{[u]:n,[d]:c}}}}}},Xt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var l,o;const{placement:r,middlewareData:n,rects:c,initialPlacement:i,platform:a,elements:s}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:p=!0,...w}=ke(e,t);if(null!=(l=n.arrow)&&l.alignmentOffset)return{};const g=Re(r),m=Ne(i),_=Re(i)===i,Z=await(null==a.isRTL?void 0:a.isRTL(s.floating)),x=u||(_||!p?[Qe(i)]:function(e){const t=Qe(e);return[We(e),t,We(t)]}(i)),C="none"!==f;!u&&C&&x.push(...Xe(i,p,f,Z));const b=[i,...x],M=await ot(t,w),y=[];let H=(null==(o=n.flip)?void 0:o.overflows)||[];if(h&&y.push(M[g]),d){const e=qe(r,c,Z);y.push(M[e[0]],M[e[1]])}if(H=[...H,{placement:r,overflows:y}],!y.every(e=>e<=0)){var A,V;const e=((null==(A=n.flip)?void 0:A.index)||0)+1,t=b[e];if(t){if(!("alignment"===d&&m!==Ne(t))||H.every(e=>Ne(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:H},reset:{placement:t}}}let l=null==(V=H.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:V.placement;if(!l)switch(v){case"bestFit":{var O;const e=null==(O=H.filter(e=>{if(C){const t=Ne(e.placement);return t===m||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:O[0];e&&(l=e);break}case"initialPlacement":l=i}if(r!==l)return{reset:{placement:l}}}return{}}}},Qt=(e,t,l)=>{const o=new Map,r={platform:Wt,...l},n={...r.platform,_c:o};return(async(e,t,l)=>{const{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:c}=l,i=n.filter(Boolean),a=await(null==c.isRTL?void 0:c.isRTL(t));let s=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:d}=lt(s,o,a),u=o,v={},f=0;for(let l=0;l<i.length;l++){const{name:n,fn:p}=i[l],{x:w,y:g,data:m,reset:_}=await p({x:h,y:d,initialPlacement:o,placement:u,strategy:r,middlewareData:v,rects:s,platform:c,elements:{reference:e,floating:t}});h=null!=w?w:h,d=null!=g?g:d,v={...v,[n]:{...v[n],...m}},_&&f<=50&&(f++,"object"==typeof _&&(_.placement&&(u=_.placement),_.rects&&(s=!0===_.rects?await c.getElementRects({reference:e,floating:t,strategy:r}):_.rects),({x:h,y:d}=lt(s,u,a))),l=-1)}return{x:h,y:d,placement:u,strategy:r,middlewareData:v}})(e,t,{...r,platform:n})};var el=c`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;color:var(--sgds-body-color-default,#1a1a1a);display:block;font-family:var(--sgds-font-family-brand,"Inter",system-ui,sans-serif);font-size:var(--sgds-font-size-body-md,1rem);font-weight:var(--sgds-font-weight-regular,400);line-height:var(--sgds-line-height-xs,24px);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.1ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class tl extends ie{emit(e,t){const l=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(l),l}static define(e,t=this,l={}){if(customElements.get(e));else try{customElements.define(e,t,l)}catch(o){customElements.define(e,class extends t{},l)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}function ll(e,t,l){return new Promise(o=>{if((null==l?void 0:l.duration)===1/0)throw new Error("Promise-based animations must be finite.");const r=e.animate(t,Object.assign(Object.assign({},l),{duration:ol()?0:null==l?void 0:l.duration}));r.addEventListener("cancel",o,{once:!0}),r.addEventListener("finish",o,{once:!0})})}function ol(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}tl.styles=[el],tl.dependencies={},e([de({type:Boolean,reflect:!0})],tl.prototype,"ssr",void 0);const rl=new Map,nl=new WeakMap;function cl(e,t){const l=nl.get(e);if(null==l?void 0:l[t])return l[t];const o=rl.get(t);return o||{keyframes:[],options:{duration:0}}}function il(e,t){rl.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}class al extends tl{constructor(){super(...arguments),this.myDropdown=He(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("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=He(),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&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){if(!this.disabled&&!this.menuIsOpen){if(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this._startAutoUpdate(),this.menuRef.value){const e=(this.menuRef.value.getAttribute("data-placement")||"").startsWith("top")?"4px":"-4px",{options:t}=cl(this,"dropdown.show");await ll(this.menuRef.value,[{opacity:0,transform:`translateY(${e})`},{opacity:1,transform:"translateY(0)"}],t)}this.emit("sgds-after-show")}}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Kt(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}async hideMenu(e){if(this.menuIsOpen){if(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuRef.value){const e=(this.menuRef.value.getAttribute("data-placement")||"").startsWith("top")?"4px":"-4px",{options:t}=cl(this,"dropdown.hide");await ll(this.menuRef.value,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:`translateY(${e})`}],t)}this.menuIsOpen=!1,this.emit("sgds-after-hide"),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const l=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)},o=t.map(l),r=e.map(e=>{const r=l(e),n=o.indexOf(r);return-1!==n?t[n]:e}).concat(t.filter(t=>!e.some(e=>l(e)===l(t))));return r}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=[Yt(8),this.noFlip?void 0:Xt(),Jt()].filter(Boolean);let l=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(l=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const o=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:l}),{x:r,y:n,strategy:c,placement:i}=await Qt(this.myDropdown.value,this.menuRef.value,o);this.menuRef.value.setAttribute("data-placement",i),Object.assign(this.menuRef.value.style,{position:c,left:`${r}px`,top:`${n}px`})}}e([de({type:Boolean,state:!0})],al.prototype,"noFlip",void 0),e([de({type:Boolean,reflect:!0,state:!0})],al.prototype,"menuAlignRight",void 0),e([de({type:String,reflect:!0,state:!0})],al.prototype,"drop",void 0),e([de({type:Object})],al.prototype,"floatingOpts",void 0),e([de({type:Boolean,reflect:!0})],al.prototype,"menuIsOpen",void 0),e([de({type:Boolean,reflect:!0})],al.prototype,"disabled",void 0),e([de({type:Boolean,reflect:!0})],al.prototype,"readonly",void 0),il("dropdown.show",{keyframes:[],options:{duration:200,easing:"cubic-bezier(0.1, 0, 0.5, 0)"}}),il("dropdown.hide",{keyframes:[],options:{duration:200,easing:"cubic-bezier(0.15, 0.6, 0.6, 1)"}});class sl extends al{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(),l=t.find(t=>e.composedPath().includes(t));if(!l)return;const o=t.indexOf(l);this.nextDropdownItemNo=o+1,this.prevDropdownItemNo=o<=0?t.length-1:o-1,l.disabled||(this.emit("sgds-select",{detail:{item:l}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const l=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");l&&l.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.find(t=>e.composedPath().includes(t))&&this.handleSelectSlot(e);break}}_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 l=(e%t.length+t.length)%t.length,o=t[l];this.emit("i-sgds-option-focus",{detail:{option:o}}),this.nextDropdownItemNo=(l+1)%t.length,this.prevDropdownItemNo=(l-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===o?"0":"-1"),e===o&&t.focus()})}}function hl(e,t){const l=Object.assign({waitUntilFirstUpdate:!1},t);return(t,o)=>{const{update:r}=t;if(e in t){const n=e;t.update=function(e){if(e.has(n)){const t=e.get(n),r=this[n];t!==r&&(l.waitUntilFirstUpdate&&!this.hasUpdated||this[o](t,r))}r.call(this,e)}}}}sl.styles=al.styles,e([function(e,t){return(l,o,r)=>{const n=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof o?l:r??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return ve(l,o,{get(){let l=e.call(this);return void 0===l&&(l=n(this),(null!==l||this.hasUpdated)&&t.call(this,l)),l}})}return ve(l,o,{get(){return n(this)}})}}("ul.dropdown-menu")],sl.prototype,"menu",void 0),e([ue()],sl.prototype,"nextDropdownItemNo",void 0),e([ue()],sl.prototype,"prevDropdownItemNo",void 0),e([de({type:Boolean,reflect:!0})],sl.prototype,"hidden",void 0);var dl=c`:host([menuisopen]:not([disabled]):not([readonly])) .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-192);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:var(--sgds-z-index-floating)}.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%}`,ul=c`.dropdown{display:flex;height:inherit;position:relative}.dropdown-menu{max-width:var(--sgds-dimension-320)}.toggler-container{flex:1;pointer-events:none}.toggler-container ::slotted(*){pointer-events:auto}`;class vl extends sl{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.close="default",this.menuRef=Oe()}async _handleClick(e){if(this.disabled)return;const t=this._toggler[0];if(!t)return void this.toggleMenu();if(e.composedPath().includes(t))return void this.toggleMenu();if(!this.menuIsOpen)return;const l=this.menuRef.value;l&&e.composedPath().includes(l)||this.hideMenu()}_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.updateFloatingPosition(),this._handleDisabled()}_handleTogglerSlotChange(e){const t=e.target.assignedElements({flatten:!0})[0];t&&(t.setAttribute("aria-haspopup","menu"),t.setAttribute("aria-expanded",String(this.menuIsOpen)))}_handleMenuIsOpenChange(){const e=this._toggler[0];e&&e.setAttribute("aria-expanded",String(this.menuIsOpen))}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return I`
|
|
71
71
|
<div class="dropdown" @click=${this._handleClick}>
|
|
72
72
|
<div class="toggler-container" ${Oe(this.myDropdown)}>
|
|
73
73
|
<slot name="toggler" @slotchange=${this._handleTogglerSlotChange}></slot>
|
|
@@ -87,15 +87,15 @@ const fl=ge(class extends me{constructor(e){if(super(e),e.type!==pe||"class"!==e
|
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright 2018 Google LLC
|
|
89
89
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
90
|
-
*/var wl=c`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;const gl=new Map;class ml extends tl{constructor(){super(...arguments),this.size="lg"}willUpdate(e){e.has("name")&&this._loadIcon(this.name)}async _loadIcon(e){if(!e)return void(this._icon=void 0);if(gl.has(e))return void(this._icon=gl.get(e));const t=pl[e];if(!t)return console.warn(`Icon not found: ${e}`),void(this._icon=void 0);try{const l=await t();gl.set(e,l.default),this._icon=l.default}catch(t){console.warn(`Failed to load icon: ${e}`),this._icon=void 0}}updated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("svg");t&&(this.ariaLabel?(t.removeAttribute("aria-hidden"),t.setAttribute("aria-label",this.ariaLabel)):(t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")))}render(){var e;return null!==(e=this._icon)&&void 0!==e?e:F}}ml.styles=[...tl.styles,wl],e([de({type:String,reflect:!0})],ml.prototype,"name",void 0),e([de({type:String,reflect:!0})],ml.prototype,"size",void 0),e([de({type:String})],ml.prototype,"ariaLabel",void 0),e([ue()],ml.prototype,"_icon",void 0);var _l=c`:host([disabled]){cursor:not-allowed}.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.dropdown-item.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-40);pointer-events:none}
|
|
90
|
+
*/var wl=c`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;const gl=new Map;class ml extends tl{constructor(){super(...arguments),this.size="lg"}willUpdate(e){e.has("name")&&this._loadIcon(this.name)}async _loadIcon(e){if(!e)return void(this._icon=void 0);if(gl.has(e))return void(this._icon=gl.get(e));const t=pl[e];if(!t)return console.warn(`Icon not found: ${e}`),void(this._icon=void 0);try{const l=await t();gl.set(e,l.default),this._icon=l.default}catch(t){console.warn(`Failed to load icon: ${e}`),this._icon=void 0}}updated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("svg");t&&(this.ariaLabel?(t.removeAttribute("aria-hidden"),t.setAttribute("aria-label",this.ariaLabel)):(t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")))}render(){var e;return null!==(e=this._icon)&&void 0!==e?e:F}}ml.styles=[...tl.styles,wl],e([de({type:String,reflect:!0})],ml.prototype,"name",void 0),e([de({type:String,reflect:!0})],ml.prototype,"size",void 0),e([de({type:String})],ml.prototype,"ariaLabel",void 0),e([ue()],ml.prototype,"_icon",void 0);var _l=c`:host([disabled]){cursor:not-allowed}.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.dropdown-item.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-40);pointer-events:none}::slotted(*){color:inherit!important;display:flex;gap:var(--sgds-gap-sm);text-decoration:none!important}::slotted(a),::slotted(sgds-checkbox){flex:1;margin:calc(var(--sgds-padding-sm)*-1) calc(var(--sgds-padding-lg)*-1);padding:var(--sgds-padding-sm) var(--sgds-padding-lg)}.dropdown-item.mainnav-dropdown-link{padding:var(--sgds-padding-none)}.dropdown-item.mainnav-dropdown-link ::slotted(*){box-sizing:border-box;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}@media screen and (min-width:1024px){.dropdown-item.mainnav-dropdown-link ::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;class Zl extends tl{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.ariaLabel=""}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",e=>{"Enter"===e.key&&this.anchor.length>0&&this.anchor[0].click()}),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){return I`
|
|
91
91
|
<div
|
|
92
|
-
class="dropdown-item ${fl({disabled:this.disabled,active:this.active
|
|
93
|
-
tabindex=${this.disabled
|
|
92
|
+
class="dropdown-item ${fl({disabled:this.disabled,active:this.active})}"
|
|
93
|
+
tabindex=${this.disabled?"-1":"0"}
|
|
94
94
|
aria-label=${(e=>e??F)(this.ariaLabel||void 0)}
|
|
95
95
|
>
|
|
96
96
|
<slot></slot>
|
|
97
97
|
</div>
|
|
98
|
-
`}}function xl(e,t){customElements.get(e)||customElements.define(e,t)}Zl.styles=[ul,_l],Zl.dependencies={"sgds-icon":ml},e([fe({flatten:!0})],Zl.prototype,"anchor",void 0),e([de({type:Boolean})],Zl.prototype,"active",void 0),e([de({type:Boolean,reflect:!0})],Zl.prototype,"disabled",void 0),e([de({type:
|
|
98
|
+
`}}function xl(e,t){customElements.get(e)||customElements.define(e,t)}Zl.styles=[ul,_l],Zl.dependencies={"sgds-icon":ml},e([fe({flatten:!0})],Zl.prototype,"anchor",void 0),e([de({type:Boolean})],Zl.prototype,"active",void 0),e([de({type:Boolean,reflect:!0})],Zl.prototype,"disabled",void 0),e([de({type:String})],Zl.prototype,"ariaLabel",void 0),xl("sgds-dropdown",vl),xl("sgds-dropdown-item",Zl);var Cl=I`
|
|
99
99
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
100
100
|
<path
|
|
101
101
|
fill="currentColor"
|