@govtechsg/sgds-web-component 3.5.6 → 3.5.7-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/Masthead/index.js +1 -1
  2. package/components/Breadcrumb/index.umd.min.js +1 -1
  3. package/components/Breadcrumb/index.umd.min.js.map +1 -1
  4. package/components/Checkbox/checkbox.js +1 -1
  5. package/components/Checkbox/index.umd.min.js +1 -1
  6. package/components/Checkbox/index.umd.min.js.map +1 -1
  7. package/components/ComboBox/index.umd.min.js +271 -258
  8. package/components/ComboBox/index.umd.min.js.map +1 -1
  9. package/components/ComboBox/sgds-combo-box-option.js +6 -0
  10. package/components/ComboBox/sgds-combo-box-option.js.map +1 -1
  11. package/components/ComboBox/sgds-combo-box.d.ts +4 -0
  12. package/components/ComboBox/sgds-combo-box.js +51 -2
  13. package/components/ComboBox/sgds-combo-box.js.map +1 -1
  14. package/components/Datepicker/index.umd.min.js +2 -2
  15. package/components/Datepicker/index.umd.min.js.map +1 -1
  16. package/components/DescriptionList/description-list.js +1 -1
  17. package/components/DescriptionList/index.umd.min.js +8 -8
  18. package/components/DescriptionList/index.umd.min.js.map +1 -1
  19. package/components/Dropdown/dropdown-menu.js +1 -1
  20. package/components/Dropdown/index.umd.min.js +1 -1
  21. package/components/Dropdown/index.umd.min.js.map +1 -1
  22. package/components/IconList/icon-list.js +1 -1
  23. package/components/IconList/index.umd.min.js +1 -1
  24. package/components/IconList/index.umd.min.js.map +1 -1
  25. package/components/Input/index.umd.min.js +1 -1
  26. package/components/Input/index.umd.min.js.map +1 -1
  27. package/components/Mainnav/index.umd.min.js +2 -2
  28. package/components/Mainnav/mainnav.js +1 -1
  29. package/components/Masthead/index.umd.min.js +1 -1
  30. package/components/Masthead/masthead.js +1 -1
  31. package/components/OverflowMenu/index.umd.min.js +1 -1
  32. package/components/OverflowMenu/index.umd.min.js.map +1 -1
  33. package/components/QuantityToggle/index.umd.min.js +1 -1
  34. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  35. package/components/Select/index.umd.min.js +1 -1
  36. package/components/Select/index.umd.min.js.map +1 -1
  37. package/components/Textarea/index.umd.min.js +1 -1
  38. package/components/Textarea/index.umd.min.js.map +1 -1
  39. package/components/index.umd.min.js +25 -11
  40. package/components/index.umd.min.js.map +1 -1
  41. package/index.umd.min.js +25 -11
  42. package/index.umd.min.js.map +1 -1
  43. package/package.json +1 -1
  44. package/react/components/Checkbox/checkbox.cjs.js +1 -1
  45. package/react/components/Checkbox/checkbox.js +1 -1
  46. package/react/components/ComboBox/sgds-combo-box-option.cjs.js +6 -0
  47. package/react/components/ComboBox/sgds-combo-box-option.cjs.js.map +1 -1
  48. package/react/components/ComboBox/sgds-combo-box-option.js +6 -0
  49. package/react/components/ComboBox/sgds-combo-box-option.js.map +1 -1
  50. package/react/components/ComboBox/sgds-combo-box.cjs.js +51 -2
  51. package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
  52. package/react/components/ComboBox/sgds-combo-box.js +51 -2
  53. package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
  54. package/react/components/DescriptionList/description-list.cjs.js +1 -1
  55. package/react/components/DescriptionList/description-list.js +1 -1
  56. package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
  57. package/react/components/Dropdown/dropdown-menu.js +1 -1
  58. package/react/components/IconList/icon-list.cjs.js +1 -1
  59. package/react/components/IconList/icon-list.js +1 -1
  60. package/react/components/Mainnav/mainnav.cjs.js +1 -1
  61. package/react/components/Mainnav/mainnav.js +1 -1
  62. package/react/components/Masthead/masthead.cjs.js +1 -1
  63. package/react/components/Masthead/masthead.js +1 -1
  64. package/react/styles/form-text-control.cjs.js +1 -1
  65. package/react/styles/form-text-control.js +1 -1
  66. package/styles/form-text-control.js +1 -1
@@ -94,7 +94,7 @@ const tt=1,it=2,lt=e=>(...t)=>({_$litDirective$:e,values:t});class ot{constructo
94
94
  * @license
95
95
  * Copyright 2020 Google LLC
96
96
  * SPDX-License-Identifier: BSD-3-Clause
97
- */const pt=()=>new gt;class gt{}const ft=new WeakMap;const wt=lt(class extends ut{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=ft.get(t);void 0===i&&(i=new WeakMap,ft.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?ft.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),mt=Math.min,yt=Math.max,xt=Math.round,Ct=Math.floor,bt=e=>({x:e,y:e}),_t={left:"right",right:"left",bottom:"top",top:"bottom"},Zt={start:"end",end:"start"};function Mt(e,t,i){return yt(e,mt(t,i))}function Vt(e,t){return"function"==typeof e?e(t):e}function Ht(e){return e.split("-")[0]}function St(e){return e.split("-")[1]}function $t(e){return"x"===e?"y":"x"}function Bt(e){return"y"===e?"height":"width"}const kt=new Set(["top","bottom"]);function Pt(e){return kt.has(Ht(e))?"y":"x"}function Lt(e){return $t(Pt(e))}function At(e,t,i){void 0===i&&(i=!1);const l=St(e),o=Lt(e),n=Bt(o);let a="x"===o?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=zt(a)),[a,zt(a)]}function Et(e){return e.replace(/start|end/g,(e=>Zt[e]))}const Tt=["left","right"],Ot=["right","left"],Rt=["top","bottom"],It=["bottom","top"];function Ut(e,t,i,l){const o=St(e);let n=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Ot:Tt:t?Tt:Ot;case"left":case"right":return t?Rt:It;default:return[]}}(Ht(e),"start"===i,l);return o&&(n=n.map((e=>e+"-"+o)),t&&(n=n.concat(n.map(Et)))),n}function zt(e){return e.replace(/left|right|bottom|top/g,(e=>_t[e]))}function Dt(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 Nt(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 Ft(e,t,i){let{reference:l,floating:o}=e;const n=Pt(t),a=Lt(t),r=Bt(a),s=Ht(t),c="y"===n,d=l.x+l.width/2-o.width/2,h=l.y+l.height/2-o.height/2,v=l[r]/2-o[r]/2;let u;switch(s){case"top":u={x:d,y:l.y-o.height};break;case"bottom":u={x:d,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:h};break;case"left":u={x:l.x-o.width,y:h};break;default:u={x:l.x,y:l.y}}switch(St(t)){case"start":u[a]-=v*(i&&c?-1:1);break;case"end":u[a]+=v*(i&&c?-1:1)}return u}async function Wt(e,t){var i;void 0===t&&(t={});const{x:l,y:o,platform:n,rects:a,elements:r,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=Vt(t,e),p=Dt(u),g=r[v?"floating"===h?"reference":"floating":h],f=Nt(await n.getClippingRect({element:null==(i=await(null==n.isElement?void 0:n.isElement(g)))||i?g:g.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(r.floating)),boundary:c,rootBoundary:d,strategy:s})),w="floating"===h?{x:l,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(r.floating)),y=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},x=Nt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:w,offsetParent:m,strategy:s}):w);return{top:(f.top-x.top+p.top)/y.y,bottom:(x.bottom-f.bottom+p.bottom)/y.y,left:(f.left-x.left+p.left)/y.x,right:(x.right-f.right+p.right)/y.x}}const qt=new Set(["left","top"]);function jt(){return"undefined"!=typeof window}function Jt(e){return Yt(e)?(e.nodeName||"").toLowerCase():"#document"}function Kt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Gt(e){var t;return null==(t=(Yt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Yt(e){return!!jt()&&(e instanceof Node||e instanceof Kt(e).Node)}function Xt(e){return!!jt()&&(e instanceof Element||e instanceof Kt(e).Element)}function Qt(e){return!!jt()&&(e instanceof HTMLElement||e instanceof Kt(e).HTMLElement)}function ei(e){return!(!jt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot)}const ti=new Set(["inline","contents"]);function ii(e){const{overflow:t,overflowX:i,overflowY:l,display:o}=pi(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!ti.has(o)}const li=new Set(["table","td","th"]);function oi(e){return li.has(Jt(e))}const ni=[":popover-open",":modal"];function ai(e){return ni.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const ri=["transform","translate","scale","rotate","perspective"],si=["transform","translate","scale","rotate","perspective","filter"],ci=["paint","layout","strict","content"];function di(e){const t=hi(),i=Xt(e)?pi(e):e;return ri.some((e=>!!i[e]&&"none"!==i[e]))||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||si.some((e=>(i.willChange||"").includes(e)))||ci.some((e=>(i.contain||"").includes(e)))}function hi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const vi=new Set(["html","body","#document"]);function ui(e){return vi.has(Jt(e))}function pi(e){return Kt(e).getComputedStyle(e)}function gi(e){return Xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fi(e){if("html"===Jt(e))return e;const t=e.assignedSlot||e.parentNode||ei(e)&&e.host||Gt(e);return ei(t)?t.host:t}function wi(e){const t=fi(e);return ui(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qt(t)&&ii(t)?t:wi(t)}function mi(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=wi(e),n=o===(null==(l=e.ownerDocument)?void 0:l.body),a=Kt(o);if(n){const e=yi(a);return t.concat(a,a.visualViewport||[],ii(o)?o:[],e&&i?mi(e):[])}return t.concat(o,mi(o,[],i))}function yi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xi(e){const t=pi(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=Qt(e),n=o?e.offsetWidth:i,a=o?e.offsetHeight:l,r=xt(i)!==n||xt(l)!==a;return r&&(i=n,l=a),{width:i,height:l,$:r}}function Ci(e){return Xt(e)?e:e.contextElement}function bi(e){const t=Ci(e);if(!Qt(t))return bt(1);const i=t.getBoundingClientRect(),{width:l,height:o,$:n}=xi(t);let a=(n?xt(i.width):i.width)/l,r=(n?xt(i.height):i.height)/o;return a&&Number.isFinite(a)||(a=1),r&&Number.isFinite(r)||(r=1),{x:a,y:r}}const _i=bt(0);function Zi(e){const t=Kt(e);return hi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_i}function Mi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),n=Ci(e);let a=bt(1);t&&(l?Xt(l)&&(a=bi(l)):a=bi(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Kt(e))&&t}(n,i,l)?Zi(n):bt(0);let s=(o.left+r.x)/a.x,c=(o.top+r.y)/a.y,d=o.width/a.x,h=o.height/a.y;if(n){const e=Kt(n),t=l&&Xt(l)?Kt(l):l;let i=e,o=yi(i);for(;o&&l&&t!==i;){const e=bi(o),t=o.getBoundingClientRect(),l=pi(o),n=t.left+(o.clientLeft+parseFloat(l.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(l.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,h*=e.y,s+=n,c+=a,i=Kt(o),o=yi(i)}}return Nt({width:d,height:h,x:s,y:c})}function Vi(e,t){const i=gi(e).scrollLeft;return t?t.left+i:Mi(Gt(e)).left+i}function Hi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Vi(e,i),y:i.top+t.scrollTop}}const Si=25;const $i=new Set(["absolute","fixed"]);function Bi(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Kt(e),l=Gt(e),o=i.visualViewport;let n=l.clientWidth,a=l.clientHeight,r=0,s=0;if(o){n=o.width,a=o.height;const e=hi();(!e||e&&"fixed"===t)&&(r=o.offsetLeft,s=o.offsetTop)}const c=Vi(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<=Si&&(n-=a)}else c<=Si&&(n+=c);return{width:n,height:a,x:r,y:s}}(e,i);else if("document"===t)l=function(e){const t=Gt(e),i=gi(e),l=e.ownerDocument.body,o=yt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),n=yt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let a=-i.scrollLeft+Vi(e);const r=-i.scrollTop;return"rtl"===pi(l).direction&&(a+=yt(t.clientWidth,l.clientWidth)-o),{width:o,height:n,x:a,y:r}}(Gt(e));else if(Xt(t))l=function(e,t){const i=Mi(e,!0,"fixed"===t),l=i.top+e.clientTop,o=i.left+e.clientLeft,n=Qt(e)?bi(e):bt(1);return{width:e.clientWidth*n.x,height:e.clientHeight*n.y,x:o*n.x,y:l*n.y}}(t,i);else{const i=Zi(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Nt(l)}function ki(e,t){const i=fi(e);return!(i===t||!Xt(i)||ui(i))&&("fixed"===pi(i).position||ki(i,t))}function Pi(e,t,i){const l=Qt(t),o=Gt(t),n="fixed"===i,a=Mi(e,!0,n,t);let r={scrollLeft:0,scrollTop:0};const s=bt(0);function c(){s.x=Vi(o)}if(l||!l&&!n)if(("body"!==Jt(t)||ii(o))&&(r=gi(t)),l){const e=Mi(t,!0,n,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();n&&!l&&o&&c();const d=!o||l||n?bt(0):Hi(o,r);return{x:a.left+r.scrollLeft-s.x-d.x,y:a.top+r.scrollTop-s.y-d.y,width:a.width,height:a.height}}function Li(e){return"static"===pi(e).position}function Ai(e,t){if(!Qt(e)||"fixed"===pi(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Gt(e)===i&&(i=i.ownerDocument.body),i}function Ei(e,t){const i=Kt(e);if(ai(e))return i;if(!Qt(e)){let t=fi(e);for(;t&&!ui(t);){if(Xt(t)&&!Li(t))return t;t=fi(t)}return i}let l=Ai(e,t);for(;l&&oi(l)&&Li(l);)l=Ai(l,t);return l&&ui(l)&&Li(l)&&!di(l)?i:l||function(e){let t=fi(e);for(;Qt(t)&&!ui(t);){if(di(t))return t;if(ai(t))return null;t=fi(t)}return null}(e)||i}const Ti={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:o}=e;const n="fixed"===o,a=Gt(l),r=!!t&&ai(t.floating);if(l===a||r&&n)return i;let s={scrollLeft:0,scrollTop:0},c=bt(1);const d=bt(0),h=Qt(l);if((h||!h&&!n)&&(("body"!==Jt(l)||ii(a))&&(s=gi(l)),Qt(l))){const e=Mi(l);c=bi(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!a||h||n?bt(0):Hi(a,s);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-s.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-s.scrollTop*c.y+d.y+v.y}},getDocumentElement:Gt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:o}=e;const n=[..."clippingAncestors"===i?ai(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=mi(e,[],!1).filter((e=>Xt(e)&&"body"!==Jt(e))),o=null;const n="fixed"===pi(e).position;let a=n?fi(e):e;for(;Xt(a)&&!ui(a);){const t=pi(a),i=di(a);i||"fixed"!==t.position||(o=null),(n?!i&&!o:!i&&"static"===t.position&&o&&$i.has(o.position)||ii(a)&&!i&&ki(e,a))?l=l.filter((e=>e!==a)):o=t,a=fi(a)}return t.set(e,l),l}(t,this._c):[].concat(i),l],a=n[0],r=n.reduce(((e,i)=>{const l=Bi(t,i,o);return e.top=yt(l.top,e.top),e.right=mt(l.right,e.right),e.bottom=mt(l.bottom,e.bottom),e.left=yt(l.left,e.left),e}),Bi(t,a,o));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:Ei,getElementRects:async function(e){const t=this.getOffsetParent||Ei,i=this.getDimensions,l=await i(e.floating);return{reference:Pi(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}=xi(e);return{width:t,height:i}},getScale:bi,isElement:Xt,isRTL:function(e){return"rtl"===pi(e).direction}};function Oi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ri(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:o=!0,ancestorResize:n=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:s=!1}=l,c=Ci(e),d=o||n?[...c?mi(c):[],...mi(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",i,{passive:!0}),n&&e.addEventListener("resize",i)}));const h=c&&r?function(e,t){let i,l=null;const o=Gt(e);function n(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function a(r,s){void 0===r&&(r=!1),void 0===s&&(s=1),n();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=c;if(r||t(),!v||!u)return;const p={rootMargin:-Ct(h)+"px "+-Ct(o.clientWidth-(d+v))+"px "+-Ct(o.clientHeight-(h+u))+"px "+-Ct(d)+"px",threshold:yt(0,mt(1,s))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==s){if(!g)return a();l?a(!1,l):i=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==l||Oi(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),n}(c,i):null;let v,u=-1,p=null;a&&(p=new ResizeObserver((e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),i()})),c&&!s&&p.observe(c),p.observe(t));let g=s?Mi(e):null;return s&&function t(){const l=Mi(e);g&&!Oi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",i),n&&e.removeEventListener("resize",i)})),null==h||h(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(v)}}const Ii=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:o,y:n,placement:a,middlewareData:r}=t,s=await async function(e,t){const{placement:i,platform:l,elements:o}=e,n=await(null==l.isRTL?void 0:l.isRTL(o.floating)),a=Ht(i),r=St(i),s="y"===Pt(i),c=qt.has(a)?-1:1,d=n&&s?-1:1,h=Vt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof p&&(u="end"===r?-1*p:p),s?{x:u*d,y:v*c}:{x:v*c,y:u*d}}(t,e);return a===(null==(i=r.offset)?void 0:i.placement)&&null!=(l=r.arrow)&&l.alignmentOffset?{}:{x:o+s.x,y:n+s.y,data:{...s,placement:a}}}}},Ui=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:o}=t,{mainAxis:n=!0,crossAxis:a=!1,limiter:r={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...s}=Vt(e,t),c={x:i,y:l},d=await Wt(t,s),h=Pt(Ht(o)),v=$t(h);let u=c[v],p=c[h];if(n){const e="y"===v?"bottom":"right";u=Mt(u+d["y"===v?"top":"left"],u,u-d[e])}if(a){const e="y"===h?"bottom":"right";p=Mt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=r.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:n,[h]:a}}}}}},zi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:o,middlewareData:n,rects:a,initialPlacement:r,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=Vt(e,t);if(null!=(i=n.arrow)&&i.alignmentOffset)return{};const w=Ht(o),m=Pt(r),y=Ht(r)===r,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=v||(y||!g?[zt(r)]:function(e){const t=zt(e);return[Et(e),t,Et(t)]}(r)),b="none"!==p;!v&&b&&C.push(...Ut(r,g,p,x));const _=[r,...C],Z=await Wt(t,f),M=[];let V=(null==(l=n.flip)?void 0:l.overflows)||[];if(d&&M.push(Z[w]),h){const e=At(o,a,x);M.push(Z[e[0]],Z[e[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every((e=>e<=0))){var H,S;const e=((null==(H=n.flip)?void 0:H.index)||0)+1,t=_[e];if(t){if(!("alignment"===h&&m!==Pt(t))||V.every((e=>Pt(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(S=V.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!i)switch(u){case"bestFit":{var $;const e=null==($=V.filter((e=>{if(b){const t=Pt(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:$[0];e&&(i=e);break}case"initialPlacement":i=r}if(o!==i)return{reset:{placement:i}}}return{}}}},Di=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:o,rects:n,platform:a,elements:r}=t,{apply:s=()=>{},...c}=Vt(e,t),d=await Wt(t,c),h=Ht(o),v=St(o),u="y"===Pt(o),{width:p,height:g}=n.floating;let f,w;"top"===h||"bottom"===h?(f=h,w=v===(await(null==a.isRTL?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(w=h,f="end"===v?"top":"bottom");const m=g-d.top-d.bottom,y=p-d.left-d.right,x=mt(g-d[f],m),C=mt(p-d[w],y),b=!t.middlewareData.shift;let _=x,Z=C;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(Z=y),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(_=m),b&&!v){const e=yt(d.left,0),t=yt(d.right,0),i=yt(d.top,0),l=yt(d.bottom,0);u?Z=p-2*(0!==e||0!==t?e+t:yt(d.left,d.right)):_=g-2*(0!==i||0!==l?i+l:yt(d.top,d.bottom))}await s({...t,availableWidth:Z,availableHeight:_});const M=await a.getDimensions(r.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},Ni=(e,t,i)=>{const l=new Map,o={platform:Ti,...i},n={...o.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:n=[],platform:a}=i,r=n.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=Ft(c,l,s),v=l,u={},p=0;for(let i=0;i<r.length;i++){const{name:n,fn:g}=r[i],{x:f,y:w,data:m,reset:y}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:o,middlewareData:u,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=w?w:h,u={...u,[n]:{...u[n],...m}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(v=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:h}=Ft(c,v,s))),i=-1)}return{x:d,y:h,placement:v,strategy:o,middlewareData:u}})(e,t,{...o,platform:n})};var Fi=_e`: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:576px){.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:992px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1200px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1400px){.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%}`,Wi=_e`.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)}`,qi=_e`.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)}`,ji=_e`.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)}`;function Ji(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Ki{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 Gi=e=>{class i extends e{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Ki(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,t([et("sgds-input")],i.prototype,"sgdsInput",void 0),t([et("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var Yi=_e`: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 Xi extends Ne{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}))})))}}Xi.styles=[Yi],Xi.dependencies={},t([Ge({type:Boolean,reflect:!0})],Xi.prototype,"ssr",void 0);class Qi extends Xi{constructor(){super(...arguments),this.myDropdown=pt(),this.dropdownMenuId=Ji("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=pt(),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=Ri(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),n=l.indexOf(o);return-1!==n?t[n]: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=[Ii(8),this.noFlip?void 0:zi(),Ui()].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:n,strategy:a,placement:r}=await Ni(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:a,left:`${o}px`,top:`${n}px`})}}t([Ge({type:Boolean,state:!0})],Qi.prototype,"noFlip",void 0),t([Ge({type:Boolean,reflect:!0,state:!0})],Qi.prototype,"menuAlignRight",void 0),t([Ge({type:String,reflect:!0,state:!0})],Qi.prototype,"drop",void 0),t([Ge({type:Object})],Qi.prototype,"floatingOpts",void 0),t([Ge({type:Boolean,reflect:!0})],Qi.prototype,"menuIsOpen",void 0),t([Ge({type:Boolean,reflect:!0})],Qi.prototype,"disabled",void 0),t([Ge({type:Boolean,reflect:!0})],Qi.prototype,"readonly",void 0);class el extends Qi{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),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 tl,il;el.styles=Qi.styles,t([(tl="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(tl)??null;if(null===i&&il&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Qe("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${tl}' 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(il){const{get:o,set:n}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return Xe(e,t,{get(){let e=o.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&n.call(this,e)),e}})}return Xe(e,t,{get(){return l(this)}})})],el.prototype,"menu",void 0),t([Ye()],el.prototype,"nextDropdownItemNo",void 0),t([Ye()],el.prototype,"prevDropdownItemNo",void 0),t([Ge({type:Boolean,reflect:!0})],el.prototype,"hidden",void 0);class ll extends(Gi(el)){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=Ji("input"),this._labelId=Ji("label"),this.floatingOpts={middleware:[Di({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">
97
+ */const pt=()=>new gt;class gt{}const ft=new WeakMap;const wt=lt(class extends ut{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=ft.get(t);void 0===i&&(i=new WeakMap,ft.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?ft.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),mt=Math.min,yt=Math.max,xt=Math.round,Ct=Math.floor,bt=e=>({x:e,y:e}),_t={left:"right",right:"left",bottom:"top",top:"bottom"},Zt={start:"end",end:"start"};function Mt(e,t,i){return yt(e,mt(t,i))}function Vt(e,t){return"function"==typeof e?e(t):e}function Ht(e){return e.split("-")[0]}function St(e){return e.split("-")[1]}function $t(e){return"x"===e?"y":"x"}function Bt(e){return"y"===e?"height":"width"}const kt=new Set(["top","bottom"]);function Pt(e){return kt.has(Ht(e))?"y":"x"}function Lt(e){return $t(Pt(e))}function At(e,t,i){void 0===i&&(i=!1);const l=St(e),o=Lt(e),n=Bt(o);let a="x"===o?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=zt(a)),[a,zt(a)]}function Et(e){return e.replace(/start|end/g,(e=>Zt[e]))}const Tt=["left","right"],Ot=["right","left"],Rt=["top","bottom"],It=["bottom","top"];function Ut(e,t,i,l){const o=St(e);let n=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Ot:Tt:t?Tt:Ot;case"left":case"right":return t?Rt:It;default:return[]}}(Ht(e),"start"===i,l);return o&&(n=n.map((e=>e+"-"+o)),t&&(n=n.concat(n.map(Et)))),n}function zt(e){return e.replace(/left|right|bottom|top/g,(e=>_t[e]))}function Dt(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 Nt(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 Ft(e,t,i){let{reference:l,floating:o}=e;const n=Pt(t),a=Lt(t),r=Bt(a),s=Ht(t),c="y"===n,d=l.x+l.width/2-o.width/2,h=l.y+l.height/2-o.height/2,v=l[r]/2-o[r]/2;let u;switch(s){case"top":u={x:d,y:l.y-o.height};break;case"bottom":u={x:d,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:h};break;case"left":u={x:l.x-o.width,y:h};break;default:u={x:l.x,y:l.y}}switch(St(t)){case"start":u[a]-=v*(i&&c?-1:1);break;case"end":u[a]+=v*(i&&c?-1:1)}return u}async function Wt(e,t){var i;void 0===t&&(t={});const{x:l,y:o,platform:n,rects:a,elements:r,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=Vt(t,e),p=Dt(u),g=r[v?"floating"===h?"reference":"floating":h],f=Nt(await n.getClippingRect({element:null==(i=await(null==n.isElement?void 0:n.isElement(g)))||i?g:g.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(r.floating)),boundary:c,rootBoundary:d,strategy:s})),w="floating"===h?{x:l,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(r.floating)),y=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},x=Nt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:w,offsetParent:m,strategy:s}):w);return{top:(f.top-x.top+p.top)/y.y,bottom:(x.bottom-f.bottom+p.bottom)/y.y,left:(f.left-x.left+p.left)/y.x,right:(x.right-f.right+p.right)/y.x}}const qt=new Set(["left","top"]);function jt(){return"undefined"!=typeof window}function Jt(e){return Yt(e)?(e.nodeName||"").toLowerCase():"#document"}function Kt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Gt(e){var t;return null==(t=(Yt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Yt(e){return!!jt()&&(e instanceof Node||e instanceof Kt(e).Node)}function Xt(e){return!!jt()&&(e instanceof Element||e instanceof Kt(e).Element)}function Qt(e){return!!jt()&&(e instanceof HTMLElement||e instanceof Kt(e).HTMLElement)}function ei(e){return!(!jt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot)}const ti=new Set(["inline","contents"]);function ii(e){const{overflow:t,overflowX:i,overflowY:l,display:o}=pi(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!ti.has(o)}const li=new Set(["table","td","th"]);function oi(e){return li.has(Jt(e))}const ni=[":popover-open",":modal"];function ai(e){return ni.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const ri=["transform","translate","scale","rotate","perspective"],si=["transform","translate","scale","rotate","perspective","filter"],ci=["paint","layout","strict","content"];function di(e){const t=hi(),i=Xt(e)?pi(e):e;return ri.some((e=>!!i[e]&&"none"!==i[e]))||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||si.some((e=>(i.willChange||"").includes(e)))||ci.some((e=>(i.contain||"").includes(e)))}function hi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const vi=new Set(["html","body","#document"]);function ui(e){return vi.has(Jt(e))}function pi(e){return Kt(e).getComputedStyle(e)}function gi(e){return Xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fi(e){if("html"===Jt(e))return e;const t=e.assignedSlot||e.parentNode||ei(e)&&e.host||Gt(e);return ei(t)?t.host:t}function wi(e){const t=fi(e);return ui(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qt(t)&&ii(t)?t:wi(t)}function mi(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=wi(e),n=o===(null==(l=e.ownerDocument)?void 0:l.body),a=Kt(o);if(n){const e=yi(a);return t.concat(a,a.visualViewport||[],ii(o)?o:[],e&&i?mi(e):[])}return t.concat(o,mi(o,[],i))}function yi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xi(e){const t=pi(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=Qt(e),n=o?e.offsetWidth:i,a=o?e.offsetHeight:l,r=xt(i)!==n||xt(l)!==a;return r&&(i=n,l=a),{width:i,height:l,$:r}}function Ci(e){return Xt(e)?e:e.contextElement}function bi(e){const t=Ci(e);if(!Qt(t))return bt(1);const i=t.getBoundingClientRect(),{width:l,height:o,$:n}=xi(t);let a=(n?xt(i.width):i.width)/l,r=(n?xt(i.height):i.height)/o;return a&&Number.isFinite(a)||(a=1),r&&Number.isFinite(r)||(r=1),{x:a,y:r}}const _i=bt(0);function Zi(e){const t=Kt(e);return hi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_i}function Mi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),n=Ci(e);let a=bt(1);t&&(l?Xt(l)&&(a=bi(l)):a=bi(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Kt(e))&&t}(n,i,l)?Zi(n):bt(0);let s=(o.left+r.x)/a.x,c=(o.top+r.y)/a.y,d=o.width/a.x,h=o.height/a.y;if(n){const e=Kt(n),t=l&&Xt(l)?Kt(l):l;let i=e,o=yi(i);for(;o&&l&&t!==i;){const e=bi(o),t=o.getBoundingClientRect(),l=pi(o),n=t.left+(o.clientLeft+parseFloat(l.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(l.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,h*=e.y,s+=n,c+=a,i=Kt(o),o=yi(i)}}return Nt({width:d,height:h,x:s,y:c})}function Vi(e,t){const i=gi(e).scrollLeft;return t?t.left+i:Mi(Gt(e)).left+i}function Hi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Vi(e,i),y:i.top+t.scrollTop}}const Si=25;const $i=new Set(["absolute","fixed"]);function Bi(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Kt(e),l=Gt(e),o=i.visualViewport;let n=l.clientWidth,a=l.clientHeight,r=0,s=0;if(o){n=o.width,a=o.height;const e=hi();(!e||e&&"fixed"===t)&&(r=o.offsetLeft,s=o.offsetTop)}const c=Vi(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<=Si&&(n-=a)}else c<=Si&&(n+=c);return{width:n,height:a,x:r,y:s}}(e,i);else if("document"===t)l=function(e){const t=Gt(e),i=gi(e),l=e.ownerDocument.body,o=yt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),n=yt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let a=-i.scrollLeft+Vi(e);const r=-i.scrollTop;return"rtl"===pi(l).direction&&(a+=yt(t.clientWidth,l.clientWidth)-o),{width:o,height:n,x:a,y:r}}(Gt(e));else if(Xt(t))l=function(e,t){const i=Mi(e,!0,"fixed"===t),l=i.top+e.clientTop,o=i.left+e.clientLeft,n=Qt(e)?bi(e):bt(1);return{width:e.clientWidth*n.x,height:e.clientHeight*n.y,x:o*n.x,y:l*n.y}}(t,i);else{const i=Zi(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Nt(l)}function ki(e,t){const i=fi(e);return!(i===t||!Xt(i)||ui(i))&&("fixed"===pi(i).position||ki(i,t))}function Pi(e,t,i){const l=Qt(t),o=Gt(t),n="fixed"===i,a=Mi(e,!0,n,t);let r={scrollLeft:0,scrollTop:0};const s=bt(0);function c(){s.x=Vi(o)}if(l||!l&&!n)if(("body"!==Jt(t)||ii(o))&&(r=gi(t)),l){const e=Mi(t,!0,n,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();n&&!l&&o&&c();const d=!o||l||n?bt(0):Hi(o,r);return{x:a.left+r.scrollLeft-s.x-d.x,y:a.top+r.scrollTop-s.y-d.y,width:a.width,height:a.height}}function Li(e){return"static"===pi(e).position}function Ai(e,t){if(!Qt(e)||"fixed"===pi(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Gt(e)===i&&(i=i.ownerDocument.body),i}function Ei(e,t){const i=Kt(e);if(ai(e))return i;if(!Qt(e)){let t=fi(e);for(;t&&!ui(t);){if(Xt(t)&&!Li(t))return t;t=fi(t)}return i}let l=Ai(e,t);for(;l&&oi(l)&&Li(l);)l=Ai(l,t);return l&&ui(l)&&Li(l)&&!di(l)?i:l||function(e){let t=fi(e);for(;Qt(t)&&!ui(t);){if(di(t))return t;if(ai(t))return null;t=fi(t)}return null}(e)||i}const Ti={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:o}=e;const n="fixed"===o,a=Gt(l),r=!!t&&ai(t.floating);if(l===a||r&&n)return i;let s={scrollLeft:0,scrollTop:0},c=bt(1);const d=bt(0),h=Qt(l);if((h||!h&&!n)&&(("body"!==Jt(l)||ii(a))&&(s=gi(l)),Qt(l))){const e=Mi(l);c=bi(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!a||h||n?bt(0):Hi(a,s);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-s.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-s.scrollTop*c.y+d.y+v.y}},getDocumentElement:Gt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:o}=e;const n=[..."clippingAncestors"===i?ai(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=mi(e,[],!1).filter((e=>Xt(e)&&"body"!==Jt(e))),o=null;const n="fixed"===pi(e).position;let a=n?fi(e):e;for(;Xt(a)&&!ui(a);){const t=pi(a),i=di(a);i||"fixed"!==t.position||(o=null),(n?!i&&!o:!i&&"static"===t.position&&o&&$i.has(o.position)||ii(a)&&!i&&ki(e,a))?l=l.filter((e=>e!==a)):o=t,a=fi(a)}return t.set(e,l),l}(t,this._c):[].concat(i),l],a=n[0],r=n.reduce(((e,i)=>{const l=Bi(t,i,o);return e.top=yt(l.top,e.top),e.right=mt(l.right,e.right),e.bottom=mt(l.bottom,e.bottom),e.left=yt(l.left,e.left),e}),Bi(t,a,o));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:Ei,getElementRects:async function(e){const t=this.getOffsetParent||Ei,i=this.getDimensions,l=await i(e.floating);return{reference:Pi(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}=xi(e);return{width:t,height:i}},getScale:bi,isElement:Xt,isRTL:function(e){return"rtl"===pi(e).direction}};function Oi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ri(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:o=!0,ancestorResize:n=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:s=!1}=l,c=Ci(e),d=o||n?[...c?mi(c):[],...mi(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",i,{passive:!0}),n&&e.addEventListener("resize",i)}));const h=c&&r?function(e,t){let i,l=null;const o=Gt(e);function n(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function a(r,s){void 0===r&&(r=!1),void 0===s&&(s=1),n();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=c;if(r||t(),!v||!u)return;const p={rootMargin:-Ct(h)+"px "+-Ct(o.clientWidth-(d+v))+"px "+-Ct(o.clientHeight-(h+u))+"px "+-Ct(d)+"px",threshold:yt(0,mt(1,s))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==s){if(!g)return a();l?a(!1,l):i=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==l||Oi(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),n}(c,i):null;let v,u=-1,p=null;a&&(p=new ResizeObserver((e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),i()})),c&&!s&&p.observe(c),p.observe(t));let g=s?Mi(e):null;return s&&function t(){const l=Mi(e);g&&!Oi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",i),n&&e.removeEventListener("resize",i)})),null==h||h(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(v)}}const Ii=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:o,y:n,placement:a,middlewareData:r}=t,s=await async function(e,t){const{placement:i,platform:l,elements:o}=e,n=await(null==l.isRTL?void 0:l.isRTL(o.floating)),a=Ht(i),r=St(i),s="y"===Pt(i),c=qt.has(a)?-1:1,d=n&&s?-1:1,h=Vt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof p&&(u="end"===r?-1*p:p),s?{x:u*d,y:v*c}:{x:v*c,y:u*d}}(t,e);return a===(null==(i=r.offset)?void 0:i.placement)&&null!=(l=r.arrow)&&l.alignmentOffset?{}:{x:o+s.x,y:n+s.y,data:{...s,placement:a}}}}},Ui=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:o}=t,{mainAxis:n=!0,crossAxis:a=!1,limiter:r={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...s}=Vt(e,t),c={x:i,y:l},d=await Wt(t,s),h=Pt(Ht(o)),v=$t(h);let u=c[v],p=c[h];if(n){const e="y"===v?"bottom":"right";u=Mt(u+d["y"===v?"top":"left"],u,u-d[e])}if(a){const e="y"===h?"bottom":"right";p=Mt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=r.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:n,[h]:a}}}}}},zi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:o,middlewareData:n,rects:a,initialPlacement:r,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=Vt(e,t);if(null!=(i=n.arrow)&&i.alignmentOffset)return{};const w=Ht(o),m=Pt(r),y=Ht(r)===r,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=v||(y||!g?[zt(r)]:function(e){const t=zt(e);return[Et(e),t,Et(t)]}(r)),b="none"!==p;!v&&b&&C.push(...Ut(r,g,p,x));const _=[r,...C],Z=await Wt(t,f),M=[];let V=(null==(l=n.flip)?void 0:l.overflows)||[];if(d&&M.push(Z[w]),h){const e=At(o,a,x);M.push(Z[e[0]],Z[e[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every((e=>e<=0))){var H,S;const e=((null==(H=n.flip)?void 0:H.index)||0)+1,t=_[e];if(t){if(!("alignment"===h&&m!==Pt(t))||V.every((e=>Pt(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(S=V.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!i)switch(u){case"bestFit":{var $;const e=null==($=V.filter((e=>{if(b){const t=Pt(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:$[0];e&&(i=e);break}case"initialPlacement":i=r}if(o!==i)return{reset:{placement:i}}}return{}}}},Di=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:o,rects:n,platform:a,elements:r}=t,{apply:s=()=>{},...c}=Vt(e,t),d=await Wt(t,c),h=Ht(o),v=St(o),u="y"===Pt(o),{width:p,height:g}=n.floating;let f,w;"top"===h||"bottom"===h?(f=h,w=v===(await(null==a.isRTL?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(w=h,f="end"===v?"top":"bottom");const m=g-d.top-d.bottom,y=p-d.left-d.right,x=mt(g-d[f],m),C=mt(p-d[w],y),b=!t.middlewareData.shift;let _=x,Z=C;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(Z=y),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(_=m),b&&!v){const e=yt(d.left,0),t=yt(d.right,0),i=yt(d.top,0),l=yt(d.bottom,0);u?Z=p-2*(0!==e||0!==t?e+t:yt(d.left,d.right)):_=g-2*(0!==i||0!==l?i+l:yt(d.top,d.bottom))}await s({...t,availableWidth:Z,availableHeight:_});const M=await a.getDimensions(r.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},Ni=(e,t,i)=>{const l=new Map,o={platform:Ti,...i},n={...o.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:n=[],platform:a}=i,r=n.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=Ft(c,l,s),v=l,u={},p=0;for(let i=0;i<r.length;i++){const{name:n,fn:g}=r[i],{x:f,y:w,data:m,reset:y}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:o,middlewareData:u,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=w?w:h,u={...u,[n]:{...u[n],...m}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(v=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:h}=Ft(c,v,s))),i=-1)}return{x:d,y:h,placement:v,strategy:o,middlewareData:u}})(e,t,{...o,platform:n})};var Fi=_e`: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%}`,Wi=_e`.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)}`,qi=_e`.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)}`,ji=_e`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-2);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-neutral-color-default);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;function Ji(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Ki{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 Gi=e=>{class i extends e{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Ki(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,t([et("sgds-input")],i.prototype,"sgdsInput",void 0),t([et("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var Yi=_e`: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 Xi extends Ne{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}))})))}}Xi.styles=[Yi],Xi.dependencies={},t([Ge({type:Boolean,reflect:!0})],Xi.prototype,"ssr",void 0);class Qi extends Xi{constructor(){super(...arguments),this.myDropdown=pt(),this.dropdownMenuId=Ji("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=pt(),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=Ri(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),n=l.indexOf(o);return-1!==n?t[n]: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=[Ii(8),this.noFlip?void 0:zi(),Ui()].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:n,strategy:a,placement:r}=await Ni(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:a,left:`${o}px`,top:`${n}px`})}}t([Ge({type:Boolean,state:!0})],Qi.prototype,"noFlip",void 0),t([Ge({type:Boolean,reflect:!0,state:!0})],Qi.prototype,"menuAlignRight",void 0),t([Ge({type:String,reflect:!0,state:!0})],Qi.prototype,"drop",void 0),t([Ge({type:Object})],Qi.prototype,"floatingOpts",void 0),t([Ge({type:Boolean,reflect:!0})],Qi.prototype,"menuIsOpen",void 0),t([Ge({type:Boolean,reflect:!0})],Qi.prototype,"disabled",void 0),t([Ge({type:Boolean,reflect:!0})],Qi.prototype,"readonly",void 0);class el extends Qi{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),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 tl,il;el.styles=Qi.styles,t([(tl="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(tl)??null;if(null===i&&il&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Qe("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${tl}' 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(il){const{get:o,set:n}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return Xe(e,t,{get(){let e=o.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&n.call(this,e)),e}})}return Xe(e,t,{get(){return l(this)}})})],el.prototype,"menu",void 0),t([Ye()],el.prototype,"nextDropdownItemNo",void 0),t([Ye()],el.prototype,"prevDropdownItemNo",void 0),t([Ge({type:Boolean,reflect:!0})],el.prototype,"hidden",void 0);class ll extends(Gi(el)){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=Ji("input"),this._labelId=Ji("label"),this.floatingOpts={middleware:[Di({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">
98
98
  <slot name="invalidIcon">
99
99
  <sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
100
100
  </slot>