@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.
- package/base/button.js +1 -1
- package/components/Alert/index.umd.min.js +17 -17
- package/components/Alert/index.umd.min.js.map +1 -1
- package/components/Alert/sgds-alert.d.ts +1 -1
- package/components/Alert/sgds-alert.js +2 -2
- package/components/Alert/sgds-alert.js.map +1 -1
- package/components/Badge/index.umd.min.js +16 -16
- package/components/Badge/index.umd.min.js.map +1 -1
- package/components/Badge/sgds-badge.d.ts +1 -1
- package/components/Badge/sgds-badge.js +2 -2
- package/components/Badge/sgds-badge.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +17 -17
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Breadcrumb/sgds-breadcrumb-item.d.ts +1 -0
- package/components/Breadcrumb/sgds-breadcrumb-item.js +5 -2
- package/components/Breadcrumb/sgds-breadcrumb-item.js.map +1 -1
- package/components/Button/index.umd.min.js +1 -1
- package/components/Card/index.umd.min.js.map +1 -1
- package/components/Card/sgds-card.js.map +1 -1
- package/components/CloseButton/close-button.js +6 -0
- package/components/CloseButton/index.js +5 -0
- package/components/CloseButton/index.js.map +1 -0
- package/components/CloseButton/index.umd.min.js +50 -0
- package/components/CloseButton/index.umd.min.js.map +1 -0
- package/{internals → components}/CloseButton/sgds-close-button.d.ts +2 -4
- package/{internals → components}/CloseButton/sgds-close-button.js +4 -10
- package/components/CloseButton/sgds-close-button.js.map +1 -0
- package/components/ComboBox/index.umd.min.js +18 -18
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +1 -1
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Drawer/index.umd.min.js +6 -11
- package/components/Drawer/index.umd.min.js.map +1 -1
- package/components/Drawer/sgds-drawer.d.ts +1 -1
- package/components/Drawer/sgds-drawer.js +1 -1
- package/components/Drawer/sgds-drawer.js.map +1 -1
- package/components/FileUpload/index.umd.min.js +26 -26
- package/components/FileUpload/index.umd.min.js.map +1 -1
- package/components/FileUpload/sgds-file-upload.d.ts +1 -1
- package/components/FileUpload/sgds-file-upload.js +1 -1
- package/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/components/Footer/footer-item.js +1 -1
- package/components/Footer/footer.js +1 -1
- package/components/Footer/index.umd.min.js +17 -17
- package/components/Footer/index.umd.min.js.map +1 -1
- package/components/Footer/sgds-footer-item.d.ts +1 -0
- package/components/Footer/sgds-footer-item.js +11 -1
- package/components/Footer/sgds-footer-item.js.map +1 -1
- package/components/Footer/sgds-footer.js +7 -7
- package/components/Footer/sgds-footer.js.map +1 -1
- package/components/IconButton/index.umd.min.js +1 -1
- package/components/IconCard/index.umd.min.js.map +1 -1
- package/components/IconCard/sgds-icon-card.js.map +1 -1
- package/components/ImageCard/index.umd.min.js.map +1 -1
- package/components/ImageCard/sgds-image-card.js.map +1 -1
- package/components/Input/index.umd.min.js.map +1 -1
- package/components/Input/sgds-input.js.map +1 -1
- package/components/Link/index.umd.min.js +9 -9
- package/components/Link/index.umd.min.js.map +1 -1
- package/components/Link/link.js +1 -1
- package/components/Link/sgds-link.d.ts +7 -1
- package/components/Link/sgds-link.js +28 -2
- package/components/Link/sgds-link.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +1 -1
- package/components/Modal/index.umd.min.js +4 -4
- package/components/Modal/index.umd.min.js.map +1 -1
- package/components/Modal/sgds-modal.d.ts +1 -1
- package/components/Modal/sgds-modal.js +2 -2
- package/components/Modal/sgds-modal.js.map +1 -1
- package/components/Pagination/index.umd.min.js +1 -1
- package/components/QuantityToggle/index.umd.min.js +1 -1
- package/components/QuantityToggle/index.umd.min.js.map +1 -1
- package/components/Subnav/index.umd.min.js +11 -9
- package/components/Subnav/index.umd.min.js.map +1 -1
- package/components/Subnav/sgds-subnav.d.ts +4 -0
- package/components/Subnav/sgds-subnav.js +18 -2
- package/components/Subnav/sgds-subnav.js.map +1 -1
- package/components/Subnav/subnav.js +1 -1
- package/components/SystemBanner/index.d.ts +6 -0
- package/components/SystemBanner/index.js +6 -0
- package/components/SystemBanner/index.js.map +1 -0
- package/components/SystemBanner/index.umd.min.js +2101 -0
- package/components/SystemBanner/index.umd.min.js.map +1 -0
- package/components/SystemBanner/sgds-system-banner-item.d.ts +24 -0
- package/components/SystemBanner/sgds-system-banner-item.js +93 -0
- package/components/SystemBanner/sgds-system-banner-item.js.map +1 -0
- package/components/SystemBanner/sgds-system-banner.d.ts +51 -0
- package/components/SystemBanner/sgds-system-banner.js +224 -0
- package/components/SystemBanner/sgds-system-banner.js.map +1 -0
- package/components/SystemBanner/system-banner-context.d.ts +3 -0
- package/components/SystemBanner/system-banner-context.js +6 -0
- package/components/SystemBanner/system-banner-context.js.map +1 -0
- package/components/SystemBanner/system-banner-item.js +6 -0
- package/components/SystemBanner/system-banner-item.js.map +1 -0
- package/components/SystemBanner/system-banner.js +6 -0
- package/components/SystemBanner/system-banner.js.map +1 -0
- package/components/Toast/index.umd.min.js +12 -12
- package/components/Toast/index.umd.min.js.map +1 -1
- package/components/Toast/sgds-toast.d.ts +1 -1
- package/components/Toast/sgds-toast.js +2 -2
- package/components/Toast/sgds-toast.js.map +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/components/index.umd.min.js +168 -136
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +3 -0
- package/index.d.ts +3 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.umd.min.js +212 -161
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/button.cjs.js +1 -1
- package/react/base/button.js +1 -1
- package/react/close-button/index.cjs.js +40 -0
- package/react/close-button/index.cjs.js.map +1 -0
- package/react/close-button/index.d.ts +2 -0
- package/react/close-button/index.js +16 -0
- package/react/close-button/index.js.map +1 -0
- package/react/components/Alert/sgds-alert.cjs.js +2 -2
- package/react/components/Alert/sgds-alert.cjs.js.map +1 -1
- package/react/components/Alert/sgds-alert.js +2 -2
- package/react/components/Alert/sgds-alert.js.map +1 -1
- package/react/components/Badge/sgds-badge.cjs.js +2 -2
- package/react/components/Badge/sgds-badge.cjs.js.map +1 -1
- package/react/components/Badge/sgds-badge.js +2 -2
- package/react/components/Badge/sgds-badge.js.map +1 -1
- package/react/components/Breadcrumb/sgds-breadcrumb-item.cjs.js +5 -2
- package/react/components/Breadcrumb/sgds-breadcrumb-item.cjs.js.map +1 -1
- package/react/components/Breadcrumb/sgds-breadcrumb-item.js +5 -2
- package/react/components/Breadcrumb/sgds-breadcrumb-item.js.map +1 -1
- package/react/components/Card/sgds-card.cjs.js.map +1 -1
- package/react/components/Card/sgds-card.js.map +1 -1
- package/react/components/CloseButton/close-button.cjs.js +11 -0
- package/react/components/CloseButton/close-button.js +7 -0
- package/react/{internals → components}/CloseButton/sgds-close-button.cjs.js +4 -10
- package/react/components/CloseButton/sgds-close-button.cjs.js.map +1 -0
- package/react/{internals → components}/CloseButton/sgds-close-button.js +4 -10
- package/react/components/CloseButton/sgds-close-button.js.map +1 -0
- package/react/components/Drawer/sgds-drawer.cjs.js +1 -1
- package/react/components/Drawer/sgds-drawer.cjs.js.map +1 -1
- package/react/components/Drawer/sgds-drawer.js +1 -1
- package/react/components/Drawer/sgds-drawer.js.map +1 -1
- package/react/components/FileUpload/sgds-file-upload.cjs.js +1 -1
- package/react/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
- package/react/components/FileUpload/sgds-file-upload.js +1 -1
- package/react/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/react/components/Footer/footer-item.cjs.js +1 -1
- package/react/components/Footer/footer-item.js +1 -1
- package/react/components/Footer/footer.cjs.js +1 -1
- package/react/components/Footer/footer.js +1 -1
- package/react/components/Footer/sgds-footer-item.cjs.js +11 -1
- package/react/components/Footer/sgds-footer-item.cjs.js.map +1 -1
- package/react/components/Footer/sgds-footer-item.js +11 -1
- package/react/components/Footer/sgds-footer-item.js.map +1 -1
- package/react/components/Footer/sgds-footer.cjs.js +7 -7
- package/react/components/Footer/sgds-footer.cjs.js.map +1 -1
- package/react/components/Footer/sgds-footer.js +7 -7
- package/react/components/Footer/sgds-footer.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.js.map +1 -1
- package/react/components/Input/sgds-input.cjs.js.map +1 -1
- package/react/components/Input/sgds-input.js.map +1 -1
- package/react/components/Link/link.cjs.js +1 -1
- package/react/components/Link/link.js +1 -1
- package/react/components/Link/sgds-link.cjs.js +28 -2
- package/react/components/Link/sgds-link.cjs.js.map +1 -1
- package/react/components/Link/sgds-link.js +28 -2
- package/react/components/Link/sgds-link.js.map +1 -1
- package/react/components/Modal/sgds-modal.cjs.js +2 -2
- package/react/components/Modal/sgds-modal.cjs.js.map +1 -1
- package/react/components/Modal/sgds-modal.js +2 -2
- package/react/components/Modal/sgds-modal.js.map +1 -1
- package/react/components/Subnav/sgds-subnav.cjs.js +17 -1
- package/react/components/Subnav/sgds-subnav.cjs.js.map +1 -1
- package/react/components/Subnav/sgds-subnav.js +18 -2
- package/react/components/Subnav/sgds-subnav.js.map +1 -1
- package/react/components/Subnav/subnav.cjs.js +1 -1
- package/react/components/Subnav/subnav.js +1 -1
- package/react/components/SystemBanner/sgds-system-banner-item.cjs.js +99 -0
- package/react/components/SystemBanner/sgds-system-banner-item.cjs.js.map +1 -0
- package/react/components/SystemBanner/sgds-system-banner-item.js +94 -0
- package/react/components/SystemBanner/sgds-system-banner-item.js.map +1 -0
- package/react/components/SystemBanner/sgds-system-banner.cjs.js +230 -0
- package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -0
- package/react/components/SystemBanner/sgds-system-banner.js +225 -0
- package/react/components/SystemBanner/sgds-system-banner.js.map +1 -0
- package/react/components/SystemBanner/system-banner-context.cjs.js +11 -0
- package/react/components/SystemBanner/system-banner-context.cjs.js.map +1 -0
- package/react/components/SystemBanner/system-banner-context.js +7 -0
- package/react/components/SystemBanner/system-banner-context.js.map +1 -0
- package/react/components/SystemBanner/system-banner-item.cjs.js +11 -0
- package/react/components/SystemBanner/system-banner-item.cjs.js.map +1 -0
- package/react/components/SystemBanner/system-banner-item.js +7 -0
- package/react/components/SystemBanner/system-banner-item.js.map +1 -0
- package/react/components/SystemBanner/system-banner.cjs.js +11 -0
- package/react/components/SystemBanner/system-banner.cjs.js.map +1 -0
- package/react/components/SystemBanner/system-banner.js +7 -0
- package/react/components/SystemBanner/system-banner.js.map +1 -0
- package/react/components/Toast/sgds-toast.cjs.js +2 -2
- package/react/components/Toast/sgds-toast.cjs.js.map +1 -1
- package/react/components/Toast/sgds-toast.js +2 -2
- package/react/components/Toast/sgds-toast.js.map +1 -1
- package/react/index.cjs.js +114 -108
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +3 -0
- package/react/index.js +3 -0
- package/react/index.js.map +1 -1
- package/react/system-banner/index.cjs.js +43 -0
- package/react/system-banner/index.cjs.js.map +1 -0
- package/react/system-banner/index.d.ts +2 -0
- package/react/system-banner/index.js +19 -0
- package/react/system-banner/index.js.map +1 -0
- package/react/system-banner-item/index.cjs.js +42 -0
- package/react/system-banner-item/index.cjs.js.map +1 -0
- package/react/system-banner-item/index.d.ts +2 -0
- package/react/system-banner-item/index.js +18 -0
- package/react/system-banner-item/index.js.map +1 -0
- package/themes/root.css +14 -2
- package/internals/CloseButton/close-button.js +0 -6
- package/internals/CloseButton/sgds-close-button.js.map +0 -1
- package/react/internals/CloseButton/close-button.cjs.js +0 -11
- package/react/internals/CloseButton/close-button.js +0 -7
- package/react/internals/CloseButton/sgds-close-button.cjs.js.map +0 -1
- package/react/internals/CloseButton/sgds-close-button.js.map +0 -1
- package/utils/test.d.ts +0 -28
- /package/{internals → components}/CloseButton/close-button.js.map +0 -0
- /package/{internals → components}/CloseButton/index.d.ts +0 -0
- /package/react/{internals → components}/CloseButton/close-button.cjs.js.map +0 -0
- /package/react/{internals → components}/CloseButton/close-button.js.map +0 -0
|
@@ -15,18 +15,18 @@ const s=globalThis,i=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow
|
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
const S=globalThis,M=e=>{S.emitLitDebugLogEvents&&S.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let $,D=0;S.litIssuedWarnings??=new Set,$=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",S.litIssuedWarnings.has(t)||(console.warn(t),S.litIssuedWarnings.add(t))},$("dev-mode","Lit is in dev mode. Not recommended for production!");const A=S.ShadyDOM?.inUse&&!0===S.ShadyDOM?.noPatch?S.ShadyDOM.wrap:e=>e,V=S.trustedTypes,E=V?V.createPolicy("lit-html",{createHTML:e=>e}):void 0,I=e=>e,B=(e,t,s)=>I,P=e=>{if(ne!==B)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ne=e},T=()=>{ne=B},L=(e,t,s)=>ne(e,t,s),F="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+Z,z=`<${H}>`,R=document,O=()=>R.createComment(""),N=e=>null===e||"object"!=typeof e&&"function"!=typeof e,U=Array.isArray,q=e=>U(e)||"function"==typeof e?.[Symbol.iterator],Y="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,K=/>/g,G=new RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,Q=/"/g,J=/^(?:script|style|textarea|title)$/i,ee=(te=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$))&&$("","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$:te,strings:e,values:t}));var te;const se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,oe=R.createTreeWalker(R,129);let ne=B;function re(e,t){if(!U(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!==E?E.createHTML(t):t}const le=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=j;for(let t=0;t<s;t++){const s=e[t];let r,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===j){if("!--"===l[1])n=W;else if(void 0!==l[1])n=K;else if(void 0!==l[2])J.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=G;else if(void 0!==l[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 n===G?">"===l[0]?(n=a??j,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?G:'"'===l[3]?Q:X):n===Q||n===X?n=G:n===W||n===K?n=j:(n=G,a=void 0);console.assert(-1===d||n===G||n===X||n===Q,"unexpected parse state B");const h=n===G&&e[t+1].startsWith("/>")?" ":"";o+=n===j?s+z:d>=0?(i.push(r),s.slice(0,d)+F+s.slice(d)+Z+h):s+Z+(-2===d?t:h)}return[re(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class de{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let a=0,o=0;const n=e.length-1,r=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,s),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=oe.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(Z)){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);$("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(F)){const t=d[o++],s=i.getAttribute(e).split(Z),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?ge:"?"===n[1]?ve:"@"===n[1]?me:pe}),i.removeAttribute(e)}else e.startsWith(Z)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(J.test(i.tagName)){const e=i.textContent.split(Z),t=e.length-1;if(t>0){i.textContent=V?V.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],O()),oe.nextNode(),r.push({type:2,index:++a});i.append(e[t],O())}}}else if(8===i.nodeType){if(i.data===H)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(Z,e+1));)r.push({type:7,index:a}),e+=Z.length-1}}a++}if(d.length!==o)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 s=R.createElement("template");return s.innerHTML=e,s}}function ce(e,t,s=e,i){if(t===se)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=N(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,s,i)),void 0!==i?(s.__directives??=[])[i]=a:s.__directive=a),void 0!==a&&(t=ce(e,a._$resolve(e,t.values),a,i)),t}class he{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:s}=this._$template,i=(e?.creationScope??R).importNode(t,!0);oe.currentNode=i;let a=oe.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new ue(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new fe(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=oe.nextNode(),o++)}return oe.currentNode=R,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(M&&M({kind:"set part",part:s,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==s.strings?(s._$setValue(e,s,t),t+=s.strings.length-2):s._$setValue(e[t])),t++}}class ue{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=A(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),N(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!==se&&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 q(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return A(A(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ne!==B){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&&N(this._$committedValue)){const t=A(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=L(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=R.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=L(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$:s}=e,i="number"==typeof s?this._$getTemplate(e):(void 0===s.el&&(s.el=de.createElement(re(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)M&&M({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new he(i,this),s=e._clone(this.options);M&&M({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),e._update(t),M&&M({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),this._commitNode(s),this._$committedValue=e}}_$getTemplate(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}_commitIterable(e){U(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let s,i=0;for(const a of e)i===t.length?t.push(s=new ue(this._insert(O()),this._insert(O()),this,this.options)):s=t[i],s._$setValue(a),i++;i<t.length&&(this._$clear(s&&A(s._$endNode).nextSibling,i),t.length=i)}_$clear(e=A(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e&&e!==this._$endNode;){const t=A(e).nextSibling;A(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 pe{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!N(e)||e!==this._$committedValue&&e!==se,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=ce(this,i[s+n],t,n),r===se&&(r=this._$committedValue[n]),o||=!N(r)||r!==this._$committedValue[n],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===ie?A(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ne(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}),A(this.element).setAttribute(this.name,e??""))}}class ge extends pe{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ne(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 ve extends pe{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}),A(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class me extends pe{constructor(e,t,s,i,a){if(super(e,t,s,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??ie)===se)return;const s=this._$committedValue,i=e===ie&&s!==ie||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==ie&&(s===ie||i);M&&M({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),a&&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,s){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}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 be={_boundAttributeSuffix:F,_marker:Z,_markerMatch:H,_HTML_RESULT:1,_getTemplateHtml:le,_TemplateInstance:he,_isIterable:q,_resolveDirective:ce,_ChildPart:ue,_AttributePart:pe,_BooleanAttributePart:ve,_EventPart:me,_PropertyPart:ge,_ElementPart:fe},we=S.litHtmlPolyfillSupportDevMode;we?.(de,ue),(S.litHtmlVersions??=[]).push("3.2.0"),S.litHtmlVersions.length>1&&$("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const ye=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=D++,a=s?.renderBefore??t;let o=a._$litPart$;if(M&&M({kind:"begin render",id:i,value:e,container:t,options:s,part:o}),void 0===o){const e=s?.renderBefore??null;a._$litPart$=o=new ue(t.insertBefore(O(),e),e,void 0,s??{})}return o._$setValue(e),M&&M({kind:"end render",id:i,value:e,container:t,options:s,part:o}),o};ye.setSanitizer=P,ye.createSanitizer=L,ye._testOnlyClearSanitizerFactoryDoNotCallOrElse=T;
|
|
18
|
+
const S=globalThis,M=e=>{S.emitLitDebugLogEvents&&S.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let $,A=0;S.litIssuedWarnings??=new Set,$=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",S.litIssuedWarnings.has(t)||(console.warn(t),S.litIssuedWarnings.add(t))},$("dev-mode","Lit is in dev mode. Not recommended for production!");const D=S.ShadyDOM?.inUse&&!0===S.ShadyDOM?.noPatch?S.ShadyDOM.wrap:e=>e,V=S.trustedTypes,E=V?V.createPolicy("lit-html",{createHTML:e=>e}):void 0,I=e=>e,B=(e,t,s)=>I,P=e=>{if(ne!==B)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ne=e},T=()=>{ne=B},L=(e,t,s)=>ne(e,t,s),F="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+Z,z=`<${H}>`,R=document,O=()=>R.createComment(""),N=e=>null===e||"object"!=typeof e&&"function"!=typeof e,U=Array.isArray,q=e=>U(e)||"function"==typeof e?.[Symbol.iterator],Y="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,K=/>/g,G=new RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,Q=/"/g,J=/^(?:script|style|textarea|title)$/i,ee=(te=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$))&&$("","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$:te,strings:e,values:t}));var te;const se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,oe=R.createTreeWalker(R,129);let ne=B;function re(e,t){if(!U(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!==E?E.createHTML(t):t}const le=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=j;for(let t=0;t<s;t++){const s=e[t];let r,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===j){if("!--"===l[1])n=W;else if(void 0!==l[1])n=K;else if(void 0!==l[2])J.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=G;else if(void 0!==l[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 n===G?">"===l[0]?(n=a??j,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?G:'"'===l[3]?Q:X):n===Q||n===X?n=G:n===W||n===K?n=j:(n=G,a=void 0);console.assert(-1===d||n===G||n===X||n===Q,"unexpected parse state B");const h=n===G&&e[t+1].startsWith("/>")?" ":"";o+=n===j?s+z:d>=0?(i.push(r),s.slice(0,d)+F+s.slice(d)+Z+h):s+Z+(-2===d?t:h)}return[re(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class de{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let a=0,o=0;const n=e.length-1,r=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,s),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=oe.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(Z)){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);$("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(F)){const t=d[o++],s=i.getAttribute(e).split(Z),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?ge:"?"===n[1]?ve:"@"===n[1]?me:pe}),i.removeAttribute(e)}else e.startsWith(Z)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(J.test(i.tagName)){const e=i.textContent.split(Z),t=e.length-1;if(t>0){i.textContent=V?V.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],O()),oe.nextNode(),r.push({type:2,index:++a});i.append(e[t],O())}}}else if(8===i.nodeType){if(i.data===H)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(Z,e+1));)r.push({type:7,index:a}),e+=Z.length-1}}a++}if(d.length!==o)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 s=R.createElement("template");return s.innerHTML=e,s}}function ce(e,t,s=e,i){if(t===se)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=N(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,s,i)),void 0!==i?(s.__directives??=[])[i]=a:s.__directive=a),void 0!==a&&(t=ce(e,a._$resolve(e,t.values),a,i)),t}class he{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:s}=this._$template,i=(e?.creationScope??R).importNode(t,!0);oe.currentNode=i;let a=oe.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new ue(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new fe(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=oe.nextNode(),o++)}return oe.currentNode=R,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(M&&M({kind:"set part",part:s,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==s.strings?(s._$setValue(e,s,t),t+=s.strings.length-2):s._$setValue(e[t])),t++}}class ue{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=D(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),N(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!==se&&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 q(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return D(D(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ne!==B){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&&N(this._$committedValue)){const t=D(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=L(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=R.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=L(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$:s}=e,i="number"==typeof s?this._$getTemplate(e):(void 0===s.el&&(s.el=de.createElement(re(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)M&&M({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new he(i,this),s=e._clone(this.options);M&&M({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),e._update(t),M&&M({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),this._commitNode(s),this._$committedValue=e}}_$getTemplate(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}_commitIterable(e){U(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let s,i=0;for(const a of e)i===t.length?t.push(s=new ue(this._insert(O()),this._insert(O()),this,this.options)):s=t[i],s._$setValue(a),i++;i<t.length&&(this._$clear(s&&D(s._$endNode).nextSibling,i),t.length=i)}_$clear(e=D(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e&&e!==this._$endNode;){const t=D(e).nextSibling;D(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 pe{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!N(e)||e!==this._$committedValue&&e!==se,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=ce(this,i[s+n],t,n),r===se&&(r=this._$committedValue[n]),o||=!N(r)||r!==this._$committedValue[n],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===ie?D(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ne(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}),D(this.element).setAttribute(this.name,e??""))}}class ge extends pe{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ne(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 ve extends pe{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}),D(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class me extends pe{constructor(e,t,s,i,a){if(super(e,t,s,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??ie)===se)return;const s=this._$committedValue,i=e===ie&&s!==ie||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==ie&&(s===ie||i);M&&M({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),a&&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,s){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}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 be={_boundAttributeSuffix:F,_marker:Z,_markerMatch:H,_HTML_RESULT:1,_getTemplateHtml:le,_TemplateInstance:he,_isIterable:q,_resolveDirective:ce,_ChildPart:ue,_AttributePart:pe,_BooleanAttributePart:ve,_EventPart:me,_PropertyPart:ge,_ElementPart:fe},we=S.litHtmlPolyfillSupportDevMode;we?.(de,ue),(S.litHtmlVersions??=[]).push("3.2.0"),S.litHtmlVersions.length>1&&$("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const ye=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=A++,a=s?.renderBefore??t;let o=a._$litPart$;if(M&&M({kind:"begin render",id:i,value:e,container:t,options:s,part:o}),void 0===o){const e=s?.renderBefore??null;a._$litPart$=o=new ue(t.insertBefore(O(),e),e,void 0,s??{})}return o._$setValue(e),M&&M({kind:"end render",id:i,value:e,container:t,options:s,part:o}),o};ye.setSanitizer=P,ye.createSanitizer=L,ye._testOnlyClearSanitizerFactoryDoNotCallOrElse=T;
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2019 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
const xe=globalThis,ke=xe.ShadowRoot&&(void 0===xe.ShadyCSS||xe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_e=Symbol(),Ce=new WeakMap;class Se{constructor(e,t,s){if(this._$cssResult$=!0,s!==_e)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(ke&&void 0===e){const s=void 0!==t&&1===t.length;s&&(e=Ce.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ce.set(t,e))}return e}toString(){return this.cssText}}const Me=(e,...t)=>{const s=1===e.length?e[0]:t.reduce(((t,s,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(s)+e[i+1]),e[0]);return new Se(s,e,_e)},$e=e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return new Se("string"==typeof(s=t)?s:String(s),void 0,_e);var s},
|
|
24
|
+
const xe=globalThis,ke=xe.ShadowRoot&&(void 0===xe.ShadyCSS||xe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_e=Symbol(),Ce=new WeakMap;class Se{constructor(e,t,s){if(this._$cssResult$=!0,s!==_e)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(ke&&void 0===e){const s=void 0!==t&&1===t.length;s&&(e=Ce.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ce.set(t,e))}return e}toString(){return this.cssText}}const Me=(e,...t)=>{const s=1===e.length?e[0]:t.reduce(((t,s,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(s)+e[i+1]),e[0]);return new Se(s,e,_e)},$e=e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return new Se("string"==typeof(s=t)?s:String(s),void 0,_e);var s},Ae=ke?e=>e:e=>e instanceof CSSStyleSheet?$e(e):e
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/,{is:Ae,defineProperty:Ve,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:Ie,getOwnPropertySymbols:Be,getPrototypeOf:Pe}=Object,Te=globalThis;let Le;const Fe=Te.trustedTypes,Ze=Fe?Fe.emptyScript:"",He=Te.reactiveElementPolyfillSupportDevMode;{const e=Te.litIssuedWarnings??=new Set;Le=(t,s)=>{s+=` See https://lit.dev/msg/${t} for more information.`,e.has(s)||(console.warn(s),e.add(s))},Le("dev-mode","Lit is in dev mode. Not recommended for production!"),Te.ShadyDOM?.inUse&&void 0===He&&Le("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const ze=(e,t)=>e,Re={toAttribute(e,t){switch(t){case Boolean:e=e?Ze:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=null!==e;break;case Number:s=null===e?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch(e){s=null}}return s}},Oe=(e,t)=>!Ae(e,t),Ne={attribute:!0,type:String,converter:Re,reflect:!1,hasChanged:Oe};Symbol.metadata??=Symbol("metadata"),Te.litPropertyMetadata??=new WeakMap;class Ue 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=Ne){if(t.state&&(t.attribute=!1),this.__prepare(),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol.for(`${String(e)} (@property() cache)`),i=this.getPropertyDescriptor(e,s,t);void 0!==i&&Ve(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:a}=Ee(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==i){if("value"in(Ee(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.`);Le("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 i?.call(this)},set(t){const o=i?.call(this);a.call(this,t),this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ne}static __prepare(){if(this.hasOwnProperty(ze("elementProperties")))return;const e=Pe(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ze("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(ze("properties"))){const e=this.properties,t=[...Ie(e),...Be(e)];for(const s of t)this.createProperty(s,e[s])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,s]of t)this.elementProperties.set(e,s)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const s=this.__attributeNameForProperty(e,t);void 0!==s&&this.__attributeToPropertyMap.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&Le("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&Le("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 s=new Set(e.flat(1/0).reverse());for(const e of s)t.unshift(De(e))}else void 0!==e&&t.push(De(e));return t}static __attributeNameForProperty(e,t){const s=t.attribute;return!1===s?void 0:"string"==typeof s?s:"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 s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(ke)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const s of t){const t=document.createElement("style"),i=xe.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=s.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,s){this._$attributeToProperty(e,s)}__propertyToAttribute(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor.__attributeNameForProperty(e,s);if(void 0!==i&&!0===s.reflect){const a=(void 0!==s.converter?.toAttribute?s.converter:Re).toAttribute(t,s.type);this.constructor.enabledWarnings.includes("migration")&&void 0===a&&Le("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==a?this.removeAttribute(i):this.setAttribute(i,a),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const s=this.constructor,i=s.__attributeToPropertyMap.get(e);if(void 0!==i&&this.__reflectingProperty!==i){const e=s.getPropertyOptions(i),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Re;this.__reflectingProperty=i,this[i]=a.fromAttribute(t,e.type),this.__reflectingProperty=null}}requestUpdate(e,t,s){if(void 0!==e){e instanceof Event&&Le("","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()"),s??=this.constructor.getPropertyOptions(e);if(!(s.hasChanged??Oe)(this[e],t))return;this._$changeProperty(e,t,s)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,s){this._$changedProperties.has(e)||this._$changedProperties.set(e,t),!0===s.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&&Le("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"},Te.emitLitDebugLogEvents&&Te.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 Pe(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,s]of e)!0!==s.wrapped||this._$changedProperties.has(t)||void 0===this[t]||this._$changeProperty(t,this[t],s)}let t=!1;const s=this._$changedProperties;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this.__controllers?.forEach((e=>e.hostUpdate?.())),this.update(s)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(s)}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")&&Le("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){}}Ue.elementStyles=[],Ue.shadowRootOptions={mode:"open"},Ue[ze("elementProperties")]=new Map,Ue[ze("finalized")]=new Map,He?.({ReactiveElement:Ue});{Ue.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(ze("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Ue.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Ue.disableWarning=function(t){e(this);const s=this.enabledWarnings.indexOf(t);s>=0&&this.enabledWarnings.splice(s,1)}}(Te.reactiveElementVersions??=[]).push("2.0.4"),Te.reactiveElementVersions.length>1&&Le("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
|
|
29
|
+
*/,{is:De,defineProperty:Ve,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:Ie,getOwnPropertySymbols:Be,getPrototypeOf:Pe}=Object,Te=globalThis;let Le;const Fe=Te.trustedTypes,Ze=Fe?Fe.emptyScript:"",He=Te.reactiveElementPolyfillSupportDevMode;{const e=Te.litIssuedWarnings??=new Set;Le=(t,s)=>{s+=` See https://lit.dev/msg/${t} for more information.`,e.has(s)||(console.warn(s),e.add(s))},Le("dev-mode","Lit is in dev mode. Not recommended for production!"),Te.ShadyDOM?.inUse&&void 0===He&&Le("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const ze=(e,t)=>e,Re={toAttribute(e,t){switch(t){case Boolean:e=e?Ze:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=null!==e;break;case Number:s=null===e?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch(e){s=null}}return s}},Oe=(e,t)=>!De(e,t),Ne={attribute:!0,type:String,converter:Re,reflect:!1,hasChanged:Oe};Symbol.metadata??=Symbol("metadata"),Te.litPropertyMetadata??=new WeakMap;class Ue 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=Ne){if(t.state&&(t.attribute=!1),this.__prepare(),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol.for(`${String(e)} (@property() cache)`),i=this.getPropertyDescriptor(e,s,t);void 0!==i&&Ve(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:a}=Ee(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==i){if("value"in(Ee(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.`);Le("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 i?.call(this)},set(t){const o=i?.call(this);a.call(this,t),this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ne}static __prepare(){if(this.hasOwnProperty(ze("elementProperties")))return;const e=Pe(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ze("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(ze("properties"))){const e=this.properties,t=[...Ie(e),...Be(e)];for(const s of t)this.createProperty(s,e[s])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,s]of t)this.elementProperties.set(e,s)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const s=this.__attributeNameForProperty(e,t);void 0!==s&&this.__attributeToPropertyMap.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&Le("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&Le("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 s=new Set(e.flat(1/0).reverse());for(const e of s)t.unshift(Ae(e))}else void 0!==e&&t.push(Ae(e));return t}static __attributeNameForProperty(e,t){const s=t.attribute;return!1===s?void 0:"string"==typeof s?s:"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 s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(ke)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const s of t){const t=document.createElement("style"),i=xe.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=s.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,s){this._$attributeToProperty(e,s)}__propertyToAttribute(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor.__attributeNameForProperty(e,s);if(void 0!==i&&!0===s.reflect){const a=(void 0!==s.converter?.toAttribute?s.converter:Re).toAttribute(t,s.type);this.constructor.enabledWarnings.includes("migration")&&void 0===a&&Le("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==a?this.removeAttribute(i):this.setAttribute(i,a),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const s=this.constructor,i=s.__attributeToPropertyMap.get(e);if(void 0!==i&&this.__reflectingProperty!==i){const e=s.getPropertyOptions(i),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Re;this.__reflectingProperty=i,this[i]=a.fromAttribute(t,e.type),this.__reflectingProperty=null}}requestUpdate(e,t,s){if(void 0!==e){e instanceof Event&&Le("","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()"),s??=this.constructor.getPropertyOptions(e);if(!(s.hasChanged??Oe)(this[e],t))return;this._$changeProperty(e,t,s)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,s){this._$changedProperties.has(e)||this._$changedProperties.set(e,t),!0===s.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&&Le("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"},Te.emitLitDebugLogEvents&&Te.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 Pe(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,s]of e)!0!==s.wrapped||this._$changedProperties.has(t)||void 0===this[t]||this._$changeProperty(t,this[t],s)}let t=!1;const s=this._$changedProperties;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this.__controllers?.forEach((e=>e.hostUpdate?.())),this.update(s)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(s)}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")&&Le("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){}}Ue.elementStyles=[],Ue.shadowRootOptions={mode:"open"},Ue[ze("elementProperties")]=new Map,Ue[ze("finalized")]=new Map,He?.({ReactiveElement:Ue});{Ue.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(ze("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Ue.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Ue.disableWarning=function(t){e(this);const s=this.enabledWarnings.indexOf(t);s>=0&&this.enabledWarnings.splice(s,1)}}(Te.reactiveElementVersions??=[]).push("2.0.4"),Te.reactiveElementVersions.length>1&&Le("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
@@ -82,7 +82,7 @@ const ut=1,pt=2,gt=3,vt=4,mt=e=>(...t)=>({_$litDirective$:e,values:t});class ft{
|
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2018 Google LLC
|
|
84
84
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
85
|
-
*/const bt=mt(class extends ft{constructor(e){if(super(e),e.type!==ut||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const s=e.element.classList;for(const e of this._previousClasses)e in t||(s.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(s.add(e),this._previousClasses.add(e)):(s.remove(e),this._previousClasses.delete(e)))}return se}});function wt(e,t,s){return new Promise((i=>{if((null==s?void 0:s.duration)===1/0)throw new Error("Promise-based animations must be finite.");const a=e.animate(t,Object.assign(Object.assign({},s),{duration:yt()?0:null==s?void 0:s.duration}));a.addEventListener("cancel",i,{once:!0}),a.addEventListener("finish",i,{once:!0})}))}function yt(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function xt(e,t){return e.map((e=>Object.assign(Object.assign({},e),{height:"auto"===e.height?`${t}px`:e.height})))}function kt(e){return Promise.all(e.getAnimations().map((e=>new Promise((t=>{const s=requestAnimationFrame(t);e.addEventListener("cancel",(()=>s),{once:!0}),e.addEventListener("finish",(()=>s),{once:!0}),e.cancel()})))))}const _t=new Map,Ct=new WeakMap;function St(e,t){const s=Ct.get(e);if(null==s?void 0:s[t])return s[t];const i=_t.get(t);return i||{keyframes:[],options:{duration:0}}}function Mt(e,t){_t.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function $t(e,t){return new Promise((s=>{e.addEventListener(t,(function i(a){a.target===e&&(e.removeEventListener(t,i),s())}))}))}function
|
|
85
|
+
*/const bt=mt(class extends ft{constructor(e){if(super(e),e.type!==ut||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const s=e.element.classList;for(const e of this._previousClasses)e in t||(s.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(s.add(e),this._previousClasses.add(e)):(s.remove(e),this._previousClasses.delete(e)))}return se}});function wt(e,t,s){return new Promise((i=>{if((null==s?void 0:s.duration)===1/0)throw new Error("Promise-based animations must be finite.");const a=e.animate(t,Object.assign(Object.assign({},s),{duration:yt()?0:null==s?void 0:s.duration}));a.addEventListener("cancel",i,{once:!0}),a.addEventListener("finish",i,{once:!0})}))}function yt(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function xt(e,t){return e.map((e=>Object.assign(Object.assign({},e),{height:"auto"===e.height?`${t}px`:e.height})))}function kt(e){return Promise.all(e.getAnimations().map((e=>new Promise((t=>{const s=requestAnimationFrame(t);e.addEventListener("cancel",(()=>s),{once:!0}),e.addEventListener("finish",(()=>s),{once:!0}),e.cancel()})))))}const _t=new Map,Ct=new WeakMap;function St(e,t){const s=Ct.get(e);if(null==s?void 0:s[t])return s[t];const i=_t.get(t);return i||{keyframes:[],options:{duration:0}}}function Mt(e,t){_t.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function $t(e,t){return new Promise((s=>{e.addEventListener(t,(function i(a){a.target===e&&(e.removeEventListener(t,i),s())}))}))}function At(e,t){const s=Object.assign({waitUntilFirstUpdate:!1},t);return(t,i)=>{const{update:a}=t;if(e in t){const o=e;t.update=function(e){if(e.has(o)){const t=e.get(o),a=this[o];t!==a&&(s.waitUntilFirstUpdate&&!this.hasUpdated||this[i](t,a))}a.call(this,e)}}}}var Dt=Me`:host([variant=border][last-of-type]) .accordion-item{border-bottom:none}:host([density=compact]) .accordion-btn{font-size:var(--sgds-font-size-2);line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-sm) var(--sgds-padding-sm)}:host([density=compact]) .content{padding:var(--sgds-padding-xs) var(--sgds-padding-sm) var(--sgds-padding-sm)}.accordion-item{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.accordion-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;color:var(--sgds-color-default);display:flex;font-size:var(--sgds-font-size-3);gap:var(--sgds-gap-sm);line-height:var(--sgds-line-height-24);overflow-anchor:none;padding:var(--sgds-padding-lg) var(--sgds-padding-lg);text-align:left;width:100%}@media (prefers-reduced-motion:reduce){.accordion-btn,.accordion-btn:after{transition:none}}.accordion-btn:not(.collapsed){font-weight:var(--sgds-font-weight-semibold)}.accordion-btn:not(.disabled):hover,.accordion-btn:not(:disabled):hover{background-color:var(--sgds-bg-translucent-subtle);z-index:2}.accordion-btn:not(.disabled):focus,.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus,.accordion-btn:not(:disabled):focus-visible{background-color:var(--sgds-bg-translucent-subtle);z-index:3}.accordion-btn:not(.disabled):focus-visible,.accordion-btn:not(:disabled):focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.accordion-btn.disabled,.accordion-btn:disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}slot[name=caret] sgds-icon,slot[name=caret]::slotted(*){color:var(--sgds-color-subtle);margin-left:auto;transition:transform .2s ease-in-out}.accordion-btn:not(.collapsed) slot[name=caret] sgds-icon,.accordion-btn:not(.collapsed) slot[name=caret]::slotted(*){transform:rotate(-180deg)}.accordion-body{overflow:hidden;padding:0}.content{display:block;padding:var(--sgds-padding-xs) var(--sgds-padding-lg) var(--sgds-padding-lg)}.hidden{display:none}`;class Vt extends lt{constructor(){super(...arguments),this.open=!1,this.disabled=!1}handleSummaryClick(){this.open?this.hide():this.show(),this.header.focus()}handleSummaryKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==e.key&&"ArrowLeft"!==e.key||(e.preventDefault(),this.hide()),"ArrowDown"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await kt(this.body),this.body.classList.remove("hidden");const{keyframes:e,options:t}=St(this,"accordion.show");await wt(this.body,xt(e,this.body.scrollHeight),t),this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await kt(this.body);const{keyframes:e,options:t}=St(this,"accordion.hide"),s=t.duration;setTimeout((()=>{this.body.classList.add("hidden")}),s-20),await wt(this.body,xt(e,this.body.scrollHeight),t),this.emit("sgds-after-hide")}}async show(){if(!this.open)return this.open=!0,$t(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,$t(this,"sgds-after-hide")}render(){const e=this.hasUpdated;return ee`
|
|
86
86
|
<div class="accordion-item">
|
|
87
87
|
<button
|
|
88
88
|
class=${bt({"accordion-btn":!0,disabled:this.disabled,collapsed:!this.open})}
|
|
@@ -106,23 +106,17 @@ const ut=1,pt=2,gt=3,vt=4,mt=e=>(...t)=>({_$litDirective$:e,values:t});class ft{
|
|
|
106
106
|
<slot id="content" name="content" class="content" role="region" aria-labelledby="header"></slot>
|
|
107
107
|
</div>
|
|
108
108
|
</div>
|
|
109
|
-
`}}Vt.styles=[...lt.styles,
|
|
109
|
+
`}}Vt.styles=[...lt.styles,Dt],t([it(".accordion-item")],Vt.prototype,"accordion",void 0),t([it(".accordion-btn")],Vt.prototype,"header",void 0),t([it(".accordion-body")],Vt.prototype,"body",void 0),t([Je({type:Boolean,reflect:!0})],Vt.prototype,"open",void 0),t([Je({type:Boolean,reflect:!0})],Vt.prototype,"disabled",void 0),t([At("open",{waitUntilFirstUpdate:!0})],Vt.prototype,"handleOpenChange",null),Mt("accordion.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:350,easing:"ease-in-out"}}),Mt("accordion.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:350,easing:"ease-in-out"}});
|
|
110
110
|
/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2020 Google LLC
|
|
113
113
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
114
114
|
*/
|
|
115
|
-
const Et=Symbol.for(""),It=e=>{if(e?.r===Et)return e?._$litStatic$},Bt=(e,...t)=>({_$litStatic$:t.reduce(((t,s,i)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw new Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(s)+e[i+1]),e[0]),r:Et}),Pt=new Map,Tt=(Lt=ee,(e,...t)=>{const s=t.length;let i,a;const o=[],n=[];let r,l=0,d=!1;for(;l<s;){for(r=e[l];l<s&&void 0!==(a=t[l],i=It(a));)r+=i+e[++l],d=!0;l!==s&&n.push(a),o.push(r),l++}if(l===s&&o.push(e[s]),d){const s=o.join("$$lit$$");void 0===(e=Pt.get(s))&&(o.raw=o,Pt.set(s,e=o)),t=n}return Lt(e,...t)});var Lt;
|
|
116
|
-
|
|
117
|
-
* @license
|
|
118
|
-
* Copyright 2018 Google LLC
|
|
119
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
120
|
-
*/
|
|
121
|
-
const Ft=e=>e??ie;var Zt=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 Ht(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 zt extends lt{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),Ht("sgds-icon")}render(){return ee`
|
|
122
|
-
<button class="btn-close" aria-label=${Ft(this.ariaLabel)} @click=${this._handleClick}>
|
|
115
|
+
const Et=Symbol.for(""),It=e=>{if(e?.r===Et)return e?._$litStatic$},Bt=(e,...t)=>({_$litStatic$:t.reduce(((t,s,i)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw new Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(s)+e[i+1]),e[0]),r:Et}),Pt=new Map,Tt=(Lt=ee,(e,...t)=>{const s=t.length;let i,a;const o=[],n=[];let r,l=0,d=!1;for(;l<s;){for(r=e[l];l<s&&void 0!==(a=t[l],i=It(a));)r+=i+e[++l],d=!0;l!==s&&n.push(a),o.push(r),l++}if(l===s&&o.push(e[s]),d){const s=o.join("$$lit$$");void 0===(e=Pt.get(s))&&(o.raw=o,Pt.set(s,e=o)),t=n}return Lt(e,...t)});var Lt,Ft=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 Zt(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 Ht extends lt{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),Zt("sgds-icon")}render(){return ee`
|
|
116
|
+
<button class="btn-close" aria-label="Close button" @click=${this._handleClick}>
|
|
123
117
|
<sgds-icon name="cross" size=${this.size}></sgds-icon>
|
|
124
118
|
</button>
|
|
125
|
-
`}}
|
|
119
|
+
`}}Ht.styles=[...lt.styles,Ft],t([Je({type:String,reflect:!0})],Ht.prototype,"size",void 0),t([Je({type:String,reflect:!0})],Ht.prototype,"tone",void 0);const zt={archive:ee`
|
|
126
120
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
127
121
|
<path
|
|
128
122
|
fill="currentColor"
|
|
@@ -2011,7 +2005,7 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2011
2005
|
clip-rule="evenodd"
|
|
2012
2006
|
/>
|
|
2013
2007
|
</svg>
|
|
2014
|
-
`};var
|
|
2008
|
+
`};var Rt=Me`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class Ot extends lt{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=zt[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||ie}}Ot.styles=[...lt.styles,Rt],t([Je({type:String,reflect:!0})],Ot.prototype,"name",void 0),t([Je({type:String,reflect:!0})],Ot.prototype,"size",void 0);var Nt=Me`:host([variant=success]) .alert{background-color:var(--sgds-success-surface-default)}:host([variant=warning]) .alert{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-warning-surface-default)}:host([variant=danger]) .alert{background-color:var(--sgds-danger-surface-default)}:host([variant=neutral]) .alert{background-color:var(--sgds-neutral-surface-default)}:host([variant=success][outlined]) .alert{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-default)}:host([variant=warning][outlined]) .alert{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-default)}:host([variant=danger][outlined]) .alert{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-default)}:host([variant=neutral][outlined]) .alert{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-default)}.alert{--sgds-alert-color:var(--sgds-color-fixed-light);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-md);color:var(--sgds-alert-color);display:flex;flex-direction:row;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-lg)}.alert.outlined{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-default)}.alert-content{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-2-xs);padding-right:var(--sgds-padding-2-xl)}.alert-title{font-weight:var(--sgds-font-weight-semibold)}`;class Ut extends lt{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this.variant="info",this.outlined=!1}close(){this.show=!1}_handleShowChange(){this.show?this.emit("sgds-show"):this.emit("sgds-hide")}render(){return this.dismissible&&this.show||!this.dismissible?Tt`
|
|
2015
2009
|
<div
|
|
2016
2010
|
class="${bt({alert:!0,show:this.show,"alert-dismissible":this.dismissible,outlined:this.outlined})}"
|
|
2017
2011
|
role="alert"
|
|
@@ -2025,11 +2019,17 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2025
2019
|
${this.dismissible?Tt`<sgds-close-button
|
|
2026
2020
|
aria-label="close the alert"
|
|
2027
2021
|
@click=${this.close}
|
|
2028
|
-
|
|
2022
|
+
tone=${this.outlined?"fixed-dark":"fixed-light"}
|
|
2029
2023
|
></sgds-close-button>`:ie}
|
|
2030
2024
|
</div>
|
|
2031
|
-
`:ie}}
|
|
2032
|
-
|
|
2025
|
+
`:ie}}Ut.styles=[...lt.styles,Nt],Ut.dependencies={"sgds-close-button":Ht,"sgds-icon":Ot},t([Je({type:Boolean,reflect:!0})],Ut.prototype,"show",void 0),t([Je({type:Boolean,reflect:!0})],Ut.prototype,"dismissible",void 0),t([Je({type:String,reflect:!0})],Ut.prototype,"variant",void 0),t([Je({type:Boolean,reflect:!0})],Ut.prototype,"outlined",void 0),t([Je({type:String,reflect:!0})],Ut.prototype,"title",void 0),t([At("show")],Ut.prototype,"_handleShowChange",null);
|
|
2026
|
+
/**
|
|
2027
|
+
* @license
|
|
2028
|
+
* Copyright 2018 Google LLC
|
|
2029
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2030
|
+
*/
|
|
2031
|
+
const qt=e=>e??ie;var Yt=Me`:host{cursor:pointer;display:inline-block}.alert-link,.alert-link:hover{color:var(--sgds-alert-color);text-decoration-line:underline}.alert-link:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`,jt=Me`::slotted(a[target=_blank]:after),a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;margin:0 .125rem;-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.274 3.9H9.3a.6.6 0 0 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.361 6.41c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v5.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.039h5.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.469-.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.274c-.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-.524-.042-1.175-.042-1.993V9.274c0-.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-.35C7.805 3.9 8.456 3.9 9.274 3.9Zm3.626.6a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V5.949l-5.976 5.975a.6.6 0 0 1-.848-.848L18.05 5.1H13.5a.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.274 3.9H9.3a.6.6 0 0 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.361 6.41c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v5.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.039h5.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.469-.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.274c-.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-.524-.042-1.175-.042-1.993V9.274c0-.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-.35C7.805 3.9 8.456 3.9 9.274 3.9Zm3.626.6a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V5.949l-5.976 5.975a.6.6 0 0 1-.848-.848L18.05 5.1H13.5a.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;mask-size:73%;-webkit-mask-size:73%;padding:0 .45em}`;class Wt extends lt{render(){return Tt`
|
|
2032
|
+
<a class="alert-link" href=${qt(this.href)} target=${qt(this.target)} tabindex="0"><slot></slot></a>
|
|
2033
2033
|
`}}Wt.styles=[...lt.styles,jt,Yt],t([Je({type:String,reflect:!0})],Wt.prototype,"href",void 0),t([Je()],Wt.prototype,"target",void 0);var Kt=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)}`
|
|
2034
2034
|
/**
|
|
2035
2035
|
* @license
|
|
@@ -2040,7 +2040,7 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2040
2040
|
* @license
|
|
2041
2041
|
* Copyright 2020 Google LLC
|
|
2042
2042
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2043
|
-
*/const us=()=>new ps;class ps{}const gs=new WeakMap;const vs=mt(class extends hs{render(e){return ie}update(e,[t]){const s=t!==this._ref;return s&&void 0!==this._ref&&this._updateRefValue(void 0),(s||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 s=gs.get(t);void 0===s&&(s=new WeakMap,gs.set(t,s)),void 0!==s.get(this._ref)&&this._ref.call(this._context,void 0),s.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?gs.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),ms=["top","right","bottom","left"],fs=Math.min,bs=Math.max,ws=Math.round,ys=Math.floor,xs=e=>({x:e,y:e}),ks={left:"right",right:"left",bottom:"top",top:"bottom"},_s={start:"end",end:"start"};function Cs(e,t,s){return bs(e,fs(t,s))}function Ss(e,t){return"function"==typeof e?e(t):e}function Ms(e){return e.split("-")[0]}function $s(e){return e.split("-")[1]}function Ds(e){return"x"===e?"y":"x"}function As(e){return"y"===e?"height":"width"}const Vs=new Set(["top","bottom"]);function Es(e){return Vs.has(Ms(e))?"y":"x"}function Is(e){return Ds(Es(e))}function Bs(e,t,s){void 0===s&&(s=!1);const i=$s(e),a=Is(e),o=As(a);let n="x"===a?i===(s?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=zs(n)),[n,zs(n)]}function Ps(e){return e.replace(/start|end/g,(e=>_s[e]))}const Ts=["left","right"],Ls=["right","left"],Fs=["top","bottom"],Zs=["bottom","top"];function Hs(e,t,s,i){const a=$s(e);let o=function(e,t,s){switch(e){case"top":case"bottom":return s?t?Ls:Ts:t?Ts:Ls;case"left":case"right":return t?Fs:Zs;default:return[]}}(Ms(e),"start"===s,i);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(Ps)))),o}function zs(e){return e.replace(/left|right|bottom|top/g,(e=>ks[e]))}function Rs(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 Os(e){const{x:t,y:s,width:i,height:a}=e;return{width:i,height:a,top:s,left:t,right:t+i,bottom:s+a,x:t,y:s}}function Ns(e,t,s){let{reference:i,floating:a}=e;const o=Es(t),n=Is(t),r=As(n),l=Ms(t),d="y"===o,c=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,u=i[r]/2-a[r]/2;let p;switch(l){case"top":p={x:c,y:i.y-a.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:h};break;case"left":p={x:i.x-a.width,y:h};break;default:p={x:i.x,y:i.y}}switch($s(t)){case"start":p[n]-=u*(s&&d?-1:1);break;case"end":p[n]+=u*(s&&d?-1:1)}return p}async function Us(e,t){var s;void 0===t&&(t={});const{x:i,y:a,platform:o,rects:n,elements:r,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=Ss(t,e),g=Rs(p),v=r[u?"floating"===h?"reference":"floating":h],m=Os(await o.getClippingRect({element:null==(s=await(null==o.isElement?void 0:o.isElement(v)))||s?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:c,strategy:l})),f="floating"===h?{x:i,y:a,width:n.floating.width,height:n.floating.height}:n.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),w=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},y=Os(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:b,strategy:l}):f);return{top:(m.top-y.top+g.top)/w.y,bottom:(y.bottom-m.bottom+g.bottom)/w.y,left:(m.left-y.left+g.left)/w.x,right:(y.right-m.right+g.right)/w.x}}function qs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ys(e){return ms.some((t=>e[t]>=0))}const js=new Set(["left","top"]);function Ws(){return"undefined"!=typeof window}function Ks(e){return Qs(e)?(e.nodeName||"").toLowerCase():"#document"}function Gs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Xs(e){var t;return null==(t=(Qs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qs(e){return!!Ws()&&(e instanceof Node||e instanceof Gs(e).Node)}function Js(e){return!!Ws()&&(e instanceof Element||e instanceof Gs(e).Element)}function ei(e){return!!Ws()&&(e instanceof HTMLElement||e instanceof Gs(e).HTMLElement)}function ti(e){return!(!Ws()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Gs(e).ShadowRoot)}const si=new Set(["inline","contents"]);function ii(e){const{overflow:t,overflowX:s,overflowY:i,display:a}=vi(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!si.has(a)}const ai=new Set(["table","td","th"]);function oi(e){return ai.has(Ks(e))}const ni=[":popover-open",":modal"];function ri(e){return ni.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const li=["transform","translate","scale","rotate","perspective"],di=["transform","translate","scale","rotate","perspective","filter"],ci=["paint","layout","strict","content"];function hi(e){const t=ui(),s=Js(e)?vi(e):e;return li.some((e=>!!s[e]&&"none"!==s[e]))||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||di.some((e=>(s.willChange||"").includes(e)))||ci.some((e=>(s.contain||"").includes(e)))}function ui(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const pi=new Set(["html","body","#document"]);function gi(e){return pi.has(Ks(e))}function vi(e){return Gs(e).getComputedStyle(e)}function mi(e){return Js(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fi(e){if("html"===Ks(e))return e;const t=e.assignedSlot||e.parentNode||ti(e)&&e.host||Xs(e);return ti(t)?t.host:t}function bi(e){const t=fi(e);return gi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ei(t)&&ii(t)?t:bi(t)}function wi(e,t,s){var i;void 0===t&&(t=[]),void 0===s&&(s=!0);const a=bi(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),n=Gs(a);if(o){const e=yi(n);return t.concat(n,n.visualViewport||[],ii(a)?a:[],e&&s?wi(e):[])}return t.concat(a,wi(a,[],s))}function yi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xi(e){const t=vi(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=ei(e),o=a?e.offsetWidth:s,n=a?e.offsetHeight:i,r=ws(s)!==o||ws(i)!==n;return r&&(s=o,i=n),{width:s,height:i,$:r}}function ki(e){return Js(e)?e:e.contextElement}function _i(e){const t=ki(e);if(!ei(t))return xs(1);const s=t.getBoundingClientRect(),{width:i,height:a,$:o}=xi(t);let n=(o?ws(s.width):s.width)/i,r=(o?ws(s.height):s.height)/a;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const Ci=xs(0);function Si(e){const t=Gs(e);return ui()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ci}function Mi(e,t,s,i){void 0===t&&(t=!1),void 0===s&&(s=!1);const a=e.getBoundingClientRect(),o=ki(e);let n=xs(1);t&&(i?Js(i)&&(n=_i(i)):n=_i(e));const r=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==Gs(e))&&t}(o,s,i)?Si(o):xs(0);let l=(a.left+r.x)/n.x,d=(a.top+r.y)/n.y,c=a.width/n.x,h=a.height/n.y;if(o){const e=Gs(o),t=i&&Js(i)?Gs(i):i;let s=e,a=yi(s);for(;a&&i&&t!==s;){const e=_i(a),t=a.getBoundingClientRect(),i=vi(a),o=t.left+(a.clientLeft+parseFloat(i.paddingLeft))*e.x,n=t.top+(a.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,h*=e.y,l+=o,d+=n,s=Gs(a),a=yi(s)}}return Os({width:c,height:h,x:l,y:d})}function $i(e,t){const s=mi(e).scrollLeft;return t?t.left+s:Mi(Xs(e)).left+s}function Di(e,t){const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-$i(e,s),y:s.top+t.scrollTop}}const Ai=25;const Vi=new Set(["absolute","fixed"]);function Ei(e,t,s){let i;if("viewport"===t)i=function(e,t){const s=Gs(e),i=Xs(e),a=s.visualViewport;let o=i.clientWidth,n=i.clientHeight,r=0,l=0;if(a){o=a.width,n=a.height;const e=ui();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}const d=$i(i);if(d<=0){const e=i.ownerDocument,t=e.body,s=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,n=Math.abs(i.clientWidth-t.clientWidth-a);n<=Ai&&(o-=n)}else d<=Ai&&(o+=d);return{width:o,height:n,x:r,y:l}}(e,s);else if("document"===t)i=function(e){const t=Xs(e),s=mi(e),i=e.ownerDocument.body,a=bs(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=bs(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-s.scrollLeft+$i(e);const r=-s.scrollTop;return"rtl"===vi(i).direction&&(n+=bs(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:n,y:r}}(Xs(e));else if(Js(t))i=function(e,t){const s=Mi(e,!0,"fixed"===t),i=s.top+e.clientTop,a=s.left+e.clientLeft,o=ei(e)?_i(e):xs(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}(t,s);else{const s=Si(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Os(i)}function Ii(e,t){const s=fi(e);return!(s===t||!Js(s)||gi(s))&&("fixed"===vi(s).position||Ii(s,t))}function Bi(e,t,s){const i=ei(t),a=Xs(t),o="fixed"===s,n=Mi(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=xs(0);function d(){l.x=$i(a)}if(i||!i&&!o)if(("body"!==Ks(t)||ii(a))&&(r=mi(t)),i){const e=Mi(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&d();o&&!i&&a&&d();const c=!a||i||o?xs(0):Di(a,r);return{x:n.left+r.scrollLeft-l.x-c.x,y:n.top+r.scrollTop-l.y-c.y,width:n.width,height:n.height}}function Pi(e){return"static"===vi(e).position}function Ti(e,t){if(!ei(e)||"fixed"===vi(e).position)return null;if(t)return t(e);let s=e.offsetParent;return Xs(e)===s&&(s=s.ownerDocument.body),s}function Li(e,t){const s=Gs(e);if(ri(e))return s;if(!ei(e)){let t=fi(e);for(;t&&!gi(t);){if(Js(t)&&!Pi(t))return t;t=fi(t)}return s}let i=Ti(e,t);for(;i&&oi(i)&&Pi(i);)i=Ti(i,t);return i&&gi(i)&&Pi(i)&&!hi(i)?s:i||function(e){let t=fi(e);for(;ei(t)&&!gi(t);){if(hi(t))return t;if(ri(t))return null;t=fi(t)}return null}(e)||s}const Fi={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:i,strategy:a}=e;const o="fixed"===a,n=Xs(i),r=!!t&&ri(t.floating);if(i===n||r&&o)return s;let l={scrollLeft:0,scrollTop:0},d=xs(1);const c=xs(0),h=ei(i);if((h||!h&&!o)&&(("body"!==Ks(i)||ii(n))&&(l=mi(i)),ei(i))){const e=Mi(i);d=_i(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const u=!n||h||o?xs(0):Di(n,l);return{width:s.width*d.x,height:s.height*d.y,x:s.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:s.y*d.y-l.scrollTop*d.y+c.y+u.y}},getDocumentElement:Xs,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===s?ri(t)?[]:function(e,t){const s=t.get(e);if(s)return s;let i=wi(e,[],!1).filter((e=>Js(e)&&"body"!==Ks(e))),a=null;const o="fixed"===vi(e).position;let n=o?fi(e):e;for(;Js(n)&&!gi(n);){const t=vi(n),s=hi(n);s||"fixed"!==t.position||(a=null),(o?!s&&!a:!s&&"static"===t.position&&a&&Vi.has(a.position)||ii(n)&&!s&&Ii(e,n))?i=i.filter((e=>e!==n)):a=t,n=fi(n)}return t.set(e,i),i}(t,this._c):[].concat(s),i],n=o[0],r=o.reduce(((e,s)=>{const i=Ei(t,s,a);return e.top=bs(i.top,e.top),e.right=fs(i.right,e.right),e.bottom=fs(i.bottom,e.bottom),e.left=bs(i.left,e.left),e}),Ei(t,n,a));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:Li,getElementRects:async function(e){const t=this.getOffsetParent||Li,s=this.getDimensions,i=await s(e.floating);return{reference:Bi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:s}=xi(e);return{width:t,height:s}},getScale:_i,isElement:Js,isRTL:function(e){return"rtl"===vi(e).direction}};function Zi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hi(e,t,s,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,d=ki(e),c=a||o?[...d?wi(d):[],...wi(t)]:[];c.forEach((e=>{a&&e.addEventListener("scroll",s,{passive:!0}),o&&e.addEventListener("resize",s)}));const h=d&&r?function(e,t){let s,i=null;const a=Xs(e);function o(){var e;clearTimeout(s),null==(e=i)||e.disconnect(),i=null}return function n(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),o();const d=e.getBoundingClientRect(),{left:c,top:h,width:u,height:p}=d;if(r||t(),!u||!p)return;const g={rootMargin:-ys(h)+"px "+-ys(a.clientWidth-(c+u))+"px "+-ys(a.clientHeight-(h+p))+"px "+-ys(c)+"px",threshold:bs(0,fs(1,l))||1};let v=!0;function m(t){const i=t[0].intersectionRatio;if(i!==l){if(!v)return n();i?n(!1,i):s=setTimeout((()=>{n(!1,1e-7)}),1e3)}1!==i||Zi(d,e.getBoundingClientRect())||n(),v=!1}try{i=new IntersectionObserver(m,{...g,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(m,g)}i.observe(e)}(!0),o}(d,s):null;let u,p=-1,g=null;n&&(g=new ResizeObserver((e=>{let[i]=e;i&&i.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),s()})),d&&!l&&g.observe(d),g.observe(t));let v=l?Mi(e):null;return l&&function t(){const i=Mi(e);v&&!Zi(v,i)&&s();v=i,u=requestAnimationFrame(t)}(),s(),()=>{var e;c.forEach((e=>{a&&e.removeEventListener("scroll",s),o&&e.removeEventListener("resize",s)})),null==h||h(),null==(e=g)||e.disconnect(),g=null,l&&cancelAnimationFrame(u)}}const zi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var s,i;const{x:a,y:o,placement:n,middlewareData:r}=t,l=await async function(e,t){const{placement:s,platform:i,elements:a}=e,o=await(null==i.isRTL?void 0:i.isRTL(a.floating)),n=Ms(s),r=$s(s),l="y"===Es(s),d=js.has(n)?-1:1,c=o&&l?-1:1,h=Ss(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof g&&(p="end"===r?-1*g:g),l?{x:p*c,y:u*d}:{x:u*d,y:p*c}}(t,e);return n===(null==(s=r.offset)?void 0:s.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:n}}}}},Ri=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:i,placement:a}=t,{mainAxis:o=!0,crossAxis:n=!1,limiter:r={fn:e=>{let{x:t,y:s}=e;return{x:t,y:s}}},...l}=Ss(e,t),d={x:s,y:i},c=await Us(t,l),h=Es(Ms(a)),u=Ds(h);let p=d[u],g=d[h];if(o){const e="y"===u?"bottom":"right";p=Cs(p+c["y"===u?"top":"left"],p,p-c[e])}if(n){const e="y"===h?"bottom":"right";g=Cs(g+c["y"===h?"top":"left"],g,g-c[e])}const v=r.fn({...t,[u]:p,[h]:g});return{...v,data:{x:v.x-s,y:v.y-i,enabled:{[u]:o,[h]:n}}}}}},Oi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var s,i;const{placement:a,middlewareData:o,rects:n,initialPlacement:r,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...m}=Ss(e,t);if(null!=(s=o.arrow)&&s.alignmentOffset)return{};const f=Ms(a),b=Es(r),w=Ms(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=u||(w||!v?[zs(r)]:function(e){const t=zs(e);return[Ps(e),t,Ps(t)]}(r)),k="none"!==g;!u&&k&&x.push(...Hs(r,v,g,y));const _=[r,...x],C=await Us(t,m),S=[];let M=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&S.push(C[f]),h){const e=Bs(a,n,y);S.push(C[e[0]],C[e[1]])}if(M=[...M,{placement:a,overflows:S}],!S.every((e=>e<=0))){var $,D;const e=((null==($=o.flip)?void 0:$.index)||0)+1,t=_[e];if(t){if(!("alignment"===h&&b!==Es(t))||M.every((e=>Es(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}}}let s=null==(D=M.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:D.placement;if(!s)switch(p){case"bestFit":{var A;const e=null==(A=M.filter((e=>{if(k){const t=Es(e.placement);return t===b||"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:A[0];e&&(s=e);break}case"initialPlacement":s=r}if(a!==s)return{reset:{placement:s}}}return{}}}},Ni=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var s,i;const{placement:a,rects:o,platform:n,elements:r}=t,{apply:l=()=>{},...d}=Ss(e,t),c=await Us(t,d),h=Ms(a),u=$s(a),p="y"===Es(a),{width:g,height:v}=o.floating;let m,f;"top"===h||"bottom"===h?(m=h,f=u===(await(null==n.isRTL?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(f=h,m="end"===u?"top":"bottom");const b=v-c.top-c.bottom,w=g-c.left-c.right,y=fs(v-c[m],b),x=fs(g-c[f],w),k=!t.middlewareData.shift;let _=y,C=x;if(null!=(s=t.middlewareData.shift)&&s.enabled.x&&(C=w),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(_=b),k&&!u){const e=bs(c.left,0),t=bs(c.right,0),s=bs(c.top,0),i=bs(c.bottom,0);p?C=g-2*(0!==e||0!==t?e+t:bs(c.left,c.right)):_=v-2*(0!==s||0!==i?s+i:bs(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:_});const S=await n.getDimensions(r.floating);return g!==S.width||v!==S.height?{reset:{rects:!0}}:{}}}},Ui=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...a}=Ss(e,t);switch(i){case"referenceHidden":{const e=qs(await Us(t,{...a,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ys(e)}}}case"escaped":{const e=qs(await Us(t,{...a,altBoundary:!0}),s.floating);return{data:{escapedOffsets:e,escaped:Ys(e)}}}default:return{}}}}},qi=(e,t,s)=>{const i=new Map,a={platform:Fi,...s},o={...a.platform,_c:i};return(async(e,t,s)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:n}=s,r=o.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(t));let d=await n.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:h}=Ns(d,i,l),u=i,p={},g=0;for(let s=0;s<r.length;s++){const{name:o,fn:v}=r[s],{x:m,y:f,data:b,reset:w}=await v({x:c,y:h,initialPlacement:i,placement:u,strategy:a,middlewareData:p,rects:d,platform:n,elements:{reference:e,floating:t}});c=null!=m?m:c,h=null!=f?f:h,p={...p,[o]:{...p[o],...b}},w&&g<=50&&(g++,"object"==typeof w&&(w.placement&&(u=w.placement),w.rects&&(d=!0===w.rects?await n.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:c,y:h}=Ns(d,u,l))),s=-1)}return{x:c,y:h,placement:u,strategy:a,middlewareData:p}})(e,t,{...a,platform:o})};var Yi=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 ji extends lt{constructor(){super(...arguments),this._myTooltip=us(),this._tooltipBubble=us(),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:s,strategy:i,middlewareData:a}=await qi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[zi(8),Oi(),Ri(),Ui()]});this._tooltipBubble.value.setAttribute("data-placement",s),Object.assign(this._tooltipBubble.value.style,{position:i,left:`${e}px`,top:`${t}px`});const{referenceHidden:o,escaped:n}=a.hide||{};this._tooltipBubble.value.style.visibility=o||n?"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=Hi(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 ee`
|
|
2043
|
+
*/const us=()=>new ps;class ps{}const gs=new WeakMap;const vs=mt(class extends hs{render(e){return ie}update(e,[t]){const s=t!==this._ref;return s&&void 0!==this._ref&&this._updateRefValue(void 0),(s||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 s=gs.get(t);void 0===s&&(s=new WeakMap,gs.set(t,s)),void 0!==s.get(this._ref)&&this._ref.call(this._context,void 0),s.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?gs.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),ms=["top","right","bottom","left"],fs=Math.min,bs=Math.max,ws=Math.round,ys=Math.floor,xs=e=>({x:e,y:e}),ks={left:"right",right:"left",bottom:"top",top:"bottom"},_s={start:"end",end:"start"};function Cs(e,t,s){return bs(e,fs(t,s))}function Ss(e,t){return"function"==typeof e?e(t):e}function Ms(e){return e.split("-")[0]}function $s(e){return e.split("-")[1]}function As(e){return"x"===e?"y":"x"}function Ds(e){return"y"===e?"height":"width"}const Vs=new Set(["top","bottom"]);function Es(e){return Vs.has(Ms(e))?"y":"x"}function Is(e){return As(Es(e))}function Bs(e,t,s){void 0===s&&(s=!1);const i=$s(e),a=Is(e),o=Ds(a);let n="x"===a?i===(s?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=zs(n)),[n,zs(n)]}function Ps(e){return e.replace(/start|end/g,(e=>_s[e]))}const Ts=["left","right"],Ls=["right","left"],Fs=["top","bottom"],Zs=["bottom","top"];function Hs(e,t,s,i){const a=$s(e);let o=function(e,t,s){switch(e){case"top":case"bottom":return s?t?Ls:Ts:t?Ts:Ls;case"left":case"right":return t?Fs:Zs;default:return[]}}(Ms(e),"start"===s,i);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(Ps)))),o}function zs(e){return e.replace(/left|right|bottom|top/g,(e=>ks[e]))}function Rs(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 Os(e){const{x:t,y:s,width:i,height:a}=e;return{width:i,height:a,top:s,left:t,right:t+i,bottom:s+a,x:t,y:s}}function Ns(e,t,s){let{reference:i,floating:a}=e;const o=Es(t),n=Is(t),r=Ds(n),l=Ms(t),d="y"===o,c=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,u=i[r]/2-a[r]/2;let p;switch(l){case"top":p={x:c,y:i.y-a.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:h};break;case"left":p={x:i.x-a.width,y:h};break;default:p={x:i.x,y:i.y}}switch($s(t)){case"start":p[n]-=u*(s&&d?-1:1);break;case"end":p[n]+=u*(s&&d?-1:1)}return p}async function Us(e,t){var s;void 0===t&&(t={});const{x:i,y:a,platform:o,rects:n,elements:r,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=Ss(t,e),g=Rs(p),v=r[u?"floating"===h?"reference":"floating":h],m=Os(await o.getClippingRect({element:null==(s=await(null==o.isElement?void 0:o.isElement(v)))||s?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:c,strategy:l})),f="floating"===h?{x:i,y:a,width:n.floating.width,height:n.floating.height}:n.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),w=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},y=Os(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:b,strategy:l}):f);return{top:(m.top-y.top+g.top)/w.y,bottom:(y.bottom-m.bottom+g.bottom)/w.y,left:(m.left-y.left+g.left)/w.x,right:(y.right-m.right+g.right)/w.x}}function qs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ys(e){return ms.some((t=>e[t]>=0))}const js=new Set(["left","top"]);function Ws(){return"undefined"!=typeof window}function Ks(e){return Qs(e)?(e.nodeName||"").toLowerCase():"#document"}function Gs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Xs(e){var t;return null==(t=(Qs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qs(e){return!!Ws()&&(e instanceof Node||e instanceof Gs(e).Node)}function Js(e){return!!Ws()&&(e instanceof Element||e instanceof Gs(e).Element)}function ei(e){return!!Ws()&&(e instanceof HTMLElement||e instanceof Gs(e).HTMLElement)}function ti(e){return!(!Ws()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Gs(e).ShadowRoot)}const si=new Set(["inline","contents"]);function ii(e){const{overflow:t,overflowX:s,overflowY:i,display:a}=vi(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!si.has(a)}const ai=new Set(["table","td","th"]);function oi(e){return ai.has(Ks(e))}const ni=[":popover-open",":modal"];function ri(e){return ni.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const li=["transform","translate","scale","rotate","perspective"],di=["transform","translate","scale","rotate","perspective","filter"],ci=["paint","layout","strict","content"];function hi(e){const t=ui(),s=Js(e)?vi(e):e;return li.some((e=>!!s[e]&&"none"!==s[e]))||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||di.some((e=>(s.willChange||"").includes(e)))||ci.some((e=>(s.contain||"").includes(e)))}function ui(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const pi=new Set(["html","body","#document"]);function gi(e){return pi.has(Ks(e))}function vi(e){return Gs(e).getComputedStyle(e)}function mi(e){return Js(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fi(e){if("html"===Ks(e))return e;const t=e.assignedSlot||e.parentNode||ti(e)&&e.host||Xs(e);return ti(t)?t.host:t}function bi(e){const t=fi(e);return gi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ei(t)&&ii(t)?t:bi(t)}function wi(e,t,s){var i;void 0===t&&(t=[]),void 0===s&&(s=!0);const a=bi(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),n=Gs(a);if(o){const e=yi(n);return t.concat(n,n.visualViewport||[],ii(a)?a:[],e&&s?wi(e):[])}return t.concat(a,wi(a,[],s))}function yi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xi(e){const t=vi(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=ei(e),o=a?e.offsetWidth:s,n=a?e.offsetHeight:i,r=ws(s)!==o||ws(i)!==n;return r&&(s=o,i=n),{width:s,height:i,$:r}}function ki(e){return Js(e)?e:e.contextElement}function _i(e){const t=ki(e);if(!ei(t))return xs(1);const s=t.getBoundingClientRect(),{width:i,height:a,$:o}=xi(t);let n=(o?ws(s.width):s.width)/i,r=(o?ws(s.height):s.height)/a;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const Ci=xs(0);function Si(e){const t=Gs(e);return ui()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ci}function Mi(e,t,s,i){void 0===t&&(t=!1),void 0===s&&(s=!1);const a=e.getBoundingClientRect(),o=ki(e);let n=xs(1);t&&(i?Js(i)&&(n=_i(i)):n=_i(e));const r=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==Gs(e))&&t}(o,s,i)?Si(o):xs(0);let l=(a.left+r.x)/n.x,d=(a.top+r.y)/n.y,c=a.width/n.x,h=a.height/n.y;if(o){const e=Gs(o),t=i&&Js(i)?Gs(i):i;let s=e,a=yi(s);for(;a&&i&&t!==s;){const e=_i(a),t=a.getBoundingClientRect(),i=vi(a),o=t.left+(a.clientLeft+parseFloat(i.paddingLeft))*e.x,n=t.top+(a.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,h*=e.y,l+=o,d+=n,s=Gs(a),a=yi(s)}}return Os({width:c,height:h,x:l,y:d})}function $i(e,t){const s=mi(e).scrollLeft;return t?t.left+s:Mi(Xs(e)).left+s}function Ai(e,t){const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-$i(e,s),y:s.top+t.scrollTop}}const Di=25;const Vi=new Set(["absolute","fixed"]);function Ei(e,t,s){let i;if("viewport"===t)i=function(e,t){const s=Gs(e),i=Xs(e),a=s.visualViewport;let o=i.clientWidth,n=i.clientHeight,r=0,l=0;if(a){o=a.width,n=a.height;const e=ui();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}const d=$i(i);if(d<=0){const e=i.ownerDocument,t=e.body,s=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,n=Math.abs(i.clientWidth-t.clientWidth-a);n<=Di&&(o-=n)}else d<=Di&&(o+=d);return{width:o,height:n,x:r,y:l}}(e,s);else if("document"===t)i=function(e){const t=Xs(e),s=mi(e),i=e.ownerDocument.body,a=bs(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=bs(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-s.scrollLeft+$i(e);const r=-s.scrollTop;return"rtl"===vi(i).direction&&(n+=bs(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:n,y:r}}(Xs(e));else if(Js(t))i=function(e,t){const s=Mi(e,!0,"fixed"===t),i=s.top+e.clientTop,a=s.left+e.clientLeft,o=ei(e)?_i(e):xs(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}(t,s);else{const s=Si(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Os(i)}function Ii(e,t){const s=fi(e);return!(s===t||!Js(s)||gi(s))&&("fixed"===vi(s).position||Ii(s,t))}function Bi(e,t,s){const i=ei(t),a=Xs(t),o="fixed"===s,n=Mi(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=xs(0);function d(){l.x=$i(a)}if(i||!i&&!o)if(("body"!==Ks(t)||ii(a))&&(r=mi(t)),i){const e=Mi(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&d();o&&!i&&a&&d();const c=!a||i||o?xs(0):Ai(a,r);return{x:n.left+r.scrollLeft-l.x-c.x,y:n.top+r.scrollTop-l.y-c.y,width:n.width,height:n.height}}function Pi(e){return"static"===vi(e).position}function Ti(e,t){if(!ei(e)||"fixed"===vi(e).position)return null;if(t)return t(e);let s=e.offsetParent;return Xs(e)===s&&(s=s.ownerDocument.body),s}function Li(e,t){const s=Gs(e);if(ri(e))return s;if(!ei(e)){let t=fi(e);for(;t&&!gi(t);){if(Js(t)&&!Pi(t))return t;t=fi(t)}return s}let i=Ti(e,t);for(;i&&oi(i)&&Pi(i);)i=Ti(i,t);return i&&gi(i)&&Pi(i)&&!hi(i)?s:i||function(e){let t=fi(e);for(;ei(t)&&!gi(t);){if(hi(t))return t;if(ri(t))return null;t=fi(t)}return null}(e)||s}const Fi={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:i,strategy:a}=e;const o="fixed"===a,n=Xs(i),r=!!t&&ri(t.floating);if(i===n||r&&o)return s;let l={scrollLeft:0,scrollTop:0},d=xs(1);const c=xs(0),h=ei(i);if((h||!h&&!o)&&(("body"!==Ks(i)||ii(n))&&(l=mi(i)),ei(i))){const e=Mi(i);d=_i(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const u=!n||h||o?xs(0):Ai(n,l);return{width:s.width*d.x,height:s.height*d.y,x:s.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:s.y*d.y-l.scrollTop*d.y+c.y+u.y}},getDocumentElement:Xs,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===s?ri(t)?[]:function(e,t){const s=t.get(e);if(s)return s;let i=wi(e,[],!1).filter((e=>Js(e)&&"body"!==Ks(e))),a=null;const o="fixed"===vi(e).position;let n=o?fi(e):e;for(;Js(n)&&!gi(n);){const t=vi(n),s=hi(n);s||"fixed"!==t.position||(a=null),(o?!s&&!a:!s&&"static"===t.position&&a&&Vi.has(a.position)||ii(n)&&!s&&Ii(e,n))?i=i.filter((e=>e!==n)):a=t,n=fi(n)}return t.set(e,i),i}(t,this._c):[].concat(s),i],n=o[0],r=o.reduce(((e,s)=>{const i=Ei(t,s,a);return e.top=bs(i.top,e.top),e.right=fs(i.right,e.right),e.bottom=fs(i.bottom,e.bottom),e.left=bs(i.left,e.left),e}),Ei(t,n,a));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:Li,getElementRects:async function(e){const t=this.getOffsetParent||Li,s=this.getDimensions,i=await s(e.floating);return{reference:Bi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:s}=xi(e);return{width:t,height:s}},getScale:_i,isElement:Js,isRTL:function(e){return"rtl"===vi(e).direction}};function Zi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hi(e,t,s,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,d=ki(e),c=a||o?[...d?wi(d):[],...wi(t)]:[];c.forEach((e=>{a&&e.addEventListener("scroll",s,{passive:!0}),o&&e.addEventListener("resize",s)}));const h=d&&r?function(e,t){let s,i=null;const a=Xs(e);function o(){var e;clearTimeout(s),null==(e=i)||e.disconnect(),i=null}return function n(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),o();const d=e.getBoundingClientRect(),{left:c,top:h,width:u,height:p}=d;if(r||t(),!u||!p)return;const g={rootMargin:-ys(h)+"px "+-ys(a.clientWidth-(c+u))+"px "+-ys(a.clientHeight-(h+p))+"px "+-ys(c)+"px",threshold:bs(0,fs(1,l))||1};let v=!0;function m(t){const i=t[0].intersectionRatio;if(i!==l){if(!v)return n();i?n(!1,i):s=setTimeout((()=>{n(!1,1e-7)}),1e3)}1!==i||Zi(d,e.getBoundingClientRect())||n(),v=!1}try{i=new IntersectionObserver(m,{...g,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(m,g)}i.observe(e)}(!0),o}(d,s):null;let u,p=-1,g=null;n&&(g=new ResizeObserver((e=>{let[i]=e;i&&i.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),s()})),d&&!l&&g.observe(d),g.observe(t));let v=l?Mi(e):null;return l&&function t(){const i=Mi(e);v&&!Zi(v,i)&&s();v=i,u=requestAnimationFrame(t)}(),s(),()=>{var e;c.forEach((e=>{a&&e.removeEventListener("scroll",s),o&&e.removeEventListener("resize",s)})),null==h||h(),null==(e=g)||e.disconnect(),g=null,l&&cancelAnimationFrame(u)}}const zi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var s,i;const{x:a,y:o,placement:n,middlewareData:r}=t,l=await async function(e,t){const{placement:s,platform:i,elements:a}=e,o=await(null==i.isRTL?void 0:i.isRTL(a.floating)),n=Ms(s),r=$s(s),l="y"===Es(s),d=js.has(n)?-1:1,c=o&&l?-1:1,h=Ss(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof g&&(p="end"===r?-1*g:g),l?{x:p*c,y:u*d}:{x:u*d,y:p*c}}(t,e);return n===(null==(s=r.offset)?void 0:s.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:n}}}}},Ri=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:i,placement:a}=t,{mainAxis:o=!0,crossAxis:n=!1,limiter:r={fn:e=>{let{x:t,y:s}=e;return{x:t,y:s}}},...l}=Ss(e,t),d={x:s,y:i},c=await Us(t,l),h=Es(Ms(a)),u=As(h);let p=d[u],g=d[h];if(o){const e="y"===u?"bottom":"right";p=Cs(p+c["y"===u?"top":"left"],p,p-c[e])}if(n){const e="y"===h?"bottom":"right";g=Cs(g+c["y"===h?"top":"left"],g,g-c[e])}const v=r.fn({...t,[u]:p,[h]:g});return{...v,data:{x:v.x-s,y:v.y-i,enabled:{[u]:o,[h]:n}}}}}},Oi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var s,i;const{placement:a,middlewareData:o,rects:n,initialPlacement:r,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...m}=Ss(e,t);if(null!=(s=o.arrow)&&s.alignmentOffset)return{};const f=Ms(a),b=Es(r),w=Ms(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=u||(w||!v?[zs(r)]:function(e){const t=zs(e);return[Ps(e),t,Ps(t)]}(r)),k="none"!==g;!u&&k&&x.push(...Hs(r,v,g,y));const _=[r,...x],C=await Us(t,m),S=[];let M=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&S.push(C[f]),h){const e=Bs(a,n,y);S.push(C[e[0]],C[e[1]])}if(M=[...M,{placement:a,overflows:S}],!S.every((e=>e<=0))){var $,A;const e=((null==($=o.flip)?void 0:$.index)||0)+1,t=_[e];if(t){if(!("alignment"===h&&b!==Es(t))||M.every((e=>Es(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}}}let s=null==(A=M.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!s)switch(p){case"bestFit":{var D;const e=null==(D=M.filter((e=>{if(k){const t=Es(e.placement);return t===b||"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:D[0];e&&(s=e);break}case"initialPlacement":s=r}if(a!==s)return{reset:{placement:s}}}return{}}}},Ni=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var s,i;const{placement:a,rects:o,platform:n,elements:r}=t,{apply:l=()=>{},...d}=Ss(e,t),c=await Us(t,d),h=Ms(a),u=$s(a),p="y"===Es(a),{width:g,height:v}=o.floating;let m,f;"top"===h||"bottom"===h?(m=h,f=u===(await(null==n.isRTL?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(f=h,m="end"===u?"top":"bottom");const b=v-c.top-c.bottom,w=g-c.left-c.right,y=fs(v-c[m],b),x=fs(g-c[f],w),k=!t.middlewareData.shift;let _=y,C=x;if(null!=(s=t.middlewareData.shift)&&s.enabled.x&&(C=w),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(_=b),k&&!u){const e=bs(c.left,0),t=bs(c.right,0),s=bs(c.top,0),i=bs(c.bottom,0);p?C=g-2*(0!==e||0!==t?e+t:bs(c.left,c.right)):_=v-2*(0!==s||0!==i?s+i:bs(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:_});const S=await n.getDimensions(r.floating);return g!==S.width||v!==S.height?{reset:{rects:!0}}:{}}}},Ui=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...a}=Ss(e,t);switch(i){case"referenceHidden":{const e=qs(await Us(t,{...a,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ys(e)}}}case"escaped":{const e=qs(await Us(t,{...a,altBoundary:!0}),s.floating);return{data:{escapedOffsets:e,escaped:Ys(e)}}}default:return{}}}}},qi=(e,t,s)=>{const i=new Map,a={platform:Fi,...s},o={...a.platform,_c:i};return(async(e,t,s)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:n}=s,r=o.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(t));let d=await n.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:h}=Ns(d,i,l),u=i,p={},g=0;for(let s=0;s<r.length;s++){const{name:o,fn:v}=r[s],{x:m,y:f,data:b,reset:w}=await v({x:c,y:h,initialPlacement:i,placement:u,strategy:a,middlewareData:p,rects:d,platform:n,elements:{reference:e,floating:t}});c=null!=m?m:c,h=null!=f?f:h,p={...p,[o]:{...p[o],...b}},w&&g<=50&&(g++,"object"==typeof w&&(w.placement&&(u=w.placement),w.rects&&(d=!0===w.rects?await n.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:c,y:h}=Ns(d,u,l))),s=-1)}return{x:c,y:h,placement:u,strategy:a,middlewareData:p}})(e,t,{...a,platform:o})};var Yi=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 ji extends lt{constructor(){super(...arguments),this._myTooltip=us(),this._tooltipBubble=us(),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:s,strategy:i,middlewareData:a}=await qi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[zi(8),Oi(),Ri(),Ui()]});this._tooltipBubble.value.setAttribute("data-placement",s),Object.assign(this._tooltipBubble.value.style,{position:i,left:`${e}px`,top:`${t}px`});const{referenceHidden:o,escaped:n}=a.hide||{};this._tooltipBubble.value.style.visibility=o||n?"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=Hi(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 ee`
|
|
2044
2044
|
<div ${vs(this._myTooltip)} class="tooltip-placeholder">
|
|
2045
2045
|
<slot @slotchange=${()=>this._handleSlotChange()}></slot>
|
|
2046
2046
|
${this.open?ee`<div ${vs(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
|
|
@@ -2060,11 +2060,11 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2060
2060
|
size="sm"
|
|
2061
2061
|
aria-label="close the badge"
|
|
2062
2062
|
@click=${this.close}
|
|
2063
|
-
|
|
2063
|
+
tone=${e?"fixed-dark":"fixed-light"}
|
|
2064
2064
|
></sgds-close-button>`:ie}
|
|
2065
2065
|
</div>`}render(){return this.dismissible&&this.show||!this.dismissible?this.truncated?ee`<sgds-tooltip content=${this.text} @sgds-hide=${e=>e.stopPropagation()}
|
|
2066
2066
|
>${this._renderBadge()}</sgds-tooltip
|
|
2067
|
-
>`:this._renderBadge():ie}}Ki.styles=[...lt.styles,Kt],Ki.dependencies={"sgds-close-button":
|
|
2067
|
+
>`:this._renderBadge():ie}}Ki.styles=[...lt.styles,Kt],Ki.dependencies={"sgds-close-button":Ht,"sgds-tooltip":ji},t([Je({type:Boolean,reflect:!0})],Ki.prototype,"show",void 0),t([Je({reflect:!0})],Ki.prototype,"variant",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"outlined",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"dismissible",void 0),t([Je({type:Boolean,reflect:!0})],Ki.prototype,"fullWidth",void 0),t([et()],Ki.prototype,"truncated",void 0),t([et()],Ki.prototype,"text",void 0),t([At("show")],Ki.prototype,"_handleShowChange",null),t([At("text")],Ki.prototype,"_handleTruncation",null);var Gi=Me`:host([size=sm]) .overflow-btn{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.overflow-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;border-radius:var(--sgds-border-radius-sm);cursor:pointer;display:flex;height:var(--sgds-dimension-32);justify-content:center;padding:0;position:relative;width:var(--sgds-dimension-32)}.overflow-btn:hover{background-color:var(--sgds-bg-translucent-subtle)}.overflow-btn:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;function Xi(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Qi extends lt{constructor(){super(...arguments),this.myDropdown=us(),this.dropdownMenuId=Xi("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=us(),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=Hi(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 s=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},i=t.map(s),a=e.map((e=>{const a=s(e),o=i.indexOf(a);return-1!==o?t[o]:e})).concat(t.filter((t=>!e.some((e=>s(e)===s(t))))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[zi(8),this.noFlip?void 0:Oi(),Ri()].filter(Boolean);let s=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(s=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:s}),{x:a,y:o,strategy:n,placement:r}=await qi(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:n,left:`${a}px`,top:`${o}px`})}}t([Je({type:Boolean,state:!0})],Qi.prototype,"noFlip",void 0),t([Je({type:Boolean,reflect:!0,state:!0})],Qi.prototype,"menuAlignRight",void 0),t([Je({type:String,reflect:!0,state:!0})],Qi.prototype,"drop",void 0),t([Je({type:Object})],Qi.prototype,"floatingOpts",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"menuIsOpen",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],Qi.prototype,"readonly",void 0);class Ji 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(),s=t.indexOf(e.target);this.nextDropdownItemNo=s+1,this.prevDropdownItemNo=s<=0?t.length-1:s-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 s=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");s&&s.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 s=(e%t.length+t.length)%t.length,i=t[s];this.emit("i-sgds-option-focus",{detail:{option:i}}),this.nextDropdownItemNo=(s+1)%t.length,this.prevDropdownItemNo=(s-1+t.length)%t.length,t.forEach((e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===i?"0":"-1"),e===i&&t.focus()}))}}Ji.styles=Qi.styles,t([it("ul.dropdown-menu")],Ji.prototype,"menu",void 0),t([et()],Ji.prototype,"nextDropdownItemNo",void 0),t([et()],Ji.prototype,"prevDropdownItemNo",void 0),t([Je({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var ea=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%}`,ta=Me`.dropdown{display:flex;height:inherit;position:relative}`;class sa extends Ji{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=vs()}async _handleClick(){this.disabled||this.toggleMenu()}_handleCloseMenu(){const e=this._toggler[0];null==e||e.focus()}async connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._handleCloseMenu)}async disconnectedCallback(){this.removeEventListener("sgds-hide",this._handleCloseMenu)}async firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&await this.showMenu(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return ee`
|
|
2068
2068
|
<div class="dropdown">
|
|
2069
2069
|
<div
|
|
2070
2070
|
class="toggler-container"
|
|
@@ -2079,28 +2079,28 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2079
2079
|
<slot id="default" @click=${this.handleSelectSlot}></slot>
|
|
2080
2080
|
</div>
|
|
2081
2081
|
</div>
|
|
2082
|
-
`}}sa.styles=[...Ji.styles,ta,ea],t([Je({type:Boolean,reflect:!0,state:!1})],sa.prototype,"noFlip",void 0),t([Je({type:Boolean,reflect:!0,state:!1})],sa.prototype,"menuAlignRight",void 0),t([Je({type:String,reflect:!0,state:!1})],sa.prototype,"drop",void 0),t([ot({slot:"toggler",flatten:!0})],sa.prototype,"_toggler",void 0),t([
|
|
2082
|
+
`}}sa.styles=[...Ji.styles,ta,ea],t([Je({type:Boolean,reflect:!0,state:!1})],sa.prototype,"noFlip",void 0),t([Je({type:Boolean,reflect:!0,state:!1})],sa.prototype,"menuAlignRight",void 0),t([Je({type:String,reflect:!0,state:!1})],sa.prototype,"drop",void 0),t([ot({slot:"toggler",flatten:!0})],sa.prototype,"_toggler",void 0),t([At("disabled",{waitUntilFirstUpdate:!0})],sa.prototype,"_handleDisabled",null);var ia=Me`:host([disabled]){cursor:not-allowed}.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.dropdown-item.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-50);pointer-events:none}::slotted(*){color:inherit!important;display:flex;gap:var(--sgds-gap-sm);text-decoration:none!important}`;class aa extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",(e=>{"Enter"===e.key&&this.anchor[0].click()})),this.addEventListener("click",(()=>{this.anchor.length>0&&this.anchor[0].click()})),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){return ee`
|
|
2083
2083
|
<div
|
|
2084
2084
|
class="dropdown-item ${bt({disabled:this.disabled,active:this.active})}"
|
|
2085
2085
|
tabindex=${this.disabled?"-1":"0"}
|
|
2086
2086
|
>
|
|
2087
2087
|
<slot></slot>
|
|
2088
2088
|
</div>
|
|
2089
|
-
`}}aa.styles=[ta,ia],aa.dependencies={"sgds-icon":
|
|
2089
|
+
`}}aa.styles=[ta,ia],aa.dependencies={"sgds-icon":Ot},t([ot({flatten:!0})],aa.prototype,"anchor",void 0),t([Je({type:Boolean})],aa.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],aa.prototype,"disabled",void 0);class oa extends lt{constructor(){super(...arguments),this.size="md"}render(){return ee`
|
|
2090
2090
|
<sgds-dropdown>
|
|
2091
2091
|
<button slot="toggler" class="overflow-btn">
|
|
2092
2092
|
<sgds-icon name="three-dots" size=${this.size}></sgds-icon>
|
|
2093
2093
|
</button>
|
|
2094
2094
|
<slot></slot>
|
|
2095
2095
|
</sgds-dropdown>
|
|
2096
|
-
`}}oa.styles=[...lt.styles,Gi],oa.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":
|
|
2097
|
-
<div aria-label=${
|
|
2096
|
+
`}}oa.styles=[...lt.styles,Gi],oa.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":Ot},t([Je({type:String,reflect:!0})],oa.prototype,"size",void 0);var na=Me`.breadcrumb{display:flex;gap:var(--sgds-gap-xs)}`;class ra extends lt{constructor(){super(...arguments),this.ariaLabel="breadcrumb"}_replaceExcessItemsWithDropdown(e){const t=document.createElement("sgds-breadcrumb-item"),s=document.createElement("sgds-overflow-menu");s.setAttribute("aria-haspopup","menu"),s.setAttribute("size","sm");const i=e.filter(((t,i)=>{if(i>0&&i<e.length-2){const e=t.querySelector("a").cloneNode(!0),i=document.createElement("sgds-dropdown-item");return i.appendChild(e),void s.appendChild(i)}return t}));t.appendChild(s),i.splice(1,0,t),this.defaultSlot.replaceWith(...i)}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter((e=>"sgds-breadcrumb-item"===e.tagName.toLowerCase()));t.forEach(((e,s)=>{s===t.length-1?(e.setAttribute("aria-current","page"),e.active=!0):e.removeAttribute("aria-current")})),t.length>=5&&this._replaceExcessItemsWithDropdown(t)}render(){return Tt`
|
|
2097
|
+
<div aria-label=${qt(this.ariaLabel)}>
|
|
2098
2098
|
<div class="breadcrumb">
|
|
2099
2099
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2100
2100
|
</div>
|
|
2101
2101
|
</div>
|
|
2102
|
-
`}}ra.styles=[...lt.styles,na],ra.dependencies={"sgds-overflow-menu":oa},t([Je({type:String})],ra.prototype,"ariaLabel",void 0),t([it("slot")],ra.prototype,"defaultSlot",void 0);var la=Me`:host{display:inline-flex}.nav-link::slotted(a){color:var(--sgds-link-color-default);cursor:pointer;line-height:var(--sgds-line-height-24);text-decoration:none!important}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible),.nav-link::slotted(a:hover),.nav-link::slotted(a[active]){color:var(--sgds-link-color-emphasis)}.nav-link::slotted(a:focus-visible:not([disabled])){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link::slotted(a[disabled]){cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([variant=danger]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-danger-color-default);color:var(--sgds-link-color-default,--sgds-danger-color-default)}:host([variant=danger]) .nav-link::slotted(a:focus),:host([variant=danger]) .nav-link::slotted(a:focus-visible),:host([variant=danger]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-danger-color-emphasis);color:var(--sgds-link-color-emphasis,--sgds-danger-color-emphasis)}:host([variant=neutral]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default)}:host([variant=neutral]) .nav-link::slotted(a:focus),:host([variant=neutral]) .nav-link::slotted(a:focus-visible),:host([variant=neutral]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}:host([variant=light]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-color-fixed-light)}:host([variant=light]) .nav-link::slotted(a:focus),:host([variant=light]) .nav-link::slotted(a:focus-visible),:host([variant=light]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-link-color-emphasis,--sgds-color-fixed-light)}:host([variant=dark]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-default,--sgds-color-fixed-dark)}:host([variant=dark]) .nav-link::slotted(a:focus),:host([variant=dark]) .nav-link::slotted(a:focus-visible),:host([variant=dark]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-emphasis,--sgds-color-fixed-dark)}:host([size=lg]) .nav-link::slotted(a){font-size:var(--sgds-font-size-3)!important}:host([size=sm]) .nav-link::slotted(a){font-size:var(--sgds-font-size-1)!important;line-height:var(--sgds-line-height-20)}:host([size=sm]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-md)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-md)!important}:host([size=xs]) .nav-link::slotted(a){font-size:var(--sgds-font-size-0)!important;line-height:var(--sgds-line-height-16)}`;class da extends lt{constructor(){super(...arguments),this.size="md",this.variant="primary"}_processAnchor(e){e.hasAttribute("disabled")?(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1")):e.setAttribute("tabindex","0")}_processIcon(e){e.querySelectorAll("sgds-icon").forEach((e=>{e.classList.remove("icon-left","icon-right"),e.previousElementSibling||e.previousSibling||e.classList.add("icon-left"),e.nextElementSibling||e.nextSibling||e.classList.add("icon-right")}))}_handleSlotChange(e){const t=e.target.assignedElements().find((e=>"a"===e.tagName.toLowerCase()));t&&(this._processAnchor(t),this._processIcon(t))}firstUpdated(e){super.firstUpdated(e);const t=this.querySelector("a");t&&(this._processAnchor(t),this._processIcon(t))}render(){return ee`<slot class="nav-link" @slotchange=${this._handleSlotChange}></slot>`}}da.styles=[...lt.styles,la],t([Je({type:String,reflect:!0})],da.prototype,"size",void 0),t([Je({type:String,reflect:!0})],da.prototype,"variant",void 0);var ca=Me`:host{align-items:center;display:flex;gap:var(--sgds-gap-xs)}:host([active]) .nav-link::slotted(*){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default);pointer-events:none}:host([active]) .nav-link::slotted(:focus),:host([active]) .nav-link::slotted(:focus-visible),:host([active]) .nav-link::slotted(:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}.separator svg{display:block}:host(:last-of-type) .separator{display:none}`;class ha extends lt{constructor(){super(...arguments),this.active=!1}render(){return ee`
|
|
2103
|
-
<slot class="nav-link"></slot>
|
|
2102
|
+
`}}ra.styles=[...lt.styles,na],ra.dependencies={"sgds-overflow-menu":oa},t([Je({type:String})],ra.prototype,"ariaLabel",void 0),t([it("slot")],ra.prototype,"defaultSlot",void 0);var la=Me`:host{--color-emphasis:var(--sgds-link-color-emphasis);display:inline-flex;vertical-align:middle}:host([tone=danger]),:host([variant=danger]){--color-emphasis:var(--sgds-danger-color-emphasis)}:host([tone=neutral]),:host([variant=neutral]){--color-emphasis:var(--sgds-color-default)}:host([tone=fixed-light]),:host([variant=light]){--color-emphasis:var(--sgds-color-fixed-light)}:host([variant=dark]) :host([tone=fixed-dark]){--color-emphasis:var(--sgds-color-fixed-dark)}:host([tone=danger]) .nav-link::slotted(a),:host([variant=danger]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-danger-color-default);color:var(--sgds-link-color-default,--sgds-danger-color-default)}:host([tone=danger]) .nav-link::slotted(a:focus),:host([tone=danger]) .nav-link::slotted(a:focus-visible),:host([tone=danger]) .nav-link::slotted(a:hover),:host([variant=danger]) .nav-link::slotted(a:focus),:host([variant=danger]) .nav-link::slotted(a:focus-visible),:host([variant=danger]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-danger-color-emphasis);color:var(--color-emphasis,--sgds-danger-color-emphasis)}:host([tone=neutral]) .nav-link::slotted(a),:host([variant=neutral]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default)}:host([tone=neutral]) .nav-link::slotted(a:focus),:host([tone=neutral]) .nav-link::slotted(a:focus-visible),:host([tone=neutral]) .nav-link::slotted(a:hover),:host([variant=neutral]) .nav-link::slotted(a:focus),:host([variant=neutral]) .nav-link::slotted(a:focus-visible),:host([variant=neutral]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-default);color:var(--color-emphasis,--sgds-color-default)}:host([tone=fixed-light]) .nav-link::slotted(a),:host([variant=light]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-color-fixed-light)}:host([tone=fixed-light]) .nav-link::slotted(a:focus),:host([tone=fixed-light]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-light]) .nav-link::slotted(a:hover),:host([variant=light]) .nav-link::slotted(a:focus),:host([variant=light]) .nav-link::slotted(a:focus-visible),:host([variant=light]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-light);color:var(--color-emphasis,--sgds-color-fixed-light)}:host([tone=fixed-dark]) .nav-link::slotted(a),:host([variant=dark]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-default,--sgds-color-fixed-dark)}:host([tone=fixed-dark]) .nav-link::slotted(a:focus),:host([tone=fixed-dark]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-dark]) .nav-link::slotted(a:hover),:host([variant=dark]) .nav-link::slotted(a:focus),:host([variant=dark]) .nav-link::slotted(a:focus-visible),:host([variant=dark]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-dark);color:var(--color-emphasis,--sgds-color-fixed-dark)}:host([size=md]) .nav-link::slotted(a){--text-underline-offset:3px;font-size:var(--sgds-font-size-2)!important;line-height:var(--sgds-line-height-24)!important}:host([size=lg]) .nav-link::slotted(a){--text-underline-offset:4px;font-size:var(--sgds-font-size-3)!important;line-height:var(--sgds-line-height-32)!important}:host([size=sm]) .nav-link::slotted(a){--text-underline-offset:2.8px;font-size:var(--sgds-font-size-1)!important;line-height:var(--sgds-line-height-20)!important}:host([size=xs]) .nav-link::slotted(a){--text-underline-offset:2.2px;font-size:var(--sgds-font-size-0)!important;line-height:var(--sgds-line-height-16)!important}.nav-link::slotted(a):after{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important}:host([size=xs]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-sm)!important;width:var(--sgds-icon-size-sm)!important}:host([size=sm]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-md)!important;width:var(--sgds-icon-size-md)!important}:host([size=md]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-lg)!important;width:var(--sgds-icon-size-lg)!important}:host([size=lg]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-xl)!important;width:var(--sgds-icon-size-xl)!important}::slotted(*){align-items:center;display:flex}.nav-link::slotted(a:focus-visible:not([disabled])){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link::slotted(a[disabled]){cursor:not-allowed;opacity:var(--sgds-opacity-50)}.nav-link::slotted(a){color:var(--sgds-link-color-default);cursor:pointer}:host(:not([active])) .nav-link::slotted(a:not(:hover)){text-decoration:underline solid transparent!important;text-underline-offset:0;transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible),.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){color:var(--color-emphasis)!important}.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){text-decoration-color:var(--color-emphasis)!important;text-underline-offset:var(--text-underline-offset);transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a[disabled]),:host([disabled]) .nav-link::slotted(a){text-decoration:none!important}@media (prefers-reduced-motion:reduce){.nav-link::slotted(a:hover),:host(:not([active])) .nav-link::slotted(a:not(:hover)),:host([active]) .nav-link::slotted(a){transition:none}}`;class da extends lt{constructor(){super(...arguments),this.size="md",this.variant="primary",this.tone="primary",this.active=!1,this.disabled=!1}_processAnchor(e){this.disabled&&e.setAttribute("disabled","true"),e.hasAttribute("disabled")?(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1")):e.setAttribute("tabindex","0")}_processIcon(e){const t={xs:"sm",sm:"md",md:"lg",lg:"xl"};e.querySelectorAll("sgds-icon").forEach((e=>{e.setAttribute("size",t[this.size]),e.classList.remove("icon-left","icon-right"),e.previousElementSibling||e.previousSibling||e.classList.add("icon-left"),e.nextElementSibling||e.nextSibling||e.classList.add("icon-right")}))}_handleSlotChange(e){const t=e.target.assignedElements().find((e=>"a"===e.tagName.toLowerCase()));t&&(this._processAnchor(t),this._processIcon(t))}firstUpdated(e){super.firstUpdated(e);const t=this.querySelector("a");t&&(this._processAnchor(t),this._processIcon(t))}render(){return ee`<slot class="nav-link " @slotchange=${this._handleSlotChange}></slot> `}}da.styles=[...lt.styles,la],t([Je({type:String,reflect:!0})],da.prototype,"size",void 0),t([Je({type:String,reflect:!0})],da.prototype,"variant",void 0),t([Je({type:String,reflect:!0})],da.prototype,"tone",void 0),t([Je({type:Boolean,reflect:!0})],da.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],da.prototype,"disabled",void 0);var ca=Me`:host{align-items:center;display:flex;gap:var(--sgds-gap-xs)}:host([active]) .nav-link::slotted(*){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default);pointer-events:none}:host([active]) .nav-link::slotted(:focus),:host([active]) .nav-link::slotted(:focus-visible),:host([active]) .nav-link::slotted(:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}.separator svg{display:block}:host(:last-of-type) .separator{display:none}`;class ha extends lt{constructor(){super(...arguments),this.active=!1}render(){return ee`
|
|
2103
|
+
<sgds-link><slot class="nav-link"></slot></sgds-link>
|
|
2104
2104
|
<div class="separator">
|
|
2105
2105
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
2106
2106
|
<path
|
|
@@ -2111,27 +2111,27 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2111
2111
|
/>
|
|
2112
2112
|
</svg>
|
|
2113
2113
|
</div>
|
|
2114
|
-
`}}ha.styles=[
|
|
2114
|
+
`}}ha.styles=[ca],ha.dependencies={"sgds-link":da},t([Je({type:Boolean,reflect:!0})],ha.prototype,"active",void 0);var ua=Me`:host{--btn-font-weight:var(--sgds-font-weight-regular);--btn-color:var(--sgds-color-fixed-light);--btn-bg:var(--sgds-primary-surface-default);--btn-hover-bg:var(--sgds-primary-surface-emphasis);--btn-border-radius:var(--sgds-border-radius-md);--btn-opacity:var(--sgds-opacity-100,1)}:host([variant=danger]){--btn-bg:var(--sgds-danger-surface-default);--btn-hover-bg:var(--sgds-danger-surface-emphasis);--btn-color:var(--sgds-color-fixed-light)}:host([variant=primary][tone=brand]){--btn-bg:var(--sgds-primary-surface-default);--btn-color:var(--sgds-color-fixed-light)}:host([variant=outline]){--btn-border-width:var(--sgds-border-width-1)}:host([variant=outline][tone=brand]){--btn-border-color:var(--sgds-primary-border-color-default);--btn-bg:var(--sgds-bg-transparent);--btn-color:var(--sgds-primary-color-default);--btn-hover-bg:var(--sgds-primary-bg-translucent)}:host([variant=ghost][tone=brand]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-primary-surface-translucent);--btn-color:var(--sgds-primary-color-default)}:host([variant=primary][tone=danger]){--btn-bg:var(--sgds-danger-surface-default);--btn-hover-bg:var(--sgds-danger-surface-emphasis);--btn-color:var(--sgds-color-fixed-light)}:host([variant=outline][tone=danger]){--btn-border-color:var(--sgds-danger-border-color-default);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-danger-surface-translucent);--btn-color:var(--sgds-danger-color-default)}:host([variant=ghost][tone=danger]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-danger-surface-translucent);--btn-color:var(--sgds-danger-color-default)}:host([variant=primary][tone=fixed-light]){--btn-bg:var(--sgds-surface-fixed-light);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark,hsla(0,0%,5%,.2)) 0%,var(--sgds-bg-translucent-fixed-dark,hsla(0,0%,5%,.2)) 100%),var(--sgds-surface-fixed-light,#fff);--btn-color:var(--sgds-color-fixed-dark)}:host([variant=outline][tone=fixed-light]){--btn-border-color:var(--sgds-border-color-fixed-light);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark) 0%,var(--sgds-bg-translucent-fixed-dark) 100%),var(--sgds-bg-transparent);--btn-color:var(--sgds-color-fixed-light)}:host([variant=ghost][tone=fixed-light]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark) 0%,var(--sgds-bg-translucent-fixed-dark) 100%),var(--sgds-bg-transparent);--btn-color:var(--sgds-color-fixed-light)}:host([variant=primary][tone=neutral]){--btn-bg:var(--sgds-surface-inverse);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-inverse) 0%,var(--sgds-bg-translucent-inverse) 100%),var(--sgds-surface-inverse);--btn-color:var(--sgds-color-inverse)}:host([variant=outline][tone=neutral]){--btn-border-color:var(--sgds-border-color-emphasis);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-inverse) 0%,var(--sgds-bg-translucent-inverse) 100%),var(--sgds-bg-translucent-subtle);--btn-color:var(--sgds-color-default)}:host([variant=ghost][tone=neutral]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-bg-translucent-subtle);--btn-color:var(--sgds-color-default)}:host([variant=ghost]) .btn,:host([variant=outline]) .btn,:host([variant=primary]) .btn{color:var(--btn-color)}:host([variant=outline]) .btn{border:var(--btn-border-width) solid var(--btn-border-color)}:host([size=lg]) .btn{font-size:var(--sgds-font-size-3);height:var(--sgds-dimension-56);line-height:var(--sgds-line-height-32);min-width:var(--sgds-dimension-112);padding:var(--sgds-padding-none) var(--sgds-padding-xl)}:host([size=sm]) .btn{font-size:var(--sgds-font-size-1);height:var(--sgds-dimension-40);line-height:var(--sgds-line-height-20);min-width:var(--sgds-dimension-80);padding:var(--sgds-padding-none) var(--sgds-padding-md)}:host([size=xs]) .btn{font-size:var(--sgds-font-size-0);height:var(--sgds-dimension-32);line-height:var(--sgds-line-height-16);min-width:var(--sgds-dimension-64);padding:var(--sgds-padding-none) var(--sgds-padding-sm)}.btn{align-items:center;background-color:var(--btn-bg);border:1px solid var(--sgds-border-color-transparent);border-radius:var(--btn-border-radius);color:var(--sgds-color-fixed-light);cursor:pointer;display:inline-flex;font-size:var(--sgds-font-size-2);font-weight:var(--btn-font-weight);gap:var(--sgds-gap-2-xs);height:var(--sgds-dimension-48);justify-content:center;line-height:var(--sgds-line-height-24);min-width:var(--sgds-dimension-96);opacity:var(--btn-opacity);padding:var(--sgds-padding-none) var(--sgds-padding-lg);text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;user-select:none;vertical-align:middle;white-space:nowrap;width:inherit}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn.active,.btn:hover{background:var(--btn-hover-bg)}.btn:focus,.btn:focus-visible{background:var(--btn-hover-bg);border-color:transparent;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.btn.disabled,.btn:disabled{color:var(--btn-color);cursor:not-allowed;opacity:var(--sgds-opacity-40)}.btn.loading{cursor:default}.btn slot::slotted(*){color:var(--btn-color)}`;class pa extends lt{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.active=!1,this.disabled=!1,this.target="_self"}focus(e){this.button.focus(e)}click(){this.button.click()}blur(){this.button.blur()}_handleBlur(){this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleClick(e){if(this.disabled||this.loading)return e.preventDefault(),void e.stopPropagation()}_handleKeydown(e){if("Enter"===e.key&&this.loading)return e.preventDefault(),void e.stopPropagation()}_assignSpinnerSize(e){return"xs"===e||"sm"===e?"xs":"md"===e||"lg"===e?"sm":void 0}_assignSpinnerTone(e,t){return"fixed-light"===e&&"primary"===t?"fixed-dark":"neutral"===e&&"primary"===t?"inverse":"fixed-light"===e||"primary"===t?"fixed-light":"neutral"!==e||"outline"!==t&&"ghost"!==t?"brand":"neutral"}}pa.styles=[...lt.styles,ua],t([it(".btn")],pa.prototype,"button",void 0),t([Je({reflect:!0})],pa.prototype,"variant",void 0),t([Je({reflect:!0})],pa.prototype,"tone",void 0),t([Je({reflect:!0})],pa.prototype,"size",void 0),t([Je({type:Boolean,reflect:!0})],pa.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],pa.prototype,"disabled",void 0),t([Je({type:String,reflect:!0})],pa.prototype,"href",void 0),t([Je({type:String,reflect:!0})],pa.prototype,"target",void 0),t([Je({type:String,reflect:!0})],pa.prototype,"download",void 0),t([Je({type:String})],pa.prototype,"ariaLabel",void 0),t([Je({type:Boolean})],pa.prototype,"loading",void 0);class ga{constructor(e,t){(this.host=e).addController(this),this.options=Object.assign({form:e=>e.closest("form")},t)}hostConnected(){this.form=this.options.form(this.host)}hostDisconnected(){this.form&&(this.form=void 0)}doAction(e,t){if(this.form){const s=document.createElement("button");s.type=e,s.style.position="absolute",s.style.width="0",s.style.height="0",s.style.clipPath="inset(50%)",s.style.overflow="hidden",s.style.whiteSpace="nowrap",t&&["formaction","formmethod","formnovalidate","formtarget"].forEach((e=>{t.hasAttribute(e)&&s.setAttribute(e,t.getAttribute(e))})),this.form.append(s),s.click(),s.remove()}}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}}var va=Me`:host{display:inline-block}:host([fullWidth]),:host([fullWidth]) .btn{width:100%}:host([fullWidth]) .btn.has-left-icon{justify-content:flex-start}:host([fullWidth]) .btn.has-right-icon{justify-content:space-between}:host([fullWidth]) .btn.has-left-icon.has-right-icon{justify-content:center}.btn span{padding:0 var(--sgds-padding-2-xs)}.btn.no-icon{gap:var(--sgds-gap-none)}.loading{cursor:default}`;class ma extends pa{constructor(){super(...arguments),this.formSubmitController=new ga(this,{form:e=>{if(e.hasAttribute("form")){const t=e.getRootNode(),s=e.getAttribute("form");return t.getElementById(s)}return e.closest("form")}}),this.type="button",this.fullWidth=!1,this.hasLeftIconSlot=!1,this.hasRightIconSlot=!1,this.hasSlotController=new Wi(this,"leftIcon","rightIcon"),this._clickHandler=()=>{"submit"===this.type&&this.formSubmitController.submit(this),"reset"===this.type&&this.formSubmitController.reset(this)}}updated(){this.hasLeftIconSlot||(this.hasLeftIconSlot=this.hasSlotController.test("leftIcon")),this.hasRightIconSlot||(this.hasRightIconSlot=this.hasSlotController.test("rightIcon"))}_handleClick(e){if(this.disabled||this.loading)return e.preventDefault(),void e.stopPropagation();this.removeEventListener("click",this._clickHandler),this.addEventListener("click",this._clickHandler)}render(){const e=this.href,t=e?Bt`a`:Bt`button`,s=!this.hasLeftIconSlot&&!this.hasRightIconSlot;return Tt`
|
|
2115
2115
|
<${t}
|
|
2116
2116
|
class="btn ${bt({disabled:this.disabled,active:this.active,"has-left-icon":this.hasLeftIconSlot,"has-right-icon":this.hasRightIconSlot,"no-icon":s,loading:this.loading})}"
|
|
2117
|
-
?disabled=${
|
|
2118
|
-
type=${
|
|
2119
|
-
href=${
|
|
2120
|
-
target=${
|
|
2121
|
-
download=${
|
|
2122
|
-
rel=${
|
|
2123
|
-
role=${
|
|
2117
|
+
?disabled=${qt(e?void 0:this.disabled)}
|
|
2118
|
+
type=${qt(e?void 0:this.type)}
|
|
2119
|
+
href=${qt(e?this.href:void 0)}
|
|
2120
|
+
target=${qt(e?this.target:void 0)}
|
|
2121
|
+
download=${qt(e?this.download:void 0)}
|
|
2122
|
+
rel=${qt(e&&"_blank"===this.target?"noreferrer noopener":void 0)}
|
|
2123
|
+
role=${qt(e?"button":void 0)}
|
|
2124
2124
|
aria-disabled=${this.disabled||this.loading?"true":"false"}
|
|
2125
2125
|
tabindex=${this.disabled?"-1":"0"}
|
|
2126
2126
|
@click=${this._handleClick}
|
|
2127
2127
|
@keydown=${this._handleKeydown}
|
|
2128
2128
|
@focus=${this._handleFocus}
|
|
2129
2129
|
@blur=${this._handleBlur}
|
|
2130
|
-
aria-label=${
|
|
2130
|
+
aria-label=${qt(this.loading?"Loading":this.ariaLabel)}
|
|
2131
2131
|
>
|
|
2132
2132
|
${this.loading?Tt`<sgds-spinner
|
|
2133
|
-
size=${
|
|
2134
|
-
tone=${
|
|
2133
|
+
size=${qt(this._assignSpinnerSize(this.size))}
|
|
2134
|
+
tone=${qt(this._assignSpinnerTone(this.tone,this.variant))}
|
|
2135
2135
|
></sgds-spinner>`:Tt`<slot name="leftIcon"></slot>
|
|
2136
2136
|
<span><slot></slot></span>
|
|
2137
2137
|
<slot name="rightIcon"></slot>`}
|
|
@@ -2173,14 +2173,14 @@ const Ft=e=>e??ie;var Zt=Me`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2173
2173
|
* Copyright 2020 Google LLC
|
|
2174
2174
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2175
2175
|
*/
|
|
2176
|
-
class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==vt)throw new Error("The `live` directive is not allowed on child or event bindings");if(!Qt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===gt){if(t===s[i])return se}else if(e.type===vt){if(!!t===s.hasAttribute(i))return se}else if(e.type===ut&&s.getAttribute(i)===String(t))return se;return is(e),t}});var $a=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)}`,Da=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)}`,Aa=Me`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Va=Me`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class Ea extends lt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Xi("input"),this._labelId=Xi("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Ea.styles=[...lt.styles,$a,Da,Aa,Va],t([Je({reflect:!0})],Ea.prototype,"label",void 0),t([Je({reflect:!0})],Ea.prototype,"hintText",void 0),t([Je({reflect:!0})],Ea.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Ea.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],Ea.prototype,"invalid",void 0);const Ia=(e="value")=>(t,s)=>{const i=t.constructor,a=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,o,n){var r;const l=i.getPropertyOptions(e);if(t===("string"==typeof l.attribute?l.attribute:e).toLowerCase()){const t=l.converter||Re,i=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:Re.fromAttribute)(n,l.type);this[e]!==i&&(this[s]=i)}a.call(this,t,o,n)}};class Ba{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,s){return this._internals.setValidity(e,t,s)}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 s in t)t[s]&&(this.validationError=s.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const Pa=e=>{class s 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 Ba(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,s){return this.inputValidationController.setValidity(e,t,s)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return s.formAssociated=!0,t([at("sgds-input")],s.prototype,"sgdsInput",void 0),t([at("sgds-datepicker-input")],s.prototype,"sgdsDatepickerInput",void 0),s};var Ta=Me`.form-check-input[type=checkbox]{border-radius:var(--sgds-form-border-radius-md)}.form-check-input:checked,.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path d="M14.347 3.979a.522.522 0 0 1 0 .739L7.043 12.02a.521.521 0 0 1-.738 0L2.653 8.369a.522.522 0 1 1 .739-.738l3.282 3.283 6.934-6.935a.52.52 0 0 1 .739 0Z" fill="%23fff"/></svg>')}.form-check-input:indeterminate,.form-check-input[indeterminate]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5Z" fill="%23fff"/></svg>');background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:indeterminate:focus,.form-check-input:indeterminate:hover,.form-check-input[indeterminate]:focus-visible,.form-check-input[indeterminate]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}.form-check-input:checked.is-invalid,.form-check-input:indeterminate.is-invalid,.form-check-input[checked].is-invalid,.form-check-input[indeterminate].is-invalid{background-color:var(--sgds-form-danger-surface-default)}.form-check-label{flex:1}`,La=Me`input{margin:0}.form-check{display:flex;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.form-check-input{appearance:none;background-color:var(--sgds-form-surface-default);background-image:var(--sgds-radio-bg-image);background-position:50%;background-repeat:no-repeat;background-size:auto;border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);height:var(--sgds-form-height-sm);width:var(--sgds-form-width-xs)}.form-check-input:checked,.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):not([aria-checked=true]):not(:focus-visible):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):checked:focus-visible,.form-check-input:not([disabled]):not(.is-invalid):checked:hover,.form-check-input:not([disabled]):not(.is-invalid)[checked]:focus-visible,.form-check-input:not([disabled]):not(.is-invalid)[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-check-input:not([disabled]).is-invalid{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-check-input:not([disabled]).is-invalid:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Fa extends(Pa(Ea)){constructor(){super(...arguments),this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.invalidFeedback="",this._isTouched=!1}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(e){this.indeterminate&&(this.indeterminate=!this.indeterminate),this.checked=!this.checked,super._mixinHandleChange(e),this.emit("sgds-change",{detail:{checked:this.checked,value:this.value}}),this.checked?this.emit("sgds-check",{detail:{value:this.value}}):this.emit("sgds-uncheck",{detail:{value:this.value}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleDisabledChange(){this.setInvalid(!1)}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_mixinResetFormControl(){this._isTouched=!1,this.checked=this.input.checked=this.defaultChecked,this.input.dispatchEvent(new InputEvent("reset")),this._mixinResetValidity(this.input)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}firstUpdated(e){super.firstUpdated(e),this.checked&&this.emit("sgds-check",{detail:{value:this.value}})}render(){const e="both"===this.hasFeedback||"style"===this.hasFeedback,t="both"===this.hasFeedback||"text"===this.hasFeedback;return ee`
|
|
2176
|
+
class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==vt)throw new Error("The `live` directive is not allowed on child or event bindings");if(!Qt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===gt){if(t===s[i])return se}else if(e.type===vt){if(!!t===s.hasAttribute(i))return se}else if(e.type===ut&&s.getAttribute(i)===String(t))return se;return is(e),t}});var $a=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)}`,Aa=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)}`,Da=Me`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Va=Me`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class Ea extends lt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Xi("input"),this._labelId=Xi("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Ea.styles=[...lt.styles,$a,Aa,Da,Va],t([Je({reflect:!0})],Ea.prototype,"label",void 0),t([Je({reflect:!0})],Ea.prototype,"hintText",void 0),t([Je({reflect:!0})],Ea.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Ea.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],Ea.prototype,"invalid",void 0);const Ia=(e="value")=>(t,s)=>{const i=t.constructor,a=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,o,n){var r;const l=i.getPropertyOptions(e);if(t===("string"==typeof l.attribute?l.attribute:e).toLowerCase()){const t=l.converter||Re,i=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:Re.fromAttribute)(n,l.type);this[e]!==i&&(this[s]=i)}a.call(this,t,o,n)}};class Ba{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,s){return this._internals.setValidity(e,t,s)}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 s in t)t[s]&&(this.validationError=s.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const Pa=e=>{class s 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 Ba(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,s){return this.inputValidationController.setValidity(e,t,s)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return s.formAssociated=!0,t([at("sgds-input")],s.prototype,"sgdsInput",void 0),t([at("sgds-datepicker-input")],s.prototype,"sgdsDatepickerInput",void 0),s};var Ta=Me`.form-check-input[type=checkbox]{border-radius:var(--sgds-form-border-radius-md)}.form-check-input:checked,.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path d="M14.347 3.979a.522.522 0 0 1 0 .739L7.043 12.02a.521.521 0 0 1-.738 0L2.653 8.369a.522.522 0 1 1 .739-.738l3.282 3.283 6.934-6.935a.52.52 0 0 1 .739 0Z" fill="%23fff"/></svg>')}.form-check-input:indeterminate,.form-check-input[indeterminate]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5Z" fill="%23fff"/></svg>');background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:indeterminate:focus,.form-check-input:indeterminate:hover,.form-check-input[indeterminate]:focus-visible,.form-check-input[indeterminate]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}.form-check-input:checked.is-invalid,.form-check-input:indeterminate.is-invalid,.form-check-input[checked].is-invalid,.form-check-input[indeterminate].is-invalid{background-color:var(--sgds-form-danger-surface-default)}.form-check-label{flex:1}`,La=Me`input{margin:0}.form-check{display:flex;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.form-check-input{appearance:none;background-color:var(--sgds-form-surface-default);background-image:var(--sgds-radio-bg-image);background-position:50%;background-repeat:no-repeat;background-size:auto;border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);height:var(--sgds-form-height-sm);width:var(--sgds-form-width-xs)}.form-check-input:checked,.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):not([aria-checked=true]):not(:focus-visible):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):checked:focus-visible,.form-check-input:not([disabled]):not(.is-invalid):checked:hover,.form-check-input:not([disabled]):not(.is-invalid)[checked]:focus-visible,.form-check-input:not([disabled]):not(.is-invalid)[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-check-input:not([disabled]).is-invalid{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-check-input:not([disabled]).is-invalid:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Fa extends(Pa(Ea)){constructor(){super(...arguments),this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.invalidFeedback="",this._isTouched=!1}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(e){this.indeterminate&&(this.indeterminate=!this.indeterminate),this.checked=!this.checked,super._mixinHandleChange(e),this.emit("sgds-change",{detail:{checked:this.checked,value:this.value}}),this.checked?this.emit("sgds-check",{detail:{value:this.value}}):this.emit("sgds-uncheck",{detail:{value:this.value}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleDisabledChange(){this.setInvalid(!1)}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_mixinResetFormControl(){this._isTouched=!1,this.checked=this.input.checked=this.defaultChecked,this.input.dispatchEvent(new InputEvent("reset")),this._mixinResetValidity(this.input)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}firstUpdated(e){super.firstUpdated(e),this.checked&&this.emit("sgds-check",{detail:{value:this.value}})}render(){const e="both"===this.hasFeedback||"style"===this.hasFeedback,t="both"===this.hasFeedback||"text"===this.hasFeedback;return ee`
|
|
2177
2177
|
<div class="form-check">
|
|
2178
2178
|
<input
|
|
2179
2179
|
class=${bt({"form-check-input":!0,"is-invalid":e&&this.invalid})}
|
|
2180
2180
|
type="checkbox"
|
|
2181
2181
|
id=${this._controlId}
|
|
2182
2182
|
aria-invalid=${this.invalid?"true":"false"}
|
|
2183
|
-
name=${
|
|
2183
|
+
name=${qt(this.name)}
|
|
2184
2184
|
?indeterminate=${this.indeterminate}
|
|
2185
2185
|
?required=${this.required}
|
|
2186
2186
|
aria-disabled=${this.disabled?"true":"false"}
|
|
@@ -2211,7 +2211,7 @@ class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==v
|
|
|
2211
2211
|
</div>
|
|
2212
2212
|
</div>
|
|
2213
2213
|
`:ie}
|
|
2214
|
-
`}}Fa.styles=[...Ea.styles,La,Ta],t([Je({type:String,reflect:!0})],Fa.prototype,"value",void 0),t([Je({type:Boolean,reflect:!0})],Fa.prototype,"checked",void 0),t([Je({type:String,reflect:!0})],Fa.prototype,"hasFeedback",void 0),t([Ia("checked")],Fa.prototype,"defaultChecked",void 0),t([Je({type:Boolean,reflect:!0})],Fa.prototype,"indeterminate",void 0),t([Je({type:Boolean,reflect:!0})],Fa.prototype,"required",void 0),t([Je({type:String,reflect:!0})],Fa.prototype,"invalidFeedback",void 0),t([et()],Fa.prototype,"_isTouched",void 0),t([
|
|
2214
|
+
`}}Fa.styles=[...Ea.styles,La,Ta],t([Je({type:String,reflect:!0})],Fa.prototype,"value",void 0),t([Je({type:Boolean,reflect:!0})],Fa.prototype,"checked",void 0),t([Je({type:String,reflect:!0})],Fa.prototype,"hasFeedback",void 0),t([Ia("checked")],Fa.prototype,"defaultChecked",void 0),t([Je({type:Boolean,reflect:!0})],Fa.prototype,"indeterminate",void 0),t([Je({type:Boolean,reflect:!0})],Fa.prototype,"required",void 0),t([Je({type:String,reflect:!0})],Fa.prototype,"invalidFeedback",void 0),t([et()],Fa.prototype,"_isTouched",void 0),t([At("disabled",{waitUntilFirstUpdate:!0})],Fa.prototype,"_handleDisabledChange",null),t([At("_isTouched",{waitUntilFirstUpdate:!0})],Fa.prototype,"_handleIsTouched",null);var Za=Me`:host{--sgds-checkbox-group-gap:var(--sgds-spacer-2)}fieldset{border:0;gap:var(--sgds-form-gap-md);margin:0;min-width:0;padding:0}.label-hint-container,fieldset{display:flex;flex-direction:column}.label-hint-container{gap:var(--sgds-form-gap-sm)}.label-hint-container .form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular)}.checkbox-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.checkbox-group-validation-input{display:none}:host([disabled]) .label-hint-container{cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Ha extends(Pa(Ea)){constructor(){super(...arguments),this.label="",this.invalidFeedback="Please tick at least one box if you want to proceed",this.hasFeedback=!1,this.hintText="",this.required=!1,this.value="",this._isTouched=!1,this.defaultValue="",this._blurredCheckboxes=new Set}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-check",(e=>{const{value:t}=e.detail;!this.value.includes(t)&&this._addValue(t)})),this.addEventListener("sgds-uncheck",(e=>{const{value:t}=e.detail;this._removeValue(t)})),this.addEventListener("sgds-blur",(e=>{const t=e.target;this._blurredCheckboxes.add(t),Array.from(this._blurredCheckboxes).length===this._checkboxes.length&&(this._isTouched=!0,this._blurredCheckboxes.clear())}))}firstUpdated(e){super.firstUpdated(e),this.value&&this._updateInputValue(),this.invalid&&this._updateInvalid()}_renderHintText(){const e=ee` <div class="form-text" id="${this._controlId}Help">${this.hintText}</div> `;return this.hintText&&e}_addValue(e){const t=this.value?this.value.split(";"):[];t.push(e),this.value=t.join(";")}_removeValue(e){const t=(this.value?this.value.split(";"):[]).filter((t=>t!==e));this.value=t.join(";")}_sanitizeSlot(){this._checkboxes.forEach((e=>{e.checked=e.defaultChecked=this.value.includes(e.value),e.hasFeedback=this.hasFeedback?"style":null,e.required&&(console.error("Checkboxes in a group cannot have required or hasFeedback prop set to true"),e.remove())})),this._disabledChildCheckboxes()}_disabledChildCheckboxes(){if(this.disabled){this._checkboxes.forEach((e=>e.disabled=this.disabled))}}_handleValueChange(){if("reset"===this.formEvent&&this.value===this.defaultValue)return void(this.formEvent=null);this.emit("sgds-change");this._checkboxes.forEach((e=>{e.checked=this.value.includes(e.value)})),this._updateInputValue(),this._updateInvalid()}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity(),this._updateInvalid())}_updateInvalid(){this._checkboxes.forEach((e=>e.invalid=this.invalid))}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_mixinResetFormControl(){this.value=this.input.value=this.defaultValue,this._updateInputValue("reset"),this._mixinResetValidity(this.input)}async _updateInputValue(e="change"){this.input.value=this.value,this.input.dispatchEvent(new InputEvent(e)),this.formEvent=e}render(){return ee`
|
|
2215
2215
|
<fieldset>
|
|
2216
2216
|
<div class="label-hint-container">
|
|
2217
2217
|
<label class="form-label">${this.label}</label>
|
|
@@ -2245,7 +2245,7 @@ class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==v
|
|
|
2245
2245
|
</div>
|
|
2246
2246
|
`:ie}
|
|
2247
2247
|
</fieldset>
|
|
2248
|
-
`}}Ha.styles=[...Ea.styles,Za],t([Je({reflect:!0})],Ha.prototype,"label",void 0),t([Je({type:String,reflect:!0})],Ha.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Ha.prototype,"hasFeedback",void 0),t([Je({reflect:!0})],Ha.prototype,"hintText",void 0),t([Je({type:Boolean,reflect:!0})],Ha.prototype,"required",void 0),t([Je({reflect:!0})],Ha.prototype,"value",void 0),t([et()],Ha.prototype,"_isTouched",void 0),t([Ia()],Ha.prototype,"defaultValue",void 0),t([et()],Ha.prototype,"_blurredCheckboxes",void 0),t([et()],Ha.prototype,"formEvent",void 0),t([ot()],Ha.prototype,"_checkboxes",void 0),t([
|
|
2248
|
+
`}}Ha.styles=[...Ea.styles,Za],t([Je({reflect:!0})],Ha.prototype,"label",void 0),t([Je({type:String,reflect:!0})],Ha.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Ha.prototype,"hasFeedback",void 0),t([Je({reflect:!0})],Ha.prototype,"hintText",void 0),t([Je({type:Boolean,reflect:!0})],Ha.prototype,"required",void 0),t([Je({reflect:!0})],Ha.prototype,"value",void 0),t([et()],Ha.prototype,"_isTouched",void 0),t([Ia()],Ha.prototype,"defaultValue",void 0),t([et()],Ha.prototype,"_blurredCheckboxes",void 0),t([et()],Ha.prototype,"formEvent",void 0),t([ot()],Ha.prototype,"_checkboxes",void 0),t([At("value",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleValueChange",null),t([At("_isTouched",{waitUntilFirstUpdate:!0})],Ha.prototype,"_handleIsTouched",null),t([At("invalid",{waitUntilFirstUpdate:!0})],Ha.prototype,"_updateInvalid",null);var za=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)}`;class Ra extends(Pa(Ji)){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=Xi("input"),this._labelId=Xi("label"),this.floatingOpts={middleware:[Ni({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?ee` <div class="invalid-feedback-container">
|
|
2249
2249
|
<slot name="invalidIcon">
|
|
2250
2250
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
2251
2251
|
</slot>
|
|
@@ -2259,7 +2259,7 @@ class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==v
|
|
|
2259
2259
|
class=${bt({"form-label":!0,required:this.required})}
|
|
2260
2260
|
>${this.label}</label
|
|
2261
2261
|
>
|
|
2262
|
-
`;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))),s=await Promise.all(t);return null==s?void 0:s.map((e=>{var t;return{label:e.innerText,value:e.getAttribute("value"),disabled:null!==(t=e.disabled)&&void 0!==t?t:void 0}}))}}Ra.styles=[...Ji.styles,ea,
|
|
2262
|
+
`;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))),s=await Promise.all(t);return null==s?void 0:s.map((e=>{var t;return{label:e.innerText,value:e.getAttribute("value"),disabled:null!==(t=e.disabled)&&void 0!==t?t:void 0}}))}}Ra.styles=[...Ji.styles,ea,Aa,$a,za],t([Je({reflect:!0})],Ra.prototype,"label",void 0),t([Je({reflect:!0})],Ra.prototype,"hintText",void 0),t([Je({reflect:!0})],Ra.prototype,"name",void 0),t([Je({type:String,reflect:!0})],Ra.prototype,"placeholder",void 0),t([Je({type:Boolean,reflect:!0})],Ra.prototype,"autofocus",void 0),t([Je({type:Boolean,reflect:!0})],Ra.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],Ra.prototype,"required",void 0),t([Je({type:String,reflect:!0})],Ra.prototype,"value",void 0),t([et()],Ra.prototype,"displayValue",void 0),t([Ia()],Ra.prototype,"defaultValue",void 0),t([Je({type:Boolean,reflect:!0})],Ra.prototype,"hasFeedback",void 0),t([Je({type:String,reflect:!0})],Ra.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Ra.prototype,"invalid",void 0),t([Je({type:Array})],Ra.prototype,"menuList",void 0),t([et()],Ra.prototype,"selectedItems",void 0),t([et()],Ra.prototype,"filteredList",void 0),t([at("input.form-control")],Ra.prototype,"_input",void 0);var Oa=Me`:host{display:block;position:relative}.dropdown{display:flex;height:100%}.dropdown-menu{box-sizing:border-box;max-height:10rem;overflow-x:hidden;overflow-y:auto}.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.combobox .form-control-group{height:unset;min-height:var(--sgds-dimension-48);min-width:var(--sgds-dimension-256)}.combobox-input-container{display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);padding:calc(var(--sgds-form-padding-y) - var(--sgds-form-border-width-default)) 0;width:calc(100% - var(--sgds-icon-size-md, 1.25rem))}.empty-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px)}`,Na=Me`:host([active]) .dropdown-item{background-color:var(--sgds-primary-surface-translucent)}.dropdown-item{background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;height:100%;padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}.dropdown-item .normal-item-content{align-items:center;display:flex;justify-content:space-between}:host([active]) .dropdown-item .normal-item-content{color:var(--sgds-primary-bg-default)}:host([active]) .dropdown-item .normal-item-content sgds-icon{fill:var(--sgds-primary-bg-default);color:var(--sgds-primary-bg-default)}.dropdown-item:hover{background:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{background:var(--sgds-bg-translucent-subtle);outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Ua extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){const e={disabled:this.disabled,active:this.active};return ee`
|
|
2263
2263
|
<div class="dropdown-item ${bt(e)}" tabindex=${this.disabled?"-1":"0"}>
|
|
2264
2264
|
${this._renderItemContent()}
|
|
2265
2265
|
</div>
|
|
@@ -2272,7 +2272,7 @@ class extends ft{constructor(e){if(super(e),e.type!==gt&&e.type!==ut&&e.type!==v
|
|
|
2272
2272
|
<slot></slot>
|
|
2273
2273
|
${this.active?ee` <sgds-icon name="check"></sgds-icon> `:ie}
|
|
2274
2274
|
</div>
|
|
2275
|
-
`}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",(e=>{"Enter"===e.key&&(this.checkbox?this._handleCheckboxClick():this._handleNonCheckboxClick())}))}firstUpdated(e){super.firstUpdated(e);const t=this.closest("sgds-combo-box");(null==t?void 0:t.multiSelect)&&(this.checkbox=!0)}_handleNonCheckboxClick(){this.checkbox||this.emit("i-sgds-select")}_handleCheckboxClick(){this.shadowRoot.querySelector("sgds-checkbox").click()}_handleCheckboxChange(e){const t=e.target;this.active=t.checked,this.active?this.emit("i-sgds-select"):this.emit("i-sgds-unselect")}}qa.dependencies={"sgds-icon":
|
|
2275
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",(e=>{"Enter"===e.key&&(this.checkbox?this._handleCheckboxClick():this._handleNonCheckboxClick())}))}firstUpdated(e){super.firstUpdated(e);const t=this.closest("sgds-combo-box");(null==t?void 0:t.multiSelect)&&(this.checkbox=!0)}_handleNonCheckboxClick(){this.checkbox||this.emit("i-sgds-select")}_handleCheckboxClick(){this.shadowRoot.querySelector("sgds-checkbox").click()}_handleCheckboxChange(e){const t=e.target;this.active=t.checked,this.active?this.emit("i-sgds-select"):this.emit("i-sgds-unselect")}}qa.dependencies={"sgds-icon":Ot,"sgds-checkbox":Fa},t([Je({type:Boolean,reflect:!0})],qa.prototype,"checkbox",void 0);
|
|
2276
2276
|
/**
|
|
2277
2277
|
* @license
|
|
2278
2278
|
* Copyright 2017 Google LLC
|
|
@@ -2300,8 +2300,8 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2300
2300
|
class="form-control"
|
|
2301
2301
|
type="text"
|
|
2302
2302
|
id=${this._controlId}
|
|
2303
|
-
name=${
|
|
2304
|
-
placeholder=${
|
|
2303
|
+
name=${qt(this.name)}
|
|
2304
|
+
placeholder=${qt(this.placeholder)}
|
|
2305
2305
|
aria-invalid=${this.invalid?"true":"false"}
|
|
2306
2306
|
?autofocus=${this.autofocus}
|
|
2307
2307
|
?disabled=${this.disabled}
|
|
@@ -2311,7 +2311,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2311
2311
|
@input=${this._handleInputChange}
|
|
2312
2312
|
@blur=${this._handleInputBlur}
|
|
2313
2313
|
@focus=${this._handleFocus}
|
|
2314
|
-
aria-describedby=${
|
|
2314
|
+
aria-describedby=${qt(this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:void 0)}
|
|
2315
2315
|
aria-labelledby="${this._labelId} ${this._controlId}Help ${this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:""}"
|
|
2316
2316
|
/>
|
|
2317
2317
|
</div>
|
|
@@ -2340,18 +2340,18 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2340
2340
|
class="visually-hidden"
|
|
2341
2341
|
?required=${this.required}
|
|
2342
2342
|
/>`:ie}
|
|
2343
|
-
`}}function Ka(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Ga(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Xa(e,t){const s=Ka(e);return isNaN(t)?Ga(e,NaN):t?(s.setDate(s.getDate()+t),s):s}Wa.styles=[...Ra.styles,za,Oa],Wa.dependencies={"sgds-combo-box-option":qa,"sgds-icon":Nt,"sgds-badge":Ki},t([Je({type:Boolean,reflect:!0})],Wa.prototype,"multiSelect",void 0),t([Je({type:Boolean,reflect:!0})],Wa.prototype,"badgeFullWidth",void 0),t([Je()],Wa.prototype,"filterFunction",void 0),t([at("input#multi-select-input-tracker")],Wa.prototype,"_multiSelectInput",void 0),t([ot({flatten:!0,selector:"sgds-combo-box-option"})],Wa.prototype,"options",void 0),t([et()],Wa.prototype,"optionList",void 0),t([et()],Wa.prototype,"emptyMenu",void 0),t([Dt("value",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleValueChange",null),t([Dt("optionList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleOptionListChange",null),t([Dt("menuList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleMenuListChange",null);const Qa=6048e5,Ja=864e5;let eo={};function to(){return eo}function so(e,t){const s=to(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,a=Ka(e),o=a.getDay(),n=(o<i?7:0)+o-i;return a.setDate(a.getDate()-n),a.setHours(0,0,0,0),a}function io(e){return so(e,{weekStartsOn:1})}function ao(e){const t=Ka(e),s=t.getFullYear(),i=Ga(e,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const a=io(i),o=Ga(e,0);o.setFullYear(s,0,4),o.setHours(0,0,0,0);const n=io(o);return t.getTime()>=a.getTime()?s+1:t.getTime()>=n.getTime()?s:s-1}function oo(e){const t=Ka(e);return t.setHours(0,0,0,0),t}function no(e){const t=Ka(e),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),+e-+s}function ro(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const s=Ka(e);return!isNaN(Number(s))}function lo(e){const t=Ka(e);return+function(e){const t=Ka(e);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=Ka(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}(t)}const co={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ho(e){return(t={})=>{const s=t.width?String(t.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const uo={date:ho({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ho({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ho({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},po={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function go(e){return(t,s)=>{let i;if("formatting"===(s?.context?String(s.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=s?.width?String(s.width):t;i=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=s?.width?String(s.width):e.defaultWidth;i=e.values[a]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}function vo(e){return(t,s={})=>{const i=s.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const n=o[0],r=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?function(e,t){for(let s=0;s<e.length;s++)if(t(e[s]))return s;return}(r,(e=>e.test(n))):function(e,t){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return s;return}(r,(e=>e.test(n)));let d;d=e.valueCallback?e.valueCallback(l):l,d=s.valueCallback?s.valueCallback(d):d;return{value:d,rest:t.slice(n.length)}}}var mo;const fo={code:"en-US",formatDistance:(e,t,s)=>{let i;const a=co[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),s?.addSuffix?s.comparison&&s.comparison>0?"in "+i:i+" ago":i},formatLong:uo,formatRelative:(e,t,s,i)=>po[e],localize:{ordinalNumber:(e,t)=>{const s=Number(e),i=s%100;if(i>20||i<10)switch(i%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},era:go({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:go({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:go({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:go({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:go({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(mo={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const s=e.match(mo.matchPattern);if(!s)return null;const i=s[0],a=e.match(mo.parsePattern);if(!a)return null;let o=mo.valueCallback?mo.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(i.length)}}),era:vo({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:vo({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vo({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:vo({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:vo({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function bo(e){const t=Ka(e),s=function(e,t){const s=oo(e),i=oo(t),a=+s-no(s),o=+i-no(i);return Math.round((a-o)/Ja)}(t,function(e){const t=Ka(e),s=Ga(e,0);return s.setFullYear(t.getFullYear(),0,1),s.setHours(0,0,0,0),s}(t));return s+1}function wo(e){const t=Ka(e),s=+io(t)-+function(e){const t=ao(e),s=Ga(e,0);return s.setFullYear(t,0,4),s.setHours(0,0,0,0),io(s)}(t);return Math.round(s/Qa)+1}function yo(e,t){const s=Ka(e),i=s.getFullYear(),a=to(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,n=Ga(e,0);n.setFullYear(i+1,0,o),n.setHours(0,0,0,0);const r=so(n,t),l=Ga(e,0);l.setFullYear(i,0,o),l.setHours(0,0,0,0);const d=so(l,t);return s.getTime()>=r.getTime()?i+1:s.getTime()>=d.getTime()?i:i-1}function xo(e,t){const s=Ka(e),i=+so(s,t)-+function(e,t){const s=to(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=yo(e,t),o=Ga(e,0);return o.setFullYear(a,0,i),o.setHours(0,0,0,0),so(o,t)}(s,t);return Math.round(i/Qa)+1}function ko(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const _o={y(e,t){const s=e.getFullYear(),i=s>0?s:1-s;return ko("yy"===t?i%100:i,t.length)},M(e,t){const s=e.getMonth();return"M"===t?String(s+1):ko(s+1,2)},d:(e,t)=>ko(e.getDate(),t.length),a(e,t){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];default:return"am"===s?"a.m.":"p.m."}},h:(e,t)=>ko(e.getHours()%12||12,t.length),H:(e,t)=>ko(e.getHours(),t.length),m:(e,t)=>ko(e.getMinutes(),t.length),s:(e,t)=>ko(e.getSeconds(),t.length),S(e,t){const s=t.length,i=e.getMilliseconds();return ko(Math.trunc(i*Math.pow(10,s-3)),t.length)}},Co="midnight",So="noon",Mo="morning",$o="afternoon",Do="evening",Ao="night",Vo={G:function(e,t,s){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"});case"GGGGG":return s.era(i,{width:"narrow"});default:return s.era(i,{width:"wide"})}},y:function(e,t,s){if("yo"===t){const t=e.getFullYear(),i=t>0?t:1-t;return s.ordinalNumber(i,{unit:"year"})}return _o.y(e,t)},Y:function(e,t,s,i){const a=yo(e,i),o=a>0?a:1-a;if("YY"===t){return ko(o%100,2)}return"Yo"===t?s.ordinalNumber(o,{unit:"year"}):ko(o,t.length)},R:function(e,t){return ko(ao(e),t.length)},u:function(e,t){return ko(e.getFullYear(),t.length)},Q:function(e,t,s){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ko(i,2);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});default:return s.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,s){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ko(i,2);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});default:return s.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,s){const i=e.getMonth();switch(t){case"M":case"MM":return _o.M(e,t);case"Mo":return s.ordinalNumber(i+1,{unit:"month"});case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});default:return s.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,s){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return ko(i+1,2);case"Lo":return s.ordinalNumber(i+1,{unit:"month"});case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});default:return s.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,s,i){const a=xo(e,i);return"wo"===t?s.ordinalNumber(a,{unit:"week"}):ko(a,t.length)},I:function(e,t,s){const i=wo(e);return"Io"===t?s.ordinalNumber(i,{unit:"week"}):ko(i,t.length)},d:function(e,t,s){return"do"===t?s.ordinalNumber(e.getDate(),{unit:"date"}):_o.d(e,t)},D:function(e,t,s){const i=bo(e);return"Do"===t?s.ordinalNumber(i,{unit:"dayOfYear"}):ko(i,t.length)},E:function(e,t,s){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,s,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ko(o,2);case"eo":return s.ordinalNumber(o,{unit:"day"});case"eee":return s.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(a,{width:"short",context:"formatting"});default:return s.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,s,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ko(o,t.length);case"co":return s.ordinalNumber(o,{unit:"day"});case"ccc":return s.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(a,{width:"narrow",context:"standalone"});case"cccccc":return s.day(a,{width:"short",context:"standalone"});default:return s.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,s){const i=e.getDay(),a=0===i?7:i;switch(t){case"i":return String(a);case"ii":return ko(a,t.length);case"io":return s.ordinalNumber(a,{unit:"day"});case"iii":return s.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,s){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,s){const i=e.getHours();let a;switch(a=12===i?So:0===i?Co:i/12>=1?"pm":"am",t){case"b":case"bb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(a,{width:"narrow",context:"formatting"});default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,s){const i=e.getHours();let a;switch(a=i>=17?Do:i>=12?$o:i>=4?Mo:Ao,t){case"B":case"BB":case"BBB":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(a,{width:"narrow",context:"formatting"});default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,s){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),s.ordinalNumber(t,{unit:"hour"})}return _o.h(e,t)},H:function(e,t,s){return"Ho"===t?s.ordinalNumber(e.getHours(),{unit:"hour"}):_o.H(e,t)},K:function(e,t,s){const i=e.getHours()%12;return"Ko"===t?s.ordinalNumber(i,{unit:"hour"}):ko(i,t.length)},k:function(e,t,s){let i=e.getHours();return 0===i&&(i=24),"ko"===t?s.ordinalNumber(i,{unit:"hour"}):ko(i,t.length)},m:function(e,t,s){return"mo"===t?s.ordinalNumber(e.getMinutes(),{unit:"minute"}):_o.m(e,t)},s:function(e,t,s){return"so"===t?s.ordinalNumber(e.getSeconds(),{unit:"second"}):_o.s(e,t)},S:function(e,t){return _o.S(e,t)},X:function(e,t,s){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Io(i);case"XXXX":case"XX":return Bo(i);default:return Bo(i,":")}},x:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"x":return Io(i);case"xxxx":case"xx":return Bo(i);default:return Bo(i,":")}},O:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Eo(i,":");default:return"GMT"+Bo(i,":")}},z:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Eo(i,":");default:return"GMT"+Bo(i,":")}},t:function(e,t,s){return ko(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,s){return ko(e.getTime(),t.length)}};function Eo(e,t=""){const s=e>0?"-":"+",i=Math.abs(e),a=Math.trunc(i/60),o=i%60;return 0===o?s+String(a):s+String(a)+t+ko(o,2)}function Io(e,t){if(e%60==0){return(e>0?"-":"+")+ko(Math.abs(e)/60,2)}return Bo(e,t)}function Bo(e,t=""){const s=e>0?"-":"+",i=Math.abs(e);return s+ko(Math.trunc(i/60),2)+t+ko(i%60,2)}const Po=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},To=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Lo={p:To,P:(e,t)=>{const s=e.match(/(P+)(p+)?/)||[],i=s[1],a=s[2];if(!a)return Po(e,t);let o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Po(i,t)).replace("{{time}}",To(a,t))}},Fo=/^D+$/,Zo=/^Y+$/,Ho=["D","DD","YY","YYYY"];function zo(e){return Fo.test(e)}function Ro(e){return Zo.test(e)}function Oo(e,t,s){const i=function(e,t,s){const i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,s);if(console.warn(i),Ho.includes(e))throw new RangeError(i)}const No=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Uo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qo=/^'([^]*?)'?$/,Yo=/''/g,jo=/[a-zA-Z]/;function Wo(e,t,s){const i=to(),a=s?.locale??i.locale??fo,o=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,n=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Ka(e);if(!ro(r))throw new RangeError("Invalid time value");let l=t.match(Uo).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Lo[t])(e,a.formatLong)}return e})).join("").match(No).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ko(e)};if(Vo[t])return{isToken:!0,value:e};if(t.match(jo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(r,l));const d={firstWeekContainsDate:o,weekStartsOn:n,locale:a};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(!s?.useAdditionalWeekYearTokens&&Ro(o)||!s?.useAdditionalDayOfYearTokens&&zo(o))&&Oo(o,t,String(e));return(0,Vo[o[0]])(r,o,a.localize,d)})).join("")}function Ko(e){const t=e.match(qo);return t?t[1].replace(Yo,"'"):e}function Go(e){const t=Ka(e),s=t.getFullYear(),i=t.getMonth(),a=Ga(e,0);return a.setFullYear(s,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Xo(e){const t=Ka(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(0,0,0,0),t}function Qo(e,t){const s=Ka(e),i=Ka(t);return s.getTime()>i.getTime()}function Jo(e,t){return+Ka(e)<+Ka(t)}function en(e,t){return+Ka(e)==+Ka(t)}class tn{subPriority=0;validate(e,t){return!0}}class sn extends tn{constructor(e,t,s,i,a){super(),this.value=e,this.validateValue=t,this.setValue=s,this.priority=i,a&&(this.subPriority=a)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,s){return this.setValue(e,t,this.value,s)}}class an extends tn{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:Ga(e,function(e,t){const s=t instanceof Date?Ga(t,0):new t(0);return s.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),s.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),s}(e,Date))}}class on{run(e,t,s,i){const a=this.parse(e,t,s,i);return a?{setter:new sn(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,s){return!0}}const nn=/^(1[0-2]|0?\d)/,rn=/^(3[0-1]|[0-2]?\d)/,ln=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,dn=/^(5[0-3]|[0-4]?\d)/,cn=/^(2[0-3]|[0-1]?\d)/,hn=/^(2[0-4]|[0-1]?\d)/,un=/^(1[0-1]|0?\d)/,pn=/^(1[0-2]|0?\d)/,gn=/^[0-5]?\d/,vn=/^[0-5]?\d/,mn=/^\d/,fn=/^\d{1,2}/,bn=/^\d{1,3}/,wn=/^\d{1,4}/,yn=/^-?\d+/,xn=/^-?\d/,kn=/^-?\d{1,2}/,_n=/^-?\d{1,3}/,Cn=/^-?\d{1,4}/,Sn=/^([+-])(\d{2})(\d{2})?|Z/,Mn=/^([+-])(\d{2})(\d{2})|Z/,$n=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Dn=/^([+-])(\d{2}):(\d{2})|Z/,An=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Vn(e,t){return e?{value:t(e.value),rest:e.rest}:e}function En(e,t){const s=t.match(e);return s?{value:parseInt(s[0],10),rest:t.slice(s[0].length)}:null}function In(e,t){const s=t.match(e);if(!s)return null;if("Z"===s[0])return{value:0,rest:t.slice(1)};return{value:("+"===s[1]?1:-1)*(36e5*(s[2]?parseInt(s[2],10):0)+6e4*(s[3]?parseInt(s[3],10):0)+1e3*(s[5]?parseInt(s[5],10):0)),rest:t.slice(s[0].length)}}function Bn(e){return En(yn,e)}function Pn(e,t){switch(e){case 1:return En(mn,t);case 2:return En(fn,t);case 3:return En(bn,t);case 4:return En(wn,t);default:return En(new RegExp("^\\d{1,"+e+"}"),t)}}function Tn(e,t){switch(e){case 1:return En(xn,t);case 2:return En(kn,t);case 3:return En(_n,t);case 4:return En(Cn,t);default:return En(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Ln(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Fn(e,t){const s=t>0,i=s?t:1-t;let a;if(i<=50)a=e||100;else{const t=i+50;a=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return s?a:1-a}function Zn(e){return e%400==0||e%4==0&&e%100!=0}const Hn=[31,28,31,30,31,30,31,31,30,31,30,31],zn=[31,29,31,30,31,30,31,31,30,31,30,31];function Rn(e,t,s){const i=to(),a=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=Ka(e),n=o.getDay(),r=7-a;return Xa(o,t<0||t>6?t-(n+r)%7:((t%7+7)%7+r)%7-(n+r)%7)}function On(e,t){const s=Ka(e),i=function(e){let t=Ka(e).getDay();return 0===t&&(t=7),t}(s);return Xa(s,t-i)}const Nn={G:new class extends on{priority=140;parse(e,t,s){switch(t){case"G":case"GG":case"GGG":return s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"});case"GGGGG":return s.era(e,{width:"narrow"});default:return s.era(e,{width:"wide"})||s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"})}}set(e,t,s){return t.era=s,e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends on{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Vn(Pn(4,e),i);case"yo":return Vn(s.ordinalNumber(e,{unit:"year"}),i);default:return Vn(Pn(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s){const i=e.getFullYear();if(s.isTwoDigitYear){const t=Fn(s.year,i);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const a="era"in t&&1!==t.era?1-s.year:s.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}},Y:new class extends on{priority=130;parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Vn(Pn(4,e),i);case"Yo":return Vn(s.ordinalNumber(e,{unit:"year"}),i);default:return Vn(Pn(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s,i){const a=yo(e,i);if(s.isTwoDigitYear){const t=Fn(s.year,a);return e.setFullYear(t,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),so(e,i)}const o="era"in t&&1!==t.era?1-s.year:s.year;return e.setFullYear(o,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),so(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends on{priority=130;parse(e,t){return Tn("R"===t?4:t.length,e)}set(e,t,s){const i=Ga(e,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),io(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends on{priority=130;parse(e,t){return Tn("u"===t?4:t.length,e)}set(e,t,s){return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends on{priority=120;parse(e,t,s){switch(t){case"Q":case"QQ":return Pn(t.length,e);case"Qo":return s.ordinalNumber(e,{unit:"quarter"});case"QQQ":return s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(e,{width:"narrow",context:"formatting"});default:return s.quarter(e,{width:"wide",context:"formatting"})||s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,s){return e.setMonth(3*(s-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends on{priority=120;parse(e,t,s){switch(t){case"q":case"qq":return Pn(t.length,e);case"qo":return s.ordinalNumber(e,{unit:"quarter"});case"qqq":return s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(e,{width:"narrow",context:"standalone"});default:return s.quarter(e,{width:"wide",context:"standalone"})||s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,s){return e.setMonth(3*(s-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends on{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"M":return Vn(En(nn,e),i);case"MM":return Vn(Pn(2,e),i);case"Mo":return Vn(s.ordinalNumber(e,{unit:"month"}),i);case"MMM":return s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(e,{width:"narrow",context:"formatting"});default:return s.month(e,{width:"wide",context:"formatting"})||s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}},L:new class extends on{priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"L":return Vn(En(nn,e),i);case"LL":return Vn(Pn(2,e),i);case"Lo":return Vn(s.ordinalNumber(e,{unit:"month"}),i);case"LLL":return s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(e,{width:"narrow",context:"standalone"});default:return s.month(e,{width:"wide",context:"standalone"})||s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends on{priority=100;parse(e,t,s){switch(t){case"w":return En(dn,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s,i){return so(function(e,t,s){const i=Ka(e),a=xo(i,s)-t;return i.setDate(i.getDate()-7*a),i}(e,s,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends on{priority=100;parse(e,t,s){switch(t){case"I":return En(dn,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s){return io(function(e,t){const s=Ka(e),i=wo(s)-t;return s.setDate(s.getDate()-7*i),s}(e,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends on{priority=90;subPriority=1;parse(e,t,s){switch(t){case"d":return En(rn,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return Pn(t.length,e)}}validate(e,t){const s=Zn(e.getFullYear()),i=e.getMonth();return s?t>=1&&t<=zn[i]:t>=1&&t<=Hn[i]}set(e,t,s){return e.setDate(s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends on{priority=90;subpriority=1;parse(e,t,s){switch(t){case"D":case"DD":return En(ln,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return Pn(t.length,e)}}validate(e,t){return Zn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,s){return e.setMonth(0,s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends on{priority=90;parse(e,t,s){switch(t){case"E":case"EE":case"EEE":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends on{priority=90;parse(e,t,s,i){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Vn(Pn(t.length,e),a);case"eo":return Vn(s.ordinalNumber(e,{unit:"day"}),a);case"eee":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeeee":return s.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends on{priority=90;parse(e,t,s,i){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Vn(Pn(t.length,e),a);case"co":return Vn(s.ordinalNumber(e,{unit:"day"}),a);case"ccc":return s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"ccccc":return s.day(e,{width:"narrow",context:"standalone"});case"cccccc":return s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});default:return s.day(e,{width:"wide",context:"standalone"})||s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends on{priority=90;parse(e,t,s){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return Pn(t.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return Vn(s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return Vn(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Vn(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);default:return Vn(s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,t){return t>=1&&t<=7}set(e,t,s){return(e=On(e,s)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends on{priority=80;parse(e,t,s){switch(t){case"a":case"aa":case"aaa":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends on{priority=80;parse(e,t,s){switch(t){case"b":case"bb":case"bbb":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends on{priority=80;parse(e,t,s){switch(t){case"B":case"BB":case"BBB":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends on{priority=70;parse(e,t,s){switch(t){case"h":return En(pn,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,s){const i=e.getHours()>=12;return i&&s<12?e.setHours(s+12,0,0,0):i||12!==s?e.setHours(s,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends on{priority=70;parse(e,t,s){switch(t){case"H":return En(cn,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,s){return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends on{priority=70;parse(e,t,s){switch(t){case"K":return En(un,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.getHours()>=12&&s<12?e.setHours(s+12,0,0,0):e.setHours(s,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends on{priority=70;parse(e,t,s){switch(t){case"k":return En(hn,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,s){const i=s<=24?s%24:s;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends on{priority=60;parse(e,t,s){switch(t){case"m":return En(gn,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,s){return e.setMinutes(s,0,0),e}incompatibleTokens=["t","T"]},s:new class extends on{priority=50;parse(e,t,s){switch(t){case"s":return En(vn,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,s){return e.setSeconds(s,0),e}incompatibleTokens=["t","T"]},S:new class extends on{priority=30;parse(e,t){return Vn(Pn(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,s){return e.setMilliseconds(s),e}incompatibleTokens=["t","T"]},X:new class extends on{priority=10;parse(e,t){switch(t){case"X":return In(Sn,e);case"XX":return In(Mn,e);case"XXXX":return In($n,e);case"XXXXX":return In(An,e);default:return In(Dn,e)}}set(e,t,s){return t.timestampIsSet?e:Ga(e,e.getTime()-no(e)-s)}incompatibleTokens=["t","T","x"]},x:new class extends on{priority=10;parse(e,t){switch(t){case"x":return In(Sn,e);case"xx":return In(Mn,e);case"xxxx":return In($n,e);case"xxxxx":return In(An,e);default:return In(Dn,e)}}set(e,t,s){return t.timestampIsSet?e:Ga(e,e.getTime()-no(e)-s)}incompatibleTokens=["t","T","X"]},t:new class extends on{priority=40;parse(e){return Bn(e)}set(e,t,s){return[Ga(e,1e3*s),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends on{priority=20;parse(e){return Bn(e)}set(e,t,s){return[Ga(e,s),{timestampIsSet:!0}]}incompatibleTokens="*"}},Un=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yn=/^'([^]*?)'?$/,jn=/''/g,Wn=/\S/,Kn=/[a-zA-Z]/;function Gn(e,t,s,i){const a=Object.assign({},to()),o=i?.locale??a.locale??fo,n=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,r=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(""===t)return""===e?Ka(s):Ga(s,NaN);const l={firstWeekContainsDate:n,weekStartsOn:r,locale:o},d=[new an],c=t.match(qn).map((e=>{const t=e[0];if(t in Lo){return(0,Lo[t])(e,o.formatLong)}return e})).join("").match(Un),h=[];for(let a of c){!i?.useAdditionalWeekYearTokens&&Ro(a)&&Oo(a,t,e),!i?.useAdditionalDayOfYearTokens&&zo(a)&&Oo(a,t,e);const n=a[0],r=Nn[n];if(r){const{incompatibleTokens:t}=r;if(Array.isArray(t)){const e=h.find((e=>t.includes(e.token)||e.token===n));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${a}\` at the same time`)}else if("*"===r.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${a}\` and any other token at the same time`);h.push({token:n,fullToken:a});const i=r.run(e,a,o.match,l);if(!i)return Ga(s,NaN);d.push(i.setter),e=i.rest}else{if(n.match(Kn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===a?a="'":"'"===n&&(a=a.match(Yn)[1].replace(jn,"'")),0!==e.indexOf(a))return Ga(s,NaN);e=e.slice(a.length)}}if(e.length>0&&Wn.test(e))return Ga(s,NaN);const u=d.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,s)=>s.indexOf(e)===t)).map((e=>d.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let p=Ka(s);if(isNaN(p.getTime()))return Ga(s,NaN);const g={};for(const e of u){if(!e.validate(p,l))return Ga(s,NaN);const t=e.set(p,g,l);Array.isArray(t)?(p=t[0],Object.assign(g,t[1])):p=t}return Ga(s,p)}const Xn={"DD/MM/YYYY":{imPattern:"`dd{/}`mm{/}`yyyy",imRangePattern:"`dd{/}`mm{/}`yyyy - `DD{/}`MM{/}`YYYY",fnsPattern:"dd/MM/yyyy"},"MM/DD/YYYY":{imPattern:"`mm{/}`dd{/}`yyyy",imRangePattern:"`mm{/}`dd{/}`yyyy - `MM{/}`DD{/}`YYYY",fnsPattern:"MM/dd/yyyy"},"YYYY/MM/DD":{imPattern:"`yyyy{/}`mm{/}`dd",imRangePattern:"`yyyy{/}`mm{/}`dd - `YYYY{/}`MM{/}`DD",fnsPattern:"yyyy/MM/dd"}},Qn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=Go(a);return lo(e)&&o<i?Xo(a):new Date(s,t+1,i)},Jn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t-1),o=Go(a);return lo(e)&&o<i?Xo(a):new Date(s,t-1,i)},er=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var tr=Me`.datepicker-body{color:var(--sgds-form-color-default);display:flex;justify-content:center}table{border-collapse:collapse;text-align:center}.monthpicker,.yearpicker{display:grid;grid-template-columns:repeat(3,6rem);grid-template-rows:repeat(4,2.5rem)}button.month,button.year{background-color:transparent;border:0;border-radius:var(--sgds-form-border-radius-sm);line-height:var(--sgds-line-height-20);padding:0;position:relative}button.month.active:not(.selected-ends),button.year.active:not(.selected-ends),td[data-day].active:not(.selected-ends){background-color:var(--sgds-primary-surface-translucent);border-radius:0;cursor:pointer}button.month:hover:not(.active),button.year:hover:not(.active),td[data-day]:hover:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle);cursor:pointer}button.month:focus:not(.active),button.year:focus:not(.active),td[data-day]:focus:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle)}button.month:focus-visible,button.year:focus-visible,td[data-day]:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}button.month.active:not(.selected-ends):focus,button.year.active:not(.selected-ends):focus,td[data-day].active:not(.selected-ends):focus{border-radius:var(--sgds-form-border-radius-sm)}button.year.active{background-color:var(--sgds-primary-surface-translucent);cursor:pointer}td,th{border-radius:var(--sgds-form-border-radius-sm);height:var(--sgds-form-height-lg);line-height:var(--sgds-line-height-20);padding:0;position:relative;width:var(--sgds-form-width-md)}th{font-weight:var(--sgds-font-weight-semibold)}td[data-day]{cursor:pointer}button.month.active.selected-ends,button.year.active.selected-ends,td[data-day].active.selected-ends{background-color:var(--sgds-form-primary-surface-default);color:var(--sgds-form-color-fixed-light)}button.month.active.selected-ends:focus,button.month.active.selected-ends:hover,button.year.active.selected-ends:focus,button.year.active.selected-ends:hover,td[data-day].active.selected-ends:focus,td[data-day].active.selected-ends:hover{background-color:var(--sgds-form-primary-surface-emphasis)}td[data-day].disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.today{align-items:center;display:flex;flex-direction:column;justify-content:center}.today:after{background-color:var(--sgds-form-primary-surface-default);bottom:6px;content:".";line-height:4px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;position:absolute;width:4px}.today.active.selected-ends:after{background-color:var(--sgds-form-color-inverse)}`;const sr=new Date,ir={ArrowUp:{days:-7,months:-3,years:-3},ArrowDown:{days:7,months:3,years:3},ArrowRight:{days:1,months:1,years:1},ArrowLeft:{days:-1,months:-1,years:-1}};class ar extends lt{constructor(){super(...arguments),this.selectedDate=[],this.mode="single"}focusOnCalendar(e){e.blur(),this._focusOnCalendarCell()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyPress),this.addEventListener("blur",(e=>e.stopPropagation()))}updated(){3===this.focusedTabIndex&&this._focusOnCalendarCell()}_updateFocusedDate(){this.focusedDate=er(this.displayDate),this.focusedDate.getFullYear()<1900&&this.focusedDate.setFullYear(1900)}_setFocusedDate(e){const t=this.focusedDate.getDate(),s=this.focusedDate.getMonth(),i=this.focusedDate.getFullYear();switch(this.view){case"days":{const a=er(new Date(i,s,t+e));(Qo(a,new Date(0,0,1,12))||en(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=er(new Date(i,s+e,t));(Qo(a,new Date(0,0,1,12))||en(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=er(new Date(i+e,s,t));a.getFullYear()>=1900&&(this.focusedDate=a);break}}}_handleEnterDateKeyboard(e){const t=e.composedPath()[0];if(!t.classList.contains("disabled"))switch(this.view){case"days":this._onClickDay(e);break;case"months":{const{month:e}=t.dataset;this._onClickMonth(parseInt(e));break}case"years":{const{year:e}=t.dataset;this._onClickYear(parseInt(e))}}}_handleKeyPress(e){if("Enter"===e.key)return e.preventDefault(),void this._handleEnterDateKeyboard(e);if("Tab"!==e.key){if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=ir[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}else{const e=this._getFocusedTarget();3!==this.focusedTabIndex&&e.blur()}}_generateIncrementDates(){const e=er(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=er(this.selectedDate[1]),s=[];if(e.getTime()<t.getTime())for(let i=e;i<=t;i.setDate(i.getDate()+1))s.push(new Date(i));else for(let i=t;i<=e;i.setDate(i.getDate()+1))s.push(new Date(i));return s}_onClickDay(e){const{day:t,date:s}=e.composedPath()[0].dataset,i=new Date(this.displayDate);if(i.setDate(parseInt(t)),"click"===e.type&&(this.focusedDate=er(new Date(s))),"single"===this.mode)this.selectedDate=[i],this.emit("sgds-selectdates",{detail:this.selectedDate});else if("range"===this.mode){const e=[...this.selectedDate];0!==e.length&&2!==e.length||(e.length=0),e.push(i),this.selectedDate=e,this.emit("sgds-selectdates",{detail:this.selectedDate})}const a=this.minDate?er(new Date(this.minDate)):null,o=this.maxDate?er(new Date(this.maxDate)):null,n=er(i);(a&&n<a||o&&n>o)&&(e.stopPropagation(),e.preventDefault())}_onClickMonth(e,t=this.focusedDate.getFullYear()){const s=new Date(this.displayDate);this.view="days",s.setMonth(e),s.setFullYear(t),this.displayDate=s,this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectmonth",{detail:this.displayDate})}_onClickYear(e){const t=new Date(this.displayDate);t.setFullYear(e),this.displayDate=t,this.view="months",this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectyear",{detail:this.displayDate})}_getFocusedTarget(){const e={days:`td[data-date="${this.focusedDate.toISOString()}"]`,months:`button[data-month="${this.focusedDate.getMonth()}"][data-year="${this.focusedDate.getFullYear()}"]`,years:`button[data-year="${this.focusedDate.getFullYear()}"]`}[this.view];return this.shadowRoot.querySelector(`${e}`)}_blurCalendarCell(){const e=this._getFocusedTarget();e.setAttribute("tabindex","-1"),e.blur()}_focusOnCalendarCell(){const e=this._getFocusedTarget();e?(e.setAttribute("tabindex","3"),e.focus(),this.emit("sgds-update-focus",{detail:this.focusedDate})):this.emit("sgds-change-calendar",{detail:this.focusedDate})}_generateDays(){const e=this.selectedDate.map((e=>er(e))),t=this._generateIncrementDates(),s=this.minDate?er(new Date(this.minDate)):null,i=this.maxDate?er(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=ar.daysInMonth[o];1===o&&(a%4==0&&a%100!=0||a%400==0)&&(r=29);const l=[];let d=1;for(let c=0;c<9;c++){const h=[];for(let l=0;l<=6;l++)if(d<=r&&(c>0||l>=n)){const n=new Date(a,o,d,12,0,0,0),r=n.toISOString(),c=s&&Date.parse(r)<Date.parse(s.toISOString()),u=i&&Date.parse(r)>Date.parse(i.toISOString()),p=c||u?void 0:this._onClickDay,g=sr.getMonth()===this.displayDate.getMonth(),v=sr.getFullYear()===this.displayDate.getFullYear(),m=sr.getDate()===d,f=e.length>0&&t.some((e=>Date.parse(r)===Date.parse(e.toISOString()))),b=e.length>0&&t[0].toISOString()===r,w=e.length>1&&t[t.length-1].toISOString()===r,y=""+(m&&g&&v?"Today's date, ":"")+Wo(n,"PPPP");h.push(ee`<td
|
|
2343
|
+
`}}function Ka(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Ga(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Xa(e,t){const s=Ka(e);return isNaN(t)?Ga(e,NaN):t?(s.setDate(s.getDate()+t),s):s}Wa.styles=[...Ra.styles,za,Oa],Wa.dependencies={"sgds-combo-box-option":qa,"sgds-icon":Ot,"sgds-badge":Ki},t([Je({type:Boolean,reflect:!0})],Wa.prototype,"multiSelect",void 0),t([Je({type:Boolean,reflect:!0})],Wa.prototype,"badgeFullWidth",void 0),t([Je()],Wa.prototype,"filterFunction",void 0),t([at("input#multi-select-input-tracker")],Wa.prototype,"_multiSelectInput",void 0),t([ot({flatten:!0,selector:"sgds-combo-box-option"})],Wa.prototype,"options",void 0),t([et()],Wa.prototype,"optionList",void 0),t([et()],Wa.prototype,"emptyMenu",void 0),t([At("value",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleValueChange",null),t([At("optionList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleOptionListChange",null),t([At("menuList",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleMenuListChange",null);const Qa=6048e5,Ja=864e5;let eo={};function to(){return eo}function so(e,t){const s=to(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,a=Ka(e),o=a.getDay(),n=(o<i?7:0)+o-i;return a.setDate(a.getDate()-n),a.setHours(0,0,0,0),a}function io(e){return so(e,{weekStartsOn:1})}function ao(e){const t=Ka(e),s=t.getFullYear(),i=Ga(e,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const a=io(i),o=Ga(e,0);o.setFullYear(s,0,4),o.setHours(0,0,0,0);const n=io(o);return t.getTime()>=a.getTime()?s+1:t.getTime()>=n.getTime()?s:s-1}function oo(e){const t=Ka(e);return t.setHours(0,0,0,0),t}function no(e){const t=Ka(e),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),+e-+s}function ro(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const s=Ka(e);return!isNaN(Number(s))}function lo(e){const t=Ka(e);return+function(e){const t=Ka(e);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=Ka(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}(t)}const co={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ho(e){return(t={})=>{const s=t.width?String(t.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const uo={date:ho({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ho({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ho({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},po={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function go(e){return(t,s)=>{let i;if("formatting"===(s?.context?String(s.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=s?.width?String(s.width):t;i=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=s?.width?String(s.width):e.defaultWidth;i=e.values[a]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}function vo(e){return(t,s={})=>{const i=s.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const n=o[0],r=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?function(e,t){for(let s=0;s<e.length;s++)if(t(e[s]))return s;return}(r,(e=>e.test(n))):function(e,t){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return s;return}(r,(e=>e.test(n)));let d;d=e.valueCallback?e.valueCallback(l):l,d=s.valueCallback?s.valueCallback(d):d;return{value:d,rest:t.slice(n.length)}}}var mo;const fo={code:"en-US",formatDistance:(e,t,s)=>{let i;const a=co[e];return i="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),s?.addSuffix?s.comparison&&s.comparison>0?"in "+i:i+" ago":i},formatLong:uo,formatRelative:(e,t,s,i)=>po[e],localize:{ordinalNumber:(e,t)=>{const s=Number(e),i=s%100;if(i>20||i<10)switch(i%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},era:go({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:go({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:go({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:go({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:go({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(mo={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const s=e.match(mo.matchPattern);if(!s)return null;const i=s[0],a=e.match(mo.parsePattern);if(!a)return null;let o=mo.valueCallback?mo.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(i.length)}}),era:vo({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:vo({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:vo({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:vo({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:vo({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function bo(e){const t=Ka(e),s=function(e,t){const s=oo(e),i=oo(t),a=+s-no(s),o=+i-no(i);return Math.round((a-o)/Ja)}(t,function(e){const t=Ka(e),s=Ga(e,0);return s.setFullYear(t.getFullYear(),0,1),s.setHours(0,0,0,0),s}(t));return s+1}function wo(e){const t=Ka(e),s=+io(t)-+function(e){const t=ao(e),s=Ga(e,0);return s.setFullYear(t,0,4),s.setHours(0,0,0,0),io(s)}(t);return Math.round(s/Qa)+1}function yo(e,t){const s=Ka(e),i=s.getFullYear(),a=to(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,n=Ga(e,0);n.setFullYear(i+1,0,o),n.setHours(0,0,0,0);const r=so(n,t),l=Ga(e,0);l.setFullYear(i,0,o),l.setHours(0,0,0,0);const d=so(l,t);return s.getTime()>=r.getTime()?i+1:s.getTime()>=d.getTime()?i:i-1}function xo(e,t){const s=Ka(e),i=+so(s,t)-+function(e,t){const s=to(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=yo(e,t),o=Ga(e,0);return o.setFullYear(a,0,i),o.setHours(0,0,0,0),so(o,t)}(s,t);return Math.round(i/Qa)+1}function ko(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const _o={y(e,t){const s=e.getFullYear(),i=s>0?s:1-s;return ko("yy"===t?i%100:i,t.length)},M(e,t){const s=e.getMonth();return"M"===t?String(s+1):ko(s+1,2)},d:(e,t)=>ko(e.getDate(),t.length),a(e,t){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];default:return"am"===s?"a.m.":"p.m."}},h:(e,t)=>ko(e.getHours()%12||12,t.length),H:(e,t)=>ko(e.getHours(),t.length),m:(e,t)=>ko(e.getMinutes(),t.length),s:(e,t)=>ko(e.getSeconds(),t.length),S(e,t){const s=t.length,i=e.getMilliseconds();return ko(Math.trunc(i*Math.pow(10,s-3)),t.length)}},Co="midnight",So="noon",Mo="morning",$o="afternoon",Ao="evening",Do="night",Vo={G:function(e,t,s){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"});case"GGGGG":return s.era(i,{width:"narrow"});default:return s.era(i,{width:"wide"})}},y:function(e,t,s){if("yo"===t){const t=e.getFullYear(),i=t>0?t:1-t;return s.ordinalNumber(i,{unit:"year"})}return _o.y(e,t)},Y:function(e,t,s,i){const a=yo(e,i),o=a>0?a:1-a;if("YY"===t){return ko(o%100,2)}return"Yo"===t?s.ordinalNumber(o,{unit:"year"}):ko(o,t.length)},R:function(e,t){return ko(ao(e),t.length)},u:function(e,t){return ko(e.getFullYear(),t.length)},Q:function(e,t,s){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ko(i,2);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});default:return s.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,s){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ko(i,2);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});default:return s.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,s){const i=e.getMonth();switch(t){case"M":case"MM":return _o.M(e,t);case"Mo":return s.ordinalNumber(i+1,{unit:"month"});case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});default:return s.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,s){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return ko(i+1,2);case"Lo":return s.ordinalNumber(i+1,{unit:"month"});case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});default:return s.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,s,i){const a=xo(e,i);return"wo"===t?s.ordinalNumber(a,{unit:"week"}):ko(a,t.length)},I:function(e,t,s){const i=wo(e);return"Io"===t?s.ordinalNumber(i,{unit:"week"}):ko(i,t.length)},d:function(e,t,s){return"do"===t?s.ordinalNumber(e.getDate(),{unit:"date"}):_o.d(e,t)},D:function(e,t,s){const i=bo(e);return"Do"===t?s.ordinalNumber(i,{unit:"dayOfYear"}):ko(i,t.length)},E:function(e,t,s){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,s,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ko(o,2);case"eo":return s.ordinalNumber(o,{unit:"day"});case"eee":return s.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(a,{width:"short",context:"formatting"});default:return s.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,s,i){const a=e.getDay(),o=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ko(o,t.length);case"co":return s.ordinalNumber(o,{unit:"day"});case"ccc":return s.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(a,{width:"narrow",context:"standalone"});case"cccccc":return s.day(a,{width:"short",context:"standalone"});default:return s.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,s){const i=e.getDay(),a=0===i?7:i;switch(t){case"i":return String(a);case"ii":return ko(a,t.length);case"io":return s.ordinalNumber(a,{unit:"day"});case"iii":return s.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,s){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,s){const i=e.getHours();let a;switch(a=12===i?So:0===i?Co:i/12>=1?"pm":"am",t){case"b":case"bb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(a,{width:"narrow",context:"formatting"});default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,s){const i=e.getHours();let a;switch(a=i>=17?Ao:i>=12?$o:i>=4?Mo:Do,t){case"B":case"BB":case"BBB":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(a,{width:"narrow",context:"formatting"});default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,s){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),s.ordinalNumber(t,{unit:"hour"})}return _o.h(e,t)},H:function(e,t,s){return"Ho"===t?s.ordinalNumber(e.getHours(),{unit:"hour"}):_o.H(e,t)},K:function(e,t,s){const i=e.getHours()%12;return"Ko"===t?s.ordinalNumber(i,{unit:"hour"}):ko(i,t.length)},k:function(e,t,s){let i=e.getHours();return 0===i&&(i=24),"ko"===t?s.ordinalNumber(i,{unit:"hour"}):ko(i,t.length)},m:function(e,t,s){return"mo"===t?s.ordinalNumber(e.getMinutes(),{unit:"minute"}):_o.m(e,t)},s:function(e,t,s){return"so"===t?s.ordinalNumber(e.getSeconds(),{unit:"second"}):_o.s(e,t)},S:function(e,t){return _o.S(e,t)},X:function(e,t,s){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Io(i);case"XXXX":case"XX":return Bo(i);default:return Bo(i,":")}},x:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"x":return Io(i);case"xxxx":case"xx":return Bo(i);default:return Bo(i,":")}},O:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Eo(i,":");default:return"GMT"+Bo(i,":")}},z:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Eo(i,":");default:return"GMT"+Bo(i,":")}},t:function(e,t,s){return ko(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,s){return ko(e.getTime(),t.length)}};function Eo(e,t=""){const s=e>0?"-":"+",i=Math.abs(e),a=Math.trunc(i/60),o=i%60;return 0===o?s+String(a):s+String(a)+t+ko(o,2)}function Io(e,t){if(e%60==0){return(e>0?"-":"+")+ko(Math.abs(e)/60,2)}return Bo(e,t)}function Bo(e,t=""){const s=e>0?"-":"+",i=Math.abs(e);return s+ko(Math.trunc(i/60),2)+t+ko(i%60,2)}const Po=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},To=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Lo={p:To,P:(e,t)=>{const s=e.match(/(P+)(p+)?/)||[],i=s[1],a=s[2];if(!a)return Po(e,t);let o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Po(i,t)).replace("{{time}}",To(a,t))}},Fo=/^D+$/,Zo=/^Y+$/,Ho=["D","DD","YY","YYYY"];function zo(e){return Fo.test(e)}function Ro(e){return Zo.test(e)}function Oo(e,t,s){const i=function(e,t,s){const i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,s);if(console.warn(i),Ho.includes(e))throw new RangeError(i)}const No=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Uo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qo=/^'([^]*?)'?$/,Yo=/''/g,jo=/[a-zA-Z]/;function Wo(e,t,s){const i=to(),a=s?.locale??i.locale??fo,o=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,n=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Ka(e);if(!ro(r))throw new RangeError("Invalid time value");let l=t.match(Uo).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Lo[t])(e,a.formatLong)}return e})).join("").match(No).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ko(e)};if(Vo[t])return{isToken:!0,value:e};if(t.match(jo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(r,l));const d={firstWeekContainsDate:o,weekStartsOn:n,locale:a};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(!s?.useAdditionalWeekYearTokens&&Ro(o)||!s?.useAdditionalDayOfYearTokens&&zo(o))&&Oo(o,t,String(e));return(0,Vo[o[0]])(r,o,a.localize,d)})).join("")}function Ko(e){const t=e.match(qo);return t?t[1].replace(Yo,"'"):e}function Go(e){const t=Ka(e),s=t.getFullYear(),i=t.getMonth(),a=Ga(e,0);return a.setFullYear(s,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Xo(e){const t=Ka(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(0,0,0,0),t}function Qo(e,t){const s=Ka(e),i=Ka(t);return s.getTime()>i.getTime()}function Jo(e,t){return+Ka(e)<+Ka(t)}function en(e,t){return+Ka(e)==+Ka(t)}class tn{subPriority=0;validate(e,t){return!0}}class sn extends tn{constructor(e,t,s,i,a){super(),this.value=e,this.validateValue=t,this.setValue=s,this.priority=i,a&&(this.subPriority=a)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,s){return this.setValue(e,t,this.value,s)}}class an extends tn{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:Ga(e,function(e,t){const s=t instanceof Date?Ga(t,0):new t(0);return s.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),s.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),s}(e,Date))}}class on{run(e,t,s,i){const a=this.parse(e,t,s,i);return a?{setter:new sn(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,s){return!0}}const nn=/^(1[0-2]|0?\d)/,rn=/^(3[0-1]|[0-2]?\d)/,ln=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,dn=/^(5[0-3]|[0-4]?\d)/,cn=/^(2[0-3]|[0-1]?\d)/,hn=/^(2[0-4]|[0-1]?\d)/,un=/^(1[0-1]|0?\d)/,pn=/^(1[0-2]|0?\d)/,gn=/^[0-5]?\d/,vn=/^[0-5]?\d/,mn=/^\d/,fn=/^\d{1,2}/,bn=/^\d{1,3}/,wn=/^\d{1,4}/,yn=/^-?\d+/,xn=/^-?\d/,kn=/^-?\d{1,2}/,_n=/^-?\d{1,3}/,Cn=/^-?\d{1,4}/,Sn=/^([+-])(\d{2})(\d{2})?|Z/,Mn=/^([+-])(\d{2})(\d{2})|Z/,$n=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,An=/^([+-])(\d{2}):(\d{2})|Z/,Dn=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Vn(e,t){return e?{value:t(e.value),rest:e.rest}:e}function En(e,t){const s=t.match(e);return s?{value:parseInt(s[0],10),rest:t.slice(s[0].length)}:null}function In(e,t){const s=t.match(e);if(!s)return null;if("Z"===s[0])return{value:0,rest:t.slice(1)};return{value:("+"===s[1]?1:-1)*(36e5*(s[2]?parseInt(s[2],10):0)+6e4*(s[3]?parseInt(s[3],10):0)+1e3*(s[5]?parseInt(s[5],10):0)),rest:t.slice(s[0].length)}}function Bn(e){return En(yn,e)}function Pn(e,t){switch(e){case 1:return En(mn,t);case 2:return En(fn,t);case 3:return En(bn,t);case 4:return En(wn,t);default:return En(new RegExp("^\\d{1,"+e+"}"),t)}}function Tn(e,t){switch(e){case 1:return En(xn,t);case 2:return En(kn,t);case 3:return En(_n,t);case 4:return En(Cn,t);default:return En(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Ln(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Fn(e,t){const s=t>0,i=s?t:1-t;let a;if(i<=50)a=e||100;else{const t=i+50;a=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return s?a:1-a}function Zn(e){return e%400==0||e%4==0&&e%100!=0}const Hn=[31,28,31,30,31,30,31,31,30,31,30,31],zn=[31,29,31,30,31,30,31,31,30,31,30,31];function Rn(e,t,s){const i=to(),a=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=Ka(e),n=o.getDay(),r=7-a;return Xa(o,t<0||t>6?t-(n+r)%7:((t%7+7)%7+r)%7-(n+r)%7)}function On(e,t){const s=Ka(e),i=function(e){let t=Ka(e).getDay();return 0===t&&(t=7),t}(s);return Xa(s,t-i)}const Nn={G:new class extends on{priority=140;parse(e,t,s){switch(t){case"G":case"GG":case"GGG":return s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"});case"GGGGG":return s.era(e,{width:"narrow"});default:return s.era(e,{width:"wide"})||s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"})}}set(e,t,s){return t.era=s,e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends on{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Vn(Pn(4,e),i);case"yo":return Vn(s.ordinalNumber(e,{unit:"year"}),i);default:return Vn(Pn(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s){const i=e.getFullYear();if(s.isTwoDigitYear){const t=Fn(s.year,i);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const a="era"in t&&1!==t.era?1-s.year:s.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}},Y:new class extends on{priority=130;parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Vn(Pn(4,e),i);case"Yo":return Vn(s.ordinalNumber(e,{unit:"year"}),i);default:return Vn(Pn(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s,i){const a=yo(e,i);if(s.isTwoDigitYear){const t=Fn(s.year,a);return e.setFullYear(t,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),so(e,i)}const o="era"in t&&1!==t.era?1-s.year:s.year;return e.setFullYear(o,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),so(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends on{priority=130;parse(e,t){return Tn("R"===t?4:t.length,e)}set(e,t,s){const i=Ga(e,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),io(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends on{priority=130;parse(e,t){return Tn("u"===t?4:t.length,e)}set(e,t,s){return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends on{priority=120;parse(e,t,s){switch(t){case"Q":case"QQ":return Pn(t.length,e);case"Qo":return s.ordinalNumber(e,{unit:"quarter"});case"QQQ":return s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(e,{width:"narrow",context:"formatting"});default:return s.quarter(e,{width:"wide",context:"formatting"})||s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,s){return e.setMonth(3*(s-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends on{priority=120;parse(e,t,s){switch(t){case"q":case"qq":return Pn(t.length,e);case"qo":return s.ordinalNumber(e,{unit:"quarter"});case"qqq":return s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(e,{width:"narrow",context:"standalone"});default:return s.quarter(e,{width:"wide",context:"standalone"})||s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,s){return e.setMonth(3*(s-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends on{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"M":return Vn(En(nn,e),i);case"MM":return Vn(Pn(2,e),i);case"Mo":return Vn(s.ordinalNumber(e,{unit:"month"}),i);case"MMM":return s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(e,{width:"narrow",context:"formatting"});default:return s.month(e,{width:"wide",context:"formatting"})||s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}},L:new class extends on{priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"L":return Vn(En(nn,e),i);case"LL":return Vn(Pn(2,e),i);case"Lo":return Vn(s.ordinalNumber(e,{unit:"month"}),i);case"LLL":return s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(e,{width:"narrow",context:"standalone"});default:return s.month(e,{width:"wide",context:"standalone"})||s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends on{priority=100;parse(e,t,s){switch(t){case"w":return En(dn,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s,i){return so(function(e,t,s){const i=Ka(e),a=xo(i,s)-t;return i.setDate(i.getDate()-7*a),i}(e,s,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends on{priority=100;parse(e,t,s){switch(t){case"I":return En(dn,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s){return io(function(e,t){const s=Ka(e),i=wo(s)-t;return s.setDate(s.getDate()-7*i),s}(e,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends on{priority=90;subPriority=1;parse(e,t,s){switch(t){case"d":return En(rn,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return Pn(t.length,e)}}validate(e,t){const s=Zn(e.getFullYear()),i=e.getMonth();return s?t>=1&&t<=zn[i]:t>=1&&t<=Hn[i]}set(e,t,s){return e.setDate(s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends on{priority=90;subpriority=1;parse(e,t,s){switch(t){case"D":case"DD":return En(ln,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return Pn(t.length,e)}}validate(e,t){return Zn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,s){return e.setMonth(0,s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends on{priority=90;parse(e,t,s){switch(t){case"E":case"EE":case"EEE":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends on{priority=90;parse(e,t,s,i){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Vn(Pn(t.length,e),a);case"eo":return Vn(s.ordinalNumber(e,{unit:"day"}),a);case"eee":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeeee":return s.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends on{priority=90;parse(e,t,s,i){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Vn(Pn(t.length,e),a);case"co":return Vn(s.ordinalNumber(e,{unit:"day"}),a);case"ccc":return s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"ccccc":return s.day(e,{width:"narrow",context:"standalone"});case"cccccc":return s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});default:return s.day(e,{width:"wide",context:"standalone"})||s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,s,i){return(e=Rn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends on{priority=90;parse(e,t,s){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return Pn(t.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return Vn(s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return Vn(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Vn(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);default:return Vn(s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,t){return t>=1&&t<=7}set(e,t,s){return(e=On(e,s)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends on{priority=80;parse(e,t,s){switch(t){case"a":case"aa":case"aaa":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends on{priority=80;parse(e,t,s){switch(t){case"b":case"bb":case"bbb":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends on{priority=80;parse(e,t,s){switch(t){case"B":case"BB":case"BBB":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(e,{width:"narrow",context:"formatting"});default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,s){return e.setHours(Ln(s),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends on{priority=70;parse(e,t,s){switch(t){case"h":return En(pn,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,s){const i=e.getHours()>=12;return i&&s<12?e.setHours(s+12,0,0,0):i||12!==s?e.setHours(s,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends on{priority=70;parse(e,t,s){switch(t){case"H":return En(cn,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,s){return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends on{priority=70;parse(e,t,s){switch(t){case"K":return En(un,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,s){return e.getHours()>=12&&s<12?e.setHours(s+12,0,0,0):e.setHours(s,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends on{priority=70;parse(e,t,s){switch(t){case"k":return En(hn,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return Pn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,s){const i=s<=24?s%24:s;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends on{priority=60;parse(e,t,s){switch(t){case"m":return En(gn,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,s){return e.setMinutes(s,0,0),e}incompatibleTokens=["t","T"]},s:new class extends on{priority=50;parse(e,t,s){switch(t){case"s":return En(vn,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return Pn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,s){return e.setSeconds(s,0),e}incompatibleTokens=["t","T"]},S:new class extends on{priority=30;parse(e,t){return Vn(Pn(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,s){return e.setMilliseconds(s),e}incompatibleTokens=["t","T"]},X:new class extends on{priority=10;parse(e,t){switch(t){case"X":return In(Sn,e);case"XX":return In(Mn,e);case"XXXX":return In($n,e);case"XXXXX":return In(Dn,e);default:return In(An,e)}}set(e,t,s){return t.timestampIsSet?e:Ga(e,e.getTime()-no(e)-s)}incompatibleTokens=["t","T","x"]},x:new class extends on{priority=10;parse(e,t){switch(t){case"x":return In(Sn,e);case"xx":return In(Mn,e);case"xxxx":return In($n,e);case"xxxxx":return In(Dn,e);default:return In(An,e)}}set(e,t,s){return t.timestampIsSet?e:Ga(e,e.getTime()-no(e)-s)}incompatibleTokens=["t","T","X"]},t:new class extends on{priority=40;parse(e){return Bn(e)}set(e,t,s){return[Ga(e,1e3*s),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends on{priority=20;parse(e){return Bn(e)}set(e,t,s){return[Ga(e,s),{timestampIsSet:!0}]}incompatibleTokens="*"}},Un=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yn=/^'([^]*?)'?$/,jn=/''/g,Wn=/\S/,Kn=/[a-zA-Z]/;function Gn(e,t,s,i){const a=Object.assign({},to()),o=i?.locale??a.locale??fo,n=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,r=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(""===t)return""===e?Ka(s):Ga(s,NaN);const l={firstWeekContainsDate:n,weekStartsOn:r,locale:o},d=[new an],c=t.match(qn).map((e=>{const t=e[0];if(t in Lo){return(0,Lo[t])(e,o.formatLong)}return e})).join("").match(Un),h=[];for(let a of c){!i?.useAdditionalWeekYearTokens&&Ro(a)&&Oo(a,t,e),!i?.useAdditionalDayOfYearTokens&&zo(a)&&Oo(a,t,e);const n=a[0],r=Nn[n];if(r){const{incompatibleTokens:t}=r;if(Array.isArray(t)){const e=h.find((e=>t.includes(e.token)||e.token===n));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${a}\` at the same time`)}else if("*"===r.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${a}\` and any other token at the same time`);h.push({token:n,fullToken:a});const i=r.run(e,a,o.match,l);if(!i)return Ga(s,NaN);d.push(i.setter),e=i.rest}else{if(n.match(Kn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===a?a="'":"'"===n&&(a=a.match(Yn)[1].replace(jn,"'")),0!==e.indexOf(a))return Ga(s,NaN);e=e.slice(a.length)}}if(e.length>0&&Wn.test(e))return Ga(s,NaN);const u=d.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,s)=>s.indexOf(e)===t)).map((e=>d.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let p=Ka(s);if(isNaN(p.getTime()))return Ga(s,NaN);const g={};for(const e of u){if(!e.validate(p,l))return Ga(s,NaN);const t=e.set(p,g,l);Array.isArray(t)?(p=t[0],Object.assign(g,t[1])):p=t}return Ga(s,p)}const Xn={"DD/MM/YYYY":{imPattern:"`dd{/}`mm{/}`yyyy",imRangePattern:"`dd{/}`mm{/}`yyyy - `DD{/}`MM{/}`YYYY",fnsPattern:"dd/MM/yyyy"},"MM/DD/YYYY":{imPattern:"`mm{/}`dd{/}`yyyy",imRangePattern:"`mm{/}`dd{/}`yyyy - `MM{/}`DD{/}`YYYY",fnsPattern:"MM/dd/yyyy"},"YYYY/MM/DD":{imPattern:"`yyyy{/}`mm{/}`dd",imRangePattern:"`yyyy{/}`mm{/}`dd - `YYYY{/}`MM{/}`DD",fnsPattern:"yyyy/MM/dd"}},Qn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=Go(a);return lo(e)&&o<i?Xo(a):new Date(s,t+1,i)},Jn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t-1),o=Go(a);return lo(e)&&o<i?Xo(a):new Date(s,t-1,i)},er=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var tr=Me`.datepicker-body{color:var(--sgds-form-color-default);display:flex;justify-content:center}table{border-collapse:collapse;text-align:center}.monthpicker,.yearpicker{display:grid;grid-template-columns:repeat(3,6rem);grid-template-rows:repeat(4,2.5rem)}button.month,button.year{background-color:transparent;border:0;border-radius:var(--sgds-form-border-radius-sm);line-height:var(--sgds-line-height-20);padding:0;position:relative}button.month.active:not(.selected-ends),button.year.active:not(.selected-ends),td[data-day].active:not(.selected-ends){background-color:var(--sgds-primary-surface-translucent);border-radius:0;cursor:pointer}button.month:hover:not(.active),button.year:hover:not(.active),td[data-day]:hover:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle);cursor:pointer}button.month:focus:not(.active),button.year:focus:not(.active),td[data-day]:focus:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle)}button.month:focus-visible,button.year:focus-visible,td[data-day]:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}button.month.active:not(.selected-ends):focus,button.year.active:not(.selected-ends):focus,td[data-day].active:not(.selected-ends):focus{border-radius:var(--sgds-form-border-radius-sm)}button.year.active{background-color:var(--sgds-primary-surface-translucent);cursor:pointer}td,th{border-radius:var(--sgds-form-border-radius-sm);height:var(--sgds-form-height-lg);line-height:var(--sgds-line-height-20);padding:0;position:relative;width:var(--sgds-form-width-md)}th{font-weight:var(--sgds-font-weight-semibold)}td[data-day]{cursor:pointer}button.month.active.selected-ends,button.year.active.selected-ends,td[data-day].active.selected-ends{background-color:var(--sgds-form-primary-surface-default);color:var(--sgds-form-color-fixed-light)}button.month.active.selected-ends:focus,button.month.active.selected-ends:hover,button.year.active.selected-ends:focus,button.year.active.selected-ends:hover,td[data-day].active.selected-ends:focus,td[data-day].active.selected-ends:hover{background-color:var(--sgds-form-primary-surface-emphasis)}td[data-day].disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.today{align-items:center;display:flex;flex-direction:column;justify-content:center}.today:after{background-color:var(--sgds-form-primary-surface-default);bottom:6px;content:".";line-height:4px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;position:absolute;width:4px}.today.active.selected-ends:after{background-color:var(--sgds-form-color-inverse)}`;const sr=new Date,ir={ArrowUp:{days:-7,months:-3,years:-3},ArrowDown:{days:7,months:3,years:3},ArrowRight:{days:1,months:1,years:1},ArrowLeft:{days:-1,months:-1,years:-1}};class ar extends lt{constructor(){super(...arguments),this.selectedDate=[],this.mode="single"}focusOnCalendar(e){e.blur(),this._focusOnCalendarCell()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyPress),this.addEventListener("blur",(e=>e.stopPropagation()))}updated(){3===this.focusedTabIndex&&this._focusOnCalendarCell()}_updateFocusedDate(){this.focusedDate=er(this.displayDate),this.focusedDate.getFullYear()<1900&&this.focusedDate.setFullYear(1900)}_setFocusedDate(e){const t=this.focusedDate.getDate(),s=this.focusedDate.getMonth(),i=this.focusedDate.getFullYear();switch(this.view){case"days":{const a=er(new Date(i,s,t+e));(Qo(a,new Date(0,0,1,12))||en(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=er(new Date(i,s+e,t));(Qo(a,new Date(0,0,1,12))||en(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=er(new Date(i+e,s,t));a.getFullYear()>=1900&&(this.focusedDate=a);break}}}_handleEnterDateKeyboard(e){const t=e.composedPath()[0];if(!t.classList.contains("disabled"))switch(this.view){case"days":this._onClickDay(e);break;case"months":{const{month:e}=t.dataset;this._onClickMonth(parseInt(e));break}case"years":{const{year:e}=t.dataset;this._onClickYear(parseInt(e))}}}_handleKeyPress(e){if("Enter"===e.key)return e.preventDefault(),void this._handleEnterDateKeyboard(e);if("Tab"!==e.key){if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=ir[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}else{const e=this._getFocusedTarget();3!==this.focusedTabIndex&&e.blur()}}_generateIncrementDates(){const e=er(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=er(this.selectedDate[1]),s=[];if(e.getTime()<t.getTime())for(let i=e;i<=t;i.setDate(i.getDate()+1))s.push(new Date(i));else for(let i=t;i<=e;i.setDate(i.getDate()+1))s.push(new Date(i));return s}_onClickDay(e){const{day:t,date:s}=e.composedPath()[0].dataset,i=new Date(this.displayDate);if(i.setDate(parseInt(t)),"click"===e.type&&(this.focusedDate=er(new Date(s))),"single"===this.mode)this.selectedDate=[i],this.emit("sgds-selectdates",{detail:this.selectedDate});else if("range"===this.mode){const e=[...this.selectedDate];0!==e.length&&2!==e.length||(e.length=0),e.push(i),this.selectedDate=e,this.emit("sgds-selectdates",{detail:this.selectedDate})}const a=this.minDate?er(new Date(this.minDate)):null,o=this.maxDate?er(new Date(this.maxDate)):null,n=er(i);(a&&n<a||o&&n>o)&&(e.stopPropagation(),e.preventDefault())}_onClickMonth(e,t=this.focusedDate.getFullYear()){const s=new Date(this.displayDate);this.view="days",s.setMonth(e),s.setFullYear(t),this.displayDate=s,this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectmonth",{detail:this.displayDate})}_onClickYear(e){const t=new Date(this.displayDate);t.setFullYear(e),this.displayDate=t,this.view="months",this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectyear",{detail:this.displayDate})}_getFocusedTarget(){const e={days:`td[data-date="${this.focusedDate.toISOString()}"]`,months:`button[data-month="${this.focusedDate.getMonth()}"][data-year="${this.focusedDate.getFullYear()}"]`,years:`button[data-year="${this.focusedDate.getFullYear()}"]`}[this.view];return this.shadowRoot.querySelector(`${e}`)}_blurCalendarCell(){const e=this._getFocusedTarget();e.setAttribute("tabindex","-1"),e.blur()}_focusOnCalendarCell(){const e=this._getFocusedTarget();e?(e.setAttribute("tabindex","3"),e.focus(),this.emit("sgds-update-focus",{detail:this.focusedDate})):this.emit("sgds-change-calendar",{detail:this.focusedDate})}_generateDays(){const e=this.selectedDate.map((e=>er(e))),t=this._generateIncrementDates(),s=this.minDate?er(new Date(this.minDate)):null,i=this.maxDate?er(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=ar.daysInMonth[o];1===o&&(a%4==0&&a%100!=0||a%400==0)&&(r=29);const l=[];let d=1;for(let c=0;c<9;c++){const h=[];for(let l=0;l<=6;l++)if(d<=r&&(c>0||l>=n)){const n=new Date(a,o,d,12,0,0,0),r=n.toISOString(),c=s&&Date.parse(r)<Date.parse(s.toISOString()),u=i&&Date.parse(r)>Date.parse(i.toISOString()),p=c||u?void 0:this._onClickDay,g=sr.getMonth()===this.displayDate.getMonth(),v=sr.getFullYear()===this.displayDate.getFullYear(),m=sr.getDate()===d,f=e.length>0&&t.some((e=>Date.parse(r)===Date.parse(e.toISOString()))),b=e.length>0&&t[0].toISOString()===r,w=e.length>1&&t[t.length-1].toISOString()===r,y=""+(m&&g&&v?"Today's date, ":"")+Wo(n,"PPPP");h.push(ee`<td
|
|
2344
2344
|
key=${l}
|
|
2345
2345
|
data-date=${r}
|
|
2346
2346
|
data-day=${d}
|
|
2347
2347
|
aria-label=${y}
|
|
2348
|
-
aria-current=${
|
|
2348
|
+
aria-current=${qt(m&&g&&v?"date":void 0)}
|
|
2349
2349
|
class=${bt({today:m&&g&&v,"selected-ends":b||w,active:f,disabled:c||u})}
|
|
2350
2350
|
@click=${p}
|
|
2351
|
-
aria-selected=${
|
|
2351
|
+
aria-selected=${qt(f?"true":void 0)}
|
|
2352
2352
|
tabindex=${this.focusedDate===new Date(r)?"3":"-1"}
|
|
2353
2353
|
?disabled=${c||u}
|
|
2354
|
-
aria-disabled=${
|
|
2354
|
+
aria-disabled=${qt(c||u?"true":void 0)}
|
|
2355
2355
|
role="button"
|
|
2356
2356
|
>
|
|
2357
2357
|
${d}
|
|
@@ -2392,13 +2392,13 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2392
2392
|
tabindex="3"
|
|
2393
2393
|
?disabled=${s<1900}
|
|
2394
2394
|
aria-selected=${e.includes(s)}
|
|
2395
|
-
aria-label=${
|
|
2395
|
+
aria-label=${qt(t===s?`Current year, ${s}`:void 0)}
|
|
2396
2396
|
>
|
|
2397
2397
|
${s}
|
|
2398
2398
|
</button>
|
|
2399
2399
|
`}))}
|
|
2400
2400
|
</div>
|
|
2401
|
-
`}render(){let e;switch(this.view){case"days":default:e=ee` ${this._generateDays()} `;break;case"months":e=ee` ${this._generateMonths()} `;break;case"years":e=ee` ${this._generateYears()} `}return ee` <div class="datepicker-body">${e}</div> `}}ar.styles=[tr],ar.DAY_LABELS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],ar.MONTHVIEW_LABELS=["January","February","March","April","May","June","July","August","September","October","November","December"],t([Je({type:Array})],ar.prototype,"selectedDate",void 0),t([Je({attribute:!1})],ar.prototype,"displayDate",void 0),t([Je({type:String})],ar.prototype,"minDate",void 0),t([Je({type:String})],ar.prototype,"maxDate",void 0),t([Je({type:String,reflect:!0})],ar.prototype,"mode",void 0),t([Je()],ar.prototype,"view",void 0),t([Je({type:Boolean})],ar.prototype,"show",void 0),t([Je()],ar.prototype,"focusedTabIndex",void 0),t([
|
|
2401
|
+
`}render(){let e;switch(this.view){case"days":default:e=ee` ${this._generateDays()} `;break;case"months":e=ee` ${this._generateMonths()} `;break;case"years":e=ee` ${this._generateYears()} `}return ee` <div class="datepicker-body">${e}</div> `}}ar.styles=[tr],ar.DAY_LABELS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],ar.MONTHVIEW_LABELS=["January","February","March","April","May","June","July","August","September","October","November","December"],t([Je({type:Array})],ar.prototype,"selectedDate",void 0),t([Je({attribute:!1})],ar.prototype,"displayDate",void 0),t([Je({type:String})],ar.prototype,"minDate",void 0),t([Je({type:String})],ar.prototype,"maxDate",void 0),t([Je({type:String,reflect:!0})],ar.prototype,"mode",void 0),t([Je()],ar.prototype,"view",void 0),t([Je({type:Boolean})],ar.prototype,"show",void 0),t([Je()],ar.prototype,"focusedTabIndex",void 0),t([At("displayDate")],ar.prototype,"_updateFocusedDate",null);var or=Me`:host{--sgds-spinner-bg:var(--sgds-primary-surface-default);display:inline-flex}:host([variant=neutral]){--sgds-spinner-bg:var(--sgds-neutral-surface-default)}:host([tone=neutral]){--sgds-spinner-bg:var(--sgds-surface-inverse)}:host([tone=inverse]){--sgds-spinner-bg:var(--sgds-surface-default)}:host([tone=fixed-light]){--sgds-spinner-bg:var(--sgds-surface-fixed-light)}:host([tone=fixed-dark]){--sgds-spinner-bg:var(--sgds-surface-fixed-dark)}.spinner-wrapper{align-items:center;display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.spinner-wrapper.horizontal{flex-direction:row}.spinner{--border-thickness:4px;animation:spinner .75s linear infinite;border:var(--border-thickness) solid var(--sgds-bg-translucent);border-radius:50%;border-right:var(--border-thickness) solid var(--sgds-spinner-bg);color:var(--sgds-spinner-color);display:inline-flex;height:var(--sgds-dimension-32);width:var(--sgds-dimension-32)}.spinner-xs{--border-thickness:2px;height:var(--sgds-dimension-16);width:var(--sgds-dimension-16)}.spinner-sm{--border-thickness:3px;height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.spinner-lg{--border-thickness:6px;height:var(--sgds-dimension-48);width:var(--sgds-dimension-48)}.spinner-xl{--border-thickness:8px;height:var(--sgds-dimension-64);width:var(--sgds-dimension-64)}.spinner-label{color:var(--sgds-neutral-color-default);font-size:var(--sgds-font-size-1)}@media (prefers-reduced-motion:reduce){.spinner{animation-duration:1.5s}}
|
|
2402
2402
|
|
|
2403
2403
|
/*! CSS Used keyframes */@keyframes spinner{to{transform:rotate(1turn)}}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;class nr extends lt{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.orientation="vertical"}render(){return Tt`
|
|
2404
2404
|
<div
|
|
@@ -2415,30 +2415,30 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2415
2415
|
`}}nr.styles=[...lt.styles,ba,or],t([Je({type:String,reflect:!0})],nr.prototype,"variant",void 0),t([Je({type:String,reflect:!0})],nr.prototype,"tone",void 0),t([Je({type:String,reflect:!0})],nr.prototype,"size",void 0),t([Je({reflect:!0,type:String})],nr.prototype,"label",void 0),t([Je({type:String,reflect:!0})],nr.prototype,"orientation",void 0);var rr=Me`:host{display:inline-block}.btn.btn-icon{display:flex;height:var(--sgds-dimension-48,56px);min-width:unset;padding:0;width:var(--sgds-dimension-48,56px)}.btn.btn-icon.btn-lg{height:var(--sgds-dimension-56);min-width:unset;padding:0;width:var(--sgds-dimension-56)}.btn.btn-icon.btn-sm{height:var(--sgds-dimension-40);min-width:unset;padding:0;width:var(--sgds-dimension-40)}.btn.btn-icon.btn-xs{height:var(--sgds-dimension-32);min-width:unset;padding:0;width:var(--sgds-dimension-32)}`;class lr extends pa{_assignIconSize(e){return"xs"===e?"sm":"sm"===e?"md":"md"===e?"lg":"lg"===e?"xl":void 0}render(){const e=this.href,t=e?Bt`a`:Bt`button`;return Tt`
|
|
2416
2416
|
<${t}
|
|
2417
2417
|
class="btn btn-icon${bt({disabled:this.disabled,active:this.active,[`btn-${this.variant}`]:this.variant,[`btn-${this.size}`]:this.size,loading:this.loading})}"
|
|
2418
|
-
?disabled=${
|
|
2419
|
-
type=${
|
|
2420
|
-
href=${
|
|
2421
|
-
target=${
|
|
2422
|
-
download=${
|
|
2423
|
-
rel=${
|
|
2424
|
-
role=${
|
|
2418
|
+
?disabled=${qt(e?void 0:this.disabled)}
|
|
2419
|
+
type=${qt(e?void 0:"button")}
|
|
2420
|
+
href=${qt(e?this.href:void 0)}
|
|
2421
|
+
target=${qt(e?this.target:void 0)}
|
|
2422
|
+
download=${qt(e?this.download:void 0)}
|
|
2423
|
+
rel=${qt(e&&"_blank"===this.target?"noreferrer noopener":void 0)}
|
|
2424
|
+
role=${qt(e?"button":void 0)}
|
|
2425
2425
|
aria-disabled=${this.disabled||this.loading?"true":"false"}
|
|
2426
2426
|
tabindex=${this.disabled?"-1":"0"}
|
|
2427
2427
|
@click=${this._handleClick}
|
|
2428
2428
|
@keydown=${this._handleKeydown}
|
|
2429
2429
|
@focus=${this._handleFocus}
|
|
2430
2430
|
@blur=${this._handleBlur}
|
|
2431
|
-
aria-label=${
|
|
2431
|
+
aria-label=${qt(this.loading?"Loading":this.ariaLabel)}
|
|
2432
2432
|
>
|
|
2433
2433
|
${this.loading?Tt`<sgds-spinner
|
|
2434
|
-
size=${
|
|
2435
|
-
tone=${
|
|
2434
|
+
size=${qt(this._assignSpinnerSize(this.size))}
|
|
2435
|
+
tone=${qt(this._assignSpinnerTone(this.tone,this.variant))}
|
|
2436
2436
|
></sgds-spinner>`:Tt`<sgds-icon
|
|
2437
|
-
name=${
|
|
2438
|
-
size=${
|
|
2437
|
+
name=${qt(this.name)}
|
|
2438
|
+
size=${qt(this._assignIconSize(this.size))}
|
|
2439
2439
|
></sgds-icon>`}
|
|
2440
2440
|
</${t}>
|
|
2441
|
-
`}}lr.styles=[...pa.styles,rr],lr.dependencies={"sgds-icon":
|
|
2441
|
+
`}}lr.styles=[...pa.styles,rr],lr.dependencies={"sgds-icon":Ot,"sgds-spinner":nr},t([Je({type:String,reflect:!0})],lr.prototype,"name",void 0);var dr=Me`.datepicker-header{display:flex;gap:var(--sgds-form-gap-md)}sgds-button{--btn-font-weight:var(--sgds-font-weight-semibold)}`;class cr extends lt{constructor(){super(...arguments),this.selectedDate=[]}_handleFocusedTabIndexChange(){let e;switch(this.focusedTabIndex){case 0:e=this.shadowRoot.querySelector("sgds-icon-button[name='arrow-left']");break;case 1:e=this.shadowRoot.querySelector("sgds-button");break;case 2:e=this.shadowRoot.querySelector("sgds-icon-button[name='arrow-right']");break;default:return}e.focus()}_changeView(){switch(this.view){case"days":this.view="months";break;case"months":this.view="years"}this.emit("sgds-view",{detail:this.view})}renderHeader(e=this.displayDate,t=this.view){if("months"===t)return e.getFullYear();if("years"===t){const t=(new Date).getFullYear(),s=e.getFullYear(),i=(s-t)%12,a=i<0?12+i:i;return`${s-a} - ${s-a+12-1}`}return`${hr[e.getMonth()]} ${e.getFullYear()}`}_renderHeaderTemplate(){return ee`${this.renderHeader()}`}handleClickPrevious(){const{view:e,displayDate:t,focusedDate:s}=this;let i=new Date(t);"months"===e?i.setFullYear(i.getFullYear()-1):"years"===this.view?i.setFullYear(i.getFullYear()-12):i=s.getDate()!==t.getDate()?Jn(s):Jn(i),this.displayDate=i,this.emit("sgds-change-calendar",{detail:this.displayDate})}_handleClickNext(){const{view:e,displayDate:t,focusedDate:s}=this;let i=new Date(t);"months"===e?i.setFullYear(i.getFullYear()+1):"years"===this.view?i.setFullYear(i.getFullYear()+12):i=s.getDate()!==t.getDate()?Qn(s):Qn(i),this.displayDate=i,this.emit("sgds-change-calendar",{detail:this.displayDate})}_removeCaret(){const e=this.displayDate.getFullYear(),t=this.displayDate.getMonth(),s=new Date(e,t);return"months"===this.view?e<=1900:"years"===this.view?e<1904:en(s,new Date(0,0,1))||Jo(s,new Date(0,0,1))}_ariaLabelForNextBtn(){return{days:"Show next month",months:"Show next year",years:"Show next 12 years"}[this.view]}_ariaLabelForPrevBtn(){return{days:"Show previous month",months:"Show previous year",years:"Show previous 12 years"}[this.view]}_ariaLabelForHeaderBtn(){const e={days:`Current view is days, click to show months in ${this.displayDate.getFullYear()}`,months:`Current view is months, click to show years between ${this.renderHeader(this.displayDate,"years")}`,years:"Current view is years"};return`${this.renderHeader()}. ${e[this.view]}`}render(){return ee`
|
|
2442
2442
|
<div class="datepicker-header dropdown-header" role="heading">
|
|
2443
2443
|
<sgds-icon-button
|
|
2444
2444
|
name="arrow-left"
|
|
@@ -2469,7 +2469,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2469
2469
|
>
|
|
2470
2470
|
</sgds-icon-button>
|
|
2471
2471
|
</div>
|
|
2472
|
-
`}}cr.styles=[dr],cr.dependencies={"sgds-icon":Nt,"sgds-icon-button":lr,"sgds-button":ma},t([Je({attribute:!1})],cr.prototype,"displayDate",void 0),t([Je({attribute:!1})],cr.prototype,"focusedDate",void 0),t([Je({attribute:!1})],cr.prototype,"selectedDate",void 0),t([Je()],cr.prototype,"view",void 0),t([Je()],cr.prototype,"focusedTabIndex",void 0),t([Dt("focusedTabIndex",{waitUntilFirstUpdate:!0})],cr.prototype,"_handleFocusedTabIndexChange",null);const hr=["January","February","March","April","May","June","July","August","September","October","November","December"];function ur(e){return"string"==typeof e||e instanceof String}function pr(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function gr(e,t){return Array.isArray(t)?gr(e,((e,s)=>t.includes(s))):Object.entries(e).reduce(((e,s)=>{let[i,a]=s;return t(a,i)&&(e[i]=a),e}),{})}const vr="NONE",mr="LEFT",fr="FORCE_LEFT",br="RIGHT",wr="FORCE_RIGHT";function yr(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function xr(e,t){if(t===e)return!0;const s=Array.isArray(t),i=Array.isArray(e);let a;if(s&&i){if(t.length!=e.length)return!1;for(a=0;a<t.length;a++)if(!xr(t[a],e[a]))return!1;return!0}if(s!=i)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const s=t instanceof Date,i=e instanceof Date;if(s&&i)return t.getTime()==e.getTime();if(s!=i)return!1;const o=t instanceof RegExp,n=e instanceof RegExp;if(o&&n)return t.toString()==e.toString();if(o!=n)return!1;const r=Object.keys(t);for(a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(e,r[a]))return!1;for(a=0;a<r.length;a++)if(!xr(e[r[a]],t[r[a]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class kr{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?vr:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?mr:br}}function _r(e,t){return new _r.InputMask(e,t)}function Cr(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?_r.MaskedRegExp:ur(e)?_r.MaskedPattern:e===Date?_r.MaskedDate:e===Number?_r.MaskedNumber:Array.isArray(e)||e===Array?_r.MaskedDynamic:_r.Masked&&e.prototype instanceof _r.Masked?e:_r.Masked&&e instanceof _r.Masked?e.constructor:e instanceof Function?_r.MaskedFunction:(console.warn("Mask not found for mask",e),_r.Masked)}function Sr(e){if(!e)throw new Error("Options in not defined");if(_r.Masked){if(e.prototype instanceof _r.Masked)return{mask:e};const{mask:t,...s}=e instanceof _r.Masked?{mask:e}:pr(e)&&e.mask instanceof _r.Masked?e:{};if(t){const e=t.mask;return{...gr(t,((e,t)=>!t.startsWith("_"))),mask:t.constructor,_mask:e,...s}}}return pr(e)?{...e}:{mask:e}}function Mr(e){if(_r.Masked&&e instanceof _r.Masked)return e;const t=Sr(e),s=Cr(t.mask);if(!s)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===s&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new s(t)}_r.createMask=Mr;class $r{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}_r.MaskElement=$r;class Dr extends $r{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return null!=(e=null==(t=(s=this.input).getRootNode)?void 0:t.call(s))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}_r.HTMLMaskElement=Dr;class Ar extends Dr{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}_r.HTMLMaskElement=Dr;class Vr extends Dr{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}_r.HTMLContenteditableMaskElement=Vr;class Er{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Er.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Er.MAX_LENGTH=100;_r.InputMask=class{constructor(e,t){this.el=e instanceof $r?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new Vr(e):new Ar(e),this.masked=Mr(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Er,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof _r.Masked)&&this.masked.constructor===Cr(e))return void this.masked.updateOptions({mask:e});const t=e instanceof _r.Masked?e:Mr({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach((e=>e(t)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,o=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),o&&this._fireChangeEvents(),this._historyChanging||!o&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);i&&(this.mask=t),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,mr))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new kr({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:vr;let o=this.masked.nearestInputPos(t.startChangePos+i,a);a!==vr&&(o=this.masked.nearestInputPos(o,vr)),this.updateControl(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class Ir{static normalize(e){return Array.isArray(e)?e:[e,new Ir]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}_r.ChangeDetails=Ir;class Br{constructor(e,t,s){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Pr{constructor(e){this._value="",this._update({...Pr.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new Br(this.extractInput(e,t),e)}appendTail(e){return ur(e)&&(e=new Br(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new Ir({inserted:e,rawInserted:e})):new Ir}_appendChar(e,t,s){void 0===t&&(t={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&"pad"===this.autofix)){const s=this.state;this.state=i;let o=this.pad(t);const n=this._appendCharRaw(e,t);o=o.aggregate(n),n.rawInserted||o.equals(a)?a=o:this.state=s}if(a.inserted){let e,o=!1!==this.doValidate(t);if(o&&null!=s){const t=this.state;if(!0===this.overwrite){e=s.state;for(let e=0;e<a.rawInserted.length;++e)s.unshift(this.displayValue.length-a.tailShift)}let i=this.appendTail(s);if(o=i.rawInserted.length===s.toString().length,!(o&&i.inserted||"shift"!==this.overwrite)){this.state=t,e=s.state;for(let e=0;e<a.rawInserted.length;++e)s.shift();i=this.appendTail(s),o=i.rawInserted.length===s.toString().length}o&&i.inserted&&(this.state=t)}o||(a=new Ir,this.state=i,s&&e&&(s.state=e))}return a}_appendPlaceholder(){return new Ir}_appendEager(){return new Ir}append(e,t,s){if(!ur(e))throw new Error("value should be string");const i=ur(s)?new Br(String(s)):s;let a;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,a]=this.doPrepare(e,t);for(let s=0;s<e.length;++s){const o=this._appendChar(e[s],t,i);if(!o.rawInserted&&!this.doSkipInvalid(e[s],t,i))break;a.aggregate(o)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&a.aggregate(this._appendEager()),null!=i&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new Ir}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&0===s.indexOf(this.value)&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),Ir.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),Ir.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,i,a){void 0===s&&(s=""),void 0===i&&(i=vr),void 0===a&&(a={input:!0});const o=e+t,n=this.extractTail(o),r=!0===this.eager||"remove"===this.eager;let l;r&&(i=function(e){switch(e){case mr:return fr;case br:return wr;default:return e}}(i),l=this.extractInput(0,o,{raw:!0}));let d=e;const c=new Ir;if(i!==vr&&(d=this.nearestInputPos(e,t>1&&0!==e&&!r?vr:i),c.tailShift=d-e),c.aggregate(this.remove(d)),r&&i!==vr&&l===this.rawInputValue)if(i===fr){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new Ir({tailShift:-1})).aggregate(this.remove(e-1))}else i===wr&&n.unshift();return c.aggregate(this.append(s,a,n))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!xr(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Pr.EMPTY_VALUES.includes(e)&&Pr.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new Ir}}Pr.DEFAULTS={skipInvalid:!0},Pr.EMPTY_VALUES=[void 0,null,""],_r.Masked=Pr;class Tr{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=ur(e)?new Br(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof Br)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof Tr){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof _r.MaskedPattern)){return new Br(this.toString()).appendTo(e)}const t=new Ir;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),o=i.stop;let n;if(null!=o&&(!a||a.index<=o)&&((i instanceof Tr||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),n=i instanceof Tr&&e._blocks[o]),n){const s=n.appendTail(i);t.aggregate(s);const a=i.toString().slice(s.rawInserted.length);a&&t.aggregate(e.append(a,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map((e=>{const t="chunks"in e?new Tr:new Br;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let s=0;for(;s<this.chunks.length;){const e=this.chunks[s],i=e.unshift(t);if(e.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class Lr{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,fr),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,mr),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,mr),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,wr),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,vr),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,vr),!0}))}}class Fr{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new Ir}nearestInputPos(e,t){void 0===t&&(t=vr);const s=this._value.length;switch(t){case mr:case fr:return 0;default:return s}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===s&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new Ir;const s=!0===this.eager||"append"===this.eager,i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,a=new Ir({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new Ir;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Br("")}appendTail(e){return ur(e)&&(e=new Br(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class Zr{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:o,eager:n,...r}=e;this.masked=Mr(r),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:o,eager:n})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new Ir}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new Ir;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&!1===this.doValidate(t)&&(i=new Ir,this.masked.state=s),i.inserted||this.isOptional||this.lazy||t.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Ir:(this.isFilled=!0,new Ir({inserted:this.placeholderChar}))}_appendEager(){return new Ir}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){void 0===t&&(t=vr);const s=this.value.length,i=Math.min(Math.max(e,0),s);switch(t){case mr:case fr:return this.isComplete?i:0;case br:case wr:return this.isComplete?i:s;default:return i}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new Ir}}Zr.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};_r.MaskedRegExp=class extends Pr{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class Hr extends Pr{constructor(e){super({...Hr.DEFAULTS,...e,definitions:Object.assign({},Zr.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){if(this.blocks){const e=t.slice(a),s=Object.keys(this.blocks).filter((t=>0===e.indexOf(t)));s.sort(((e,t)=>t.length-e.length));const i=s[0];if(i){const{expose:e,repeat:t,...s}=Sr(this.blocks[i]),o={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...s,repeat:t,parent:this},n=null!=t?new _r.RepeatBlock(o):Mr(o);n&&(this._blocks.push(n),e&&(this.exposeBlock=n),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),a+=i.length-1;continue}}let o=t[a],n=o in e;if(o===Hr.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){s=!s;continue}if("["===o||"]"===o){i=!i;continue}if(o===Hr.ESCAPE_CHAR){if(++a,o=t[a],!o)break;n=!1}const r=n?new Zr({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Sr(e[o]),parent:this}):new Fr({char:o,eager:this.eager,isUnmasking:s});this._blocks.push(r)}}get state(){return{...super.state,_blocks:this._blocks.map((e=>e.state))}}set state(e){if(!e)return void this.reset();const{_blocks:t,...s}=e;this._blocks.forEach(((e,s)=>e.state=t[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new Ir;let s=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==s)return t;this._blocks[s].isFilled&&++s;for(let e=s;e<this._blocks.length;++e){const s=this._blocks[e]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new Ir;if(!s)return i;for(let o,n=s.index;o=this._blocks[n];++n){var a;const s=o._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[n]});if(i.aggregate(s),s.consumed)break}return i}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=new Tr;return e===t||this._forEachBlocksInRange(e,t,((e,t,i,a)=>{const o=e.extractTail(i,a);o.stop=this._findStopBefore(t),o.from=this._blockStartPos(t),o instanceof Tr&&(o.blockIndex=t),s.extend(o)})),s}extractInput(e,t,s){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===s&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,((e,t,a,o)=>{i+=e.extractInput(a,o,s)})),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=e))break;t=i}return t}_appendPlaceholder(e){const t=new Ir;if(this.lazy&&null==e)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,a=null!=e?e:this._blocks.length;return this._blocks.slice(i,a).forEach((s=>{var i;s.lazy&&null==e||t.aggregate(s._appendPlaceholder(null==(i=s._blocks)?void 0:i.length))})),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce(((e,t)=>e+t.displayValue.length),0)}_forEachBlocksInRange(e,t,s){void 0===t&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const e=this._mapPosToBlock(t),a=e&&i.index===e.index,o=i.offset,n=e&&a?e.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,o,n),e&&!a){for(let t=i.index+1;t<e.index;++t)s(this._blocks[t],t,0,this._blocks[t].displayValue.length);s(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,((e,t,i,a)=>{s.aggregate(e.remove(i,a))})),s}nearestInputPos(e,t){if(void 0===t&&(t=vr),!this._blocks.length)return 0;const s=new Lr(this,e);if(t===vr)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(t===mr||t===fr){if(t===mr){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===mr){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e)return s.pos;if(s.popState(),s.ok&&s.pos<=e)return s.pos;s.popState()}return s.ok?s.pos:t===fr?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return t===br||t===wr?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===wr?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(e,mr)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,((e,t,i,a)=>{s+=e.totalInputPositions(i,a)})),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}pad(e){const t=new Ir;return this._forEachBlocksInRange(0,this.displayValue.length,(s=>t.aggregate(s.pad(e)))),t}}Hr.DEFAULTS={...Pr.DEFAULTS,lazy:!0,placeholderChar:"_"},Hr.STOP_CHAR="`",Hr.ESCAPE_CHAR="\\",Hr.InputDefinition=Zr,Hr.FixedDefinition=Fr,_r.MaskedPattern=Hr;class zr extends Hr{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=a;const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<r.length&&r[l]===n[l];)++l;o.mask=r.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(o)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",s="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(i.length)+a,s="9".repeat(i.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){let s;return void 0===t&&(t={}),[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(t);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new Ir;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let s=0;s<i;++s)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach((e=>this._appendCharRaw(e)))}return t}}_r.MaskedRange=zr;class Rr extends Hr{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:ur(t)?t:s}}constructor(e){super(Rr.extractPatternOptions({...Rr.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...Rr.DEFAULTS,...e},o=Object.assign({},Rr.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,i),super._update({...a,mask:ur(t)?t:s,blocks:o})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Rr.extractPatternOptions(e))}}Rr.GET_DEFAULT_BLOCKS=()=>({d:{mask:zr,from:1,to:31,maxLength:2},m:{mask:zr,from:1,to:12,maxLength:2},Y:{mask:zr,from:1900,to:9999}}),Rr.DEFAULTS={...Hr.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{const[s,i,a]=e.split(".").map(Number);return new Date(a,i-1,s)}},_r.MaskedDate=Rr;class Or extends Pr{constructor(e){super({...Or.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>{const{expose:t,...s}=Sr(e),i=Mr({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return t&&(this.exposeMask=i),i})):[])}_appendCharRaw(e,t){void 0===t&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){void 0===e&&(e=""),void 0===t&&(t={}),void 0===s&&(s="");const i=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,a=this.rawInputValue,o=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:a,n=a.slice(o.length),r=this.currentMask,l=new Ir,d=null==r?void 0:r.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==r?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),l.tailShift=this.currentMask.value.length-i.length),n&&(l.tailShift+=this.currentMask.append(n,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new Ir;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(s=e._beforeTailState)?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return void 0===t&&(t={}),void 0===s&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let e;[s,e]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(e)}return[s,i]}doPrepareChar(e,t){void 0===t&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let e;[s,e]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(e)}return[s,i]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const s=new Ir;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...a}=e;t&&this.compiledMasks.forEach(((e,s)=>e.state=t[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every(((t,s)=>{if(!e[s])return;const{mask:i,...a}=e[s];return xr(t,a)&&t.maskEquals(i)})):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}Or.DEFAULTS={...Pr.DEFAULTS,dispatch:(e,t,s,i)=>{if(!t.compiledMasks.length)return;const a=t.rawInputValue,o=t.compiledMasks.map(((o,n)=>{const r=t.currentMask===o,l=r?o.displayValue.length:o.nearestInputPos(o.displayValue.length,fr);return o.rawInputValue!==a?(o.reset(),o.append(a,{raw:!0})):r||o.remove(l),o.append(e,t.currentMaskFlags(s)),o.appendTail(i),{index:n,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(l,o.nearestInputPos(o.displayValue.length,fr)))}}));return o.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[o[0].index]}},_r.MaskedDynamic=Or;class Nr extends Hr{constructor(e){super({...Nr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const e=t.map((e=>e.length)),i=Math.min(...e),a=Math.max(...e)-i;s.mask="*".repeat(i),a&&(s.mask+="["+"*".repeat(a)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){void 0===t&&(t={});const s=Math.min(this.nearestInputPos(0,wr),this.value.length),i=this.enum.filter((t=>this.matchValue(t,this.unmaskedValue+e,s)));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,((e,s)=>{const a=i[0][s];s>=this.value.length||a===e.value||(e.reset(),e._appendChar(a,t))}));const e=super._appendCharRaw(i[0][this.value.length],t);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach((t=>e.aggregate(super._appendCharRaw(t)))),e}return new Ir({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new Br("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new Ir;const s=Math.min(super.nearestInputPos(0,wr),this.value.length);let i;for(i=e;i>=0;--i){if(this.enum.filter((e=>this.matchValue(e,this.value.slice(s,i),s))).length>1)break}const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}Nr.DEFAULTS={...Hr.DEFAULTS,matchValue:(e,t,s)=>e.indexOf(t,s)===s},_r.MaskedEnum=Nr;var Ur;_r.MaskedFunction=class extends Pr{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class qr extends Pr{constructor(e){super({...qr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+yr(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(yr).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(yr(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),!s||this.allowPositive||this.value||"-"===s||i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){void 0===t&&(t=!1);let s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){void 0===t&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const o=this.number;let n,r=!isNaN(o),l=!1;if(r){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(qr.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):r=!1),r&&(r=Boolean(this._value.match(this._numberRegExp)))}r?n=new Ir({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,n=new Ir),this._value=this._insertThousandsSeparators(this._value);const d=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(d);return n.tailShift+=(c-i)*this.thousandsSeparator.length,n}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const o=this._separatorsCountFromSlice(s);return new Ir({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case vr:case mr:case fr:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===fr)return s}break}case br:case wr:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,s,i)=>t+i)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){void 0===t&&(t={});const i=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===qr.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,qr.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(qr.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||qr.EMPTY_VALUES.includes(e)&&qr.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}Ur=qr,qr.UNMASKED_RADIX=".",qr.EMPTY_VALUES=[...Pr.EMPTY_VALUES,0],qr.DEFAULTS={...Pr.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ur.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},_r.MaskedNumber=qr;const Yr={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function jr(e,t,s){void 0===t&&(t=Yr.MASKED),void 0===s&&(s=Yr.MASKED);const i=Mr(e);return e=>i.runIsolated((i=>(i[t]=e,i[s])))}_r.PIPE_TYPE=Yr,_r.createPipe=jr,_r.pipe=function(e,t,s,i){return jr(t,s,i)(e)};_r.RepeatBlock=class extends Hr{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:a,...o}=Sr(e);this._blockOpts=Object.assign({},this._blockOpts,o);const n=Mr(this._blockOpts);this.repeat=null!=(t=null!=(s=null!=a?a:n.repeat)?s:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(i=this._blocks)?void 0:i.length)||0,this.repeatFrom)),blocks:{m:n},eager:n.eager,overwrite:n.overwrite,skipInvalid:n.skipInvalid,lazy:n.lazy,placeholderChar:n.placeholderChar,displayChar:n.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(Mr(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const s=new Ir;for(let r,l,d=null!=(i=null==(a=this._mapPosToBlock(this.displayValue.length))?void 0:a.index)?i:Math.max(this._blocks.length-1,0);r=null!=(o=this._blocks[d])?o:l=!l&&this._allocateBlock(d);++d){var i,a,o,n;const c=r._appendChar(e,{...t,_beforeTailState:null==(n=t._beforeTailState)||null==(n=n._blocks)?void 0:n[d]});if(c.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(c),c.consumed)break}return s}_trimEmptyTail(e,t){var s,i;void 0===e&&(e=0);const a=Math.max((null==(s=this._mapPosToBlock(e))?void 0:s.index)||0,this.repeatFrom,0);let o;null!=t&&(o=null==(i=this._mapPosToBlock(t))?void 0:i.index),null==o&&(o=this._blocks.length-1);let n=0;for(let e=o;a<=e&&!this._blocks[e].unmaskedValue;--e,++n);n&&(this._blocks.splice(o-n+1,n),this.mask=this.mask.slice(n))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};try{globalThis.IMask=_r}catch{}var Wr=Me`:host{--input-border-radius:var(--sgds-form-border-radius-md)}:host(.quantity-toggle) input::-webkit-inner-spin-button{appearance:none;margin:0}:host(.quantity-toggle) input{text-align:center}.form-control-prefix,.form-control-suffix{color:var(--sgds-form-color-subtle);display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs)}.form-control-group.quantity-toggle{padding:0}sgds-icon[role=button]{cursor:pointer}sgds-icon[role=button]:focus,sgds-icon[role=button]:focus-visible{outline:var(--sgds-form-outline-focus)}.form-control-row{align-items:center;display:flex;gap:var(--sgds-gap-sm)}`;class Kr extends(Pa(Ea)){constructor(){super(...arguments),this.type="text",this.placeholder="placeholder",this.autofocus=!1,this.readonly=!1,this.defaultValue="",this.valid=!1,this.loading=!1,this.required=!1,this.noValidate=!1,this.value="",this._isTouched=!1,this._showPassword=!1}focus(e){this.input.focus(e)}blur(){this.input.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}setValidity(e,t,s){return this._mixinSetValidity(e,t,s)}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleClick(){this.focus()}_handleChange(e){this.value=this.input.value;const t=this.emit("sgds-change",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||t.defaultPrevented||super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value;const t=this.emit("sgds-input",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||t.defaultPrevented||super._mixinHandleInputChange(e)}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_renderInput(){const e="both"===this.hasFeedback||"style"===this.hasFeedback;return Tt`
|
|
2472
|
+
`}}cr.styles=[dr],cr.dependencies={"sgds-icon":Ot,"sgds-icon-button":lr,"sgds-button":ma},t([Je({attribute:!1})],cr.prototype,"displayDate",void 0),t([Je({attribute:!1})],cr.prototype,"focusedDate",void 0),t([Je({attribute:!1})],cr.prototype,"selectedDate",void 0),t([Je()],cr.prototype,"view",void 0),t([Je()],cr.prototype,"focusedTabIndex",void 0),t([At("focusedTabIndex",{waitUntilFirstUpdate:!0})],cr.prototype,"_handleFocusedTabIndexChange",null);const hr=["January","February","March","April","May","June","July","August","September","October","November","December"];function ur(e){return"string"==typeof e||e instanceof String}function pr(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function gr(e,t){return Array.isArray(t)?gr(e,((e,s)=>t.includes(s))):Object.entries(e).reduce(((e,s)=>{let[i,a]=s;return t(a,i)&&(e[i]=a),e}),{})}const vr="NONE",mr="LEFT",fr="FORCE_LEFT",br="RIGHT",wr="FORCE_RIGHT";function yr(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function xr(e,t){if(t===e)return!0;const s=Array.isArray(t),i=Array.isArray(e);let a;if(s&&i){if(t.length!=e.length)return!1;for(a=0;a<t.length;a++)if(!xr(t[a],e[a]))return!1;return!0}if(s!=i)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const s=t instanceof Date,i=e instanceof Date;if(s&&i)return t.getTime()==e.getTime();if(s!=i)return!1;const o=t instanceof RegExp,n=e instanceof RegExp;if(o&&n)return t.toString()==e.toString();if(o!=n)return!1;const r=Object.keys(t);for(a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(e,r[a]))return!1;for(a=0;a<r.length;a++)if(!xr(e[r[a]],t[r[a]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class kr{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?vr:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?mr:br}}function _r(e,t){return new _r.InputMask(e,t)}function Cr(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?_r.MaskedRegExp:ur(e)?_r.MaskedPattern:e===Date?_r.MaskedDate:e===Number?_r.MaskedNumber:Array.isArray(e)||e===Array?_r.MaskedDynamic:_r.Masked&&e.prototype instanceof _r.Masked?e:_r.Masked&&e instanceof _r.Masked?e.constructor:e instanceof Function?_r.MaskedFunction:(console.warn("Mask not found for mask",e),_r.Masked)}function Sr(e){if(!e)throw new Error("Options in not defined");if(_r.Masked){if(e.prototype instanceof _r.Masked)return{mask:e};const{mask:t,...s}=e instanceof _r.Masked?{mask:e}:pr(e)&&e.mask instanceof _r.Masked?e:{};if(t){const e=t.mask;return{...gr(t,((e,t)=>!t.startsWith("_"))),mask:t.constructor,_mask:e,...s}}}return pr(e)?{...e}:{mask:e}}function Mr(e){if(_r.Masked&&e instanceof _r.Masked)return e;const t=Sr(e),s=Cr(t.mask);if(!s)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===s&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new s(t)}_r.createMask=Mr;class $r{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}_r.MaskElement=$r;class Ar extends $r{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return null!=(e=null==(t=(s=this.input).getRootNode)?void 0:t.call(s))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}_r.HTMLMaskElement=Ar;class Dr extends Ar{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}_r.HTMLMaskElement=Ar;class Vr extends Ar{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}_r.HTMLContenteditableMaskElement=Vr;class Er{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Er.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Er.MAX_LENGTH=100;_r.InputMask=class{constructor(e,t){this.el=e instanceof $r?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new Vr(e):new Dr(e),this.masked=Mr(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Er,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof _r.Masked)&&this.masked.constructor===Cr(e))return void this.masked.updateOptions({mask:e});const t=e instanceof _r.Masked?e:Mr({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach((e=>e(t)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,o=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),o&&this._fireChangeEvents(),this._historyChanging||!o&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);i&&(this.mask=t),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,mr))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new kr({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:vr;let o=this.masked.nearestInputPos(t.startChangePos+i,a);a!==vr&&(o=this.masked.nearestInputPos(o,vr)),this.updateControl(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class Ir{static normalize(e){return Array.isArray(e)?e:[e,new Ir]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}_r.ChangeDetails=Ir;class Br{constructor(e,t,s){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Pr{constructor(e){this._value="",this._update({...Pr.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new Br(this.extractInput(e,t),e)}appendTail(e){return ur(e)&&(e=new Br(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new Ir({inserted:e,rawInserted:e})):new Ir}_appendChar(e,t,s){void 0===t&&(t={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&"pad"===this.autofix)){const s=this.state;this.state=i;let o=this.pad(t);const n=this._appendCharRaw(e,t);o=o.aggregate(n),n.rawInserted||o.equals(a)?a=o:this.state=s}if(a.inserted){let e,o=!1!==this.doValidate(t);if(o&&null!=s){const t=this.state;if(!0===this.overwrite){e=s.state;for(let e=0;e<a.rawInserted.length;++e)s.unshift(this.displayValue.length-a.tailShift)}let i=this.appendTail(s);if(o=i.rawInserted.length===s.toString().length,!(o&&i.inserted||"shift"!==this.overwrite)){this.state=t,e=s.state;for(let e=0;e<a.rawInserted.length;++e)s.shift();i=this.appendTail(s),o=i.rawInserted.length===s.toString().length}o&&i.inserted&&(this.state=t)}o||(a=new Ir,this.state=i,s&&e&&(s.state=e))}return a}_appendPlaceholder(){return new Ir}_appendEager(){return new Ir}append(e,t,s){if(!ur(e))throw new Error("value should be string");const i=ur(s)?new Br(String(s)):s;let a;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,a]=this.doPrepare(e,t);for(let s=0;s<e.length;++s){const o=this._appendChar(e[s],t,i);if(!o.rawInserted&&!this.doSkipInvalid(e[s],t,i))break;a.aggregate(o)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&a.aggregate(this._appendEager()),null!=i&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new Ir}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&0===s.indexOf(this.value)&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),Ir.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),Ir.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,i,a){void 0===s&&(s=""),void 0===i&&(i=vr),void 0===a&&(a={input:!0});const o=e+t,n=this.extractTail(o),r=!0===this.eager||"remove"===this.eager;let l;r&&(i=function(e){switch(e){case mr:return fr;case br:return wr;default:return e}}(i),l=this.extractInput(0,o,{raw:!0}));let d=e;const c=new Ir;if(i!==vr&&(d=this.nearestInputPos(e,t>1&&0!==e&&!r?vr:i),c.tailShift=d-e),c.aggregate(this.remove(d)),r&&i!==vr&&l===this.rawInputValue)if(i===fr){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new Ir({tailShift:-1})).aggregate(this.remove(e-1))}else i===wr&&n.unshift();return c.aggregate(this.append(s,a,n))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!xr(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Pr.EMPTY_VALUES.includes(e)&&Pr.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new Ir}}Pr.DEFAULTS={skipInvalid:!0},Pr.EMPTY_VALUES=[void 0,null,""],_r.Masked=Pr;class Tr{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=ur(e)?new Br(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof Br)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof Tr){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof _r.MaskedPattern)){return new Br(this.toString()).appendTo(e)}const t=new Ir;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),o=i.stop;let n;if(null!=o&&(!a||a.index<=o)&&((i instanceof Tr||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),n=i instanceof Tr&&e._blocks[o]),n){const s=n.appendTail(i);t.aggregate(s);const a=i.toString().slice(s.rawInserted.length);a&&t.aggregate(e.append(a,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map((e=>{const t="chunks"in e?new Tr:new Br;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let s=0;for(;s<this.chunks.length;){const e=this.chunks[s],i=e.unshift(t);if(e.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class Lr{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,fr),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,mr),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,mr),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,wr),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,vr),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,vr),!0}))}}class Fr{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new Ir}nearestInputPos(e,t){void 0===t&&(t=vr);const s=this._value.length;switch(t){case mr:case fr:return 0;default:return s}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===s&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new Ir;const s=!0===this.eager||"append"===this.eager,i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,a=new Ir({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new Ir;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Br("")}appendTail(e){return ur(e)&&(e=new Br(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class Zr{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:o,eager:n,...r}=e;this.masked=Mr(r),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:o,eager:n})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new Ir}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new Ir;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&!1===this.doValidate(t)&&(i=new Ir,this.masked.state=s),i.inserted||this.isOptional||this.lazy||t.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Ir:(this.isFilled=!0,new Ir({inserted:this.placeholderChar}))}_appendEager(){return new Ir}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){void 0===t&&(t=vr);const s=this.value.length,i=Math.min(Math.max(e,0),s);switch(t){case mr:case fr:return this.isComplete?i:0;case br:case wr:return this.isComplete?i:s;default:return i}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new Ir}}Zr.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};_r.MaskedRegExp=class extends Pr{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class Hr extends Pr{constructor(e){super({...Hr.DEFAULTS,...e,definitions:Object.assign({},Zr.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){if(this.blocks){const e=t.slice(a),s=Object.keys(this.blocks).filter((t=>0===e.indexOf(t)));s.sort(((e,t)=>t.length-e.length));const i=s[0];if(i){const{expose:e,repeat:t,...s}=Sr(this.blocks[i]),o={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...s,repeat:t,parent:this},n=null!=t?new _r.RepeatBlock(o):Mr(o);n&&(this._blocks.push(n),e&&(this.exposeBlock=n),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),a+=i.length-1;continue}}let o=t[a],n=o in e;if(o===Hr.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){s=!s;continue}if("["===o||"]"===o){i=!i;continue}if(o===Hr.ESCAPE_CHAR){if(++a,o=t[a],!o)break;n=!1}const r=n?new Zr({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Sr(e[o]),parent:this}):new Fr({char:o,eager:this.eager,isUnmasking:s});this._blocks.push(r)}}get state(){return{...super.state,_blocks:this._blocks.map((e=>e.state))}}set state(e){if(!e)return void this.reset();const{_blocks:t,...s}=e;this._blocks.forEach(((e,s)=>e.state=t[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new Ir;let s=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==s)return t;this._blocks[s].isFilled&&++s;for(let e=s;e<this._blocks.length;++e){const s=this._blocks[e]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new Ir;if(!s)return i;for(let o,n=s.index;o=this._blocks[n];++n){var a;const s=o._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[n]});if(i.aggregate(s),s.consumed)break}return i}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=new Tr;return e===t||this._forEachBlocksInRange(e,t,((e,t,i,a)=>{const o=e.extractTail(i,a);o.stop=this._findStopBefore(t),o.from=this._blockStartPos(t),o instanceof Tr&&(o.blockIndex=t),s.extend(o)})),s}extractInput(e,t,s){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===s&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,((e,t,a,o)=>{i+=e.extractInput(a,o,s)})),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=e))break;t=i}return t}_appendPlaceholder(e){const t=new Ir;if(this.lazy&&null==e)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,a=null!=e?e:this._blocks.length;return this._blocks.slice(i,a).forEach((s=>{var i;s.lazy&&null==e||t.aggregate(s._appendPlaceholder(null==(i=s._blocks)?void 0:i.length))})),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce(((e,t)=>e+t.displayValue.length),0)}_forEachBlocksInRange(e,t,s){void 0===t&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const e=this._mapPosToBlock(t),a=e&&i.index===e.index,o=i.offset,n=e&&a?e.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,o,n),e&&!a){for(let t=i.index+1;t<e.index;++t)s(this._blocks[t],t,0,this._blocks[t].displayValue.length);s(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,((e,t,i,a)=>{s.aggregate(e.remove(i,a))})),s}nearestInputPos(e,t){if(void 0===t&&(t=vr),!this._blocks.length)return 0;const s=new Lr(this,e);if(t===vr)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(t===mr||t===fr){if(t===mr){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===mr){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e)return s.pos;if(s.popState(),s.ok&&s.pos<=e)return s.pos;s.popState()}return s.ok?s.pos:t===fr?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return t===br||t===wr?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===wr?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(e,mr)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,((e,t,i,a)=>{s+=e.totalInputPositions(i,a)})),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}pad(e){const t=new Ir;return this._forEachBlocksInRange(0,this.displayValue.length,(s=>t.aggregate(s.pad(e)))),t}}Hr.DEFAULTS={...Pr.DEFAULTS,lazy:!0,placeholderChar:"_"},Hr.STOP_CHAR="`",Hr.ESCAPE_CHAR="\\",Hr.InputDefinition=Zr,Hr.FixedDefinition=Fr,_r.MaskedPattern=Hr;class zr extends Hr{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=a;const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<r.length&&r[l]===n[l];)++l;o.mask=r.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(o)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",s="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(i.length)+a,s="9".repeat(i.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){let s;return void 0===t&&(t={}),[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(t);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new Ir;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let s=0;s<i;++s)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach((e=>this._appendCharRaw(e)))}return t}}_r.MaskedRange=zr;class Rr extends Hr{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:ur(t)?t:s}}constructor(e){super(Rr.extractPatternOptions({...Rr.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...Rr.DEFAULTS,...e},o=Object.assign({},Rr.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,i),super._update({...a,mask:ur(t)?t:s,blocks:o})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Rr.extractPatternOptions(e))}}Rr.GET_DEFAULT_BLOCKS=()=>({d:{mask:zr,from:1,to:31,maxLength:2},m:{mask:zr,from:1,to:12,maxLength:2},Y:{mask:zr,from:1900,to:9999}}),Rr.DEFAULTS={...Hr.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{const[s,i,a]=e.split(".").map(Number);return new Date(a,i-1,s)}},_r.MaskedDate=Rr;class Or extends Pr{constructor(e){super({...Or.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>{const{expose:t,...s}=Sr(e),i=Mr({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return t&&(this.exposeMask=i),i})):[])}_appendCharRaw(e,t){void 0===t&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){void 0===e&&(e=""),void 0===t&&(t={}),void 0===s&&(s="");const i=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,a=this.rawInputValue,o=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:a,n=a.slice(o.length),r=this.currentMask,l=new Ir,d=null==r?void 0:r.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==r?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),l.tailShift=this.currentMask.value.length-i.length),n&&(l.tailShift+=this.currentMask.append(n,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new Ir;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(s=e._beforeTailState)?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return void 0===t&&(t={}),void 0===s&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let e;[s,e]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(e)}return[s,i]}doPrepareChar(e,t){void 0===t&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let e;[s,e]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(e)}return[s,i]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const s=new Ir;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...a}=e;t&&this.compiledMasks.forEach(((e,s)=>e.state=t[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every(((t,s)=>{if(!e[s])return;const{mask:i,...a}=e[s];return xr(t,a)&&t.maskEquals(i)})):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}Or.DEFAULTS={...Pr.DEFAULTS,dispatch:(e,t,s,i)=>{if(!t.compiledMasks.length)return;const a=t.rawInputValue,o=t.compiledMasks.map(((o,n)=>{const r=t.currentMask===o,l=r?o.displayValue.length:o.nearestInputPos(o.displayValue.length,fr);return o.rawInputValue!==a?(o.reset(),o.append(a,{raw:!0})):r||o.remove(l),o.append(e,t.currentMaskFlags(s)),o.appendTail(i),{index:n,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(l,o.nearestInputPos(o.displayValue.length,fr)))}}));return o.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[o[0].index]}},_r.MaskedDynamic=Or;class Nr extends Hr{constructor(e){super({...Nr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const e=t.map((e=>e.length)),i=Math.min(...e),a=Math.max(...e)-i;s.mask="*".repeat(i),a&&(s.mask+="["+"*".repeat(a)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){void 0===t&&(t={});const s=Math.min(this.nearestInputPos(0,wr),this.value.length),i=this.enum.filter((t=>this.matchValue(t,this.unmaskedValue+e,s)));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,((e,s)=>{const a=i[0][s];s>=this.value.length||a===e.value||(e.reset(),e._appendChar(a,t))}));const e=super._appendCharRaw(i[0][this.value.length],t);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach((t=>e.aggregate(super._appendCharRaw(t)))),e}return new Ir({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new Br("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new Ir;const s=Math.min(super.nearestInputPos(0,wr),this.value.length);let i;for(i=e;i>=0;--i){if(this.enum.filter((e=>this.matchValue(e,this.value.slice(s,i),s))).length>1)break}const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}Nr.DEFAULTS={...Hr.DEFAULTS,matchValue:(e,t,s)=>e.indexOf(t,s)===s},_r.MaskedEnum=Nr;var Ur;_r.MaskedFunction=class extends Pr{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class qr extends Pr{constructor(e){super({...qr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+yr(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(yr).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(yr(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),!s||this.allowPositive||this.value||"-"===s||i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){void 0===t&&(t=!1);let s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){void 0===t&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const o=this.number;let n,r=!isNaN(o),l=!1;if(r){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(qr.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):r=!1),r&&(r=Boolean(this._value.match(this._numberRegExp)))}r?n=new Ir({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,n=new Ir),this._value=this._insertThousandsSeparators(this._value);const d=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(d);return n.tailShift+=(c-i)*this.thousandsSeparator.length,n}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const o=this._separatorsCountFromSlice(s);return new Ir({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case vr:case mr:case fr:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===fr)return s}break}case br:case wr:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,s,i)=>t+i)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){void 0===t&&(t={});const i=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===qr.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,qr.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(qr.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||qr.EMPTY_VALUES.includes(e)&&qr.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}Ur=qr,qr.UNMASKED_RADIX=".",qr.EMPTY_VALUES=[...Pr.EMPTY_VALUES,0],qr.DEFAULTS={...Pr.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ur.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},_r.MaskedNumber=qr;const Yr={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function jr(e,t,s){void 0===t&&(t=Yr.MASKED),void 0===s&&(s=Yr.MASKED);const i=Mr(e);return e=>i.runIsolated((i=>(i[t]=e,i[s])))}_r.PIPE_TYPE=Yr,_r.createPipe=jr,_r.pipe=function(e,t,s,i){return jr(t,s,i)(e)};_r.RepeatBlock=class extends Hr{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:a,...o}=Sr(e);this._blockOpts=Object.assign({},this._blockOpts,o);const n=Mr(this._blockOpts);this.repeat=null!=(t=null!=(s=null!=a?a:n.repeat)?s:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(i=this._blocks)?void 0:i.length)||0,this.repeatFrom)),blocks:{m:n},eager:n.eager,overwrite:n.overwrite,skipInvalid:n.skipInvalid,lazy:n.lazy,placeholderChar:n.placeholderChar,displayChar:n.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(Mr(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const s=new Ir;for(let r,l,d=null!=(i=null==(a=this._mapPosToBlock(this.displayValue.length))?void 0:a.index)?i:Math.max(this._blocks.length-1,0);r=null!=(o=this._blocks[d])?o:l=!l&&this._allocateBlock(d);++d){var i,a,o,n;const c=r._appendChar(e,{...t,_beforeTailState:null==(n=t._beforeTailState)||null==(n=n._blocks)?void 0:n[d]});if(c.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(c),c.consumed)break}return s}_trimEmptyTail(e,t){var s,i;void 0===e&&(e=0);const a=Math.max((null==(s=this._mapPosToBlock(e))?void 0:s.index)||0,this.repeatFrom,0);let o;null!=t&&(o=null==(i=this._mapPosToBlock(t))?void 0:i.index),null==o&&(o=this._blocks.length-1);let n=0;for(let e=o;a<=e&&!this._blocks[e].unmaskedValue;--e,++n);n&&(this._blocks.splice(o-n+1,n),this.mask=this.mask.slice(n))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};try{globalThis.IMask=_r}catch{}var Wr=Me`:host{--input-border-radius:var(--sgds-form-border-radius-md)}:host(.quantity-toggle) input::-webkit-inner-spin-button{appearance:none;margin:0}:host(.quantity-toggle) input{text-align:center}.form-control-prefix,.form-control-suffix{color:var(--sgds-form-color-subtle);display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs)}.form-control-group.quantity-toggle{padding:0}sgds-icon[role=button]{cursor:pointer}sgds-icon[role=button]:focus,sgds-icon[role=button]:focus-visible{outline:var(--sgds-form-outline-focus)}.form-control-row{align-items:center;display:flex;gap:var(--sgds-gap-sm)}`;class Kr extends(Pa(Ea)){constructor(){super(...arguments),this.type="text",this.placeholder="placeholder",this.autofocus=!1,this.readonly=!1,this.defaultValue="",this.valid=!1,this.loading=!1,this.required=!1,this.noValidate=!1,this.value="",this._isTouched=!1,this._showPassword=!1}focus(e){this.input.focus(e)}blur(){this.input.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}setValidity(e,t,s){return this._mixinSetValidity(e,t,s)}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleClick(){this.focus()}_handleChange(e){this.value=this.input.value;const t=this.emit("sgds-change",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||t.defaultPrevented||super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value;const t=this.emit("sgds-input",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||t.defaultPrevented||super._mixinHandleInputChange(e)}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_renderInput(){const e="both"===this.hasFeedback||"style"===this.hasFeedback;return Tt`
|
|
2473
2473
|
<div
|
|
2474
2474
|
class="form-control-group ${bt({disabled:this.disabled,readonly:this.readonly,"is-invalid":this.invalid&&e})}"
|
|
2475
2475
|
@click=${this._handleClick}
|
|
@@ -2480,26 +2480,26 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2480
2480
|
class="form-control"
|
|
2481
2481
|
type=${this._inputType()}
|
|
2482
2482
|
id=${this._controlId}
|
|
2483
|
-
name=${
|
|
2484
|
-
placeholder=${
|
|
2483
|
+
name=${qt(this.name)}
|
|
2484
|
+
placeholder=${qt(this.placeholder)}
|
|
2485
2485
|
aria-invalid=${this.invalid?"true":"false"}
|
|
2486
|
-
pattern=${
|
|
2486
|
+
pattern=${qt(this.pattern)}
|
|
2487
2487
|
?autofocus=${this.autofocus}
|
|
2488
2488
|
?disabled=${this.disabled}
|
|
2489
2489
|
?readonly=${this.readonly}
|
|
2490
2490
|
?required=${this.required}
|
|
2491
2491
|
.value=${Ma(this.value)}
|
|
2492
|
-
minlength=${
|
|
2493
|
-
maxlength=${
|
|
2494
|
-
min=${
|
|
2495
|
-
max=${
|
|
2496
|
-
step=${
|
|
2492
|
+
minlength=${qt(this.minlength)}
|
|
2493
|
+
maxlength=${qt(this.maxlength)}
|
|
2494
|
+
min=${qt(this.min)}
|
|
2495
|
+
max=${qt(this.max)}
|
|
2496
|
+
step=${qt(this.step)}
|
|
2497
2497
|
@input=${e=>this._handleInputChange(e)}
|
|
2498
2498
|
@change=${e=>this._handleChange(e)}
|
|
2499
2499
|
@invalid=${()=>this.setInvalid(!0)}
|
|
2500
2500
|
@focus=${this._handleFocus}
|
|
2501
2501
|
@blur=${this._handleBlur}
|
|
2502
|
-
aria-describedby=${
|
|
2502
|
+
aria-describedby=${qt(this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:void 0)}
|
|
2503
2503
|
aria-labelledby="${this._labelId} ${this._controlId}Help ${this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:""}"
|
|
2504
2504
|
/>
|
|
2505
2505
|
${"password"===this.type?this._renderPasswordToggle():ie}
|
|
@@ -2537,7 +2537,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2537
2537
|
</div>
|
|
2538
2538
|
${this._renderFeedback()}
|
|
2539
2539
|
</div>
|
|
2540
|
-
`}}Kr.styles=[...Ea.styles,za,Va,Wr],Kr.dependencies={"sgds-spinner":nr,"sgds-icon":
|
|
2540
|
+
`}}Kr.styles=[...Ea.styles,za,Va,Wr],Kr.dependencies={"sgds-spinner":nr,"sgds-icon":Ot},t([Je({reflect:!0})],Kr.prototype,"type",void 0),t([Je({type:String})],Kr.prototype,"prefix",void 0),t([Je({type:String})],Kr.prototype,"suffix",void 0),t([Je({type:Number,reflect:!0})],Kr.prototype,"minlength",void 0),t([Je({type:Number,reflect:!0})],Kr.prototype,"maxlength",void 0),t([Je()],Kr.prototype,"min",void 0),t([Je()],Kr.prototype,"max",void 0),t([Je({type:String,reflect:!0})],Kr.prototype,"placeholder",void 0),t([Je({type:String})],Kr.prototype,"pattern",void 0),t([Je({type:Boolean,reflect:!0})],Kr.prototype,"autofocus",void 0),t([Je({type:Boolean,reflect:!0})],Kr.prototype,"readonly",void 0),t([Je()],Kr.prototype,"step",void 0),t([Je({type:String,reflect:!0})],Kr.prototype,"hasFeedback",void 0),t([Je({type:String,reflect:!0})],Kr.prototype,"invalidFeedback",void 0),t([Ia()],Kr.prototype,"defaultValue",void 0),t([Je({type:Boolean,reflect:!0})],Kr.prototype,"valid",void 0),t([Je({type:Boolean,reflect:!0})],Kr.prototype,"loading",void 0),t([Je({type:Boolean,reflect:!0})],Kr.prototype,"required",void 0),t([Je({type:Boolean,reflect:!0})],Kr.prototype,"noValidate",void 0),t([Je({reflect:!0})],Kr.prototype,"value",void 0),t([et()],Kr.prototype,"_isTouched",void 0),t([et()],Kr.prototype,"_showPassword",void 0),t([At("_isTouched",{waitUntilFirstUpdate:!0})],Kr.prototype,"_handleIsTouched",null),t([At("disabled",{waitUntilFirstUpdate:!0})],Kr.prototype,"_handleDisabledChange",null);var Gr=Me`.datepicker-input-container{display:flex;flex-direction:row;width:-webkit-fill-available;width:-moz-available}.datepicker-input-container .form-control-group{border-right:0}.calendar-btn{all:unset}`;class Xr extends Kr{constructor(){super(),this.dateFormat="DD/MM/YYYY",this.mode="single",this._validateInput=async()=>{const e=this.mask.value.split(" - ").filter((e=>e!==this.dateFormat)),t=e.map((e=>er(Gn(e,Xn[this.dateFormat].fnsPattern,new Date)))),s=t.filter((e=>!ro(e)||Jo(e,new Date(0,0,1))||Jo(e,er(new Date(this.minDate)))||Qo(e,er(new Date(this.maxDate)))));return s.length>0||"range"===this.mode&&1===t.length?(this.setInvalid(!0),this.emit("sgds-invalid-input")):0===s.length&&t.length>0?(this.setInvalid(!1),this.emit("sgds-selectdates-input",{detail:t})):0===t.length&&0===s.length?(this.setInvalid(!1),this.emit("sgds-empty-input")):void 0},this.type="text",this._handleBlur=()=>null}async _handleChange(e){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(e),await this._validateInput()}async firstUpdated(e){super.firstUpdated(e),this._applyInputMask(this.dateFormat)}async _applyInputMask(e){const t=await this.shadowInput,s="single"===this.mode?Xn[e].imPattern:Xn[e].imRangePattern,i={mask:s,pattern:s,eager:!0,overwrite:!0,parse:function(t){return t.split(" - ").map((t=>Gn(t,Xn[e].fnsPattern,new Date)))},format:function(e){return e.map((e=>{let t,s="";const i=e.getDate(),a=e.getMonth()+1;return i<10&&(t="0"+i),a<10&&(s="0"+a),[t,s,e.getFullYear()].join("/")})).join(" - ")},lazy:!1,blocks:{d:{mask:_r.MaskedRange,placeholderChar:"D",from:0,to:9,maxLength:1},m:{mask:_r.MaskedRange,placeholderChar:"M",from:0,to:9,maxLength:1},y:{mask:_r.MaskedRange,placeholderChar:"Y",from:0,to:9,maxLength:1},D:{mask:_r.MaskedRange,placeholderChar:"D",from:0,to:9,maxLength:1},M:{mask:_r.MaskedRange,placeholderChar:"M",from:0,to:9,maxLength:1},Y:{mask:_r.MaskedRange,placeholderChar:"Y",from:0,to:9,maxLength:1}}};this.mask=_r(t,i),this.mask.on("accept",(()=>{this.value=this.mask.masked.value,this.emit("sgds-mask-input-change",{detail:this.value})})),this.mask.on("complete",this._validateInput)}updateMaskValue(){var e;null===(e=this.mask)||void 0===e||e.updateValue()}destroyInputMask(){var e;null===(e=this.mask)||void 0===e||e.destroy()}async applyInputMask(){return await this._applyInputMask(this.dateFormat)}async focus(){return(await this.shadowInput).focus()}render(){return ee`
|
|
2541
2541
|
<div
|
|
2542
2542
|
class="form-control-container ${bt({disabled:this.disabled})}"
|
|
2543
2543
|
>
|
|
@@ -2556,7 +2556,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2556
2556
|
?disabled=${this.disabled}
|
|
2557
2557
|
placeholder=${"single"===this.mode?"DD/MM/YYYY":"DD/MM/YYYY - DD/MM/YYYY"}
|
|
2558
2558
|
mode=${this.mode}
|
|
2559
|
-
invalidFeedback=${
|
|
2559
|
+
invalidFeedback=${qt(this.invalidFeedback?this.invalidFeedback:this._mixinGetValidationMessage())}
|
|
2560
2560
|
@sgds-mask-input-change=${this._handleInputMaskChange}
|
|
2561
2561
|
@sgds-invalid-input=${this._handleInvalidInput}
|
|
2562
2562
|
minDate=${this.minDate}
|
|
@@ -2565,7 +2565,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2565
2565
|
hintText=${this.hintText}
|
|
2566
2566
|
name=${this.name}
|
|
2567
2567
|
?invalid=${this.invalid}
|
|
2568
|
-
hasFeedback=${
|
|
2568
|
+
hasFeedback=${qt(this.hasFeedback?"both":void 0)}
|
|
2569
2569
|
?readonly=${this.readonly}
|
|
2570
2570
|
>
|
|
2571
2571
|
</sgds-datepicker-input>
|
|
@@ -2610,7 +2610,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2610
2610
|
></sgds-datepicker-calendar>
|
|
2611
2611
|
</ul>
|
|
2612
2612
|
</div>
|
|
2613
|
-
`}}Jr.styles=[...Qi.styles,ea,Qr],Jr.dependencies={"sgds-datepicker-input":Xr,"sgds-datepicker-calendar":ar,"sgds-datepicker-header":cr,"sgds-button":ma,"sgds-icon-button":lr},t([Je({type:Boolean,reflect:!0})],Jr.prototype,"required",void 0),t([Je({reflect:!0})],Jr.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Jr.prototype,"disabled",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"value",void 0),t([Je({type:Array,reflect:!0})],Jr.prototype,"initialValue",void 0),t([Je({type:String})],Jr.prototype,"minDate",void 0),t([Je({type:String})],Jr.prototype,"maxDate",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"mode",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Jr.prototype,"hasFeedback",void 0),t([Je({reflect:!0})],Jr.prototype,"label",void 0),t([Je({reflect:!0})],Jr.prototype,"hintText",void 0),t([Je({type:Boolean,reflect:!0,state:!1})],Jr.prototype,"noFlip",void 0),t([Je({type:String,reflect:!0,state:!1})],Jr.prototype,"drop",void 0),t([Je({attribute:!1})],Jr.prototype,"displayDate",void 0),t([Ia()],Jr.prototype,"defaultValue",void 0),t([et()],Jr.prototype,"invalid",void 0),t([et()],Jr.prototype,"view",void 0),t([et()],Jr.prototype,"selectedDateRange",void 0),t([et()],Jr.prototype,"focusedDate",void 0),t([et()],Jr.prototype,"focusedTabIndex",void 0),t([at("sgds-datepicker-calendar")],Jr.prototype,"calendar",void 0),t([at("sgds-datepicker-input")],Jr.prototype,"datepickerInputAsync",void 0),t([it("sgds-datepicker-input")],Jr.prototype,"datepickerInput",void 0),t([
|
|
2613
|
+
`}}Jr.styles=[...Qi.styles,ea,Qr],Jr.dependencies={"sgds-datepicker-input":Xr,"sgds-datepicker-calendar":ar,"sgds-datepicker-header":cr,"sgds-button":ma,"sgds-icon-button":lr},t([Je({type:Boolean,reflect:!0})],Jr.prototype,"required",void 0),t([Je({reflect:!0})],Jr.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Jr.prototype,"disabled",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"value",void 0),t([Je({type:Array,reflect:!0})],Jr.prototype,"initialValue",void 0),t([Je({type:String})],Jr.prototype,"minDate",void 0),t([Je({type:String})],Jr.prototype,"maxDate",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"mode",void 0),t([Je({type:String,reflect:!0})],Jr.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Jr.prototype,"hasFeedback",void 0),t([Je({reflect:!0})],Jr.prototype,"label",void 0),t([Je({reflect:!0})],Jr.prototype,"hintText",void 0),t([Je({type:Boolean,reflect:!0,state:!1})],Jr.prototype,"noFlip",void 0),t([Je({type:String,reflect:!0,state:!1})],Jr.prototype,"drop",void 0),t([Je({attribute:!1})],Jr.prototype,"displayDate",void 0),t([Ia()],Jr.prototype,"defaultValue",void 0),t([et()],Jr.prototype,"invalid",void 0),t([et()],Jr.prototype,"view",void 0),t([et()],Jr.prototype,"selectedDateRange",void 0),t([et()],Jr.prototype,"focusedDate",void 0),t([et()],Jr.prototype,"focusedTabIndex",void 0),t([at("sgds-datepicker-calendar")],Jr.prototype,"calendar",void 0),t([at("sgds-datepicker-input")],Jr.prototype,"datepickerInputAsync",void 0),t([it("sgds-datepicker-input")],Jr.prototype,"datepickerInput",void 0),t([At("value",{waitUntilFirstUpdate:!0})],Jr.prototype,"_handleValueChange",null);var el=Me`:host([bordered][islastchild]) .container:last-child{border-bottom:none}.container{align-items:flex-start;border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:flex;flex-direction:column;gap:var(--sgds-gap-xs);justify-content:flex-start;padding:var(--sgds-padding-lg) var(--sgds-padding-xl)}.data-container,.label-container{flex:1}.label-container{max-width:var(--sgds-dimension-280)}.label{color:var(--sgds-color-default);font-weight:var(--sgds-font-weight-semibold)}.data,.label{font-size:var(--sgds-font-size-2)}.data{color:var(--sgds-color-subtle);font-weight:var(--sgds-font-weight-regular);margin:0}@media (min-width:512px){:host(:not([stacked])) .container{flex-direction:row}}`;let tl=0;class sl extends lt{constructor(){super(...arguments),this.attrId=++tl,this.componentId=`sgds-description-list-${this.attrId}`,this.stacked=!1,this.bordered=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","listitem")}render(){return ee`
|
|
2614
2614
|
<div class="container">
|
|
2615
2615
|
<div class="label-container">
|
|
2616
2616
|
<span class="label">
|
|
@@ -2662,7 +2662,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2662
2662
|
<slot name="footer"></slot>
|
|
2663
2663
|
</div>
|
|
2664
2664
|
</div>
|
|
2665
|
-
`}}hl.styles=[...lt.styles,cl],hl.dependencies={"sgds-close-button":
|
|
2665
|
+
`}}hl.styles=[...lt.styles,cl],hl.dependencies={"sgds-close-button":Ht},t([it(".drawer")],hl.prototype,"drawer",void 0),t([it(".drawer-panel")],hl.prototype,"panel",void 0),t([it(".drawer-overlay")],hl.prototype,"overlay",void 0),t([Je({type:Boolean,reflect:!0})],hl.prototype,"open",void 0),t([Je({type:String,reflect:!0})],hl.prototype,"size",void 0),t([Je({type:String,reflect:!0})],hl.prototype,"placement",void 0),t([Je({type:Boolean,reflect:!0})],hl.prototype,"contained",void 0),t([At("open",{waitUntilFirstUpdate:!0})],hl.prototype,"handleOpenChange",null),t([At("contained",{waitUntilFirstUpdate:!0})],hl.prototype,"handleNoModalChange",null),Mt("drawer.showTop",{keyframes:[{opacity:0,translate:"0 -100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),Mt("drawer.hideTop",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 -100%"}],options:{duration:250,easing:"ease"}}),Mt("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),Mt("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),Mt("drawer.showBottom",{keyframes:[{opacity:0,translate:"0 100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),Mt("drawer.hideBottom",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 100%"}],options:{duration:250,easing:"ease"}}),Mt("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),Mt("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),Mt("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),Mt("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),Mt("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});var ul=Me`.file-upload{display:flex;flex-direction:column;gap:var(--sgds-form-gap-2-xl)}.file-upload-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.file-upload-list{display:flex;flex-direction:column;gap:var(--sgds-form-gap-xl);list-style-type:none}.file-upload-list-item{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-muted);border-radius:var(--sgds-form-border-radius-md);display:flex;gap:var(--sgds-form-gap-lg);padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x)}.file-upload-list-item span:not(:first-of-type){cursor:pointer}ul{margin:0;padding:0}input{display:none}label,sgds-button{cursor:pointer}sgds-close-button{margin-left:auto}sgds-icon.valid{color:var(--sgds-form-success-color-default)}sgds-icon.invalid{color:var(--sgds-color-muted)}`;class pl extends(Pa(Ea)){constructor(){super(...arguments),this.multiple=!1,this.accept="",this.hasFeedback=!1,this.required=!1,this.selectedFiles=[],this.inputRef=us()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}get files(){return this.selectedFiles}_setFileList(e){this.emit("sgds-files-selected",{detail:e})}_handleClick(e){if(e.preventDefault(),!this.disabled){this.inputRef.value.click()}}_handleChange(e){const t=e.target.files;t.length>0&&(this.selectedFiles=Array.from(t)),this._setFileList(t),this.requestUpdate(),super._mixinHandleChange(e)}_removeFileHandler(e){const t=this.inputRef.value,s=t.files,i=new DataTransfer;for(let t=0;t<s.length;t++)e!==t&&i.items.add(s[t]);t.files=i.files,this._setFileList(i.files),this.selectedFiles=Array.from(i.files),this.requestUpdate(),this._mixinValidate(this.input)}_clearAllFiles(){const e=this.inputRef.value,t=new DataTransfer;e.files=t.files,this._setFileList(t.files),this.selectedFiles=Array.from(t.files)}_mixinResetFormControl(){this._clearAllFiles(),this._mixinResetValidity(this.input)}_handleDisabledChange(){this.setInvalid(!1)}_renderLabel(){const e=ee`
|
|
2666
2666
|
<label for=${this._controlId} id=${this._labelId} class="form-label"> ${this.label} </label>
|
|
2667
2667
|
`;return this.label&&e}_renderHintText(){const e=ee` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_renderFeedback(){return ee`
|
|
2668
2668
|
<div class="invalid-feedback-container">
|
|
@@ -2704,7 +2704,7 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2704
2704
|
${t}
|
|
2705
2705
|
</ul>
|
|
2706
2706
|
</div>
|
|
2707
|
-
`}}pl.styles=[...Ea.styles,ul],pl.dependencies={"sgds-button":ma,"sgds-close-button":
|
|
2707
|
+
`}}pl.styles=[...Ea.styles,ul],pl.dependencies={"sgds-button":ma,"sgds-close-button":Ht,"sgds-icon":Ot},t([Je({type:Boolean,reflect:!0})],pl.prototype,"multiple",void 0),t([Je({type:String,reflect:!0})],pl.prototype,"accept",void 0),t([Je({type:Boolean,reflect:!0})],pl.prototype,"hasFeedback",void 0),t([Je({type:String,reflect:!0})],pl.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],pl.prototype,"required",void 0),t([et()],pl.prototype,"selectedFiles",void 0),t([At("disabled",{waitUntilFirstUpdate:!0})],pl.prototype,"_handleDisabledChange",null);var gl=Me`.footer{background-color:var(--sgds-bg-fixed-dark);container:footer/inline-size;height:auto;padding:var(--sgds-padding-none) var(--sgds-padding-lg)}.footer-top{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-default);display:flex;flex-direction:column;padding:var(--sgds-padding-2-xl) var(--sgds-padding-none)}.footer-top.has-content{gap:var(--sgds-gap-2-xl)}.footer-header{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}slot[name=title]::slotted(*){color:var(--sgds-color-fixed-light)!important;font-size:var(--sgds-font-size-4)!important;font-weight:var(--sgds-font-weight-semibold);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-32)!important;margin-bottom:var(--sgds-margin-none)!important;margin-top:var(--sgds-margin-none)}slot:not([name])::slotted(*),slot[name=description]::slotted(*){color:var(--sgds-color-fixed-light);margin-bottom:var(--sgds-margin-none)!important;margin-top:var(--sgds-margin-none)}.footer-items{display:grid;gap:var(--sgds-gap-md) var(--sgds-gap-lg);grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.footer ul{margin:0;padding:0}.footer ul li{list-style-type:none}.footer-bottom{display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-2-xl) var(--sgds-padding-none)}.footer-mandatory-links{display:flex;flex-direction:column;flex-wrap:wrap;gap:var(--sgds-gap-xl);justify-content:space-between}.footer-mandatory-links ul{display:flex;flex-direction:column;flex-wrap:wrap;gap:var(--sgds-gap-sm)}.footer-mandatory-links ul li a,.footer-mandatory-links ul li a:focus,.footer-mandatory-links ul li a:hover{color:var(--sgds-color-fixed-light)}.footer-mandatory-links ul li a:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.footer-copyrights{color:var(--sgds-color-fixed-light);font-size:var(--sgds-font-size-1)}@container footer (min-width: 512px){.footer{padding:var(--sgds-padding-none) var(--sgds-padding-xl)}.footer-bottom,.footer-top{padding:var(--sgds-padding-2-xl) var(--sgds-padding-none)}}@container footer (min-width: 768px){.footer{padding:var(--sgds-padding-none) var(--sgds-padding-2-xl)}.footer-mandatory-links ul{flex-direction:row;gap:var(--sgds-gap-sm) var(--sgds-gap-xl)}}@container footer (min-width: 1024px){.footer{padding:var(--sgds-padding-none)}.footer-top{margin:auto;max-width:var(--sgds-dimension-888);padding:var(--sgds-padding-3-xl) var(--sgds-padding-none);width:100%}.footer-top.has-content{gap:var(--sgds-gap-3-xl)}slot[name=title]::slotted(*){font-size:var(--sgds-font-size-5)!important;line-height:var(--sgds-line-height-36)!important}.footer-bottom{margin:auto;max-width:var(--sgds-dimension-888);padding:var(--sgds-padding-2-xl) var(--sgds-padding-none);width:100%}.footer-mandatory-links ul{gap:var(--sgds-gap-xl)}}@container footer (min-width: 1280px){.footer-bottom,.footer-top{max-width:var(--sgds-dimension-1168)}.footer-mandatory-links{flex-direction:row}}@container footer (min-width: 1440px){.footer-bottom,.footer-top{max-width:var(--sgds-dimension-1312)}}`;class vl extends lt{constructor(){super(...arguments),this.copyrightLiner="Government of Singapore",this.contactHref="#",this.feedbackHref="#",this.faqHref="#",this.sitemapHref="#",this.privacyHref="#",this.termsOfUseHref="#",this.hasDefaultSlot=!1,this.hasTitleSlot=!1,this.hasDescriptionSlot=!1,this.hasItemsSlot=!1,this.hasSlotController=new Wi(this,"[default]","title","description","items")}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this.hasTitleSlot||(this.hasTitleSlot=this.hasSlotController.test("title")),this.hasDescriptionSlot||(this.hasDescriptionSlot=this.hasSlotController.test("description")),this.hasItemsSlot||(this.hasItemsSlot=this.hasSlotController.test("items"))}render(){return ee`
|
|
2708
2708
|
<footer class="footer">
|
|
2709
2709
|
<section
|
|
2710
2710
|
class="${bt({"footer-top":this.hasDefaultSlot||this.hasTitleSlot||this.hasDescriptionSlot||this.hasItemsSlot,"has-content":this.hasDefaultSlot||this.hasItemsSlot})}"
|
|
@@ -2725,40 +2725,40 @@ const Ya=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2725
2725
|
<div class="footer-mandatory-links">
|
|
2726
2726
|
<ul>
|
|
2727
2727
|
<li>
|
|
2728
|
-
<sgds-link size="sm"><a href=${this.contactHref}>Contact</a></sgds-link>
|
|
2728
|
+
<sgds-link size="sm" tone="fixed-light"><a href=${this.contactHref}>Contact</a></sgds-link>
|
|
2729
2729
|
</li>
|
|
2730
2730
|
<li>
|
|
2731
|
-
<sgds-link size="sm"><a href=${this.feedbackHref}>Feedback</a></sgds-link>
|
|
2731
|
+
<sgds-link size="sm" tone="fixed-light"><a href=${this.feedbackHref}>Feedback</a></sgds-link>
|
|
2732
2732
|
</li>
|
|
2733
2733
|
<li>
|
|
2734
|
-
<sgds-link size="sm"><a href=${this.faqHref}>FAQ</a></sgds-link>
|
|
2734
|
+
<sgds-link size="sm" tone="fixed-light"><a href=${this.faqHref}>FAQ</a></sgds-link>
|
|
2735
2735
|
</li>
|
|
2736
2736
|
<li>
|
|
2737
|
-
<sgds-link size="sm"><a href=${this.sitemapHref}>Sitemap</a></sgds-link>
|
|
2737
|
+
<sgds-link size="sm" tone="fixed-light"><a href=${this.sitemapHref}>Sitemap</a></sgds-link>
|
|
2738
2738
|
</li>
|
|
2739
2739
|
<li>
|
|
2740
|
-
<sgds-link size="sm">
|
|
2740
|
+
<sgds-link size="sm" tone="fixed-light">
|
|
2741
2741
|
<a href="https://tech.gov.sg/report_vulnerability" target="_blank" rel="noopener noreferrer">
|
|
2742
2742
|
Report Vulnerability
|
|
2743
2743
|
</a>
|
|
2744
2744
|
</sgds-link>
|
|
2745
2745
|
</li>
|
|
2746
2746
|
<li>
|
|
2747
|
-
<sgds-link size="sm"><a href=${this.privacyHref}>Privacy Statement</a></sgds-link>
|
|
2747
|
+
<sgds-link size="sm" tone="fixed-light"><a href=${this.privacyHref}>Privacy Statement</a></sgds-link>
|
|
2748
2748
|
</li>
|
|
2749
2749
|
<li>
|
|
2750
|
-
<sgds-link size="sm"><a href=${this.termsOfUseHref}>Terms of use</a></sgds-link>
|
|
2750
|
+
<sgds-link size="sm" tone="fixed-light"><a href=${this.termsOfUseHref}>Terms of use</a></sgds-link>
|
|
2751
2751
|
</li>
|
|
2752
2752
|
</ul>
|
|
2753
2753
|
<div class="footer-copyrights">© ${(new Date).getFullYear()}, ${this.copyrightLiner}</div>
|
|
2754
2754
|
</div>
|
|
2755
2755
|
</section>
|
|
2756
2756
|
</footer>
|
|
2757
|
-
`}}vl.styles=[...lt.styles,gl],vl.dependencies={"sgds-link":da},t([Je({type:String})],vl.prototype,"copyrightLiner",void 0),t([Je({type:String})],vl.prototype,"contactHref",void 0),t([Je({type:String})],vl.prototype,"feedbackHref",void 0),t([Je({type:String})],vl.prototype,"faqHref",void 0),t([Je({type:String})],vl.prototype,"sitemapHref",void 0),t([Je({type:String})],vl.prototype,"privacyHref",void 0),t([Je({type:String})],vl.prototype,"termsOfUseHref",void 0),t([Je({type:Boolean})],vl.prototype,"hasDefaultSlot",void 0),t([Je({type:Boolean})],vl.prototype,"hasTitleSlot",void 0),t([Je({type:Boolean})],vl.prototype,"hasDescriptionSlot",void 0),t([Je({type:Boolean})],vl.prototype,"hasItemsSlot",void 0);var ml=Me`.footer-item{margin-bottom:var(--sgds-margin-3-xs)}.footer-item,.links{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot[name=title]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-color-fixed-light);font-weight:var(--sgds-font-weight-regular,--sgds-font-weight-semibold);margin:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}.links{margin:0;padding:0}.links slot::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-fixed-light);
|
|
2757
|
+
`}}vl.styles=[...lt.styles,gl],vl.dependencies={"sgds-link":da},t([Je({type:String})],vl.prototype,"copyrightLiner",void 0),t([Je({type:String})],vl.prototype,"contactHref",void 0),t([Je({type:String})],vl.prototype,"feedbackHref",void 0),t([Je({type:String})],vl.prototype,"faqHref",void 0),t([Je({type:String})],vl.prototype,"sitemapHref",void 0),t([Je({type:String})],vl.prototype,"privacyHref",void 0),t([Je({type:String})],vl.prototype,"termsOfUseHref",void 0),t([Je({type:Boolean})],vl.prototype,"hasDefaultSlot",void 0),t([Je({type:Boolean})],vl.prototype,"hasTitleSlot",void 0),t([Je({type:Boolean})],vl.prototype,"hasDescriptionSlot",void 0),t([Je({type:Boolean})],vl.prototype,"hasItemsSlot",void 0);var ml=Me`.footer-item{margin-bottom:var(--sgds-margin-3-xs)}.footer-item,.links{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot[name=title]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-color-fixed-light);font-weight:var(--sgds-font-weight-regular,--sgds-font-weight-semibold);margin:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}.links{margin:0;padding:0}.links slot::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-fixed-light);width:fit-content}.links slot::slotted(a:focus),.links slot::slotted(a:focus-visible),slot::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-link-color-emphasis,--sgds-color-fixed-light)}.links slot::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;class fl extends lt{_handleSlotChange(e){e.target.assignedElements().forEach((e=>{if("SGDS-LINK"===e.tagName){const t=e;t.tone="fixed-light",t.size="sm"}}))}render(){return ee`
|
|
2758
2758
|
<div class="footer-item">
|
|
2759
2759
|
<slot name="title"></slot>
|
|
2760
2760
|
<div class="links">
|
|
2761
|
-
<slot></slot>
|
|
2761
|
+
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2762
2762
|
</div>
|
|
2763
2763
|
</div>
|
|
2764
2764
|
`}}fl.styles=[...lt.styles,ml];var bl=Me`:host([noPadding]) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent)}:host(:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([orientation=vertical][noPadding]) .card-body{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none)}:host([orientation=vertical][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none)}:host([orientation=horizontal][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl)}:host([orientation=horizontal][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none)}:host([tinted]:not([noPadding])) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}:host([orientation][noPadding]) .card-media{padding:var(--sgds-padding-none)}`;class wl extends _a{constructor(){super(...arguments),this.noPadding=!1}get linkSlotItems(){if(!this.linkNode||0===this.linkNode.length)return null;const e=this.linkNode[0];return e.querySelector("a")||e}get footerSlotItems(){if(!this.footerNode||0===this.footerNode.length)return null;const e=this.footerNode[0];return e.querySelector("a")||e}firstUpdated(e){var t,s;if(super.firstUpdated(e),0===this._iconNode.length&&("vertical"===this.orientation&&0===this._upperNode.length||"horizontal"===this.orientation)){this.shadowRoot.querySelector(".card-media").style.display="none";const e=this.shadowRoot.querySelector(".card-body");this.noPadding&&(e.style.padding="0px")}if(this.stretchedLink){const e=null===(t=this.footerSlotItems)||void 0===t?void 0:t.href,i=null===(s=this.linkSlotItems)||void 0===s?void 0:s.href;e?this.card.setAttribute("href",e):i&&this.card.setAttribute("href",i)}}render(){const e=this.stretchedLink?Bt`a`:Bt`div`,t=!this.stretchedLink||this.disabled?-1:0;return Tt`
|
|
@@ -2845,12 +2845,12 @@ class Sl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2845
2845
|
* @license
|
|
2846
2846
|
* Copyright 2021 Google LLC
|
|
2847
2847
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2848
|
-
*/class $l extends Event{constructor(e){super("context-provider",{bubbles:!0,composed:!0}),this.context=e}}class
|
|
2848
|
+
*/class $l extends Event{constructor(e){super("context-provider",{bubbles:!0,composed:!0}),this.context=e}}class Al extends Ml{constructor(e,t,s){super(void 0!==t.context?t.initialValue:s),this.onContextRequest=e=>{const t=e.composedPath()[0];e.context===this.context&&t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{const t=e.composedPath()[0];if(e.context!==this.context||t===this.host)return;const s=new Set;for(const[e,{consumerHost:t}]of this.subscriptions)s.has(e)||(s.add(e),t.dispatchEvent(new Cl(this.context,e,!0)));e.stopPropagation()},this.host=e,void 0!==t.context?this.context=t.context:this.context=t,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new $l(this.context))}}
|
|
2849
2849
|
/**
|
|
2850
2850
|
* @license
|
|
2851
2851
|
* Copyright 2017 Google LLC
|
|
2852
2852
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2853
|
-
*/function
|
|
2853
|
+
*/function Dl({context:e}){return(t,s)=>{const i=new WeakMap;if("object"==typeof s)return s.addInitializer((function(){i.set(this,new Al(this,{context:e}))})),{get(){return t.get.call(this)},set(e){return i.get(this)?.setValue(e),t.set.call(this,e)},init(e){return i.get(this)?.setValue(e),e}};{t.constructor.addInitializer((t=>{i.set(t,new Al(t,{context:e}))}));const a=Object.getOwnPropertyDescriptor(t,s);let o;if(void 0===a){const e=new WeakMap;o={get(){return e.get(this)},set(t){i.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{const e=a.set;o={...a,set(t){i.get(this).setValue(t),e?.call(this,t)}}}return void Object.defineProperty(t,s,o)}}}
|
|
2854
2854
|
/**
|
|
2855
2855
|
* @license
|
|
2856
2856
|
* Copyright 2022 Google LLC
|
|
@@ -2884,7 +2884,7 @@ class Sl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2884
2884
|
></sgds-icon-button>
|
|
2885
2885
|
</div>
|
|
2886
2886
|
</nav>
|
|
2887
|
-
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}Ll.styles=[...lt.styles,Pl],Ll.dependencies={"sgds-icon-button":lr},t([
|
|
2887
|
+
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}Ll.styles=[...lt.styles,Pl],Ll.dependencies={"sgds-icon-button":lr},t([Dl({context:Il}),et()],Ll.prototype,"_breakpointReached",void 0),t([Dl({context:Bl}),et()],Ll.prototype,"expanded",void 0),t([et()],Ll.prototype,"expanding",void 0),t([it("nav")],Ll.prototype,"nav",void 0),t([it(".navbar")],Ll.prototype,"navbar",void 0),t([it(".navbar-toggler")],Ll.prototype,"header",void 0),t([it(".navbar-body")],Ll.prototype,"body",void 0),t([it(".navbar-nav-scroll")],Ll.prototype,"navScroll",void 0),t([it("slot[name='non-collapsible']")],Ll.prototype,"nonCollapsibleSlot",void 0),t([Je({type:String})],Ll.prototype,"brandHref",void 0),t([Je({type:String})],Ll.prototype,"expand",void 0),t([et()],Ll.prototype,"breakpointReached",void 0),t([ot()],Ll.prototype,"defaultNodes",void 0),t([ot({slot:"end"})],Ll.prototype,"endNodes",void 0),t([At("expanding",{waitUntilFirstUpdate:!0})],Ll.prototype,"handleOpenChange",null),Mt("mainnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Mt("mainnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var Fl=Me`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}.nav-link{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x);text-decoration:none}@media screen and (max-width:767px){.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}.nav-link.show,.nav-link:not(.disabled).active{border-color:var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.dropdown-items{background-color:var(--sgds-surface-default);height:100%;left:100%;padding:var(--sgds-padding-md) 0;position:absolute;top:0;width:100%}.dropdown-items a{align-items:center;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x);text-decoration:none}.dropdown-items a:hover{color:var(--sgds-primary-color-default)}.dropdown-items a:focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:-5px}slot[name=toggler]::slotted(*){flex:1}sgds-dropdown{height:100%}`;const Zl="Enter";class Hl extends lt{constructor(){super(...arguments),this._breakpointReached=!0,this.togglerId=Xi("dropdown","button"),this.active=!1,this.disabled=!1}get defaultSlotItems(){return[...this.defaultNodes||[]].filter((e=>void 0!==e.tagName))}updated(){this._breakpointReached&&(this._copyTextToMenu(),this._resetDropdownMenu(),this._hideDropdownMenuItems())}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach((e=>{var t;e.addEventListener("keydown",this._handleKeyboardMenuItemsEvent.bind(this));const s=e.shadowRoot.querySelector(".dropdown-item");s.classList.add("nav-link");const i=(null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelector("a"))||e.querySelector("a");i.tabIndex=-1,s.classList.contains("disabled")?(i.setAttribute("href","javascript:void(0)"),i.setAttribute("tabindex","-1")):i.addEventListener("click",(e=>{e.target.closest("sgds-mainnav").hide()}))}))}_handleDesktopSlotChange(e){e.target.assignedElements({flatten:!0}).forEach((e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.classList.remove("nav-link");e.shadowRoot.querySelector(".dropdown-item slot").assignedElements({flatten:!0}).forEach((e=>{t.classList.contains("disabled")&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))}))}))}_handleKeyboardMenuItemsEvent(e){if(!this._breakpointReached)return;const t=this.defaultSlotItems.filter((e=>!e.hasAttribute("disabled"))),s=[this.menuHeaderButton,...t],i=s.length;if(0===i)return;const a=s[0],o=s[i-1].shadowRoot.querySelector(".dropdown-item");let n=document.activeElement;if(n===this&&(n=this.shadowRoot.activeElement),"Tab"===e.key)if(e.shiftKey)n===a&&(e.preventDefault(),setTimeout((()=>{o.focus()}),0));else{const t=n.shadowRoot?n.shadowRoot.querySelector(".dropdown-item"):null;t&&t===o&&(e.preventDefault(),a.focus())}}_copyTextToMenu(){this.menuHeaderText.innerHTML=this.togglerNodes[0].innerHTML}_hideDropdownMenuItems(){this.dropdownItems.style.display="none",this.dropdownItems.setAttribute("aria-hidden","true")}_resetDropdownMenu(){const e=this._getNavbarBody();return e?new Promise((t=>{const s=i=>{"transform"===i.propertyName&&(e.removeEventListener("transitionend",s),t())};getComputedStyle(e).transitionProperty.includes("transform")?(e.addEventListener("transitionend",s),e.style.removeProperty("transform")):(e.style.removeProperty("transform"),t())})):Promise.resolve()}_handleKeyboardOpen(e){this.disabled||e.key!==Zl&&" "!==e.key||(e.preventDefault(),this._openMenu())}_getNavbarBody(){const e=document.querySelector("sgds-mainnav");if(!(null==e?void 0:e.shadowRoot))return void console.warn("sgds-mainnav or its shadowRoot not found");const t=e.shadowRoot.querySelector(".navbar-body");if(t)return t;console.warn(".navbar-body not found in sgds-mainnav")}_openMenu(){this._getNavbarBody().style.transform="translateX(-100%)",this.dropdownItems.style.removeProperty("display"),this.dropdownItems.setAttribute("aria-hidden","false"),setTimeout((()=>{this.menuHeaderButton.focus()}),50)}_handleHeaderKeyboardEvent(e){switch(e.key){case"Tab":this._handleKeyboardMenuItemsEvent(e);break;case Zl:case" ":e.preventDefault(),this._closeMenu()}}async _closeMenu(){await this._resetDropdownMenu(),this._hideDropdownMenuItems(),this.navLink.focus()}render(){const e=ee`
|
|
2888
2888
|
<a
|
|
2889
2889
|
class="${bt({"nav-link":!0,active:this.active,disabled:this.disabled})}"
|
|
2890
2890
|
aria-disabled=${this.disabled?"true":"false"}
|
|
@@ -2919,7 +2919,7 @@ class Sl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2919
2919
|
<sgds-icon name="chevron-down"></sgds-icon>
|
|
2920
2920
|
</a>
|
|
2921
2921
|
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
|
|
2922
|
-
</sgds-dropdown>`;return this._breakpointReached?e:t}}Hl.styles=[...lt.styles,ta,ea,Fl],Hl.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":Nt},t([Vl({context:Il,subscribe:!0}),et()],Hl.prototype,"_breakpointReached",void 0),t([Vl({context:Bl,subscribe:!0}),et()],Hl.prototype,"expanded",void 0),t([it(".nav-link")],Hl.prototype,"navLink",void 0),t([it(".dropdown-items")],Hl.prototype,"dropdownItems",void 0),t([it(".dropdown-items a")],Hl.prototype,"menuHeaderButton",void 0),t([it(".dropdown-items span")],Hl.prototype,"menuHeaderText",void 0),t([Je({type:Boolean})],Hl.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Hl.prototype,"disabled",void 0),t([ot({slot:"toggler"})],Hl.prototype,"togglerNodes",void 0),t([ot()],Hl.prototype,"defaultNodes",void 0);var zl=Me`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:flex;height:auto!important;min-height:100%;padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x);text-decoration:none!important;text-decoration:none}@media screen and (max-width:767px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default));outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Rl extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter((e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase()));if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}}))}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",(e=>{e.target.closest("sgds-mainnav").hide()}))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}Rl.styles=[...lt.styles,zl],t([Je({type:Boolean,reflect:!0})],Rl.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Rl.prototype,"disabled",void 0),t([Dt("disabled")],Rl.prototype,"_handleDisabled",null);var Ol=Me`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:var(--sgds-icon-size-sm)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-sm)!important}a:hover{color:#0022b9}.sgds-masthead{font-family:Inter,system-ui,sans-serif;font-size:.75rem;line-height:1rem}.banner{background-color:light-dark(#f3f3f3,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-padding-x,2rem);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .25rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0269d0,#60aaf4);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0151a0,#96c7f7)}.panel{background-color:light-dark(oklch(from #0e0e0e l c h/.1),oklch(from #fff l c h/.1))}.sgds-masthead .sgds-masthead-content{display:none;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content.show{display:block}.content-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#525252,#a5a5a5)}.banner-icon,.banner-icon-inline{height:16px;width:16px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#1a1a1a,#f3f3f3)}a.trusted-websites-link{color:light-dark(#0269d0,#60aaf4);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0151a0,#96c7f7)}.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus-visible{outline:4px solid #60aaf4}@media screen and (max-width:767px){.container{padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem)}.sgds-masthead-content .content-grid{gap:1rem;grid-template-columns:1fr}}`,Nl=Me`svg{vertical-align:middle}`;class Ul extends lt{constructor(){super(...arguments),this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
2922
|
+
</sgds-dropdown>`;return this._breakpointReached?e:t}}Hl.styles=[...lt.styles,ta,ea,Fl],Hl.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":Ot},t([Vl({context:Il,subscribe:!0}),et()],Hl.prototype,"_breakpointReached",void 0),t([Vl({context:Bl,subscribe:!0}),et()],Hl.prototype,"expanded",void 0),t([it(".nav-link")],Hl.prototype,"navLink",void 0),t([it(".dropdown-items")],Hl.prototype,"dropdownItems",void 0),t([it(".dropdown-items a")],Hl.prototype,"menuHeaderButton",void 0),t([it(".dropdown-items span")],Hl.prototype,"menuHeaderText",void 0),t([Je({type:Boolean})],Hl.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Hl.prototype,"disabled",void 0),t([ot({slot:"toggler"})],Hl.prototype,"togglerNodes",void 0),t([ot()],Hl.prototype,"defaultNodes",void 0);var zl=Me`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:flex;height:auto!important;min-height:100%;padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x);text-decoration:none!important;text-decoration:none}@media screen and (max-width:767px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default));outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Rl extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter((e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase()));if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}}))}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",(e=>{e.target.closest("sgds-mainnav").hide()}))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}Rl.styles=[...lt.styles,zl],t([Je({type:Boolean,reflect:!0})],Rl.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Rl.prototype,"disabled",void 0),t([At("disabled")],Rl.prototype,"_handleDisabled",null);var Ol=Me`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:var(--sgds-icon-size-sm)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-sm)!important}a:hover{color:#0022b9}.sgds-masthead{font-family:Inter,system-ui,sans-serif;font-size:.75rem;line-height:1rem}.banner{background-color:light-dark(#f3f3f3,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-padding-x,2rem);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .25rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0269d0,#60aaf4);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0151a0,#96c7f7)}.panel{background-color:light-dark(oklch(from #0e0e0e l c h/.1),oklch(from #fff l c h/.1))}.sgds-masthead .sgds-masthead-content{display:none;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content.show{display:block}.content-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#525252,#a5a5a5)}.banner-icon,.banner-icon-inline{height:16px;width:16px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#1a1a1a,#f3f3f3)}a.trusted-websites-link{color:light-dark(#0269d0,#60aaf4);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0151a0,#96c7f7)}.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus-visible{outline:4px solid #60aaf4}@media screen and (max-width:767px){.container{padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem)}.sgds-masthead-content .content-grid{gap:1rem;grid-template-columns:1fr}}`,Nl=Me`svg{vertical-align:middle}`;class Ul extends lt{constructor(){super(...arguments),this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
2923
2923
|
<div
|
|
2924
2924
|
id="sgds-masthead"
|
|
2925
2925
|
class="sgds-masthead"
|
|
@@ -3120,7 +3120,7 @@ class Sl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3120
3120
|
<sgds-close-button
|
|
3121
3121
|
class="modal-header__close"
|
|
3122
3122
|
@click="${()=>this.requestClose("close-button")}"
|
|
3123
|
-
|
|
3123
|
+
aria-label="close modal"
|
|
3124
3124
|
></sgds-close-button>
|
|
3125
3125
|
<div class="modal-header">
|
|
3126
3126
|
<div class="modal-header__title-description">
|
|
@@ -3137,7 +3137,7 @@ class Sl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3137
3137
|
</div>
|
|
3138
3138
|
</div>
|
|
3139
3139
|
</div>
|
|
3140
|
-
`}}Kl.styles=[...lt.styles,xa,Nl,Wl],Kl.dependencies={"sgds-close-button":
|
|
3140
|
+
`}}Kl.styles=[...lt.styles,xa,Nl,Wl],Kl.dependencies={"sgds-close-button":Ht},t([it(".modal")],Kl.prototype,"dialog",void 0),t([it(".modal-panel")],Kl.prototype,"panel",void 0),t([it(".modal-overlay")],Kl.prototype,"overlay",void 0),t([it(".modal-title")],Kl.prototype,"heading",void 0),t([Je({type:Boolean,reflect:!0})],Kl.prototype,"open",void 0),t([Je({type:Boolean,reflect:!0})],Kl.prototype,"noAnimation",void 0),t([Je({reflect:!0})],Kl.prototype,"size",void 0),t([Je({type:Boolean})],Kl.prototype,"hasFooterSlot",void 0),t([At("open",{waitUntilFirstUpdate:!0})],Kl.prototype,"handleOpenChange",null),Mt("modal.show",{keyframes:[{opacity:0,transform:"scale(1) translate(0, -100%)"},{opacity:1,transform:"scale(1) translate(0, 0%)"}],options:{duration:400,easing:"ease"}}),Mt("modal.hide",{keyframes:[{opacity:1,transform:"scale(1) translate(0, 0)"},{opacity:0,transform:"scale(1) translate(0, -100%)"}],options:{duration:400,easing:"ease"}}),Mt("modal.denyClose",{keyframes:[{transform:"scale(1)"},{transform:"scale(1.02)"},{transform:"scale(1)"}],options:{duration:400}}),Mt("modal.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:400}}),Mt("modal.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:400}});var Gl=Me`ul{margin-bottom:1rem;margin-top:0;padding-left:2rem}svg{vertical-align:middle}.pagination{display:inline-flex;gap:var(--sgds-gap-2-xs);list-style:none;padding-left:0}.page-link{align-items:center;background-color:var(--sgds-bg-transparent);border:1px solid var(--sgds-border-color-default);border-radius:var(--sgds-border-radius-md);display:flex;height:var(--sgds-dimension-48);justify-content:center;width:var(--sgds-dimension-48)}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:focus,.page-link:not(.ellipsis):hover{background-color:var(--sgds-primary-bg-translucent);color:var(--sgds-primary-color-default)}.page-link:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.page-item>.page-link:not(.ellipsis){cursor:pointer}.page-item.active .page-link{background-color:var(--sgds-primary-bg-default);border-color:var(--sgds-info);color:var(--sgds-color-fixed-light)}.ellipsis-disabled,.page-item.disabled .page-link{opacity:var(--sgds-opacity-50)}.ellipsis-disabled{cursor:not-allowed;pointer-events:none}.pagination-sm .page-link{font-size:var(--sgds-font-size-1);height:var(--sgds-dimension-40);width:var(--sgds-dimension-40)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pagination-description{align-items:center;display:flex}.pagination-sm .pagination-description{font-size:var(--sgds-font-size-1)}`;class Xl extends lt{constructor(){super(...arguments),this.dataLength=0,this.currentPage=1,this.itemsPerPage=5,this.variant="default",this.navigation="icon-button",this.size="md",this._limit=4,this.ellipsisContent=ee`
|
|
3141
3141
|
<span aria-hidden="true">…</span>
|
|
3142
3142
|
<span class="sr-only" role="text">Ellipsis</span>
|
|
3143
3143
|
`,this._renderFirstEllipsis=()=>this.pages.length<=7||!(this.pages.length!==this._limit&&this.currentPage>4)?null:ee`
|
|
@@ -3230,7 +3230,7 @@ class Sl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3230
3230
|
${"button"===this.variant?this._renderButtonPagination():ie}
|
|
3231
3231
|
</ul>
|
|
3232
3232
|
</nav>
|
|
3233
|
-
`}}Xl.styles=[...lt.styles,Gl],Xl.dependencies={"sgds-icon-button":lr,"sgds-button":ma,"sgds-icon":
|
|
3233
|
+
`}}Xl.styles=[...lt.styles,Gl],Xl.dependencies={"sgds-icon-button":lr,"sgds-button":ma,"sgds-icon":Ot},t([Je({type:Number})],Xl.prototype,"dataLength",void 0),t([Je({type:Number})],Xl.prototype,"currentPage",void 0),t([Je({type:Number})],Xl.prototype,"itemsPerPage",void 0),t([Je({type:String})],Xl.prototype,"variant",void 0),t([Je({type:String})],Xl.prototype,"navigation",void 0),t([Je({type:String})],Xl.prototype,"size",void 0),t([et()],Xl.prototype,"_limit",void 0),t([At("currentPage",{waitUntilFirstUpdate:!1})],Xl.prototype,"_handleValueChange",null);
|
|
3234
3234
|
/**
|
|
3235
3235
|
* @license
|
|
3236
3236
|
* Copyright 2018 Google LLC
|
|
@@ -3285,10 +3285,10 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3285
3285
|
<sgds-input
|
|
3286
3286
|
type="number"
|
|
3287
3287
|
class="quantity-toggle"
|
|
3288
|
-
name=${
|
|
3289
|
-
step=${
|
|
3290
|
-
min=${
|
|
3291
|
-
max=${
|
|
3288
|
+
name=${qt(this.name)}
|
|
3289
|
+
step=${qt(this.step)}
|
|
3290
|
+
min=${qt(this.min)}
|
|
3291
|
+
max=${qt(this.max)}
|
|
3292
3292
|
.value=${Ma(this.value)}
|
|
3293
3293
|
@sgds-change=${this._handleChange}
|
|
3294
3294
|
@sgds-input=${this._handleInputChange}
|
|
@@ -3298,7 +3298,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3298
3298
|
?disabled=${this.disabled}
|
|
3299
3299
|
id=${this._controlId}
|
|
3300
3300
|
?invalid=${this.invalid}
|
|
3301
|
-
hasFeedback=${
|
|
3301
|
+
hasFeedback=${qt("text"!==this.hasFeedback?"style":void 0)}
|
|
3302
3302
|
></sgds-input>
|
|
3303
3303
|
<sgds-icon-button
|
|
3304
3304
|
variant="ghost"
|
|
@@ -3317,19 +3317,19 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3317
3317
|
<input
|
|
3318
3318
|
class=${bt({"form-check-input":!0,"is-invalid":this.invalid})}
|
|
3319
3319
|
type="radio"
|
|
3320
|
-
id=${
|
|
3321
|
-
value=${
|
|
3320
|
+
id=${qt(this.radioId)}
|
|
3321
|
+
value=${qt(this.value)}
|
|
3322
3322
|
?checked=${this.checked}
|
|
3323
3323
|
?disabled=${this.disabled}
|
|
3324
3324
|
aria-disabled=${this.disabled?"true":"false"}
|
|
3325
3325
|
aria-checked=${this.checked?"true":"false"}
|
|
3326
3326
|
@click=${this.handleClick}
|
|
3327
3327
|
/>
|
|
3328
|
-
<label for="${
|
|
3328
|
+
<label for="${qt(this.radioId)}" aria-label=${qt(this.ariaLabel)} class="form-check-label">
|
|
3329
3329
|
<slot></slot>
|
|
3330
3330
|
</label>
|
|
3331
3331
|
</div>
|
|
3332
|
-
`}}nd.styles=[...lt.styles,La,
|
|
3332
|
+
`}}nd.styles=[...lt.styles,La,Da,od],t([Je({type:Boolean,reflect:!0})],nd.prototype,"checked",void 0),t([Je()],nd.prototype,"value",void 0),t([Je({type:Boolean,reflect:!0})],nd.prototype,"disabled",void 0),t([Je({type:Boolean,reflect:!0})],nd.prototype,"invalid",void 0),t([it("input")],nd.prototype,"input",void 0),t([At("checked")],nd.prototype,"handleCheckedChange",null),t([At("disabled",{waitUntilFirstUpdate:!0})],nd.prototype,"handleDisabledChange",null);var rd=Me`fieldset{border:0;gap:var(--sgds-form-gap-md);margin:0;min-width:0;padding:0}.label-hint-container,fieldset{display:flex;flex-direction:column}.label-hint-container{gap:var(--sgds-form-gap-sm)}.radio-group-validation-input{display:none}.radio-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}:host([disabled]) .label-hint-container{cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class ld extends(Pa(Ea)){constructor(){super(...arguments),this.defaultValue="",this.value="",this.invalidFeedback="",this.hasFeedback=!1,this.required=!1,this._isTouched=!1}_handleValueChange(){this.emit("sgds-change",{detail:{value:this.value}}),this._updateCheckedRadio()}_handleInvalidChange(){this._radios.forEach((e=>e.invalid=this.invalid))}_mixinResetFormControl(){this.value=this.input.value=this.defaultValue,this._updateInputValue("reset"),this._mixinResetValidity(this.input)}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.addEventListener("sgds-blur",(()=>{this._isTouched=!0}))}firstUpdated(e){super.firstUpdated(e);const t=this._radios;t.forEach(((e,s)=>{if(t.length>1)switch(s){case 0:e.setAttribute("first-of-type","");break;case t.length-1:e.setAttribute("last-of-type","");break;default:e.setAttribute("nth-of-type","")}})),this.value&&this._updateInputValue("change")}_handleRadioClick(e){e.preventDefault();const t=e.target;if(t.disabled)return;this.value=t.value,this._updateInputValue();this._radios.forEach((e=>e.checked=e===t))}_updateInputValue(e="change"){this.input.value=this.value,this.input.dispatchEvent(new InputEvent(e))}_handleKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const s=this._radios.filter((e=>!e.disabled)),i=null!==(t=s.find((e=>e.checked)))&&void 0!==t?t:s[0],a=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let o=s.indexOf(i)+a;o<0&&(o=s.length-1),o>s.length-1&&(o=0),this._radios.forEach((e=>{e.checked=!1,e.tabIndex=-1})),this.value=s[o].value,this._updateInputValue(),s[o].checked=!0,s[o].tabIndex=0,e.preventDefault()}_handleSlotChange(){const e=this._radios;e.forEach((e=>e.checked=e.value===this.value)),this._disabledChildRadios(),e.some((e=>e.checked))||e[0]&&(e[0].tabIndex=0)}_updateCheckedRadio(){this._radios.forEach((e=>e.checked=e.value===this.value))}_renderHintText(){const e=ee` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_handleDisabledChange(){this.setInvalid(!1),this._disabledChildRadios()}_disabledChildRadios(){if(this.disabled){this._radios.forEach((e=>e.disabled=this.disabled))}}render(){const e=ee`
|
|
3333
3333
|
<slot
|
|
3334
3334
|
class="radio-container"
|
|
3335
3335
|
@click=${this._handleRadioClick}
|
|
@@ -3373,10 +3373,10 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3373
3373
|
</div>
|
|
3374
3374
|
`:ie}
|
|
3375
3375
|
</fieldset>
|
|
3376
|
-
`}}ld.styles=[...Ea.styles,rd],t([it("slot:not([name])")],ld.prototype,"defaultSlot",void 0),t([et()],ld.prototype,"defaultValue",void 0),t([Je({reflect:!0})],ld.prototype,"value",void 0),t([Je({type:String,reflect:!0})],ld.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],ld.prototype,"hasFeedback",void 0),t([Je({type:Boolean,reflect:!0})],ld.prototype,"required",void 0),t([
|
|
3376
|
+
`}}ld.styles=[...Ea.styles,rd],t([it("slot:not([name])")],ld.prototype,"defaultSlot",void 0),t([et()],ld.prototype,"defaultValue",void 0),t([Je({reflect:!0})],ld.prototype,"value",void 0),t([Je({type:String,reflect:!0})],ld.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],ld.prototype,"hasFeedback",void 0),t([Je({type:Boolean,reflect:!0})],ld.prototype,"required",void 0),t([At("value",{waitUntilFirstUpdate:!0})],ld.prototype,"_handleValueChange",null),t([At("invalid",{waitUntilFirstUpdate:!0})],ld.prototype,"_handleInvalidChange",null),t([et()],ld.prototype,"_isTouched",void 0),t([ot()],ld.prototype,"_radios",void 0),t([At("_isTouched",{waitUntilFirstUpdate:!0})],ld.prototype,"_handleIsTouched",null),t([At("disabled",{waitUntilFirstUpdate:!0})],ld.prototype,"_handleDisabledChange",null);var dd=Me`:host{display:block;position:relative}.dropdown{display:flex;height:100%}.dropdown-menu{box-sizing:border-box;max-height:10rem;overflow-x:hidden;overflow-y:auto}.empty-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px);pointer-events:none}`;class cd extends Ua{constructor(){super(...arguments),this._renderItemContent=()=>ee`<div class="normal-item-content">
|
|
3377
3377
|
<slot></slot>
|
|
3378
3378
|
${this.active?ee` <sgds-icon name="check"></sgds-icon> `:ie}
|
|
3379
|
-
</div>`}}cd.dependencies={"sgds-icon":
|
|
3379
|
+
</div>`}}cd.dependencies={"sgds-icon":Ot};class hd extends Ra{constructor(){super(...arguments),this._blockInputKeydown=e=>{"Tab"!==e.key&&e.preventDefault()}}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",(async()=>{(await this._input).focus()}))}async firstUpdated(e){super.firstUpdated(e),this._updateDisplayValue(),this.input=await this._input,this._mixinValidate(this.input),this.menuIsOpen&&!this.readonly&&this.showMenu()}async _handleSlotChange(e){const t=e.target.assignedElements({flatten:!0});t.forEach((e=>e.addEventListener("click",(e=>{e.target.disabled||this._handleItemSelected(e)})))),t.forEach((e=>e.addEventListener("keydown",(e=>{"Enter"===e.key&&this._handleItemSelected(e)})))),this.menuList=await this._getMenuListFromOptions(t),this._updateDisplayValue(),this.input=await this._input,this._mixinValidate(this.input)}_updateDisplayValue(){if(this.value&&this.menuList.length>0){const e=this.menuList.filter((({value:e})=>e===this.value));this.displayValue=e[0].label,this._setActiveToOption()}}_setActiveToOption(){const e=this.menuList.findIndex((e=>e.value.toString()===this.value));this.options.forEach(((t,s)=>{t.active=s===e}))}async _handleValueChange(){this._setActiveToOption(),this.emit("sgds-change"),this.value&&this.emit("sgds-select");const e=await this._input;this._mixinSetFormValue(),this._mixinValidate(e),this._updateDisplayValue(),(this._isTouched||""!==this.value)&&(this.invalid=!this._mixinReportValidity())}async _handleItemSelected(e){var t,s,i;const a=e.target,o=null!==(s=null===(t=a.textContent)||void 0===t?void 0:t.trim())&&void 0!==s?s:"",n={label:o,value:null!==(i=a.getAttribute("value"))&&void 0!==i?i:o};this.value=n.value.toString(),this.displayValue=n.label,this.hideMenu()}_handleFocus(){this.emit("sgds-focus")}async _handleInputBlur(e){e.preventDefault(),this.emit("sgds-blur")}async _mixinResetFormControl(){this.value=this.defaultValue;const e=this.menuList.filter((({value:e})=>e===this.value));e.length<=0?this.displayValue="":this.displayValue=e[0].label,this._mixinResetValidity(await this._input)}_renderEmptyMenu(){return ee` <div class="empty-menu">No options</div> `}_renderMenu(){const e=this.menuList.map((e=>{const t=e.value===this.value;return ee`
|
|
3380
3380
|
<sgds-select-option
|
|
3381
3381
|
?active=${t}
|
|
3382
3382
|
value=${e.value}
|
|
@@ -3396,8 +3396,8 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3396
3396
|
class="form-control"
|
|
3397
3397
|
type="text"
|
|
3398
3398
|
id=${this._controlId}
|
|
3399
|
-
name=${
|
|
3400
|
-
placeholder=${
|
|
3399
|
+
name=${qt(this.name)}
|
|
3400
|
+
placeholder=${qt(this.placeholder)}
|
|
3401
3401
|
aria-invalid=${this.invalid?"true":"false"}
|
|
3402
3402
|
?autofocus=${this.autofocus}
|
|
3403
3403
|
?disabled=${this.disabled}
|
|
@@ -3406,7 +3406,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3406
3406
|
.value=${this.displayValue}
|
|
3407
3407
|
@blur=${this._handleInputBlur}
|
|
3408
3408
|
@focus=${this._handleFocus}
|
|
3409
|
-
aria-describedby=${
|
|
3409
|
+
aria-describedby=${qt(this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:void 0)}
|
|
3410
3410
|
aria-labelledby="${this._labelId} ${this._controlId}Help ${this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:""}"
|
|
3411
3411
|
@keydown=${this._blockInputKeydown}
|
|
3412
3412
|
/>
|
|
@@ -3423,7 +3423,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3423
3423
|
<slot id="default" @slotchange=${this._handleSlotChange}>${this._renderMenu()}</slot>
|
|
3424
3424
|
</ul>
|
|
3425
3425
|
</div>
|
|
3426
|
-
`}}hd.styles=[...Ra.styles,za,dd],hd.dependencies={"sgds-icon":
|
|
3426
|
+
`}}hd.styles=[...Ra.styles,za,dd],hd.dependencies={"sgds-icon":Ot,"sgds-select-option":cd},t([ot({flatten:!0,selector:"sgds-select-option"})],hd.prototype,"options",void 0),t([At("value",{waitUntilFirstUpdate:!0})],hd.prototype,"_handleValueChange",null);var ud=Me`:host{--sidenav-sticky-top:0rem;padding:var(--sgds-padding-md)}.sticky{height:calc(100vh - var(--sidenav-sticky-top));overflow-y:visible;position:sticky;top:var(--sidenav-sticky-top)}`;class pd extends lt{constructor(){super(...arguments),this.sticky=!1}get items(){return[...this.defaultNodes||[]].filter((e=>void 0!==e.tagName))}async onToggle(e){const t="SGDS-SIDENAV-LINK"===e.target.tagName;if(e.defaultPrevented||t)return;this.items}render(){return ee`
|
|
3427
3427
|
<nav class=${bt({sticky:this.sticky})}>
|
|
3428
3428
|
<div>
|
|
3429
3429
|
<slot @click=${this.onToggle}></slot>
|
|
@@ -3454,7 +3454,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3454
3454
|
</div>
|
|
3455
3455
|
`,t=ee` <slot @slotchange=${this._handleSlotChange} class="no-menu-default"></slot> `;return ee`
|
|
3456
3456
|
<div class="sidenav-item" aria-haspopup="${!this.isLink}">${this.isLink?t:e}</div>
|
|
3457
|
-
`}}vd.styles=[...lt.styles,gd],vd.dependencies={"sgds-icon":
|
|
3457
|
+
`}}vd.styles=[...lt.styles,gd],vd.dependencies={"sgds-icon":Ot},t([it(".sidenav-body")],vd.prototype,"body",void 0),t([it(".sidenav-btn")],vd.prototype,"header",void 0),t([Je({type:Boolean,reflect:!0})],vd.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],vd.prototype,"disabled",void 0),t([et()],vd.prototype,"isLink",void 0),t([At("active",{waitUntilFirstUpdate:!0})],vd.prototype,"_handleOpenChange",null),t([ot()],vd.prototype,"_items",void 0),Mt("sidenav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Mt("sidenav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var md=Me`:host([class^=third-level]) ::slotted(a){padding-left:calc(var(--sgds-padding-xl) + var(--sgds-padding-3-xl))}::slotted(a){--sgds-link-color-default:var(--sgds-color-default);border-radius:var(--sgds-border-radius-md);color:var(--sgds-color-default,var(--sgds-link-color-default));display:block;padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-3-xl);text-decoration:none!important}:host([active]) ::slotted(a){--sgds-link-color-default:var(--sgds-primary-color-emphasis);background-color:var(--sgds-primary-surface-translucent);color:var(--sgds-primary-color-emphasis,var(--sgds-link-color-default))}:host(:not([disabled]):not([active])) ::slotted(a:hover){background-color:var(--sgds-bg-translucent-subtle)}::slotted(a:focus),::slotted(a:focus-visible),::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default,var(--sgds-link-color-emphasis))}:host([active]) ::slotted(a:focus),:host([active]) ::slotted(a:focus-visible),:host([active]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-emphasis);color:var(--sgds-primary-color-emphasis,var(--sgds-link-color-emphasis))}:host([disabled]) ::slotted(a){opacity:var(--sgds-opacity-50);pointer-events:none}:host([disabled]) ::slotted(a:focus),:host([disabled]) ::slotted(a:focus-visible){outline:0}::slotted(a:focus),::slotted(a:focus-visible){background-color:var(--sgds-bg-translucent-subtle)}::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([active]) ::slotted(a:focus),:host([active]) ::slotted(a:focus-visible){background-color:var(--sgds-primary-bg-translucent)}`;class fd extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-disabled",`${this.disabled}`)}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`),this._anchor[0].setAttribute("aria-disabled",`${this.disabled}`),this.disabled||this._anchor[0].removeAttribute("tabindex")}_handleSlotChange(){this._anchor[0].setAttribute("aria-disabled",`${this.disabled}`),this.disabled&&(this._anchor[0].setAttribute("tabindex","-1"),this._anchor[0].removeAttribute("href"),this._anchor[0].setAttribute("role","link"))}render(){return ee` <slot @slotchange=${this._handleSlotChange}></slot> `}}fd.styles=[...lt.styles,md],t([Je({type:Boolean,reflect:!0})],fd.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],fd.prototype,"disabled",void 0),t([ot({flatten:!0})],fd.prototype,"_anchor",void 0),t([At("disabled",{waitUntilFirstUpdate:!0})],fd.prototype,"_handleDisabled",null);var bd=Me`.skeleton{--bg:var(--sgds-bg-translucent-subtle);background-color:var(--bg);border-radius:var(--sgds-border-radius-sm);display:flex;flex-direction:column;gap:var(--sgds-gap-xs);max-width:100%}.skeleton.skeleton-paragraph{background-color:transparent}.skeleton.skeleton-paragraph.auto-size-rows>div[class*=skeleton-row]{background-color:var(--sgds-bg-translucent);border-radius:var(--sgds-border-radius-sm);height:-webkit-fill-available}.sheen{--sheen-color:var(--sgds-bg-translucent);animation:sheen 8s ease-in-out infinite;background:linear-gradient(270deg,var(--bg) 0,var(--sheen-color) 33.33%,var(--sheen-color) 66.67%,var(--bg) 100%);background-size:400% 100%}@keyframes sheen{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.sheen{animation:none}}`;class wd extends lt{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="",this.sheen=!1}render(){const e={width:this.width||void 0,height:this.height||void 0,borderRadius:this.borderRadius||void 0};return ee`
|
|
3458
3458
|
<div
|
|
3459
3459
|
class=${bt({skeleton:!0,"skeleton-paragraph":this.rows>0,"auto-size-rows":this.rows>0,sheen:this.sheen&&!this.rows})}
|
|
3460
3460
|
style=${Object.entries(e).filter((([e,t])=>t)).map((([e,t])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${t}`)).join("; ")}
|
|
@@ -3486,7 +3486,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3486
3486
|
</div>
|
|
3487
3487
|
`))}
|
|
3488
3488
|
</div>
|
|
3489
|
-
`}}xd.styles=[...lt.styles,yd],xd.dependencies={"sgds-icon":Nt},t([Je({type:Array})],xd.prototype,"steps",void 0),t([Je({type:Number,reflect:!0})],xd.prototype,"activeStep",void 0),t([Je({type:String,reflect:!0})],xd.prototype,"orientation",void 0),t([Je({type:Boolean,reflect:!0})],xd.prototype,"clickable",void 0),t([Ia("activeStep")],xd.prototype,"defaultActiveStep",void 0),t([Dt("activeStep",{waitUntilFirstUpdate:!0})],xd.prototype,"_handleActiveStepChange",null);var kd=Me`:host{display:block;position:sticky;top:0;z-index:950}nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);width:100%}.subnav{flex-direction:column;flex-wrap:nowrap}.header-container,.subnav{align-items:flex-start;display:flex}.header-container{gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);width:100%}slot[name=header]::slotted(*){--sgds-margin-3-xs:var(--sgds-margin-none);flex:1 1 auto;margin-bottom:var(--sgds-margin-3-xs,--sgds-margin-none);padding-top:var(--sgds-padding-none)}.subnav-toggler{cursor:pointer;transition:transform .2s ease-in-out}.subnav-toggler:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.subnav:not(.collapsed) .subnav-toggler{transform:rotate(-180deg)}.subnav-nav-group{display:flex;flex:1 1 0}.subnav-nav,.subnav-nav-group{align-items:flex-start;flex-direction:column;width:100%}.subnav-nav{display:none;overflow-y:auto;transition:transform .2s ease-in-out}.subnav-nav ::slotted(*){width:100%}.subnav-actions{bottom:0;display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);position:sticky;width:100%}slot[name=actions]::slotted(*){width:100%}@media screen and (max-width:1023px){.subnav.sgds-container{max-width:inherit}}@media screen and (min-width:512px){.subnav-actions{flex-direction:row}}@media screen and (min-width:768px){nav{border-bottom:var(--sgds-border-width-0)}.subnav{flex-direction:row}.subnav.collapsed{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.header-container{padding:var(--sgds-padding-lg) var(--sgds-padding-2-xl)}.subnav-nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:0;position:absolute;top:100%}.subnav-actions{align-items:center;flex-direction:row;padding:var(--sgds-padding-sm) var(--sgds-padding-2-xl) var(--sgds-padding-sm) var(--sgds-padding-none);position:inherit}}@media screen and (min-width:1024px){nav{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:inherit}.subnav{flex-wrap:wrap;gap:var(--sgds-gap-xl);row-gap:var(--sgds-gap-none)}.subnav.collapsed{border-bottom:var(--sgds-border-width-0)}.header-container{flex:1;padding:var(--sgds-padding-none);width:auto}slot[name=header]::slotted(*){padding-top:var(--sgds-padding-lg);white-space:nowrap}.subnav-nav-group{align-items:center;flex:inherit;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-xl);justify-content:space-between;row-gap:var(--sgds-gap-none);width:auto}.subnav-nav{align-items:center;background-color:inherit;border-bottom:var(--sgds-border-width-0);display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-lg);overflow-y:inherit;position:inherit;row-gap:0;transition:none;width:auto}.subnav-nav ::slotted(*){width:inherit}.subnav-toggler{display:none}.subnav-actions{padding:var(--sgds-padding-sm) var(--sgds-padding-none);width:auto}slot[name=actions]::slotted(*){width:inherit}}`,_d=Me`.sgds-container{margin-left:auto;margin-right:auto;max-width:calc(100% - 40px);width:100%}.sgds-grid{display:grid;gap:var(--sgds-gap-md);grid-template-columns:repeat(4,1fr)}.sgds-col-1{grid-column:span 1}.sgds-col-2{grid-column:span 2}.sgds-col-3{grid-column:span 3}.sgds-col-4{grid-column:span 4}.sgds-col-center-2{grid-column:2/span 2}.sgds-col-none{display:none}@media (min-width:512px){.sgds-grid{grid-template-columns:repeat(8,1fr)}.sgds-container{max-width:calc(100% - 48px)}.sgds-col-sm-1{grid-column:span 1}.sgds-col-sm-2{grid-column:span 2}.sgds-col-sm-3{grid-column:span 3}.sgds-col-sm-4{grid-column:span 4}.sgds-col-sm-5{grid-column:span 5}.sgds-col-sm-6{grid-column:span 6}.sgds-col-sm-7{grid-column:span 7}.sgds-col-sm-8{grid-column:span 8}.sgds-col-sm-center-2{grid-column:4/span 2}.sgds-col-sm-center-4{grid-column:3/span 4}.sgds-col-sm-center-6{grid-column:2/span 6}.sgds-col-none{display:revert}.sgds-col-sm-none{display:none}}@media (min-width:768px){.sgds-container{max-width:calc(100% - 56px)}.sgds-grid{gap:var(--sgds-gap-xl)}.sgds-col-md-1{grid-column:span 1}.sgds-col-md-2{grid-column:span 2}.sgds-col-md-3{grid-column:span 3}.sgds-col-md-4{grid-column:span 4}.sgds-col-md-5{grid-column:span 5}.sgds-col-md-6{grid-column:span 6}.sgds-col-md-7{grid-column:span 7}.sgds-col-md-8{grid-column:span 8}.sgds-col-md-center-2{grid-column:4/span 2}.sgds-col-md-center-4{grid-column:3/span 4}.sgds-col-md-center-6{grid-column:2/span 6}.sgds-col-sm-none{display:revert}.sgds-col-md-none{display:none}}@media (min-width:1024px){.sgds-grid{grid-template-columns:repeat(12,1fr)}.sgds-container{max-width:var(--sgds-dimension-888)}.sgds-col-lg-1{grid-column:span 1}.sgds-col-lg-2{grid-column:span 2}.sgds-col-lg-3{grid-column:span 3}.sgds-col-lg-4{grid-column:span 4}.sgds-col-lg-5{grid-column:span 5}.sgds-col-lg-6{grid-column:span 6}.sgds-col-lg-7{grid-column:span 7}.sgds-col-lg-8{grid-column:span 8}.sgds-col-lg-9{grid-column:span 9}.sgds-col-lg-10{grid-column:span 10}.sgds-col-lg-11{grid-column:span 11}.sgds-col-lg-12{grid-column:span 12}.sgds-col-lg-center-2{grid-column:6/span 2}.sgds-col-lg-center-4{grid-column:5/span 4}.sgds-col-lg-center-6{grid-column:4/span 6}.sgds-col-lg-center-8{grid-column:3/span 8}.sgds-col-lg-center-10{grid-column:2/span 10}.sgds-col-md-none{display:revert}.sgds-col-lg-none{display:none}}@media (min-width:1280px){.sgds-grid{gap:var(--sgds-gap-2-xl)}.sgds-container{max-width:var(--sgds-dimension-1168)}.sgds-col-xl-1{grid-column:span 1}.sgds-col-xl-2{grid-column:span 2}.sgds-col-xl-3{grid-column:span 3}.sgds-col-xl-4{grid-column:span 4}.sgds-col-xl-5{grid-column:span 5}.sgds-col-xl-6{grid-column:span 6}.sgds-col-xl-7{grid-column:span 7}.sgds-col-xl-8{grid-column:span 8}.sgds-col-xl-9{grid-column:span 9}.sgds-col-xl-10{grid-column:span 10}.sgds-col-xl-11{grid-column:span 11}.sgds-col-xl-12{grid-column:span 12}.sgds-col-xl-center-2{grid-column:6/span 2}.sgds-col-xl-center-4{grid-column:5/span 4}.sgds-col-xl-center-6{grid-column:4/span 6}.sgds-col-xl-center-8{grid-column:3/span 8}.sgds-col-xl-center-10{grid-column:2/span 10}.sgds-col-lg-none{display:revert}.sgds-col-xl-none{display:none}}@media (min-width:1440px){.sgds-container{max-width:var(--sgds-dimension-1312)}.sgds-col-2-xl-1{grid-column:span 1}.sgds-col-2-xl-2{grid-column:span 2}.sgds-col-2-xl-3{grid-column:span 3}.sgds-col-2-xl-4{grid-column:span 4}.sgds-col-2-xl-5{grid-column:span 5}.sgds-col-2-xl-6{grid-column:span 6}.sgds-col-2-xl-7{grid-column:span 7}.sgds-col-2-xl-8{grid-column:span 8}.sgds-col-2-xl-9{grid-column:span 9}.sgds-col-2-xl-10{grid-column:span 10}.sgds-col-2-xl-11{grid-column:span 11}.sgds-col-2-xl-12{grid-column:span 12}.sgds-col-2-xl-center-2{grid-column:6/span 2}.sgds-col-2-xl-center-4{grid-column:5/span 4}.sgds-col-2-xl-center-6{grid-column:4/span 6}.sgds-col-2-xl-center-8{grid-column:3/span 8}.sgds-col-2-xl-center-10{grid-column:2/span 10}.sgds-col-xl-none{display:revert}.sgds-col-2-xl-none{display:none}}`;const Cd=["Enter"," "];class Sd extends lt{constructor(){super(...arguments),this.isCollapsed=!1,this.isMenuOpen=!1,this._handleResize=async()=>{this.isCollapsed=window.innerWidth<El,await this.updateComplete,this.isCollapsed||(this.isMenuOpen=!1),this._updateMobileLayout()},this._updateMobileLayout=()=>{if(this.nav&&this.headerContainer&&this.mobileActions&&this.mobileNav)if(this.isCollapsed){const{top:e}=this.nav.getBoundingClientRect(),t=this.headerContainer.clientHeight,s=this.mobileActions.clientHeight,i=window.innerWidth>=768&&window.innerWidth<El?e+t:e+t+s;this.mobileNav.style.maxHeight=`calc(100dvh - ${i}px)`,this.style.minHeight=`${this.nav.clientHeight}px`,this.nav.style.position="absolute"}else this.mobileNav.style.maxHeight="none",this.style.minHeight="auto",this.nav.style.position="relative"},this._toggleMenu=()=>{var e;this.isMenuOpen?this.hide():(document.querySelector("body").style.overflow="hidden",this.show()),null===(e=this.toggler)||void 0===e||e.focus()}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._handleResize),window.addEventListener("click",(e=>this._handleClickOutOfElement(e,this.navGroup)))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),window.removeEventListener("click",(e=>this._handleClickOutOfElement(e,this.navGroup)))}firstUpdated(e){super.firstUpdated(e),this._handleResize()}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.toggler)||this.hide()}async _onKeyboardToggle(e){Cd.includes(e.key)&&(e.preventDefault(),this._toggleMenu())}async show(){if(!this.isMenuOpen)return this.isMenuOpen=!0,$t(this,"sgds-after-show")}async hide(){if(this.isMenuOpen)return this.isMenuOpen=!1,document.querySelector("body").style.removeProperty("overflow"),$t(this,"sgds-after-hide")}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!1);await kt(this.mobileNav),this.isCollapsed&&(this.mobileNav.style.display="flex");const{keyframes:e,options:t}=St(this,"subnav.show");await wt(this.mobileNav,xt(e,this.mobileNav.scrollHeight),t),this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!0);await kt(this.mobileNav);const{keyframes:e,options:t}=St(this,"subnav.hide");await wt(this.mobileNav,xt(e,this.mobileNav.scrollHeight),t),this.isCollapsed&&(this.mobileNav.style.display="none"),this.emit("sgds-after-hide")}async handleOpenChange(){this.isMenuOpen?this._animateToShow():this._animateToHide()}async handleCollapsedChange(){await this.updateComplete,this.mobileNav.style.display=this.isCollapsed?"none":"flex"}render(){return ee`
|
|
3489
|
+
`}}xd.styles=[...lt.styles,yd],xd.dependencies={"sgds-icon":Ot},t([Je({type:Array})],xd.prototype,"steps",void 0),t([Je({type:Number,reflect:!0})],xd.prototype,"activeStep",void 0),t([Je({type:String,reflect:!0})],xd.prototype,"orientation",void 0),t([Je({type:Boolean,reflect:!0})],xd.prototype,"clickable",void 0),t([Ia("activeStep")],xd.prototype,"defaultActiveStep",void 0),t([At("activeStep",{waitUntilFirstUpdate:!0})],xd.prototype,"_handleActiveStepChange",null);var kd=Me`:host{display:block;position:sticky;top:0;z-index:950}nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);width:100%}.subnav{flex-direction:column;flex-wrap:nowrap}.header-container,.subnav{align-items:flex-start;display:flex}.header-container{gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);width:100%}slot[name=header]::slotted(*){--sgds-margin-3-xs:var(--sgds-margin-none);flex:1 1 auto;margin-bottom:var(--sgds-margin-3-xs,--sgds-margin-none);padding-top:var(--sgds-padding-none)}.subnav-toggler{cursor:pointer;transition:transform .2s ease-in-out}.subnav-toggler:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.subnav:not(.collapsed) .subnav-toggler{transform:rotate(-180deg)}.subnav-nav-group{display:flex;flex:1 1 0}.subnav-nav,.subnav-nav-group{align-items:flex-start;flex-direction:column;width:100%}.subnav-nav{display:none;overflow-y:auto;transition:transform .2s ease-in-out}.subnav-nav ::slotted(*){width:100%}.subnav-actions{bottom:0;display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);position:sticky;width:100%}.no-actions{display:none}slot[name=actions]::slotted(*){width:100%}@media screen and (max-width:1023px){.subnav.sgds-container{max-width:inherit}}@media screen and (min-width:512px){.subnav-actions{flex-direction:row}}@media screen and (min-width:768px){nav{border-bottom:var(--sgds-border-width-0)}.subnav{flex-direction:row}.subnav.collapsed{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.header-container{padding:var(--sgds-padding-lg) var(--sgds-padding-2-xl)}.subnav-nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:0;position:absolute;top:100%}.subnav-actions{align-items:center;flex-direction:row;padding:var(--sgds-padding-sm) var(--sgds-padding-2-xl) var(--sgds-padding-sm) var(--sgds-padding-none);position:inherit}}@media screen and (min-width:1024px){nav{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:inherit}.subnav{flex-wrap:wrap;gap:var(--sgds-gap-xl);row-gap:var(--sgds-gap-none)}.subnav.collapsed{border-bottom:var(--sgds-border-width-0)}.header-container{flex:1;padding:var(--sgds-padding-none);width:auto}slot[name=header]::slotted(*){padding-top:var(--sgds-padding-lg);white-space:nowrap}.subnav-nav-group{align-items:center;flex:inherit;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-xl);justify-content:space-between;row-gap:var(--sgds-gap-none);width:auto}.subnav-nav{align-items:center;background-color:inherit;border-bottom:var(--sgds-border-width-0);display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-lg);overflow-y:inherit;position:inherit;row-gap:0;transition:none;width:auto}.subnav-nav ::slotted(*){width:inherit}.subnav-toggler{display:none}.subnav-actions{padding:var(--sgds-padding-sm) var(--sgds-padding-none);width:auto}slot[name=actions]::slotted(*){width:inherit}}`,_d=Me`.sgds-container{margin-left:auto;margin-right:auto;max-width:calc(100% - 40px);width:100%}.sgds-grid{display:grid;gap:var(--sgds-gap-md);grid-template-columns:repeat(4,1fr)}.sgds-col-1{grid-column:span 1}.sgds-col-2{grid-column:span 2}.sgds-col-3{grid-column:span 3}.sgds-col-4{grid-column:span 4}.sgds-col-center-2{grid-column:2/span 2}.sgds-col-none{display:none}@media (min-width:512px){.sgds-grid{grid-template-columns:repeat(8,1fr)}.sgds-container{max-width:calc(100% - 48px)}.sgds-col-sm-1{grid-column:span 1}.sgds-col-sm-2{grid-column:span 2}.sgds-col-sm-3{grid-column:span 3}.sgds-col-sm-4{grid-column:span 4}.sgds-col-sm-5{grid-column:span 5}.sgds-col-sm-6{grid-column:span 6}.sgds-col-sm-7{grid-column:span 7}.sgds-col-sm-8{grid-column:span 8}.sgds-col-sm-center-2{grid-column:4/span 2}.sgds-col-sm-center-4{grid-column:3/span 4}.sgds-col-sm-center-6{grid-column:2/span 6}.sgds-col-none{display:revert}.sgds-col-sm-none{display:none}}@media (min-width:768px){.sgds-container{max-width:calc(100% - 56px)}.sgds-grid{gap:var(--sgds-gap-xl)}.sgds-col-md-1{grid-column:span 1}.sgds-col-md-2{grid-column:span 2}.sgds-col-md-3{grid-column:span 3}.sgds-col-md-4{grid-column:span 4}.sgds-col-md-5{grid-column:span 5}.sgds-col-md-6{grid-column:span 6}.sgds-col-md-7{grid-column:span 7}.sgds-col-md-8{grid-column:span 8}.sgds-col-md-center-2{grid-column:4/span 2}.sgds-col-md-center-4{grid-column:3/span 4}.sgds-col-md-center-6{grid-column:2/span 6}.sgds-col-sm-none{display:revert}.sgds-col-md-none{display:none}}@media (min-width:1024px){.sgds-grid{grid-template-columns:repeat(12,1fr)}.sgds-container{max-width:var(--sgds-dimension-888)}.sgds-col-lg-1{grid-column:span 1}.sgds-col-lg-2{grid-column:span 2}.sgds-col-lg-3{grid-column:span 3}.sgds-col-lg-4{grid-column:span 4}.sgds-col-lg-5{grid-column:span 5}.sgds-col-lg-6{grid-column:span 6}.sgds-col-lg-7{grid-column:span 7}.sgds-col-lg-8{grid-column:span 8}.sgds-col-lg-9{grid-column:span 9}.sgds-col-lg-10{grid-column:span 10}.sgds-col-lg-11{grid-column:span 11}.sgds-col-lg-12{grid-column:span 12}.sgds-col-lg-center-2{grid-column:6/span 2}.sgds-col-lg-center-4{grid-column:5/span 4}.sgds-col-lg-center-6{grid-column:4/span 6}.sgds-col-lg-center-8{grid-column:3/span 8}.sgds-col-lg-center-10{grid-column:2/span 10}.sgds-col-md-none{display:revert}.sgds-col-lg-none{display:none}}@media (min-width:1280px){.sgds-grid{gap:var(--sgds-gap-2-xl)}.sgds-container{max-width:var(--sgds-dimension-1168)}.sgds-col-xl-1{grid-column:span 1}.sgds-col-xl-2{grid-column:span 2}.sgds-col-xl-3{grid-column:span 3}.sgds-col-xl-4{grid-column:span 4}.sgds-col-xl-5{grid-column:span 5}.sgds-col-xl-6{grid-column:span 6}.sgds-col-xl-7{grid-column:span 7}.sgds-col-xl-8{grid-column:span 8}.sgds-col-xl-9{grid-column:span 9}.sgds-col-xl-10{grid-column:span 10}.sgds-col-xl-11{grid-column:span 11}.sgds-col-xl-12{grid-column:span 12}.sgds-col-xl-center-2{grid-column:6/span 2}.sgds-col-xl-center-4{grid-column:5/span 4}.sgds-col-xl-center-6{grid-column:4/span 6}.sgds-col-xl-center-8{grid-column:3/span 8}.sgds-col-xl-center-10{grid-column:2/span 10}.sgds-col-lg-none{display:revert}.sgds-col-xl-none{display:none}}@media (min-width:1440px){.sgds-container{max-width:var(--sgds-dimension-1312)}.sgds-col-2-xl-1{grid-column:span 1}.sgds-col-2-xl-2{grid-column:span 2}.sgds-col-2-xl-3{grid-column:span 3}.sgds-col-2-xl-4{grid-column:span 4}.sgds-col-2-xl-5{grid-column:span 5}.sgds-col-2-xl-6{grid-column:span 6}.sgds-col-2-xl-7{grid-column:span 7}.sgds-col-2-xl-8{grid-column:span 8}.sgds-col-2-xl-9{grid-column:span 9}.sgds-col-2-xl-10{grid-column:span 10}.sgds-col-2-xl-11{grid-column:span 11}.sgds-col-2-xl-12{grid-column:span 12}.sgds-col-2-xl-center-2{grid-column:6/span 2}.sgds-col-2-xl-center-4{grid-column:5/span 4}.sgds-col-2-xl-center-6{grid-column:4/span 6}.sgds-col-2-xl-center-8{grid-column:3/span 8}.sgds-col-2-xl-center-10{grid-column:2/span 10}.sgds-col-xl-none{display:revert}.sgds-col-2-xl-none{display:none}}`;const Cd=["Enter"," "];class Sd extends lt{constructor(){super(...arguments),this.hasActionsSlot=!1,this.isCollapsed=!1,this.isMenuOpen=!1,this.hasSlotController=new Wi(this,"actions"),this._handleResize=async()=>{this.isCollapsed=window.innerWidth<El,await this.updateComplete,this.isCollapsed||(this.isMenuOpen=!1),this._updateMobileLayout()},this._updateMobileLayout=()=>{if(this.nav&&this.headerContainer&&this.mobileActions&&this.mobileNav)if(this.isCollapsed){const{top:e}=this.nav.getBoundingClientRect(),t=this.headerContainer.clientHeight,s=this.mobileActions.clientHeight,i=window.innerWidth>=768&&window.innerWidth<El?e+t:e+t+s;this.mobileNav.style.maxHeight=`calc(100dvh - ${i}px)`,this.style.minHeight=`${this.nav.clientHeight}px`,this.nav.style.position="absolute"}else this.mobileNav.style.maxHeight="none",this.style.minHeight="auto",this.nav.style.position="relative"},this._toggleMenu=()=>{var e;this.isMenuOpen?this.hide():(document.querySelector("body").style.overflow="hidden",this.show()),null===(e=this.toggler)||void 0===e||e.focus()}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._handleResize),window.addEventListener("click",(e=>this._handleClickOutOfElement(e,this.navGroup)))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),window.removeEventListener("click",(e=>this._handleClickOutOfElement(e,this.navGroup)))}firstUpdated(e){super.firstUpdated(e),this._handleResize()}updated(){this.hasActionsSlot||(this.hasActionsSlot=this.hasSlotController.test("actions"))}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.toggler)||this.hide()}async _onKeyboardToggle(e){Cd.includes(e.key)&&(e.preventDefault(),this._toggleMenu())}async show(){if(!this.isMenuOpen)return this.isMenuOpen=!0,$t(this,"sgds-after-show")}async hide(){if(this.isMenuOpen)return this.isMenuOpen=!1,document.querySelector("body").style.removeProperty("overflow"),$t(this,"sgds-after-hide")}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!1);await kt(this.mobileNav),this.isCollapsed&&(this.mobileNav.style.display="flex");const{keyframes:e,options:t}=St(this,"subnav.show");await wt(this.mobileNav,xt(e,this.mobileNav.scrollHeight),t),this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!0);await kt(this.mobileNav);const{keyframes:e,options:t}=St(this,"subnav.hide");await wt(this.mobileNav,xt(e,this.mobileNav.scrollHeight),t),this.isCollapsed&&(this.mobileNav.style.display="none"),this.emit("sgds-after-hide")}async handleOpenChange(){this.isMenuOpen?this._animateToShow():this._animateToHide()}async handleCollapsedChange(){await this.updateComplete,this.mobileNav.style.display=this.isCollapsed?"none":"flex"}render(){return ee`
|
|
3490
3490
|
<nav aria-label="Sub navigation">
|
|
3491
3491
|
<div
|
|
3492
3492
|
class=${bt({"sgds-container":!0,subnav:!0,collapsed:!this.isMenuOpen})}
|
|
@@ -3507,13 +3507,15 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3507
3507
|
<div class="subnav-nav">
|
|
3508
3508
|
<slot></slot>
|
|
3509
3509
|
</div>
|
|
3510
|
-
<div
|
|
3510
|
+
<div
|
|
3511
|
+
class="${bt({"subnav-actions":!0,"no-actions":!this.hasActionsSlot})}"
|
|
3512
|
+
>
|
|
3511
3513
|
<slot name="actions"></slot>
|
|
3512
3514
|
</div>
|
|
3513
3515
|
</div>
|
|
3514
3516
|
</div>
|
|
3515
3517
|
</nav>
|
|
3516
|
-
`}}Sd.styles=[...lt.styles,kd,_d],Sd.dependencies={"sgds-icon":Nt},t([it("nav")],Sd.prototype,"nav",void 0),t([it(".subnav-nav")],Sd.prototype,"mobileNav",void 0),t([it(".header-container")],Sd.prototype,"headerContainer",void 0),t([it(".subnav-toggler")],Sd.prototype,"toggler",void 0),t([it(".subnav-nav-group")],Sd.prototype,"navGroup",void 0),t([it(".subnav-actions")],Sd.prototype,"mobileActions",void 0),t([et()],Sd.prototype,"isCollapsed",void 0),t([et()],Sd.prototype,"isMenuOpen",void 0),t([Dt("isMenuOpen",{waitUntilFirstUpdate:!0})],Sd.prototype,"handleOpenChange",null),t([Dt("isCollapsed",{waitUntilFirstUpdate:!0})],Sd.prototype,"handleCollapsedChange",null),Mt("subnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Mt("subnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var Md=Me`:host(:not([disabled])[active]:not([active=false])) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle);border-bottom:none}::slotted(*){--sgds-font-size-2:var(--sgds-font-size-1);--sgds-link-color-default:var(--sgds-color-default);box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:inline-block;font-size:var(--sgds-font-size-2,var(--sgds-font-size-1));padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-decoration:none!important;white-space:nowrap;width:100%}::slotted(*):after{height:var(--sgds-icon-size-md)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-md)!important}:host(:not([disabled])[active]:not([active=false])) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default));outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}@media screen and (min-width:1024px){:host(:not([disabled])[active]:not([active=false])) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);background-color:inherit;border-bottom:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}::slotted(*){border-bottom:var(--sgds-border-width-2) solid transparent;padding:var(--sgds-padding-lg) var(--sgds-padding-none)}}`;class $d extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter((e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase()));if(s.length>1)console.error("More than one anchor tag is added to sgds-subnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}}))}if(1===s.length){const e=s[0];this.active&&e.setAttribute("aria-current","true"),this.disabled&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}$d.styles=[...lt.styles,Md],t([Je({type:Boolean,reflect:!0})],$d.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],$d.prototype,"disabled",void 0),t([Dt("disabled")],$d.prototype,"_handleDisabled",null);var Dd=Me`input{margin:0}.form-check{align-items:center;display:flex;gap:var(--sgds-form-gap-lg)}.form-check-input{--sgds-switch-width:var(--sgds-form-width-xl);--sgds-switch-height:var(--sgds-form-height-md);--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M.5 12c0-6.627 5.373-12 12-12s12 5.373 12 12-5.373 12-12 12-12-5.373-12-12Z" fill="%23fff"/></svg>');appearance:none;background-color:var(--sgds-form-surface-subtle);background-image:var(--sgds-switch-bg-image);background-position:left var(--sgds-form-padding-inline-sm) center;background-repeat:no-repeat;background-size:var(--sgds-form-width-xs) var(--sgds-form-height-sm);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-form-border-radius-full);height:var(--sgds-switch-height);padding:0 var(--sgds-form-padding-inline-sm);transition:background-position .15s ease-in-out;width:var(--sgds-switch-width)}.form-check-input:focus,.form-check-input:focus-visible{background-color:var(--sgds-form-surface-emphasis)}.form-check-input:focus-visible{background-color:var(--sgds-form-surface-emphasis);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:0}.form-check-input:not([disabled]):hover{background-color:var(--sgds-form-surface-emphasis)}.form-check-input:checked,.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);background-position:right var(--sgds-form-padding-inline-sm) center}.form-check-input:not([disabled]):checked:focus,.form-check-input:not([disabled]):checked:hover,.form-check-input:not([disabled])[checked]:focus-visible,.form-check-input:not([disabled])[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([size=sm]) .form-check{font-size:var(--sgds-font-size-1)}:host([size=sm]) .form-check-input{--sgds-switch-width:var(--sgds-form-width-md);--sgds-switch-height:var(--sgds-form-height-sm);background-size:var(--sgds-form-width-2-xs) var(--sgds-form-height-2-xs)}:host([size=lg]) .form-check{font-size:var(--sgds-font-size-3)}:host([size=lg]) .form-check-input{--sgds-switch-width:var(--sgds-form-width-3-xl);--sgds-switch-height:var(--sgds-form-height-lg);background-size:var(--sgds-form-width-sm) var(--sgds-form-height-md)}@media (prefers-reduced-motion:reduce){.form-check .form-check-input{transition:none}}:host([icon]) .form-check-input:checked,:host([icon]) .form-check-input[checked]{--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16Zm8.94-21.778a.776.776 0 0 0-.424-.424.781.781 0 0 0-.854.17L13.261 20.372l-4.924-4.925a.783.783 0 1 0-1.108 1.108l5.478 5.478a.777.777 0 0 0 .692.217.787.787 0 0 0 .416-.217L24.77 11.076a.777.777 0 0 0 .17-.854Z" fill="%23fff"/></svg>')}:host([icon]) .form-check-input{--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16ZM10.164 9.416a.75.75 0 0 0-.53 1.28L14.937 16l-5.303 5.303a.75.75 0 0 0 1.06 1.061l5.304-5.303 5.303 5.303a.75.75 0 1 0 1.06-1.06L17.06 16l5.303-5.303a.75.75 0 0 0-1.06-1.061l-5.304 5.304-5.303-5.304a.75.75 0 0 0-.53-.22Z" fill="%23fff"/></svg>')}.d-none{display:none}`;class Ad extends lt{constructor(){super(...arguments),this.size="md",this.icon=!1,this.checked=!1,this.disabled=!1,this.hasDefaultSlot=!1,this.hasLeftLabelSlot=!1,this.defaultChecked=!1,this.hasSlotController=new Wi(this,"[default]","leftLabel"),this._inputId=Xi("switch")}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this.hasLeftLabelSlot||(this.hasLeftLabelSlot=this.hasSlotController.test("leftLabel"))}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(){this.checked=!this.checked,this.emit("sgds-change",{detail:{checked:this.checked}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleDisabledChange(){this.input.disabled=this.disabled}render(){const e=!this.hasDefaultSlot&&!this.hasLeftLabelSlot;return ee`
|
|
3518
|
+
`}}Sd.styles=[...lt.styles,kd,_d],Sd.dependencies={"sgds-icon":Ot},t([Je({type:Boolean})],Sd.prototype,"hasActionsSlot",void 0),t([it("nav")],Sd.prototype,"nav",void 0),t([it(".subnav-nav")],Sd.prototype,"mobileNav",void 0),t([it(".header-container")],Sd.prototype,"headerContainer",void 0),t([it(".subnav-toggler")],Sd.prototype,"toggler",void 0),t([it(".subnav-nav-group")],Sd.prototype,"navGroup",void 0),t([it(".subnav-actions")],Sd.prototype,"mobileActions",void 0),t([et()],Sd.prototype,"isCollapsed",void 0),t([et()],Sd.prototype,"isMenuOpen",void 0),t([At("isMenuOpen",{waitUntilFirstUpdate:!0})],Sd.prototype,"handleOpenChange",null),t([At("isCollapsed",{waitUntilFirstUpdate:!0})],Sd.prototype,"handleCollapsedChange",null),Mt("subnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Mt("subnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var Md=Me`:host(:not([disabled])[active]:not([active=false])) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle);border-bottom:none}::slotted(*){--sgds-font-size-2:var(--sgds-font-size-1);--sgds-link-color-default:var(--sgds-color-default);box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:inline-block;font-size:var(--sgds-font-size-2,var(--sgds-font-size-1));padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-decoration:none!important;white-space:nowrap;width:100%}::slotted(*):after{height:var(--sgds-icon-size-md)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-md)!important}:host(:not([disabled])[active]:not([active=false])) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default));outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}@media screen and (min-width:1024px){:host(:not([disabled])[active]:not([active=false])) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);background-color:inherit;border-bottom:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}::slotted(*){border-bottom:var(--sgds-border-width-2) solid transparent;padding:var(--sgds-padding-lg) var(--sgds-padding-none)}}`;class $d extends lt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter((e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase()));if(s.length>1)console.error("More than one anchor tag is added to sgds-subnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}}))}if(1===s.length){const e=s[0];this.active&&e.setAttribute("aria-current","true"),this.disabled&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}$d.styles=[...lt.styles,Md],t([Je({type:Boolean,reflect:!0})],$d.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],$d.prototype,"disabled",void 0),t([At("disabled")],$d.prototype,"_handleDisabled",null);var Ad=Me`input{margin:0}.form-check{align-items:center;display:flex;gap:var(--sgds-form-gap-lg)}.form-check-input{--sgds-switch-width:var(--sgds-form-width-xl);--sgds-switch-height:var(--sgds-form-height-md);--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M.5 12c0-6.627 5.373-12 12-12s12 5.373 12 12-5.373 12-12 12-12-5.373-12-12Z" fill="%23fff"/></svg>');appearance:none;background-color:var(--sgds-form-surface-subtle);background-image:var(--sgds-switch-bg-image);background-position:left var(--sgds-form-padding-inline-sm) center;background-repeat:no-repeat;background-size:var(--sgds-form-width-xs) var(--sgds-form-height-sm);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-form-border-radius-full);height:var(--sgds-switch-height);padding:0 var(--sgds-form-padding-inline-sm);transition:background-position .15s ease-in-out;width:var(--sgds-switch-width)}.form-check-input:focus,.form-check-input:focus-visible{background-color:var(--sgds-form-surface-emphasis)}.form-check-input:focus-visible{background-color:var(--sgds-form-surface-emphasis);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:0}.form-check-input:not([disabled]):hover{background-color:var(--sgds-form-surface-emphasis)}.form-check-input:checked,.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);background-position:right var(--sgds-form-padding-inline-sm) center}.form-check-input:not([disabled]):checked:focus,.form-check-input:not([disabled]):checked:hover,.form-check-input:not([disabled])[checked]:focus-visible,.form-check-input:not([disabled])[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([size=sm]) .form-check{font-size:var(--sgds-font-size-1)}:host([size=sm]) .form-check-input{--sgds-switch-width:var(--sgds-form-width-md);--sgds-switch-height:var(--sgds-form-height-sm);background-size:var(--sgds-form-width-2-xs) var(--sgds-form-height-2-xs)}:host([size=lg]) .form-check{font-size:var(--sgds-font-size-3)}:host([size=lg]) .form-check-input{--sgds-switch-width:var(--sgds-form-width-3-xl);--sgds-switch-height:var(--sgds-form-height-lg);background-size:var(--sgds-form-width-sm) var(--sgds-form-height-md)}@media (prefers-reduced-motion:reduce){.form-check .form-check-input{transition:none}}:host([icon]) .form-check-input:checked,:host([icon]) .form-check-input[checked]{--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16Zm8.94-21.778a.776.776 0 0 0-.424-.424.781.781 0 0 0-.854.17L13.261 20.372l-4.924-4.925a.783.783 0 1 0-1.108 1.108l5.478 5.478a.777.777 0 0 0 .692.217.787.787 0 0 0 .416-.217L24.77 11.076a.777.777 0 0 0 .17-.854Z" fill="%23fff"/></svg>')}:host([icon]) .form-check-input{--sgds-switch-bg-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16ZM10.164 9.416a.75.75 0 0 0-.53 1.28L14.937 16l-5.303 5.303a.75.75 0 0 0 1.06 1.061l5.304-5.303 5.303 5.303a.75.75 0 1 0 1.06-1.06L17.06 16l5.303-5.303a.75.75 0 0 0-1.06-1.061l-5.304 5.304-5.303-5.304a.75.75 0 0 0-.53-.22Z" fill="%23fff"/></svg>')}.d-none{display:none}`;class Dd extends lt{constructor(){super(...arguments),this.size="md",this.icon=!1,this.checked=!1,this.disabled=!1,this.hasDefaultSlot=!1,this.hasLeftLabelSlot=!1,this.defaultChecked=!1,this.hasSlotController=new Wi(this,"[default]","leftLabel"),this._inputId=Xi("switch")}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this.hasLeftLabelSlot||(this.hasLeftLabelSlot=this.hasSlotController.test("leftLabel"))}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(){this.checked=!this.checked,this.emit("sgds-change",{detail:{checked:this.checked}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleDisabledChange(){this.input.disabled=this.disabled}render(){const e=!this.hasDefaultSlot&&!this.hasLeftLabelSlot;return ee`
|
|
3517
3519
|
<div class="form-check">
|
|
3518
3520
|
<label
|
|
3519
3521
|
for="${this._inputId}"
|
|
@@ -3539,12 +3541,42 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3539
3541
|
<slot></slot>
|
|
3540
3542
|
</label>
|
|
3541
3543
|
</div>
|
|
3542
|
-
`}}
|
|
3544
|
+
`}}Dd.styles=[...lt.styles,Da,Ad],t([Je({reflect:!0,type:String})],Dd.prototype,"size",void 0),t([Je({reflect:!0,type:Boolean})],Dd.prototype,"icon",void 0),t([Je({type:Boolean,reflect:!0})],Dd.prototype,"checked",void 0),t([Je({type:Boolean,reflect:!0})],Dd.prototype,"disabled",void 0),t([Je({type:Boolean})],Dd.prototype,"hasDefaultSlot",void 0),t([Je({type:Boolean})],Dd.prototype,"hasLeftLabelSlot",void 0),t([Ia("checked")],Dd.prototype,"defaultChecked",void 0),t([it('input[type="checkbox"]')],Dd.prototype,"input",void 0),t([At("disabled",{waitUntilFirstUpdate:!0})],Dd.prototype,"_handleDisabledChange",null);var Vd=Me`.banner{align-items:center;background-color:var(--sgds-surface-fixed-dark);color:var(--sgds-color-fixed-light);display:flex;flex-direction:row;gap:var(--sgds-gap-xl);min-height:var(--sgds-dimension-64);padding:var(--sgds-padding-sm) var(--sgds-padding-2-xl);position:relative}.content{flex:1;overflow:hidden;width:100%}::slotted(sgds-system-banner-item){display:none;flex:0 0 100%;opacity:0}::slotted(sgds-system-banner-item[active]){display:block;opacity:1}.pagination{align-items:center;bottom:12px;display:flex;font-size:var(--sgds-font-size-0);font-weight:var(--sgds-font-weight-regular,400);gap:var(--sgds-gap-2-xs);letter-spacing:var(--sgds-letter-spacing-normal,0);line-height:var(--sgds-line-height-16,16px);position:absolute;right:20px}.d-none{display:none}sgds-close-button{position:absolute;right:20px;top:10px}@media (min-width:512px){.pagination,sgds-close-button{position:static}}`;class Ed extends lt{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this._intervalId=null,this._intervalTime=5e3,this._currentIndex=0}close(){this.show=!1}firstUpdated(e){super.firstUpdated(e),this.childCount=this.bannerItem.length,this.show?(this.childCount>1&&this._startAutoCycle(),this.addEventListener("mouseenter",this._pauseAutoCycle.bind(this)),this.addEventListener("mouseleave",this._resumeAutoCycle.bind(this)),this.addEventListener("focus",this._pauseAutoCycle.bind(this)),this.addEventListener("blur",this._resumeAutoCycle.bind(this))):this.banner.classList.add("d-none"),this._updateActiveItem(),this.childCount>5&&console.warn("It is not recommended to have more than 5 <sgds-system-banner-item> elements.")}disconnectedCallback(){super.disconnectedCallback(),this._stopAutoCycle()}async _handleShowChange(){this.show?(this.childCount>1&&this._startAutoCycle(),this.emit("sgds-show"),this.banner.classList.remove("d-none")):(this._stopAutoCycle(),this.emit("sgds-hide"),this.banner.classList.add("d-none"))}_updateActiveItem(){this.bannerItem.forEach(((e,t)=>{t===this._currentIndex?e.setAttribute("active",""):e.removeAttribute("active")}))}_next(){const e=this.bannerItem;this._currentIndex=(this._currentIndex+1)%e.length,this._updateActiveItem(),this._animateItem(e[this._currentIndex],"next"),this._resetAutoCycle()}_prev(){const e=this.bannerItem;this._currentIndex=(this._currentIndex-1+e.length)%e.length,this._updateActiveItem(),this._animateItem(e[this._currentIndex],"prev"),this._resetAutoCycle()}async _animateItem(e,t){e.getAnimations().forEach((e=>e.cancel()));const s=St(this,`banner.item.${t}`);await wt(e,s.keyframes,s.options)}_startAutoCycle(){this._stopAutoCycle(),this._intervalId=setInterval((()=>this._next()),this._intervalTime)}_stopAutoCycle(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)}_resetAutoCycle(){this._stopAutoCycle(),this._startAutoCycle()}_pauseAutoCycle(){this._stopAutoCycle()}_resumeAutoCycle(){this.show&&this.childCount>1&&this._startAutoCycle()}render(){return ee`
|
|
3545
|
+
<div
|
|
3546
|
+
class="${bt({banner:!0})}"
|
|
3547
|
+
role="alert"
|
|
3548
|
+
aria-hidden=${this.show?"false":"true"}
|
|
3549
|
+
>
|
|
3550
|
+
<div class="content">
|
|
3551
|
+
<slot id="loop-slot"></slot>
|
|
3552
|
+
</div>
|
|
3553
|
+
${this.childCount>1?ee` <div class="pagination">
|
|
3554
|
+
<sgds-icon-button
|
|
3555
|
+
name="chevron-left"
|
|
3556
|
+
tone="fixed-light"
|
|
3557
|
+
variant="ghost"
|
|
3558
|
+
size="xs"
|
|
3559
|
+
@click=${this._prev}
|
|
3560
|
+
></sgds-icon-button>
|
|
3561
|
+
<span>${this._currentIndex+1}/${this.childCount}</span>
|
|
3562
|
+
<sgds-icon-button
|
|
3563
|
+
name="chevron-right"
|
|
3564
|
+
tone="fixed-light"
|
|
3565
|
+
variant="ghost"
|
|
3566
|
+
size="xs"
|
|
3567
|
+
@click=${this._next}
|
|
3568
|
+
></sgds-icon-button>
|
|
3569
|
+
</div>`:ie}
|
|
3570
|
+
${this.dismissible?ee`
|
|
3571
|
+
<sgds-close-button aria-label="close the alert" @click=${this.close} tone="fixed-light"></sgds-close-button>
|
|
3572
|
+
`:ie}
|
|
3573
|
+
</div>
|
|
3574
|
+
`}}Ed.styles=[...lt.styles,Vd],Ed.dependencies={"sgds-close-button":Ht,"sgds-icon":Ot,"sgds-icon-button":lr},t([Je({type:Boolean,reflect:!0})],Ed.prototype,"show",void 0),t([Je({type:Boolean,reflect:!0})],Ed.prototype,"dismissible",void 0),t([ot({flatten:!0})],Ed.prototype,"bannerItem",void 0),t([it(".banner")],Ed.prototype,"banner",void 0),t([Dl({context:"system-banner-children-count-context"}),et()],Ed.prototype,"childCount",void 0),t([et()],Ed.prototype,"_intervalId",void 0),t([et()],Ed.prototype,"_currentIndex",void 0),t([At("show",{waitUntilFirstUpdate:!0})],Ed.prototype,"_handleShowChange",null),Mt("banner.item.next",{keyframes:[{opacity:0,transform:"translateY(-100%)"},{opacity:1,transform:"translateY(0)"}],options:{duration:500,easing:"cubic-bezier(0.45,0.05,0.55,0.95)"}}),Mt("banner.item.prev",{keyframes:[{opacity:0,transform:"translateY(100%)"},{opacity:1,transform:"translateY(0)"}],options:{duration:500,easing:"cubic-bezier(0.45,0.05,0.55,0.95)"}});var Id=Me`:host([density=compact]) .tab{font-size:var(--sgds-font-size-1);padding:var(--sgds-spacer-3) var(--sgds-spacer-5)}:host(:not([active])) .tab{cursor:pointer}:host([variant=solid]) .tab{background-color:var(--sgds-bg-translucent-subtle);border-radius:var(--sgds-border-radius-md)}:host([variant=solid][active]) .tab{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus,:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=solid]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent)}:host([disabled]) .tab{cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([variant=underlined][active]) .tab{color:var(--sgds-primary-color-default)}:host([variant=underlined][orientation=vertical]) .tab{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([variant=underlined][orientation=vertical][active]) .tab:after{background-color:var(--sgds-primary-surface-default);bottom:0;content:"";height:100%;position:absolute;right:-1px;width:var(--sgds-border-width-4)}:host([variant=underlined][orientation=horizontal]) .tab{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([variant=underlined][orientation=horizontal][active]) .tab:after{background-color:var(--sgds-primary-surface-default);bottom:-1px;content:"";height:var(--sgds-border-width-4);left:0;position:absolute;width:100%}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus,:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:0}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=underlined]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent-subtle)}.tab{align-items:center;color:var(--sgds-color-default);display:flex;gap:var(--sgds-spacer-3);padding:var(--sgds-spacer-4) var(--sgds-spacer-5);position:relative}.tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;let Bd=0;class Pd extends lt{constructor(){super(...arguments),this.attrId=++Bd,this.componentId=`sgds-tab-${this.attrId}`,this.panel="",this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tab")}focus(e){var t,s;null===(s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".tab"))||void 0===s||s.focus(e)}blur(){this.tab.blur()}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&(this.active=!1)}render(){return ee`
|
|
3543
3575
|
<div data-testid="inner-tab" tabindex=${this.disabled?"-1":"0"} class="tab">
|
|
3544
3576
|
<slot name="icon"></slot>
|
|
3545
3577
|
<slot></slot>
|
|
3546
3578
|
</div>
|
|
3547
|
-
`}}
|
|
3579
|
+
`}}Pd.styles=[Id],t([it(".tab")],Pd.prototype,"tab",void 0),t([Je({reflect:!0})],Pd.prototype,"panel",void 0),t([Je({type:Boolean,reflect:!0})],Pd.prototype,"active",void 0),t([Je({type:Boolean,reflect:!0})],Pd.prototype,"disabled",void 0),t([At("active")],Pd.prototype,"handleActiveChange",null),t([At("disabled")],Pd.prototype,"handleDisabledChange",null);var Td=Me`.tab-group{display:flex;flex-direction:column;gap:var(--sgds-gap-xl)}.tab-group__nav{display:flex;flex-direction:row}.tab-group__content{flex:1}:host([orientation=vertical]) .tab-group{flex-direction:row}:host([orientation=vertical]) .tab-group__nav{flex-direction:column}:host([variant=solid]) .tab-group__nav{gap:var(--sgds-gap-xs)}`;class Ld extends lt{constructor(){super(...arguments),this._tabs=[],this._panels=[],this.variant="underlined",this.orientation="horizontal",this.density="default"}connectedCallback(){const e=Promise.all([customElements.whenDefined("sgds-tab"),customElements.whenDefined("sgds-tab-panel")]);super.connectedCallback(),this._resizeObserver=new ResizeObserver((()=>{})),this._mutationObserver=new MutationObserver((e=>{e.some((e=>!["aria-labelledby","aria-controls"].includes(e.attributeName)))&&setTimeout((()=>this._setAriaLabels())),e.some((e=>"disabled"===e.attributeName))&&this._syncTabsAndPanels()})),this.updateComplete.then((()=>{this._syncTabsAndPanels(),this._mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this._resizeObserver.observe(this._nav),e.then((()=>{new IntersectionObserver(((e,t)=>{var s;e[0].intersectionRatio>0&&(this._setAriaLabels(),this._setActiveTab(null!==(s=this._getActiveTab())&&void 0!==s?s:this._tabs[0],{emitEvents:!1}),t.unobserve(e[0].target))})).observe(this._tabGroup)}))}))}disconnectedCallback(){this._mutationObserver.disconnect(),this._resizeObserver.unobserve(this._nav)}show(e){const t=this._tabs.find((t=>t.panel===e));t&&this._setActiveTab(t)}_getAllTabs(e={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter((t=>e.includeDisabled?"sgds-tab"===t.tagName.toLowerCase():"sgds-tab"===t.tagName.toLowerCase()&&!t.disabled))}_getAllPanels(){return[...this._body.assignedElements()].filter((e=>"sgds-tab-panel"===e.tagName.toLowerCase()))}_getActiveTab(){return this._tabs.find((e=>e.active))}_handleClick(e){const t=e.target.closest("sgds-tab");(null==t?void 0:t.closest("sgds-tab-group"))===this&&null!==t&&this._setActiveTab(t)}_handleKeyDown(e){const t=e.target.closest("sgds-tab");if((null==t?void 0:t.closest("sgds-tab-group"))===this&&(["Enter"," "].includes(e.key)&&null!==t&&(this._setActiveTab(t),e.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))){const t=this._tabs.find((e=>e.matches(":focus")));if("sgds-tab"===(null==t?void 0:t.tagName.toLowerCase())){let s=this._tabs.indexOf(t);"Home"===e.key?s=0:"End"===e.key?s=this._tabs.length-1:"ArrowUp"===e.key||"ArrowLeft"===e.key?s--:"ArrowDown"!==e.key&&"ArrowRight"!==e.key||s++,s<0&&(s=this._tabs.length-1),s>this._tabs.length-1&&(s=0),this._tabs[s].focus({preventScroll:!0}),this._setActiveTab(this._tabs[s]),e.preventDefault()}}}_setActiveTab(e,t){if(t=Object.assign({emitEvents:!0},t),e!==this._activeTab&&!e.disabled){const s=this._activeTab;this._activeTab=e,this._tabs.forEach((e=>{e.active=e===this._activeTab})),this._panels.map((e=>{var t;return e.active=e.name===(null===(t=this._activeTab)||void 0===t?void 0:t.panel)})),t.emitEvents&&(s&&this.emit("sgds-tab-hide",{detail:{name:s.panel}}),this.emit("sgds-tab-show",{detail:{name:this._activeTab.panel}}))}}_setAriaLabels(){this._tabs.forEach((e=>{const t=this._panels.find((t=>t.name===e.panel));t&&(e.setAttribute("aria-controls",t.getAttribute("id")),t.setAttribute("aria-labelledby",e.getAttribute("id")))}))}_syncTabsAndPanels(){this._tabs=this._getAllTabs({includeDisabled:!1}),this._panels=this._getAllPanels()}_updateTabsAttribute(e){if(!this._navSlot)return;this._navSlot.forEach((t=>{t.setAttribute(e,this[e])}))}_handleSlotChange(){this._updateTabsAttribute("variant"),this._updateTabsAttribute("orientation"),this._updateTabsAttribute("density"),this._syncTabsAndPanels()}willUpdate(e){e.has("variant")&&this._updateTabsAttribute("variant"),e.has("orientation")&&this._updateTabsAttribute("orientation"),e.has("density")&&this._updateTabsAttribute("density")}render(){return ee`
|
|
3548
3580
|
<div class="tab-group" @click=${this._handleClick} @keydown=${this._handleKeyDown}>
|
|
3549
3581
|
<div class="tab-group__nav" role="tablist">
|
|
3550
3582
|
<slot name="nav" @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -3553,11 +3585,11 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3553
3585
|
<slot class="tab-group__body" @slotchange=${this._syncTabsAndPanels}></slot>
|
|
3554
3586
|
</div>
|
|
3555
3587
|
</div>
|
|
3556
|
-
`}}
|
|
3588
|
+
`}}Ld.styles=[...lt.styles,Td],t([it(".tab-group")],Ld.prototype,"_tabGroup",void 0),t([it(".tab-group__body")],Ld.prototype,"_body",void 0),t([it(".tab-group__nav")],Ld.prototype,"_nav",void 0),t([Je({type:String,reflect:!0})],Ld.prototype,"variant",void 0),t([Je({type:String,reflect:!0})],Ld.prototype,"orientation",void 0),t([Je({type:String,reflect:!0})],Ld.prototype,"density",void 0),t([ot({slot:"nav",flatten:!0})],Ld.prototype,"_navSlot",void 0);var Fd=Me`.tab-panel{display:block}.tab-panel:not(.tab-panel--active){display:none}`;let Zd=0;class Hd extends lt{constructor(){super(...arguments),this.attrId=++Zd,this.componentId=`sgds-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}_handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return ee`
|
|
3557
3589
|
<slot
|
|
3558
3590
|
class=${bt({"tab-panel":!0,"tab-panel--active":this.active})}
|
|
3559
3591
|
></slot>
|
|
3560
|
-
`}}
|
|
3592
|
+
`}}Hd.styles=[...lt.styles,Fd],t([Je({reflect:!0})],Hd.prototype,"name",void 0),t([Je({type:Boolean,reflect:!0})],Hd.prototype,"active",void 0),t([At("active")],Hd.prototype,"_handleActiveChange",null);var zd=Me`tbody,td,th,thead,tr{border:var(--sgds-border-width-0) solid;border-color:inherit}th{text-align:-webkit-match-parent}table{border-collapse:collapse;caption-side:bottom}.table{border-color:var(--sgds-border-color-default);display:table;vertical-align:top;width:100%}.hidden{display:none}.table>:not(caption) td,.table>:not(caption) th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);padding:var(--sgds-padding-lg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>thead th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis)}.table-group-divider{border-top:calc(var(--sgds-border-width)*2) solid}.table>:not(:first-child){border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis)}.table-responsive{-webkit-overflow-scrolling:touch;overflow-x:auto}@media (max-width:575.98px){.table-responsive-sm{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:767.98px){.table-responsive-md{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:991.98px){.table-responsive-lg{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1199.98px){.table-responsive-xl{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1399.98px){.table-responsive-xxl{-webkit-overflow-scrolling:touch;overflow-x:auto}}`;class Rd extends lt{constructor(){super(...arguments),this.rowHeader=[],this.columnHeader=[],this.tableData=[],this.headerPosition="horizontal",this.hasDefaultSlot=!1,this.hasSlotController=new Wi(this,"[default]")}connectedCallback(){super.connectedCallback()}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]"))}_renderTable(){if("horizontal"===this.headerPosition)return ee`
|
|
3561
3593
|
<thead>
|
|
3562
3594
|
<tr>
|
|
3563
3595
|
${this.rowHeader.map((e=>ee` <th>${e}</th> `))}
|
|
@@ -3603,12 +3635,12 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3603
3635
|
${this._renderTable()}
|
|
3604
3636
|
</table>`}
|
|
3605
3637
|
</div>
|
|
3606
|
-
`}}
|
|
3638
|
+
`}}Rd.styles=[...lt.styles,zd],t([Je({type:String,reflect:!0})],Rd.prototype,"responsive",void 0),t([Je({type:Array})],Rd.prototype,"rowHeader",void 0),t([Je({type:Array})],Rd.prototype,"columnHeader",void 0),t([Je({type:Array})],Rd.prototype,"tableData",void 0),t([Je({type:String})],Rd.prototype,"headerPosition",void 0),t([Je({type:Boolean})],Rd.prototype,"hasDefaultSlot",void 0);var Od=Me`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;padding:var(--sgds-padding-lg)}`;class Nd extends lt{connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return ee` <slot class="table-cell"></slot> `}}Nd.styles=[...lt.styles,Od];var Ud=Me`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis);display:table-cell;font-weight:700;padding:var(--sgds-padding-lg)}:host(:not([border])){border-color:var(--sgds-border-color-muted)}`;class qd extends lt{constructor(){super(...arguments),this.border=!1}_handleBorderChange(){var e,t;this.border="sgds-table-cell"!==(null===(t=null===(e=this.nextElementSibling)||void 0===e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase()),this.border?this.setAttribute("border","true"):this.removeAttribute("border")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}render(){return ee`<slot></slot>`}}qd.styles=[...lt.styles,Ud],t([et()],qd.prototype,"border",void 0),t([At("border")],qd.prototype,"_handleBorderChange",null);var Yd=Me`:host{display:table-row;width:100%}`;class jd extends lt{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return ee`<slot class="table-row"></slot>`}}jd.styles=[...lt.styles,Yd];var Wd=Me`.container{display:flex;flex-direction:column;gap:var(--sgds-gap-xl)}slot:not([name])::slotted(*){--sgds-font-size-5:var(--sgds-font-size-4);--sgds-font-size-6:var(--sgds-font-size-4);--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-bold,var(--sgds-font-weight-semibold));margin-bottom:var(--sgds-margin-2-xs,var(--sgds-margin-none))}.contents{display:flex;flex-direction:column;gap:var(--sgds-gap-md);list-style:none;margin:var(--sgds-margin-none);padding:var(--sgds-padding-none)}slot[name=contents]::slotted(li){--sgds-margin-3-xs:var(--sgds-margin-none);margin-top:var(--sgds-margin-3-xs,var(--sgds-margin-none))}`;class Kd extends lt{render(){return ee`<div class="container">
|
|
3607
3639
|
<slot></slot>
|
|
3608
3640
|
<ul class="contents">
|
|
3609
3641
|
<slot name="contents"></slot>
|
|
3610
3642
|
</ul>
|
|
3611
|
-
</div> `}}
|
|
3643
|
+
</div> `}}Kd.styles=[...lt.styles,Wd];var Gd=Me`textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0;resize:vertical}textarea.form-control-group{min-height:var(--sgds-dimension-136);padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x)}.textarea-resize-none{resize:none}.textarea-resize-vertical{resize:vertical}.textarea-resize-auto{height:auto;overflow-y:hidden;resize:none}.textarea-info-container{display:flex;justify-content:space-between}.word-count{margin-left:auto}`;class Xd extends(Pa(Ea)){constructor(){super(...arguments),this.value="",this.spellcheck=!1,this.rows=4,this.placeholder="Placeholder",this.invalidFeedback="",this.autofocus=!1,this.readonly=!1,this.resize="vertical",this.defaultValue="",this.hasFeedback=!1,this.required=!1,this.hintText="",this._isTouched=!1}focus(e){this.textarea.focus(e)}blur(){this.textarea.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}select(){this.textarea.select()}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleChange(e){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value,this.emit("sgds-input"),super._mixinHandleInputChange(e)}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleRowsChange(){this._setTextareaHeight()}_setTextareaHeight(){"auto"===this.resize?(this.textarea.style.height="auto",this.textarea.style.height=`${this.textarea.scrollHeight}px`):this.textarea.style.height=void 0}_handleIsTouched(){this._isTouched&&(this.invalid=!this.textarea.checkValidity())}_handleDisabledChange(){this.setInvalid(!1)}_handleValueChange(){this.updateComplete.then((()=>this._setTextareaHeight()))}_renderHintText(){const e=Tt` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_wordCount(){return Tt`
|
|
3612
3644
|
<div
|
|
3613
3645
|
class="form-text word-count ${bt({"invalid-feedback":this.invalid&&this.hasFeedback})}"
|
|
3614
3646
|
>
|
|
@@ -3622,20 +3654,20 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3622
3654
|
<textarea
|
|
3623
3655
|
class=${bt({"form-control-group":!0,"is-invalid":this.hasFeedback&&this.invalid,"textarea-resize-none":"none"===this.resize,"textarea-resize-vertical":"vertical"===this.resize,"textarea-resize-auto":"auto"===this.resize,readonly:this.readonly,disabled:this.disabled})}
|
|
3624
3656
|
id=${this._controlId}
|
|
3625
|
-
name=${
|
|
3626
|
-
rows=${
|
|
3627
|
-
placeholder=${
|
|
3628
|
-
minlength=${
|
|
3629
|
-
maxlength=${
|
|
3657
|
+
name=${qt(this.name)}
|
|
3658
|
+
rows=${qt(this.rows)}
|
|
3659
|
+
placeholder=${qt(this.placeholder)}
|
|
3660
|
+
minlength=${qt(this.minlength)}
|
|
3661
|
+
maxlength=${qt(this.maxlength)}
|
|
3630
3662
|
.value=${Ma(this.value)}
|
|
3631
3663
|
aria-invalid=${this.invalid?"true":"false"}
|
|
3632
|
-
spellcheck=${
|
|
3664
|
+
spellcheck=${qt(this.spellcheck)}
|
|
3633
3665
|
?disabled=${this.disabled}
|
|
3634
3666
|
?readonly=${this.readonly}
|
|
3635
3667
|
?required=${this.required}
|
|
3636
3668
|
?autofocus=${this.autofocus}
|
|
3637
|
-
autocorrect=${
|
|
3638
|
-
inputmode=${
|
|
3669
|
+
autocorrect=${qt(this.autocorrect)}
|
|
3670
|
+
inputmode=${qt(this.inputmode)}
|
|
3639
3671
|
@input=${e=>this._handleInputChange(e)}
|
|
3640
3672
|
@change=${e=>this._handleChange(e)}
|
|
3641
3673
|
@invalid=${e=>this._handleInvalid(e)}
|
|
@@ -3654,7 +3686,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3654
3686
|
${this.maxlength>0?this._wordCount():ie}
|
|
3655
3687
|
</div>
|
|
3656
3688
|
</div>
|
|
3657
|
-
`}}
|
|
3689
|
+
`}}Xd.styles=[...Ea.styles,za,Gd],t([it("textarea.form-control-group")],Xd.prototype,"textarea",void 0),t([Je({type:String,reflect:!0})],Xd.prototype,"name",void 0),t([Je({type:String,reflect:!0})],Xd.prototype,"value",void 0),t([Je({type:Number,reflect:!0})],Xd.prototype,"minlength",void 0),t([Je({type:Number,reflect:!0})],Xd.prototype,"maxlength",void 0),t([Je({type:Boolean,reflect:!0})],Xd.prototype,"spellcheck",void 0),t([Je({type:Number})],Xd.prototype,"rows",void 0),t([Je({type:String,reflect:!0})],Xd.prototype,"placeholder",void 0),t([Je({type:String,reflect:!0})],Xd.prototype,"invalidFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Xd.prototype,"autofocus",void 0),t([Je({type:Boolean,reflect:!0})],Xd.prototype,"readonly",void 0),t([Je({type:String,reflect:!0})],Xd.prototype,"resize",void 0),t([Je({type:String,reflect:!0})],Xd.prototype,"inputmode",void 0),t([Je({type:Boolean,reflect:!0})],Xd.prototype,"autocorrect",void 0),t([Ia()],Xd.prototype,"defaultValue",void 0),t([Je({type:Boolean,reflect:!0})],Xd.prototype,"hasFeedback",void 0),t([Je({type:Boolean,reflect:!0})],Xd.prototype,"required",void 0),t([Je({reflect:!0})],Xd.prototype,"hintText",void 0),t([et()],Xd.prototype,"_isTouched",void 0),t([At("rows",{waitUntilFirstUpdate:!0})],Xd.prototype,"_handleRowsChange",null),t([At("_isTouched",{waitUntilFirstUpdate:!0})],Xd.prototype,"_handleIsTouched",null),t([At("disabled",{waitUntilFirstUpdate:!0})],Xd.prototype,"_handleDisabledChange",null),t([At("value",{waitUntilFirstUpdate:!0})],Xd.prototype,"_handleValueChange",null);var Qd=Me`:host([noPadding]) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent)}:host(:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([orientation=vertical][noPadding]) .card-body{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none)}:host([orientation=vertical][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none)}:host([orientation=horizontal][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl)}:host([orientation=horizontal][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none)}:host([tinted]:not([noPadding])) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}:host([orientation][noPadding]) .card-media{padding:var(--sgds-padding-none)}slot[name=thumbnail]::slotted(*){height:var(--sgds-dimension-64)!important;max-width:var(--sgds-dimension-128)!important;min-width:var(--sgds-dimension-64)!important;object-fit:contain;object-position:left;width:100%}`;class Jd extends _a{constructor(){super(...arguments),this.noPadding=!1}_getAnchorFromSlot(e){if(!e||0===e.length)return null;const t=e[0];return t.querySelector("a")||t}_handleThumbnailSlotChange(e){if(0===e.target.assignedElements({flatten:!0}).length&&("vertical"===this.orientation&&0===this._upperNode.length||"horizontal"===this.orientation)){this.shadowRoot.querySelector(".card-media").style.display="none";const e=this.shadowRoot.querySelector(".card-body");this.noPadding&&(e.style.padding="0px")}}_handleFooterSlotChange(e){var t;const s=e.target.assignedElements({flatten:!0}),i=null===(t=this._getAnchorFromSlot(s))||void 0===t?void 0:t.href;this.stretchedLink&&i&&this.card.setAttribute("href",i)}_handleLinkSlotChange(e){var t;this.warnLinkSlotMisused(e);const s=e.target.assignedElements({flatten:!0}),i=null===(t=this._getAnchorFromSlot(s))||void 0===t?void 0:t.href;this.stretchedLink&&i&&this.card.setAttribute("href",i)}render(){const e=this.stretchedLink?Bt`a`:Bt`div`,t=!this.stretchedLink||this.disabled?-1:0;return Tt`
|
|
3658
3690
|
<${e}
|
|
3659
3691
|
class="card ${bt({disabled:this.disabled})}"
|
|
3660
3692
|
tabindex=${t}
|
|
@@ -3680,7 +3712,7 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3680
3712
|
</slot>
|
|
3681
3713
|
</div>
|
|
3682
3714
|
</${e}>
|
|
3683
|
-
`}}
|
|
3715
|
+
`}}Jd.styles=[..._a.styles,Qd],t([nt({slot:"upper",flatten:!0})],Jd.prototype,"_upperNode",void 0),t([Je({type:Boolean,reflect:!0})],Jd.prototype,"noPadding",void 0);var ec=Me`:host([variant=info]) slot[name=icon]::slotted(*){color:var(--sgds-primary-color-default)}:host([variant=success]) slot[name=icon]::slotted(*){color:var(--sgds-success-color-default)}:host([variant=danger]) slot[name=icon]::slotted(*){color:var(--sgds-danger-color-default)}:host([variant=warning]) slot[name=icon]::slotted(*){color:var(--sgds-warning-color-fixed-light)}.toast{align-items:flex-start;background-clip:padding-box;background-color:var(--sgds-surface-default);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);display:flex;flex-direction:row;gap:var(--sgds-gap-xs);max-width:var(--sgds-dimension-480);min-width:var(--sgds-dimension-320);padding:var(--sgds-padding-md);pointer-events:auto;width:320px}.toast-content{word-wrap:break-word;gap:var(--sgds-gap-sm)}.toast-body,.toast-content{display:flex;flex-direction:column}.toast-body{gap:var(--sgds-gap-2-xs)}.toast-body strong{line-height:var(--sgds-line-height-20)}.toast-body span{color:var(--sgds-color-subtle)}.toast-action{word-wrap:break-word;color:var(--sgds-link-color-default)}.toast-header strong{margin-right:auto;word-break:break-all}.close-btn{margin-left:auto}.d-none{display:none}`;class tc extends lt{constructor(){super(...arguments),this.show=!1,this.title="Title",this.noAnimation=!1,this.autohide=!1,this.delay=5e3,this.variant="info",this.dismissible=!1}async showToast(){if(!this.show)return this.show=!0,$t(this,"sgds-after-show")}async hideToast(){if(this.show)return this.show=!1,$t(this,"sgds-after-hide")}handleCloseClick(){this.show=!1,this.emit("sgds-close")}async handleShowChange(){if(this.show){this.emit("sgds-show"),this.toast.classList.remove("d-none");const e=St(this,"toast.show");this.noAnimation||await wt(this.toast,e.keyframes,e.options),this.emit("sgds-after-show")}else{this.emit("sgds-hide");const e=St(this,"toast.hide");this.noAnimation||await wt(this.toast,e.keyframes,e.options),this.toast.classList.add("d-none"),this.emit("sgds-after-hide")}}firstUpdated(e){var t;if(super.firstUpdated(e),this.show||this.toast.classList.add("d-none"),0===this._actionNodes.length)return null===(t=this.shadowRoot.querySelector("slot[name='action']"))||void 0===t?void 0:t.classList.add("d-none")}render(){return this.autohide&&this.show&&setTimeout((()=>{this.show=!1}),this.delay),ee`
|
|
3684
3716
|
<div
|
|
3685
3717
|
class="toast"
|
|
3686
3718
|
role="alert"
|
|
@@ -3698,15 +3730,15 @@ const Ql="important",Jl=" !"+Ql;const ed=mt(class extends ft{constructor(e){if(s
|
|
|
3698
3730
|
</div>
|
|
3699
3731
|
${this.dismissible?ee`<sgds-close-button
|
|
3700
3732
|
class="close-btn"
|
|
3701
|
-
|
|
3733
|
+
aria-label="close toast"
|
|
3702
3734
|
@click=${this.handleCloseClick}
|
|
3703
3735
|
></sgds-close-button>`:ie}
|
|
3704
3736
|
</div>
|
|
3705
|
-
`}}
|
|
3737
|
+
`}}tc.styles=[...lt.styles,ec],tc.dependencies={"sgds-close-button":Ht},t([it("div.toast")],tc.prototype,"toast",void 0),t([Je({type:Boolean,reflect:!0})],tc.prototype,"show",void 0),t([Je({type:String,reflect:!0})],tc.prototype,"title",void 0),t([Je({type:Boolean,reflect:!0})],tc.prototype,"noAnimation",void 0),t([Je({type:Boolean,reflect:!0})],tc.prototype,"autohide",void 0),t([Je({type:Number,reflect:!0})],tc.prototype,"delay",void 0),t([Je({type:String,reflect:!0})],tc.prototype,"variant",void 0),t([Je({type:Boolean,reflect:!0})],tc.prototype,"dismissible",void 0),t([At("show",{waitUntilFirstUpdate:!0})],tc.prototype,"handleShowChange",null),t([nt({slot:"action",flatten:!0})],tc.prototype,"_actionNodes",void 0),Mt("toast.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:400,easing:"ease"}}),Mt("toast.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:400,easing:"ease"}});var sc=Me`.toast-container{max-width:100%;pointer-events:none;position:fixed;width:max-content;z-index:1090}.top-start{left:0;top:0}.top-center{left:50%;top:0;transform:translateX(-50%)}.top-end{right:0;top:0}.middle-start{left:0;top:50%;transform:translateY(-50%)}.middle-center{left:50%;top:50%;transform:translate(-50%,-50%)}.middle-end{right:0;top:50%;transform:translateY(-50%)}.bottom-start{bottom:0;left:0}.bottom-center{bottom:0;left:50%;transform:translateX(-50%)}.bottom-end{bottom:0;right:0}slot{display:flex;flex-direction:column;gap:.5rem}`;class ic extends lt{render(){return Tt`
|
|
3706
3738
|
<div
|
|
3707
3739
|
class=${bt({"sgds toast-container":!0,[this.position]:this.position})}
|
|
3708
3740
|
>
|
|
3709
3741
|
<slot></slot>
|
|
3710
3742
|
</div>
|
|
3711
|
-
`}}
|
|
3743
|
+
`}}ic.styles=[sc],t([Je({type:String,reflect:!0})],ic.prototype,"position",void 0),e.SgdsAccordion=ht,e.SgdsAccordionItem=Vt,e.SgdsAlert=Ut,e.SgdsAlertLink=Wt,e.SgdsBadge=Ki,e.SgdsBreadcrumb=ra,e.SgdsBreadcrumbItem=ha,e.SgdsButton=ma,e.SgdsCard=Sa,e.SgdsCheckbox=Fa,e.SgdsCheckboxGroup=Ha,e.SgdsCloseButton=Ht,e.SgdsComboBox=Wa,e.SgdsComboBoxOption=qa,e.SgdsDatepicker=Jr,e.SgdsDescriptionList=sl,e.SgdsDescriptionListGroup=al,e.SgdsDivider=nl,e.SgdsDrawer=hl,e.SgdsDropdown=sa,e.SgdsDropdownItem=aa,e.SgdsFileUpload=pl,e.SgdsFooter=vl,e.SgdsFooterItem=fl,e.SgdsIcon=Ot,e.SgdsIconButton=lr,e.SgdsIconCard=wl,e.SgdsIconList=xl,e.SgdsImageCard=_l,e.SgdsInput=Kr,e.SgdsLink=da,e.SgdsMainnav=Ll,e.SgdsMainnavDropdown=Hl,e.SgdsMainnavItem=Rl,e.SgdsMasthead=Ul,e.SgdsModal=Kl,e.SgdsOverflowMenu=oa,e.SgdsPagination=Xl,e.SgdsProgressBar=sd,e.SgdsQuantityToggle=ad,e.SgdsRadio=nd,e.SgdsRadioGroup=ld,e.SgdsSelect=hd,e.SgdsSelectOption=cd,e.SgdsSidenav=pd,e.SgdsSidenavItem=vd,e.SgdsSidenavLink=fd,e.SgdsSkeleton=wd,e.SgdsSpinner=nr,e.SgdsStepper=xd,e.SgdsSubnav=Sd,e.SgdsSubnavItem=$d,e.SgdsSwitch=Dd,e.SgdsSystemBanner=Ed,e.SgdsTab=Pd,e.SgdsTabGroup=Ld,e.SgdsTabPanel=Hd,e.SgdsTable=Rd,e.SgdsTableCell=Nd,e.SgdsTableHead=qd,e.SgdsTableOfContents=Kd,e.SgdsTableRow=jd,e.SgdsTextarea=Xd,e.SgdsThumbnailCard=Jd,e.SgdsToast=tc,e.SgdsToastContainer=ic,e.SgdsTooltip=ji,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
3712
3744
|
//# sourceMappingURL=index.umd.min.js.map
|