@govtechsg/sgds-web-component 3.13.1 → 3.14.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/Masthead/index.js +1 -1
- package/components/Breadcrumb/index.umd.min.js +5 -5
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-item.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Footer/footer.js +1 -1
- package/components/Footer/index.umd.min.js +1 -1
- package/components/Footer/index.umd.min.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +18 -18
- 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-dropdown.js +2 -2
- package/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/components/Masthead/index.umd.min.js +1 -1
- package/components/Masthead/index.umd.min.js.map +1 -1
- package/components/Masthead/masthead.js +1 -1
- package/components/OverflowMenu/index.umd.min.js +1 -1
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/Pagination/index.umd.min.js +3 -1
- package/components/Pagination/index.umd.min.js.map +1 -1
- package/components/Pagination/pagination.js +1 -1
- package/components/Pagination/sgds-pagination.js +2 -0
- package/components/Pagination/sgds-pagination.js.map +1 -1
- package/components/index.umd.min.js +61 -59
- package/components/index.umd.min.js.map +1 -1
- package/css/utility.css +41 -0
- package/index.umd.min.js +8 -6
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/Dropdown/dropdown-item.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-item.js +1 -1
- package/react/components/Footer/footer.cjs.js +1 -1
- package/react/components/Footer/footer.js +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-dropdown.cjs.js +2 -2
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.js +2 -2
- package/react/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/react/components/Masthead/masthead.cjs.js +1 -1
- package/react/components/Masthead/masthead.js +1 -1
- package/react/components/Pagination/pagination.cjs.js +1 -1
- package/react/components/Pagination/pagination.js +1 -1
- package/react/components/Pagination/sgds-pagination.cjs.js +2 -0
- package/react/components/Pagination/sgds-pagination.cjs.js.map +1 -1
- package/react/components/Pagination/sgds-pagination.js +2 -0
- package/react/components/Pagination/sgds-pagination.js.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(e,t,a,i){var l
|
|
1
|
+
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(e,t,a,i){var n,l=arguments.length,o=l<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(l<3?n(o):l>3?n(t,a,o):n(t,a))||o);return l>3&&o&&Object.defineProperty(t,a,o),o}"function"==typeof SuppressedError&&SuppressedError;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2021 Google LLC
|
|
@@ -25,28 +25,28 @@ class a{constructor(e,t,a,i){if(this.subscribe=!1,this.provided=!1,this.value=vo
|
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2021 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/class
|
|
28
|
+
*/class n extends Event{constructor(e,t){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}}class l extends i{constructor(e,a,i){super(void 0!==a.context?a.initialValue:i),this.onContextRequest=e=>{if(e.context!==this.context)return;const t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context)return;if((e.contextTarget??e.composedPath()[0])===this.host)return;const a=new Set;for(const[e,{consumerHost:i}]of this.subscriptions)a.has(e)||(a.add(e),i.dispatchEvent(new t(this.context,i,e,!0)));e.stopPropagation()},this.host=e,void 0!==a.context?this.context=a.context:this.context=a,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new n(this.context,this.host))}}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/function o({context:e}){return(t,a)=>{const i=new WeakMap;if("object"==typeof a)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new
|
|
33
|
+
*/function o({context:e}){return(t,a)=>{const i=new WeakMap;if("object"==typeof a)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new l(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer(t=>{i.set(t,new l(t,{context:e}))});const n=Object.getOwnPropertyDescriptor(t,a);let o;if(void 0===n){const e=new WeakMap;o={get(){return e.get(this)},set(t){i.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{const e=n.set;o={...n,set(t){i.get(this).setValue(t),e?.call(this,t)}}}return void Object.defineProperty(t,a,o)}}}
|
|
34
34
|
/**
|
|
35
35
|
* @license
|
|
36
36
|
* Copyright 2022 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
-
*/function s({context:e,subscribe:t}){return(i,
|
|
38
|
+
*/function s({context:e,subscribe:t}){return(i,n)=>{"object"==typeof n?n.addInitializer(function(){new a(this,{context:e,callback:e=>{i.set.call(this,e)},subscribe:t})}):i.constructor.addInitializer(i=>{new a(i,{context:e,callback:e=>{i[n]=e},subscribe:t})})}}
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2019 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/const r=globalThis,c=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),h=new WeakMap;class v{constructor(e,t,a){if(this._$cssResult$=!0,a!==d)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(c&&void 0===e){const a=void 0!==t&&1===t.length;a&&(e=h.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),a&&h.set(t,e))}return e}toString(){return this.cssText}}const p=(e,...t)=>{const a=1===e.length?e[0]:t.reduce((t,a,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(a)+e[i+1],e[0]);return new v(a,e,d)},g=e=>{let t="";for(const a of e.cssRules)t+=a.cssText;return new v("string"==typeof(a=t)?a:String(a),void 0,d);var a},u=c?e=>e:e=>e instanceof CSSStyleSheet?g(e):e,{is:w,defineProperty:f,getOwnPropertyDescriptor:m,getOwnPropertyNames:b,getOwnPropertySymbols:x,getPrototypeOf:y}=Object,Z=globalThis;let C;const M=Z.trustedTypes,_=M?M.emptyScript:"",V=Z.reactiveElementPolyfillSupportDevMode;Z.litIssuedWarnings??=new Set,C=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,Z.litIssuedWarnings.has(t)||Z.litIssuedWarnings.has(e)||(console.warn(t),Z.litIssuedWarnings.add(t))},queueMicrotask(()=>{C("dev-mode","Lit is in dev mode. Not recommended for production!"),Z.ShadyDOM?.inUse&&void 0===V&&C("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const H=(e,t)=>e,k={toAttribute(e,t){switch(t){case Boolean:e=e?_:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let a=e;switch(t){case Boolean:a=null!==e;break;case Number:a=null===e?null:Number(e);break;case Object:case Array:try{a=JSON.parse(e)}catch(e){a=null}}return a}},$=(e,t)=>!w(e,t),B={attribute:!0,type:String,converter:k,reflect:!1,useDefault:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),Z.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=B){if(t.state&&(t.attribute=!1),this.__prepare(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const a=Symbol.for(`${String(e)} (@property() cache)`),i=this.getPropertyDescriptor(e,a,t);void 0!==i&&f(this.prototype,e,i)}}static getPropertyDescriptor(e,t,a){const{get:i,set:l}=m(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==i){if("value"in(m(this.prototype,e)??{}))throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);C("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(t){const n=i?.call(this);l?.call(this,t),this.requestUpdate(e,n,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??B}static __prepare(){if(this.hasOwnProperty(H("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(H("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(H("properties"))){const e=this.properties,t=[...b(e),...x(e)];for(const a of t)this.createProperty(a,e[a])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,a]of t)this.elementProperties.set(e,a)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const a=this.__attributeNameForProperty(e,t);void 0!==a&&this.__attributeToPropertyMap.set(a,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&C("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&C("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const a=new Set(e.flat(1/0).reverse());for(const e of a)t.unshift(u(e))}else void 0!==e&&t.push(u(e));return t}static __attributeNameForProperty(e,t){const a=t.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise(e=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach(e=>e(this))}addController(e){(this.__controllers??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){const e=new Map,t=this.constructor.elementProperties;for(const a of t.keys())this.hasOwnProperty(a)&&(e.set(a,this[a]),delete this[a]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(c)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const a of t){const t=document.createElement("style"),i=r.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=a.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,a){this._$attributeToProperty(e,a)}__propertyToAttribute(e,t){const a=this.constructor.elementProperties.get(e),i=this.constructor.__attributeNameForProperty(e,a);if(void 0!==i&&!0===a.reflect){const l=(void 0!==a.converter?.toAttribute?a.converter:k).toAttribute(t,a.type);this.constructor.enabledWarnings.includes("migration")&&void 0===l&&C("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==l?this.removeAttribute(i):this.setAttribute(i,l),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const a=this.constructor,i=a.__attributeToPropertyMap.get(e);if(void 0!==i&&this.__reflectingProperty!==i){const e=a.getPropertyOptions(i),l="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:k;this.__reflectingProperty=i;const n=l.fromAttribute(t,e.type);this[i]=n??this.__defaultValues?.get(i)??n,this.__reflectingProperty=null}}requestUpdate(e,t,a,i=!1,l){if(void 0!==e){e instanceof Event&&C("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");const n=this.constructor;!1===i&&(l=this[e]),a??=n.getPropertyOptions(e);if(!((a.hasChanged??$)(l,t)||a.useDefault&&a.reflect&&l===this.__defaultValues?.get(e)&&!this.hasAttribute(n.__attributeNameForProperty(e,a))))return;this._$changeProperty(e,t,a)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,{useDefault:a,reflect:i,wrapped:l},n){a&&!(this.__defaultValues??=new Map).has(e)&&(this.__defaultValues.set(e,n??t??this[e]),!0!==l||void 0!==n)||(this._$changedProperties.has(e)||(this.hasUpdated||a||(t=void 0),this._$changedProperties.set(e,t)),!0===i&&this.__reflectingProperty!==e&&(this.__reflectingProperties??=new Set).add(e))}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){const e=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof e?.then&&C("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),e}performUpdate(){if(!this.isUpdatePending)return;var e;if(e={kind:"update"},Z.emitLitDebugLogEvents&&Z.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter(e=>this.hasOwnProperty(e)&&e in y(this));if(e.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${e.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[e,t]of this.__instanceProperties)this[e]=t;this.__instanceProperties=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,a]of e){const{wrapped:e}=a,i=this[t];!0!==e||this._$changedProperties.has(t)||void 0===i||this._$changeProperty(t,void 0,a,i)}}let t=!1;const a=this._$changedProperties;try{t=this.shouldUpdate(a),t?(this.willUpdate(a),this.__controllers?.forEach(e=>e.hostUpdate?.()),this.update(a)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(a)}willUpdate(e){}_$didUpdate(e){this.__controllers?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&C("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach(e=>this.__propertyToAttribute(e,this[e])),this.__markUpdated()}updated(e){}firstUpdated(e){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[H("elementProperties")]=new Map,S[H("finalized")]=new Map,V?.({ReactiveElement:S});{S.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(H("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};S.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},S.disableWarning=function(t){e(this);const a=this.enabledWarnings.indexOf(t);a>=0&&this.enabledWarnings.splice(a,1)}}(Z.reactiveElementVersions??=[]).push("2.1.2"),Z.reactiveElementVersions.length>1&&queueMicrotask(()=>{C("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
|
|
43
|
+
*/const r=globalThis,c=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),h=new WeakMap;class v{constructor(e,t,a){if(this._$cssResult$=!0,a!==d)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(c&&void 0===e){const a=void 0!==t&&1===t.length;a&&(e=h.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),a&&h.set(t,e))}return e}toString(){return this.cssText}}const p=(e,...t)=>{const a=1===e.length?e[0]:t.reduce((t,a,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(a)+e[i+1],e[0]);return new v(a,e,d)},g=e=>{let t="";for(const a of e.cssRules)t+=a.cssText;return new v("string"==typeof(a=t)?a:String(a),void 0,d);var a},u=c?e=>e:e=>e instanceof CSSStyleSheet?g(e):e,{is:w,defineProperty:f,getOwnPropertyDescriptor:m,getOwnPropertyNames:b,getOwnPropertySymbols:x,getPrototypeOf:y}=Object,Z=globalThis;let C;const M=Z.trustedTypes,_=M?M.emptyScript:"",V=Z.reactiveElementPolyfillSupportDevMode;Z.litIssuedWarnings??=new Set,C=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,Z.litIssuedWarnings.has(t)||Z.litIssuedWarnings.has(e)||(console.warn(t),Z.litIssuedWarnings.add(t))},queueMicrotask(()=>{C("dev-mode","Lit is in dev mode. Not recommended for production!"),Z.ShadyDOM?.inUse&&void 0===V&&C("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const H=(e,t)=>e,k={toAttribute(e,t){switch(t){case Boolean:e=e?_:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let a=e;switch(t){case Boolean:a=null!==e;break;case Number:a=null===e?null:Number(e);break;case Object:case Array:try{a=JSON.parse(e)}catch(e){a=null}}return a}},$=(e,t)=>!w(e,t),B={attribute:!0,type:String,converter:k,reflect:!1,useDefault:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),Z.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=B){if(t.state&&(t.attribute=!1),this.__prepare(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const a=Symbol.for(`${String(e)} (@property() cache)`),i=this.getPropertyDescriptor(e,a,t);void 0!==i&&f(this.prototype,e,i)}}static getPropertyDescriptor(e,t,a){const{get:i,set:n}=m(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==i){if("value"in(m(this.prototype,e)??{}))throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);C("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(t){const l=i?.call(this);n?.call(this,t),this.requestUpdate(e,l,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??B}static __prepare(){if(this.hasOwnProperty(H("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(H("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(H("properties"))){const e=this.properties,t=[...b(e),...x(e)];for(const a of t)this.createProperty(a,e[a])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,a]of t)this.elementProperties.set(e,a)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const a=this.__attributeNameForProperty(e,t);void 0!==a&&this.__attributeToPropertyMap.set(a,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&C("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&C("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const a=new Set(e.flat(1/0).reverse());for(const e of a)t.unshift(u(e))}else void 0!==e&&t.push(u(e));return t}static __attributeNameForProperty(e,t){const a=t.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise(e=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach(e=>e(this))}addController(e){(this.__controllers??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){const e=new Map,t=this.constructor.elementProperties;for(const a of t.keys())this.hasOwnProperty(a)&&(e.set(a,this[a]),delete this[a]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(c)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const a of t){const t=document.createElement("style"),i=r.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=a.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,a){this._$attributeToProperty(e,a)}__propertyToAttribute(e,t){const a=this.constructor.elementProperties.get(e),i=this.constructor.__attributeNameForProperty(e,a);if(void 0!==i&&!0===a.reflect){const n=(void 0!==a.converter?.toAttribute?a.converter:k).toAttribute(t,a.type);this.constructor.enabledWarnings.includes("migration")&&void 0===n&&C("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==n?this.removeAttribute(i):this.setAttribute(i,n),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const a=this.constructor,i=a.__attributeToPropertyMap.get(e);if(void 0!==i&&this.__reflectingProperty!==i){const e=a.getPropertyOptions(i),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:k;this.__reflectingProperty=i;const l=n.fromAttribute(t,e.type);this[i]=l??this.__defaultValues?.get(i)??l,this.__reflectingProperty=null}}requestUpdate(e,t,a,i=!1,n){if(void 0!==e){e instanceof Event&&C("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");const l=this.constructor;!1===i&&(n=this[e]),a??=l.getPropertyOptions(e);if(!((a.hasChanged??$)(n,t)||a.useDefault&&a.reflect&&n===this.__defaultValues?.get(e)&&!this.hasAttribute(l.__attributeNameForProperty(e,a))))return;this._$changeProperty(e,t,a)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,{useDefault:a,reflect:i,wrapped:n},l){a&&!(this.__defaultValues??=new Map).has(e)&&(this.__defaultValues.set(e,l??t??this[e]),!0!==n||void 0!==l)||(this._$changedProperties.has(e)||(this.hasUpdated||a||(t=void 0),this._$changedProperties.set(e,t)),!0===i&&this.__reflectingProperty!==e&&(this.__reflectingProperties??=new Set).add(e))}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){const e=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof e?.then&&C("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),e}performUpdate(){if(!this.isUpdatePending)return;var e;if(e={kind:"update"},Z.emitLitDebugLogEvents&&Z.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter(e=>this.hasOwnProperty(e)&&e in y(this));if(e.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${e.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[e,t]of this.__instanceProperties)this[e]=t;this.__instanceProperties=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,a]of e){const{wrapped:e}=a,i=this[t];!0!==e||this._$changedProperties.has(t)||void 0===i||this._$changeProperty(t,void 0,a,i)}}let t=!1;const a=this._$changedProperties;try{t=this.shouldUpdate(a),t?(this.willUpdate(a),this.__controllers?.forEach(e=>e.hostUpdate?.()),this.update(a)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(a)}willUpdate(e){}_$didUpdate(e){this.__controllers?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&C("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach(e=>this.__propertyToAttribute(e,this[e])),this.__markUpdated()}updated(e){}firstUpdated(e){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[H("elementProperties")]=new Map,S[H("finalized")]=new Map,V?.({ReactiveElement:S});{S.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(H("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};S.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},S.disableWarning=function(t){e(this);const a=this.enabledWarnings.indexOf(t);a>=0&&this.enabledWarnings.splice(a,1)}}(Z.reactiveElementVersions??=[]).push("2.1.2"),Z.reactiveElementVersions.length>1&&queueMicrotask(()=>{C("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2017 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
48
|
*/
|
|
49
|
-
const A=globalThis,L=e=>{A.emitLitDebugLogEvents&&A.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let E,P=0;A.litIssuedWarnings??=new Set,E=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",A.litIssuedWarnings.has(t)||A.litIssuedWarnings.has(e)||(console.warn(t),A.litIssuedWarnings.add(t))},queueMicrotask(()=>{E("dev-mode","Lit is in dev mode. Not recommended for production!")});const R=A.ShadyDOM?.inUse&&!0===A.ShadyDOM?.noPatch?A.ShadyDOM.wrap:e=>e,T=A.trustedTypes,O=T?T.createPolicy("lit-html",{createHTML:e=>e}):void 0,z=e=>e,N=(e,t,a)=>z,I=e=>{if(ve!==N)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ve=e},D=()=>{ve=N},U=(e,t,a)=>ve(e,t,a),W="$lit$",q=`lit$${Math.random().toFixed(9).slice(2)}$`,j="?"+q,F=`<${j}>`,K=document,J=()=>K.createComment(""),X=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Y=Array.isArray,G="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ee=/-->/g,te=/>/g,ae=new RegExp(`>|${G}(?:([^\\s"'>=/]+)(${G}*=${G}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ie=/'/g,le=/"/g,ne=/^(?:script|style|textarea|title)$/i,oe=(se=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&E("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:se,strings:e,values:t}));var se;const re=Symbol.for("lit-noChange"),ce=Symbol.for("lit-nothing"),de=new WeakMap,he=K.createTreeWalker(K,129);let ve=N;function pe(e,t){if(!Y(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==O?O.createHTML(t):t}class ge{constructor({strings:e,_$litType$:t},a){let i;this.parts=[];let l=0,n=0;const o=e.length-1,s=this.parts,[r,c]=((e,t)=>{const a=e.length-1,i=[];let l,n=2===t?"<svg>":3===t?"<math>":"",o=Q;for(let t=0;t<a;t++){const a=e[t];let s,r,c=-1,d=0;for(;d<a.length&&(o.lastIndex=d,r=o.exec(a),null!==r);)if(d=o.lastIndex,o===Q){if("!--"===r[1])o=ee;else if(void 0!==r[1])o=te;else if(void 0!==r[2])ne.test(r[2])&&(l=new RegExp(`</${r[2]}`,"g")),o=ae;else if(void 0!==r[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===ae?">"===r[0]?(o=l??Q,c=-1):void 0===r[1]?c=-2:(c=o.lastIndex-r[2].length,s=r[1],o=void 0===r[3]?ae:'"'===r[3]?le:ie):o===le||o===ie?o=ae:o===ee||o===te?o=Q:(o=ae,l=void 0);console.assert(-1===c||o===ae||o===ie||o===le,"unexpected parse state B");const h=o===ae&&e[t+1].startsWith("/>")?" ":"";n+=o===Q?a+F:c>=0?(i.push(s),a.slice(0,c)+W+a.slice(c)+q+h):a+q+(-2===c?t:h)}return[pe(e,n+(e[a]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]})(e,t);if(this.el=ge.createElement(r,a),he.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=he.nextNode())&&s.length<o;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(q)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);E("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(W)){const t=c[n++],a=i.getAttribute(e).split(q),o=/([.?@])?(.*)/.exec(t);s.push({type:1,index:l,name:o[2],strings:a,ctor:"."===o[1]?be:"?"===o[1]?xe:"@"===o[1]?ye:me}),i.removeAttribute(e)}else e.startsWith(q)&&(s.push({type:6,index:l}),i.removeAttribute(e));if(ne.test(i.tagName)){const e=i.textContent.split(q),t=e.length-1;if(t>0){i.textContent=T?T.emptyScript:"";for(let a=0;a<t;a++)i.append(e[a],J()),he.nextNode(),s.push({type:2,index:++l});i.append(e[t],J())}}}else if(8===i.nodeType){if(i.data===j)s.push({type:2,index:l});else{let e=-1;for(;-1!==(e=i.data.indexOf(q,e+1));)s.push({type:7,index:l}),e+=q.length-1}}l++}if(c.length!==n)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");L&&L({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const a=K.createElement("template");return a.innerHTML=e,a}}function ue(e,t,a=e,i){if(t===re)return t;let l=void 0!==i?a.__directives?.[i]:a.__directive;const n=X(t)?void 0:t._$litDirective$;return l?.constructor!==n&&(l?._$notifyDirectiveConnectionChanged?.(!1),void 0===n?l=void 0:(l=new n(e),l._$initialize(e,a,i)),void 0!==i?(a.__directives??=[])[i]=l:a.__directive=l),void 0!==l&&(t=ue(e,l._$resolve(e,t.values),l,i)),t}class we{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:a}=this._$template,i=(e?.creationScope??K).importNode(t,!0);he.currentNode=i;let l=he.nextNode(),n=0,o=0,s=a[0];for(;void 0!==s;){if(n===s.index){let t;2===s.type?t=new fe(l,l.nextSibling,this,e):1===s.type?t=new s.ctor(l,s.name,s.strings,this,e):6===s.type&&(t=new Ze(l,this,e)),this._$parts.push(t),s=a[++o]}n!==s?.index&&(l=he.nextNode(),n++)}return he.currentNode=K,i}_update(e){let t=0;for(const a of this._$parts)void 0!==a&&(L&&L({kind:"set part",part:a,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==a.strings?(a._$setValue(e,a,t),t+=a.strings.length-2):a._$setValue(e[t])),t++}}class fe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,a,i){this.type=2,this._$committedValue=ce,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=a,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=R(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ue(this,e,t),X(e))e===ce||null==e||""===e?(this._$committedValue!==ce&&(L&&L({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ce):e!==this._$committedValue&&e!==re&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>Y(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return R(R(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ve!==N){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}L&&L({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ce&&X(this._$committedValue)){const t=R(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=U(t,"data","property")),e=this._textSanitizer(e),L&&L({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=K.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=U(t,"data","property")),e=this._textSanitizer(e),L&&L({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:a}=e,i="number"==typeof a?this._$getTemplate(e):(void 0===a.el&&(a.el=ge.createElement(pe(a.h,a.h[0]),this.options)),a);if(this._$committedValue?._$template===i)L&&L({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new we(i,this),a=e._clone(this.options);L&&L({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:a,values:t}),e._update(t),L&&L({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:a,values:t}),this._commitNode(a),this._$committedValue=e}}_$getTemplate(e){let t=de.get(e.strings);return void 0===t&&de.set(e.strings,t=new ge(e)),t}_commitIterable(e){Y(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let a,i=0;for(const l of e)i===t.length?t.push(a=new fe(this._insert(J()),this._insert(J()),this,this.options)):a=t[i],a._$setValue(l),i++;i<t.length&&(this._$clear(a&&R(a._$endNode).nextSibling,i),t.length=i)}_$clear(e=R(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=R(e).nextSibling;R(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class me{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,a,i,l){this.type=1,this._$committedValue=ce,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=l,a.length>2||""!==a[0]||""!==a[1]?(this._$committedValue=new Array(a.length-1).fill(new String),this.strings=a):this._$committedValue=ce,this._sanitizer=void 0}_$setValue(e,t=this,a,i){const l=this.strings;let n=!1;if(void 0===l)e=ue(this,e,t,0),n=!X(e)||e!==this._$committedValue&&e!==re,n&&(this._$committedValue=e);else{const i=e;let o,s;for(e=l[0],o=0;o<l.length-1;o++)s=ue(this,i[a+o],t,o),s===re&&(s=this._$committedValue[o]),n||=!X(s)||s!==this._$committedValue[o],s===ce?e=ce:e!==ce&&(e+=(s??"")+l[o+1]),this._$committedValue[o]=s}n&&!i&&this._commitValue(e)}_commitValue(e){e===ce?R(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ve(this.element,this.name,"attribute")),e=this._sanitizer(e??""),L&&L({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),R(this.element).setAttribute(this.name,e??""))}}class be extends me{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ve(this.element,this.name,"property")),e=this._sanitizer(e),L&&L({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ce?void 0:e}}class xe extends me{constructor(){super(...arguments),this.type=4}_commitValue(e){L&&L({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ce),options:this.options}),R(this.element).toggleAttribute(this.name,!!e&&e!==ce)}}class ye extends me{constructor(e,t,a,i,l){if(super(e,t,a,i,l),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ue(this,e,t,0)??ce)===re)return;const a=this._$committedValue,i=e===ce&&a!==ce||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,l=e!==ce&&(a===ce||i);L&&L({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:l,oldListener:a}),i&&this.element.removeEventListener(this.name,this,a),l&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class Ze{constructor(e,t,a){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=a}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){L&&L({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ue(this,e)}}const Ce=A.litHtmlPolyfillSupportDevMode;Ce?.(ge,fe),(A.litHtmlVersions??=[]).push("3.3.2"),A.litHtmlVersions.length>1&&queueMicrotask(()=>{E("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const Me=(e,t,a)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=P++,l=a?.renderBefore??t;let n=l._$litPart$;if(L&&L({kind:"begin render",id:i,value:e,container:t,options:a,part:n}),void 0===n){const e=a?.renderBefore??null;l._$litPart$=n=new fe(t.insertBefore(J(),e),e,void 0,a??{})}return n._$setValue(e),L&&L({kind:"end render",id:i,value:e,container:t,options:a,part:n}),n};Me.setSanitizer=I,Me.createSanitizer=U,Me._testOnlyClearSanitizerFactoryDoNotCallOrElse=D;
|
|
49
|
+
const A=globalThis,L=e=>{A.emitLitDebugLogEvents&&A.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let E,P=0;A.litIssuedWarnings??=new Set,E=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",A.litIssuedWarnings.has(t)||A.litIssuedWarnings.has(e)||(console.warn(t),A.litIssuedWarnings.add(t))},queueMicrotask(()=>{E("dev-mode","Lit is in dev mode. Not recommended for production!")});const R=A.ShadyDOM?.inUse&&!0===A.ShadyDOM?.noPatch?A.ShadyDOM.wrap:e=>e,T=A.trustedTypes,O=T?T.createPolicy("lit-html",{createHTML:e=>e}):void 0,z=e=>e,N=(e,t,a)=>z,I=e=>{if(ve!==N)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ve=e},D=()=>{ve=N},U=(e,t,a)=>ve(e,t,a),W="$lit$",q=`lit$${Math.random().toFixed(9).slice(2)}$`,j="?"+q,F=`<${j}>`,K=document,J=()=>K.createComment(""),X=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Y=Array.isArray,G="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ee=/-->/g,te=/>/g,ae=new RegExp(`>|${G}(?:([^\\s"'>=/]+)(${G}*=${G}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ie=/'/g,ne=/"/g,le=/^(?:script|style|textarea|title)$/i,oe=(se=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&E("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:se,strings:e,values:t}));var se;const re=Symbol.for("lit-noChange"),ce=Symbol.for("lit-nothing"),de=new WeakMap,he=K.createTreeWalker(K,129);let ve=N;function pe(e,t){if(!Y(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==O?O.createHTML(t):t}class ge{constructor({strings:e,_$litType$:t},a){let i;this.parts=[];let n=0,l=0;const o=e.length-1,s=this.parts,[r,c]=((e,t)=>{const a=e.length-1,i=[];let n,l=2===t?"<svg>":3===t?"<math>":"",o=Q;for(let t=0;t<a;t++){const a=e[t];let s,r,c=-1,d=0;for(;d<a.length&&(o.lastIndex=d,r=o.exec(a),null!==r);)if(d=o.lastIndex,o===Q){if("!--"===r[1])o=ee;else if(void 0!==r[1])o=te;else if(void 0!==r[2])le.test(r[2])&&(n=new RegExp(`</${r[2]}`,"g")),o=ae;else if(void 0!==r[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===ae?">"===r[0]?(o=n??Q,c=-1):void 0===r[1]?c=-2:(c=o.lastIndex-r[2].length,s=r[1],o=void 0===r[3]?ae:'"'===r[3]?ne:ie):o===ne||o===ie?o=ae:o===ee||o===te?o=Q:(o=ae,n=void 0);console.assert(-1===c||o===ae||o===ie||o===ne,"unexpected parse state B");const h=o===ae&&e[t+1].startsWith("/>")?" ":"";l+=o===Q?a+F:c>=0?(i.push(s),a.slice(0,c)+W+a.slice(c)+q+h):a+q+(-2===c?t:h)}return[pe(e,l+(e[a]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]})(e,t);if(this.el=ge.createElement(r,a),he.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=he.nextNode())&&s.length<o;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(q)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);E("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(W)){const t=c[l++],a=i.getAttribute(e).split(q),o=/([.?@])?(.*)/.exec(t);s.push({type:1,index:n,name:o[2],strings:a,ctor:"."===o[1]?be:"?"===o[1]?xe:"@"===o[1]?ye:me}),i.removeAttribute(e)}else e.startsWith(q)&&(s.push({type:6,index:n}),i.removeAttribute(e));if(le.test(i.tagName)){const e=i.textContent.split(q),t=e.length-1;if(t>0){i.textContent=T?T.emptyScript:"";for(let a=0;a<t;a++)i.append(e[a],J()),he.nextNode(),s.push({type:2,index:++n});i.append(e[t],J())}}}else if(8===i.nodeType){if(i.data===j)s.push({type:2,index:n});else{let e=-1;for(;-1!==(e=i.data.indexOf(q,e+1));)s.push({type:7,index:n}),e+=q.length-1}}n++}if(c.length!==l)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");L&&L({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const a=K.createElement("template");return a.innerHTML=e,a}}function ue(e,t,a=e,i){if(t===re)return t;let n=void 0!==i?a.__directives?.[i]:a.__directive;const l=X(t)?void 0:t._$litDirective$;return n?.constructor!==l&&(n?._$notifyDirectiveConnectionChanged?.(!1),void 0===l?n=void 0:(n=new l(e),n._$initialize(e,a,i)),void 0!==i?(a.__directives??=[])[i]=n:a.__directive=n),void 0!==n&&(t=ue(e,n._$resolve(e,t.values),n,i)),t}class we{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:a}=this._$template,i=(e?.creationScope??K).importNode(t,!0);he.currentNode=i;let n=he.nextNode(),l=0,o=0,s=a[0];for(;void 0!==s;){if(l===s.index){let t;2===s.type?t=new fe(n,n.nextSibling,this,e):1===s.type?t=new s.ctor(n,s.name,s.strings,this,e):6===s.type&&(t=new Ze(n,this,e)),this._$parts.push(t),s=a[++o]}l!==s?.index&&(n=he.nextNode(),l++)}return he.currentNode=K,i}_update(e){let t=0;for(const a of this._$parts)void 0!==a&&(L&&L({kind:"set part",part:a,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==a.strings?(a._$setValue(e,a,t),t+=a.strings.length-2):a._$setValue(e[t])),t++}}class fe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,a,i){this.type=2,this._$committedValue=ce,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=a,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=R(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ue(this,e,t),X(e))e===ce||null==e||""===e?(this._$committedValue!==ce&&(L&&L({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ce):e!==this._$committedValue&&e!==re&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>Y(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return R(R(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ve!==N){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}L&&L({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ce&&X(this._$committedValue)){const t=R(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=U(t,"data","property")),e=this._textSanitizer(e),L&&L({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=K.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=U(t,"data","property")),e=this._textSanitizer(e),L&&L({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:a}=e,i="number"==typeof a?this._$getTemplate(e):(void 0===a.el&&(a.el=ge.createElement(pe(a.h,a.h[0]),this.options)),a);if(this._$committedValue?._$template===i)L&&L({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new we(i,this),a=e._clone(this.options);L&&L({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:a,values:t}),e._update(t),L&&L({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:a,values:t}),this._commitNode(a),this._$committedValue=e}}_$getTemplate(e){let t=de.get(e.strings);return void 0===t&&de.set(e.strings,t=new ge(e)),t}_commitIterable(e){Y(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let a,i=0;for(const n of e)i===t.length?t.push(a=new fe(this._insert(J()),this._insert(J()),this,this.options)):a=t[i],a._$setValue(n),i++;i<t.length&&(this._$clear(a&&R(a._$endNode).nextSibling,i),t.length=i)}_$clear(e=R(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=R(e).nextSibling;R(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class me{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,a,i,n){this.type=1,this._$committedValue=ce,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=n,a.length>2||""!==a[0]||""!==a[1]?(this._$committedValue=new Array(a.length-1).fill(new String),this.strings=a):this._$committedValue=ce,this._sanitizer=void 0}_$setValue(e,t=this,a,i){const n=this.strings;let l=!1;if(void 0===n)e=ue(this,e,t,0),l=!X(e)||e!==this._$committedValue&&e!==re,l&&(this._$committedValue=e);else{const i=e;let o,s;for(e=n[0],o=0;o<n.length-1;o++)s=ue(this,i[a+o],t,o),s===re&&(s=this._$committedValue[o]),l||=!X(s)||s!==this._$committedValue[o],s===ce?e=ce:e!==ce&&(e+=(s??"")+n[o+1]),this._$committedValue[o]=s}l&&!i&&this._commitValue(e)}_commitValue(e){e===ce?R(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ve(this.element,this.name,"attribute")),e=this._sanitizer(e??""),L&&L({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),R(this.element).setAttribute(this.name,e??""))}}class be extends me{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ve(this.element,this.name,"property")),e=this._sanitizer(e),L&&L({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ce?void 0:e}}class xe extends me{constructor(){super(...arguments),this.type=4}_commitValue(e){L&&L({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ce),options:this.options}),R(this.element).toggleAttribute(this.name,!!e&&e!==ce)}}class ye extends me{constructor(e,t,a,i,n){if(super(e,t,a,i,n),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ue(this,e,t,0)??ce)===re)return;const a=this._$committedValue,i=e===ce&&a!==ce||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,n=e!==ce&&(a===ce||i);L&&L({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:n,oldListener:a}),i&&this.element.removeEventListener(this.name,this,a),n&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class Ze{constructor(e,t,a){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=a}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){L&&L({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ue(this,e)}}const Ce=A.litHtmlPolyfillSupportDevMode;Ce?.(ge,fe),(A.litHtmlVersions??=[]).push("3.3.2"),A.litHtmlVersions.length>1&&queueMicrotask(()=>{E("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const Me=(e,t,a)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=P++,n=a?.renderBefore??t;let l=n._$litPart$;if(L&&L({kind:"begin render",id:i,value:e,container:t,options:a,part:l}),void 0===l){const e=a?.renderBefore??null;n._$litPart$=l=new fe(t.insertBefore(J(),e),e,void 0,a??{})}return l._$setValue(e),L&&L({kind:"end render",id:i,value:e,container:t,options:a,part:l}),l};Me.setSanitizer=I,Me.createSanitizer=U,Me._testOnlyClearSanitizerFactoryDoNotCallOrElse=D;
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2017 Google LLC
|
|
@@ -58,7 +58,7 @@ const _e=globalThis;let Ve;_e.litIssuedWarnings??=new Set,Ve=(e,t)=>{t+=` See ht
|
|
|
58
58
|
* Copyright 2017 Google LLC
|
|
59
59
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
60
|
*/
|
|
61
|
-
let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litElementVersions.length>1&&queueMicrotask(()=>{Ve("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,Be=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};const Se={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:$},Ae=(e=Se,t,a)=>{const{kind:i,metadata:
|
|
61
|
+
let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litElementVersions.length>1&&queueMicrotask(()=>{Ve("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,Be=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};const Se={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:$},Ae=(e=Se,t,a)=>{const{kind:i,metadata:n}=a;null==n&&Be("missing-class-metadata",`The class ${t} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let l=globalThis.litPropertyMetadata.get(n);if(void 0===l&&globalThis.litPropertyMetadata.set(n,l=new Map),"setter"===i&&((e=Object.create(e)).wrapped=!0),l.set(a.name,e),"accessor"===i){const{name:i}=a;return{set(a){const n=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,n,e,!0,a)},init(t){return void 0!==t&&this._$changeProperty(i,void 0,e,t),t}}}if("setter"===i){const{name:i}=a;return function(a){const n=this[i];t.call(this,a),this.requestUpdate(i,n,e,!0,a)}}throw new Error(`Unsupported decorator location: ${i}`)};function Le(e){return(t,a)=>"object"==typeof a?Ae(e,t,a):((e,t,a)=>{const i=t.hasOwnProperty(a);return t.constructor.createProperty(a,e),i?Object.getOwnPropertyDescriptor(t,a):void 0})(e,t,a)}
|
|
62
62
|
/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
@@ -73,12 +73,12 @@ let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright 2017 Google LLC
|
|
75
75
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
76
|
-
*/let Re;function Te(e,t){return(a,i,
|
|
76
|
+
*/let Re;function Te(e,t){return(a,i,n)=>{const l=a=>{const n=a.renderRoot?.querySelector(e)??null;if(null===n&&t&&!a.hasUpdated){const t="object"==typeof i?i.name:i;Re("",`@query'd field ${JSON.stringify(String(t))} with the 'cache' flag set for selector '${e}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return n};if(t){const{get:e,set:t}="object"==typeof i?a:n??(()=>{const e=Symbol(`${String(i)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return Pe(a,i,{get(){let a=e.call(this);return void 0===a&&(a=l(this),(null!==a||this.hasUpdated)&&t.call(this,a)),a}})}return Pe(a,i,{get(){return l(this)}})}}
|
|
77
77
|
/**
|
|
78
78
|
* @license
|
|
79
79
|
* Copyright 2021 Google LLC
|
|
80
80
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
81
|
-
*/function Oe(e){return(t,a)=>{const{slot:i,selector:
|
|
81
|
+
*/function Oe(e){return(t,a)=>{const{slot:i,selector:n}=e??{},l="slot"+(i?`[name=${i}]`:":not([name])");return Pe(t,a,{get(){const t=this.renderRoot?.querySelector(l),a=t?.assignedElements(e)??[];return void 0===n?a:a.filter(e=>e.matches(n))}})}}
|
|
82
82
|
/**
|
|
83
83
|
* @license
|
|
84
84
|
* Copyright 2017 Google LLC
|
|
@@ -88,12 +88,12 @@ let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
88
88
|
* @license
|
|
89
89
|
* Copyright 2018 Google LLC
|
|
90
90
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
91
|
-
*/const Ue=Ie(class extends De{constructor(e){if(super(e),e.type!==ze||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const a=e.element.classList;for(const e of this._previousClasses)e in t||(a.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(a.add(e),this._previousClasses.add(e)):(a.remove(e),this._previousClasses.delete(e)))}return re}});var We=p`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);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}}::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 qe extends He{emit(e,t){const a=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(a),a}static define(e,t=this,a={}){if(customElements.get(e));else try{customElements.define(e,t,a)}catch(i){customElements.define(e,class extends t{},a)}}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 je(e,t,a){return new Promise(i=>{if((null==a?void 0:a.duration)===1/0)throw new Error("Promise-based animations must be finite.");const
|
|
91
|
+
*/const Ue=Ie(class extends De{constructor(e){if(super(e),e.type!==ze||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const a=e.element.classList;for(const e of this._previousClasses)e in t||(a.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(a.add(e),this._previousClasses.add(e)):(a.remove(e),this._previousClasses.delete(e)))}return re}});var We=p`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);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}}::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 qe extends He{emit(e,t){const a=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(a),a}static define(e,t=this,a={}){if(customElements.get(e));else try{customElements.define(e,t,a)}catch(i){customElements.define(e,class extends t{},a)}}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 je(e,t,a){return new Promise(i=>{if((null==a?void 0:a.duration)===1/0)throw new Error("Promise-based animations must be finite.");const n=e.animate(t,Object.assign(Object.assign({},a),{duration:Fe()?0:null==a?void 0:a.duration}));n.addEventListener("cancel",i,{once:!0}),n.addEventListener("finish",i,{once:!0})})}function Fe(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ke(e,t){return e.map(e=>Object.assign(Object.assign({},e),{height:"auto"===e.height?`${t}px`:e.height}))}function Je(e){return Promise.all(e.getAnimations().map(e=>new Promise(t=>{const a=requestAnimationFrame(t);e.addEventListener("cancel",()=>a,{once:!0}),e.addEventListener("finish",()=>a,{once:!0}),e.cancel()})))}qe.styles=[We],qe.dependencies={},e([Le({type:Boolean,reflect:!0})],qe.prototype,"ssr",void 0);const Xe=new Map,Ye=new WeakMap;function Ge(e,t){const a=Ye.get(e);if(null==a?void 0:a[t])return a[t];const i=Xe.get(t);return i||{keyframes:[],options:{duration:0}}}function Qe(e,t){Xe.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function et(e,t){return new Promise(a=>{e.addEventListener(t,function i(n){n.target===e&&(e.removeEventListener(t,i),a())})})}function tt(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}function at(e,t){const a=Object.assign({waitUntilFirstUpdate:!1},t);return(t,i)=>{const{update:n}=t;if(e in t){const l=e;t.update=function(e){if(e.has(l)){const t=e.get(l),n=this[l];t!==n&&(a.waitUntilFirstUpdate&&!this.hasUpdated||this[i](t,n))}n.call(this,e)}}}}
|
|
92
92
|
/**
|
|
93
93
|
* @license
|
|
94
94
|
* Copyright 2018 Google LLC
|
|
95
95
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
96
|
-
*/const it=e=>e??ce,
|
|
96
|
+
*/const it=e=>e??ce,nt=Symbol.for(""),lt=e=>{if(e?.r===nt)return e?._$litStatic$},ot=(e,...t)=>({_$litStatic$:t.reduce((t,a,i)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw new Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(a)+e[i+1],e[0]),r:nt}),st=new Map,rt=(ct=oe,(e,...t)=>{const a=t.length;let i,n;const l=[],o=[];let s,r=0,c=!1;for(;r<a;){for(s=e[r];r<a&&void 0!==(n=t[r],i=lt(n));)s+=i+e[++r],c=!0;r!==a&&o.push(n),l.push(s),r++}if(r===a&&l.push(e[a]),c){const a=l.join("$$lit$$");void 0===(e=st.get(a))&&(l.raw=l,st.set(a,e=l)),t=o}return ct(e,...t)});
|
|
97
97
|
/**
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright 2020 Google LLC
|
|
@@ -2354,7 +2354,7 @@ let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2354
2354
|
size=${it(this._assignIconSize(this.size))}
|
|
2355
2355
|
></sgds-icon>`}
|
|
2356
2356
|
</${t}>
|
|
2357
|
-
`}}Et.styles=[...ht.styles,Lt],Et.dependencies={"sgds-icon":$t,"sgds-spinner":At},e([Le({type:String,reflect:!0})],Et.prototype,"name",void 0);const Pt="mainnav-context",Rt="mainnav-expanded-context";var Tt=p`:host{display:block;position:relative;z-index:1200}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);justify-content:space-between;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);min-height:80px;padding:0 var(--sgds-mainnav-padding-x);position:relative;width:100%}:host([fluid]) .navbar{max-width:none}
|
|
2357
|
+
`}}Et.styles=[...ht.styles,Lt],Et.dependencies={"sgds-icon":$t,"sgds-spinner":At},e([Le({type:String,reflect:!0})],Et.prototype,"name",void 0);const Pt="mainnav-context",Rt="mainnav-expanded-context";var Tt=p`:host{display:block;position:relative;z-index:1200}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);justify-content:space-between;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);min-height:80px;padding:0 var(--sgds-mainnav-mobile-padding-x);position:relative;width:100%}:host([fluid]) .navbar{max-width:none}.navbar-brand{align-items:center;display:flex;text-decoration:none;white-space:nowrap}.navbar-brand:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.navbar-nav{display:flex;flex-direction:column;height:100%;margin-bottom:0;margin-top:0;width:100%}nav>.navbar-body{background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08);padding:var(--sgds-padding-md) 0;position:absolute;transition:transform .2s ease-in-out;width:100%;z-index:2000}nav>.navbar-body .navbar-nav{height:100dvh;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px)}nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}@media screen and (max-width:767px){nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}.navbar-collapse{align-items:center;flex-basis:100%;flex-grow:1}.navbar-toggler{align-self:center}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-nav-scroll{overflow-y:auto}@media (min-width:512px){.navbar-expand-sm{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:1024px){.navbar{padding:0 var(--sgds-mainnav-padding-x)}.navbar-expand-lg{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1280px){.navbar-expand-xl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .nav-link{padding-left:var(--mainnav-nav-link-padding-x);padding-right:var(--mainnav-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1440px){.navbar-expand-xxl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}slot[name=non-collapsible]{align-items:center;display:flex;gap:var(--sgds-spacer-4);margin-left:auto}.slot-end{align-items:stretch;display:flex;gap:var(--sgds-gap-xs);margin-left:auto}.slot-end::slotted(:not([name$=-mainnav-item]):not([name$=-mainnav-dropdown])){align-self:center}`;const Ot={sm:512,md:768,lg:1024,xl:1280,xxl:1440,never:1/0,always:-1};class zt extends qe{constructor(){super(...arguments),this._breakpointReached=!1,this.expanded=!1,this.expanding=!1,this.brandHref="",this.collapseId=tt("mainnav","collapse"),this.expand="lg",this.fluid=!1,this.breakpointReached=!1,this._handleMobileNavBound=this._handleMobileNav.bind(this)}get defaultSlotItems(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}get endSlotItems(){return[...this.endNodes||[]].filter(e=>void 0!==e.tagName)}connectedCallback(){super.connectedCallback(),this._handleResize(),window.addEventListener("click",e=>this._handleClickOutOfElement(e,this.body)),window.addEventListener("resize",this._handleResize.bind(this))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("click",e=>this._handleClickOutOfElement(e,this.body)),window.removeEventListener("resize",this._handleResize.bind(this))}firstUpdated(e){super.firstUpdated(e),this.breakpointReached&&this.body&&(this.expanded=!1,this.body.hidden=!0,this._handleMobileNav(),this._breakpointReached=!0);[...this.defaultSlotItems,...this.endSlotItems].forEach(e=>{e.setAttribute("expand",this.expand)})}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.header)||this.hide()}_handleSummaryClick(){this.expanded?this.hide():(document.querySelector("body").style.overflow="hidden",this.show())}_handleResize(){const e=window.innerWidth<Ot[this.expand];e!==this.breakpointReached?this.requestUpdate():(this.body&&(this.body.hidden=!0),this.expanding=!1),e?(this._handleMobileNav(),this._breakpointReached||(this._breakpointReached=!0,window.addEventListener("scrollend",this._handleMobileNavBound))):(this._handleDesktopNav(),this._breakpointReached=!1,window.removeEventListener("scrollend",this._handleMobileNavBound))}async _handleMobileNav(){if(!this.nav)return;this.nav.appendChild(this.body),await customElements.whenDefined("sgds-masthead");const{bottom:e}=this.nav.getBoundingClientRect(),t=parseFloat(getComputedStyle(this.body).paddingTop)+parseFloat(getComputedStyle(this.body).paddingBottom);this.navScroll.style.maxHeight=`calc(100dvh - ${e}px - ${t}px)`}_handleDesktopNav(){var e;null===(e=this.navbar)||void 0===e||e.insertBefore(this.body,this.nonCollapsibleSlot)}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!1);await Je(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=Ge(this,"mainnav.show");await je(this.body,Ke(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!0);await Je(this.body);const{keyframes:e,options:t}=Ge(this,"mainnav.hide");await je(this.body,Ke(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}async handleOpenChange(){this.expanding?(await this._animateToShow(),this.expanded=!0):(this.header.focus(),await this._animateToHide(),this.expanded=!1)}async show(){if(!this.expanded)return this.expanding=!0,et(this,"sgds-after-show")}async hide(){if(this.expanded)return this.expanding=!1,document.querySelector("body").style.removeProperty("overflow"),et(this,"sgds-after-hide")}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{e.setAttribute("name",e.tagName.toLowerCase())})}render(){return this.breakpointReached=window.innerWidth<Ot[this.expand],oe`
|
|
2358
2358
|
<nav>
|
|
2359
2359
|
<div class="navbar ${this._expandClass()}">
|
|
2360
2360
|
<a class="navbar-brand" href=${this.brandHref} aria-label="brand-link">
|
|
@@ -2383,7 +2383,7 @@ let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2383
2383
|
></sgds-icon-button>
|
|
2384
2384
|
</div>
|
|
2385
2385
|
</nav>
|
|
2386
|
-
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}zt.styles=[...qe.styles,Tt],zt.dependencies={"sgds-icon-button":Et},e([o({context:Pt}),Ee()],zt.prototype,"_breakpointReached",void 0),e([o({context:Rt}),Ee()],zt.prototype,"expanded",void 0),e([Ee()],zt.prototype,"expanding",void 0),e([Te("nav")],zt.prototype,"nav",void 0),e([Te(".navbar")],zt.prototype,"navbar",void 0),e([Te(".navbar-toggler")],zt.prototype,"header",void 0),e([Te(".navbar-body")],zt.prototype,"body",void 0),e([Te(".navbar-nav-scroll")],zt.prototype,"navScroll",void 0),e([Te("slot[name='non-collapsible']")],zt.prototype,"nonCollapsibleSlot",void 0),e([Le({type:String})],zt.prototype,"brandHref",void 0),e([Le({type:String})],zt.prototype,"expand",void 0),e([Le({type:Boolean,reflect:!0})],zt.prototype,"fluid",void 0),e([Ee()],zt.prototype,"breakpointReached",void 0),e([Oe()],zt.prototype,"defaultNodes",void 0),e([Oe({slot:"end"})],zt.prototype,"endNodes",void 0),e([at("expanding",{waitUntilFirstUpdate:!0})],zt.prototype,"handleOpenChange",null),Qe("mainnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Qe("mainnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});const Nt=Math.min,It=Math.max,Dt=Math.round,Ut=Math.floor,Wt=e=>({x:e,y:e}),qt={left:"right",right:"left",bottom:"top",top:"bottom"},jt={start:"end",end:"start"};function Ft(e,t,a){return It(e,Nt(t,a))}function Kt(e,t){return"function"==typeof e?e(t):e}function Jt(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function Yt(e){return"x"===e?"y":"x"}function Gt(e){return"y"===e?"height":"width"}const Qt=new Set(["top","bottom"]);function ea(e){return Qt.has(Jt(e))?"y":"x"}function ta(e){return Yt(ea(e))}function aa(e,t,a){void 0===a&&(a=!1);const i=Xt(e),l=ta(e),n=Gt(l);let o="x"===l?i===(a?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[n]>t.floating[n]&&(o=ca(o)),[o,ca(o)]}function ia(e){return e.replace(/start|end/g,e=>jt[e])}const la=["left","right"],na=["right","left"],oa=["top","bottom"],sa=["bottom","top"];function ra(e,t,a,i){const l=Xt(e);let n=function(e,t,a){switch(e){case"top":case"bottom":return a?t?na:la:t?la:na;case"left":case"right":return t?oa:sa;default:return[]}}(Jt(e),"start"===a,i);return l&&(n=n.map(e=>e+"-"+l),t&&(n=n.concat(n.map(ia)))),n}function ca(e){return e.replace(/left|right|bottom|top/g,e=>qt[e])}function da(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 ha(e){const{x:t,y:a,width:i,height:l}=e;return{width:i,height:l,top:a,left:t,right:t+i,bottom:a+l,x:t,y:a}}function va(e,t,a){let{reference:i,floating:l}=e;const n=ea(t),o=ta(t),s=Gt(o),r=Jt(t),c="y"===n,d=i.x+i.width/2-l.width/2,h=i.y+i.height/2-l.height/2,v=i[s]/2-l[s]/2;let p;switch(r){case"top":p={x:d,y:i.y-l.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:h};break;case"left":p={x:i.x-l.width,y:h};break;default:p={x:i.x,y:i.y}}switch(Xt(t)){case"start":p[o]-=v*(a&&c?-1:1);break;case"end":p[o]+=v*(a&&c?-1:1)}return p}async function pa(e,t){var a;void 0===t&&(t={});const{x:i,y:l,platform:n,rects:o,elements:s,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:p=0}=Kt(t,e),g=da(p),u=s[v?"floating"===h?"reference":"floating":h],w=ha(await n.getClippingRect({element:null==(a=await(null==n.isElement?void 0:n.isElement(u)))||a?u:u.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:r})),f="floating"===h?{x:i,y:l,width:o.floating.width,height:o.floating.height}:o.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),b=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},x=ha(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:f,offsetParent:m,strategy:r}):f);return{top:(w.top-x.top+g.top)/b.y,bottom:(x.bottom-w.bottom+g.bottom)/b.y,left:(w.left-x.left+g.left)/b.x,right:(x.right-w.right+g.right)/b.x}}const ga=new Set(["left","top"]);function ua(){return"undefined"!=typeof window}function wa(e){return ba(e)?(e.nodeName||"").toLowerCase():"#document"}function fa(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ma(e){var t;return null==(t=(ba(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ba(e){return!!ua()&&(e instanceof Node||e instanceof fa(e).Node)}function xa(e){return!!ua()&&(e instanceof Element||e instanceof fa(e).Element)}function ya(e){return!!ua()&&(e instanceof HTMLElement||e instanceof fa(e).HTMLElement)}function Za(e){return!(!ua()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof fa(e).ShadowRoot)}const Ca=new Set(["inline","contents"]);function Ma(e){const{overflow:t,overflowX:a,overflowY:i,display:l}=Ra(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+a)&&!Ca.has(l)}const _a=new Set(["table","td","th"]);function Va(e){return _a.has(wa(e))}const Ha=[":popover-open",":modal"];function ka(e){return Ha.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const $a=["transform","translate","scale","rotate","perspective"],Ba=["transform","translate","scale","rotate","perspective","filter"],Sa=["paint","layout","strict","content"];function Aa(e){const t=La(),a=xa(e)?Ra(e):e;return $a.some(e=>!!a[e]&&"none"!==a[e])||!!a.containerType&&"normal"!==a.containerType||!t&&!!a.backdropFilter&&"none"!==a.backdropFilter||!t&&!!a.filter&&"none"!==a.filter||Ba.some(e=>(a.willChange||"").includes(e))||Sa.some(e=>(a.contain||"").includes(e))}function La(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ea=new Set(["html","body","#document"]);function Pa(e){return Ea.has(wa(e))}function Ra(e){return fa(e).getComputedStyle(e)}function Ta(e){return xa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oa(e){if("html"===wa(e))return e;const t=e.assignedSlot||e.parentNode||Za(e)&&e.host||ma(e);return Za(t)?t.host:t}function za(e){const t=Oa(e);return Pa(t)?e.ownerDocument?e.ownerDocument.body:e.body:ya(t)&&Ma(t)?t:za(t)}function Na(e,t,a){var i;void 0===t&&(t=[]),void 0===a&&(a=!0);const l=za(e),n=l===(null==(i=e.ownerDocument)?void 0:i.body),o=fa(l);if(n){const e=Ia(o);return t.concat(o,o.visualViewport||[],Ma(l)?l:[],e&&a?Na(e):[])}return t.concat(l,Na(l,[],a))}function Ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Da(e){const t=Ra(e);let a=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const l=ya(e),n=l?e.offsetWidth:a,o=l?e.offsetHeight:i,s=Dt(a)!==n||Dt(i)!==o;return s&&(a=n,i=o),{width:a,height:i,$:s}}function Ua(e){return xa(e)?e:e.contextElement}function Wa(e){const t=Ua(e);if(!ya(t))return Wt(1);const a=t.getBoundingClientRect(),{width:i,height:l,$:n}=Da(t);let o=(n?Dt(a.width):a.width)/i,s=(n?Dt(a.height):a.height)/l;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}const qa=Wt(0);function ja(e){const t=fa(e);return La()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:qa}function Fa(e,t,a,i){void 0===t&&(t=!1),void 0===a&&(a=!1);const l=e.getBoundingClientRect(),n=Ua(e);let o=Wt(1);t&&(i?xa(i)&&(o=Wa(i)):o=Wa(e));const s=function(e,t,a){return void 0===t&&(t=!1),!(!a||t&&a!==fa(e))&&t}(n,a,i)?ja(n):Wt(0);let r=(l.left+s.x)/o.x,c=(l.top+s.y)/o.y,d=l.width/o.x,h=l.height/o.y;if(n){const e=fa(n),t=i&&xa(i)?fa(i):i;let a=e,l=Ia(a);for(;l&&i&&t!==a;){const e=Wa(l),t=l.getBoundingClientRect(),i=Ra(l),n=t.left+(l.clientLeft+parseFloat(i.paddingLeft))*e.x,o=t.top+(l.clientTop+parseFloat(i.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=n,c+=o,a=fa(l),l=Ia(a)}}return ha({width:d,height:h,x:r,y:c})}function Ka(e,t){const a=Ta(e).scrollLeft;return t?t.left+a:Fa(ma(e)).left+a}function Ja(e,t){const a=e.getBoundingClientRect();return{x:a.left+t.scrollLeft-Ka(e,a),y:a.top+t.scrollTop}}const Xa=new Set(["absolute","fixed"]);function Ya(e,t,a){let i;if("viewport"===t)i=function(e,t){const a=fa(e),i=ma(e),l=a.visualViewport;let n=i.clientWidth,o=i.clientHeight,s=0,r=0;if(l){n=l.width,o=l.height;const e=La();(!e||e&&"fixed"===t)&&(s=l.offsetLeft,r=l.offsetTop)}const c=Ka(i);if(c<=0){const e=i.ownerDocument,t=e.body,a=getComputedStyle(t),l="CSS1Compat"===e.compatMode&&parseFloat(a.marginLeft)+parseFloat(a.marginRight)||0,o=Math.abs(i.clientWidth-t.clientWidth-l);o<=25&&(n-=o)}else c<=25&&(n+=c);return{width:n,height:o,x:s,y:r}}(e,a);else if("document"===t)i=function(e){const t=ma(e),a=Ta(e),i=e.ownerDocument.body,l=It(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),n=It(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-a.scrollLeft+Ka(e);const s=-a.scrollTop;return"rtl"===Ra(i).direction&&(o+=It(t.clientWidth,i.clientWidth)-l),{width:l,height:n,x:o,y:s}}(ma(e));else if(xa(t))i=function(e,t){const a=Fa(e,!0,"fixed"===t),i=a.top+e.clientTop,l=a.left+e.clientLeft,n=ya(e)?Wa(e):Wt(1);return{width:e.clientWidth*n.x,height:e.clientHeight*n.y,x:l*n.x,y:i*n.y}}(t,a);else{const a=ja(e);i={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ha(i)}function Ga(e,t){const a=Oa(e);return!(a===t||!xa(a)||Pa(a))&&("fixed"===Ra(a).position||Ga(a,t))}function Qa(e,t,a){const i=ya(t),l=ma(t),n="fixed"===a,o=Fa(e,!0,n,t);let s={scrollLeft:0,scrollTop:0};const r=Wt(0);function c(){r.x=Ka(l)}if(i||!i&&!n)if(("body"!==wa(t)||Ma(l))&&(s=Ta(t)),i){const e=Fa(t,!0,n,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else l&&c();n&&!i&&l&&c();const d=!l||i||n?Wt(0):Ja(l,s);return{x:o.left+s.scrollLeft-r.x-d.x,y:o.top+s.scrollTop-r.y-d.y,width:o.width,height:o.height}}function ei(e){return"static"===Ra(e).position}function ti(e,t){if(!ya(e)||"fixed"===Ra(e).position)return null;if(t)return t(e);let a=e.offsetParent;return ma(e)===a&&(a=a.ownerDocument.body),a}function ai(e,t){const a=fa(e);if(ka(e))return a;if(!ya(e)){let t=Oa(e);for(;t&&!Pa(t);){if(xa(t)&&!ei(t))return t;t=Oa(t)}return a}let i=ti(e,t);for(;i&&Va(i)&&ei(i);)i=ti(i,t);return i&&Pa(i)&&ei(i)&&!Aa(i)?a:i||function(e){let t=Oa(e);for(;ya(t)&&!Pa(t);){if(Aa(t))return t;if(ka(t))return null;t=Oa(t)}return null}(e)||a}const ii={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:a,offsetParent:i,strategy:l}=e;const n="fixed"===l,o=ma(i),s=!!t&&ka(t.floating);if(i===o||s&&n)return a;let r={scrollLeft:0,scrollTop:0},c=Wt(1);const d=Wt(0),h=ya(i);if((h||!h&&!n)&&(("body"!==wa(i)||Ma(o))&&(r=Ta(i)),ya(i))){const e=Fa(i);c=Wa(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}const v=!o||h||n?Wt(0):Ja(o,r);return{width:a.width*c.x,height:a.height*c.y,x:a.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:a.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:ma,getClippingRect:function(e){let{element:t,boundary:a,rootBoundary:i,strategy:l}=e;const n=[..."clippingAncestors"===a?ka(t)?[]:function(e,t){const a=t.get(e);if(a)return a;let i=Na(e,[],!1).filter(e=>xa(e)&&"body"!==wa(e)),l=null;const n="fixed"===Ra(e).position;let o=n?Oa(e):e;for(;xa(o)&&!Pa(o);){const t=Ra(o),a=Aa(o);a||"fixed"!==t.position||(l=null),(n?!a&&!l:!a&&"static"===t.position&&l&&Xa.has(l.position)||Ma(o)&&!a&&Ga(e,o))?i=i.filter(e=>e!==o):l=t,o=Oa(o)}return t.set(e,i),i}(t,this._c):[].concat(a),i],o=n[0],s=n.reduce((e,a)=>{const i=Ya(t,a,l);return e.top=It(i.top,e.top),e.right=Nt(i.right,e.right),e.bottom=Nt(i.bottom,e.bottom),e.left=It(i.left,e.left),e},Ya(t,o,l));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ai,getElementRects:async function(e){const t=this.getOffsetParent||ai,a=this.getDimensions,i=await a(e.floating);return{reference:Qa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:a}=Da(e);return{width:t,height:a}},getScale:Wa,isElement:xa,isRTL:function(e){return"rtl"===Ra(e).direction}};function li(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ni(e,t,a,i){void 0===i&&(i={});const{ancestorScroll:l=!0,ancestorResize:n=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:r=!1}=i,c=Ua(e),d=l||n?[...c?Na(c):[],...Na(t)]:[];d.forEach(e=>{l&&e.addEventListener("scroll",a,{passive:!0}),n&&e.addEventListener("resize",a)});const h=c&&s?function(e,t){let a,i=null;const l=ma(e);function n(){var e;clearTimeout(a),null==(e=i)||e.disconnect(),i=null}return function o(s,r){void 0===s&&(s=!1),void 0===r&&(r=1),n();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:p}=c;if(s||t(),!v||!p)return;const g={rootMargin:-Ut(h)+"px "+-Ut(l.clientWidth-(d+v))+"px "+-Ut(l.clientHeight-(h+p))+"px "+-Ut(d)+"px",threshold:It(0,Nt(1,r))||1};let u=!0;function w(t){const i=t[0].intersectionRatio;if(i!==r){if(!u)return o();i?o(!1,i):a=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==i||li(c,e.getBoundingClientRect())||o(),u=!1}try{i=new IntersectionObserver(w,{...g,root:l.ownerDocument})}catch(e){i=new IntersectionObserver(w,g)}i.observe(e)}(!0),n}(c,a):null;let v,p=-1,g=null;o&&(g=new ResizeObserver(e=>{let[i]=e;i&&i.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),a()}),c&&!r&&g.observe(c),g.observe(t));let u=r?Fa(e):null;return r&&function t(){const i=Fa(e);u&&!li(u,i)&&a();u=i,v=requestAnimationFrame(t)}(),a(),()=>{var e;d.forEach(e=>{l&&e.removeEventListener("scroll",a),n&&e.removeEventListener("resize",a)}),null==h||h(),null==(e=g)||e.disconnect(),g=null,r&&cancelAnimationFrame(v)}}const oi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var a,i;const{x:l,y:n,placement:o,middlewareData:s}=t,r=await async function(e,t){const{placement:a,platform:i,elements:l}=e,n=await(null==i.isRTL?void 0:i.isRTL(l.floating)),o=Jt(a),s=Xt(a),r="y"===ea(a),c=ga.has(o)?-1:1,d=n&&r?-1:1,h=Kt(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&"number"==typeof g&&(p="end"===s?-1*g:g),r?{x:p*d,y:v*c}:{x:v*c,y:p*d}}(t,e);return o===(null==(a=s.offset)?void 0:a.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:l+r.x,y:n+r.y,data:{...r,placement:o}}}}},si=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:i,placement:l}=t,{mainAxis:n=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:a}=e;return{x:t,y:a}}},...r}=Kt(e,t),c={x:a,y:i},d=await pa(t,r),h=ea(Jt(l)),v=Yt(h);let p=c[v],g=c[h];if(n){const e="y"===v?"bottom":"right";p=Ft(p+d["y"===v?"top":"left"],p,p-d[e])}if(o){const e="y"===h?"bottom":"right";g=Ft(g+d["y"===h?"top":"left"],g,g-d[e])}const u=s.fn({...t,[v]:p,[h]:g});return{...u,data:{x:u.x-a,y:u.y-i,enabled:{[v]:n,[h]:o}}}}}},ri=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var a,i;const{placement:l,middlewareData:n,rects:o,initialPlacement:s,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:u=!0,...w}=Kt(e,t);if(null!=(a=n.arrow)&&a.alignmentOffset)return{};const f=Jt(l),m=ea(s),b=Jt(s)===s,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!u?[ca(s)]:function(e){const t=ca(e);return[ia(e),t,ia(t)]}(s)),Z="none"!==g;!v&&Z&&y.push(...ra(s,u,g,x));const C=[s,...y],M=await pa(t,w),_=[];let V=(null==(i=n.flip)?void 0:i.overflows)||[];if(d&&_.push(M[f]),h){const e=aa(l,o,x);_.push(M[e[0]],M[e[1]])}if(V=[...V,{placement:l,overflows:_}],!_.every(e=>e<=0)){var H,k;const e=((null==(H=n.flip)?void 0:H.index)||0)+1,t=C[e];if(t){if(!("alignment"===h&&m!==ea(t))||V.every(e=>ea(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let a=null==(k=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:k.placement;if(!a)switch(p){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(Z){const t=ea(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:$[0];e&&(a=e);break}case"initialPlacement":a=s}if(l!==a)return{reset:{placement:a}}}return{}}}},ci=(e,t,a)=>{const i=new Map,l={platform:ii,...a},n={...l.platform,_c:i};return(async(e,t,a)=>{const{placement:i="bottom",strategy:l="absolute",middleware:n=[],platform:o}=a,s=n.filter(Boolean),r=await(null==o.isRTL?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:l}),{x:d,y:h}=va(c,i,r),v=i,p={},g=0;for(let a=0;a<s.length;a++){const{name:n,fn:u}=s[a],{x:w,y:f,data:m,reset:b}=await u({x:d,y:h,initialPlacement:i,placement:v,strategy:l,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});d=null!=w?w:d,h=null!=f?f:h,p={...p,[n]:{...p[n],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:l}):b.rects),({x:d,y:h}=va(c,v,r))),a=-1)}return{x:d,y:h,placement:v,strategy:l,middlewareData:p}})(e,t,{...l,platform:n})};var di=p`.dropdown{display:flex;height:inherit;position:relative}`,hi=p`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,vi=p`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}.nav-link{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x);text-decoration:none}@media screen and (max-width:767px){.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}.nav-link.show,.nav-link:not(.disabled).active{border-color:var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.dropdown-items{background-color:var(--sgds-surface-default);height:100%;left:100%;padding:var(--sgds-padding-md) 0;position:absolute;top:0;width:100%}.dropdown-items a{align-items:center;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x);text-decoration:none}.dropdown-items a:hover{color:var(--sgds-primary-color-default)}.dropdown-items a:focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:-5px}slot[name=toggler]::slotted(*){flex:1}sgds-dropdown{display:block;height:100%}`
|
|
2386
|
+
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}zt.styles=[...qe.styles,Tt],zt.dependencies={"sgds-icon-button":Et},e([o({context:Pt}),Ee()],zt.prototype,"_breakpointReached",void 0),e([o({context:Rt}),Ee()],zt.prototype,"expanded",void 0),e([Ee()],zt.prototype,"expanding",void 0),e([Te("nav")],zt.prototype,"nav",void 0),e([Te(".navbar")],zt.prototype,"navbar",void 0),e([Te(".navbar-toggler")],zt.prototype,"header",void 0),e([Te(".navbar-body")],zt.prototype,"body",void 0),e([Te(".navbar-nav-scroll")],zt.prototype,"navScroll",void 0),e([Te("slot[name='non-collapsible']")],zt.prototype,"nonCollapsibleSlot",void 0),e([Le({type:String})],zt.prototype,"brandHref",void 0),e([Le({type:String})],zt.prototype,"expand",void 0),e([Le({type:Boolean,reflect:!0})],zt.prototype,"fluid",void 0),e([Ee()],zt.prototype,"breakpointReached",void 0),e([Oe()],zt.prototype,"defaultNodes",void 0),e([Oe({slot:"end"})],zt.prototype,"endNodes",void 0),e([at("expanding",{waitUntilFirstUpdate:!0})],zt.prototype,"handleOpenChange",null),Qe("mainnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Qe("mainnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});const Nt=Math.min,It=Math.max,Dt=Math.round,Ut=Math.floor,Wt=e=>({x:e,y:e}),qt={left:"right",right:"left",bottom:"top",top:"bottom"},jt={start:"end",end:"start"};function Ft(e,t,a){return It(e,Nt(t,a))}function Kt(e,t){return"function"==typeof e?e(t):e}function Jt(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function Yt(e){return"x"===e?"y":"x"}function Gt(e){return"y"===e?"height":"width"}const Qt=new Set(["top","bottom"]);function ea(e){return Qt.has(Jt(e))?"y":"x"}function ta(e){return Yt(ea(e))}function aa(e,t,a){void 0===a&&(a=!1);const i=Xt(e),n=ta(e),l=Gt(n);let o="x"===n?i===(a?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[l]>t.floating[l]&&(o=ca(o)),[o,ca(o)]}function ia(e){return e.replace(/start|end/g,e=>jt[e])}const na=["left","right"],la=["right","left"],oa=["top","bottom"],sa=["bottom","top"];function ra(e,t,a,i){const n=Xt(e);let l=function(e,t,a){switch(e){case"top":case"bottom":return a?t?la:na:t?na:la;case"left":case"right":return t?oa:sa;default:return[]}}(Jt(e),"start"===a,i);return n&&(l=l.map(e=>e+"-"+n),t&&(l=l.concat(l.map(ia)))),l}function ca(e){return e.replace(/left|right|bottom|top/g,e=>qt[e])}function da(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 ha(e){const{x:t,y:a,width:i,height:n}=e;return{width:i,height:n,top:a,left:t,right:t+i,bottom:a+n,x:t,y:a}}function va(e,t,a){let{reference:i,floating:n}=e;const l=ea(t),o=ta(t),s=Gt(o),r=Jt(t),c="y"===l,d=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,v=i[s]/2-n[s]/2;let p;switch(r){case"top":p={x:d,y:i.y-n.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:h};break;case"left":p={x:i.x-n.width,y:h};break;default:p={x:i.x,y:i.y}}switch(Xt(t)){case"start":p[o]-=v*(a&&c?-1:1);break;case"end":p[o]+=v*(a&&c?-1:1)}return p}async function pa(e,t){var a;void 0===t&&(t={});const{x:i,y:n,platform:l,rects:o,elements:s,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:p=0}=Kt(t,e),g=da(p),u=s[v?"floating"===h?"reference":"floating":h],w=ha(await l.getClippingRect({element:null==(a=await(null==l.isElement?void 0:l.isElement(u)))||a?u:u.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:r})),f="floating"===h?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,m=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(m))&&await(null==l.getScale?void 0:l.getScale(m))||{x:1,y:1},x=ha(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:f,offsetParent:m,strategy:r}):f);return{top:(w.top-x.top+g.top)/b.y,bottom:(x.bottom-w.bottom+g.bottom)/b.y,left:(w.left-x.left+g.left)/b.x,right:(x.right-w.right+g.right)/b.x}}const ga=new Set(["left","top"]);function ua(){return"undefined"!=typeof window}function wa(e){return ba(e)?(e.nodeName||"").toLowerCase():"#document"}function fa(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ma(e){var t;return null==(t=(ba(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ba(e){return!!ua()&&(e instanceof Node||e instanceof fa(e).Node)}function xa(e){return!!ua()&&(e instanceof Element||e instanceof fa(e).Element)}function ya(e){return!!ua()&&(e instanceof HTMLElement||e instanceof fa(e).HTMLElement)}function Za(e){return!(!ua()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof fa(e).ShadowRoot)}const Ca=new Set(["inline","contents"]);function Ma(e){const{overflow:t,overflowX:a,overflowY:i,display:n}=Ra(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+a)&&!Ca.has(n)}const _a=new Set(["table","td","th"]);function Va(e){return _a.has(wa(e))}const Ha=[":popover-open",":modal"];function ka(e){return Ha.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const $a=["transform","translate","scale","rotate","perspective"],Ba=["transform","translate","scale","rotate","perspective","filter"],Sa=["paint","layout","strict","content"];function Aa(e){const t=La(),a=xa(e)?Ra(e):e;return $a.some(e=>!!a[e]&&"none"!==a[e])||!!a.containerType&&"normal"!==a.containerType||!t&&!!a.backdropFilter&&"none"!==a.backdropFilter||!t&&!!a.filter&&"none"!==a.filter||Ba.some(e=>(a.willChange||"").includes(e))||Sa.some(e=>(a.contain||"").includes(e))}function La(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ea=new Set(["html","body","#document"]);function Pa(e){return Ea.has(wa(e))}function Ra(e){return fa(e).getComputedStyle(e)}function Ta(e){return xa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oa(e){if("html"===wa(e))return e;const t=e.assignedSlot||e.parentNode||Za(e)&&e.host||ma(e);return Za(t)?t.host:t}function za(e){const t=Oa(e);return Pa(t)?e.ownerDocument?e.ownerDocument.body:e.body:ya(t)&&Ma(t)?t:za(t)}function Na(e,t,a){var i;void 0===t&&(t=[]),void 0===a&&(a=!0);const n=za(e),l=n===(null==(i=e.ownerDocument)?void 0:i.body),o=fa(n);if(l){const e=Ia(o);return t.concat(o,o.visualViewport||[],Ma(n)?n:[],e&&a?Na(e):[])}return t.concat(n,Na(n,[],a))}function Ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Da(e){const t=Ra(e);let a=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=ya(e),l=n?e.offsetWidth:a,o=n?e.offsetHeight:i,s=Dt(a)!==l||Dt(i)!==o;return s&&(a=l,i=o),{width:a,height:i,$:s}}function Ua(e){return xa(e)?e:e.contextElement}function Wa(e){const t=Ua(e);if(!ya(t))return Wt(1);const a=t.getBoundingClientRect(),{width:i,height:n,$:l}=Da(t);let o=(l?Dt(a.width):a.width)/i,s=(l?Dt(a.height):a.height)/n;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}const qa=Wt(0);function ja(e){const t=fa(e);return La()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:qa}function Fa(e,t,a,i){void 0===t&&(t=!1),void 0===a&&(a=!1);const n=e.getBoundingClientRect(),l=Ua(e);let o=Wt(1);t&&(i?xa(i)&&(o=Wa(i)):o=Wa(e));const s=function(e,t,a){return void 0===t&&(t=!1),!(!a||t&&a!==fa(e))&&t}(l,a,i)?ja(l):Wt(0);let r=(n.left+s.x)/o.x,c=(n.top+s.y)/o.y,d=n.width/o.x,h=n.height/o.y;if(l){const e=fa(l),t=i&&xa(i)?fa(i):i;let a=e,n=Ia(a);for(;n&&i&&t!==a;){const e=Wa(n),t=n.getBoundingClientRect(),i=Ra(n),l=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,o=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=l,c+=o,a=fa(n),n=Ia(a)}}return ha({width:d,height:h,x:r,y:c})}function Ka(e,t){const a=Ta(e).scrollLeft;return t?t.left+a:Fa(ma(e)).left+a}function Ja(e,t){const a=e.getBoundingClientRect();return{x:a.left+t.scrollLeft-Ka(e,a),y:a.top+t.scrollTop}}const Xa=new Set(["absolute","fixed"]);function Ya(e,t,a){let i;if("viewport"===t)i=function(e,t){const a=fa(e),i=ma(e),n=a.visualViewport;let l=i.clientWidth,o=i.clientHeight,s=0,r=0;if(n){l=n.width,o=n.height;const e=La();(!e||e&&"fixed"===t)&&(s=n.offsetLeft,r=n.offsetTop)}const c=Ka(i);if(c<=0){const e=i.ownerDocument,t=e.body,a=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(a.marginLeft)+parseFloat(a.marginRight)||0,o=Math.abs(i.clientWidth-t.clientWidth-n);o<=25&&(l-=o)}else c<=25&&(l+=c);return{width:l,height:o,x:s,y:r}}(e,a);else if("document"===t)i=function(e){const t=ma(e),a=Ta(e),i=e.ownerDocument.body,n=It(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=It(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-a.scrollLeft+Ka(e);const s=-a.scrollTop;return"rtl"===Ra(i).direction&&(o+=It(t.clientWidth,i.clientWidth)-n),{width:n,height:l,x:o,y:s}}(ma(e));else if(xa(t))i=function(e,t){const a=Fa(e,!0,"fixed"===t),i=a.top+e.clientTop,n=a.left+e.clientLeft,l=ya(e)?Wa(e):Wt(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:n*l.x,y:i*l.y}}(t,a);else{const a=ja(e);i={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ha(i)}function Ga(e,t){const a=Oa(e);return!(a===t||!xa(a)||Pa(a))&&("fixed"===Ra(a).position||Ga(a,t))}function Qa(e,t,a){const i=ya(t),n=ma(t),l="fixed"===a,o=Fa(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const r=Wt(0);function c(){r.x=Ka(n)}if(i||!i&&!l)if(("body"!==wa(t)||Ma(n))&&(s=Ta(t)),i){const e=Fa(t,!0,l,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else n&&c();l&&!i&&n&&c();const d=!n||i||l?Wt(0):Ja(n,s);return{x:o.left+s.scrollLeft-r.x-d.x,y:o.top+s.scrollTop-r.y-d.y,width:o.width,height:o.height}}function ei(e){return"static"===Ra(e).position}function ti(e,t){if(!ya(e)||"fixed"===Ra(e).position)return null;if(t)return t(e);let a=e.offsetParent;return ma(e)===a&&(a=a.ownerDocument.body),a}function ai(e,t){const a=fa(e);if(ka(e))return a;if(!ya(e)){let t=Oa(e);for(;t&&!Pa(t);){if(xa(t)&&!ei(t))return t;t=Oa(t)}return a}let i=ti(e,t);for(;i&&Va(i)&&ei(i);)i=ti(i,t);return i&&Pa(i)&&ei(i)&&!Aa(i)?a:i||function(e){let t=Oa(e);for(;ya(t)&&!Pa(t);){if(Aa(t))return t;if(ka(t))return null;t=Oa(t)}return null}(e)||a}const ii={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:a,offsetParent:i,strategy:n}=e;const l="fixed"===n,o=ma(i),s=!!t&&ka(t.floating);if(i===o||s&&l)return a;let r={scrollLeft:0,scrollTop:0},c=Wt(1);const d=Wt(0),h=ya(i);if((h||!h&&!l)&&(("body"!==wa(i)||Ma(o))&&(r=Ta(i)),ya(i))){const e=Fa(i);c=Wa(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}const v=!o||h||l?Wt(0):Ja(o,r);return{width:a.width*c.x,height:a.height*c.y,x:a.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:a.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:ma,getClippingRect:function(e){let{element:t,boundary:a,rootBoundary:i,strategy:n}=e;const l=[..."clippingAncestors"===a?ka(t)?[]:function(e,t){const a=t.get(e);if(a)return a;let i=Na(e,[],!1).filter(e=>xa(e)&&"body"!==wa(e)),n=null;const l="fixed"===Ra(e).position;let o=l?Oa(e):e;for(;xa(o)&&!Pa(o);){const t=Ra(o),a=Aa(o);a||"fixed"!==t.position||(n=null),(l?!a&&!n:!a&&"static"===t.position&&n&&Xa.has(n.position)||Ma(o)&&!a&&Ga(e,o))?i=i.filter(e=>e!==o):n=t,o=Oa(o)}return t.set(e,i),i}(t,this._c):[].concat(a),i],o=l[0],s=l.reduce((e,a)=>{const i=Ya(t,a,n);return e.top=It(i.top,e.top),e.right=Nt(i.right,e.right),e.bottom=Nt(i.bottom,e.bottom),e.left=It(i.left,e.left),e},Ya(t,o,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ai,getElementRects:async function(e){const t=this.getOffsetParent||ai,a=this.getDimensions,i=await a(e.floating);return{reference:Qa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:a}=Da(e);return{width:t,height:a}},getScale:Wa,isElement:xa,isRTL:function(e){return"rtl"===Ra(e).direction}};function ni(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function li(e,t,a,i){void 0===i&&(i={});const{ancestorScroll:n=!0,ancestorResize:l=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:r=!1}=i,c=Ua(e),d=n||l?[...c?Na(c):[],...Na(t)]:[];d.forEach(e=>{n&&e.addEventListener("scroll",a,{passive:!0}),l&&e.addEventListener("resize",a)});const h=c&&s?function(e,t){let a,i=null;const n=ma(e);function l(){var e;clearTimeout(a),null==(e=i)||e.disconnect(),i=null}return function o(s,r){void 0===s&&(s=!1),void 0===r&&(r=1),l();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:p}=c;if(s||t(),!v||!p)return;const g={rootMargin:-Ut(h)+"px "+-Ut(n.clientWidth-(d+v))+"px "+-Ut(n.clientHeight-(h+p))+"px "+-Ut(d)+"px",threshold:It(0,Nt(1,r))||1};let u=!0;function w(t){const i=t[0].intersectionRatio;if(i!==r){if(!u)return o();i?o(!1,i):a=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==i||ni(c,e.getBoundingClientRect())||o(),u=!1}try{i=new IntersectionObserver(w,{...g,root:n.ownerDocument})}catch(e){i=new IntersectionObserver(w,g)}i.observe(e)}(!0),l}(c,a):null;let v,p=-1,g=null;o&&(g=new ResizeObserver(e=>{let[i]=e;i&&i.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),a()}),c&&!r&&g.observe(c),g.observe(t));let u=r?Fa(e):null;return r&&function t(){const i=Fa(e);u&&!ni(u,i)&&a();u=i,v=requestAnimationFrame(t)}(),a(),()=>{var e;d.forEach(e=>{n&&e.removeEventListener("scroll",a),l&&e.removeEventListener("resize",a)}),null==h||h(),null==(e=g)||e.disconnect(),g=null,r&&cancelAnimationFrame(v)}}const oi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var a,i;const{x:n,y:l,placement:o,middlewareData:s}=t,r=await async function(e,t){const{placement:a,platform:i,elements:n}=e,l=await(null==i.isRTL?void 0:i.isRTL(n.floating)),o=Jt(a),s=Xt(a),r="y"===ea(a),c=ga.has(o)?-1:1,d=l&&r?-1:1,h=Kt(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&"number"==typeof g&&(p="end"===s?-1*g:g),r?{x:p*d,y:v*c}:{x:v*c,y:p*d}}(t,e);return o===(null==(a=s.offset)?void 0:a.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:n+r.x,y:l+r.y,data:{...r,placement:o}}}}},si=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:i,placement:n}=t,{mainAxis:l=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:a}=e;return{x:t,y:a}}},...r}=Kt(e,t),c={x:a,y:i},d=await pa(t,r),h=ea(Jt(n)),v=Yt(h);let p=c[v],g=c[h];if(l){const e="y"===v?"bottom":"right";p=Ft(p+d["y"===v?"top":"left"],p,p-d[e])}if(o){const e="y"===h?"bottom":"right";g=Ft(g+d["y"===h?"top":"left"],g,g-d[e])}const u=s.fn({...t,[v]:p,[h]:g});return{...u,data:{x:u.x-a,y:u.y-i,enabled:{[v]:l,[h]:o}}}}}},ri=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var a,i;const{placement:n,middlewareData:l,rects:o,initialPlacement:s,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:u=!0,...w}=Kt(e,t);if(null!=(a=l.arrow)&&a.alignmentOffset)return{};const f=Jt(n),m=ea(s),b=Jt(s)===s,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!u?[ca(s)]:function(e){const t=ca(e);return[ia(e),t,ia(t)]}(s)),Z="none"!==g;!v&&Z&&y.push(...ra(s,u,g,x));const C=[s,...y],M=await pa(t,w),_=[];let V=(null==(i=l.flip)?void 0:i.overflows)||[];if(d&&_.push(M[f]),h){const e=aa(n,o,x);_.push(M[e[0]],M[e[1]])}if(V=[...V,{placement:n,overflows:_}],!_.every(e=>e<=0)){var H,k;const e=((null==(H=l.flip)?void 0:H.index)||0)+1,t=C[e];if(t){if(!("alignment"===h&&m!==ea(t))||V.every(e=>ea(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let a=null==(k=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:k.placement;if(!a)switch(p){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(Z){const t=ea(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:$[0];e&&(a=e);break}case"initialPlacement":a=s}if(n!==a)return{reset:{placement:a}}}return{}}}},ci=(e,t,a)=>{const i=new Map,n={platform:ii,...a},l={...n.platform,_c:i};return(async(e,t,a)=>{const{placement:i="bottom",strategy:n="absolute",middleware:l=[],platform:o}=a,s=l.filter(Boolean),r=await(null==o.isRTL?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:h}=va(c,i,r),v=i,p={},g=0;for(let a=0;a<s.length;a++){const{name:l,fn:u}=s[a],{x:w,y:f,data:m,reset:b}=await u({x:d,y:h,initialPlacement:i,placement:v,strategy:n,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});d=null!=w?w:d,h=null!=f?f:h,p={...p,[l]:{...p[l],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:n}):b.rects),({x:d,y:h}=va(c,v,r))),a=-1)}return{x:d,y:h,placement:v,strategy:n,middlewareData:p}})(e,t,{...n,platform:l})};var di=p`.dropdown{display:flex;height:inherit;position:relative}`,hi=p`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,vi=p`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}.nav-link{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.nav-link.show,.nav-link:not(.disabled).active{border-color:var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.dropdown-items{background-color:var(--sgds-surface-default);height:100%;left:100%;overflow-y:auto;padding:var(--sgds-padding-md) 0;position:absolute;top:0;width:100%}.dropdown-items a{align-items:center;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-xs);margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.dropdown-items a:hover{color:var(--sgds-primary-color-default)}.dropdown-items a:focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:-5px}slot[name=toggler]::slotted(*){flex:1}sgds-dropdown{display:block;height:100%}@media screen and (min-width:1024px){.dropdown-items a,.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`
|
|
2387
2387
|
/**
|
|
2388
2388
|
* @license
|
|
2389
2389
|
* Copyright 2020 Google LLC
|
|
@@ -2393,12 +2393,12 @@ let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2393
2393
|
* @license
|
|
2394
2394
|
* Copyright 2017 Google LLC
|
|
2395
2395
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2396
|
-
*/function wi(e){void 0!==this._$disconnectableChildren?(gi(this),this._$parent=e,ui(this)):this._$parent=e}function fi(e,t=!1,a=0){const i=this._$committedValue,
|
|
2396
|
+
*/function wi(e){void 0!==this._$disconnectableChildren?(gi(this),this._$parent=e,ui(this)):this._$parent=e}function fi(e,t=!1,a=0){const i=this._$committedValue,n=this._$disconnectableChildren;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(i))for(let e=a;e<i.length;e++)pi(i[e],!1),gi(i[e]);else null!=i&&(pi(i,!1),gi(i));else pi(this,e)}const mi=e=>{e.type==Ne&&(e._$notifyConnectionChanged??=fi,e._$reparentDisconnectables??=wi)};class bi extends De{constructor(){super(...arguments),this._$disconnectableChildren=void 0}_$initialize(e,t,a){super._$initialize(e,t,a),ui(this),this.isConnected=e._$isConnected}_$notifyDirectiveConnectionChanged(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(pi(this,e),gi(this))}setValue(e){if(void 0===this.__part.strings)this.__part._$setValue(e,this);else{if(void 0===this.__attributeIndex)throw new Error("Expected this.__attributeIndex to be a number");const t=[...this.__part._$committedValue];t[this.__attributeIndex]=e,this.__part._$setValue(t,this,0)}}disconnected(){}reconnected(){}}
|
|
2397
2397
|
/**
|
|
2398
2398
|
* @license
|
|
2399
2399
|
* Copyright 2020 Google LLC
|
|
2400
2400
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2401
|
-
*/const xi=()=>new yi;class yi{}const Zi=new WeakMap;const Ci=Ie(class extends bi{render(e){return ce}update(e,[t]){const a=t!==this._ref;return a&&void 0!==this._ref&&this._updateRefValue(void 0),(a||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ce}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let a=Zi.get(t);void 0===a&&(a=new WeakMap,Zi.set(t,a)),void 0!==a.get(this._ref)&&this._ref.call(this._context,void 0),a.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?Zi.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}});class Mi extends qe{constructor(){super(...arguments),this.myDropdown=xi(),this.dropdownMenuId=tt("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=xi(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=
|
|
2401
|
+
*/const xi=()=>new yi;class yi{}const Zi=new WeakMap;const Ci=Ie(class extends bi{render(e){return ce}update(e,[t]){const a=t!==this._ref;return a&&void 0!==this._ref&&this._updateRefValue(void 0),(a||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ce}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let a=Zi.get(t);void 0===a&&(a=new WeakMap,Zi.set(t,a)),void 0!==a.get(this._ref)&&this._ref.call(this._context,void 0),a.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?Zi.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}});class Mi extends qe{constructor(){super(...arguments),this.myDropdown=xi(),this.dropdownMenuId=tt("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=xi(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=li(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition())))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_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 a=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},i=t.map(a),n=e.map(e=>{const n=a(e),l=i.indexOf(n);return-1!==l?t[l]:e}).concat(t.filter(t=>!e.some(e=>a(e)===a(t))));return n}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=[oi(8),this.noFlip?void 0:ri(),si()].filter(Boolean);let a=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(a=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:a}),{x:n,y:l,strategy:o,placement:s}=await ci(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",s),Object.assign(this.menuRef.value.style,{position:o,left:`${n}px`,top:`${l}px`})}}e([Le({type:Boolean,state:!0})],Mi.prototype,"noFlip",void 0),e([Le({type:Boolean,reflect:!0,state:!0})],Mi.prototype,"menuAlignRight",void 0),e([Le({type:String,reflect:!0,state:!0})],Mi.prototype,"drop",void 0),e([Le({type:Object})],Mi.prototype,"floatingOpts",void 0),e([Le({type:Boolean,reflect:!0})],Mi.prototype,"menuIsOpen",void 0),e([Le({type:Boolean,reflect:!0})],Mi.prototype,"disabled",void 0),e([Le({type:Boolean,reflect:!0})],Mi.prototype,"readonly",void 0);class _i extends Mi{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(),a=t.indexOf(e.target);this.nextDropdownItemNo=a+1,this.prevDropdownItemNo=a<=0?t.length-1:a-1;const i=e.target;i.disabled||(this.emit("sgds-select",{detail:{item:i}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const a=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");a&&a.removeAttribute("tabindex")})}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter(e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden"))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter(e=>!e.disabled&&!e.hidden)}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const a=(e%t.length+t.length)%t.length,i=t[a];this.emit("i-sgds-option-focus",{detail:{option:i}}),this.nextDropdownItemNo=(a+1)%t.length,this.prevDropdownItemNo=(a-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===i?"0":"-1"),e===i&&t.focus()})}}_i.styles=Mi.styles,e([Te("ul.dropdown-menu")],_i.prototype,"menu",void 0),e([Ee()],_i.prototype,"nextDropdownItemNo",void 0),e([Ee()],_i.prototype,"prevDropdownItemNo",void 0),e([Le({type:Boolean,reflect:!0})],_i.prototype,"hidden",void 0);class Vi extends _i{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=Ci()}async _handleClick(){this.disabled||this.toggleMenu()}_handleCloseMenu(){const e=this._toggler[0];null==e||e.focus()}async connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._handleCloseMenu)}async disconnectedCallback(){this.removeEventListener("sgds-hide",this._handleCloseMenu)}async firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&await this.showMenu(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return oe`
|
|
2402
2402
|
<div class="dropdown">
|
|
2403
2403
|
<div
|
|
2404
2404
|
class="toggler-container"
|
|
@@ -2413,14 +2413,14 @@ let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2413
2413
|
<slot id="default" @click=${this.handleSelectSlot}></slot>
|
|
2414
2414
|
</div>
|
|
2415
2415
|
</div>
|
|
2416
|
-
`}}Vi.styles=[..._i.styles,di,hi],e([Le({type:Boolean,reflect:!0,state:!1})],Vi.prototype,"noFlip",void 0),e([Le({type:Boolean,reflect:!0,state:!1})],Vi.prototype,"menuAlignRight",void 0),e([Le({type:String,reflect:!0,state:!1})],Vi.prototype,"drop",void 0),e([Oe({slot:"toggler",flatten:!0})],Vi.prototype,"_toggler",void 0),e([at("disabled",{waitUntilFirstUpdate:!0})],Vi.prototype,"_handleDisabled",null);var Hi=p`: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;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-50);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)}`;class ki extends qe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",e=>{"Enter"===e.key&&this.anchor[0].click()}),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){return oe`
|
|
2416
|
+
`}}Vi.styles=[..._i.styles,di,hi],e([Le({type:Boolean,reflect:!0,state:!1})],Vi.prototype,"noFlip",void 0),e([Le({type:Boolean,reflect:!0,state:!1})],Vi.prototype,"menuAlignRight",void 0),e([Le({type:String,reflect:!0,state:!1})],Vi.prototype,"drop",void 0),e([Oe({slot:"toggler",flatten:!0})],Vi.prototype,"_toggler",void 0),e([at("disabled",{waitUntilFirstUpdate:!0})],Vi.prototype,"_handleDisabled",null);var Hi=p`: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;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-50);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 ki extends qe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",e=>{"Enter"===e.key&&this.anchor[0].click()}),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){return oe`
|
|
2417
2417
|
<div
|
|
2418
2418
|
class="dropdown-item ${Ue({disabled:this.disabled,active:this.active})}"
|
|
2419
2419
|
tabindex=${this.disabled?"-1":"0"}
|
|
2420
2420
|
>
|
|
2421
2421
|
<slot></slot>
|
|
2422
2422
|
</div>
|
|
2423
|
-
`}}ki.styles=[di,Hi],ki.dependencies={"sgds-icon":$t},e([Oe({flatten:!0})],ki.prototype,"anchor",void 0),e([Le({type:Boolean})],ki.prototype,"active",void 0),e([Le({type:Boolean,reflect:!0})],ki.prototype,"disabled",void 0);const $i="Enter";class Bi extends qe{constructor(){super(...arguments),this._breakpointReached=!0,this.togglerId=tt("dropdown","button"),this.active=!1,this.disabled=!1}get defaultSlotItems(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}updated(){this._breakpointReached&&(this._copyTextToMenu(),this._resetDropdownMenu(),this._hideDropdownMenuItems())}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{var t;e.addEventListener("keydown",this._handleKeyboardMenuItemsEvent.bind(this));const a=e.shadowRoot.querySelector(".dropdown-item");a.classList.add("
|
|
2423
|
+
`}}ki.styles=[di,Hi],ki.dependencies={"sgds-icon":$t},e([Oe({flatten:!0})],ki.prototype,"anchor",void 0),e([Le({type:Boolean})],ki.prototype,"active",void 0),e([Le({type:Boolean,reflect:!0})],ki.prototype,"disabled",void 0);const $i="Enter";class Bi extends qe{constructor(){super(...arguments),this._breakpointReached=!0,this.togglerId=tt("dropdown","button"),this.active=!1,this.disabled=!1}get defaultSlotItems(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}updated(){this._breakpointReached&&(this._copyTextToMenu(),this._resetDropdownMenu(),this._hideDropdownMenuItems())}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{var t;e.addEventListener("keydown",this._handleKeyboardMenuItemsEvent.bind(this));const a=e.shadowRoot.querySelector(".dropdown-item");a.classList.add("mainnav-dropdown-link");const i=(null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelector("a"))||e.querySelector("a");i.tabIndex=-1,a.classList.contains("disabled")?(i.setAttribute("href","javascript:void(0)"),i.setAttribute("tabindex","-1")):i.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})})}_handleDesktopSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.classList.remove("mainnav-dropdown-link");e.shadowRoot.querySelector(".dropdown-item slot").assignedElements({flatten:!0}).forEach(e=>{t.classList.contains("disabled")&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))})})}_handleKeyboardMenuItemsEvent(e){if(!this._breakpointReached)return;const t=this.defaultSlotItems.filter(e=>!e.hasAttribute("disabled")),a=[this.menuHeaderButton,...t],i=a.length;if(0===i)return;const n=a[0],l=a[i-1].shadowRoot.querySelector(".dropdown-item");let o=document.activeElement;if(o===this&&(o=this.shadowRoot.activeElement),"Tab"===e.key)if(e.shiftKey)o===n&&(e.preventDefault(),setTimeout(()=>{l.focus()},0));else{const t=o.shadowRoot?o.shadowRoot.querySelector(".dropdown-item"):null;t&&t===l&&(e.preventDefault(),n.focus())}}_copyTextToMenu(){this.menuHeaderText.innerHTML=this.togglerNodes[0].innerHTML}_hideDropdownMenuItems(){this.dropdownItems.style.display="none",this.dropdownItems.setAttribute("aria-hidden","true")}_resetDropdownMenu(){const e=this._getNavbarBody();return e?new Promise(t=>{const a=i=>{"transform"===i.propertyName&&(e.removeEventListener("transitionend",a),t())};getComputedStyle(e).transitionProperty.includes("transform")?(e.addEventListener("transitionend",a),e.style.removeProperty("transform")):(e.style.removeProperty("transform"),t())}):Promise.resolve()}_handleKeyboardOpen(e){this.disabled||e.key!==$i&&" "!==e.key||(e.preventDefault(),this._openMenu())}_getNavbarBody(){const e=document.querySelector("sgds-mainnav");if(!(null==e?void 0:e.shadowRoot))return void console.warn("sgds-mainnav or its shadowRoot not found");const t=e.shadowRoot.querySelector(".navbar-body");if(t)return t;console.warn(".navbar-body not found in sgds-mainnav")}_openMenu(){this._getNavbarBody().style.transform="translateX(-100%)",this.dropdownItems.style.removeProperty("display"),this.dropdownItems.setAttribute("aria-hidden","false"),setTimeout(()=>{this.menuHeaderButton.focus()},50)}_handleHeaderKeyboardEvent(e){switch(e.key){case"Tab":this._handleKeyboardMenuItemsEvent(e);break;case $i:case" ":e.preventDefault(),this._closeMenu()}}async _closeMenu(){await this._resetDropdownMenu(),this._hideDropdownMenuItems(),this.navLink.focus()}render(){const e=oe`
|
|
2424
2424
|
<a
|
|
2425
2425
|
class="${Ue({"nav-link":!0,active:this.active,disabled:this.disabled})}"
|
|
2426
2426
|
aria-disabled=${this.disabled?"true":"false"}
|
|
@@ -2455,5 +2455,5 @@ let Be;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2455
2455
|
<sgds-icon name="chevron-down"></sgds-icon>
|
|
2456
2456
|
</a>
|
|
2457
2457
|
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
|
|
2458
|
-
</sgds-dropdown>`;return this._breakpointReached?e:t}}Bi.styles=[...qe.styles,di,hi,vi],Bi.dependencies={"sgds-dropdown":Vi,"sgds-dropdown-item":ki,"sgds-icon":$t},e([s({context:Pt,subscribe:!0}),Ee()],Bi.prototype,"_breakpointReached",void 0),e([s({context:Rt,subscribe:!0}),Ee()],Bi.prototype,"expanded",void 0),e([Te(".nav-link")],Bi.prototype,"navLink",void 0),e([Te(".dropdown-items")],Bi.prototype,"dropdownItems",void 0),e([Te(".dropdown-items a")],Bi.prototype,"menuHeaderButton",void 0),e([Te(".dropdown-items span")],Bi.prototype,"menuHeaderText",void 0),e([Le({type:Boolean})],Bi.prototype,"active",void 0),e([Le({type:Boolean,reflect:!0})],Bi.prototype,"disabled",void 0),e([Oe({slot:"toggler"})],Bi.prototype,"togglerNodes",void 0),e([Oe()],Bi.prototype,"defaultNodes",void 0);var Si=p`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){
|
|
2458
|
+
</sgds-dropdown>`;return this._breakpointReached?e:t}}Bi.styles=[...qe.styles,di,hi,vi],Bi.dependencies={"sgds-dropdown":Vi,"sgds-dropdown-item":ki,"sgds-icon":$t},e([s({context:Pt,subscribe:!0}),Ee()],Bi.prototype,"_breakpointReached",void 0),e([s({context:Rt,subscribe:!0}),Ee()],Bi.prototype,"expanded",void 0),e([Te(".nav-link")],Bi.prototype,"navLink",void 0),e([Te(".dropdown-items")],Bi.prototype,"dropdownItems",void 0),e([Te(".dropdown-items a")],Bi.prototype,"menuHeaderButton",void 0),e([Te(".dropdown-items span")],Bi.prototype,"menuHeaderText",void 0),e([Le({type:Boolean})],Bi.prototype,"active",void 0),e([Le({type:Boolean,reflect:!0})],Bi.prototype,"disabled",void 0),e([Oe({slot:"toggler"})],Bi.prototype,"togglerNodes",void 0),e([Oe()],Bi.prototype,"defaultNodes",void 0);var Si=p`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:flex;height:auto!important;padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none!important;text-decoration:none}@media screen and (min-width:1024px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default));outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Ai extends qe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,a=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(a.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===a.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===a.length){const e=a[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})}}}render(){return oe`<slot @slotchange=${this._handleSlotChange}></slot>`}}function Li(e,t){customElements.get(e)||customElements.define(e,t)}Ai.styles=[...qe.styles,Si],e([Le({type:Boolean,reflect:!0})],Ai.prototype,"active",void 0),e([Le({type:Boolean,reflect:!0})],Ai.prototype,"disabled",void 0),e([at("disabled")],Ai.prototype,"_handleDisabled",null),Li("sgds-mainnav",zt),Li("sgds-mainnav-dropdown",Bi),Li("sgds-mainnav-item",Ai)});
|
|
2459
2459
|
//# sourceMappingURL=index.umd.min.js.map
|