@govtechsg/sgds-web-component 3.14.1-rc.1 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/dropdown-element.d.ts +2 -0
- package/base/dropdown-element.js +8 -2
- package/base/dropdown-element.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +1 -1
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +24 -24
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.js +2 -2
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/Datepicker/datepicker.js +1 -1
- package/components/Datepicker/index.umd.min.js +3 -3
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Datepicker/sgds-datepicker.js +1 -1
- package/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/components/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Dropdown/sgds-dropdown.js +1 -1
- package/components/Dropdown/sgds-dropdown.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +2 -2
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/OverflowMenu/index.umd.min.js +1 -1
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/Select/index.umd.min.js +7 -7
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Select/sgds-select.js +2 -2
- package/components/Select/sgds-select.js.map +1 -1
- package/components/index.d.ts +0 -1
- package/components/index.js +0 -1
- package/components/index.js.map +1 -1
- package/components/index.umd.min.js +75 -128
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +0 -4
- package/css/utility.css +25 -18
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/index.umd.min.js +63 -194
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/dropdown-element.cjs.js +8 -2
- package/react/base/dropdown-element.cjs.js.map +1 -1
- package/react/base/dropdown-element.js +8 -2
- package/react/base/dropdown-element.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js +2 -2
- package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.js +2 -2
- package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/react/components/Datepicker/datepicker.cjs.js +1 -1
- package/react/components/Datepicker/datepicker.js +1 -1
- package/react/components/Datepicker/sgds-datepicker.cjs.js +1 -1
- package/react/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
- package/react/components/Datepicker/sgds-datepicker.js +1 -1
- package/react/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/Dropdown/sgds-dropdown.cjs.js +1 -1
- package/react/components/Dropdown/sgds-dropdown.cjs.js.map +1 -1
- package/react/components/Dropdown/sgds-dropdown.js +1 -1
- package/react/components/Dropdown/sgds-dropdown.js.map +1 -1
- package/react/components/Select/sgds-select.cjs.js +2 -2
- package/react/components/Select/sgds-select.cjs.js.map +1 -1
- package/react/components/Select/sgds-select.js +2 -2
- package/react/components/Select/sgds-select.js.map +1 -1
- package/react/index.cjs.js +48 -56
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +0 -4
- package/react/index.js +0 -4
- package/react/index.js.map +1 -1
- package/base/sidebar-element.d.ts +0 -112
- package/base/sidebar-element.js +0 -281
- package/base/sidebar-element.js.map +0 -1
- package/components/Sidebar/index.d.ts +0 -16
- package/components/Sidebar/index.js +0 -10
- package/components/Sidebar/index.js.map +0 -1
- package/components/Sidebar/index.umd.min.js +0 -2501
- package/components/Sidebar/index.umd.min.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-group.d.ts +0 -51
- package/components/Sidebar/sgds-sidebar-group.js +0 -124
- package/components/Sidebar/sgds-sidebar-group.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-item.d.ts +0 -25
- package/components/Sidebar/sgds-sidebar-item.js +0 -73
- package/components/Sidebar/sgds-sidebar-item.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-section.d.ts +0 -56
- package/components/Sidebar/sgds-sidebar-section.js +0 -125
- package/components/Sidebar/sgds-sidebar-section.js.map +0 -1
- package/components/Sidebar/sgds-sidebar.d.ts +0 -156
- package/components/Sidebar/sgds-sidebar.js +0 -412
- package/components/Sidebar/sgds-sidebar.js.map +0 -1
- package/components/Sidebar/sidebar-context.d.ts +0 -51
- package/components/Sidebar/sidebar-context.js +0 -45
- package/components/Sidebar/sidebar-context.js.map +0 -1
- package/components/Sidebar/sidebar-item.js +0 -6
- package/components/Sidebar/sidebar-item.js.map +0 -1
- package/components/Sidebar/sidebar-section.js +0 -6
- package/components/Sidebar/sidebar-section.js.map +0 -1
- package/components/Sidebar/sidebar.js +0 -6
- package/components/Sidebar/sidebar.js.map +0 -1
- package/react/base/sidebar-element.cjs.js +0 -286
- package/react/base/sidebar-element.cjs.js.map +0 -1
- package/react/base/sidebar-element.js +0 -282
- package/react/base/sidebar-element.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js +0 -130
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-group.js +0 -125
- package/react/components/Sidebar/sgds-sidebar-group.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-item.cjs.js +0 -79
- package/react/components/Sidebar/sgds-sidebar-item.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-item.js +0 -74
- package/react/components/Sidebar/sgds-sidebar-item.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js +0 -131
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-section.js +0 -126
- package/react/components/Sidebar/sgds-sidebar-section.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar.cjs.js +0 -418
- package/react/components/Sidebar/sgds-sidebar.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar.js +0 -413
- package/react/components/Sidebar/sgds-sidebar.js.map +0 -1
- package/react/components/Sidebar/sidebar-context.cjs.js +0 -54
- package/react/components/Sidebar/sidebar-context.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-context.js +0 -46
- package/react/components/Sidebar/sidebar-context.js.map +0 -1
- package/react/components/Sidebar/sidebar-item.cjs.js +0 -11
- package/react/components/Sidebar/sidebar-item.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-item.js +0 -7
- package/react/components/Sidebar/sidebar-item.js.map +0 -1
- package/react/components/Sidebar/sidebar-section.cjs.js +0 -11
- package/react/components/Sidebar/sidebar-section.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-section.js +0 -7
- package/react/components/Sidebar/sidebar-section.js.map +0 -1
- package/react/components/Sidebar/sidebar.cjs.js +0 -11
- package/react/components/Sidebar/sidebar.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar.js +0 -7
- package/react/components/Sidebar/sidebar.js.map +0 -1
- package/react/sidebar/index.cjs.js +0 -42
- package/react/sidebar/index.cjs.js.map +0 -1
- package/react/sidebar/index.d.ts +0 -2
- package/react/sidebar/index.js +0 -18
- package/react/sidebar/index.js.map +0 -1
- package/react/sidebar-group/index.cjs.js +0 -40
- package/react/sidebar-group/index.cjs.js.map +0 -1
- package/react/sidebar-group/index.d.ts +0 -2
- package/react/sidebar-group/index.js +0 -16
- package/react/sidebar-group/index.js.map +0 -1
- package/react/sidebar-item/index.cjs.js +0 -40
- package/react/sidebar-item/index.cjs.js.map +0 -1
- package/react/sidebar-item/index.d.ts +0 -2
- package/react/sidebar-item/index.js +0 -16
- package/react/sidebar-item/index.js.map +0 -1
- package/react/sidebar-section/index.cjs.js +0 -40
- package/react/sidebar-section/index.cjs.js.map +0 -1
- package/react/sidebar-section/index.d.ts +0 -2
- package/react/sidebar-section/index.js +0 -16
- package/react/sidebar-section/index.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const t=globalThis,i=e=>{t.emitLitDebugLogEvents&&t.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let l,a=0;t.litIssuedWarnings??=new Set,l=(e,i)=>{i+=e?` See https://lit.dev/msg/${e} for more information.`:"",t.litIssuedWarnings.has(i)||t.litIssuedWarnings.has(e)||(console.warn(i),t.litIssuedWarnings.add(i))},queueMicrotask(()=>{l("dev-mode","Lit is in dev mode. Not recommended for production!")});const o=t.ShadyDOM?.inUse&&!0===t.ShadyDOM?.noPatch?t.ShadyDOM.wrap:e=>e,s=t.trustedTypes,n=s?s.createPolicy("lit-html",{createHTML:e=>e}):void 0,r=e=>e,c=(e,t,i)=>r,d=e=>{if(T!==c)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");T=e},h=()=>{T=c},v=(e,t,i)=>T(e,t,i),u="$lit$",p=`lit$${Math.random().toFixed(9).slice(2)}$`,g="?"+p,f=`<${g}>`,m=document,w=()=>m.createComment(""),b=e=>null===e||"object"!=typeof e&&"function"!=typeof e,x=Array.isArray,y=e=>x(e)||"function"==typeof e?.[Symbol.iterator],C="[ \t\n\f\r]",Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,M=/>/g,V=new RegExp(`>|${C}(?:([^\\s"'>=/]+)(${C}*=${C}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),k=/'/g,H=/"/g,$=/^(?:script|style|textarea|title)$/i,S=(B=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$)&&l("","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$:B,strings:e,values:t}));var B;const L=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,I=m.createTreeWalker(m,129);let T=c;function P(e,t){if(!x(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!==n?n.createHTML(t):t}const R=(e,t)=>{const i=e.length-1,l=[];let a,o=2===t?"<svg>":3===t?"<math>":"",s=Z;for(let t=0;t<i;t++){const i=e[t];let n,r,c=-1,d=0;for(;d<i.length&&(s.lastIndex=d,r=s.exec(i),null!==r);)if(d=s.lastIndex,s===Z){if("!--"===r[1])s=_;else if(void 0!==r[1])s=M;else if(void 0!==r[2])$.test(r[2])&&(a=new RegExp(`</${r[2]}`,"g")),s=V;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 s===V?">"===r[0]?(s=a??Z,c=-1):void 0===r[1]?c=-2:(c=s.lastIndex-r[2].length,n=r[1],s=void 0===r[3]?V:'"'===r[3]?H:k):s===H||s===k?s=V:s===_||s===M?s=Z:(s=V,a=void 0);console.assert(-1===c||s===V||s===k||s===H,"unexpected parse state B");const h=s===V&&e[t+1].startsWith("/>")?" ":"";o+=s===Z?i+f:c>=0?(l.push(n),i.slice(0,c)+u+i.slice(c)+p+h):i+p+(-2===c?t:h)}return[P(e,o+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),l]};class O{constructor({strings:e,_$litType$:t},a){let o;this.parts=[];let n=0,r=0;const c=e.length-1,d=this.parts,[h,v]=R(e,t);if(this.el=O.createElement(h,a),I.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=I.nextNode())&&d.length<c;){if(1===o.nodeType){{const e=o.localName;if(/^(?:textarea|template)$/i.test(e)&&o.innerHTML.includes(p)){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);l("",t)}}if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(u)){const t=v[r++],i=o.getAttribute(e).split(p),l=/([.?@])?(.*)/.exec(t);d.push({type:1,index:n,name:l[2],strings:i,ctor:"."===l[1]?N:"?"===l[1]?W:"@"===l[1]?q:F}),o.removeAttribute(e)}else e.startsWith(p)&&(d.push({type:6,index:n}),o.removeAttribute(e));if($.test(o.tagName)){const e=o.textContent.split(p),t=e.length-1;if(t>0){o.textContent=s?s.emptyScript:"";for(let i=0;i<t;i++)o.append(e[i],w()),I.nextNode(),d.push({type:2,index:++n});o.append(e[t],w())}}}else if(8===o.nodeType){if(o.data===g)d.push({type:2,index:n});else{let e=-1;for(;-1!==(e=o.data.indexOf(p,e+1));)d.push({type:7,index:n}),e+=p.length-1}}n++}if(v.length!==r)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("${...}")+"`");i&&i({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=m.createElement("template");return i.innerHTML=e,i}}function z(e,t,i=e,l){if(t===L)return t;let a=void 0!==l?i.__directives?.[l]:i.__directive;const o=b(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,i,l)),void 0!==l?(i.__directives??=[])[l]=a:i.__directive=a),void 0!==a&&(t=z(e,a._$resolve(e,t.values),a,l)),t}class D{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:i}=this._$template,l=(e?.creationScope??m).importNode(t,!0);I.currentNode=l;let a=I.nextNode(),o=0,s=0,n=i[0];for(;void 0!==n;){if(o===n.index){let t;2===n.type?t=new U(a,a.nextSibling,this,e):1===n.type?t=new n.ctor(a,n.name,n.strings,this,e):6===n.type&&(t=new j(a,this,e)),this._$parts.push(t),n=i[++s]}o!==n?.index&&(a=I.nextNode(),o++)}return I.currentNode=m,l}_update(e){let t=0;for(const l of this._$parts)void 0!==l&&(i&&i({kind:"set part",part:l,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==l.strings?(l._$setValue(e,l,t),t+=l.strings.length-2):l._$setValue(e[t])),t++}}class U{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,l){this.type=2,this._$committedValue=A,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=i,this.options=l,this.__isConnected=l?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=o(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=z(this,e,t),b(e))e===A||null==e||""===e?(this._$committedValue!==A&&(i&&i({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=A):e!==this._$committedValue&&e!==L&&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 y(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return o(o(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),T!==c){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)}}i&&i({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==A&&b(this._$committedValue)){const t=o(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=v(t,"data","property")),e=this._textSanitizer(e),i&&i({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=m.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=v(t,"data","property")),e=this._textSanitizer(e),i&&i({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:l}=e,a="number"==typeof l?this._$getTemplate(e):(void 0===l.el&&(l.el=O.createElement(P(l.h,l.h[0]),this.options)),l);if(this._$committedValue?._$template===a)i&&i({kind:"template updating",template:a,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new D(a,this),l=e._clone(this.options);i&&i({kind:"template instantiated",template:a,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),e._update(t),i&&i({kind:"template instantiated and updated",template:a,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),this._commitNode(l),this._$committedValue=e}}_$getTemplate(e){let t=E.get(e.strings);return void 0===t&&E.set(e.strings,t=new O(e)),t}_commitIterable(e){x(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,l=0;for(const a of e)l===t.length?t.push(i=new U(this._insert(w()),this._insert(w()),this,this.options)):i=t[l],i._$setValue(a),l++;l<t.length&&(this._$clear(i&&o(i._$endNode).nextSibling,l),t.length=l)}_$clear(e=o(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=o(e).nextSibling;o(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 F{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,l,a){this.type=1,this._$committedValue=A,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=l,this.options=a,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=A,this._sanitizer=void 0}_$setValue(e,t=this,i,l){const a=this.strings;let o=!1;if(void 0===a)e=z(this,e,t,0),o=!b(e)||e!==this._$committedValue&&e!==L,o&&(this._$committedValue=e);else{const l=e;let s,n;for(e=a[0],s=0;s<a.length-1;s++)n=z(this,l[i+s],t,s),n===L&&(n=this._$committedValue[s]),o||=!b(n)||n!==this._$committedValue[s],n===A?e=A:e!==A&&(e+=(n??"")+a[s+1]),this._$committedValue[s]=n}o&&!l&&this._commitValue(e)}_commitValue(e){e===A?o(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=T(this.element,this.name,"attribute")),e=this._sanitizer(e??""),i&&i({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),o(this.element).setAttribute(this.name,e??""))}}class N extends F{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=T(this.element,this.name,"property")),e=this._sanitizer(e),i&&i({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===A?void 0:e}}class W extends F{constructor(){super(...arguments),this.type=4}_commitValue(e){i&&i({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===A),options:this.options}),o(this.element).toggleAttribute(this.name,!!e&&e!==A)}}class q extends F{constructor(e,t,i,l,a){if(super(e,t,i,l,a),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=z(this,e,t,0)??A)===L)return;const l=this._$committedValue,a=e===A&&l!==A||e.capture!==l.capture||e.once!==l.once||e.passive!==l.passive,o=e!==A&&(l===A||a);i&&i({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:a,addListener:o,oldListener:l}),a&&this.element.removeEventListener(this.name,this,l),o&&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 j{constructor(e,t,i){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){i&&i({kind:"commit to element binding",element:this.element,value:e,options:this.options}),z(this,e)}}const K={_boundAttributeSuffix:u,_marker:p,_markerMatch:g,_HTML_RESULT:1,_getTemplateHtml:R,_TemplateInstance:D,_isIterable:y,_resolveDirective:z,_ChildPart:U,_AttributePart:F,_BooleanAttributePart:W,_EventPart:q,_PropertyPart:N,_ElementPart:j},G=t.litHtmlPolyfillSupportDevMode;G?.(O,U),(t.litHtmlVersions??=[]).push("3.3.2"),t.litHtmlVersions.length>1&&queueMicrotask(()=>{l("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const J=(e,t,l)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const o=a++,s=l?.renderBefore??t;let n=s._$litPart$;if(i&&i({kind:"begin render",id:o,value:e,container:t,options:l,part:n}),void 0===n){const e=l?.renderBefore??null;s._$litPart$=n=new U(t.insertBefore(w(),e),e,void 0,l??{})}return n._$setValue(e),i&&i({kind:"end render",id:o,value:e,container:t,options:l,part:n}),n};J.setSanitizer=d,J.createSanitizer=v,J._testOnlyClearSanitizerFactoryDoNotCallOrElse=h;
|
|
7
|
+
const t=globalThis,i=e=>{t.emitLitDebugLogEvents&&t.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let l,a=0;t.litIssuedWarnings??=new Set,l=(e,i)=>{i+=e?` See https://lit.dev/msg/${e} for more information.`:"",t.litIssuedWarnings.has(i)||t.litIssuedWarnings.has(e)||(console.warn(i),t.litIssuedWarnings.add(i))},queueMicrotask(()=>{l("dev-mode","Lit is in dev mode. Not recommended for production!")});const o=t.ShadyDOM?.inUse&&!0===t.ShadyDOM?.noPatch?t.ShadyDOM.wrap:e=>e,s=t.trustedTypes,n=s?s.createPolicy("lit-html",{createHTML:e=>e}):void 0,r=e=>e,c=(e,t,i)=>r,d=e=>{if(T!==c)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");T=e},h=()=>{T=c},v=(e,t,i)=>T(e,t,i),u="$lit$",p=`lit$${Math.random().toFixed(9).slice(2)}$`,g="?"+p,f=`<${g}>`,m=document,w=()=>m.createComment(""),b=e=>null===e||"object"!=typeof e&&"function"!=typeof e,x=Array.isArray,y=e=>x(e)||"function"==typeof e?.[Symbol.iterator],C="[ \t\n\f\r]",Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,M=/>/g,V=new RegExp(`>|${C}(?:([^\\s"'>=/]+)(${C}*=${C}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),k=/'/g,H=/"/g,$=/^(?:script|style|textarea|title)$/i,S=(B=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$)&&l("","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$:B,strings:e,values:t}));var B;const A=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),E=new WeakMap,I=m.createTreeWalker(m,129);let T=c;function P(e,t){if(!x(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!==n?n.createHTML(t):t}const R=(e,t)=>{const i=e.length-1,l=[];let a,o=2===t?"<svg>":3===t?"<math>":"",s=Z;for(let t=0;t<i;t++){const i=e[t];let n,r,c=-1,d=0;for(;d<i.length&&(s.lastIndex=d,r=s.exec(i),null!==r);)if(d=s.lastIndex,s===Z){if("!--"===r[1])s=_;else if(void 0!==r[1])s=M;else if(void 0!==r[2])$.test(r[2])&&(a=new RegExp(`</${r[2]}`,"g")),s=V;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 s===V?">"===r[0]?(s=a??Z,c=-1):void 0===r[1]?c=-2:(c=s.lastIndex-r[2].length,n=r[1],s=void 0===r[3]?V:'"'===r[3]?H:k):s===H||s===k?s=V:s===_||s===M?s=Z:(s=V,a=void 0);console.assert(-1===c||s===V||s===k||s===H,"unexpected parse state B");const h=s===V&&e[t+1].startsWith("/>")?" ":"";o+=s===Z?i+f:c>=0?(l.push(n),i.slice(0,c)+u+i.slice(c)+p+h):i+p+(-2===c?t:h)}return[P(e,o+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),l]};class O{constructor({strings:e,_$litType$:t},a){let o;this.parts=[];let n=0,r=0;const c=e.length-1,d=this.parts,[h,v]=R(e,t);if(this.el=O.createElement(h,a),I.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=I.nextNode())&&d.length<c;){if(1===o.nodeType){{const e=o.localName;if(/^(?:textarea|template)$/i.test(e)&&o.innerHTML.includes(p)){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);l("",t)}}if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(u)){const t=v[r++],i=o.getAttribute(e).split(p),l=/([.?@])?(.*)/.exec(t);d.push({type:1,index:n,name:l[2],strings:i,ctor:"."===l[1]?N:"?"===l[1]?W:"@"===l[1]?q:F}),o.removeAttribute(e)}else e.startsWith(p)&&(d.push({type:6,index:n}),o.removeAttribute(e));if($.test(o.tagName)){const e=o.textContent.split(p),t=e.length-1;if(t>0){o.textContent=s?s.emptyScript:"";for(let i=0;i<t;i++)o.append(e[i],w()),I.nextNode(),d.push({type:2,index:++n});o.append(e[t],w())}}}else if(8===o.nodeType){if(o.data===g)d.push({type:2,index:n});else{let e=-1;for(;-1!==(e=o.data.indexOf(p,e+1));)d.push({type:7,index:n}),e+=p.length-1}}n++}if(v.length!==r)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("${...}")+"`");i&&i({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=m.createElement("template");return i.innerHTML=e,i}}function z(e,t,i=e,l){if(t===A)return t;let a=void 0!==l?i.__directives?.[l]:i.__directive;const o=b(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,i,l)),void 0!==l?(i.__directives??=[])[l]=a:i.__directive=a),void 0!==a&&(t=z(e,a._$resolve(e,t.values),a,l)),t}class D{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:i}=this._$template,l=(e?.creationScope??m).importNode(t,!0);I.currentNode=l;let a=I.nextNode(),o=0,s=0,n=i[0];for(;void 0!==n;){if(o===n.index){let t;2===n.type?t=new U(a,a.nextSibling,this,e):1===n.type?t=new n.ctor(a,n.name,n.strings,this,e):6===n.type&&(t=new j(a,this,e)),this._$parts.push(t),n=i[++s]}o!==n?.index&&(a=I.nextNode(),o++)}return I.currentNode=m,l}_update(e){let t=0;for(const l of this._$parts)void 0!==l&&(i&&i({kind:"set part",part:l,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==l.strings?(l._$setValue(e,l,t),t+=l.strings.length-2):l._$setValue(e[t])),t++}}class U{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,l){this.type=2,this._$committedValue=L,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=i,this.options=l,this.__isConnected=l?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=o(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=z(this,e,t),b(e))e===L||null==e||""===e?(this._$committedValue!==L&&(i&&i({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=L):e!==this._$committedValue&&e!==A&&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 y(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return o(o(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),T!==c){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)}}i&&i({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==L&&b(this._$committedValue)){const t=o(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=v(t,"data","property")),e=this._textSanitizer(e),i&&i({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=m.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=v(t,"data","property")),e=this._textSanitizer(e),i&&i({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:l}=e,a="number"==typeof l?this._$getTemplate(e):(void 0===l.el&&(l.el=O.createElement(P(l.h,l.h[0]),this.options)),l);if(this._$committedValue?._$template===a)i&&i({kind:"template updating",template:a,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new D(a,this),l=e._clone(this.options);i&&i({kind:"template instantiated",template:a,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),e._update(t),i&&i({kind:"template instantiated and updated",template:a,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),this._commitNode(l),this._$committedValue=e}}_$getTemplate(e){let t=E.get(e.strings);return void 0===t&&E.set(e.strings,t=new O(e)),t}_commitIterable(e){x(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,l=0;for(const a of e)l===t.length?t.push(i=new U(this._insert(w()),this._insert(w()),this,this.options)):i=t[l],i._$setValue(a),l++;l<t.length&&(this._$clear(i&&o(i._$endNode).nextSibling,l),t.length=l)}_$clear(e=o(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=o(e).nextSibling;o(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 F{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,l,a){this.type=1,this._$committedValue=L,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=l,this.options=a,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=L,this._sanitizer=void 0}_$setValue(e,t=this,i,l){const a=this.strings;let o=!1;if(void 0===a)e=z(this,e,t,0),o=!b(e)||e!==this._$committedValue&&e!==A,o&&(this._$committedValue=e);else{const l=e;let s,n;for(e=a[0],s=0;s<a.length-1;s++)n=z(this,l[i+s],t,s),n===A&&(n=this._$committedValue[s]),o||=!b(n)||n!==this._$committedValue[s],n===L?e=L:e!==L&&(e+=(n??"")+a[s+1]),this._$committedValue[s]=n}o&&!l&&this._commitValue(e)}_commitValue(e){e===L?o(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=T(this.element,this.name,"attribute")),e=this._sanitizer(e??""),i&&i({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),o(this.element).setAttribute(this.name,e??""))}}class N extends F{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=T(this.element,this.name,"property")),e=this._sanitizer(e),i&&i({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===L?void 0:e}}class W extends F{constructor(){super(...arguments),this.type=4}_commitValue(e){i&&i({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===L),options:this.options}),o(this.element).toggleAttribute(this.name,!!e&&e!==L)}}class q extends F{constructor(e,t,i,l,a){if(super(e,t,i,l,a),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=z(this,e,t,0)??L)===A)return;const l=this._$committedValue,a=e===L&&l!==L||e.capture!==l.capture||e.once!==l.once||e.passive!==l.passive,o=e!==L&&(l===L||a);i&&i({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:a,addListener:o,oldListener:l}),a&&this.element.removeEventListener(this.name,this,l),o&&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 j{constructor(e,t,i){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){i&&i({kind:"commit to element binding",element:this.element,value:e,options:this.options}),z(this,e)}}const K={_boundAttributeSuffix:u,_marker:p,_markerMatch:g,_HTML_RESULT:1,_getTemplateHtml:R,_TemplateInstance:D,_isIterable:y,_resolveDirective:z,_ChildPart:U,_AttributePart:F,_BooleanAttributePart:W,_EventPart:q,_PropertyPart:N,_ElementPart:j},G=t.litHtmlPolyfillSupportDevMode;G?.(O,U),(t.litHtmlVersions??=[]).push("3.3.2"),t.litHtmlVersions.length>1&&queueMicrotask(()=>{l("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const J=(e,t,l)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const o=a++,s=l?.renderBefore??t;let n=s._$litPart$;if(i&&i({kind:"begin render",id:o,value:e,container:t,options:l,part:n}),void 0===n){const e=l?.renderBefore??null;s._$litPart$=n=new U(t.insertBefore(w(),e),e,void 0,l??{})}return n._$setValue(e),i&&i({kind:"end render",id:o,value:e,container:t,options:l,part:n}),n};J.setSanitizer=d,J.createSanitizer=v,J._testOnlyClearSanitizerFactoryDoNotCallOrElse=h;
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
@@ -21,23 +21,23 @@ const X=1,Y=2,Q=3,ee=4,te=e=>(...t)=>({_$litDirective$:e,values:t});class ie{con
|
|
|
21
21
|
* Copyright 2020 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
class extends ie{constructor(e){if(super(e),e.type!==Q&&e.type!==X&&e.type!==ee)throw new Error("The `live` directive is not allowed on child or event bindings");if(!oe(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===
|
|
24
|
+
class extends ie{constructor(e){if(super(e),e.type!==Q&&e.type!==X&&e.type!==ee)throw new Error("The `live` directive is not allowed on child or event bindings");if(!oe(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===A||t===L)return t;const i=e.element,l=e.name;if(e.type===Q){if(t===i[l])return A}else if(e.type===ee){if(!!t===i.hasAttribute(l))return A}else if(e.type===X&&i.getAttribute(l)===String(t))return A;return de(e),t}}),ue=globalThis,pe=ue.ShadowRoot&&(void 0===ue.ShadyCSS||ue.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ge=Symbol(),fe=new WeakMap;
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2019 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/class me{constructor(e,t,i){if(this._$cssResult$=!0,i!==ge)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(pe&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=fe.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&fe.set(t,e))}return e}toString(){return this.cssText}}const we=(e,...t)=>{const i=1===e.length?e[0]:t.reduce((t,i,l)=>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.`)})(i)+e[l+1],e[0]);return new me(i,e,ge)},be=e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return new me("string"==typeof(i=t)?i:String(i),void 0,ge);var i},xe=pe?e=>e:e=>e instanceof CSSStyleSheet?be(e):e,{is:ye,defineProperty:Ce,getOwnPropertyDescriptor:Ze,getOwnPropertyNames:_e,getOwnPropertySymbols:Me,getPrototypeOf:Ve}=Object,ke=globalThis;let He;const $e=ke.trustedTypes,Se=$e?$e.emptyScript:"",Be=ke.reactiveElementPolyfillSupportDevMode;ke.litIssuedWarnings??=new Set,He=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,ke.litIssuedWarnings.has(t)||ke.litIssuedWarnings.has(e)||(console.warn(t),ke.litIssuedWarnings.add(t))},queueMicrotask(()=>{He("dev-mode","Lit is in dev mode. Not recommended for production!"),ke.ShadyDOM?.inUse&&void 0===Be&&He("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const Le=(e,t)=>e,Ae={toAttribute(e,t){switch(t){case Boolean:e=e?Se:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},Ee=(e,t)=>!ye(e,t),Ie={attribute:!0,type:String,converter:Ae,reflect:!1,useDefault:!1,hasChanged:Ee};Symbol.metadata??=Symbol("metadata"),ke.litPropertyMetadata??=new WeakMap;class Te 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=Ie){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 i=Symbol.for(`${String(e)} (@property() cache)`),l=this.getPropertyDescriptor(e,i,t);void 0!==l&&Ce(this.prototype,e,l)}}static getPropertyDescriptor(e,t,i){const{get:l,set:a}=Ze(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==l){if("value"in(Ze(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.`);He("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:l,set(t){const o=l?.call(this);a?.call(this,t),this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ie}static __prepare(){if(this.hasOwnProperty(Le("elementProperties")))return;const e=Ve(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Le("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(Le("properties"))){const e=this.properties,t=[..._e(e),...Me(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const i=this.__attributeNameForProperty(e,t);void 0!==i&&this.__attributeToPropertyMap.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&He("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&He("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 i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(xe(e))}else void 0!==e&&t.push(xe(e));return t}static __attributeNameForProperty(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"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 i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(pe)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const i of t){const t=document.createElement("style"),l=ue.litNonce;void 0!==l&&t.setAttribute("nonce",l),t.textContent=i.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,i){this._$attributeToProperty(e,i)}__propertyToAttribute(e,t){const i=this.constructor.elementProperties.get(e),l=this.constructor.__attributeNameForProperty(e,i);if(void 0!==l&&!0===i.reflect){const a=(void 0!==i.converter?.toAttribute?i.converter:Ae).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===a&&He("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==a?this.removeAttribute(l):this.setAttribute(l,a),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const i=this.constructor,l=i.__attributeToPropertyMap.get(e);if(void 0!==l&&this.__reflectingProperty!==l){const e=i.getPropertyOptions(l),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Ae;this.__reflectingProperty=l;const o=a.fromAttribute(t,e.type);this[l]=o??this.__defaultValues?.get(l)??o,this.__reflectingProperty=null}}requestUpdate(e,t,i,l=!1,a){if(void 0!==e){e instanceof Event&&He("","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 o=this.constructor;!1===l&&(a=this[e]),i??=o.getPropertyOptions(e);if(!((i.hasChanged??Ee)(a,t)||i.useDefault&&i.reflect&&a===this.__defaultValues?.get(e)&&!this.hasAttribute(o.__attributeNameForProperty(e,i))))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,{useDefault:i,reflect:l,wrapped:a},o){i&&!(this.__defaultValues??=new Map).has(e)&&(this.__defaultValues.set(e,o??t??this[e]),!0!==a||void 0!==o)||(this._$changedProperties.has(e)||(this.hasUpdated||i||(t=void 0),this._$changedProperties.set(e,t)),!0===l&&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&&He("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"},ke.emitLitDebugLogEvents&&ke.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 Ve(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,i]of e){const{wrapped:e}=i,l=this[t];!0!==e||this._$changedProperties.has(t)||void 0===l||this._$changeProperty(t,void 0,i,l)}}let t=!1;const i=this._$changedProperties;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this.__controllers?.forEach(e=>e.hostUpdate?.()),this.update(i)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(i)}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")&&He("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){}}Te.elementStyles=[],Te.shadowRootOptions={mode:"open"},Te[Le("elementProperties")]=new Map,Te[Le("finalized")]=new Map,Be?.({ReactiveElement:Te});{Te.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(Le("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Te.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Te.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(ke.reactiveElementVersions??=[]).push("2.1.2"),ke.reactiveElementVersions.length>1&&queueMicrotask(()=>{He("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")})
|
|
29
|
+
*/class me{constructor(e,t,i){if(this._$cssResult$=!0,i!==ge)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(pe&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=fe.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&fe.set(t,e))}return e}toString(){return this.cssText}}const we=(e,...t)=>{const i=1===e.length?e[0]:t.reduce((t,i,l)=>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.`)})(i)+e[l+1],e[0]);return new me(i,e,ge)},be=e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return new me("string"==typeof(i=t)?i:String(i),void 0,ge);var i},xe=pe?e=>e:e=>e instanceof CSSStyleSheet?be(e):e,{is:ye,defineProperty:Ce,getOwnPropertyDescriptor:Ze,getOwnPropertyNames:_e,getOwnPropertySymbols:Me,getPrototypeOf:Ve}=Object,ke=globalThis;let He;const $e=ke.trustedTypes,Se=$e?$e.emptyScript:"",Be=ke.reactiveElementPolyfillSupportDevMode;ke.litIssuedWarnings??=new Set,He=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,ke.litIssuedWarnings.has(t)||ke.litIssuedWarnings.has(e)||(console.warn(t),ke.litIssuedWarnings.add(t))},queueMicrotask(()=>{He("dev-mode","Lit is in dev mode. Not recommended for production!"),ke.ShadyDOM?.inUse&&void 0===Be&&He("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const Ae=(e,t)=>e,Le={toAttribute(e,t){switch(t){case Boolean:e=e?Se:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},Ee=(e,t)=>!ye(e,t),Ie={attribute:!0,type:String,converter:Le,reflect:!1,useDefault:!1,hasChanged:Ee};Symbol.metadata??=Symbol("metadata"),ke.litPropertyMetadata??=new WeakMap;class Te 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=Ie){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 i=Symbol.for(`${String(e)} (@property() cache)`),l=this.getPropertyDescriptor(e,i,t);void 0!==l&&Ce(this.prototype,e,l)}}static getPropertyDescriptor(e,t,i){const{get:l,set:a}=Ze(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==l){if("value"in(Ze(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.`);He("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:l,set(t){const o=l?.call(this);a?.call(this,t),this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ie}static __prepare(){if(this.hasOwnProperty(Ae("elementProperties")))return;const e=Ve(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ae("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(Ae("properties"))){const e=this.properties,t=[..._e(e),...Me(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const i=this.__attributeNameForProperty(e,t);void 0!==i&&this.__attributeToPropertyMap.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&He("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&He("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 i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(xe(e))}else void 0!==e&&t.push(xe(e));return t}static __attributeNameForProperty(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"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 i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(pe)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const i of t){const t=document.createElement("style"),l=ue.litNonce;void 0!==l&&t.setAttribute("nonce",l),t.textContent=i.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,i){this._$attributeToProperty(e,i)}__propertyToAttribute(e,t){const i=this.constructor.elementProperties.get(e),l=this.constructor.__attributeNameForProperty(e,i);if(void 0!==l&&!0===i.reflect){const a=(void 0!==i.converter?.toAttribute?i.converter:Le).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===a&&He("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==a?this.removeAttribute(l):this.setAttribute(l,a),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const i=this.constructor,l=i.__attributeToPropertyMap.get(e);if(void 0!==l&&this.__reflectingProperty!==l){const e=i.getPropertyOptions(l),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Le;this.__reflectingProperty=l;const o=a.fromAttribute(t,e.type);this[l]=o??this.__defaultValues?.get(l)??o,this.__reflectingProperty=null}}requestUpdate(e,t,i,l=!1,a){if(void 0!==e){e instanceof Event&&He("","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 o=this.constructor;!1===l&&(a=this[e]),i??=o.getPropertyOptions(e);if(!((i.hasChanged??Ee)(a,t)||i.useDefault&&i.reflect&&a===this.__defaultValues?.get(e)&&!this.hasAttribute(o.__attributeNameForProperty(e,i))))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,{useDefault:i,reflect:l,wrapped:a},o){i&&!(this.__defaultValues??=new Map).has(e)&&(this.__defaultValues.set(e,o??t??this[e]),!0!==a||void 0!==o)||(this._$changedProperties.has(e)||(this.hasUpdated||i||(t=void 0),this._$changedProperties.set(e,t)),!0===l&&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&&He("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"},ke.emitLitDebugLogEvents&&ke.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 Ve(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,i]of e){const{wrapped:e}=i,l=this[t];!0!==e||this._$changedProperties.has(t)||void 0===l||this._$changeProperty(t,void 0,i,l)}}let t=!1;const i=this._$changedProperties;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this.__controllers?.forEach(e=>e.hostUpdate?.()),this.update(i)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(i)}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")&&He("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){}}Te.elementStyles=[],Te.shadowRootOptions={mode:"open"},Te[Ae("elementProperties")]=new Map,Te[Ae("finalized")]=new Map,Be?.({ReactiveElement:Te});{Te.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(Ae("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Te.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Te.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(ke.reactiveElementVersions??=[]).push("2.1.2"),ke.reactiveElementVersions.length>1&&queueMicrotask(()=>{He("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")})
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/;const Pe=globalThis;let Re;Pe.litIssuedWarnings??=new Set,Re=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,Pe.litIssuedWarnings.has(t)||Pe.litIssuedWarnings.has(e)||(console.warn(t),Pe.litIssuedWarnings.add(t))};class Oe extends Te{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.__childPart=J(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return
|
|
34
|
+
*/;const Pe=globalThis;let Re;Pe.litIssuedWarnings??=new Set,Re=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,Pe.litIssuedWarnings.has(t)||Pe.litIssuedWarnings.has(e)||(console.warn(t),Pe.litIssuedWarnings.add(t))};class Oe extends Te{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.__childPart=J(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return A}}var ze;Oe._$litElement$=!0,Oe[(ze="finalized",ze)]=!0,Pe.litElementHydrateSupport?.({LitElement:Oe});const De=Pe.litElementPolyfillSupportDevMode;
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
39
|
*/
|
|
40
|
-
let Ue;De?.({LitElement:Oe}),(Pe.litElementVersions??=[]).push("4.2.2"),Pe.litElementVersions.length>1&&queueMicrotask(()=>{Re("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,Ue=(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 Fe={attribute:!0,type:String,converter:
|
|
40
|
+
let Ue;De?.({LitElement:Oe}),(Pe.litElementVersions??=[]).push("4.2.2"),Pe.litElementVersions.length>1&&queueMicrotask(()=>{Re("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,Ue=(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 Fe={attribute:!0,type:String,converter:Le,reflect:!1,hasChanged:Ee},Ne=(e=Fe,t,i)=>{const{kind:l,metadata:a}=i;null==a&&Ue("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 o=globalThis.litPropertyMetadata.get(a);if(void 0===o&&globalThis.litPropertyMetadata.set(a,o=new Map),"setter"===l&&((e=Object.create(e)).wrapped=!0),o.set(i.name,e),"accessor"===l){const{name:l}=i;return{set(i){const a=t.get.call(this);t.set.call(this,i),this.requestUpdate(l,a,e,!0,i)},init(t){return void 0!==t&&this._$changeProperty(l,void 0,e,t),t}}}if("setter"===l){const{name:l}=i;return function(i){const a=this[l];t.call(this,i),this.requestUpdate(l,a,e,!0,i)}}throw new Error(`Unsupported decorator location: ${l}`)};function We(e){return(t,i)=>"object"==typeof i?Ne(e,t,i):((e,t,i)=>{const l=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),l?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}
|
|
41
41
|
/**
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
@@ -68,7 +68,7 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
68
68
|
* @license
|
|
69
69
|
* Copyright 2018 Google LLC
|
|
70
70
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
71
|
-
*/globalThis.litIssuedWarnings??=new Set,Ke=(e,t)=>{t+=e?` 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 Xe=te(class extends ie{constructor(e){if(super(e),e.type!==X||"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 i=e.element.classList;for(const e of this._previousClasses)e in t||(i.remove(e),this._previousClasses.delete(e));for(const e in t){const l=!!t[e];l===this._previousClasses.has(e)||this._staticClasses?.has(e)||(l?(i.add(e),this._previousClasses.add(e)):(i.remove(e),this._previousClasses.delete(e)))}return
|
|
71
|
+
*/globalThis.litIssuedWarnings??=new Set,Ke=(e,t)=>{t+=e?` 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 Xe=te(class extends ie{constructor(e){if(super(e),e.type!==X||"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 i=e.element.classList;for(const e of this._previousClasses)e in t||(i.remove(e),this._previousClasses.delete(e));for(const e in t){const l=!!t[e];l===this._previousClasses.has(e)||this._staticClasses?.has(e)||(l?(i.add(e),this._previousClasses.add(e)):(i.remove(e),this._previousClasses.delete(e)))}return A}}),Ye=e=>e??L,Qe=(e,t)=>{const i=e._$disconnectableChildren;if(void 0===i)return!1;for(const e of i)e._$notifyDirectiveConnectionChanged?.(t,!1),Qe(e,t);return!0},et=e=>{let t,i;do{if(void 0===(t=e._$parent))break;i=t._$disconnectableChildren,i.delete(e),e=t}while(0===i?.size)},tt=e=>{for(let t;t=e._$parent;e=t){let i=t._$disconnectableChildren;if(void 0===i)t._$disconnectableChildren=i=new Set;else if(i.has(e))break;i.add(e),at(t)}};
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright 2018 Google LLC
|
|
@@ -78,7 +78,7 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
78
78
|
* @license
|
|
79
79
|
* Copyright 2020 Google LLC
|
|
80
80
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
81
|
-
*/const st=()=>new nt;class nt{}const rt=new WeakMap;const ct=te(class extends ot{render(e){return A}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),A}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=rt.get(t);void 0===i&&(i=new WeakMap,rt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.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?rt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),dt=["top","right","bottom","left"],ht=Math.min,vt=Math.max,ut=Math.round,pt=Math.floor,gt=e=>({x:e,y:e}),ft={left:"right",right:"left",bottom:"top",top:"bottom"},mt={start:"end",end:"start"};function wt(e,t,i){return vt(e,ht(t,i))}function bt(e,t){return"function"==typeof e?e(t):e}function xt(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function Ct(e){return"x"===e?"y":"x"}function Zt(e){return"y"===e?"height":"width"}const _t=new Set(["top","bottom"]);function Mt(e){return _t.has(xt(e))?"y":"x"}function Vt(e){return Ct(Mt(e))}function kt(e,t,i){void 0===i&&(i=!1);const l=yt(e),a=Vt(e),o=Zt(a);let s="x"===a?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Et(s)),[s,Et(s)]}function Ht(e){return e.replace(/start|end/g,e=>mt[e])}const $t=["left","right"],St=["right","left"],Bt=["top","bottom"],Lt=["bottom","top"];function At(e,t,i,l){const a=yt(e);let o=function(e,t,i){switch(e){case"top":case"bottom":return i?t?St:$t:t?$t:St;case"left":case"right":return t?Bt:Lt;default:return[]}}(xt(e),"start"===i,l);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ht)))),o}function Et(e){return e.replace(/left|right|bottom|top/g,e=>ft[e])}function It(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Tt(e){const{x:t,y:i,width:l,height:a}=e;return{width:l,height:a,top:i,left:t,right:t+l,bottom:i+a,x:t,y:i}}function Pt(e,t,i){let{reference:l,floating:a}=e;const o=Mt(t),s=Vt(t),n=Zt(s),r=xt(t),c="y"===o,d=l.x+l.width/2-a.width/2,h=l.y+l.height/2-a.height/2,v=l[n]/2-a[n]/2;let u;switch(r){case"top":u={x:d,y:l.y-a.height};break;case"bottom":u={x:d,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:h};break;case"left":u={x:l.x-a.width,y:h};break;default:u={x:l.x,y:l.y}}switch(yt(t)){case"start":u[s]-=v*(i&&c?-1:1);break;case"end":u[s]+=v*(i&&c?-1:1)}return u}async function Rt(e,t){var i;void 0===t&&(t={});const{x:l,y:a,platform:o,rects:s,elements:n,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=bt(t,e),p=It(u),g=n[v?"floating"===h?"reference":"floating":h],f=Tt(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(g)))||i?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:r})),m="floating"===h?{x:l,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),b=await(null==o.isElement?void 0:o.isElement(w))&&await(null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},x=Tt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:m,offsetParent:w,strategy:r}):m);return{top:(f.top-x.top+p.top)/b.y,bottom:(x.bottom-f.bottom+p.bottom)/b.y,left:(f.left-x.left+p.left)/b.x,right:(x.right-f.right+p.right)/b.x}}function Ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zt(e){return dt.some(t=>e[t]>=0)}const Dt=new Set(["left","top"]);function Ut(){return"undefined"!=typeof window}function Ft(e){return qt(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Wt(e){var t;return null==(t=(qt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qt(e){return!!Ut()&&(e instanceof Node||e instanceof Nt(e).Node)}function jt(e){return!!Ut()&&(e instanceof Element||e instanceof Nt(e).Element)}function Kt(e){return!!Ut()&&(e instanceof HTMLElement||e instanceof Nt(e).HTMLElement)}function Gt(e){return!(!Ut()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot)}const Jt=new Set(["inline","contents"]);function Xt(e){const{overflow:t,overflowX:i,overflowY:l,display:a}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!Jt.has(a)}const Yt=new Set(["table","td","th"]);function Qt(e){return Yt.has(Ft(e))}const ei=[":popover-open",":modal"];function ti(e){return ei.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ii=["transform","translate","scale","rotate","perspective"],li=["transform","translate","scale","rotate","perspective","filter"],ai=["paint","layout","strict","content"];function oi(e){const t=si(),i=jt(e)?ci(e):e;return ii.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||li.some(e=>(i.willChange||"").includes(e))||ai.some(e=>(i.contain||"").includes(e))}function si(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ni=new Set(["html","body","#document"]);function ri(e){return ni.has(Ft(e))}function ci(e){return Nt(e).getComputedStyle(e)}function di(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===Ft(e))return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||Wt(e);return Gt(t)?t.host:t}function vi(e){const t=hi(e);return ri(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(t)&&Xt(t)?t:vi(t)}function ui(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const a=vi(e),o=a===(null==(l=e.ownerDocument)?void 0:l.body),s=Nt(a);if(o){const e=pi(s);return t.concat(s,s.visualViewport||[],Xt(a)?a:[],e&&i?ui(e):[])}return t.concat(a,ui(a,[],i))}function pi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gi(e){const t=ci(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const a=Kt(e),o=a?e.offsetWidth:i,s=a?e.offsetHeight:l,n=ut(i)!==o||ut(l)!==s;return n&&(i=o,l=s),{width:i,height:l,$:n}}function fi(e){return jt(e)?e:e.contextElement}function mi(e){const t=fi(e);if(!Kt(t))return gt(1);const i=t.getBoundingClientRect(),{width:l,height:a,$:o}=gi(t);let s=(o?ut(i.width):i.width)/l,n=(o?ut(i.height):i.height)/a;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const wi=gt(0);function bi(e){const t=Nt(e);return si()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wi}function xi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const a=e.getBoundingClientRect(),o=fi(e);let s=gt(1);t&&(l?jt(l)&&(s=mi(l)):s=mi(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Nt(e))&&t}(o,i,l)?bi(o):gt(0);let r=(a.left+n.x)/s.x,c=(a.top+n.y)/s.y,d=a.width/s.x,h=a.height/s.y;if(o){const e=Nt(o),t=l&&jt(l)?Nt(l):l;let i=e,a=pi(i);for(;a&&l&&t!==i;){const e=mi(a),t=a.getBoundingClientRect(),l=ci(a),o=t.left+(a.clientLeft+parseFloat(l.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(l.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=o,c+=s,i=Nt(a),a=pi(i)}}return Tt({width:d,height:h,x:r,y:c})}function yi(e,t){const i=di(e).scrollLeft;return t?t.left+i:xi(Wt(e)).left+i}function Ci(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-yi(e,i),y:i.top+t.scrollTop}}const Zi=new Set(["absolute","fixed"]);function _i(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Nt(e),l=Wt(e),a=i.visualViewport;let o=l.clientWidth,s=l.clientHeight,n=0,r=0;if(a){o=a.width,s=a.height;const e=si();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,r=a.offsetTop)}const c=yi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,s=Math.abs(l.clientWidth-t.clientWidth-a);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:n,y:r}}(e,i);else if("document"===t)l=function(e){const t=Wt(e),i=di(e),l=e.ownerDocument.body,a=vt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),o=vt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let s=-i.scrollLeft+yi(e);const n=-i.scrollTop;return"rtl"===ci(l).direction&&(s+=vt(t.clientWidth,l.clientWidth)-a),{width:a,height:o,x:s,y:n}}(Wt(e));else if(jt(t))l=function(e,t){const i=xi(e,!0,"fixed"===t),l=i.top+e.clientTop,a=i.left+e.clientLeft,o=Kt(e)?mi(e):gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:l*o.y}}(t,i);else{const i=bi(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Tt(l)}function Mi(e,t){const i=hi(e);return!(i===t||!jt(i)||ri(i))&&("fixed"===ci(i).position||Mi(i,t))}function Vi(e,t,i){const l=Kt(t),a=Wt(t),o="fixed"===i,s=xi(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const r=gt(0);function c(){r.x=yi(a)}if(l||!l&&!o)if(("body"!==Ft(t)||Xt(a))&&(n=di(t)),l){const e=xi(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else a&&c();o&&!l&&a&&c();const d=!a||l||o?gt(0):Ci(a,n);return{x:s.left+n.scrollLeft-r.x-d.x,y:s.top+n.scrollTop-r.y-d.y,width:s.width,height:s.height}}function ki(e){return"static"===ci(e).position}function Hi(e,t){if(!Kt(e)||"fixed"===ci(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Wt(e)===i&&(i=i.ownerDocument.body),i}function $i(e,t){const i=Nt(e);if(ti(e))return i;if(!Kt(e)){let t=hi(e);for(;t&&!ri(t);){if(jt(t)&&!ki(t))return t;t=hi(t)}return i}let l=Hi(e,t);for(;l&&Qt(l)&&ki(l);)l=Hi(l,t);return l&&ri(l)&&ki(l)&&!oi(l)?i:l||function(e){let t=hi(e);for(;Kt(t)&&!ri(t);){if(oi(t))return t;if(ti(t))return null;t=hi(t)}return null}(e)||i}const Si={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:a}=e;const o="fixed"===a,s=Wt(l),n=!!t&&ti(t.floating);if(l===s||n&&o)return i;let r={scrollLeft:0,scrollTop:0},c=gt(1);const d=gt(0),h=Kt(l);if((h||!h&&!o)&&(("body"!==Ft(l)||Xt(s))&&(r=di(l)),Kt(l))){const e=xi(l);c=mi(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!s||h||o?gt(0):Ci(s,r);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:Wt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:a}=e;const o=[..."clippingAncestors"===i?ti(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=ui(e,[],!1).filter(e=>jt(e)&&"body"!==Ft(e)),a=null;const o="fixed"===ci(e).position;let s=o?hi(e):e;for(;jt(s)&&!ri(s);){const t=ci(s),i=oi(s);i||"fixed"!==t.position||(a=null),(o?!i&&!a:!i&&"static"===t.position&&a&&Zi.has(a.position)||Xt(s)&&!i&&Mi(e,s))?l=l.filter(e=>e!==s):a=t,s=hi(s)}return t.set(e,l),l}(t,this._c):[].concat(i),l],s=o[0],n=o.reduce((e,i)=>{const l=_i(t,i,a);return e.top=vt(l.top,e.top),e.right=ht(l.right,e.right),e.bottom=ht(l.bottom,e.bottom),e.left=vt(l.left,e.left),e},_i(t,s,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:$i,getElementRects:async function(e){const t=this.getOffsetParent||$i,i=this.getDimensions,l=await i(e.floating);return{reference:Vi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=gi(e);return{width:t,height:i}},getScale:mi,isElement:jt,isRTL:function(e){return"rtl"===ci(e).direction}};function Bi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Li(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=l,c=fi(e),d=a||o?[...c?ui(c):[],...ui(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const h=c&&n?function(e,t){let i,l=null;const a=Wt(e);function o(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function s(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),o();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=c;if(n||t(),!v||!u)return;const p={rootMargin:-pt(h)+"px "+-pt(a.clientWidth-(d+v))+"px "+-pt(a.clientHeight-(h+u))+"px "+-pt(d)+"px",threshold:vt(0,ht(1,r))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==r){if(!g)return s();l?s(!1,l):i=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==l||Bi(c,e.getBoundingClientRect())||s(),g=!1}try{l=new IntersectionObserver(f,{...p,root:a.ownerDocument})}catch(e){l=new IntersectionObserver(f,p)}l.observe(e)}(!0),o}(c,i):null;let v,u=-1,p=null;s&&(p=new ResizeObserver(e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),i()}),c&&!r&&p.observe(c),p.observe(t));let g=r?xi(e):null;return r&&function t(){const l=xi(e);g&&!Bi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,r&&cancelAnimationFrame(v)}}const Ai=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:a,y:o,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:i,platform:l,elements:a}=e,o=await(null==l.isRTL?void 0:l.isRTL(a.floating)),s=xt(i),n=yt(i),r="y"===Mt(i),c=Dt.has(s)?-1:1,d=o&&r?-1:1,h=bt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof p&&(u="end"===n?-1*p:p),r?{x:u*d,y:v*c}:{x:v*c,y:u*d}}(t,e);return s===(null==(i=n.offset)?void 0:i.placement)&&null!=(l=n.arrow)&&l.alignmentOffset?{}:{x:a+r.x,y:o+r.y,data:{...r,placement:s}}}}},Ei=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...r}=bt(e,t),c={x:i,y:l},d=await Rt(t,r),h=Mt(xt(a)),v=Ct(h);let u=c[v],p=c[h];if(o){const e="y"===v?"bottom":"right";u=wt(u+d["y"===v?"top":"left"],u,u-d[e])}if(s){const e="y"===h?"bottom":"right";p=wt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:o,[h]:s}}}}}},Ii=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:a,middlewareData:o,rects:s,initialPlacement:n,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=bt(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const m=xt(a),w=Mt(n),b=xt(n)===n,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!g?[Et(n)]:function(e){const t=Et(e);return[Ht(e),t,Ht(t)]}(n)),C="none"!==p;!v&&C&&y.push(...At(n,g,p,x));const Z=[n,...y],_=await Rt(t,f),M=[];let V=(null==(l=o.flip)?void 0:l.overflows)||[];if(d&&M.push(_[m]),h){const e=kt(a,s,x);M.push(_[e[0]],_[e[1]])}if(V=[...V,{placement:a,overflows:M}],!M.every(e=>e<=0)){var k,H;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&w!==Mt(t))||V.every(e=>Mt(e.placement)!==w||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(H=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!i)switch(u){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(C){const t=Mt(e.placement);return t===w||"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&&(i=e);break}case"initialPlacement":i=n}if(a!==i)return{reset:{placement:i}}}return{}}}},Ti=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:a,rects:o,platform:s,elements:n}=t,{apply:r=()=>{},...c}=bt(e,t),d=await Rt(t,c),h=xt(a),v=yt(a),u="y"===Mt(a),{width:p,height:g}=o.floating;let f,m;"top"===h||"bottom"===h?(f=h,m=v===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=h,f="end"===v?"top":"bottom");const w=g-d.top-d.bottom,b=p-d.left-d.right,x=ht(g-d[f],w),y=ht(p-d[m],b),C=!t.middlewareData.shift;let Z=x,_=y;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(_=b),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(Z=w),C&&!v){const e=vt(d.left,0),t=vt(d.right,0),i=vt(d.top,0),l=vt(d.bottom,0);u?_=p-2*(0!==e||0!==t?e+t:vt(d.left,d.right)):Z=g-2*(0!==i||0!==l?i+l:vt(d.top,d.bottom))}await r({...t,availableWidth:_,availableHeight:Z});const M=await s.getDimensions(n.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},Pi=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:l="referenceHidden",...a}=bt(e,t);switch(l){case"referenceHidden":{const e=Ot(await Rt(t,{...a,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zt(e)}}}case"escaped":{const e=Ot(await Rt(t,{...a,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:zt(e)}}}default:return{}}}}},Ri=(e,t,i)=>{const l=new Map,a={platform:Si,...i},o={...a.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:a="absolute",middleware:o=[],platform:s}=i,n=o.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=Pt(c,l,r),v=l,u={},p=0;for(let i=0;i<n.length;i++){const{name:o,fn:g}=n[i],{x:f,y:m,data:w,reset:b}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:a,middlewareData:u,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=m?m:h,u={...u,[o]:{...u[o],...w}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:h}=Pt(c,v,r))),i=-1)}return{x:d,y:h,placement:v,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};var Oi=we`: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%}`,zi=we`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,Di=we`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Ui=we`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const Fi=(e="value")=>(t,i)=>{const l=t.constructor,a=l.prototype.attributeChangedCallback;l.prototype.attributeChangedCallback=function(t,o,s){var n;const r=l.getPropertyOptions(e);if(t===("string"==typeof r.attribute?r.attribute:e).toLowerCase()){const t=r.converter||Ae,l=("function"==typeof t?t:null!==(n=null==t?void 0:t.fromAttribute)&&void 0!==n?n:Ae.fromAttribute)(s,r.type);this[e]!==l&&(this[i]=l)}a.call(this,t,o,s)}};function Ni(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Wi{constructor(e,t){(this.host=e).addController(this),this._internals=e._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",e=>this.handleInvalid(e))}hostDisconnected(){this.host.removeEventListener("invalid",e=>this.handleInvalid(e))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,i){return this._internals.setValidity(e,t,i)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const i in t)t[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const qi=t=>{class i extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Wi(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1))}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,i){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,i)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return i.formAssociated=!0,e([Ge("sgds-input")],i.prototype,"sgdsInput",void 0),e([Ge("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var ji=we`: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 Ki extends Oe{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(l){customElements.define(e,class extends t{},i)}}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}))}))}}Ki.styles=[ji],Ki.dependencies={},e([We({type:Boolean,reflect:!0})],Ki.prototype,"ssr",void 0);class Gi extends Ki{constructor(){super(...arguments),this.myDropdown=st(),this.dropdownMenuId=Ni("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=st(),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 i=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)},l=t.map(i),a=e.map(e=>{const a=i(e),o=l.indexOf(a);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>i(e)===i(t))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Ai(8),this.noFlip?void 0:Ii(),Ei()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:a,y:o,strategy:s,placement:n}=await Ri(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:s,left:`${a}px`,top:`${o}px`})}}e([We({type:Boolean,state:!0})],Gi.prototype,"noFlip",void 0),e([We({type:Boolean,reflect:!0,state:!0})],Gi.prototype,"menuAlignRight",void 0),e([We({type:String,reflect:!0,state:!0})],Gi.prototype,"drop",void 0),e([We({type:Object})],Gi.prototype,"floatingOpts",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"menuIsOpen",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"readonly",void 0);class Ji extends Gi{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(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;const l=e.target;l.disabled||(this.emit("sgds-select",{detail:{item:l}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.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 i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()})}}var Xi,Yi;Ji.styles=Gi.styles,e([(Xi="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(Xi)??null;if(null===i&&Yi&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Ke("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${Xi}' 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 i};if(Yi){const{get:a,set:o}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return je(e,t,{get(){let e=a.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return je(e,t,{get(){return l(this)}})})],Ji.prototype,"menu",void 0),e([qe()],Ji.prototype,"nextDropdownItemNo",void 0),e([qe()],Ji.prototype,"prevDropdownItemNo",void 0),e([We({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var Qi=we`.empty-menu,.loading-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px);pointer-events:none}.loading-menu{align-items:center;display:flex;gap:var(--sgds-gap-xs)}`;class el extends(qi(Ji)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Ni("input"),this._labelId=Ni("label"),this.floatingOpts={middleware:[Ti({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;const i=this.constructor.childName,l=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===i;this.invalid=!l&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?S` <div class="invalid-feedback-container">
|
|
81
|
+
*/const st=()=>new nt;class nt{}const rt=new WeakMap;const ct=te(class extends ot{render(e){return L}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),L}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=rt.get(t);void 0===i&&(i=new WeakMap,rt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.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?rt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),dt=["top","right","bottom","left"],ht=Math.min,vt=Math.max,ut=Math.round,pt=Math.floor,gt=e=>({x:e,y:e}),ft={left:"right",right:"left",bottom:"top",top:"bottom"},mt={start:"end",end:"start"};function wt(e,t,i){return vt(e,ht(t,i))}function bt(e,t){return"function"==typeof e?e(t):e}function xt(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function Ct(e){return"x"===e?"y":"x"}function Zt(e){return"y"===e?"height":"width"}const _t=new Set(["top","bottom"]);function Mt(e){return _t.has(xt(e))?"y":"x"}function Vt(e){return Ct(Mt(e))}function kt(e,t,i){void 0===i&&(i=!1);const l=yt(e),a=Vt(e),o=Zt(a);let s="x"===a?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Et(s)),[s,Et(s)]}function Ht(e){return e.replace(/start|end/g,e=>mt[e])}const $t=["left","right"],St=["right","left"],Bt=["top","bottom"],At=["bottom","top"];function Lt(e,t,i,l){const a=yt(e);let o=function(e,t,i){switch(e){case"top":case"bottom":return i?t?St:$t:t?$t:St;case"left":case"right":return t?Bt:At;default:return[]}}(xt(e),"start"===i,l);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ht)))),o}function Et(e){return e.replace(/left|right|bottom|top/g,e=>ft[e])}function It(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Tt(e){const{x:t,y:i,width:l,height:a}=e;return{width:l,height:a,top:i,left:t,right:t+l,bottom:i+a,x:t,y:i}}function Pt(e,t,i){let{reference:l,floating:a}=e;const o=Mt(t),s=Vt(t),n=Zt(s),r=xt(t),c="y"===o,d=l.x+l.width/2-a.width/2,h=l.y+l.height/2-a.height/2,v=l[n]/2-a[n]/2;let u;switch(r){case"top":u={x:d,y:l.y-a.height};break;case"bottom":u={x:d,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:h};break;case"left":u={x:l.x-a.width,y:h};break;default:u={x:l.x,y:l.y}}switch(yt(t)){case"start":u[s]-=v*(i&&c?-1:1);break;case"end":u[s]+=v*(i&&c?-1:1)}return u}async function Rt(e,t){var i;void 0===t&&(t={});const{x:l,y:a,platform:o,rects:s,elements:n,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=bt(t,e),p=It(u),g=n[v?"floating"===h?"reference":"floating":h],f=Tt(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(g)))||i?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:r})),m="floating"===h?{x:l,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),b=await(null==o.isElement?void 0:o.isElement(w))&&await(null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},x=Tt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:m,offsetParent:w,strategy:r}):m);return{top:(f.top-x.top+p.top)/b.y,bottom:(x.bottom-f.bottom+p.bottom)/b.y,left:(f.left-x.left+p.left)/b.x,right:(x.right-f.right+p.right)/b.x}}function Ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zt(e){return dt.some(t=>e[t]>=0)}const Dt=new Set(["left","top"]);function Ut(){return"undefined"!=typeof window}function Ft(e){return qt(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Wt(e){var t;return null==(t=(qt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qt(e){return!!Ut()&&(e instanceof Node||e instanceof Nt(e).Node)}function jt(e){return!!Ut()&&(e instanceof Element||e instanceof Nt(e).Element)}function Kt(e){return!!Ut()&&(e instanceof HTMLElement||e instanceof Nt(e).HTMLElement)}function Gt(e){return!(!Ut()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot)}const Jt=new Set(["inline","contents"]);function Xt(e){const{overflow:t,overflowX:i,overflowY:l,display:a}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!Jt.has(a)}const Yt=new Set(["table","td","th"]);function Qt(e){return Yt.has(Ft(e))}const ei=[":popover-open",":modal"];function ti(e){return ei.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ii=["transform","translate","scale","rotate","perspective"],li=["transform","translate","scale","rotate","perspective","filter"],ai=["paint","layout","strict","content"];function oi(e){const t=si(),i=jt(e)?ci(e):e;return ii.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||li.some(e=>(i.willChange||"").includes(e))||ai.some(e=>(i.contain||"").includes(e))}function si(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ni=new Set(["html","body","#document"]);function ri(e){return ni.has(Ft(e))}function ci(e){return Nt(e).getComputedStyle(e)}function di(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===Ft(e))return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||Wt(e);return Gt(t)?t.host:t}function vi(e){const t=hi(e);return ri(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(t)&&Xt(t)?t:vi(t)}function ui(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const a=vi(e),o=a===(null==(l=e.ownerDocument)?void 0:l.body),s=Nt(a);if(o){const e=pi(s);return t.concat(s,s.visualViewport||[],Xt(a)?a:[],e&&i?ui(e):[])}return t.concat(a,ui(a,[],i))}function pi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gi(e){const t=ci(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const a=Kt(e),o=a?e.offsetWidth:i,s=a?e.offsetHeight:l,n=ut(i)!==o||ut(l)!==s;return n&&(i=o,l=s),{width:i,height:l,$:n}}function fi(e){return jt(e)?e:e.contextElement}function mi(e){const t=fi(e);if(!Kt(t))return gt(1);const i=t.getBoundingClientRect(),{width:l,height:a,$:o}=gi(t);let s=(o?ut(i.width):i.width)/l,n=(o?ut(i.height):i.height)/a;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const wi=gt(0);function bi(e){const t=Nt(e);return si()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wi}function xi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const a=e.getBoundingClientRect(),o=fi(e);let s=gt(1);t&&(l?jt(l)&&(s=mi(l)):s=mi(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Nt(e))&&t}(o,i,l)?bi(o):gt(0);let r=(a.left+n.x)/s.x,c=(a.top+n.y)/s.y,d=a.width/s.x,h=a.height/s.y;if(o){const e=Nt(o),t=l&&jt(l)?Nt(l):l;let i=e,a=pi(i);for(;a&&l&&t!==i;){const e=mi(a),t=a.getBoundingClientRect(),l=ci(a),o=t.left+(a.clientLeft+parseFloat(l.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(l.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=o,c+=s,i=Nt(a),a=pi(i)}}return Tt({width:d,height:h,x:r,y:c})}function yi(e,t){const i=di(e).scrollLeft;return t?t.left+i:xi(Wt(e)).left+i}function Ci(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-yi(e,i),y:i.top+t.scrollTop}}const Zi=new Set(["absolute","fixed"]);function _i(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Nt(e),l=Wt(e),a=i.visualViewport;let o=l.clientWidth,s=l.clientHeight,n=0,r=0;if(a){o=a.width,s=a.height;const e=si();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,r=a.offsetTop)}const c=yi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,s=Math.abs(l.clientWidth-t.clientWidth-a);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:n,y:r}}(e,i);else if("document"===t)l=function(e){const t=Wt(e),i=di(e),l=e.ownerDocument.body,a=vt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),o=vt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let s=-i.scrollLeft+yi(e);const n=-i.scrollTop;return"rtl"===ci(l).direction&&(s+=vt(t.clientWidth,l.clientWidth)-a),{width:a,height:o,x:s,y:n}}(Wt(e));else if(jt(t))l=function(e,t){const i=xi(e,!0,"fixed"===t),l=i.top+e.clientTop,a=i.left+e.clientLeft,o=Kt(e)?mi(e):gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:l*o.y}}(t,i);else{const i=bi(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Tt(l)}function Mi(e,t){const i=hi(e);return!(i===t||!jt(i)||ri(i))&&("fixed"===ci(i).position||Mi(i,t))}function Vi(e,t,i){const l=Kt(t),a=Wt(t),o="fixed"===i,s=xi(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const r=gt(0);function c(){r.x=yi(a)}if(l||!l&&!o)if(("body"!==Ft(t)||Xt(a))&&(n=di(t)),l){const e=xi(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else a&&c();o&&!l&&a&&c();const d=!a||l||o?gt(0):Ci(a,n);return{x:s.left+n.scrollLeft-r.x-d.x,y:s.top+n.scrollTop-r.y-d.y,width:s.width,height:s.height}}function ki(e){return"static"===ci(e).position}function Hi(e,t){if(!Kt(e)||"fixed"===ci(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Wt(e)===i&&(i=i.ownerDocument.body),i}function $i(e,t){const i=Nt(e);if(ti(e))return i;if(!Kt(e)){let t=hi(e);for(;t&&!ri(t);){if(jt(t)&&!ki(t))return t;t=hi(t)}return i}let l=Hi(e,t);for(;l&&Qt(l)&&ki(l);)l=Hi(l,t);return l&&ri(l)&&ki(l)&&!oi(l)?i:l||function(e){let t=hi(e);for(;Kt(t)&&!ri(t);){if(oi(t))return t;if(ti(t))return null;t=hi(t)}return null}(e)||i}const Si={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:a}=e;const o="fixed"===a,s=Wt(l),n=!!t&&ti(t.floating);if(l===s||n&&o)return i;let r={scrollLeft:0,scrollTop:0},c=gt(1);const d=gt(0),h=Kt(l);if((h||!h&&!o)&&(("body"!==Ft(l)||Xt(s))&&(r=di(l)),Kt(l))){const e=xi(l);c=mi(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!s||h||o?gt(0):Ci(s,r);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:Wt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:a}=e;const o=[..."clippingAncestors"===i?ti(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=ui(e,[],!1).filter(e=>jt(e)&&"body"!==Ft(e)),a=null;const o="fixed"===ci(e).position;let s=o?hi(e):e;for(;jt(s)&&!ri(s);){const t=ci(s),i=oi(s);i||"fixed"!==t.position||(a=null),(o?!i&&!a:!i&&"static"===t.position&&a&&Zi.has(a.position)||Xt(s)&&!i&&Mi(e,s))?l=l.filter(e=>e!==s):a=t,s=hi(s)}return t.set(e,l),l}(t,this._c):[].concat(i),l],s=o[0],n=o.reduce((e,i)=>{const l=_i(t,i,a);return e.top=vt(l.top,e.top),e.right=ht(l.right,e.right),e.bottom=ht(l.bottom,e.bottom),e.left=vt(l.left,e.left),e},_i(t,s,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:$i,getElementRects:async function(e){const t=this.getOffsetParent||$i,i=this.getDimensions,l=await i(e.floating);return{reference:Vi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=gi(e);return{width:t,height:i}},getScale:mi,isElement:jt,isRTL:function(e){return"rtl"===ci(e).direction}};function Bi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ai(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=l,c=fi(e),d=a||o?[...c?ui(c):[],...ui(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const h=c&&n?function(e,t){let i,l=null;const a=Wt(e);function o(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function s(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),o();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=c;if(n||t(),!v||!u)return;const p={rootMargin:-pt(h)+"px "+-pt(a.clientWidth-(d+v))+"px "+-pt(a.clientHeight-(h+u))+"px "+-pt(d)+"px",threshold:vt(0,ht(1,r))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==r){if(!g)return s();l?s(!1,l):i=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==l||Bi(c,e.getBoundingClientRect())||s(),g=!1}try{l=new IntersectionObserver(f,{...p,root:a.ownerDocument})}catch(e){l=new IntersectionObserver(f,p)}l.observe(e)}(!0),o}(c,i):null;let v,u=-1,p=null;s&&(p=new ResizeObserver(e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),i()}),c&&!r&&p.observe(c),p.observe(t));let g=r?xi(e):null;return r&&function t(){const l=xi(e);g&&!Bi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,r&&cancelAnimationFrame(v)}}const Li=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:a,y:o,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:i,platform:l,elements:a}=e,o=await(null==l.isRTL?void 0:l.isRTL(a.floating)),s=xt(i),n=yt(i),r="y"===Mt(i),c=Dt.has(s)?-1:1,d=o&&r?-1:1,h=bt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof p&&(u="end"===n?-1*p:p),r?{x:u*d,y:v*c}:{x:v*c,y:u*d}}(t,e);return s===(null==(i=n.offset)?void 0:i.placement)&&null!=(l=n.arrow)&&l.alignmentOffset?{}:{x:a+r.x,y:o+r.y,data:{...r,placement:s}}}}},Ei=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...r}=bt(e,t),c={x:i,y:l},d=await Rt(t,r),h=Mt(xt(a)),v=Ct(h);let u=c[v],p=c[h];if(o){const e="y"===v?"bottom":"right";u=wt(u+d["y"===v?"top":"left"],u,u-d[e])}if(s){const e="y"===h?"bottom":"right";p=wt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:o,[h]:s}}}}}},Ii=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:a,middlewareData:o,rects:s,initialPlacement:n,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=bt(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const m=xt(a),w=Mt(n),b=xt(n)===n,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!g?[Et(n)]:function(e){const t=Et(e);return[Ht(e),t,Ht(t)]}(n)),C="none"!==p;!v&&C&&y.push(...Lt(n,g,p,x));const Z=[n,...y],_=await Rt(t,f),M=[];let V=(null==(l=o.flip)?void 0:l.overflows)||[];if(d&&M.push(_[m]),h){const e=kt(a,s,x);M.push(_[e[0]],_[e[1]])}if(V=[...V,{placement:a,overflows:M}],!M.every(e=>e<=0)){var k,H;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&w!==Mt(t))||V.every(e=>Mt(e.placement)!==w||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(H=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!i)switch(u){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(C){const t=Mt(e.placement);return t===w||"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&&(i=e);break}case"initialPlacement":i=n}if(a!==i)return{reset:{placement:i}}}return{}}}},Ti=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:a,rects:o,platform:s,elements:n}=t,{apply:r=()=>{},...c}=bt(e,t),d=await Rt(t,c),h=xt(a),v=yt(a),u="y"===Mt(a),{width:p,height:g}=o.floating;let f,m;"top"===h||"bottom"===h?(f=h,m=v===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=h,f="end"===v?"top":"bottom");const w=g-d.top-d.bottom,b=p-d.left-d.right,x=ht(g-d[f],w),y=ht(p-d[m],b),C=!t.middlewareData.shift;let Z=x,_=y;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(_=b),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(Z=w),C&&!v){const e=vt(d.left,0),t=vt(d.right,0),i=vt(d.top,0),l=vt(d.bottom,0);u?_=p-2*(0!==e||0!==t?e+t:vt(d.left,d.right)):Z=g-2*(0!==i||0!==l?i+l:vt(d.top,d.bottom))}await r({...t,availableWidth:_,availableHeight:Z});const M=await s.getDimensions(n.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},Pi=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:l="referenceHidden",...a}=bt(e,t);switch(l){case"referenceHidden":{const e=Ot(await Rt(t,{...a,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zt(e)}}}case"escaped":{const e=Ot(await Rt(t,{...a,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:zt(e)}}}default:return{}}}}},Ri=(e,t,i)=>{const l=new Map,a={platform:Si,...i},o={...a.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:a="absolute",middleware:o=[],platform:s}=i,n=o.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=Pt(c,l,r),v=l,u={},p=0;for(let i=0;i<n.length;i++){const{name:o,fn:g}=n[i],{x:f,y:m,data:w,reset:b}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:a,middlewareData:u,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=m?m:h,u={...u,[o]:{...u[o],...w}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:h}=Pt(c,v,r))),i=-1)}return{x:d,y:h,placement:v,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};var Oi=we`:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-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%}`,zi=we`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,Di=we`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Ui=we`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const Fi=(e="value")=>(t,i)=>{const l=t.constructor,a=l.prototype.attributeChangedCallback;l.prototype.attributeChangedCallback=function(t,o,s){var n;const r=l.getPropertyOptions(e);if(t===("string"==typeof r.attribute?r.attribute:e).toLowerCase()){const t=r.converter||Le,l=("function"==typeof t?t:null!==(n=null==t?void 0:t.fromAttribute)&&void 0!==n?n:Le.fromAttribute)(s,r.type);this[e]!==l&&(this[i]=l)}a.call(this,t,o,s)}};function Ni(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Wi{constructor(e,t){(this.host=e).addController(this),this._internals=e._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",e=>this.handleInvalid(e))}hostDisconnected(){this.host.removeEventListener("invalid",e=>this.handleInvalid(e))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,i){return this._internals.setValidity(e,t,i)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const i in t)t[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const qi=t=>{class i extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Wi(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1))}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,i){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,i)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return i.formAssociated=!0,e([Ge("sgds-input")],i.prototype,"sgdsInput",void 0),e([Ge("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var ji=we`: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 Ki extends Oe{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(l){customElements.define(e,class extends t{},i)}}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}))}))}}Ki.styles=[ji],Ki.dependencies={},e([We({type:Boolean,reflect:!0})],Ki.prototype,"ssr",void 0);class Gi extends Ki{constructor(){super(...arguments),this.myDropdown=st(),this.dropdownMenuId=Ni("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=st(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Ai(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 i=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)},l=t.map(i),a=e.map(e=>{const a=i(e),o=l.indexOf(a);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>i(e)===i(t))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Li(8),this.noFlip?void 0:Ii(),Ei()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:a,y:o,strategy:s,placement:n}=await Ri(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:s,left:`${a}px`,top:`${o}px`})}}e([We({type:Boolean,state:!0})],Gi.prototype,"noFlip",void 0),e([We({type:Boolean,reflect:!0,state:!0})],Gi.prototype,"menuAlignRight",void 0),e([We({type:String,reflect:!0,state:!0})],Gi.prototype,"drop",void 0),e([We({type:Object})],Gi.prototype,"floatingOpts",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"menuIsOpen",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"readonly",void 0);class Ji extends Gi{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(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;const l=e.target;l.disabled||(this.emit("sgds-select",{detail:{item:l}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.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 i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()})}}var Xi,Yi;Ji.styles=Gi.styles,e([(Xi="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(Xi)??null;if(null===i&&Yi&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Ke("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${Xi}' 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 i};if(Yi){const{get:a,set:o}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return je(e,t,{get(){let e=a.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return je(e,t,{get(){return l(this)}})})],Ji.prototype,"menu",void 0),e([qe()],Ji.prototype,"nextDropdownItemNo",void 0),e([qe()],Ji.prototype,"prevDropdownItemNo",void 0),e([We({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var Qi=we`.empty-menu,.loading-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px);pointer-events:none}.loading-menu{align-items:center;display:flex;gap:var(--sgds-gap-xs)}`;class el extends(qi(Ji)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Ni("input"),this._labelId=Ni("label"),this.floatingOpts={middleware:[Ti({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;const i=this.constructor.childName,l=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===i;this.invalid=!l&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?S` <div class="invalid-feedback-container">
|
|
82
82
|
<slot name="invalidIcon">
|
|
83
83
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
84
84
|
</slot>
|
|
@@ -92,7 +92,7 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
92
92
|
class=${Xe({"form-label":!0,required:this.required})}
|
|
93
93
|
>${this.label}</label
|
|
94
94
|
>
|
|
95
|
-
`;return this.label&&e}_handleClick(){if(this.readonly)return null;this.menuIsOpen?this.hideMenu():this.showMenu()}async _getMenuListFromOptions(e){const t=e.map(async e=>(await e.updateComplete,e)),i=await Promise.all(t);return null==i?void 0:i.map(e=>{var t;return{label:e.innerText,value:e.getAttribute("value"),disabled:null!==(t=e.disabled)&&void 0!==t?t:void 0}})}_renderEmptyMenu(){return S` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return S`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}function tl(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,l)=>{const{update:a}=t;if(e in t){const o=e;t.update=function(e){if(e.has(o)){const t=e.get(o),a=this[o];t!==a&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[l](t,a))}a.call(this,e)}}}}el.styles=[...Ji.styles,Oi,Di,zi,Ui,Qi],e([We({reflect:!0})],el.prototype,"label",void 0),e([We({reflect:!0})],el.prototype,"hintText",void 0),e([We({reflect:!0})],el.prototype,"name",void 0),e([We({type:String,reflect:!0})],el.prototype,"placeholder",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"autofocus",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"required",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"loading",void 0),e([We({type:String,reflect:!0})],el.prototype,"value",void 0),e([qe()],el.prototype,"displayValue",void 0),e([Fi()],el.prototype,"defaultValue",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"hasFeedback",void 0),e([We({type:String,reflect:!0})],el.prototype,"invalidFeedback",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"invalid",void 0),e([We({type:Array})],el.prototype,"menuList",void 0),e([qe()],el.prototype,"selectedItems",void 0),e([qe()],el.prototype,"filteredList",void 0),e([Ge("input.form-control")],el.prototype,"_input",void 0);var il=we`:host{cursor:default;display:inline-flex;max-width:100%}:host([variant=accent]) .badge{background-color:var(--sgds-accent-surface-default)}:host([variant=success]) .badge{background-color:var(--sgds-success-surface-default)}:host([variant=danger]) .badge{background-color:var(--sgds-danger-surface-default)}:host([variant=warning]) .badge{background-color:var(--sgds-warning-surface-default);color:var(--sgds-color-fixed-dark)}:host([variant=cyan]) .badge{background-color:var(--sgds-cyan-surface-default)}:host([variant=purple]) .badge{background-color:var(--sgds-purple-surface-default)}:host([variant=neutral]) .badge{background-color:var(--sgds-neutral-surface-default)}:host([variant=white]) .badge{background-color:var(--sgds-surface-fixed-light);color:var(--sgds-color-fixed-dark)}:host([variant=accent][outlined]) .badge{background-color:var(--sgds-accent-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-accent-border-color-muted);color:var(--sgds-accent-color-fixed-dark)}:host([variant=success][outlined]) .badge{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted);color:var(--sgds-success-color-fixed-dark)}:host([variant=danger][outlined]) .badge{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted);color:var(--sgds-danger-color-fixed-dark)}:host([variant=warning][outlined]) .badge{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted);color:var(--sgds-warning-color-fixed-dark)}:host([variant=cyan][outlined]) .badge{background-color:var(--sgds-cyan-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-cyan-border-color-muted);color:var(--sgds-cyan-color-fixed-dark)}:host([variant=purple][outlined]) .badge{background-color:var(--sgds-purple-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-purple-border-color-muted);color:var(--sgds-purple-color-fixed-dark)}:host([variant=neutral][outlined]) .badge{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted);color:var(--sgds-color-fixed-dark)}:host([variant=white][outlined]) .badge{background-color:var(--sgds-surface-fixed-light);border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);color:var(--sgds-color-fixed-dark)}sgds-tooltip{display:block;max-width:100%}.badge{align-items:center;background-color:var(--sgds-primary-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-sm);color:var(--sgds-color-fixed-light);display:inline-flex;font-size:var(--sgds-font-size-14);height:var(--sgds-dimension-24,24px);justify-content:center;max-width:var(--sgds-dimension-192);min-width:var(--sgds-dimension-24);padding:var(--sgds-padding-none) var(--sgds-padding-xs)}.badge.outlined{background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted);color:var(--sgds-primary-color-fixed-dark)}.badge.full-width{max-width:100%}.badge-label{line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-none) var(--sgds-padding-3-xs)}.badge-dismissible{padding-right:0}.badge-dimissible sgds-close-button{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm)}.badge.truncated .badge-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}slot::slotted(*){font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}`,ll=we`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-14);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:900}div{max-width:fit-content}`;class al extends Ki{constructor(){super(...arguments),this._myTooltip=st(),this._tooltipBubble=st(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=e=>{this.open&&(e.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this._tooltipTargetElements.forEach(e=>{e.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(e.addEventListener("mouseenter",()=>this.show()),e.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(e.addEventListener("focus",()=>this.show()),e.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&e.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(e=>e.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:e,y:t,placement:i,strategy:l,middlewareData:a}=await Ri(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[
|
|
95
|
+
`;return this.label&&e}_handleClick(){if(this.readonly)return null;this.menuIsOpen?this.hideMenu():this.showMenu()}async _getMenuListFromOptions(e){const t=e.map(async e=>(await e.updateComplete,e)),i=await Promise.all(t);return null==i?void 0:i.map(e=>{var t;return{label:e.innerText,value:e.getAttribute("value"),disabled:null!==(t=e.disabled)&&void 0!==t?t:void 0}})}_renderEmptyMenu(){return S` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return S`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}function tl(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,l)=>{const{update:a}=t;if(e in t){const o=e;t.update=function(e){if(e.has(o)){const t=e.get(o),a=this[o];t!==a&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[l](t,a))}a.call(this,e)}}}}el.styles=[...Ji.styles,Oi,Di,zi,Ui,Qi],e([We({reflect:!0})],el.prototype,"label",void 0),e([We({reflect:!0})],el.prototype,"hintText",void 0),e([We({reflect:!0})],el.prototype,"name",void 0),e([We({type:String,reflect:!0})],el.prototype,"placeholder",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"autofocus",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"required",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"loading",void 0),e([We({type:String,reflect:!0})],el.prototype,"value",void 0),e([qe()],el.prototype,"displayValue",void 0),e([Fi()],el.prototype,"defaultValue",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"hasFeedback",void 0),e([We({type:String,reflect:!0})],el.prototype,"invalidFeedback",void 0),e([We({type:Boolean,reflect:!0})],el.prototype,"invalid",void 0),e([We({type:Array})],el.prototype,"menuList",void 0),e([qe()],el.prototype,"selectedItems",void 0),e([qe()],el.prototype,"filteredList",void 0),e([Ge("input.form-control")],el.prototype,"_input",void 0);var il=we`:host{cursor:default;display:inline-flex;max-width:100%}:host([variant=accent]) .badge{background-color:var(--sgds-accent-surface-default)}:host([variant=success]) .badge{background-color:var(--sgds-success-surface-default)}:host([variant=danger]) .badge{background-color:var(--sgds-danger-surface-default)}:host([variant=warning]) .badge{background-color:var(--sgds-warning-surface-default);color:var(--sgds-color-fixed-dark)}:host([variant=cyan]) .badge{background-color:var(--sgds-cyan-surface-default)}:host([variant=purple]) .badge{background-color:var(--sgds-purple-surface-default)}:host([variant=neutral]) .badge{background-color:var(--sgds-neutral-surface-default)}:host([variant=white]) .badge{background-color:var(--sgds-surface-fixed-light);color:var(--sgds-color-fixed-dark)}:host([variant=accent][outlined]) .badge{background-color:var(--sgds-accent-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-accent-border-color-muted);color:var(--sgds-accent-color-fixed-dark)}:host([variant=success][outlined]) .badge{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted);color:var(--sgds-success-color-fixed-dark)}:host([variant=danger][outlined]) .badge{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted);color:var(--sgds-danger-color-fixed-dark)}:host([variant=warning][outlined]) .badge{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted);color:var(--sgds-warning-color-fixed-dark)}:host([variant=cyan][outlined]) .badge{background-color:var(--sgds-cyan-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-cyan-border-color-muted);color:var(--sgds-cyan-color-fixed-dark)}:host([variant=purple][outlined]) .badge{background-color:var(--sgds-purple-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-purple-border-color-muted);color:var(--sgds-purple-color-fixed-dark)}:host([variant=neutral][outlined]) .badge{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted);color:var(--sgds-color-fixed-dark)}:host([variant=white][outlined]) .badge{background-color:var(--sgds-surface-fixed-light);border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);color:var(--sgds-color-fixed-dark)}sgds-tooltip{display:block;max-width:100%}.badge{align-items:center;background-color:var(--sgds-primary-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-sm);color:var(--sgds-color-fixed-light);display:inline-flex;font-size:var(--sgds-font-size-14);height:var(--sgds-dimension-24,24px);justify-content:center;max-width:var(--sgds-dimension-192);min-width:var(--sgds-dimension-24);padding:var(--sgds-padding-none) var(--sgds-padding-xs)}.badge.outlined{background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted);color:var(--sgds-primary-color-fixed-dark)}.badge.full-width{max-width:100%}.badge-label{line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-none) var(--sgds-padding-3-xs)}.badge-dismissible{padding-right:0}.badge-dimissible sgds-close-button{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm)}.badge.truncated .badge-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}slot::slotted(*){font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}`,ll=we`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-14);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:900}div{max-width:fit-content}`;class al extends Ki{constructor(){super(...arguments),this._myTooltip=st(),this._tooltipBubble=st(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=e=>{this.open&&(e.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this._tooltipTargetElements.forEach(e=>{e.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(e.addEventListener("mouseenter",()=>this.show()),e.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(e.addEventListener("focus",()=>this.show()),e.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&e.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(e=>e.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:e,y:t,placement:i,strategy:l,middlewareData:a}=await Ri(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[Li(8),Ii(),Ei(),Pi()]});this._tooltipBubble.value.setAttribute("data-placement",i),Object.assign(this._tooltipBubble.value.style,{position:l,left:`${e}px`,top:`${t}px`});const{referenceHidden:o,escaped:s}=a.hide||{};this._tooltipBubble.value.style.visibility=o||s?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=Ai(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return S`
|
|
96
96
|
<div ${ct(this._myTooltip)} class="tooltip-placeholder">
|
|
97
97
|
<slot @slotchange=${()=>this._handleSlotChange()}></slot>
|
|
98
98
|
${this.open?S`<div ${ct(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
|
|
@@ -106,7 +106,7 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
106
106
|
${Xe({"badge-dismissible":this.dismissible,badge:!0,outlined:this.outlined,truncated:this.truncated,"full-width":this.fullWidth})}"
|
|
107
107
|
aria-hidden=${this.show?"false":"true"}
|
|
108
108
|
>
|
|
109
|
-
${this.dismissible?
|
|
109
|
+
${this.dismissible?L:S`<slot name="icon"></slot>`}
|
|
110
110
|
|
|
111
111
|
<span class="badge-label">
|
|
112
112
|
<slot @slotchange=${this._handleLabelSlotChange}></slot>
|
|
@@ -117,10 +117,10 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
117
117
|
aria-label="close the badge"
|
|
118
118
|
@click=${this.close}
|
|
119
119
|
tone=${e?"fixed-dark":"fixed-light"}
|
|
120
|
-
></sgds-close-button>`:
|
|
120
|
+
></sgds-close-button>`:L}
|
|
121
121
|
</div>`}render(){return this.dismissible&&this.show||!this.dismissible?this.truncated?S`<sgds-tooltip content=${this.text} @sgds-hide=${e=>e.stopPropagation()}
|
|
122
122
|
>${this._renderBadge()}</sgds-tooltip
|
|
123
|
-
>`:this._renderBadge():
|
|
123
|
+
>`:this._renderBadge():L}}cl.styles=[...Ki.styles,il],cl.dependencies={"sgds-close-button":rl,"sgds-tooltip":al},e([We({type:Boolean,reflect:!0})],cl.prototype,"show",void 0),e([We({reflect:!0})],cl.prototype,"variant",void 0),e([We({type:Boolean,reflect:!0})],cl.prototype,"outlined",void 0),e([We({type:Boolean,reflect:!0})],cl.prototype,"dismissible",void 0),e([We({type:Boolean,reflect:!0})],cl.prototype,"fullWidth",void 0),e([qe()],cl.prototype,"truncated",void 0),e([qe()],cl.prototype,"text",void 0),e([tl("show")],cl.prototype,"_handleShowChange",null),e([tl("text")],cl.prototype,"_handleTruncation",null);var dl=S`
|
|
124
124
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
125
125
|
<path
|
|
126
126
|
fill="currentColor"
|
|
@@ -2336,11 +2336,11 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
2336
2336
|
clip-rule="evenodd"
|
|
2337
2337
|
/>
|
|
2338
2338
|
</svg>
|
|
2339
|
-
`};var Vl=we`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class kl extends Ki{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=Ml[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||
|
|
2339
|
+
`};var Vl=we`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class kl extends Ki{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=Ml[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||L}}kl.styles=[...Ki.styles,Vl],e([We({type:String,reflect:!0})],kl.prototype,"name",void 0),e([We({type:String,reflect:!0})],kl.prototype,"size",void 0);var Hl=we`:host{display:block;position:relative}.dropdown{display:flex;height:100%}.dropdown-menu{box-sizing:border-box;max-height:10rem;overflow-x:hidden;overflow-y:auto}.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.combobox .form-control-group{height:unset;min-height:var(--sgds-dimension-48);min-width:var(--sgds-dimension-256)}.combobox-input-container{align-items:center;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);padding:calc(var(--sgds-form-padding-y) - var(--sgds-form-border-width-default)) 0;width:calc(100% - var(--sgds-icon-size-md, 1.25rem))}slot[id=default].d-none,slot[id=default].d-none::slotted(*){display:none}.form-clearable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`,$l=we`:host([active]) .dropdown-item{background-color:var(--sgds-primary-surface-translucent)}.dropdown-item{background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;height:100%;padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}.dropdown-item .normal-item-content{align-items:center;display:flex;justify-content:space-between}:host([active]) .dropdown-item .normal-item-content{color:var(--sgds-primary-bg-default)}:host([active]) .dropdown-item .normal-item-content sgds-icon{fill:var(--sgds-primary-bg-default);color:var(--sgds-primary-bg-default)}.dropdown-item:hover{background:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{background:var(--sgds-bg-translucent-subtle);outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Sl extends Ki{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){const e={disabled:this.disabled,active:this.active};return S`
|
|
2340
2340
|
<div class="dropdown-item ${Xe(e)}" tabindex=${this.disabled?"-1":"0"}>
|
|
2341
2341
|
${this._renderItemContent()}
|
|
2342
2342
|
</div>
|
|
2343
|
-
`}}Sl.styles=[$l],e([We({type:Boolean,reflect:!0})],Sl.prototype,"active",void 0),e([We({type:Boolean,reflect:!0})],Sl.prototype,"disabled",void 0),e([We({type:String,reflect:!0})],Sl.prototype,"value",void 0);var Bl=we`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,
|
|
2343
|
+
`}}Sl.styles=[$l],e([We({type:Boolean,reflect:!0})],Sl.prototype,"active",void 0),e([We({type:Boolean,reflect:!0})],Sl.prototype,"disabled",void 0),e([We({type:String,reflect:!0})],Sl.prototype,"value",void 0);var Bl=we`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Al=we`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class Ll extends Ki{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Ni("input"),this._labelId=Ni("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Ll.styles=[...Ki.styles,zi,Di,Bl,Al],e([We({reflect:!0})],Ll.prototype,"label",void 0),e([We({reflect:!0})],Ll.prototype,"hintText",void 0),e([We({reflect:!0})],Ll.prototype,"name",void 0),e([We({type:Boolean,reflect:!0})],Ll.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],Ll.prototype,"invalid",void 0);var El=we`.form-check-input[type=checkbox]{border-radius:var(--sgds-form-border-radius-md)}.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path d="M14.347 3.979a.522.522 0 0 1 0 .739L7.043 12.02a.521.521 0 0 1-.738 0L2.653 8.369a.522.522 0 1 1 .739-.738l3.282 3.283 6.934-6.935a.52.52 0 0 1 .739 0Z" fill="%23fff"/></svg>')}.form-check-input:indeterminate,.form-check-input[indeterminate]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5Z" fill="%23fff"/></svg>');background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:indeterminate:focus,.form-check-input:indeterminate:hover,.form-check-input[indeterminate]:focus-visible,.form-check-input[indeterminate]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}.form-check-input:indeterminate.is-invalid,.form-check-input[checked].is-invalid,.form-check-input[indeterminate].is-invalid{background-color:var(--sgds-form-danger-surface-default)}.form-check-label{flex:1}.form-check{margin:var(--sgds-form-padding-inline-sm) 0;padding:0}`,Il=we`input{margin:0}.form-check{display:flex;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.form-check-input{appearance:none;background-color:var(--sgds-form-surface-default);background-image:var(--sgds-radio-bg-image);background-position:50%;background-repeat:no-repeat;background-size:auto;border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);height:var(--sgds-form-height-sm);width:var(--sgds-form-width-xs)}.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):not([aria-checked=true]):not(:focus-visible):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid)[checked]:focus-visible,.form-check-input:not([disabled]):not(.is-invalid)[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-check-input:not([disabled]).is-invalid{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-check-input:not([disabled]).is-invalid:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Tl extends(qi(Ll)){constructor(){super(...arguments),this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.invalidFeedback="",this._isTouched=!1,this._handleHostClick=e=>{e.composedPath()[0]===this&&(e.stopPropagation(),this.input.click())}}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(e){this.indeterminate&&(this.indeterminate=!this.indeterminate),this.checked=!this.checked,super._mixinHandleChange(e),this.emit("sgds-change",{detail:{checked:this.checked,value:this.value}}),this.checked?this.emit("sgds-check",{detail:{value:this.value}}):this.emit("sgds-uncheck",{detail:{value:this.value}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleDisabledChange(){this.setInvalid(!1)}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_mixinResetFormControl(){this._isTouched=!1,this.checked=this.input.checked=this.defaultChecked,this.input.dispatchEvent(new InputEvent("reset")),this._mixinResetValidity(this.input)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}firstUpdated(e){super.firstUpdated(e),this.checked&&this.emit("sgds-check",{detail:{value:this.value}})}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleHostClick)}render(){const e="both"===this.hasFeedback||"style"===this.hasFeedback,t="both"===this.hasFeedback||"text"===this.hasFeedback;return S`
|
|
2344
2344
|
<div class="form-check">
|
|
2345
2345
|
<input
|
|
2346
2346
|
class=${Xe({"form-check-input":!0,"is-invalid":e&&this.invalid})}
|
|
@@ -2377,15 +2377,15 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
2377
2377
|
${this.invalidFeedback?this.invalidFeedback:this.input.validationMessage}
|
|
2378
2378
|
</div>
|
|
2379
2379
|
</div>
|
|
2380
|
-
`:
|
|
2381
|
-
`}}Tl.styles=[...
|
|
2380
|
+
`:L}
|
|
2381
|
+
`}}Tl.styles=[...Ll.styles,Il,El],e([We({type:String,reflect:!0})],Tl.prototype,"value",void 0),e([We({type:Boolean,reflect:!0})],Tl.prototype,"checked",void 0),e([We({type:String,reflect:!0})],Tl.prototype,"hasFeedback",void 0),e([Fi("checked")],Tl.prototype,"defaultChecked",void 0),e([We({type:Boolean,reflect:!0})],Tl.prototype,"indeterminate",void 0),e([We({type:Boolean,reflect:!0})],Tl.prototype,"required",void 0),e([We({type:String,reflect:!0})],Tl.prototype,"invalidFeedback",void 0),e([qe()],Tl.prototype,"_isTouched",void 0),e([tl("disabled",{waitUntilFirstUpdate:!0})],Tl.prototype,"_handleDisabledChange",null),e([tl("_isTouched",{waitUntilFirstUpdate:!0})],Tl.prototype,"_handleIsTouched",null);class Pl extends Sl{constructor(){super(...arguments),this.checkbox=!1,this._renderItemContent=()=>this.checkbox?S`
|
|
2382
2382
|
<sgds-checkbox .checked=${this.active} .disabled=${this.disabled}>
|
|
2383
2383
|
<slot></slot>
|
|
2384
2384
|
</sgds-checkbox>
|
|
2385
2385
|
`:S`
|
|
2386
2386
|
<div class="normal-item-content">
|
|
2387
2387
|
<slot></slot>
|
|
2388
|
-
${this.active?S` <sgds-icon name="check"></sgds-icon> `:
|
|
2388
|
+
${this.active?S` <sgds-icon name="check"></sgds-icon> `:L}
|
|
2389
2389
|
</div>
|
|
2390
2390
|
`}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e);const t=this.parentElement;(null==t?void 0:t.multiSelect)&&(this.checkbox=!0)}}Pl.dependencies={"sgds-icon":kl,"sgds-checkbox":Tl},e([We({type:Boolean,reflect:!0})],Pl.prototype,"checkbox",void 0);
|
|
2391
2391
|
/**
|
|
@@ -2393,7 +2393,7 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
|
|
|
2393
2393
|
* Copyright 2017 Google LLC
|
|
2394
2394
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2395
2395
|
*/
|
|
2396
|
-
const Rl=(e,t,i)=>{const l=new Map;for(let a=t;a<=i;a++)l.set(e[a],a);return l};const Ol=te(class extends ie{constructor(e){if(super(e),e.type!==Y)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,i){let l;void 0===i?i=t:void 0!==t&&(l=t);const a=[],o=[];let s=0;for(const t of e)a[s]=l?l(t,s):s,o[s]=i(t,s),s++;return{values:o,keys:a}}render(e,t,i){return this._getValuesAndKeys(e,t,i).values}update(e,[t,i,l]){const a=e._$committedValue;const{values:o,keys:s}=this._getValuesAndKeys(t,i,l);if(!Array.isArray(a))return this._itemKeys=s,o;const n=this._itemKeys??=[],r=[];let c,d,h=0,v=a.length-1,u=0,p=o.length-1;for(;h<=v&&u<=p;)if(null===a[h])h++;else if(null===a[v])v--;else if(n[h]===s[u])r[u]=re(a[h],o[u]),h++,u++;else if(n[v]===s[p])r[p]=re(a[v],o[p]),v--,p--;else if(n[h]===s[p])r[p]=re(a[h],o[p]),ne(e,r[p+1],a[h]),h++,p--;else if(n[v]===s[u])r[u]=re(a[v],o[u]),ne(e,a[h],a[v]),v--,u++;else if(void 0===c&&(c=Rl(s,u,p),d=Rl(n,h,v)),c.has(n[h]))if(c.has(n[v])){const t=d.get(s[u]),i=void 0!==t?a[t]:null;if(null===i){const t=ne(e,a[h]);re(t,o[u]),r[u]=t}else r[u]=re(i,o[u]),ne(e,a[h],i),a[t]=null;u++}else he(a[v]),v--;else he(a[h]),h++;for(;u<=p;){const t=ne(e,r[p+1]);re(t,o[u]),r[u++]=t}for(;h<=v;){const e=a[h++];null!==e&&he(e)}return this._itemKeys=s,de(e,r),
|
|
2396
|
+
const Rl=(e,t,i)=>{const l=new Map;for(let a=t;a<=i;a++)l.set(e[a],a);return l};const Ol=te(class extends ie{constructor(e){if(super(e),e.type!==Y)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,i){let l;void 0===i?i=t:void 0!==t&&(l=t);const a=[],o=[];let s=0;for(const t of e)a[s]=l?l(t,s):s,o[s]=i(t,s),s++;return{values:o,keys:a}}render(e,t,i){return this._getValuesAndKeys(e,t,i).values}update(e,[t,i,l]){const a=e._$committedValue;const{values:o,keys:s}=this._getValuesAndKeys(t,i,l);if(!Array.isArray(a))return this._itemKeys=s,o;const n=this._itemKeys??=[],r=[];let c,d,h=0,v=a.length-1,u=0,p=o.length-1;for(;h<=v&&u<=p;)if(null===a[h])h++;else if(null===a[v])v--;else if(n[h]===s[u])r[u]=re(a[h],o[u]),h++,u++;else if(n[v]===s[p])r[p]=re(a[v],o[p]),v--,p--;else if(n[h]===s[p])r[p]=re(a[h],o[p]),ne(e,r[p+1],a[h]),h++,p--;else if(n[v]===s[u])r[u]=re(a[v],o[u]),ne(e,a[h],a[v]),v--,u++;else if(void 0===c&&(c=Rl(s,u,p),d=Rl(n,h,v)),c.has(n[h]))if(c.has(n[v])){const t=d.get(s[u]),i=void 0!==t?a[t]:null;if(null===i){const t=ne(e,a[h]);re(t,o[u]),r[u]=t}else r[u]=re(i,o[u]),ne(e,a[h],i),a[t]=null;u++}else he(a[v]),v--;else he(a[h]),h++;for(;u<=p;){const t=ne(e,r[p+1]);re(t,o[u]),r[u++]=t}for(;h<=v;){const e=a[h++];null!==e&&he(e)}return this._itemKeys=s,de(e,r),A}}),zl=Symbol.for(""),Dl=e=>{if(e?.r===zl)return e?._$litStatic$},Ul=new Map,Fl=(Nl=S,(e,...t)=>{const i=t.length;let l,a;const o=[],s=[];let n,r=0,c=!1;for(;r<i;){for(n=e[r];r<i&&void 0!==(a=t[r],l=Dl(a));)n+=l+e[++r],c=!0;r!==i&&s.push(a),o.push(n),r++}if(r===i&&o.push(e[i]),c){const i=o.join("$$lit$$");void 0===(e=Ul.get(i))&&(o.raw=o,Ul.set(i,e=o)),t=s}return Nl(e,...t)});
|
|
2397
2397
|
/**
|
|
2398
2398
|
* @license
|
|
2399
2399
|
* Copyright 2020 Google LLC
|
|
@@ -2408,14 +2408,14 @@ const Rl=(e,t,i)=>{const l=new Map;for(let a=t;a<=i;a++)l.set(e[a],a);return l};
|
|
|
2408
2408
|
class="spinner ${Xe({[`spinner-${this.size}`]:this.size})}"
|
|
2409
2409
|
role="status"
|
|
2410
2410
|
>
|
|
2411
|
-
${this.label?
|
|
2411
|
+
${this.label?L:Fl`<span class="sr-only">Loading...</span>`}
|
|
2412
2412
|
</div>
|
|
2413
|
-
${this.label?Fl`<span class="spinner-label">${this.label}</span>`:
|
|
2413
|
+
${this.label?Fl`<span class="spinner-label">${this.label}</span>`:L}
|
|
2414
2414
|
</div>
|
|
2415
2415
|
`}}jl.styles=[...Ki.styles,ql,Wl],e([We({type:String,reflect:!0})],jl.prototype,"variant",void 0),e([We({type:String,reflect:!0})],jl.prototype,"tone",void 0),e([We({type:String,reflect:!0})],jl.prototype,"size",void 0),e([We({reflect:!0,type:String})],jl.prototype,"label",void 0),e([We({type:String,reflect:!0})],jl.prototype,"orientation",void 0);class Kl extends el{constructor(){super(...arguments),this.multiSelect=!1,this.badgeFullWidth=!1,this.clearable=!1,this.async=!1,this.emptyMenuAsync=!1,this.filterFunction=(e,t)=>t.label.toLowerCase().startsWith(e.toLowerCase()),this.optionList=[],this.emptyMenuAfterFiltering=!1,this.isFocused=!1,this.suffixIconTemplate=S`<sgds-icon
|
|
2416
2416
|
name=${this.menuIsOpen?"chevron-up":"chevron-down"}
|
|
2417
2417
|
size="md"
|
|
2418
|
-
></sgds-icon>`,this.prefixIconTemplate=S`${
|
|
2418
|
+
></sgds-icon>`,this.prefixIconTemplate=S`${L}`}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",async()=>{this.isFocused=!0}),this.addEventListener("blur",async()=>{this.isFocused=!1}),this.addEventListener("keydown",e=>{var t,i;"Enter"===e.key&&(null===(i=null===(t=e.target.shadowRoot)||void 0===t?void 0:t.querySelector(".form-clearable"))||void 0===i?void 0:i.matches(":focus"))&&this._handleClear()}),this.addEventListener("sgds-hide",async e=>{if(!e.detail.isOutside){(await this._input).focus()}this.options.forEach(e=>e.removeAttribute("hidden")),this.emptyMenuAfterFiltering=!1})}async firstUpdated(e){super.firstUpdated(e),this.async&&(this.filterFunction=()=>!0),this.menuList.forEach(e=>{const t=document.createElement("sgds-combo-box-option");t.innerText=e.label,t.value=e.value,t.checkbox=this.multiSelect,t.active=this.value.includes(e.value),this.appendChild(t)}),this._setupValidation(this.menuList),this.menuIsOpen&&await this.updateFloatingPosition()}async _handleDefaultSlotChange(e){const t=e.target.assignedElements({flatten:!0});t.forEach(e=>!e.hasAttribute("disabled")&&(!e.clickEventAdded&&(e.addEventListener("click",e=>{e.preventDefault();const t=e.target;return this.multiSelect&&t.active?this._handleItemUnselect(e):this._handleItemSelected(e),!1}),e.clickEventAdded=!0,void e.addEventListener("keydown",e=>{if("Enter"===e.key){this.close="outside";e.target.click()}})))),await this.updateComplete,this.optionList=await this._getMenuListFromOptions(t),this._setupValidation(this.optionList)}async _setupValidation(e){var t;if(this.value&&e.length>0){const i=this.value.split(";"),l=e.filter(({value:e})=>i.includes(e));this.selectedItems=[...l,...this.selectedItems],this.multiSelect||(this.displayValue=null===(t=l[0])||void 0===t?void 0:t.label)}this.multiSelect?this.input=await this._multiSelectInput:this.input=await this._input,this._mixinValidate(this.input)}async _handleValueChange(){this.emit("sgds-change"),this.options.forEach(e=>e.removeAttribute("hidden")),this.value&&this.emit("sgds-select");const e=await this._input;this._mixinSetFormValue(),this.multiSelect?this._mixinValidate(this.input):this._mixinValidate(e);this.selectedItems.map(e=>e.value).join(";")!==this.value&&this._updateValueAndDisplayValue(this.optionList),(this._isTouched||""!==this.value)&&(this.invalid=!this._mixinReportValidity())}_handleOptionListChange(){this._updateValueAndDisplayValue(this.optionList)}_handleMenuListChange(){const e=this.menuList.map(e=>{const t=document.createElement("sgds-combo-box-option");return t.innerText=e.label,t.value=e.value,t.checkbox=this.multiSelect,t.active=this.value.includes(e.value),t});this.replaceChildren(...e)}_updateValueAndDisplayValue(e){var t;const i=this.value.split(";"),l=e.filter(({value:e})=>i.includes(e));this.selectedItems=[...l];const a=l.map(e=>e.value).join(";");a!==this.value&&(this.value=a),this.multiSelect||this.async||(this.displayValue=(null===(t=l[0])||void 0===t?void 0:t.label)||""),this.options.forEach(e=>e.active=i.includes(e.value))}async _handleInputChange(e){const t=e.target;this.displayValue=t.value,this.emit("sgds-input",{detail:{displayValue:this.displayValue}}),this.invalid=!1,this.showMenu(),""!==this.displayValue||this.multiSelect||(this.selectedItems=[],this.value=this.selectedItems.join(";"),this.options.forEach(e=>e.active=!1));const i=this.options.map(e=>({value:e.value,label:e.textContent.trim()}));this.filteredList=i.filter(e=>this.filterFunction(this.displayValue,e)),this.emptyMenuAfterFiltering=0===this.filteredList.length;const l=this.filteredList.map(e=>e.value);this.options.forEach(e=>{l.includes(e.value)?e.hidden=!1:e.hidden=!0})}async _handleItemSelected(e){var t,i,l;const a=e.target;if(a.disabled)return;const o=null!==(i=null===(t=a.textContent)||void 0===t?void 0:t.trim())&&void 0!==i?i:"",s=null!==(l=a.getAttribute("value"))&&void 0!==l?l:o,n=this.filteredList.find(e=>e.value.toString()===s)||{label:o,value:s};this.multiSelect?(this.selectedItems.some(e=>e.value===n.value)||(this.selectedItems=[...this.selectedItems,n]),this.value=this.selectedItems.map(e=>e.value).join(";"),a.active=!0):0!==this.selectedItems.length&&this.selectedItems[0].value===n.value||(this.options.forEach(e=>e.active=!1),a.active=!0,this.selectedItems=[n],this.value=n.value.toString(),this.displayValue=n.label,this.hideMenu())}_handleItemUnselect(e){var t,i,l;const a=e.target;if(a.disabled)return;a.removeAttribute("active");const o=null!==(i=null===(t=a.textContent)||void 0===t?void 0:t.trim())&&void 0!==i?i:"",s=null!==(l=a.getAttribute("value"))&&void 0!==l?l:o,n=this.filteredList.find(e=>e.value.toString()===s)||{label:o,value:s};this.selectedItems=this.selectedItems.filter(e=>e.value!==n.value),this.value=this.selectedItems.map(e=>e.value).join(";")}async _handleBadgeDismissed(e,t){var i;e.preventDefault();const l=t.value;null===(i=this.options)||void 0===i||i.forEach(e=>e.value===l?e.active=!1:null),this.selectedItems=this.selectedItems.filter(e=>e.value!==t.value),this.value=this.selectedItems.map(e=>e.value).join(";")}async _handleMultiSelectKeyDown(e){var t;if(this.multiSelect&&"Backspace"===e.key&&this.multiSelect&&""===this.displayValue.trim()&&this.selectedItems.length>0){const e=this.selectedItems[this.selectedItems.length-1].value;null===(t=this.options)||void 0===t||t.forEach(t=>t.value===e?t.active=!1:null),this.selectedItems=this.selectedItems.slice(0,-1),this.value=this.selectedItems.map(e=>e.value).join(";")}}_handleFocus(){this.emit("sgds-focus")}async _handleInputBlur(e){if(e.preventDefault(),this.emit("sgds-blur"),this.multiSelect){this.selectedItems.filter(({label:e})=>this.displayValue===e).length<=0&&(this.displayValue="")}else this.selectedItems.length>0?this.displayValue=this.selectedItems[0].label:this.displayValue=""}async _handleClear(){var e;this.value=this.displayValue="",null===(e=this.options)||void 0===e||e.forEach(e=>e.active=!1);(await this._input).focus(),this.showMenu()}async _mixinResetFormControl(){if(this.value=this.defaultValue,this.multiSelect){const e=this.value.split(";");this.options.forEach(t=>{t.active=e.includes(t.value)});const t=this.options.filter(t=>e.includes(t.value));this.selectedItems=t.map(e=>({value:e.value,label:e.textContent.trim()})),this._mixinResetValidity(await this._multiSelectInput)}else{this.options.forEach(e=>{e.active=e.value===this.value});const e=this.options.filter(e=>e.value===this.value);e.length<=0?this.displayValue="":this.displayValue=e[0].textContent.trim(),this._mixinResetValidity(await this._input)}}_renderInput(e){const t=this.hasFeedback,i=e;return S`
|
|
2419
2419
|
<div
|
|
2420
2420
|
${ct(this.myDropdown)}
|
|
2421
2421
|
class="form-control-group ${Xe({disabled:this.disabled,readonly:this.readonly,"is-invalid":this.invalid&&t})}"
|
|
@@ -2433,7 +2433,7 @@ const Rl=(e,t,i)=>{const l=new Map;for(let a=t;a<=i;a++)l.set(e[a],a);return l};
|
|
|
2433
2433
|
@sgds-hide=${t=>this._handleBadgeDismissed(t,e)}
|
|
2434
2434
|
>${e.label}</sgds-badge
|
|
2435
2435
|
>`)}
|
|
2436
|
-
`:
|
|
2436
|
+
`:L}
|
|
2437
2437
|
<input
|
|
2438
2438
|
class="form-control"
|
|
2439
2439
|
type="text"
|
|
@@ -2465,10 +2465,10 @@ const Rl=(e,t,i)=>{const l=new Map;for(let a=t;a<=i;a++)l.set(e[a],a);return l};
|
|
|
2465
2465
|
aria-label="Clear selections"
|
|
2466
2466
|
role="button"
|
|
2467
2467
|
></sgds-icon>
|
|
2468
|
-
`:
|
|
2468
|
+
`:L}
|
|
2469
2469
|
${this.suffixIconTemplate}
|
|
2470
2470
|
</div>
|
|
2471
|
-
`}_renderFeedbackMenu(){return this.loading?this._renderLoadingMenu():this.async?this.emptyMenuAsync||0===this.optionList.length?this._renderEmptyMenu():
|
|
2471
|
+
`}_renderFeedbackMenu(){return this.loading?this._renderLoadingMenu():this.async?this.emptyMenuAsync||0===this.optionList.length?this._renderEmptyMenu():L:0===this.optionList.length||this.emptyMenuAfterFiltering&&this.optionList.length>0?this._renderEmptyMenu():L}render(){const e=(this.isFocused||this.menuIsOpen)&&""!==this.value&&this.clearable&&!this.readonly;return S`
|
|
2472
2472
|
<div
|
|
2473
2473
|
class=${Xe({"form-control-container":!0,disabled:this.disabled,combobox:!0})}
|
|
2474
2474
|
@keydown=${this._handleMultiSelectKeyDown}
|
|
@@ -2494,6 +2494,6 @@ const Rl=(e,t,i)=>{const l=new Map;for(let a=t;a<=i;a++)l.set(e[a],a);return l};
|
|
|
2494
2494
|
class="visually-hidden"
|
|
2495
2495
|
?required=${this.required}
|
|
2496
2496
|
tabindex="-1"
|
|
2497
|
-
/>`:
|
|
2497
|
+
/>`:L}
|
|
2498
2498
|
`}}Kl.styles=[...el.styles,Ui,Hl],Kl.childName="sgds-combo-box-option",Kl.dependencies={[Kl.childName]:Pl,"sgds-icon":kl,"sgds-badge":cl,"sgds-spinner":jl},e([We({type:Boolean,reflect:!0})],Kl.prototype,"multiSelect",void 0),e([We({type:Boolean,reflect:!0})],Kl.prototype,"badgeFullWidth",void 0),e([We({type:Boolean,reflect:!0})],Kl.prototype,"clearable",void 0),e([We({type:Boolean,reflect:!0})],Kl.prototype,"async",void 0),e([We({type:Boolean,reflect:!0})],Kl.prototype,"emptyMenuAsync",void 0),e([We()],Kl.prototype,"filterFunction",void 0),e([Ge("input#multi-select-input-tracker")],Kl.prototype,"_multiSelectInput",void 0),e([Je({flatten:!0,selector:"sgds-combo-box-option"})],Kl.prototype,"options",void 0),e([qe()],Kl.prototype,"optionList",void 0),e([qe()],Kl.prototype,"emptyMenuAfterFiltering",void 0),e([qe()],Kl.prototype,"isFocused",void 0),e([tl("value",{waitUntilFirstUpdate:!0})],Kl.prototype,"_handleValueChange",null),e([tl("optionList",{waitUntilFirstUpdate:!0})],Kl.prototype,"_handleOptionListChange",null),e([tl("menuList",{waitUntilFirstUpdate:!0})],Kl.prototype,"_handleMenuListChange",null),sl("sgds-combo-box",Kl),sl("sgds-combo-box-option",Pl)});
|
|
2499
2499
|
//# sourceMappingURL=index.umd.min.js.map
|