@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
package/index.umd.min.js
CHANGED
|
@@ -15,7 +15,7 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
const C=globalThis,S=e=>{C.emitLitDebugLogEvents&&C.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let M,$=0;C.litIssuedWarnings??=new Set,M=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",C.litIssuedWarnings.has(t)||(console.warn(t),C.litIssuedWarnings.add(t))},M("dev-mode","Lit is in dev mode. Not recommended for production!");const D=C.ShadyDOM?.inUse&&!0===C.ShadyDOM?.noPatch?C.ShadyDOM.wrap:e=>e,V=C.trustedTypes,A=V?V.createPolicy("lit-html",{createHTML:e=>e}):void 0,E=e=>e,I=(e,t,s)=>E,B=e=>{if(oe!==I)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");oe=e},P=()=>{oe=I},L=(e,t,s)=>oe(e,t,s),T="$lit$",F=`lit$${Math.random().toFixed(9).slice(2)}$`,Z="?"+F,H=`<${Z}>`,z=document,R=()=>z.createComment(""),O=e=>null===e||"object"!=typeof e&&"function"!=typeof e,N=Array.isArray,U=e=>N(e)||"function"==typeof e?.[Symbol.iterator],q="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,W=/>/g,K=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,X=/"/g,Q=/^(?:script|style|textarea|title)$/i,J=(ee=1,(e,...t)=>(e.some((e=>void 0===e))&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some((e=>e?._$litStatic$))&&M("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),se=Symbol.for("lit-nothing"),ie=new WeakMap,ae=z.createTreeWalker(z,129);let oe=I;function ne(e,t){if(!N(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==A?A.createHTML(t):t}const re=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=Y;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===Y){if("!--"===l[1])n=j;else if(void 0!==l[1])n=W;else if(void 0!==l[2])Q.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=K;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===K?">"===l[0]?(n=a??Y,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?K:'"'===l[3]?X:G):n===X||n===G?n=K:n===j||n===W?n=Y:(n=K,a=void 0);console.assert(-1===d||n===K||n===G||n===X,"unexpected parse state B");const h=n===K&&e[t+1].startsWith("/>")?" ":"";o+=n===Y?s+H:d>=0?(i.push(r),s.slice(0,d)+T+s.slice(d)+F+h):s+F+(-2===d?t:h)}return[ne(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class le{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]=re(e,t);if(this.el=le.createElement(l,s),ae.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=ae.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(F)){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);M("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(T)){const t=d[o++],s=i.getAttribute(e).split(F),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?pe:"?"===n[1]?ge:"@"===n[1]?ve:ue}),i.removeAttribute(e)}else e.startsWith(F)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(Q.test(i.tagName)){const e=i.textContent.split(F),t=e.length-1;if(t>0){i.textContent=V?V.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],R()),ae.nextNode(),r.push({type:2,index:++a});i.append(e[t],R())}}}else if(8===i.nodeType){if(i.data===Z)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(F,e+1));)r.push({type:7,index:a}),e+=F.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("${...}")+"`");S&&S({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const s=z.createElement("template");return s.innerHTML=e,s}}function de(e,t,s=e,i){if(t===te)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=O(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=de(e,a._$resolve(e,t.values),a,i)),t}class ce{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??z).importNode(t,!0);ae.currentNode=i;let a=ae.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new he(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new me(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=ae.nextNode(),o++)}return ae.currentNode=z,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(S&&S({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 he{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=se,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=de(this,e,t),O(e))e===se||null==e||""===e?(this._$committedValue!==se&&(S&&S({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=se):e!==this._$committedValue&&e!==te&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else U(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(),oe!==I){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)}}S&&S({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==se&&O(this._$committedValue)){const t=D(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=L(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=z.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=L(t,"data","property")),e=this._textSanitizer(e),S&&S({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=le.createElement(ne(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)S&&S({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 ce(i,this),s=e._clone(this.options);S&&S({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),e._update(t),S&&S({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=ie.get(e.strings);return void 0===t&&ie.set(e.strings,t=new le(e)),t}_commitIterable(e){N(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 he(this._insert(R()),this._insert(R()),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 ue{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=se,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=se,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=de(this,e,t,0),o=!O(e)||e!==this._$committedValue&&e!==te,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=de(this,i[s+n],t,n),r===te&&(r=this._$committedValue[n]),o||=!O(r)||r!==this._$committedValue[n],r===se?e=se:e!==se&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===se?D(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"attribute")),e=this._sanitizer(e??""),S&&S({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),D(this.element).setAttribute(this.name,e??""))}}class pe extends ue{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"property")),e=this._sanitizer(e),S&&S({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===se?void 0:e}}class ge extends ue{constructor(){super(...arguments),this.type=4}_commitValue(e){S&&S({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===se),options:this.options}),D(this.element).toggleAttribute(this.name,!!e&&e!==se)}}class ve extends ue{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=de(this,e,t,0)??se)===te)return;const s=this._$committedValue,i=e===se&&s!==se||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==se&&(s===se||i);S&&S({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 me{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){S&&S({kind:"commit to element binding",element:this.element,value:e,options:this.options}),de(this,e)}}const fe={_boundAttributeSuffix:T,_marker:F,_markerMatch:Z,_HTML_RESULT:1,_getTemplateHtml:re,_TemplateInstance:ce,_isIterable:U,_resolveDirective:de,_ChildPart:he,_AttributePart:ue,_BooleanAttributePart:ge,_EventPart:ve,_PropertyPart:pe,_ElementPart:me},be=C.litHtmlPolyfillSupportDevMode;be?.(le,he),(C.litHtmlVersions??=[]).push("3.2.0"),C.litHtmlVersions.length>1&&M("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const we=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=$++,a=s?.renderBefore??t;let o=a._$litPart$;if(S&&S({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 he(t.insertBefore(R(),e),e,void 0,s??{})}return o._$setValue(e),S&&S({kind:"end render",id:i,value:e,container:t,options:s,part:o}),o};we.setSanitizer=B,we.createSanitizer=L,we._testOnlyClearSanitizerFactoryDoNotCallOrElse=P;
|
|
18
|
+
const C=globalThis,S=e=>{C.emitLitDebugLogEvents&&C.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let M,$=0;C.litIssuedWarnings??=new Set,M=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",C.litIssuedWarnings.has(t)||(console.warn(t),C.litIssuedWarnings.add(t))},M("dev-mode","Lit is in dev mode. Not recommended for production!");const A=C.ShadyDOM?.inUse&&!0===C.ShadyDOM?.noPatch?C.ShadyDOM.wrap:e=>e,D=C.trustedTypes,V=D?D.createPolicy("lit-html",{createHTML:e=>e}):void 0,E=e=>e,I=(e,t,s)=>E,B=e=>{if(oe!==I)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");oe=e},P=()=>{oe=I},L=(e,t,s)=>oe(e,t,s),T="$lit$",F=`lit$${Math.random().toFixed(9).slice(2)}$`,Z="?"+F,H=`<${Z}>`,z=document,R=()=>z.createComment(""),O=e=>null===e||"object"!=typeof e&&"function"!=typeof e,N=Array.isArray,U=e=>N(e)||"function"==typeof e?.[Symbol.iterator],q="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,W=/>/g,K=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,X=/"/g,Q=/^(?:script|style|textarea|title)$/i,J=(ee=1,(e,...t)=>(e.some((e=>void 0===e))&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some((e=>e?._$litStatic$))&&M("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),se=Symbol.for("lit-nothing"),ie=new WeakMap,ae=z.createTreeWalker(z,129);let oe=I;function ne(e,t){if(!N(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==V?V.createHTML(t):t}const re=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=Y;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===Y){if("!--"===l[1])n=j;else if(void 0!==l[1])n=W;else if(void 0!==l[2])Q.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=K;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===K?">"===l[0]?(n=a??Y,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?K:'"'===l[3]?X:G):n===X||n===G?n=K:n===j||n===W?n=Y:(n=K,a=void 0);console.assert(-1===d||n===K||n===G||n===X,"unexpected parse state B");const h=n===K&&e[t+1].startsWith("/>")?" ":"";o+=n===Y?s+H:d>=0?(i.push(r),s.slice(0,d)+T+s.slice(d)+F+h):s+F+(-2===d?t:h)}return[ne(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class le{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]=re(e,t);if(this.el=le.createElement(l,s),ae.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=ae.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(F)){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);M("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(T)){const t=d[o++],s=i.getAttribute(e).split(F),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?pe:"?"===n[1]?ge:"@"===n[1]?ve:ue}),i.removeAttribute(e)}else e.startsWith(F)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(Q.test(i.tagName)){const e=i.textContent.split(F),t=e.length-1;if(t>0){i.textContent=D?D.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],R()),ae.nextNode(),r.push({type:2,index:++a});i.append(e[t],R())}}}else if(8===i.nodeType){if(i.data===Z)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(F,e+1));)r.push({type:7,index:a}),e+=F.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("${...}")+"`");S&&S({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const s=z.createElement("template");return s.innerHTML=e,s}}function de(e,t,s=e,i){if(t===te)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=O(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=de(e,a._$resolve(e,t.values),a,i)),t}class ce{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??z).importNode(t,!0);ae.currentNode=i;let a=ae.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new he(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new me(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=ae.nextNode(),o++)}return ae.currentNode=z,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(S&&S({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 he{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=se,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=de(this,e,t),O(e))e===se||null==e||""===e?(this._$committedValue!==se&&(S&&S({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=se):e!==this._$committedValue&&e!==te&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else U(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(),oe!==I){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)}}S&&S({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==se&&O(this._$committedValue)){const t=A(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=L(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=z.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=L(t,"data","property")),e=this._textSanitizer(e),S&&S({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=le.createElement(ne(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)S&&S({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 ce(i,this),s=e._clone(this.options);S&&S({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),e._update(t),S&&S({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=ie.get(e.strings);return void 0===t&&ie.set(e.strings,t=new le(e)),t}_commitIterable(e){N(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 he(this._insert(R()),this._insert(R()),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 ue{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=se,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=se,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=de(this,e,t,0),o=!O(e)||e!==this._$committedValue&&e!==te,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=de(this,i[s+n],t,n),r===te&&(r=this._$committedValue[n]),o||=!O(r)||r!==this._$committedValue[n],r===se?e=se:e!==se&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===se?A(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"attribute")),e=this._sanitizer(e??""),S&&S({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),A(this.element).setAttribute(this.name,e??""))}}class pe extends ue{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"property")),e=this._sanitizer(e),S&&S({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===se?void 0:e}}class ge extends ue{constructor(){super(...arguments),this.type=4}_commitValue(e){S&&S({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===se),options:this.options}),A(this.element).toggleAttribute(this.name,!!e&&e!==se)}}class ve extends ue{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=de(this,e,t,0)??se)===te)return;const s=this._$committedValue,i=e===se&&s!==se||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==se&&(s===se||i);S&&S({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 me{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){S&&S({kind:"commit to element binding",element:this.element,value:e,options:this.options}),de(this,e)}}const fe={_boundAttributeSuffix:T,_marker:F,_markerMatch:Z,_HTML_RESULT:1,_getTemplateHtml:re,_TemplateInstance:ce,_isIterable:U,_resolveDirective:de,_ChildPart:he,_AttributePart:ue,_BooleanAttributePart:ge,_EventPart:ve,_PropertyPart:pe,_ElementPart:me},be=C.litHtmlPolyfillSupportDevMode;be?.(le,he),(C.litHtmlVersions??=[]).push("3.2.0"),C.litHtmlVersions.length>1&&M("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const we=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=$++,a=s?.renderBefore??t;let o=a._$litPart$;if(S&&S({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 he(t.insertBefore(R(),e),e,void 0,s??{})}return o._$setValue(e),S&&S({kind:"end render",id:i,value:e,container:t,options:s,part:o}),o};we.setSanitizer=B,we.createSanitizer=L,we._testOnlyClearSanitizerFactoryDoNotCallOrElse=P;
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2019 Google LLC
|
|
@@ -26,7 +26,7 @@ const ye=globalThis,xe=ye.ShadowRoot&&(void 0===ye.ShadyCSS||ye.ShadyCSS.nativeS
|
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/,{is:De,defineProperty:Ve,getOwnPropertyDescriptor:Ae,getOwnPropertyNames:Ee,getOwnPropertySymbols:Ie,getPrototypeOf:Be}=Object,Pe=globalThis;let Le;const Te=Pe.trustedTypes,Fe=Te?Te.emptyScript:"",Ze=Pe.reactiveElementPolyfillSupportDevMode;{const e=Pe.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!"),Pe.ShadyDOM?.inUse&&void 0===Ze&&Le("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const He=(e,t)=>e,ze={toAttribute(e,t){switch(t){case Boolean:e=e?Fe: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}},Re=(e,t)=>!De(e,t),Oe={attribute:!0,type:String,converter:ze,reflect:!1,hasChanged:Re};Symbol.metadata??=Symbol("metadata"),Pe.litPropertyMetadata??=new WeakMap;class Ne extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=Oe){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}=Ae(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==i){if("value"in(Ae(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)??Oe}static __prepare(){if(this.hasOwnProperty(He("elementProperties")))return;const e=Be(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(He("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(He("properties"))){const e=this.properties,t=[...Ee(e),...Ie(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($e(e))}else void 0!==e&&t.push($e(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(xe)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const s of t){const t=document.createElement("style"),i=ye.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:ze).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:ze;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??Re)(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"},Pe.emitLitDebugLogEvents&&Pe.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter((e=>this.hasOwnProperty(e)&&e in Be(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){}}Ne.elementStyles=[],Ne.shadowRootOptions={mode:"open"},Ne[He("elementProperties")]=new Map,Ne[He("finalized")]=new Map,Ze?.({ReactiveElement:Ne});{Ne.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(He("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Ne.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Ne.disableWarning=function(t){e(this);const s=this.enabledWarnings.indexOf(t);s>=0&&this.enabledWarnings.splice(s,1)}}(Pe.reactiveElementVersions??=[]).push("2.0.4"),Pe.reactiveElementVersions.length>1&&Le("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
|
|
29
|
+
*/,{is:Ae,defineProperty:De,getOwnPropertyDescriptor:Ve,getOwnPropertyNames:Ee,getOwnPropertySymbols:Ie,getPrototypeOf:Be}=Object,Pe=globalThis;let Le;const Te=Pe.trustedTypes,Fe=Te?Te.emptyScript:"",Ze=Pe.reactiveElementPolyfillSupportDevMode;{const e=Pe.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!"),Pe.ShadyDOM?.inUse&&void 0===Ze&&Le("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const He=(e,t)=>e,ze={toAttribute(e,t){switch(t){case Boolean:e=e?Fe: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}},Re=(e,t)=>!Ae(e,t),Oe={attribute:!0,type:String,converter:ze,reflect:!1,hasChanged:Re};Symbol.metadata??=Symbol("metadata"),Pe.litPropertyMetadata??=new WeakMap;class Ne extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=Oe){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&&De(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:a}=Ve(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==i){if("value"in(Ve(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)??Oe}static __prepare(){if(this.hasOwnProperty(He("elementProperties")))return;const e=Be(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(He("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(He("properties"))){const e=this.properties,t=[...Ee(e),...Ie(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($e(e))}else void 0!==e&&t.push($e(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(xe)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const s of t){const t=document.createElement("style"),i=ye.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:ze).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:ze;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??Re)(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"},Pe.emitLitDebugLogEvents&&Pe.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter((e=>this.hasOwnProperty(e)&&e in Be(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){}}Ne.elementStyles=[],Ne.shadowRootOptions={mode:"open"},Ne[He("elementProperties")]=new Map,Ne[He("finalized")]=new Map,Ze?.({ReactiveElement:Ne});{Ne.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(He("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Ne.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Ne.disableWarning=function(t){e(this);const s=this.enabledWarnings.indexOf(t);s>=0&&this.enabledWarnings.splice(s,1)}}(Pe.reactiveElementVersions??=[]).push("2.0.4"),Pe.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 ht=1,ut=2,pt=3,gt=4,vt=e=>(...t)=>({_$litDirective$:e,values:t});class mt{
|
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2018 Google LLC
|
|
84
84
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
85
|
-
*/const ft=vt(class extends mt{constructor(e){if(super(e),e.type!==ht||"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 te}});function bt(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:wt()?0:null==s?void 0:s.duration}));a.addEventListener("cancel",i,{once:!0}),a.addEventListener("finish",i,{once:!0})}))}function wt(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function yt(e,t){return e.map((e=>Object.assign(Object.assign({},e),{height:"auto"===e.height?`${t}px`:e.height})))}function xt(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 kt=new Map,_t=new WeakMap;function Ct(e,t){const s=_t.get(e);if(null==s?void 0:s[t])return s[t];const i=kt.get(t);return i||{keyframes:[],options:{duration:0}}}function St(e,t){kt.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function Mt(e,t){return new Promise((s=>{e.addEventListener(t,(function i(a){a.target===e&&(e.removeEventListener(t,i),s())}))}))}function $t(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
|
|
85
|
+
*/const ft=vt(class extends mt{constructor(e){if(super(e),e.type!==ht||"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 te}});function bt(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:wt()?0:null==s?void 0:s.duration}));a.addEventListener("cancel",i,{once:!0}),a.addEventListener("finish",i,{once:!0})}))}function wt(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function yt(e,t){return e.map((e=>Object.assign(Object.assign({},e),{height:"auto"===e.height?`${t}px`:e.height})))}function xt(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 kt=new Map,_t=new WeakMap;function Ct(e,t){const s=_t.get(e);if(null==s?void 0:s[t])return s[t];const i=kt.get(t);return i||{keyframes:[],options:{duration:0}}}function St(e,t){kt.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function Mt(e,t){return new Promise((s=>{e.addEventListener(t,(function i(a){a.target===e&&(e.removeEventListener(t,i),s())}))}))}function $t(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 At=Se`: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 Dt extends rt{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 xt(this.body),this.body.classList.remove("hidden");const{keyframes:e,options:t}=Ct(this,"accordion.show");await bt(this.body,yt(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 xt(this.body);const{keyframes:e,options:t}=Ct(this,"accordion.hide"),s=t.duration;setTimeout((()=>{this.body.classList.add("hidden")}),s-20),await bt(this.body,yt(e,this.body.scrollHeight),t),this.emit("sgds-after-hide")}}async show(){if(!this.open)return this.open=!0,Mt(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,Mt(this,"sgds-after-hide")}render(){const e=this.hasUpdated;return J`
|
|
86
86
|
<div class="accordion-item">
|
|
87
87
|
<button
|
|
88
88
|
class=${ft({"accordion-btn":!0,disabled:this.disabled,collapsed:!this.open})}
|
|
@@ -106,23 +106,17 @@ const ht=1,ut=2,pt=3,gt=4,vt=e=>(...t)=>({_$litDirective$:e,values:t});class mt{
|
|
|
106
106
|
<slot id="content" name="content" class="content" role="region" aria-labelledby="header"></slot>
|
|
107
107
|
</div>
|
|
108
108
|
</div>
|
|
109
|
-
`}}function
|
|
109
|
+
`}}function Vt(e,t){customElements.get(e)||customElements.define(e,t)}function Et(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)}Dt.styles=[...rt.styles,At],e([st(".accordion-item")],Dt.prototype,"accordion",void 0),e([st(".accordion-btn")],Dt.prototype,"header",void 0),e([st(".accordion-body")],Dt.prototype,"body",void 0),e([Qe({type:Boolean,reflect:!0})],Dt.prototype,"open",void 0),e([Qe({type:Boolean,reflect:!0})],Dt.prototype,"disabled",void 0),e([$t("open",{waitUntilFirstUpdate:!0})],Dt.prototype,"handleOpenChange",null),St("accordion.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:350,easing:"ease-in-out"}}),St("accordion.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:350,easing:"ease-in-out"}}),Vt("sgds-accordion",ct),Vt("sgds-accordion-item",Dt);
|
|
110
110
|
/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2020 Google LLC
|
|
113
113
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
114
114
|
*/
|
|
115
|
-
const It=Symbol.for(""),Bt=e=>{if(e?.r===It)return e?._$litStatic$},Pt=(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:It}),Lt=new Map,Tt=(Ft=J,(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=Bt(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=Lt.get(s))&&(o.raw=o,Lt.set(s,e=o)),t=n}return Ft(e,...t)});var Ft;
|
|
116
|
-
|
|
117
|
-
* @license
|
|
118
|
-
* Copyright 2018 Google LLC
|
|
119
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
120
|
-
*/
|
|
121
|
-
const Zt=e=>e??se;var Ht=Se`: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)}`;class zt extends rt{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),Et("sgds-icon")}render(){return J`
|
|
122
|
-
<button class="btn-close" aria-label=${Zt(this.ariaLabel)} @click=${this._handleClick}>
|
|
115
|
+
const It=Symbol.for(""),Bt=e=>{if(e?.r===It)return e?._$litStatic$},Pt=(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:It}),Lt=new Map,Tt=(Ft=J,(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=Bt(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=Lt.get(s))&&(o.raw=o,Lt.set(s,e=o)),t=n}return Ft(e,...t)});var Ft,Zt=Se`: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)}`;class Ht extends rt{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),Et("sgds-icon")}render(){return J`
|
|
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=[...rt.styles,Zt],e([Qe({type:String,reflect:!0})],Ht.prototype,"size",void 0),e([Qe({type:String,reflect:!0})],Ht.prototype,"tone",void 0);const zt={archive:J`
|
|
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 Zt=e=>e??se;var Ht=Se`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2011
2005
|
clip-rule="evenodd"
|
|
2012
2006
|
/>
|
|
2013
2007
|
</svg>
|
|
2014
|
-
`};var
|
|
2008
|
+
`};var Rt=Se`: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 rt{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||se}}Ot.styles=[...rt.styles,Rt],e([Qe({type:String,reflect:!0})],Ot.prototype,"name",void 0),e([Qe({type:String,reflect:!0})],Ot.prototype,"size",void 0);var Nt=Se`: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 rt{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="${ft({alert:!0,show:this.show,"alert-dismissible":this.dismissible,outlined:this.outlined})}"
|
|
2017
2011
|
role="alert"
|
|
@@ -2025,12 +2019,18 @@ const Zt=e=>e??se;var Ht=Se`: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>`:se}
|
|
2030
2024
|
</div>
|
|
2031
|
-
`:se}}
|
|
2032
|
-
|
|
2033
|
-
|
|
2025
|
+
`:se}}Ut.styles=[...rt.styles,Nt],Ut.dependencies={"sgds-close-button":Ht,"sgds-icon":Ot},e([Qe({type:Boolean,reflect:!0})],Ut.prototype,"show",void 0),e([Qe({type:Boolean,reflect:!0})],Ut.prototype,"dismissible",void 0),e([Qe({type:String,reflect:!0})],Ut.prototype,"variant",void 0),e([Qe({type:Boolean,reflect:!0})],Ut.prototype,"outlined",void 0),e([Qe({type:String,reflect:!0})],Ut.prototype,"title",void 0),e([$t("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??se;var Yt=Se`: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=Se`::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 rt{render(){return Tt`
|
|
2032
|
+
<a class="alert-link" href=${qt(this.href)} target=${qt(this.target)} tabindex="0"><slot></slot></a>
|
|
2033
|
+
`}}Wt.styles=[...rt.styles,jt,Yt],e([Qe({type:String,reflect:!0})],Wt.prototype,"href",void 0),e([Qe()],Wt.prototype,"target",void 0),Vt("sgds-alert",Ut),Vt("sgds-alert-link",Wt);var Kt=Se`: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
|
|
2036
2036
|
* Copyright 2020 Google LLC
|
|
@@ -2040,7 +2040,7 @@ const Zt=e=>e??se;var Ht=Se`: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=vt(class extends hs{render(e){return se}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)),se}_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 Vs(e){return"y"===e?"height":"width"}const As=new Set(["top","bottom"]);function Es(e){return As.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=Vs(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 Ls=["left","right"],Ts=["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?Ts:Ls:t?Ls:Ts;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=Vs(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 Vi=25;const Ai=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<=Vi&&(o-=n)}else d<=Vi&&(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 Li(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 Ti(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=Li(e,t);for(;i&&oi(i)&&Pi(i);)i=Li(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&&Ai.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:Ti,getElementRects:async function(e){const t=this.getOffsetParent||Ti,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 V;const e=null==(V=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:V[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=Se`: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 rt{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 J`
|
|
2043
|
+
*/const us=()=>new ps;class ps{}const gs=new WeakMap;const vs=vt(class extends hs{render(e){return se}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)),se}_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 Ls=["left","right"],Ts=["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?Ts:Ls:t?Ls:Ts;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 Li(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 Ti(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=Li(e,t);for(;i&&oi(i)&&Pi(i);)i=Li(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:Ti,getElementRects:async function(e){const t=this.getOffsetParent||Ti,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=Se`: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 rt{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 J`
|
|
2044
2044
|
<div ${vs(this._myTooltip)} class="tooltip-placeholder">
|
|
2045
2045
|
<slot @slotchange=${()=>this._handleSlotChange()}></slot>
|
|
2046
2046
|
${this.open?J`<div ${vs(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
|
|
@@ -2060,11 +2060,11 @@ const Zt=e=>e??se;var Ht=Se`: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>`:se}
|
|
2065
2065
|
</div>`}render(){return this.dismissible&&this.show||!this.dismissible?this.truncated?J`<sgds-tooltip content=${this.text} @sgds-hide=${e=>e.stopPropagation()}
|
|
2066
2066
|
>${this._renderBadge()}</sgds-tooltip
|
|
2067
|
-
>`:this._renderBadge():se}}Ki.styles=[...rt.styles,Kt],Ki.dependencies={"sgds-close-button":
|
|
2067
|
+
>`:this._renderBadge():se}}Ki.styles=[...rt.styles,Kt],Ki.dependencies={"sgds-close-button":Ht,"sgds-tooltip":ji},e([Qe({type:Boolean,reflect:!0})],Ki.prototype,"show",void 0),e([Qe({reflect:!0})],Ki.prototype,"variant",void 0),e([Qe({type:Boolean,reflect:!0})],Ki.prototype,"outlined",void 0),e([Qe({type:Boolean,reflect:!0})],Ki.prototype,"dismissible",void 0),e([Qe({type:Boolean,reflect:!0})],Ki.prototype,"fullWidth",void 0),e([Je()],Ki.prototype,"truncated",void 0),e([Je()],Ki.prototype,"text",void 0),e([$t("show")],Ki.prototype,"_handleShowChange",null),e([$t("text")],Ki.prototype,"_handleTruncation",null),Vt("sgds-badge",Ki);var Gi=Se`: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 rt{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`})}}e([Qe({type:Boolean,state:!0})],Qi.prototype,"noFlip",void 0),e([Qe({type:Boolean,reflect:!0,state:!0})],Qi.prototype,"menuAlignRight",void 0),e([Qe({type:String,reflect:!0,state:!0})],Qi.prototype,"drop",void 0),e([Qe({type:Object})],Qi.prototype,"floatingOpts",void 0),e([Qe({type:Boolean,reflect:!0})],Qi.prototype,"menuIsOpen",void 0),e([Qe({type:Boolean,reflect:!0})],Qi.prototype,"disabled",void 0),e([Qe({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,e([st("ul.dropdown-menu")],Ji.prototype,"menu",void 0),e([Je()],Ji.prototype,"nextDropdownItemNo",void 0),e([Je()],Ji.prototype,"prevDropdownItemNo",void 0),e([Qe({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var ea=Se`: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=Se`.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 J`
|
|
2068
2068
|
<div class="dropdown">
|
|
2069
2069
|
<div
|
|
2070
2070
|
class="toggler-container"
|
|
@@ -2086,21 +2086,21 @@ const Zt=e=>e??se;var Ht=Se`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
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},e([at({flatten:!0})],aa.prototype,"anchor",void 0),e([Qe({type:Boolean})],aa.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],aa.prototype,"disabled",void 0);class oa extends rt{constructor(){super(...arguments),this.size="md"}render(){return J`
|
|
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=[...rt.styles,Gi],oa.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":
|
|
2097
|
-
<div aria-label=${
|
|
2096
|
+
`}}oa.styles=[...rt.styles,Gi],oa.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":Ot},e([Qe({type:String,reflect:!0})],oa.prototype,"size",void 0);var na=Se`.breadcrumb{display:flex;gap:var(--sgds-gap-xs)}`;class ra extends rt{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=[...rt.styles,na],ra.dependencies={"sgds-overflow-menu":oa},e([Qe({type:String})],ra.prototype,"ariaLabel",void 0),e([st("slot")],ra.prototype,"defaultSlot",void 0);var la=Se`: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 rt{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 J`<slot class="nav-link" @slotchange=${this._handleSlotChange}></slot>`}}da.styles=[...rt.styles,la],e([Qe({type:String,reflect:!0})],da.prototype,"size",void 0),e([Qe({type:String,reflect:!0})],da.prototype,"variant",void 0);var ca=Se`: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 rt{constructor(){super(...arguments),this.active=!1}render(){return J`
|
|
2103
|
-
<slot class="nav-link"></slot>
|
|
2102
|
+
`}}ra.styles=[...rt.styles,na],ra.dependencies={"sgds-overflow-menu":oa},e([Qe({type:String})],ra.prototype,"ariaLabel",void 0),e([st("slot")],ra.prototype,"defaultSlot",void 0);var la=Se`: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 rt{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 J`<slot class="nav-link " @slotchange=${this._handleSlotChange}></slot> `}}da.styles=[...rt.styles,la],e([Qe({type:String,reflect:!0})],da.prototype,"size",void 0),e([Qe({type:String,reflect:!0})],da.prototype,"variant",void 0),e([Qe({type:String,reflect:!0})],da.prototype,"tone",void 0),e([Qe({type:Boolean,reflect:!0})],da.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],da.prototype,"disabled",void 0);var ca=Se`: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 rt{constructor(){super(...arguments),this.active=!1}render(){return J`
|
|
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,33 +2111,33 @@ const Zt=e=>e??se;var Ht=Se`: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},e([Qe({type:Boolean,reflect:!0})],ha.prototype,"active",void 0),Vt("sgds-breadcrumb",ra),Vt("sgds-breadcrumb-item",ha);var ua=Se`: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 rt{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=[...rt.styles,ua],e([st(".btn")],pa.prototype,"button",void 0),e([Qe({reflect:!0})],pa.prototype,"variant",void 0),e([Qe({reflect:!0})],pa.prototype,"tone",void 0),e([Qe({reflect:!0})],pa.prototype,"size",void 0),e([Qe({type:Boolean,reflect:!0})],pa.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],pa.prototype,"disabled",void 0),e([Qe({type:String,reflect:!0})],pa.prototype,"href",void 0),e([Qe({type:String,reflect:!0})],pa.prototype,"target",void 0),e([Qe({type:String,reflect:!0})],pa.prototype,"download",void 0),e([Qe({type:String})],pa.prototype,"ariaLabel",void 0),e([Qe({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=Se`: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?Pt`a`:Pt`button`,s=!this.hasLeftIconSlot&&!this.hasRightIconSlot;return Tt`
|
|
2115
2115
|
<${t}
|
|
2116
2116
|
class="btn ${ft({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>`}
|
|
2138
2138
|
|
|
2139
2139
|
</${t}>
|
|
2140
|
-
`}}ma.styles=[...pa.styles,jt,va],e([Qe({type:String,reflect:!0})],ma.prototype,"type",void 0),e([Qe({type:String,reflect:!0})],ma.prototype,"form",void 0),e([Qe({type:String,reflect:!0,attribute:"formaction"})],ma.prototype,"formAction",void 0),e([Qe({type:String,reflect:!0,attribute:"formmethod"})],ma.prototype,"formMethod",void 0),e([Qe({attribute:"formnovalidate",type:Boolean,reflect:!0})],ma.prototype,"formNoValidate",void 0),e([Qe({type:String,reflect:!0,attribute:"formtarget"})],ma.prototype,"formTarget",void 0),e([Qe({type:Boolean,reflect:!0})],ma.prototype,"fullWidth",void 0),e([Qe({type:Boolean})],ma.prototype,"hasLeftIconSlot",void 0),e([Qe({type:Boolean})],ma.prototype,"hasRightIconSlot",void 0),At("sgds-button",ma);var fa=Se`:host([disabled]){cursor:not-allowed}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([orientation=horizontal]) .card{flex-direction:row}:host(:not([hideBorder])) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([orientation=horizontal]) .card-body{flex:1}:host([orientation=horizontal]) .card-media{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-xl)}:host([orientation=horizontal]) .card-image{width:40%}:host([imagePosition=after]) .card-image{order:1}:host([orientation=vertical][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-left-radius:var(--sgds-border-radius-none);border-top-right-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-bottom-left-radius:var(--sgds-border-radius-none);border-top-left-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal]) slot[name=image]::slotted(img){border-bottom-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:var(--sgds-border-radius-none);height:100%;object-fit:cover}:host([orientation=vertical][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-none)}:host([orientation][imageAdjustment="padding around"]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1))}:host([orientation=vertical]:not([imageAdjustment="aspect ratio"])) slot[name=image]::slotted(img){height:auto}:host([orientation=vertical][imageAdjustment="aspect ratio"]) slot[name=image]::slotted(img){object-fit:cover}.card{word-wrap:break-word;background-clip:border-box;background-color:var(--sgds-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);box-shadow:none;display:flex;flex-direction:column;height:100%;min-width:0;position:relative;transition:box-shadow .3s ease}a.card{color:initial;text-decoration:none}@media (prefers-reduced-motion:reduce){.card{transition:none}}.card.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}a.card:not(.disabled):focus-visible{--sgds-outline-offset-focus:-1px;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.card-tinted-bg{border-radius:var(--sgds-border-radius-md);bottom:0;left:0;opacity:var(--sgds-opacity-0);position:absolute;right:0;top:0}.card-image{flex:1;position:relative}.card-media{align-items:flex-start;display:flex;justify-content:space-between;line-height:0;padding:var(--sgds-padding-xl) var(--sgds-padding-xl) var(--sgds-padding-none)}.card-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-xl);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-title{--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);color:var(--sgds-body-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);margin-bottom:var(--sgds-margin-none)}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-1)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-wide)!important;line-height:var(--sgds-line-height-20)!important;margin:var(--sgds-margin-none)!important;text-transform:uppercase}slot[name=title]::slotted(a){--sgds-font-size-2:var(--sgds-font-size-4);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-link-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);text-decoration:none!important}slot[name=description]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);color:var(--sgds-color-subtle);margin-bottom:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}slot[name=image]::slotted(img){border-top-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));display:block;width:100%}slot[name=footer]::slotted(*),slot[name=link]::slotted(*){margin-top:auto;padding-top:var(--sgds-padding-sm);width:fit-content}slot[name=footer]::slotted(a),slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=footer]::slotted(a:focus),slot[name=footer]::slotted(a:hover),slot[name=link]::slotted(a:focus),slot[name=link]::slotted(a:hover),slot[name=title]::slotted(a:focus),slot[name=title]::slotted(a:hover){color:var(--sgds-link-color-emphasis)}slot[name=footer]::slotted(a:focus-visible),slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`,ba=Se`.text-primary{color:var(--sgds-primary-rgb)!important}.text-secondary{color:var(--sgds-secondary-rgb)!important}.text-success{color:var(--sgds-success-rgb)!important}.text-info{color:var(--sgds-info-rgb)!important}.text-warning{color:var(--sgds-warning-rgb)!important}.text-danger{color:var(--sgds-danger-rgb)!important}.text-light{color:var(--sgds-light-rgb)!important}.text-dark{color:var(--sgds-dark-rgb)!important}.text-muted{color:var(--sgds-secondary-color)!important}`,wa=Se`.bg-primary{background-color:var(--sgds-primary)!important}.bg-secondary{background-color:var(--sgds-secondary)!important}.bg-success{background-color:var(--sgds-success)!important}.bg-info{background-color:var(--sgds-info)!important}.bg-warning{background-color:var(--sgds-warning)!important}.bg-danger{background-color:var(--sgds-danger)!important}.bg-light{background-color:var(--sgds-light)!important}.bg-dark{background-color:var(--sgds-dark)!important}`,ya=Se`.border-primary{border-color:var(--sgds-primary)!important}.border-secondary{border-color:var(--sgds-secondary)!important}.border-success{border-color:var(--sgds-success)!important}.border-info{border-color:var(--sgds-info)!important}.border-warning{border-color:var(--sgds-warning)!important}.border-danger{border-color:var(--sgds-danger)!important}.border-light{border-color:var(--sgds-light)!important}.border-dark{border-color:var(--sgds-dark)!important}`,xa=Se`.h1,.h2,.h3,.h4,.h5,.h6 ::slotted(h6),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),h1,h2,h3,h4,h5,h6{color:var(--sgds-heading-color);font-weight:700;line-height:1.2;margin-bottom:.5rem;margin-top:0}.h1,::slotted(h1),h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,::slotted(h1),h1{font-size:2.5rem}}.h2,::slotted(h2),h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,::slotted(h2),h2{font-size:2rem}}.h3,::slotted(h3),h3{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h3,::slotted(h3),h3{font-size:1.5rem}}.h4,::slotted(h4),h4{font-size:1.125rem}.h5,.h6 ::slotted(h6),::slotted(h5),h5,h6{font-size:1rem}.h1,::slotted(h1),h1{line-height:1.2}.h2,::slotted(h2),h2{line-height:1.25}.h3,::slotted(h3),h3{line-height:1.33}.h4,::slotted(h4),h4{line-height:1.78}.h5,.h6 ::slotted(h6),::slotted(h5),h5,h6{line-height:1.2}`,ka=Se`p{margin-bottom:1.5rem;margin-top:0}`;class _a extends rt{constructor(){super(...arguments),this.stretchedLink=!1,this.disabled=!1,this.hideBorder=!1,this.tinted=!1,this.orientation="vertical"}handleTitleSlotChange(e){const t=e.target.assignedNodes({flatten:!0});if(this.stretchedLink&&t[0]instanceof HTMLAnchorElement){(t[0].querySelector("a")||t[0]).removeAttribute("href")}}warnLinkSlotMisused(e){if(e.target.assignedNodes({flatten:!0}).length>1)return console.error("Multiple elements passed into SgdsCard's link slot")}}_a.styles=[...rt.styles,ba,wa,ya,xa,ka,fa],e([st("a.card")],_a.prototype,"card",void 0),e([Qe({type:Boolean,reflect:!0})],_a.prototype,"stretchedLink",void 0),e([Qe({type:Boolean,reflect:!0})],_a.prototype,"disabled",void 0),e([Qe({type:Boolean,reflect:!0})],_a.prototype,"hideBorder",void 0),e([Qe({type:Boolean,reflect:!0})],_a.prototype,"tinted",void 0),e([Qe({type:String,reflect:!0})],_a.prototype,"orientation",void 0);var Ca=Se`:host([tinted]) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}slot[name=menu]::slotted(*){position:absolute;right:20px;top:20px;z-index:10}`;class Sa extends _a{constructor(){super(...arguments),this.imagePosition="before",this.imageAdjustment="default",this.hasImageSlot=!1,this.hasIconSlot=!1,this.hasUpperSlot=!1,this.hasSlotController=new Wi(this,"image","icon","upper")}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),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)}}updated(){this.hasImageSlot||(this.hasImageSlot=this.hasSlotController.test("image")),this.hasIconSlot||(this.hasIconSlot=this.hasSlotController.test("icon")),this.hasUpperSlot||(this.hasUpperSlot=this.hasSlotController.test("upper"))}handleImgSlotChange(e){e.target.assignedNodes({flatten:!0}).length>1&&console.error("Multiple elements passed into SgdsCard's image slot"),this.hasSlotController.test("image")&&this.hasSlotController.test("icon")&&console.error("Both image and icon slots cannot be used together in SgdsCard")}render(){const e=this.stretchedLink?Pt`a`:Pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return Tt`
|
|
2140
|
+
`}}ma.styles=[...pa.styles,jt,va],e([Qe({type:String,reflect:!0})],ma.prototype,"type",void 0),e([Qe({type:String,reflect:!0})],ma.prototype,"form",void 0),e([Qe({type:String,reflect:!0,attribute:"formaction"})],ma.prototype,"formAction",void 0),e([Qe({type:String,reflect:!0,attribute:"formmethod"})],ma.prototype,"formMethod",void 0),e([Qe({attribute:"formnovalidate",type:Boolean,reflect:!0})],ma.prototype,"formNoValidate",void 0),e([Qe({type:String,reflect:!0,attribute:"formtarget"})],ma.prototype,"formTarget",void 0),e([Qe({type:Boolean,reflect:!0})],ma.prototype,"fullWidth",void 0),e([Qe({type:Boolean})],ma.prototype,"hasLeftIconSlot",void 0),e([Qe({type:Boolean})],ma.prototype,"hasRightIconSlot",void 0),Vt("sgds-button",ma);var fa=Se`:host([disabled]){cursor:not-allowed}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([orientation=horizontal]) .card{flex-direction:row}:host(:not([hideBorder])) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([orientation=horizontal]) .card-body{flex:1}:host([orientation=horizontal]) .card-media{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-xl)}:host([orientation=horizontal]) .card-image{width:40%}:host([imagePosition=after]) .card-image{order:1}:host([orientation=vertical][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-left-radius:var(--sgds-border-radius-none);border-top-right-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-bottom-left-radius:var(--sgds-border-radius-none);border-top-left-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal]) slot[name=image]::slotted(img){border-bottom-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:var(--sgds-border-radius-none);height:100%;object-fit:cover}:host([orientation=vertical][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-none)}:host([orientation][imageAdjustment="padding around"]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1))}:host([orientation=vertical]:not([imageAdjustment="aspect ratio"])) slot[name=image]::slotted(img){height:auto}:host([orientation=vertical][imageAdjustment="aspect ratio"]) slot[name=image]::slotted(img){object-fit:cover}.card{word-wrap:break-word;background-clip:border-box;background-color:var(--sgds-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);box-shadow:none;display:flex;flex-direction:column;height:100%;min-width:0;position:relative;transition:box-shadow .3s ease}a.card{color:initial;text-decoration:none}@media (prefers-reduced-motion:reduce){.card{transition:none}}.card.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}a.card:not(.disabled):focus-visible{--sgds-outline-offset-focus:-1px;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.card-tinted-bg{border-radius:var(--sgds-border-radius-md);bottom:0;left:0;opacity:var(--sgds-opacity-0);position:absolute;right:0;top:0}.card-image{flex:1;position:relative}.card-media{align-items:flex-start;display:flex;justify-content:space-between;line-height:0;padding:var(--sgds-padding-xl) var(--sgds-padding-xl) var(--sgds-padding-none)}.card-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-xl);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-title{--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);color:var(--sgds-body-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);margin-bottom:var(--sgds-margin-none)}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-1)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-wide)!important;line-height:var(--sgds-line-height-20)!important;margin:var(--sgds-margin-none)!important;text-transform:uppercase}slot[name=title]::slotted(a){--sgds-font-size-2:var(--sgds-font-size-4);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-link-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);text-decoration:none!important}slot[name=description]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);color:var(--sgds-color-subtle);margin-bottom:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}slot[name=image]::slotted(img){border-top-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));display:block;width:100%}slot[name=footer]::slotted(*),slot[name=link]::slotted(*){margin-top:auto;padding-top:var(--sgds-padding-sm);width:fit-content}slot[name=footer]::slotted(a),slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=footer]::slotted(a:focus),slot[name=footer]::slotted(a:hover),slot[name=link]::slotted(a:focus),slot[name=link]::slotted(a:hover),slot[name=title]::slotted(a:focus),slot[name=title]::slotted(a:hover){color:var(--sgds-link-color-emphasis)}slot[name=footer]::slotted(a:focus-visible),slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`,ba=Se`.text-primary{color:var(--sgds-primary-rgb)!important}.text-secondary{color:var(--sgds-secondary-rgb)!important}.text-success{color:var(--sgds-success-rgb)!important}.text-info{color:var(--sgds-info-rgb)!important}.text-warning{color:var(--sgds-warning-rgb)!important}.text-danger{color:var(--sgds-danger-rgb)!important}.text-light{color:var(--sgds-light-rgb)!important}.text-dark{color:var(--sgds-dark-rgb)!important}.text-muted{color:var(--sgds-secondary-color)!important}`,wa=Se`.bg-primary{background-color:var(--sgds-primary)!important}.bg-secondary{background-color:var(--sgds-secondary)!important}.bg-success{background-color:var(--sgds-success)!important}.bg-info{background-color:var(--sgds-info)!important}.bg-warning{background-color:var(--sgds-warning)!important}.bg-danger{background-color:var(--sgds-danger)!important}.bg-light{background-color:var(--sgds-light)!important}.bg-dark{background-color:var(--sgds-dark)!important}`,ya=Se`.border-primary{border-color:var(--sgds-primary)!important}.border-secondary{border-color:var(--sgds-secondary)!important}.border-success{border-color:var(--sgds-success)!important}.border-info{border-color:var(--sgds-info)!important}.border-warning{border-color:var(--sgds-warning)!important}.border-danger{border-color:var(--sgds-danger)!important}.border-light{border-color:var(--sgds-light)!important}.border-dark{border-color:var(--sgds-dark)!important}`,xa=Se`.h1,.h2,.h3,.h4,.h5,.h6 ::slotted(h6),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),h1,h2,h3,h4,h5,h6{color:var(--sgds-heading-color);font-weight:700;line-height:1.2;margin-bottom:.5rem;margin-top:0}.h1,::slotted(h1),h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,::slotted(h1),h1{font-size:2.5rem}}.h2,::slotted(h2),h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,::slotted(h2),h2{font-size:2rem}}.h3,::slotted(h3),h3{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h3,::slotted(h3),h3{font-size:1.5rem}}.h4,::slotted(h4),h4{font-size:1.125rem}.h5,.h6 ::slotted(h6),::slotted(h5),h5,h6{font-size:1rem}.h1,::slotted(h1),h1{line-height:1.2}.h2,::slotted(h2),h2{line-height:1.25}.h3,::slotted(h3),h3{line-height:1.33}.h4,::slotted(h4),h4{line-height:1.78}.h5,.h6 ::slotted(h6),::slotted(h5),h5,h6{line-height:1.2}`,ka=Se`p{margin-bottom:1.5rem;margin-top:0}`;class _a extends rt{constructor(){super(...arguments),this.stretchedLink=!1,this.disabled=!1,this.hideBorder=!1,this.tinted=!1,this.orientation="vertical"}handleTitleSlotChange(e){const t=e.target.assignedNodes({flatten:!0});if(this.stretchedLink&&t[0]instanceof HTMLAnchorElement){(t[0].querySelector("a")||t[0]).removeAttribute("href")}}warnLinkSlotMisused(e){if(e.target.assignedNodes({flatten:!0}).length>1)return console.error("Multiple elements passed into SgdsCard's link slot")}}_a.styles=[...rt.styles,ba,wa,ya,xa,ka,fa],e([st("a.card")],_a.prototype,"card",void 0),e([Qe({type:Boolean,reflect:!0})],_a.prototype,"stretchedLink",void 0),e([Qe({type:Boolean,reflect:!0})],_a.prototype,"disabled",void 0),e([Qe({type:Boolean,reflect:!0})],_a.prototype,"hideBorder",void 0),e([Qe({type:Boolean,reflect:!0})],_a.prototype,"tinted",void 0),e([Qe({type:String,reflect:!0})],_a.prototype,"orientation",void 0);var Ca=Se`:host([tinted]) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}slot[name=menu]::slotted(*){position:absolute;right:20px;top:20px;z-index:10}`;class Sa extends _a{constructor(){super(...arguments),this.imagePosition="before",this.imageAdjustment="default",this.hasImageSlot=!1,this.hasIconSlot=!1,this.hasUpperSlot=!1,this.hasSlotController=new Wi(this,"image","icon","upper")}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),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)}}updated(){this.hasImageSlot||(this.hasImageSlot=this.hasSlotController.test("image")),this.hasIconSlot||(this.hasIconSlot=this.hasSlotController.test("icon")),this.hasUpperSlot||(this.hasUpperSlot=this.hasSlotController.test("upper"))}handleImgSlotChange(e){e.target.assignedNodes({flatten:!0}).length>1&&console.error("Multiple elements passed into SgdsCard's image slot"),this.hasSlotController.test("image")&&this.hasSlotController.test("icon")&&console.error("Both image and icon slots cannot be used together in SgdsCard")}render(){const e=this.stretchedLink?Pt`a`:Pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return Tt`
|
|
2141
2141
|
<${e}
|
|
2142
2142
|
class="card ${ft({disabled:this.disabled})}"
|
|
2143
2143
|
tabindex=${t}
|
|
@@ -2167,13 +2167,13 @@ const Zt=e=>e??se;var Ht=Se`:host{--sgds-close-btn-border-radius:var(--sgds-bord
|
|
|
2167
2167
|
</slot>
|
|
2168
2168
|
</div>
|
|
2169
2169
|
</${e}>
|
|
2170
|
-
`}}Sa.styles=[..._a.styles,Ca],e([at({slot:"footer"})],Sa.prototype,"footerNode",void 0),e([at({slot:"link"})],Sa.prototype,"linkNode",void 0),e([Qe({type:String,reflect:!0})],Sa.prototype,"imagePosition",void 0),e([Qe({type:String,reflect:!0})],Sa.prototype,"imageAdjustment",void 0),e([Qe({type:Boolean})],Sa.prototype,"hasImageSlot",void 0),e([Qe({type:Boolean})],Sa.prototype,"hasIconSlot",void 0),e([Qe({type:Boolean})],Sa.prototype,"hasUpperSlot",void 0),
|
|
2170
|
+
`}}Sa.styles=[..._a.styles,Ca],e([at({slot:"footer"})],Sa.prototype,"footerNode",void 0),e([at({slot:"link"})],Sa.prototype,"linkNode",void 0),e([Qe({type:String,reflect:!0})],Sa.prototype,"imagePosition",void 0),e([Qe({type:String,reflect:!0})],Sa.prototype,"imageAdjustment",void 0),e([Qe({type:Boolean})],Sa.prototype,"hasImageSlot",void 0),e([Qe({type:Boolean})],Sa.prototype,"hasIconSlot",void 0),e([Qe({type:Boolean})],Sa.prototype,"hasUpperSlot",void 0),Vt("sgds-card",Sa);const Ma=vt(
|
|
2171
2171
|
/**
|
|
2172
2172
|
* @license
|
|
2173
2173
|
* Copyright 2020 Google LLC
|
|
2174
2174
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2175
2175
|
*/
|
|
2176
|
-
class extends mt{constructor(e){if(super(e),e.type!==pt&&e.type!==ht&&e.type!==gt)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===te||t===se)return t;const s=e.element,i=e.name;if(e.type===pt){if(t===s[i])return te}else if(e.type===gt){if(!!t===s.hasAttribute(i))return te}else if(e.type===ht&&s.getAttribute(i)===String(t))return te;return is(e),t}});var $a=Se`.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)}`,
|
|
2176
|
+
class extends mt{constructor(e){if(super(e),e.type!==pt&&e.type!==ht&&e.type!==gt)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===te||t===se)return t;const s=e.element,i=e.name;if(e.type===pt){if(t===s[i])return te}else if(e.type===gt){if(!!t===s.hasAttribute(i))return te}else if(e.type===ht&&s.getAttribute(i)===String(t))return te;return is(e),t}});var $a=Se`.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=Se`.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=Se`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-2);line-height:var(--sgds-line-height-24);outline:none;padding:0}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const Va=(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||ze,i=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:ze.fromAttribute)(n,l.type);this[e]!==i&&(this[s]=i)}a.call(this,t,o,n)}};class Ea{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 Ia=t=>{class s extends t{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Ea(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,e([it("sgds-input")],s.prototype,"sgdsInput",void 0),e([it("sgds-datepicker-input")],s.prototype,"sgdsDatepickerInput",void 0),s};class Ba extends(Ia(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?J` <div class="invalid-feedback-container">
|
|
2177
2177
|
<slot name="invalidIcon">
|
|
2178
2178
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
2179
2179
|
</slot>
|
|
@@ -2187,18 +2187,18 @@ class extends mt{constructor(e){if(super(e),e.type!==pt&&e.type!==ht&&e.type!==g
|
|
|
2187
2187
|
class=${ft({"form-label":!0,required:this.required})}
|
|
2188
2188
|
>${this.label}</label
|
|
2189
2189
|
>
|
|
2190
|
-
`;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}}))}}Ba.styles=[...Ji.styles,ea,
|
|
2190
|
+
`;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}}))}}Ba.styles=[...Ji.styles,ea,Aa,$a,Da],e([Qe({reflect:!0})],Ba.prototype,"label",void 0),e([Qe({reflect:!0})],Ba.prototype,"hintText",void 0),e([Qe({reflect:!0})],Ba.prototype,"name",void 0),e([Qe({type:String,reflect:!0})],Ba.prototype,"placeholder",void 0),e([Qe({type:Boolean,reflect:!0})],Ba.prototype,"autofocus",void 0),e([Qe({type:Boolean,reflect:!0})],Ba.prototype,"disabled",void 0),e([Qe({type:Boolean,reflect:!0})],Ba.prototype,"required",void 0),e([Qe({type:String,reflect:!0})],Ba.prototype,"value",void 0),e([Je()],Ba.prototype,"displayValue",void 0),e([Va()],Ba.prototype,"defaultValue",void 0),e([Qe({type:Boolean,reflect:!0})],Ba.prototype,"hasFeedback",void 0),e([Qe({type:String,reflect:!0})],Ba.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],Ba.prototype,"invalid",void 0),e([Qe({type:Array})],Ba.prototype,"menuList",void 0),e([Je()],Ba.prototype,"selectedItems",void 0),e([Je()],Ba.prototype,"filteredList",void 0),e([it("input.form-control")],Ba.prototype,"_input",void 0);var Pa=Se`: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)}`,La=Se`: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 Ta extends rt{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 J`
|
|
2191
2191
|
<div class="dropdown-item ${ft(e)}" tabindex=${this.disabled?"-1":"0"}>
|
|
2192
2192
|
${this._renderItemContent()}
|
|
2193
2193
|
</div>
|
|
2194
|
-
`}}Ta.styles=[La],e([Qe({type:Boolean,reflect:!0})],Ta.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],Ta.prototype,"disabled",void 0),e([Qe({type:String,reflect:!0})],Ta.prototype,"value",void 0);var Fa=Se`.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}`,Za=Se`.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 Ha extends rt{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")}}Ha.styles=[...rt.styles,$a,
|
|
2194
|
+
`}}Ta.styles=[La],e([Qe({type:Boolean,reflect:!0})],Ta.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],Ta.prototype,"disabled",void 0),e([Qe({type:String,reflect:!0})],Ta.prototype,"value",void 0);var Fa=Se`.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}`,Za=Se`.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 Ha extends rt{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")}}Ha.styles=[...rt.styles,$a,Aa,Fa,Za],e([Qe({reflect:!0})],Ha.prototype,"label",void 0),e([Qe({reflect:!0})],Ha.prototype,"hintText",void 0),e([Qe({reflect:!0})],Ha.prototype,"name",void 0),e([Qe({type:Boolean,reflect:!0})],Ha.prototype,"disabled",void 0),e([Qe({type:Boolean,reflect:!0})],Ha.prototype,"invalid",void 0);var za=Se`.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}`,Ra=Se`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 Oa extends(Ia(Ha)){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 J`
|
|
2195
2195
|
<div class="form-check">
|
|
2196
2196
|
<input
|
|
2197
2197
|
class=${ft({"form-check-input":!0,"is-invalid":e&&this.invalid})}
|
|
2198
2198
|
type="checkbox"
|
|
2199
2199
|
id=${this._controlId}
|
|
2200
2200
|
aria-invalid=${this.invalid?"true":"false"}
|
|
2201
|
-
name=${
|
|
2201
|
+
name=${qt(this.name)}
|
|
2202
2202
|
?indeterminate=${this.indeterminate}
|
|
2203
2203
|
?required=${this.required}
|
|
2204
2204
|
aria-disabled=${this.disabled?"true":"false"}
|
|
@@ -2229,7 +2229,7 @@ class extends mt{constructor(e){if(super(e),e.type!==pt&&e.type!==ht&&e.type!==g
|
|
|
2229
2229
|
</div>
|
|
2230
2230
|
</div>
|
|
2231
2231
|
`:se}
|
|
2232
|
-
`}}Oa.styles=[...Ha.styles,Ra,za],e([Qe({type:String,reflect:!0})],Oa.prototype,"value",void 0),e([Qe({type:Boolean,reflect:!0})],Oa.prototype,"checked",void 0),e([Qe({type:String,reflect:!0})],Oa.prototype,"hasFeedback",void 0),e([
|
|
2232
|
+
`}}Oa.styles=[...Ha.styles,Ra,za],e([Qe({type:String,reflect:!0})],Oa.prototype,"value",void 0),e([Qe({type:Boolean,reflect:!0})],Oa.prototype,"checked",void 0),e([Qe({type:String,reflect:!0})],Oa.prototype,"hasFeedback",void 0),e([Va("checked")],Oa.prototype,"defaultChecked",void 0),e([Qe({type:Boolean,reflect:!0})],Oa.prototype,"indeterminate",void 0),e([Qe({type:Boolean,reflect:!0})],Oa.prototype,"required",void 0),e([Qe({type:String,reflect:!0})],Oa.prototype,"invalidFeedback",void 0),e([Je()],Oa.prototype,"_isTouched",void 0),e([$t("disabled",{waitUntilFirstUpdate:!0})],Oa.prototype,"_handleDisabledChange",null),e([$t("_isTouched",{waitUntilFirstUpdate:!0})],Oa.prototype,"_handleIsTouched",null);class Na extends Ta{constructor(){super(...arguments),this.checkbox=!1,this._renderItemContent=()=>this.checkbox?J`
|
|
2233
2233
|
<sgds-checkbox ?checked=${this.active} .disabled=${this.disabled} @sgds-change=${this._handleCheckboxChange}>
|
|
2234
2234
|
<slot></slot>
|
|
2235
2235
|
</sgds-checkbox>
|
|
@@ -2238,7 +2238,7 @@ class extends mt{constructor(e){if(super(e),e.type!==pt&&e.type!==ht&&e.type!==g
|
|
|
2238
2238
|
<slot></slot>
|
|
2239
2239
|
${this.active?J` <sgds-icon name="check"></sgds-icon> `:se}
|
|
2240
2240
|
</div>
|
|
2241
|
-
`}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")}}Na.dependencies={"sgds-icon":
|
|
2241
|
+
`}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")}}Na.dependencies={"sgds-icon":Ot,"sgds-checkbox":Oa},e([Qe({type:Boolean,reflect:!0})],Na.prototype,"checkbox",void 0);
|
|
2242
2242
|
/**
|
|
2243
2243
|
* @license
|
|
2244
2244
|
* Copyright 2017 Google LLC
|
|
@@ -2266,8 +2266,8 @@ const Ua=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2266
2266
|
class="form-control"
|
|
2267
2267
|
type="text"
|
|
2268
2268
|
id=${this._controlId}
|
|
2269
|
-
name=${
|
|
2270
|
-
placeholder=${
|
|
2269
|
+
name=${qt(this.name)}
|
|
2270
|
+
placeholder=${qt(this.placeholder)}
|
|
2271
2271
|
aria-invalid=${this.invalid?"true":"false"}
|
|
2272
2272
|
?autofocus=${this.autofocus}
|
|
2273
2273
|
?disabled=${this.disabled}
|
|
@@ -2277,7 +2277,7 @@ const Ua=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2277
2277
|
@input=${this._handleInputChange}
|
|
2278
2278
|
@blur=${this._handleInputBlur}
|
|
2279
2279
|
@focus=${this._handleFocus}
|
|
2280
|
-
aria-describedby=${
|
|
2280
|
+
aria-describedby=${qt(this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:void 0)}
|
|
2281
2281
|
aria-labelledby="${this._labelId} ${this._controlId}Help ${this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:""}"
|
|
2282
2282
|
/>
|
|
2283
2283
|
</div>
|
|
@@ -2306,7 +2306,7 @@ const Ua=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2306
2306
|
class="visually-hidden"
|
|
2307
2307
|
?required=${this.required}
|
|
2308
2308
|
/>`:se}
|
|
2309
|
-
`}}Ya.styles=[...Ba.styles,
|
|
2309
|
+
`}}Ya.styles=[...Ba.styles,Da,Pa],Ya.dependencies={"sgds-combo-box-option":Na,"sgds-icon":Ot,"sgds-badge":Ki},e([Qe({type:Boolean,reflect:!0})],Ya.prototype,"multiSelect",void 0),e([Qe({type:Boolean,reflect:!0})],Ya.prototype,"badgeFullWidth",void 0),e([Qe()],Ya.prototype,"filterFunction",void 0),e([it("input#multi-select-input-tracker")],Ya.prototype,"_multiSelectInput",void 0),e([at({flatten:!0,selector:"sgds-combo-box-option"})],Ya.prototype,"options",void 0),e([Je()],Ya.prototype,"optionList",void 0),e([Je()],Ya.prototype,"emptyMenu",void 0),e([$t("value",{waitUntilFirstUpdate:!0})],Ya.prototype,"_handleValueChange",null),e([$t("optionList",{waitUntilFirstUpdate:!0})],Ya.prototype,"_handleOptionListChange",null),e([$t("menuList",{waitUntilFirstUpdate:!0})],Ya.prototype,"_handleMenuListChange",null),Vt("sgds-combo-box",Ya),Vt("sgds-combo-box-option",Na);var ja=Se`: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 Wa extends(Ia(Ha)){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=J` <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 J`
|
|
2310
2310
|
<fieldset>
|
|
2311
2311
|
<div class="label-hint-container">
|
|
2312
2312
|
<label class="form-label">${this.label}</label>
|
|
@@ -2340,18 +2340,18 @@ const Ua=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2340
2340
|
</div>
|
|
2341
2341
|
`:se}
|
|
2342
2342
|
</fieldset>
|
|
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=[...Ha.styles,ja],e([Qe({reflect:!0})],Wa.prototype,"label",void 0),e([Qe({type:String,reflect:!0})],Wa.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],Wa.prototype,"hasFeedback",void 0),e([Qe({reflect:!0})],Wa.prototype,"hintText",void 0),e([Qe({type:Boolean,reflect:!0})],Wa.prototype,"required",void 0),e([Qe({reflect:!0})],Wa.prototype,"value",void 0),e([Je()],Wa.prototype,"_isTouched",void 0),e([Aa()],Wa.prototype,"defaultValue",void 0),e([Je()],Wa.prototype,"_blurredCheckboxes",void 0),e([Je()],Wa.prototype,"formEvent",void 0),e([at()],Wa.prototype,"_checkboxes",void 0),e([$t("value",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleValueChange",null),e([$t("_isTouched",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleIsTouched",null),e([$t("invalid",{waitUntilFirstUpdate:!0})],Wa.prototype,"_updateInvalid",null),At("sgds-checkbox",Oa),At("sgds-checkbox-group",Wa);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",Vo="night",Ao={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:Vo,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"})}},Lo=(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"})}},To={p:Lo,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}}",Lo(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,To[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(Ao[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,Ao[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/,Vn=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function An(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 Ln(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 Tn(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 An(Pn(4,e),i);case"yo":return An(s.ordinalNumber(e,{unit:"year"}),i);default:return An(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 An(Pn(4,e),i);case"Yo":return An(s.ordinalNumber(e,{unit:"year"}),i);default:return An(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 Ln("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 Ln("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 An(En(nn,e),i);case"MM":return An(Pn(2,e),i);case"Mo":return An(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 An(En(nn,e),i);case"LL":return An(Pn(2,e),i);case"Lo":return An(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 An(Pn(t.length,e),a);case"eo":return An(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 An(Pn(t.length,e),a);case"co":return An(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 An(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 An(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return An(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);default:return An(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(Tn(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(Tn(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(Tn(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 An(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(Vn,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(Vn,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 To){return(0,To[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=Se`.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 rt{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(J`<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=[...Ha.styles,ja],e([Qe({reflect:!0})],Wa.prototype,"label",void 0),e([Qe({type:String,reflect:!0})],Wa.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],Wa.prototype,"hasFeedback",void 0),e([Qe({reflect:!0})],Wa.prototype,"hintText",void 0),e([Qe({type:Boolean,reflect:!0})],Wa.prototype,"required",void 0),e([Qe({reflect:!0})],Wa.prototype,"value",void 0),e([Je()],Wa.prototype,"_isTouched",void 0),e([Va()],Wa.prototype,"defaultValue",void 0),e([Je()],Wa.prototype,"_blurredCheckboxes",void 0),e([Je()],Wa.prototype,"formEvent",void 0),e([at()],Wa.prototype,"_checkboxes",void 0),e([$t("value",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleValueChange",null),e([$t("_isTouched",{waitUntilFirstUpdate:!0})],Wa.prototype,"_handleIsTouched",null),e([$t("invalid",{waitUntilFirstUpdate:!0})],Wa.prototype,"_updateInvalid",null),Vt("sgds-checkbox",Oa),Vt("sgds-checkbox-group",Wa),Vt("sgds-close-button",Ht);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"})}},Lo=(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"})}},To={p:Lo,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}}",Lo(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,To[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 Ln(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 Tn(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 Ln("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 Ln("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(Tn(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(Tn(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(Tn(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 To){return(0,To[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=Se`.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 rt{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(J`<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=${ft({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,7 +2392,7 @@ const Ua=(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>
|
|
@@ -2415,30 +2415,30 @@ const Ua=(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=[...rt.styles,ba,or],e([Qe({type:String,reflect:!0})],nr.prototype,"variant",void 0),e([Qe({type:String,reflect:!0})],nr.prototype,"tone",void 0),e([Qe({type:String,reflect:!0})],nr.prototype,"size",void 0),e([Qe({reflect:!0,type:String})],nr.prototype,"label",void 0),e([Qe({type:String,reflect:!0})],nr.prototype,"orientation",void 0);var rr=Se`: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?Pt`a`:Pt`button`;return Tt`
|
|
2416
2416
|
<${t}
|
|
2417
2417
|
class="btn btn-icon${ft({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},e([Qe({type:String,reflect:!0})],lr.prototype,"name",void 0);var dr=Se`.datepicker-header{display:flex;gap:var(--sgds-form-gap-md)}sgds-button{--btn-font-weight:var(--sgds-font-weight-semibold)}`;class cr extends rt{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 J`${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 J`
|
|
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 Ua=(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},e([Qe({attribute:!1})],cr.prototype,"displayDate",void 0),e([Qe({attribute:!1})],cr.prototype,"focusedDate",void 0),e([Qe({attribute:!1})],cr.prototype,"selectedDate",void 0),e([Qe()],cr.prototype,"view",void 0),e([Qe()],cr.prototype,"focusedTabIndex",void 0),e([$t("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 Vr 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 Ar 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=Ar;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 Ar(e):new Vr(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 Lr{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 Lr){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 Lr||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),n=i instanceof Lr&&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 Lr: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 Tr{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 Lr;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 Lr&&(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 Tr(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=Se`: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(Ia(Ha)){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},e([Qe({attribute:!1})],cr.prototype,"displayDate",void 0),e([Qe({attribute:!1})],cr.prototype,"focusedDate",void 0),e([Qe({attribute:!1})],cr.prototype,"selectedDate",void 0),e([Qe()],cr.prototype,"view",void 0),e([Qe()],cr.prototype,"focusedTabIndex",void 0),e([$t("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 Lr{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 Lr){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 Lr||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),n=i instanceof Lr&&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 Lr: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 Tr{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 Lr;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 Lr&&(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 Tr(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=Se`: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(Ia(Ha)){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 ${ft({disabled:this.disabled,readonly:this.readonly,"is-invalid":this.invalid&&e})}"
|
|
2475
2475
|
@click=${this._handleClick}
|
|
@@ -2480,26 +2480,26 @@ const Ua=(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():se}
|
|
@@ -2537,7 +2537,7 @@ const Ua=(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=[...Ha.styles,
|
|
2540
|
+
`}}Kr.styles=[...Ha.styles,Da,Za,Wr],Kr.dependencies={"sgds-spinner":nr,"sgds-icon":Ot},e([Qe({reflect:!0})],Kr.prototype,"type",void 0),e([Qe({type:String})],Kr.prototype,"prefix",void 0),e([Qe({type:String})],Kr.prototype,"suffix",void 0),e([Qe({type:Number,reflect:!0})],Kr.prototype,"minlength",void 0),e([Qe({type:Number,reflect:!0})],Kr.prototype,"maxlength",void 0),e([Qe()],Kr.prototype,"min",void 0),e([Qe()],Kr.prototype,"max",void 0),e([Qe({type:String,reflect:!0})],Kr.prototype,"placeholder",void 0),e([Qe({type:String})],Kr.prototype,"pattern",void 0),e([Qe({type:Boolean,reflect:!0})],Kr.prototype,"autofocus",void 0),e([Qe({type:Boolean,reflect:!0})],Kr.prototype,"readonly",void 0),e([Qe()],Kr.prototype,"step",void 0),e([Qe({type:String,reflect:!0})],Kr.prototype,"hasFeedback",void 0),e([Qe({type:String,reflect:!0})],Kr.prototype,"invalidFeedback",void 0),e([Va()],Kr.prototype,"defaultValue",void 0),e([Qe({type:Boolean,reflect:!0})],Kr.prototype,"valid",void 0),e([Qe({type:Boolean,reflect:!0})],Kr.prototype,"loading",void 0),e([Qe({type:Boolean,reflect:!0})],Kr.prototype,"required",void 0),e([Qe({type:Boolean,reflect:!0})],Kr.prototype,"noValidate",void 0),e([Qe({reflect:!0})],Kr.prototype,"value",void 0),e([Je()],Kr.prototype,"_isTouched",void 0),e([Je()],Kr.prototype,"_showPassword",void 0),e([$t("_isTouched",{waitUntilFirstUpdate:!0})],Kr.prototype,"_handleIsTouched",null),e([$t("disabled",{waitUntilFirstUpdate:!0})],Kr.prototype,"_handleDisabledChange",null);var Gr=Se`.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 J`
|
|
2541
2541
|
<div
|
|
2542
2542
|
class="form-control-container ${ft({disabled:this.disabled})}"
|
|
2543
2543
|
>
|
|
@@ -2556,7 +2556,7 @@ const Ua=(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 Ua=(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 Ua=(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},e([Qe({type:Boolean,reflect:!0})],Jr.prototype,"required",void 0),e([Qe({reflect:!0})],Jr.prototype,"name",void 0),e([Qe({type:Boolean,reflect:!0})],Jr.prototype,"disabled",void 0),e([Qe({type:String,reflect:!0})],Jr.prototype,"value",void 0),e([Qe({type:Array,reflect:!0})],Jr.prototype,"initialValue",void 0),e([Qe({type:String})],Jr.prototype,"minDate",void 0),e([Qe({type:String})],Jr.prototype,"maxDate",void 0),e([Qe({type:String,reflect:!0})],Jr.prototype,"mode",void 0),e([Qe({type:String,reflect:!0})],Jr.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],Jr.prototype,"hasFeedback",void 0),e([Qe({reflect:!0})],Jr.prototype,"label",void 0),e([Qe({reflect:!0})],Jr.prototype,"hintText",void 0),e([Qe({type:Boolean,reflect:!0,state:!1})],Jr.prototype,"noFlip",void 0),e([Qe({type:String,reflect:!0,state:!1})],Jr.prototype,"drop",void 0),e([Qe({attribute:!1})],Jr.prototype,"displayDate",void 0),e([
|
|
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},e([Qe({type:Boolean,reflect:!0})],Jr.prototype,"required",void 0),e([Qe({reflect:!0})],Jr.prototype,"name",void 0),e([Qe({type:Boolean,reflect:!0})],Jr.prototype,"disabled",void 0),e([Qe({type:String,reflect:!0})],Jr.prototype,"value",void 0),e([Qe({type:Array,reflect:!0})],Jr.prototype,"initialValue",void 0),e([Qe({type:String})],Jr.prototype,"minDate",void 0),e([Qe({type:String})],Jr.prototype,"maxDate",void 0),e([Qe({type:String,reflect:!0})],Jr.prototype,"mode",void 0),e([Qe({type:String,reflect:!0})],Jr.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],Jr.prototype,"hasFeedback",void 0),e([Qe({reflect:!0})],Jr.prototype,"label",void 0),e([Qe({reflect:!0})],Jr.prototype,"hintText",void 0),e([Qe({type:Boolean,reflect:!0,state:!1})],Jr.prototype,"noFlip",void 0),e([Qe({type:String,reflect:!0,state:!1})],Jr.prototype,"drop",void 0),e([Qe({attribute:!1})],Jr.prototype,"displayDate",void 0),e([Va()],Jr.prototype,"defaultValue",void 0),e([Je()],Jr.prototype,"invalid",void 0),e([Je()],Jr.prototype,"view",void 0),e([Je()],Jr.prototype,"selectedDateRange",void 0),e([Je()],Jr.prototype,"focusedDate",void 0),e([Je()],Jr.prototype,"focusedTabIndex",void 0),e([it("sgds-datepicker-calendar")],Jr.prototype,"calendar",void 0),e([it("sgds-datepicker-input")],Jr.prototype,"datepickerInputAsync",void 0),e([st("sgds-datepicker-input")],Jr.prototype,"datepickerInput",void 0),e([$t("value",{waitUntilFirstUpdate:!0})],Jr.prototype,"_handleValueChange",null),Vt("sgds-datepicker",Jr);var el=Se`:host([bordered]) .container{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-md)}.container{display:flex;flex-direction:column}slot[name=title]::slotted(*){color:var(--sgds-heading-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-32)}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24)}.header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.has-header{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);padding:var(--sgds-padding-lg) var(--sgds-padding-xl)}`;class tl extends rt{constructor(){super(...arguments),this.bordered=!1,this.stacked=!1,this.hasTitleSlot=!1,this.hasDescriptionSlot=!1,this.hasSlotController=new Wi(this,"title","description")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.updateComplete.then((()=>{this._updateDescriptionLists()}))}_updateDescriptionLists(){this._descriptionLists&&this._descriptionLists.forEach(((e,t)=>{this.stacked?e.setAttribute("stacked",""):e.removeAttribute("stacked"),this.bordered?e.setAttribute("bordered",""):e.removeAttribute("bordered"),t===this._descriptionLists.length-1&&e.setAttribute("isLastChild","")}))}updated(e){e.has("stacked")&&this._updateDescriptionLists(),e.has("bordered")&&this._updateDescriptionLists(),this.hasTitleSlot||(this.hasTitleSlot=this.hasSlotController.test("title")),this.hasDescriptionSlot||(this.hasDescriptionSlot=this.hasSlotController.test("description"))}render(){return J`
|
|
2614
2614
|
<div class="container">
|
|
2615
2615
|
<div
|
|
2616
2616
|
class="${ft({header:!0,"has-header":this.hasTitleSlot||this.hasDescriptionSlot})}"
|
|
@@ -2635,7 +2635,7 @@ const Ua=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2635
2635
|
</span>
|
|
2636
2636
|
</div>
|
|
2637
2637
|
</div>
|
|
2638
|
-
`}}al.styles=[...rt.styles,sl],e([Qe({type:Boolean,reflect:!0})],al.prototype,"stacked",void 0),e([Qe({type:Boolean,reflect:!0})],al.prototype,"bordered",void 0),
|
|
2638
|
+
`}}al.styles=[...rt.styles,sl],e([Qe({type:Boolean,reflect:!0})],al.prototype,"stacked",void 0),e([Qe({type:Boolean,reflect:!0})],al.prototype,"bordered",void 0),Vt("sgds-description-list",al),Vt("sgds-description-list-group",tl);var ol=Se`:host{--container-size:8px}:host([orientation=horizontal]){border-top:var(--border-width) solid var(--sgds-border-color-muted);display:block;margin:calc((var(--container-size) - var(--border-width))/2) 0;width:100%}:host([orientation=vertical]){border-left:var(--border-width) solid var(--sgds-border-color-muted);display:inline-block;height:100%;margin:0 calc((var(--container-size) - var(--border-width))/2)}:host([thickness=thin]){--border-width:var(--sgds-border-width-1)}:host([thickness=thick]){--border-width:var(--sgds-border-width-2)}:host([thickness=thicker]){--border-width:var(--sgds-border-width-4)}`;class nl extends rt{constructor(){super(...arguments),this.orientation="horizontal",this.thickness="thin"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator"),this.setAttribute("aria-orientation",this.orientation)}}nl.styles=[ol],e([Qe({type:String,reflect:!0})],nl.prototype,"orientation",void 0),e([Qe({type:String,reflect:!0})],nl.prototype,"thickness",void 0),Vt("sgds-divider",nl);const rl=new Set;function ll(e){rl.add(e),document.body.style.overflow="hidden"}function dl(e){rl.delete(e),0===rl.size&&(document.body.style.overflow="")}var cl=Se`:host{display:contents}:host([size=md]) .drawer-end .drawer-panel,:host([size=md]) .drawer-start .drawer-panel{max-width:var(--sgds-dimension-768)}:host([size=md]) .drawer-bottom .drawer-panel,:host([size=md]) .drawer-top .drawer-panel{max-height:var(--sgds-dimension-768)}:host([size=lg]) .drawer-end .drawer-panel,:host([size=lg]) .drawer-start .drawer-panel{max-width:var(--sgds-dimension-1024)}:host([size=lg]) .drawer-bottom .drawer-panel,:host([size=lg]) .drawer-top .drawer-panel{max-height:var(--sgds-dimension-1024)}.drawer{height:100%;inset-inline-start:0;overflow:hidden;pointer-events:none;top:0;width:100%}.drawer-fixed{position:fixed;z-index:1100}.drawer-panel{background-color:var(--sgds-surface-default);display:flex;flex-direction:column;gap:var(--sgds-gap-2-xl);overflow:auto;padding:var(--sgds-padding-lg);pointer-events:all;position:absolute;z-index:2}.drawer-panel:focus{outline:none}.drawer-top .drawer-panel{bottom:auto;height:80%;inset-inline-end:auto;inset-inline-start:0;max-height:var(--sgds-dimension-512);top:0;width:100%}.drawer-end .drawer-panel{bottom:auto;height:100%;inset-inline-end:0;inset-inline-start:auto;max-width:var(--sgds-dimension-512);top:0;width:80%}.drawer-bottom .drawer-panel{bottom:0;height:80%;inset-inline-end:auto;inset-inline-start:0;max-height:var(--sgds-dimension-512);top:auto;width:100%}.drawer-start .drawer-panel{bottom:auto;height:100%;inset-inline-end:auto;inset-inline-start:0;max-width:var(--sgds-dimension-512);top:0;width:80%}.drawer-header{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}slot[name=title]::slotted(*){color:var(--sgds-color-default)!important;font-size:var(--sgds-font-size-4)!important;margin-bottom:var(--sgds-margin-none)!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);margin-bottom:var(--sgds-margin-none)!important}slot[name=footer]::slotted(*){box-shadow:0 -2px 2px 0 hsla(0,0%,5%,.08);margin:var(--sgds-margin-none) calc(var(--sgds-margin-xs)*-1);padding:var(--sgds-padding-lg) var(--sgds-padding-lg) var(--sgds-padding-none)}sgds-close-button{position:absolute;right:8px;top:8px}.drawer-body{-webkit-overflow-scrolling:touch;display:block;flex:1 1 auto;overflow:auto}.drawer-overlay{background-color:var(--sgds-bg-overlay);bottom:0;display:block;left:0;pointer-events:all;position:fixed;right:0;top:0}.drawer-contained .drawer-overlay{display:none}.drawer-contained{height:unset;width:unset}@media screen and (min-width:512px){.drawer-panel{padding:var(--sgds-padding-2-xl)}slot[name=footer]::slotted(*){margin:var(--sgds-margin-none) calc(var(--sgds-margin-md)*-1);padding:var(--sgds-padding-2-xl) var(--sgds-padding-2-xl) var(--sgds-padding-none)}}`;class hl extends rt{constructor(){super(...arguments),this.open=!1,this.size="sm",this.placement="end",this.contained=!1,this.handleDocumentKeyDown=e=>{this.open&&!this.contained&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(e){super.firstUpdated(e),this.open&&(this.addOpenListeners(),this.contained||ll(this))}disconnectedCallback(){super.disconnectedCallback(),dl(this)}uppercaseFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}requestClose(e){if(this.emit("sgds-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const e=Ct(this,"drawer.denyClose");bt(this.panel,e.keyframes,e.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sgds-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||ll(this);const e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([xt(this.drawer),xt(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame((()=>{this.emit("sgds-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")}));const t=Ct(this,`drawer.show${this.uppercaseFirstLetter(this.placement)}`),s=Ct(this,"drawer.overlay.show");await Promise.all([bt(this.panel,t.keyframes,t.options),bt(this.overlay,s.keyframes,s.options)]),this.emit("sgds-after-show")}else{this.emit("sgds-hide"),this.removeOpenListeners(),this.contained||dl(this),await Promise.all([xt(this.drawer),xt(this.overlay)]);const e=Ct(this,`drawer.hide${this.uppercaseFirstLetter(this.placement)}`),t=Ct(this,"drawer.overlay.hide");await Promise.all([bt(this.overlay,t.keyframes,t.options).then((()=>{this.overlay.hidden=!0})),bt(this.panel,e.keyframes,e.options).then((()=>{this.panel.hidden=!0}))]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;const s=this.originalTrigger;"function"==typeof(null==s?void 0:s.focus)&&setTimeout((()=>s.focus())),this.emit("sgds-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&ll(this),this.open&&this.contained&&dl(this)}async show(){if(!this.open)return this.open=!0,Mt(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,Mt(this,"sgds-after-hide")}render(){const e=this.hasUpdated,t=!this.open&&!e;return J`
|
|
2639
2639
|
<div
|
|
2640
2640
|
class=${ft({drawer:!0,"drawer-top":"top"===this.placement,"drawer-end":"end"===this.placement,"drawer-bottom":"bottom"===this.placement,"drawer-start":"start"===this.placement,"drawer-contained":this.contained,"drawer-fixed":!this.contained})}
|
|
2641
2641
|
?hidden=${t}
|
|
@@ -2662,7 +2662,7 @@ const Ua=(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=[...rt.styles,cl],hl.dependencies={"sgds-close-button":
|
|
2665
|
+
`}}hl.styles=[...rt.styles,cl],hl.dependencies={"sgds-close-button":Ht},e([st(".drawer")],hl.prototype,"drawer",void 0),e([st(".drawer-panel")],hl.prototype,"panel",void 0),e([st(".drawer-overlay")],hl.prototype,"overlay",void 0),e([Qe({type:Boolean,reflect:!0})],hl.prototype,"open",void 0),e([Qe({type:String,reflect:!0})],hl.prototype,"size",void 0),e([Qe({type:String,reflect:!0})],hl.prototype,"placement",void 0),e([Qe({type:Boolean,reflect:!0})],hl.prototype,"contained",void 0),e([$t("open",{waitUntilFirstUpdate:!0})],hl.prototype,"handleOpenChange",null),e([$t("contained",{waitUntilFirstUpdate:!0})],hl.prototype,"handleNoModalChange",null),St("drawer.showTop",{keyframes:[{opacity:0,translate:"0 -100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),St("drawer.hideTop",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 -100%"}],options:{duration:250,easing:"ease"}}),St("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"}}),St("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"}}),St("drawer.showBottom",{keyframes:[{opacity:0,translate:"0 100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),St("drawer.hideBottom",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 100%"}],options:{duration:250,easing:"ease"}}),St("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"}}),St("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"}}),St("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),St("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),St("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),Vt("sgds-drawer",hl),Vt("sgds-dropdown",sa),Vt("sgds-dropdown-item",aa);var ul=Se`.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(Ia(Ha)){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=J`
|
|
2666
2666
|
<label for=${this._controlId} id=${this._labelId} class="form-label"> ${this.label} </label>
|
|
2667
2667
|
`;return this.label&&e}_renderHintText(){const e=J` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_renderFeedback(){return J`
|
|
2668
2668
|
<div class="invalid-feedback-container">
|
|
@@ -2704,7 +2704,7 @@ const Ua=(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=[...Ha.styles,ul],pl.dependencies={"sgds-button":ma,"sgds-close-button":
|
|
2707
|
+
`}}pl.styles=[...Ha.styles,ul],pl.dependencies={"sgds-button":ma,"sgds-close-button":Ht,"sgds-icon":Ot},e([Qe({type:Boolean,reflect:!0})],pl.prototype,"multiple",void 0),e([Qe({type:String,reflect:!0})],pl.prototype,"accept",void 0),e([Qe({type:Boolean,reflect:!0})],pl.prototype,"hasFeedback",void 0),e([Qe({type:String,reflect:!0})],pl.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],pl.prototype,"required",void 0),e([Je()],pl.prototype,"selectedFiles",void 0),e([$t("disabled",{waitUntilFirstUpdate:!0})],pl.prototype,"_handleDisabledChange",null),Vt("sgds-file-upload",pl);var gl=Se`.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 rt{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 J`
|
|
2708
2708
|
<footer class="footer">
|
|
2709
2709
|
<section
|
|
2710
2710
|
class="${ft({"footer-top":this.hasDefaultSlot||this.hasTitleSlot||this.hasDescriptionSlot||this.hasItemsSlot,"has-content":this.hasDefaultSlot||this.hasItemsSlot})}"
|
|
@@ -2725,47 +2725,47 @@ const Ua=(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=[...rt.styles,gl],vl.dependencies={"sgds-link":da},e([Qe({type:String})],vl.prototype,"copyrightLiner",void 0),e([Qe({type:String})],vl.prototype,"contactHref",void 0),e([Qe({type:String})],vl.prototype,"feedbackHref",void 0),e([Qe({type:String})],vl.prototype,"faqHref",void 0),e([Qe({type:String})],vl.prototype,"sitemapHref",void 0),e([Qe({type:String})],vl.prototype,"privacyHref",void 0),e([Qe({type:String})],vl.prototype,"termsOfUseHref",void 0),e([Qe({type:Boolean})],vl.prototype,"hasDefaultSlot",void 0),e([Qe({type:Boolean})],vl.prototype,"hasTitleSlot",void 0),e([Qe({type:Boolean})],vl.prototype,"hasDescriptionSlot",void 0),e([Qe({type:Boolean})],vl.prototype,"hasItemsSlot",void 0);var ml=Se`.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=[...rt.styles,gl],vl.dependencies={"sgds-link":da},e([Qe({type:String})],vl.prototype,"copyrightLiner",void 0),e([Qe({type:String})],vl.prototype,"contactHref",void 0),e([Qe({type:String})],vl.prototype,"feedbackHref",void 0),e([Qe({type:String})],vl.prototype,"faqHref",void 0),e([Qe({type:String})],vl.prototype,"sitemapHref",void 0),e([Qe({type:String})],vl.prototype,"privacyHref",void 0),e([Qe({type:String})],vl.prototype,"termsOfUseHref",void 0),e([Qe({type:Boolean})],vl.prototype,"hasDefaultSlot",void 0),e([Qe({type:Boolean})],vl.prototype,"hasTitleSlot",void 0),e([Qe({type:Boolean})],vl.prototype,"hasDescriptionSlot",void 0),e([Qe({type:Boolean})],vl.prototype,"hasItemsSlot",void 0);var ml=Se`.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 rt{_handleSlotChange(e){e.target.assignedElements().forEach((e=>{if("SGDS-LINK"===e.tagName){const t=e;t.tone="fixed-light",t.size="sm"}}))}render(){return J`
|
|
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
|
-
`}}fl.styles=[...rt.styles,ml],
|
|
2764
|
+
`}}fl.styles=[...rt.styles,ml],Vt("sgds-footer",vl),Vt("sgds-footer-item",fl),Vt("sgds-icon",Ot),Vt("sgds-icon-button",lr);var bl=Se`slot{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot::slotted(*){align-items:flex-start;display:flex;gap:var(--sgds-gap-xs)}.sm{font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20)}.lg{font-size:var(--sgds-font-size-3);line-height:var(--sgds-line-height-32)}`;class wl extends rt{constructor(){super(...arguments),this.role="list",this.size="md"}render(){return J`
|
|
2765
2765
|
<div class=${ft({[this.size]:this.size})}>
|
|
2766
2766
|
<slot></slot>
|
|
2767
2767
|
</div>
|
|
2768
|
-
`}}wl.styles=[...rt.styles,bl],e([Qe({type:String,reflect:!0})],wl.prototype,"role",void 0),e([Qe({type:String,reflect:!0})],wl.prototype,"size",void 0),
|
|
2768
|
+
`}}wl.styles=[...rt.styles,bl],e([Qe({type:String,reflect:!0})],wl.prototype,"role",void 0),e([Qe({type:String,reflect:!0})],wl.prototype,"size",void 0),Vt("sgds-icon-list",wl),Vt("sgds-input",Kr),Vt("sgds-link",da);
|
|
2769
2769
|
/**
|
|
2770
2770
|
* @license
|
|
2771
2771
|
* Copyright 2021 Google LLC
|
|
@@ -2802,7 +2802,7 @@ class xl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2802
2802
|
* @license
|
|
2803
2803
|
* Copyright 2022 Google LLC
|
|
2804
2804
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2805
|
-
*/function Ml({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer((function(){new xl(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})})):s.constructor.addInitializer((s=>{new xl(s,{context:e,callback:e=>{s[i]=e},subscribe:t})}))}}const $l=1024,
|
|
2805
|
+
*/function Ml({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer((function(){new xl(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})})):s.constructor.addInitializer((s=>{new xl(s,{context:e,callback:e=>{s[i]=e},subscribe:t})}))}}const $l=1024,Al="mainnav-context",Dl="mainnav-expanded-context";var Vl=Se`:host{position:relative;z-index:1200}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);justify-content:space-between;margin:auto;max-width:var(--sgds-mainnav-max-width);min-height:80px;padding:0 var(--sgds-mainnav-padding-x);position:relative;width:100%}@media screen and (max-width:767px){.navbar{padding:0 var(--sgds-mainnav-mobile-padding-x)}}.navbar-brand{align-items:center;display:flex;text-decoration:none;white-space:nowrap}.navbar-brand:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.navbar-nav{display:flex;flex-direction:column;height:100%;margin-bottom:0;margin-top:0;width:100%}nav>.navbar-body .navbar-nav{height:100dvh}nav>.navbar-body{background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08);padding:var(--sgds-padding-md) 0;position:absolute;transition:transform .2s ease-in-out;width:100%;z-index:2000}nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}@media screen and (max-width:767px){nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}.navbar-collapse{align-items:center;flex-basis:100%;flex-grow:1}.navbar-toggler{align-self:center}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-nav-scroll{overflow-y:auto}@media (min-width:512px){.navbar-expand-sm{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:1024px){.navbar-expand-lg{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1280px){.navbar-expand-xl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .nav-link{padding-left:var(--mainnav-nav-link-padding-x);padding-right:var(--mainnav-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1440px){.navbar-expand-xxl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}slot[name=non-collapsible]{align-items:center;display:flex;gap:var(--sgds-spacer-4);margin-left:auto}.slot-end{align-items:stretch;display:flex;gap:var(--sgds-gap-xs);margin-left:auto}.slot-end::slotted(:not([name$=-mainnav-item]):not([name$=-mainnav-dropdown])){align-self:center}`;const El={sm:512,md:768,lg:$l,xl:1280,xxl:1440,never:1/0,always:-1};class Il extends rt{constructor(){super(...arguments),this._breakpointReached=!1,this.expanded=!1,this.expanding=!1,this.brandHref="",this.collapseId=Xi("mainnav","collapse"),this.expand="lg",this.breakpointReached=!1,this._handleMobileNavBound=this._handleMobileNav.bind(this)}get defaultSlotItems(){return[...this.defaultNodes||[]].filter((e=>void 0!==e.tagName))}get endSlotItems(){return[...this.endNodes||[]].filter((e=>void 0!==e.tagName))}connectedCallback(){super.connectedCallback(),this._handleResize(),window.addEventListener("click",(e=>this._handleClickOutOfElement(e,this.body))),window.addEventListener("resize",this._handleResize.bind(this))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("click",(e=>this._handleClickOutOfElement(e,this.body))),window.removeEventListener("resize",this._handleResize.bind(this))}firstUpdated(e){super.firstUpdated(e),this.breakpointReached&&this.body&&(this.expanded=!1,this.body.hidden=!0,this._handleMobileNav(),this._breakpointReached=!0);[...this.defaultSlotItems,...this.endSlotItems].forEach((e=>{e.setAttribute("expand",this.expand)}))}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.header)||this.hide()}_handleSummaryClick(){this.expanded?this.hide():(document.querySelector("body").style.overflow="hidden",this.show())}_handleResize(){const e=window.innerWidth<El[this.expand];e!==this.breakpointReached?this.requestUpdate():(this.body&&(this.body.hidden=!0),this.expanding=!1),e?(this._handleMobileNav(),this._breakpointReached||(this._breakpointReached=!0,window.addEventListener("scrollend",this._handleMobileNavBound))):(this._handleDesktopNav(),this._breakpointReached=!1,window.removeEventListener("scrollend",this._handleMobileNavBound))}async _handleMobileNav(){if(!this.nav)return;this.nav.appendChild(this.body),await customElements.whenDefined("sgds-masthead");const{bottom:e}=this.nav.getBoundingClientRect(),t=parseFloat(getComputedStyle(this.body).paddingTop)+parseFloat(getComputedStyle(this.body).paddingBottom);this.navScroll.style.maxHeight=`calc(100dvh - ${e}px - ${t}px)`}_handleDesktopNav(){var e;null===(e=this.navbar)||void 0===e||e.insertBefore(this.body,this.nonCollapsibleSlot)}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!1);await xt(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=Ct(this,"mainnav.show");await bt(this.body,yt(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!0);await xt(this.body);const{keyframes:e,options:t}=Ct(this,"mainnav.hide");await bt(this.body,yt(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}async handleOpenChange(){this.expanding?(await this._animateToShow(),this.expanded=!0):(this.header.focus(),await this._animateToHide(),this.expanded=!1)}async show(){if(!this.expanded)return this.expanding=!0,Mt(this,"sgds-after-show")}async hide(){if(this.expanded)return this.expanding=!1,document.querySelector("body").style.removeProperty("overflow"),Mt(this,"sgds-after-hide")}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach((e=>{e.setAttribute("name",e.tagName.toLowerCase())}))}render(){return this.breakpointReached=window.innerWidth<El[this.expand],J`
|
|
2806
2806
|
<nav>
|
|
2807
2807
|
<div class="navbar ${this._expandClass()}">
|
|
2808
2808
|
<a class="navbar-brand" href=${this.brandHref} aria-label="brand-link">
|
|
@@ -2831,7 +2831,7 @@ class xl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2831
2831
|
></sgds-icon-button>
|
|
2832
2832
|
</div>
|
|
2833
2833
|
</nav>
|
|
2834
|
-
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}Il.styles=[...rt.styles,
|
|
2834
|
+
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}Il.styles=[...rt.styles,Vl],Il.dependencies={"sgds-icon-button":lr},e([Sl({context:Al}),Je()],Il.prototype,"_breakpointReached",void 0),e([Sl({context:Dl}),Je()],Il.prototype,"expanded",void 0),e([Je()],Il.prototype,"expanding",void 0),e([st("nav")],Il.prototype,"nav",void 0),e([st(".navbar")],Il.prototype,"navbar",void 0),e([st(".navbar-toggler")],Il.prototype,"header",void 0),e([st(".navbar-body")],Il.prototype,"body",void 0),e([st(".navbar-nav-scroll")],Il.prototype,"navScroll",void 0),e([st("slot[name='non-collapsible']")],Il.prototype,"nonCollapsibleSlot",void 0),e([Qe({type:String})],Il.prototype,"brandHref",void 0),e([Qe({type:String})],Il.prototype,"expand",void 0),e([Je()],Il.prototype,"breakpointReached",void 0),e([at()],Il.prototype,"defaultNodes",void 0),e([at({slot:"end"})],Il.prototype,"endNodes",void 0),e([$t("expanding",{waitUntilFirstUpdate:!0})],Il.prototype,"handleOpenChange",null),St("mainnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),St("mainnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var Bl=Se`: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 Pl="Enter";class Ll extends rt{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!==Pl&&" "!==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 Pl:case" ":e.preventDefault(),this._closeMenu()}}async _closeMenu(){await this._resetDropdownMenu(),this._hideDropdownMenuItems(),this.navLink.focus()}render(){const e=J`
|
|
2835
2835
|
<a
|
|
2836
2836
|
class="${ft({"nav-link":!0,active:this.active,disabled:this.disabled})}"
|
|
2837
2837
|
aria-disabled=${this.disabled?"true":"false"}
|
|
@@ -2866,7 +2866,7 @@ class xl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2866
2866
|
<sgds-icon name="chevron-down"></sgds-icon>
|
|
2867
2867
|
</a>
|
|
2868
2868
|
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
|
|
2869
|
-
</sgds-dropdown>`;return this._breakpointReached?e:t}}Ll.styles=[...rt.styles,ta,ea,Bl],Ll.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":Nt},e([Ml({context:Dl,subscribe:!0}),Je()],Ll.prototype,"_breakpointReached",void 0),e([Ml({context:Vl,subscribe:!0}),Je()],Ll.prototype,"expanded",void 0),e([st(".nav-link")],Ll.prototype,"navLink",void 0),e([st(".dropdown-items")],Ll.prototype,"dropdownItems",void 0),e([st(".dropdown-items a")],Ll.prototype,"menuHeaderButton",void 0),e([st(".dropdown-items span")],Ll.prototype,"menuHeaderText",void 0),e([Qe({type:Boolean})],Ll.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],Ll.prototype,"disabled",void 0),e([at({slot:"toggler"})],Ll.prototype,"togglerNodes",void 0),e([at()],Ll.prototype,"defaultNodes",void 0);var Tl=Se`: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 Fl extends rt{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 J`<slot @slotchange=${this._handleSlotChange}></slot>`}}Fl.styles=[...rt.styles,Tl],e([Qe({type:Boolean,reflect:!0})],Fl.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],Fl.prototype,"disabled",void 0),e([$t("disabled")],Fl.prototype,"_handleDisabled",null),At("sgds-mainnav",Il),At("sgds-mainnav-dropdown",Ll),At("sgds-mainnav-item",Fl);var Zl=Se`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}}`,Hl=Se`svg{vertical-align:middle}`;class zl extends rt{constructor(){super(...arguments),this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return J`
|
|
2869
|
+
</sgds-dropdown>`;return this._breakpointReached?e:t}}Ll.styles=[...rt.styles,ta,ea,Bl],Ll.dependencies={"sgds-dropdown":sa,"sgds-dropdown-item":aa,"sgds-icon":Ot},e([Ml({context:Al,subscribe:!0}),Je()],Ll.prototype,"_breakpointReached",void 0),e([Ml({context:Dl,subscribe:!0}),Je()],Ll.prototype,"expanded",void 0),e([st(".nav-link")],Ll.prototype,"navLink",void 0),e([st(".dropdown-items")],Ll.prototype,"dropdownItems",void 0),e([st(".dropdown-items a")],Ll.prototype,"menuHeaderButton",void 0),e([st(".dropdown-items span")],Ll.prototype,"menuHeaderText",void 0),e([Qe({type:Boolean})],Ll.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],Ll.prototype,"disabled",void 0),e([at({slot:"toggler"})],Ll.prototype,"togglerNodes",void 0),e([at()],Ll.prototype,"defaultNodes",void 0);var Tl=Se`: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 Fl extends rt{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 J`<slot @slotchange=${this._handleSlotChange}></slot>`}}Fl.styles=[...rt.styles,Tl],e([Qe({type:Boolean,reflect:!0})],Fl.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],Fl.prototype,"disabled",void 0),e([$t("disabled")],Fl.prototype,"_handleDisabled",null),Vt("sgds-mainnav",Il),Vt("sgds-mainnav-dropdown",Ll),Vt("sgds-mainnav-item",Fl);var Zl=Se`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}}`,Hl=Se`svg{vertical-align:middle}`;class zl extends rt{constructor(){super(...arguments),this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return J`
|
|
2870
2870
|
<div
|
|
2871
2871
|
id="sgds-masthead"
|
|
2872
2872
|
class="sgds-masthead"
|
|
@@ -3049,7 +3049,7 @@ class xl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3049
3049
|
</div>
|
|
3050
3050
|
</div>
|
|
3051
3051
|
</div>
|
|
3052
|
-
`}}function Rl(e){const t=e.tagName.toLowerCase();return"-1"!==e.getAttribute("tabindex")&&(!e.hasAttribute("disabled")&&((!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&(!("input"===t&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&(null!==e.offsetParent&&("hidden"!==window.getComputedStyle(e).visibility&&(!("audio"!==t&&"video"!==t||!e.hasAttribute("controls"))||(!!e.hasAttribute("tabindex")||(!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(t)))))))))}zl.styles=[...rt.styles,Hl,jt,Zl],e([Je()],zl.prototype,"toggleVisibility",void 0),
|
|
3052
|
+
`}}function Rl(e){const t=e.tagName.toLowerCase();return"-1"!==e.getAttribute("tabindex")&&(!e.hasAttribute("disabled")&&((!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&(!("input"===t&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&(null!==e.offsetParent&&("hidden"!==window.getComputedStyle(e).visibility&&(!("audio"!==t&&"video"!==t||!e.hasAttribute("controls"))||(!!e.hasAttribute("tabindex")||(!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(t)))))))))}zl.styles=[...rt.styles,Hl,jt,Zl],e([Je()],zl.prototype,"toggleVisibility",void 0),Vt("sgds-masthead",zl);let Ol=[];class Nl{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Ol.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Ol=Ol.filter((e=>e!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Ol[Ol.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){var t,s;const i=[];return function e(t){t instanceof HTMLElement&&(i.push(t),null!==t.shadowRoot&&"open"===t.shadowRoot.mode&&e(t.shadowRoot)),[...t.children].forEach((t=>e(t)))}(e),{start:null!==(t=i.find((e=>Rl(e))))&&void 0!==t?t:null,end:null!==(s=i.reverse().find((e=>Rl(e))))&&void 0!==s?s:null}}(this.element),s="forward"===this.tabDirection?e:t;"function"==typeof(null==s?void 0:s.focus)&&s.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward",requestAnimationFrame((()=>this.checkFocus())))}handleKeyUp(){this.tabDirection="forward"}}var Ul=Se`:host(:not([size=fullscreen])) .modal-panel{background-color:var(--sgds-surface-default);max-width:var(--sgds-dimension-640);padding:var(--sgds-padding-xl)}:host([size=sm]) .modal-panel{max-width:var(--sgds-dimension-480)}:host([size=md]) .modal-panel{max-width:var(--sgds-dimension-640)}:host([size=lg]) .modal-panel{max-width:var(--sgds-dimension-800)}:host([size=fullscreen]) .modal-overlay{background-color:var(--sgds-surface-default)}.modal{align-items:start;bottom:0;display:flex;font-family:var(--sgds-body-font-family);justify-content:center;left:0;position:fixed;right:0;top:0;z-index:105500}.modal-panel{border-radius:var(--sgds-border-radius-md);display:flex;flex-direction:column;gap:var(--sgds-gap-2-xl);margin:var(--sgds-margin-sm) var(--sgds-margin-xs);max-height:calc(100% - var(--sgds-margin-sm) - var(--sgds-margin-sm));width:100%;z-index:2}.modal-panel:focus{outline:none}.modal-content{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-2-xl);min-height:0;position:relative}.modal-header__close{position:absolute;right:calc(var(--sgds-padding-md)*-1);top:calc(var(--sgds-padding-md)*-1)}@media screen and (min-width:512px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-sm)}}@media screen and (min-width:768px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-md);max-height:calc(100% - var(--sgds-margin-md) - var(--sgds-margin-md))}}@media screen and (min-width:1024px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl) var(--sgds-margin-xs);max-height:calc(100% - var(--sgds-margin-xl) - var(--sgds-margin-xl));max-width:var(--sgds-dimension-888)}}@media screen and (min-width:1280px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1168)}}@media screen and (min-width:1440px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1312)}}.modal.show .modal-panel{opacity:1;transform:none}.modal-header{display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;max-width:var(--sgds-dimension-872)}.modal-header__title-description{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}:host([size=fullscreen]) .modal-header__title-description{gap:var(--sgds-gap-md)}slot[name=title]::slotted(*){--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-margin-xs:var(--sgds-margin-none);--sgds-font-size-6:var(--sgds-font-size-4);align-items:center;display:flex;flex:1 1 auto;font-size:var(--sgds-font-size-6,--sgds-font-size-4);gap:1rem;line-height:var(--sgds-line-height-40);margin:var(--sgds-margin-none,var(--sgds-margin-xs,--sgds-margin-2-xs))}slot[name=description]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);color:var(--sgds-color-subtle);line-height:var(--sgds-line-height-24);margin:var(--sgds-margin-none,--sgds-paragraph-spacing-xl)}.modal-body{-webkit-overflow-scrolling:touch;flex:1 1 auto;overflow:auto}.modal-body slot::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none)}.modal-footer{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:var(--sgds-gap-md);justify-content:flex-end;padding-top:var(--sgds-padding-md)}.modal:not(.has-footer) .modal-footer{display:none}.modal-overlay{background-color:var(--sgds-bg-overlay);bottom:0;left:0;position:fixed;right:0;top:0}[hidden]{display:none}`;class ql extends rt{constructor(){super(...arguments),this.hasSlotController=new Wi(this,"footer"),this.open=!1,this.noAnimation=!1,this.size="md",this.hasFooterSlot=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Nl(this),this._resizeHandler=this._debounce(this._onWindowResize.bind(this),200)}disconnectedCallback(){super.disconnectedCallback(),this._removeResizeListener(),dl(this)}firstUpdated(e){super.firstUpdated(e),this._onWindowResize(),this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),ll(this))}updated(){this.hasFooterSlot||(this.hasFooterSlot=this.hasSlotController.test("footer"))}_debounce(e,t){let s;return(...i)=>{clearTimeout(s),s=window.setTimeout((()=>e(...i)),t)}}_onWindowResize(){const e=this.panel.getBoundingClientRect().width,t=this.querySelectorAll("sgds-button[slot='footer']");this.panel&&(t.length<=1||(e<512||"fullscreen"===this.size&&e<768?t.forEach((e=>{e.fullWidth=!0})):t.forEach((e=>{e.fullWidth=!1}))))}_addResizeListener(){window.addEventListener("resize",this._resizeHandler)}_removeResizeListener(){window.removeEventListener("resize",this._resizeHandler)}async show(){if(!this.open)return this.open=!0,Mt(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,Mt(this,"sgds-after-hide")}requestClose(e){if(this.emit("sgds-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const e=Ct(this,"modal.denyClose");bt(this.panel,e.keyframes)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose("keyboard"))}_overlayClickHandler(){"fullscreen"!==this.size&&this.requestClose("overlay")}async handleOpenChange(){if(this.open){this.emit("sgds-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),ll(this),await Promise.all([xt(this.dialog),xt(this.overlay)]),this.dialog.hidden=!1;const e=Ct(this,"modal.show"),t=Ct(this,"modal.overlay.show");!this.noAnimation&&await Promise.all([bt(this.panel,e.keyframes,e.options),bt(this.overlay,t.keyframes,t.options)]),this.emit("sgds-after-show"),this.heading.focus(),this._addResizeListener()}else{this.emit("sgds-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([xt(this.dialog),xt(this.overlay)]);const e=Ct(this,"modal.hide"),t=Ct(this,"modal.overlay.hide");!this.noAnimation&&await Promise.all([bt(this.overlay,t.keyframes,t.options).then((()=>{this.overlay.hidden=!0})),bt(this.panel,e.keyframes,e.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,dl(this);const s=this.originalTrigger;"function"==typeof(null==s?void 0:s.focus)&&setTimeout((()=>s.focus())),this.emit("sgds-after-hide"),this._removeResizeListener()}}render(){return J`
|
|
3053
3053
|
<div
|
|
3054
3054
|
class=${ft({modal:!0,show:this.open,"has-footer":this.hasFooterSlot})}
|
|
3055
3055
|
>
|
|
@@ -3067,7 +3067,7 @@ class xl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3067
3067
|
<sgds-close-button
|
|
3068
3068
|
class="modal-header__close"
|
|
3069
3069
|
@click="${()=>this.requestClose("close-button")}"
|
|
3070
|
-
|
|
3070
|
+
aria-label="close modal"
|
|
3071
3071
|
></sgds-close-button>
|
|
3072
3072
|
<div class="modal-header">
|
|
3073
3073
|
<div class="modal-header__title-description">
|
|
@@ -3084,7 +3084,7 @@ class xl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3084
3084
|
</div>
|
|
3085
3085
|
</div>
|
|
3086
3086
|
</div>
|
|
3087
|
-
`}}ql.styles=[...rt.styles,xa,Hl,Ul],ql.dependencies={"sgds-close-button":
|
|
3087
|
+
`}}ql.styles=[...rt.styles,xa,Hl,Ul],ql.dependencies={"sgds-close-button":Ht},e([st(".modal")],ql.prototype,"dialog",void 0),e([st(".modal-panel")],ql.prototype,"panel",void 0),e([st(".modal-overlay")],ql.prototype,"overlay",void 0),e([st(".modal-title")],ql.prototype,"heading",void 0),e([Qe({type:Boolean,reflect:!0})],ql.prototype,"open",void 0),e([Qe({type:Boolean,reflect:!0})],ql.prototype,"noAnimation",void 0),e([Qe({reflect:!0})],ql.prototype,"size",void 0),e([Qe({type:Boolean})],ql.prototype,"hasFooterSlot",void 0),e([$t("open",{waitUntilFirstUpdate:!0})],ql.prototype,"handleOpenChange",null),St("modal.show",{keyframes:[{opacity:0,transform:"scale(1) translate(0, -100%)"},{opacity:1,transform:"scale(1) translate(0, 0%)"}],options:{duration:400,easing:"ease"}}),St("modal.hide",{keyframes:[{opacity:1,transform:"scale(1) translate(0, 0)"},{opacity:0,transform:"scale(1) translate(0, -100%)"}],options:{duration:400,easing:"ease"}}),St("modal.denyClose",{keyframes:[{transform:"scale(1)"},{transform:"scale(1.02)"},{transform:"scale(1)"}],options:{duration:400}}),St("modal.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:400}}),St("modal.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:400}}),Vt("sgds-modal",ql),Vt("sgds-overflow-menu",oa);var Yl=Se`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 jl extends rt{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=J`
|
|
3088
3088
|
<span aria-hidden="true">…</span>
|
|
3089
3089
|
<span class="sr-only" role="text">Ellipsis</span>
|
|
3090
3090
|
`,this._renderFirstEllipsis=()=>this.pages.length<=7||!(this.pages.length!==this._limit&&this.currentPage>4)?null:J`
|
|
@@ -3177,7 +3177,7 @@ class xl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3177
3177
|
${"button"===this.variant?this._renderButtonPagination():se}
|
|
3178
3178
|
</ul>
|
|
3179
3179
|
</nav>
|
|
3180
|
-
`}}jl.styles=[...rt.styles,Yl],jl.dependencies={"sgds-icon-button":lr,"sgds-button":ma,"sgds-icon":
|
|
3180
|
+
`}}jl.styles=[...rt.styles,Yl],jl.dependencies={"sgds-icon-button":lr,"sgds-button":ma,"sgds-icon":Ot},e([Qe({type:Number})],jl.prototype,"dataLength",void 0),e([Qe({type:Number})],jl.prototype,"currentPage",void 0),e([Qe({type:Number})],jl.prototype,"itemsPerPage",void 0),e([Qe({type:String})],jl.prototype,"variant",void 0),e([Qe({type:String})],jl.prototype,"navigation",void 0),e([Qe({type:String})],jl.prototype,"size",void 0),e([Je()],jl.prototype,"_limit",void 0),e([$t("currentPage",{waitUntilFirstUpdate:!1})],jl.prototype,"_handleValueChange",null),Vt("sgds-pagination",jl);
|
|
3181
3181
|
/**
|
|
3182
3182
|
* @license
|
|
3183
3183
|
* Copyright 2018 Google LLC
|
|
@@ -3198,7 +3198,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3198
3198
|
</div>
|
|
3199
3199
|
${this.label?J`<span class="label">${this.label}</span>`:se}
|
|
3200
3200
|
</div>
|
|
3201
|
-
`}}Ql.styles=[...rt.styles,Xl],e([Qe({type:String,reflect:!0})],Ql.prototype,"variant",void 0),e([Qe({type:Number,reflect:!0})],Ql.prototype,"value",void 0),e([Qe({type:Number,reflect:!0})],Ql.prototype,"ariamin",void 0),e([Qe({type:Number,reflect:!0})],Ql.prototype,"ariamax",void 0),e([Qe({type:String,reflect:!0})],Ql.prototype,"arialabel",void 0),e([Qe({type:String,reflect:!0})],Ql.prototype,"label",void 0),
|
|
3201
|
+
`}}Ql.styles=[...rt.styles,Xl],e([Qe({type:String,reflect:!0})],Ql.prototype,"variant",void 0),e([Qe({type:Number,reflect:!0})],Ql.prototype,"value",void 0),e([Qe({type:Number,reflect:!0})],Ql.prototype,"ariamin",void 0),e([Qe({type:Number,reflect:!0})],Ql.prototype,"ariamax",void 0),e([Qe({type:String,reflect:!0})],Ql.prototype,"arialabel",void 0),e([Qe({type:String,reflect:!0})],Ql.prototype,"label",void 0),Vt("sgds-progress-bar",Ql);var Jl=Se`.input-group{align-items:stretch;display:flex;flex-wrap:wrap;gap:var(--sgds-form-gap-lg);position:relative}.input-group>sgds-input{flex:1 1 auto;min-width:0;position:relative}.input-group sgds-button:focus,.input-group>sgds-input:focus{z-index:3}.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}`;class ed extends(Ia(Ha)){constructor(){super(...arguments),this.value=0,this.step=1,this.readonly=!1,this.defaultValue=0}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}async _handleChange(){const e=await this._sgdsInput;(parseInt(e.value)<this.step||""===e.value)&&(e.value="0"),this.value=parseInt(e.value),this._mixinSetFormValue(),this._mixinValidate(e.input),this.invalid=!this._mixinReportValidity()}async _handleInputChange(){const e=await this._sgdsInput;this.invalid=!1,(parseInt(e.value)<this.step||""===e.value)&&(e.value="0"),this.value=parseInt(e.value),this._mixinSetFormValue(),this._mixinValidate(e.input)}async _mixinResetFormControl(){const e=await this._sgdsInput;this.value=this.defaultValue,e.input.value=this.value.toString(),this._mixinResetValidity(e.input)}_handleKeyDown(e){["Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight",...Array.from(Array(10).keys()).map((e=>e.toString())),"Tab"].includes(e.key)||e.preventDefault()}_handleInvalid(){this.invalid=!0}_handleValid(){this.invalid=!1}plus(){this.plusBtn.click()}minus(){this.minusBtn.click()}async _onPlus(e){const t=await this._sgdsInput;e.preventDefault(),e.stopPropagation(),this.value=parseInt(t.value)+parseInt(t.step.toString()),this._validateOnClick(t.input)}async _onMinus(e){const t=await this._sgdsInput;e.preventDefault(),e.stopPropagation(),this.value<this.step?this.value=0:this.value=parseInt(t.value)-parseInt(t.step.toString()),this._validateOnClick(t.input)}async _validateOnClick(e){const t=await this._sgdsInput;await t.updateComplete,this._mixinSetFormValue(),this._mixinValidate(e),this.invalid=!this._mixinReportValidity()}_renderFeedback(){const e="both"===this.hasFeedback||"text"===this.hasFeedback;return this.invalid&&e?Tt` <div class="invalid-feedback-container">
|
|
3202
3202
|
<slot name="invalidIcon">
|
|
3203
3203
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
3204
3204
|
<path
|
|
@@ -3232,10 +3232,10 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3232
3232
|
<sgds-input
|
|
3233
3233
|
type="number"
|
|
3234
3234
|
class="quantity-toggle"
|
|
3235
|
-
name=${
|
|
3236
|
-
step=${
|
|
3237
|
-
min=${
|
|
3238
|
-
max=${
|
|
3235
|
+
name=${qt(this.name)}
|
|
3236
|
+
step=${qt(this.step)}
|
|
3237
|
+
min=${qt(this.min)}
|
|
3238
|
+
max=${qt(this.max)}
|
|
3239
3239
|
.value=${Ma(this.value)}
|
|
3240
3240
|
@sgds-change=${this._handleChange}
|
|
3241
3241
|
@sgds-input=${this._handleInputChange}
|
|
@@ -3245,7 +3245,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3245
3245
|
?disabled=${this.disabled}
|
|
3246
3246
|
id=${this._controlId}
|
|
3247
3247
|
?invalid=${this.invalid}
|
|
3248
|
-
hasFeedback=${
|
|
3248
|
+
hasFeedback=${qt("text"!==this.hasFeedback?"style":void 0)}
|
|
3249
3249
|
></sgds-input>
|
|
3250
3250
|
<sgds-icon-button
|
|
3251
3251
|
variant="ghost"
|
|
@@ -3259,20 +3259,20 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3259
3259
|
<div id="announcer" role="region" aria-live="assertive" class="visually-hidden">${this.value}</div>
|
|
3260
3260
|
${this._renderFeedback()}
|
|
3261
3261
|
</div>
|
|
3262
|
-
`}}ed.styles=[...Ha.styles,Za,Hl,
|
|
3262
|
+
`}}ed.styles=[...Ha.styles,Za,Hl,Da,Jl],ed.dependencies={"sgds-input":Kr,"sgds-icon-button":lr},e([st("sgds-icon-button[ariaLabel^='increase by']")],ed.prototype,"plusBtn",void 0),e([st("sgds-icon-button[ariaLabel^='decrease by']")],ed.prototype,"minusBtn",void 0),e([Qe({type:Number,reflect:!0})],ed.prototype,"value",void 0),e([Qe({type:Number})],ed.prototype,"step",void 0),e([Qe({type:Number})],ed.prototype,"min",void 0),e([Qe({type:Number})],ed.prototype,"max",void 0),e([Qe({type:String,reflect:!0})],ed.prototype,"hasFeedback",void 0),e([Qe({type:String,reflect:!0})],ed.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],ed.prototype,"readonly",void 0),e([Va()],ed.prototype,"defaultValue",void 0),e([it("sgds-input")],ed.prototype,"_sgdsInput",void 0),Vt("sgds-quantity-toggle",ed);var td=Se`:host{outline:0}.form-check-input[type=radio]{border-radius:50%}.form-check-input:checked,.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg width="8" height="8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z" fill="%23fff"/></svg>')}.form-check-input:checked.is-invalid,.form-check-input[checked].is-invalid{background-color:var(--sgds-form-danger-surface-default)}`;class sd extends rt{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.invalid=!1,this.radioId=Xi("radio")}connectedCallback(){super.connectedCallback(),this.setInitialAttributes(),this.addEventListeners()}handleCheckedChange(){var e;this.checked&&(null===(e=this.input)||void 0===e||e.focus()),this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleBlur(){this.emit("sgds-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.emit("sgds-focus")}addEventListeners(){this.addEventListener("blur",(()=>this.handleBlur())),this.addEventListener("click",(()=>this.handleClick())),this.addEventListener("focus",(()=>this.handleFocus()))}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return J`
|
|
3263
3263
|
<div class="form-check">
|
|
3264
3264
|
<input
|
|
3265
3265
|
class=${ft({"form-check-input":!0,"is-invalid":this.invalid})}
|
|
3266
3266
|
type="radio"
|
|
3267
|
-
id=${
|
|
3268
|
-
value=${
|
|
3267
|
+
id=${qt(this.radioId)}
|
|
3268
|
+
value=${qt(this.value)}
|
|
3269
3269
|
?checked=${this.checked}
|
|
3270
3270
|
?disabled=${this.disabled}
|
|
3271
3271
|
aria-disabled=${this.disabled?"true":"false"}
|
|
3272
3272
|
aria-checked=${this.checked?"true":"false"}
|
|
3273
3273
|
@click=${this.handleClick}
|
|
3274
3274
|
/>
|
|
3275
|
-
<label for="${
|
|
3275
|
+
<label for="${qt(this.radioId)}" aria-label=${qt(this.ariaLabel)} class="form-check-label">
|
|
3276
3276
|
<slot></slot>
|
|
3277
3277
|
</label>
|
|
3278
3278
|
</div>
|
|
@@ -3320,7 +3320,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3320
3320
|
</div>
|
|
3321
3321
|
`:se}
|
|
3322
3322
|
</fieldset>
|
|
3323
|
-
`}}ad.styles=[...Ha.styles,id],e([st("slot:not([name])")],ad.prototype,"defaultSlot",void 0),e([Je()],ad.prototype,"defaultValue",void 0),e([Qe({reflect:!0})],ad.prototype,"value",void 0),e([Qe({type:String,reflect:!0})],ad.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],ad.prototype,"hasFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],ad.prototype,"required",void 0),e([$t("value",{waitUntilFirstUpdate:!0})],ad.prototype,"_handleValueChange",null),e([$t("invalid",{waitUntilFirstUpdate:!0})],ad.prototype,"_handleInvalidChange",null),e([Je()],ad.prototype,"_isTouched",void 0),e([at()],ad.prototype,"_radios",void 0),e([$t("_isTouched",{waitUntilFirstUpdate:!0})],ad.prototype,"_handleIsTouched",null),e([$t("disabled",{waitUntilFirstUpdate:!0})],ad.prototype,"_handleDisabledChange",null),
|
|
3323
|
+
`}}ad.styles=[...Ha.styles,id],e([st("slot:not([name])")],ad.prototype,"defaultSlot",void 0),e([Je()],ad.prototype,"defaultValue",void 0),e([Qe({reflect:!0})],ad.prototype,"value",void 0),e([Qe({type:String,reflect:!0})],ad.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],ad.prototype,"hasFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],ad.prototype,"required",void 0),e([$t("value",{waitUntilFirstUpdate:!0})],ad.prototype,"_handleValueChange",null),e([$t("invalid",{waitUntilFirstUpdate:!0})],ad.prototype,"_handleInvalidChange",null),e([Je()],ad.prototype,"_isTouched",void 0),e([at()],ad.prototype,"_radios",void 0),e([$t("_isTouched",{waitUntilFirstUpdate:!0})],ad.prototype,"_handleIsTouched",null),e([$t("disabled",{waitUntilFirstUpdate:!0})],ad.prototype,"_handleDisabledChange",null),Vt("sgds-radio",sd),Vt("sgds-radio-group",ad);var od=Se`: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 nd extends rt{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 J`
|
|
3324
3324
|
<nav class=${ft({sticky:this.sticky})}>
|
|
3325
3325
|
<div>
|
|
3326
3326
|
<slot @click=${this.onToggle}></slot>
|
|
@@ -3351,7 +3351,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3351
3351
|
</div>
|
|
3352
3352
|
`,t=J` <slot @slotchange=${this._handleSlotChange} class="no-menu-default"></slot> `;return J`
|
|
3353
3353
|
<div class="sidenav-item" aria-haspopup="${!this.isLink}">${this.isLink?t:e}</div>
|
|
3354
|
-
`}}ld.styles=[...rt.styles,rd],ld.dependencies={"sgds-icon":
|
|
3354
|
+
`}}ld.styles=[...rt.styles,rd],ld.dependencies={"sgds-icon":Ot},e([st(".sidenav-body")],ld.prototype,"body",void 0),e([st(".sidenav-btn")],ld.prototype,"header",void 0),e([Qe({type:Boolean,reflect:!0})],ld.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],ld.prototype,"disabled",void 0),e([Je()],ld.prototype,"isLink",void 0),e([$t("active",{waitUntilFirstUpdate:!0})],ld.prototype,"_handleOpenChange",null),e([at()],ld.prototype,"_items",void 0),St("sidenav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),St("sidenav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var dd=Se`: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 cd extends rt{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 J` <slot @slotchange=${this._handleSlotChange}></slot> `}}cd.styles=[...rt.styles,dd],e([Qe({type:Boolean,reflect:!0})],cd.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],cd.prototype,"disabled",void 0),e([at({flatten:!0})],cd.prototype,"_anchor",void 0),e([$t("disabled",{waitUntilFirstUpdate:!0})],cd.prototype,"_handleDisabled",null),Vt("sgds-sidenav",nd),Vt("sgds-sidenav-item",ld),Vt("sgds-sidenav-link",cd);var hd=Se`.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 ud extends rt{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 J`
|
|
3355
3355
|
<div
|
|
3356
3356
|
class=${ft({skeleton:!0,"skeleton-paragraph":this.rows>0,"auto-size-rows":this.rows>0,sheen:this.sheen&&!this.rows})}
|
|
3357
3357
|
style=${Object.entries(e).filter((([e,t])=>t)).map((([e,t])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${t}`)).join("; ")}
|
|
@@ -3361,7 +3361,29 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3361
3361
|
style=${this.borderRadius?`border-radius: ${this.borderRadius}`:se}
|
|
3362
3362
|
></div>`})):se}
|
|
3363
3363
|
</div>
|
|
3364
|
-
`}}ud.styles=[hd],e([st(".skeleton")],ud.prototype,"skeleton",void 0),e([Qe({type:String,reflect:!0})],ud.prototype,"width",void 0),e([Qe({type:String,reflect:!0})],ud.prototype,"height",void 0),e([Qe({type:String,reflect:!0})],ud.prototype,"borderRadius",void 0),e([Qe({type:Number,reflect:!0})],ud.prototype,"rows",void 0),e([Qe({type:Boolean,reflect:!0})],ud.prototype,"sheen",void 0),
|
|
3364
|
+
`}}ud.styles=[hd],e([st(".skeleton")],ud.prototype,"skeleton",void 0),e([Qe({type:String,reflect:!0})],ud.prototype,"width",void 0),e([Qe({type:String,reflect:!0})],ud.prototype,"height",void 0),e([Qe({type:String,reflect:!0})],ud.prototype,"borderRadius",void 0),e([Qe({type:Number,reflect:!0})],ud.prototype,"rows",void 0),e([Qe({type:Boolean,reflect:!0})],ud.prototype,"sheen",void 0),Vt("sgds-skeleton",ud),Vt("sgds-spinner",nr);var pd=Se`.stepper{display:flex;flex-wrap:wrap}.stepper.vertical{flex-direction:column}.stepper.horizontal .stepper-item-container{align-items:center;display:flex;flex-basis:1em;flex-direction:column;flex-grow:1;flex-shrink:1;position:relative}.stepper.vertical .stepper-item-container{position:relative;width:fit-content}.stepper .stepper-item{align-items:center;display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}.stepper.vertical .stepper-item{align-items:flex-start;flex-direction:row}.stepper.vertical .stepper-item-container:not(:last-child) .stepper-item{margin-bottom:var(--sgds-padding-xl)}.stepper .stepper-item.is-clickable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.stepper.horizontal .stepper-item-container:not(:first-child) .stepper-item:before{background:var(--sgds-border-color-translucent);bottom:0;content:" ";height:var(--sgds-dimension-2);left:calc(-50% + 16px);position:absolute;top:15px;width:calc(100% - var(--sgds-dimension-32))}.stepper.vertical .stepper-item-container:not(:last-child) .stepper-item:after{background:var(--sgds-bg-translucent);bottom:0;content:" ";height:calc(100% - var(--sgds-dimension-32));left:15px;position:absolute;top:32px;width:var(--sgds-dimension-2)}.stepper.horizontal .stepper-item-container .stepper-item.is-active:before,.stepper.horizontal .stepper-item-container .stepper-item.is-completed:before,.stepper.vertical .stepper-item-container .stepper-item.is-completed:after{background:var(--sgds-primary-border-color-default)}.stepper .stepper-item.is-clickable{cursor:pointer}.stepper .stepper-marker{align-items:center;background:var(--sgds-bg-translucent);border:var(--sgds-border-width-2) solid var(--sgds-border-color-transparent);border-radius:50%;color:var(--sgds-color-default);display:flex;height:var(--sgds-dimension-32);justify-content:center;width:var(--sgds-dimension-32);z-index:1}.stepper:not(.vertical) .stepper-detail{max-width:var(--sgds-dimension-128);text-align:center}.stepper.vertical .stepper-detail{padding:var(--sgds-padding-2-xs) 0 0;text-align:left}.stepper .stepper-item:not(.is-active):not(.is-completed) .stepper-detail{color:var(--sgds-color-subtle)}.stepper .stepper-item.is-clickable:focus .stepper-marker,.stepper .stepper-item.is-clickable:focus-visible .stepper-marker,.stepper .stepper-item.is-clickable:hover .stepper-marker{background-color:var(--sgds-primary-surface-emphasis);border-color:var(--sgds-border-color-transparent);color:var(--sgds-color-fixed-light)}.stepper .stepper-item.is-clickable:focus .stepper-detail,.stepper .stepper-item.is-clickable:focus-visible .stepper-detail,.stepper .stepper-item.is-clickable:hover .stepper-detail{color:var(--sgds-primary-color-emphasis)}.stepper .stepper-item.is-clickable .stepper-detail,.stepper.clickable .stepper-item.is-active .stepper-detail{color:var(--sgds-primary-color-default)}.stepper .stepper-item.is-active .stepper-marker{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}.stepper .stepper-item.is-completed .stepper-marker{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}`;class gd extends rt{constructor(){super(...arguments),this.steps=[],this.activeStep=0,this.orientation="horizontal",this.clickable=!1,this.defaultActiveStep=0}getComponent(e=this.activeStep){return this.steps[e].component}nextStep(){this.emit("sgds-next-step"),this.activeStep<this.steps.length-1&&this.activeStep++}previousStep(){this.emit("sgds-previous-step"),this.activeStep>0&&this.activeStep--}lastStep(){this.emit("sgds-last-step"),this.activeStep!==this.steps.length-1&&(this.activeStep=this.steps.length-1)}firstStep(){this.emit("sgds-first-step"),this.activeStep>0&&(this.activeStep=0)}reset(){this.emit("sgds-reset"),this.activeStep=this.defaultActiveStep}_onStepperItemClick(e){this.activeStep>e&&(this.activeStep=e)}_handleActiveStepChange(){this.emit("sgds-arrived")}_handleKeyDown(e,t){"Enter"===e.key&&this._onStepperItemClick(t)}render(){return J`
|
|
3365
|
+
<div
|
|
3366
|
+
class="stepper ${ft({[`${this.orientation}`]:this.orientation,clickable:this.clickable})}"
|
|
3367
|
+
>
|
|
3368
|
+
${this.steps.map((({stepHeader:e,iconName:t},s)=>J`
|
|
3369
|
+
<div class="stepper-item-container">
|
|
3370
|
+
<div
|
|
3371
|
+
class="stepper-item ${ft({"is-active":this.activeStep===s,"is-completed":this.activeStep>s,"is-clickable":this.clickable&&this.activeStep>s})}"
|
|
3372
|
+
tabindex=${this.clickable&&this.activeStep>s?"0":"-1"}
|
|
3373
|
+
aria-current=${this.activeStep===s?"step":"false"}
|
|
3374
|
+
aria-disabled=${this.activeStep<=s?"true":"false"}
|
|
3375
|
+
@click="${this.clickable?()=>this._onStepperItemClick(s):null}"
|
|
3376
|
+
@keydown=${this.clickable?e=>this._handleKeyDown(e,s):null}
|
|
3377
|
+
>
|
|
3378
|
+
<div class="stepper-marker">
|
|
3379
|
+
${t?J`<sgds-icon name=${t} size="md"></sgds-icon>`:s+1}
|
|
3380
|
+
</div>
|
|
3381
|
+
<div class="stepper-detail">${e}</div>
|
|
3382
|
+
</div>
|
|
3383
|
+
</div>
|
|
3384
|
+
`))}
|
|
3385
|
+
</div>
|
|
3386
|
+
`}}gd.styles=[...rt.styles,pd],gd.dependencies={"sgds-icon":Ot},e([Qe({type:Array})],gd.prototype,"steps",void 0),e([Qe({type:Number,reflect:!0})],gd.prototype,"activeStep",void 0),e([Qe({type:String,reflect:!0})],gd.prototype,"orientation",void 0),e([Qe({type:Boolean,reflect:!0})],gd.prototype,"clickable",void 0),e([Va("activeStep")],gd.prototype,"defaultActiveStep",void 0),e([$t("activeStep",{waitUntilFirstUpdate:!0})],gd.prototype,"_handleActiveStepChange",null),Vt("sgds-stepper",gd);var vd=Se`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 md extends rt{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 J`
|
|
3365
3387
|
<div class="form-check">
|
|
3366
3388
|
<label
|
|
3367
3389
|
for="${this._inputId}"
|
|
@@ -3387,34 +3409,61 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3387
3409
|
<slot></slot>
|
|
3388
3410
|
</label>
|
|
3389
3411
|
</div>
|
|
3390
|
-
`}}
|
|
3412
|
+
`}}md.styles=[...rt.styles,Fa,vd],e([Qe({reflect:!0,type:String})],md.prototype,"size",void 0),e([Qe({reflect:!0,type:Boolean})],md.prototype,"icon",void 0),e([Qe({type:Boolean,reflect:!0})],md.prototype,"checked",void 0),e([Qe({type:Boolean,reflect:!0})],md.prototype,"disabled",void 0),e([Qe({type:Boolean})],md.prototype,"hasDefaultSlot",void 0),e([Qe({type:Boolean})],md.prototype,"hasLeftLabelSlot",void 0),e([Va("checked")],md.prototype,"defaultChecked",void 0),e([st('input[type="checkbox"]')],md.prototype,"input",void 0),e([$t("disabled",{waitUntilFirstUpdate:!0})],md.prototype,"_handleDisabledChange",null),Vt("sgds-switch",md);var fd=Se`.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}}`;const bd="system-banner-children-count-context";class wd extends rt{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=Ct(this,`banner.item.${t}`);await bt(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 J`
|
|
3391
3413
|
<div
|
|
3392
|
-
class="
|
|
3414
|
+
class="${ft({banner:!0})}"
|
|
3415
|
+
role="alert"
|
|
3416
|
+
aria-hidden=${this.show?"false":"true"}
|
|
3393
3417
|
>
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3418
|
+
<div class="content">
|
|
3419
|
+
<slot id="loop-slot"></slot>
|
|
3420
|
+
</div>
|
|
3421
|
+
${this.childCount>1?J` <div class="pagination">
|
|
3422
|
+
<sgds-icon-button
|
|
3423
|
+
name="chevron-left"
|
|
3424
|
+
tone="fixed-light"
|
|
3425
|
+
variant="ghost"
|
|
3426
|
+
size="xs"
|
|
3427
|
+
@click=${this._prev}
|
|
3428
|
+
></sgds-icon-button>
|
|
3429
|
+
<span>${this._currentIndex+1}/${this.childCount}</span>
|
|
3430
|
+
<sgds-icon-button
|
|
3431
|
+
name="chevron-right"
|
|
3432
|
+
tone="fixed-light"
|
|
3433
|
+
variant="ghost"
|
|
3434
|
+
size="xs"
|
|
3435
|
+
@click=${this._next}
|
|
3436
|
+
></sgds-icon-button>
|
|
3437
|
+
</div>`:se}
|
|
3438
|
+
${this.dismissible?J`
|
|
3439
|
+
<sgds-close-button aria-label="close the alert" @click=${this.close} tone="fixed-light"></sgds-close-button>
|
|
3440
|
+
`:se}
|
|
3441
|
+
</div>
|
|
3442
|
+
`}}wd.styles=[...rt.styles,fd],wd.dependencies={"sgds-close-button":Ht,"sgds-icon":Ot,"sgds-icon-button":lr},e([Qe({type:Boolean,reflect:!0})],wd.prototype,"show",void 0),e([Qe({type:Boolean,reflect:!0})],wd.prototype,"dismissible",void 0),e([at({flatten:!0})],wd.prototype,"bannerItem",void 0),e([st(".banner")],wd.prototype,"banner",void 0),e([Sl({context:bd}),Je()],wd.prototype,"childCount",void 0),e([Je()],wd.prototype,"_intervalId",void 0),e([Je()],wd.prototype,"_currentIndex",void 0),e([$t("show",{waitUntilFirstUpdate:!0})],wd.prototype,"_handleShowChange",null),St("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)"}}),St("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 yd=Se`:host{display:block;font-size:var(--sgds-font-size-1,14px);font-style:normal;font-weight:var(--sgds-font-weight-regular,400);letter-spacing:var(--sgds-letter-spacing-normal,0);line-height:var(--sgds-line-height-20,20px);width:inherit}.banner-item{color:var(--sgds-color-fixed-light);display:flex;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-2-xs) 0}.message{line-clamp:5;-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;max-height:calc(var(--sgds-line-height-20, 20px)*5);overflow:hidden;word-break:break-all}.message.truncated:after{background-color:var(--sgds-surface-fixed-dark);bottom:0;content:"";height:var(--sgds-line-height-20,20px);position:absolute;right:0;text-align:right;width:10ch}.clamped-container{display:inline-block;margin-right:var(--sgds-margin-md);max-width:var(--sgds-dimension-872);position:relative}.show-more{bottom:0;position:absolute;right:0;white-space:nowrap}.show-more__link{cursor:pointer;text-decoration:underline}.action{align-items:center;display:flex;gap:var(--sgds-gap-2-xs,4px);margin-top:6px;min-height:var(--sgds-line-height-20);white-space:nowrap}slot[name=action]::slotted(a){color:var(--sgds-color-fixed-light)!important;font-size:var(--sgds-font-size-1,14px)!important;text-decoration:none!important}.banner-item__message_and__action{display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-xs)}@media (min-width:512px){.banner-item__message_and__action{flex-direction:row;gap:var(--sgds-gap-sm)}.action{margin-left:auto;margin-top:0}.message{line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden;word-break:break-all}}`;class xd extends rt{constructor(){super(...arguments),this.hasActionSlot=!1,this.clamped=!1,this.siblingsCount=0,this.hasSlotController=new Wi(this,"action")}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete,this._clampCheck(),this._resizeObserver=new ResizeObserver((()=>this._clampCheck())),this._resizeObserver.observe(this.shadowRoot.querySelector(".message"))}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver&&this._resizeObserver.disconnect()}updated(){this.hasActionSlot||(this.hasActionSlot=this.hasSlotController.test("action"))}_clampCheck(){const e=this.shadowRoot.querySelector(".message");requestAnimationFrame((()=>{this.clamped=e.scrollHeight>e.clientHeight}))}_handleShowMoreClick(){this.emit("sgds-show-more")}render(){return J`
|
|
3443
|
+
<div class="banner-item">
|
|
3444
|
+
<slot name="icon"></slot>
|
|
3445
|
+
<div class="banner-item__message_and__action">
|
|
3446
|
+
<div class="clamped-container">
|
|
3447
|
+
<div class=${ft({message:!0,truncated:this.clamped})}>
|
|
3448
|
+
<slot></slot>
|
|
3409
3449
|
</div>
|
|
3410
|
-
|
|
3450
|
+
${this.clamped?J`<span class="show-more"
|
|
3451
|
+
>...<a class="show-more__link" @click="${this._handleShowMoreClick}">show more</a></span
|
|
3452
|
+
>`:se}
|
|
3453
|
+
</div>
|
|
3454
|
+
${this.hasActionSlot||this.siblingsCount>1?J`
|
|
3455
|
+
<div class="action">
|
|
3456
|
+
<slot name="action"></slot>
|
|
3457
|
+
</div>
|
|
3458
|
+
`:se}
|
|
3459
|
+
</div>
|
|
3411
3460
|
</div>
|
|
3412
|
-
`}}
|
|
3461
|
+
`}}xd.styles=[...rt.styles,yd],e([Qe({type:Boolean})],xd.prototype,"hasActionSlot",void 0),e([Je()],xd.prototype,"clamped",void 0),e([Ml({context:bd,subscribe:!0}),Je()],xd.prototype,"siblingsCount",void 0),customElements.define("sgds-system-banner",wd),customElements.define("sgds-system-banner-item",xd);var kd=Se`: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 _d=0;class Cd extends rt{constructor(){super(...arguments),this.attrId=++_d,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 J`
|
|
3413
3462
|
<div data-testid="inner-tab" tabindex=${this.disabled?"-1":"0"} class="tab">
|
|
3414
3463
|
<slot name="icon"></slot>
|
|
3415
3464
|
<slot></slot>
|
|
3416
3465
|
</div>
|
|
3417
|
-
`}}
|
|
3466
|
+
`}}Cd.styles=[kd],e([st(".tab")],Cd.prototype,"tab",void 0),e([Qe({reflect:!0})],Cd.prototype,"panel",void 0),e([Qe({type:Boolean,reflect:!0})],Cd.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],Cd.prototype,"disabled",void 0),e([$t("active")],Cd.prototype,"handleActiveChange",null),e([$t("disabled")],Cd.prototype,"handleDisabledChange",null);var Sd=Se`.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 Md extends rt{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 J`
|
|
3418
3467
|
<div class="tab-group" @click=${this._handleClick} @keydown=${this._handleKeyDown}>
|
|
3419
3468
|
<div class="tab-group__nav" role="tablist">
|
|
3420
3469
|
<slot name="nav" @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -3423,11 +3472,11 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3423
3472
|
<slot class="tab-group__body" @slotchange=${this._syncTabsAndPanels}></slot>
|
|
3424
3473
|
</div>
|
|
3425
3474
|
</div>
|
|
3426
|
-
`}}
|
|
3475
|
+
`}}Md.styles=[...rt.styles,Sd],e([st(".tab-group")],Md.prototype,"_tabGroup",void 0),e([st(".tab-group__body")],Md.prototype,"_body",void 0),e([st(".tab-group__nav")],Md.prototype,"_nav",void 0),e([Qe({type:String,reflect:!0})],Md.prototype,"variant",void 0),e([Qe({type:String,reflect:!0})],Md.prototype,"orientation",void 0),e([Qe({type:String,reflect:!0})],Md.prototype,"density",void 0),e([at({slot:"nav",flatten:!0})],Md.prototype,"_navSlot",void 0);var $d=Se`.tab-panel{display:block}.tab-panel:not(.tab-panel--active){display:none}`;let Ad=0;class Dd extends rt{constructor(){super(...arguments),this.attrId=++Ad,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 J`
|
|
3427
3476
|
<slot
|
|
3428
3477
|
class=${ft({"tab-panel":!0,"tab-panel--active":this.active})}
|
|
3429
3478
|
></slot>
|
|
3430
|
-
`}}
|
|
3479
|
+
`}}Dd.styles=[...rt.styles,$d],e([Qe({reflect:!0})],Dd.prototype,"name",void 0),e([Qe({type:Boolean,reflect:!0})],Dd.prototype,"active",void 0),e([$t("active")],Dd.prototype,"_handleActiveChange",null),Vt("sgds-tab",Cd),Vt("sgds-tab-group",Md),Vt("sgds-tab-panel",Dd);var Vd=Se`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 Ed extends rt{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 J`
|
|
3431
3480
|
<thead>
|
|
3432
3481
|
<tr>
|
|
3433
3482
|
${this.rowHeader.map((e=>J` <th>${e}</th> `))}
|
|
@@ -3473,7 +3522,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3473
3522
|
${this._renderTable()}
|
|
3474
3523
|
</table>`}
|
|
3475
3524
|
</div>
|
|
3476
|
-
`}}
|
|
3525
|
+
`}}Ed.styles=[...rt.styles,Vd],e([Qe({type:String,reflect:!0})],Ed.prototype,"responsive",void 0),e([Qe({type:Array})],Ed.prototype,"rowHeader",void 0),e([Qe({type:Array})],Ed.prototype,"columnHeader",void 0),e([Qe({type:Array})],Ed.prototype,"tableData",void 0),e([Qe({type:String})],Ed.prototype,"headerPosition",void 0),e([Qe({type:Boolean})],Ed.prototype,"hasDefaultSlot",void 0);var Id=Se`: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 Bd extends rt{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 J`<slot></slot>`}}Bd.styles=[...rt.styles,Id],e([Je()],Bd.prototype,"border",void 0),e([$t("border")],Bd.prototype,"_handleBorderChange",null);var Pd=Se`:host{display:table-row;width:100%}`;class Ld extends rt{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return J`<slot class="table-row"></slot>`}}Ld.styles=[...rt.styles,Pd];var Td=Se`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;padding:var(--sgds-padding-lg)}`;class Fd extends rt{connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return J` <slot class="table-cell"></slot> `}}Fd.styles=[...rt.styles,Td],Vt("sgds-table",Ed),Vt("sgds-table-head",Bd),Vt("sgds-table-row",Ld),Vt("sgds-table-cell",Fd);var Zd=Se`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 Hd extends(Ia(Ha)){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`
|
|
3477
3526
|
<div
|
|
3478
3527
|
class="form-text word-count ${ft({"invalid-feedback":this.invalid&&this.hasFeedback})}"
|
|
3479
3528
|
>
|
|
@@ -3487,20 +3536,20 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3487
3536
|
<textarea
|
|
3488
3537
|
class=${ft({"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})}
|
|
3489
3538
|
id=${this._controlId}
|
|
3490
|
-
name=${
|
|
3491
|
-
rows=${
|
|
3492
|
-
placeholder=${
|
|
3493
|
-
minlength=${
|
|
3494
|
-
maxlength=${
|
|
3539
|
+
name=${qt(this.name)}
|
|
3540
|
+
rows=${qt(this.rows)}
|
|
3541
|
+
placeholder=${qt(this.placeholder)}
|
|
3542
|
+
minlength=${qt(this.minlength)}
|
|
3543
|
+
maxlength=${qt(this.maxlength)}
|
|
3495
3544
|
.value=${Ma(this.value)}
|
|
3496
3545
|
aria-invalid=${this.invalid?"true":"false"}
|
|
3497
|
-
spellcheck=${
|
|
3546
|
+
spellcheck=${qt(this.spellcheck)}
|
|
3498
3547
|
?disabled=${this.disabled}
|
|
3499
3548
|
?readonly=${this.readonly}
|
|
3500
3549
|
?required=${this.required}
|
|
3501
3550
|
?autofocus=${this.autofocus}
|
|
3502
|
-
autocorrect=${
|
|
3503
|
-
inputmode=${
|
|
3551
|
+
autocorrect=${qt(this.autocorrect)}
|
|
3552
|
+
inputmode=${qt(this.inputmode)}
|
|
3504
3553
|
@input=${e=>this._handleInputChange(e)}
|
|
3505
3554
|
@change=${e=>this._handleChange(e)}
|
|
3506
3555
|
@invalid=${e=>this._handleInvalid(e)}
|
|
@@ -3519,7 +3568,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3519
3568
|
${this.maxlength>0?this._wordCount():se}
|
|
3520
3569
|
</div>
|
|
3521
3570
|
</div>
|
|
3522
|
-
`}}
|
|
3571
|
+
`}}Hd.styles=[...Ha.styles,Da,Zd],e([st("textarea.form-control-group")],Hd.prototype,"textarea",void 0),e([Qe({type:String,reflect:!0})],Hd.prototype,"name",void 0),e([Qe({type:String,reflect:!0})],Hd.prototype,"value",void 0),e([Qe({type:Number,reflect:!0})],Hd.prototype,"minlength",void 0),e([Qe({type:Number,reflect:!0})],Hd.prototype,"maxlength",void 0),e([Qe({type:Boolean,reflect:!0})],Hd.prototype,"spellcheck",void 0),e([Qe({type:Number})],Hd.prototype,"rows",void 0),e([Qe({type:String,reflect:!0})],Hd.prototype,"placeholder",void 0),e([Qe({type:String,reflect:!0})],Hd.prototype,"invalidFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],Hd.prototype,"autofocus",void 0),e([Qe({type:Boolean,reflect:!0})],Hd.prototype,"readonly",void 0),e([Qe({type:String,reflect:!0})],Hd.prototype,"resize",void 0),e([Qe({type:String,reflect:!0})],Hd.prototype,"inputmode",void 0),e([Qe({type:Boolean,reflect:!0})],Hd.prototype,"autocorrect",void 0),e([Va()],Hd.prototype,"defaultValue",void 0),e([Qe({type:Boolean,reflect:!0})],Hd.prototype,"hasFeedback",void 0),e([Qe({type:Boolean,reflect:!0})],Hd.prototype,"required",void 0),e([Qe({reflect:!0})],Hd.prototype,"hintText",void 0),e([Je()],Hd.prototype,"_isTouched",void 0),e([$t("rows",{waitUntilFirstUpdate:!0})],Hd.prototype,"_handleRowsChange",null),e([$t("_isTouched",{waitUntilFirstUpdate:!0})],Hd.prototype,"_handleIsTouched",null),e([$t("disabled",{waitUntilFirstUpdate:!0})],Hd.prototype,"_handleDisabledChange",null),e([$t("value",{waitUntilFirstUpdate:!0})],Hd.prototype,"_handleValueChange",null),Vt("sgds-textarea",Hd);var zd=Se`: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 Rd extends rt{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,Mt(this,"sgds-after-show")}async hideToast(){if(this.show)return this.show=!1,Mt(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=Ct(this,"toast.show");this.noAnimation||await bt(this.toast,e.keyframes,e.options),this.emit("sgds-after-show")}else{this.emit("sgds-hide");const e=Ct(this,"toast.hide");this.noAnimation||await bt(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),J`
|
|
3523
3572
|
<div
|
|
3524
3573
|
class="toast"
|
|
3525
3574
|
role="alert"
|
|
@@ -3537,22 +3586,22 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3537
3586
|
</div>
|
|
3538
3587
|
${this.dismissible?J`<sgds-close-button
|
|
3539
3588
|
class="close-btn"
|
|
3540
|
-
|
|
3589
|
+
aria-label="close toast"
|
|
3541
3590
|
@click=${this.handleCloseClick}
|
|
3542
3591
|
></sgds-close-button>`:se}
|
|
3543
3592
|
</div>
|
|
3544
|
-
`}}
|
|
3593
|
+
`}}Rd.styles=[...rt.styles,zd],Rd.dependencies={"sgds-close-button":Ht},e([st("div.toast")],Rd.prototype,"toast",void 0),e([Qe({type:Boolean,reflect:!0})],Rd.prototype,"show",void 0),e([Qe({type:String,reflect:!0})],Rd.prototype,"title",void 0),e([Qe({type:Boolean,reflect:!0})],Rd.prototype,"noAnimation",void 0),e([Qe({type:Boolean,reflect:!0})],Rd.prototype,"autohide",void 0),e([Qe({type:Number,reflect:!0})],Rd.prototype,"delay",void 0),e([Qe({type:String,reflect:!0})],Rd.prototype,"variant",void 0),e([Qe({type:Boolean,reflect:!0})],Rd.prototype,"dismissible",void 0),e([$t("show",{waitUntilFirstUpdate:!0})],Rd.prototype,"handleShowChange",null),e([ot({slot:"action",flatten:!0})],Rd.prototype,"_actionNodes",void 0),St("toast.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:400,easing:"ease"}}),St("toast.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:400,easing:"ease"}});var Od=Se`.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 Nd extends rt{render(){return Tt`
|
|
3545
3594
|
<div
|
|
3546
3595
|
class=${ft({"sgds toast-container":!0,[this.position]:this.position})}
|
|
3547
3596
|
>
|
|
3548
3597
|
<slot></slot>
|
|
3549
3598
|
</div>
|
|
3550
|
-
`}}
|
|
3599
|
+
`}}Nd.styles=[Od],e([Qe({type:String,reflect:!0})],Nd.prototype,"position",void 0),Vt("sgds-toast",Rd),Vt("sgds-toast-container",Nd),Vt("sgds-tooltip",ji);var Ud=Se`.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 qd extends rt{render(){return J`<div class="container">
|
|
3551
3600
|
<slot></slot>
|
|
3552
3601
|
<ul class="contents">
|
|
3553
3602
|
<slot name="contents"></slot>
|
|
3554
3603
|
</ul>
|
|
3555
|
-
</div> `}}zd.styles=[...rt.styles,Hd],At("sgds-table-of-contents",zd);var Rd=Se`: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}}`,Od=Se`.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 Nd=["Enter"," "];class Ud extends rt{constructor(){super(...arguments),this.isCollapsed=!1,this.isMenuOpen=!1,this._handleResize=async()=>{this.isCollapsed=window.innerWidth<$l,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<$l?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){Nd.includes(e.key)&&(e.preventDefault(),this._toggleMenu())}async show(){if(!this.isMenuOpen)return this.isMenuOpen=!0,Mt(this,"sgds-after-show")}async hide(){if(this.isMenuOpen)return this.isMenuOpen=!1,document.querySelector("body").style.removeProperty("overflow"),Mt(this,"sgds-after-hide")}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!1);await xt(this.mobileNav),this.isCollapsed&&(this.mobileNav.style.display="flex");const{keyframes:e,options:t}=Ct(this,"subnav.show");await bt(this.mobileNav,yt(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 xt(this.mobileNav);const{keyframes:e,options:t}=Ct(this,"subnav.hide");await bt(this.mobileNav,yt(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 J`
|
|
3604
|
+
</div> `}}qd.styles=[...rt.styles,Ud],Vt("sgds-table-of-contents",qd);var Yd=Se`: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}}`,jd=Se`.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 Wd=["Enter"," "];class Kd extends rt{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<$l,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<$l?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){Wd.includes(e.key)&&(e.preventDefault(),this._toggleMenu())}async show(){if(!this.isMenuOpen)return this.isMenuOpen=!0,Mt(this,"sgds-after-show")}async hide(){if(this.isMenuOpen)return this.isMenuOpen=!1,document.querySelector("body").style.removeProperty("overflow"),Mt(this,"sgds-after-hide")}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!1);await xt(this.mobileNav),this.isCollapsed&&(this.mobileNav.style.display="flex");const{keyframes:e,options:t}=Ct(this,"subnav.show");await bt(this.mobileNav,yt(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 xt(this.mobileNav);const{keyframes:e,options:t}=Ct(this,"subnav.hide");await bt(this.mobileNav,yt(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 J`
|
|
3556
3605
|
<nav aria-label="Sub navigation">
|
|
3557
3606
|
<div
|
|
3558
3607
|
class=${ft({"sgds-container":!0,subnav:!0,collapsed:!this.isMenuOpen})}
|
|
@@ -3573,16 +3622,18 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3573
3622
|
<div class="subnav-nav">
|
|
3574
3623
|
<slot></slot>
|
|
3575
3624
|
</div>
|
|
3576
|
-
<div
|
|
3625
|
+
<div
|
|
3626
|
+
class="${ft({"subnav-actions":!0,"no-actions":!this.hasActionsSlot})}"
|
|
3627
|
+
>
|
|
3577
3628
|
<slot name="actions"></slot>
|
|
3578
3629
|
</div>
|
|
3579
3630
|
</div>
|
|
3580
3631
|
</div>
|
|
3581
3632
|
</nav>
|
|
3582
|
-
`}}
|
|
3633
|
+
`}}Kd.styles=[...rt.styles,Yd,jd],Kd.dependencies={"sgds-icon":Ot},e([Qe({type:Boolean})],Kd.prototype,"hasActionsSlot",void 0),e([st("nav")],Kd.prototype,"nav",void 0),e([st(".subnav-nav")],Kd.prototype,"mobileNav",void 0),e([st(".header-container")],Kd.prototype,"headerContainer",void 0),e([st(".subnav-toggler")],Kd.prototype,"toggler",void 0),e([st(".subnav-nav-group")],Kd.prototype,"navGroup",void 0),e([st(".subnav-actions")],Kd.prototype,"mobileActions",void 0),e([Je()],Kd.prototype,"isCollapsed",void 0),e([Je()],Kd.prototype,"isMenuOpen",void 0),e([$t("isMenuOpen",{waitUntilFirstUpdate:!0})],Kd.prototype,"handleOpenChange",null),e([$t("isCollapsed",{waitUntilFirstUpdate:!0})],Kd.prototype,"handleCollapsedChange",null),St("subnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),St("subnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var Gd=Se`: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 Xd extends rt{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 J`<slot @slotchange=${this._handleSlotChange}></slot>`}}Xd.styles=[...rt.styles,Gd],e([Qe({type:Boolean,reflect:!0})],Xd.prototype,"active",void 0),e([Qe({type:Boolean,reflect:!0})],Xd.prototype,"disabled",void 0),e([$t("disabled")],Xd.prototype,"_handleDisabled",null),Vt("sgds-subnav",Kd),Vt("sgds-subnav-item",Xd);var Qd=Se`: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 Jd extends Ta{constructor(){super(...arguments),this._renderItemContent=()=>J`<div class="normal-item-content">
|
|
3583
3634
|
<slot></slot>
|
|
3584
3635
|
${this.active?J` <sgds-icon name="check"></sgds-icon> `:se}
|
|
3585
|
-
</div>`}}
|
|
3636
|
+
</div>`}}Jd.dependencies={"sgds-icon":Ot};class ec extends Ba{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 J` <div class="empty-menu">No options</div> `}_renderMenu(){const e=this.menuList.map((e=>{const t=e.value===this.value;return J`
|
|
3586
3637
|
<sgds-select-option
|
|
3587
3638
|
?active=${t}
|
|
3588
3639
|
value=${e.value}
|
|
@@ -3602,8 +3653,8 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3602
3653
|
class="form-control"
|
|
3603
3654
|
type="text"
|
|
3604
3655
|
id=${this._controlId}
|
|
3605
|
-
name=${
|
|
3606
|
-
placeholder=${
|
|
3656
|
+
name=${qt(this.name)}
|
|
3657
|
+
placeholder=${qt(this.placeholder)}
|
|
3607
3658
|
aria-invalid=${this.invalid?"true":"false"}
|
|
3608
3659
|
?autofocus=${this.autofocus}
|
|
3609
3660
|
?disabled=${this.disabled}
|
|
@@ -3612,7 +3663,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3612
3663
|
.value=${this.displayValue}
|
|
3613
3664
|
@blur=${this._handleInputBlur}
|
|
3614
3665
|
@focus=${this._handleFocus}
|
|
3615
|
-
aria-describedby=${
|
|
3666
|
+
aria-describedby=${qt(this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:void 0)}
|
|
3616
3667
|
aria-labelledby="${this._labelId} ${this._controlId}Help ${this.invalid&&this.hasFeedback?`${this._controlId}-invalid`:""}"
|
|
3617
3668
|
@keydown=${this._blockInputKeydown}
|
|
3618
3669
|
/>
|
|
@@ -3629,7 +3680,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3629
3680
|
<slot id="default" @slotchange=${this._handleSlotChange}>${this._renderMenu()}</slot>
|
|
3630
3681
|
</ul>
|
|
3631
3682
|
</div>
|
|
3632
|
-
`}}
|
|
3683
|
+
`}}ec.styles=[...Ba.styles,Da,Qd],ec.dependencies={"sgds-icon":Ot,"sgds-select-option":Jd},e([at({flatten:!0,selector:"sgds-select-option"})],ec.prototype,"options",void 0),e([$t("value",{waitUntilFirstUpdate:!0})],ec.prototype,"_handleValueChange",null),Vt("sgds-select",ec),Vt("sgds-select-option",Jd);var tc=Se`: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=image-badge]::slotted(*){left:20px;position:absolute;top:20px}slot[name=image-action]::slotted(*){position:absolute;right:20px;top:20px}`;class sc extends _a{constructor(){super(...arguments),this.noPadding=!1,this.imagePosition="before",this.imageAdjustment="default"}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._imageNode.length){const e=this.shadowRoot.querySelector(".card-image"),t=this.shadowRoot.querySelector(".card-body");e.style.display="none",this.noPadding&&(t.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)}}handleImgSlotChange(e){if(e.target.assignedNodes({flatten:!0}).length>1)return console.error("Multiple elements passed into SgdsCard's image slot")}render(){const e=this.stretchedLink?Pt`a`:Pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return Tt`
|
|
3633
3684
|
<${e}
|
|
3634
3685
|
class="card ${ft({disabled:this.disabled})}"
|
|
3635
3686
|
tabindex=${t}
|
|
@@ -3656,7 +3707,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3656
3707
|
</slot>
|
|
3657
3708
|
</div>
|
|
3658
3709
|
</${e}>
|
|
3659
|
-
`}}
|
|
3710
|
+
`}}sc.styles=[..._a.styles,tc],e([ot({slot:"image",flatten:!0})],sc.prototype,"_imageNode",void 0),e([at({slot:"footer"})],sc.prototype,"footerNode",void 0),e([at({slot:"link"})],sc.prototype,"linkNode",void 0),e([Qe({type:Boolean,reflect:!0})],sc.prototype,"noPadding",void 0),e([Qe({type:String,reflect:!0})],sc.prototype,"imagePosition",void 0),e([Qe({type:String,reflect:!0})],sc.prototype,"imageAdjustment",void 0),Vt("sgds-image-card",sc);var ic=Se`: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 ac 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?Pt`a`:Pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return Tt`
|
|
3660
3711
|
<${e}
|
|
3661
3712
|
class="card ${ft({disabled:this.disabled})}"
|
|
3662
3713
|
tabindex=${t}
|
|
@@ -3682,7 +3733,7 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3682
3733
|
</slot>
|
|
3683
3734
|
</div>
|
|
3684
3735
|
</${e}>
|
|
3685
|
-
`}}
|
|
3736
|
+
`}}ac.styles=[..._a.styles,ic],e([ot({slot:"upper",flatten:!0})],ac.prototype,"_upperNode",void 0),e([Qe({type:Boolean,reflect:!0})],ac.prototype,"noPadding",void 0),Vt("sgds-thumbnail-card",ac);var oc=Se`: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 nc 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?Pt`a`:Pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return Tt`
|
|
3686
3737
|
<${e}
|
|
3687
3738
|
class="${ft({card:!0,disabled:this.disabled})}"
|
|
3688
3739
|
tabindex=${t}
|
|
@@ -3708,5 +3759,5 @@ const Wl="important",Kl=" !"+Wl;const Gl=vt(class extends mt{constructor(e){if(s
|
|
|
3708
3759
|
</slot>
|
|
3709
3760
|
</div>
|
|
3710
3761
|
</${e}>
|
|
3711
|
-
`}}
|
|
3762
|
+
`}}nc.styles=[..._a.styles,oc],e([ot({slot:"icon",flatten:!0})],nc.prototype,"_iconNode",void 0),e([ot({slot:"upper",flatten:!0})],nc.prototype,"_upperNode",void 0),e([at({slot:"footer"})],nc.prototype,"footerNode",void 0),e([at({slot:"link"})],nc.prototype,"linkNode",void 0),e([Qe({type:Boolean,reflect:!0})],nc.prototype,"noPadding",void 0),Vt("sgds-icon-card",nc)}));
|
|
3712
3763
|
//# sourceMappingURL=index.umd.min.js.map
|