@govtechsg/sgds-web-component 3.6.0-rc.2 → 3.6.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.
Files changed (233) hide show
  1. package/base/button.js +1 -1
  2. package/components/Alert/index.umd.min.js +17 -17
  3. package/components/Alert/index.umd.min.js.map +1 -1
  4. package/components/Alert/sgds-alert.d.ts +1 -1
  5. package/components/Alert/sgds-alert.js +2 -2
  6. package/components/Alert/sgds-alert.js.map +1 -1
  7. package/components/Badge/index.umd.min.js +16 -16
  8. package/components/Badge/index.umd.min.js.map +1 -1
  9. package/components/Badge/sgds-badge.d.ts +1 -1
  10. package/components/Badge/sgds-badge.js +2 -2
  11. package/components/Badge/sgds-badge.js.map +1 -1
  12. package/components/Breadcrumb/index.umd.min.js +17 -17
  13. package/components/Breadcrumb/index.umd.min.js.map +1 -1
  14. package/components/Breadcrumb/sgds-breadcrumb-item.d.ts +1 -0
  15. package/components/Breadcrumb/sgds-breadcrumb-item.js +5 -2
  16. package/components/Breadcrumb/sgds-breadcrumb-item.js.map +1 -1
  17. package/components/Button/index.umd.min.js +1 -1
  18. package/components/Card/index.umd.min.js.map +1 -1
  19. package/components/Card/sgds-card.js.map +1 -1
  20. package/components/CloseButton/close-button.js +6 -0
  21. package/components/CloseButton/index.js +5 -0
  22. package/components/CloseButton/index.js.map +1 -0
  23. package/components/CloseButton/index.umd.min.js +50 -0
  24. package/components/CloseButton/index.umd.min.js.map +1 -0
  25. package/{internals → components}/CloseButton/sgds-close-button.d.ts +2 -4
  26. package/{internals → components}/CloseButton/sgds-close-button.js +4 -10
  27. package/components/CloseButton/sgds-close-button.js.map +1 -0
  28. package/components/ComboBox/index.umd.min.js +18 -18
  29. package/components/ComboBox/index.umd.min.js.map +1 -1
  30. package/components/Datepicker/index.umd.min.js +1 -1
  31. package/components/Datepicker/index.umd.min.js.map +1 -1
  32. package/components/Drawer/index.umd.min.js +6 -11
  33. package/components/Drawer/index.umd.min.js.map +1 -1
  34. package/components/Drawer/sgds-drawer.d.ts +1 -1
  35. package/components/Drawer/sgds-drawer.js +1 -1
  36. package/components/Drawer/sgds-drawer.js.map +1 -1
  37. package/components/FileUpload/index.umd.min.js +26 -26
  38. package/components/FileUpload/index.umd.min.js.map +1 -1
  39. package/components/FileUpload/sgds-file-upload.d.ts +1 -1
  40. package/components/FileUpload/sgds-file-upload.js +1 -1
  41. package/components/FileUpload/sgds-file-upload.js.map +1 -1
  42. package/components/Footer/footer-item.js +1 -1
  43. package/components/Footer/footer.js +1 -1
  44. package/components/Footer/index.umd.min.js +17 -17
  45. package/components/Footer/index.umd.min.js.map +1 -1
  46. package/components/Footer/sgds-footer-item.d.ts +1 -0
  47. package/components/Footer/sgds-footer-item.js +11 -1
  48. package/components/Footer/sgds-footer-item.js.map +1 -1
  49. package/components/Footer/sgds-footer.js +7 -7
  50. package/components/Footer/sgds-footer.js.map +1 -1
  51. package/components/IconButton/index.umd.min.js +1 -1
  52. package/components/IconCard/index.umd.min.js.map +1 -1
  53. package/components/IconCard/sgds-icon-card.js.map +1 -1
  54. package/components/ImageCard/index.umd.min.js.map +1 -1
  55. package/components/ImageCard/sgds-image-card.js.map +1 -1
  56. package/components/Input/index.umd.min.js.map +1 -1
  57. package/components/Input/sgds-input.js.map +1 -1
  58. package/components/Link/index.umd.min.js +9 -9
  59. package/components/Link/index.umd.min.js.map +1 -1
  60. package/components/Link/link.js +1 -1
  61. package/components/Link/sgds-link.d.ts +7 -1
  62. package/components/Link/sgds-link.js +28 -2
  63. package/components/Link/sgds-link.js.map +1 -1
  64. package/components/Mainnav/index.umd.min.js +1 -1
  65. package/components/Modal/index.umd.min.js +4 -4
  66. package/components/Modal/index.umd.min.js.map +1 -1
  67. package/components/Modal/sgds-modal.d.ts +1 -1
  68. package/components/Modal/sgds-modal.js +2 -2
  69. package/components/Modal/sgds-modal.js.map +1 -1
  70. package/components/Pagination/index.umd.min.js +1 -1
  71. package/components/QuantityToggle/index.umd.min.js +1 -1
  72. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  73. package/components/Subnav/index.umd.min.js +11 -9
  74. package/components/Subnav/index.umd.min.js.map +1 -1
  75. package/components/Subnav/sgds-subnav.d.ts +4 -0
  76. package/components/Subnav/sgds-subnav.js +18 -2
  77. package/components/Subnav/sgds-subnav.js.map +1 -1
  78. package/components/Subnav/subnav.js +1 -1
  79. package/components/SystemBanner/index.d.ts +6 -0
  80. package/components/SystemBanner/index.js +6 -0
  81. package/components/SystemBanner/index.js.map +1 -0
  82. package/components/SystemBanner/index.umd.min.js +2101 -0
  83. package/components/SystemBanner/index.umd.min.js.map +1 -0
  84. package/components/SystemBanner/sgds-system-banner-item.d.ts +24 -0
  85. package/components/SystemBanner/sgds-system-banner-item.js +93 -0
  86. package/components/SystemBanner/sgds-system-banner-item.js.map +1 -0
  87. package/components/SystemBanner/sgds-system-banner.d.ts +51 -0
  88. package/components/SystemBanner/sgds-system-banner.js +224 -0
  89. package/components/SystemBanner/sgds-system-banner.js.map +1 -0
  90. package/components/SystemBanner/system-banner-context.d.ts +3 -0
  91. package/components/SystemBanner/system-banner-context.js +6 -0
  92. package/components/SystemBanner/system-banner-context.js.map +1 -0
  93. package/components/SystemBanner/system-banner-item.js +6 -0
  94. package/components/SystemBanner/system-banner-item.js.map +1 -0
  95. package/components/SystemBanner/system-banner.js +6 -0
  96. package/components/SystemBanner/system-banner.js.map +1 -0
  97. package/components/Toast/index.umd.min.js +12 -12
  98. package/components/Toast/index.umd.min.js.map +1 -1
  99. package/components/Toast/sgds-toast.d.ts +1 -1
  100. package/components/Toast/sgds-toast.js +2 -2
  101. package/components/Toast/sgds-toast.js.map +1 -1
  102. package/components/index.d.ts +2 -0
  103. package/components/index.js +2 -0
  104. package/components/index.js.map +1 -1
  105. package/components/index.umd.min.js +168 -136
  106. package/components/index.umd.min.js.map +1 -1
  107. package/css/fouc.css +3 -0
  108. package/index.d.ts +3 -1
  109. package/index.js +3 -1
  110. package/index.js.map +1 -1
  111. package/index.umd.min.js +212 -161
  112. package/index.umd.min.js.map +1 -1
  113. package/package.json +1 -1
  114. package/react/base/button.cjs.js +1 -1
  115. package/react/base/button.js +1 -1
  116. package/react/close-button/index.cjs.js +40 -0
  117. package/react/close-button/index.cjs.js.map +1 -0
  118. package/react/close-button/index.d.ts +2 -0
  119. package/react/close-button/index.js +16 -0
  120. package/react/close-button/index.js.map +1 -0
  121. package/react/components/Alert/sgds-alert.cjs.js +2 -2
  122. package/react/components/Alert/sgds-alert.cjs.js.map +1 -1
  123. package/react/components/Alert/sgds-alert.js +2 -2
  124. package/react/components/Alert/sgds-alert.js.map +1 -1
  125. package/react/components/Badge/sgds-badge.cjs.js +2 -2
  126. package/react/components/Badge/sgds-badge.cjs.js.map +1 -1
  127. package/react/components/Badge/sgds-badge.js +2 -2
  128. package/react/components/Badge/sgds-badge.js.map +1 -1
  129. package/react/components/Breadcrumb/sgds-breadcrumb-item.cjs.js +5 -2
  130. package/react/components/Breadcrumb/sgds-breadcrumb-item.cjs.js.map +1 -1
  131. package/react/components/Breadcrumb/sgds-breadcrumb-item.js +5 -2
  132. package/react/components/Breadcrumb/sgds-breadcrumb-item.js.map +1 -1
  133. package/react/components/Card/sgds-card.cjs.js.map +1 -1
  134. package/react/components/Card/sgds-card.js.map +1 -1
  135. package/react/components/CloseButton/close-button.cjs.js +11 -0
  136. package/react/components/CloseButton/close-button.js +7 -0
  137. package/react/{internals → components}/CloseButton/sgds-close-button.cjs.js +4 -10
  138. package/react/components/CloseButton/sgds-close-button.cjs.js.map +1 -0
  139. package/react/{internals → components}/CloseButton/sgds-close-button.js +4 -10
  140. package/react/components/CloseButton/sgds-close-button.js.map +1 -0
  141. package/react/components/Drawer/sgds-drawer.cjs.js +1 -1
  142. package/react/components/Drawer/sgds-drawer.cjs.js.map +1 -1
  143. package/react/components/Drawer/sgds-drawer.js +1 -1
  144. package/react/components/Drawer/sgds-drawer.js.map +1 -1
  145. package/react/components/FileUpload/sgds-file-upload.cjs.js +1 -1
  146. package/react/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
  147. package/react/components/FileUpload/sgds-file-upload.js +1 -1
  148. package/react/components/FileUpload/sgds-file-upload.js.map +1 -1
  149. package/react/components/Footer/footer-item.cjs.js +1 -1
  150. package/react/components/Footer/footer-item.js +1 -1
  151. package/react/components/Footer/footer.cjs.js +1 -1
  152. package/react/components/Footer/footer.js +1 -1
  153. package/react/components/Footer/sgds-footer-item.cjs.js +11 -1
  154. package/react/components/Footer/sgds-footer-item.cjs.js.map +1 -1
  155. package/react/components/Footer/sgds-footer-item.js +11 -1
  156. package/react/components/Footer/sgds-footer-item.js.map +1 -1
  157. package/react/components/Footer/sgds-footer.cjs.js +7 -7
  158. package/react/components/Footer/sgds-footer.cjs.js.map +1 -1
  159. package/react/components/Footer/sgds-footer.js +7 -7
  160. package/react/components/Footer/sgds-footer.js.map +1 -1
  161. package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
  162. package/react/components/IconCard/sgds-icon-card.js.map +1 -1
  163. package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
  164. package/react/components/ImageCard/sgds-image-card.js.map +1 -1
  165. package/react/components/Input/sgds-input.cjs.js.map +1 -1
  166. package/react/components/Input/sgds-input.js.map +1 -1
  167. package/react/components/Link/link.cjs.js +1 -1
  168. package/react/components/Link/link.js +1 -1
  169. package/react/components/Link/sgds-link.cjs.js +28 -2
  170. package/react/components/Link/sgds-link.cjs.js.map +1 -1
  171. package/react/components/Link/sgds-link.js +28 -2
  172. package/react/components/Link/sgds-link.js.map +1 -1
  173. package/react/components/Modal/sgds-modal.cjs.js +2 -2
  174. package/react/components/Modal/sgds-modal.cjs.js.map +1 -1
  175. package/react/components/Modal/sgds-modal.js +2 -2
  176. package/react/components/Modal/sgds-modal.js.map +1 -1
  177. package/react/components/Subnav/sgds-subnav.cjs.js +17 -1
  178. package/react/components/Subnav/sgds-subnav.cjs.js.map +1 -1
  179. package/react/components/Subnav/sgds-subnav.js +18 -2
  180. package/react/components/Subnav/sgds-subnav.js.map +1 -1
  181. package/react/components/Subnav/subnav.cjs.js +1 -1
  182. package/react/components/Subnav/subnav.js +1 -1
  183. package/react/components/SystemBanner/sgds-system-banner-item.cjs.js +99 -0
  184. package/react/components/SystemBanner/sgds-system-banner-item.cjs.js.map +1 -0
  185. package/react/components/SystemBanner/sgds-system-banner-item.js +94 -0
  186. package/react/components/SystemBanner/sgds-system-banner-item.js.map +1 -0
  187. package/react/components/SystemBanner/sgds-system-banner.cjs.js +230 -0
  188. package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -0
  189. package/react/components/SystemBanner/sgds-system-banner.js +225 -0
  190. package/react/components/SystemBanner/sgds-system-banner.js.map +1 -0
  191. package/react/components/SystemBanner/system-banner-context.cjs.js +11 -0
  192. package/react/components/SystemBanner/system-banner-context.cjs.js.map +1 -0
  193. package/react/components/SystemBanner/system-banner-context.js +7 -0
  194. package/react/components/SystemBanner/system-banner-context.js.map +1 -0
  195. package/react/components/SystemBanner/system-banner-item.cjs.js +11 -0
  196. package/react/components/SystemBanner/system-banner-item.cjs.js.map +1 -0
  197. package/react/components/SystemBanner/system-banner-item.js +7 -0
  198. package/react/components/SystemBanner/system-banner-item.js.map +1 -0
  199. package/react/components/SystemBanner/system-banner.cjs.js +11 -0
  200. package/react/components/SystemBanner/system-banner.cjs.js.map +1 -0
  201. package/react/components/SystemBanner/system-banner.js +7 -0
  202. package/react/components/SystemBanner/system-banner.js.map +1 -0
  203. package/react/components/Toast/sgds-toast.cjs.js +2 -2
  204. package/react/components/Toast/sgds-toast.cjs.js.map +1 -1
  205. package/react/components/Toast/sgds-toast.js +2 -2
  206. package/react/components/Toast/sgds-toast.js.map +1 -1
  207. package/react/index.cjs.js +114 -108
  208. package/react/index.cjs.js.map +1 -1
  209. package/react/index.d.ts +3 -0
  210. package/react/index.js +3 -0
  211. package/react/index.js.map +1 -1
  212. package/react/system-banner/index.cjs.js +43 -0
  213. package/react/system-banner/index.cjs.js.map +1 -0
  214. package/react/system-banner/index.d.ts +2 -0
  215. package/react/system-banner/index.js +19 -0
  216. package/react/system-banner/index.js.map +1 -0
  217. package/react/system-banner-item/index.cjs.js +42 -0
  218. package/react/system-banner-item/index.cjs.js.map +1 -0
  219. package/react/system-banner-item/index.d.ts +2 -0
  220. package/react/system-banner-item/index.js +18 -0
  221. package/react/system-banner-item/index.js.map +1 -0
  222. package/themes/root.css +14 -2
  223. package/internals/CloseButton/close-button.js +0 -6
  224. package/internals/CloseButton/sgds-close-button.js.map +0 -1
  225. package/react/internals/CloseButton/close-button.cjs.js +0 -11
  226. package/react/internals/CloseButton/close-button.js +0 -7
  227. package/react/internals/CloseButton/sgds-close-button.cjs.js.map +0 -1
  228. package/react/internals/CloseButton/sgds-close-button.js.map +0 -1
  229. package/utils/test.d.ts +0 -28
  230. /package/{internals → components}/CloseButton/close-button.js.map +0 -0
  231. /package/{internals → components}/CloseButton/index.d.ts +0 -0
  232. /package/react/{internals → components}/CloseButton/close-button.cjs.js.map +0 -0
  233. /package/react/{internals → components}/CloseButton/close-button.js.map +0 -0
@@ -1,21 +1,21 @@
1
- !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e,t,i,l){var o,a=arguments.length,s=a<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,l);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(a<3?o(s):a>3?o(t,i,s):o(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s}"function"==typeof SuppressedError&&SuppressedError;
1
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e,t,i,l){var o,s=arguments.length,a=s<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,l);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}"function"==typeof SuppressedError&&SuppressedError;
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const t=globalThis,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),o=new WeakMap;class a{constructor(e,t,i){if(this._$cssResult$=!0,i!==l)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(i&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=o.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&o.set(t,e))}return e}toString(){return this.cssText}}const s=e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return new a("string"==typeof(i=t)?i:String(i),void 0,l);var i},n=i?e=>e:e=>e instanceof CSSStyleSheet?s(e):e
7
+ const t=globalThis,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),o=new WeakMap;class s{constructor(e,t,i){if(this._$cssResult$=!0,i!==l)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(i&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=o.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&o.set(t,e))}return e}toString(){return this.cssText}}const a=e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return new s("string"==typeof(i=t)?i:String(i),void 0,l);var i},n=i?e=>e:e=>e instanceof CSSStyleSheet?a(e):e
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */,{is:r,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:h,getOwnPropertySymbols:u,getPrototypeOf:v}=Object,p=globalThis;let g;const f=p.trustedTypes,m=f?f.emptyScript:"",w=p.reactiveElementPolyfillSupportDevMode;{const e=p.litIssuedWarnings??=new Set;g=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))},g("dev-mode","Lit is in dev mode. Not recommended for production!"),p.ShadyDOM?.inUse&&void 0===w&&g("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const b=(e,t)=>e,y={toAttribute(e,t){switch(t){case Boolean:e=e?m: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}},x=(e,t)=>!r(e,t),_={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;class C 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=_){if(t.state&&(t.attribute=!1),this.__prepare(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol.for(`${String(e)} (@property() cache)`),l=this.getPropertyDescriptor(e,i,t);void 0!==l&&c(this.prototype,e,l)}}static getPropertyDescriptor(e,t,i){const{get:l,set:o}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==l){if("value"in(d(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.`);g("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(){return l?.call(this)},set(t){const a=l?.call(this);o.call(this,t),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_}static __prepare(){if(this.hasOwnProperty(b("elementProperties")))return;const e=v(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(b("properties"))){const e=this.properties,t=[...h(e),...u(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")&&g("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&g("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(n(e))}else void 0!==e&&t.push(n(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,l)=>{if(i)e.adoptedStyleSheets=l.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of l){const l=document.createElement("style"),o=t.litNonce;void 0!==o&&l.setAttribute("nonce",o),l.textContent=i.cssText,e.appendChild(l)}})(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 o=(void 0!==i.converter?.toAttribute?i.converter:y).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===o&&g("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==o?this.removeAttribute(l):this.setAttribute(l,o),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),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:y;this.__reflectingProperty=l,this[l]=o.fromAttribute(t,e.type),this.__reflectingProperty=null}}requestUpdate(e,t,i){if(void 0!==e){e instanceof Event&&g("","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()"),i??=this.constructor.getPropertyOptions(e);if(!(i.hasChanged??x)(this[e],t))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,i){this._$changedProperties.has(e)||this._$changedProperties.set(e,t),!0===i.reflect&&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&&g("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"},p.emitLitDebugLogEvents&&p.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 v(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)!0!==i.wrapped||this._$changedProperties.has(t)||void 0===this[t]||this._$changeProperty(t,this[t],i)}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")&&g("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){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[b("elementProperties")]=new Map,C[b("finalized")]=new Map,w?.({ReactiveElement:C});{C.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(b("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};C.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},C.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(p.reactiveElementVersions??=[]).push("2.0.4"),p.reactiveElementVersions.length>1&&g("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
12
+ */,{is:r,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:h,getOwnPropertySymbols:u,getPrototypeOf:v}=Object,p=globalThis;let g;const f=p.trustedTypes,m=f?f.emptyScript:"",w=p.reactiveElementPolyfillSupportDevMode;{const e=p.litIssuedWarnings??=new Set;g=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))},g("dev-mode","Lit is in dev mode. Not recommended for production!"),p.ShadyDOM?.inUse&&void 0===w&&g("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const b=(e,t)=>e,y={toAttribute(e,t){switch(t){case Boolean:e=e?m: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}},x=(e,t)=>!r(e,t),_={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;class C 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=_){if(t.state&&(t.attribute=!1),this.__prepare(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol.for(`${String(e)} (@property() cache)`),l=this.getPropertyDescriptor(e,i,t);void 0!==l&&c(this.prototype,e,l)}}static getPropertyDescriptor(e,t,i){const{get:l,set:o}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==l){if("value"in(d(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.`);g("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(){return l?.call(this)},set(t){const s=l?.call(this);o.call(this,t),this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_}static __prepare(){if(this.hasOwnProperty(b("elementProperties")))return;const e=v(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(b("properties"))){const e=this.properties,t=[...h(e),...u(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")&&g("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&g("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(n(e))}else void 0!==e&&t.push(n(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,l)=>{if(i)e.adoptedStyleSheets=l.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of l){const l=document.createElement("style"),o=t.litNonce;void 0!==o&&l.setAttribute("nonce",o),l.textContent=i.cssText,e.appendChild(l)}})(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 o=(void 0!==i.converter?.toAttribute?i.converter:y).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===o&&g("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==o?this.removeAttribute(l):this.setAttribute(l,o),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),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:y;this.__reflectingProperty=l,this[l]=o.fromAttribute(t,e.type),this.__reflectingProperty=null}}requestUpdate(e,t,i){if(void 0!==e){e instanceof Event&&g("","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()"),i??=this.constructor.getPropertyOptions(e);if(!(i.hasChanged??x)(this[e],t))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,i){this._$changedProperties.has(e)||this._$changedProperties.set(e,t),!0===i.reflect&&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&&g("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"},p.emitLitDebugLogEvents&&p.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 v(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)!0!==i.wrapped||this._$changedProperties.has(t)||void 0===this[t]||this._$changeProperty(t,this[t],i)}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")&&g("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){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[b("elementProperties")]=new Map,C[b("finalized")]=new Map,w?.({ReactiveElement:C});{C.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(b("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};C.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},C.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(p.reactiveElementVersions??=[]).push("2.0.4"),p.reactiveElementVersions.length>1&&g("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
13
13
  /**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- const Z=globalThis,M=e=>{Z.emitLitDebugLogEvents&&Z.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let V,k=0;Z.litIssuedWarnings??=new Set,V=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",Z.litIssuedWarnings.has(t)||(console.warn(t),Z.litIssuedWarnings.add(t))},V("dev-mode","Lit is in dev mode. Not recommended for production!");const $=Z.ShadyDOM?.inUse&&!0===Z.ShadyDOM?.noPatch?Z.ShadyDOM.wrap:e=>e,H=Z.trustedTypes,S=H?H.createPolicy("lit-html",{createHTML:e=>e}):void 0,B=e=>e,L=(e,t,i)=>B,A=e=>{if(ae!==L)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ae=e},P=()=>{ae=L},E=(e,t,i)=>ae(e,t,i),T="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+I,R=`<${O}>`,U=document,z=()=>U.createComment(""),D=e=>null===e||"object"!=typeof e&&"function"!=typeof e,N=Array.isArray,F=e=>N(e)||"function"==typeof e?.[Symbol.iterator],W="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,K=/>/g,J=new RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,X=/"/g,Y=/^(?:script|style|textarea|title)$/i,Q=(ee=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$))&&V("","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$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),le=new WeakMap,oe=U.createTreeWalker(U,129);let ae=L;function se(e,t){if(!N(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!==S?S.createHTML(t):t}const ne=(e,t)=>{const i=e.length-1,l=[];let o,a=2===t?"<svg>":3===t?"<math>":"",s=q;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===q){if("!--"===r[1])s=j;else if(void 0!==r[1])s=K;else if(void 0!==r[2])Y.test(r[2])&&(o=new RegExp(`</${r[2]}`,"g")),s=J;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===J?">"===r[0]?(s=o??q,c=-1):void 0===r[1]?c=-2:(c=s.lastIndex-r[2].length,n=r[1],s=void 0===r[3]?J:'"'===r[3]?X:G):s===X||s===G?s=J:s===j||s===K?s=q:(s=J,o=void 0);console.assert(-1===c||s===J||s===G||s===X,"unexpected parse state B");const h=s===J&&e[t+1].startsWith("/>")?" ":"";a+=s===q?i+R:c>=0?(l.push(n),i.slice(0,c)+T+i.slice(c)+I+h):i+I+(-2===c?t:h)}return[se(e,a+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),l]};class re{constructor({strings:e,_$litType$:t},i){let l;this.parts=[];let o=0,a=0;const s=e.length-1,n=this.parts,[r,c]=ne(e,t);if(this.el=re.createElement(r,i),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(l=oe.nextNode())&&n.length<s;){if(1===l.nodeType){{const e=l.localName;if(/^(?:textarea|template)$/i.test(e)&&l.innerHTML.includes(I)){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);V("",t)}}if(l.hasAttributes())for(const e of l.getAttributeNames())if(e.endsWith(T)){const t=c[a++],i=l.getAttribute(e).split(I),s=/([.?@])?(.*)/.exec(t);n.push({type:1,index:o,name:s[2],strings:i,ctor:"."===s[1]?ve:"?"===s[1]?pe:"@"===s[1]?ge:ue}),l.removeAttribute(e)}else e.startsWith(I)&&(n.push({type:6,index:o}),l.removeAttribute(e));if(Y.test(l.tagName)){const e=l.textContent.split(I),t=e.length-1;if(t>0){l.textContent=H?H.emptyScript:"";for(let i=0;i<t;i++)l.append(e[i],z()),oe.nextNode(),n.push({type:2,index:++o});l.append(e[t],z())}}}else if(8===l.nodeType){if(l.data===O)n.push({type:2,index:o});else{let e=-1;for(;-1!==(e=l.data.indexOf(I,e+1));)n.push({type:7,index:o}),e+=I.length-1}}o++}if(c.length!==a)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("${...}")+"`");M&&M({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=U.createElement("template");return i.innerHTML=e,i}}function ce(e,t,i=e,l){if(t===te)return t;let o=void 0!==l?i.__directives?.[l]:i.__directive;const a=D(t)?void 0:t._$litDirective$;return o?.constructor!==a&&(o?._$notifyDirectiveConnectionChanged?.(!1),void 0===a?o=void 0:(o=new a(e),o._$initialize(e,i,l)),void 0!==l?(i.__directives??=[])[l]=o:i.__directive=o),void 0!==o&&(t=ce(e,o._$resolve(e,t.values),o,l)),t}class de{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??U).importNode(t,!0);oe.currentNode=l;let o=oe.nextNode(),a=0,s=0,n=i[0];for(;void 0!==n;){if(a===n.index){let t;2===n.type?t=new he(o,o.nextSibling,this,e):1===n.type?t=new n.ctor(o,n.name,n.strings,this,e):6===n.type&&(t=new fe(o,this,e)),this._$parts.push(t),n=i[++s]}a!==n?.index&&(o=oe.nextNode(),a++)}return oe.currentNode=U,l}_update(e){let t=0;for(const i of this._$parts)void 0!==i&&(M&&M({kind:"set part",part:i,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==i.strings?(i._$setValue(e,i,t),t+=i.strings.length-2):i._$setValue(e[t])),t++}}class he{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,l){this.type=2,this._$committedValue=ie,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=$(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=ce(this,e,t),D(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(M&&M({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==te&&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 F(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return $($(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ae!==L){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)}}M&&M({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ie&&D(this._$committedValue)){const t=$(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),M&&M({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=U.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),M&&M({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:i}=e,l="number"==typeof i?this._$getTemplate(e):(void 0===i.el&&(i.el=re.createElement(se(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===l)M&&M({kind:"template updating",template:l,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new de(l,this),i=e._clone(this.options);M&&M({kind:"template instantiated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),e._update(t),M&&M({kind:"template instantiated and updated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),this._commitNode(i),this._$committedValue=e}}_$getTemplate(e){let t=le.get(e.strings);return void 0===t&&le.set(e.strings,t=new re(e)),t}_commitIterable(e){N(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,l=0;for(const o of e)l===t.length?t.push(i=new he(this._insert(z()),this._insert(z()),this,this.options)):i=t[l],i._$setValue(o),l++;l<t.length&&(this._$clear(i&&$(i._$endNode).nextSibling,l),t.length=l)}_$clear(e=$(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e&&e!==this._$endNode;){const t=$(e).nextSibling;$(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 ue{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,l,o){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=l,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,i,l){const o=this.strings;let a=!1;if(void 0===o)e=ce(this,e,t,0),a=!D(e)||e!==this._$committedValue&&e!==te,a&&(this._$committedValue=e);else{const l=e;let s,n;for(e=o[0],s=0;s<o.length-1;s++)n=ce(this,l[i+s],t,s),n===te&&(n=this._$committedValue[s]),a||=!D(n)||n!==this._$committedValue[s],n===ie?e=ie:e!==ie&&(e+=(n??"")+o[s+1]),this._$committedValue[s]=n}a&&!l&&this._commitValue(e)}_commitValue(e){e===ie?$(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ae(this.element,this.name,"attribute")),e=this._sanitizer(e??""),M&&M({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),$(this.element).setAttribute(this.name,e??""))}}class ve extends ue{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ae(this.element,this.name,"property")),e=this._sanitizer(e),M&&M({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class pe extends ue{constructor(){super(...arguments),this.type=4}_commitValue(e){M&&M({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),$(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class ge extends ue{constructor(e,t,i,l,o){if(super(e,t,i,l,o),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=ce(this,e,t,0)??ie)===te)return;const i=this._$committedValue,l=e===ie&&i!==ie||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==ie&&(i===ie||l);M&&M({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:l,addListener:o,oldListener:i}),l&&this.element.removeEventListener(this.name,this,i),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 fe{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){M&&M({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const me={_boundAttributeSuffix:T,_marker:I,_markerMatch:O,_HTML_RESULT:1,_getTemplateHtml:ne,_TemplateInstance:de,_isIterable:F,_resolveDirective:ce,_ChildPart:he,_AttributePart:ue,_BooleanAttributePart:pe,_EventPart:ge,_PropertyPart:ve,_ElementPart:fe},we=Z.litHtmlPolyfillSupportDevMode;we?.(re,he),(Z.litHtmlVersions??=[]).push("3.2.0"),Z.litHtmlVersions.length>1&&V("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const be=(e,t,i)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const l=k++,o=i?.renderBefore??t;let a=o._$litPart$;if(M&&M({kind:"begin render",id:l,value:e,container:t,options:i,part:a}),void 0===a){const e=i?.renderBefore??null;o._$litPart$=a=new he(t.insertBefore(z(),e),e,void 0,i??{})}return a._$setValue(e),M&&M({kind:"end render",id:l,value:e,container:t,options:i,part:a}),a};be.setSanitizer=A,be.createSanitizer=E,be._testOnlyClearSanitizerFactoryDoNotCallOrElse=P;
18
+ const Z=globalThis,M=e=>{Z.emitLitDebugLogEvents&&Z.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let V,k=0;Z.litIssuedWarnings??=new Set,V=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",Z.litIssuedWarnings.has(t)||(console.warn(t),Z.litIssuedWarnings.add(t))},V("dev-mode","Lit is in dev mode. Not recommended for production!");const $=Z.ShadyDOM?.inUse&&!0===Z.ShadyDOM?.noPatch?Z.ShadyDOM.wrap:e=>e,H=Z.trustedTypes,S=H?H.createPolicy("lit-html",{createHTML:e=>e}):void 0,B=e=>e,L=(e,t,i)=>B,A=e=>{if(se!==L)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");se=e},P=()=>{se=L},E=(e,t,i)=>se(e,t,i),T="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+I,R=`<${O}>`,U=document,z=()=>U.createComment(""),D=e=>null===e||"object"!=typeof e&&"function"!=typeof e,N=Array.isArray,F=e=>N(e)||"function"==typeof e?.[Symbol.iterator],W="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,K=/>/g,J=new RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,X=/"/g,Y=/^(?:script|style|textarea|title)$/i,Q=(ee=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$))&&V("","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$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),le=new WeakMap,oe=U.createTreeWalker(U,129);let se=L;function ae(e,t){if(!N(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!==S?S.createHTML(t):t}const ne=(e,t)=>{const i=e.length-1,l=[];let o,s=2===t?"<svg>":3===t?"<math>":"",a=q;for(let t=0;t<i;t++){const i=e[t];let n,r,c=-1,d=0;for(;d<i.length&&(a.lastIndex=d,r=a.exec(i),null!==r);)if(d=a.lastIndex,a===q){if("!--"===r[1])a=j;else if(void 0!==r[1])a=K;else if(void 0!==r[2])Y.test(r[2])&&(o=new RegExp(`</${r[2]}`,"g")),a=J;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 a===J?">"===r[0]?(a=o??q,c=-1):void 0===r[1]?c=-2:(c=a.lastIndex-r[2].length,n=r[1],a=void 0===r[3]?J:'"'===r[3]?X:G):a===X||a===G?a=J:a===j||a===K?a=q:(a=J,o=void 0);console.assert(-1===c||a===J||a===G||a===X,"unexpected parse state B");const h=a===J&&e[t+1].startsWith("/>")?" ":"";s+=a===q?i+R:c>=0?(l.push(n),i.slice(0,c)+T+i.slice(c)+I+h):i+I+(-2===c?t:h)}return[ae(e,s+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),l]};class re{constructor({strings:e,_$litType$:t},i){let l;this.parts=[];let o=0,s=0;const a=e.length-1,n=this.parts,[r,c]=ne(e,t);if(this.el=re.createElement(r,i),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(l=oe.nextNode())&&n.length<a;){if(1===l.nodeType){{const e=l.localName;if(/^(?:textarea|template)$/i.test(e)&&l.innerHTML.includes(I)){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);V("",t)}}if(l.hasAttributes())for(const e of l.getAttributeNames())if(e.endsWith(T)){const t=c[s++],i=l.getAttribute(e).split(I),a=/([.?@])?(.*)/.exec(t);n.push({type:1,index:o,name:a[2],strings:i,ctor:"."===a[1]?ve:"?"===a[1]?pe:"@"===a[1]?ge:ue}),l.removeAttribute(e)}else e.startsWith(I)&&(n.push({type:6,index:o}),l.removeAttribute(e));if(Y.test(l.tagName)){const e=l.textContent.split(I),t=e.length-1;if(t>0){l.textContent=H?H.emptyScript:"";for(let i=0;i<t;i++)l.append(e[i],z()),oe.nextNode(),n.push({type:2,index:++o});l.append(e[t],z())}}}else if(8===l.nodeType){if(l.data===O)n.push({type:2,index:o});else{let e=-1;for(;-1!==(e=l.data.indexOf(I,e+1));)n.push({type:7,index:o}),e+=I.length-1}}o++}if(c.length!==s)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("${...}")+"`");M&&M({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=U.createElement("template");return i.innerHTML=e,i}}function ce(e,t,i=e,l){if(t===te)return t;let o=void 0!==l?i.__directives?.[l]:i.__directive;const s=D(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$notifyDirectiveConnectionChanged?.(!1),void 0===s?o=void 0:(o=new s(e),o._$initialize(e,i,l)),void 0!==l?(i.__directives??=[])[l]=o:i.__directive=o),void 0!==o&&(t=ce(e,o._$resolve(e,t.values),o,l)),t}class de{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??U).importNode(t,!0);oe.currentNode=l;let o=oe.nextNode(),s=0,a=0,n=i[0];for(;void 0!==n;){if(s===n.index){let t;2===n.type?t=new he(o,o.nextSibling,this,e):1===n.type?t=new n.ctor(o,n.name,n.strings,this,e):6===n.type&&(t=new fe(o,this,e)),this._$parts.push(t),n=i[++a]}s!==n?.index&&(o=oe.nextNode(),s++)}return oe.currentNode=U,l}_update(e){let t=0;for(const i of this._$parts)void 0!==i&&(M&&M({kind:"set part",part:i,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==i.strings?(i._$setValue(e,i,t),t+=i.strings.length-2):i._$setValue(e[t])),t++}}class he{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,l){this.type=2,this._$committedValue=ie,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=$(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=ce(this,e,t),D(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(M&&M({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==te&&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 F(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return $($(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),se!==L){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)}}M&&M({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ie&&D(this._$committedValue)){const t=$(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),M&&M({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=U.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),M&&M({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:i}=e,l="number"==typeof i?this._$getTemplate(e):(void 0===i.el&&(i.el=re.createElement(ae(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===l)M&&M({kind:"template updating",template:l,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new de(l,this),i=e._clone(this.options);M&&M({kind:"template instantiated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),e._update(t),M&&M({kind:"template instantiated and updated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),this._commitNode(i),this._$committedValue=e}}_$getTemplate(e){let t=le.get(e.strings);return void 0===t&&le.set(e.strings,t=new re(e)),t}_commitIterable(e){N(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,l=0;for(const o of e)l===t.length?t.push(i=new he(this._insert(z()),this._insert(z()),this,this.options)):i=t[l],i._$setValue(o),l++;l<t.length&&(this._$clear(i&&$(i._$endNode).nextSibling,l),t.length=l)}_$clear(e=$(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e&&e!==this._$endNode;){const t=$(e).nextSibling;$(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 ue{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,l,o){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=l,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,i,l){const o=this.strings;let s=!1;if(void 0===o)e=ce(this,e,t,0),s=!D(e)||e!==this._$committedValue&&e!==te,s&&(this._$committedValue=e);else{const l=e;let a,n;for(e=o[0],a=0;a<o.length-1;a++)n=ce(this,l[i+a],t,a),n===te&&(n=this._$committedValue[a]),s||=!D(n)||n!==this._$committedValue[a],n===ie?e=ie:e!==ie&&(e+=(n??"")+o[a+1]),this._$committedValue[a]=n}s&&!l&&this._commitValue(e)}_commitValue(e){e===ie?$(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=se(this.element,this.name,"attribute")),e=this._sanitizer(e??""),M&&M({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),$(this.element).setAttribute(this.name,e??""))}}class ve extends ue{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=se(this.element,this.name,"property")),e=this._sanitizer(e),M&&M({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class pe extends ue{constructor(){super(...arguments),this.type=4}_commitValue(e){M&&M({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),$(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class ge extends ue{constructor(e,t,i,l,o){if(super(e,t,i,l,o),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=ce(this,e,t,0)??ie)===te)return;const i=this._$committedValue,l=e===ie&&i!==ie||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==ie&&(i===ie||l);M&&M({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:l,addListener:o,oldListener:i}),l&&this.element.removeEventListener(this.name,this,i),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 fe{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){M&&M({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const me={_boundAttributeSuffix:T,_marker:I,_markerMatch:O,_HTML_RESULT:1,_getTemplateHtml:ne,_TemplateInstance:de,_isIterable:F,_resolveDirective:ce,_ChildPart:he,_AttributePart:ue,_BooleanAttributePart:pe,_EventPart:ge,_PropertyPart:ve,_ElementPart:fe},we=Z.litHtmlPolyfillSupportDevMode;we?.(re,he),(Z.litHtmlVersions??=[]).push("3.2.0"),Z.litHtmlVersions.length>1&&V("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const be=(e,t,i)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const l=k++,o=i?.renderBefore??t;let s=o._$litPart$;if(M&&M({kind:"begin render",id:l,value:e,container:t,options:i,part:s}),void 0===s){const e=i?.renderBefore??null;o._$litPart$=s=new he(t.insertBefore(z(),e),e,void 0,i??{})}return s._$setValue(e),M&&M({kind:"end render",id:l,value:e,container:t,options:i,part:s}),s};be.setSanitizer=A,be.createSanitizer=E,be._testOnlyClearSanitizerFactoryDoNotCallOrElse=P;
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2019 Google LLC
@@ -26,7 +26,7 @@ const ye=globalThis,xe=ye.ShadowRoot&&(void 0===ye.ShadyCSS||ye.ShadyCSS.nativeS
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */,{is:$e,defineProperty:He,getOwnPropertyDescriptor:Se,getOwnPropertyNames:Be,getOwnPropertySymbols:Le,getPrototypeOf:Ae}=Object,Pe=globalThis;let Ee;const Te=Pe.trustedTypes,Ie=Te?Te.emptyScript:"",Oe=Pe.reactiveElementPolyfillSupportDevMode;{const e=Pe.litIssuedWarnings??=new Set;Ee=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))},Ee("dev-mode","Lit is in dev mode. Not recommended for production!"),Pe.ShadyDOM?.inUse&&void 0===Oe&&Ee("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const Re=(e,t)=>e,Ue={toAttribute(e,t){switch(t){case Boolean:e=e?Ie: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}},ze=(e,t)=>!$e(e,t),De={attribute:!0,type:String,converter:Ue,reflect:!1,hasChanged:ze};Symbol.metadata??=Symbol("metadata"),Pe.litPropertyMetadata??=new WeakMap;class Ne 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=De){if(t.state&&(t.attribute=!1),this.__prepare(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol.for(`${String(e)} (@property() cache)`),l=this.getPropertyDescriptor(e,i,t);void 0!==l&&He(this.prototype,e,l)}}static getPropertyDescriptor(e,t,i){const{get:l,set:o}=Se(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==l){if("value"in(Se(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.`);Ee("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(){return l?.call(this)},set(t){const a=l?.call(this);o.call(this,t),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??De}static __prepare(){if(this.hasOwnProperty(Re("elementProperties")))return;const e=Ae(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Re("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(Re("properties"))){const e=this.properties,t=[...Be(e),...Le(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")&&Ee("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&Ee("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(ke(e))}else void 0!==e&&t.push(ke(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(xe)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),l=ye.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 o=(void 0!==i.converter?.toAttribute?i.converter:Ue).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===o&&Ee("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==o?this.removeAttribute(l):this.setAttribute(l,o),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),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Ue;this.__reflectingProperty=l,this[l]=o.fromAttribute(t,e.type),this.__reflectingProperty=null}}requestUpdate(e,t,i){if(void 0!==e){e instanceof Event&&Ee("","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()"),i??=this.constructor.getPropertyOptions(e);if(!(i.hasChanged??ze)(this[e],t))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,i){this._$changedProperties.has(e)||this._$changedProperties.set(e,t),!0===i.reflect&&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&&Ee("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"},Pe.emitLitDebugLogEvents&&Pe.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 Ae(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)!0!==i.wrapped||this._$changedProperties.has(t)||void 0===this[t]||this._$changeProperty(t,this[t],i)}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")&&Ee("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){}}Ne.elementStyles=[],Ne.shadowRootOptions={mode:"open"},Ne[Re("elementProperties")]=new Map,Ne[Re("finalized")]=new Map,Oe?.({ReactiveElement:Ne});{Ne.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(Re("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Ne.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Ne.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(Pe.reactiveElementVersions??=[]).push("2.0.4"),Pe.reactiveElementVersions.length>1&&Ee("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
29
+ */,{is:$e,defineProperty:He,getOwnPropertyDescriptor:Se,getOwnPropertyNames:Be,getOwnPropertySymbols:Le,getPrototypeOf:Ae}=Object,Pe=globalThis;let Ee;const Te=Pe.trustedTypes,Ie=Te?Te.emptyScript:"",Oe=Pe.reactiveElementPolyfillSupportDevMode;{const e=Pe.litIssuedWarnings??=new Set;Ee=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))},Ee("dev-mode","Lit is in dev mode. Not recommended for production!"),Pe.ShadyDOM?.inUse&&void 0===Oe&&Ee("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const Re=(e,t)=>e,Ue={toAttribute(e,t){switch(t){case Boolean:e=e?Ie: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}},ze=(e,t)=>!$e(e,t),De={attribute:!0,type:String,converter:Ue,reflect:!1,hasChanged:ze};Symbol.metadata??=Symbol("metadata"),Pe.litPropertyMetadata??=new WeakMap;class Ne 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=De){if(t.state&&(t.attribute=!1),this.__prepare(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol.for(`${String(e)} (@property() cache)`),l=this.getPropertyDescriptor(e,i,t);void 0!==l&&He(this.prototype,e,l)}}static getPropertyDescriptor(e,t,i){const{get:l,set:o}=Se(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==l){if("value"in(Se(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.`);Ee("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(){return l?.call(this)},set(t){const s=l?.call(this);o.call(this,t),this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??De}static __prepare(){if(this.hasOwnProperty(Re("elementProperties")))return;const e=Ae(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Re("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(Re("properties"))){const e=this.properties,t=[...Be(e),...Le(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")&&Ee("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&Ee("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(ke(e))}else void 0!==e&&t.push(ke(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(xe)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),l=ye.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 o=(void 0!==i.converter?.toAttribute?i.converter:Ue).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===o&&Ee("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==o?this.removeAttribute(l):this.setAttribute(l,o),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),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Ue;this.__reflectingProperty=l,this[l]=o.fromAttribute(t,e.type),this.__reflectingProperty=null}}requestUpdate(e,t,i){if(void 0!==e){e instanceof Event&&Ee("","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()"),i??=this.constructor.getPropertyOptions(e);if(!(i.hasChanged??ze)(this[e],t))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,i){this._$changedProperties.has(e)||this._$changedProperties.set(e,t),!0===i.reflect&&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&&Ee("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"},Pe.emitLitDebugLogEvents&&Pe.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 Ae(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)!0!==i.wrapped||this._$changedProperties.has(t)||void 0===this[t]||this._$changeProperty(t,this[t],i)}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")&&Ee("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){}}Ne.elementStyles=[],Ne.shadowRootOptions={mode:"open"},Ne[Re("elementProperties")]=new Map,Ne[Re("finalized")]=new Map,Oe?.({ReactiveElement:Ne});{Ne.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(Re("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Ne.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Ne.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(Pe.reactiveElementVersions??=[]).push("2.0.4"),Pe.reactiveElementVersions.length>1&&Ee("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
@@ -37,7 +37,7 @@ const ye=globalThis,xe=ye.ShadowRoot&&(void 0===ye.ShadyCSS||ye.ShadyCSS.nativeS
37
37
  * Copyright 2017 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
39
  */
40
- let Ke;je?.({LitElement:We}),(globalThis.litElementVersions??=[]).push("4.1.0"),globalThis.litElementVersions.length>1&&Fe("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");{const e=globalThis.litIssuedWarnings??=new Set;Ke=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))}}const Je=(e,t,i)=>{const l=t.hasOwnProperty(i);return t.constructor.createProperty(i,l?{...e,wrapped:!0}:e),l?Object.getOwnPropertyDescriptor(t,i):void 0},Ge={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:x},Xe=(e=Ge,t,i)=>{const{kind:l,metadata:o}=i;null==o&&Ke("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 a=globalThis.litPropertyMetadata.get(o);if(void 0===a&&globalThis.litPropertyMetadata.set(o,a=new Map),a.set(i.name,e),"accessor"===l){const{name:l}=i;return{set(i){const o=t.get.call(this);t.set.call(this,i),this.requestUpdate(l,o,e)},init(t){return void 0!==t&&this._$changeProperty(l,void 0,e),t}}}if("setter"===l){const{name:l}=i;return function(i){const o=this[l];t.call(this,i),this.requestUpdate(l,o,e)}}throw new Error(`Unsupported decorator location: ${l}`)};function Ye(e){return(t,i)=>"object"==typeof i?Xe(e,t,i):Je(e,t,i)}
40
+ let Ke;je?.({LitElement:We}),(globalThis.litElementVersions??=[]).push("4.1.0"),globalThis.litElementVersions.length>1&&Fe("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");{const e=globalThis.litIssuedWarnings??=new Set;Ke=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))}}const Je=(e,t,i)=>{const l=t.hasOwnProperty(i);return t.constructor.createProperty(i,l?{...e,wrapped:!0}:e),l?Object.getOwnPropertyDescriptor(t,i):void 0},Ge={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:x},Xe=(e=Ge,t,i)=>{const{kind:l,metadata:o}=i;null==o&&Ke("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 s=globalThis.litPropertyMetadata.get(o);if(void 0===s&&globalThis.litPropertyMetadata.set(o,s=new Map),s.set(i.name,e),"accessor"===l){const{name:l}=i;return{set(i){const o=t.get.call(this);t.set.call(this,i),this.requestUpdate(l,o,e)},init(t){return void 0!==t&&this._$changeProperty(l,void 0,e),t}}}if("setter"===l){const{name:l}=i;return function(i){const o=this[l];t.call(this,i),this.requestUpdate(l,o,e)}}throw new Error(`Unsupported decorator location: ${l}`)};function Ye(e){return(t,i)=>"object"==typeof i?Xe(e,t,i):Je(e,t,i)}
41
41
  /**
42
42
  * @license
43
43
  * Copyright 2017 Google LLC
@@ -63,12 +63,12 @@ function it(e){return(t,i)=>et(t,i,{async get(){return await this.updateComplete
63
63
  * @license
64
64
  * Copyright 2021 Google LLC
65
65
  * SPDX-License-Identifier: BSD-3-Clause
66
- */function lt(e){return(t,i)=>{const{slot:l,selector:o}=e??{},a="slot"+(l?`[name=${l}]`:":not([name])");return et(t,i,{get(){const t=this.renderRoot?.querySelector(a),i=t?.assignedElements(e)??[];return void 0===o?i:i.filter((e=>e.matches(o)))}})}}
66
+ */function lt(e){return(t,i)=>{const{slot:l,selector:o}=e??{},s="slot"+(l?`[name=${l}]`:":not([name])");return et(t,i,{get(){const t=this.renderRoot?.querySelector(s),i=t?.assignedElements(e)??[];return void 0===o?i:i.filter((e=>e.matches(o)))}})}}
67
67
  /**
68
68
  * @license
69
69
  * Copyright 2017 Google LLC
70
70
  * SPDX-License-Identifier: BSD-3-Clause
71
- */const ot=1,at=2,st=3,nt=4,rt=e=>(...t)=>({_$litDirective$:e,values:t});class ct{constructor(e){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(e,t,i){this.__part=e,this._$parent=t,this.__attributeIndex=i}_$resolve(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
71
+ */const ot=1,st=2,at=3,nt=4,rt=e=>(...t)=>({_$litDirective$:e,values:t});class ct{constructor(e){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(e,t,i){this.__part=e,this._$parent=t,this.__attributeIndex=i}_$resolve(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
72
72
  /**
73
73
  * @license
74
74
  * Copyright 2018 Google LLC
@@ -78,7 +78,7 @@ function it(e){return(t,i)=>et(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
- */,{_ChildPart:ut}=me,vt=window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch?window.ShadyDOM.wrap:e=>e,pt=e=>void 0===e.strings,gt=()=>document.createComment(""),ft=(e,t,i)=>{const l=vt(e._$startNode).parentNode,o=void 0===t?e._$endNode:t._$startNode;if(void 0===i){const t=vt(l).insertBefore(gt(),o),a=vt(l).insertBefore(gt(),o);i=new ut(t,a,e,e.options)}else{const t=vt(i._$endNode).nextSibling,a=i._$parent,s=a!==e;if(s){let t;i._$reparentDisconnectables?.(e),i._$parent=e,void 0!==i._$notifyConnectionChanged&&(t=e._$isConnected)!==a._$isConnected&&i._$notifyConnectionChanged(t)}if(t!==o||s){let e=i._$startNode;for(;e!==t;){const t=vt(e).nextSibling;vt(l).insertBefore(e,o),e=t}}}return i},mt=(e,t,i=e)=>(e._$setValue(t,i),e),wt={},bt=(e,t=wt)=>e._$committedValue=t,yt=e=>{e._$notifyConnectionChanged?.(!1,!0);let t=e._$startNode;const i=vt(e._$endNode).nextSibling;for(;t!==i;){const e=vt(t).nextSibling;vt(t).remove(),t=e}};
81
+ */,{_ChildPart:ut}=me,vt=window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch?window.ShadyDOM.wrap:e=>e,pt=e=>void 0===e.strings,gt=()=>document.createComment(""),ft=(e,t,i)=>{const l=vt(e._$startNode).parentNode,o=void 0===t?e._$endNode:t._$startNode;if(void 0===i){const t=vt(l).insertBefore(gt(),o),s=vt(l).insertBefore(gt(),o);i=new ut(t,s,e,e.options)}else{const t=vt(i._$endNode).nextSibling,s=i._$parent,a=s!==e;if(a){let t;i._$reparentDisconnectables?.(e),i._$parent=e,void 0!==i._$notifyConnectionChanged&&(t=e._$isConnected)!==s._$isConnected&&i._$notifyConnectionChanged(t)}if(t!==o||a){let e=i._$startNode;for(;e!==t;){const t=vt(e).nextSibling;vt(l).insertBefore(e,o),e=t}}}return i},mt=(e,t,i=e)=>(e._$setValue(t,i),e),wt={},bt=(e,t=wt)=>e._$committedValue=t,yt=e=>{e._$notifyConnectionChanged?.(!1,!0);let t=e._$startNode;const i=vt(e._$endNode).nextSibling;for(;t!==i;){const e=vt(t).nextSibling;vt(t).remove(),t=e}};
82
82
  /**
83
83
  * @license
84
84
  * Copyright 2018 Google LLC
@@ -89,17 +89,17 @@ function it(e){return(t,i)=>et(t,i,{async get(){return await this.updateComplete
89
89
  * Copyright 2020 Google LLC
90
90
  * SPDX-License-Identifier: BSD-3-Clause
91
91
  */
92
- class extends ct{constructor(e){if(super(e),e.type!==st&&e.type!==ot&&e.type!==nt)throw new Error("The `live` directive is not allowed on child or event bindings");if(!pt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===te||t===ie)return t;const i=e.element,l=e.name;if(e.type===st){if(t===i[l])return te}else if(e.type===nt){if(!!t===i.hasAttribute(l))return te}else if(e.type===ot&&i.getAttribute(l)===String(t))return te;return bt(e),t}}),_t=(e,t)=>{const i=e._$disconnectableChildren;if(void 0===i)return!1;for(const e of i)e._$notifyDirectiveConnectionChanged?.(t,!1),_t(e,t);return!0},Ct=e=>{let t,i;do{if(void 0===(t=e._$parent))break;i=t._$disconnectableChildren,i.delete(e),e=t}while(0===i?.size)},Zt=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),kt(t)}};
92
+ class extends ct{constructor(e){if(super(e),e.type!==at&&e.type!==ot&&e.type!==nt)throw new Error("The `live` directive is not allowed on child or event bindings");if(!pt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===te||t===ie)return t;const i=e.element,l=e.name;if(e.type===at){if(t===i[l])return te}else if(e.type===nt){if(!!t===i.hasAttribute(l))return te}else if(e.type===ot&&i.getAttribute(l)===String(t))return te;return bt(e),t}}),_t=(e,t)=>{const i=e._$disconnectableChildren;if(void 0===i)return!1;for(const e of i)e._$notifyDirectiveConnectionChanged?.(t,!1),_t(e,t);return!0},Ct=e=>{let t,i;do{if(void 0===(t=e._$parent))break;i=t._$disconnectableChildren,i.delete(e),e=t}while(0===i?.size)},Zt=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),kt(t)}};
93
93
  /**
94
94
  * @license
95
95
  * Copyright 2017 Google LLC
96
96
  * SPDX-License-Identifier: BSD-3-Clause
97
- */function Mt(e){void 0!==this._$disconnectableChildren?(Ct(this),this._$parent=e,Zt(this)):this._$parent=e}function Vt(e,t=!1,i=0){const l=this._$committedValue,o=this._$disconnectableChildren;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(l))for(let e=i;e<l.length;e++)_t(l[e],!1),Ct(l[e]);else null!=l&&(_t(l,!1),Ct(l));else _t(this,e)}const kt=e=>{e.type==at&&(e._$notifyConnectionChanged??=Vt,e._$reparentDisconnectables??=Mt)};class $t extends ct{constructor(){super(...arguments),this._$disconnectableChildren=void 0}_$initialize(e,t,i){super._$initialize(e,t,i),Zt(this),this.isConnected=e._$isConnected}_$notifyDirectiveConnectionChanged(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(_t(this,e),Ct(this))}setValue(e){if(pt(this.__part))this.__part._$setValue(e,this);else{if(void 0===this.__attributeIndex)throw new Error("Expected this.__attributeIndex to be a number");const t=[...this.__part._$committedValue];t[this.__attributeIndex]=e,this.__part._$setValue(t,this,0)}}disconnected(){}reconnected(){}}
97
+ */function Mt(e){void 0!==this._$disconnectableChildren?(Ct(this),this._$parent=e,Zt(this)):this._$parent=e}function Vt(e,t=!1,i=0){const l=this._$committedValue,o=this._$disconnectableChildren;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(l))for(let e=i;e<l.length;e++)_t(l[e],!1),Ct(l[e]);else null!=l&&(_t(l,!1),Ct(l));else _t(this,e)}const kt=e=>{e.type==st&&(e._$notifyConnectionChanged??=Vt,e._$reparentDisconnectables??=Mt)};class $t extends ct{constructor(){super(...arguments),this._$disconnectableChildren=void 0}_$initialize(e,t,i){super._$initialize(e,t,i),Zt(this),this.isConnected=e._$isConnected}_$notifyDirectiveConnectionChanged(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(_t(this,e),Ct(this))}setValue(e){if(pt(this.__part))this.__part._$setValue(e,this);else{if(void 0===this.__attributeIndex)throw new Error("Expected this.__attributeIndex to be a number");const t=[...this.__part._$committedValue];t[this.__attributeIndex]=e,this.__part._$setValue(t,this,0)}}disconnected(){}reconnected(){}}
98
98
  /**
99
99
  * @license
100
100
  * Copyright 2020 Google LLC
101
101
  * SPDX-License-Identifier: BSD-3-Clause
102
- */const Ht=()=>new St;class St{}const Bt=new WeakMap;const Lt=rt(class extends $t{render(e){return ie}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)),ie}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=Bt.get(t);void 0===i&&(i=new WeakMap,Bt.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?Bt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),At=["top","right","bottom","left"],Pt=Math.min,Et=Math.max,Tt=Math.round,It=Math.floor,Ot=e=>({x:e,y:e}),Rt={left:"right",right:"left",bottom:"top",top:"bottom"},Ut={start:"end",end:"start"};function zt(e,t,i){return Et(e,Pt(t,i))}function Dt(e,t){return"function"==typeof e?e(t):e}function Nt(e){return e.split("-")[0]}function Ft(e){return e.split("-")[1]}function Wt(e){return"x"===e?"y":"x"}function qt(e){return"y"===e?"height":"width"}const jt=new Set(["top","bottom"]);function Kt(e){return jt.has(Nt(e))?"y":"x"}function Jt(e){return Wt(Kt(e))}function Gt(e,t,i){void 0===i&&(i=!1);const l=Ft(e),o=Jt(e),a=qt(o);let s="x"===o?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=li(s)),[s,li(s)]}function Xt(e){return e.replace(/start|end/g,(e=>Ut[e]))}const Yt=["left","right"],Qt=["right","left"],ei=["top","bottom"],ti=["bottom","top"];function ii(e,t,i,l){const o=Ft(e);let a=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Qt:Yt:t?Yt:Qt;case"left":case"right":return t?ei:ti;default:return[]}}(Nt(e),"start"===i,l);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Xt)))),a}function li(e){return e.replace(/left|right|bottom|top/g,(e=>Rt[e]))}function oi(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 ai(e){const{x:t,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:t,right:t+l,bottom:i+o,x:t,y:i}}function si(e,t,i){let{reference:l,floating:o}=e;const a=Kt(t),s=Jt(t),n=qt(s),r=Nt(t),c="y"===a,d=l.x+l.width/2-o.width/2,h=l.y+l.height/2-o.height/2,u=l[n]/2-o[n]/2;let v;switch(r){case"top":v={x:d,y:l.y-o.height};break;case"bottom":v={x:d,y:l.y+l.height};break;case"right":v={x:l.x+l.width,y:h};break;case"left":v={x:l.x-o.width,y:h};break;default:v={x:l.x,y:l.y}}switch(Ft(t)){case"start":v[s]-=u*(i&&c?-1:1);break;case"end":v[s]+=u*(i&&c?-1:1)}return v}async function ni(e,t){var i;void 0===t&&(t={});const{x:l,y:o,platform:a,rects:s,elements:n,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:v=0}=Dt(t,e),p=oi(v),g=n[u?"floating"===h?"reference":"floating":h],f=ai(await a.getClippingRect({element:null==(i=await(null==a.isElement?void 0:a.isElement(g)))||i?g:g.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:r})),m="floating"===h?{x:l,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==a.getOffsetParent?void 0:a.getOffsetParent(n.floating)),b=await(null==a.isElement?void 0:a.isElement(w))&&await(null==a.getScale?void 0:a.getScale(w))||{x:1,y:1},y=ai(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:m,offsetParent:w,strategy:r}):m);return{top:(f.top-y.top+p.top)/b.y,bottom:(y.bottom-f.bottom+p.bottom)/b.y,left:(f.left-y.left+p.left)/b.x,right:(y.right-f.right+p.right)/b.x}}function ri(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ci(e){return At.some((t=>e[t]>=0))}const di=new Set(["left","top"]);function hi(){return"undefined"!=typeof window}function ui(e){return gi(e)?(e.nodeName||"").toLowerCase():"#document"}function vi(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function pi(e){var t;return null==(t=(gi(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function gi(e){return!!hi()&&(e instanceof Node||e instanceof vi(e).Node)}function fi(e){return!!hi()&&(e instanceof Element||e instanceof vi(e).Element)}function mi(e){return!!hi()&&(e instanceof HTMLElement||e instanceof vi(e).HTMLElement)}function wi(e){return!(!hi()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof vi(e).ShadowRoot)}const bi=new Set(["inline","contents"]);function yi(e){const{overflow:t,overflowX:i,overflowY:l,display:o}=Li(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!bi.has(o)}const xi=new Set(["table","td","th"]);function _i(e){return xi.has(ui(e))}const Ci=[":popover-open",":modal"];function Zi(e){return Ci.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const Mi=["transform","translate","scale","rotate","perspective"],Vi=["transform","translate","scale","rotate","perspective","filter"],ki=["paint","layout","strict","content"];function $i(e){const t=Hi(),i=fi(e)?Li(e):e;return Mi.some((e=>!!i[e]&&"none"!==i[e]))||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||Vi.some((e=>(i.willChange||"").includes(e)))||ki.some((e=>(i.contain||"").includes(e)))}function Hi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Si=new Set(["html","body","#document"]);function Bi(e){return Si.has(ui(e))}function Li(e){return vi(e).getComputedStyle(e)}function Ai(e){return fi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pi(e){if("html"===ui(e))return e;const t=e.assignedSlot||e.parentNode||wi(e)&&e.host||pi(e);return wi(t)?t.host:t}function Ei(e){const t=Pi(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:mi(t)&&yi(t)?t:Ei(t)}function Ti(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=Ei(e),a=o===(null==(l=e.ownerDocument)?void 0:l.body),s=vi(o);if(a){const e=Ii(s);return t.concat(s,s.visualViewport||[],yi(o)?o:[],e&&i?Ti(e):[])}return t.concat(o,Ti(o,[],i))}function Ii(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oi(e){const t=Li(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=mi(e),a=o?e.offsetWidth:i,s=o?e.offsetHeight:l,n=Tt(i)!==a||Tt(l)!==s;return n&&(i=a,l=s),{width:i,height:l,$:n}}function Ri(e){return fi(e)?e:e.contextElement}function Ui(e){const t=Ri(e);if(!mi(t))return Ot(1);const i=t.getBoundingClientRect(),{width:l,height:o,$:a}=Oi(t);let s=(a?Tt(i.width):i.width)/l,n=(a?Tt(i.height):i.height)/o;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const zi=Ot(0);function Di(e){const t=vi(e);return Hi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:zi}function Ni(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),a=Ri(e);let s=Ot(1);t&&(l?fi(l)&&(s=Ui(l)):s=Ui(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==vi(e))&&t}(a,i,l)?Di(a):Ot(0);let r=(o.left+n.x)/s.x,c=(o.top+n.y)/s.y,d=o.width/s.x,h=o.height/s.y;if(a){const e=vi(a),t=l&&fi(l)?vi(l):l;let i=e,o=Ii(i);for(;o&&l&&t!==i;){const e=Ui(o),t=o.getBoundingClientRect(),l=Li(o),a=t.left+(o.clientLeft+parseFloat(l.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(l.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=a,c+=s,i=vi(o),o=Ii(i)}}return ai({width:d,height:h,x:r,y:c})}function Fi(e,t){const i=Ai(e).scrollLeft;return t?t.left+i:Ni(pi(e)).left+i}function Wi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Fi(e,i),y:i.top+t.scrollTop}}const qi=25;const ji=new Set(["absolute","fixed"]);function Ki(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=vi(e),l=pi(e),o=i.visualViewport;let a=l.clientWidth,s=l.clientHeight,n=0,r=0;if(o){a=o.width,s=o.height;const e=Hi();(!e||e&&"fixed"===t)&&(n=o.offsetLeft,r=o.offsetTop)}const c=Fi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,s=Math.abs(l.clientWidth-t.clientWidth-o);s<=qi&&(a-=s)}else c<=qi&&(a+=c);return{width:a,height:s,x:n,y:r}}(e,i);else if("document"===t)l=function(e){const t=pi(e),i=Ai(e),l=e.ownerDocument.body,o=Et(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),a=Et(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let s=-i.scrollLeft+Fi(e);const n=-i.scrollTop;return"rtl"===Li(l).direction&&(s+=Et(t.clientWidth,l.clientWidth)-o),{width:o,height:a,x:s,y:n}}(pi(e));else if(fi(t))l=function(e,t){const i=Ni(e,!0,"fixed"===t),l=i.top+e.clientTop,o=i.left+e.clientLeft,a=mi(e)?Ui(e):Ot(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:l*a.y}}(t,i);else{const i=Di(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ai(l)}function Ji(e,t){const i=Pi(e);return!(i===t||!fi(i)||Bi(i))&&("fixed"===Li(i).position||Ji(i,t))}function Gi(e,t,i){const l=mi(t),o=pi(t),a="fixed"===i,s=Ni(e,!0,a,t);let n={scrollLeft:0,scrollTop:0};const r=Ot(0);function c(){r.x=Fi(o)}if(l||!l&&!a)if(("body"!==ui(t)||yi(o))&&(n=Ai(t)),l){const e=Ni(t,!0,a,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else o&&c();a&&!l&&o&&c();const d=!o||l||a?Ot(0):Wi(o,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 Xi(e){return"static"===Li(e).position}function Yi(e,t){if(!mi(e)||"fixed"===Li(e).position)return null;if(t)return t(e);let i=e.offsetParent;return pi(e)===i&&(i=i.ownerDocument.body),i}function Qi(e,t){const i=vi(e);if(Zi(e))return i;if(!mi(e)){let t=Pi(e);for(;t&&!Bi(t);){if(fi(t)&&!Xi(t))return t;t=Pi(t)}return i}let l=Yi(e,t);for(;l&&_i(l)&&Xi(l);)l=Yi(l,t);return l&&Bi(l)&&Xi(l)&&!$i(l)?i:l||function(e){let t=Pi(e);for(;mi(t)&&!Bi(t);){if($i(t))return t;if(Zi(t))return null;t=Pi(t)}return null}(e)||i}const el={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:o}=e;const a="fixed"===o,s=pi(l),n=!!t&&Zi(t.floating);if(l===s||n&&a)return i;let r={scrollLeft:0,scrollTop:0},c=Ot(1);const d=Ot(0),h=mi(l);if((h||!h&&!a)&&(("body"!==ui(l)||yi(s))&&(r=Ai(l)),mi(l))){const e=Ni(l);c=Ui(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const u=!s||h||a?Ot(0):Wi(s,r);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-r.scrollLeft*c.x+d.x+u.x,y:i.y*c.y-r.scrollTop*c.y+d.y+u.y}},getDocumentElement:pi,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:o}=e;const a=[..."clippingAncestors"===i?Zi(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=Ti(e,[],!1).filter((e=>fi(e)&&"body"!==ui(e))),o=null;const a="fixed"===Li(e).position;let s=a?Pi(e):e;for(;fi(s)&&!Bi(s);){const t=Li(s),i=$i(s);i||"fixed"!==t.position||(o=null),(a?!i&&!o:!i&&"static"===t.position&&o&&ji.has(o.position)||yi(s)&&!i&&Ji(e,s))?l=l.filter((e=>e!==s)):o=t,s=Pi(s)}return t.set(e,l),l}(t,this._c):[].concat(i),l],s=a[0],n=a.reduce(((e,i)=>{const l=Ki(t,i,o);return e.top=Et(l.top,e.top),e.right=Pt(l.right,e.right),e.bottom=Pt(l.bottom,e.bottom),e.left=Et(l.left,e.left),e}),Ki(t,s,o));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:Qi,getElementRects:async function(e){const t=this.getOffsetParent||Qi,i=this.getDimensions,l=await i(e.floating);return{reference:Gi(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}=Oi(e);return{width:t,height:i}},getScale:Ui,isElement:fi,isRTL:function(e){return"rtl"===Li(e).direction}};function tl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function il(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=l,c=Ri(e),d=o||a?[...c?Ti(c):[],...Ti(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",i,{passive:!0}),a&&e.addEventListener("resize",i)}));const h=c&&n?function(e,t){let i,l=null;const o=pi(e);function a(){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),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:v}=c;if(n||t(),!u||!v)return;const p={rootMargin:-It(h)+"px "+-It(o.clientWidth-(d+u))+"px "+-It(o.clientHeight-(h+v))+"px "+-It(d)+"px",threshold:Et(0,Pt(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||tl(c,e.getBoundingClientRect())||s(),g=!1}try{l=new IntersectionObserver(f,{...p,root:o.ownerDocument})}catch(e){l=new IntersectionObserver(f,p)}l.observe(e)}(!0),a}(c,i):null;let u,v=-1,p=null;s&&(p=new ResizeObserver((e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),i()})),c&&!r&&p.observe(c),p.observe(t));let g=r?Ni(e):null;return r&&function t(){const l=Ni(e);g&&!tl(g,l)&&i();g=l,u=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",i),a&&e.removeEventListener("resize",i)})),null==h||h(),null==(e=p)||e.disconnect(),p=null,r&&cancelAnimationFrame(u)}}const ll=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:o,y:a,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:i,platform:l,elements:o}=e,a=await(null==l.isRTL?void 0:l.isRTL(o.floating)),s=Nt(i),n=Ft(i),r="y"===Kt(i),c=di.has(s)?-1:1,d=a&&r?-1:1,h=Dt(t,e);let{mainAxis:u,crossAxis:v,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&&(v="end"===n?-1*p:p),r?{x:v*d,y:u*c}:{x:u*c,y:v*d}}(t,e);return s===(null==(i=n.offset)?void 0:i.placement)&&null!=(l=n.arrow)&&l.alignmentOffset?{}:{x:o+r.x,y:a+r.y,data:{...r,placement:s}}}}},ol=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...r}=Dt(e,t),c={x:i,y:l},d=await ni(t,r),h=Kt(Nt(o)),u=Wt(h);let v=c[u],p=c[h];if(a){const e="y"===u?"bottom":"right";v=zt(v+d["y"===u?"top":"left"],v,v-d[e])}if(s){const e="y"===h?"bottom":"right";p=zt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[u]:v,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[u]:a,[h]:s}}}}}},al=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:o,middlewareData:a,rects:s,initialPlacement:n,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=Dt(e,t);if(null!=(i=a.arrow)&&i.alignmentOffset)return{};const m=Nt(o),w=Kt(n),b=Nt(n)===n,y=await(null==r.isRTL?void 0:r.isRTL(c.floating)),x=u||(b||!g?[li(n)]:function(e){const t=li(e);return[Xt(e),t,Xt(t)]}(n)),_="none"!==p;!u&&_&&x.push(...ii(n,g,p,y));const C=[n,...x],Z=await ni(t,f),M=[];let V=(null==(l=a.flip)?void 0:l.overflows)||[];if(d&&M.push(Z[m]),h){const e=Gt(o,s,y);M.push(Z[e[0]],Z[e[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every((e=>e<=0))){var k,$;const e=((null==(k=a.flip)?void 0:k.index)||0)+1,t=C[e];if(t){if(!("alignment"===h&&w!==Kt(t))||V.every((e=>Kt(e.placement)!==w||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==($=V.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:$.placement;if(!i)switch(v){case"bestFit":{var H;const e=null==(H=V.filter((e=>{if(_){const t=Kt(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:H[0];e&&(i=e);break}case"initialPlacement":i=n}if(o!==i)return{reset:{placement:i}}}return{}}}},sl=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:o,rects:a,platform:s,elements:n}=t,{apply:r=()=>{},...c}=Dt(e,t),d=await ni(t,c),h=Nt(o),u=Ft(o),v="y"===Kt(o),{width:p,height:g}=a.floating;let f,m;"top"===h||"bottom"===h?(f=h,m=u===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=h,f="end"===u?"top":"bottom");const w=g-d.top-d.bottom,b=p-d.left-d.right,y=Pt(g-d[f],w),x=Pt(p-d[m],b),_=!t.middlewareData.shift;let C=y,Z=x;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(Z=b),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(C=w),_&&!u){const e=Et(d.left,0),t=Et(d.right,0),i=Et(d.top,0),l=Et(d.bottom,0);v?Z=p-2*(0!==e||0!==t?e+t:Et(d.left,d.right)):C=g-2*(0!==i||0!==l?i+l:Et(d.top,d.bottom))}await r({...t,availableWidth:Z,availableHeight:C});const M=await s.getDimensions(n.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},nl=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:l="referenceHidden",...o}=Dt(e,t);switch(l){case"referenceHidden":{const e=ri(await ni(t,{...o,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ci(e)}}}case"escaped":{const e=ri(await ni(t,{...o,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:ci(e)}}}default:return{}}}}},rl=(e,t,i)=>{const l=new Map,o={platform:el,...i},a={...o.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:a=[],platform:s}=i,n=a.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=si(c,l,r),u=l,v={},p=0;for(let i=0;i<n.length;i++){const{name:a,fn:g}=n[i],{x:f,y:m,data:w,reset:b}=await g({x:d,y:h,initialPlacement:l,placement:u,strategy:o,middlewareData:v,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=m?m:h,v={...v,[a]:{...v[a],...w}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(u=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:d,y:h}=si(c,u,r))),i=-1)}return{x:d,y:h,placement:u,strategy:o,middlewareData:v}})(e,t,{...o,platform:a})};var cl=Me`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,dl=Me`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,hl=Me`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,ul=Me`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-2);line-height:var(--sgds-line-height-24);outline:none;padding:0}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const vl=(e="value")=>(t,i)=>{const l=t.constructor,o=l.prototype.attributeChangedCallback;l.prototype.attributeChangedCallback=function(t,a,s){var n;const r=l.getPropertyOptions(e);if(t===("string"==typeof r.attribute?r.attribute:e).toLowerCase()){const t=r.converter||Ue,l=("function"==typeof t?t:null!==(n=null==t?void 0:t.fromAttribute)&&void 0!==n?n:Ue.fromAttribute)(s,r.type);this[e]!==l&&(this[i]=l)}o.call(this,t,a,s)}};function pl(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class gl{constructor(e,t){(this.host=e).addController(this),this._internals=this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",(e=>this.handleInvalid(e)))}hostDisconnected(){this.host.removeEventListener("invalid",(e=>this.handleInvalid(e)))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,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 fl=t=>{class i extends t{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new gl(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1)}_mixinValidate(e){this.inputValidationController.validateInput(e)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(e,t,i){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([it("sgds-input")],i.prototype,"sgdsInput",void 0),e([it("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var ml=Me`: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-2);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:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='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' width='24' height='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:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;class wl extends We{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}))})))}}wl.styles=[ml],wl.dependencies={},e([Ye({type:Boolean,reflect:!0})],wl.prototype,"ssr",void 0);class bl extends wl{constructor(){super(...arguments),this.myDropdown=Ht(),this.dropdownMenuId=pl("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=Ht(),this._handleKeyboardMenuEvent=e=>{if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}},this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu())}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=il(this.myDropdown.value,this.menuRef.value,(()=>this.updateFloatingPosition()))))}async hideMenu(){this.menuIsOpen&&(this.emit("sgds-hide"),this.menuIsOpen=!1,setTimeout((()=>this.emit("sgds-after-hide")),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}mergeMiddleware(e,t){const 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),o=e.map((e=>{const o=i(e),a=l.indexOf(o);return-1!==a?t[a]:e})).concat(t.filter((t=>!e.some((e=>i(e)===i(t))))));return o}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=[ll(8),this.noFlip?void 0:al(),ol()].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:o,y:a,strategy:s,placement:n}=await rl(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:s,left:`${o}px`,top:`${a}px`})}}e([Ye({type:Boolean,state:!0})],bl.prototype,"noFlip",void 0),e([Ye({type:Boolean,reflect:!0,state:!0})],bl.prototype,"menuAlignRight",void 0),e([Ye({type:String,reflect:!0,state:!0})],bl.prototype,"drop",void 0),e([Ye({type:Object})],bl.prototype,"floatingOpts",void 0),e([Ye({type:Boolean,reflect:!0})],bl.prototype,"menuIsOpen",void 0),e([Ye({type:Boolean,reflect:!0})],bl.prototype,"disabled",void 0),e([Ye({type:Boolean,reflect:!0})],bl.prototype,"readonly",void 0);class yl extends bl{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;e.target.disabled||(this.emit("sgds-select"),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach((e=>{var t;const 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 xl,_l;yl.styles=bl.styles,e([(xl="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(xl)??null;if(null===i&&_l&&!e.hasUpdated){const e="object"==typeof t?t.name:t;tt("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${xl}' 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(_l){const{get:o,set:a}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return et(e,t,{get(){let e=o.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&a.call(this,e)),e}})}return et(e,t,{get(){return l(this)}})})],yl.prototype,"menu",void 0),e([Qe()],yl.prototype,"nextDropdownItemNo",void 0),e([Qe()],yl.prototype,"prevDropdownItemNo",void 0),e([Ye({type:Boolean,reflect:!0})],yl.prototype,"hidden",void 0);class Cl extends(fl(yl)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=pl("input"),this._labelId=pl("label"),this.floatingOpts={middleware:[sl({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",(async()=>{this.invalid=!this.menuIsOpen&&!this._mixinReportValidity()}))}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?Q` <div class="invalid-feedback-container">
102
+ */const Ht=()=>new St;class St{}const Bt=new WeakMap;const Lt=rt(class extends $t{render(e){return ie}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)),ie}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=Bt.get(t);void 0===i&&(i=new WeakMap,Bt.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?Bt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),At=["top","right","bottom","left"],Pt=Math.min,Et=Math.max,Tt=Math.round,It=Math.floor,Ot=e=>({x:e,y:e}),Rt={left:"right",right:"left",bottom:"top",top:"bottom"},Ut={start:"end",end:"start"};function zt(e,t,i){return Et(e,Pt(t,i))}function Dt(e,t){return"function"==typeof e?e(t):e}function Nt(e){return e.split("-")[0]}function Ft(e){return e.split("-")[1]}function Wt(e){return"x"===e?"y":"x"}function qt(e){return"y"===e?"height":"width"}const jt=new Set(["top","bottom"]);function Kt(e){return jt.has(Nt(e))?"y":"x"}function Jt(e){return Wt(Kt(e))}function Gt(e,t,i){void 0===i&&(i=!1);const l=Ft(e),o=Jt(e),s=qt(o);let a="x"===o?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=li(a)),[a,li(a)]}function Xt(e){return e.replace(/start|end/g,(e=>Ut[e]))}const Yt=["left","right"],Qt=["right","left"],ei=["top","bottom"],ti=["bottom","top"];function ii(e,t,i,l){const o=Ft(e);let s=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Qt:Yt:t?Yt:Qt;case"left":case"right":return t?ei:ti;default:return[]}}(Nt(e),"start"===i,l);return o&&(s=s.map((e=>e+"-"+o)),t&&(s=s.concat(s.map(Xt)))),s}function li(e){return e.replace(/left|right|bottom|top/g,(e=>Rt[e]))}function oi(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 si(e){const{x:t,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:t,right:t+l,bottom:i+o,x:t,y:i}}function ai(e,t,i){let{reference:l,floating:o}=e;const s=Kt(t),a=Jt(t),n=qt(a),r=Nt(t),c="y"===s,d=l.x+l.width/2-o.width/2,h=l.y+l.height/2-o.height/2,u=l[n]/2-o[n]/2;let v;switch(r){case"top":v={x:d,y:l.y-o.height};break;case"bottom":v={x:d,y:l.y+l.height};break;case"right":v={x:l.x+l.width,y:h};break;case"left":v={x:l.x-o.width,y:h};break;default:v={x:l.x,y:l.y}}switch(Ft(t)){case"start":v[a]-=u*(i&&c?-1:1);break;case"end":v[a]+=u*(i&&c?-1:1)}return v}async function ni(e,t){var i;void 0===t&&(t={});const{x:l,y:o,platform:s,rects:a,elements:n,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:v=0}=Dt(t,e),p=oi(v),g=n[u?"floating"===h?"reference":"floating":h],f=si(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(g)))||i?g:g.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:r})),m="floating"===h?{x:l,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n.floating)),b=await(null==s.isElement?void 0:s.isElement(w))&&await(null==s.getScale?void 0:s.getScale(w))||{x:1,y:1},y=si(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:m,offsetParent:w,strategy:r}):m);return{top:(f.top-y.top+p.top)/b.y,bottom:(y.bottom-f.bottom+p.bottom)/b.y,left:(f.left-y.left+p.left)/b.x,right:(y.right-f.right+p.right)/b.x}}function ri(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ci(e){return At.some((t=>e[t]>=0))}const di=new Set(["left","top"]);function hi(){return"undefined"!=typeof window}function ui(e){return gi(e)?(e.nodeName||"").toLowerCase():"#document"}function vi(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function pi(e){var t;return null==(t=(gi(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function gi(e){return!!hi()&&(e instanceof Node||e instanceof vi(e).Node)}function fi(e){return!!hi()&&(e instanceof Element||e instanceof vi(e).Element)}function mi(e){return!!hi()&&(e instanceof HTMLElement||e instanceof vi(e).HTMLElement)}function wi(e){return!(!hi()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof vi(e).ShadowRoot)}const bi=new Set(["inline","contents"]);function yi(e){const{overflow:t,overflowX:i,overflowY:l,display:o}=Li(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!bi.has(o)}const xi=new Set(["table","td","th"]);function _i(e){return xi.has(ui(e))}const Ci=[":popover-open",":modal"];function Zi(e){return Ci.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const Mi=["transform","translate","scale","rotate","perspective"],Vi=["transform","translate","scale","rotate","perspective","filter"],ki=["paint","layout","strict","content"];function $i(e){const t=Hi(),i=fi(e)?Li(e):e;return Mi.some((e=>!!i[e]&&"none"!==i[e]))||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||Vi.some((e=>(i.willChange||"").includes(e)))||ki.some((e=>(i.contain||"").includes(e)))}function Hi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Si=new Set(["html","body","#document"]);function Bi(e){return Si.has(ui(e))}function Li(e){return vi(e).getComputedStyle(e)}function Ai(e){return fi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pi(e){if("html"===ui(e))return e;const t=e.assignedSlot||e.parentNode||wi(e)&&e.host||pi(e);return wi(t)?t.host:t}function Ei(e){const t=Pi(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:mi(t)&&yi(t)?t:Ei(t)}function Ti(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=Ei(e),s=o===(null==(l=e.ownerDocument)?void 0:l.body),a=vi(o);if(s){const e=Ii(a);return t.concat(a,a.visualViewport||[],yi(o)?o:[],e&&i?Ti(e):[])}return t.concat(o,Ti(o,[],i))}function Ii(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oi(e){const t=Li(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=mi(e),s=o?e.offsetWidth:i,a=o?e.offsetHeight:l,n=Tt(i)!==s||Tt(l)!==a;return n&&(i=s,l=a),{width:i,height:l,$:n}}function Ri(e){return fi(e)?e:e.contextElement}function Ui(e){const t=Ri(e);if(!mi(t))return Ot(1);const i=t.getBoundingClientRect(),{width:l,height:o,$:s}=Oi(t);let a=(s?Tt(i.width):i.width)/l,n=(s?Tt(i.height):i.height)/o;return a&&Number.isFinite(a)||(a=1),n&&Number.isFinite(n)||(n=1),{x:a,y:n}}const zi=Ot(0);function Di(e){const t=vi(e);return Hi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:zi}function Ni(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),s=Ri(e);let a=Ot(1);t&&(l?fi(l)&&(a=Ui(l)):a=Ui(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==vi(e))&&t}(s,i,l)?Di(s):Ot(0);let r=(o.left+n.x)/a.x,c=(o.top+n.y)/a.y,d=o.width/a.x,h=o.height/a.y;if(s){const e=vi(s),t=l&&fi(l)?vi(l):l;let i=e,o=Ii(i);for(;o&&l&&t!==i;){const e=Ui(o),t=o.getBoundingClientRect(),l=Li(o),s=t.left+(o.clientLeft+parseFloat(l.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(l.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=s,c+=a,i=vi(o),o=Ii(i)}}return si({width:d,height:h,x:r,y:c})}function Fi(e,t){const i=Ai(e).scrollLeft;return t?t.left+i:Ni(pi(e)).left+i}function Wi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Fi(e,i),y:i.top+t.scrollTop}}const qi=25;const ji=new Set(["absolute","fixed"]);function Ki(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=vi(e),l=pi(e),o=i.visualViewport;let s=l.clientWidth,a=l.clientHeight,n=0,r=0;if(o){s=o.width,a=o.height;const e=Hi();(!e||e&&"fixed"===t)&&(n=o.offsetLeft,r=o.offsetTop)}const c=Fi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,a=Math.abs(l.clientWidth-t.clientWidth-o);a<=qi&&(s-=a)}else c<=qi&&(s+=c);return{width:s,height:a,x:n,y:r}}(e,i);else if("document"===t)l=function(e){const t=pi(e),i=Ai(e),l=e.ownerDocument.body,o=Et(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=Et(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let a=-i.scrollLeft+Fi(e);const n=-i.scrollTop;return"rtl"===Li(l).direction&&(a+=Et(t.clientWidth,l.clientWidth)-o),{width:o,height:s,x:a,y:n}}(pi(e));else if(fi(t))l=function(e,t){const i=Ni(e,!0,"fixed"===t),l=i.top+e.clientTop,o=i.left+e.clientLeft,s=mi(e)?Ui(e):Ot(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:o*s.x,y:l*s.y}}(t,i);else{const i=Di(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return si(l)}function Ji(e,t){const i=Pi(e);return!(i===t||!fi(i)||Bi(i))&&("fixed"===Li(i).position||Ji(i,t))}function Gi(e,t,i){const l=mi(t),o=pi(t),s="fixed"===i,a=Ni(e,!0,s,t);let n={scrollLeft:0,scrollTop:0};const r=Ot(0);function c(){r.x=Fi(o)}if(l||!l&&!s)if(("body"!==ui(t)||yi(o))&&(n=Ai(t)),l){const e=Ni(t,!0,s,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else o&&c();s&&!l&&o&&c();const d=!o||l||s?Ot(0):Wi(o,n);return{x:a.left+n.scrollLeft-r.x-d.x,y:a.top+n.scrollTop-r.y-d.y,width:a.width,height:a.height}}function Xi(e){return"static"===Li(e).position}function Yi(e,t){if(!mi(e)||"fixed"===Li(e).position)return null;if(t)return t(e);let i=e.offsetParent;return pi(e)===i&&(i=i.ownerDocument.body),i}function Qi(e,t){const i=vi(e);if(Zi(e))return i;if(!mi(e)){let t=Pi(e);for(;t&&!Bi(t);){if(fi(t)&&!Xi(t))return t;t=Pi(t)}return i}let l=Yi(e,t);for(;l&&_i(l)&&Xi(l);)l=Yi(l,t);return l&&Bi(l)&&Xi(l)&&!$i(l)?i:l||function(e){let t=Pi(e);for(;mi(t)&&!Bi(t);){if($i(t))return t;if(Zi(t))return null;t=Pi(t)}return null}(e)||i}const el={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:o}=e;const s="fixed"===o,a=pi(l),n=!!t&&Zi(t.floating);if(l===a||n&&s)return i;let r={scrollLeft:0,scrollTop:0},c=Ot(1);const d=Ot(0),h=mi(l);if((h||!h&&!s)&&(("body"!==ui(l)||yi(a))&&(r=Ai(l)),mi(l))){const e=Ni(l);c=Ui(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const u=!a||h||s?Ot(0):Wi(a,r);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-r.scrollLeft*c.x+d.x+u.x,y:i.y*c.y-r.scrollTop*c.y+d.y+u.y}},getDocumentElement:pi,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:o}=e;const s=[..."clippingAncestors"===i?Zi(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=Ti(e,[],!1).filter((e=>fi(e)&&"body"!==ui(e))),o=null;const s="fixed"===Li(e).position;let a=s?Pi(e):e;for(;fi(a)&&!Bi(a);){const t=Li(a),i=$i(a);i||"fixed"!==t.position||(o=null),(s?!i&&!o:!i&&"static"===t.position&&o&&ji.has(o.position)||yi(a)&&!i&&Ji(e,a))?l=l.filter((e=>e!==a)):o=t,a=Pi(a)}return t.set(e,l),l}(t,this._c):[].concat(i),l],a=s[0],n=s.reduce(((e,i)=>{const l=Ki(t,i,o);return e.top=Et(l.top,e.top),e.right=Pt(l.right,e.right),e.bottom=Pt(l.bottom,e.bottom),e.left=Et(l.left,e.left),e}),Ki(t,a,o));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:Qi,getElementRects:async function(e){const t=this.getOffsetParent||Qi,i=this.getDimensions,l=await i(e.floating);return{reference:Gi(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}=Oi(e);return{width:t,height:i}},getScale:Ui,isElement:fi,isRTL:function(e){return"rtl"===Li(e).direction}};function tl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function il(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=l,c=Ri(e),d=o||s?[...c?Ti(c):[],...Ti(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",i,{passive:!0}),s&&e.addEventListener("resize",i)}));const h=c&&n?function(e,t){let i,l=null;const o=pi(e);function s(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function a(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),s();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:v}=c;if(n||t(),!u||!v)return;const p={rootMargin:-It(h)+"px "+-It(o.clientWidth-(d+u))+"px "+-It(o.clientHeight-(h+v))+"px "+-It(d)+"px",threshold:Et(0,Pt(1,r))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==r){if(!g)return a();l?a(!1,l):i=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==l||tl(c,e.getBoundingClientRect())||a(),g=!1}try{l=new IntersectionObserver(f,{...p,root:o.ownerDocument})}catch(e){l=new IntersectionObserver(f,p)}l.observe(e)}(!0),s}(c,i):null;let u,v=-1,p=null;a&&(p=new ResizeObserver((e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),i()})),c&&!r&&p.observe(c),p.observe(t));let g=r?Ni(e):null;return r&&function t(){const l=Ni(e);g&&!tl(g,l)&&i();g=l,u=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",i),s&&e.removeEventListener("resize",i)})),null==h||h(),null==(e=p)||e.disconnect(),p=null,r&&cancelAnimationFrame(u)}}const ll=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:o,y:s,placement:a,middlewareData:n}=t,r=await async function(e,t){const{placement:i,platform:l,elements:o}=e,s=await(null==l.isRTL?void 0:l.isRTL(o.floating)),a=Nt(i),n=Ft(i),r="y"===Kt(i),c=di.has(a)?-1:1,d=s&&r?-1:1,h=Dt(t,e);let{mainAxis:u,crossAxis:v,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&&(v="end"===n?-1*p:p),r?{x:v*d,y:u*c}:{x:u*c,y:v*d}}(t,e);return a===(null==(i=n.offset)?void 0:i.placement)&&null!=(l=n.arrow)&&l.alignmentOffset?{}:{x:o+r.x,y:s+r.y,data:{...r,placement:a}}}}},ol=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...r}=Dt(e,t),c={x:i,y:l},d=await ni(t,r),h=Kt(Nt(o)),u=Wt(h);let v=c[u],p=c[h];if(s){const e="y"===u?"bottom":"right";v=zt(v+d["y"===u?"top":"left"],v,v-d[e])}if(a){const e="y"===h?"bottom":"right";p=zt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[u]:v,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[u]:s,[h]:a}}}}}},sl=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:o,middlewareData:s,rects:a,initialPlacement:n,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=Dt(e,t);if(null!=(i=s.arrow)&&i.alignmentOffset)return{};const m=Nt(o),w=Kt(n),b=Nt(n)===n,y=await(null==r.isRTL?void 0:r.isRTL(c.floating)),x=u||(b||!g?[li(n)]:function(e){const t=li(e);return[Xt(e),t,Xt(t)]}(n)),_="none"!==p;!u&&_&&x.push(...ii(n,g,p,y));const C=[n,...x],Z=await ni(t,f),M=[];let V=(null==(l=s.flip)?void 0:l.overflows)||[];if(d&&M.push(Z[m]),h){const e=Gt(o,a,y);M.push(Z[e[0]],Z[e[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every((e=>e<=0))){var k,$;const e=((null==(k=s.flip)?void 0:k.index)||0)+1,t=C[e];if(t){if(!("alignment"===h&&w!==Kt(t))||V.every((e=>Kt(e.placement)!==w||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==($=V.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:$.placement;if(!i)switch(v){case"bestFit":{var H;const e=null==(H=V.filter((e=>{if(_){const t=Kt(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:H[0];e&&(i=e);break}case"initialPlacement":i=n}if(o!==i)return{reset:{placement:i}}}return{}}}},al=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:o,rects:s,platform:a,elements:n}=t,{apply:r=()=>{},...c}=Dt(e,t),d=await ni(t,c),h=Nt(o),u=Ft(o),v="y"===Kt(o),{width:p,height:g}=s.floating;let f,m;"top"===h||"bottom"===h?(f=h,m=u===(await(null==a.isRTL?void 0:a.isRTL(n.floating))?"start":"end")?"left":"right"):(m=h,f="end"===u?"top":"bottom");const w=g-d.top-d.bottom,b=p-d.left-d.right,y=Pt(g-d[f],w),x=Pt(p-d[m],b),_=!t.middlewareData.shift;let C=y,Z=x;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(Z=b),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(C=w),_&&!u){const e=Et(d.left,0),t=Et(d.right,0),i=Et(d.top,0),l=Et(d.bottom,0);v?Z=p-2*(0!==e||0!==t?e+t:Et(d.left,d.right)):C=g-2*(0!==i||0!==l?i+l:Et(d.top,d.bottom))}await r({...t,availableWidth:Z,availableHeight:C});const M=await a.getDimensions(n.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},nl=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:l="referenceHidden",...o}=Dt(e,t);switch(l){case"referenceHidden":{const e=ri(await ni(t,{...o,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ci(e)}}}case"escaped":{const e=ri(await ni(t,{...o,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:ci(e)}}}default:return{}}}}},rl=(e,t,i)=>{const l=new Map,o={platform:el,...i},s={...o.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:s=[],platform:a}=i,n=s.filter(Boolean),r=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=ai(c,l,r),u=l,v={},p=0;for(let i=0;i<n.length;i++){const{name:s,fn:g}=n[i],{x:f,y:m,data:w,reset:b}=await g({x:d,y:h,initialPlacement:l,placement:u,strategy:o,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=m?m:h,v={...v,[s]:{...v[s],...w}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(u=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:d,y:h}=ai(c,u,r))),i=-1)}return{x:d,y:h,placement:u,strategy:o,middlewareData:v}})(e,t,{...o,platform:s})};var cl=Me`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,dl=Me`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,hl=Me`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,ul=Me`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-2);line-height:var(--sgds-line-height-24);outline:none;padding:0}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const vl=(e="value")=>(t,i)=>{const l=t.constructor,o=l.prototype.attributeChangedCallback;l.prototype.attributeChangedCallback=function(t,s,a){var n;const r=l.getPropertyOptions(e);if(t===("string"==typeof r.attribute?r.attribute:e).toLowerCase()){const t=r.converter||Ue,l=("function"==typeof t?t:null!==(n=null==t?void 0:t.fromAttribute)&&void 0!==n?n:Ue.fromAttribute)(a,r.type);this[e]!==l&&(this[i]=l)}o.call(this,t,s,a)}};function pl(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class gl{constructor(e,t){(this.host=e).addController(this),this._internals=this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",(e=>this.handleInvalid(e)))}hostDisconnected(){this.host.removeEventListener("invalid",(e=>this.handleInvalid(e)))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,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 fl=t=>{class i extends t{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new gl(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1)}_mixinValidate(e){this.inputValidationController.validateInput(e)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(e,t,i){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([it("sgds-input")],i.prototype,"sgdsInput",void 0),e([it("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var ml=Me`: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-2);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:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='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' width='24' height='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:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;class wl extends We{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}))})))}}wl.styles=[ml],wl.dependencies={},e([Ye({type:Boolean,reflect:!0})],wl.prototype,"ssr",void 0);class bl extends wl{constructor(){super(...arguments),this.myDropdown=Ht(),this.dropdownMenuId=pl("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=Ht(),this._handleKeyboardMenuEvent=e=>{if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}},this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu())}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=il(this.myDropdown.value,this.menuRef.value,(()=>this.updateFloatingPosition()))))}async hideMenu(){this.menuIsOpen&&(this.emit("sgds-hide"),this.menuIsOpen=!1,setTimeout((()=>this.emit("sgds-after-hide")),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}mergeMiddleware(e,t){const 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),o=e.map((e=>{const o=i(e),s=l.indexOf(o);return-1!==s?t[s]:e})).concat(t.filter((t=>!e.some((e=>i(e)===i(t))))));return o}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=[ll(8),this.noFlip?void 0:sl(),ol()].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:o,y:s,strategy:a,placement:n}=await rl(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:a,left:`${o}px`,top:`${s}px`})}}e([Ye({type:Boolean,state:!0})],bl.prototype,"noFlip",void 0),e([Ye({type:Boolean,reflect:!0,state:!0})],bl.prototype,"menuAlignRight",void 0),e([Ye({type:String,reflect:!0,state:!0})],bl.prototype,"drop",void 0),e([Ye({type:Object})],bl.prototype,"floatingOpts",void 0),e([Ye({type:Boolean,reflect:!0})],bl.prototype,"menuIsOpen",void 0),e([Ye({type:Boolean,reflect:!0})],bl.prototype,"disabled",void 0),e([Ye({type:Boolean,reflect:!0})],bl.prototype,"readonly",void 0);class yl extends bl{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;e.target.disabled||(this.emit("sgds-select"),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach((e=>{var t;const 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 xl,_l;yl.styles=bl.styles,e([(xl="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(xl)??null;if(null===i&&_l&&!e.hasUpdated){const e="object"==typeof t?t.name:t;tt("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${xl}' 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(_l){const{get:o,set:s}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return et(e,t,{get(){let e=o.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&s.call(this,e)),e}})}return et(e,t,{get(){return l(this)}})})],yl.prototype,"menu",void 0),e([Qe()],yl.prototype,"nextDropdownItemNo",void 0),e([Qe()],yl.prototype,"prevDropdownItemNo",void 0),e([Ye({type:Boolean,reflect:!0})],yl.prototype,"hidden",void 0);class Cl extends(fl(yl)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=pl("input"),this._labelId=pl("label"),this.floatingOpts={middleware:[al({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",(async()=>{this.invalid=!this.menuIsOpen&&!this._mixinReportValidity()}))}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?Q` <div class="invalid-feedback-container">
103
103
  <slot name="invalidIcon">
104
104
  <sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
105
105
  </slot>
@@ -113,16 +113,16 @@ class extends ct{constructor(e){if(super(e),e.type!==st&&e.type!==ot&&e.type!==n
113
113
  class=${dt({"form-label":!0,required:this.required})}
114
114
  >${this.label}</label
115
115
  >
116
- `;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}}))}}function Zl(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,l)=>{const{update:o}=t;if(e in t){const a=e;t.update=function(e){if(e.has(a)){const t=e.get(a),o=this[a];t!==o&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[l](t,o))}o.call(this,e)}}}}Cl.styles=[...yl.styles,cl,hl,dl,ul],e([Ye({reflect:!0})],Cl.prototype,"label",void 0),e([Ye({reflect:!0})],Cl.prototype,"hintText",void 0),e([Ye({reflect:!0})],Cl.prototype,"name",void 0),e([Ye({type:String,reflect:!0})],Cl.prototype,"placeholder",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"autofocus",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"disabled",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"required",void 0),e([Ye({type:String,reflect:!0})],Cl.prototype,"value",void 0),e([Qe()],Cl.prototype,"displayValue",void 0),e([vl()],Cl.prototype,"defaultValue",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"hasFeedback",void 0),e([Ye({type:String,reflect:!0})],Cl.prototype,"invalidFeedback",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"invalid",void 0),e([Ye({type:Array})],Cl.prototype,"menuList",void 0),e([Qe()],Cl.prototype,"selectedItems",void 0),e([Qe()],Cl.prototype,"filteredList",void 0),e([it("input.form-control")],Cl.prototype,"_input",void 0);var Ml=Me`: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-1);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-1);font-weight:var(--sgds-font-weight-regular)}`,Vl=Me`: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-1);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 kl extends wl{constructor(){super(...arguments),this._myTooltip=Ht(),this._tooltipBubble=Ht(),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:o}=await rl(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[ll(8),al(),ol(),nl()]});this._tooltipBubble.value.setAttribute("data-placement",i),Object.assign(this._tooltipBubble.value.style,{position:l,left:`${e}px`,top:`${t}px`});const{referenceHidden:a,escaped:s}=o.hide||{};this._tooltipBubble.value.style.visibility=a||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=il(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 Q`
116
+ `;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}}))}}function Zl(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,l)=>{const{update:o}=t;if(e in t){const s=e;t.update=function(e){if(e.has(s)){const t=e.get(s),o=this[s];t!==o&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[l](t,o))}o.call(this,e)}}}}Cl.styles=[...yl.styles,cl,hl,dl,ul],e([Ye({reflect:!0})],Cl.prototype,"label",void 0),e([Ye({reflect:!0})],Cl.prototype,"hintText",void 0),e([Ye({reflect:!0})],Cl.prototype,"name",void 0),e([Ye({type:String,reflect:!0})],Cl.prototype,"placeholder",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"autofocus",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"disabled",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"required",void 0),e([Ye({type:String,reflect:!0})],Cl.prototype,"value",void 0),e([Qe()],Cl.prototype,"displayValue",void 0),e([vl()],Cl.prototype,"defaultValue",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"hasFeedback",void 0),e([Ye({type:String,reflect:!0})],Cl.prototype,"invalidFeedback",void 0),e([Ye({type:Boolean,reflect:!0})],Cl.prototype,"invalid",void 0),e([Ye({type:Array})],Cl.prototype,"menuList",void 0),e([Qe()],Cl.prototype,"selectedItems",void 0),e([Qe()],Cl.prototype,"filteredList",void 0),e([it("input.form-control")],Cl.prototype,"_input",void 0);var Ml=Me`: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-1);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-1);font-weight:var(--sgds-font-weight-regular)}`,Vl=Me`: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-1);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 kl extends wl{constructor(){super(...arguments),this._myTooltip=Ht(),this._tooltipBubble=Ht(),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:o}=await rl(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[ll(8),sl(),ol(),nl()]});this._tooltipBubble.value.setAttribute("data-placement",i),Object.assign(this._tooltipBubble.value.style,{position:l,left:`${e}px`,top:`${t}px`});const{referenceHidden:s,escaped:a}=o.hide||{};this._tooltipBubble.value.style.visibility=s||a?"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=il(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 Q`
117
117
  <div ${Lt(this._myTooltip)} class="tooltip-placeholder">
118
118
  <slot @slotchange=${()=>this._handleSlotChange()}></slot>
119
119
  ${this.open?Q`<div ${Lt(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
120
120
  </div>
121
- `}}kl.styles=[...wl.styles,Vl],e([Ye({type:String})],kl.prototype,"content",void 0),e([Ye({type:String})],kl.prototype,"placement",void 0),e([Ye({type:String})],kl.prototype,"trigger",void 0),e([Qe()],kl.prototype,"open",void 0),e([lt()],kl.prototype,"_tooltipTargetElements",void 0);var $l=Me`:host{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm);display:inline-flex}:host([size=sm]) .btn-close{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}:host([variant=light]) .btn-close{color:var(--sgds-color-fixed-light)}:host([variant=dark]) .btn-close{color:var(--sgds-color-fixed-dark)}.btn-close{align-items:center;background-color:var(--sgds-bg-transparent);border:0;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-close-btn-border-radius);cursor:pointer;display:flex;height:var(--sgds-dimension-32);justify-content:center;padding:0;position:relative;width:var(--sgds-dimension-32)}.btn-close:hover{background-color:var(--sgds-bg-translucent)}.btn-close:focus,.btn-close:focus-visible{background-color:var(--sgds-bg-translucent)}.btn-close:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.btn-close-sm{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.btn-close.btn-close-sm{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}`;function Hl(e,t){customElements.get(e)||customElements.define(e,t)}function Sl(e){return!!function(e){return!!customElements.get(e)}(e)||(console.error(`Custom element of name : ${e} is not registered. Remember to import the component file for custom element registration`),!1)}class Bl extends wl{constructor(){super(...arguments),this.ariaLabel="Close button",this.size="md",this.variant="default",this._clickHandler=()=>{}}_handleClick(){this.removeEventListener("click",this._clickHandler),this.addEventListener("click",this._clickHandler)}firstUpdated(e){super.firstUpdated(e),Sl("sgds-icon")}render(){return Q`
122
- <button class="btn-close" aria-label=${ht(this.ariaLabel)} @click=${this._handleClick}>
121
+ `}}kl.styles=[...wl.styles,Vl],e([Ye({type:String})],kl.prototype,"content",void 0),e([Ye({type:String})],kl.prototype,"placement",void 0),e([Ye({type:String})],kl.prototype,"trigger",void 0),e([Qe()],kl.prototype,"open",void 0),e([lt()],kl.prototype,"_tooltipTargetElements",void 0);var $l=Me`:host{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm);display:inline-flex}:host([size=sm]) .btn-close{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}:host([tone=fixed-light]) .btn-close{color:var(--sgds-color-fixed-light)}:host([tone=fixed-dark]) .btn-close{color:var(--sgds-color-fixed-dark)}.btn-close{align-items:center;background-color:var(--sgds-bg-transparent);border:0;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-close-btn-border-radius);cursor:pointer;display:flex;height:var(--sgds-dimension-32);justify-content:center;padding:0;position:relative;width:var(--sgds-dimension-32)}.btn-close:focus,.btn-close:focus-visible,.btn-close:hover{background-color:var(--sgds-bg-translucent)}:host([tone=fixed-light]) .btn-close:focus,:host([tone=fixed-light]) .btn-close:focus-visible,:host([tone=fixed-light]) .btn-close:hover{background-color:var(--sgds-bg-translucent-fixed-light)}:host([tone=fixed-dark]) .btn-close:focus,:host([tone=fixed-dark]) .btn-close:focus-visible,:host([tone=fixed-dark]) .btn-close:hover{background-color:var(--sgds-bg-translucent-fixed-dark)}.btn-close:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.btn-close-sm{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.btn-close.btn-close-sm{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}`;function Hl(e,t){customElements.get(e)||customElements.define(e,t)}function Sl(e){return!!function(e){return!!customElements.get(e)}(e)||(console.error(`Custom element of name : ${e} is not registered. Remember to import the component file for custom element registration`),!1)}class Bl extends wl{constructor(){super(...arguments),this.size="md",this.tone="default",this._clickHandler=()=>{}}_handleClick(){this.removeEventListener("click",this._clickHandler),this.addEventListener("click",this._clickHandler)}firstUpdated(e){super.firstUpdated(e),Sl("sgds-icon")}render(){return Q`
122
+ <button class="btn-close" aria-label="Close button" @click=${this._handleClick}>
123
123
  <sgds-icon name="cross" size=${this.size}></sgds-icon>
124
124
  </button>
125
- `}}Bl.styles=[...wl.styles,$l],e([Ye({type:String})],Bl.prototype,"ariaLabel",void 0),e([Ye({type:String,reflect:!0})],Bl.prototype,"size",void 0),e([Ye({type:String,reflect:!0})],Bl.prototype,"variant",void 0);class Ll extends wl{constructor(){super(...arguments),this.show=!1,this.variant="primary",this.outlined=!1,this.dismissible=!1,this.fullWidth=!1,this.truncated=!1,this.text=""}close(){this.show=!1}_handleShowChange(){if(this.show){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.show=!1);this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.show=!0);this.emit("sgds-after-hide")}}_handleTruncation(){const e=this.shadowRoot.querySelector(".badge"),t=this.shadowRoot.querySelector(".badge-label");if(e&&t){const i=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height;this.truncated=i>l}}_handleLabelSlotChange(e){this.text=function(e){if(!e)return"";const t=e.assignedNodes({flatten:!0});let i="";return[...t].forEach((e=>{e.nodeType===Node.TEXT_NODE&&(i+=e.textContent.trim())})),i}(e.target)}_renderBadge(){const e=this.outlined||"warning"===this.variant||"white"===this.variant;return Q`<div
125
+ `}}Bl.styles=[...wl.styles,$l],e([Ye({type:String,reflect:!0})],Bl.prototype,"size",void 0),e([Ye({type:String,reflect:!0})],Bl.prototype,"tone",void 0);class Ll extends wl{constructor(){super(...arguments),this.show=!1,this.variant="primary",this.outlined=!1,this.dismissible=!1,this.fullWidth=!1,this.truncated=!1,this.text=""}close(){this.show=!1}_handleShowChange(){if(this.show){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.show=!1);this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.show=!0);this.emit("sgds-after-hide")}}_handleTruncation(){const e=this.shadowRoot.querySelector(".badge"),t=this.shadowRoot.querySelector(".badge-label");if(e&&t){const i=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height;this.truncated=i>l}}_handleLabelSlotChange(e){this.text=function(e){if(!e)return"";const t=e.assignedNodes({flatten:!0});let i="";return[...t].forEach((e=>{e.nodeType===Node.TEXT_NODE&&(i+=e.textContent.trim())})),i}(e.target)}_renderBadge(){const e=this.outlined||"warning"===this.variant||"white"===this.variant;return Q`<div
126
126
  class="
127
127
  ${dt({"badge-dismissible":this.dismissible,badge:!0,outlined:this.outlined,truncated:this.truncated,"full-width":this.fullWidth})}"
128
128
  aria-hidden=${this.show?"false":"true"}
@@ -137,7 +137,7 @@ class extends ct{constructor(e){if(super(e),e.type!==st&&e.type!==ot&&e.type!==n
137
137
  size="sm"
138
138
  aria-label="close the badge"
139
139
  @click=${this.close}
140
- variant=${e?"dark":"light"}
140
+ tone=${e?"fixed-dark":"fixed-light"}
141
141
  ></sgds-close-button>`:ie}
142
142
  </div>`}render(){return this.dismissible&&this.show||!this.dismissible?this.truncated?Q`<sgds-tooltip content=${this.text} @sgds-hide=${e=>e.stopPropagation()}
143
143
  >${this._renderBadge()}</sgds-tooltip
@@ -2087,7 +2087,7 @@ class extends ct{constructor(e){if(super(e),e.type!==st&&e.type!==ot&&e.type!==n
2087
2087
  * Copyright 2017 Google LLC
2088
2088
  * SPDX-License-Identifier: BSD-3-Clause
2089
2089
  */
2090
- const ql=(e,t,i)=>{const l=new Map;for(let o=t;o<=i;o++)l.set(e[o],o);return l};const jl=rt(class extends ct{constructor(e){if(super(e),e.type!==at)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 o=[],a=[];let s=0;for(const t of e)o[s]=l?l(t,s):s,a[s]=i(t,s),s++;return{values:a,keys:o}}render(e,t,i){return this._getValuesAndKeys(e,t,i).values}update(e,[t,i,l]){const o=e._$committedValue;const{values:a,keys:s}=this._getValuesAndKeys(t,i,l);if(!Array.isArray(o))return this._itemKeys=s,a;const n=this._itemKeys??=[],r=[];let c,d,h=0,u=o.length-1,v=0,p=a.length-1;for(;h<=u&&v<=p;)if(null===o[h])h++;else if(null===o[u])u--;else if(n[h]===s[v])r[v]=mt(o[h],a[v]),h++,v++;else if(n[u]===s[p])r[p]=mt(o[u],a[p]),u--,p--;else if(n[h]===s[p])r[p]=mt(o[h],a[p]),ft(e,r[p+1],o[h]),h++,p--;else if(n[u]===s[v])r[v]=mt(o[u],a[v]),ft(e,o[h],o[u]),u--,v++;else if(void 0===c&&(c=ql(s,v,p),d=ql(n,h,u)),c.has(n[h]))if(c.has(n[u])){const t=d.get(s[v]),i=void 0!==t?o[t]:null;if(null===i){const t=ft(e,o[h]);mt(t,a[v]),r[v]=t}else r[v]=mt(i,a[v]),ft(e,o[h],i),o[t]=null;v++}else yt(o[u]),u--;else yt(o[h]),h++;for(;v<=p;){const t=ft(e,r[p+1]);mt(t,a[v]),r[v++]=t}for(;h<=u;){const e=o[h++];null!==e&&yt(e)}return this._itemKeys=s,bt(e,r),te}});class Kl extends Cl{constructor(){super(...arguments),this.multiSelect=!1,this.badgeFullWidth=!1,this.filterFunction=(e,t)=>t.label.toLowerCase().startsWith(e.toLowerCase()),this.optionList=[],this.emptyMenu=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",(async()=>{(await this._input).focus(),this.options.forEach((e=>e.removeAttribute("hidden"))),this.emptyMenu=!1}))}async firstUpdated(e){super.firstUpdated(e),this.menuList.forEach((e=>{const t=document.createElement("sgds-combo-box-option");t.innerText=e.label,t.value=e.value,t.checkbox=this.multiSelect,t.active=this.value.includes(e.value),this.appendChild(t)})),this._setupValidation(this.menuList),this.menuIsOpen&&!this.readonly&&this.showMenu()}async _handleDefaultSlotChange(e){const t=e.target.assignedElements({flatten:!0});t.forEach((e=>{e.addEventListener("i-sgds-select",(t=>{e.hasAttribute("disabled")||this._handleItemSelected(t)})),this.value.includes(e.getAttribute("value"))&&e.setAttribute("active","true"),this.multiSelect&&e.addEventListener("i-sgds-unselect",(e=>{e.target.disabled||this._handleItemUnselect(e)}))})),await this.updateComplete,this.optionList=await this._getMenuListFromOptions(t),this._setupValidation(this.optionList)}async _setupValidation(e){var t;if(this.value&&e.length>0){const 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,i;const l=this.value.split(";"),o=e.filter((({value:e})=>l.includes(e)));this.selectedItems=[...o];const a=o.map((e=>e.value)).join(";");a!==this.value&&(this.value=a),this.multiSelect||(this.displayValue=null!==(i=null===(t=o[0])||void 0===t?void 0:t.label)&&void 0!==i?i:"")}async _handleInputChange(e){const t=e.target;this.displayValue=t.value,this.emit("sgds-input",{detail:{displayValue:this.displayValue}});const i=this.options.map((e=>({value:e.value,label:e.textContent.trim()})));this.filteredList=i.filter((e=>this.filterFunction(this.displayValue,e))),""!==this.displayValue||this.multiSelect||(this.selectedItems=[],this.value=this.selectedItems.join(";"),this.options.forEach((e=>e.active=!1))),this.invalid=!1,this.showMenu(),this.emptyMenu=0===this.filteredList.length;const l=this.filteredList.map((e=>e.value));this.options.forEach((e=>{l.includes(e.value)?e.hidden=!1:e.hidden=!0})),""===this.displayValue&&(this.options.forEach((e=>e.hidden=!1)),await this.updateComplete)}async _handleItemSelected(e){var t,i,l;const o=e.target,a=null!==(i=null===(t=o.textContent)||void 0===t?void 0:t.trim())&&void 0!==i?i:"",s=null!==(l=o.getAttribute("value"))&&void 0!==l?l:a,n=this.filteredList.find((e=>e.value.toString()===s))||{label:a,value:s};this.multiSelect?(this.selectedItems.some((e=>e.value===n.value))||(this.selectedItems=[...this.selectedItems,n],setTimeout((()=>this.displayValue=""))),this.hideMenu(),this.value=this.selectedItems.map((e=>e.value)).join(";")):0!==this.selectedItems.length&&this.selectedItems[0].value===n.value||(this.options.forEach((e=>e.active=!1)),o.active=!0,this.selectedItems=[n],this.value=n.value.toString(),this.displayValue=n.label,this.hideMenu())}_handleItemUnselect(e){var t,i,l;const o=e.target;o.removeAttribute("active");const a=null!==(i=null===(t=o.textContent)||void 0===t?void 0:t.trim())&&void 0!==i?i:"",s=null!==(l=o.getAttribute("value"))&&void 0!==l?l:a,n=this.filteredList.find((e=>e.value.toString()===s))||{label:a,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 _mixinResetFormControl(){if(this.value=this.defaultValue,this.multiSelect){const e=this.value.split(";");this.options.forEach((t=>{t.active=e.includes(t.value)}));const t=this.options.filter((t=>e.includes(t.value)));this.selectedItems=t.map((e=>({value:e.value,label:e.textContent.trim()}))),this._mixinResetValidity(await this._multiSelectInput)}else{this.options.forEach((e=>{e.active=e.value===this.value}));const e=this.options.filter((e=>e.value===this.value));e.length<=0?this.displayValue="":this.displayValue=e[0].textContent.trim(),this._mixinResetValidity(await this._input)}}_renderInput(){const e=this.hasFeedback;return Q`
2090
+ const ql=(e,t,i)=>{const l=new Map;for(let o=t;o<=i;o++)l.set(e[o],o);return l};const jl=rt(class extends ct{constructor(e){if(super(e),e.type!==st)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 o=[],s=[];let a=0;for(const t of e)o[a]=l?l(t,a):a,s[a]=i(t,a),a++;return{values:s,keys:o}}render(e,t,i){return this._getValuesAndKeys(e,t,i).values}update(e,[t,i,l]){const o=e._$committedValue;const{values:s,keys:a}=this._getValuesAndKeys(t,i,l);if(!Array.isArray(o))return this._itemKeys=a,s;const n=this._itemKeys??=[],r=[];let c,d,h=0,u=o.length-1,v=0,p=s.length-1;for(;h<=u&&v<=p;)if(null===o[h])h++;else if(null===o[u])u--;else if(n[h]===a[v])r[v]=mt(o[h],s[v]),h++,v++;else if(n[u]===a[p])r[p]=mt(o[u],s[p]),u--,p--;else if(n[h]===a[p])r[p]=mt(o[h],s[p]),ft(e,r[p+1],o[h]),h++,p--;else if(n[u]===a[v])r[v]=mt(o[u],s[v]),ft(e,o[h],o[u]),u--,v++;else if(void 0===c&&(c=ql(a,v,p),d=ql(n,h,u)),c.has(n[h]))if(c.has(n[u])){const t=d.get(a[v]),i=void 0!==t?o[t]:null;if(null===i){const t=ft(e,o[h]);mt(t,s[v]),r[v]=t}else r[v]=mt(i,s[v]),ft(e,o[h],i),o[t]=null;v++}else yt(o[u]),u--;else yt(o[h]),h++;for(;v<=p;){const t=ft(e,r[p+1]);mt(t,s[v]),r[v++]=t}for(;h<=u;){const e=o[h++];null!==e&&yt(e)}return this._itemKeys=a,bt(e,r),te}});class Kl extends Cl{constructor(){super(...arguments),this.multiSelect=!1,this.badgeFullWidth=!1,this.filterFunction=(e,t)=>t.label.toLowerCase().startsWith(e.toLowerCase()),this.optionList=[],this.emptyMenu=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",(async()=>{(await this._input).focus(),this.options.forEach((e=>e.removeAttribute("hidden"))),this.emptyMenu=!1}))}async firstUpdated(e){super.firstUpdated(e),this.menuList.forEach((e=>{const t=document.createElement("sgds-combo-box-option");t.innerText=e.label,t.value=e.value,t.checkbox=this.multiSelect,t.active=this.value.includes(e.value),this.appendChild(t)})),this._setupValidation(this.menuList),this.menuIsOpen&&!this.readonly&&this.showMenu()}async _handleDefaultSlotChange(e){const t=e.target.assignedElements({flatten:!0});t.forEach((e=>{e.addEventListener("i-sgds-select",(t=>{e.hasAttribute("disabled")||this._handleItemSelected(t)})),this.value.includes(e.getAttribute("value"))&&e.setAttribute("active","true"),this.multiSelect&&e.addEventListener("i-sgds-unselect",(e=>{e.target.disabled||this._handleItemUnselect(e)}))})),await this.updateComplete,this.optionList=await this._getMenuListFromOptions(t),this._setupValidation(this.optionList)}async _setupValidation(e){var t;if(this.value&&e.length>0){const 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,i;const l=this.value.split(";"),o=e.filter((({value:e})=>l.includes(e)));this.selectedItems=[...o];const s=o.map((e=>e.value)).join(";");s!==this.value&&(this.value=s),this.multiSelect||(this.displayValue=null!==(i=null===(t=o[0])||void 0===t?void 0:t.label)&&void 0!==i?i:"")}async _handleInputChange(e){const t=e.target;this.displayValue=t.value,this.emit("sgds-input",{detail:{displayValue:this.displayValue}});const i=this.options.map((e=>({value:e.value,label:e.textContent.trim()})));this.filteredList=i.filter((e=>this.filterFunction(this.displayValue,e))),""!==this.displayValue||this.multiSelect||(this.selectedItems=[],this.value=this.selectedItems.join(";"),this.options.forEach((e=>e.active=!1))),this.invalid=!1,this.showMenu(),this.emptyMenu=0===this.filteredList.length;const l=this.filteredList.map((e=>e.value));this.options.forEach((e=>{l.includes(e.value)?e.hidden=!1:e.hidden=!0})),""===this.displayValue&&(this.options.forEach((e=>e.hidden=!1)),await this.updateComplete)}async _handleItemSelected(e){var t,i,l;const o=e.target,s=null!==(i=null===(t=o.textContent)||void 0===t?void 0:t.trim())&&void 0!==i?i:"",a=null!==(l=o.getAttribute("value"))&&void 0!==l?l:s,n=this.filteredList.find((e=>e.value.toString()===a))||{label:s,value:a};this.multiSelect?(this.selectedItems.some((e=>e.value===n.value))||(this.selectedItems=[...this.selectedItems,n],setTimeout((()=>this.displayValue=""))),this.hideMenu(),this.value=this.selectedItems.map((e=>e.value)).join(";")):0!==this.selectedItems.length&&this.selectedItems[0].value===n.value||(this.options.forEach((e=>e.active=!1)),o.active=!0,this.selectedItems=[n],this.value=n.value.toString(),this.displayValue=n.label,this.hideMenu())}_handleItemUnselect(e){var t,i,l;const o=e.target;o.removeAttribute("active");const s=null!==(i=null===(t=o.textContent)||void 0===t?void 0:t.trim())&&void 0!==i?i:"",a=null!==(l=o.getAttribute("value"))&&void 0!==l?l:s,n=this.filteredList.find((e=>e.value.toString()===a))||{label:s,value:a};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 _mixinResetFormControl(){if(this.value=this.defaultValue,this.multiSelect){const e=this.value.split(";");this.options.forEach((t=>{t.active=e.includes(t.value)}));const t=this.options.filter((t=>e.includes(t.value)));this.selectedItems=t.map((e=>({value:e.value,label:e.textContent.trim()}))),this._mixinResetValidity(await this._multiSelectInput)}else{this.options.forEach((e=>{e.active=e.value===this.value}));const e=this.options.filter((e=>e.value===this.value));e.length<=0?this.displayValue="":this.displayValue=e[0].textContent.trim(),this._mixinResetValidity(await this._input)}}_renderInput(){const e=this.hasFeedback;return Q`
2091
2091
  <div
2092
2092
  ${Lt(this.myDropdown)}
2093
2093
  class="form-control-group ${dt({disabled:this.disabled,readonly:this.readonly,"is-invalid":this.invalid&&e})}"