@govtechsg/sgds-web-component 3.15.1-rc.2 → 3.16.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/components/Badge/index.umd.min.js +1 -1
- package/components/Badge/index.umd.min.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +6 -6
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +2 -2
- 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/drawer.js +1 -1
- package/components/Drawer/index.umd.min.js +1 -1
- package/components/Drawer/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +9 -9
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Modal/index.umd.min.js +1 -1
- package/components/Modal/index.umd.min.js.map +1 -1
- package/components/Modal/modal.js +1 -1
- package/components/OverflowMenu/index.umd.min.js +6 -6
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/Select/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Subnav/index.umd.min.js +1 -1
- package/components/Subnav/index.umd.min.js.map +1 -1
- package/components/Subnav/subnav.js +1 -1
- package/components/Toast/index.umd.min.js +1 -1
- package/components/Toast/index.umd.min.js.map +1 -1
- package/components/Toast/toast-container.js +1 -1
- package/components/Tooltip/index.umd.min.js +1 -1
- package/components/Tooltip/index.umd.min.js.map +1 -1
- package/components/Tooltip/tooltip.js +1 -1
- package/components/index.d.ts +0 -1
- package/components/index.js +0 -1
- package/components/index.js.map +1 -1
- package/components/index.umd.min.js +64 -116
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +1 -5
- package/css/utility.css +0 -14
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/index.umd.min.js +63 -194
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/Drawer/drawer.cjs.js +1 -1
- package/react/components/Drawer/drawer.js +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Modal/modal.cjs.js +1 -1
- package/react/components/Modal/modal.js +1 -1
- package/react/components/Subnav/subnav.cjs.js +1 -1
- package/react/components/Subnav/subnav.js +1 -1
- package/react/components/Toast/toast-container.cjs.js +1 -1
- package/react/components/Toast/toast-container.js +1 -1
- package/react/components/Tooltip/tooltip.cjs.js +1 -1
- package/react/components/Tooltip/tooltip.js +1 -1
- package/react/index.cjs.js +54 -62
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +1 -5
- package/react/index.js +1 -5
- package/react/index.js.map +1 -1
- package/themes/root.css +0 -13
- package/components/Sidebar/index.d.ts +0 -16
- package/components/Sidebar/index.js +0 -10
- package/components/Sidebar/index.js.map +0 -1
- package/components/Sidebar/index.umd.min.js +0 -2501
- package/components/Sidebar/index.umd.min.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-group.d.ts +0 -51
- package/components/Sidebar/sgds-sidebar-group.js +0 -123
- package/components/Sidebar/sgds-sidebar-group.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-item.d.ts +0 -17
- package/components/Sidebar/sgds-sidebar-item.js +0 -61
- package/components/Sidebar/sgds-sidebar-item.js.map +0 -1
- package/components/Sidebar/sgds-sidebar-section.d.ts +0 -56
- package/components/Sidebar/sgds-sidebar-section.js +0 -125
- package/components/Sidebar/sgds-sidebar-section.js.map +0 -1
- package/components/Sidebar/sgds-sidebar.d.ts +0 -161
- package/components/Sidebar/sgds-sidebar.js +0 -424
- package/components/Sidebar/sgds-sidebar.js.map +0 -1
- package/components/Sidebar/sidebar-context.d.ts +0 -51
- package/components/Sidebar/sidebar-context.js +0 -45
- package/components/Sidebar/sidebar-context.js.map +0 -1
- package/components/Sidebar/sidebar-element.d.ts +0 -112
- package/components/Sidebar/sidebar-element.js +0 -280
- package/components/Sidebar/sidebar-element.js.map +0 -1
- package/components/Sidebar/sidebar-item.js +0 -6
- package/components/Sidebar/sidebar-item.js.map +0 -1
- package/components/Sidebar/sidebar-section.js +0 -6
- package/components/Sidebar/sidebar-section.js.map +0 -1
- package/components/Sidebar/sidebar.js +0 -6
- package/components/Sidebar/sidebar.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js +0 -129
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-group.js +0 -124
- package/react/components/Sidebar/sgds-sidebar-group.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-item.cjs.js +0 -67
- package/react/components/Sidebar/sgds-sidebar-item.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-item.js +0 -62
- package/react/components/Sidebar/sgds-sidebar-item.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js +0 -131
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar-section.js +0 -126
- package/react/components/Sidebar/sgds-sidebar-section.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar.cjs.js +0 -430
- package/react/components/Sidebar/sgds-sidebar.cjs.js.map +0 -1
- package/react/components/Sidebar/sgds-sidebar.js +0 -425
- package/react/components/Sidebar/sgds-sidebar.js.map +0 -1
- package/react/components/Sidebar/sidebar-context.cjs.js +0 -54
- package/react/components/Sidebar/sidebar-context.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-context.js +0 -46
- package/react/components/Sidebar/sidebar-context.js.map +0 -1
- package/react/components/Sidebar/sidebar-element.cjs.js +0 -285
- package/react/components/Sidebar/sidebar-element.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-element.js +0 -281
- package/react/components/Sidebar/sidebar-element.js.map +0 -1
- package/react/components/Sidebar/sidebar-item.cjs.js +0 -11
- package/react/components/Sidebar/sidebar-item.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-item.js +0 -7
- package/react/components/Sidebar/sidebar-item.js.map +0 -1
- package/react/components/Sidebar/sidebar-section.cjs.js +0 -11
- package/react/components/Sidebar/sidebar-section.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar-section.js +0 -7
- package/react/components/Sidebar/sidebar-section.js.map +0 -1
- package/react/components/Sidebar/sidebar.cjs.js +0 -11
- package/react/components/Sidebar/sidebar.cjs.js.map +0 -1
- package/react/components/Sidebar/sidebar.js +0 -7
- package/react/components/Sidebar/sidebar.js.map +0 -1
- package/react/sidebar/index.cjs.js +0 -42
- package/react/sidebar/index.cjs.js.map +0 -1
- package/react/sidebar/index.d.ts +0 -2
- package/react/sidebar/index.js +0 -18
- package/react/sidebar/index.js.map +0 -1
- package/react/sidebar-group/index.cjs.js +0 -40
- package/react/sidebar-group/index.cjs.js.map +0 -1
- package/react/sidebar-group/index.d.ts +0 -2
- package/react/sidebar-group/index.js +0 -16
- package/react/sidebar-group/index.js.map +0 -1
- package/react/sidebar-item/index.cjs.js +0 -40
- package/react/sidebar-item/index.cjs.js.map +0 -1
- package/react/sidebar-item/index.d.ts +0 -2
- package/react/sidebar-item/index.js +0 -16
- package/react/sidebar-item/index.js.map +0 -1
- package/react/sidebar-section/index.cjs.js +0 -40
- package/react/sidebar-section/index.cjs.js.map +0 -1
- package/react/sidebar-section/index.d.ts +0 -2
- package/react/sidebar-section/index.js +0 -16
- package/react/sidebar-section/index.js.map +0 -1
package/index.umd.min.js
CHANGED
|
@@ -10,7 +10,7 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const M=globalThis,S=e=>{M.emitLitDebugLogEvents&&M.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let $,A=0;M.litIssuedWarnings??=new Set,$=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",M.litIssuedWarnings.has(t)||M.litIssuedWarnings.has(e)||(console.warn(t),M.litIssuedWarnings.add(t))},queueMicrotask(()=>{$("dev-mode","Lit is in dev mode. Not recommended for production!")});const V=M.ShadyDOM?.inUse&&!0===M.ShadyDOM?.noPatch?M.ShadyDOM.wrap:e=>e,D=M.trustedTypes,E=D?D.createPolicy("lit-html",{createHTML:e=>e}):void 0,I=e=>e,Z=(e,t,s)=>I,B=e=>{if(ne!==Z)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ne=e},L=()=>{ne=Z},F=(e,t,s)=>ne(e,t,s),T="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+P,z=`<${H}>`,R=document,N=()=>R.createComment(""),O=e=>null===e||"object"!=typeof e&&"function"!=typeof e,U=Array.isArray,q=e=>U(e)||"function"==typeof e?.[Symbol.iterator],Y="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,K=/>/g,G=new RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,Q=/"/g,J=/^(?:script|style|textarea|title)$/i,ee=(te=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&$("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:te,strings:e,values:t}));var te;const se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,oe=R.createTreeWalker(R,129);let ne=Z;function re(e,t){if(!U(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==E?E.createHTML(t):t}const le=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=j;for(let t=0;t<s;t++){const s=e[t];let r,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===j){if("!--"===l[1])n=W;else if(void 0!==l[1])n=K;else if(void 0!==l[2])J.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=G;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===G?">"===l[0]?(n=a??j,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?G:'"'===l[3]?Q:X):n===Q||n===X?n=G:n===W||n===K?n=j:(n=G,a=void 0);console.assert(-1===d||n===G||n===X||n===Q,"unexpected parse state B");const h=n===G&&e[t+1].startsWith("/>")?" ":"";o+=n===j?s+z:d>=0?(i.push(r),s.slice(0,d)+T+s.slice(d)+P+h):s+P+(-2===d?t:h)}return[re(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class de{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let a=0,o=0;const n=e.length-1,r=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,s),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=oe.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(P)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);$("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(T)){const t=d[o++],s=i.getAttribute(e).split(P),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?ge:"?"===n[1]?ve:"@"===n[1]?me:pe}),i.removeAttribute(e)}else e.startsWith(P)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(J.test(i.tagName)){const e=i.textContent.split(P),t=e.length-1;if(t>0){i.textContent=D?D.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],N()),oe.nextNode(),r.push({type:2,index:++a});i.append(e[t],N())}}}else if(8===i.nodeType){if(i.data===H)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(P,e+1));)r.push({type:7,index:a}),e+=P.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=R.createElement("template");return s.innerHTML=e,s}}function ce(e,t,s=e,i){if(t===se)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=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=ce(e,a._$resolve(e,t.values),a,i)),t}class he{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:s}=this._$template,i=(e?.creationScope??R).importNode(t,!0);oe.currentNode=i;let a=oe.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new ue(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new fe(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=oe.nextNode(),o++)}return oe.currentNode=R,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(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 ue{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=V(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ce(this,e,t),O(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(S&&S({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==se&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else q(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return V(V(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ne!==Z){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!==ie&&O(this._$committedValue)){const t=V(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=F(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=R.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=F(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=de.createElement(re(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 he(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=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}_commitIterable(e){U(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let s,i=0;for(const a of e)i===t.length?t.push(s=new ue(this._insert(N()),this._insert(N()),this,this.options)):s=t[i],s._$setValue(a),i++;i<t.length&&(this._$clear(s&&V(s._$endNode).nextSibling,i),t.length=i)}_$clear(e=V(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=V(e).nextSibling;V(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class pe{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!O(e)||e!==this._$committedValue&&e!==se,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=ce(this,i[s+n],t,n),r===se&&(r=this._$committedValue[n]),o||=!O(r)||r!==this._$committedValue[n],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===ie?V(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ne(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}),V(this.element).setAttribute(this.name,e??""))}}class ge extends pe{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"property")),e=this._sanitizer(e),S&&S({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class ve extends pe{constructor(){super(...arguments),this.type=4}_commitValue(e){S&&S({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),V(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class me extends pe{constructor(e,t,s,i,a){if(super(e,t,s,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??ie)===se)return;const s=this._$committedValue,i=e===ie&&s!==ie||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==ie&&(s===ie||i);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 fe{constructor(e,t,s){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){S&&S({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const be={_boundAttributeSuffix:T,_marker:P,_markerMatch:H,_HTML_RESULT:1,_getTemplateHtml:le,_TemplateInstance:he,_isIterable:q,_resolveDirective:ce,_ChildPart:ue,_AttributePart:pe,_BooleanAttributePart:ve,_EventPart:me,_PropertyPart:ge,_ElementPart:fe},we=M.litHtmlPolyfillSupportDevMode;we?.(de,ue),(M.litHtmlVersions??=[]).push("3.3.2"),M.litHtmlVersions.length>1&&queueMicrotask(()=>{$("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const ye=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=A++,a=s?.renderBefore??t;let o=a._$litPart$;if(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 ue(t.insertBefore(N(),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};ye.setSanitizer=B,ye.createSanitizer=F,ye._testOnlyClearSanitizerFactoryDoNotCallOrElse=L;
|
|
13
|
+
const M=globalThis,S=e=>{M.emitLitDebugLogEvents&&M.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let $,A=0;M.litIssuedWarnings??=new Set,$=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",M.litIssuedWarnings.has(t)||M.litIssuedWarnings.has(e)||(console.warn(t),M.litIssuedWarnings.add(t))},queueMicrotask(()=>{$("dev-mode","Lit is in dev mode. Not recommended for production!")});const V=M.ShadyDOM?.inUse&&!0===M.ShadyDOM?.noPatch?M.ShadyDOM.wrap:e=>e,D=M.trustedTypes,E=D?D.createPolicy("lit-html",{createHTML:e=>e}):void 0,Z=e=>e,B=(e,t,s)=>Z,I=e=>{if(ne!==B)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ne=e},L=()=>{ne=B},F=(e,t,s)=>ne(e,t,s),T="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+P,z=`<${H}>`,R=document,O=()=>R.createComment(""),N=e=>null===e||"object"!=typeof e&&"function"!=typeof e,U=Array.isArray,q=e=>U(e)||"function"==typeof e?.[Symbol.iterator],Y="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,K=/>/g,G=new RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,Q=/"/g,J=/^(?:script|style|textarea|title)$/i,ee=(te=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&$("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:te,strings:e,values:t}));var te;const se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,oe=R.createTreeWalker(R,129);let ne=B;function re(e,t){if(!U(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==E?E.createHTML(t):t}const le=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=j;for(let t=0;t<s;t++){const s=e[t];let r,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===j){if("!--"===l[1])n=W;else if(void 0!==l[1])n=K;else if(void 0!==l[2])J.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=G;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===G?">"===l[0]?(n=a??j,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?G:'"'===l[3]?Q:X):n===Q||n===X?n=G:n===W||n===K?n=j:(n=G,a=void 0);console.assert(-1===d||n===G||n===X||n===Q,"unexpected parse state B");const h=n===G&&e[t+1].startsWith("/>")?" ":"";o+=n===j?s+z:d>=0?(i.push(r),s.slice(0,d)+T+s.slice(d)+P+h):s+P+(-2===d?t:h)}return[re(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class de{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let a=0,o=0;const n=e.length-1,r=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,s),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=oe.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(P)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);$("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(T)){const t=d[o++],s=i.getAttribute(e).split(P),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?ge:"?"===n[1]?ve:"@"===n[1]?me:pe}),i.removeAttribute(e)}else e.startsWith(P)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(J.test(i.tagName)){const e=i.textContent.split(P),t=e.length-1;if(t>0){i.textContent=D?D.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],O()),oe.nextNode(),r.push({type:2,index:++a});i.append(e[t],O())}}}else if(8===i.nodeType){if(i.data===H)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(P,e+1));)r.push({type:7,index:a}),e+=P.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=R.createElement("template");return s.innerHTML=e,s}}function ce(e,t,s=e,i){if(t===se)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=N(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,s,i)),void 0!==i?(s.__directives??=[])[i]=a:s.__directive=a),void 0!==a&&(t=ce(e,a._$resolve(e,t.values),a,i)),t}class he{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:s}=this._$template,i=(e?.creationScope??R).importNode(t,!0);oe.currentNode=i;let a=oe.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new ue(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new fe(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=oe.nextNode(),o++)}return oe.currentNode=R,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(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 ue{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=V(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ce(this,e,t),N(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(S&&S({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==se&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else q(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return V(V(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ne!==B){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}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!==ie&&N(this._$committedValue)){const t=V(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=F(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=R.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=F(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=de.createElement(re(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 he(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=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}_commitIterable(e){U(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let s,i=0;for(const a of e)i===t.length?t.push(s=new ue(this._insert(O()),this._insert(O()),this,this.options)):s=t[i],s._$setValue(a),i++;i<t.length&&(this._$clear(s&&V(s._$endNode).nextSibling,i),t.length=i)}_$clear(e=V(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=V(e).nextSibling;V(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class pe{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!N(e)||e!==this._$committedValue&&e!==se,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=ce(this,i[s+n],t,n),r===se&&(r=this._$committedValue[n]),o||=!N(r)||r!==this._$committedValue[n],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===ie?V(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ne(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}),V(this.element).setAttribute(this.name,e??""))}}class ge extends pe{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"property")),e=this._sanitizer(e),S&&S({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class ve extends pe{constructor(){super(...arguments),this.type=4}_commitValue(e){S&&S({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),V(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class me extends pe{constructor(e,t,s,i,a){if(super(e,t,s,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??ie)===se)return;const s=this._$committedValue,i=e===ie&&s!==ie||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==ie&&(s===ie||i);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 fe{constructor(e,t,s){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){S&&S({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const be={_boundAttributeSuffix:T,_marker:P,_markerMatch:H,_HTML_RESULT:1,_getTemplateHtml:le,_TemplateInstance:he,_isIterable:q,_resolveDirective:ce,_ChildPart:ue,_AttributePart:pe,_BooleanAttributePart:ve,_EventPart:me,_PropertyPart:ge,_ElementPart:fe},we=M.litHtmlPolyfillSupportDevMode;we?.(de,ue),(M.litHtmlVersions??=[]).push("3.3.2"),M.litHtmlVersions.length>1&&queueMicrotask(()=>{$("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const ye=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=A++,a=s?.renderBefore??t;let o=a._$litPart$;if(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 ue(t.insertBefore(O(),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};ye.setSanitizer=I,ye.createSanitizer=F,ye._testOnlyClearSanitizerFactoryDoNotCallOrElse=L;
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
@@ -37,12 +37,12 @@ let Se;Me?.({LitElement:_e}),(xe.litElementVersions??=[]).push("4.2.2"),xe.litEl
|
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2017 Google LLC
|
|
39
39
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
-
*/let
|
|
40
|
+
*/let Ze;function Be(e,t){return(s,i,a)=>{const o=s=>{const a=s.renderRoot?.querySelector(e)??null;if(null===a&&t&&!s.hasUpdated){const t="object"==typeof i?i.name:i;Ze("",`@query'd field ${JSON.stringify(String(t))} with the 'cache' flag set for selector '${e}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return a};if(t){const{get:e,set:t}="object"==typeof i?s:a??(()=>{const e=Symbol(`${String(i)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return Ee(s,i,{get(){let s=e.call(this);return void 0===s&&(s=o(this),(null!==s||this.hasUpdated)&&t.call(this,s)),s}})}return Ee(s,i,{get(){return o(this)}})}}
|
|
41
41
|
/**
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/function
|
|
45
|
+
*/function Ie(e){return(t,s)=>Ee(t,s,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2021 Google LLC
|
|
@@ -52,7 +52,7 @@ let Se;Me?.({LitElement:_e}),(xe.litElementVersions??=[]).push("4.2.2"),xe.litEl
|
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/function Fe(e){return(t,s)=>{const{slot:i}=e??{},a="slot"+(i?`[name=${i}]`:":not([name])");return Ee(t,s,{get(){const t=this.renderRoot?.querySelector(a);return t?.assignedNodes(e)??[]}})}}globalThis.litIssuedWarnings??=new Set,
|
|
55
|
+
*/function Fe(e){return(t,s)=>{const{slot:i}=e??{},a="slot"+(i?`[name=${i}]`:":not([name])");return Ee(t,s,{get(){const t=this.renderRoot?.querySelector(a);return t?.assignedNodes(e)??[]}})}}globalThis.litIssuedWarnings??=new Set,Ze=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};var Te=n`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Pe extends _e{emit(e,t){const s=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(s),s}static define(e,t=this,s={}){if(customElements.get(e));else try{customElements.define(e,t,s)}catch(i){customElements.define(e,class extends t{},s)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Pe.styles=[Te],Pe.dependencies={},e([Ve({type:Boolean,reflect:!0})],Pe.prototype,"ssr",void 0);var He=n`:host([variant=border]) .accordion{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-md)}`;const ze=["Enter","ArrowUp","ArrowLeft","ArrowDown","ArrowRight"];class Re extends Pe{constructor(){super(...arguments),this.allowMultiple=!1,this.variant="default",this.density="default"}get items(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}_handleSlotChange(){const e=[...this.items];e.forEach((t,s)=>{if(e.length>1)switch(s){case 0:t.setAttribute("first-of-type","");break;case e.length-1:t.setAttribute("last-of-type","");break;default:t.setAttribute("nth-of-type","")}t.setAttribute("variant",this.variant),t.setAttribute("density",this.density)})}async _onToggle(e){if(this.allowMultiple)return;const t=[...this.items];t&&!t.length||t.forEach(t=>{e.composedPath().includes(t)||(t.open=!1)})}async _onKeyboardToggle(e){if(ze.includes(e.key))return this._onToggle(e)}render(){return ee`
|
|
56
56
|
<div class="accordion">
|
|
57
57
|
<slot @slotchange=${this._handleSlotChange} @click=${this._onToggle} @keydown=${this._onKeyboardToggle}></slot>
|
|
58
58
|
</div>
|
|
@@ -62,12 +62,12 @@ let Se;Me?.({LitElement:_e}),(xe.litElementVersions??=[]).push("4.2.2"),xe.litEl
|
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
64
|
*/
|
|
65
|
-
const
|
|
65
|
+
const Oe=1,Ne=2,Ue=3,qe=4,Ye=e=>(...t)=>({_$litDirective$:e,values:t});class je{constructor(e){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(e,t,s){this.__part=e,this._$parent=t,this.__attributeIndex=s}_$resolve(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
|
|
66
66
|
/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2018 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/const We=Ye(class extends je{constructor(e){if(super(e),e.type!==
|
|
70
|
+
*/const We=Ye(class extends je{constructor(e){if(super(e),e.type!==Oe||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const s=e.element.classList;for(const e of this._previousClasses)e in t||(s.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(s.add(e),this._previousClasses.add(e)):(s.remove(e),this._previousClasses.delete(e)))}return se}});function Ke(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:Ge()?0:null==s?void 0:s.duration}));a.addEventListener("cancel",i,{once:!0}),a.addEventListener("finish",i,{once:!0})})}function Ge(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Xe(e,t){return e.map(e=>Object.assign(Object.assign({},e),{height:"auto"===e.height?`${t}px`:e.height}))}function Qe(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 Je=new Map,et=new WeakMap;function tt(e,t){const s=et.get(e);if(null==s?void 0:s[t])return s[t];const i=Je.get(t);return i||{keyframes:[],options:{duration:0}}}function st(e,t){Je.set(e,function(e){return null!=e?e:{keyframes:[],options:{duration:0}}}(t))}function it(e,t){return new Promise(s=>{e.addEventListener(t,function i(a){a.target===e&&(e.removeEventListener(t,i),s())})})}function at(e,t){const s=Object.assign({waitUntilFirstUpdate:!1},t);return(t,i)=>{const{update:a}=t;if(e in t){const o=e;t.update=function(e){if(e.has(o)){const t=e.get(o),a=this[o];t!==a&&(s.waitUntilFirstUpdate&&!this.hasUpdated||this[i](t,a))}a.call(this,e)}}}}var ot=n`:host([variant=border][last-of-type]) .accordion-item{border-bottom:none}:host([density=compact]) .accordion-btn{font-size:var(--sgds-font-size-16);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-20);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 nt extends Pe{constructor(){super(...arguments),this.open=!1,this.disabled=!1,this.density="default"}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 Qe(this.body),this.body.classList.remove("hidden");const{keyframes:e,options:t}=tt(this,"accordion.show");await Ke(this.body,Xe(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 Qe(this.body);const{keyframes:e,options:t}=tt(this,"accordion.hide"),s=t.duration;setTimeout(()=>{this.body.classList.add("hidden")},s-20),await Ke(this.body,Xe(e,this.body.scrollHeight),t),this.emit("sgds-after-hide")}}async show(){if(!this.open)return this.open=!0,it(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,it(this,"sgds-after-hide")}render(){const e=this.hasUpdated;return ee`
|
|
71
71
|
<div class="accordion-item">
|
|
72
72
|
<button
|
|
73
73
|
class=${We({"accordion-btn":!0,disabled:this.disabled,collapsed:!this.open})}
|
|
@@ -91,7 +91,7 @@ const Ne=1,Oe=2,Ue=3,qe=4,Ye=e=>(...t)=>({_$litDirective$:e,values:t});class je{
|
|
|
91
91
|
<slot id="content" name="content" class="content" role="region" aria-labelledby="header"></slot>
|
|
92
92
|
</div>
|
|
93
93
|
</div>
|
|
94
|
-
`}}function rt(e,t){customElements.get(e)||customElements.define(e,t)}function lt(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)}nt.styles=[...Pe.styles,ot],e([
|
|
94
|
+
`}}function rt(e,t){customElements.get(e)||customElements.define(e,t)}function lt(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)}nt.styles=[...Pe.styles,ot],e([Be(".accordion-item")],nt.prototype,"accordion",void 0),e([Be(".accordion-btn")],nt.prototype,"header",void 0),e([Be(".accordion-body")],nt.prototype,"body",void 0),e([Ve({type:Boolean,reflect:!0})],nt.prototype,"open",void 0),e([Ve({type:Boolean,reflect:!0})],nt.prototype,"disabled",void 0),e([Ve({type:String,reflect:!0})],nt.prototype,"density",void 0),e([at("open",{waitUntilFirstUpdate:!0})],nt.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"}}),rt("sgds-accordion",Re),rt("sgds-accordion-item",nt);
|
|
95
95
|
/**
|
|
96
96
|
* @license
|
|
97
97
|
* Copyright 2020 Google LLC
|
|
@@ -246,7 +246,7 @@ const dt=Symbol.for(""),ct=e=>{if(e?.r===dt)return e?._$litStatic$},ht=(e,...t)=
|
|
|
246
246
|
clip-rule="evenodd"
|
|
247
247
|
/>
|
|
248
248
|
</svg>
|
|
249
|
-
`;const
|
|
249
|
+
`;const Zt={announcement:ft,archive:bt,"arrow-bar-down":wt,"arrow-bar-left":yt,"arrow-bar-right":xt,"arrow-bar-up":kt,"arrow-circle-down":_t,"arrow-circle-left":Ct,"arrow-circle-right":Mt,"arrow-circle-up":St,"arrow-clockwise":$t,"arrow-down":At,"arrow-left":Vt,"arrow-repeat":Dt,"arrow-right":Et,"arrow-square-down":ee`
|
|
250
250
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
251
251
|
<path
|
|
252
252
|
fill="currentColor"
|
|
@@ -2317,7 +2317,7 @@ const dt=Symbol.for(""),ct=e=>{if(e?.r===dt)return e?._$litStatic$},ht=(e,...t)=
|
|
|
2317
2317
|
clip-rule="evenodd"
|
|
2318
2318
|
/>
|
|
2319
2319
|
</svg>
|
|
2320
|
-
`};var
|
|
2320
|
+
`};var Bt=n`: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 It extends Pe{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=Zt[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||ie}}It.styles=[...Pe.styles,Bt],e([Ve({type:String,reflect:!0})],It.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],It.prototype,"size",void 0);var Lt=n`: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 Ft extends Pe{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?pt`
|
|
2321
2321
|
<div
|
|
2322
2322
|
class="${We({alert:!0,show:this.show,"alert-dismissible":this.dismissible,outlined:this.outlined})}"
|
|
2323
2323
|
role="alert"
|
|
@@ -2334,7 +2334,7 @@ const dt=Symbol.for(""),ct=e=>{if(e?.r===dt)return e?._$litStatic$},ht=(e,...t)=
|
|
|
2334
2334
|
tone=${this.outlined?"fixed-dark":"fixed-light"}
|
|
2335
2335
|
></sgds-close-button>`:ie}
|
|
2336
2336
|
</div>
|
|
2337
|
-
`:ie}}Ft.styles=[...Pe.styles,Lt],Ft.dependencies={"sgds-close-button":mt,"sgds-icon":
|
|
2337
|
+
`:ie}}Ft.styles=[...Pe.styles,Lt],Ft.dependencies={"sgds-close-button":mt,"sgds-icon":It},e([Ve({type:Boolean,reflect:!0})],Ft.prototype,"show",void 0),e([Ve({type:Boolean,reflect:!0})],Ft.prototype,"dismissible",void 0),e([Ve({type:String,reflect:!0})],Ft.prototype,"variant",void 0),e([Ve({type:Boolean,reflect:!0})],Ft.prototype,"outlined",void 0),e([Ve({type:String,reflect:!0})],Ft.prototype,"title",void 0),e([at("show")],Ft.prototype,"_handleShowChange",null);
|
|
2338
2338
|
/**
|
|
2339
2339
|
* @license
|
|
2340
2340
|
* Copyright 2018 Google LLC
|
|
@@ -2347,12 +2347,12 @@ const Tt=e=>e??ie;var Pt=n`:host{cursor:pointer;display:inline-block}.alert-link
|
|
|
2347
2347
|
* @license
|
|
2348
2348
|
* Copyright 2020 Google LLC
|
|
2349
2349
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2350
|
-
*/;const{_ChildPart:
|
|
2350
|
+
*/;const{_ChildPart:Ot}=be,Nt=window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch?window.ShadyDOM.wrap:e=>e,Ut=e=>void 0===e.strings,qt=()=>document.createComment(""),Yt=(e,t,s)=>{const i=Nt(e._$startNode).parentNode,a=void 0===t?e._$endNode:t._$startNode;if(void 0===s){const t=Nt(i).insertBefore(qt(),a),o=Nt(i).insertBefore(qt(),a);s=new Ot(t,o,e,e.options)}else{const t=Nt(s._$endNode).nextSibling,o=s._$parent,n=o!==e;if(n){let t;s._$reparentDisconnectables?.(e),s._$parent=e,void 0!==s._$notifyConnectionChanged&&(t=e._$isConnected)!==o._$isConnected&&s._$notifyConnectionChanged(t)}if(t!==a||n){let e=s._$startNode;for(;e!==t;){const t=Nt(e).nextSibling;Nt(i).insertBefore(e,a),e=t}}}return s},jt=(e,t,s=e)=>(e._$setValue(t,s),e),Wt={},Kt=(e,t=Wt)=>e._$committedValue=t,Gt=e=>{e._$clear(),e._$startNode.remove()},Xt=(e,t)=>{const s=e._$disconnectableChildren;if(void 0===s)return!1;for(const e of s)e._$notifyDirectiveConnectionChanged?.(t,!1),Xt(e,t);return!0},Qt=e=>{let t,s;do{if(void 0===(t=e._$parent))break;s=t._$disconnectableChildren,s.delete(e),e=t}while(0===s?.size)},Jt=e=>{for(let t;t=e._$parent;e=t){let s=t._$disconnectableChildren;if(void 0===s)t._$disconnectableChildren=s=new Set;else if(s.has(e))break;s.add(e),ss(t)}};function es(e){void 0!==this._$disconnectableChildren?(Qt(this),this._$parent=e,Jt(this)):this._$parent=e}function ts(e,t=!1,s=0){const i=this._$committedValue,a=this._$disconnectableChildren;if(void 0!==a&&0!==a.size)if(t)if(Array.isArray(i))for(let e=s;e<i.length;e++)Xt(i[e],!1),Qt(i[e]);else null!=i&&(Xt(i,!1),Qt(i));else Xt(this,e)}const ss=e=>{e.type==Ne&&(e._$notifyConnectionChanged??=ts,e._$reparentDisconnectables??=es)};class is extends je{constructor(){super(...arguments),this._$disconnectableChildren=void 0}_$initialize(e,t,s){super._$initialize(e,t,s),Jt(this),this.isConnected=e._$isConnected}_$notifyDirectiveConnectionChanged(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Xt(this,e),Qt(this))}setValue(e){if(Ut(this.__part))this.__part._$setValue(e,this);else{if(void 0===this.__attributeIndex)throw new Error("Expected this.__attributeIndex to be a number");const t=[...this.__part._$committedValue];t[this.__attributeIndex]=e,this.__part._$setValue(t,this,0)}}disconnected(){}reconnected(){}}
|
|
2351
2351
|
/**
|
|
2352
2352
|
* @license
|
|
2353
2353
|
* Copyright 2020 Google LLC
|
|
2354
2354
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2355
|
-
*/const as=()=>new os;class os{}const ns=new WeakMap;const rs=Ye(class extends is{render(e){return ie}update(e,[t]){const s=t!==this._ref;return s&&void 0!==this._ref&&this._updateRefValue(void 0),(s||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ie}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let s=ns.get(t);void 0===s&&(s=new WeakMap,ns.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?ns.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),ls=["top","right","bottom","left"],ds=Math.min,cs=Math.max,hs=Math.round,us=Math.floor,ps=e=>({x:e,y:e}),gs={left:"right",right:"left",bottom:"top",top:"bottom"},vs={start:"end",end:"start"};function ms(e,t,s){return cs(e,ds(t,s))}function fs(e,t){return"function"==typeof e?e(t):e}function bs(e){return e.split("-")[0]}function ws(e){return e.split("-")[1]}function ys(e){return"x"===e?"y":"x"}function xs(e){return"y"===e?"height":"width"}const ks=new Set(["top","bottom"]);function _s(e){return ks.has(bs(e))?"y":"x"}function Cs(e){return ys(_s(e))}function Ms(e,t,s){void 0===s&&(s=!1);const i=ws(e),a=Cs(e),o=xs(a);let n="x"===a?i===(s?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=Is(n)),[n,Is(n)]}function Ss(e){return e.replace(/start|end/g,e=>vs[e])}const $s=["left","right"],As=["right","left"],Vs=["top","bottom"],Ds=["bottom","top"];function Es(e,t,s,i){const a=ws(e);let o=function(e,t,s){switch(e){case"top":case"bottom":return s?t?As:$s:t?$s:As;case"left":case"right":return t?Vs:Ds;default:return[]}}(bs(e),"start"===s,i);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ss)))),o}function Is(e){return e.replace(/left|right|bottom|top/g,e=>gs[e])}function Zs(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 Bs(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 Ls(e,t,s){let{reference:i,floating:a}=e;const o=_s(t),n=Cs(t),r=xs(n),l=bs(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(ws(t)){case"start":p[n]-=u*(s&&d?-1:1);break;case"end":p[n]+=u*(s&&d?-1:1)}return p}async function Fs(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}=fs(t,e),g=Zs(p),v=r[u?"floating"===h?"reference":"floating":h],m=Bs(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=Bs(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 Ts(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ps(e){return ls.some(t=>e[t]>=0)}const Hs=new Set(["left","top"]);function zs(){return"undefined"!=typeof window}function Rs(e){return Us(e)?(e.nodeName||"").toLowerCase():"#document"}function Ns(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Os(e){var t;return null==(t=(Us(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Us(e){return!!zs()&&(e instanceof Node||e instanceof Ns(e).Node)}function qs(e){return!!zs()&&(e instanceof Element||e instanceof Ns(e).Element)}function Ys(e){return!!zs()&&(e instanceof HTMLElement||e instanceof Ns(e).HTMLElement)}function js(e){return!(!zs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ns(e).ShadowRoot)}const Ws=new Set(["inline","contents"]);function Ks(e){const{overflow:t,overflowX:s,overflowY:i,display:a}=ri(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!Ws.has(a)}const Gs=new Set(["table","td","th"]);function Xs(e){return Gs.has(Rs(e))}const Qs=[":popover-open",":modal"];function Js(e){return Qs.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ei=["transform","translate","scale","rotate","perspective"],ti=["transform","translate","scale","rotate","perspective","filter"],si=["paint","layout","strict","content"];function ii(e){const t=ai(),s=qs(e)?ri(e):e;return ei.some(e=>!!s[e]&&"none"!==s[e])||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||ti.some(e=>(s.willChange||"").includes(e))||si.some(e=>(s.contain||"").includes(e))}function ai(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const oi=new Set(["html","body","#document"]);function ni(e){return oi.has(Rs(e))}function ri(e){return Ns(e).getComputedStyle(e)}function li(e){return qs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function di(e){if("html"===Rs(e))return e;const t=e.assignedSlot||e.parentNode||js(e)&&e.host||Os(e);return js(t)?t.host:t}function ci(e){const t=di(e);return ni(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ys(t)&&Ks(t)?t:ci(t)}function hi(e,t,s){var i;void 0===t&&(t=[]),void 0===s&&(s=!0);const a=ci(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),n=Ns(a);if(o){const e=ui(n);return t.concat(n,n.visualViewport||[],Ks(a)?a:[],e&&s?hi(e):[])}return t.concat(a,hi(a,[],s))}function ui(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pi(e){const t=ri(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=Ys(e),o=a?e.offsetWidth:s,n=a?e.offsetHeight:i,r=hs(s)!==o||hs(i)!==n;return r&&(s=o,i=n),{width:s,height:i,$:r}}function gi(e){return qs(e)?e:e.contextElement}function vi(e){const t=gi(e);if(!Ys(t))return ps(1);const s=t.getBoundingClientRect(),{width:i,height:a,$:o}=pi(t);let n=(o?hs(s.width):s.width)/i,r=(o?hs(s.height):s.height)/a;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const mi=ps(0);function fi(e){const t=Ns(e);return ai()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:mi}function bi(e,t,s,i){void 0===t&&(t=!1),void 0===s&&(s=!1);const a=e.getBoundingClientRect(),o=gi(e);let n=ps(1);t&&(i?qs(i)&&(n=vi(i)):n=vi(e));const r=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==Ns(e))&&t}(o,s,i)?fi(o):ps(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=Ns(o),t=i&&qs(i)?Ns(i):i;let s=e,a=ui(s);for(;a&&i&&t!==s;){const e=vi(a),t=a.getBoundingClientRect(),i=ri(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=Ns(a),a=ui(s)}}return Bs({width:c,height:h,x:l,y:d})}function wi(e,t){const s=li(e).scrollLeft;return t?t.left+s:bi(Os(e)).left+s}function yi(e,t){const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-wi(e,s),y:s.top+t.scrollTop}}const xi=new Set(["absolute","fixed"]);function ki(e,t,s){let i;if("viewport"===t)i=function(e,t){const s=Ns(e),i=Os(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=ai();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}const d=wi(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<=25&&(o-=n)}else d<=25&&(o+=d);return{width:o,height:n,x:r,y:l}}(e,s);else if("document"===t)i=function(e){const t=Os(e),s=li(e),i=e.ownerDocument.body,a=cs(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=cs(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-s.scrollLeft+wi(e);const r=-s.scrollTop;return"rtl"===ri(i).direction&&(n+=cs(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:n,y:r}}(Os(e));else if(qs(t))i=function(e,t){const s=bi(e,!0,"fixed"===t),i=s.top+e.clientTop,a=s.left+e.clientLeft,o=Ys(e)?vi(e):ps(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=fi(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Bs(i)}function _i(e,t){const s=di(e);return!(s===t||!qs(s)||ni(s))&&("fixed"===ri(s).position||_i(s,t))}function Ci(e,t,s){const i=Ys(t),a=Os(t),o="fixed"===s,n=bi(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=ps(0);function d(){l.x=wi(a)}if(i||!i&&!o)if(("body"!==Rs(t)||Ks(a))&&(r=li(t)),i){const e=bi(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?ps(0):yi(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 Mi(e){return"static"===ri(e).position}function Si(e,t){if(!Ys(e)||"fixed"===ri(e).position)return null;if(t)return t(e);let s=e.offsetParent;return Os(e)===s&&(s=s.ownerDocument.body),s}function $i(e,t){const s=Ns(e);if(Js(e))return s;if(!Ys(e)){let t=di(e);for(;t&&!ni(t);){if(qs(t)&&!Mi(t))return t;t=di(t)}return s}let i=Si(e,t);for(;i&&Xs(i)&&Mi(i);)i=Si(i,t);return i&&ni(i)&&Mi(i)&&!ii(i)?s:i||function(e){let t=di(e);for(;Ys(t)&&!ni(t);){if(ii(t))return t;if(Js(t))return null;t=di(t)}return null}(e)||s}const Ai={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:i,strategy:a}=e;const o="fixed"===a,n=Os(i),r=!!t&&Js(t.floating);if(i===n||r&&o)return s;let l={scrollLeft:0,scrollTop:0},d=ps(1);const c=ps(0),h=Ys(i);if((h||!h&&!o)&&(("body"!==Rs(i)||Ks(n))&&(l=li(i)),Ys(i))){const e=bi(i);d=vi(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const u=!n||h||o?ps(0):yi(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:Os,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===s?Js(t)?[]:function(e,t){const s=t.get(e);if(s)return s;let i=hi(e,[],!1).filter(e=>qs(e)&&"body"!==Rs(e)),a=null;const o="fixed"===ri(e).position;let n=o?di(e):e;for(;qs(n)&&!ni(n);){const t=ri(n),s=ii(n);s||"fixed"!==t.position||(a=null),(o?!s&&!a:!s&&"static"===t.position&&a&&xi.has(a.position)||Ks(n)&&!s&&_i(e,n))?i=i.filter(e=>e!==n):a=t,n=di(n)}return t.set(e,i),i}(t,this._c):[].concat(s),i],n=o[0],r=o.reduce((e,s)=>{const i=ki(t,s,a);return e.top=cs(i.top,e.top),e.right=ds(i.right,e.right),e.bottom=ds(i.bottom,e.bottom),e.left=cs(i.left,e.left),e},ki(t,n,a));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:$i,getElementRects:async function(e){const t=this.getOffsetParent||$i,s=this.getDimensions,i=await s(e.floating);return{reference:Ci(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}=pi(e);return{width:t,height:s}},getScale:vi,isElement:qs,isRTL:function(e){return"rtl"===ri(e).direction}};function Vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Di(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=gi(e),c=a||o?[...d?hi(d):[],...hi(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=Os(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:-us(h)+"px "+-us(a.clientWidth-(c+u))+"px "+-us(a.clientHeight-(h+p))+"px "+-us(c)+"px",threshold:cs(0,ds(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||Vi(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?bi(e):null;return l&&function t(){const i=bi(e);v&&!Vi(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 Ei=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=bs(s),r=ws(s),l="y"===_s(s),d=Hs.has(n)?-1:1,c=o&&l?-1:1,h=fs(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}}}}},Ii=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}=fs(e,t),d={x:s,y:i},c=await Fs(t,l),h=_s(bs(a)),u=ys(h);let p=d[u],g=d[h];if(o){const e="y"===u?"bottom":"right";p=ms(p+c["y"===u?"top":"left"],p,p-c[e])}if(n){const e="y"===h?"bottom":"right";g=ms(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}}}}}},Zi=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}=fs(e,t);if(null!=(s=o.arrow)&&s.alignmentOffset)return{};const f=bs(a),b=_s(r),w=bs(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=u||(w||!v?[Is(r)]:function(e){const t=Is(e);return[Ss(e),t,Ss(t)]}(r)),k="none"!==g;!u&&k&&x.push(...Es(r,v,g,y));const _=[r,...x],C=await Fs(t,m),M=[];let S=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&M.push(C[f]),h){const e=Ms(a,n,y);M.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:a,overflows:M}],!M.every(e=>e<=0)){var $,A;const e=((null==($=o.flip)?void 0:$.index)||0)+1,t=_[e];if(t){if(!("alignment"===h&&b!==_s(t))||S.every(e=>_s(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let s=null==(A=S.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 V;const e=null==(V=S.filter(e=>{if(k){const t=_s(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{}}}},Bi=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}=fs(e,t),c=await Fs(t,d),h=bs(a),u=ws(a),p="y"===_s(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=ds(v-c[m],b),x=ds(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=cs(c.left,0),t=cs(c.right,0),s=cs(c.top,0),i=cs(c.bottom,0);p?C=g-2*(0!==e||0!==t?e+t:cs(c.left,c.right)):_=v-2*(0!==s||0!==i?s+i:cs(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:_});const M=await n.getDimensions(r.floating);return g!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}},Li=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...a}=fs(e,t);switch(i){case"referenceHidden":{const e=Ts(await Fs(t,{...a,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ps(e)}}}case"escaped":{const e=Ts(await Fs(t,{...a,altBoundary:!0}),s.floating);return{data:{escapedOffsets:e,escaped:Ps(e)}}}default:return{}}}}},Fi=(e,t,s)=>{const i=new Map,a={platform:Ai,...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}=Ls(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}=Ls(d,u,l))),s=-1)}return{x:c,y:h,placement:u,strategy:a,middlewareData:p}})(e,t,{...a,platform:o})};var Ti=n`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-14);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:var(--sgds-z-index-overlay)}div{max-width:fit-content}`;class Pi extends Pe{constructor(){super(...arguments),this._myTooltip=as(),this._tooltipBubble=as(),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 Fi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[Ei(8),Zi(),Ii(),Li()]});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=Di(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return ee`
|
|
2355
|
+
*/const as=()=>new os;class os{}const ns=new WeakMap;const rs=Ye(class extends is{render(e){return ie}update(e,[t]){const s=t!==this._ref;return s&&void 0!==this._ref&&this._updateRefValue(void 0),(s||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ie}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let s=ns.get(t);void 0===s&&(s=new WeakMap,ns.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?ns.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),ls=["top","right","bottom","left"],ds=Math.min,cs=Math.max,hs=Math.round,us=Math.floor,ps=e=>({x:e,y:e}),gs={left:"right",right:"left",bottom:"top",top:"bottom"},vs={start:"end",end:"start"};function ms(e,t,s){return cs(e,ds(t,s))}function fs(e,t){return"function"==typeof e?e(t):e}function bs(e){return e.split("-")[0]}function ws(e){return e.split("-")[1]}function ys(e){return"x"===e?"y":"x"}function xs(e){return"y"===e?"height":"width"}const ks=new Set(["top","bottom"]);function _s(e){return ks.has(bs(e))?"y":"x"}function Cs(e){return ys(_s(e))}function Ms(e,t,s){void 0===s&&(s=!1);const i=ws(e),a=Cs(e),o=xs(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 Ss(e){return e.replace(/start|end/g,e=>vs[e])}const $s=["left","right"],As=["right","left"],Vs=["top","bottom"],Ds=["bottom","top"];function Es(e,t,s,i){const a=ws(e);let o=function(e,t,s){switch(e){case"top":case"bottom":return s?t?As:$s:t?$s:As;case"left":case"right":return t?Vs:Ds;default:return[]}}(bs(e),"start"===s,i);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ss)))),o}function Zs(e){return e.replace(/left|right|bottom|top/g,e=>gs[e])}function Bs(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 Is(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 Ls(e,t,s){let{reference:i,floating:a}=e;const o=_s(t),n=Cs(t),r=xs(n),l=bs(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(ws(t)){case"start":p[n]-=u*(s&&d?-1:1);break;case"end":p[n]+=u*(s&&d?-1:1)}return p}async function Fs(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}=fs(t,e),g=Bs(p),v=r[u?"floating"===h?"reference":"floating":h],m=Is(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=Is(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 Ts(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ps(e){return ls.some(t=>e[t]>=0)}const Hs=new Set(["left","top"]);function zs(){return"undefined"!=typeof window}function Rs(e){return Us(e)?(e.nodeName||"").toLowerCase():"#document"}function Os(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ns(e){var t;return null==(t=(Us(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Us(e){return!!zs()&&(e instanceof Node||e instanceof Os(e).Node)}function qs(e){return!!zs()&&(e instanceof Element||e instanceof Os(e).Element)}function Ys(e){return!!zs()&&(e instanceof HTMLElement||e instanceof Os(e).HTMLElement)}function js(e){return!(!zs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Os(e).ShadowRoot)}const Ws=new Set(["inline","contents"]);function Ks(e){const{overflow:t,overflowX:s,overflowY:i,display:a}=ri(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!Ws.has(a)}const Gs=new Set(["table","td","th"]);function Xs(e){return Gs.has(Rs(e))}const Qs=[":popover-open",":modal"];function Js(e){return Qs.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ei=["transform","translate","scale","rotate","perspective"],ti=["transform","translate","scale","rotate","perspective","filter"],si=["paint","layout","strict","content"];function ii(e){const t=ai(),s=qs(e)?ri(e):e;return ei.some(e=>!!s[e]&&"none"!==s[e])||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||ti.some(e=>(s.willChange||"").includes(e))||si.some(e=>(s.contain||"").includes(e))}function ai(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const oi=new Set(["html","body","#document"]);function ni(e){return oi.has(Rs(e))}function ri(e){return Os(e).getComputedStyle(e)}function li(e){return qs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function di(e){if("html"===Rs(e))return e;const t=e.assignedSlot||e.parentNode||js(e)&&e.host||Ns(e);return js(t)?t.host:t}function ci(e){const t=di(e);return ni(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ys(t)&&Ks(t)?t:ci(t)}function hi(e,t,s){var i;void 0===t&&(t=[]),void 0===s&&(s=!0);const a=ci(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),n=Os(a);if(o){const e=ui(n);return t.concat(n,n.visualViewport||[],Ks(a)?a:[],e&&s?hi(e):[])}return t.concat(a,hi(a,[],s))}function ui(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pi(e){const t=ri(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=Ys(e),o=a?e.offsetWidth:s,n=a?e.offsetHeight:i,r=hs(s)!==o||hs(i)!==n;return r&&(s=o,i=n),{width:s,height:i,$:r}}function gi(e){return qs(e)?e:e.contextElement}function vi(e){const t=gi(e);if(!Ys(t))return ps(1);const s=t.getBoundingClientRect(),{width:i,height:a,$:o}=pi(t);let n=(o?hs(s.width):s.width)/i,r=(o?hs(s.height):s.height)/a;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const mi=ps(0);function fi(e){const t=Os(e);return ai()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:mi}function bi(e,t,s,i){void 0===t&&(t=!1),void 0===s&&(s=!1);const a=e.getBoundingClientRect(),o=gi(e);let n=ps(1);t&&(i?qs(i)&&(n=vi(i)):n=vi(e));const r=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==Os(e))&&t}(o,s,i)?fi(o):ps(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=Os(o),t=i&&qs(i)?Os(i):i;let s=e,a=ui(s);for(;a&&i&&t!==s;){const e=vi(a),t=a.getBoundingClientRect(),i=ri(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=Os(a),a=ui(s)}}return Is({width:c,height:h,x:l,y:d})}function wi(e,t){const s=li(e).scrollLeft;return t?t.left+s:bi(Ns(e)).left+s}function yi(e,t){const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-wi(e,s),y:s.top+t.scrollTop}}const xi=new Set(["absolute","fixed"]);function ki(e,t,s){let i;if("viewport"===t)i=function(e,t){const s=Os(e),i=Ns(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=ai();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}const d=wi(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<=25&&(o-=n)}else d<=25&&(o+=d);return{width:o,height:n,x:r,y:l}}(e,s);else if("document"===t)i=function(e){const t=Ns(e),s=li(e),i=e.ownerDocument.body,a=cs(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=cs(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-s.scrollLeft+wi(e);const r=-s.scrollTop;return"rtl"===ri(i).direction&&(n+=cs(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:n,y:r}}(Ns(e));else if(qs(t))i=function(e,t){const s=bi(e,!0,"fixed"===t),i=s.top+e.clientTop,a=s.left+e.clientLeft,o=Ys(e)?vi(e):ps(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=fi(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Is(i)}function _i(e,t){const s=di(e);return!(s===t||!qs(s)||ni(s))&&("fixed"===ri(s).position||_i(s,t))}function Ci(e,t,s){const i=Ys(t),a=Ns(t),o="fixed"===s,n=bi(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=ps(0);function d(){l.x=wi(a)}if(i||!i&&!o)if(("body"!==Rs(t)||Ks(a))&&(r=li(t)),i){const e=bi(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?ps(0):yi(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 Mi(e){return"static"===ri(e).position}function Si(e,t){if(!Ys(e)||"fixed"===ri(e).position)return null;if(t)return t(e);let s=e.offsetParent;return Ns(e)===s&&(s=s.ownerDocument.body),s}function $i(e,t){const s=Os(e);if(Js(e))return s;if(!Ys(e)){let t=di(e);for(;t&&!ni(t);){if(qs(t)&&!Mi(t))return t;t=di(t)}return s}let i=Si(e,t);for(;i&&Xs(i)&&Mi(i);)i=Si(i,t);return i&&ni(i)&&Mi(i)&&!ii(i)?s:i||function(e){let t=di(e);for(;Ys(t)&&!ni(t);){if(ii(t))return t;if(Js(t))return null;t=di(t)}return null}(e)||s}const Ai={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:i,strategy:a}=e;const o="fixed"===a,n=Ns(i),r=!!t&&Js(t.floating);if(i===n||r&&o)return s;let l={scrollLeft:0,scrollTop:0},d=ps(1);const c=ps(0),h=Ys(i);if((h||!h&&!o)&&(("body"!==Rs(i)||Ks(n))&&(l=li(i)),Ys(i))){const e=bi(i);d=vi(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const u=!n||h||o?ps(0):yi(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:Ns,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===s?Js(t)?[]:function(e,t){const s=t.get(e);if(s)return s;let i=hi(e,[],!1).filter(e=>qs(e)&&"body"!==Rs(e)),a=null;const o="fixed"===ri(e).position;let n=o?di(e):e;for(;qs(n)&&!ni(n);){const t=ri(n),s=ii(n);s||"fixed"!==t.position||(a=null),(o?!s&&!a:!s&&"static"===t.position&&a&&xi.has(a.position)||Ks(n)&&!s&&_i(e,n))?i=i.filter(e=>e!==n):a=t,n=di(n)}return t.set(e,i),i}(t,this._c):[].concat(s),i],n=o[0],r=o.reduce((e,s)=>{const i=ki(t,s,a);return e.top=cs(i.top,e.top),e.right=ds(i.right,e.right),e.bottom=ds(i.bottom,e.bottom),e.left=cs(i.left,e.left),e},ki(t,n,a));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:$i,getElementRects:async function(e){const t=this.getOffsetParent||$i,s=this.getDimensions,i=await s(e.floating);return{reference:Ci(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}=pi(e);return{width:t,height:s}},getScale:vi,isElement:qs,isRTL:function(e){return"rtl"===ri(e).direction}};function Vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Di(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=gi(e),c=a||o?[...d?hi(d):[],...hi(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=Ns(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:-us(h)+"px "+-us(a.clientWidth-(c+u))+"px "+-us(a.clientHeight-(h+p))+"px "+-us(c)+"px",threshold:cs(0,ds(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||Vi(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?bi(e):null;return l&&function t(){const i=bi(e);v&&!Vi(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 Ei=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=bs(s),r=ws(s),l="y"===_s(s),d=Hs.has(n)?-1:1,c=o&&l?-1:1,h=fs(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}}}}},Zi=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}=fs(e,t),d={x:s,y:i},c=await Fs(t,l),h=_s(bs(a)),u=ys(h);let p=d[u],g=d[h];if(o){const e="y"===u?"bottom":"right";p=ms(p+c["y"===u?"top":"left"],p,p-c[e])}if(n){const e="y"===h?"bottom":"right";g=ms(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}}}}}},Bi=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}=fs(e,t);if(null!=(s=o.arrow)&&s.alignmentOffset)return{};const f=bs(a),b=_s(r),w=bs(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[Ss(e),t,Ss(t)]}(r)),k="none"!==g;!u&&k&&x.push(...Es(r,v,g,y));const _=[r,...x],C=await Fs(t,m),M=[];let S=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&M.push(C[f]),h){const e=Ms(a,n,y);M.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:a,overflows:M}],!M.every(e=>e<=0)){var $,A;const e=((null==($=o.flip)?void 0:$.index)||0)+1,t=_[e];if(t){if(!("alignment"===h&&b!==_s(t))||S.every(e=>_s(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let s=null==(A=S.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 V;const e=null==(V=S.filter(e=>{if(k){const t=_s(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{}}}},Ii=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}=fs(e,t),c=await Fs(t,d),h=bs(a),u=ws(a),p="y"===_s(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=ds(v-c[m],b),x=ds(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=cs(c.left,0),t=cs(c.right,0),s=cs(c.top,0),i=cs(c.bottom,0);p?C=g-2*(0!==e||0!==t?e+t:cs(c.left,c.right)):_=v-2*(0!==s||0!==i?s+i:cs(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:_});const M=await n.getDimensions(r.floating);return g!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}},Li=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...a}=fs(e,t);switch(i){case"referenceHidden":{const e=Ts(await Fs(t,{...a,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ps(e)}}}case"escaped":{const e=Ts(await Fs(t,{...a,altBoundary:!0}),s.floating);return{data:{escapedOffsets:e,escaped:Ps(e)}}}default:return{}}}}},Fi=(e,t,s)=>{const i=new Map,a={platform:Ai,...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}=Ls(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}=Ls(d,u,l))),s=-1)}return{x:c,y:h,placement:u,strategy:a,middlewareData:p}})(e,t,{...a,platform:o})};var Ti=n`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-14);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:900}div{max-width:fit-content}`;class Pi extends Pe{constructor(){super(...arguments),this._myTooltip=as(),this._tooltipBubble=as(),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 Fi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[Ei(8),Bi(),Zi(),Li()]});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=Di(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return ee`
|
|
2356
2356
|
<div ${rs(this._myTooltip)} class="tooltip-placeholder">
|
|
2357
2357
|
<slot @slotchange=${()=>this._handleSlotChange()}></slot>
|
|
2358
2358
|
${this.open?ee`<div ${rs(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
|
|
@@ -2376,7 +2376,7 @@ const Tt=e=>e??ie;var Pt=n`:host{cursor:pointer;display:inline-block}.alert-link
|
|
|
2376
2376
|
></sgds-close-button>`:ie}
|
|
2377
2377
|
</div>`}render(){return this.dismissible&&this.show||!this.dismissible?this.truncated?ee`<sgds-tooltip content=${this.text} @sgds-hide=${e=>e.stopPropagation()}
|
|
2378
2378
|
>${this._renderBadge()}</sgds-tooltip
|
|
2379
|
-
>`:this._renderBadge():ie}}zi.styles=[...Pe.styles,Rt],zi.dependencies={"sgds-close-button":mt,"sgds-tooltip":Pi},e([Ve({type:Boolean,reflect:!0})],zi.prototype,"show",void 0),e([Ve({reflect:!0})],zi.prototype,"variant",void 0),e([Ve({type:Boolean,reflect:!0})],zi.prototype,"outlined",void 0),e([Ve({type:Boolean,reflect:!0})],zi.prototype,"dismissible",void 0),e([Ve({type:Boolean,reflect:!0})],zi.prototype,"fullWidth",void 0),e([De()],zi.prototype,"truncated",void 0),e([De()],zi.prototype,"text",void 0),e([at("show")],zi.prototype,"_handleShowChange",null),e([at("text")],zi.prototype,"_handleTruncation",null),rt("sgds-badge",zi);var Ri=n`: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
|
|
2379
|
+
>`:this._renderBadge():ie}}zi.styles=[...Pe.styles,Rt],zi.dependencies={"sgds-close-button":mt,"sgds-tooltip":Pi},e([Ve({type:Boolean,reflect:!0})],zi.prototype,"show",void 0),e([Ve({reflect:!0})],zi.prototype,"variant",void 0),e([Ve({type:Boolean,reflect:!0})],zi.prototype,"outlined",void 0),e([Ve({type:Boolean,reflect:!0})],zi.prototype,"dismissible",void 0),e([Ve({type:Boolean,reflect:!0})],zi.prototype,"fullWidth",void 0),e([De()],zi.prototype,"truncated",void 0),e([De()],zi.prototype,"text",void 0),e([at("show")],zi.prototype,"_handleShowChange",null),e([at("text")],zi.prototype,"_handleTruncation",null),rt("sgds-badge",zi);var Ri=n`: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 Oi(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Ni extends Pe{constructor(){super(...arguments),this.myDropdown=as(),this.dropdownMenuId=Oi("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=as(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Di(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const 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=[Ei(8),this.noFlip?void 0:Bi(),Zi()].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 Fi(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([Ve({type:Boolean,state:!0})],Ni.prototype,"noFlip",void 0),e([Ve({type:Boolean,reflect:!0,state:!0})],Ni.prototype,"menuAlignRight",void 0),e([Ve({type:String,reflect:!0,state:!0})],Ni.prototype,"drop",void 0),e([Ve({type:Object})],Ni.prototype,"floatingOpts",void 0),e([Ve({type:Boolean,reflect:!0})],Ni.prototype,"menuIsOpen",void 0),e([Ve({type:Boolean,reflect:!0})],Ni.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],Ni.prototype,"readonly",void 0);class Ui extends Ni{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;const i=e.target;i.disabled||(this.emit("sgds-select",{detail:{item:i}}),"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()})}}Ui.styles=Ni.styles,e([Be("ul.dropdown-menu")],Ui.prototype,"menu",void 0),e([De()],Ui.prototype,"nextDropdownItemNo",void 0),e([De()],Ui.prototype,"prevDropdownItemNo",void 0),e([Ve({type:Boolean,reflect:!0})],Ui.prototype,"hidden",void 0);var qi=n`:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-192);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%}`,Yi=n`.dropdown{display:flex;height:inherit;position:relative}`;class ji extends Ui{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=rs()}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.updateFloatingPosition(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return ee`
|
|
2380
2380
|
<div class="dropdown">
|
|
2381
2381
|
<div
|
|
2382
2382
|
class="toggler-container"
|
|
@@ -2398,20 +2398,20 @@ const Tt=e=>e??ie;var Pt=n`:host{cursor:pointer;display:inline-block}.alert-link
|
|
|
2398
2398
|
>
|
|
2399
2399
|
<slot></slot>
|
|
2400
2400
|
</div>
|
|
2401
|
-
`}}Ki.styles=[Yi,Wi],Ki.dependencies={"sgds-icon":
|
|
2401
|
+
`}}Ki.styles=[Yi,Wi],Ki.dependencies={"sgds-icon":It},e([Le({flatten:!0})],Ki.prototype,"anchor",void 0),e([Ve({type:Boolean})],Ki.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Ki.prototype,"disabled",void 0);class Gi extends Pe{constructor(){super(...arguments),this.size="md"}render(){return ee`
|
|
2402
2402
|
<sgds-dropdown>
|
|
2403
2403
|
<button slot="toggler" class="overflow-btn">
|
|
2404
2404
|
<sgds-icon name="three-dots" size=${this.size}></sgds-icon>
|
|
2405
2405
|
</button>
|
|
2406
2406
|
<slot></slot>
|
|
2407
2407
|
</sgds-dropdown>
|
|
2408
|
-
`}}Gi.styles=[...Pe.styles,Ri],Gi.dependencies={"sgds-dropdown":ji,"sgds-dropdown-item":Ki,"sgds-icon":
|
|
2408
|
+
`}}Gi.styles=[...Pe.styles,Ri],Gi.dependencies={"sgds-dropdown":ji,"sgds-dropdown-item":Ki,"sgds-icon":It},e([Ve({type:String,reflect:!0})],Gi.prototype,"size",void 0);var Xi=n`.breadcrumb{display:flex;gap:var(--sgds-gap-xs)}.breadcrumb sgds-breadcrumb-item:first-child,.breadcrumb slot::slotted(sgds-breadcrumb-item:first-child){flex:0 0 auto}`;class Qi extends Pe{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.classList.add("overflow-menu"),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 pt`
|
|
2409
2409
|
<div aria-label=${Tt(this.ariaLabel)}>
|
|
2410
2410
|
<div class="breadcrumb">
|
|
2411
2411
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2412
2412
|
</div>
|
|
2413
2413
|
</div>
|
|
2414
|
-
`}}Qi.styles=[...Pe.styles,Xi],Qi.dependencies={"sgds-overflow-menu":Gi},e([Ve({type:String})],Qi.prototype,"ariaLabel",void 0),e([Ze("slot")],Qi.prototype,"defaultSlot",void 0);var Ji=n`: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-16)!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-20)!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-14)!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-12)!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)!important;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 ea extends Pe{constructor(){super(...arguments),this.size="md",this.variant="primary",this.tone="primary",this.active=!1,this.disabled=!1}_processAnchor(e){this.disabled&&e.setAttribute("disabled","true"),e.hasAttribute("disabled")?(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1")):e.setAttribute("tabindex","0")}_processIcon(e){const t={xs:"sm",sm:"md",md:"lg",lg:"xl"};e.querySelectorAll("sgds-icon").forEach(e=>{e.setAttribute("size",t[this.size]),e.classList.remove("icon-left","icon-right"),e.previousElementSibling||e.previousSibling||e.classList.add("icon-left"),e.nextElementSibling||e.nextSibling||e.classList.add("icon-right")})}_handleSlotChange(e){const t=e.target.assignedElements().find(e=>"a"===e.tagName.toLowerCase());t&&(this._processAnchor(t),this._processIcon(t))}firstUpdated(e){super.firstUpdated(e);const t=this.querySelector("a");t&&(this._processAnchor(t),this._processIcon(t))}render(){return ee`<slot class="nav-link " @slotchange=${this._handleSlotChange}></slot> `}}ea.styles=[...Pe.styles,Ji],e([Ve({type:String,reflect:!0})],ea.prototype,"size",void 0),e([Ve({type:String,reflect:!0})],ea.prototype,"variant",void 0),e([Ve({type:String,reflect:!0})],ea.prototype,"tone",void 0),e([Ve({type:Boolean,reflect:!0})],ea.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],ea.prototype,"disabled",void 0);var ta=n`:host{align-items:center;display:flex;gap:var(--sgds-gap-xs);min-width:0}:host .nav-link::slotted(*){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([active]) .nav-link::slotted(*){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default);overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}: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)}:host(.overflow-menu){flex-shrink:0}sgds-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator svg{display:block}:host(:last-of-type) .separator{display:none}`;class sa extends Pe{constructor(){super(...arguments),this.active=!1}render(){return ee`
|
|
2414
|
+
`}}Qi.styles=[...Pe.styles,Xi],Qi.dependencies={"sgds-overflow-menu":Gi},e([Ve({type:String})],Qi.prototype,"ariaLabel",void 0),e([Be("slot")],Qi.prototype,"defaultSlot",void 0);var Ji=n`: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-16)!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-20)!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-14)!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-12)!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)!important;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 ea extends Pe{constructor(){super(...arguments),this.size="md",this.variant="primary",this.tone="primary",this.active=!1,this.disabled=!1}_processAnchor(e){this.disabled&&e.setAttribute("disabled","true"),e.hasAttribute("disabled")?(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1")):e.setAttribute("tabindex","0")}_processIcon(e){const t={xs:"sm",sm:"md",md:"lg",lg:"xl"};e.querySelectorAll("sgds-icon").forEach(e=>{e.setAttribute("size",t[this.size]),e.classList.remove("icon-left","icon-right"),e.previousElementSibling||e.previousSibling||e.classList.add("icon-left"),e.nextElementSibling||e.nextSibling||e.classList.add("icon-right")})}_handleSlotChange(e){const t=e.target.assignedElements().find(e=>"a"===e.tagName.toLowerCase());t&&(this._processAnchor(t),this._processIcon(t))}firstUpdated(e){super.firstUpdated(e);const t=this.querySelector("a");t&&(this._processAnchor(t),this._processIcon(t))}render(){return ee`<slot class="nav-link " @slotchange=${this._handleSlotChange}></slot> `}}ea.styles=[...Pe.styles,Ji],e([Ve({type:String,reflect:!0})],ea.prototype,"size",void 0),e([Ve({type:String,reflect:!0})],ea.prototype,"variant",void 0),e([Ve({type:String,reflect:!0})],ea.prototype,"tone",void 0),e([Ve({type:Boolean,reflect:!0})],ea.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],ea.prototype,"disabled",void 0);var ta=n`:host{align-items:center;display:flex;gap:var(--sgds-gap-xs);min-width:0}:host .nav-link::slotted(*){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([active]) .nav-link::slotted(*){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default);overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}: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)}:host(.overflow-menu){flex-shrink:0}sgds-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator svg{display:block}:host(:last-of-type) .separator{display:none}`;class sa extends Pe{constructor(){super(...arguments),this.active=!1}render(){return ee`
|
|
2415
2415
|
<sgds-link><slot class="nav-link"></slot></sgds-link>
|
|
2416
2416
|
<div class="separator">
|
|
2417
2417
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
@@ -2423,7 +2423,7 @@ const Tt=e=>e??ie;var Pt=n`:host{cursor:pointer;display:inline-block}.alert-link
|
|
|
2423
2423
|
/>
|
|
2424
2424
|
</svg>
|
|
2425
2425
|
</div>
|
|
2426
|
-
`}}sa.styles=[ta],sa.dependencies={"sgds-link":ea},e([Ve({type:Boolean,reflect:!0})],sa.prototype,"active",void 0),rt("sgds-breadcrumb",Qi),rt("sgds-breadcrumb-item",sa);var ia=n`: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-20);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-14);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-12);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-16);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 aa extends Pe{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"}}aa.styles=[...Pe.styles,ia],e([
|
|
2426
|
+
`}}sa.styles=[ta],sa.dependencies={"sgds-link":ea},e([Ve({type:Boolean,reflect:!0})],sa.prototype,"active",void 0),rt("sgds-breadcrumb",Qi),rt("sgds-breadcrumb-item",sa);var ia=n`: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-20);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-14);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-12);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-16);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 aa extends Pe{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"}}aa.styles=[...Pe.styles,ia],e([Be(".btn")],aa.prototype,"button",void 0),e([Ve({reflect:!0})],aa.prototype,"variant",void 0),e([Ve({reflect:!0})],aa.prototype,"tone",void 0),e([Ve({reflect:!0})],aa.prototype,"size",void 0),e([Ve({type:Boolean,reflect:!0})],aa.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],aa.prototype,"disabled",void 0),e([Ve({type:String,reflect:!0})],aa.prototype,"href",void 0),e([Ve({type:String,reflect:!0})],aa.prototype,"target",void 0),e([Ve({type:String,reflect:!0})],aa.prototype,"download",void 0),e([Ve({type:String})],aa.prototype,"ariaLabel",void 0),e([Ve({type:Boolean})],aa.prototype,"loading",void 0);class oa{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 na=n`: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 ra extends aa{constructor(){super(...arguments),this.formSubmitController=new oa(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 Hi(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?ht`a`:ht`button`,s=!this.hasLeftIconSlot&&!this.hasRightIconSlot;return pt`
|
|
2427
2427
|
<${t}
|
|
2428
2428
|
class="btn ${We({disabled:this.disabled,active:this.active,"has-left-icon":this.hasLeftIconSlot,"has-right-icon":this.hasRightIconSlot,"no-icon":s,loading:this.loading})}"
|
|
2429
2429
|
?disabled=${Tt(e?void 0:this.disabled)}
|
|
@@ -2449,7 +2449,7 @@ const Tt=e=>e??ie;var Pt=n`:host{cursor:pointer;display:inline-block}.alert-link
|
|
|
2449
2449
|
<slot name="rightIcon"></slot>`}
|
|
2450
2450
|
|
|
2451
2451
|
</${t}>
|
|
2452
|
-
`}}ra.styles=[...aa.styles,Ht,na],e([Ve({type:String,reflect:!0})],ra.prototype,"type",void 0),e([Ve({type:String,reflect:!0})],ra.prototype,"form",void 0),e([Ve({type:String,reflect:!0,attribute:"formaction"})],ra.prototype,"formAction",void 0),e([Ve({type:String,reflect:!0,attribute:"formmethod"})],ra.prototype,"formMethod",void 0),e([Ve({attribute:"formnovalidate",type:Boolean,reflect:!0})],ra.prototype,"formNoValidate",void 0),e([Ve({type:String,reflect:!0,attribute:"formtarget"})],ra.prototype,"formTarget",void 0),e([Ve({type:Boolean,reflect:!0})],ra.prototype,"fullWidth",void 0),e([Ve({type:Boolean})],ra.prototype,"hasLeftIconSlot",void 0),e([Ve({type:Boolean})],ra.prototype,"hasRightIconSlot",void 0),rt("sgds-button",ra);var la=n`:host([disabled]){cursor:not-allowed}: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([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-xl) var(--sgds-margin-xl) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-xl) 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,slot[name=title]::slotted(*){color:var(--sgds-body-color-default);font-size:var(--sgds-font-size-24)!important;font-weight:var(--sgds-font-weight-semibold)!important;margin-bottom:var(--sgds-margin-none)!important}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-14)!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){color:var(--sgds-link-color-default);font-size:var(--sgds-font-size-24)!important;font-weight:var(--sgds-font-weight-semibold)!important;margin-bottom:var(--sgds-margin-none)!important;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)}`,da=n`.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}`,ca=n`.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}`,ha=n`.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}`,ua=n`.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}`,pa=n`p{margin-bottom:1.5rem;margin-top:0}`;class ga extends Pe{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")}}ga.styles=[...Pe.styles,da,ca,ha,ua,pa,la],e([Ze("a.card")],ga.prototype,"card",void 0),e([Ve({type:Boolean,reflect:!0})],ga.prototype,"stretchedLink",void 0),e([Ve({type:Boolean,reflect:!0})],ga.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],ga.prototype,"hideBorder",void 0),e([Ve({type:Boolean,reflect:!0})],ga.prototype,"tinted",void 0),e([Ve({type:String,reflect:!0})],ga.prototype,"orientation",void 0);var va=n`: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 ma extends ga{constructor(){super(...arguments),this.imagePosition="before",this.imageAdjustment="default",this.hasImageSlot=!1,this.hasIconSlot=!1,this.hasUpperSlot=!1,this.hasSlotController=new Hi(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?ht`a`:ht`div`,t=!this.stretchedLink||this.disabled?-1:0;return pt`
|
|
2452
|
+
`}}ra.styles=[...aa.styles,Ht,na],e([Ve({type:String,reflect:!0})],ra.prototype,"type",void 0),e([Ve({type:String,reflect:!0})],ra.prototype,"form",void 0),e([Ve({type:String,reflect:!0,attribute:"formaction"})],ra.prototype,"formAction",void 0),e([Ve({type:String,reflect:!0,attribute:"formmethod"})],ra.prototype,"formMethod",void 0),e([Ve({attribute:"formnovalidate",type:Boolean,reflect:!0})],ra.prototype,"formNoValidate",void 0),e([Ve({type:String,reflect:!0,attribute:"formtarget"})],ra.prototype,"formTarget",void 0),e([Ve({type:Boolean,reflect:!0})],ra.prototype,"fullWidth",void 0),e([Ve({type:Boolean})],ra.prototype,"hasLeftIconSlot",void 0),e([Ve({type:Boolean})],ra.prototype,"hasRightIconSlot",void 0),rt("sgds-button",ra);var la=n`:host([disabled]){cursor:not-allowed}: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([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-xl) var(--sgds-margin-xl) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-xl) 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,slot[name=title]::slotted(*){color:var(--sgds-body-color-default);font-size:var(--sgds-font-size-24)!important;font-weight:var(--sgds-font-weight-semibold)!important;margin-bottom:var(--sgds-margin-none)!important}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-14)!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){color:var(--sgds-link-color-default);font-size:var(--sgds-font-size-24)!important;font-weight:var(--sgds-font-weight-semibold)!important;margin-bottom:var(--sgds-margin-none)!important;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)}`,da=n`.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}`,ca=n`.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}`,ha=n`.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}`,ua=n`.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}`,pa=n`p{margin-bottom:1.5rem;margin-top:0}`;class ga extends Pe{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")}}ga.styles=[...Pe.styles,da,ca,ha,ua,pa,la],e([Be("a.card")],ga.prototype,"card",void 0),e([Ve({type:Boolean,reflect:!0})],ga.prototype,"stretchedLink",void 0),e([Ve({type:Boolean,reflect:!0})],ga.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],ga.prototype,"hideBorder",void 0),e([Ve({type:Boolean,reflect:!0})],ga.prototype,"tinted",void 0),e([Ve({type:String,reflect:!0})],ga.prototype,"orientation",void 0);var va=n`: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 ma extends ga{constructor(){super(...arguments),this.imagePosition="before",this.imageAdjustment="default",this.hasImageSlot=!1,this.hasIconSlot=!1,this.hasUpperSlot=!1,this.hasSlotController=new Hi(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?ht`a`:ht`div`,t=!this.stretchedLink||this.disabled?-1:0;return pt`
|
|
2453
2453
|
<${e}
|
|
2454
2454
|
class="card ${We({disabled:this.disabled})}"
|
|
2455
2455
|
tabindex=${t}
|
|
@@ -2485,7 +2485,7 @@ const Tt=e=>e??ie;var Pt=n`:host{cursor:pointer;display:inline-block}.alert-link
|
|
|
2485
2485
|
* Copyright 2020 Google LLC
|
|
2486
2486
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2487
2487
|
*/
|
|
2488
|
-
class extends je{constructor(e){if(super(e),e.type!==Ue&&e.type!==
|
|
2488
|
+
class extends je{constructor(e){if(super(e),e.type!==Ue&&e.type!==Oe&&e.type!==qe)throw new Error("The `live` directive is not allowed on child or event bindings");if(!Ut(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===Ue){if(t===s[i])return se}else if(e.type===qe){if(!!t===s.hasAttribute(i))return se}else if(e.type===Oe&&s.getAttribute(i)===String(t))return se;return Kt(e),t}});var ba=n`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,wa=n`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,ya=n`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const xa=(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||x,i=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:x.fromAttribute)(n,l.type);this[e]!==i&&(this[s]=i)}a.call(this,t,o,n)}};class ka{constructor(e,t){(this.host=e).addController(this),this._internals=e._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",e=>this.handleInvalid(e))}hostDisconnected(){this.host.removeEventListener("invalid",e=>this.handleInvalid(e))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,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 _a=t=>{class s extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new ka(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1))}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,s){if(!this._mixinShouldSkipSgdsValidation())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([Ie("sgds-input")],s.prototype,"sgdsInput",void 0),e([Ie("sgds-datepicker-input")],s.prototype,"sgdsDatepickerInput",void 0),s};var Ca=n`.empty-menu,.loading-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px);pointer-events:none}.loading-menu{align-items:center;display:flex;gap:var(--sgds-gap-xs)}`;class Ma extends(_a(Ui)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Oi("input"),this._labelId=Oi("label"),this.floatingOpts={middleware:[Ii({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;const s=this.constructor.childName,i=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===s;this.invalid=!i&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?ee` <div class="invalid-feedback-container">
|
|
2489
2489
|
<slot name="invalidIcon">
|
|
2490
2490
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
2491
2491
|
</slot>
|
|
@@ -2499,11 +2499,11 @@ class extends je{constructor(e){if(super(e),e.type!==Ue&&e.type!==Ne&&e.type!==q
|
|
|
2499
2499
|
class=${We({"form-label":!0,required:this.required})}
|
|
2500
2500
|
>${this.label}</label
|
|
2501
2501
|
>
|
|
2502
|
-
`;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}})}_renderEmptyMenu(){return ee` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return ee`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}Ma.styles=[...Ui.styles,qi,wa,ba,ya,Ca],e([Ve({reflect:!0})],Ma.prototype,"label",void 0),e([Ve({reflect:!0})],Ma.prototype,"hintText",void 0),e([Ve({reflect:!0})],Ma.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],Ma.prototype,"placeholder",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"autofocus",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"loading",void 0),e([Ve({type:String,reflect:!0})],Ma.prototype,"value",void 0),e([De()],Ma.prototype,"displayValue",void 0),e([xa()],Ma.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],Ma.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"invalid",void 0),e([Ve({type:Array})],Ma.prototype,"menuList",void 0),e([De()],Ma.prototype,"selectedItems",void 0),e([De()],Ma.prototype,"filteredList",void 0),e([
|
|
2502
|
+
`;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}})}_renderEmptyMenu(){return ee` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return ee`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}Ma.styles=[...Ui.styles,qi,wa,ba,ya,Ca],e([Ve({reflect:!0})],Ma.prototype,"label",void 0),e([Ve({reflect:!0})],Ma.prototype,"hintText",void 0),e([Ve({reflect:!0})],Ma.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],Ma.prototype,"placeholder",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"autofocus",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"loading",void 0),e([Ve({type:String,reflect:!0})],Ma.prototype,"value",void 0),e([De()],Ma.prototype,"displayValue",void 0),e([xa()],Ma.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],Ma.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Ma.prototype,"invalid",void 0),e([Ve({type:Array})],Ma.prototype,"menuList",void 0),e([De()],Ma.prototype,"selectedItems",void 0),e([De()],Ma.prototype,"filteredList",void 0),e([Ie("input.form-control")],Ma.prototype,"_input",void 0);var Sa=n`:host{display:block;position:relative}.dropdown{display:flex;height:100%}.dropdown-menu{box-sizing:border-box;max-height:10rem;overflow-x:hidden;overflow-y:auto}.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.combobox .form-control-group{height:unset;min-height:var(--sgds-dimension-48);min-width:var(--sgds-dimension-256)}.combobox-input-container{align-items:center;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);padding:calc(var(--sgds-form-padding-y) - var(--sgds-form-border-width-default)) 0;width:calc(100% - var(--sgds-icon-size-md, 1.25rem))}slot[id=default].d-none,slot[id=default].d-none::slotted(*){display:none}.form-clearable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`,$a=n`: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 Aa extends Pe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){const e={disabled:this.disabled,active:this.active};return ee`
|
|
2503
2503
|
<div class="dropdown-item ${We(e)}" tabindex=${this.disabled?"-1":"0"}>
|
|
2504
2504
|
${this._renderItemContent()}
|
|
2505
2505
|
</div>
|
|
2506
|
-
`}}Aa.styles=[$a],e([Ve({type:Boolean,reflect:!0})],Aa.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Aa.prototype,"disabled",void 0),e([Ve({type:String,reflect:!0})],Aa.prototype,"value",void 0);var Va=n`.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}`,Da=n`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class Ea extends Pe{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=
|
|
2506
|
+
`}}Aa.styles=[$a],e([Ve({type:Boolean,reflect:!0})],Aa.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Aa.prototype,"disabled",void 0),e([Ve({type:String,reflect:!0})],Aa.prototype,"value",void 0);var Va=n`.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}`,Da=n`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class Ea extends Pe{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Oi("input"),this._labelId=Oi("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Ea.styles=[...Pe.styles,ba,wa,Va,Da],e([Ve({reflect:!0})],Ea.prototype,"label",void 0),e([Ve({reflect:!0})],Ea.prototype,"hintText",void 0),e([Ve({reflect:!0})],Ea.prototype,"name",void 0),e([Ve({type:Boolean,reflect:!0})],Ea.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],Ea.prototype,"invalid",void 0);var Za=n`.form-check-input[type=checkbox]{border-radius:var(--sgds-form-border-radius-md)}.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path d="M14.347 3.979a.522.522 0 0 1 0 .739L7.043 12.02a.521.521 0 0 1-.738 0L2.653 8.369a.522.522 0 1 1 .739-.738l3.282 3.283 6.934-6.935a.52.52 0 0 1 .739 0Z" fill="%23fff"/></svg>')}.form-check-input:indeterminate,.form-check-input[indeterminate]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5Z" fill="%23fff"/></svg>');background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:indeterminate:focus,.form-check-input:indeterminate:hover,.form-check-input[indeterminate]:focus-visible,.form-check-input[indeterminate]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}.form-check-input:indeterminate.is-invalid,.form-check-input[checked].is-invalid,.form-check-input[indeterminate].is-invalid{background-color:var(--sgds-form-danger-surface-default)}.form-check-label{flex:1}.form-check{margin:var(--sgds-form-padding-inline-sm) 0;padding:0}`,Ba=n`input{margin:0}.form-check{display:flex;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.form-check-input{appearance:none;background-color:var(--sgds-form-surface-default);background-image:var(--sgds-radio-bg-image);background-position:50%;background-repeat:no-repeat;background-size:auto;border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);height:var(--sgds-form-height-sm);width:var(--sgds-form-width-xs)}.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):not([aria-checked=true]):not(:focus-visible):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid)[checked]:focus-visible,.form-check-input:not([disabled]):not(.is-invalid)[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-check-input:not([disabled]).is-invalid{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-check-input:not([disabled]).is-invalid:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class Ia extends(_a(Ea)){constructor(){super(...arguments),this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.invalidFeedback="",this._isTouched=!1,this._handleHostClick=e=>{e.composedPath()[0]===this&&(e.stopPropagation(),this.input.click())}}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(e){this.indeterminate&&(this.indeterminate=!this.indeterminate),this.checked=!this.checked,super._mixinHandleChange(e),this.emit("sgds-change",{detail:{checked:this.checked,value:this.value}}),this.checked?this.emit("sgds-check",{detail:{value:this.value}}):this.emit("sgds-uncheck",{detail:{value:this.value}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleDisabledChange(){this.setInvalid(!1)}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_mixinResetFormControl(){this._isTouched=!1,this.checked=this.input.checked=this.defaultChecked,this.input.dispatchEvent(new InputEvent("reset")),this._mixinResetValidity(this.input)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}firstUpdated(e){super.firstUpdated(e),this.checked&&this.emit("sgds-check",{detail:{value:this.value}})}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleHostClick)}render(){const e="both"===this.hasFeedback||"style"===this.hasFeedback,t="both"===this.hasFeedback||"text"===this.hasFeedback;return ee`
|
|
2507
2507
|
<div class="form-check">
|
|
2508
2508
|
<input
|
|
2509
2509
|
class=${We({"form-check-input":!0,"is-invalid":e&&this.invalid})}
|
|
@@ -2541,7 +2541,7 @@ class extends je{constructor(e){if(super(e),e.type!==Ue&&e.type!==Ne&&e.type!==q
|
|
|
2541
2541
|
</div>
|
|
2542
2542
|
</div>
|
|
2543
2543
|
`:ie}
|
|
2544
|
-
`}}
|
|
2544
|
+
`}}Ia.styles=[...Ea.styles,Ba,Za],e([Ve({type:String,reflect:!0})],Ia.prototype,"value",void 0),e([Ve({type:Boolean,reflect:!0})],Ia.prototype,"checked",void 0),e([Ve({type:String,reflect:!0})],Ia.prototype,"hasFeedback",void 0),e([xa("checked")],Ia.prototype,"defaultChecked",void 0),e([Ve({type:Boolean,reflect:!0})],Ia.prototype,"indeterminate",void 0),e([Ve({type:Boolean,reflect:!0})],Ia.prototype,"required",void 0),e([Ve({type:String,reflect:!0})],Ia.prototype,"invalidFeedback",void 0),e([De()],Ia.prototype,"_isTouched",void 0),e([at("disabled",{waitUntilFirstUpdate:!0})],Ia.prototype,"_handleDisabledChange",null),e([at("_isTouched",{waitUntilFirstUpdate:!0})],Ia.prototype,"_handleIsTouched",null);class La extends Aa{constructor(){super(...arguments),this.checkbox=!1,this._renderItemContent=()=>this.checkbox?ee`
|
|
2545
2545
|
<sgds-checkbox .checked=${this.active} .disabled=${this.disabled}>
|
|
2546
2546
|
<slot></slot>
|
|
2547
2547
|
</sgds-checkbox>
|
|
@@ -2550,13 +2550,13 @@ class extends je{constructor(e){if(super(e),e.type!==Ue&&e.type!==Ne&&e.type!==q
|
|
|
2550
2550
|
<slot></slot>
|
|
2551
2551
|
${this.active?ee` <sgds-icon name="check"></sgds-icon> `:ie}
|
|
2552
2552
|
</div>
|
|
2553
|
-
`}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e);const t=this.parentElement;(null==t?void 0:t.multiSelect)&&(this.checkbox=!0)}}La.dependencies={"sgds-icon":
|
|
2553
|
+
`}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e);const t=this.parentElement;(null==t?void 0:t.multiSelect)&&(this.checkbox=!0)}}La.dependencies={"sgds-icon":It,"sgds-checkbox":Ia},e([Ve({type:Boolean,reflect:!0})],La.prototype,"checkbox",void 0);
|
|
2554
2554
|
/**
|
|
2555
2555
|
* @license
|
|
2556
2556
|
* Copyright 2017 Google LLC
|
|
2557
2557
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2558
2558
|
*/
|
|
2559
|
-
const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};const Ta=Ye(class extends je{constructor(e){if(super(e),e.type!==
|
|
2559
|
+
const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};const Ta=Ye(class extends je{constructor(e){if(super(e),e.type!==Ne)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,s){let i;void 0===s?s=t:void 0!==t&&(i=t);const a=[],o=[];let n=0;for(const t of e)a[n]=i?i(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:a}}render(e,t,s){return this._getValuesAndKeys(e,t,s).values}update(e,[t,s,i]){const a=e._$committedValue;const{values:o,keys:n}=this._getValuesAndKeys(t,s,i);if(!Array.isArray(a))return this._itemKeys=n,o;const r=this._itemKeys??=[],l=[];let d,c,h=0,u=a.length-1,p=0,g=o.length-1;for(;h<=u&&p<=g;)if(null===a[h])h++;else if(null===a[u])u--;else if(r[h]===n[p])l[p]=jt(a[h],o[p]),h++,p++;else if(r[u]===n[g])l[g]=jt(a[u],o[g]),u--,g--;else if(r[h]===n[g])l[g]=jt(a[h],o[g]),Yt(e,l[g+1],a[h]),h++,g--;else if(r[u]===n[p])l[p]=jt(a[u],o[p]),Yt(e,a[h],a[u]),u--,p++;else if(void 0===d&&(d=Fa(n,p,g),c=Fa(r,h,u)),d.has(r[h]))if(d.has(r[u])){const t=c.get(n[p]),s=void 0!==t?a[t]:null;if(null===s){const t=Yt(e,a[h]);jt(t,o[p]),l[p]=t}else l[p]=jt(s,o[p]),Yt(e,a[h],s),a[t]=null;p++}else Gt(a[u]),u--;else Gt(a[h]),h++;for(;p<=g;){const t=Yt(e,l[g+1]);jt(t,o[p]),l[p++]=t}for(;h<=u;){const e=a[h++];null!==e&&Gt(e)}return this._itemKeys=n,Kt(e,l),se}});var Pa=n`:host{--sgds-spinner-bg:var(--sgds-primary-surface-default);display:inline-flex}:host([variant=neutral]){--sgds-spinner-bg:var(--sgds-neutral-surface-default)}:host([tone=neutral]){--sgds-spinner-bg:var(--sgds-surface-inverse)}:host([tone=inverse]){--sgds-spinner-bg:var(--sgds-surface-default)}:host([tone=fixed-light]){--sgds-spinner-bg:var(--sgds-surface-fixed-light)}:host([tone=fixed-dark]){--sgds-spinner-bg:var(--sgds-surface-fixed-dark)}.spinner-wrapper{align-items:center;display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.spinner-wrapper.horizontal{flex-direction:row}.spinner{--border-thickness:4px;animation:spinner .75s linear infinite;border:var(--border-thickness) solid var(--sgds-bg-translucent);border-radius:50%;border-right:var(--border-thickness) solid var(--sgds-spinner-bg);color:var(--sgds-spinner-color);display:inline-flex;height:var(--sgds-dimension-32);width:var(--sgds-dimension-32)}.spinner-xs{--border-thickness:2px;height:var(--sgds-dimension-16);width:var(--sgds-dimension-16)}.spinner-sm{--border-thickness:3px;height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.spinner-lg{--border-thickness:6px;height:var(--sgds-dimension-48);width:var(--sgds-dimension-48)}.spinner-xl{--border-thickness:8px;height:var(--sgds-dimension-64);width:var(--sgds-dimension-64)}.spinner-label{color:var(--sgds-neutral-color-default);font-size:var(--sgds-font-size-14)}@media (prefers-reduced-motion:reduce){.spinner{animation-duration:1.5s}}
|
|
2560
2560
|
|
|
2561
2561
|
/*! CSS Used keyframes */@keyframes spinner{to{transform:rotate(1turn)}}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;class Ha extends Pe{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.orientation="vertical"}render(){return pt`
|
|
2562
2562
|
<div
|
|
@@ -2653,7 +2653,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2653
2653
|
?required=${this.required}
|
|
2654
2654
|
tabindex="-1"
|
|
2655
2655
|
/>`:ie}
|
|
2656
|
-
`}}za.styles=[...Ma.styles,ya,Sa],za.childName="sgds-combo-box-option",za.dependencies={[za.childName]:La,"sgds-icon":
|
|
2656
|
+
`}}za.styles=[...Ma.styles,ya,Sa],za.childName="sgds-combo-box-option",za.dependencies={[za.childName]:La,"sgds-icon":It,"sgds-badge":zi,"sgds-spinner":Ha},e([Ve({type:Boolean,reflect:!0})],za.prototype,"multiSelect",void 0),e([Ve({type:Boolean,reflect:!0})],za.prototype,"badgeFullWidth",void 0),e([Ve({type:Boolean,reflect:!0})],za.prototype,"clearable",void 0),e([Ve({type:Boolean,reflect:!0})],za.prototype,"async",void 0),e([Ve({type:Boolean,reflect:!0})],za.prototype,"emptyMenuAsync",void 0),e([Ve()],za.prototype,"filterFunction",void 0),e([Ie("input#multi-select-input-tracker")],za.prototype,"_multiSelectInput",void 0),e([Le({flatten:!0,selector:"sgds-combo-box-option"})],za.prototype,"options",void 0),e([De()],za.prototype,"optionList",void 0),e([De()],za.prototype,"emptyMenuAfterFiltering",void 0),e([De()],za.prototype,"isFocused",void 0),e([at("value",{waitUntilFirstUpdate:!0})],za.prototype,"_handleValueChange",null),e([at("optionList",{waitUntilFirstUpdate:!0})],za.prototype,"_handleOptionListChange",null),e([at("menuList",{waitUntilFirstUpdate:!0})],za.prototype,"_handleMenuListChange",null),rt("sgds-combo-box",za),rt("sgds-combo-box-option",La);var Ra=n`: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-16);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 Oa extends(_a(Ea)){constructor(){super(...arguments),this.label="",this.invalidFeedback="Please tick at least one box if you want to proceed",this.hasFeedback=!1,this.hintText="",this.required=!1,this.value="",this._isTouched=!1,this.defaultValue="",this._blurredCheckboxes=new Set}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-check",e=>{const{value:t}=e.detail;!this.value.includes(t)&&this._addValue(t)}),this.addEventListener("sgds-uncheck",e=>{const{value:t}=e.detail;this._removeValue(t)}),this.addEventListener("sgds-blur",e=>{const t=e.target;this._blurredCheckboxes.add(t),Array.from(this._blurredCheckboxes).length===this._checkboxes.length&&(this._isTouched=!0,this._blurredCheckboxes.clear())})}firstUpdated(e){super.firstUpdated(e),this.value&&this._updateInputValue(),this.invalid&&this._updateInvalid()}_renderHintText(){const e=ee` <div class="form-text" id="${this._controlId}Help">${this.hintText}</div> `;return this.hintText&&e}_addValue(e){const t=this.value?this.value.split(";"):[];t.push(e),this.value=t.join(";")}_removeValue(e){const t=(this.value?this.value.split(";"):[]).filter(t=>t!==e);this.value=t.join(";")}_sanitizeSlot(){this._checkboxes.forEach(e=>{e.checked=e.defaultChecked=this.value.includes(e.value),e.hasFeedback=this.hasFeedback?"style":null,e.required&&(console.error("Checkboxes in a group cannot have required or hasFeedback prop set to true"),e.remove())}),this._disabledChildCheckboxes()}_disabledChildCheckboxes(){if(this.disabled){this._checkboxes.forEach(e=>e.disabled=this.disabled)}}_handleValueChange(){if("reset"===this.formEvent&&this.value===this.defaultValue)return void(this.formEvent=null);this.emit("sgds-change");this._checkboxes.forEach(e=>{e.checked=this.value.includes(e.value)}),this._updateInputValue(),this._updateInvalid()}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity(),this._updateInvalid())}_updateInvalid(){this._checkboxes.forEach(e=>e.invalid=this.invalid)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_mixinResetFormControl(){this.value=this.input.value=this.defaultValue,this._updateInputValue("reset"),this._mixinResetValidity(this.input)}async _updateInputValue(e="change"){this.input.value=this.value,this.input.dispatchEvent(new InputEvent(e)),this.formEvent=e}render(){return ee`
|
|
2657
2657
|
<fieldset>
|
|
2658
2658
|
<div class="label-hint-container">
|
|
2659
2659
|
<label class="form-label">${this.label}</label>
|
|
@@ -2687,7 +2687,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2687
2687
|
</div>
|
|
2688
2688
|
`:ie}
|
|
2689
2689
|
</fieldset>
|
|
2690
|
-
`}}function Oa(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 Ua(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function qa(e,t){const s=Oa(e);return isNaN(t)?Ua(e,NaN):t?(s.setDate(s.getDate()+t),s):s}Na.styles=[...Ea.styles,Ra],e([Ve({reflect:!0})],Na.prototype,"label",void 0),e([Ve({type:String,reflect:!0})],Na.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Na.prototype,"hasFeedback",void 0),e([Ve({reflect:!0})],Na.prototype,"hintText",void 0),e([Ve({type:Boolean,reflect:!0})],Na.prototype,"required",void 0),e([Ve({reflect:!0})],Na.prototype,"value",void 0),e([De()],Na.prototype,"_isTouched",void 0),e([xa()],Na.prototype,"defaultValue",void 0),e([De()],Na.prototype,"_blurredCheckboxes",void 0),e([De()],Na.prototype,"formEvent",void 0),e([Le()],Na.prototype,"_checkboxes",void 0),e([at("value",{waitUntilFirstUpdate:!0})],Na.prototype,"_handleValueChange",null),e([at("_isTouched",{waitUntilFirstUpdate:!0})],Na.prototype,"_handleIsTouched",null),e([at("invalid",{waitUntilFirstUpdate:!0})],Na.prototype,"_updateInvalid",null),rt("sgds-checkbox",Ba),rt("sgds-checkbox-group",Na),rt("sgds-close-button",mt);const Ya=6048e5;let ja={};function Wa(){return ja}function Ka(e,t){const s=Wa(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,a=Oa(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 Ga(e){return Ka(e,{weekStartsOn:1})}function Xa(e){const t=Oa(e),s=t.getFullYear(),i=Ua(e,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const a=Ga(i),o=Ua(e,0);o.setFullYear(s,0,4),o.setHours(0,0,0,0);const n=Ga(o);return t.getTime()>=a.getTime()?s+1:t.getTime()>=n.getTime()?s:s-1}function Qa(e){const t=Oa(e);return t.setHours(0,0,0,0),t}function Ja(e){const t=Oa(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 eo(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=Oa(e);return!isNaN(Number(s))}function to(e){const t=Oa(e);return+function(e){const t=Oa(e);return t.setHours(23,59,59,999),t}(t)===+function(e){const t=Oa(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}(t)}const so={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 io(e){return(t={})=>{const s=t.width?String(t.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const ao={date:io({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:io({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:io({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},oo={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function no(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 ro(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 lo;const co={code:"en-US",formatDistance:(e,t,s)=>{let i;const a=so[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:ao,formatRelative:(e,t,s,i)=>oo[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:no({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:no({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:no({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:no({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:no({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:(lo={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const s=e.match(lo.matchPattern);if(!s)return null;const i=s[0],a=e.match(lo.parsePattern);if(!a)return null;let o=lo.valueCallback?lo.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(i.length)}}),era:ro({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:ro({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:ro({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:ro({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:ro({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 ho(e){const t=Oa(e),s=function(e,t){const s=Qa(e),i=Qa(t),a=+s-Ja(s),o=+i-Ja(i);return Math.round((a-o)/864e5)}(t,function(e){const t=Oa(e),s=Ua(e,0);return s.setFullYear(t.getFullYear(),0,1),s.setHours(0,0,0,0),s}(t));return s+1}function uo(e){const t=Oa(e),s=+Ga(t)-+function(e){const t=Xa(e),s=Ua(e,0);return s.setFullYear(t,0,4),s.setHours(0,0,0,0),Ga(s)}(t);return Math.round(s/Ya)+1}function po(e,t){const s=Oa(e),i=s.getFullYear(),a=Wa(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,n=Ua(e,0);n.setFullYear(i+1,0,o),n.setHours(0,0,0,0);const r=Ka(n,t),l=Ua(e,0);l.setFullYear(i,0,o),l.setHours(0,0,0,0);const d=Ka(l,t);return s.getTime()>=r.getTime()?i+1:s.getTime()>=d.getTime()?i:i-1}function go(e,t){const s=Oa(e),i=+Ka(s,t)-+function(e,t){const s=Wa(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=po(e,t),o=Ua(e,0);return o.setFullYear(a,0,i),o.setHours(0,0,0,0),Ka(o,t)}(s,t);return Math.round(i/Ya)+1}function vo(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const mo={y(e,t){const s=e.getFullYear(),i=s>0?s:1-s;return vo("yy"===t?i%100:i,t.length)},M(e,t){const s=e.getMonth();return"M"===t?String(s+1):vo(s+1,2)},d:(e,t)=>vo(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)=>vo(e.getHours()%12||12,t.length),H:(e,t)=>vo(e.getHours(),t.length),m:(e,t)=>vo(e.getMinutes(),t.length),s:(e,t)=>vo(e.getSeconds(),t.length),S(e,t){const s=t.length,i=e.getMilliseconds();return vo(Math.trunc(i*Math.pow(10,s-3)),t.length)}},fo="midnight",bo="noon",wo="morning",yo="afternoon",xo="evening",ko="night",_o={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 mo.y(e,t)},Y:function(e,t,s,i){const a=po(e,i),o=a>0?a:1-a;if("YY"===t){return vo(o%100,2)}return"Yo"===t?s.ordinalNumber(o,{unit:"year"}):vo(o,t.length)},R:function(e,t){return vo(Xa(e),t.length)},u:function(e,t){return vo(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 vo(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 vo(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 mo.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 vo(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=go(e,i);return"wo"===t?s.ordinalNumber(a,{unit:"week"}):vo(a,t.length)},I:function(e,t,s){const i=uo(e);return"Io"===t?s.ordinalNumber(i,{unit:"week"}):vo(i,t.length)},d:function(e,t,s){return"do"===t?s.ordinalNumber(e.getDate(),{unit:"date"}):mo.d(e,t)},D:function(e,t,s){const i=ho(e);return"Do"===t?s.ordinalNumber(i,{unit:"dayOfYear"}):vo(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 vo(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 vo(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 vo(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?bo:0===i?fo: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?xo:i>=12?yo:i>=4?wo:ko,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 mo.h(e,t)},H:function(e,t,s){return"Ho"===t?s.ordinalNumber(e.getHours(),{unit:"hour"}):mo.H(e,t)},K:function(e,t,s){const i=e.getHours()%12;return"Ko"===t?s.ordinalNumber(i,{unit:"hour"}):vo(i,t.length)},k:function(e,t,s){let i=e.getHours();return 0===i&&(i=24),"ko"===t?s.ordinalNumber(i,{unit:"hour"}):vo(i,t.length)},m:function(e,t,s){return"mo"===t?s.ordinalNumber(e.getMinutes(),{unit:"minute"}):mo.m(e,t)},s:function(e,t,s){return"so"===t?s.ordinalNumber(e.getSeconds(),{unit:"second"}):mo.s(e,t)},S:function(e,t){return mo.S(e,t)},X:function(e,t,s){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Mo(i);case"XXXX":case"XX":return So(i);default:return So(i,":")}},x:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"x":return Mo(i);case"xxxx":case"xx":return So(i);default:return So(i,":")}},O:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Co(i,":");default:return"GMT"+So(i,":")}},z:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Co(i,":");default:return"GMT"+So(i,":")}},t:function(e,t,s){return vo(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,s){return vo(e.getTime(),t.length)}};function Co(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+vo(o,2)}function Mo(e,t){if(e%60==0){return(e>0?"-":"+")+vo(Math.abs(e)/60,2)}return So(e,t)}function So(e,t=""){const s=e>0?"-":"+",i=Math.abs(e);return s+vo(Math.trunc(i/60),2)+t+vo(i%60,2)}const $o=(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"})}},Ao=(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"})}},Vo={p:Ao,P:(e,t)=>{const s=e.match(/(P+)(p+)?/)||[],i=s[1],a=s[2];if(!a)return $o(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}}",$o(i,t)).replace("{{time}}",Ao(a,t))}},Do=/^D+$/,Eo=/^Y+$/,Io=["D","DD","YY","YYYY"];function Zo(e){return Do.test(e)}function Bo(e){return Eo.test(e)}function Lo(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),Io.includes(e))throw new RangeError(i)}const Fo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,To=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Po=/^'([^]*?)'?$/,Ho=/''/g,zo=/[a-zA-Z]/;function Ro(e,t,s){const i=Wa(),a=s?.locale??i.locale??co,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=Oa(e);if(!eo(r))throw new RangeError("Invalid time value");let l=t.match(To).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Vo[t])(e,a.formatLong)}return e}).join("").match(Fo).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:No(e)};if(_o[t])return{isToken:!0,value:e};if(t.match(zo))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&&Bo(o)||!s?.useAdditionalDayOfYearTokens&&Zo(o))&&Lo(o,t,String(e));return(0,_o[o[0]])(r,o,a.localize,d)}).join("")}function No(e){const t=e.match(Po);return t?t[1].replace(Ho,"'"):e}function Oo(e){const t=Oa(e),s=t.getFullYear(),i=t.getMonth(),a=Ua(e,0);return a.setFullYear(s,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Uo(e){const t=Oa(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=Oa(e),i=Oa(t);return s.getTime()>i.getTime()}function Yo(e,t){return+Oa(e)<+Oa(t)}function jo(e,t){return+Oa(e)===+Oa(t)}class Wo{subPriority=0;validate(e,t){return!0}}class Ko extends Wo{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 Go extends Wo{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:Ua(e,function(e,t){const s=t instanceof Date?Ua(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 Xo{run(e,t,s,i){const a=this.parse(e,t,s,i);return a?{setter:new Ko(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,s){return!0}}const Qo=/^(1[0-2]|0?\d)/,Jo=/^(3[0-1]|[0-2]?\d)/,en=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,tn=/^(5[0-3]|[0-4]?\d)/,sn=/^(2[0-3]|[0-1]?\d)/,an=/^(2[0-4]|[0-1]?\d)/,on=/^(1[0-1]|0?\d)/,nn=/^(1[0-2]|0?\d)/,rn=/^[0-5]?\d/,ln=/^[0-5]?\d/,dn=/^\d/,cn=/^\d{1,2}/,hn=/^\d{1,3}/,un=/^\d{1,4}/,pn=/^-?\d+/,gn=/^-?\d/,vn=/^-?\d{1,2}/,mn=/^-?\d{1,3}/,fn=/^-?\d{1,4}/,bn=/^([+-])(\d{2})(\d{2})?|Z/,wn=/^([+-])(\d{2})(\d{2})|Z/,yn=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,xn=/^([+-])(\d{2}):(\d{2})|Z/,kn=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function _n(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Cn(e,t){const s=t.match(e);return s?{value:parseInt(s[0],10),rest:t.slice(s[0].length)}:null}function Mn(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 Sn(e){return Cn(pn,e)}function $n(e,t){switch(e){case 1:return Cn(dn,t);case 2:return Cn(cn,t);case 3:return Cn(hn,t);case 4:return Cn(un,t);default:return Cn(new RegExp("^\\d{1,"+e+"}"),t)}}function An(e,t){switch(e){case 1:return Cn(gn,t);case 2:return Cn(vn,t);case 3:return Cn(mn,t);case 4:return Cn(fn,t);default:return Cn(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Vn(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Dn(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 En(e){return e%400==0||e%4==0&&e%100!=0}const In=[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 Bn(e,t,s){const i=Wa(),a=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=Oa(e),n=o.getDay(),r=7-a;return qa(o,t<0||t>6?t-(n+r)%7:((t%7+7)%7+r)%7-(n+r)%7)}function Ln(e,t){const s=Oa(e),i=function(e){let t=Oa(e).getDay();return 0===t&&(t=7),t}(s);return qa(s,t-i)}const Fn={G:new class extends Xo{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 Xo{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 _n($n(4,e),i);case"yo":return _n(s.ordinalNumber(e,{unit:"year"}),i);default:return _n($n(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=Dn(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 Xo{priority=130;parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return _n($n(4,e),i);case"Yo":return _n(s.ordinalNumber(e,{unit:"year"}),i);default:return _n($n(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s,i){const a=po(e,i);if(s.isTwoDigitYear){const t=Dn(s.year,a);return e.setFullYear(t,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),Ka(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),Ka(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends Xo{priority=130;parse(e,t){return An("R"===t?4:t.length,e)}set(e,t,s){const i=Ua(e,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),Ga(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends Xo{priority=130;parse(e,t){return An("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 Xo{priority=120;parse(e,t,s){switch(t){case"Q":case"QQ":return $n(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 Xo{priority=120;parse(e,t,s){switch(t){case"q":case"qq":return $n(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 Xo{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 _n(Cn(Qo,e),i);case"MM":return _n($n(2,e),i);case"Mo":return _n(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 Xo{priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"L":return _n(Cn(Qo,e),i);case"LL":return _n($n(2,e),i);case"Lo":return _n(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 Xo{priority=100;parse(e,t,s){switch(t){case"w":return Cn(tn,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return $n(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s,i){return Ka(function(e,t,s){const i=Oa(e),a=go(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 Xo{priority=100;parse(e,t,s){switch(t){case"I":return Cn(tn,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return $n(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s){return Ga(function(e,t){const s=Oa(e),i=uo(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 Xo{priority=90;subPriority=1;parse(e,t,s){switch(t){case"d":return Cn(Jo,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return $n(t.length,e)}}validate(e,t){const s=En(e.getFullYear()),i=e.getMonth();return s?t>=1&&t<=Zn[i]:t>=1&&t<=In[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 Xo{priority=90;subpriority=1;parse(e,t,s){switch(t){case"D":case"DD":return Cn(en,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return $n(t.length,e)}}validate(e,t){return En(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 Xo{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=Bn(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends Xo{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 _n($n(t.length,e),a);case"eo":return _n(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=Bn(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 Xo{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 _n($n(t.length,e),a);case"co":return _n(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=Bn(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 Xo{priority=90;parse(e,t,s){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return $n(t.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return _n(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 _n(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return _n(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);default:return _n(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=Ln(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 Xo{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(Vn(s),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends Xo{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(Vn(s),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends Xo{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(Vn(s),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends Xo{priority=70;parse(e,t,s){switch(t){case"h":return Cn(nn,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return $n(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 Xo{priority=70;parse(e,t,s){switch(t){case"H":return Cn(sn,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return $n(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 Xo{priority=70;parse(e,t,s){switch(t){case"K":return Cn(on,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return $n(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 Xo{priority=70;parse(e,t,s){switch(t){case"k":return Cn(an,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return $n(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 Xo{priority=60;parse(e,t,s){switch(t){case"m":return Cn(rn,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return $n(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 Xo{priority=50;parse(e,t,s){switch(t){case"s":return Cn(ln,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return $n(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 Xo{priority=30;parse(e,t){return _n($n(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 Xo{priority=10;parse(e,t){switch(t){case"X":return Mn(bn,e);case"XX":return Mn(wn,e);case"XXXX":return Mn(yn,e);case"XXXXX":return Mn(kn,e);default:return Mn(xn,e)}}set(e,t,s){return t.timestampIsSet?e:Ua(e,e.getTime()-Ja(e)-s)}incompatibleTokens=["t","T","x"]},x:new class extends Xo{priority=10;parse(e,t){switch(t){case"x":return Mn(bn,e);case"xx":return Mn(wn,e);case"xxxx":return Mn(yn,e);case"xxxxx":return Mn(kn,e);default:return Mn(xn,e)}}set(e,t,s){return t.timestampIsSet?e:Ua(e,e.getTime()-Ja(e)-s)}incompatibleTokens=["t","T","X"]},t:new class extends Xo{priority=40;parse(e){return Sn(e)}set(e,t,s){return[Ua(e,1e3*s),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends Xo{priority=20;parse(e){return Sn(e)}set(e,t,s){return[Ua(e,s),{timestampIsSet:!0}]}incompatibleTokens="*"}},Tn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Pn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hn=/^'([^]*?)'?$/,zn=/''/g,Rn=/\S/,Nn=/[a-zA-Z]/;function On(e,t,s,i){const a=Object.assign({},Wa()),o=i?.locale??a.locale??co,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?Oa(s):Ua(s,NaN);const l={firstWeekContainsDate:n,weekStartsOn:r,locale:o},d=[new Go],c=t.match(Pn).map(e=>{const t=e[0];if(t in Vo){return(0,Vo[t])(e,o.formatLong)}return e}).join("").match(Tn),h=[];for(let a of c){!i?.useAdditionalWeekYearTokens&&Bo(a)&&Lo(a,t,e),!i?.useAdditionalDayOfYearTokens&&Zo(a)&&Lo(a,t,e);const n=a[0],r=Fn[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 Ua(s,NaN);d.push(i.setter),e=i.rest}else{if(n.match(Nn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===a?a="'":"'"===n&&(a=Un(a)),0!==e.indexOf(a))return Ua(s,NaN);e=e.slice(a.length)}}if(e.length>0&&Rn.test(e))return Ua(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=Oa(s);if(isNaN(p.getTime()))return Ua(s,NaN);const g={};for(const e of u){if(!e.validate(p,l))return Ua(s,NaN);const t=e.set(p,g,l);Array.isArray(t)?(p=t[0],Object.assign(g,t[1])):p=t}return Ua(s,p)}function Un(e){return e.match(Hn)[1].replace(zn,"'")}const qn={"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"}},Yn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=Oo(a);return to(e)&&o<i?Uo(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=Oo(a);return to(e)&&o<i?Uo(a):new Date(s,t-1,i)},Wn=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var Kn=n`.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 Gn=new Date,Xn={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 Qn extends Pe{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=Wn(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=Wn(new Date(i,s,t+e));(qo(a,new Date(0,0,1,12))||jo(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=Wn(new Date(i,s+e,t));(qo(a,new Date(0,0,1,12))||jo(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=Wn(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){const e=this._getFocusedTarget();return void(3!==this.focusedTabIndex&&e.blur())}if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=Xn[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}_generateIncrementDates(){const e=Wn(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=Wn(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=Wn(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?Wn(new Date(this.minDate)):null,o=this.maxDate?Wn(new Date(this.maxDate)):null,n=Wn(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=>Wn(e)),t=this._generateIncrementDates(),s=this.minDate?Wn(new Date(this.minDate)):null,i=this.maxDate?Wn(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=Qn.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=Gn.getMonth()===this.displayDate.getMonth(),v=Gn.getFullYear()===this.displayDate.getFullYear(),m=Gn.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, ":"")+Ro(n,"PPPP");h.push(ee`<td
|
|
2690
|
+
`}}function Na(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 Ua(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function qa(e,t){const s=Na(e);return isNaN(t)?Ua(e,NaN):t?(s.setDate(s.getDate()+t),s):s}Oa.styles=[...Ea.styles,Ra],e([Ve({reflect:!0})],Oa.prototype,"label",void 0),e([Ve({type:String,reflect:!0})],Oa.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Oa.prototype,"hasFeedback",void 0),e([Ve({reflect:!0})],Oa.prototype,"hintText",void 0),e([Ve({type:Boolean,reflect:!0})],Oa.prototype,"required",void 0),e([Ve({reflect:!0})],Oa.prototype,"value",void 0),e([De()],Oa.prototype,"_isTouched",void 0),e([xa()],Oa.prototype,"defaultValue",void 0),e([De()],Oa.prototype,"_blurredCheckboxes",void 0),e([De()],Oa.prototype,"formEvent",void 0),e([Le()],Oa.prototype,"_checkboxes",void 0),e([at("value",{waitUntilFirstUpdate:!0})],Oa.prototype,"_handleValueChange",null),e([at("_isTouched",{waitUntilFirstUpdate:!0})],Oa.prototype,"_handleIsTouched",null),e([at("invalid",{waitUntilFirstUpdate:!0})],Oa.prototype,"_updateInvalid",null),rt("sgds-checkbox",Ia),rt("sgds-checkbox-group",Oa),rt("sgds-close-button",mt);const Ya=6048e5;let ja={};function Wa(){return ja}function Ka(e,t){const s=Wa(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,a=Na(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 Ga(e){return Ka(e,{weekStartsOn:1})}function Xa(e){const t=Na(e),s=t.getFullYear(),i=Ua(e,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const a=Ga(i),o=Ua(e,0);o.setFullYear(s,0,4),o.setHours(0,0,0,0);const n=Ga(o);return t.getTime()>=a.getTime()?s+1:t.getTime()>=n.getTime()?s:s-1}function Qa(e){const t=Na(e);return t.setHours(0,0,0,0),t}function Ja(e){const t=Na(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 eo(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=Na(e);return!isNaN(Number(s))}function to(e){const t=Na(e);return+function(e){const t=Na(e);return t.setHours(23,59,59,999),t}(t)===+function(e){const t=Na(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}(t)}const so={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 io(e){return(t={})=>{const s=t.width?String(t.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const ao={date:io({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:io({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:io({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},oo={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function no(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 ro(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 lo;const co={code:"en-US",formatDistance:(e,t,s)=>{let i;const a=so[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:ao,formatRelative:(e,t,s,i)=>oo[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:no({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:no({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:no({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:no({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:no({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:(lo={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const s=e.match(lo.matchPattern);if(!s)return null;const i=s[0],a=e.match(lo.parsePattern);if(!a)return null;let o=lo.valueCallback?lo.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(i.length)}}),era:ro({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:ro({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:ro({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:ro({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:ro({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 ho(e){const t=Na(e),s=function(e,t){const s=Qa(e),i=Qa(t),a=+s-Ja(s),o=+i-Ja(i);return Math.round((a-o)/864e5)}(t,function(e){const t=Na(e),s=Ua(e,0);return s.setFullYear(t.getFullYear(),0,1),s.setHours(0,0,0,0),s}(t));return s+1}function uo(e){const t=Na(e),s=+Ga(t)-+function(e){const t=Xa(e),s=Ua(e,0);return s.setFullYear(t,0,4),s.setHours(0,0,0,0),Ga(s)}(t);return Math.round(s/Ya)+1}function po(e,t){const s=Na(e),i=s.getFullYear(),a=Wa(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,n=Ua(e,0);n.setFullYear(i+1,0,o),n.setHours(0,0,0,0);const r=Ka(n,t),l=Ua(e,0);l.setFullYear(i,0,o),l.setHours(0,0,0,0);const d=Ka(l,t);return s.getTime()>=r.getTime()?i+1:s.getTime()>=d.getTime()?i:i-1}function go(e,t){const s=Na(e),i=+Ka(s,t)-+function(e,t){const s=Wa(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=po(e,t),o=Ua(e,0);return o.setFullYear(a,0,i),o.setHours(0,0,0,0),Ka(o,t)}(s,t);return Math.round(i/Ya)+1}function vo(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const mo={y(e,t){const s=e.getFullYear(),i=s>0?s:1-s;return vo("yy"===t?i%100:i,t.length)},M(e,t){const s=e.getMonth();return"M"===t?String(s+1):vo(s+1,2)},d:(e,t)=>vo(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)=>vo(e.getHours()%12||12,t.length),H:(e,t)=>vo(e.getHours(),t.length),m:(e,t)=>vo(e.getMinutes(),t.length),s:(e,t)=>vo(e.getSeconds(),t.length),S(e,t){const s=t.length,i=e.getMilliseconds();return vo(Math.trunc(i*Math.pow(10,s-3)),t.length)}},fo="midnight",bo="noon",wo="morning",yo="afternoon",xo="evening",ko="night",_o={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 mo.y(e,t)},Y:function(e,t,s,i){const a=po(e,i),o=a>0?a:1-a;if("YY"===t){return vo(o%100,2)}return"Yo"===t?s.ordinalNumber(o,{unit:"year"}):vo(o,t.length)},R:function(e,t){return vo(Xa(e),t.length)},u:function(e,t){return vo(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 vo(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 vo(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 mo.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 vo(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=go(e,i);return"wo"===t?s.ordinalNumber(a,{unit:"week"}):vo(a,t.length)},I:function(e,t,s){const i=uo(e);return"Io"===t?s.ordinalNumber(i,{unit:"week"}):vo(i,t.length)},d:function(e,t,s){return"do"===t?s.ordinalNumber(e.getDate(),{unit:"date"}):mo.d(e,t)},D:function(e,t,s){const i=ho(e);return"Do"===t?s.ordinalNumber(i,{unit:"dayOfYear"}):vo(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 vo(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 vo(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 vo(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?bo:0===i?fo: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?xo:i>=12?yo:i>=4?wo:ko,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 mo.h(e,t)},H:function(e,t,s){return"Ho"===t?s.ordinalNumber(e.getHours(),{unit:"hour"}):mo.H(e,t)},K:function(e,t,s){const i=e.getHours()%12;return"Ko"===t?s.ordinalNumber(i,{unit:"hour"}):vo(i,t.length)},k:function(e,t,s){let i=e.getHours();return 0===i&&(i=24),"ko"===t?s.ordinalNumber(i,{unit:"hour"}):vo(i,t.length)},m:function(e,t,s){return"mo"===t?s.ordinalNumber(e.getMinutes(),{unit:"minute"}):mo.m(e,t)},s:function(e,t,s){return"so"===t?s.ordinalNumber(e.getSeconds(),{unit:"second"}):mo.s(e,t)},S:function(e,t){return mo.S(e,t)},X:function(e,t,s){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Mo(i);case"XXXX":case"XX":return So(i);default:return So(i,":")}},x:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"x":return Mo(i);case"xxxx":case"xx":return So(i);default:return So(i,":")}},O:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Co(i,":");default:return"GMT"+So(i,":")}},z:function(e,t,s){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Co(i,":");default:return"GMT"+So(i,":")}},t:function(e,t,s){return vo(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,s){return vo(e.getTime(),t.length)}};function Co(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+vo(o,2)}function Mo(e,t){if(e%60==0){return(e>0?"-":"+")+vo(Math.abs(e)/60,2)}return So(e,t)}function So(e,t=""){const s=e>0?"-":"+",i=Math.abs(e);return s+vo(Math.trunc(i/60),2)+t+vo(i%60,2)}const $o=(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"})}},Ao=(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"})}},Vo={p:Ao,P:(e,t)=>{const s=e.match(/(P+)(p+)?/)||[],i=s[1],a=s[2];if(!a)return $o(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}}",$o(i,t)).replace("{{time}}",Ao(a,t))}},Do=/^D+$/,Eo=/^Y+$/,Zo=["D","DD","YY","YYYY"];function Bo(e){return Do.test(e)}function Io(e){return Eo.test(e)}function Lo(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),Zo.includes(e))throw new RangeError(i)}const Fo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,To=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Po=/^'([^]*?)'?$/,Ho=/''/g,zo=/[a-zA-Z]/;function Ro(e,t,s){const i=Wa(),a=s?.locale??i.locale??co,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=Na(e);if(!eo(r))throw new RangeError("Invalid time value");let l=t.match(To).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Vo[t])(e,a.formatLong)}return e}).join("").match(Fo).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Oo(e)};if(_o[t])return{isToken:!0,value:e};if(t.match(zo))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&&Io(o)||!s?.useAdditionalDayOfYearTokens&&Bo(o))&&Lo(o,t,String(e));return(0,_o[o[0]])(r,o,a.localize,d)}).join("")}function Oo(e){const t=e.match(Po);return t?t[1].replace(Ho,"'"):e}function No(e){const t=Na(e),s=t.getFullYear(),i=t.getMonth(),a=Ua(e,0);return a.setFullYear(s,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Uo(e){const t=Na(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=Na(e),i=Na(t);return s.getTime()>i.getTime()}function Yo(e,t){return+Na(e)<+Na(t)}function jo(e,t){return+Na(e)===+Na(t)}class Wo{subPriority=0;validate(e,t){return!0}}class Ko extends Wo{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 Go extends Wo{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:Ua(e,function(e,t){const s=t instanceof Date?Ua(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 Xo{run(e,t,s,i){const a=this.parse(e,t,s,i);return a?{setter:new Ko(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,s){return!0}}const Qo=/^(1[0-2]|0?\d)/,Jo=/^(3[0-1]|[0-2]?\d)/,en=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,tn=/^(5[0-3]|[0-4]?\d)/,sn=/^(2[0-3]|[0-1]?\d)/,an=/^(2[0-4]|[0-1]?\d)/,on=/^(1[0-1]|0?\d)/,nn=/^(1[0-2]|0?\d)/,rn=/^[0-5]?\d/,ln=/^[0-5]?\d/,dn=/^\d/,cn=/^\d{1,2}/,hn=/^\d{1,3}/,un=/^\d{1,4}/,pn=/^-?\d+/,gn=/^-?\d/,vn=/^-?\d{1,2}/,mn=/^-?\d{1,3}/,fn=/^-?\d{1,4}/,bn=/^([+-])(\d{2})(\d{2})?|Z/,wn=/^([+-])(\d{2})(\d{2})|Z/,yn=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,xn=/^([+-])(\d{2}):(\d{2})|Z/,kn=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function _n(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Cn(e,t){const s=t.match(e);return s?{value:parseInt(s[0],10),rest:t.slice(s[0].length)}:null}function Mn(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 Sn(e){return Cn(pn,e)}function $n(e,t){switch(e){case 1:return Cn(dn,t);case 2:return Cn(cn,t);case 3:return Cn(hn,t);case 4:return Cn(un,t);default:return Cn(new RegExp("^\\d{1,"+e+"}"),t)}}function An(e,t){switch(e){case 1:return Cn(gn,t);case 2:return Cn(vn,t);case 3:return Cn(mn,t);case 4:return Cn(fn,t);default:return Cn(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Vn(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Dn(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 En(e){return e%400==0||e%4==0&&e%100!=0}const Zn=[31,28,31,30,31,30,31,31,30,31,30,31],Bn=[31,29,31,30,31,30,31,31,30,31,30,31];function In(e,t,s){const i=Wa(),a=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=Na(e),n=o.getDay(),r=7-a;return qa(o,t<0||t>6?t-(n+r)%7:((t%7+7)%7+r)%7-(n+r)%7)}function Ln(e,t){const s=Na(e),i=function(e){let t=Na(e).getDay();return 0===t&&(t=7),t}(s);return qa(s,t-i)}const Fn={G:new class extends Xo{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 Xo{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 _n($n(4,e),i);case"yo":return _n(s.ordinalNumber(e,{unit:"year"}),i);default:return _n($n(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=Dn(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 Xo{priority=130;parse(e,t,s){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return _n($n(4,e),i);case"Yo":return _n(s.ordinalNumber(e,{unit:"year"}),i);default:return _n($n(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,s,i){const a=po(e,i);if(s.isTwoDigitYear){const t=Dn(s.year,a);return e.setFullYear(t,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),Ka(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),Ka(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends Xo{priority=130;parse(e,t){return An("R"===t?4:t.length,e)}set(e,t,s){const i=Ua(e,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),Ga(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends Xo{priority=130;parse(e,t){return An("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 Xo{priority=120;parse(e,t,s){switch(t){case"Q":case"QQ":return $n(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 Xo{priority=120;parse(e,t,s){switch(t){case"q":case"qq":return $n(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 Xo{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 _n(Cn(Qo,e),i);case"MM":return _n($n(2,e),i);case"Mo":return _n(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 Xo{priority=110;parse(e,t,s){const i=e=>e-1;switch(t){case"L":return _n(Cn(Qo,e),i);case"LL":return _n($n(2,e),i);case"Lo":return _n(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 Xo{priority=100;parse(e,t,s){switch(t){case"w":return Cn(tn,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return $n(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s,i){return Ka(function(e,t,s){const i=Na(e),a=go(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 Xo{priority=100;parse(e,t,s){switch(t){case"I":return Cn(tn,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return $n(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,s){return Ga(function(e,t){const s=Na(e),i=uo(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 Xo{priority=90;subPriority=1;parse(e,t,s){switch(t){case"d":return Cn(Jo,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return $n(t.length,e)}}validate(e,t){const s=En(e.getFullYear()),i=e.getMonth();return s?t>=1&&t<=Bn[i]:t>=1&&t<=Zn[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 Xo{priority=90;subpriority=1;parse(e,t,s){switch(t){case"D":case"DD":return Cn(en,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return $n(t.length,e)}}validate(e,t){return En(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 Xo{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=In(e,s,i)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends Xo{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 _n($n(t.length,e),a);case"eo":return _n(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=In(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 Xo{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 _n($n(t.length,e),a);case"co":return _n(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=In(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 Xo{priority=90;parse(e,t,s){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return $n(t.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return _n(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 _n(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return _n(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);default:return _n(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=Ln(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 Xo{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(Vn(s),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends Xo{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(Vn(s),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends Xo{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(Vn(s),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends Xo{priority=70;parse(e,t,s){switch(t){case"h":return Cn(nn,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return $n(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 Xo{priority=70;parse(e,t,s){switch(t){case"H":return Cn(sn,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return $n(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 Xo{priority=70;parse(e,t,s){switch(t){case"K":return Cn(on,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return $n(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 Xo{priority=70;parse(e,t,s){switch(t){case"k":return Cn(an,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return $n(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 Xo{priority=60;parse(e,t,s){switch(t){case"m":return Cn(rn,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return $n(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 Xo{priority=50;parse(e,t,s){switch(t){case"s":return Cn(ln,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return $n(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 Xo{priority=30;parse(e,t){return _n($n(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 Xo{priority=10;parse(e,t){switch(t){case"X":return Mn(bn,e);case"XX":return Mn(wn,e);case"XXXX":return Mn(yn,e);case"XXXXX":return Mn(kn,e);default:return Mn(xn,e)}}set(e,t,s){return t.timestampIsSet?e:Ua(e,e.getTime()-Ja(e)-s)}incompatibleTokens=["t","T","x"]},x:new class extends Xo{priority=10;parse(e,t){switch(t){case"x":return Mn(bn,e);case"xx":return Mn(wn,e);case"xxxx":return Mn(yn,e);case"xxxxx":return Mn(kn,e);default:return Mn(xn,e)}}set(e,t,s){return t.timestampIsSet?e:Ua(e,e.getTime()-Ja(e)-s)}incompatibleTokens=["t","T","X"]},t:new class extends Xo{priority=40;parse(e){return Sn(e)}set(e,t,s){return[Ua(e,1e3*s),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends Xo{priority=20;parse(e){return Sn(e)}set(e,t,s){return[Ua(e,s),{timestampIsSet:!0}]}incompatibleTokens="*"}},Tn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Pn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hn=/^'([^]*?)'?$/,zn=/''/g,Rn=/\S/,On=/[a-zA-Z]/;function Nn(e,t,s,i){const a=Object.assign({},Wa()),o=i?.locale??a.locale??co,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?Na(s):Ua(s,NaN);const l={firstWeekContainsDate:n,weekStartsOn:r,locale:o},d=[new Go],c=t.match(Pn).map(e=>{const t=e[0];if(t in Vo){return(0,Vo[t])(e,o.formatLong)}return e}).join("").match(Tn),h=[];for(let a of c){!i?.useAdditionalWeekYearTokens&&Io(a)&&Lo(a,t,e),!i?.useAdditionalDayOfYearTokens&&Bo(a)&&Lo(a,t,e);const n=a[0],r=Fn[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 Ua(s,NaN);d.push(i.setter),e=i.rest}else{if(n.match(On))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===a?a="'":"'"===n&&(a=Un(a)),0!==e.indexOf(a))return Ua(s,NaN);e=e.slice(a.length)}}if(e.length>0&&Rn.test(e))return Ua(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=Na(s);if(isNaN(p.getTime()))return Ua(s,NaN);const g={};for(const e of u){if(!e.validate(p,l))return Ua(s,NaN);const t=e.set(p,g,l);Array.isArray(t)?(p=t[0],Object.assign(g,t[1])):p=t}return Ua(s,p)}function Un(e){return e.match(Hn)[1].replace(zn,"'")}const qn={"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"}},Yn=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=No(a);return to(e)&&o<i?Uo(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=No(a);return to(e)&&o<i?Uo(a):new Date(s,t-1,i)},Wn=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var Kn=n`.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 Gn=new Date,Xn={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 Qn extends Pe{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=Wn(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=Wn(new Date(i,s,t+e));(qo(a,new Date(0,0,1,12))||jo(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=Wn(new Date(i,s+e,t));(qo(a,new Date(0,0,1,12))||jo(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=Wn(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){const e=this._getFocusedTarget();return void(3!==this.focusedTabIndex&&e.blur())}if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=Xn[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}_generateIncrementDates(){const e=Wn(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=Wn(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=Wn(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?Wn(new Date(this.minDate)):null,o=this.maxDate?Wn(new Date(this.maxDate)):null,n=Wn(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=>Wn(e)),t=this._generateIncrementDates(),s=this.minDate?Wn(new Date(this.minDate)):null,i=this.maxDate?Wn(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=Qn.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=Gn.getMonth()===this.displayDate.getMonth(),v=Gn.getFullYear()===this.displayDate.getFullYear(),m=Gn.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, ":"")+Ro(n,"PPPP");h.push(ee`<td
|
|
2691
2691
|
key=${l}
|
|
2692
2692
|
data-date=${r}
|
|
2693
2693
|
data-day=${d}
|
|
@@ -2771,7 +2771,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2771
2771
|
size=${Tt(this._assignIconSize(this.size))}
|
|
2772
2772
|
></sgds-icon>`}
|
|
2773
2773
|
</${t}>
|
|
2774
|
-
`}}er.styles=[...aa.styles,Jn],er.dependencies={"sgds-icon":
|
|
2774
|
+
`}}er.styles=[...aa.styles,Jn],er.dependencies={"sgds-icon":It,"sgds-spinner":Ha},e([Ve({type:String,reflect:!0})],er.prototype,"name",void 0);var tr=n`.datepicker-header{display:flex;gap:var(--sgds-form-gap-md)}sgds-button{--btn-font-weight:var(--sgds-font-weight-semibold)}`;class sr extends Pe{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`${ir[e.getMonth()]} ${e.getFullYear()}`}_renderHeaderTemplate(){return ee`${this.renderHeader()}`}handleClickPrevious(){const{view:e,displayDate:t,focusedDate:s}=this;let i=new Date(t);"months"===e?i.setFullYear(i.getFullYear()-1):"years"===this.view?i.setFullYear(i.getFullYear()-12):i=s.getDate()!==t.getDate()?jn(s):jn(i),this.displayDate=i,this.emit("sgds-change-calendar",{detail:this.displayDate})}_handleClickNext(){const{view:e,displayDate:t,focusedDate:s}=this;let i=new Date(t);"months"===e?i.setFullYear(i.getFullYear()+1):"years"===this.view?i.setFullYear(i.getFullYear()+12):i=s.getDate()!==t.getDate()?Yn(s):Yn(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:jo(s,new Date(0,0,1))||Yo(s,new Date(0,0,1))}_ariaLabelForNextBtn(){return{days:"Show next month",months:"Show next year",years:"Show next 12 years"}[this.view]}_ariaLabelForPrevBtn(){return{days:"Show previous month",months:"Show previous year",years:"Show previous 12 years"}[this.view]}_ariaLabelForHeaderBtn(){const e={days:`Current view is days, click to show months in ${this.displayDate.getFullYear()}`,months:`Current view is months, click to show years between ${this.renderHeader(this.displayDate,"years")}`,years:"Current view is years"};return`${this.renderHeader()}. ${e[this.view]}`}render(){return ee`
|
|
2775
2775
|
<div class="datepicker-header dropdown-header" role="heading">
|
|
2776
2776
|
<sgds-icon-button
|
|
2777
2777
|
name="arrow-left"
|
|
@@ -2802,7 +2802,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2802
2802
|
>
|
|
2803
2803
|
</sgds-icon-button>
|
|
2804
2804
|
</div>
|
|
2805
|
-
`}}sr.styles=[tr],sr.dependencies={"sgds-icon":Bt,"sgds-icon-button":er,"sgds-button":ra},e([Ve({attribute:!1})],sr.prototype,"displayDate",void 0),e([Ve({attribute:!1})],sr.prototype,"focusedDate",void 0),e([Ve({attribute:!1})],sr.prototype,"selectedDate",void 0),e([Ve()],sr.prototype,"view",void 0),e([Ve()],sr.prototype,"focusedTabIndex",void 0),e([at("focusedTabIndex",{waitUntilFirstUpdate:!0})],sr.prototype,"_handleFocusedTabIndexChange",null);const ir=["January","February","March","April","May","June","July","August","September","October","November","December"];function ar(e){return"string"==typeof e||e instanceof String}function or(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function nr(e,t){return Array.isArray(t)?nr(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 rr="NONE",lr="LEFT",dr="FORCE_LEFT",cr="RIGHT",hr="FORCE_RIGHT";function ur(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function pr(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(!pr(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(!pr(e[r[a]],t[r[a]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class gr{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?rr:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?lr:cr}}function vr(e,t){return new vr.InputMask(e,t)}function mr(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?vr.MaskedRegExp:ar(e)?vr.MaskedPattern:e===Date?vr.MaskedDate:e===Number?vr.MaskedNumber:Array.isArray(e)||e===Array?vr.MaskedDynamic:vr.Masked&&e.prototype instanceof vr.Masked?e:vr.Masked&&e instanceof vr.Masked?e.constructor:e instanceof Function?vr.MaskedFunction:(console.warn("Mask not found for mask",e),vr.Masked)}function fr(e){if(!e)throw new Error("Options in not defined");if(vr.Masked){if(e.prototype instanceof vr.Masked)return{mask:e};const{mask:t,...s}=e instanceof vr.Masked?{mask:e}:or(e)&&e.mask instanceof vr.Masked?e:{};if(t){const e=t.mask;return{...nr(t,(e,t)=>!t.startsWith("_")),mask:t.constructor,_mask:e,...s}}}return or(e)?{...e}:{mask:e}}function br(e){if(vr.Masked&&e instanceof vr.Masked)return e;const t=fr(e),s=mr(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)}vr.createMask=br;class wr{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}}vr.MaskElement=wr;class yr extends wr{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={}}}vr.HTMLMaskElement=yr;class xr extends yr{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}}vr.HTMLMaskElement=yr;class kr extends yr{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}}vr.HTMLContenteditableMaskElement=kr;class _r{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>_r.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}}_r.MAX_LENGTH=100;vr.InputMask=class{constructor(e,t){this.el=e instanceof wr?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new kr(e):new xr(e),this.masked=br(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new _r,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 vr.Masked)&&this.masked.constructor===mr(e))return void this.masked.updateOptions({mask:e});const t=e instanceof vr.Masked?e:br({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,lr))}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 gr({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:rr;let o=this.masked.nearestInputPos(t.startChangePos+i,a);a!==rr&&(o=this.masked.nearestInputPos(o,rr)),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 Cr{static normalize(e){return Array.isArray(e)?e:[e,new Cr]}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}}vr.ChangeDetails=Cr;class Mr{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 Sr{constructor(e){this._value="",this._update({...Sr.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 Mr(this.extractInput(e,t),e)}appendTail(e){return ar(e)&&(e=new Mr(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new Cr({inserted:e,rawInserted:e})):new Cr}_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 Cr,this.state=i,s&&e&&(s.state=e))}return a}_appendPlaceholder(){return new Cr}_appendEager(){return new Cr}append(e,t,s){if(!ar(e))throw new Error("value should be string");const i=ar(s)?new Mr(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 Cr}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={}),Cr.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),Cr.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=rr),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 lr:return dr;case cr:return hr;default:return e}}(i),l=this.extractInput(0,o,{raw:!0}));let d=e;const c=new Cr;if(i!==rr&&(d=this.nearestInputPos(e,t>1&&0!==e&&!r?rr:i),c.tailShift=d-e),c.aggregate(this.remove(d)),r&&i!==rr&&l===this.rawInputValue)if(i===dr){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new Cr({tailShift:-1})).aggregate(this.remove(e-1))}else i===hr&&n.unshift();return c.aggregate(this.append(s,a,n))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!pr(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Sr.EMPTY_VALUES.includes(e)&&Sr.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new Cr}}Sr.DEFAULTS={skipInvalid:!0},Sr.EMPTY_VALUES=[void 0,null,""],vr.Masked=Sr;class $r{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=ar(e)?new Mr(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 Mr)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof $r){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 vr.MaskedPattern)){return new Mr(this.toString()).appendTo(e)}const t=new Cr;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 $r||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),n=i instanceof $r&&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 $r:new Mr;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 Ar{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,dr),0!==this.offset||void 0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,lr),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,lr),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,hr),this.offset!==this.block.value.length||void 0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,rr),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,rr),!0})}}class Vr{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 Cr}nearestInputPos(e,t){void 0===t&&(t=rr);const s=this._value.length;switch(t){case lr:case dr: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 Cr;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 Cr({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 Cr;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Mr("")}appendTail(e){return ar(e)&&(e=new Mr(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 Dr{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:o,eager:n,...r}=e;this.masked=br(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 Cr}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 Cr;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&!1===this.doValidate(t)&&(i=new Cr,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 Cr:(this.isFilled=!0,new Cr({inserted:this.placeholderChar}))}_appendEager(){return new Cr}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=rr);const s=this.value.length,i=Math.min(Math.max(e,0),s);switch(t){case lr:case dr:return this.isComplete?i:0;case cr:case hr: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 Cr}}Dr.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]/,"*":/./};vr.MaskedRegExp=class extends Sr{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class Er extends Sr{constructor(e){super({...Er.DEFAULTS,...e,definitions:Object.assign({},Dr.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}=fr(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 vr.RepeatBlock(o):br(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===Er.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){s=!s;continue}if("["===o||"]"===o){i=!i;continue}if(o===Er.ESCAPE_CHAR){if(++a,o=t[a],!o)break;n=!1}const r=n?new Dr({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...fr(e[o]),parent:this}):new Vr({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 Cr;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 Cr;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 $r;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 $r&&(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 Cr;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=rr),!this._blocks.length)return 0;const s=new Ar(this,e);if(t===rr)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(t===lr||t===dr){if(t===lr){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===lr){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===dr?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return t===cr||t===hr?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===hr?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(e,lr)))):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 Cr;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}Er.DEFAULTS={...Sr.DEFAULTS,lazy:!0,placeholderChar:"_"},Er.STOP_CHAR="`",Er.ESCAPE_CHAR="\\",Er.InputDefinition=Dr,Er.FixedDefinition=Vr,vr.MaskedPattern=Er;class Ir extends Er{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 Cr;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}}vr.MaskedRange=Ir;class Zr extends Er{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:ar(t)?t:s}}constructor(e){super(Zr.extractPatternOptions({...Zr.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...Zr.DEFAULTS,...e},o=Object.assign({},Zr.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:ar(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(Zr.extractPatternOptions(e))}}Zr.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ir,from:1,to:31,maxLength:2},m:{mask:Ir,from:1,to:12,maxLength:2},Y:{mask:Ir,from:1900,to:9999}}),Zr.DEFAULTS={...Er.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)}},vr.MaskedDate=Zr;class Br extends Sr{constructor(e){super({...Br.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}=fr(e),i=br({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 Cr,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 Cr;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 Cr;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 pr(t,a)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}Br.DEFAULTS={...Sr.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,dr);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,dr)))}});return o.sort((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),t.compiledMasks[o[0].index]}},vr.MaskedDynamic=Br;class Lr extends Er{constructor(e){super({...Lr.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,hr),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 Cr({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new Mr("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new Cr;const s=Math.min(super.nearestInputPos(0,hr),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}}Lr.DEFAULTS={...Er.DEFAULTS,matchValue:(e,t,s)=>e.indexOf(t,s)===s},vr.MaskedEnum=Lr;var Fr;vr.MaskedFunction=class extends Sr{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class Tr extends Sr{constructor(e){super({...Tr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+ur(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ur).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ur(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(Tr.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):r=!1),r&&(r=Boolean(this._value.match(this._numberRegExp)))}r?n=new Cr({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,n=new Cr),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 Cr({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case rr:case lr:case dr:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===dr)return s}break}case cr:case hr:{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===Tr.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,Tr.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(Tr.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)||Tr.EMPTY_VALUES.includes(e)&&Tr.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}Fr=Tr,Tr.UNMASKED_RADIX=".",Tr.EMPTY_VALUES=[...Sr.EMPTY_VALUES,0],Tr.DEFAULTS={...Sr.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Fr.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})},vr.MaskedNumber=Tr;const Pr={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Hr(e,t,s){void 0===t&&(t=Pr.MASKED),void 0===s&&(s=Pr.MASKED);const i=br(e);return e=>i.runIsolated(i=>(i[t]=e,i[s]))}vr.PIPE_TYPE=Pr,vr.createPipe=Hr,vr.pipe=function(e,t,s,i){return Hr(t,s,i)(e)};vr.RepeatBlock=class extends Er{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}=fr(e);this._blockOpts=Object.assign({},this._blockOpts,o);const n=br(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(br(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const s=new Cr;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=vr}catch{}var zr=n`: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 Rr extends(_a(Ea)){constructor(){super(...arguments),this.type="text",this.placeholder="placeholder",this.autofocus=!1,this.readonly=!1,this.defaultValue="",this.valid=!1,this.loading=!1,this.required=!1,this.noValidate=!1,this.value="",this._isTouched=!1,this._showPassword=!1}focus(e){this.input.focus(e)}blur(){this.input.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}setValidity(e,t,s){return this._mixinSetValidity(e,t,s)}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleClick(){this.focus()}_handleChange(e){this.value=this.input.value;this.emit("sgds-change",{cancelable:!0}).defaultPrevented||super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value;this.emit("sgds-input",{cancelable:!0}).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 pt`
|
|
2805
|
+
`}}sr.styles=[tr],sr.dependencies={"sgds-icon":It,"sgds-icon-button":er,"sgds-button":ra},e([Ve({attribute:!1})],sr.prototype,"displayDate",void 0),e([Ve({attribute:!1})],sr.prototype,"focusedDate",void 0),e([Ve({attribute:!1})],sr.prototype,"selectedDate",void 0),e([Ve()],sr.prototype,"view",void 0),e([Ve()],sr.prototype,"focusedTabIndex",void 0),e([at("focusedTabIndex",{waitUntilFirstUpdate:!0})],sr.prototype,"_handleFocusedTabIndexChange",null);const ir=["January","February","March","April","May","June","July","August","September","October","November","December"];function ar(e){return"string"==typeof e||e instanceof String}function or(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function nr(e,t){return Array.isArray(t)?nr(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 rr="NONE",lr="LEFT",dr="FORCE_LEFT",cr="RIGHT",hr="FORCE_RIGHT";function ur(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function pr(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(!pr(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(!pr(e[r[a]],t[r[a]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class gr{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?rr:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?lr:cr}}function vr(e,t){return new vr.InputMask(e,t)}function mr(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?vr.MaskedRegExp:ar(e)?vr.MaskedPattern:e===Date?vr.MaskedDate:e===Number?vr.MaskedNumber:Array.isArray(e)||e===Array?vr.MaskedDynamic:vr.Masked&&e.prototype instanceof vr.Masked?e:vr.Masked&&e instanceof vr.Masked?e.constructor:e instanceof Function?vr.MaskedFunction:(console.warn("Mask not found for mask",e),vr.Masked)}function fr(e){if(!e)throw new Error("Options in not defined");if(vr.Masked){if(e.prototype instanceof vr.Masked)return{mask:e};const{mask:t,...s}=e instanceof vr.Masked?{mask:e}:or(e)&&e.mask instanceof vr.Masked?e:{};if(t){const e=t.mask;return{...nr(t,(e,t)=>!t.startsWith("_")),mask:t.constructor,_mask:e,...s}}}return or(e)?{...e}:{mask:e}}function br(e){if(vr.Masked&&e instanceof vr.Masked)return e;const t=fr(e),s=mr(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)}vr.createMask=br;class wr{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}}vr.MaskElement=wr;class yr extends wr{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={}}}vr.HTMLMaskElement=yr;class xr extends yr{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}}vr.HTMLMaskElement=yr;class kr extends yr{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}}vr.HTMLContenteditableMaskElement=kr;class _r{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>_r.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}}_r.MAX_LENGTH=100;vr.InputMask=class{constructor(e,t){this.el=e instanceof wr?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new kr(e):new xr(e),this.masked=br(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new _r,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 vr.Masked)&&this.masked.constructor===mr(e))return void this.masked.updateOptions({mask:e});const t=e instanceof vr.Masked?e:br({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,lr))}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 gr({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:rr;let o=this.masked.nearestInputPos(t.startChangePos+i,a);a!==rr&&(o=this.masked.nearestInputPos(o,rr)),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 Cr{static normalize(e){return Array.isArray(e)?e:[e,new Cr]}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}}vr.ChangeDetails=Cr;class Mr{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 Sr{constructor(e){this._value="",this._update({...Sr.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 Mr(this.extractInput(e,t),e)}appendTail(e){return ar(e)&&(e=new Mr(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new Cr({inserted:e,rawInserted:e})):new Cr}_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 Cr,this.state=i,s&&e&&(s.state=e))}return a}_appendPlaceholder(){return new Cr}_appendEager(){return new Cr}append(e,t,s){if(!ar(e))throw new Error("value should be string");const i=ar(s)?new Mr(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 Cr}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={}),Cr.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),Cr.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=rr),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 lr:return dr;case cr:return hr;default:return e}}(i),l=this.extractInput(0,o,{raw:!0}));let d=e;const c=new Cr;if(i!==rr&&(d=this.nearestInputPos(e,t>1&&0!==e&&!r?rr:i),c.tailShift=d-e),c.aggregate(this.remove(d)),r&&i!==rr&&l===this.rawInputValue)if(i===dr){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new Cr({tailShift:-1})).aggregate(this.remove(e-1))}else i===hr&&n.unshift();return c.aggregate(this.append(s,a,n))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!pr(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Sr.EMPTY_VALUES.includes(e)&&Sr.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new Cr}}Sr.DEFAULTS={skipInvalid:!0},Sr.EMPTY_VALUES=[void 0,null,""],vr.Masked=Sr;class $r{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=ar(e)?new Mr(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 Mr)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof $r){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 vr.MaskedPattern)){return new Mr(this.toString()).appendTo(e)}const t=new Cr;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 $r||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),n=i instanceof $r&&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 $r:new Mr;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 Ar{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,dr),0!==this.offset||void 0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,lr),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,lr),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,hr),this.offset!==this.block.value.length||void 0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,rr),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,rr),!0})}}class Vr{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 Cr}nearestInputPos(e,t){void 0===t&&(t=rr);const s=this._value.length;switch(t){case lr:case dr: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 Cr;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 Cr({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 Cr;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Mr("")}appendTail(e){return ar(e)&&(e=new Mr(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 Dr{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:o,eager:n,...r}=e;this.masked=br(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 Cr}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 Cr;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&!1===this.doValidate(t)&&(i=new Cr,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 Cr:(this.isFilled=!0,new Cr({inserted:this.placeholderChar}))}_appendEager(){return new Cr}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=rr);const s=this.value.length,i=Math.min(Math.max(e,0),s);switch(t){case lr:case dr:return this.isComplete?i:0;case cr:case hr: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 Cr}}Dr.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]/,"*":/./};vr.MaskedRegExp=class extends Sr{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class Er extends Sr{constructor(e){super({...Er.DEFAULTS,...e,definitions:Object.assign({},Dr.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}=fr(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 vr.RepeatBlock(o):br(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===Er.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){s=!s;continue}if("["===o||"]"===o){i=!i;continue}if(o===Er.ESCAPE_CHAR){if(++a,o=t[a],!o)break;n=!1}const r=n?new Dr({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...fr(e[o]),parent:this}):new Vr({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 Cr;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 Cr;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 $r;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 $r&&(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 Cr;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=rr),!this._blocks.length)return 0;const s=new Ar(this,e);if(t===rr)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(t===lr||t===dr){if(t===lr){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===lr){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===dr?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return t===cr||t===hr?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===hr?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(e,lr)))):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 Cr;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}Er.DEFAULTS={...Sr.DEFAULTS,lazy:!0,placeholderChar:"_"},Er.STOP_CHAR="`",Er.ESCAPE_CHAR="\\",Er.InputDefinition=Dr,Er.FixedDefinition=Vr,vr.MaskedPattern=Er;class Zr extends Er{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 Cr;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}}vr.MaskedRange=Zr;class Br extends Er{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:ar(t)?t:s}}constructor(e){super(Br.extractPatternOptions({...Br.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...Br.DEFAULTS,...e},o=Object.assign({},Br.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:ar(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(Br.extractPatternOptions(e))}}Br.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}}),Br.DEFAULTS={...Er.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)}},vr.MaskedDate=Br;class Ir extends Sr{constructor(e){super({...Ir.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}=fr(e),i=br({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 Cr,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 Cr;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 Cr;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 pr(t,a)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}Ir.DEFAULTS={...Sr.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,dr);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,dr)))}});return o.sort((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),t.compiledMasks[o[0].index]}},vr.MaskedDynamic=Ir;class Lr extends Er{constructor(e){super({...Lr.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,hr),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 Cr({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new Mr("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new Cr;const s=Math.min(super.nearestInputPos(0,hr),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}}Lr.DEFAULTS={...Er.DEFAULTS,matchValue:(e,t,s)=>e.indexOf(t,s)===s},vr.MaskedEnum=Lr;var Fr;vr.MaskedFunction=class extends Sr{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class Tr extends Sr{constructor(e){super({...Tr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+ur(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ur).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ur(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(Tr.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):r=!1),r&&(r=Boolean(this._value.match(this._numberRegExp)))}r?n=new Cr({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,n=new Cr),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 Cr({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case rr:case lr:case dr:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===dr)return s}break}case cr:case hr:{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===Tr.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,Tr.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(Tr.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)||Tr.EMPTY_VALUES.includes(e)&&Tr.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}Fr=Tr,Tr.UNMASKED_RADIX=".",Tr.EMPTY_VALUES=[...Sr.EMPTY_VALUES,0],Tr.DEFAULTS={...Sr.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Fr.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})},vr.MaskedNumber=Tr;const Pr={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Hr(e,t,s){void 0===t&&(t=Pr.MASKED),void 0===s&&(s=Pr.MASKED);const i=br(e);return e=>i.runIsolated(i=>(i[t]=e,i[s]))}vr.PIPE_TYPE=Pr,vr.createPipe=Hr,vr.pipe=function(e,t,s,i){return Hr(t,s,i)(e)};vr.RepeatBlock=class extends Er{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}=fr(e);this._blockOpts=Object.assign({},this._blockOpts,o);const n=br(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(br(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const s=new Cr;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=vr}catch{}var zr=n`: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 Rr extends(_a(Ea)){constructor(){super(...arguments),this.type="text",this.placeholder="placeholder",this.autofocus=!1,this.readonly=!1,this.defaultValue="",this.valid=!1,this.loading=!1,this.required=!1,this.noValidate=!1,this.value="",this._isTouched=!1,this._showPassword=!1}focus(e){this.input.focus(e)}blur(){this.input.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}setValidity(e,t,s){return this._mixinSetValidity(e,t,s)}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleClick(){this.focus()}_handleChange(e){this.value=this.input.value;this.emit("sgds-change",{cancelable:!0}).defaultPrevented||super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value;this.emit("sgds-input",{cancelable:!0}).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 pt`
|
|
2806
2806
|
<div
|
|
2807
2807
|
class="form-control-group ${We({disabled:this.disabled,readonly:this.readonly,"is-invalid":this.invalid&&e})}"
|
|
2808
2808
|
@click=${this._handleClick}
|
|
@@ -2870,7 +2870,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2870
2870
|
</div>
|
|
2871
2871
|
${this._renderFeedback()}
|
|
2872
2872
|
</div>
|
|
2873
|
-
`}}Rr.styles=[...Ea.styles,ya,Da,zr],Rr.dependencies={"sgds-spinner":Ha,"sgds-icon":
|
|
2873
|
+
`}}Rr.styles=[...Ea.styles,ya,Da,zr],Rr.dependencies={"sgds-spinner":Ha,"sgds-icon":It},e([Ve({reflect:!0})],Rr.prototype,"type",void 0),e([Ve({type:String})],Rr.prototype,"prefix",void 0),e([Ve({type:String})],Rr.prototype,"suffix",void 0),e([Ve({type:Number,reflect:!0})],Rr.prototype,"minlength",void 0),e([Ve({type:Number,reflect:!0})],Rr.prototype,"maxlength",void 0),e([Ve()],Rr.prototype,"min",void 0),e([Ve()],Rr.prototype,"max",void 0),e([Ve({type:String,reflect:!0})],Rr.prototype,"placeholder",void 0),e([Ve({type:String})],Rr.prototype,"pattern",void 0),e([Ve({type:Boolean,reflect:!0})],Rr.prototype,"autofocus",void 0),e([Ve({type:Boolean,reflect:!0})],Rr.prototype,"readonly",void 0),e([Ve()],Rr.prototype,"step",void 0),e([Ve({type:String,reflect:!0})],Rr.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],Rr.prototype,"invalidFeedback",void 0),e([xa()],Rr.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],Rr.prototype,"valid",void 0),e([Ve({type:Boolean,reflect:!0})],Rr.prototype,"loading",void 0),e([Ve({type:Boolean,reflect:!0})],Rr.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],Rr.prototype,"noValidate",void 0),e([Ve({reflect:!0})],Rr.prototype,"value",void 0),e([De()],Rr.prototype,"_isTouched",void 0),e([De()],Rr.prototype,"_showPassword",void 0),e([at("_isTouched",{waitUntilFirstUpdate:!0})],Rr.prototype,"_handleIsTouched",null),e([at("disabled",{waitUntilFirstUpdate:!0})],Rr.prototype,"_handleDisabledChange",null);var Or=n`.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 Nr extends Rr{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=>Wn(Nn(e,qn[this.dateFormat].fnsPattern,new Date))),s=t.filter(e=>!eo(e)||Yo(e,new Date(0,0,1))||Yo(e,Wn(new Date(this.minDate)))||qo(e,Wn(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?qn[e].imPattern:qn[e].imRangePattern,i={mask:s,pattern:s,eager:!0,overwrite:!0,parse:function(t){return t.split(" - ").map(t=>Nn(t,qn[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:vr.MaskedRange,placeholderChar:"D",from:0,to:9,maxLength:1},m:{mask:vr.MaskedRange,placeholderChar:"M",from:0,to:9,maxLength:1},y:{mask:vr.MaskedRange,placeholderChar:"Y",from:0,to:9,maxLength:1},D:{mask:vr.MaskedRange,placeholderChar:"D",from:0,to:9,maxLength:1},M:{mask:vr.MaskedRange,placeholderChar:"M",from:0,to:9,maxLength:1},Y:{mask:vr.MaskedRange,placeholderChar:"Y",from:0,to:9,maxLength:1}}};this.mask=vr(t,i),this.mask.on("accept",()=>{this.value=this.mask.masked.value,this.emit("sgds-mask-input-change",{detail:this.value})}),this.mask.on("complete",this._validateInput)}updateMaskValue(){var e;null===(e=this.mask)||void 0===e||e.updateValue()}destroyInputMask(){var e;null===(e=this.mask)||void 0===e||e.destroy()}async applyInputMask(){return await this._applyInputMask(this.dateFormat)}async focus(){return(await this.shadowInput).focus()}render(){return ee`
|
|
2874
2874
|
<div
|
|
2875
2875
|
class="form-control-container ${We({disabled:this.disabled})}"
|
|
2876
2876
|
>
|
|
@@ -2881,7 +2881,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2881
2881
|
</div>
|
|
2882
2882
|
${this._renderFeedback()}
|
|
2883
2883
|
</div>
|
|
2884
|
-
`}}
|
|
2884
|
+
`}}Nr.styles=[...Rr.styles,Or],e([Ve({type:String})],Nr.prototype,"minDate",void 0),e([Ve({type:String})],Nr.prototype,"maxDate",void 0),e([Ve({type:String,reflect:!0})],Nr.prototype,"mode",void 0),e([Ie("input")],Nr.prototype,"shadowInput",void 0);var Ur=n`:host{--datepicker-theme-color:var(--sgds-primary);--datepicker-hover-bg:var(--sgds-primary-100);--datepicker-bg:#fff;--datepicker-close-btn-bg:var(--datepicker-theme-color);--datepicker-close-btn-hover-bg:var(--sgds-primary-700);--datepicker-close-btn-color:#fff;--datepicker-selected-date-bg:var(--sgds-primary);--datepicker-selected-date-color:#fff;font-size:var(--sgds-font-size-14)}:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{background-color:var(--sgds-form-surface-default);display:flex;flex-direction:column;gap:var(--sgds-form-gap-sm);overflow:unset;padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x);width:var(--sgds-dimension-320)}.dropdown{display:flex;height:100%}sgds-datepicker-input{--input-border-radius:var(--sgds-form-border-radius-md) 0 0 var(--sgds-form-border-radius-md);flex:1;margin-right:0}sgds-icon-button{--btn-border-radius:0 var(--sgds-form-border-radius-md) var(--sgds-form-border-radius-md) 0}.datepicker-container{display:flex}.calendar-btn:not(.with-hint-text){align-self:center}.calendar-btn:not(.with-hint-text).with-label{align-self:end;margin-top:calc(var(--sgds-line-height-24) - var(--sgds-line-height-20))}.calendar-btn.with-hint-text.with-label{align-self:center;margin-top:calc(var(--sgds-line-height-24) - var(--sgds-line-height-20))}`;class qr extends(_a(Ni)){constructor(){super(),this.required=!1,this.disabled=!1,this.value="",this.initialValue=[],this.dateFormat="DD/MM/YYYY",this.minDate="",this.maxDate="",this.mode="single",this.hasFeedback=!1,this.label="",this.hintText="",this.noFlip=!1,this.drop="down",this.defaultValue="",this.invalid=!1,this.view="days",this.selectedDateRange=[],this.focusedTabIndex=3,this.initialDisplayDate=new Date,this._makeInputValueString=(e,t,s)=>{if(!e&&!t)return this.value;const i=e=>Ro(e,qn[s].fnsPattern);switch(this.mode){case"single":e&&(this.value=i(e));break;case"range":e&&t&&(this.value=`${i(e)} - ${i(t)}`),e&&!t&&(this.value=`${i(e)} - ${this.dateFormat}`)}return this.value},this._dialogAriaLabels={days:"Choose date",months:"Choose month",years:"Choose year"},this.floatingOpts={placement:"bottom-end"}}isValueEmpty(){return""===this.value||"DD/MM/YYYY"===this.value||"DD/MM/YYYY - DD/MM/YYYY"===this.value}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}async connectedCallback(){if(super.connectedCallback(),this.addEventListener("sgds-view",this._handleViewChanged),this.addEventListener("sgds-change-calendar",this._handleDateChanged),this.addEventListener("sgds-update-focus",this._handleFocusDateChanged),this.addEventListener("sgds-selectmonth",this._handleSelectMonth),this.addEventListener("sgds-selectyear",this._handleSelectYear),this.addEventListener("sgds-selectdates",this._handleSelectDatesAndClose),this.addEventListener("sgds-selectdates-input",this._handleSelectDatesInput),this.addEventListener("sgds-empty-input",this._handleEmptyInput),this.addEventListener("keydown",this._handleTab),this.addEventListener("sgds-hide",this._handleCloseMenu),this.addEventListener("sgds-show",this._handleOpenMenu),this.addEventListener("blur",this._mixinCheckValidity),this.initialValue=this.value?this.value.split(" - ").map(e=>e.trim()):this.initialValue,this.initialDisplayDate=this.displayDate||new Date,this.initialValue&&this.initialValue.length>0){const e=new RegExp(this._getDateFormatRegex()),t=this.initialValue.filter(t=>!e.test(t));if(t.length>0)return console.error("Invalid date format in initialValue:",t);{const e=this.initialValue.map(e=>Wn(Nn(e,qn[this.dateFormat].fnsPattern,new Date)));this._handleSelectDates(e)}}else this.displayDate=this.initialDisplayDate}async firstUpdated(e){if(super.firstUpdated(e),this.menuIsOpen){const e=await this.datepickerInputAsync;await this.updateFloatingPosition();(await this.calendar).focusOnCalendar(e)}}_getDateFormatRegex(){return this.dateFormat.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace("MM","\\d{2}").replace("DD","\\d{2}").replace("YYYY","\\d{4}").replace("/","\\/")}_handleTab(e){if(!this.menuIsOpen)return;const t=Array(4);e.shiftKey&&"Tab"===e.key?(e.preventDefault(),this.focusedTabIndex=(this.focusedTabIndex-1+t.length)%t.length):"Tab"===e.key&&(e.preventDefault(),this.focusedTabIndex=(this.focusedTabIndex+1+t.length)%t.length)}_handleValueChange(){this.emit("sgds-change-date")}async _handleCloseMenu(){if((await this.datepickerInputAsync).focus(),0===this.selectedDateRange.length)this.displayDate=this.initialDisplayDate;else{const e=this.selectedDateRange.length;this.displayDate=this.selectedDateRange[e-1];(await this.calendar)._updateFocusedDate()}}async _handleOpenMenu(){const e=await this.calendar,t=await this.datepickerInputAsync;e.focusOnCalendar(t)}_handleSelectDatesInput(e){this._handleSelectDates(e.detail)}async _handleSelectDates(e){e.sort((e,t)=>e.getTime()-t.getTime()),this.displayDate=e[0],this.focusedDate=e[0],this.selectedDateRange=e;const t=this._makeInputValueString(this.selectedDateRange[0],this.selectedDateRange[1],this.dateFormat);this.value=t;(await this.datepickerInputAsync).updateMaskValue(),this._manageInternalsValid()}async _handleSelectDatesAndClose(e){await this._handleSelectDates(e.detail),("range"===this.mode&&2===this.selectedDateRange.length||"single"===this.mode&&1===this.selectedDateRange.length)&&this.hideMenu()}_handleViewChanged(e){this.view=e.detail}_handleDateChanged(e){this.displayDate=e.detail}_handleFocusDateChanged(e){this.focusedDate=e.detail}_handleSelectMonth(e){this.displayDate=e.detail}_handleSelectYear(e){this.displayDate=e.detail}async _handleInvalidInput(){this.selectedDateRange=[],this.displayDate=this.initialDisplayDate,this.invalid=!0,this._manageInternalsBadInput()}async _handleEmptyInput(){this.required&&this._manageEmptyInput()}async _resetDatepicker(e=""){this.displayDate=this.initialDisplayDate,this.selectedDateRange=[],this.value=e,this.view="days";const t=await this.datepickerInputAsync;t.setInvalid(!1),t.destroyInputMask(),await t.applyInputMask(),this._mixinResetValidity(t),this.isValueEmpty()&&this._handleEmptyInput()}_manageInternalsBadInput(){this._mixinSetValidity({badInput:!0},"Invalid date input",this.datepickerInput)}_manageEmptyInput(){this._mixinSetValidity({valueMissing:!0},"Please fill in this field",this.datepickerInput)}_manageInternalsValid(){this._mixinSetValidity({}),this.invalid=this.datepickerInput.invalid=!1,this._mixinSetFormValue()}async _mixinResetFormControl(){this._resetDatepicker(this.defaultValue)}async _handleInputMaskChange(e){this.value=e.detail,this.isValueEmpty()&&this._resetDatepicker()}render(){return ee`
|
|
2885
2885
|
<div class="datepicker-container">
|
|
2886
2886
|
<sgds-datepicker-input
|
|
2887
2887
|
.value=${fa(this.value)}
|
|
@@ -2943,7 +2943,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2943
2943
|
></sgds-datepicker-calendar>
|
|
2944
2944
|
</ul>
|
|
2945
2945
|
</div>
|
|
2946
|
-
`}}qr.styles=[...
|
|
2946
|
+
`}}qr.styles=[...Ni.styles,qi,Ur],qr.dependencies={"sgds-datepicker-input":Nr,"sgds-datepicker-calendar":Qn,"sgds-datepicker-header":sr,"sgds-button":ra,"sgds-icon-button":er},e([Ve({type:Boolean,reflect:!0})],qr.prototype,"required",void 0),e([Ve({reflect:!0})],qr.prototype,"name",void 0),e([Ve({type:Boolean,reflect:!0})],qr.prototype,"disabled",void 0),e([Ve({type:String,reflect:!0})],qr.prototype,"value",void 0),e([Ve({type:Array,reflect:!0})],qr.prototype,"initialValue",void 0),e([Ve({type:String})],qr.prototype,"minDate",void 0),e([Ve({type:String})],qr.prototype,"maxDate",void 0),e([Ve({type:String,reflect:!0})],qr.prototype,"mode",void 0),e([Ve({type:String,reflect:!0})],qr.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],qr.prototype,"hasFeedback",void 0),e([Ve({reflect:!0})],qr.prototype,"label",void 0),e([Ve({reflect:!0})],qr.prototype,"hintText",void 0),e([Ve({type:Boolean,reflect:!0,state:!1})],qr.prototype,"noFlip",void 0),e([Ve({type:String,reflect:!0,state:!1})],qr.prototype,"drop",void 0),e([Ve({attribute:!1})],qr.prototype,"displayDate",void 0),e([xa()],qr.prototype,"defaultValue",void 0),e([De()],qr.prototype,"invalid",void 0),e([De()],qr.prototype,"view",void 0),e([De()],qr.prototype,"selectedDateRange",void 0),e([De()],qr.prototype,"focusedDate",void 0),e([De()],qr.prototype,"focusedTabIndex",void 0),e([Ie("sgds-datepicker-calendar")],qr.prototype,"calendar",void 0),e([Ie("sgds-datepicker-input")],qr.prototype,"datepickerInputAsync",void 0),e([Be("sgds-datepicker-input")],qr.prototype,"datepickerInput",void 0),e([at("value",{waitUntilFirstUpdate:!0})],qr.prototype,"_handleValueChange",null),rt("sgds-datepicker",qr);var Yr=n`: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-24);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-16);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 jr extends Pe{constructor(){super(...arguments),this.bordered=!1,this.stacked=!1,this.hasTitleSlot=!1,this.hasDescriptionSlot=!1,this.hasSlotController=new Hi(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 ee`
|
|
2947
2947
|
<div class="container">
|
|
2948
2948
|
<div
|
|
2949
2949
|
class="${We({header:!0,"has-header":this.hasTitleSlot||this.hasDescriptionSlot})}"
|
|
@@ -2968,7 +2968,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
2968
2968
|
</span>
|
|
2969
2969
|
</div>
|
|
2970
2970
|
</div>
|
|
2971
|
-
`}}Gr.styles=[...Pe.styles,Wr],e([Ve({type:Boolean,reflect:!0})],Gr.prototype,"stacked",void 0),e([Ve({type:Boolean,reflect:!0})],Gr.prototype,"bordered",void 0),rt("sgds-description-list",Gr),rt("sgds-description-list-group",jr);var Xr=n`: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 Qr extends Pe{constructor(){super(...arguments),this.orientation="horizontal",this.thickness="thin"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator"),this.setAttribute("aria-orientation",this.orientation)}}Qr.styles=[Xr],e([Ve({type:String,reflect:!0})],Qr.prototype,"orientation",void 0),e([Ve({type:String,reflect:!0})],Qr.prototype,"thickness",void 0),rt("sgds-divider",Qr);const Jr=new Set;function el(e){Jr.add(e),document.body.style.overflow="hidden"}function tl(e){Jr.delete(e),0===Jr.size&&(document.body.style.overflow="")}var sl=n`: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:
|
|
2971
|
+
`}}Gr.styles=[...Pe.styles,Wr],e([Ve({type:Boolean,reflect:!0})],Gr.prototype,"stacked",void 0),e([Ve({type:Boolean,reflect:!0})],Gr.prototype,"bordered",void 0),rt("sgds-description-list",Gr),rt("sgds-description-list-group",jr);var Xr=n`: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 Qr extends Pe{constructor(){super(...arguments),this.orientation="horizontal",this.thickness="thin"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator"),this.setAttribute("aria-orientation",this.orientation)}}Qr.styles=[Xr],e([Ve({type:String,reflect:!0})],Qr.prototype,"orientation",void 0),e([Ve({type:String,reflect:!0})],Qr.prototype,"thickness",void 0),rt("sgds-divider",Qr);const Jr=new Set;function el(e){Jr.add(e),document.body.style.overflow="hidden"}function tl(e){Jr.delete(e),0===Jr.size&&(document.body.style.overflow="")}var sl=n`: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;overflow:auto;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-close-wrapper{position:sticky;top:0}sgds-close-button.drawer-close{inset-inline-end:8px;position:absolute;top:8px}.drawer-header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs);padding:var(--sgds-padding-lg) var(--sgds-padding-lg) var(--sgds-padding-none)}slot[name=title]::slotted(*){color:var(--sgds-color-default)!important;font-size:var(--sgds-font-size-24)!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(*){background-color:var(--sgds-surface-default);bottom:0;padding:var(--sgds-padding-lg);position:sticky}.drawer-body{-webkit-overflow-scrolling:touch;display:block;flex:1 1 auto;overflow:hidden;padding:var(--sgds-padding-lg)}.drawer-overlay{background-color:var(--sgds-bg-overlay);display:block;inset:0;pointer-events:all;position:fixed}.drawer-contained .drawer-overlay{display:none}.drawer-contained{height:unset;width:unset}@media screen and (min-width:512px){.drawer-body{padding:var(--sgds-padding-2-xl)}.drawer-header{padding:var(--sgds-padding-2-xl) var(--sgds-padding-2-xl) var(--sgds-padding-none)}slot[name=footer]::slotted(*){padding:var(--sgds-padding-2-xl)}}`;class il extends Pe{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||el(this))}disconnectedCallback(){super.disconnectedCallback(),tl(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=tt(this,"drawer.denyClose");return void Ke(this.panel,e.keyframes,e.options)}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||el(this);const e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([Qe(this.drawer),Qe(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=tt(this,`drawer.show${this.uppercaseFirstLetter(this.placement)}`),s=tt(this,"drawer.overlay.show");await Promise.all([Ke(this.panel,t.keyframes,t.options),Ke(this.overlay,s.keyframes,s.options)]),this.emit("sgds-after-show")}else{this.emit("sgds-hide"),this.removeOpenListeners(),this.contained||tl(this),await Promise.all([Qe(this.drawer),Qe(this.overlay)]);const e=tt(this,`drawer.hide${this.uppercaseFirstLetter(this.placement)}`),t=tt(this,"drawer.overlay.hide");await Promise.all([Ke(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),Ke(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&&el(this),this.open&&this.contained&&tl(this)}async show(){if(!this.open)return this.open=!0,it(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,it(this,"sgds-after-hide")}render(){const e=this.hasUpdated,t=!this.open&&!e;return ee`
|
|
2972
2972
|
<div
|
|
2973
2973
|
class=${We({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})}
|
|
2974
2974
|
?hidden=${t}
|
|
@@ -3001,7 +3001,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
3001
3001
|
</div>
|
|
3002
3002
|
</div>
|
|
3003
3003
|
</div>
|
|
3004
|
-
`}}il.styles=[...Pe.styles,sl],il.dependencies={"sgds-close-button":mt},e([
|
|
3004
|
+
`}}il.styles=[...Pe.styles,sl],il.dependencies={"sgds-close-button":mt},e([Be(".drawer")],il.prototype,"drawer",void 0),e([Be(".drawer-panel")],il.prototype,"panel",void 0),e([Be(".drawer-overlay")],il.prototype,"overlay",void 0),e([Ve({type:Boolean,reflect:!0})],il.prototype,"open",void 0),e([Ve({type:String,reflect:!0})],il.prototype,"size",void 0),e([Ve({type:String,reflect:!0})],il.prototype,"placement",void 0),e([Ve({type:Boolean,reflect:!0})],il.prototype,"contained",void 0),e([at("open",{waitUntilFirstUpdate:!0})],il.prototype,"handleOpenChange",null),e([at("contained",{waitUntilFirstUpdate:!0})],il.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}}),rt("sgds-drawer",il),rt("sgds-dropdown",ji),rt("sgds-dropdown-item",Ki);var al=n`.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 ol extends(_a(Ea)){constructor(){super(...arguments),this.multiple=!1,this.accept="",this.hasFeedback=!1,this.required=!1,this.selectedFiles=[],this.inputRef=as()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}get files(){return this.selectedFiles}_setFileList(e){this.emit("sgds-files-selected",{detail:e})}_handleClick(e){if(e.preventDefault(),!this.disabled){this.inputRef.value.click()}}_handleChange(e){const t=e.target.files;t.length>0&&(this.selectedFiles=Array.from(t)),this._setFileList(t),this.requestUpdate(),super._mixinHandleChange(e)}_removeFileHandler(e){const t=this.inputRef.value,s=t.files,i=new DataTransfer;for(let t=0;t<s.length;t++)e!==t&&i.items.add(s[t]);t.files=i.files,this._setFileList(i.files),this.selectedFiles=Array.from(i.files),this.requestUpdate(),this._mixinValidate(this.input)}_clearAllFiles(){const e=this.inputRef.value,t=new DataTransfer;e.files=t.files,this._setFileList(t.files),this.selectedFiles=Array.from(t.files)}_mixinResetFormControl(){this._clearAllFiles(),this._mixinResetValidity(this.input)}_handleDisabledChange(){this.setInvalid(!1)}_renderLabel(){const e=ee`
|
|
3005
3005
|
<label for=${this._controlId} id=${this._labelId} class="form-label"> ${this.label} </label>
|
|
3006
3006
|
`;return this.label&&e}_renderHintText(){const e=ee` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_renderFeedback(){return ee`
|
|
3007
3007
|
<div class="invalid-feedback-container">
|
|
@@ -3043,7 +3043,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
3043
3043
|
${t}
|
|
3044
3044
|
</ul>
|
|
3045
3045
|
</div>
|
|
3046
|
-
`}}ol.styles=[...Ea.styles,al],ol.dependencies={"sgds-button":ra,"sgds-close-button":mt,"sgds-icon":
|
|
3046
|
+
`}}ol.styles=[...Ea.styles,al],ol.dependencies={"sgds-button":ra,"sgds-close-button":mt,"sgds-icon":It},e([Ve({type:Boolean,reflect:!0})],ol.prototype,"multiple",void 0),e([Ve({type:String,reflect:!0})],ol.prototype,"accept",void 0),e([Ve({type:Boolean,reflect:!0})],ol.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],ol.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],ol.prototype,"required",void 0),e([De()],ol.prototype,"selectedFiles",void 0),e([at("disabled",{waitUntilFirstUpdate:!0})],ol.prototype,"_handleDisabledChange",null),rt("sgds-file-upload",ol);var nl=n`.footer{background-color:var(--sgds-bg-fixed-dark);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-24)!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-14)}@media (min-width:512px){.footer{padding:var(--sgds-padding-none) var(--sgds-padding-xl)}}@media (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)}}@media (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-28)!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)}}@media (min-width:1280px){.footer-bottom,.footer-top{max-width:var(--sgds-dimension-1168)}.footer-mandatory-links{flex-direction:row}}@media (min-width:1440px){.footer-bottom,.footer-top{max-width:var(--sgds-dimension-1312)}}`;class rl extends Pe{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 Hi(this,"[default]","title","description","items")}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this.hasTitleSlot||(this.hasTitleSlot=this.hasSlotController.test("title")),this.hasDescriptionSlot||(this.hasDescriptionSlot=this.hasSlotController.test("description")),this.hasItemsSlot||(this.hasItemsSlot=this.hasSlotController.test("items"))}render(){return ee`
|
|
3047
3047
|
<footer class="footer">
|
|
3048
3048
|
<section
|
|
3049
3049
|
class="${We({"footer-top":this.hasDefaultSlot||this.hasTitleSlot||this.hasDescriptionSlot||this.hasItemsSlot,"has-content":this.hasDefaultSlot||this.hasItemsSlot})}"
|
|
@@ -3100,7 +3100,7 @@ const Fa=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
3100
3100
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
3101
3101
|
</div>
|
|
3102
3102
|
</div>
|
|
3103
|
-
`}}dl.styles=[...Pe.styles,ll],rt("sgds-footer",rl),rt("sgds-footer-item",dl),rt("sgds-icon",
|
|
3103
|
+
`}}dl.styles=[...Pe.styles,ll],rt("sgds-footer",rl),rt("sgds-footer-item",dl),rt("sgds-icon",It),rt("sgds-icon-button",er);var cl=n`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-14);line-height:var(--sgds-line-height-20)}.lg{font-size:var(--sgds-font-size-20);line-height:var(--sgds-line-height-32)}`;class hl extends Pe{constructor(){super(...arguments),this.role="list",this.size="md"}render(){return ee`
|
|
3104
3104
|
<div class=${We({[this.size]:this.size})}>
|
|
3105
3105
|
<slot></slot>
|
|
3106
3106
|
</div>
|
|
@@ -3141,7 +3141,7 @@ class pl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3141
3141
|
* @license
|
|
3142
3142
|
* Copyright 2022 Google LLC
|
|
3143
3143
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3144
|
-
*/function bl({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer(function(){new pl(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})}):s.constructor.addInitializer(s=>{new pl(s,{context:e,callback:e=>{s[i]=e},subscribe:t})})}}const wl=1024,yl="mainnav-context",xl="mainnav-expanded-context";var kl=n`:host{display:block}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08)
|
|
3144
|
+
*/function bl({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer(function(){new pl(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})}):s.constructor.addInitializer(s=>{new pl(s,{context:e,callback:e=>{s[i]=e},subscribe:t})})}}const wl=1024,yl="mainnav-context",xl="mainnav-expanded-context";var kl=n`:host{display:block;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,1440px);min-height:80px;padding:0 var(--sgds-mainnav-mobile-padding-x);position:relative;width:100%}:host([fluid]) .navbar{max-width:none}.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{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 .navbar-nav{height:100dvh;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px)}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{padding:0 var(--sgds-mainnav-padding-x)}.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 _l={sm:512,md:768,lg:wl,xl:1280,xxl:1440,never:1/0,always:-1};class Cl extends Pe{constructor(){super(...arguments),this._breakpointReached=!1,this.expanded=!1,this.expanding=!1,this.brandHref="",this.collapseId=Oi("mainnav","collapse"),this.expand="lg",this.fluid=!1,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)}_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<_l[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 Qe(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=tt(this,"mainnav.show");await Ke(this.body,Xe(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 Qe(this.body);const{keyframes:e,options:t}=tt(this,"mainnav.hide");await Ke(this.body,Xe(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,it(this,"sgds-after-show")}async hide(){if(this.expanded)return this.expanding=!1,document.querySelector("body").style.removeProperty("overflow"),it(this,"sgds-after-hide")}_handleDefaultSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{e.setAttribute("expand",this.expand)})}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{e.setAttribute("name",e.tagName.toLowerCase()),e.setAttribute("expand",this.expand)})}render(){return this.breakpointReached=window.innerWidth<_l[this.expand],ee`
|
|
3145
3145
|
<nav>
|
|
3146
3146
|
<div class="navbar ${this._expandClass()}">
|
|
3147
3147
|
<a class="navbar-brand" href=${this.brandHref} aria-label="brand-link">
|
|
@@ -3170,7 +3170,7 @@ class pl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3170
3170
|
></sgds-icon-button>
|
|
3171
3171
|
</div>
|
|
3172
3172
|
</nav>
|
|
3173
|
-
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}Cl.styles=[...Pe.styles,kl],Cl.dependencies={"sgds-icon-button":er},e([fl({context:yl}),De()],Cl.prototype,"_breakpointReached",void 0),e([fl({context:xl}),De()],Cl.prototype,"expanded",void 0),e([De()],Cl.prototype,"expanding",void 0),e([
|
|
3173
|
+
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}Cl.styles=[...Pe.styles,kl],Cl.dependencies={"sgds-icon-button":er},e([fl({context:yl}),De()],Cl.prototype,"_breakpointReached",void 0),e([fl({context:xl}),De()],Cl.prototype,"expanded",void 0),e([De()],Cl.prototype,"expanding",void 0),e([Be("nav")],Cl.prototype,"nav",void 0),e([Be(".navbar")],Cl.prototype,"navbar",void 0),e([Be(".navbar-toggler")],Cl.prototype,"header",void 0),e([Be(".navbar-body")],Cl.prototype,"body",void 0),e([Be(".navbar-nav-scroll")],Cl.prototype,"navScroll",void 0),e([Be("slot[name='non-collapsible']")],Cl.prototype,"nonCollapsibleSlot",void 0),e([Ve({type:String})],Cl.prototype,"brandHref",void 0),e([Ve({type:String})],Cl.prototype,"expand",void 0),e([Ve({type:Boolean,reflect:!0})],Cl.prototype,"fluid",void 0),e([De()],Cl.prototype,"breakpointReached",void 0),e([Le()],Cl.prototype,"defaultNodes",void 0),e([Le({slot:"end"})],Cl.prototype,"endNodes",void 0),e([at("expanding",{waitUntilFirstUpdate:!0})],Cl.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 Ml=n`: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-mobile-padding-x);text-decoration:none}.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%;overflow-y:auto;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);margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-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{display:block;height:100%}@media screen and (min-width:1024px){.dropdown-items a,.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;const Sl="Enter";class $l extends Pe{constructor(){super(...arguments),this._breakpointReached=!0,this.togglerId=Oi("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("mainnav-dropdown-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("mainnav-dropdown-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!==Sl&&" "!==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 Sl:case" ":e.preventDefault(),this._closeMenu()}}async _closeMenu(){await this._resetDropdownMenu(),this._hideDropdownMenuItems(),this.navLink.focus()}render(){const e=ee`
|
|
3174
3174
|
<a
|
|
3175
3175
|
class="${We({"nav-link":!0,active:this.active,disabled:this.disabled})}"
|
|
3176
3176
|
aria-disabled=${this.disabled?"true":"false"}
|
|
@@ -3205,7 +3205,7 @@ class pl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3205
3205
|
<sgds-icon name="chevron-down"></sgds-icon>
|
|
3206
3206
|
</a>
|
|
3207
3207
|
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
|
|
3208
|
-
</sgds-dropdown>`;return this._breakpointReached?e:t}}$l.styles=[...Pe.styles,Yi,qi,Ml],$l.dependencies={"sgds-dropdown":ji,"sgds-dropdown-item":Ki,"sgds-icon":Bt},e([bl({context:yl,subscribe:!0}),De()],$l.prototype,"_breakpointReached",void 0),e([bl({context:xl,subscribe:!0}),De()],$l.prototype,"expanded",void 0),e([Ze(".nav-link")],$l.prototype,"navLink",void 0),e([Ze(".dropdown-items")],$l.prototype,"dropdownItems",void 0),e([Ze(".dropdown-items a")],$l.prototype,"menuHeaderButton",void 0),e([Ze(".dropdown-items span")],$l.prototype,"menuHeaderText",void 0),e([Ve({type:Boolean})],$l.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],$l.prototype,"disabled",void 0),e([Le({slot:"toggler"})],$l.prototype,"togglerNodes",void 0),e([Le()],$l.prototype,"defaultNodes",void 0);var Al=n`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;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;min-height:100%;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;min-height:100%;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;min-height:100%;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;min-height:100%;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;min-height:100%;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;padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none!important;text-decoration:none}@media screen and (min-width:1024px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-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 Vl extends Pe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}Vl.styles=[...Pe.styles,Al],e([Ve({type:Boolean,reflect:!0})],Vl.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Vl.prototype,"disabled",void 0),e([at("disabled")],Vl.prototype,"_handleDisabled",null),rt("sgds-mainnav",Cl),rt("sgds-mainnav-dropdown",$l),rt("sgds-mainnav-item",Vl);var Dl=n`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:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#f7f7f7,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem);width:100%}:host([fluid]) .container{max-width:none}.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 .75rem}.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(#f7f7f7,#1a1a1a)}.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:1rem;grid-template-columns: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:20px;width:20px}.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 (min-width:768px){.content-grid{gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}}@media screen and (min-width:1024px){.container{padding:.25rem var(--sgds-mainnav-padding-x,2rem)}}`,El=n`svg{vertical-align:middle}`;class Il extends Pe{constructor(){super(...arguments),this.fluid=!1,this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
3208
|
+
</sgds-dropdown>`;return this._breakpointReached?e:t}}$l.styles=[...Pe.styles,Yi,qi,Ml],$l.dependencies={"sgds-dropdown":ji,"sgds-dropdown-item":Ki,"sgds-icon":It},e([bl({context:yl,subscribe:!0}),De()],$l.prototype,"_breakpointReached",void 0),e([bl({context:xl,subscribe:!0}),De()],$l.prototype,"expanded",void 0),e([Be(".nav-link")],$l.prototype,"navLink",void 0),e([Be(".dropdown-items")],$l.prototype,"dropdownItems",void 0),e([Be(".dropdown-items a")],$l.prototype,"menuHeaderButton",void 0),e([Be(".dropdown-items span")],$l.prototype,"menuHeaderText",void 0),e([Ve({type:Boolean})],$l.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],$l.prototype,"disabled",void 0),e([Le({slot:"toggler"})],$l.prototype,"togglerNodes",void 0),e([Le()],$l.prototype,"defaultNodes",void 0);var Al=n`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;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;min-height:100%;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;min-height:100%;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;min-height:100%;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;min-height:100%;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;min-height:100%;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;padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none!important;text-decoration:none}@media screen and (min-width:1024px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-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 Vl extends Pe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}Vl.styles=[...Pe.styles,Al],e([Ve({type:Boolean,reflect:!0})],Vl.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],Vl.prototype,"disabled",void 0),e([at("disabled")],Vl.prototype,"_handleDisabled",null),rt("sgds-mainnav",Cl),rt("sgds-mainnav-dropdown",$l),rt("sgds-mainnav-item",Vl);var Dl=n`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:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#f7f7f7,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem);width:100%}:host([fluid]) .container{max-width:none}.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 .75rem}.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(#f7f7f7,#1a1a1a)}.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:1rem;grid-template-columns: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:20px;width:20px}.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 (min-width:768px){.content-grid{gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}}@media screen and (min-width:1024px){.container{padding:.25rem var(--sgds-mainnav-padding-x,2rem)}}`,El=n`svg{vertical-align:middle}`;class Zl extends Pe{constructor(){super(...arguments),this.fluid=!1,this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
3209
3209
|
<div id="sgds-masthead" class="sgds-masthead">
|
|
3210
3210
|
<div class="banner">
|
|
3211
3211
|
<div class="container">
|
|
@@ -3357,7 +3357,7 @@ class pl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3357
3357
|
</div>
|
|
3358
3358
|
</div>
|
|
3359
3359
|
</div>
|
|
3360
|
-
`}}function
|
|
3360
|
+
`}}function Bl(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=[...Pe.styles,El,Ht,Dl],e([Ve({type:Boolean,reflect:!0})],Zl.prototype,"fluid",void 0),e([De()],Zl.prototype,"toggleVisibility",void 0),rt("sgds-masthead",Zl);let Il=[];class Ll{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(){Il.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Il=Il.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Il[Il.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=>Bl(e)))&&void 0!==t?t:null,end:null!==(s=i.reverse().find(e=>Bl(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 Fl=n`: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=xl]) .modal-panel{max-width:var(--sgds-dimension-1280)}: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:auto;max-height:calc(100% - var(--sgds-margin-xl) - var(--sgds-margin-xl));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-xl)}}@media screen and (min-width:768px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-2-xl);max-height:calc(100% - var(--sgds-margin-2-xl) - var(--sgds-margin-2-xl))}}@media screen and (min-width:1024px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-4-xl) var(--sgds-margin-lg);max-height:calc(100% - var(--sgds-margin-4-xl) - var(--sgds-margin-4-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(*){align-items:center;display:flex;flex:1 1 auto;font-size:var(--sgds-font-size-24)!important;gap:1rem;line-height:var(--sgds-line-height-40)!important;margin:var(--sgds-margin-none)!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);line-height:var(--sgds-line-height-24);margin:var(--sgds-margin-none)!important}.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 Tl extends Pe{constructor(){super(...arguments),this.hasSlotController=new Hi(this,"footer"),this.open=!1,this.noAnimation=!1,this.size="md",this.hasFooterSlot=!1,this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Ll(this),this._resizeHandler=this._debounce(this._onWindowResize.bind(this),200)}disconnectedCallback(){super.disconnectedCallback(),this._removeResizeListener(),tl(this)}firstUpdated(e){super.firstUpdated(e),this._onWindowResize(),this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),el(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,it(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,it(this,"sgds-after-hide")}requestClose(e){if(this.emit("sgds-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const e=tt(this,"modal.denyClose");return void Ke(this.panel,e.keyframes)}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(),el(this),await Promise.all([Qe(this.dialog),Qe(this.overlay)]),this.dialog.hidden=!1;const e=tt(this,"modal.show"),t=tt(this,"modal.overlay.show");!this.noAnimation&&await Promise.all([Ke(this.panel,e.keyframes,e.options),Ke(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([Qe(this.dialog),Qe(this.overlay)]);const e=tt(this,"modal.hide"),t=tt(this,"modal.overlay.hide");!this.noAnimation&&await Promise.all([Ke(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),Ke(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,tl(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 ee`
|
|
3361
3361
|
<div
|
|
3362
3362
|
class=${We({modal:!0,show:this.open,"has-footer":this.hasFooterSlot})}
|
|
3363
3363
|
>
|
|
@@ -3392,7 +3392,7 @@ class pl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3392
3392
|
</div>
|
|
3393
3393
|
</div>
|
|
3394
3394
|
</div>
|
|
3395
|
-
`}}Tl.styles=[...Pe.styles,ua,El,Fl],Tl.dependencies={"sgds-close-button":mt},e([
|
|
3395
|
+
`}}Tl.styles=[...Pe.styles,ua,El,Fl],Tl.dependencies={"sgds-close-button":mt},e([Be(".modal")],Tl.prototype,"dialog",void 0),e([Be(".modal-panel")],Tl.prototype,"panel",void 0),e([Be(".modal-overlay")],Tl.prototype,"overlay",void 0),e([Be(".modal-title")],Tl.prototype,"heading",void 0),e([Ve({type:Boolean,reflect:!0})],Tl.prototype,"open",void 0),e([Ve({type:Boolean,reflect:!0})],Tl.prototype,"noAnimation",void 0),e([Ve({reflect:!0})],Tl.prototype,"size",void 0),e([Ve({type:Boolean})],Tl.prototype,"hasFooterSlot",void 0),e([Ve({type:Boolean,reflect:!0})],Tl.prototype,"noCloseButton",void 0),e([at("open",{waitUntilFirstUpdate:!0})],Tl.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}}),rt("sgds-modal",Tl),rt("sgds-overflow-menu",Gi);var Pl=n`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-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-surface-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-surface-default);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-14);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-14)}`;class Hl extends Pe{constructor(){super(...arguments),this.dataLength=0,this.currentPage=1,this.itemsPerPage=5,this.variant="default",this.navigation="icon-button",this.size="md",this._limit=4,this.ellipsisContent=ee`
|
|
3396
3396
|
<span aria-hidden="true">…</span>
|
|
3397
3397
|
<span class="sr-only" role="text">Ellipsis</span>
|
|
3398
3398
|
`,this._renderFirstEllipsis=()=>this.pages.length<=7||!(this.pages.length!==this._limit&&this.currentPage>4)?null:ee`
|
|
@@ -3487,19 +3487,19 @@ class pl{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
3487
3487
|
${"button"===this.variant?this._renderButtonPagination():ie}
|
|
3488
3488
|
</ul>
|
|
3489
3489
|
</nav>
|
|
3490
|
-
`}}Hl.styles=[...Pe.styles,Pl],Hl.dependencies={"sgds-icon-button":er,"sgds-button":ra,"sgds-icon":
|
|
3490
|
+
`}}Hl.styles=[...Pe.styles,Pl],Hl.dependencies={"sgds-icon-button":er,"sgds-button":ra,"sgds-icon":It},e([Ve({type:Number})],Hl.prototype,"dataLength",void 0),e([Ve({type:Number})],Hl.prototype,"currentPage",void 0),e([Ve({type:Number})],Hl.prototype,"itemsPerPage",void 0),e([Ve({type:String})],Hl.prototype,"variant",void 0),e([Ve({type:String})],Hl.prototype,"navigation",void 0),e([Ve({type:String})],Hl.prototype,"size",void 0),e([De()],Hl.prototype,"_limit",void 0),e([at("currentPage",{waitUntilFirstUpdate:!1})],Hl.prototype,"_handleValueChange",null),rt("sgds-pagination",Hl);
|
|
3491
3491
|
/**
|
|
3492
3492
|
* @license
|
|
3493
3493
|
* Copyright 2018 Google LLC
|
|
3494
3494
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3495
3495
|
*/
|
|
3496
|
-
const zl="important",Rl=" !"+zl;const
|
|
3496
|
+
const zl="important",Rl=" !"+zl;const Ol=Ye(class extends je{constructor(e){if(super(e),e.type!==Oe||"style"!==e.name||e.strings?.length>2)throw new Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,s)=>{const i=e[s];return null==i?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:s}=e.element;if(void 0===this._previousStyleProperties)return this._previousStyleProperties=new Set(Object.keys(t)),this.render(t);for(const e of this._previousStyleProperties)null==t[e]&&(this._previousStyleProperties.delete(e),e.includes("-")?s.removeProperty(e):s[e]=null);for(const e in t){const i=t[e];if(null!=i){this._previousStyleProperties.add(e);const t="string"==typeof i&&i.endsWith(Rl);e.includes("-")||t?s.setProperty(e,t?i.slice(0,-11):i,t?zl:""):s[e]=i}}return se}});var Nl=n`progress{vertical-align:baseline}.progress-container{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs);overflow:hidden}.progress{background-color:var(--sgds-bg-translucent)}.progress-bar{background-color:var(--sgds-primary-surface-default);display:flex;flex-direction:column;height:var(--sgds-dimension-4);justify-content:center;overflow:hidden;transition:width .6s ease}:host([variant=neutral]) .progress-bar{background-color:var(--sgds-neutral-surface-default)}.label{color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-14);white-space:nowrap}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}`;class Ul extends Pe{constructor(){super(...arguments),this.variant="primary",this.arialabel="",this.label=""}render(){return ee`
|
|
3497
3497
|
<div class="progress-container">
|
|
3498
3498
|
<div class="progress">
|
|
3499
3499
|
<div
|
|
3500
3500
|
class="progress-bar"
|
|
3501
3501
|
role="progressbar"
|
|
3502
|
-
style=${
|
|
3502
|
+
style=${Ol({width:`${this.value}%`})}
|
|
3503
3503
|
aria-label=${this.arialabel}
|
|
3504
3504
|
aria-valuenow=${this.value}
|
|
3505
3505
|
aria-valuemin=${this.ariamin}
|
|
@@ -3508,7 +3508,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3508
3508
|
</div>
|
|
3509
3509
|
${this.label?ee`<span class="label">${this.label}</span>`:ie}
|
|
3510
3510
|
</div>
|
|
3511
|
-
`}}Ul.styles=[...Pe.styles,
|
|
3511
|
+
`}}Ul.styles=[...Pe.styles,Nl],e([Ve({type:String,reflect:!0})],Ul.prototype,"variant",void 0),e([Ve({type:Number,reflect:!0})],Ul.prototype,"value",void 0),e([Ve({type:Number,reflect:!0})],Ul.prototype,"ariamin",void 0),e([Ve({type:Number,reflect:!0})],Ul.prototype,"ariamax",void 0),e([Ve({type:String,reflect:!0})],Ul.prototype,"arialabel",void 0),e([Ve({type:String,reflect:!0})],Ul.prototype,"label",void 0),rt("sgds-progress-bar",Ul);var ql=n`.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 Yl extends(_a(Ea)){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?pt` <div class="invalid-feedback-container">
|
|
3512
3512
|
<slot name="invalidIcon">
|
|
3513
3513
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
3514
3514
|
<path
|
|
@@ -3569,7 +3569,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3569
3569
|
<div id="announcer" role="region" aria-live="assertive" class="visually-hidden">${this.value}</div>
|
|
3570
3570
|
${this._renderFeedback()}
|
|
3571
3571
|
</div>
|
|
3572
|
-
`}}Yl.styles=[...Ea.styles,Da,El,ya,ql],Yl.dependencies={"sgds-input":Rr,"sgds-icon-button":er},e([
|
|
3572
|
+
`}}Yl.styles=[...Ea.styles,Da,El,ya,ql],Yl.dependencies={"sgds-input":Rr,"sgds-icon-button":er},e([Be("sgds-icon-button[ariaLabel^='increase by']")],Yl.prototype,"plusBtn",void 0),e([Be("sgds-icon-button[ariaLabel^='decrease by']")],Yl.prototype,"minusBtn",void 0),e([Ve({type:Number,reflect:!0})],Yl.prototype,"value",void 0),e([Ve({type:Number})],Yl.prototype,"step",void 0),e([Ve({type:Number})],Yl.prototype,"min",void 0),e([Ve({type:Number})],Yl.prototype,"max",void 0),e([Ve({type:String,reflect:!0})],Yl.prototype,"hasFeedback",void 0),e([Ve({type:String,reflect:!0})],Yl.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Yl.prototype,"readonly",void 0),e([xa()],Yl.prototype,"defaultValue",void 0),e([Ie("sgds-input")],Yl.prototype,"_sgdsInput",void 0),rt("sgds-quantity-toggle",Yl);var jl=n`:host{outline:0}.form-check-input[type=radio]{border-radius:50%}.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{background-color:var(--sgds-form-danger-surface-default)}`;class Wl extends Pe{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.invalid=!1,this.radioId=Oi("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 ee`
|
|
3573
3573
|
<div class="form-check">
|
|
3574
3574
|
<input
|
|
3575
3575
|
class=${We({"form-check-input":!0,"is-invalid":this.invalid})}
|
|
@@ -3586,7 +3586,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3586
3586
|
<slot></slot>
|
|
3587
3587
|
</label>
|
|
3588
3588
|
</div>
|
|
3589
|
-
`}}Wl.styles=[...Pe.styles,
|
|
3589
|
+
`}}Wl.styles=[...Pe.styles,Ba,Va,jl],e([Ve({type:Boolean,reflect:!0})],Wl.prototype,"checked",void 0),e([Ve()],Wl.prototype,"value",void 0),e([Ve({type:Boolean,reflect:!0})],Wl.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],Wl.prototype,"invalid",void 0),e([Be("input")],Wl.prototype,"input",void 0),e([at("checked")],Wl.prototype,"handleCheckedChange",null),e([at("disabled",{waitUntilFirstUpdate:!0})],Wl.prototype,"handleDisabledChange",null);var Kl=n`fieldset{border:0;gap:var(--sgds-form-gap-md);margin:0;min-width:0;padding:0}.label-hint-container,fieldset{display:flex;flex-direction:column}.label-hint-container{gap:var(--sgds-form-gap-sm)}.radio-group-validation-input{display:none}.radio-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}:host([disabled]) .label-hint-container{cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Gl extends(_a(Ea)){constructor(){super(...arguments),this.defaultValue="",this.value="",this.invalidFeedback="",this.hasFeedback=!1,this.required=!1,this._isTouched=!1}_handleValueChange(){this.emit("sgds-change",{detail:{value:this.value}}),this._updateCheckedRadio()}_handleInvalidChange(){this._radios.forEach(e=>e.invalid=this.invalid)}_mixinResetFormControl(){this.value=this.input.value=this.defaultValue,this._updateInputValue("reset"),this._mixinResetValidity(this.input)}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.addEventListener("sgds-blur",()=>{this._isTouched=!0})}firstUpdated(e){super.firstUpdated(e);const t=this._radios;t.forEach((e,s)=>{if(t.length>1)switch(s){case 0:e.setAttribute("first-of-type","");break;case t.length-1:e.setAttribute("last-of-type","");break;default:e.setAttribute("nth-of-type","")}}),this.value&&this._updateInputValue("change")}_handleRadioClick(e){e.preventDefault();const t=e.target;if(t.disabled)return;this.value=t.value,this._updateInputValue();this._radios.forEach(e=>e.checked=e===t)}_updateInputValue(e="change"){this.input.value=this.value,this.input.dispatchEvent(new InputEvent(e))}_handleKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const s=this._radios.filter(e=>!e.disabled),i=null!==(t=s.find(e=>e.checked))&&void 0!==t?t:s[0],a=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let o=s.indexOf(i)+a;o<0&&(o=s.length-1),o>s.length-1&&(o=0),this._radios.forEach(e=>{e.checked=!1,e.tabIndex=-1}),this.value=s[o].value,this._updateInputValue(),s[o].checked=!0,s[o].tabIndex=0,e.preventDefault()}_handleSlotChange(){const e=this._radios;e.forEach(e=>e.checked=e.value===this.value),this._disabledChildRadios(),e.some(e=>e.checked)||e[0]&&(e[0].tabIndex=0)}_updateCheckedRadio(){this._radios.forEach(e=>e.checked=e.value===this.value)}_renderHintText(){const e=ee` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_handleDisabledChange(){this.setInvalid(!1),this._disabledChildRadios()}_disabledChildRadios(){if(this.disabled){this._radios.forEach(e=>e.disabled=this.disabled)}}render(){const e=ee`
|
|
3590
3590
|
<slot
|
|
3591
3591
|
class="radio-container"
|
|
3592
3592
|
@click=${this._handleRadioClick}
|
|
@@ -3630,13 +3630,13 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3630
3630
|
</div>
|
|
3631
3631
|
`:ie}
|
|
3632
3632
|
</fieldset>
|
|
3633
|
-
`}}Gl.styles=[...Ea.styles,Kl],e([
|
|
3633
|
+
`}}Gl.styles=[...Ea.styles,Kl],e([Be("slot:not([name])")],Gl.prototype,"defaultSlot",void 0),e([De()],Gl.prototype,"defaultValue",void 0),e([Ve({reflect:!0})],Gl.prototype,"value",void 0),e([Ve({type:String,reflect:!0})],Gl.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Gl.prototype,"hasFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Gl.prototype,"required",void 0),e([at("value",{waitUntilFirstUpdate:!0})],Gl.prototype,"_handleValueChange",null),e([at("invalid",{waitUntilFirstUpdate:!0})],Gl.prototype,"_handleInvalidChange",null),e([De()],Gl.prototype,"_isTouched",void 0),e([Le()],Gl.prototype,"_radios",void 0),e([at("_isTouched",{waitUntilFirstUpdate:!0})],Gl.prototype,"_handleIsTouched",null),e([at("disabled",{waitUntilFirstUpdate:!0})],Gl.prototype,"_handleDisabledChange",null),rt("sgds-radio",Wl),rt("sgds-radio-group",Gl);var Xl=n`: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 Ql extends Pe{constructor(){super(...arguments),this.sticky=!1}get items(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}async onToggle(e){const t="SGDS-SIDENAV-LINK"===e.target.tagName;if(e.defaultPrevented||t)return;this.items}render(){return ee`
|
|
3634
3634
|
<nav class=${We({sticky:this.sticky})}>
|
|
3635
3635
|
<div>
|
|
3636
3636
|
<slot @click=${this.onToggle}></slot>
|
|
3637
3637
|
</div>
|
|
3638
3638
|
</nav>
|
|
3639
|
-
`}}Ql.styles=[...Pe.styles,Xl],e([Ve({type:Boolean,attribute:!0})],Ql.prototype,"sticky",void 0),e([Le()],Ql.prototype,"defaultNodes",void 0);var Jl=n`:host([class^=second-level]) .sidenav-btn{font-weight:var(--sgds-font-weight-regular);padding-left:var(--sgds-padding-3-xl)}button{all:unset}.sidenav-btn{background:0;border:0;border-radius:var(--sgds-border-radius-md);display:flex;font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-24);padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) calc(var(--sgds-padding-sm) + var(--sgds-padding-2-xs));text-align:initial;width:100%;.caret-icon,slot[name=caret-icon]::slotted(*){margin-bottom:auto;margin-left:auto;transform:rotate(180deg);transition:all .3s ease-in-out}}.sidenav-btn:hover:not(.disabled){background-color:var(--sgds-bg-translucent-subtle)}.sidenav-btn.active{color:var(--sgds-color-default)}.sidenav-btn.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}.sidenav-btn:not(.active){.caret-icon,slot[name=caret-icon]::slotted(*){transform:rotate(0deg)}}.sidenav-btn:focus-visible:not(.disabled),.sidenav-btn:focus:not(.disabled){background-color:var(--sgds-bg-translucent-subtle)}.sidenav-btn:focus-visible:not(.disabled){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.no-menu-default::slotted(a){background:0;border:0;border-radius:var(--sgds-border-radius-md);color:inherit!important;display:flex;font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-semibold)!important;gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-24)!important;padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) calc(var(--sgds-padding-sm) + var(--sgds-padding-2-xs));text-decoration:none!important}.no-menu-default::slotted(a:focus),.no-menu-default::slotted(a:focus-visible){background-color:var(--sgds-bg-translucent-subtle)}.no-menu-default::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([class^=first-level][active]) .no-menu-default::slotted(a){background-color:var(--sgds-primary-surface-translucent);color:var(--sgds-primary-color-emphasis)!important}:host([class^=first-level][disabled]) .no-menu-default::slotted(a){opacity:var(--sgds-opacity-50);pointer-events:none}`;class ed extends Pe{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.isLink=!1,this._collapseId=
|
|
3639
|
+
`}}Ql.styles=[...Pe.styles,Xl],e([Ve({type:Boolean,attribute:!0})],Ql.prototype,"sticky",void 0),e([Le()],Ql.prototype,"defaultNodes",void 0);var Jl=n`:host([class^=second-level]) .sidenav-btn{font-weight:var(--sgds-font-weight-regular);padding-left:var(--sgds-padding-3-xl)}button{all:unset}.sidenav-btn{background:0;border:0;border-radius:var(--sgds-border-radius-md);display:flex;font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-24);padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) calc(var(--sgds-padding-sm) + var(--sgds-padding-2-xs));text-align:initial;width:100%;.caret-icon,slot[name=caret-icon]::slotted(*){margin-bottom:auto;margin-left:auto;transform:rotate(180deg);transition:all .3s ease-in-out}}.sidenav-btn:hover:not(.disabled){background-color:var(--sgds-bg-translucent-subtle)}.sidenav-btn.active{color:var(--sgds-color-default)}.sidenav-btn.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}.sidenav-btn:not(.active){.caret-icon,slot[name=caret-icon]::slotted(*){transform:rotate(0deg)}}.sidenav-btn:focus-visible:not(.disabled),.sidenav-btn:focus:not(.disabled){background-color:var(--sgds-bg-translucent-subtle)}.sidenav-btn:focus-visible:not(.disabled){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.no-menu-default::slotted(a){background:0;border:0;border-radius:var(--sgds-border-radius-md);color:inherit!important;display:flex;font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-semibold)!important;gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-24)!important;padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) calc(var(--sgds-padding-sm) + var(--sgds-padding-2-xs));text-decoration:none!important}.no-menu-default::slotted(a:focus),.no-menu-default::slotted(a:focus-visible){background-color:var(--sgds-bg-translucent-subtle)}.no-menu-default::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([class^=first-level][active]) .no-menu-default::slotted(a){background-color:var(--sgds-primary-surface-translucent);color:var(--sgds-primary-color-emphasis)!important}:host([class^=first-level][disabled]) .no-menu-default::slotted(a){opacity:var(--sgds-opacity-50);pointer-events:none}`;class ed extends Pe{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.isLink=!1,this._collapseId=Oi("sidenav","collapse"),this._buttonId=Oi("sidenav","button"),this._levelId=Oi("sidenav","this"),this._firstLevelId="first-level-"+this._levelId,this._secondLevelId="second-level-"+this._levelId,this._thirdLevelId="third-level-"+this._levelId,this.index="-1"}_onToggle(){this.emit("sgds-toggle",{detail:{index:this.index}})}async show(){if(!this.isLink&&!this.active)return this.active=!0,it(this,"sgds-after-show")}async hide(){if(!this.isLink&&this.active)return this.active=!1,it(this,"sgds-after-hide")}connectedCallback(){super.connectedCallback(),this.classList.add(this._firstLevelId)}firstUpdated(e){super.firstUpdated(e),this.isLink||(this.body.hidden=!this.active,this.body.style.height=this.active?"auto":"0"),this._handleOpenMenu()}_handleOpenMenu(){this.active||(this.active=this._items.some(e=>e.active))}_handleSummaryClick(){this.active?this.hide():this.show(),this._onToggle(),this.header.focus()}_handleSummaryKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.active?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.isLink)if(this.active){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.active=!1);await Qe(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=tt(this,"sidenav.show");await Ke(this.body,Xe(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.active=!0);await Qe(this.body);const{keyframes:e,options:t}=tt(this,"sidenav.hide");await Ke(this.body,Xe(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase());if(t.length>1)return console.error("More than one anchor tag is added to sgds-sidenav-item");if(1===t.length){const e=t[0];return this.disabled&&e.setAttribute("tabindex","-1"),this.active&&e.setAttribute("aria-current","true"),this.isLink=!0}e.target.assignedElements({flatten:!0}).filter(e=>"sgds-sidenav-item"===e.tagName.toLowerCase()).forEach(e=>{const t=Array.from(e.classList).filter(e=>e.startsWith("first-level"))[0];e.classList.replace(t,this._secondLevelId)}),Array.from(this.classList).some(e=>e.startsWith("second-level"))&&this._items.forEach(e=>e.classList.add(this._thirdLevelId)),this._handleOpenMenu()}render(){const e=ee`
|
|
3640
3640
|
<button
|
|
3641
3641
|
@click=${this._handleSummaryClick}
|
|
3642
3642
|
@keydown=${this._handleSummaryKeyDown}
|
|
@@ -3661,7 +3661,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3661
3661
|
</div>
|
|
3662
3662
|
`,t=ee` <slot @slotchange=${this._handleSlotChange} class="no-menu-default"></slot> `;return ee`
|
|
3663
3663
|
<div class="sidenav-item" aria-haspopup="${!this.isLink}">${this.isLink?t:e}</div>
|
|
3664
|
-
`}}ed.styles=[...Pe.styles,Jl],ed.dependencies={"sgds-icon":
|
|
3664
|
+
`}}ed.styles=[...Pe.styles,Jl],ed.dependencies={"sgds-icon":It},e([Be(".sidenav-body")],ed.prototype,"body",void 0),e([Be(".sidenav-btn")],ed.prototype,"header",void 0),e([Ve({type:Boolean,reflect:!0})],ed.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],ed.prototype,"disabled",void 0),e([De()],ed.prototype,"isLink",void 0),e([at("active",{waitUntilFirstUpdate:!0})],ed.prototype,"_handleOpenChange",null),e([Le()],ed.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 td=n`: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 sd extends Pe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-disabled",`${this.disabled}`)}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`),this._anchor[0].setAttribute("aria-disabled",`${this.disabled}`),this.disabled||this._anchor[0].removeAttribute("tabindex")}_handleSlotChange(){this._anchor[0].setAttribute("aria-disabled",`${this.disabled}`),this.disabled&&(this._anchor[0].setAttribute("tabindex","-1"),this._anchor[0].removeAttribute("href"),this._anchor[0].setAttribute("role","link"))}render(){return ee` <slot @slotchange=${this._handleSlotChange}></slot> `}}sd.styles=[...Pe.styles,td],e([Ve({type:Boolean,reflect:!0})],sd.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],sd.prototype,"disabled",void 0),e([Le({flatten:!0})],sd.prototype,"_anchor",void 0),e([at("disabled",{waitUntilFirstUpdate:!0})],sd.prototype,"_handleDisabled",null),rt("sgds-sidenav",Ql),rt("sgds-sidenav-item",ed),rt("sgds-sidenav-link",sd);var id=n`.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 ad extends Pe{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="",this.sheen=!1}render(){const e={width:this.width||void 0,height:this.height||void 0,borderRadius:this.borderRadius||void 0};return ee`
|
|
3665
3665
|
<div
|
|
3666
3666
|
class=${We({skeleton:!0,"skeleton-paragraph":this.rows>0,"auto-size-rows":this.rows>0,sheen:this.sheen&&!this.rows})}
|
|
3667
3667
|
style=${Object.entries(e).filter(([e,t])=>t).map(([e,t])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${t}`).join("; ")}
|
|
@@ -3671,7 +3671,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3671
3671
|
style=${this.borderRadius?`border-radius: ${this.borderRadius}`:ie}
|
|
3672
3672
|
></div>`}):ie}
|
|
3673
3673
|
</div>
|
|
3674
|
-
`}}ad.styles=[id],e([
|
|
3674
|
+
`}}ad.styles=[id],e([Be(".skeleton")],ad.prototype,"skeleton",void 0),e([Ve({type:String,reflect:!0})],ad.prototype,"width",void 0),e([Ve({type:String,reflect:!0})],ad.prototype,"height",void 0),e([Ve({type:String,reflect:!0})],ad.prototype,"borderRadius",void 0),e([Ve({type:Number,reflect:!0})],ad.prototype,"rows",void 0),e([Ve({type:Boolean,reflect:!0})],ad.prototype,"sheen",void 0),rt("sgds-skeleton",ad),rt("sgds-spinner",Ha);var od=n`.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 nd extends Pe{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 ee`
|
|
3675
3675
|
<div
|
|
3676
3676
|
class="stepper ${We({[`${this.orientation}`]:this.orientation,clickable:this.clickable})}"
|
|
3677
3677
|
>
|
|
@@ -3693,7 +3693,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3693
3693
|
</div>
|
|
3694
3694
|
`)}
|
|
3695
3695
|
</div>
|
|
3696
|
-
`}}nd.styles=[...Pe.styles,od],nd.dependencies={"sgds-icon":
|
|
3696
|
+
`}}nd.styles=[...Pe.styles,od],nd.dependencies={"sgds-icon":It},e([Ve({type:Array})],nd.prototype,"steps",void 0),e([Ve({type:Number,reflect:!0})],nd.prototype,"activeStep",void 0),e([Ve({type:String,reflect:!0})],nd.prototype,"orientation",void 0),e([Ve({type:Boolean,reflect:!0})],nd.prototype,"clickable",void 0),e([xa("activeStep")],nd.prototype,"defaultActiveStep",void 0),e([at("activeStep",{waitUntilFirstUpdate:!0})],nd.prototype,"_handleActiveStepChange",null),rt("sgds-stepper",nd);var rd=n`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]{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-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-14)}: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-20)}: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]{--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 ld extends Pe{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 Hi(this,"[default]","leftLabel"),this._inputId=Oi("switch")}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this.hasLeftLabelSlot||(this.hasLeftLabelSlot=this.hasSlotController.test("leftLabel"))}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}_handleChange(){this.checked=!this.checked,this.emit("sgds-change",{detail:{checked:this.checked}})}_handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||this.click()}_handleDisabledChange(){this.input.disabled=this.disabled}render(){const e=!this.hasDefaultSlot&&!this.hasLeftLabelSlot;return ee`
|
|
3697
3697
|
<div class="form-check">
|
|
3698
3698
|
<label
|
|
3699
3699
|
for="${this._inputId}"
|
|
@@ -3719,7 +3719,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3719
3719
|
<slot></slot>
|
|
3720
3720
|
</label>
|
|
3721
3721
|
</div>
|
|
3722
|
-
`}}ld.styles=[...Pe.styles,Va,rd],e([Ve({reflect:!0,type:String})],ld.prototype,"size",void 0),e([Ve({reflect:!0,type:Boolean})],ld.prototype,"icon",void 0),e([Ve({type:Boolean,reflect:!0})],ld.prototype,"checked",void 0),e([Ve({type:Boolean,reflect:!0})],ld.prototype,"disabled",void 0),e([Ve({type:Boolean})],ld.prototype,"hasDefaultSlot",void 0),e([Ve({type:Boolean})],ld.prototype,"hasLeftLabelSlot",void 0),e([xa("checked")],ld.prototype,"defaultChecked",void 0),e([
|
|
3722
|
+
`}}ld.styles=[...Pe.styles,Va,rd],e([Ve({reflect:!0,type:String})],ld.prototype,"size",void 0),e([Ve({reflect:!0,type:Boolean})],ld.prototype,"icon",void 0),e([Ve({type:Boolean,reflect:!0})],ld.prototype,"checked",void 0),e([Ve({type:Boolean,reflect:!0})],ld.prototype,"disabled",void 0),e([Ve({type:Boolean})],ld.prototype,"hasDefaultSlot",void 0),e([Ve({type:Boolean})],ld.prototype,"hasLeftLabelSlot",void 0),e([xa("checked")],ld.prototype,"defaultChecked",void 0),e([Be('input[type="checkbox"]')],ld.prototype,"input",void 0),e([at("disabled",{waitUntilFirstUpdate:!0})],ld.prototype,"_handleDisabledChange",null),rt("sgds-switch",ld);var dd=n`.banner-wrapper{display:block;width:100%}.banner,.banner-wrapper{background-color:var(--sgds-surface-fixed-dark)}.banner{align-items:center;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-mainnav-mobile-padding-x);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-12);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:1024px){.pagination,sgds-close-button{position:static}.banner{margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding-left:var(--sgds-mainnav-padding-x);padding-right:var(--sgds-mainnav-padding-x)}:host([fluid]) .banner{max-width:none}}`;const cd="no-clamp-action-context",hd="system-banner-children-count-context";class ud extends Pe{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this.noClampAction=!1,this.fluid=!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=tt(this,`banner.item.${t}`);await Ke(e,s.keyframes,s.options)}_startAutoCycle(){this._stopAutoCycle(),this._intervalId=setInterval(()=>this._next(),this._intervalTime)}_stopAutoCycle(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)}_resetAutoCycle(){this._stopAutoCycle(),this._startAutoCycle()}_pauseAutoCycle(){this._stopAutoCycle()}_resumeAutoCycle(){this.show&&this.childCount>1&&this._startAutoCycle()}render(){return ee`
|
|
3723
3723
|
<div class="banner-wrapper">
|
|
3724
3724
|
<div
|
|
3725
3725
|
class="${We({banner:!0})}"
|
|
@@ -3755,7 +3755,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3755
3755
|
`:ie}
|
|
3756
3756
|
</div>
|
|
3757
3757
|
</div>
|
|
3758
|
-
`}}ud.styles=[...Pe.styles,dd],ud.dependencies={"sgds-close-button":mt,"sgds-icon":
|
|
3758
|
+
`}}ud.styles=[...Pe.styles,dd],ud.dependencies={"sgds-close-button":mt,"sgds-icon":It,"sgds-icon-button":er},e([Ve({type:Boolean,reflect:!0})],ud.prototype,"show",void 0),e([Ve({type:Boolean,reflect:!0})],ud.prototype,"dismissible",void 0),e([fl({context:cd}),Ve({type:Boolean})],ud.prototype,"noClampAction",void 0),e([Ve({type:Boolean,reflect:!0})],ud.prototype,"fluid",void 0),e([Le({flatten:!0})],ud.prototype,"bannerItem",void 0),e([Be(".banner")],ud.prototype,"banner",void 0),e([fl({context:hd}),De()],ud.prototype,"childCount",void 0),e([De()],ud.prototype,"_intervalId",void 0),e([De()],ud.prototype,"_currentIndex",void 0),e([at("show",{waitUntilFirstUpdate:!0})],ud.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 pd=n`:host{display:block;font-size:var(--sgds-font-size-14,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}::slotted(:not(sgds-icon)){color:var(--sgds-color-fixed-light)!important;font-size:var(--sgds-font-size-14,14px)!important;line-height:var(--sgds-line-height-20,20px)!important}.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-word}.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-2-xl);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-14,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:1024px){.banner-item__message_and__action{align-items:center;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)}}`;class gd extends Pe{constructor(){super(...arguments),this.hasActionSlot=!1,this.noClampAction=!1,this.clamped=!1,this.siblingsCount=0,this.hasSlotController=new Hi(this,"action","icon","badge")}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")),this.hasSlotController.test("icon")&&this.hasSlotController.test("badge")&&console.error("Both icon and badge slot are used in the same banner item. This is not recommended as it may cause layout issues.")}_clampCheck(){const e=this.shadowRoot.querySelector(".message");requestAnimationFrame(()=>{this.clamped=e.scrollHeight>e.clientHeight})}_handleShowMoreClick(){this.emit("sgds-show-more")}render(){return ee`
|
|
3759
3759
|
<div class="banner-item">
|
|
3760
3760
|
<slot name="icon"></slot>
|
|
3761
3761
|
<div class="banner-item__message_and__action">
|
|
@@ -3780,7 +3780,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3780
3780
|
<slot name="icon"></slot>
|
|
3781
3781
|
<slot></slot>
|
|
3782
3782
|
</div>
|
|
3783
|
-
`}}fd.styles=[vd],e([
|
|
3783
|
+
`}}fd.styles=[vd],e([Be(".tab")],fd.prototype,"tab",void 0),e([Ve({reflect:!0})],fd.prototype,"panel",void 0),e([Ve({type:Boolean,reflect:!0})],fd.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],fd.prototype,"disabled",void 0),e([at("active")],fd.prototype,"handleActiveChange",null),e([at("disabled")],fd.prototype,"handleDisabledChange",null);var bd=n`.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 wd extends Pe{constructor(){super(...arguments),this._tabs=[],this._panels=[],this.variant="underlined",this.orientation="horizontal",this.density="default"}connectedCallback(){const e=Promise.all([customElements.whenDefined("sgds-tab"),customElements.whenDefined("sgds-tab-panel")]);super.connectedCallback(),this._resizeObserver=new ResizeObserver(()=>{}),this._mutationObserver=new MutationObserver(e=>{e.some(e=>!["aria-labelledby","aria-controls"].includes(e.attributeName))&&setTimeout(()=>this._setAriaLabels()),e.some(e=>"disabled"===e.attributeName)&&this._syncTabsAndPanels()}),this.updateComplete.then(()=>{this._syncTabsAndPanels(),this._mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this._resizeObserver.observe(this._nav),e.then(()=>{new IntersectionObserver((e,t)=>{var s;e[0].intersectionRatio>0&&(this._setAriaLabels(),this._setActiveTab(null!==(s=this._getActiveTab())&&void 0!==s?s:this._tabs[0],{emitEvents:!1}),t.unobserve(e[0].target))}).observe(this._tabGroup)})})}disconnectedCallback(){this._mutationObserver.disconnect(),this._resizeObserver.unobserve(this._nav)}show(e){const t=this._tabs.find(t=>t.panel===e);t&&this._setActiveTab(t)}_getAllTabs(e={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter(t=>e.includeDisabled?"sgds-tab"===t.tagName.toLowerCase():"sgds-tab"===t.tagName.toLowerCase()&&!t.disabled)}_getAllPanels(){return[...this._body.assignedElements()].filter(e=>"sgds-tab-panel"===e.tagName.toLowerCase())}_getActiveTab(){return this._tabs.find(e=>e.active)}_handleClick(e){const t=e.target.closest("sgds-tab");(null==t?void 0:t.closest("sgds-tab-group"))===this&&null!==t&&this._setActiveTab(t)}_handleKeyDown(e){const t=e.target.closest("sgds-tab");if((null==t?void 0:t.closest("sgds-tab-group"))===this&&(["Enter"," "].includes(e.key)&&null!==t&&(this._setActiveTab(t),e.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))){const t=this._tabs.find(e=>e.matches(":focus"));if("sgds-tab"===(null==t?void 0:t.tagName.toLowerCase())){let s=this._tabs.indexOf(t);"Home"===e.key?s=0:"End"===e.key?s=this._tabs.length-1:"ArrowUp"===e.key||"ArrowLeft"===e.key?s--:"ArrowDown"!==e.key&&"ArrowRight"!==e.key||s++,s<0&&(s=this._tabs.length-1),s>this._tabs.length-1&&(s=0),this._tabs[s].focus({preventScroll:!0}),this._setActiveTab(this._tabs[s]),e.preventDefault()}}}_setActiveTab(e,t){if(t=Object.assign({emitEvents:!0},t),e!==this._activeTab&&!e.disabled){const s=this._activeTab;this._activeTab=e,this._tabs.forEach(e=>{e.active=e===this._activeTab}),this._panels.map(e=>{var t;return e.active=e.name===(null===(t=this._activeTab)||void 0===t?void 0:t.panel)}),t.emitEvents&&(s&&this.emit("sgds-tab-hide",{detail:{name:s.panel}}),this.emit("sgds-tab-show",{detail:{name:this._activeTab.panel}}))}}_setAriaLabels(){this._tabs.forEach(e=>{const t=this._panels.find(t=>t.name===e.panel);t&&(e.setAttribute("aria-controls",t.getAttribute("id")),t.setAttribute("aria-labelledby",e.getAttribute("id")))})}_syncTabsAndPanels(){this._tabs=this._getAllTabs({includeDisabled:!1}),this._panels=this._getAllPanels()}_updateTabsAttribute(e){if(!this._navSlot)return;this._navSlot.forEach(t=>{t.setAttribute(e,this[e])})}_handleSlotChange(){this._updateTabsAttribute("variant"),this._updateTabsAttribute("orientation"),this._updateTabsAttribute("density"),this._syncTabsAndPanels()}willUpdate(e){e.has("variant")&&this._updateTabsAttribute("variant"),e.has("orientation")&&this._updateTabsAttribute("orientation"),e.has("density")&&this._updateTabsAttribute("density")}render(){return ee`
|
|
3784
3784
|
<div class="tab-group" @click=${this._handleClick} @keydown=${this._handleKeyDown}>
|
|
3785
3785
|
<div class="tab-group__nav" role="tablist">
|
|
3786
3786
|
<slot name="nav" @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -3789,7 +3789,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3789
3789
|
<slot class="tab-group__body" @slotchange=${this._syncTabsAndPanels}></slot>
|
|
3790
3790
|
</div>
|
|
3791
3791
|
</div>
|
|
3792
|
-
`}}wd.styles=[...Pe.styles,bd],e([
|
|
3792
|
+
`}}wd.styles=[...Pe.styles,bd],e([Be(".tab-group")],wd.prototype,"_tabGroup",void 0),e([Be(".tab-group__body")],wd.prototype,"_body",void 0),e([Be(".tab-group__nav")],wd.prototype,"_nav",void 0),e([Ve({type:String,reflect:!0})],wd.prototype,"variant",void 0),e([Ve({type:String,reflect:!0})],wd.prototype,"orientation",void 0),e([Ve({type:String,reflect:!0})],wd.prototype,"density",void 0),e([Le({slot:"nav",flatten:!0})],wd.prototype,"_navSlot",void 0);var yd=n`.tab-panel{display:block}.tab-panel:not(.tab-panel--active){display:none}`;let xd=0;class kd extends Pe{constructor(){super(...arguments),this.attrId=++xd,this.componentId=`sgds-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}_handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return ee`
|
|
3793
3793
|
<slot
|
|
3794
3794
|
class=${We({"tab-panel":!0,"tab-panel--active":this.active})}
|
|
3795
3795
|
></slot>
|
|
@@ -3843,7 +3843,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3843
3843
|
class=${We({"table-head":!0,"header-background":this._headerBackground})}
|
|
3844
3844
|
>
|
|
3845
3845
|
<slot></slot>
|
|
3846
|
-
</div>`}}$d.styles=[...Pe.styles,Sd],e([bl({context:Cd,subscribe:!0}),De()],$d.prototype,"_headerBackground",void 0),e([at("_headerBackground")],$d.prototype,"_handleHeaderBackground",null);var Ad=n`:host{display:table-row;width:100%}`;class Vd extends Pe{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return ee`<slot class="table-row"></slot>`}}Vd.styles=[...Pe.styles,Ad];var Dd=n`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;vertical-align:middle}.table-cell{align-items:center;display:flex;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}`;class Ed extends Pe{connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return ee`<div class="table-cell"><slot></slot></div>`}}Ed.styles=[...Pe.styles,Dd],rt("sgds-table",Md),rt("sgds-table-head",$d),rt("sgds-table-row",Vd),rt("sgds-table-cell",Ed);var
|
|
3846
|
+
</div>`}}$d.styles=[...Pe.styles,Sd],e([bl({context:Cd,subscribe:!0}),De()],$d.prototype,"_headerBackground",void 0),e([at("_headerBackground")],$d.prototype,"_handleHeaderBackground",null);var Ad=n`:host{display:table-row;width:100%}`;class Vd extends Pe{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return ee`<slot class="table-row"></slot>`}}Vd.styles=[...Pe.styles,Ad];var Dd=n`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;vertical-align:middle}.table-cell{align-items:center;display:flex;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}`;class Ed extends Pe{connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return ee`<div class="table-cell"><slot></slot></div>`}}Ed.styles=[...Pe.styles,Dd],rt("sgds-table",Md),rt("sgds-table-head",$d),rt("sgds-table-row",Vd),rt("sgds-table-cell",Ed);var Zd=n`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 Bd extends(_a(Ea)){constructor(){super(...arguments),this.value="",this.spellcheck=!1,this.rows=4,this.placeholder="Placeholder",this.invalidFeedback="",this.autofocus=!1,this.readonly=!1,this.resize="vertical",this.defaultValue="",this.hasFeedback=!1,this.required=!1,this.noValidate=!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(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_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._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_handleValueChange(){this.updateComplete.then(()=>this._setTextareaHeight())}_renderHintText(){const e=pt` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_wordCount(){return pt`
|
|
3847
3847
|
<div
|
|
3848
3848
|
class="form-text word-count ${We({"invalid-feedback":this.invalid&&this.hasFeedback})}"
|
|
3849
3849
|
>
|
|
@@ -3889,7 +3889,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3889
3889
|
${this.maxlength>0?this._wordCount():ie}
|
|
3890
3890
|
</div>
|
|
3891
3891
|
</div>
|
|
3892
|
-
`}}
|
|
3892
|
+
`}}Bd.styles=[...Ea.styles,ya,Zd],e([Be("textarea.form-control-group")],Bd.prototype,"textarea",void 0),e([Ve({type:String,reflect:!0})],Bd.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],Bd.prototype,"value",void 0),e([Ve({type:Number,reflect:!0})],Bd.prototype,"minlength",void 0),e([Ve({type:Number,reflect:!0})],Bd.prototype,"maxlength",void 0),e([Ve({type:Boolean,reflect:!0})],Bd.prototype,"spellcheck",void 0),e([Ve({type:Number})],Bd.prototype,"rows",void 0),e([Ve({type:String,reflect:!0})],Bd.prototype,"placeholder",void 0),e([Ve({type:String,reflect:!0})],Bd.prototype,"invalidFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Bd.prototype,"autofocus",void 0),e([Ve({type:Boolean,reflect:!0})],Bd.prototype,"readonly",void 0),e([Ve({type:String,reflect:!0})],Bd.prototype,"resize",void 0),e([Ve({type:String,reflect:!0})],Bd.prototype,"inputmode",void 0),e([Ve({type:Boolean,reflect:!0})],Bd.prototype,"autocorrect",void 0),e([xa()],Bd.prototype,"defaultValue",void 0),e([Ve({type:Boolean,reflect:!0})],Bd.prototype,"hasFeedback",void 0),e([Ve({type:Boolean,reflect:!0})],Bd.prototype,"required",void 0),e([Ve({type:Boolean,reflect:!0})],Bd.prototype,"noValidate",void 0),e([Ve({reflect:!0})],Bd.prototype,"hintText",void 0),e([De()],Bd.prototype,"_isTouched",void 0),e([at("rows",{waitUntilFirstUpdate:!0})],Bd.prototype,"_handleRowsChange",null),e([at("_isTouched",{waitUntilFirstUpdate:!0})],Bd.prototype,"_handleIsTouched",null),e([at("disabled",{waitUntilFirstUpdate:!0})],Bd.prototype,"_handleDisabledChange",null),e([at("value",{waitUntilFirstUpdate:!0})],Bd.prototype,"_handleValueChange",null),rt("sgds-textarea",Bd);var Id=n`: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 Ld extends Pe{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,it(this,"sgds-after-show")}async hideToast(){if(this.show)return this.show=!1,it(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=tt(this,"toast.show");this.noAnimation||await Ke(this.toast,e.keyframes,e.options),this.emit("sgds-after-show")}else{this.emit("sgds-hide");const e=tt(this,"toast.hide");this.noAnimation||await Ke(this.toast,e.keyframes,e.options),this.toast.classList.add("d-none"),this.emit("sgds-after-hide")}}firstUpdated(e){var t;if(super.firstUpdated(e),this.show||this.toast.classList.add("d-none"),0===this._actionNodes.length)return null===(t=this.shadowRoot.querySelector("slot[name='action']"))||void 0===t?void 0:t.classList.add("d-none")}render(){return this.autohide&&this.show&&setTimeout(()=>{this.show=!1},this.delay),ee`
|
|
3893
3893
|
<div
|
|
3894
3894
|
class="toast"
|
|
3895
3895
|
role="alert"
|
|
@@ -3911,7 +3911,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3911
3911
|
@click=${this.handleCloseClick}
|
|
3912
3912
|
></sgds-close-button>`:ie}
|
|
3913
3913
|
</div>
|
|
3914
|
-
`}}Ld.styles=[...Pe.styles,
|
|
3914
|
+
`}}Ld.styles=[...Pe.styles,Id],Ld.dependencies={"sgds-close-button":mt},e([Be("div.toast")],Ld.prototype,"toast",void 0),e([Ve({type:Boolean,reflect:!0})],Ld.prototype,"show",void 0),e([Ve({type:String,reflect:!0})],Ld.prototype,"title",void 0),e([Ve({type:Boolean,reflect:!0})],Ld.prototype,"noAnimation",void 0),e([Ve({type:Boolean,reflect:!0})],Ld.prototype,"autohide",void 0),e([Ve({type:Number,reflect:!0})],Ld.prototype,"delay",void 0),e([Ve({type:String,reflect:!0})],Ld.prototype,"variant",void 0),e([Ve({type:Boolean,reflect:!0})],Ld.prototype,"dismissible",void 0),e([at("show",{waitUntilFirstUpdate:!0})],Ld.prototype,"handleShowChange",null),e([Fe({slot:"action",flatten:!0})],Ld.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 Fd=n`.top-start{top:var(--toast-container-top)}.middle-start,.top-start{left:var(--toast-container-left)}.middle-start{top:50%;transform:translateY(-50%)}.middle-center{left:50%;top:50%;transform:translate(-50%,-50%)}.middle-end{right:var(--toast-container-right);top:50%;transform:translateY(-50%)}.toast-container{--toast-container-top:calc(108px + var(--sgds-spacer-8));--toast-container-right:var(--sgds-spacer-8);--toast-container-left:var(--sgds-spacer-8);--toast-container-bottom:var(--sgds-spacer-8);max-width:100%;pointer-events:none;position:fixed;width:max-content;z-index:1200}.top-center{left:50%;transform:translateX(-50%)}.top-center,.top-end{top:var(--toast-container-top)}.top-end{right:var(--toast-container-right)}.bottom-start{left:var(--toast-container-left)}.bottom-center,.bottom-start{bottom:var(--toast-container-bottom)}.bottom-center{left:50%;transform:translateX(-50%)}.bottom-end{bottom:var(--toast-container-bottom);right:var(--toast-container-right)}slot{display:flex;flex-direction:column;gap:.5rem}`;class Td extends Pe{render(){return pt`
|
|
3915
3915
|
<div
|
|
3916
3916
|
class=${We({"toast-container":!0,[this.position]:this.position})}
|
|
3917
3917
|
>
|
|
@@ -3922,7 +3922,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3922
3922
|
<ul class="contents">
|
|
3923
3923
|
<slot name="contents"></slot>
|
|
3924
3924
|
</ul>
|
|
3925
|
-
</div> `}}Hd.styles=[...Pe.styles,Pd],rt("sgds-table-of-contents",Hd);var zd=n`:host{display:block}nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:relative;width:100%;z-index:var(--sgds-z-index-raised)}.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-xs:var(--sgds-margin-none);flex:1 1 auto;margin-bottom:var(--sgds-margin-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}}`,Rd=n`.sgds-container{max-width:calc(100% - 40px)}.sgds-container,.sgds-container-sidebar{margin-left:auto;margin-right:auto;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-container-sidebar{max-width:calc(100% - 96px)}.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-sidebar{max-width:var(--sgds-dimension-840)}.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-container-sidebar{max-width:var(--sgds-dimension-888)}.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-container-sidebar{max-width:var(--sgds-dimension-1024)}.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 Od extends Pe{constructor(){super(...arguments),this.hasActionsSlot=!1,this.isCollapsed=!1,this.isMenuOpen=!1,this.hasSlotController=new Hi(this,"actions"),this._handleResize=async()=>{this.isCollapsed=window.innerWidth<wl,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<wl?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){Nd.includes(e.key)&&(e.preventDefault(),this._toggleMenu())}async show(){if(!this.isMenuOpen)return this.isMenuOpen=!0,it(this,"sgds-after-show")}async hide(){if(this.isMenuOpen)return this.isMenuOpen=!1,document.querySelector("body").style.removeProperty("overflow"),it(this,"sgds-after-hide")}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!1);await Qe(this.mobileNav),this.isCollapsed&&(this.mobileNav.style.display="flex");const{keyframes:e,options:t}=tt(this,"subnav.show");await Ke(this.mobileNav,Xe(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 Qe(this.mobileNav);const{keyframes:e,options:t}=tt(this,"subnav.hide");await Ke(this.mobileNav,Xe(e,this.mobileNav.scrollHeight),t),this.isCollapsed&&(this.mobileNav.style.display="none"),this.emit("sgds-after-hide")}async handleOpenChange(){this.isMenuOpen?this._animateToShow():this._animateToHide()}async handleCollapsedChange(){await this.updateComplete,this.mobileNav.style.display=this.isCollapsed?"none":"flex"}render(){return ee`
|
|
3925
|
+
</div> `}}Hd.styles=[...Pe.styles,Pd],rt("sgds-table-of-contents",Hd);var zd=n`: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-xs:var(--sgds-margin-none);flex:1 1 auto;margin-bottom:var(--sgds-margin-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}}`,Rd=n`.sgds-container{max-width:calc(100% - 40px)}.sgds-container,.sgds-container-sidebar{margin-left:auto;margin-right:auto;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-container-sidebar{max-width:calc(100% - 96px)}.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-sidebar{max-width:var(--sgds-dimension-840)}.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-container-sidebar{max-width:var(--sgds-dimension-888)}.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-container-sidebar{max-width:var(--sgds-dimension-1024)}.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 Od=["Enter"," "];class Nd extends Pe{constructor(){super(...arguments),this.hasActionsSlot=!1,this.isCollapsed=!1,this.isMenuOpen=!1,this.hasSlotController=new Hi(this,"actions"),this._handleResize=async()=>{this.isCollapsed=window.innerWidth<wl,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<wl?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){Od.includes(e.key)&&(e.preventDefault(),this._toggleMenu())}async show(){if(!this.isMenuOpen)return this.isMenuOpen=!0,it(this,"sgds-after-show")}async hide(){if(this.isMenuOpen)return this.isMenuOpen=!1,document.querySelector("body").style.removeProperty("overflow"),it(this,"sgds-after-hide")}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!1);await Qe(this.mobileNav),this.isCollapsed&&(this.mobileNav.style.display="flex");const{keyframes:e,options:t}=tt(this,"subnav.show");await Ke(this.mobileNav,Xe(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 Qe(this.mobileNav);const{keyframes:e,options:t}=tt(this,"subnav.hide");await Ke(this.mobileNav,Xe(e,this.mobileNav.scrollHeight),t),this.isCollapsed&&(this.mobileNav.style.display="none"),this.emit("sgds-after-hide")}async handleOpenChange(){this.isMenuOpen?this._animateToShow():this._animateToHide()}async handleCollapsedChange(){await this.updateComplete,this.mobileNav.style.display=this.isCollapsed?"none":"flex"}render(){return ee`
|
|
3926
3926
|
<nav aria-label="Sub navigation">
|
|
3927
3927
|
<div
|
|
3928
3928
|
class=${We({"sgds-container":!0,subnav:!0,collapsed:!this.isMenuOpen})}
|
|
@@ -3951,10 +3951,10 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
3951
3951
|
</div>
|
|
3952
3952
|
</div>
|
|
3953
3953
|
</nav>
|
|
3954
|
-
`}}
|
|
3954
|
+
`}}Nd.styles=[...Pe.styles,zd,Rd],Nd.dependencies={"sgds-icon":It},e([Ve({type:Boolean})],Nd.prototype,"hasActionsSlot",void 0),e([Be("nav")],Nd.prototype,"nav",void 0),e([Be(".subnav-nav")],Nd.prototype,"mobileNav",void 0),e([Be(".header-container")],Nd.prototype,"headerContainer",void 0),e([Be(".subnav-toggler")],Nd.prototype,"toggler",void 0),e([Be(".subnav-nav-group")],Nd.prototype,"navGroup",void 0),e([Be(".subnav-actions")],Nd.prototype,"mobileActions",void 0),e([De()],Nd.prototype,"isCollapsed",void 0),e([De()],Nd.prototype,"isMenuOpen",void 0),e([at("isMenuOpen",{waitUntilFirstUpdate:!0})],Nd.prototype,"handleOpenChange",null),e([at("isCollapsed",{waitUntilFirstUpdate:!0})],Nd.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 Ud=n`:host(:not([disabled])[active]:not([active=false])) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle);border-bottom:none}::slotted(*){--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-14)!important;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 qd extends Pe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(s.length>1)console.error("More than one anchor tag is added to sgds-subnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===s.length){const e=s[0];this.active&&e.setAttribute("aria-current","true"),this.disabled&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}qd.styles=[...Pe.styles,Ud],e([Ve({type:Boolean,reflect:!0})],qd.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],qd.prototype,"disabled",void 0),e([at("disabled")],qd.prototype,"_handleDisabled",null),rt("sgds-subnav",Nd),rt("sgds-subnav-item",qd);var Yd=n`: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}slot[id=default].is-loading,slot[id=default].is-loading::slotted(*){display:none}`;class jd extends Aa{constructor(){super(...arguments),this._renderItemContent=()=>ee`<div class="normal-item-content">
|
|
3955
3955
|
<slot></slot>
|
|
3956
3956
|
${this.active?ee` <sgds-icon name="check"></sgds-icon> `:ie}
|
|
3957
|
-
</div>`}}jd.dependencies={"sgds-icon":
|
|
3957
|
+
</div>`}}jd.dependencies={"sgds-icon":It};class Wd extends Ma{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&&await this.updateFloatingPosition()}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)}_renderMenu(){const e=this.menuList.map(e=>{const t=e.value===this.value;return ee`
|
|
3958
3958
|
<sgds-select-option
|
|
3959
3959
|
?active=${t}
|
|
3960
3960
|
value=${e.value}
|
|
@@ -4004,7 +4004,7 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
4004
4004
|
${this.loading?this._renderLoadingMenu():ie}
|
|
4005
4005
|
</ul>
|
|
4006
4006
|
</div>
|
|
4007
|
-
`}}Wd.styles=[...Ma.styles,ya,Yd],Wd.childName="sgds-select-option",Wd.dependencies={"sgds-icon":
|
|
4007
|
+
`}}Wd.styles=[...Ma.styles,ya,Yd],Wd.childName="sgds-select-option",Wd.dependencies={"sgds-icon":It,"sgds-spinner":Ha,[Wd.childName]:jd},e([Le({flatten:!0,selector:"sgds-select-option"})],Wd.prototype,"options",void 0),e([at("value",{waitUntilFirstUpdate:!0})],Wd.prototype,"_handleValueChange",null),rt("sgds-select",Wd),rt("sgds-select-option",jd);var Kd=n`:host([noPadding]) .card{background-color:inherit;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent)}: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 Gd extends ga{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?ht`a`:ht`div`,t=!this.stretchedLink||this.disabled?-1:0;return pt`
|
|
4008
4008
|
<${e}
|
|
4009
4009
|
class="card ${We({disabled:this.disabled})}"
|
|
4010
4010
|
tabindex=${t}
|
|
@@ -4083,136 +4083,5 @@ const zl="important",Rl=" !"+zl;const Nl=Ye(class extends je{constructor(e){if(s
|
|
|
4083
4083
|
</slot>
|
|
4084
4084
|
</div>
|
|
4085
4085
|
</${e}>
|
|
4086
|
-
`}}ec.styles=[...ga.styles,Jd],e([Fe({slot:"icon",flatten:!0})],ec.prototype,"_iconNode",void 0),e([Fe({slot:"upper",flatten:!0})],ec.prototype,"_upperNode",void 0),e([Le({slot:"footer"})],ec.prototype,"footerNode",void 0),e([Le({slot:"link"})],ec.prototype,"linkNode",void 0),e([Ve({type:Boolean,reflect:!0})],ec.prototype,"noPadding",void 0),rt("sgds-icon-card",ec)
|
|
4087
|
-
<div
|
|
4088
|
-
class=${We({sidebar:!0,"sidebar--expanded":!this._sidebarCollapsed,"sidebar--collapsed":this._sidebarCollapsed})}
|
|
4089
|
-
>
|
|
4090
|
-
<div
|
|
4091
|
-
class=${We({"sidebar--overlay":!0,show:this._showDrawer})}
|
|
4092
|
-
></div>
|
|
4093
|
-
|
|
4094
|
-
<div class="sidebar-main">
|
|
4095
|
-
<div class="sidebar-wrapper">
|
|
4096
|
-
<div class="sidebar-top">
|
|
4097
|
-
<div class="sidebar-brand-name">
|
|
4098
|
-
<slot name="top"></slot>
|
|
4099
|
-
</div>
|
|
4100
|
-
|
|
4101
|
-
<sgds-icon-button
|
|
4102
|
-
name=${this._sidebarCollapsed?"sidebar-expand":"sidebar-collapse"}
|
|
4103
|
-
variant="ghost"
|
|
4104
|
-
tone="neutral"
|
|
4105
|
-
size="sm"
|
|
4106
|
-
@click=${this.toggleCollapsed}
|
|
4107
|
-
aria-label=${this._sidebarCollapsed?"Expand sidebar":"Collapse sidebar"}
|
|
4108
|
-
aria-expanded=${!this._sidebarCollapsed}
|
|
4109
|
-
></sgds-icon-button>
|
|
4110
|
-
</div>
|
|
4111
|
-
|
|
4112
|
-
<nav class="sidebar-content" aria-activedescendant=${(null===(e=this._sidebarActiveItem)||void 0===e?void 0:e.name)||""}>
|
|
4113
|
-
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
4114
|
-
</nav>
|
|
4115
|
-
|
|
4116
|
-
<slot name="bottom"></slot>
|
|
4117
|
-
</div>
|
|
4118
|
-
</div>
|
|
4119
|
-
|
|
4120
|
-
<div
|
|
4121
|
-
class=${We({"sidebar-nested-overlay":!0,show:this._showDrawer})}
|
|
4122
|
-
role="dialog"
|
|
4123
|
-
aria-label=${(null===(t=this._sidebarActiveGroup)||void 0===t?void 0:t.title)?`Nested items for ${this._sidebarActiveGroup.title}`:""}
|
|
4124
|
-
>
|
|
4125
|
-
<sgds-icon-button
|
|
4126
|
-
name="chevron-left"
|
|
4127
|
-
variant="ghost"
|
|
4128
|
-
tone="neutral"
|
|
4129
|
-
size="sm"
|
|
4130
|
-
@click=${()=>this._showDrawer=!1}
|
|
4131
|
-
aria-label=${"Close drawer"}
|
|
4132
|
-
aria-expanded=${this._showDrawer}
|
|
4133
|
-
></sgds-icon-button>
|
|
4134
|
-
|
|
4135
|
-
${this._drawerItems}
|
|
4136
|
-
</div>
|
|
4137
|
-
</div>
|
|
4138
|
-
`}}lc.styles=[...Pe.styles,tc],lc.dependencies={"sgds-icon-button":er},e([Ve({type:Boolean,reflect:!0})],lc.prototype,"collapsed",void 0),e([Ve({type:String,reflect:!0})],lc.prototype,"active",void 0),e([fl({context:sc}),De()],lc.prototype,"_sidebarActiveGroup",void 0),e([fl({context:ac}),De()],lc.prototype,"_sidebarCollapsed",void 0),e([fl({context:ic}),De()],lc.prototype,"_sidebarActiveItem",void 0),e([fl({context:oc}),De()],lc.prototype,"_drawerItems",void 0),e([fl({context:nc}),De()],lc.prototype,"_showDrawer",void 0),e([Le()],lc.prototype,"_defaultNodes",void 0),e([De()],lc.prototype,"_isMobile",void 0),e([at("collapsed")],lc.prototype,"_handleCollapsed",null),e([at("_sidebarActiveItem")],lc.prototype,"_handleActiveItem",null),e([at("active")],lc.prototype,"_handleActive",null);var dc=n`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item:focus,.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{margin-left:var(--sgds-margin-2-xl)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-trailingIcon{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed .sidebar-item-label,.sidebar-item--collapsed .sidebar-item-trailingIcon{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`;class cc extends Pe{constructor(){super(...arguments),this.title="",this.name="",this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._sidebarActiveGroup=null,this._drawerItems=null,this._showDrawer=!1,this._childLevel=1,this._selected=!1,this._hidden=!1,this._childElements=[],this._childActive=!1}connectedCallback(){super.connectedCallback(),this.getChildLevel(),this.setAttribute("role","navigation"),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this.getChildLevel()}updated(){2===this._childLevel&&(this._hidden=!this.closest(".sidebar-nested-overlay"))}_handleSlotChange(){this._childElements=this._defaultNodes}_handleClick(){this.emit("i-sgds-click",{detail:{element:this,level:this._childLevel}})}_handleKeyDown(e){var t,s,i;const a=e.target;switch(e.key){case"Enter":return e.preventDefault(),e.stopPropagation(),void(e.target===this&&this._handleClick());case"ArrowDown":{e.preventDefault(),e.stopPropagation();const t=a._childElements[0],s=((null==t?void 0:t._hidden)?null:t)||a.nextElementSibling||a.parentElement.nextElementSibling;if(null==s?void 0:s.shadowRoot){const e=s.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}return}case"ArrowUp":{e.preventDefault(),e.stopPropagation();const s=null===(t=a.previousElementSibling)||void 0===t?void 0:t._childElements,i=s?s[(null==s?void 0:s.length)-1]:null,o=((null==i?void 0:i._hidden)?null:i)||a.previousElementSibling||a.parentElement;if(null==o?void 0:o.shadowRoot){const e=o.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}return}case"ArrowLeft":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this)this._showDrawer&&this._handleClick();else{if(a._childLevel>=2&&(null===(s=this._sidebarActiveGroup)||void 0===s?void 0:s.shadowRoot)){const e=this._sidebarActiveGroup.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}}return;case"ArrowRight":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this){if(null===(i=this._drawerItems)||void 0===i?void 0:i.length)if(this._showDrawer){const e=this._drawerItems[0];if(null==e?void 0:e.shadowRoot){const t=e.shadowRoot.querySelector("[tabindex]");null==t||t.focus()}}else this._handleClick()}else 1===this._childLevel&&this._childElements.length>0&&this._handleClick();return}}getChildLevel(){let e=this.parentElement,t=1;for(;"sgds-sidebar-group"===e.tagName.toLowerCase();)t+=1,e=e.parentElement;const s=e.classList.contains("sidebar-nested-overlay");this._childLevel=s?t+1:t}}cc.styles=Oi.styles,e([Ve({type:String,reflect:!0})],cc.prototype,"title",void 0),e([Ve({type:String,reflect:!0})],cc.prototype,"name",void 0),e([bl({context:ac,subscribe:!0}),De()],cc.prototype,"_sidebarCollapsed",void 0),e([bl({context:ic,subscribe:!0}),De()],cc.prototype,"_sidebarActiveItem",void 0),e([bl({context:sc,subscribe:!0}),De()],cc.prototype,"_sidebarActiveGroup",void 0),e([bl({context:oc,subscribe:!0}),De()],cc.prototype,"_drawerItems",void 0),e([bl({context:nc,subscribe:!0}),De()],cc.prototype,"_showDrawer",void 0),e([De()],cc.prototype,"_childLevel",void 0),e([De()],cc.prototype,"_selected",void 0),e([De()],cc.prototype,"_hidden",void 0),e([De()],cc.prototype,"_childElements",void 0),e([De()],cc.prototype,"_childActive",void 0),e([Le({flatten:!0})],cc.prototype,"_defaultNodes",void 0);class hc extends cc{constructor(){super(...arguments),this._showMenu=!1}get showMenu(){return this._showMenu}_handleClick(){1!==this._childLevel?(this._showMenu=!this._showMenu,this._childElements.forEach(e=>{e._hidden=!this._showMenu})):super._handleClick()}_getIcon(){return 1===this._childLevel?"chevron-right":this._showMenu?"chevron-down":"chevron-up"}render(){return ee`
|
|
4139
|
-
<div
|
|
4140
|
-
class=${We({"sidebar-item":!0,"sidebar-item--collapsed":this._sidebarCollapsed&&1===this._childLevel,active:this._selected})}
|
|
4141
|
-
@click=${()=>this._handleClick()}
|
|
4142
|
-
aria-level=${this._childLevel}
|
|
4143
|
-
.aria-expanded=${this._showMenu}
|
|
4144
|
-
tabindex=${this._childLevel>2&&!this._showMenu?-1:0}
|
|
4145
|
-
>
|
|
4146
|
-
<div class="sidebar-item-label-wrapper">
|
|
4147
|
-
<div>
|
|
4148
|
-
<slot name="leadingIcon"></slot>
|
|
4149
|
-
<span class="sidebar-item-label">${this.title}</span>
|
|
4150
|
-
</div>
|
|
4151
|
-
|
|
4152
|
-
<span class="sidebar-item-trailingIcon">
|
|
4153
|
-
<slot name="trailingIcon"></slot>
|
|
4154
|
-
<sgds-icon aria-label=${this.title||this.name} name=${this._getIcon()} size="sm"></sgds-icon>
|
|
4155
|
-
</span>
|
|
4156
|
-
</div>
|
|
4157
|
-
</div>
|
|
4158
|
-
|
|
4159
|
-
<div
|
|
4160
|
-
class=${We({"sidebar-submenu":!0,"sidebar-submenu--collapsed":this._sidebarCollapsed&&1==this._childLevel,show:this._showMenu})}
|
|
4161
|
-
>
|
|
4162
|
-
<div>
|
|
4163
|
-
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
4164
|
-
</div>
|
|
4165
|
-
</div>
|
|
4166
|
-
`}}hc.styles=[...Pe.styles,dc],hc.dependencies={"sgds-icon":Bt},e([De()],hc.prototype,"_showMenu",void 0);class uc extends cc{render(){return ee`
|
|
4167
|
-
<div
|
|
4168
|
-
class=${We({"sidebar-item":!0,"sidebar-item--collapsed":this._sidebarCollapsed&&1===this._childLevel,active:this._selected})}
|
|
4169
|
-
@click=${()=>this._handleClick()}
|
|
4170
|
-
aria-level=${this._childLevel}
|
|
4171
|
-
aria-label=${this.title||this.name}
|
|
4172
|
-
name=${this.name}
|
|
4173
|
-
tabindex=${this._hidden?-1:0}
|
|
4174
|
-
role="button"
|
|
4175
|
-
>
|
|
4176
|
-
<div class="sidebar-item-label-wrapper">
|
|
4177
|
-
<div>
|
|
4178
|
-
<!-- For level 1 and 2 -->
|
|
4179
|
-
${this._childLevel<=2?ee`<slot name="leadingIcon"></slot>`:ie}
|
|
4180
|
-
<span
|
|
4181
|
-
class=${We({"sidebar-item-label":!0,offset:this._childLevel>2})}
|
|
4182
|
-
>${this.title}</span
|
|
4183
|
-
>
|
|
4184
|
-
</div>
|
|
4185
|
-
|
|
4186
|
-
<!-- For level 1 and 2 -->
|
|
4187
|
-
${this._childLevel<=2?ee`<span class="sidebar-item-trailingIcon">
|
|
4188
|
-
<slot name="trailingIcon"></slot>
|
|
4189
|
-
</span>`:ie}
|
|
4190
|
-
</div>
|
|
4191
|
-
</div>
|
|
4192
|
-
`}}uc.styles=[...Pe.styles,dc];var pc=n`.sidebar-section{display:flex;flex-direction:column}.sidebar-section-label{align-items:center;border-radius:var(--sgds-border-radius-md);color:var(--sgds-label-color-subtle);cursor:pointer;display:flex;font-size:var(--sgds-font-size-0);gap:var(--sgds-gap-2-xs);line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-xs) var(--sgds-padding-sm)}.sidebar-section-label:hover{color:var(--sgds-label-color-default)}.sidebar-section-label:focus,.sidebar-section-label:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-section--collapsed .sidebar-section-label{height:0;margin:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;width:0}.sidebar-section-content{overflow:hidden;padding:0 var(--sgds-padding-xs)}.sidebar-section-content>div{margin-top:0;pointer-events:auto;transition:all var(--sgds-motion-duration-slow) var(--sgds-motion-easing-standard)}.sidebar-section-content.sidebar-section-content--collapsed>div{margin-top:-100%;pointer-events:none}.sidebar-section--collapsed .sidebar-section-content--collapsed>div{margin-top:0}.sidebar-section-seperator{margin-bottom:var(--sgds-margin-md)}`;class gc extends cc{constructor(){super(...arguments),this.title="",this.collapsed=!1,this.collapsible=!1,this.seperator=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this._childLevel=null}_handleClick(){this.collapsible&&(this.collapsed=!this.collapsed)}render(){return ee`
|
|
4193
|
-
<div
|
|
4194
|
-
class=${We({"sidebar-section":!0,"sidebar-section--collapsed":this._sidebarCollapsed})}
|
|
4195
|
-
>
|
|
4196
|
-
${""!==this.title?ee`<div
|
|
4197
|
-
class="sidebar-section-label"
|
|
4198
|
-
@click=${this._handleClick}
|
|
4199
|
-
aria-expanded=${!this.collapsed}
|
|
4200
|
-
aria-disabled=${!this.collapsible}
|
|
4201
|
-
tabindex="0"
|
|
4202
|
-
>
|
|
4203
|
-
<span>${this.title}</span>
|
|
4204
|
-
${this.collapsible?ee`<sgds-icon name=${this.collapsed?"chevron-down":"chevron-up"} size="sm"></sgds-icon>`:ie}
|
|
4205
|
-
</div>`:ie}
|
|
4206
|
-
|
|
4207
|
-
<div
|
|
4208
|
-
class=${We({"sidebar-section-content":!0,"sidebar-section-content--collapsed":this.collapsed&&this.collapsible,"sidebar-section-seperator":this.seperator})}
|
|
4209
|
-
>
|
|
4210
|
-
<div>
|
|
4211
|
-
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
4212
|
-
</div>
|
|
4213
|
-
</div>
|
|
4214
|
-
|
|
4215
|
-
${this.seperator?ee`<sgds-divider></sgds-divider>`:ie}
|
|
4216
|
-
</div>
|
|
4217
|
-
`}}gc.styles=[...Pe.styles,pc],gc.dependencies={"sgds-icon":Bt,"sgds-divider":Qr},e([Ve({type:String,reflect:!0})],gc.prototype,"title",void 0),e([Ve({type:Boolean,reflect:!0})],gc.prototype,"collapsed",void 0),e([Ve({type:Boolean,reflect:!0})],gc.prototype,"collapsible",void 0),e([Ve({type:Boolean,reflect:!0})],gc.prototype,"seperator",void 0),customElements.define("sgds-sidebar",lc),customElements.define("sgds-sidebar-item",uc),customElements.define("sgds-sidebar-section",gc),customElements.define("sgds-sidebar-group",hc)});
|
|
4086
|
+
`}}ec.styles=[...ga.styles,Jd],e([Fe({slot:"icon",flatten:!0})],ec.prototype,"_iconNode",void 0),e([Fe({slot:"upper",flatten:!0})],ec.prototype,"_upperNode",void 0),e([Le({slot:"footer"})],ec.prototype,"footerNode",void 0),e([Le({slot:"link"})],ec.prototype,"linkNode",void 0),e([Ve({type:Boolean,reflect:!0})],ec.prototype,"noPadding",void 0),rt("sgds-icon-card",ec)});
|
|
4218
4087
|
//# sourceMappingURL=index.umd.min.js.map
|