scb-wc 0.1.97 → 0.1.98
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/README.md +22 -41
- package/all.js +5 -0
- package/icons.json +178 -178
- package/index.js +93 -88
- package/mvc/components/all.js +5 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
- package/mvc/components/scb-button/scb-button.js +3 -3
- package/mvc/components/scb-calendar/scb-calendar.js +1 -1
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +4 -4
- package/mvc/components/scb-card/scb-card.js +5 -5
- package/mvc/{vendor → components/scb-chevron}/scb-chevron.js +1 -1
- package/mvc/components/scb-datepicker/scb-datepicker.js +118 -0
- package/mvc/components/scb-dialog/scb-dialog.js +1 -1
- package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
- package/mvc/components/scb-header/scb-header.js +3 -3
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
- package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
- package/mvc/components/scb-list/scb-list-item.js +3 -3
- package/mvc/components/scb-menu/scb-menu-item.js +1 -1
- package/mvc/components/scb-nav/scb-nav.js +2 -2
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +2 -2
- package/mvc/components/scb-search/scb-search.js +1 -1
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
- package/mvc/components/scb-select/scb-select-option.js +1 -1
- package/mvc/components/scb-select/scb-select.js +2 -2
- package/mvc/components/scb-stepper/scb-step.js +1 -1
- package/mvc/components/scb-stepper/scb-stepper.js +2 -2
- package/mvc/components/scb-textfield/scb-textfield.js +24 -141
- package/mvc/components/scb-toc/scb-toc-item.js +1 -1
- package/mvc/components/shared/lazy-focus-ring.js +2 -0
- package/mvc/components/shared/lazy-ripple.js +2 -0
- package/mvc/components/shared/scb-icon-svg.js +11 -0
- package/mvc/scb-logo.svg +20 -20
- package/mvc/scb.svg +13 -13
- package/package.json +2 -2
- package/scb-chevron/scb-chevron.js +1 -0
- package/scb-components/index.d.ts +102 -0
- package/scb-components/scb-chevron/scb-chevron.d.ts +11 -0
- package/scb-components/scb-datepicker/scb-datepicker.d.ts +41 -0
- package/scb-components/shared/lazy-focus-ring.d.ts +4 -0
- package/scb-components/shared/lazy-ripple.d.ts +9 -0
- package/scb-components/shared/scb-icon-svg.d.ts +3 -0
- package/scb-datepicker/scb-datepicker.js +1 -0
- package/scb-dialog/scb-dialog.js +4 -1
- package/scb-header/scb-header.js +2 -1
- package/scb-list/scb-list-item.js +2 -1
- package/scb-select/scb-select.js +4 -1
- package/scb-stepper/scb-stepper.js +4 -1
- package/scb-wc.bundle.js +262 -262
- package/scb-wc.d.ts +204 -194
- package/shared/scb-icon-svg.js +5 -2
- package/mvc/vendor/lazy-focus-ring.js +0 -2
- package/mvc/vendor/lazy-ripple.js +0 -2
- package/mvc/vendor/scb-icon-svg.js +0 -11
- package/scb-wc-public-entry/index.d.ts +0 -97
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["
|
|
2
|
-
import{g as d,h as gt,m as v,p as r,v as l,y as bt}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as g}from"../../vendor/preload-helper.js";import{t as s}from"../../vendor/decorate.js";(function(){try{var
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../shared/lazy-focus-ring.js","../../vendor/preload-helper.js","../shared/lazy-ripple.js","../scb-list/scb-list.js","../../vendor/decorate.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../scb-list/scb-list-item.js","../scb-icon-button/scb-icon-button.js","../../vendor/assertClassBrand.js","../scb-button/scb-button.js","../scb-link/scb-link.js","../../vendor/classPrivateFieldGet2.js","../scb-chip/scb-chip.js","../scb-avatar/scb-avatar.js","../scb-tooltip/scb-tooltip.js","../../vendor/icon.js","../../vendor/rolldown-runtime.js","../../vendor/scb-card-variants.internal.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{g as d,h as gt,m as v,p as r,v as l,y as bt}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as g}from"../../vendor/preload-helper.js";import{t as s}from"../../vendor/decorate.js";(function(){try{var h=typeof globalThis<"u"?globalThis:window;if(!h.__scb_ce_guard_installed__){h.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,a,c){try{customElements.get(t)||e(t,a,c)}catch(p){var n=String(p||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var C,ut=new Set(["social-comments-text","social-comments","social-comments-href","social-likes-text","social-likes","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href"]),R,A,$,L,P,E,D,H,I,F;function vt(){return H??(H=g(()=>import("../shared/lazy-focus-ring.js"),__vite__mapDeps([0,1]),import.meta.url)),H}function W(){return I??(I=g(()=>import("../shared/lazy-ripple.js"),__vite__mapDeps([2,1]),import.meta.url)),I}function yt(){return R??(R=g(()=>import("../scb-list/scb-list.js"),__vite__mapDeps([3,4,5,6,7,1]),import.meta.url)),R}function ft(){return A??(A=g(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([8,9,4,1,5,6]),import.meta.url)),A}function _t(){return $??($=g(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([10,9,4,1,5,6]),import.meta.url)),$}function zt(){return L??(L=g(()=>import("../scb-link/scb-link.js"),__vite__mapDeps([11,9,12,4,1,5,6]),import.meta.url)),L}function xt(){return P??(P=g(()=>import("../scb-chip/scb-chip.js"),__vite__mapDeps([13,9,4,1,5,6]),import.meta.url)),P}function kt(){return E??(E=g(()=>import("../scb-avatar/scb-avatar.js"),__vite__mapDeps([14,9,4,1,5,6]),import.meta.url)),E}function St(){return D??(D=g(()=>import("../scb-tooltip/scb-tooltip.js"),__vite__mapDeps([15,4,1,5,16,17,6]),import.meta.url)),D}function Tt(){return F??(F=g(()=>import("../../vendor/scb-card-variants.internal.js"),__vite__mapDeps([18,5,6]),import.meta.url)),F}var o={fromAttribute:h=>h??"",toAttribute:h=>typeof h!="string"||h.trim()===""?null:h},i=(C=class extends gt{constructor(...e){super(...e),this.__dependencyKey="",this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size="large",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.href="",this.title="",this.cardTitle="",this.subtitle="",this.vignette="",this.vignetteVariant="filled",this.vignetteSpacing=void 0,this.vignetteSpacingTop=void 0,this.vignetteSpacingBottom=void 0,this.vignetteSpacingLeft=void 0,this.vignetteSpacingRight=void 0,this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.likesText="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.editEnabled=!1,this.deleteEnabled=!1,this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=t=>{const a=t.currentTarget.closest(".media");a&&a.classList.add("is-loaded")},this.__ensureRippleOnInteraction=(t,a=!1)=>{if(this.__primaryHref()){if(t&&(this.__pendingRippleEvent=t),a&&(this.__pendingRippleClick=!0),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,W().then(({ensureRippleReady:c})=>c()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}},this.__syncRipple=async()=>{const t=this.renderRoot.querySelector("md-ripple"),a=this.renderRoot.querySelector(".scb-card"),c=this.__pendingRippleEvent,n=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:p}=await W();await p(t,a,c,n)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,vt().then(({ensureFocusRingReady:t})=>t()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=t=>{const a=this.__primaryHref();(t.key==="Enter"||t.key===" ")&&a&&(t.preventDefault(),this.__ensureRippleOnInteraction(void 0,!0),this.__navigate(a,t))},this.__handleHrefNavigation=t=>{const a=this.__primaryHref();a&&(t.target.closest("a")||this.__navigate(a,t))},this.__handleSlottedCardLinkClick=t=>{const a=t.composedPath().find(c=>c instanceof HTMLAnchorElement&&c.getAttribute("slot")==="card-link")?.getAttribute("href")||this.__primaryHref();a&&(this.__dispatchCardNavigate(a,t)||t.preventDefault())}}attributeChangedCallback(e,t,a){this.__isSyncingManagedSocialAttributes&&ut.has(e)||super.attributeChangedCallback(e,t,a)}get likeButton(){return this.cardType!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(e){const t=(e||"").trim();if(!t)return{w:600,h:400};const a=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(a&&a.length===2){const n=Number(a[0]),p=Number(a[1]);if(n>0&&p>0)return{w:n,h:p}}const c=Number(t);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:600,h:400}}__mediaReserveAspect(e=""){const t=(this.mediaAspect||"").trim();if(t)return t;const a=Number(this.mediaWidth)||0,c=Number(this.mediaHeight)||0;return a>0&&c>0?`${a} / ${c}`:e}__mediaReserveStyle(e=""){const t=this.__mediaReserveAspect(e);return t?`--scb-card-media-aspect:${t};`:""}__slottedMediaAspect(){const e=this.querySelector('[slot="media"]');if(!e)return"";const t=Number(e.getAttribute("width"))||0,a=Number(e.getAttribute("height"))||0;return t>0&&a>0?`${t} / ${a}`:""}get __resolvedTitle(){return this.cardTitle||this.title}get cardType(){const e=(this.type||"standard").toLowerCase();switch(e){case"standard":case"list":case"social":case"link":case"action":case"container":return e;default:return"standard"}}__ensureVariantRenderer(){return this.cardType==="standard"||this.__variantRenderer?Promise.resolve():Tt().then(e=>{this.__variantRenderer!==e&&(this.__variantRenderer=e,e.ensureScbCardVariantStyles(this.renderRoot),this.requestUpdate())})}__dispatchCardNavigate(e,t){const a={href:e,originalEvent:t},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:a});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const n=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:a});return this.dispatchEvent(n),!n.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__slottedCardLink(){return this.querySelector(':scope > a[slot="card-link"]')}__primaryHref(){return this.__effectiveHref()||this.__slottedCardLink()?.getAttribute("href")||""}__navigate(e,t){e&&this.__dispatchCardNavigate(e,t)&&window.open(e,"_self")}__slotNames(){const e=new Set;for(const t of Array.from(this.children)){const a=t.getAttribute("slot");a&&e.add(a)}return e}__hasSlottedContent(e,t){return t?t.has(e):Array.from(this.children).some(a=>a.getAttribute("slot")===e)}__hasLightDomElement(e){return!!this.querySelector(e)}__ensureDependenciesReady(){const e=[],t=[],a=this.cardType,c=!!this.vignette?.trim(),n=(_,b)=>{t.push(_),e.push(b())};(a==="list"||this.__hasLightDomElement("scb-list, scb-list-item"))&&n("list",yt),a!=="standard"&&n("card-variants",()=>this.__ensureVariantRenderer()),(a==="social"&&(!this.likesDisabled&&this.likesInteractive||!this.commentsDisabled&&this.commentsHref||this.replyEnabled||this.editEnabled||this.deleteEnabled)||this.__hasLightDomElement("scb-icon-button"))&&n("icon-button",ft),this.__hasLightDomElement("scb-button")&&n("button",_t),this.__hasLightDomElement("scb-link")&&n("link",zt),(c||this.__hasLightDomElement("scb-chip"))&&n("chip",xt),((this.mediaType||"").toLowerCase()==="avatar"||this.__hasLightDomElement("scb-avatar"))&&n("avatar",kt),(a==="social"&&this.likesHoverContent||this.__hasLightDomElement("scb-tooltip"))&&n("tooltip",St);const p=t.sort().join("|");p!==this.__dependencyKey&&(this.__dependencyKey=p,e.length>0&&Promise.all(e).then(()=>this.requestUpdate()))}__mediaTemplate(e){if(this.__hasSlottedContent("media",e)){const t=this.__mediaReserveStyle(this.__slottedMediaAspect());return l`
|
|
3
3
|
<div class="media ${t?"has-reserved-space":""}" style=${t||d}>
|
|
4
4
|
<slot name="media"></slot>
|
|
5
5
|
</div>
|
|
@@ -9,7 +9,7 @@ import{g as d,h as gt,m as v,p as r,v as l,y as bt}from"../../vendor/vendor.js";
|
|
|
9
9
|
<scb-avatar variant="icon" label="${this.__resolvedTitle}" icon-name="person"></scb-avatar>
|
|
10
10
|
</slot>
|
|
11
11
|
</div>
|
|
12
|
-
`;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,a=Number(this.mediaHeight)||0;const c=(this.mediaAspect||"").trim();if(!t||!a){const
|
|
12
|
+
`;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,a=Number(this.mediaHeight)||0;const c=(this.mediaAspect||"").trim();if(!t||!a){const p=this.__calcAspectWH(c||"3/2");t||(t=p.w),a||(a=p.h)}const n=this.__mediaReserveStyle(`${t} / ${a}`);return l`
|
|
13
13
|
<div class="media has-reserved-space ${this.mediaPlaceholder?"has-ph":""}" style=${n}>
|
|
14
14
|
<slot name="media-sources"></slot>
|
|
15
15
|
<img
|
|
@@ -25,7 +25,7 @@ import{g as d,h as gt,m as v,p as r,v as l,y as bt}from"../../vendor/vendor.js";
|
|
|
25
25
|
@load=${this.__onImgLoad}
|
|
26
26
|
/>
|
|
27
27
|
</div>
|
|
28
|
-
`}return null}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,a=this.mapSpacingToken(this.spacingBottom)??e,c=this.mapSpacingToken(this.spacingLeft),n=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-card-spacing-block-start",t):this.style.removeProperty("--scb-card-spacing-block-start"),a?this.style.setProperty("--scb-card-spacing-block-end",a):this.style.removeProperty("--scb-card-spacing-block-end"),c?this.style.setProperty("--scb-card-spacing-inline-start",c):this.style.removeProperty("--scb-card-spacing-inline-start"),n?this.style.setProperty("--scb-card-spacing-inline-end",n):this.style.removeProperty("--scb-card-spacing-inline-end")}__applyPadding(){const e=this.mapSpacingToken(this.innerPadding),t=this.mapSpacingToken(this.paddingTop)??e,a=this.mapSpacingToken(this.paddingBottom)??e,c=this.mapSpacingToken(this.paddingLeft)??e,n=this.mapSpacingToken(this.paddingRight)??e;t?this.style.setProperty("--scb-card-content-padding-block-start",t):this.style.removeProperty("--scb-card-content-padding-block-start"),a?this.style.setProperty("--scb-card-content-padding-block-end",a):this.style.removeProperty("--scb-card-content-padding-block-end"),c?this.style.setProperty("--scb-card-content-padding-inline-start",c):this.style.removeProperty("--scb-card-content-padding-inline-start"),n?this.style.setProperty("--scb-card-content-padding-inline-end",n):this.style.removeProperty("--scb-card-content-padding-inline-end")}__syncStringAttribute(e,t){this.__isSyncingManagedSocialAttributes=!0;try{typeof t=="string"&&t.trim()!==""?this.setAttribute(e,t):this.removeAttribute(e)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncNumberAttribute(e,t){this.__isSyncingManagedSocialAttributes=!0;try{typeof t=="number"&&Number.isFinite(t)?this.setAttribute(e,String(t)):this.removeAttribute(e)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncBooleanAttribute(e,t){this.__isSyncingManagedSocialAttributes=!0;try{t?this.setAttribute(e,""):this.removeAttribute(e)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncSocialAttributes(){this.cardType==="social"&&(this.__syncStringAttribute("social-comments-text",this.commentsText),this.__syncNumberAttribute("social-comments",this.comments),this.__syncStringAttribute("social-comments-href",this.commentsHref),this.__syncStringAttribute("social-likes-text",this.likesText),this.__syncNumberAttribute("social-likes",this.likes),this.__syncStringAttribute("social-likes-hover-content",this.likesHoverContent),this.__syncBooleanAttribute("social-has-liked",this.hasLiked),this.__syncBooleanAttribute("social-likes-interactive",this.likesInteractive),this.__syncBooleanAttribute("social-author",this.author),this.__syncStringAttribute("social-author-text",this.authorText),this.__syncStringAttribute("social-author-href",this.authorHref))}render(){const e=this.__slotNames(),t=m=>this.__hasSlottedContent(m,e),a=this.cardType,c=this.variant?`${this.variant.toLowerCase()}`:"",n=(this.direction||"dynamic").toLowerCase(),
|
|
28
|
+
`}return null}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,a=this.mapSpacingToken(this.spacingBottom)??e,c=this.mapSpacingToken(this.spacingLeft),n=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-card-spacing-block-start",t):this.style.removeProperty("--scb-card-spacing-block-start"),a?this.style.setProperty("--scb-card-spacing-block-end",a):this.style.removeProperty("--scb-card-spacing-block-end"),c?this.style.setProperty("--scb-card-spacing-inline-start",c):this.style.removeProperty("--scb-card-spacing-inline-start"),n?this.style.setProperty("--scb-card-spacing-inline-end",n):this.style.removeProperty("--scb-card-spacing-inline-end")}__applyPadding(){const e=this.mapSpacingToken(this.innerPadding),t=this.mapSpacingToken(this.paddingTop)??e,a=this.mapSpacingToken(this.paddingBottom)??e,c=this.mapSpacingToken(this.paddingLeft)??e,n=this.mapSpacingToken(this.paddingRight)??e;t?this.style.setProperty("--scb-card-content-padding-block-start",t):this.style.removeProperty("--scb-card-content-padding-block-start"),a?this.style.setProperty("--scb-card-content-padding-block-end",a):this.style.removeProperty("--scb-card-content-padding-block-end"),c?this.style.setProperty("--scb-card-content-padding-inline-start",c):this.style.removeProperty("--scb-card-content-padding-inline-start"),n?this.style.setProperty("--scb-card-content-padding-inline-end",n):this.style.removeProperty("--scb-card-content-padding-inline-end")}__syncStringAttribute(e,t){this.__isSyncingManagedSocialAttributes=!0;try{typeof t=="string"&&t.trim()!==""?this.setAttribute(e,t):this.removeAttribute(e)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncNumberAttribute(e,t){this.__isSyncingManagedSocialAttributes=!0;try{typeof t=="number"&&Number.isFinite(t)?this.setAttribute(e,String(t)):this.removeAttribute(e)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncBooleanAttribute(e,t){this.__isSyncingManagedSocialAttributes=!0;try{t?this.setAttribute(e,""):this.removeAttribute(e)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncSocialAttributes(){this.cardType==="social"&&(this.__syncStringAttribute("social-comments-text",this.commentsText),this.__syncNumberAttribute("social-comments",this.comments),this.__syncStringAttribute("social-comments-href",this.commentsHref),this.__syncStringAttribute("social-likes-text",this.likesText),this.__syncNumberAttribute("social-likes",this.likes),this.__syncStringAttribute("social-likes-hover-content",this.likesHoverContent),this.__syncBooleanAttribute("social-has-liked",this.hasLiked),this.__syncBooleanAttribute("social-likes-interactive",this.likesInteractive),this.__syncBooleanAttribute("social-author",this.author),this.__syncStringAttribute("social-author-text",this.authorText),this.__syncStringAttribute("social-author-href",this.authorHref))}render(){const e=this.__slotNames(),t=m=>this.__hasSlottedContent(m,e),a=this.cardType,c=this.variant?`${this.variant.toLowerCase()}`:"",n=(this.direction||"dynamic").toLowerCase(),p=a!=="list"&&a!=="container"&&n!=="vertical"&&n!=="horizontal"?"dynamic-direction":"",_=a==="list"||a==="container"?"vertical":n==="horizontal"?"horizontal":"vertical",b=this.__effectiveHref(),f=t("card-link"),B=a==="standard"||a==="social",y=B&&!!b&&!f,u=B&&(!!b||f),J=y?"clickable":"",Q=f?"has-slotted-card-link":"",O=this.date instanceof Date?this.date.toISOString().slice(0,10):this.date||"",z=!!this.__resolvedTitle||t("heading"),x=!!this.subtitle||t("subtitle"),Y=!!this.supportingText||t("supporting-text"),V=!!O||t("date"),Z=t("footer"),N=(m=!1)=>z?l`
|
|
29
29
|
<div class="header">
|
|
30
30
|
<slot name="heading">
|
|
31
31
|
${m?l`<a class="title" href="${b}" tabindex="-1">${this.__resolvedTitle}</a>`:l`<span class="title">${this.__resolvedTitle}</span>`}
|
|
@@ -56,7 +56,7 @@ import{g as d,h as gt,m as v,p as r,v as l,y as bt}from"../../vendor/vendor.js";
|
|
|
56
56
|
</div>
|
|
57
57
|
`:d,lt=dt||z||x||Y||V,w=m=>l`
|
|
58
58
|
<div
|
|
59
|
-
class="scb-card ${c} ${_} ${
|
|
59
|
+
class="scb-card ${c} ${_} ${p} ${J} ${Q}"
|
|
60
60
|
@click=${y?this.__handleHrefNavigation:null}
|
|
61
61
|
@keydown=${y?this.__onKeyDown:null}
|
|
62
62
|
@focusin=${u?this.__ensureFocusRingOnFocusVisible:null}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h,m as v,p as d,v as p,y as f}from"
|
|
1
|
+
import{h,m as v,p as d,v as p,y as f}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as c}from"../../vendor/decorate.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,l){try{customElements.get(o)||r(o,a,l)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var n,t=(n=class extends h{constructor(...r){super(...r),this.open=!1}render(){return p`
|
|
2
2
|
<svg
|
|
3
3
|
class="chevron-icon"
|
|
4
4
|
viewBox="0 0 24 24"
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import{f as h,h as x,m as $,p as m,v as c,y as M}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{addLazyFocusRingListeners as Y}from"../shared/lazy-focus-ring.js";import{t as l}from"../../vendor/decorate.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-divider/scb-divider.js";(function(){try{var g=typeof globalThis<"u"?globalThis:window;if(!g.__scb_ce_guard_installed__){g.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,s,d){try{customElements.get(e)||t(e,s,d)}catch(r){var a=String(r||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var w,p=(w=class extends x{constructor(...t){super(...t),this._currentDate=new Date,this._selectedDate=null,this._showMonthDropdown=!1,this._showYearDropdown=!1,this.variant="date",this.lang="sv",this.selectedValue="",this.open=!0,this._selectedHour=0,this._selectedMinute=0,this._viewportMargin=8,this._popupOffset=4,this._onWindowReposition=()=>{this._positionPopupWithinViewport()},this._monthNames=[this.lang=="sv"?"Januari":"January",this.lang=="sv"?"Februari":"February",this.lang=="sv"?"Mars":"March",(this.lang=="sv","April"),this.lang=="sv"?"Maj":"May",this.lang=="sv"?"Juni":"June",this.lang=="sv"?"Juli":"July",this.lang=="sv"?"Augusti":"August",(this.lang=="sv","September"),this.lang=="sv"?"Oktober":"October",(this.lang=="sv","November"),(this.lang=="sv","December")],this._outsideClickHandler=e=>{this.open&&(e.composedPath().includes(this)||this._close())},this._prevMonth=()=>{const e=this._currentDate.getFullYear(),s=this._currentDate.getMonth();s===0?this._currentDate=new Date(e-1,11,1):this._currentDate=new Date(e,s-1,1)},this._prevYear=()=>{const e=this._currentDate.getFullYear(),s=this._currentDate.getMonth();this._currentDate=new Date(e-1,s,1)},this._nextMonth=()=>{const e=this._currentDate.getFullYear(),s=this._currentDate.getMonth();s===11?this._currentDate=new Date(e+1,0,1):this._currentDate=new Date(e,s+1,1)},this._nextYear=()=>{const e=this._currentDate.getFullYear(),s=this._currentDate.getMonth();this._currentDate=new Date(e+1,s,1)},this._onTimeChange=e=>{const[s,d]=e.target.value.split(":"),a=parseInt(s,10),r=parseInt(d,10);this._selectedHour=isNaN(a)?0:Math.max(0,Math.min(23,a)),this._selectedMinute=isNaN(r)?0:Math.max(0,Math.min(59,r)),this._fireDateTimeChange()},this._close=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("datepicker-closed",{bubbles:!0,composed:!0}))}}_isRenderedInsideDialog(){const t=this.getRootNode(),e=t instanceof ShadowRoot?t.host:null;return e instanceof HTMLElement&&e.closest("scb-dialog")?!0:!!this.closest("scb-dialog")}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=Y(this,this.renderRoot)}_positionPopupWithinViewport(){if(!this.open)return;const t=this.renderRoot.querySelector(".datepicker-popup");if(!t)return;const e=this.parentElement?.getBoundingClientRect();if(!e)return;const s=window.innerWidth,d=window.innerHeight,a=Math.max(220,s-this._viewportMargin*2);if(this._isRenderedInsideDialog()){const v=Math.min(t.offsetWidth||380,a),b=t.offsetHeight||420,f=(s-v)/2,y=(d-b)/2,D=f-e.left,k=y-e.top;this.style.setProperty("--scb-datepicker-position","absolute"),this.style.setProperty("--scb-datepicker-top",`${k}px`),this.style.setProperty("--scb-datepicker-bottom","auto"),this.style.setProperty("--scb-datepicker-left",`${D}px`),this.style.setProperty("--scb-datepicker-transform","none"),this.style.setProperty("--scb-datepicker-computed-width",`${v}px`),this.style.setProperty("--scb-datepicker-max-height",`${Math.max(220,d-this._viewportMargin*2)}px`);return}const r=Math.min(t.offsetWidth||380,a),o=t.offsetHeight||420,i=Math.min(Math.max(e.left,this._viewportMargin),s-this._viewportMargin-r)-e.left,n=d-e.bottom-this._viewportMargin,u=e.top-this._viewportMargin,_=n<o+this._popupOffset&&u>n;this.style.setProperty("--scb-datepicker-position","absolute"),this.style.setProperty("--scb-datepicker-computed-width",`${r}px`),this.style.setProperty("--scb-datepicker-left","0"),this.style.setProperty("--scb-datepicker-transform",`translateX(${i}px)`),_?(this.style.setProperty("--scb-datepicker-top","auto"),this.style.setProperty("--scb-datepicker-bottom",`calc(100% + ${this._popupOffset}px)`),this.style.setProperty("--scb-datepicker-max-height",`${Math.max(0,u-this._popupOffset)}px`)):(this.style.setProperty("--scb-datepicker-top",`calc(100% + ${this._popupOffset}px)`),this.style.setProperty("--scb-datepicker-bottom","auto"),this.style.setProperty("--scb-datepicker-max-height",`${Math.max(0,n-this._popupOffset)}px`))}updated(t){if(super.updated(t),this.open?(window.addEventListener("mousedown",this._outsideClickHandler),window.addEventListener("resize",this._onWindowReposition,{passive:!0}),window.addEventListener("scroll",this._onWindowReposition,{passive:!0,capture:!0}),requestAnimationFrame(()=>this._positionPopupWithinViewport())):(window.removeEventListener("mousedown",this._outsideClickHandler),window.removeEventListener("resize",this._onWindowReposition),window.removeEventListener("scroll",this._onWindowReposition,!0)),t.has("selectedValue")&&this.selectedValue){const e=new Date(this.selectedValue);isNaN(e.getTime())||(this._selectedDate=e,this._currentDate=new Date(e.getFullYear(),e.getMonth(),1),this.variant==="datetime-local"&&(this._selectedHour=e.getHours(),this._selectedMinute=e.getMinutes()))}this.open&&requestAnimationFrame(()=>this._positionPopupWithinViewport())}disconnectedCallback(){this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,window.removeEventListener("mousedown",this._outsideClickHandler),window.removeEventListener("resize",this._onWindowReposition),window.removeEventListener("scroll",this._onWindowReposition,!0),super.disconnectedCallback()}render(){if(!this.open)return c``;const t=this._currentDate.getFullYear(),e=this._currentDate.getMonth(),s=new Date,d=this._getMonthDays(t,e),a=Array.from({length:101},(o,i)=>s.getFullYear()-50+i),r=this.variant==="datetime-local"&&!this._showMonthDropdown&&!this._showYearDropdown;return c`
|
|
2
|
+
<div class="datepicker-popup popup">
|
|
3
|
+
<div class="header">
|
|
4
|
+
<div class="month-selector ${this._showMonthDropdown?"open":""} ${this._showYearDropdown?"disable":""}">
|
|
5
|
+
<scb-icon-button icon="chevron_left" @click=${this._prevMonth} aria-label=${this.lang=="sv"?"Föregående månad":"Previous month"}></scb-icon-button>
|
|
6
|
+
<div class="custom-dropdown month-dropdown">
|
|
7
|
+
<div
|
|
8
|
+
tabindex=${this._showYearDropdown?-1:0}
|
|
9
|
+
class="dropdown-selected"
|
|
10
|
+
@click=${()=>this._toggleMonthDropdown()}
|
|
11
|
+
@keydown=${o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this._toggleMonthDropdown())}}
|
|
12
|
+
>
|
|
13
|
+
${this._monthNames[e].slice(0,3)}
|
|
14
|
+
<md-icon>arrow_drop_down</md-icon>
|
|
15
|
+
<md-focus-ring></md-focus-ring>
|
|
16
|
+
<md-ripple></md-ripple>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<scb-icon-button icon="chevron_right" @click=${this._nextMonth} aria-label=${this.lang=="sv"?"Nästa månad":"Next month"}></scb-icon-button>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="year-selector ${this._showMonthDropdown?"disable":""} ${this._showYearDropdown?"open":""}">
|
|
22
|
+
<scb-icon-button icon="chevron_left" @click=${this._prevYear} aria-label=${this.lang=="sv"?"Föregående år":"Previous year"}></scb-icon-button>
|
|
23
|
+
<div class="custom-dropdown year-dropdown">
|
|
24
|
+
<div
|
|
25
|
+
tabindex=${this._showMonthDropdown?-1:0}
|
|
26
|
+
class="dropdown-selected"
|
|
27
|
+
@click=${()=>this._toggleYearDropdown()}
|
|
28
|
+
@keydown=${o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this._toggleYearDropdown())}}
|
|
29
|
+
>
|
|
30
|
+
${t}
|
|
31
|
+
<md-icon>arrow_drop_down</md-icon>
|
|
32
|
+
<md-focus-ring></md-focus-ring>
|
|
33
|
+
<md-ripple></md-ripple>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<scb-icon-button icon="chevron_right" @click=${this._nextYear} aria-label=${this.lang=="sv"?"Nästa år":"Next year"}></scb-icon-button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
${this._showMonthDropdown||this._showYearDropdown?c`<scb-divider></scb-divider>`:""}
|
|
40
|
+
<div class="datepicker-content" style="position:relative;">
|
|
41
|
+
${this._showMonthDropdown?c`
|
|
42
|
+
<div class="dropdown-list">
|
|
43
|
+
${this._monthNames.map((o,i)=>c`
|
|
44
|
+
<div
|
|
45
|
+
@keydown=${n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this._onMonthChangeCustom(i))}}
|
|
46
|
+
tabindex="0"
|
|
47
|
+
class="dropdown-item${i===e?" selected":""}"
|
|
48
|
+
@click=${()=>this._onMonthChangeCustom(i)}
|
|
49
|
+
id=${i===e?"selected-month":""}
|
|
50
|
+
>
|
|
51
|
+
${i===e?c`<md-icon>check</md-icon>`:""}
|
|
52
|
+
${o}
|
|
53
|
+
<md-ripple></md-ripple><md-focus-ring inward></md-focus-ring>
|
|
54
|
+
</div>
|
|
55
|
+
`)}
|
|
56
|
+
</div>
|
|
57
|
+
`:""}
|
|
58
|
+
${this._showYearDropdown?c`
|
|
59
|
+
<div class="dropdown-list">
|
|
60
|
+
${a.map(o=>c`
|
|
61
|
+
<div
|
|
62
|
+
@keydown=${i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this._onYearChangeCustom(o))}}
|
|
63
|
+
tabindex="0"
|
|
64
|
+
class="dropdown-item${o===t?" selected":""}"
|
|
65
|
+
@click=${()=>this._onYearChangeCustom(o)}
|
|
66
|
+
id=${o===t?"selected-year":""}
|
|
67
|
+
>
|
|
68
|
+
${o===t?c`<md-icon>check</md-icon>`:""}
|
|
69
|
+
${o}
|
|
70
|
+
<md-ripple></md-ripple><md-focus-ring inward></md-focus-ring>
|
|
71
|
+
</div>
|
|
72
|
+
`)}
|
|
73
|
+
</div>
|
|
74
|
+
`:""}
|
|
75
|
+
${!this._showMonthDropdown&&!this._showYearDropdown?c`
|
|
76
|
+
<div class="datepicker-calendar">
|
|
77
|
+
<table>
|
|
78
|
+
<thead>
|
|
79
|
+
<tr>
|
|
80
|
+
<th>${this.lang=="sv"?"Må":"Mo"}</th><th>${this.lang=="sv"?"Ti":"Tu"}</th><th>${this.lang=="sv"?"On":"We"}</th><th>${this.lang=="sv"?"To":"Th"}</th><th>${this.lang=="sv","Fr"}</th><th>${this.lang=="sv"?"Lö":"Sa"}</th><th>${this.lang=="sv"?"Sö":"Su"}</th>
|
|
81
|
+
</tr>
|
|
82
|
+
</thead>
|
|
83
|
+
<tbody>
|
|
84
|
+
${d.map(o=>c`
|
|
85
|
+
<tr>
|
|
86
|
+
${o.map(i=>i?c`
|
|
87
|
+
<td>
|
|
88
|
+
<div
|
|
89
|
+
@keydown=${n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this._selectDate(i))}}
|
|
90
|
+
role="button"
|
|
91
|
+
tabindex="0"
|
|
92
|
+
class="day${this._isToday(i,s)?" today":""}${this._isSelected(i)?" selected":""}"
|
|
93
|
+
@click=${()=>this._selectDate(i)}
|
|
94
|
+
>${i.getDate()}<md-ripple></md-ripple><md-focus-ring></md-focus-ring></div>
|
|
95
|
+
</td>
|
|
96
|
+
`:c`<td></td>`)}
|
|
97
|
+
</tr>
|
|
98
|
+
`)}
|
|
99
|
+
</tbody>
|
|
100
|
+
</table>
|
|
101
|
+
</div>
|
|
102
|
+
`:""}
|
|
103
|
+
</div>
|
|
104
|
+
${r?c`
|
|
105
|
+
<div style="padding: 0 24px;">
|
|
106
|
+
<label style="display:flex;align-items:center;gap:8px;">
|
|
107
|
+
<span>${this.lang=="sv"?"Tid:":"Time:"}</span>
|
|
108
|
+
<scb-textfield type="time" .value=${`${String(this._selectedHour).padStart(2,"0")}:${String(this._selectedMinute).padStart(2,"0")}`} @blur=${this._onTimeChange} aria-label="${this.lang=="sv"?"Tid":"Time"}"></scb-textfield>
|
|
109
|
+
</label>
|
|
110
|
+
</div>
|
|
111
|
+
`:""}
|
|
112
|
+
<div class="datepicker-footer">
|
|
113
|
+
${!this._showMonthDropdown&&!this._showYearDropdown?c`
|
|
114
|
+
<scb-button variant="text" label=${this.lang=="sv"?"Stäng":"Close"} @click=${this._close}></scb-button>
|
|
115
|
+
`:""}
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
`}_getMonthDays(t,e){const s=new Date(Date.UTC(t,e,1)),d=new Date(Date.UTC(t,e+1,0)),a=[];let r=[],o=s.getUTCDay(),i=o===0?6:o-1;for(let n=0;n<i;n++)r.push(null);for(let n=1;n<=d.getUTCDate();n++){const u=new Date(Date.UTC(t,e,n));r.push(u),r.length===7&&(a.push(r),r=[])}if(r.length){for(;r.length<7;)r.push(null);a.push(r)}return a}_toggleMonthDropdown(){this._showMonthDropdown=!this._showMonthDropdown,this._showMonthDropdown&&(this._showYearDropdown=!1,setTimeout(()=>{const t=this.renderRoot.querySelector("#selected-month");t&&t.scrollIntoView({block:"center"})},0))}_toggleYearDropdown(){this._showYearDropdown=!this._showYearDropdown,this._showYearDropdown&&(this._showMonthDropdown=!1,setTimeout(()=>{const t=this.renderRoot.querySelector("#selected-year");t&&t.scrollIntoView({block:"center"})},0))}_onMonthChangeCustom(t){const e=this._currentDate.getFullYear();this._currentDate=new Date(e,t,1),this._showMonthDropdown=!1}_onYearChangeCustom(t){const e=this._currentDate.getMonth();this._currentDate=new Date(t,e,1),this._showYearDropdown=!1}_isToday(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}_isSelected(t){return this._selectedDate&&t.getDate()===this._selectedDate.getDate()&&t.getMonth()===this._selectedDate.getMonth()&&t.getFullYear()===this._selectedDate.getFullYear()}_selectDate(t){if(this._selectedDate=t,this.variant==="datetime-local"){const e=new Date(t);e.setHours(this._selectedHour??0,this._selectedMinute??0,0,0),this._selectedHour=e.getHours(),this._selectedMinute=e.getMinutes();const s=a=>a.toString().padStart(2,"0"),d=`${e.getFullYear()}-${s(e.getMonth()+1)}-${s(e.getDate())} ${s(e.getHours())}:${s(e.getMinutes())}`;this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:d},bubbles:!0,composed:!0}))}else{const e=t.toISOString().slice(0,10);this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:e},bubbles:!0,composed:!0}))}}_fireDateTimeChange(){if(this.variant==="datetime-local"&&this._selectedDate){const t=new Date(this._selectedDate);t.setHours(this._selectedHour??0,this._selectedMinute??0,0,0);const e=d=>d.toString().padStart(2,"0"),s=`${t.getFullYear()}-${e(t.getMonth()+1)}-${e(t.getDate())} ${e(t.getHours())}:${e(t.getMinutes())}`;this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:s},bubbles:!0,composed:!0}))}}},w.styles=[M`:host{--scb-datepicker-width:380px;--scb-datepicker-z-index:1100;--scb-datepicker-viewport-margin:8px;--scb-datepicker-offset:var(--spacing-2, 4px);max-width:var(--scb-datepicker-computed-width, min(var(--scb-datepicker-width), calc(100vw - (var(--scb-datepicker-viewport-margin) * 2))));font-family:var(--brand-font);color:var(--md-sys-color-on-surface);display:block;position:var(--scb-datepicker-position, absolute);top:var(--scb-datepicker-top, calc(100% + var(--scb-datepicker-offset)));bottom:var(--scb-datepicker-bottom, auto);left:var(--scb-datepicker-left, 0);width:var(--scb-datepicker-computed-width, min(var(--scb-datepicker-width), calc(100vw - (var(--scb-datepicker-viewport-margin) * 2))));transform:var(--scb-datepicker-transform, translateX(0px));z-index:var(--scb-datepicker-z-index)}.dropdown-selected,.month-selector,.year-selector{display:flex;align-items:center}.dropdown-selected{position:relative;border-radius:8px;font-size:16px;cursor:pointer;text-align:left;gap:8px;padding:4px 8px}.dropdown-selected:focus{outline:0}.dropdown-selected md-focus-ring{border-radius:8px}.dropdown-list{position:relative;background:var(--md-sys-color-surface);padding:4px 0}.dropdown-item{display:flex;position:relative;cursor:pointer;padding:var(--spacing-3) 56px;min-height:40px;align-items:center}.dropdown-item:focus-within{outline:0}.datepicker-popup,.dropdown-item md-focus-ring{border-radius:var(--md-sys-shape-corner-small)}.dropdown-item.selected{background:var(--md-sys-color-secondary-container, #e3f2fd);font-weight:500;padding-left:16px;gap:16px}.datepicker-popup{background:var(--md-sys-color-surface);box-shadow:0 1px 2px 0 rgba(0,0,0,.3),0 2px 6px 2px rgba(0,0,0,.15);max-width:100%;width:100%;max-height:var(--scb-datepicker-max-height, 80vh);overflow:auto;font-family:var(--brand-font)}.datepicker-content{overflow-y:auto;max-height:290px}.datepicker-content::-webkit-scrollbar{width:12px;background:var(--md-sys-color-surface);border-radius:var(--md-sys-shape-corner-small)}.datepicker-content::-webkit-scrollbar-thumb{background:var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);border:4px solid var(--md-sys-color-surface)}.datepicker-content::-webkit-scrollbar-track{background:var(--md-sys-color-surface);border-radius:var(--md-sys-shape-corner-small)}.popup{position:absolute;top:0;left:0;z-index:1}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;padding:20px 16px 0;flex-wrap:wrap}.datepicker-footer{padding:8px 16px 24px}.month-label{font-size:18px;font-weight:500}.datepicker-calendar{padding:0 16px}table{width:100%;border-collapse:collapse;margin-bottom:8px}th{color:var(--md-sys-color-on-surface-variant, #757575);font-size:16px;font-weight:600;padding-bottom:20px}td{text-align:center}.day:focus-within{outline:0}.close-datepicker,.day{background:0 0;font-size:16px;cursor:pointer}.day{position:relative;width:40px;height:40px;border-radius:50%;border:0;font-family:"Inter";align-content:center}.day.selected{background:var(--md-sys-color-secondary-container)}.close-datepicker{margin-top:8px;border-color:none;color:var(--md-sys-color-primary, #0057b8);padding:4px 12px;border-radius:8px}.close-datepicker:hover{background:var(--md-sys-color-primary-container, #e3f2fd)}`],w);l([h()],p.prototype,"_currentDate",void 0);l([h()],p.prototype,"_selectedDate",void 0);l([h()],p.prototype,"_showMonthDropdown",void 0);l([h()],p.prototype,"_showYearDropdown",void 0);l([m({type:String})],p.prototype,"variant",void 0);l([m({type:String})],p.prototype,"lang",void 0);l([m({type:String})],p.prototype,"selectedValue",void 0);l([m({type:Boolean})],p.prototype,"open",void 0);l([h()],p.prototype,"_selectedHour",void 0);l([h()],p.prototype,"_selectedMinute",void 0);p=l([$("scb-datepicker")],p);
|
|
@@ -51,4 +51,4 @@ import{g as p,h as f,m as b,p as s,v as r,y as v}from"../../vendor/vendor.js";im
|
|
|
51
51
|
>
|
|
52
52
|
${this.renderBody(e,t)}
|
|
53
53
|
</div>
|
|
54
|
-
`}},h.styles=v`@keyframes scb-kf-fade-in{0%{opacity:0}to{opacity:1}}@keyframes scb-kf-fade-out{0%{opacity:1}to{opacity:0}}:host{display:block;position:relative;font-family:var(--brand-font, Inter, Arial, sans-serif);margin-block-start:var(--scb-dialog-spacing-block-start, 0);margin-block-end:var(--scb-dialog-spacing-block-end, 0);margin-inline-start:var(--scb-dialog-spacing-inline-start, 0);margin-inline-end:var(--scb-dialog-spacing-inline-end, 0)}.scrim{position:var(--scb-dialog-scrim-position, fixed);inset:0;background:color-mix(in srgb,var(--md-sys-color-scrim) 32%,transparent);z-index:var(--z-dialog-scrim, 1000);opacity:1;transition:opacity var(--motion-duration-short, 0.25s);transition-timing-function:var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));height:var(--scb-dialog-scrim-height, auto)}.container{outline:0;position:var(--scb-dialog-container-position, fixed);inset:50%auto auto 50%;transform:translate(-50%,-50%) scale(1);background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface);border-radius:var(--scb-dialog-radius, var(--spacing-5, 16px));box-shadow:0 var(--spacing-1, 2px) var(--spacing-5, 16px) color-mix(in srgb,var(--md-sys-color-shadow) 20%,transparent);min-width:var(--scb-dialog-min-w, 340px);width:var(--scb-dialog-width, auto);max-width:var(--scb-dialog-max-w, 90vw);max-height:var(--scb-dialog-max-h, 90vh);display:flex;flex-direction:column;padding:var(--scb-dialog-padding, var(--spacing-7, 24px));z-index:var(--z-dialog, 1001);opacity:1;transition:opacity var(--motion-duration-medium, 0.3s),transform var(--motion-duration-medium, 0.3s);transition-timing-function:var(--motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}:host(:not([open])) .container,:host(:not([open])) .scrim{opacity:0;pointer-events:none}:host([open]) .scrim{animation:var(--motion-keyframe-fade-in, scb-kf-fade-in) var(--motion-duration-short, 0.25s) var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)) both}:host([open]) .container{animation:var(--motion-keyframe-fade-in, scb-kf-fade-in) var(--motion-duration-medium, 0.3s) var(--motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1)) both}.header{display:flex;align-items:flex-start;gap:var(--spacing-4, 12px);margin-bottom:var(--spacing-5, 16px)}.header .title{display:flex;flex-direction:column;gap:var(--spacing-3, 8px)}.header .label{font-weight:var(--md-sys-typescale-headline-small-weight, 700);font-size:var(--md-sys-typescale-headline-small-size, 1.5rem);line-height:var(--md-sys-typescale-headline-small-line-height, 2rem)}.header .close{margin-left:auto}.dialog-icon{inline-size:var(--scb-dialog-icon-size, var(--spacing-7, 24px));block-size:var(--scb-dialog-icon-size, var(--spacing-7, 24px))}.content{flex:1 1 auto;overflow:auto;margin-bottom:var(--spacing-5, 16px);color:var(--md-sys-color-on-surface-variant)}.content-surface{border-radius:calc(var(--scb-dialog-radius, var(--spacing-5, 16px)) - var(--spacing-2, 4px));overflow:hidden;background:var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface))}:host([variant="iframe"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-iframe, var(--scb-dialog-min-w-floating, 360px));--scb-dialog-padding:var(--scb-dialog-padding-iframe, var(--spacing-3, 8px) var(--spacing-3, 8px) var(--spacing-3, 8px))}:host([variant="iframe"]) .header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:var(--spacing-2, 4px);margin-bottom:var(--spacing-3, 8px);padding-block:var(--scb-dialog-header-padding-block-iframe, var(--spacing-3, 8px));padding-inline-start:var(--scb-dialog-header-padding-inline-start-iframe, var(--spacing-3, 8px));padding-inline-end:var(--scb-dialog-header-padding-inline-end-iframe, var(--spacing-3, 8px))}:host([variant="iframe"]) .header .title{min-width:0}:host([variant="iframe"]) .header .label{padding-inline-start:var(--scb-dialog-header-label-padding-inline-start-iframe, 0)}:host([variant="iframe"]) .header .close{margin-left:0;align-self:start;justify-self:end;margin-top:var(--spacing-negative-2, -4px);margin-right:var(--spacing-negative-4, -12px)}:host([variant="iframe"]) .content{margin-bottom:0;color:inherit}:host([variant="iframe"]) .content-surface{block-size:100%}:host([variant="iframe"]) ::slotted(iframe){display:block;inline-size:100%;block-size:var(--scb-dialog-iframe-height, min(70vh, 720px));border:0;background:var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface))}.actions{display:flex;align-items:center;gap:var(--spacing-3, 8px);justify-content:flex-end}.actions .start{margin-right:auto}:host([variant="choose"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-choose, 280px)}:host([variant="alert"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-alert, 320px)}:host([variant="confirm"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-confirm, 360px)}:host([variant="form"]) form{display:grid;grid-template-columns:1fr;gap:var(--scb-form-gap, var(--spacing-6, 20px))}:host([variant="form"]) .content{overflow:visible}:host([variant="floating"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-floating, 360px)}:host([variant="choose"]) ::slotted(scb-radio-button){display:block;margin-block:var(--scb-choice-gap, 6px)}`,h);n([s({type:Boolean,reflect:!0,converter:g})],a.prototype,"open",void 0);n([s({type:String,attribute:"max-w",reflect:!0})],a.prototype,"maxW",void 0);n([s({type:String,attribute:"max-h",reflect:!0})],a.prototype,"maxH",void 0);n([s({type:Number,attribute:"z-index",reflect:!0})],a.prototype,"zIndex",void 0);n([s({type:Boolean,attribute:!1})],a.prototype,"inSb",void 0);n([s({type:Boolean,attribute:"scrim-close",converter:g})],a.prototype,"scrimClose",void 0);n([s({type:String,reflect:!0})],a.prototype,"spacing",void 0);n([s({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",void 0);n([s({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",void 0);n([s({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",void 0);n([s({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",void 0);n([s({type:String})],a.prototype,"variant",void 0);n([s({type:String})],a.prototype,"label",void 0);n([s({type:String})],a.prototype,"icon",void 0);n([s({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",void 0);n([s({type:String,attribute:"ok-button"})],a.prototype,"okButton",void 0);n([s({type:String,attribute:"cancel-button"})],a.prototype,"cancelButton",void 0);n([s({type:String,attribute:"delete-button"})],a.prototype,"deleteButton",void 0);n([s({type:String,attribute:"confirm-button"})],a.prototype,"confirmButton",void 0);n([s({type:String,attribute:"deny-button"})],a.prototype,"denyButton",void 0);n([s({type:String,attribute:"reset-button"})],a.prototype,"resetButton",void 0);n([s({type:String,attribute:"submit-button"})],a.prototype,"submitButton",void 0);n([s({type:String,attribute:"form-id"})],a.prototype,"formId",void 0);n([s({type:String,attribute:"form-action"})],a.prototype,"formAction",void 0);n([s({type:String,attribute:"form-method"})],a.prototype,"formMethod",void 0);a=n([b("scb-dialog")],a);
|
|
54
|
+
`}},h.styles=v`@keyframes scb-kf-fade-in{0%{opacity:0}to{opacity:1}}@keyframes scb-kf-fade-out{0%{opacity:1}to{opacity:0}}:host{display:block;position:relative;font-family:var(--brand-font, Inter, Arial, sans-serif);margin-block-start:var(--scb-dialog-spacing-block-start, 0);margin-block-end:var(--scb-dialog-spacing-block-end, 0);margin-inline-start:var(--scb-dialog-spacing-inline-start, 0);margin-inline-end:var(--scb-dialog-spacing-inline-end, 0)}.scrim{position:var(--scb-dialog-scrim-position, fixed);inset:0;background:color-mix(in srgb,var(--md-sys-color-scrim) 32%,transparent);z-index:var(--z-dialog-scrim, 1000);opacity:1;transition:opacity var(--motion-duration-short, 0.25s);transition-timing-function:var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));height:var(--scb-dialog-scrim-height, auto)}.container{outline:0;position:var(--scb-dialog-container-position, fixed);inset:50%auto auto 50%;transform:translate(-50%,-50%) scale(1);background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface);border-radius:var(--scb-dialog-radius, var(--spacing-5, 16px));box-shadow:0 var(--spacing-1, 2px) var(--spacing-5, 16px) color-mix(in srgb,var(--md-sys-color-shadow) 20%,transparent);min-width:var(--scb-dialog-min-w, 340px);width:var(--scb-dialog-width, auto);max-width:var(--scb-dialog-max-w, 90vw);max-height:var(--scb-dialog-max-h, 90vh);display:flex;flex-direction:column;padding:var(--scb-dialog-padding, var(--spacing-7, 24px));z-index:var(--z-dialog, 1001);opacity:1;transition:opacity var(--motion-duration-medium, 0.3s),transform var(--motion-duration-medium, 0.3s);transition-timing-function:var(--motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}:host(:not([open])) .container,:host(:not([open])) .scrim{opacity:0;pointer-events:none}:host([open]) .scrim{animation:var(--motion-keyframe-fade-in, scb-kf-fade-in) var(--motion-duration-short, 0.25s) var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)) both}:host([open]) .container{animation:var(--motion-keyframe-fade-in, scb-kf-fade-in) var(--motion-duration-medium, 0.3s) var(--motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1)) both}.header{display:flex;align-items:flex-start;gap:var(--spacing-4, 12px);margin-bottom:var(--spacing-5, 16px)}.header .title{display:flex;flex-direction:column;gap:var(--spacing-3, 8px)}.header .label{font-weight:var(--md-sys-typescale-headline-small-weight, 700);font-size:var(--md-sys-typescale-headline-small-size, 1.5rem);line-height:var(--md-sys-typescale-headline-small-line-height, 2rem)}.header .close{margin-left:auto}.dialog-icon{inline-size:var(--scb-dialog-icon-size, var(--spacing-7, 24px));block-size:var(--scb-dialog-icon-size, var(--spacing-7, 24px))}.content{flex:1 1 auto;overflow:auto;margin-bottom:var(--spacing-5, 16px);color:var(--md-sys-color-on-surface-variant)}.content-surface{border-radius:calc(var(--scb-dialog-radius, var(--spacing-5, 16px)) - var(--spacing-2, 4px));overflow:hidden;background:var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface))}:host([variant="iframe"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-iframe, var(--scb-dialog-min-w-floating, 360px));--scb-dialog-padding:var(--scb-dialog-padding-iframe, var(--spacing-3, 8px) var(--spacing-3, 8px) var(--spacing-3, 8px))}:host([variant="iframe"]) .header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:var(--spacing-2, 4px);margin-bottom:var(--spacing-3, 8px);padding-block:var(--scb-dialog-header-padding-block-iframe, var(--spacing-3, 8px));padding-inline-start:var(--scb-dialog-header-padding-inline-start-iframe, var(--spacing-3, 8px));padding-inline-end:var(--scb-dialog-header-padding-inline-end-iframe, var(--spacing-3, 8px))}:host([variant="iframe"]) .header .title{min-width:0}:host([variant="iframe"]) .header .label{padding-inline-start:var(--scb-dialog-header-label-padding-inline-start-iframe, 0)}:host([variant="iframe"]) .header .close{margin-left:0;align-self:start;justify-self:end;margin-top:var(--spacing-negative-2, -4px);margin-right:var(--spacing-negative-4, -12px)}:host([variant="iframe"]) .content{margin-bottom:0;color:inherit}:host([variant="iframe"]) .content-surface{block-size:100%}:host([variant="iframe"]) ::slotted(iframe){display:block;inline-size:100%;block-size:var(--scb-dialog-iframe-height, min(70vh, 720px));border:0;background:var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface))}.actions{display:flex;align-items:center;gap:var(--spacing-3, 8px);justify-content:flex-end}.actions .start{margin-right:auto}:host([variant="choose"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-choose, 280px)}:host([variant="alert"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-alert, 320px)}:host([variant="confirm"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-confirm, 360px)}:host([variant="form"]) form{display:grid;grid-template-columns:1fr;gap:var(--scb-form-gap, var(--spacing-6, 20px))}:host([variant="form"]) .content{overflow:visible}:host([variant="floating"]) .container{--scb-dialog-min-w:var(--scb-dialog-min-w-floating, 360px)}:host([variant="choose"]) ::slotted(scb-radio-button){display:block;margin-block:var(--scb-choice-gap, 6px)}`,h);n([s({type:Boolean,reflect:!0,converter:g})],a.prototype,"open",void 0);n([s({type:String,attribute:"max-w",reflect:!0})],a.prototype,"maxW",void 0);n([s({type:String,attribute:"max-h",reflect:!0})],a.prototype,"maxH",void 0);n([s({type:Number,attribute:"z-index",reflect:!0})],a.prototype,"zIndex",void 0);n([s({type:Boolean,attribute:!1})],a.prototype,"inSb",void 0);n([s({type:Boolean,attribute:"scrim-close",converter:g})],a.prototype,"scrimClose",void 0);n([s({type:String,reflect:!0})],a.prototype,"spacing",void 0);n([s({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",void 0);n([s({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",void 0);n([s({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",void 0);n([s({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",void 0);n([s({type:String,reflect:!0})],a.prototype,"variant",void 0);n([s({type:String})],a.prototype,"label",void 0);n([s({type:String})],a.prototype,"icon",void 0);n([s({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",void 0);n([s({type:String,attribute:"ok-button"})],a.prototype,"okButton",void 0);n([s({type:String,attribute:"cancel-button"})],a.prototype,"cancelButton",void 0);n([s({type:String,attribute:"delete-button"})],a.prototype,"deleteButton",void 0);n([s({type:String,attribute:"confirm-button"})],a.prototype,"confirmButton",void 0);n([s({type:String,attribute:"deny-button"})],a.prototype,"denyButton",void 0);n([s({type:String,attribute:"reset-button"})],a.prototype,"resetButton",void 0);n([s({type:String,attribute:"submit-button"})],a.prototype,"submitButton",void 0);n([s({type:String,attribute:"form-id"})],a.prototype,"formId",void 0);n([s({type:String,attribute:"form-action"})],a.prototype,"formAction",void 0);n([s({type:String,attribute:"form-method"})],a.prototype,"formMethod",void 0);a=n([b("scb-dialog")],a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as b,g as f,h as y,m as v,p as d,v as m,y as w}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{
|
|
1
|
+
import{d as b,g as f,h as y,m as v,p as d,v as m,y as w}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{ensureFocusRingOnFocusVisible as _}from"../shared/lazy-focus-ring.js";import{t as a}from"../../vendor/decorate.js";import"../scb-chevron/scb-chevron.js";import"../scb-button/scb-button.js";import"../scb-options-menu/scb-options-menu.js";(function(){try{var h=typeof globalThis<"u"?globalThis:window;if(!h.__scb_ce_guard_installed__){h.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,i,s){try{customElements.get(e)||t(e,i,s)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var g,S=()=>{if(typeof window>"u"||typeof document>"u"||!("customElements"in window)||document.head.querySelector("style[data-scb-dropdown-pre-upgrade]"))return;const h=document.createElement("style");h.setAttribute("data-scb-dropdown-pre-upgrade",""),h.textContent=`
|
|
2
2
|
scb-dropdown:not(:defined) {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../shared/lazy-focus-ring.js","../../vendor/preload-helper.js","../scb-drawer/scb-drawer.js","../../vendor/decorate.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../scb-divider/scb-divider.js","../../vendor/assertClassBrand.js","../scb-menu/scb-menu.js","../scb-menu/scb-menu-item.js","../scb-chevron/scb-chevron.js","../scb-menu/scb-menu-section.js","../scb-menu/scb-sub-menu.js","../scb-search/scb-search.js","../../vendor/icon.js","../../vendor/rolldown-runtime.js","../../vendor/ripple.js","../../vendor/attachable-controller.js","../../vendor/scb-header-drawer.internal.js","../scb-button/scb-button.js","../scb-icon-button/scb-icon-button.js","../scb-skeleton/scb-skeleton.js","../scb-grid/scb-grid.js","../scb-grid/scb-grid-item.js","../scb-grid/scb-stack.js","../scb-dropdown/scb-dropdown.js","../scb-options-menu/scb-options-menu.js","../scb-options-menu/scb-options-menu-item.js","../scb-options-menu/scb-options-sub-menu.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{f as k,g as w,h as D,m as I,p as h,v as m,y as R}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as S}from"../../vendor/preload-helper.js";import{t as c}from"../../vendor/decorate.js";(function(){try{var b=typeof globalThis<"u"?globalThis:window;if(!b.__scb_ce_guard_installed__){b.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,r,s){try{customElements.get(t)||e(t,r,s)}catch(a){var i=String(a||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var T,P,L=0,$=()=>{if(typeof window>"u"||typeof document>"u"||!("customElements"in window)||document.head.querySelector("style[data-scb-header-pre-upgrade]"))return;const b=document.createElement("style");b.setAttribute("data-scb-header-pre-upgrade",""),b.textContent=`
|
|
3
3
|
scb-header:not(:defined),
|
|
4
4
|
scb-header[data-upgrading] {
|
|
@@ -52,7 +52,7 @@ import{f as k,g as w,h as D,m as I,p as h,v as m,y as R}from"../../vendor/vendor
|
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
`,document.head.appendChild(b);const e=n=>{const u=String(n??"").trim();if(u)return/^\d+$/.test(u)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(u,10)))})`:u},t=n=>{const u=String(n??"").trim();if(!u)return!1;try{const p=JSON.parse(u);return Array.isArray(p)&&p.length>0}catch{return!1}},r=n=>n!=null&&!/^(false|0|off|no)$/i.test(n.trim()),s=n=>{for(const u of Array.from(n.children)){const p=u.tagName.toLowerCase();if(p==="scb-header-tab"||p==="scb-dropdown")return!0}return!1},i=n=>{s(n)||t(n.getAttribute("tabs"))||r(n.getAttribute("reserve-tabs"))||r(n.getAttribute("layout-pending"))?n.setAttribute("data-pre-has-tabs",""):n.removeAttribute("data-pre-has-tabs");const u=e(n.getAttribute("spacing")),p=e(n.getAttribute("spacing-top"))??u,f=e(n.getAttribute("spacing-bottom"))??u;p?n.style.setProperty("--scb-header-spacing-block-start",p):n.style.removeProperty("--scb-header-spacing-block-start"),f?n.style.setProperty("--scb-header-spacing-block-end",f):n.style.removeProperty("--scb-header-spacing-block-end");const y=(n.getAttribute("logo-width")??"").trim();y?n.style.setProperty("--scb-header-pre-logo-w",y):n.style.removeProperty("--scb-header-pre-logo-w");const _=(n.getAttribute("logo-height")??"").trim();_?n.style.setProperty("--scb-header-pre-logo-img-h",_):n.style.removeProperty("--scb-header-pre-logo-img-h");const l=(n.getAttribute("search-height")??"").trim();l?n.style.setProperty("--scb-header-pre-control-size",l):n.style.removeProperty("--scb-header-pre-control-size")};document.querySelectorAll("scb-header").forEach(i);const d=new MutationObserver(n=>{for(const u of n){if(u.type==="attributes"){const p=u.target;p instanceof HTMLElement&&p.tagName.toLowerCase()==="scb-header"&&i(p);continue}if(u.type==="childList"){const p=[...Array.from(u.addedNodes),...Array.from(u.removedNodes)];for(const f of p){if(!(f instanceof HTMLElement))continue;if(f.tagName.toLowerCase()==="scb-header"){i(f);continue}const y=f.closest?.("scb-header");y&&i(y)}}}});d.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabs","spacing","spacing-top","spacing-bottom","logo-width","logo-height","logo-aspect-ratio","logo-alt","logotype-text","search-height","reserve-tabs","layout-pending"]}),customElements.whenDefined("scb-header").then(()=>{d.disconnect()})};$();var M={fromAttribute:b=>b==null?!0:!/^(false|0|off|no)$/i.test(b),toAttribute:b=>String(!!b)},z={fromAttribute:b=>b==null?!1:!/^(false|0|off|no)$/i.test(b),toAttribute:b=>b?"":null},N={fromAttribute:b=>b==="small"||b==="large"?b:"medium",toAttribute:b=>{const e=String(b??"");return e==="small"||e==="large"?e:null}},o=(T=class extends D{constructor(){super(),this.maxWidth="1440px",this.size="medium",this.logoText="",this.logotypeText="",this.logoAlt="",this.logoHref="/",this.logoSrc="",this.logoWidth="",this.logoHeight="",this.logoAspectRatio="",this.logoInvertDm=!1,this.banner=!1,this.tabs=[],this.activeTab=null,this.reserveTabs=!1,this.layoutPending=!1,this.utilityItems=[],this.searchButtonLabel="Sök",this.menuButtonLabel="Meny",this.deferDrawer=!1,this.showDrawer=!0,this.alwaysShowMenuButton=!1,this.showSearch=!0,this.includeUtilityInMenu=!1,this.drawerOverlay=!0,this.searchText="",this._drawerId="main-drawer",this._menuExpanded=!1,this._searchId="header-search",this._drawerReady=!1,this._mobileSearchOpen=!1,this._initialUpgradeComplete=!1,this._slotNavItems=[],this._slotUtils=[],this._slotMenu=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this.layoutPending||this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{window.innerWidth>=this.BP_SM&&this._mobileSearchOpen&&this._setMobileSearchOpen(!1),this._scheduleMeasure()},this._onMenuSelect=t=>{const r=t.detail;this.dispatchEvent(new CustomEvent("scb-menu-select",{detail:r,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("scbmenuselect",{detail:r,bubbles:!0,composed:!0}));const s=r?.item,i=typeof r?.href=="string"?r.href:typeof r?.itemHref=="string"?r.itemHref:typeof r?.item_href=="string"?r.item_href:"",a=s?s.getAttribute("item-href")??s.getAttribute("href")??"":"";String(i||a||"").trim()&&this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._slotWatchers=[],this._harvestPending=!1,this._harvest=(t={})=>{const r=Array.from(this.children),s=[],i=[],a=[];let d=-1,n=!1;const u=l=>({label:l.getAttribute("label")??"",href:l.getAttribute("href")??void 0,icon:l.getAttribute("icon")??void 0}),p=l=>{l.hasAttribute("role")&&l.removeAttribute("role"),l.hasAttribute("hidden")||l.setAttribute("hidden",""),l.getAttribute("aria-hidden")!=="true"&&l.setAttribute("aria-hidden","true")};for(const l of r){const A=l.tagName.toLowerCase();if(this._isDrawerCloseNode(l)){this._syncDrawerCloseNode(l);continue}if(A==="scb-header-tab"){p(l);const g=l.getAttribute("label")??"",v=l.getAttribute("href"),C=v&&v.trim()!==""?v:void 0;(l.hasAttribute("selected")||l.getAttribute("selected")==="true"||l.getAttribute("active")==="true"||l.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length),s.push({kind:"tab",label:g,href:C});continue}if(A==="scb-badge"){const g=l.querySelector("scb-dropdown");if(g){n=!0;const v=g.getAttribute("label")??"";(g.hasAttribute("selected")||g.getAttribute("selected")==="true"||g.getAttribute("active")==="true"||g.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length);const C=`scb-header-tab-${s.length}`;l.getAttribute("slot")!==C&&l.setAttribute("slot",C),g.hasAttribute("slot")&&g.removeAttribute("slot"),g.hasAttribute("as-tab")||g.setAttribute("as-tab",""),s.push({kind:"dropdown",slotName:C,label:v});continue}}if(A==="scb-dropdown"){n=!0;const g=l.getAttribute("label")??"";(l.hasAttribute("selected")||l.getAttribute("selected")==="true"||l.getAttribute("active")==="true"||l.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length);const v=`scb-header-tab-${s.length}`;l.getAttribute("slot")!==v&&l.setAttribute("slot",v),l.hasAttribute("as-tab")||l.setAttribute("as-tab",""),s.push({kind:"dropdown",slotName:v,label:g});continue}if(A==="scb-header-utility"){p(l),i.push({label:l.getAttribute("label")??"",href:l.getAttribute("href")??"#",target:l.getAttribute("target")??void 0});continue}if(A==="scb-header-menu-group"){p(l);const g={label:l.getAttribute("label")??"",icon:l.getAttribute("icon")??void 0,children:[]};l.querySelectorAll("scb-header-menu-item").forEach(v=>g.children.push(u(v))),a.push(g);continue}if(A==="scb-header-menu-item"){p(l),a.push(u(l));continue}l.hasAttribute("slot")||p(l)}const f=!this._sameNavItems(this._slotNavItems,s),y=!this._sameUtilityItems(this._slotUtils,i),_=!this._sameMenuNodes(this._slotMenu,a);f&&(this._slotNavItems=s),y&&(this._slotUtils=i),_&&(this._slotMenu=a),n&&this._ensureDropdownReady(),!this.hasAttribute("active-tab")&&d>=0&&this.activeTab!==d&&(this.activeTab=d),(t.scheduleMeasure??!0)&&queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{if(this.layoutPending)return;const t=this._top,r=this._logoGroup;if(!t||!r)return;const s=window.innerWidth,i=t.clientWidth,a=this._overflows(this._util),d=this._tabsOverflows(),n=s<this.BP_MD||a||d;this._collapsed?!n&&i>=this._unlockAtWidth&&this._setCollapsed(!1):n&&(this._unlockAtWidth=i+this._HYST,this._setCollapsed(!0));let u=!1;if(this.showSearch&&s>=this.BP_SM&&s<this.BP_MD&&this._searchWrap){const f=getComputedStyle(this._searchWrap),y=Math.max(this._num(f.minWidth,this._tokenPx("--scb-header-search-min",250)),this._tokenPx("--scb-header-search-min",250)),_=this._num(getComputedStyle(t).gap,this._tokenPx("--spacing-7",24)),l=this.showDrawer&&(this.alwaysShowMenuButton||s<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-extra-extra-large",48):0;u=r.getBoundingClientRect().width+_+y+_+l+8>i+.5}this._setHideSearch(u);let p=!1;if(this.showDrawer&&(this.alwaysShowMenuButton||s<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const f=this._num(getComputedStyle(t).gap,this._tokenPx("--spacing-7",24)),y=this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-extra-extra-large",48),_=(this._logoGroup?.getBoundingClientRect().width||0)+f+y;this._hideLogoText?p=!(i>=this._logoTextUnlockAt):_>i+.5&&(p=!0,this._logoTextUnlockAt=i+this._HYST)}else p=!1,this._logoTextUnlockAt=0;this._setHideLogoText(p)},this._onGlobalFocusRingKeydown=t=>{t.key==="Tab"&&(this.toggleAttribute("data-keyboard-focus",!0),this._ensureFocusRingReady())},this._onGlobalFocusRingPointerDown=()=>{this.removeAttribute("data-keyboard-focus")},this._onLocalFocusIn=t=>{const r=t.composedPath()[0];r instanceof HTMLElement&&r.matches(":focus-visible")&&this._ensureFocusRingReady()},this._onDrawerOpened=()=>{this._menuExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("draweropen",{bubbles:!0,composed:!0}))},this._onDrawerClosed=()=>{this._menuExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("drawerclose",{bubbles:!0,composed:!0}))},this._onMenuClick=async t=>{this.showDrawer&&(this._setMobileSearchOpen(!1),this.dispatchEvent(new CustomEvent("menu-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("menuclick",{bubbles:!0,composed:!0})),!this._drawerReady&&(t.stopPropagation(),await this._ensureDrawerReady(),await this.updateComplete,this._openDrawerNow()))},this._onMobileSearchToggle=()=>{const t=!this._mobileSearchOpen;this._setMobileSearchOpen(t),t&&this.updateComplete.then(()=>{this.renderRoot.querySelector(".mobile-search-panel .header-search-input")?.focus?.()})},this._onTabClick=t=>{const r=t.currentTarget;if(!r)return;const s=r.tagName.toLowerCase()==="a";if(s&&(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey))return;const i=r.getAttribute("data-index"),a=i!=null?Number(i):0,d=this._getNavItems()[a];if(d?.kind==="dropdown")return;this.activeTab=a;const n=d?.kind==="tab"?d.href??"":"",u=new CustomEvent("tab-change",{detail:{index:a,href:n},bubbles:!0,composed:!0,cancelable:!0}),p=new CustomEvent("tabchange",{detail:{index:a,href:n},bubbles:!0,composed:!0,cancelable:!0});!(this.dispatchEvent(u)&&this.dispatchEvent(p))&&s&&t.preventDefault()},this._onDropdownTabActivate=t=>{const r=t.detail?.dataIndex,s=typeof r=="number"?r:typeof r=="string"?Number(r):this._readTabIndexFromEvent(t);if(s==null||!Number.isFinite(s))return;const i=this._getNavItems();s<0||s>=i.length||i[s]?.kind==="dropdown"&&(this.activeTab=s,this.dispatchEvent(new CustomEvent("tab-change",{detail:{index:s,href:""},bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("tabchange",{detail:{index:s,href:""},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=t=>{const r=t.key;if(r!=="ArrowLeft"&&r!=="ArrowRight"&&r!=="Home"&&r!=="End")return;const s=this._getNavItems();if(!s.length)return;const i=this._readTabIndexFromEvent(t);if(i==null)return;let a=Math.max(0,Math.min(s.length-1,i));r==="ArrowRight"?a=(a+1)%s.length:r==="ArrowLeft"?a=(a-1+s.length)%s.length:r==="Home"?a=0:r==="End"&&(a=s.length-1),t.preventDefault(),this._focusTabAtIndex(a)},this._onNativeSearchInput=t=>{const r=t.currentTarget;this._emitSearchInput(r?.value??"")},this._onNativeSearchSubmit=t=>{t.preventDefault();const r=t.currentTarget?.querySelector(".header-search-input");this._emitSearchChange(r?.value??"")},this._onSearchClear=()=>{this.searchText="",this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchtextchange",{detail:{value:""},bubbles:!0,composed:!0}))},this._onNativeSearchClear=t=>{t.preventDefault(),this._onSearchClear(),this.updateComplete.then(()=>{const r=t.currentTarget?.closest("form")?.querySelector(".header-search-input");r&&(r.value=""),r?.focus()})};const e=++L;this._drawerId=`scb-header-drawer-${e}`,this._searchId=`scb-header-search-${e}`}requestLayout(){this.layoutPending||(this.setAttribute("data-layout-settling",""),this.updateComplete.then(()=>{this.isConnected&&(this._measure(),this.removeAttribute("data-layout-settling"))}))}get _HYST(){return this._tokenPx("--spacing-11",64)}get BP_SM(){return this._tokenPx("--bp-sm",P.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx("--bp-md",P.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}get _top(){return this.renderRoot.querySelector(".top-row")}get _util(){return this.renderRoot.querySelector(".utility")}get _logoGroup(){return this.renderRoot.querySelector(".logo-wrap")||this.renderRoot.querySelector(".logo-group")}get _searchWrap(){return this.renderRoot.querySelector(".search")}get _menuBtn(){return this.renderRoot.querySelector(".menu-trigger")}get _tabsNav(){return this.renderRoot.querySelector(".tabs-nav")}_attachSlotObservers(){this._slotMo?.disconnect(),this._slotWatchers.forEach(i=>i.disconnect()),this._slotWatchers=[];const e=["label","href","icon","target","selected","aria-current","active","role"],t=i=>{const a=new MutationObserver(d=>{this._scheduleHarvest()});this._slotWatchers.push(a),a.observe(i,{attributes:!0,attributeFilter:e})},r=()=>{this._slotWatchers.forEach(a=>a.disconnect()),this._slotWatchers=[];const i=Array.from(this.children);for(const a of i){const d=a.tagName.toLowerCase();if((d==="scb-header-tab"||d==="scb-dropdown"||d==="scb-header-utility"||d==="scb-header-menu-item"||d==="scb-header-menu-group"||d==="scb-badge")&&t(a),d==="scb-badge"){const n=a,u=new MutationObserver(f=>{r(),this._scheduleHarvest()});this._slotWatchers.push(u),u.observe(n,{childList:!0});const p=n.querySelector("scb-dropdown");p&&t(p);continue}if(d==="scb-header-menu-group"){const n=a,u=new MutationObserver(p=>{r(),this._scheduleHarvest()});this._slotWatchers.push(u),u.observe(n,{childList:!0,subtree:!0}),n.querySelectorAll("scb-header-menu-item").forEach(p=>t(p))}}},s=new MutationObserver(i=>{let a=!1;for(const d of i)if(d.type==="childList"){a=!0;break}a&&r(),this._scheduleHarvest()});this._slotMo=s,s.observe(this,{childList:!0}),r()}_sameNavItems(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.kind!==i.kind||s.label!==i.label)return!1;if(s.kind==="tab"&&i.kind==="tab"){if((s.href??"")!==(i.href??""))return!1}else if(s.kind==="dropdown"&&i.kind==="dropdown"&&s.slotName!==i.slotName)return!1}return!0}_sameUtilityItems(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.label!==i.label||s.href!==i.href||(s.target??"")!==(i.target??""))return!1}return!0}_sameMenuNodes(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.label!==i.label||(s.href??"")!==(i.href??"")||(s.icon??"")!==(i.icon??"")||!this._sameMenuNodes(s.children??[],i.children??[]))return!1}return!0}_isDrawerCloseNode(e){const t=e.tagName.toLowerCase(),r=e.getAttribute("slot");if(r==="drawer-close")return!0;if(r||t!=="scb-icon-button")return!1;const s=(e.getAttribute("icon")??"").trim().toLowerCase(),i=(e.getAttribute("aria-label")??"").trim().toLowerCase();return s==="close"||i.includes("stäng")||i.includes("close")}_syncDrawerCloseNode(e){e.getAttribute("slot")!=="drawer-close"&&e.setAttribute("slot","drawer-close"),e.setAttribute("data-drawer-close",this._drawerId),e.setAttribute("aria-controls",this._drawerId),this._drawerReady?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.hasAttribute("hidden")||e.setAttribute("hidden",""),e.getAttribute("aria-hidden")!=="true"&&e.setAttribute("aria-hidden","true"))}_syncDrawerCloseNodes(){for(const e of Array.from(this.children))this._isDrawerCloseNode(e)&&this._syncDrawerCloseNode(e)}_setCollapsed(e){this._collapsed!==e&&(this._collapsed=e,e?this.setAttribute("data-collapsed",""):this.removeAttribute("data-collapsed"))}_setHideSearch(e){e?this.setAttribute("data-hide-search",""):this.removeAttribute("data-hide-search")}_setHideLogoText(e){this._hideLogoText!==e&&(this._hideLogoText=e,e?this.setAttribute("data-hide-logo-text",""):this.removeAttribute("data-hide-logo-text"))}_setMobileSearchOpen(e){this._mobileSearchOpen!==e&&(this._mobileSearchOpen=e,this.toggleAttribute("data-mobile-search-open",e))}_num(e,t){const r=Number.parseFloat(String(e??"").trim());return Number.isFinite(r)?r:t}_tokenPx(e,t){const r=getComputedStyle(this);return this._num(r.getPropertyValue(e),t)}_visible(e){return e?getComputedStyle(e).display!=="none":!1}_overflows(e){return!e||!this._visible(e)?!1:e.scrollWidth>e.clientWidth+1}_tabsOverflows(){const e=this._tabsNav;if(!e||!this._visible(e))return!1;const t=Array.from(e.querySelectorAll(".tab-wrap"));if(t.length===0)return!1;const r=e.getBoundingClientRect();let s=r.left;for(const i of t){const a=i.getBoundingClientRect();a.width<=0||a.right>s&&(s=a.right)}return s-r.left>r.width+1}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this._onGlobalFocusRingKeydown,!0),window.addEventListener("pointerdown",this._onGlobalFocusRingPointerDown,!0),this._initialUpgradeComplete||this.setAttribute("data-upgrading",""),this._harvest({scheduleMeasure:!1}),this._attachSlotObservers()}_finishInitialUpgrade(){this._initialUpgradeComplete||(this._initialUpgradeComplete=!0,requestAnimationFrame(()=>{this.isConnected&&(this._measure(),this.removeAttribute("data-upgrading"))}))}firstUpdated(){this._syncLandmarkAttributes(),this.renderRoot.addEventListener("focusin",this._onLocalFocusIn),this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),this.updateComplete.then(()=>{this._harvest({scheduleMeasure:!1}),this._attachSlotObservers(),this._syncDropdownTabs(),this._finishInitialUpgrade()});const e=this._top;e&&(this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._ro.observe(e)),window.addEventListener("resize",this._onWindowResize,{passive:!0})}updated(e){e.has("searchMax")&&this.style.setProperty("--scb-header-search-max",this.searchMax??"380px"),e.has("searchMin")&&this.style.setProperty("--scb-header-search-min",this.searchMin??"250px"),e.has("searchHeight")&&(this.searchHeight&&this.searchHeight.trim()?this.style.setProperty("--scb-search-height",this.searchHeight.trim()):this.style.removeProperty("--scb-search-height")),(e.has("logoWidth")||e.has("logoHeight")||e.has("logoAspectRatio"))&&this._applyLogoSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this._applySpacing(),(e.has("banner")||e.has("bannerLabel"))&&this._syncLandmarkAttributes(),(e.has("utilityItems")||e.has("tabs")||e.has("logoText")||e.has("logotypeText")||e.has("logoSrc")||e.has("logoWidth")||e.has("logoHeight")||e.has("logoAspectRatio")||e.has("activeTab")||e.has("_slotNavItems")||e.has("_slotUtils")||e.has("_slotMenu")||e.has("showDrawer")||e.has("alwaysShowMenuButton")||e.has("showSearch")||e.has("layoutPending")||e.has("searchMax")||e.has("searchMin")||e.has("size"))&&this.updateComplete.then(()=>{this._scheduleMeasure()}),(e.has("showDrawer")||e.has("deferDrawer"))&&this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),e.has("showSearch")&&!this.showSearch&&this._setMobileSearchOpen(!1),e.has("layoutPending")&&!this.layoutPending&&this.requestLayout(),(e.has("activeTab")||e.has("_slotNavItems")||e.has("tabs")||e.has("size"))&&this.updateComplete.then(()=>{this._syncDropdownTabs()})}disconnectedCallback(){this._ro?.disconnect(),this._slotMo?.disconnect(),this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[],this.renderRoot.removeEventListener("focusin",this._onLocalFocusIn),window.removeEventListener("keydown",this._onGlobalFocusRingKeydown,!0),window.removeEventListener("pointerdown",this._onGlobalFocusRingPointerDown,!0),window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}_mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){const e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,r=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty("--scb-header-spacing-block-start",t):this.style.removeProperty("--scb-header-spacing-block-start"),r?this.style.setProperty("--scb-header-spacing-block-end",r):this.style.removeProperty("--scb-header-spacing-block-end")}_syncLandmarkAttributes(){const e=this.renderRoot.querySelector(".header-landmark");if(!e)return;if(!this.banner){e.removeAttribute("role"),e.removeAttribute("aria-label");return}e.setAttribute("role","banner");const t=(this.bannerLabel??"").trim();t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label")}_applyLogoSizing(){const e=(this.logoWidth??"").trim(),t=(this.logoHeight??"").trim(),r=(this.logoAspectRatio??"").trim();e?this.style.setProperty("--scb-header-logo-img-w",e):this.style.removeProperty("--scb-header-logo-img-w"),t?this.style.setProperty("--scb-header-logo-img-h",t):e?this.style.setProperty("--scb-header-logo-img-h","auto"):this.style.removeProperty("--scb-header-logo-img-h"),r?this.style.setProperty("--scb-header-logo-img-aspect-ratio",r):this.style.removeProperty("--scb-header-logo-img-aspect-ratio")}_closeDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1)}_openDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0)}_ensureFocusRingReady(){customElements.get("md-focus-ring")||(this._focusRingImportPromise??(this._focusRingImportPromise=S(()=>import("../../vendor/lazy-focus-ring.js").then(e=>e.i),__vite__mapDeps([0,1,2]),import.meta.url)),this._focusRingImportPromise.then(({ensureFocusRingReady:e})=>{e()}))}async _ensureDrawerReady(){this._drawerReady||(this._drawerImportPromise??(this._drawerImportPromise=Promise.all([S(()=>import("../scb-drawer/scb-drawer.js"),__vite__mapDeps([3,4,5,6,7,8]),import.meta.url),S(()=>import("../scb-menu/scb-menu.js"),__vite__mapDeps([9,8,4,5,6,7,10,2,11,12,13]),import.meta.url),S(()=>import("../scb-search/scb-search.js"),__vite__mapDeps([14,4,2,5,15,1,6,16,17,0]),import.meta.url),S(()=>import("../../vendor/scb-header-drawer.internal.js").then(e=>{this._drawerRenderer=e}),__vite__mapDeps([18,5,6]),import.meta.url),this._ensureDrawerSlotComponentsReady()]).then(()=>{})),await this._drawerImportPromise,this._drawerReady=!0,this._syncDrawerCloseNodes())}_drawerSlotContains(e){return[...this.querySelectorAll('[slot="drawer-menu"], [slot="drawer-close"]')].some(t=>t.matches(e)||!!t.querySelector(e))}async _ensureDrawerSlotComponentsReady(){this.querySelector('[slot="drawer-menu"], [slot="drawer-close"]')&&await Promise.all([this._drawerSlotContains("scb-button")?S(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([19,8,4,2,5,6]),import.meta.url):Promise.resolve(),this._drawerSlotContains("scb-icon-button")?S(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([20,8,4,2,5,6]),import.meta.url):Promise.resolve(),this._drawerSlotContains("scb-skeleton")?S(()=>import("../scb-skeleton/scb-skeleton.js"),__vite__mapDeps([21,4,5,6]),import.meta.url):Promise.resolve(),this._drawerSlotContains("scb-grid")?S(()=>import("../scb-grid/scb-grid.js"),__vite__mapDeps([22,8,4,5,6,23,24]),import.meta.url):Promise.resolve(),this._drawerSlotContains("scb-grid-item")?S(()=>import("../scb-grid/scb-grid-item.js"),__vite__mapDeps([23,8,4,5,6]),import.meta.url):Promise.resolve()])}async _ensureDropdownReady(){customElements.get("scb-dropdown")||(this._dropdownImportPromise??(this._dropdownImportPromise=S(()=>import("../scb-dropdown/scb-dropdown.js").then(()=>{}),__vite__mapDeps([25,4,5,15,1,6,19,8,2,11,26,27,16,17,7,0,28]),import.meta.url)),await this._dropdownImportPromise)}_syncMenuBtnAria(){this.renderRoot.querySelectorAll(".menu-trigger").forEach(e=>{e.setAttribute("aria-expanded",String(this._menuExpanded))})}_getNavItems(){return this._slotNavItems.length?this._slotNavItems:(this.tabs??[]).map(e=>({kind:"tab",...e}))}_getDropdownForSlot(e){const t=this.querySelector(`[slot="${e}"]`);return t?t.tagName.toLowerCase()==="scb-dropdown"?t:t.querySelector("scb-dropdown"):null}_syncDropdownTabs(){this._getNavItems().forEach((e,t)=>{if(e.kind!=="dropdown")return;const r=this._getDropdownForSlot(e.slotName);if(!r)return;const s=String(t);r.getAttribute("data-index")!==s&&r.setAttribute("data-index",s),r.hasAttribute("as-tab")||r.setAttribute("as-tab","");const i=this.size,a=r;a?.size!==i&&(a.size=i),t===this.activeTab?r.getAttribute("aria-current")!=="page"&&r.setAttribute("aria-current","page"):r.hasAttribute("aria-current")&&r.removeAttribute("aria-current")})}_readTabIndexFromEvent(e){const t=e.composedPath?e.composedPath():[];for(const r of t){if(!(r instanceof HTMLElement))continue;const s=r.getAttribute("data-index");if(s==null)continue;const i=Number(s);if(Number.isFinite(i))return i}return null}_focusTabAtIndex(e){const t=this._getNavItems()[e];if(t){if(t.kind==="dropdown"){this._getDropdownForSlot(t.slotName)?.focus?.();return}this.renderRoot.querySelector(`.tab-link[data-index="${e}"]`)?.focus?.()}}_syncFlags(e,t){this.toggleAttribute("data-no-utility",e),this.toggleAttribute("data-no-search",t)}_emitSearchInput(e){this.searchText=e,this.dispatchEvent(new CustomEvent("search-input",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchinput",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchtextchange",{detail:{value:this.searchText},bubbles:!0,composed:!0}))}_emitSearchChange(e,t){this.searchText=e,this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchchange",{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0}))}_renderMenuButton(e="",t=!1){const r=e?`menu-trigger ${e}`:"menu-trigger",s=(this.menuButtonLabel??"").trim()||"Meny",i=this._menuExpanded?"true":"false";return t?m`
|
|
55
|
+
`,document.head.appendChild(b);const e=n=>{const u=String(n??"").trim();if(u)return/^\d+$/.test(u)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(u,10)))})`:u},t=n=>{const u=String(n??"").trim();if(!u)return!1;try{const p=JSON.parse(u);return Array.isArray(p)&&p.length>0}catch{return!1}},r=n=>n!=null&&!/^(false|0|off|no)$/i.test(n.trim()),s=n=>{for(const u of Array.from(n.children)){const p=u.tagName.toLowerCase();if(p==="scb-header-tab"||p==="scb-dropdown")return!0}return!1},i=n=>{s(n)||t(n.getAttribute("tabs"))||r(n.getAttribute("reserve-tabs"))||r(n.getAttribute("layout-pending"))?n.setAttribute("data-pre-has-tabs",""):n.removeAttribute("data-pre-has-tabs");const u=e(n.getAttribute("spacing")),p=e(n.getAttribute("spacing-top"))??u,f=e(n.getAttribute("spacing-bottom"))??u;p?n.style.setProperty("--scb-header-spacing-block-start",p):n.style.removeProperty("--scb-header-spacing-block-start"),f?n.style.setProperty("--scb-header-spacing-block-end",f):n.style.removeProperty("--scb-header-spacing-block-end");const y=(n.getAttribute("logo-width")??"").trim();y?n.style.setProperty("--scb-header-pre-logo-w",y):n.style.removeProperty("--scb-header-pre-logo-w");const _=(n.getAttribute("logo-height")??"").trim();_?n.style.setProperty("--scb-header-pre-logo-img-h",_):n.style.removeProperty("--scb-header-pre-logo-img-h");const l=(n.getAttribute("search-height")??"").trim();l?n.style.setProperty("--scb-header-pre-control-size",l):n.style.removeProperty("--scb-header-pre-control-size")};document.querySelectorAll("scb-header").forEach(i);const d=new MutationObserver(n=>{for(const u of n){if(u.type==="attributes"){const p=u.target;p instanceof HTMLElement&&p.tagName.toLowerCase()==="scb-header"&&i(p);continue}if(u.type==="childList"){const p=[...Array.from(u.addedNodes),...Array.from(u.removedNodes)];for(const f of p){if(!(f instanceof HTMLElement))continue;if(f.tagName.toLowerCase()==="scb-header"){i(f);continue}const y=f.closest?.("scb-header");y&&i(y)}}}});d.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabs","spacing","spacing-top","spacing-bottom","logo-width","logo-height","logo-aspect-ratio","logo-alt","logotype-text","search-height","reserve-tabs","layout-pending"]}),customElements.whenDefined("scb-header").then(()=>{d.disconnect()})};$();var M={fromAttribute:b=>b==null?!0:!/^(false|0|off|no)$/i.test(b),toAttribute:b=>String(!!b)},z={fromAttribute:b=>b==null?!1:!/^(false|0|off|no)$/i.test(b),toAttribute:b=>b?"":null},N={fromAttribute:b=>b==="small"||b==="large"?b:"medium",toAttribute:b=>{const e=String(b??"");return e==="small"||e==="large"?e:null}},o=(T=class extends D{constructor(){super(),this.maxWidth="1440px",this.size="medium",this.logoText="",this.logotypeText="",this.logoAlt="",this.logoHref="/",this.logoSrc="",this.logoWidth="",this.logoHeight="",this.logoAspectRatio="",this.logoInvertDm=!1,this.banner=!1,this.tabs=[],this.activeTab=null,this.reserveTabs=!1,this.layoutPending=!1,this.utilityItems=[],this.searchButtonLabel="Sök",this.menuButtonLabel="Meny",this.deferDrawer=!1,this.showDrawer=!0,this.alwaysShowMenuButton=!1,this.showSearch=!0,this.includeUtilityInMenu=!1,this.drawerOverlay=!0,this.searchText="",this._drawerId="main-drawer",this._menuExpanded=!1,this._searchId="header-search",this._drawerReady=!1,this._mobileSearchOpen=!1,this._initialUpgradeComplete=!1,this._slotNavItems=[],this._slotUtils=[],this._slotMenu=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this.layoutPending||this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{window.innerWidth>=this.BP_SM&&this._mobileSearchOpen&&this._setMobileSearchOpen(!1),this._scheduleMeasure()},this._onMenuSelect=t=>{const r=t.detail;this.dispatchEvent(new CustomEvent("scb-menu-select",{detail:r,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("scbmenuselect",{detail:r,bubbles:!0,composed:!0}));const s=r?.item,i=typeof r?.href=="string"?r.href:typeof r?.itemHref=="string"?r.itemHref:typeof r?.item_href=="string"?r.item_href:"",a=s?s.getAttribute("item-href")??s.getAttribute("href")??"":"";String(i||a||"").trim()&&this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._slotWatchers=[],this._harvestPending=!1,this._harvest=(t={})=>{const r=Array.from(this.children),s=[],i=[],a=[];let d=-1,n=!1;const u=l=>({label:l.getAttribute("label")??"",href:l.getAttribute("href")??void 0,icon:l.getAttribute("icon")??void 0}),p=l=>{l.hasAttribute("role")&&l.removeAttribute("role"),l.hasAttribute("hidden")||l.setAttribute("hidden",""),l.getAttribute("aria-hidden")!=="true"&&l.setAttribute("aria-hidden","true")};for(const l of r){const A=l.tagName.toLowerCase();if(this._isDrawerCloseNode(l)){this._syncDrawerCloseNode(l);continue}if(A==="scb-header-tab"){p(l);const g=l.getAttribute("label")??"",v=l.getAttribute("href"),C=v&&v.trim()!==""?v:void 0;(l.hasAttribute("selected")||l.getAttribute("selected")==="true"||l.getAttribute("active")==="true"||l.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length),s.push({kind:"tab",label:g,href:C});continue}if(A==="scb-badge"){const g=l.querySelector("scb-dropdown");if(g){n=!0;const v=g.getAttribute("label")??"";(g.hasAttribute("selected")||g.getAttribute("selected")==="true"||g.getAttribute("active")==="true"||g.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length);const C=`scb-header-tab-${s.length}`;l.getAttribute("slot")!==C&&l.setAttribute("slot",C),g.hasAttribute("slot")&&g.removeAttribute("slot"),g.hasAttribute("as-tab")||g.setAttribute("as-tab",""),s.push({kind:"dropdown",slotName:C,label:v});continue}}if(A==="scb-dropdown"){n=!0;const g=l.getAttribute("label")??"";(l.hasAttribute("selected")||l.getAttribute("selected")==="true"||l.getAttribute("active")==="true"||l.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length);const v=`scb-header-tab-${s.length}`;l.getAttribute("slot")!==v&&l.setAttribute("slot",v),l.hasAttribute("as-tab")||l.setAttribute("as-tab",""),s.push({kind:"dropdown",slotName:v,label:g});continue}if(A==="scb-header-utility"){p(l),i.push({label:l.getAttribute("label")??"",href:l.getAttribute("href")??"#",target:l.getAttribute("target")??void 0});continue}if(A==="scb-header-menu-group"){p(l);const g={label:l.getAttribute("label")??"",icon:l.getAttribute("icon")??void 0,children:[]};l.querySelectorAll("scb-header-menu-item").forEach(v=>g.children.push(u(v))),a.push(g);continue}if(A==="scb-header-menu-item"){p(l),a.push(u(l));continue}l.hasAttribute("slot")||p(l)}const f=!this._sameNavItems(this._slotNavItems,s),y=!this._sameUtilityItems(this._slotUtils,i),_=!this._sameMenuNodes(this._slotMenu,a);f&&(this._slotNavItems=s),y&&(this._slotUtils=i),_&&(this._slotMenu=a),n&&this._ensureDropdownReady(),!this.hasAttribute("active-tab")&&d>=0&&this.activeTab!==d&&(this.activeTab=d),(t.scheduleMeasure??!0)&&queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{if(this.layoutPending)return;const t=this._top,r=this._logoGroup;if(!t||!r)return;const s=window.innerWidth,i=t.clientWidth,a=this._overflows(this._util),d=this._tabsOverflows(),n=s<this.BP_MD||a||d;this._collapsed?!n&&i>=this._unlockAtWidth&&this._setCollapsed(!1):n&&(this._unlockAtWidth=i+this._HYST,this._setCollapsed(!0));let u=!1;if(this.showSearch&&s>=this.BP_SM&&s<this.BP_MD&&this._searchWrap){const f=getComputedStyle(this._searchWrap),y=Math.max(this._num(f.minWidth,this._tokenPx("--scb-header-search-min",250)),this._tokenPx("--scb-header-search-min",250)),_=this._num(getComputedStyle(t).gap,this._tokenPx("--spacing-7",24)),l=this.showDrawer&&(this.alwaysShowMenuButton||s<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-extra-extra-large",48):0;u=r.getBoundingClientRect().width+_+y+_+l+8>i+.5}this._setHideSearch(u);let p=!1;if(this.showDrawer&&(this.alwaysShowMenuButton||s<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const f=this._num(getComputedStyle(t).gap,this._tokenPx("--spacing-7",24)),y=this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-extra-extra-large",48),_=(this._logoGroup?.getBoundingClientRect().width||0)+f+y;this._hideLogoText?p=!(i>=this._logoTextUnlockAt):_>i+.5&&(p=!0,this._logoTextUnlockAt=i+this._HYST)}else p=!1,this._logoTextUnlockAt=0;this._setHideLogoText(p)},this._onGlobalFocusRingKeydown=t=>{t.key==="Tab"&&(this.toggleAttribute("data-keyboard-focus",!0),this._ensureFocusRingReady())},this._onGlobalFocusRingPointerDown=()=>{this.removeAttribute("data-keyboard-focus")},this._onLocalFocusIn=t=>{const r=t.composedPath()[0];r instanceof HTMLElement&&r.matches(":focus-visible")&&this._ensureFocusRingReady()},this._onDrawerOpened=()=>{this._menuExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("draweropen",{bubbles:!0,composed:!0}))},this._onDrawerClosed=()=>{this._menuExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("drawerclose",{bubbles:!0,composed:!0}))},this._onMenuClick=async t=>{this.showDrawer&&(this._setMobileSearchOpen(!1),this.dispatchEvent(new CustomEvent("menu-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("menuclick",{bubbles:!0,composed:!0})),!this._drawerReady&&(t.stopPropagation(),await this._ensureDrawerReady(),await this.updateComplete,this._openDrawerNow()))},this._onMobileSearchToggle=()=>{const t=!this._mobileSearchOpen;this._setMobileSearchOpen(t),t&&this.updateComplete.then(()=>{this.renderRoot.querySelector(".mobile-search-panel .header-search-input")?.focus?.()})},this._onTabClick=t=>{const r=t.currentTarget;if(!r)return;const s=r.tagName.toLowerCase()==="a";if(s&&(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey))return;const i=r.getAttribute("data-index"),a=i!=null?Number(i):0,d=this._getNavItems()[a];if(d?.kind==="dropdown")return;this.activeTab=a;const n=d?.kind==="tab"?d.href??"":"",u=new CustomEvent("tab-change",{detail:{index:a,href:n},bubbles:!0,composed:!0,cancelable:!0}),p=new CustomEvent("tabchange",{detail:{index:a,href:n},bubbles:!0,composed:!0,cancelable:!0});!(this.dispatchEvent(u)&&this.dispatchEvent(p))&&s&&t.preventDefault()},this._onDropdownTabActivate=t=>{const r=t.detail?.dataIndex,s=typeof r=="number"?r:typeof r=="string"?Number(r):this._readTabIndexFromEvent(t);if(s==null||!Number.isFinite(s))return;const i=this._getNavItems();s<0||s>=i.length||i[s]?.kind==="dropdown"&&(this.activeTab=s,this.dispatchEvent(new CustomEvent("tab-change",{detail:{index:s,href:""},bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("tabchange",{detail:{index:s,href:""},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=t=>{const r=t.key;if(r!=="ArrowLeft"&&r!=="ArrowRight"&&r!=="Home"&&r!=="End")return;const s=this._getNavItems();if(!s.length)return;const i=this._readTabIndexFromEvent(t);if(i==null)return;let a=Math.max(0,Math.min(s.length-1,i));r==="ArrowRight"?a=(a+1)%s.length:r==="ArrowLeft"?a=(a-1+s.length)%s.length:r==="Home"?a=0:r==="End"&&(a=s.length-1),t.preventDefault(),this._focusTabAtIndex(a)},this._onNativeSearchInput=t=>{const r=t.currentTarget;this._emitSearchInput(r?.value??"")},this._onNativeSearchSubmit=t=>{t.preventDefault();const r=t.currentTarget?.querySelector(".header-search-input");this._emitSearchChange(r?.value??"")},this._onSearchClear=()=>{this.searchText="",this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchtextchange",{detail:{value:""},bubbles:!0,composed:!0}))},this._onNativeSearchClear=t=>{t.preventDefault(),this._onSearchClear(),this.updateComplete.then(()=>{const r=t.currentTarget?.closest("form")?.querySelector(".header-search-input");r&&(r.value=""),r?.focus()})};const e=++L;this._drawerId=`scb-header-drawer-${e}`,this._searchId=`scb-header-search-${e}`}requestLayout(){this.layoutPending||(this.setAttribute("data-layout-settling",""),this.updateComplete.then(()=>{this.isConnected&&(this._measure(),this.removeAttribute("data-layout-settling"))}))}get _HYST(){return this._tokenPx("--spacing-11",64)}get BP_SM(){return this._tokenPx("--bp-sm",P.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx("--bp-md",P.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}get _top(){return this.renderRoot.querySelector(".top-row")}get _util(){return this.renderRoot.querySelector(".utility")}get _logoGroup(){return this.renderRoot.querySelector(".logo-wrap")||this.renderRoot.querySelector(".logo-group")}get _searchWrap(){return this.renderRoot.querySelector(".search")}get _menuBtn(){return this.renderRoot.querySelector(".menu-trigger")}get _tabsNav(){return this.renderRoot.querySelector(".tabs-nav")}_attachSlotObservers(){this._slotMo?.disconnect(),this._slotWatchers.forEach(i=>i.disconnect()),this._slotWatchers=[];const e=["label","href","icon","target","selected","aria-current","active","role"],t=i=>{const a=new MutationObserver(d=>{this._scheduleHarvest()});this._slotWatchers.push(a),a.observe(i,{attributes:!0,attributeFilter:e})},r=()=>{this._slotWatchers.forEach(a=>a.disconnect()),this._slotWatchers=[];const i=Array.from(this.children);for(const a of i){const d=a.tagName.toLowerCase();if((d==="scb-header-tab"||d==="scb-dropdown"||d==="scb-header-utility"||d==="scb-header-menu-item"||d==="scb-header-menu-group"||d==="scb-badge")&&t(a),d==="scb-badge"){const n=a,u=new MutationObserver(f=>{r(),this._scheduleHarvest()});this._slotWatchers.push(u),u.observe(n,{childList:!0});const p=n.querySelector("scb-dropdown");p&&t(p);continue}if(d==="scb-header-menu-group"){const n=a,u=new MutationObserver(p=>{r(),this._scheduleHarvest()});this._slotWatchers.push(u),u.observe(n,{childList:!0,subtree:!0}),n.querySelectorAll("scb-header-menu-item").forEach(p=>t(p))}}},s=new MutationObserver(i=>{let a=!1;for(const d of i)if(d.type==="childList"){a=!0;break}a&&r(),this._scheduleHarvest()});this._slotMo=s,s.observe(this,{childList:!0}),r()}_sameNavItems(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.kind!==i.kind||s.label!==i.label)return!1;if(s.kind==="tab"&&i.kind==="tab"){if((s.href??"")!==(i.href??""))return!1}else if(s.kind==="dropdown"&&i.kind==="dropdown"&&s.slotName!==i.slotName)return!1}return!0}_sameUtilityItems(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.label!==i.label||s.href!==i.href||(s.target??"")!==(i.target??""))return!1}return!0}_sameMenuNodes(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.label!==i.label||(s.href??"")!==(i.href??"")||(s.icon??"")!==(i.icon??"")||!this._sameMenuNodes(s.children??[],i.children??[]))return!1}return!0}_isDrawerCloseNode(e){const t=e.tagName.toLowerCase(),r=e.getAttribute("slot");if(r==="drawer-close")return!0;if(r||t!=="scb-icon-button")return!1;const s=(e.getAttribute("icon")??"").trim().toLowerCase(),i=(e.getAttribute("aria-label")??"").trim().toLowerCase();return s==="close"||i.includes("stäng")||i.includes("close")}_syncDrawerCloseNode(e){e.getAttribute("slot")!=="drawer-close"&&e.setAttribute("slot","drawer-close"),e.setAttribute("data-drawer-close",this._drawerId),e.setAttribute("aria-controls",this._drawerId),this._drawerReady?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.hasAttribute("hidden")||e.setAttribute("hidden",""),e.getAttribute("aria-hidden")!=="true"&&e.setAttribute("aria-hidden","true"))}_syncDrawerCloseNodes(){for(const e of Array.from(this.children))this._isDrawerCloseNode(e)&&this._syncDrawerCloseNode(e)}_setCollapsed(e){this._collapsed!==e&&(this._collapsed=e,e?this.setAttribute("data-collapsed",""):this.removeAttribute("data-collapsed"))}_setHideSearch(e){e?this.setAttribute("data-hide-search",""):this.removeAttribute("data-hide-search")}_setHideLogoText(e){this._hideLogoText!==e&&(this._hideLogoText=e,e?this.setAttribute("data-hide-logo-text",""):this.removeAttribute("data-hide-logo-text"))}_setMobileSearchOpen(e){this._mobileSearchOpen!==e&&(this._mobileSearchOpen=e,this.toggleAttribute("data-mobile-search-open",e))}_num(e,t){const r=Number.parseFloat(String(e??"").trim());return Number.isFinite(r)?r:t}_tokenPx(e,t){const r=getComputedStyle(this);return this._num(r.getPropertyValue(e),t)}_visible(e){return e?getComputedStyle(e).display!=="none":!1}_overflows(e){return!e||!this._visible(e)?!1:e.scrollWidth>e.clientWidth+1}_tabsOverflows(){const e=this._tabsNav;if(!e||!this._visible(e))return!1;const t=Array.from(e.querySelectorAll(".tab-wrap"));if(t.length===0)return!1;const r=e.getBoundingClientRect();let s=r.left;for(const i of t){const a=i.getBoundingClientRect();a.width<=0||a.right>s&&(s=a.right)}return s-r.left>r.width+1}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this._onGlobalFocusRingKeydown,!0),window.addEventListener("pointerdown",this._onGlobalFocusRingPointerDown,!0),this._initialUpgradeComplete||this.setAttribute("data-upgrading",""),this._harvest({scheduleMeasure:!1}),this._attachSlotObservers()}_finishInitialUpgrade(){this._initialUpgradeComplete||(this._initialUpgradeComplete=!0,requestAnimationFrame(()=>{this.isConnected&&(this._measure(),this.removeAttribute("data-upgrading"))}))}firstUpdated(){this._syncLandmarkAttributes(),this.renderRoot.addEventListener("focusin",this._onLocalFocusIn),this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),this.updateComplete.then(()=>{this._harvest({scheduleMeasure:!1}),this._attachSlotObservers(),this._syncDropdownTabs(),this._finishInitialUpgrade()});const e=this._top;e&&(this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._ro.observe(e)),window.addEventListener("resize",this._onWindowResize,{passive:!0})}updated(e){e.has("searchMax")&&this.style.setProperty("--scb-header-search-max",this.searchMax??"380px"),e.has("searchMin")&&this.style.setProperty("--scb-header-search-min",this.searchMin??"250px"),e.has("searchHeight")&&(this.searchHeight&&this.searchHeight.trim()?this.style.setProperty("--scb-search-height",this.searchHeight.trim()):this.style.removeProperty("--scb-search-height")),(e.has("logoWidth")||e.has("logoHeight")||e.has("logoAspectRatio"))&&this._applyLogoSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this._applySpacing(),(e.has("banner")||e.has("bannerLabel"))&&this._syncLandmarkAttributes(),(e.has("utilityItems")||e.has("tabs")||e.has("logoText")||e.has("logotypeText")||e.has("logoSrc")||e.has("logoWidth")||e.has("logoHeight")||e.has("logoAspectRatio")||e.has("activeTab")||e.has("_slotNavItems")||e.has("_slotUtils")||e.has("_slotMenu")||e.has("showDrawer")||e.has("alwaysShowMenuButton")||e.has("showSearch")||e.has("layoutPending")||e.has("searchMax")||e.has("searchMin")||e.has("size"))&&this.updateComplete.then(()=>{this._scheduleMeasure()}),(e.has("showDrawer")||e.has("deferDrawer"))&&this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),e.has("showSearch")&&!this.showSearch&&this._setMobileSearchOpen(!1),e.has("layoutPending")&&!this.layoutPending&&this.requestLayout(),(e.has("activeTab")||e.has("_slotNavItems")||e.has("tabs")||e.has("size"))&&this.updateComplete.then(()=>{this._syncDropdownTabs()})}disconnectedCallback(){this._ro?.disconnect(),this._slotMo?.disconnect(),this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[],this.renderRoot.removeEventListener("focusin",this._onLocalFocusIn),window.removeEventListener("keydown",this._onGlobalFocusRingKeydown,!0),window.removeEventListener("pointerdown",this._onGlobalFocusRingPointerDown,!0),window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}_mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){const e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,r=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty("--scb-header-spacing-block-start",t):this.style.removeProperty("--scb-header-spacing-block-start"),r?this.style.setProperty("--scb-header-spacing-block-end",r):this.style.removeProperty("--scb-header-spacing-block-end")}_syncLandmarkAttributes(){const e=this.renderRoot.querySelector(".header-landmark");if(!e)return;if(!this.banner){e.removeAttribute("role"),e.removeAttribute("aria-label");return}e.setAttribute("role","banner");const t=(this.bannerLabel??"").trim();t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label")}_applyLogoSizing(){const e=(this.logoWidth??"").trim(),t=(this.logoHeight??"").trim(),r=(this.logoAspectRatio??"").trim();e?this.style.setProperty("--scb-header-logo-img-w",e):this.style.removeProperty("--scb-header-logo-img-w"),t?this.style.setProperty("--scb-header-logo-img-h",t):e?this.style.setProperty("--scb-header-logo-img-h","auto"):this.style.removeProperty("--scb-header-logo-img-h"),r?this.style.setProperty("--scb-header-logo-img-aspect-ratio",r):this.style.removeProperty("--scb-header-logo-img-aspect-ratio")}_closeDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1)}_openDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0)}_ensureFocusRingReady(){customElements.get("md-focus-ring")||(this._focusRingImportPromise??(this._focusRingImportPromise=S(()=>import("../shared/lazy-focus-ring.js"),__vite__mapDeps([0,1]),import.meta.url)),this._focusRingImportPromise.then(({ensureFocusRingReady:e})=>{e()}))}async _ensureDrawerReady(){this._drawerReady||(this._drawerImportPromise??(this._drawerImportPromise=Promise.all([S(()=>import("../scb-drawer/scb-drawer.js"),__vite__mapDeps([2,3,4,5,6,7]),import.meta.url),S(()=>import("../scb-menu/scb-menu.js"),__vite__mapDeps([8,7,3,4,5,6,9,1,10,11,12]),import.meta.url),S(()=>import("../scb-search/scb-search.js"),__vite__mapDeps([13,3,1,4,14,15,5,16,17,0]),import.meta.url),S(()=>import("../../vendor/scb-header-drawer.internal.js").then(e=>{this._drawerRenderer=e}),__vite__mapDeps([18,4,5]),import.meta.url),this._ensureDrawerSlotComponentsReady()]).then(()=>{})),await this._drawerImportPromise,this._drawerReady=!0,this._syncDrawerCloseNodes())}_drawerSlotContains(e){return[...this.querySelectorAll('[slot="drawer-menu"], [slot="drawer-close"]')].some(t=>t.matches(e)||!!t.querySelector(e))}async _ensureDrawerSlotComponentsReady(){this.querySelector('[slot="drawer-menu"], [slot="drawer-close"]')&&await Promise.all([this._drawerSlotContains("scb-button")?S(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([19,7,3,1,4,5]),import.meta.url):Promise.resolve(),this._drawerSlotContains("scb-icon-button")?S(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([20,7,3,1,4,5]),import.meta.url):Promise.resolve(),this._drawerSlotContains("scb-skeleton")?S(()=>import("../scb-skeleton/scb-skeleton.js"),__vite__mapDeps([21,3,4,5]),import.meta.url):Promise.resolve(),this._drawerSlotContains("scb-grid")?S(()=>import("../scb-grid/scb-grid.js"),__vite__mapDeps([22,7,3,4,5,23,24]),import.meta.url):Promise.resolve(),this._drawerSlotContains("scb-grid-item")?S(()=>import("../scb-grid/scb-grid-item.js"),__vite__mapDeps([23,7,3,4,5]),import.meta.url):Promise.resolve()])}async _ensureDropdownReady(){customElements.get("scb-dropdown")||(this._dropdownImportPromise??(this._dropdownImportPromise=S(()=>import("../scb-dropdown/scb-dropdown.js").then(()=>{}),__vite__mapDeps([25,3,4,14,15,5,19,7,1,10,26,27,16,17,6,0,28]),import.meta.url)),await this._dropdownImportPromise)}_syncMenuBtnAria(){this.renderRoot.querySelectorAll(".menu-trigger").forEach(e=>{e.setAttribute("aria-expanded",String(this._menuExpanded))})}_getNavItems(){return this._slotNavItems.length?this._slotNavItems:(this.tabs??[]).map(e=>({kind:"tab",...e}))}_getDropdownForSlot(e){const t=this.querySelector(`[slot="${e}"]`);return t?t.tagName.toLowerCase()==="scb-dropdown"?t:t.querySelector("scb-dropdown"):null}_syncDropdownTabs(){this._getNavItems().forEach((e,t)=>{if(e.kind!=="dropdown")return;const r=this._getDropdownForSlot(e.slotName);if(!r)return;const s=String(t);r.getAttribute("data-index")!==s&&r.setAttribute("data-index",s),r.hasAttribute("as-tab")||r.setAttribute("as-tab","");const i=this.size,a=r;a?.size!==i&&(a.size=i),t===this.activeTab?r.getAttribute("aria-current")!=="page"&&r.setAttribute("aria-current","page"):r.hasAttribute("aria-current")&&r.removeAttribute("aria-current")})}_readTabIndexFromEvent(e){const t=e.composedPath?e.composedPath():[];for(const r of t){if(!(r instanceof HTMLElement))continue;const s=r.getAttribute("data-index");if(s==null)continue;const i=Number(s);if(Number.isFinite(i))return i}return null}_focusTabAtIndex(e){const t=this._getNavItems()[e];if(t){if(t.kind==="dropdown"){this._getDropdownForSlot(t.slotName)?.focus?.();return}this.renderRoot.querySelector(`.tab-link[data-index="${e}"]`)?.focus?.()}}_syncFlags(e,t){this.toggleAttribute("data-no-utility",e),this.toggleAttribute("data-no-search",t)}_emitSearchInput(e){this.searchText=e,this.dispatchEvent(new CustomEvent("search-input",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchinput",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchtextchange",{detail:{value:this.searchText},bubbles:!0,composed:!0}))}_emitSearchChange(e,t){this.searchText=e,this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchchange",{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0}))}_renderMenuButton(e="",t=!1){const r=e?`menu-trigger ${e}`:"menu-trigger",s=(this.menuButtonLabel??"").trim()||"Meny",i=this._menuExpanded?"true":"false";return t?m`
|
|
56
56
|
<button
|
|
57
57
|
type="button"
|
|
58
58
|
class=${`${r} header-icon-button`}
|
|
@@ -365,4 +365,4 @@ import{f as k,g as w,h as D,m as I,p as h,v as m,y as R}from"../../vendor/vendor
|
|
|
365
365
|
var(--md-sys-typescale-title-small-size, 1rem)
|
|
366
366
|
);line-height:var(--scb-header-tab-line-height,
|
|
367
367
|
var(--md-sys-typescale-title-small-line-height, 1.5rem)
|
|
368
|
-
);font-weight:var(--md-sys-typescale-title-small-weight, 500);letter-spacing:var(--md-sys-typescale-title-small-tracking, 0);color:var(--md-sys-color-on-surface);white-space:nowrap;border-radius:0;outline:0}.tab-link[aria-current=page]{color:var(--md-sys-color-primary)}.tab-link::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;border-radius:999px 999px 0 0;background-color:transparent}.tab-link[aria-current=page]::after{background-color:var(--md-sys-color-primary)}.tab-link:focus-visible{outline:0}.header-icon-button:focus-visible md-focus-ring,.header-search-clear:focus-visible md-focus-ring,.header-text-button:focus-visible md-focus-ring,.search-submit:focus-visible md-focus-ring,.tab-link:focus-visible+md-focus-ring,.utility-link:focus-visible md-focus-ring{display:block}.header-text-button,.utility-link{position:relative}.header-icon-button,.header-text-button,.search-submit,.utility-link{border:0;font:inherit;letter-spacing:0;-webkit-tap-highlight-color:transparent}.search-submit{position:relative}.header-text-button,.search-submit,.utility-link{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-block-size:calc(var(--md-sys-typescale-label-small-line-height, 20px) + ((var(--spacing-4, 12px) - var(--spacing-1, 2px))*2));padding-block:calc(var(--spacing-4, 12px) - var(--spacing-1, 2px));padding-inline:var(--spacing-5, 16px);border-radius:var(--radius-full, 1000px);color:var(--md-sys-color-primary, var(--p-40, #1f44ff));font-family:var(--md-sys-typescale-label-small-font, var(--brand-font, Inter), sans-serif);font-size:var(--md-sys-typescale-label-small-size, 14px);line-height:var(--md-sys-typescale-label-small-line-height, 20px);font-weight:var(--md-sys-typescale-label-small-weight, 600);text-decoration:none;background:0 0;cursor:pointer;white-space:nowrap}.header-text-button:hover,.utility-link:hover{background:color-mix(in srgb,var(--md-sys-color-primary, #1f44ff) 8%,transparent)}.search-submit{min-block-size:var(--scb-search-height, var(--scale-11, 48px));min-inline-size:var(--scale-12, 64px);color:var(--md-sys-color-on-secondary-container, var(--p-30, #1e00be));background:var(--md-sys-color-secondary-container, var(--p-90, #d6f1ff))}.search-submit:hover{background:color-mix(in srgb,var(--md-sys-color-secondary-container, #d6f1ff) 92%,var(--md-sys-color-on-secondary-container, #1e00be))}.header-icon-button{position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:calc(var(--icon-size-medium, 24px) + (var(--spacing-3, 12px)*2));block-size:calc(var(--icon-size-medium, 24px) + (var(--spacing-3, 12px)*2));padding:0;border-radius:var(--radius-full, 1000px);color:var(--md-sys-color-on-surface, #1b1b1f);background:0 0;cursor:pointer}.mobile-search-close,.mobile-search-trigger{color:var(--md-sys-color-on-secondary-container, var(--p-30, #1e00be));background:var(--md-sys-color-secondary-container, var(--p-90, #d6f1ff))}@media (min-width:600px){.mobile-search-trigger.header-icon-button{display:none}}.header-icon-button:hover,.header-search-clear:hover{background:color-mix(in srgb,currentColor 8%,transparent)}.mobile-search-close:hover,.mobile-search-trigger:hover{background:color-mix(in srgb,var(--md-sys-color-secondary-container, #d6f1ff) 92%,var(--md-sys-color-on-secondary-container, #1e00be))}.header-icon-button:focus,.header-icon-button:focus-visible,.header-search-clear:focus,.header-search-clear:focus-visible,.header-text-button:focus,.header-text-button:focus-visible,.search-submit:focus,.search-submit:focus-visible,.utility-link:focus,.utility-link:focus-visible{outline:0}.header-icon-button:focus-visible,.header-search-clear:focus-visible,.header-text-button:focus-visible,.search-submit:focus-visible,.utility-link:focus-visible{outline:0}.header-icon-button md-focus-ring,.header-search-clear md-focus-ring,.header-text-button md-focus-ring,.search-submit md-focus-ring,.utility-link md-focus-ring{position:absolute;inset:var(--spacing-neg-2, -4px);pointer-events:none;display:none;border-radius:inherit}.header-text-button{gap:var(--spacing-3, 8px)}.header-text-button .header-symbol{inline-size:var(--icon-size-small, 20px);font-size:var(--icon-size-small, 20px);line-height:var(--icon-size-small, 20px)}.header-symbol,.sr-only{overflow:hidden;white-space:nowrap}.header-symbol{display:inline-block;inline-size:1em;block-size:1em;font-family:"Material Symbols Outlined";font-size:var(--icon-size-medium, 24px);line-height:1;text-align:center;text-transform:none;word-wrap:normal;direction:ltr;font-feature-settings:"liga"1;font-variation-settings:"FILL"0,"wght"400,"GRAD"0,"opsz"24;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.header-symbol.scb-svg-icon{fill:currentColor;font:inherit}.header-search-icon.header-symbol{display:inline-flex;align-items:center;justify-content:center;inline-size:var(--scb-header-search-leading-size);font-size:var(--scb-header-search-icon-size)}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;clip:rect(0,0,0,0);border:0}.drawer-close{box-sizing:border-box;display:flex;justify-content:flex-end;padding-block-start:var(--spacing-4, 12px);padding-inline:var(--spacing-4, 12px);background:var(--md-sys-color-surface-container-lowest)}.drawer-close[hidden]{display:none}.drawer-close ::slotted(*){flex:0 0 auto}.divider{border-bottom:var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant, #e0e0e0);position:relative;z-index:0}:host([data-hide-logo-text]) .logo-text{display:none}`,T);c([h({type:String,attribute:"max-width"})],o.prototype,"maxWidth",void 0);c([h({type:String,reflect:!0})],o.prototype,"spacing",void 0);c([h({type:String,attribute:"spacing-top",reflect:!0})],o.prototype,"spacingTop",void 0);c([h({type:String,attribute:"spacing-bottom",reflect:!0})],o.prototype,"spacingBottom",void 0);c([h({type:String,reflect:!0,converter:N})],o.prototype,"size",void 0);c([h({type:String,attribute:"logo-text"})],o.prototype,"logoText",void 0);c([h({type:String,attribute:"logotype-text"})],o.prototype,"logotypeText",void 0);c([h({type:String,attribute:"logo-alt"})],o.prototype,"logoAlt",void 0);c([h({type:String,attribute:"logo-href"})],o.prototype,"logoHref",void 0);c([h({type:String,attribute:"logo-src"})],o.prototype,"logoSrc",void 0);c([h({type:String,attribute:"logo-width"})],o.prototype,"logoWidth",void 0);c([h({type:String,attribute:"logo-height"})],o.prototype,"logoHeight",void 0);c([h({type:String,attribute:"logo-aspect-ratio"})],o.prototype,"logoAspectRatio",void 0);c([h({type:Boolean,attribute:"logo-invert-dm",reflect:!0,converter:z})],o.prototype,"logoInvertDm",void 0);c([h({type:Boolean,reflect:!0})],o.prototype,"banner",void 0);c([h({type:String,attribute:"banner-label"})],o.prototype,"bannerLabel",void 0);c([h({type:Array,attribute:"tabs",converter:o._JSON_ARRAY})],o.prototype,"tabs",void 0);c([h({type:Number,attribute:"active-tab"})],o.prototype,"activeTab",void 0);c([h({type:Boolean,attribute:"reserve-tabs",reflect:!0,converter:z})],o.prototype,"reserveTabs",void 0);c([h({type:Number,attribute:"reserve-tabs-count"})],o.prototype,"reserveTabsCount",void 0);c([h({type:String,attribute:"reserve-tabs-widths"})],o.prototype,"reserveTabsWidths",void 0);c([h({type:Boolean,attribute:"layout-pending",reflect:!0,converter:z})],o.prototype,"layoutPending",void 0);c([h({type:Array,attribute:"utility-items",converter:o._JSON_ARRAY})],o.prototype,"utilityItems",void 0);c([h({type:String,attribute:"search-placeholder"})],o.prototype,"searchPlaceholder",void 0);c([h({type:String,attribute:"search-button-label"})],o.prototype,"searchButtonLabel",void 0);c([h({type:String,attribute:"menu-label"})],o.prototype,"menuLabel",void 0);c([h({type:String,attribute:"menu-button-label"})],o.prototype,"menuButtonLabel",void 0);c([h({type:String,attribute:"menu-sub-label"})],o.prototype,"menuSubLabel",void 0);c([h({type:String,attribute:"menu-section-label"})],o.prototype,"menuSectionLabel",void 0);c([h({type:String,attribute:"menu-search-placeholder"})],o.prototype,"menuSearchPlaceholder",void 0);c([h({type:Array,attribute:"menu-data",converter:o._JSON_ARRAY})],o.prototype,"menuData",void 0);c([h({type:Boolean,attribute:"defer-drawer",reflect:!0,converter:z})],o.prototype,"deferDrawer",void 0);c([h({type:Boolean,attribute:"show-drawer",reflect:!0,converter:M})],o.prototype,"showDrawer",void 0);c([h({type:Boolean,attribute:"always-show-menu-button",reflect:!0,converter:z})],o.prototype,"alwaysShowMenuButton",void 0);c([h({type:Boolean,attribute:"show-search",reflect:!0,converter:M})],o.prototype,"showSearch",void 0);c([h({type:Boolean,attribute:"include-utility-in-menu",reflect:!0,converter:z})],o.prototype,"includeUtilityInMenu",void 0);c([h({type:Boolean,attribute:"drawer-overlay",reflect:!0,converter:M})],o.prototype,"drawerOverlay",void 0);c([h({type:String,attribute:"search-max"})],o.prototype,"searchMax",void 0);c([h({type:String,attribute:"search-min"})],o.prototype,"searchMin",void 0);c([h({type:String,attribute:"search-height"})],o.prototype,"searchHeight",void 0);c([h({type:String,attribute:"search-text",reflect:!0})],o.prototype,"searchText",void 0);c([k()],o.prototype,"_drawerId",void 0);c([k()],o.prototype,"_menuExpanded",void 0);c([k()],o.prototype,"_searchId",void 0);c([k()],o.prototype,"_drawerReady",void 0);c([k()],o.prototype,"_mobileSearchOpen",void 0);c([k()],o.prototype,"_slotNavItems",void 0);c([k()],o.prototype,"_slotUtils",void 0);c([k()],o.prototype,"_slotMenu",void 0);c([k()],o.prototype,"_collapsed",void 0);c([k()],o.prototype,"_hideLogoText",void 0);o=P=c([I("scb-header")],o);
|
|
368
|
+
);font-weight:var(--md-sys-typescale-title-small-weight, 500);letter-spacing:var(--md-sys-typescale-title-small-tracking, 0);color:var(--md-sys-color-on-surface);white-space:nowrap;border-radius:0;outline:0}.tab-link[aria-current=page]{color:var(--md-sys-color-primary)}.tab-link::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;border-radius:999px 999px 0 0;background-color:transparent}.tab-link[aria-current=page]::after{background-color:var(--md-sys-color-primary)}.tab-link:focus-visible{outline:0}.header-icon-button:focus-visible md-focus-ring,.header-search-clear:focus-visible md-focus-ring,.header-text-button:focus-visible md-focus-ring,.search-submit:focus-visible md-focus-ring,.tab-link:focus-visible+md-focus-ring,.utility-link:focus-visible md-focus-ring{display:block}.header-text-button,.utility-link{position:relative}.header-icon-button,.header-text-button,.search-submit,.utility-link{border:0;font:inherit;letter-spacing:0;-webkit-tap-highlight-color:transparent}.search-submit{position:relative}.header-text-button,.search-submit,.utility-link{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-block-size:calc(var(--md-sys-typescale-label-small-line-height, 20px) + ((var(--spacing-4, 12px) - var(--spacing-1, 2px))*2));padding-block:calc(var(--spacing-4, 12px) - var(--spacing-1, 2px));padding-inline:var(--spacing-5, 16px);border-radius:var(--radius-full, 1000px);color:var(--md-sys-color-primary, var(--p-40, #1f44ff));font-family:var(--md-sys-typescale-label-small-font, var(--brand-font, Inter), sans-serif);font-size:var(--md-sys-typescale-label-small-size, 14px);line-height:var(--md-sys-typescale-label-small-line-height, 20px);font-weight:var(--md-sys-typescale-label-small-weight, 600);text-decoration:none;background:0 0;cursor:pointer;white-space:nowrap}.header-text-button:hover,.utility-link:hover{background:color-mix(in srgb,var(--md-sys-color-primary, #1f44ff) 8%,transparent)}.search-submit{min-block-size:var(--scb-search-height, var(--scale-11, 48px));min-inline-size:var(--scale-12, 64px);color:var(--md-sys-color-on-secondary-container, var(--p-30, #1e00be));background:var(--md-sys-color-secondary-container, var(--p-90, #d6f1ff))}.search-submit:hover{background:color-mix(in srgb,var(--md-sys-color-secondary-container, #d6f1ff) 92%,var(--md-sys-color-on-secondary-container, #1e00be))}.header-icon-button{position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:calc(var(--icon-size-medium, 24px) + (var(--spacing-3, 12px)*2));block-size:calc(var(--icon-size-medium, 24px) + (var(--spacing-3, 12px)*2));padding:0;border-radius:var(--radius-full, 1000px);color:var(--md-sys-color-on-surface, #1b1b1f);background:0 0;cursor:pointer}.mobile-search-close,.mobile-search-trigger{color:var(--md-sys-color-on-secondary-container, var(--p-30, #1e00be));background:var(--md-sys-color-secondary-container, var(--p-90, #d6f1ff))}@media (min-width:600px){.mobile-search-trigger.header-icon-button{display:none}}.header-icon-button:hover,.header-search-clear:hover{background:color-mix(in srgb,currentColor 8%,transparent)}.mobile-search-close:hover,.mobile-search-trigger:hover{background:color-mix(in srgb,var(--md-sys-color-secondary-container, #d6f1ff) 92%,var(--md-sys-color-on-secondary-container, #1e00be))}.header-icon-button:focus,.header-icon-button:focus-visible,.header-search-clear:focus,.header-search-clear:focus-visible,.header-text-button:focus,.header-text-button:focus-visible,.search-submit:focus,.search-submit:focus-visible,.utility-link:focus,.utility-link:focus-visible{outline:0}.header-icon-button:focus-visible,.header-search-clear:focus-visible,.header-text-button:focus-visible,.search-submit:focus-visible,.utility-link:focus-visible{outline:0}.header-icon-button md-focus-ring,.header-search-clear md-focus-ring,.header-text-button md-focus-ring,.search-submit md-focus-ring,.utility-link md-focus-ring{position:absolute;inset:var(--spacing-neg-2, -4px);pointer-events:none;display:none;border-radius:inherit}.header-text-button{gap:var(--spacing-3, 8px)}.header-text-button .header-symbol{inline-size:var(--icon-size-small, 20px);font-size:var(--icon-size-small, 20px);line-height:var(--icon-size-small, 20px)}.header-symbol,.sr-only{overflow:hidden;white-space:nowrap}.header-symbol{display:inline-block;inline-size:1em;block-size:1em;font-family:"Material Symbols Outlined";font-size:var(--icon-size-medium, 24px);line-height:1;text-align:center;text-transform:none;word-wrap:normal;direction:ltr;font-feature-settings:"liga"1;font-variation-settings:"FILL"0,"wght"400,"GRAD"0,"opsz"24;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.header-symbol.scb-svg-icon{fill:currentColor;font:inherit}.header-search-icon.header-symbol{display:inline-flex;align-items:center;justify-content:center;inline-size:var(--scb-header-search-leading-size);font-size:var(--scb-header-search-icon-size)}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;clip:rect(0,0,0,0);border:0}.drawer-close{box-sizing:border-box;display:flex;justify-content:flex-end;padding-block-start:var(--spacing-4, 12px);padding-inline:var(--spacing-4, 12px);background:var(--md-sys-color-surface-container-lowest)}.drawer-close[hidden]{display:none}.drawer-close ::slotted(*){flex:0 0 auto}.divider{border-bottom:var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant, #e0e0e0);position:relative;z-index:0}:host([data-hide-logo-text]) .logo-text{display:none}`,T);c([h({type:String,attribute:"max-width"})],o.prototype,"maxWidth",void 0);c([h({type:String,reflect:!0})],o.prototype,"spacing",void 0);c([h({type:String,attribute:"spacing-top",reflect:!0})],o.prototype,"spacingTop",void 0);c([h({type:String,attribute:"spacing-bottom",reflect:!0})],o.prototype,"spacingBottom",void 0);c([h({type:String,reflect:!0,converter:N})],o.prototype,"size",void 0);c([h({type:String,attribute:"logo-text"})],o.prototype,"logoText",void 0);c([h({type:String,attribute:"logotype-text"})],o.prototype,"logotypeText",void 0);c([h({type:String,attribute:"logo-alt"})],o.prototype,"logoAlt",void 0);c([h({type:String,attribute:"logo-href"})],o.prototype,"logoHref",void 0);c([h({type:String,attribute:"logo-src"})],o.prototype,"logoSrc",void 0);c([h({type:String,attribute:"logo-width"})],o.prototype,"logoWidth",void 0);c([h({type:String,attribute:"logo-height"})],o.prototype,"logoHeight",void 0);c([h({type:String,attribute:"logo-aspect-ratio"})],o.prototype,"logoAspectRatio",void 0);c([h({type:Boolean,attribute:"logo-invert-dm",reflect:!0,converter:z})],o.prototype,"logoInvertDm",void 0);c([h({type:Boolean,reflect:!0})],o.prototype,"banner",void 0);c([h({type:String,attribute:"banner-label"})],o.prototype,"bannerLabel",void 0);c([h({type:Array,attribute:"tabs",converter:o._JSON_ARRAY})],o.prototype,"tabs",void 0);c([h({type:Number,attribute:"active-tab",reflect:!0})],o.prototype,"activeTab",void 0);c([h({type:Boolean,attribute:"reserve-tabs",reflect:!0,converter:z})],o.prototype,"reserveTabs",void 0);c([h({type:Number,attribute:"reserve-tabs-count"})],o.prototype,"reserveTabsCount",void 0);c([h({type:String,attribute:"reserve-tabs-widths"})],o.prototype,"reserveTabsWidths",void 0);c([h({type:Boolean,attribute:"layout-pending",reflect:!0,converter:z})],o.prototype,"layoutPending",void 0);c([h({type:Array,attribute:"utility-items",converter:o._JSON_ARRAY})],o.prototype,"utilityItems",void 0);c([h({type:String,attribute:"search-placeholder"})],o.prototype,"searchPlaceholder",void 0);c([h({type:String,attribute:"search-button-label"})],o.prototype,"searchButtonLabel",void 0);c([h({type:String,attribute:"menu-label"})],o.prototype,"menuLabel",void 0);c([h({type:String,attribute:"menu-button-label"})],o.prototype,"menuButtonLabel",void 0);c([h({type:String,attribute:"menu-sub-label"})],o.prototype,"menuSubLabel",void 0);c([h({type:String,attribute:"menu-section-label"})],o.prototype,"menuSectionLabel",void 0);c([h({type:String,attribute:"menu-search-placeholder"})],o.prototype,"menuSearchPlaceholder",void 0);c([h({type:Array,attribute:"menu-data",converter:o._JSON_ARRAY})],o.prototype,"menuData",void 0);c([h({type:Boolean,attribute:"defer-drawer",reflect:!0,converter:z})],o.prototype,"deferDrawer",void 0);c([h({type:Boolean,attribute:"show-drawer",reflect:!0,converter:M})],o.prototype,"showDrawer",void 0);c([h({type:Boolean,attribute:"always-show-menu-button",reflect:!0,converter:z})],o.prototype,"alwaysShowMenuButton",void 0);c([h({type:Boolean,attribute:"show-search",reflect:!0,converter:M})],o.prototype,"showSearch",void 0);c([h({type:Boolean,attribute:"include-utility-in-menu",reflect:!0,converter:z})],o.prototype,"includeUtilityInMenu",void 0);c([h({type:Boolean,attribute:"drawer-overlay",reflect:!0,converter:M})],o.prototype,"drawerOverlay",void 0);c([h({type:String,attribute:"search-max"})],o.prototype,"searchMax",void 0);c([h({type:String,attribute:"search-min"})],o.prototype,"searchMin",void 0);c([h({type:String,attribute:"search-height"})],o.prototype,"searchHeight",void 0);c([h({type:String,attribute:"search-text",reflect:!0})],o.prototype,"searchText",void 0);c([k()],o.prototype,"_drawerId",void 0);c([k()],o.prototype,"_menuExpanded",void 0);c([k()],o.prototype,"_searchId",void 0);c([k()],o.prototype,"_drawerReady",void 0);c([k()],o.prototype,"_mobileSearchOpen",void 0);c([k()],o.prototype,"_slotNavItems",void 0);c([k()],o.prototype,"_slotUtils",void 0);c([k()],o.prototype,"_slotMenu",void 0);c([k()],o.prototype,"_collapsed",void 0);c([k()],o.prototype,"_hideLogoText",void 0);o=P=c([I("scb-header")],o);
|